diff --git a/N3OW/common/defines/00_defines.txt b/N3OW/common/defines/00_defines.txt index 433bf8f8..a72221b3 100644 --- a/N3OW/common/defines/00_defines.txt +++ b/N3OW/common/defines/00_defines.txt @@ -1097,7 +1097,7 @@ NCulture = { # Chance (0..100) to advance with the innovation each month: # base + from spread + from fascination - INNOVATION_PROGRESS_CHANCE_BASE = 20 + INNOVATION_PROGRESS_CHANCE_BASE = 10 INNOVATION_PROGRESS_CHANCE_FROM_SPREAD = 65 # chance bonus to innovation if there is any spread by nearby cultures INNOVATION_PROGRESS_CHANCE_SPREAD_AND_FASCINATION_MULTIPLIER = 1.5 # multiply Cultural Acceptance (100-based) by this as bonus multiplier if the current spread innovation is ALSO a fascination # from fascination = base + SKILL_LEVEL_BONUS( max( 0, head relevant skill - HEAD_SKILL_BASE ) ) diff --git a/N3OW/common/governments/01_japan_government_types.txt b/N3OW/common/governments/01_japan_government_types.txt deleted file mode 100644 index dbead3ef..00000000 --- a/N3OW/common/governments/01_japan_government_types.txt +++ /dev/null @@ -1,163 +0,0 @@ -japan_administrative_government = { # Ritsuryo - government_rules = { - create_cadet_branches = yes - rulers_should_have_dynasty = yes - dynasty_named_realms = no - administrative = yes - legitimacy = yes - landless_playable = yes - use_as_base_on_landed = yes - use_as_base_on_rank_up = yes - inherit_from_dynastic_government = no - sticky_government = yes - house_aspirations = yes - noble_families = yes - deny_powerful_vassal = yes - } - - royal_court = any - - domicile_type = japanese_manor - main_administrative_tier = county - min_appointment_tier = county - minimum_provincial_maa_tier = duchy - - primary_holding = castle_holding - primary_heritages = { heritage_japonic } - valid_holdings = { city_holding temple_citadel_holding } - required_county_holdings = { castle_holding city_holding church_holding } - - vassal_contract_group = japan_administrative_vassal - - character_modifier = { - # LEVIES & TAXES - japan_feudal_government_tax_contribution_mult = -0.5 - japan_feudal_government_levy_contribution_mult = -0.5 - garrison_size = -0.5 - # MEN-AT-ARMS - men_at_arms_cap = -2 - men_at_arms_limit = -2 - # KNIGHTS - knight_limit = -5 - # VASSALS - vassal_limit = 50 # Kampaku - # DOMAIN - domain_limit_max = 1 # Raised further by manor - domain_tax_mult = 0.3 - } - - can_get_government = { - has_tgp_dlc_trigger = yes - top_liege = { - OR = { - government_is_japanese_trigger = yes - has_character_flag = tgp_japan_restore_japanese_government_flag - culture = culture:japanese - culture = { - any_parent_culture_or_above = { this = culture:japanese } - } - } - } - } - - # The Regent always remains in the same place. - can_move_realm_capital = { - NOT = { primary_title ?= title:e_japan } - } - - compatible_government_type_succession = { japan_feudal_government } - - # Use flags instead of has_government for moddability if possible (i.e., wherever not visible to the player). - flags = { - government_is_japan_administrative - # These flags only exist for loc and in-game descriptions - government_has_influence - government_has_title_men_at_arms - government_has_powerful_families - government_has_county_tier_noble_families - has_special_house_aspirations - government_is_settled - government_uses_domicile_but_not_adventurer - has_unique_government_perks - government_uses_admin_province_obligations - government_has_house_blocs - } - - color = { 250 90 150 } - realm_mask_offset = { 0.02 0.072 } - realm_mask_scale = { 0.88 0.88 } -} - -japan_feudal_government = { # Soryo - government_rules = { - create_cadet_branches = yes - rulers_should_have_dynasty = yes - dynasty_named_non_independent_landed_rulers = yes - landless_playable = yes - legitimacy = yes - house_aspirations = yes - use_as_base_on_landed = yes - use_as_base_on_rank_up = yes - noble_families = yes - } - - royal_court = any - - character_modifier = { - # LEVIES & TAXES - japan_administrative_government_tax_contribution_mult = -0.5 - japan_administrative_government_levy_contribution_mult = -0.5 - garrison_size = -0.5 - # VASSALS - vassal_limit = 50 # Shogun - # KNIGHTS - knight_effectiveness_mult = 0.1 - knight_limit = 2 - # DOMAIN - domain_limit_max = 2 # Raised further by manor - # SAMURAI - archer_cavalry_recruitment_cost_mult = -0.25 - heavy_infantry_recruitment_cost_mult = -0.25 - } - - domicile_type = japanese_manor - - primary_holding = castle_holding - primary_heritages = { heritage_japonic } - valid_holdings = { temple_citadel_holding } - required_county_holdings = { castle_holding city_holding church_holding } - - vassal_contract_group = japan_feudal_vassal - - can_get_government = { - has_tgp_dlc_trigger = yes - } - - # The Regent always remains in the same place. - can_move_realm_capital = { - NOT = { primary_title ?= title:e_japan } - } - - compatible_government_type_succession = { japan_administrative_government } - - ai = { - use_legends = yes - } - - # Use flags instead of has_government for moddability if possible (i.e., wherever not visible to the player). - flags = { - may_elevate_co_monarch - government_is_japan_feudal - government_has_county_tier_noble_families - has_special_house_aspirations - government_is_settled - government_uses_domicile_but_not_adventurer - has_unique_government_perks - government_has_house_blocs - } - - color = { 68 100 250 } - realm_mask_offset = { 0.0 0.075 } - realm_mask_scale = { 0.95 0.95 } -} - diff --git a/N3OW/common/governments/_governments.info b/N3OW/common/governments/_governments.info index f9a78be7..e7ea3c95 100644 --- a/N3OW/common/governments/_governments.info +++ b/N3OW/common/governments/_governments.info @@ -303,6 +303,11 @@ # Default is no # radiance = no + + ### Brief: disable_regnal_numbers (bool) + # Will this government disable regnal numbers for titles held by people with the same name + # throughout its history? Default is no. + disable_regnal_numbers = no } ### mechanic_type ( government type ) @@ -441,6 +446,12 @@ # royal_court = none / any / top_liege + ### brief: blocked_subject_courts (government_type) + # prevents any vassals of the listed types from having their own royal court in tandem with the restrictions from royal_court + # if left empty or not present no special restrictions will be set on vassal courts other than those specified by royal_court + # + blocked_subject_courts = { government_type_key ... } + ### brief: main_administrative_tier ( enum ) # Title tier that enables most administrative mechanics # Such as title troops, map modes etc diff --git a/N3OW/common/holdings/00_holdings.txt b/N3OW/common/holdings/00_holdings.txt deleted file mode 100644 index 93b43899..00000000 --- a/N3OW/common/holdings/00_holdings.txt +++ /dev/null @@ -1,266 +0,0 @@ -castle_holding = { - primary_building = castle_01 - buildings = { - capital_bureau_01 - - hospices_01 - curtain_walls_01 - watchtowers_01 - outposts_01 - hill_forts_01 - ramparts_01 - farm_estates_01 - cereal_fields_01 - paddy_fields_01 - pastures_01 - peat_quarries_01 - hill_farms_01 - logging_camps_01 - plantations_01 - quarries_01 - orchards_01 - elephant_pens_01 - hunting_grounds_01 - regimental_grounds_01 - barracks_01 - military_camps_01 - camel_farms_01 - stables_01 - smiths_01 - hillside_grazing_01 - warrior_lodges_01 - horse_pastures_01 - windmills_01 - watermills_01 - caravanserai_01 - workshops_01 - wind_furnace_01 - powder_magazine_01 - common_tradeport_01 - hall_of_heroes_01 - special_sicilian_parliament_01 - special_greenhouse_01 - qanats_01 - murex_farm_01 - waterworks_01 - spice_plantation_01 - oath_warriors_building_01 - oath_faithful_building_01 - oath_poor_building_01 - monastic_schools_01 # only for the monastic_schools_allowed_in_every_holding_type faith tenet - } -} - -tribal_holding = { - primary_building = tribe_01 - - buildings = { - palisades_01 - war_camps_01 - longhouses_01 - market_villages_01 - - idjang_forts_01 - wantilan_01 - kora_kora_yards_01 - water_temples_01 - stilted_granaries_01 - - hillside_grazing_01 - warrior_lodges_01 - horse_pastures_01 - - common_tradeport_01 # only for trade_ports_enabled_for_tribals culture parameter - - oath_warriors_building_01 - oath_faithful_building_01 - oath_poor_building_01 - - monastic_schools_01 # only for the monastic_schools_allowed_in_every_holding_type faith tenet - } -} - -city_holding = { - primary_building = city_01 - buildings = { - hospices_01 - outposts_01 - farm_estates_01 - cereal_fields_01 - paddy_fields_01 - pastures_01 - peat_quarries_01 - hill_farms_01 - logging_camps_01 - plantations_01 - quarries_01 - orchards_01 - elephant_pens_01 - hunting_grounds_01 - regimental_grounds_01 - barracks_01 - military_camps_01 - camel_farms_01 - stables_01 - smiths_01 - hillside_grazing_01 - warrior_lodges_01 - horse_pastures_01 - windmills_01 - watermills_01 - caravanserai_01 - workshops_01 - wind_furnace_01 - - guild_halls_01 - - common_tradeport_01 - qanats_01 - murex_farm_01 - waterworks_01 - spice_plantation_01 - - breweries_01 - - oath_warriors_building_01 - oath_faithful_building_01 - oath_poor_building_01 - - monastic_schools_01 # only for the monastic_schools_allowed_in_every_holding_type faith tenet - } - - can_be_inherited = yes -} - -church_holding = { - primary_building = temple_01 - buildings = { - hospices_01 - scriptorium_01 - outposts_01 - farm_estates_01 - cereal_fields_01 - paddy_fields_01 - pastures_01 - peat_quarries_01 - hill_farms_01 - logging_camps_01 - plantations_01 - quarries_01 - orchards_01 - elephant_pens_01 - hunting_grounds_01 - regimental_grounds_01 - barracks_01 - military_camps_01 - camel_farms_01 - stables_01 - smiths_01 - hillside_grazing_01 - warrior_lodges_01 - horse_pastures_01 - windmills_01 - watermills_01 - caravanserai_01 - workshops_01 - wind_furnace_01 - - monastic_schools_01 - megalith_01 - - common_tradeport_01 - hall_of_heroes_01 - qanats_01 - waterworks_01 - - breweries_01 - - oath_warriors_building_01 - oath_faithful_building_01 - oath_poor_building_01 - } - - can_be_inherited = yes -} - -nomad_holding = { - primary_building = nomadic_camp_01 - counts_toward_domain_limit_if_disabled = no - can_be_inherited = yes - required_heir_government_types = { nomad_government } - - parameters = { - no_buildings - no_levies - county_fertility - } -} - -herder_holding = { - primary_building = herder_camp_01 - counts_toward_domain_limit_if_disabled = no - can_be_inherited = yes - required_heir_government_types = { - nomad_government - herder_government - } - - parameters = { - no_buildings - no_levies - county_fertility - } -} - -temple_citadel_holding = { - primary_building = temple_citadel_01 - buildings = { - citadel_shrine_01 - sacred_pool_01 - vihara_halls_01 - waterworks_01 - spice_plantation_01 - - capital_bureau_01 - - scriptorium_01 - monastic_schools_01 - megalith_01 - - hospices_01 - farm_estates_01 - cereal_fields_01 - paddy_fields_01 - pastures_01 - peat_quarries_01 - hill_farms_01 - logging_camps_01 - plantations_01 - quarries_01 - orchards_01 - elephant_pens_01 - regimental_grounds_01 - barracks_01 - military_camps_01 - camel_farms_01 - stables_01 - smiths_01 - hillside_grazing_01 - warrior_lodges_01 - horse_pastures_01 - windmills_01 - watermills_01 - caravanserai_01 - workshops_01 - wind_furnace_01 - powder_magazine_01 - - common_tradeport_01 - hall_of_heroes_01 - qanats_01 - - breweries_01 - } - - can_be_inherited = yes -} diff --git a/N3OW/common/holdings/_holdings.info b/N3OW/common/holdings/_holdings.info deleted file mode 100644 index 0d69f024..00000000 --- a/N3OW/common/holdings/_holdings.info +++ /dev/null @@ -1,71 +0,0 @@ -== Structure == - -name_of_the_holding = { - - ### brief: primary_building ( key ) - # The primary building for this holding - # (will be built when creating a holding of this type) - # - primary_building = city_01 - - ### brief: buildings ( keys, optional ) - # First levels of all buildings buildable in the holding - # (doesn't include the primary building) - # - buildings = { - city_market_01 - common_shipyard_01 - ... - } - - ### brief: can_be_inherited ( bool, optional) - # Can a barony with this holding be inherited? - # Default: yes - # - can_be_inherited = yes/no - - ### brief: counts_toward_domain_limit_if_disabled ( bool, optional) - # Does a barony with this holding type count toward a ruler's domain - # limit if the holding is disabled? - # Default: yes - # - counts_toward_domain_limit_if_disabled = yes/no - - ### brief: required_heir_government_types ( array of database keys, optional ) - # Which government types are required to inherit a county title with - # this holding built in the capital province when succession occurs? - # If generating a character for county title of this province during succession, - # the first government type in the list will be used. - # Keys are mapped to the government types database: common/governments - # Default: none - # - required_heir_government_types = { - nomad_government - ... - } - - ### brief: parameters ( keys, optional ) - # An arbitrary list of parameter keys which can be checked with - # the has_holding_parameter trigger - # Default: none - # - parameters = { - no_buildings - ... - } -} - -== Modifiers == -The following modifiers are automatically generated for all holding types: - -* _build_speed (example: church_holding_build_speed) -* _build_gold_cost -* _build_piety_cost -* _build_prestige_cost -* _holding_build_speed -* _holding_build_gold_cost -* _holding_build_piety_cost -* _holding_build_prestige_cost -These affect building buildings within such a holding or the holdings themselves. - -These work everywhere the more generic version works. E.G., church_holding_build_speed will work everywhere build_speed does. diff --git a/N3OW/common/laws/00_realm_laws.txt b/N3OW/common/laws/00_realm_laws.txt deleted file mode 100644 index aeebf0bb..00000000 --- a/N3OW/common/laws/00_realm_laws.txt +++ /dev/null @@ -1,3187 +0,0 @@ -@crown_authority_cooldown_years = 20 -@tribal_authority_cooldown_years = 10 -@nomadic_authority_cooldown_years = 5 -@imperial_bureaucracy_cooldown_years_1 = 10 -@imperial_bureaucracy_cooldown_years_2 = 20 -@imperial_bureaucracy_cooldown_years_3 = 30 - -@camp_purpose_prestige_cost = 1000 -@camp_purpose_ai_will_do_malus_t3 = -30 -@camp_purpose_ai_will_do_malus_t2 = -20 -@camp_purpose_ai_will_do_malus_t1 = -10 -@camp_purpose_ai_will_do_bonus_t1 = 10 -@camp_purpose_ai_will_do_bonus_t2 = 20 -@camp_purpose_ai_will_do_bonus_t3 = 30 - -@mandala_decree_piety_cost = 1000 -@mandala_decree_prestige_cost = 500 - -crown_authority = { - default = crown_authority_1 - cumulative = yes - flag = realm_law - - crown_authority_0 = { - modifier = { - belligerent_opinion = -10 - barons_and_minor_landholders_opinion = 20 - glory_hound_opinion = 10 - parochial_opinion = 10 - courtly_opinion = 5 - } - flag = uses_crown_authority - - can_keep = { - realm_law_use_crown_authority = yes - trigger_if = { - limit = { - government_allows = administrative - top_liege != this - } - liege = { has_realm_law = crown_authority_0 } - } - } - - on_pass = { - # Remove modifiers. - remove_law_related_modifiers_effect = yes - } - } - - crown_authority_1 = { - modifier = { - belligerent_opinion = 5 - barons_and_minor_landholders_opinion = -30 - glory_hound_opinion = -15 - parochial_opinion = -15 - courtly_opinion = -5 - minority_opinion = -10 - } - flag = title_revocation_allowed - flag = vassal_retraction_allowed - flag = can_have_tributaries - flag = can_change_partition_succession_laws - flag = diarchs_want_to_subsidise_without_this_flag - - can_keep = { - realm_law_use_crown_authority = yes - trigger_if = { - limit = { - government_allows = administrative - top_liege != this - } - liege = { has_realm_law = crown_authority_1 } - } - } - - can_pass = { - trigger_if = { - limit = { has_realm_law = crown_authority_0 } - custom_description = { - subject = root - text = "has_crown_authority_cooldown" - NAND = { - has_variable = crown_authority_cooldown - NOT = { - culture = { has_innovation = innovation_all_things } - } - } - } - } - can_pass_law_ca1_trigger = yes - } - - pass_cost = { - prestige = { - if = { - limit = { - NOR = { - has_realm_law = crown_authority_2 - has_realm_law = crown_authority_3 - } - } - add = increase_crown_authority_prestige_cost - } - } - } - - on_pass = { - # Increment cooldown breaker tally, if appropriate. - calculate_authority_cooldown_break_effect = yes - # Set regular cooldown. - set_variable = { - name = crown_authority_cooldown - years = @crown_authority_cooldown_years - } - # Remove modifiers. - remove_law_related_modifiers_effect = yes - } - - ai_will_do = { - if = { - limit = { has_realm_law = crown_authority_0 } - value = 1 - } - } - } - - crown_authority_2 = { - modifier = { - belligerent_opinion = 10 - barons_and_minor_landholders_opinion = -10 - glory_hound_opinion = -10 - parochial_opinion = -10 - courtly_opinion = -5 - zealot_opinion = -10 - minority_opinion = -10 - vassal_tax_contribution_mult = 0.1 - vassal_levy_contribution_mult = 0.1 - } - flag = vassal_internal_wars_banned - flag = vassal_refusal_is_treason - flag = can_change_succession_laws - flag = titles_cannot_leave_realm_on_succession # Hardcoded flag - - can_keep = { - realm_law_use_crown_authority = yes - trigger_if = { - limit = { - government_allows = administrative - top_liege != this - } - liege = { has_realm_law = crown_authority_2 } - } - } - - can_pass = { - trigger_if = { - limit = { - NOT = { has_realm_law = crown_authority_3 } - NAND = { - government_allows = administrative - top_liege != this - } - } - has_realm_law = crown_authority_1 - custom_description = { - subject = root - text = "has_crown_authority_cooldown" - NAND = { - has_variable = crown_authority_cooldown - NOT = { - culture = { has_innovation = innovation_all_things } - } - } - } - } - can_pass_law_ca2_trigger = yes - } - - pass_cost = { - prestige = { - if = { - limit = { - NOT = { has_realm_law = crown_authority_3 } - } - add = increase_crown_authority_prestige_cost - } - } - } - - on_pass = { - # Increment cooldown breaker tally, if appropriate. - calculate_authority_cooldown_break_effect = yes - # Set regular cooldown. - set_variable = { - name = crown_authority_cooldown - years = @crown_authority_cooldown_years - } - # Remove modifiers. - remove_law_related_modifiers_effect = yes - } - - ai_will_do = { - if = { - limit = { has_realm_law = crown_authority_1 } - value = 1 - } - } - } - - crown_authority_3 = { - modifier = { - belligerent_opinion = 15 - barons_and_minor_landholders_opinion = -20 - glory_hound_opinion = -25 - parochial_opinion = -25 - courtly_opinion = -10 - zealot_opinion = -20 - minority_opinion = -30 - vassal_tax_contribution_mult = 0.25 - vassal_levy_contribution_mult = 0.25 - } - flag = vassal_all_wars_banned - flag = can_designate_heirs - flag = max_authority_level - - can_keep = { - realm_law_use_crown_authority = yes - trigger_if = { - limit = { - government_allows = administrative - top_liege != this - } - liege = { has_realm_law = crown_authority_3 } - } - } - - can_pass = { - trigger_if = { - limit = { - NAND = { - government_allows = administrative - top_liege != this - } - } - has_realm_law = crown_authority_2 - custom_description = { - subject = root - text = "has_crown_authority_cooldown" - NAND = { - has_variable = crown_authority_cooldown - NOT = { - culture = { has_innovation = innovation_all_things } - } - } - } - } - can_pass_law_ca3_trigger = yes - } - - pass_cost = { - prestige = { - if = { - limit = { - NOT = { has_realm_law = crown_authority_3 } - } - add = increase_crown_authority_prestige_cost - } - } - } - - on_pass = { - # Increment cooldown breaker tally, if appropriate. - calculate_authority_cooldown_break_effect = yes - # Set regular cooldown. - set_variable = { - name = crown_authority_cooldown - years = @crown_authority_cooldown_years - } - # Remove modifiers. - remove_law_related_modifiers_effect = yes - } - } -} - -tribal_authority = { - default = tribal_authority_1 - cumulative = yes - flag = realm_law - - tribal_authority_0 = { - modifier = { - glory_hound_opinion = 10 - parochial_opinion = 10 - courtly_opinion = 5 - belligerent_opinion = -15 - } - flag = uses_tribal_authority - flag = imprisonment_toggle_enable - - can_keep = { realm_law_use_tribal_authority = yes } - #Imprisonment is disabled if you have this law. Script is in the interaction, currently in 00_prison_interactions. - - on_pass = { - # Remove modifiers. - remove_law_related_modifiers_effect = yes - } - } - - tribal_authority_1 = { - modifier = { - glory_hound_opinion = -15 - parochial_opinion = -15 - courtly_opinion = -5 - minority_opinion = -10 - belligerent_opinion = 5 - } - flag = can_have_tributaries - flag = can_change_succession_laws - flag = imprisonment_toggle_on - - can_keep = { - realm_law_use_tribal_authority = yes - } - - can_pass = { - trigger_if = { - limit = { has_realm_law = tribal_authority_0 } - custom_description = { - subject = root - text = "has_tribal_authority_cooldown" - NAND = { - has_variable = tribal_authority_cooldown - NOT = { - culture = { has_innovation = innovation_all_things } - } - } - } - } - } - - pass_cost = { - prestige = { - if = { - limit = { - NOR = { - has_realm_law = tribal_authority_2 - has_realm_law = tribal_authority_3 - } - } - add = increase_tribal_authority_prestige_cost - } - } - } - - on_pass = { - # Increment cooldown breaker tally, if appropriate. - calculate_authority_cooldown_break_effect = yes - # Set regular cooldown. - set_variable = { - name = tribal_authority_cooldown - years = @tribal_authority_cooldown_years - } - # Remove modifiers. - remove_law_related_modifiers_effect = yes - } - - ai_will_do = { - if = { - limit = { has_realm_law = tribal_authority_0 } - value = 1 - } - } - } - - tribal_authority_2 = { - modifier = { - glory_hound_opinion = -10 - parochial_opinion = -10 - courtly_opinion = -5 - zealot_opinion = -10 - minority_opinion = -10 - belligerent_opinion = 15 - } - flag = title_revocation_allowed - flag = vassal_retraction_allowed - flag = diarchs_want_to_subsidise_without_this_flag - - can_keep = { - realm_law_use_tribal_authority = yes - trigger_if = { - limit = { - NOT = { - culture = { - has_cultural_parameter = forming_confederations_is_easier - } - } - } - NOT = { - is_confederation_member = yes - } - } - } - - can_pass = { - trigger_if = { - limit = { - NOT = { has_realm_law = tribal_authority_3 } - } - has_realm_law = tribal_authority_1 - custom_description = { - subject = root - text = "has_tribal_authority_cooldown" - NAND = { - has_variable = tribal_authority_cooldown - NOT = { - culture = { has_innovation = innovation_all_things } - } - } - } - } - } - - pass_cost = { - prestige = { - if = { - limit = { - NOT = { has_realm_law = tribal_authority_3 } - } - add = increase_tribal_authority_prestige_cost - } - } - } - - on_pass = { - # Increment cooldown breaker tally, if appropriate. - calculate_authority_cooldown_break_effect = yes - # Set regular cooldown. - set_variable = { - name = tribal_authority_cooldown - years = @tribal_authority_cooldown_years - } - # Remove modifiers. - remove_law_related_modifiers_effect = yes - } - - ai_will_do = { - if = { - limit = { has_realm_law = tribal_authority_1 } - value = 1 - } - } - } - - tribal_authority_3 = { - modifier = { - glory_hound_opinion = -25 - parochial_opinion = -25 - courtly_opinion = -10 - zealot_opinion = -20 - minority_opinion = -30 - belligerent_opinion = 20 - } - flag = max_authority_level - #Settling is disabled unless you have this law. Script is in the decisions, currently in 80_major_decisions. - #Reforming pagan religions (but not creating other faiths) is disabled unless you have this law. Script is in the reformation prereqs, currently in 00_rules. - - can_keep = { - realm_law_use_tribal_authority = yes - trigger_if = { - limit = { - NOT = { - culture = { - has_cultural_parameter = forming_confederations_is_easier - } - } - } - NOT = { - is_confederation_member = yes - } - } - } - - can_pass = { - has_realm_law = tribal_authority_2 - custom_description = { - subject = root - text = "has_tribal_authority_cooldown" - NAND = { - has_variable = tribal_authority_cooldown - NOT = { - culture = { has_innovation = innovation_all_things } - } - } - } - } - - pass_cost = { prestige = increase_tribal_authority_prestige_cost } - - on_pass = { - # Increment cooldown breaker tally, if appropriate. - calculate_authority_cooldown_break_effect = yes - # Set regular cooldown. - set_variable = { - name = tribal_authority_cooldown - years = @tribal_authority_cooldown_years - } - # Remove modifiers. - remove_law_related_modifiers_effect = yes - } - - ai_will_do = { - if = { - limit = { has_realm_law = tribal_authority_2 } - value = 1 - } - if = { # Genghis is fundamentally uninterested in settling as feudal, and doesn't care for the additional -20 vassal opinion! - limit = { has_title = title:e_mongol_empire } - value = -10 - } - } - } -} - -camp_purpose = { - default = camp_purpose_wanderers - flag = realm_law - - camp_purpose_wanderers = { - pass_phrase = camp_purpose_pass_phrase - confirmation_title = camp_purpose_pass_phrase - confirmation_button_text = camp_purpose_confirmation_button_text - - flag = uses_camp_purpose - flag = can_change_succession_laws - flag = can_change_purpose_for_free - - - can_keep = { realm_law_use_camp_purpose = yes } - - pass_cost = { - prestige = @camp_purpose_prestige_cost - } - - on_pass = { - # Remove modifiers. - remove_law_related_modifiers_effect = yes - # Remove inappropriate buildings. - laamp_clear_inappropriate_buildings_effect = yes - # Adjust flavourisation. - remove_camp_purpose_flavourisation_variables_effect = yes - set_variable = flavourise_camp_purpose_wanderers - local_arbitration_boon_set_purpose_effect = { - MODIFIER = landless_local_arbitration_wanderers_modifier - } - } - - ai_will_do = { value = 0 } - } - - camp_purpose_mercenaries = { - pass_phrase = camp_purpose_pass_phrase - confirmation_title = camp_purpose_pass_phrase - confirmation_button_text = camp_purpose_confirmation_button_text - - flag = uses_camp_purpose - flag = can_change_succession_laws - flag = laamp_contracts_weight_up_mercenary - flag = laamp_contracts_weight_up_martial - flag = laamp_contracts_weight_up_prowess - flag = martial_camp_purpose - - # Camp unlocks. - flag = unlocks_baggage_train_siege_engineers - flag = unlocks_proving_grounds_lockwagon - flag = unlocks_camp_perimeter_palisade - flag = unlocks_camp_perimeter_ditch - - can_keep = { realm_law_use_camp_purpose = yes } - - pass_cost = { - prestige = { - if = { - limit = { - NOT = { has_realm_law_flag = can_change_purpose_for_free } - } - value = @camp_purpose_prestige_cost - } - } - } - - modifier = { - men_at_arms_cap = 1 - embarkation_cost_mult = -0.5 - knight_limit = 8 - } - - on_pass = { - # Remove modifiers. - remove_law_related_modifiers_effect = yes - # Remove inappropriate buildings. - laamp_clear_inappropriate_buildings_effect = yes - # Adjust flavourisation. - remove_camp_purpose_flavourisation_variables_effect = yes - set_variable = flavourise_camp_purpose_mercenaries - local_arbitration_boon_set_purpose_effect = { - MODIFIER = landless_local_arbitration_mercenaries_modifier - } - } - - ai_will_do = { - # If we've picked a purpose, don't change it. - if = { - limit = { - NOT = { has_realm_law = camp_purpose_wanderers } - } - value = 0 - } - else = { - # Traits. - ## Education. - if = { - limit = { has_trait = education_martial } - add = @camp_purpose_ai_will_do_bonus_t3 - } - ## Personality. - ### Cultural traditions - if = { - limit = { - culture = { - OR = { - has_cultural_parameter = much_more_likely_to_be_laamps - has_cultural_parameter = more_likely_to_be_laamps - } - } - } - add = @camp_purpose_ai_will_do_bonus_t3 - } - ### Wrathful - if = { - limit = { has_trait = wrathful } - add = @camp_purpose_ai_will_do_bonus_t3 - } - ### Calm - if = { - limit = { has_trait = calm } - add = @camp_purpose_ai_will_do_malus_t3 - } - ### Callous - if = { - limit = { has_trait = callous } - add = @camp_purpose_ai_will_do_bonus_t3 - } - ### Sadistic - if = { - limit = { has_trait = sadistic } - add = @camp_purpose_ai_will_do_bonus_t3 - } - ### Compassionate - if = { - limit = { has_trait = compassionate } - add = @camp_purpose_ai_will_do_malus_t3 - } - ### Brave - if = { - limit = { has_trait = brave } - add = @camp_purpose_ai_will_do_bonus_t3 - } - ### Craven - if = { - limit = { has_trait = craven } - add = @camp_purpose_ai_will_do_malus_t3 - } - } - } - } - - camp_purpose_scholars = { - pass_phrase = camp_purpose_pass_phrase - confirmation_title = camp_purpose_pass_phrase - confirmation_button_text = camp_purpose_confirmation_button_text - - modifier = { - monthly_lifestyle_xp_gain_mult = 0.2 - } - flag = uses_camp_purpose - flag = can_change_succession_laws - flag = laamp_contracts_weight_up_learning - flag = laamp_contracts_weight_up_stewardship - flag = laamp_contracts_weight_up_diplomacy_slight - flag = nerd_camp_purpose - - # Camp unlocks. - flag = unlocks_baggage_train_siege_engineers - flag = unlocks_barber_tent_reference_corpus - flag = unlocks_barber_tent_morticians_tools - flag = unlocks_baggage_train_scribes - flag = unlocks_baggage_train_ascetics - flag = unlocks_camp_fire_nightly_debates - flag = unlocks_proving_grounds_martial_study - - can_keep = { realm_law_use_camp_purpose = yes } - - pass_cost = { - prestige = { - if = { - limit = { - NOT = { has_realm_law_flag = can_change_purpose_for_free } - } - value = @camp_purpose_prestige_cost - } - } - } - - on_pass = { - # Remove modifiers. - remove_law_related_modifiers_effect = yes - # Remove inappropriate buildings. - laamp_clear_inappropriate_buildings_effect = yes - # Adjust flavourisation. - remove_camp_purpose_flavourisation_variables_effect = yes - set_variable = flavourise_camp_purpose_scholars - local_arbitration_boon_set_purpose_effect = { - MODIFIER = landless_local_arbitration_scholars_modifier - } - } - - ai_will_do = { - # If we've picked a purpose, don't change it. - if = { - limit = { - NOT = { has_realm_law = camp_purpose_wanderers } - } - value = 0 - } - else = { - # Traits. - ## Education. - if = { - limit = { has_trait = education_learning } - add = @camp_purpose_ai_will_do_bonus_t3 - } - if = { - limit = { has_trait = education_stewardship } - add = @camp_purpose_ai_will_do_bonus_t1 - } - ## Personality. - ### Honest - if = { - limit = { has_trait = honest } - add = @camp_purpose_ai_will_do_bonus_t1 - } - ### Generous - if = { - limit = { has_trait = generous } - add = @camp_purpose_ai_will_do_bonus_t2 - } - ### Calm - if = { - limit = { has_trait = calm } - add = @camp_purpose_ai_will_do_bonus_t2 - } - ### Wrathful - if = { - limit = { has_trait = wrathful } - add = @camp_purpose_ai_will_do_malus_t2 - } - ### Eccentric - if = { - limit = { has_trait = eccentric } - add = @camp_purpose_ai_will_do_bonus_t3 - } - ### Patient - if = { - limit = { has_trait = patient } - add = @camp_purpose_ai_will_do_bonus_t3 - } - ### Impatient - if = { - limit = { has_trait = impatient } - add = @camp_purpose_ai_will_do_malus_t3 - } - ### Shy - if = { - limit = { has_trait = shy } - add = @camp_purpose_ai_will_do_bonus_t1 - } - ### Gregarious - if = { - limit = { has_trait = gregarious } - add = @camp_purpose_ai_will_do_malus_t1 - } - } - } - } - - camp_purpose_explorers = { - pass_phrase = camp_purpose_pass_phrase - confirmation_title = camp_purpose_pass_phrase - confirmation_button_text = camp_purpose_confirmation_button_text - - modifier = { - character_travel_speed_mult = 0.25 - coastal_sea_travel_danger = medium_sea_danger_reduction - sea_travel_danger = medium_sea_danger_reduction - } - flag = uses_camp_purpose - flag = can_change_succession_laws - flag = laamp_contracts_weight_up_transport - flag = laamp_contracts_weight_up_diplomacy - flag = laamp_contracts_weight_up_intrigue - flag = laamp_contracts_weight_up_martial_slight - - # Camp unlocks. - flag = unlocks_supply_tent_reserve_provisions - flag = unlocks_supply_tent_reserve_water - flag = unlocks_supply_tent_climbing_gear - flag = unlocks_camp_fire_local_hangers_on - flag = unlocks_camp_perimeter_extra_watch - - can_keep = { realm_law_use_camp_purpose = yes } - - pass_cost = { - prestige = { - if = { - limit = { - NOT = { has_realm_law_flag = can_change_purpose_for_free } - } - value = @camp_purpose_prestige_cost - } - } - } - - on_pass = { - # Remove modifiers. - remove_law_related_modifiers_effect = yes - # Remove inappropriate buildings. - laamp_clear_inappropriate_buildings_effect = yes - # Adjust flavourisation. - remove_camp_purpose_flavourisation_variables_effect = yes - set_variable = flavourise_camp_purpose_explorers - local_arbitration_boon_set_purpose_effect = { - MODIFIER = landless_local_arbitration_explorers_modifier - } - } - - ai_will_do = { - # If we've picked a purpose, don't change it. - if = { - limit = { - NOT = { has_realm_law = camp_purpose_wanderers } - } - value = 0 - } - else = { - # Traits. - ## Education. - if = { - limit = { has_trait = education_diplomacy } - add = @camp_purpose_ai_will_do_bonus_t3 - } - if = { - limit = { has_trait = education_stewardship } - add = @camp_purpose_ai_will_do_bonus_t2 - } - ## Personality. - ### Diligent - if = { - limit = { has_trait = diligent } - add = @camp_purpose_ai_will_do_bonus_t2 - } - ### Lazy - if = { - limit = { has_trait = lazy } - add = @camp_purpose_ai_will_do_malus_t2 - } - ### Athletic - if = { - limit = { has_trait = athletic } - add = @camp_purpose_ai_will_do_bonus_t3 - } - ### Brave - if = { - limit = { has_trait = brave } - add = @camp_purpose_ai_will_do_bonus_t2 - } - ### Craven - if = { - limit = { has_trait = craven } - add = @camp_purpose_ai_will_do_malus_t2 - } - ### Eccentric - if = { - limit = { has_trait = eccentric } - add = @camp_purpose_ai_will_do_bonus_t2 - } - ### Stubborn - if = { - limit = { has_trait = stubborn } - add = @camp_purpose_ai_will_do_bonus_t1 - } - ### Fickle - if = { - limit = { has_trait = fickle } - add = @camp_purpose_ai_will_do_bonus_t2 - } - ### Humble - if = { - limit = { has_trait = humble } - add = @camp_purpose_ai_will_do_bonus_t2 - } - ### Arrogant - if = { - limit = { has_trait = arrogant } - add = @camp_purpose_ai_will_do_malus_t2 - } - } - } - } - - camp_purpose_brigands = { - pass_phrase = camp_purpose_pass_phrase - confirmation_title = camp_purpose_pass_phrase - confirmation_button_text = camp_purpose_confirmation_button_text - - flag = uses_camp_purpose - flag = can_change_succession_laws - flag = laamp_contracts_weight_up_criminal - flag = laamp_contracts_weight_up_prowess - flag = laamp_contracts_weight_up_intrigue - flag = martial_camp_purpose - - # Camp unlocks. - flag = unlocks_proving_grounds_lockwagon - flag = unlocks_barber_tent_morticians_tools - flag = unlocks_supply_tent_subdued_gear - flag = unlocks_baggage_train_ransom_cages - flag = unlocks_baggage_train_negotiators - flag = unlocks_camp_fire_juicy_rumors - flag = unlocks_proving_grounds_the_stick_game - - can_keep = { realm_law_use_camp_purpose = yes } - - pass_cost = { - prestige = { - if = { - limit = { - NOT = { has_realm_law_flag = can_change_purpose_for_free } - } - value = @camp_purpose_prestige_cost - } - } - } - - on_pass = { - # Remove modifiers. - remove_law_related_modifiers_effect = yes - # Remove inappropriate buildings. - laamp_clear_inappropriate_buildings_effect = yes - # Adjust flavourisation. - remove_camp_purpose_flavourisation_variables_effect = yes - set_variable = flavourise_camp_purpose_brigands - local_arbitration_boon_set_purpose_effect = { - MODIFIER = landless_local_arbitration_brigands_modifier - } - } - - modifier = { - embarkation_cost_mult = -0.5 - knight_limit = 3 - } - - ai_will_do = { - # If we've picked a purpose, don't change it. - if = { - limit = { - NOT = { has_realm_law = camp_purpose_wanderers } - } - value = 0 - } - else = { - # Traits. - ## Education. - if = { - limit = { has_trait = education_intrigue } - add = @camp_purpose_ai_will_do_bonus_t3 - } - ### Cultural traditions - if = { - limit = { - culture = { - OR = { - has_cultural_parameter = much_more_likely_to_be_laamps - has_cultural_parameter = more_likely_to_be_laamps - } - } - } - add = @camp_purpose_ai_will_do_bonus_t3 - } - ## Personality. - ### Deceitful. - if = { - limit = { has_trait = deceitful } - add = @camp_purpose_ai_will_do_bonus_t3 - } - ### Honest. - if = { - limit = { has_trait = honest } - add = @camp_purpose_ai_will_do_malus_t3 - } - ### Arbitrary. - if = { - limit = { has_trait = arbitrary } - add = @camp_purpose_ai_will_do_bonus_t3 - } - ### Just, - if = { - limit = { has_trait = just } - add = @camp_purpose_ai_will_do_malus_t3 - } - ### Greedy + either Humble or Content. - if = { - limit = { - has_trait = greedy - OR = { - has_trait = humble - has_trait = content - } - } - add = @camp_purpose_ai_will_do_bonus_t2 - } - ### Generous. - if = { - limit = { has_trait = generous } - add = @camp_purpose_ai_will_do_malus_t2 - } - ### Arrogant. - if = { - limit = { has_trait = arrogant } - add = @camp_purpose_ai_will_do_malus_t2 - } - ### Ambitious. - if = { - limit = { has_trait = ambitious } - add = @camp_purpose_ai_will_do_malus_t2 - } - ### Wrathful. - if = { - limit = { has_trait = wrathful } - add = @camp_purpose_ai_will_do_bonus_t1 - } - ### Calm. - if = { - limit = { has_trait = calm } - add = @camp_purpose_ai_will_do_malus_t1 - } - ### Sadistic. - if = { - limit = { has_trait = sadistic } - add = @camp_purpose_ai_will_do_bonus_t2 - } - ### Callous. - if = { - limit = { has_trait = callous } - add = @camp_purpose_ai_will_do_bonus_t2 - } - ### Compassionate. - if = { - limit = { has_trait = compassionate } - add = @camp_purpose_ai_will_do_malus_t2 - } - } - } - } - - camp_purpose_legitimists = { - pass_phrase = camp_purpose_pass_phrase - confirmation_title = camp_purpose_pass_phrase - confirmation_button_text = camp_purpose_confirmation_button_text - - flag = uses_camp_purpose - flag = can_change_succession_laws - flag = martial_camp_purpose - - # Camp unlocks. - flag = unlocks_baggage_train_scribes - flag = unlocks_proving_grounds_martial_study - flag = unlocks_baggage_train_proof_of_claims - flag = unlocks_baggage_train_ransom_cages - flag = unlocks_camp_fire_future_dreams - flag = unlocks_proving_grounds_bodyguard_drills - flag = unlocks_proving_grounds_lockwagon - - can_keep = { - realm_law_use_camp_purpose = yes - ep3_can_have_legitimists_camp_purpose_trigger = yes - } - - pass_cost = { - prestige = { - if = { - limit = { - NOT = { has_realm_law_flag = can_change_purpose_for_free } - } - value = @camp_purpose_prestige_cost - } - } - } - - on_pass = { - # Remove modifiers. - remove_law_related_modifiers_effect = yes - # Remove inappropriate buildings. - laamp_clear_inappropriate_buildings_effect = yes - # Adjust flavourisation. - remove_camp_purpose_flavourisation_variables_effect = yes - set_variable = flavourise_camp_purpose_legitimists - local_arbitration_boon_set_purpose_effect = { - MODIFIER = landless_local_arbitration_legitimists_modifier - } - } - - modifier = { - men_at_arms_cap = 1 - knight_limit = 8 - } - - ai_will_do = { - # Weight up legitimists inherently. - value = 100 - # If we've picked a purpose, don't change it. - if = { - limit = { - NOT = { has_realm_law = camp_purpose_wanderers } - } - value = 0 - } - else = { - # Traits. - ## Education. - if = { - limit = { - OR = { - has_trait = education_diplomacy - has_trait = education_martial - } - } - add = @camp_purpose_ai_will_do_bonus_t3 - } - ## Personality. - ### Ambitious - if = { - limit = { has_trait = ambitious } - add = @camp_purpose_ai_will_do_bonus_t3 - } - ### Content - if = { - limit = { has_trait = content } - add = @camp_purpose_ai_will_do_malus_t3 - } - ### Arrogant - if = { - limit = { has_trait = arrogant } - add = @camp_purpose_ai_will_do_bonus_t3 - } - ### Humble - if = { - limit = { has_trait = humble } - add = @camp_purpose_ai_will_do_malus_t3 - } - ### Vengeful - if = { - limit = { has_trait = vengeful } - add = @camp_purpose_ai_will_do_bonus_t3 - } - ### Forgiving - if = { - limit = { has_trait = forgiving } - add = @camp_purpose_ai_will_do_malus_t3 - } - } - } - } -} - -imperial_bureaucracy = { - default = imperial_bureaucracy_1 - cumulative = yes - flag = realm_law - - imperial_bureaucracy_0 = { - modifier = { - belligerent_opinion = -10 - barons_and_minor_landholders_opinion = 20 - glory_hound_opinion = 10 - parochial_opinion = 10 - courtly_opinion = 5 - } - flag = uses_imperial_bureaucracy - flag = can_have_tributaries - flag = titles_cannot_leave_realm_on_succession # Hardcoded flag - - can_keep = { - realm_law_use_imperial_bureaucracy = yes - trigger_if = { - limit = { - top_liege != this - } - liege = { has_realm_law = imperial_bureaucracy_0 } - } - } - - can_pass = { - trigger_if = { - limit = { - top_liege != this - liege = { has_realm_law = imperial_bureaucracy_0 } - } - custom_tooltip = { - text = imperial_bureaucracy_pending_law_change - always = no - } - } - } - - on_pass = { - # Remove modifiers. - remove_law_related_modifiers_effect = yes - } - } - - imperial_bureaucracy_1 = { - modifier = { - belligerent_opinion = 5 - barons_and_minor_landholders_opinion = -30 - glory_hound_opinion = -15 - parochial_opinion = -15 - courtly_opinion = -5 - minority_opinion = -10 - vassal_limit = 100 - } - flag = can_have_tributaries - flag = title_revocation_allowed - flag = vassal_retraction_allowed - flag = can_change_partition_succession_laws - flag = vassal_internal_wars_banned - flag = diarchs_want_to_subsidise_without_this_flag - - can_keep = { - realm_law_use_imperial_bureaucracy = yes - trigger_if = { - limit = { - top_liege != this - } - liege = { has_realm_law = imperial_bureaucracy_1 } - } - } - - can_pass = { - trigger_if = { - limit = { - has_realm_law = imperial_bureaucracy_0 - top_liege = this - } - custom_description = { - subject = root - text = "has_imperial_bureaucracy_cooldown" - NAND = { - has_variable = imperial_bureaucracy_cooldown - NOT = { - culture = { has_innovation = innovation_all_things } - } - } - } - } - trigger_if = { - limit = { - top_liege != this - liege = { has_realm_law = imperial_bureaucracy_1 } - } - custom_tooltip = { - text = imperial_bureaucracy_pending_law_change - always = no - } - } - can_pass_law_ca1_trigger = yes - } - - pass_cost = { - prestige = { - if = { - limit = { - NOR = { - has_realm_law = imperial_bureaucracy_2 - has_realm_law = imperial_bureaucracy_3 - } - } - add = increase_crown_authority_prestige_cost - } - } - } - - on_pass = { - # Increment cooldown breaker tally, if appropriate. - calculate_authority_cooldown_break_effect = yes - # Set regular cooldown. - set_variable = { - name = imperial_bureaucracy_cooldown - years = @imperial_bureaucracy_cooldown_years_1 - } - # Remove modifiers. - remove_law_related_modifiers_effect = yes - } - - ai_will_do = { - if = { - limit = { has_realm_law = imperial_bureaucracy_0 } - value = 1 - } - } - } - - imperial_bureaucracy_2 = { - modifier = { - belligerent_opinion = 10 - barons_and_minor_landholders_opinion = -10 - glory_hound_opinion = -10 - parochial_opinion = -10 - courtly_opinion = -5 - zealot_opinion = -10 - minority_opinion = -10 - republic_government_tax_contribution_add = 0.05 - vassal_limit = 100 - } - flag = vassal_refusal_is_treason - flag = can_change_succession_laws - flag = vassal_all_wars_banned - flag = admin_change_vassal_gov_cheaper - flag = admin_title_troop_cost_reduction - - can_keep = { - realm_law_use_imperial_bureaucracy = yes - trigger_if = { - limit = { - top_liege != this - } - liege = { has_realm_law = imperial_bureaucracy_2 } - } - } - - can_pass = { - trigger_if = { - limit = { - NOT = { has_realm_law = imperial_bureaucracy_3 } - top_liege = this - } - has_realm_law = imperial_bureaucracy_1 - custom_description = { - subject = root - text = "has_imperial_bureaucracy_cooldown" - NAND = { - has_variable = imperial_bureaucracy_cooldown - NOT = { - culture = { has_innovation = innovation_all_things } - } - } - } - } - trigger_if = { - limit = { - top_liege != this - liege = { has_realm_law = imperial_bureaucracy_2 } - } - custom_tooltip = { - text = imperial_bureaucracy_pending_law_change - always = no - } - } - can_pass_law_ca2_trigger = yes - } - - pass_cost = { - prestige = { - if = { - limit = { - NOT = { has_realm_law = imperial_bureaucracy_3 } - } - add = increase_crown_authority_prestige_cost - } - } - } - - on_pass = { - # Increment cooldown breaker tally, if appropriate. - calculate_authority_cooldown_break_effect = yes - # Set regular cooldown. - set_variable = { - name = imperial_bureaucracy_cooldown - years = @imperial_bureaucracy_cooldown_years_2 - } - # Remove modifiers. - remove_law_related_modifiers_effect = yes - } - - ai_will_do = { - if = { - limit = { has_realm_law = imperial_bureaucracy_1 } - value = 1 - } - } - } - - imperial_bureaucracy_3 = { - modifier = { - belligerent_opinion = 15 - barons_and_minor_landholders_opinion = -20 - glory_hound_opinion = -25 - parochial_opinion = -25 - courtly_opinion = -10 - zealot_opinion = -20 - minority_opinion = -30 - republic_government_tax_contribution_add = 0.05 - vassal_limit = 200 - } - flag = vassal_all_wars_banned_permanent - flag = max_authority_level - flag = admin_title_troop_cost_reduction_high - - can_keep = { - realm_law_use_imperial_bureaucracy = yes - trigger_if = { - limit = { - top_liege != this - } - liege = { has_realm_law = imperial_bureaucracy_3 } - } - } - - can_pass = { - trigger_if = { - limit = { - top_liege = this - } - has_realm_law = imperial_bureaucracy_2 - custom_description = { - subject = root - text = "has_imperial_bureaucracy_cooldown" - NAND = { - has_variable = imperial_bureaucracy_cooldown - NOT = { - culture = { has_innovation = innovation_all_things } - } - } - } - } - trigger_if = { - limit = { - top_liege != this - liege = { has_realm_law = imperial_bureaucracy_3 } - } - custom_tooltip = { - text = imperial_bureaucracy_pending_law_change - always = no - } - } - can_pass_law_ca3_trigger = yes - } - - pass_cost = { - prestige = { - if = { - limit = { - NOT = { has_realm_law = imperial_bureaucracy_3 } - } - add = increase_crown_authority_prestige_cost - } - } - } - - on_pass = { - # Increment cooldown breaker tally, if appropriate. - calculate_authority_cooldown_break_effect = yes - # Set regular cooldown. - set_variable = { - name = imperial_bureaucracy_cooldown - years = @imperial_bureaucracy_cooldown_years_3 - } - # Remove modifiers. - remove_law_related_modifiers_effect = yes - } - } -} - -nomadic_authority = { - default = nomadic_authority_1 - cumulative = yes - flag = realm_law - flag = dominance_law - - nomadic_authority_1 = { - pass_phrase = nomadic_authority_1_pass_phrase - confirmation_title = nomadic_authority_1_pass_phrase - confirmation_button_text = nomadic_authority_confirmation_button_text - - modifier = { - belligerent_opinion = -25 - glory_hound_opinion = -20 - domain_limit_min = 1 - domain_limit_max = 2 - vassal_limit_min = 1 - vassal_limit_max = 1 - } - flag = can_have_tributaries - flag = title_revocation_allowed - flag = uses_nomadic_authority - flag = imprisonment_toggle_enable - flag = access_to_nomadic_county_conquest - - can_pass = { - has_realm_law = nomadic_authority_2 - } - - can_keep = { realm_law_use_nomadic_authority = yes } - #Imprisonment is disabled if you have this law. Script is in the interaction, currently in 00_prison_interactions. - - on_pass = { - # Remove modifiers. - remove_law_related_modifiers_effect = yes - } - } - - nomadic_authority_2 = { - pass_phrase = nomadic_authority_2_pass_phrase - confirmation_title = nomadic_authority_2_pass_phrase - confirmation_button_text = nomadic_authority_confirmation_button_text - - modifier = { - belligerent_opinion = 10 - glory_hound_opinion = 10 - max_migration_distance_mult = 0.25 - domain_limit_min = 1 - domain_limit_max = 1 - vassal_limit_min = 1 - vassal_limit_max = 2 # 3 - } - flag = can_change_succession_laws - flag = imprisonment_toggle_on - flag = title_revocation_allowed - flag = migration_to_duchies - flag = access_to_nomadic_county_conquest - flag = unlock_maa_nomad_lancers - - can_keep = { - realm_law_use_nomadic_authority = yes - } - - can_pass = { - custom_tooltip = { - text = "nomadic_authority_2_level_requirement" - OR = { - has_realm_law = nomadic_authority_1 - has_realm_law = nomadic_authority_3 - } - } - custom_description = { - subject = root - text = "has_nomadic_authority_cooldown" - NAND = { - has_variable = nomadic_authority_cooldown - NOT = { - culture = { has_innovation = innovation_all_things } - } - } - } - domicile.herd >= nomadic_authority_level_2_requirement - } - - pass_cost = { - prestige = { - if = { - limit = { - NOR = { - has_realm_law = nomadic_authority_2 - has_realm_law = nomadic_authority_3 - } - } - add = increase_nomadic_authority_prestige_cost - } - } - } - - on_pass = { - # Increment cooldown breaker tally, if appropriate. - calculate_authority_cooldown_break_effect = yes - # Set regular cooldown. - set_variable = { - name = nomadic_authority_cooldown - years = @nomadic_authority_cooldown_years - } - # Remove modifiers. - remove_law_related_modifiers_effect = yes - } - - ai_will_do = { - if = { - limit = { has_realm_law = nomadic_authority_1 } - value = 1 - } - } - } - - nomadic_authority_3 = { - pass_phrase = nomadic_authority_3_pass_phrase - confirmation_title = nomadic_authority_3_pass_phrase - confirmation_button_text = nomadic_authority_confirmation_button_text - - modifier = { - belligerent_opinion = 10 - glory_hound_opinion = 10 - max_migration_distance_mult = 0.5 - domain_limit_min = 2 - domain_limit_max = 3 - vassal_limit_min = 8 - vassal_limit_max = 12 # 15 - } - flag = vassal_retraction_allowed - flag = diarchs_want_to_subsidise_without_this_flag - flag = migration_to_kingdoms - flag = access_to_nomadic_duchy_conquest - - can_keep = { - realm_law_use_nomadic_authority = yes - trigger_if = { - limit = { - NOT = { - culture = { - has_cultural_parameter = forming_confederations_is_easier - } - } - } - NOT = { - is_confederation_member = yes - } - } - } - - can_pass = { - custom_tooltip = { - text = "nomadic_authority_3_level_requirement" - OR = { - has_realm_law = nomadic_authority_2 - has_realm_law = nomadic_authority_4 - } - } - custom_description = { - subject = root - text = "has_nomadic_authority_cooldown" - NAND = { - has_variable = nomadic_authority_cooldown - NOT = { - culture = { has_innovation = innovation_all_things } - } - } - } - domicile.herd >= nomadic_authority_level_3_requirement - } - - pass_cost = { - prestige = { - if = { - limit = { - NOR = { - has_realm_law = nomadic_authority_3 - has_realm_law = nomadic_authority_4 - } - } - add = increase_nomadic_authority_prestige_cost - } - } - } - - on_pass = { - # Increment cooldown breaker tally, if appropriate. - calculate_authority_cooldown_break_effect = yes - # Set regular cooldown. - set_variable = { - name = nomadic_authority_cooldown - years = @nomadic_authority_cooldown_years - } - # Remove modifiers. - remove_law_related_modifiers_effect = yes - } - - ai_will_do = { - if = { - limit = { has_realm_law = nomadic_authority_2 } - value = 1 - } - } - } - - nomadic_authority_4 = { - pass_phrase = nomadic_authority_4_pass_phrase - confirmation_title = nomadic_authority_4_pass_phrase - confirmation_button_text = nomadic_authority_confirmation_button_text - - modifier = { - belligerent_opinion = 20 - glory_hound_opinion = 10 - max_migration_distance_mult = 1 - domain_limit_min = 2 - vassal_limit_min = 5 - vassal_limit_max = 15 - } - flag = migration_to_empires - #Settling is disabled unless you have this law. Script is in the decisions, currently in 80_major_decisions. - #Reforming pagan religions (but not creating other faiths) is disabled unless you have this law. Script is in the reformation prereqs, currently in 00_rules. - - can_keep = { - realm_law_use_nomadic_authority = yes - trigger_if = { - limit = { - NOT = { - culture = { - has_cultural_parameter = forming_confederations_is_easier - } - } - } - NOT = { - is_confederation_member = yes - } - } - } - - can_pass = { - custom_tooltip = { - text = "nomadic_authority_4_level_requirement" - OR = { - has_realm_law = nomadic_authority_3 - has_realm_law = nomadic_authority_5 - } - } - custom_description = { - subject = root - text = "has_nomadic_authority_cooldown" - NAND = { - has_variable = nomadic_authority_cooldown - NOT = { - culture = { has_innovation = innovation_all_things } - } - } - } - domicile.herd >= nomadic_authority_level_4_requirement - } - - pass_cost = { - prestige = { - if = { - limit = { - NOR = { - has_realm_law = nomadic_authority_4 - has_realm_law = nomadic_authority_5 - } - } - add = increase_nomadic_authority_prestige_cost - } - } - } - - on_pass = { - # Increment cooldown breaker tally, if appropriate. - calculate_authority_cooldown_break_effect = yes - # Set regular cooldown. - set_variable = { - name = nomadic_authority_cooldown - years = @nomadic_authority_cooldown_years - } - # Remove modifiers. - remove_law_related_modifiers_effect = yes - } - - ai_will_do = { - if = { - limit = { has_realm_law = nomadic_authority_3 } - value = 1 - } - } - - } - - nomadic_authority_5 = { - pass_phrase = nomadic_authority_5_pass_phrase - confirmation_title = nomadic_authority_5_pass_phrase - confirmation_button_text = nomadic_authority_confirmation_button_text - - modifier = { - belligerent_opinion = 25 - glory_hound_opinion = 15 - max_migration_distance_mult = 10 - max_migration_distance_mult = 2 - vassal_limit_min = 985 - vassal_limit_max = 970 - } - flag = max_authority_level - #Settling is disabled unless you have this law. Script is in the decisions, currently in 80_major_decisions. - #Reforming pagan religions (but not creating other faiths) is disabled unless you have this law. Script is in the reformation prereqs, currently in 00_rules. - - can_keep = { - realm_law_use_nomadic_authority = yes - trigger_if = { - limit = { - NOT = { - culture = { - has_cultural_parameter = forming_confederations_is_easier - } - } - } - NOT = { - is_confederation_member = yes - } - } - } - - can_pass = { - has_realm_law = nomadic_authority_4 - trigger_if = { - limit = { - any_character_situation = { - any_participant_group = { - participant_group_type = nomad_rulers_capital - participant_group_has_character = root - } - } - } - custom_description = { - text = nomadic_authority_5_gurkhan - any_character_situation = { - any_participant_group = { - participant_group_type = nomad_rulers_capital - participant_group_has_character = root - } - situation_top_herd ?= root - } - } - } - custom_description = { - subject = root - text = "has_nomadic_authority_cooldown" - NAND = { - has_variable = nomadic_authority_cooldown - NOT = { - culture = { has_innovation = innovation_all_things } - } - } - } - domicile.herd >= nomadic_authority_level_5_requirement - } - - pass_cost = { - prestige = { - if = { - limit = { - NOT = { - has_realm_law = nomadic_authority_5 - } - } - add = increase_nomadic_authority_prestige_cost - multiply = 2 - } - } - } - - on_pass = { - # Increment cooldown breaker tally, if appropriate. - calculate_authority_cooldown_break_effect = yes - # Set regular cooldown. - set_variable = { - name = nomadic_authority_cooldown - years = @nomadic_authority_cooldown_years - } - # Remove modifiers. - remove_law_related_modifiers_effect = yes - play_sound_effect = "event:/DLC/CE2/UI/Notifications/ce2_ui_notifications_nomadicAuthority_wolf" - } - - ai_will_do = { - if = { - limit = { has_realm_law = nomadic_authority_4 } - value = 1 - } - } - } -} - -celestial_bureaucracy = { # A variant of Imperial Bureaucracy for Celestial Government - default = celestial_bureaucracy_1 - cumulative = yes - flag = realm_law - - celestial_bureaucracy_0 = { - modifier = { - courtly_opinion = -20 # Pro-hegemon movement - #parochial_opinion = 0 # Advancement movement - #belligerent_opinion = 0 # Expansion movement - glory_hound_opinion = 10 # Conservative movement - #zealot_opinion = 0 - barons_and_minor_landholders_opinion = 10 - minority_opinion = 10 - - celestial_government_tax_contribution_add = 0.05 - republic_government_tax_contribution_add = 0.05 - } - flag = uses_celestial_bureaucracy - flag = titles_cannot_leave_realm_on_succession # Hardcoded flag - flag = can_have_tributaries - - can_keep = { - realm_law_use_celestial_bureaucracy = yes - trigger_if = { - limit = { - is_independent_ruler = no - } - liege = { has_realm_law = celestial_bureaucracy_0 } - } - } - - can_pass = { - trigger_if = { - limit = { - is_independent_ruler = no - liege = { has_realm_law = celestial_bureaucracy_0 } - } - custom_tooltip = { - text = imperial_bureaucracy_pending_law_change - always = no - } - } - } - - on_pass = { - # Remove modifiers. - remove_law_related_modifiers_effect = yes - } - } - - celestial_bureaucracy_1 = { - modifier = { - courtly_opinion = 20 # Pro-hegemon movement - parochial_opinion = -5 # Advancement movement - belligerent_opinion = -5 # Expansion movement - glory_hound_opinion = -10 # Conservative movement - #zealot_opinion = 0 - barons_and_minor_landholders_opinion = -15 - minority_opinion = -15 - - celestial_government_tax_contribution_add = 0.05 - republic_government_tax_contribution_add = 0.05 - } - flag = uses_celestial_bureaucracy - flag = title_revocation_allowed - flag = vassal_retraction_allowed - flag = can_change_partition_succession_laws - flag = vassal_internal_wars_banned - flag = diarchs_want_to_subsidise_without_this_flag - flag = can_have_tributaries - - can_keep = { - realm_law_use_celestial_bureaucracy = yes - trigger_if = { - limit = { - is_independent_ruler = no - } - liege = { has_realm_law = celestial_bureaucracy_1 } - } - } - - can_pass = { - trigger_if = { - limit = { - has_realm_law = celestial_bureaucracy_0 - is_independent_ruler = yes - } - custom_description = { - subject = root - text = "has_celestial_bureaucracy_cooldown" - NAND = { - has_variable = imperial_bureaucracy_cooldown - NOT = { - culture = { has_innovation = innovation_all_things } - } - } - } - } - trigger_if = { - limit = { - is_independent_ruler = no - liege = { has_realm_law = celestial_bureaucracy_1 } - } - custom_tooltip = { - text = imperial_bureaucracy_pending_law_change - always = no - } - } - can_pass_law_ca1_trigger = yes - } - - pass_cost = { - prestige = { - if = { - limit = { - NOR = { - has_realm_law = celestial_bureaucracy_2 - has_realm_law = celestial_bureaucracy_3 - } - } - add = increase_crown_authority_prestige_cost - } - } - } - - on_pass = { - # Increment cooldown breaker tally, if appropriate. - calculate_authority_cooldown_break_effect = yes - # Set regular cooldown. - set_variable = { - name = imperial_bureaucracy_cooldown - years = @imperial_bureaucracy_cooldown_years_1 - } - # Remove modifiers. - remove_law_related_modifiers_effect = yes - } - - ai_will_do = { - if = { - limit = { has_realm_law = celestial_bureaucracy_0 } - value = 1 - } - } - } - - celestial_bureaucracy_2 = { - modifier = { - courtly_opinion = 5 # Pro-hegemon movement - parochial_opinion = -5 # Advancement movement - belligerent_opinion = -5 # Expansion movement - glory_hound_opinion = -15 # Conservative movement - zealot_opinion = -5 - barons_and_minor_landholders_opinion = -15 - minority_opinion = -15 - - celestial_government_tax_contribution_add = 0.10 - republic_government_tax_contribution_add = 0.10 - } - flag = uses_celestial_bureaucracy - flag = vassal_refusal_is_treason - flag = can_change_succession_laws - flag = vassal_all_wars_banned - flag = admin_change_vassal_gov_cheaper - flag = can_have_tributaries - - can_keep = { - realm_law_use_celestial_bureaucracy = yes - trigger_if = { - limit = { - is_independent_ruler = no - } - liege = { has_realm_law = celestial_bureaucracy_2 } - } - } - - can_pass = { - trigger_if = { - limit = { - NOT = { has_realm_law = celestial_bureaucracy_3 } - is_independent_ruler = yes - } - has_realm_law = celestial_bureaucracy_1 - custom_description = { - subject = root - text = "has_celestial_bureaucracy_cooldown" - NAND = { - has_variable = imperial_bureaucracy_cooldown - NOT = { - culture = { has_innovation = innovation_all_things } - } - } - } - } - trigger_if = { - limit = { - is_independent_ruler = no - liege = { has_realm_law = celestial_bureaucracy_2 } - } - custom_tooltip = { - text = imperial_bureaucracy_pending_law_change - always = no - } - } - can_pass_law_ca2_trigger = yes - } - - pass_cost = { - prestige = { - if = { - limit = { - NOT = { has_realm_law = celestial_bureaucracy_3 } - } - add = increase_crown_authority_prestige_cost - } - } - } - - on_pass = { - # Increment cooldown breaker tally, if appropriate. - calculate_authority_cooldown_break_effect = yes - # Set regular cooldown. - set_variable = { - name = imperial_bureaucracy_cooldown - years = @imperial_bureaucracy_cooldown_years_2 - } - # Remove modifiers. - remove_law_related_modifiers_effect = yes - } - - ai_will_do = { - if = { - limit = { has_realm_law = celestial_bureaucracy_1 } - value = 1 - } - } - } - - celestial_bureaucracy_3 = { - modifier = { - courtly_opinion = 10 # Pro-hegemon movement - parochial_opinion = -10 # Advancement movement - belligerent_opinion = -10 # Expansion movement - glory_hound_opinion = -15 # Conservative movement - zealot_opinion = -15 - barons_and_minor_landholders_opinion = -20 - minority_opinion = -20 - - celestial_government_tax_contribution_add = 0.10 - republic_government_tax_contribution_add = 0.10 - } - flag = uses_celestial_bureaucracy - flag = vassal_all_wars_banned_permanent - flag = max_authority_level - flag = can_have_tributaries - - can_keep = { - realm_law_use_celestial_bureaucracy = yes - trigger_if = { - limit = { - this = title:h_china.holder - } - situation:dynastic_cycle ?= { - NOR = { - situation_current_phase = situation_dynastic_cycle_phase_instability - situation_current_phase = situation_dynastic_cycle_phase_instability_conquest - } - } - } - trigger_if = { - limit = { - is_independent_ruler = no - } - liege = { has_realm_law = celestial_bureaucracy_3 } - } - } - - can_pass = { - trigger_if = { - limit = { - is_independent_ruler = yes - } - has_realm_law = celestial_bureaucracy_2 - custom_description = { - subject = root - text = "has_celestial_bureaucracy_cooldown" - NAND = { - has_variable = imperial_bureaucracy_cooldown - NOT = { - culture = { has_innovation = innovation_all_things } - } - } - } - } - trigger_if = { - limit = { - is_independent_ruler = no - liege = { has_realm_law = celestial_bureaucracy_3 } - } - custom_tooltip = { - text = imperial_bureaucracy_pending_law_change - always = no - } - } - can_pass_law_ca3_trigger = yes - } - - pass_cost = { - prestige = { - if = { - limit = { - NOT = { has_realm_law = celestial_bureaucracy_3 } - } - add = increase_crown_authority_prestige_cost - } - } - } - - on_pass = { - # Increment cooldown breaker tally, if appropriate. - calculate_authority_cooldown_break_effect = yes - # Set regular cooldown. - set_variable = { - name = imperial_bureaucracy_cooldown - years = @imperial_bureaucracy_cooldown_years_3 - } - # Remove modifiers. - remove_law_related_modifiers_effect = yes - } - } -} - -mandala_decree = { - default = mandala_decree_reverence - flag = mandala_law - - mandala_decree_none = { - #Standard laws - flag = can_have_tributaries - flag = title_revocation_allowed - flag = vassal_retraction_allowed - flag = can_change_succession_laws - - can_keep = { realm_law_is_mandala = yes } - - can_pass = { - } - - pass_cost = { - prestige = @mandala_decree_prestige_cost - } - - on_pass = { - } - - ai_will_do = { - value = 0 - } - } - - mandala_decree_prosperity = { - modifier = { - men_at_arms_maintenance = 0.25 - levy_size = -0.25 - tributary_opinion = 15 - } - #Standard laws - flag = can_have_tributaries - flag = title_revocation_allowed - flag = vassal_retraction_allowed - flag = can_change_succession_laws - #Decree specific - flag = piety_devotion_from_defensive_wars - flag = subjects_appear_more_economical - flag = can_use_piety_to_reassert_tributary - flag = tributaries_less_likely_to_break_free - - can_keep = { realm_law_is_mandala = yes } - - can_pass = { - legitimacy_level >= 2 - trigger_if = { - limit = { - house ?= { NOT = { has_house_head_parameter = can_enact_prosperity_decree } } - } - custom_tooltip = { - text = devaraja_aspect_does_not_allow_this_decree - always = no - } - } - } - - pass_cost = { - prestige = @mandala_decree_prestige_cost - } - - on_pass = { - #Don't need the alert no more - set_variable = { - name = has_picked_mandala_decree - value = flag:yes - } - } - - ai_will_do = { - value = 1 - #Traits - if = { - limit = { has_trait = greedy } - add = 5 - } - if = { - limit = { has_trait = craven } - add = 5 - } - if = { - limit = { ai_has_economical_boom_personality = yes } - add = 10 - } - } - } - - mandala_decree_expansion = { - modifier = { - vassal_levy_contribution_mult = 0.25 - independent_ruler_opinion = -25 - tributary_opinion = 25 - } - #Standard laws - flag = can_have_tributaries - flag = title_revocation_allowed - flag = vassal_retraction_allowed - flag = can_change_succession_laws - #Decree specific - flag = piety_devotion_from_offensive_wars - flag = piety_for_sieging_capital_temple_complexes - flag = can_call_tributaries_for_piety - flag = subjects_appear_more_warlike - - can_keep = { realm_law_is_mandala = yes } - - can_pass = { - trigger_if = { - limit = { - house ?= { NOT = { has_house_head_parameter = can_enact_expansion_decree } } - } - custom_tooltip = { - text = devaraja_aspect_does_not_allow_this_decree - always = no - } - } - legitimacy_level >= 2 - } - - pass_cost = { - prestige = @mandala_decree_prestige_cost - } - - on_pass = { - #Don't need the alert no more - set_variable = { - name = has_picked_mandala_decree - value = flag:yes - } - } - - ai_will_do = { - value = 1 - #Traits - if = { - limit = { has_trait = brave } - add = 5 - } - if = { - limit = { has_trait = ambitious } - add = 5 - } - if = { - limit = { ai_has_warlike_personality = yes } - add = 10 - } - } - } - - mandala_decree_reverence = { - modifier = { - } - #Standard laws - flag = can_have_tributaries - flag = title_revocation_allowed - flag = vassal_retraction_allowed - flag = can_change_succession_laws - #Decree specific - flag = cheaper_pilgrimages - flag = vassals_more_inclined_to_convert - flag = subjects_appear_more_pious - flag = can_convert_all_subjects_to_mandalas #Vassals more likely to accept, can now also ask Tribs - flag = tributaries_more_likely_to_contribute_to_GPs - - can_keep = { realm_law_is_mandala = yes } - - can_pass = { - legitimacy_level >= 2 - trigger_if = { - limit = { - house ?= { NOT = { has_house_head_parameter = can_enact_reverence_decree } } - } - custom_tooltip = { - text = devaraja_aspect_does_not_allow_this_decree - always = no - } - } - } - - pass_cost = { - prestige = @mandala_decree_prestige_cost - } - - on_pass = { - #Don't need the alert no more - set_variable = { - name = has_picked_mandala_decree - value = flag:yes - } - } - - ai_will_do = { - value = 1 - #Traits - if = { - limit = { has_trait = zealous } - add = 5 - } - if = { - limit = { has_trait = arrogant } - add = 5 - } - if = { - limit = { ai_has_pious_builder_personality = yes } - add = 10 - } - } - } -} - -meritocratic_bureaucracy = { # A variant of Imperial Bureaucracy for Meritocratic Government - default = meritocratic_bureaucracy_1 - cumulative = yes - flag = realm_law - - meritocratic_bureaucracy_0 = { - modifier = { - belligerent_opinion = -10 - barons_and_minor_landholders_opinion = 20 - glory_hound_opinion = 10 - parochial_opinion = 10 - courtly_opinion = 5 - } - flag = uses_meritocratic_bureaucracy - flag = titles_cannot_leave_realm_on_succession # Hardcoded flag - flag = can_have_tributaries - - can_keep = { - realm_law_use_meritocratic_bureaucracy = yes - trigger_if = { - limit = { - is_independent_ruler = no - } - liege = { has_realm_law = meritocratic_bureaucracy_0 } - } - } - - can_pass = { - trigger_if = { - limit = { - is_independent_ruler = no - liege = { has_realm_law = meritocratic_bureaucracy_0 } - } - custom_tooltip = { - text = imperial_bureaucracy_pending_law_change - always = no - } - } - } - - on_pass = { - # Remove modifiers. - remove_law_related_modifiers_effect = yes - } - } - - meritocratic_bureaucracy_1 = { - modifier = { - belligerent_opinion = 5 - barons_and_minor_landholders_opinion = -30 - glory_hound_opinion = -15 - parochial_opinion = -15 - courtly_opinion = -5 - minority_opinion = -10 - meritocratic_government_tax_contribution_add = 0.05 - } - flag = uses_meritocratic_bureaucracy - flag = title_revocation_allowed - flag = vassal_retraction_allowed - flag = can_change_partition_succession_laws - flag = vassal_internal_wars_banned - flag = diarchs_want_to_subsidise_without_this_flag - flag = can_have_tributaries - - can_keep = { - realm_law_use_meritocratic_bureaucracy = yes - trigger_if = { - limit = { - is_independent_ruler = no - } - liege = { has_realm_law = meritocratic_bureaucracy_1 } - } - } - - can_pass = { - trigger_if = { - limit = { - has_realm_law = meritocratic_bureaucracy_0 - is_independent_ruler = yes - } - custom_description = { - subject = root - text = "has_meritocratic_bureaucracy_cooldown" - NAND = { - has_variable = imperial_bureaucracy_cooldown - NOT = { - culture = { has_innovation = innovation_all_things } - } - } - } - } - trigger_if = { - limit = { - is_independent_ruler = no - liege = { has_realm_law = meritocratic_bureaucracy_1 } - } - custom_tooltip = { - text = imperial_bureaucracy_pending_law_change - always = no - } - } - can_pass_law_ca1_trigger = yes - } - - pass_cost = { - prestige = { - if = { - limit = { - NOR = { - has_realm_law = meritocratic_bureaucracy_2 - has_realm_law = meritocratic_bureaucracy_3 - } - } - add = increase_crown_authority_prestige_cost - } - } - } - - on_pass = { - # Increment cooldown breaker tally, if appropriate. - calculate_authority_cooldown_break_effect = yes - # Set regular cooldown. - set_variable = { - name = imperial_bureaucracy_cooldown - years = @imperial_bureaucracy_cooldown_years_1 - } - # Remove modifiers. - remove_law_related_modifiers_effect = yes - } - - ai_will_do = { - if = { - limit = { has_realm_law = meritocratic_bureaucracy_0 } - value = 1 - } - } - } - - meritocratic_bureaucracy_2 = { - modifier = { - belligerent_opinion = 10 - barons_and_minor_landholders_opinion = -10 - glory_hound_opinion = -10 - parochial_opinion = -10 - courtly_opinion = -5 - zealot_opinion = -10 - minority_opinion = -10 - meritocratic_government_tax_contribution_add = 0.05 - republic_government_tax_contribution_add = 0.05 - } - flag = uses_meritocratic_bureaucracy - flag = vassal_refusal_is_treason - flag = can_change_succession_laws - flag = vassal_all_wars_banned - flag = admin_change_vassal_gov_cheaper - flag = can_have_tributaries - - can_keep = { - realm_law_use_meritocratic_bureaucracy = yes - trigger_if = { - limit = { - this = title:h_china.holder - } - situation:dynastic_cycle ?= { - NOR = { - situation_current_phase = situation_dynastic_cycle_phase_instability - situation_current_phase = situation_dynastic_cycle_phase_instability_conquest - } - } - } - trigger_if = { - limit = { - is_independent_ruler = no - } - liege = { has_realm_law = meritocratic_bureaucracy_2 } - } - } - - can_pass = { - trigger_if = { - limit = { - NOT = { has_realm_law = meritocratic_bureaucracy_3 } - is_independent_ruler = yes - } - has_realm_law = meritocratic_bureaucracy_1 - custom_description = { - subject = root - text = "has_meritocratic_bureaucracy_cooldown" - NAND = { - has_variable = imperial_bureaucracy_cooldown - NOT = { - culture = { has_innovation = innovation_all_things } - } - } - } - } - trigger_if = { - limit = { - is_independent_ruler = no - liege = { has_realm_law = meritocratic_bureaucracy_2 } - } - custom_tooltip = { - text = imperial_bureaucracy_pending_law_change - always = no - } - } - can_pass_law_ca2_trigger = yes - } - - pass_cost = { - prestige = { - if = { - limit = { - NOT = { has_realm_law = meritocratic_bureaucracy_3 } - } - add = increase_crown_authority_prestige_cost - } - } - } - - on_pass = { - # Increment cooldown breaker tally, if appropriate. - calculate_authority_cooldown_break_effect = yes - # Set regular cooldown. - set_variable = { - name = imperial_bureaucracy_cooldown - years = @imperial_bureaucracy_cooldown_years_2 - } - # Remove modifiers. - remove_law_related_modifiers_effect = yes - } - - ai_will_do = { - if = { - limit = { has_realm_law = meritocratic_bureaucracy_1 } - value = 1 - } - } - } - - meritocratic_bureaucracy_3 = { - modifier = { - belligerent_opinion = 15 - barons_and_minor_landholders_opinion = -20 - glory_hound_opinion = -25 - parochial_opinion = -25 - courtly_opinion = -10 - zealot_opinion = -20 - minority_opinion = -30 - meritocratic_government_tax_contribution_add = 0.1 - republic_government_tax_contribution_add = 0.05 - } - flag = uses_meritocratic_bureaucracy - flag = vassal_all_wars_banned_permanent - flag = max_authority_level - flag = can_have_tributaries - - can_keep = { - realm_law_use_meritocratic_bureaucracy = yes - trigger_if = { - limit = { - is_independent_ruler = no - } - liege = { has_realm_law = meritocratic_bureaucracy_3 } - } - } - - can_pass = { - trigger_if = { - limit = { - is_independent_ruler = yes - } - has_realm_law = meritocratic_bureaucracy_2 - custom_description = { - subject = root - text = "has_meritocratic_bureaucracy_cooldown" - NAND = { - has_variable = imperial_bureaucracy_cooldown - NOT = { - culture = { has_innovation = innovation_all_things } - } - } - } - } - trigger_if = { - limit = { - is_independent_ruler = no - liege = { has_realm_law = meritocratic_bureaucracy_3 } - } - custom_tooltip = { - text = imperial_bureaucracy_pending_law_change - always = no - } - } - can_pass_law_ca3_trigger = yes - } - - pass_cost = { - prestige = { - if = { - limit = { - NOT = { has_realm_law = meritocratic_bureaucracy_3 } - } - add = increase_crown_authority_prestige_cost - } - } - } - - on_pass = { - # Increment cooldown breaker tally, if appropriate. - calculate_authority_cooldown_break_effect = yes - # Set regular cooldown. - set_variable = { - name = imperial_bureaucracy_cooldown - years = @imperial_bureaucracy_cooldown_years_3 - } - # Remove modifiers. - remove_law_related_modifiers_effect = yes - } - } -} - -japanese_bureaucracy = { # A variant of Imperial Bureaucracy for Ritsuryo Government - default = japanese_bureaucracy_1 - cumulative = yes - flag = realm_law - - japanese_bureaucracy_0 = { - modifier = { - belligerent_opinion = -10 - barons_and_minor_landholders_opinion = 20 - glory_hound_opinion = 10 - parochial_opinion = 10 - courtly_opinion = 5 - } - flag = uses_japanese_bureaucracy - flag = titles_cannot_leave_realm_on_succession # Hardcoded flag - - can_keep = { - realm_law_use_japanese_bureaucracy = yes - trigger_if = { - limit = { is_independent_ruler = no } - liege = { has_realm_law = japanese_bureaucracy_0 } - } - } - - can_pass = { - trigger_if = { - limit = { - is_independent_ruler = no - liege = { has_realm_law = japanese_bureaucracy_0 } - } - custom_tooltip = { - text = imperial_bureaucracy_pending_law_change - always = no - } - } - } - - on_pass = { - # Remove modifiers. - remove_law_related_modifiers_effect = yes - } - } - - japanese_bureaucracy_1 = { - modifier = { - belligerent_opinion = 5 - barons_and_minor_landholders_opinion = -30 - glory_hound_opinion = -15 - parochial_opinion = -15 - courtly_opinion = -5 - minority_opinion = -10 - japan_administrative_government_tax_contribution_add = 0.05 - } - flag = uses_celestial_bureaucracy - flag = title_revocation_allowed - flag = vassal_retraction_allowed - flag = can_change_partition_succession_laws - flag = diarchs_want_to_subsidise_without_this_flag - - can_keep = { - realm_law_use_japanese_bureaucracy = yes - trigger_if = { - limit = { is_independent_ruler = no } - liege = { has_realm_law = japanese_bureaucracy_1 } - } - } - - can_pass = { - trigger_if = { - limit = { - has_realm_law = japanese_bureaucracy_0 - is_independent_ruler = yes - } - custom_description = { - subject = root - text = "has_japanese_bureaucracy_cooldown" - NAND = { - has_variable = imperial_bureaucracy_cooldown - NOT = { - culture = { has_innovation = innovation_all_things } - } - } - } - } - trigger_if = { - limit = { - is_independent_ruler = no - liege = { has_realm_law = japanese_bureaucracy_1 } - } - custom_tooltip = { - text = imperial_bureaucracy_pending_law_change - always = no - } - } - can_pass_law_ca1_trigger = yes - } - - pass_cost = { - prestige = { - if = { - limit = { - NOR = { - has_realm_law = japanese_bureaucracy_2 - has_realm_law = japanese_bureaucracy_3 - } - } - add = increase_crown_authority_prestige_cost - } - } - } - - on_pass = { - # Increment cooldown breaker tally, if appropriate. - calculate_authority_cooldown_break_effect = yes - # Set regular cooldown. - set_variable = { - name = imperial_bureaucracy_cooldown - years = @imperial_bureaucracy_cooldown_years_1 - } - # Remove modifiers. - remove_law_related_modifiers_effect = yes - } - - ai_will_do = { - if = { - limit = { has_realm_law = japanese_bureaucracy_0 } - value = 1 - } - } - } - - japanese_bureaucracy_2 = { - modifier = { - belligerent_opinion = 10 - barons_and_minor_landholders_opinion = -10 - glory_hound_opinion = -10 - parochial_opinion = -10 - courtly_opinion = -5 - zealot_opinion = -10 - minority_opinion = -10 - japan_administrative_government_tax_contribution_add = 0.05 - republic_government_tax_contribution_add = 0.05 - } - flag = uses_japanese_bureaucracy - flag = vassal_refusal_is_treason - flag = can_change_succession_laws - flag = admin_change_vassal_gov_cheaper - - can_keep = { - realm_law_use_japanese_bureaucracy = yes - trigger_if = { - limit = { - this = title:h_china.holder - } - situation:dynastic_cycle ?= { - NOR = { - situation_current_phase = situation_dynastic_cycle_phase_instability - situation_current_phase = situation_dynastic_cycle_phase_instability_conquest - } - } - } - trigger_if = { - limit = { is_independent_ruler = no } - liege = { has_realm_law = japanese_bureaucracy_2 } - } - } - - can_pass = { - trigger_if = { - limit = { - NOT = { has_realm_law = japanese_bureaucracy_3 } - is_independent_ruler = yes - } - has_realm_law = japanese_bureaucracy_1 - custom_description = { - subject = root - text = "has_japanese_bureaucracy_cooldown" - NAND = { - has_variable = imperial_bureaucracy_cooldown - NOT = { - culture = { has_innovation = innovation_all_things } - } - } - } - } - trigger_if = { - limit = { - is_independent_ruler = no - liege = { has_realm_law = japanese_bureaucracy_2 } - } - custom_tooltip = { - text = imperial_bureaucracy_pending_law_change - always = no - } - } - can_pass_law_ca2_trigger = yes - } - - pass_cost = { - prestige = { - if = { - limit = { - NOT = { has_realm_law = japanese_bureaucracy_3 } - } - add = increase_crown_authority_prestige_cost - } - } - } - - on_pass = { - # Increment cooldown breaker tally, if appropriate. - calculate_authority_cooldown_break_effect = yes - # Set regular cooldown. - set_variable = { - name = imperial_bureaucracy_cooldown - years = @imperial_bureaucracy_cooldown_years_2 - } - # Remove modifiers. - remove_law_related_modifiers_effect = yes - } - - ai_will_do = { - if = { - limit = { has_realm_law = japanese_bureaucracy_1 } - value = 1 - } - } - } - - japanese_bureaucracy_3 = { - modifier = { - belligerent_opinion = 15 - barons_and_minor_landholders_opinion = -20 - glory_hound_opinion = -25 - parochial_opinion = -25 - courtly_opinion = -10 - zealot_opinion = -20 - minority_opinion = -30 - japan_administrative_government_tax_contribution_add = 0.1 - republic_government_tax_contribution_add = 0.05 - } - flag = uses_japanese_bureaucracy - flag = max_authority_level - - can_keep = { - realm_law_use_japanese_bureaucracy = yes - trigger_if = { - limit = { is_independent_ruler = no } - liege = { has_realm_law = japanese_bureaucracy_3 } - } - } - - can_pass = { - trigger_if = { - limit = { is_independent_ruler = yes } - has_realm_law = japanese_bureaucracy_2 - custom_description = { - subject = root - text = "has_japanese_bureaucracy_cooldown" - NAND = { - has_variable = imperial_bureaucracy_cooldown - NOT = { - culture = { has_innovation = innovation_all_things } - } - } - } - } - trigger_if = { - limit = { - is_independent_ruler = no - liege = { has_realm_law = japanese_bureaucracy_3 } - } - custom_tooltip = { - text = imperial_bureaucracy_pending_law_change - always = no - } - } - can_pass_law_ca3_trigger = yes - } - - pass_cost = { - prestige = { - if = { - limit = { - NOT = { has_realm_law = japanese_bureaucracy_3 } - } - add = increase_crown_authority_prestige_cost - } - } - } - - on_pass = { - # Increment cooldown breaker tally, if appropriate. - calculate_authority_cooldown_break_effect = yes - # Set regular cooldown. - set_variable = { - name = imperial_bureaucracy_cooldown - years = @imperial_bureaucracy_cooldown_years_3 - } - # Remove modifiers. - remove_law_related_modifiers_effect = yes - } - - } -} - -crowned_laws = { - default = uncrowned - cumulative = no - flag = realm_law - flag = realm_law_no_number - flag = realm_no_pass - - uncrowned = { - can_keep = { - coronation_trigger = yes - NOT = { - has_game_rule = coronation_laws_off - } - } - can_have = { - coronation_trigger = yes - NOT = { - has_game_rule = coronation_laws_off - } - } - modifier = { - vassal_opinion = -10 - legitimacy_gain_mult = -0.25 - monthly_legitimacy_add = -2.5 - ai_war_chance = -100 - } - can_pass = { - custom_tooltip = { - text = can_only_be_lost_through_losing_titles - NOR = { - has_realm_law = crowned_king - has_realm_law = crowned_emperor - } - } - } - potential = { - coronation_trigger = yes - NOT = { - has_game_rule = coronation_laws_off - } - } - } - - crowned_king = { - can_keep = { - coronation_trigger = yes - NOT = { - has_game_rule = coronation_laws_off - } - } - can_have = { - coronation_trigger = yes - NOT = { - has_game_rule = coronation_laws_off - } - } - modifier = { - courtly_opinion = 5 - barons_and_minor_landholders_opinion = 5 - } - can_pass = { - # If you have a worse Coronation law, we will tell the player they can gain this with a Coronation - custom_tooltip = { - text = can_only_be_passed_through_coronation - NOT = { has_realm_law = uncrowned } - } - # If you have a better Coronation law, we will tell the player this is pointless for them - custom_tooltip = { - text = already_better_coronation - NOT = { has_realm_law = crowned_emperor } - } - } - potential = { - coronation_trigger = yes - NOT = { - has_game_rule = coronation_laws_off - } - } - } - - crowned_emperor = { - can_keep = { - coronation_trigger = yes - NOT = { - has_game_rule = coronation_laws_off - } - } - can_have = { - coronation_trigger = yes - NOT = { - has_game_rule = coronation_laws_off - } - } - modifier = { - courtly_opinion = 10 - barons_and_minor_landholders_opinion = 10 - zealot_opinion = 5 - } - can_pass = { - # If you have a worse Coronation law, we will tell the player they can gain this with a Coronation - custom_tooltip = { - text = can_only_be_passed_through_coronation - NOR = { - has_realm_law = uncrowned - has_realm_law = crowned_king - } - } - } - should_start_with = { - always = no - } - potential = { - coronation_trigger = yes - NOT = { - has_game_rule = coronation_laws_off - } - } - - } -} diff --git a/N3OW/common/laws/00_succession_laws.txt b/N3OW/common/laws/00_succession_laws.txt deleted file mode 100644 index 1c192a31..00000000 --- a/N3OW/common/laws/00_succession_laws.txt +++ /dev/null @@ -1,2031 +0,0 @@ -succession_order_laws = { - - flag = succession_order_laws - - can_change_law_group = { - custom_tooltip = { - text = CANT_CHANGE_LAW_TOOLTIP - NOR = { - has_realm_law = mandala_succession_law - government_has_flag = government_is_japan_administrative - } - } - } - - confederate_partition_succession_law = { - can_keep = { - always = yes - } - can_pass = { - can_change_partition_succession_law_trigger = yes - trigger_if = { - limit = { - exists = primary_title - } - is_confederation_member = no - } - } - can_have = { - can_have_confederate_partition_succession_law_trigger = yes - trigger_if = { - limit = { - exists = primary_title - } - is_confederation_member = no - } - } - should_start_with = { - NOR = { - historical_succession_access_single_heir_succession_law_trigger = yes - historical_succession_access_single_heir_succession_law_youngest_trigger = yes - historical_succession_access_single_heir_dynasty_house_trigger = yes - } - OR = { - AND = { - government_has_flag = government_is_feudal - culture = { - NOR = { - has_innovation = innovation_hereditary_rule - has_innovation = innovation_heraldry - } - } - } - government_has_flag = government_is_tribal - } - } - succession = { - order_of_succession = inheritance - traversal_order = children - rank = oldest - title_division = partition - create_primary_tier_titles = yes - } - flag = partition_succession_law - modifier = { - glory_hound_opinion = 10 - parochial_opinion = 5 - belligerent_opinion = -10 - dynasty_house_opinion = 5 - eligible_child_opinion = 10 - } - pass_cost = { - prestige = change_succession_law_prestige_cost - } - - potential = { - NOR = { - government_has_flag = government_is_nomadic - government_has_flag = government_is_clan - government_has_flag = government_is_administrative - government_has_flag = government_is_mandala - government_has_flag = government_is_celestial - government_has_flag = government_is_meritocratic - government_has_flag = government_is_steppe_admin - } - } - } - - partition_succession_law = { - can_keep = { - OR = { - can_keep_partition_succession_law_trigger = yes - trigger_if = { - limit = { - exists = primary_title - } - is_confederation_member = yes - } - } - } - can_pass = { - OR = { - can_change_partition_succession_law_trigger = yes - trigger_if = { - limit = { - exists = primary_title - } - is_confederation_member = yes - } - } - } - can_have = { - OR = { - can_have_partition_succession_law_trigger = yes - trigger_if = { - limit = { - exists = primary_title - } - is_confederation_member = yes - } - } - } - should_start_with = { - NOR = { - historical_succession_access_single_heir_succession_law_trigger = yes - historical_succession_access_single_heir_succession_law_youngest_trigger = yes - historical_succession_access_single_heir_dynasty_house_trigger = yes - } - government_has_flag = government_is_feudal - culture = { - has_innovation = innovation_hereditary_rule - NOT = { - has_innovation = innovation_heraldry - } - } - NOT = { government_allows = administrative } - } - succession = { - order_of_succession = inheritance - traversal_order = children - rank = oldest - title_division = partition - } - flag = partition_succession_law - modifier = { - glory_hound_opinion = 10 - parochial_opinion = 5 - belligerent_opinion = -10 - player_heir_opinion = 10 - eligible_child_except_player_heir_opinion = 5 - } - pass_cost = { - prestige = change_succession_law_prestige_cost - } - - ai_will_do = { - if = { - limit = { has_realm_law = confederate_partition_succession_law } - value = 1 - } - } - - potential = { - NOR = { - government_has_flag = government_is_nomadic - government_has_flag = government_is_clan - government_has_flag = government_is_administrative - government_has_flag = government_is_mandala - government_has_flag = government_is_celestial - government_has_flag = government_is_meritocratic - government_has_flag = government_is_steppe_admin - } - } - } - - high_partition_succession_law = { - can_keep = { - can_keep_high_partition_succession_law_trigger = yes - } - can_pass = { - can_change_partition_succession_law_trigger = yes - } - can_have = { - NOT = { government_has_flag = government_is_nomadic } - can_have_high_partition_succession_law_trigger = yes - } - should_start_with = { - NOR = { - historical_succession_access_single_heir_succession_law_trigger = yes - historical_succession_access_single_heir_succession_law_youngest_trigger = yes - historical_succession_access_single_heir_dynasty_house_trigger = yes - } - government_has_flag = government_is_feudal - culture = { - has_innovation = innovation_heraldry - } - NOT = { government_allows = administrative } - } - succession = { - order_of_succession = inheritance - traversal_order = children - rank = oldest - title_division = partition - primary_heir_minimum_share = 0.5 - } - flag = partition_succession_law - modifier = { - glory_hound_opinion = 5 - belligerent_opinion = -10 - player_heir_opinion = 15 - } - pass_cost = { - prestige = change_succession_law_prestige_cost - } - - ai_will_do = { - if = { - limit = { - OR = { - has_realm_law = confederate_partition_succession_law - has_realm_law = partition_succession_law - } - } - value = 2 - } - } - - potential = { - NOR = { - government_has_flag = government_is_nomadic - government_has_flag = government_is_clan - government_has_flag = government_is_administrative - government_has_flag = government_is_mandala - government_has_flag = government_is_celestial - government_has_flag = government_is_meritocratic - government_has_flag = government_is_steppe_admin - } - } - } - - single_heir_succession_law = { - can_keep = { - can_keep_single_heir_succession_law_trigger = yes - # Vassal Contract allows it - custom_description = { - text = succession_laws_must_not_be_forced_partition - NAND = { - top_liege != this - vassal_contract_has_flag = locked_to_partition - } - } - } - can_title_have = { - # Ceremonial Regent - NOT = { exists = var:administrative_ui_special_title.holder } - } - can_have = { - NOT = { government_has_flag = government_is_nomadic } - can_have_single_heir_succession_law_trigger = yes - } - can_pass = { - can_change_succession_law_trigger = yes - trigger_if = { - limit = { - government_has_flag = government_is_clan - } - piety_level >= 3 - } - trigger_if = { - limit = { - government_allows = administrative - } - influence_level >= 4 - has_active_diarchy = no - primary_title = { title_held_years >= 10 } - } - } - should_start_with = { - historical_succession_access_single_heir_succession_law_trigger = yes - } - succession = { - order_of_succession = inheritance - traversal_order = children - rank = oldest - title_division = single_heir - } - flag = advanced_succession_law - modifier = { - glory_hound_opinion = -10 - parochial_opinion = -5 - player_heir_opinion = 20 - eligible_child_except_player_heir_opinion = -5 - } - pass_cost = { - prestige = change_succession_law_prestige_cost - piety = { - value = 0 - if = { - limit = { - government_has_flag = government_is_clan - } - add = { - desc = "clan_government_cost_tooltip" - value = 1500 - } - } - } - } - revoke_cost = { - prestige = change_succession_law_prestige_cost - } - - ai_will_do = { - value = 3 - } - - potential = { - NOR = { - government_has_flag = government_is_nomadic - government_has_flag = government_is_mandala - } - trigger_if = { - limit = { - government_allows = administrative - } - OR = { - is_independent_ruler = yes - tgp_is_ceremonial_liege_trigger = yes - } - } - } - } - - single_heir_succession_kurultai_law = { - can_keep = { - government_has_flag = government_is_nomadic - } - can_have = { - government_has_flag = government_is_nomadic - } - can_pass = { - government_has_flag = government_is_nomadic - } - should_start_with = { - government_has_flag = government_is_nomadic - } - succession = { - order_of_succession = inheritance - traversal_order = children - rank = oldest - title_division = single_heir - } - flag = advanced_succession_law - flag = can_designate_heirs - modifier = { - belligerent_opinion = 10 - glory_hound_opinion = 5 - player_heir_opinion = 20 - eligible_child_except_player_heir_opinion = -20 - } - pass_cost = { - } - revoke_cost = { - prestige = change_succession_law_prestige_cost - } - - ai_will_do = { - value = 3 - } - - potential = { - government_has_flag = government_is_nomadic - } - } - - single_heir_succession_law_youngest = { - can_keep = { - can_keep_single_heir_youngest_succession_law_trigger = yes - # Vassal Contract allows it - custom_description = { - text = succession_laws_must_not_be_forced_partition - NAND = { - top_liege != this - vassal_contract_has_flag = locked_to_partition - } - } - } - can_have = { - NOT = { government_has_flag = government_is_nomadic } - can_have_single_heir_youngest_succession_law_trigger = yes - } - can_pass = { - can_change_succession_law_trigger = yes - trigger_if = { - limit = { - government_has_flag = government_is_clan - } - piety_level >= 3 - } - trigger_if = { - limit = { - government_allows = administrative - } - influence_level >= 4 - has_active_diarchy = no - primary_title = { title_held_years >= 10 } - } - } - succession = { - order_of_succession = inheritance - traversal_order = children - rank = youngest - title_division = single_heir - } - - flag = advanced_succession_law - modifier = { - glory_hound_opinion = -10 - parochial_opinion = -5 - player_heir_opinion = 20 - eligible_child_except_player_heir_opinion = -5 - } - pass_cost = { - prestige = change_succession_law_prestige_cost - piety = { - value = 0 - if = { - limit = { - government_has_flag = government_is_clan - } - add = { - desc = "clan_government_cost_tooltip" - value = 1500 - } - } - } - } - revoke_cost = { - prestige = change_succession_law_prestige_cost - } - - potential = { - trigger_if = { - limit = { - government_has_flag = government_is_administrative - } - is_independent_ruler = yes - } - NOR = { - government_has_flag = government_is_nomadic - government_has_flag = government_is_mandala - } - } - } - - single_heir_dynasty_house = { # LAST CALL - can_keep = { - can_keep_single_heir_dynasty_house_trigger = yes - # Vassal Contract allows it - custom_description = { - text = succession_laws_must_not_be_forced_partition - NAND = { - top_liege != this - vassal_contract_has_flag = locked_to_partition - } - } - } - can_have = { - NOT = { government_has_flag = government_is_nomadic } - can_have_single_heir_dynasty_house_trigger = yes - } - can_pass = { - can_change_single_heir_dynasty_house_succession_law_trigger = yes - trigger_if = { - limit = { - government_has_flag = government_is_clan - } - piety_level >= 3 - } - } - should_start_with = { - historical_succession_access_single_heir_dynasty_house_trigger = yes - NOT = { government_allows = administrative } - } - succession = { - order_of_succession = inheritance - traversal_order = dynasty_house - rank = oldest - title_division = single_heir - } - - flag = advanced_succession_law - modifier = { - glory_hound_opinion = -5 - eligible_child_except_player_heir_opinion = -15 - dynasty_house_opinion = 5 - } - pass_cost = { - prestige = change_succession_law_prestige_cost - piety = { - value = 0 - if = { - limit = { - government_has_flag = government_is_clan - } - add = { - desc = "clan_government_cost_tooltip" - value = 1500 - } - } - } - } - revoke_cost = { - prestige = change_succession_law_prestige_cost - } - - ai_will_do = { - if = { - limit = { - exists = primary_title - primary_title.tier > tier_county - OR = { - #West Slavic - culture = { has_cultural_pillar = heritage_west_slavic } - } - } - value = 2 - } - } - - potential = { - NOR = { - government_has_flag = government_is_administrative - government_has_flag = government_is_nomadic - government_has_flag = government_is_mandala - } - } - } - - acclamation_succession_law = { - can_keep = { - can_keep_acclamation_succession_law_trigger = yes - } - can_pass = { - can_change_acclamation_succession_law_trigger = yes - } - can_have = { - NOT = { government_has_flag = government_is_nomadic } - can_have_acclamation_succession_law_trigger = yes - } - should_start_with = { - has_ep3_dlc_trigger = yes - has_title = title:e_byzantium - government_allows = administrative - } - succession = { - order_of_succession = appointment - appointment_type = admin_emperor - } - flag = advanced_succession_law - flag = can_designate_heirs - flag = appointment_type_succession - pass_cost = { - prestige = { - value = change_succession_law_prestige_cost - multiply = { - value = 0.5 # We reduce the cost to ensure that going back to acclamation is easy - desc = "[administrative_government|E]" - } - } - } - ai_will_do = { - if = { - limit = { has_realm_law = confederate_partition_succession_law } - value = 1 - } - } - potential = { - government_allows = administrative - is_independent_ruler = yes - } - } - - appointment_succession_law = { - can_keep = { - can_keep_appointment_succession_law_trigger = yes - # Vassal Contract allows it - custom_description = { - text = succession_laws_must_not_be_forced_partition - NAND = { - top_liege != this - vassal_contract_has_flag = locked_to_partition - } - } - } - can_have = { - NOT = { government_has_flag = government_is_nomadic } - can_have_appointment_succession_law_trigger = yes - } - can_pass = { - can_change_appointment_succession_law_trigger = yes - } - should_start_with = { - government_allows = administrative - NOR = { - government_has_flag = government_is_celestial - government_has_flag = government_is_japan_administrative - government_has_flag = government_is_meritocratic - } - is_independent_ruler = no - } - succession = { - order_of_succession = appointment - appointment_type = admin_governor - } - flag = advanced_succession_law - flag = appointment_type_succession - modifier = { - glory_hound_opinion = -10 - parochial_opinion = -5 - player_heir_opinion = 20 - eligible_child_except_player_heir_opinion = -5 - } - pass_cost = { - prestige = change_succession_law_prestige_cost - } - revoke_cost = { - prestige = change_succession_law_prestige_cost - } - - ai_will_do = { - if = { - limit = { - OR = { - has_realm_law = confederate_partition_succession_law - has_realm_law = partition_succession_law - has_realm_law = high_partition_succession_law - } - } - value = 3 - } - } - - potential = { - government_allows = administrative # Default succession law for all admin types... - NOR = { # ... Unless you have a unique succession available - government_has_flag = government_is_celestial - government_has_flag = government_is_japan_administrative - government_has_flag = government_is_meritocratic - } - is_independent_ruler = no - } - } - - landless_adventurer_succession_law = { - can_keep = { - government_has_flag = government_is_landless_adventurer - } - can_have = { - government_has_flag = government_is_landless_adventurer - } - can_pass = { - government_has_flag = government_is_landless_adventurer - } - should_start_with = { - government_has_flag = government_is_landless_adventurer - } - should_show_for_title = { # Never show this in the UI, just apply it through script - always = no - } - can_remove_from_title = { - always = no - } - succession = { - order_of_succession = inheritance - traversal_order = children - rank = oldest - title_division = single_heir - exclude_rulers = yes - limit_to_courtiers = yes - } - flag = can_designate_heirs - - potential = { - government_has_flag = government_is_landless_adventurer - } - } - - bishop_theocratic_succession_law = { - can_keep = { - can_have_bishop_theocratic_succession_law_trigger = yes # same as can_have - } - can_have = { - can_have_bishop_theocratic_succession_law_trigger = yes - } - should_start_with = { - always = yes - } - succession = { - order_of_succession = theocratic - faith = same_faith - pool_character_config = pool_theocratic_succession - } - - potential = { - can_have_bishop_theocratic_succession_law_trigger = yes - } - } - - holy_order_succession_law = { - can_keep = { - can_have_holy_order_succession_law_trigger = yes # same as can_have - } - can_have = { - can_have_holy_order_succession_law_trigger = yes - } - should_start_with = { - government_has_flag = government_is_holy_order - } - succession = { - order_of_succession = theocratic - faith = same_faith - pool_character_config = pool_holy_order_succession - } - - potential = { - can_have_holy_order_succession_law_trigger = yes - } - } - - mercenary_company_succession_law = { - can_keep = { - can_have_mercenary_succession_law_trigger = yes - } - can_have = { - can_have_mercenary_succession_law_trigger = yes - } - should_start_with = { - government_has_flag = government_is_mercenary - } - succession = { - order_of_succession = company - pool_character_config = pool_mercenary_succession - } - - potential = { - can_have_mercenary_succession_law_trigger = yes - } - } - - city_succession_law = { - can_keep = { - can_have_city_succession_law_trigger = yes - } - can_have = { - can_have_city_succession_law_trigger = yes - } - should_start_with = { - government_has_flag = government_is_republic - } - succession = { - order_of_succession = generate - pool_character_config = pool_city_succession - } - - potential = { - can_have_city_succession_law_trigger = yes - } - } - - clan_antagonistic_partition_succession_law = { - can_keep = { - government_has_flag = government_is_clan - house ?= { - has_house_unity_stage = antagonistic - } - } - can_pass = { - government_has_flag = government_is_clan - house ?= { - has_house_unity_stage = antagonistic - } - } - can_have = { - government_has_flag = government_is_clan - house ?= { - has_house_unity_stage = antagonistic - } - } - - should_start_with = { - government_has_flag = government_is_clan - house ?= { has_house_unity_stage = antagonistic } - } - - potential = { - government_has_flag = government_is_clan - } - - requires_approve = { - NOT = { - government_has_flag = government_is_clan - } - } - - succession = { - order_of_succession = inheritance - traversal_order = children - rank = oldest - title_division = partition - } - - flag = same_house_vassals_gain_claim_on_primary_title - flag = house_unity_stage_antagonistic - - modifier = { - dynasty_house_opinion = -10 - glory_hound_opinion = 15 - zealot_opinion = 10 - belligerent_opinion = -10 - player_heir_opinion = 10 - eligible_child_except_player_heir_opinion = 5 - } - - widget_name = "widget_clan_law" - } - - clan_competitive_partition_succession_law = { - can_keep = { - government_has_flag = government_is_clan - house ?= { - has_house_unity_stage = competitive - } - } - can_pass = { - government_has_flag = government_is_clan - house ?= { - has_house_unity_stage = competitive - } - } - can_have = { - government_has_flag = government_is_clan - house ?= { - has_house_unity_stage = competitive - } - } - should_start_with = { - government_has_flag = government_is_clan - house ?= { has_house_unity_stage = competitive } - } - - potential = { - government_has_flag = government_is_clan - } - - requires_approve = { - NOT = { - government_has_flag = government_is_clan - } - } - - succession = { - order_of_succession = inheritance - traversal_order = children - rank = oldest - title_division = partition - } - - flag = same_house_vassals_gain_claim_on_primary_title - flag = house_unity_stage_competitive - - modifier = { - glory_hound_opinion = 10 - zealot_opinion = 5 - belligerent_opinion = -5 - player_heir_opinion = 10 - eligible_child_except_player_heir_opinion = 5 - } - - widget_name = "widget_clan_law" - } - - clan_impassive_partition_succession_law = { - can_keep = { - government_has_flag = government_is_clan - house ?= { - OR = { - has_house_unity_stage = impassive - # In case the house is fully unlanded - has_house_unity = no - } - } - } - can_pass = { - government_has_flag = government_is_clan - house ?= { - has_house_unity_stage = impassive - } - } - can_have = { - government_has_flag = government_is_clan - house ?= { - has_house_unity_stage = impassive - } - } - should_start_with = { - government_has_flag = government_is_clan - house ?= { - OR = { - has_house_unity_stage = impassive - # In case the house is fully unlanded - has_house_unity = no - } - } - } - - potential = { - government_has_flag = government_is_clan - } - - requires_approve = { - NOT = { - government_has_flag = government_is_clan - } - } - - flag = house_unity_stage_impassive - - succession = { - order_of_succession = inheritance - traversal_order = children - rank = oldest - title_division = partition - primary_heir_minimum_share = 0.25 - } - modifier = { - glory_hound_opinion = 5 - parochial_opinion = 5 - player_heir_opinion = 15 - } - - widget_name = "widget_clan_law" - } - - clan_friendly_partition_succession_law = { - can_keep = { - government_has_flag = government_is_clan - house ?= { - has_house_unity_stage = friendly - } - } - can_pass = { - government_has_flag = government_is_clan - house ?= { - has_house_unity_stage = friendly - } - } - can_have = { - government_has_flag = government_is_clan - house ?= { - has_house_unity_stage = friendly - } - } - should_start_with = { - government_has_flag = government_is_clan - house ?= { has_house_unity_stage = friendly } - } - - potential = { - government_has_flag = government_is_clan - } - - requires_approve = { - NOT = { - government_has_flag = government_is_clan - } - } - - flag = house_unity_stage_friendly - - succession = { - order_of_succession = inheritance - traversal_order = children - rank = oldest - title_division = partition - primary_heir_minimum_share = 0.5 - } - modifier = { - parochial_opinion = 10 - courtly_opinion = 5 - player_heir_opinion = 25 - } - - widget_name = "widget_clan_law" - } - - clan_harmonious_partition_succession_law = { - can_keep = { - government_has_flag = government_is_clan - house ?= { - has_house_unity_stage = harmonious - } - } - can_pass = { - government_has_flag = government_is_clan - house ?= { - has_house_unity_stage = harmonious - } - } - can_have = { - government_has_flag = government_is_clan - house ?= { - has_house_unity_stage = harmonious - } - } - should_start_with = { - government_has_flag = government_is_clan - house ?= { - has_house_unity_stage = harmonious - } - } - potential = { - government_has_flag = government_is_clan - } - - requires_approve = { - NOT = { - government_has_flag = government_is_clan - } - } - - flag = house_unity_stage_harmonious - - succession = { - order_of_succession = inheritance - traversal_order = children - rank = oldest - title_division = partition - primary_heir_minimum_share = 0.75 - } - modifier = { - parochial_opinion = 15 - courtly_opinion = 10 - player_heir_opinion = 40 - } - - widget_name = "widget_clan_law" - } - - herder_succession_law = { - can_keep = { - can_have_herder_succession_law_trigger = yes - } - can_have = { - can_have_herder_succession_law_trigger = yes - } - should_start_with = { - government_has_flag = government_is_herder - } - can_remove_from_title = { - always = no - } - succession = { - order_of_succession = generate - pool_character_config = pool_herder_succession - } - - potential = { - can_have_herder_succession_law_trigger = yes - } - } - - celestial_appointment_succession_law = { - can_keep = { - government_allows = administrative - is_independent_ruler = no - custom_tooltip = { - text = celestial_appointment_allowed_desc - NOT = { vassal_contract_has_flag = celestial_military_appointment } - } - # Vassal Contract allows it - custom_description = { - text = succession_laws_must_not_be_forced_partition - NAND = { - is_independent_ruler = no - vassal_contract_has_flag = locked_to_partition - } - } - } - can_have = { - government_allows = administrative - is_independent_ruler = no - } - can_pass = { - government_allows = administrative - is_independent_ruler = no - } - should_start_with = { - government_has_flag = government_is_celestial - is_independent_ruler = no - custom_tooltip = { - text = celestial_appointment_allowed_desc - NOT = { vassal_contract_has_flag = celestial_military_appointment } - } - } - succession = { - order_of_succession = appointment - appointment_type = celestial_civic_governor - } - flag = advanced_succession_law - flag = appointment_type_succession - modifier = { - glory_hound_opinion = -10 - courtly_opinion = 5 - player_heir_opinion = 20 - eligible_child_except_player_heir_opinion = -5 - } - pass_cost = { - prestige = change_succession_law_prestige_cost - } - revoke_cost = { - prestige = change_succession_law_prestige_cost - } - - ai_will_do = { - if = { - limit = { - OR = { - has_realm_law = confederate_partition_succession_law - has_realm_law = partition_succession_law - has_realm_law = high_partition_succession_law - } - } - value = 3 - } - } - - potential = { - government_has_flag = government_is_celestial - is_independent_ruler = no - } - } - - celestial_military_appointment_succession_law = { - can_keep = { - government_allows = administrative - is_independent_ruler = no - custom_tooltip = { - text = celestial_military_appointment_allowed_desc - vassal_contract_has_flag = celestial_military_appointment - } - # Vassal Contract allows it - custom_description = { - NAND = { - is_independent_ruler = no - vassal_contract_has_flag = locked_to_partition - } - } - } - can_have = { - government_allows = administrative - is_independent_ruler = no - } - can_pass = { - can_change_succession_law_trigger = yes - government_allows = administrative - is_independent_ruler = no - } - should_start_with = { - government_has_flag = government_is_celestial - is_independent_ruler = no - custom_tooltip = { - text = celestial_military_appointment_allowed_desc - vassal_contract_has_flag = celestial_military_appointment - } - } - succession = { - order_of_succession = appointment - appointment_type = celestial_military_governor - } - flag = advanced_succession_law - flag = appointment_type_succession - modifier = { - glory_hound_opinion = 5 - courtly_opinion = -10 - player_heir_opinion = 20 - eligible_child_except_player_heir_opinion = -5 - } - pass_cost = { - prestige = change_succession_law_prestige_cost - } - revoke_cost = { - prestige = change_succession_law_prestige_cost - } - - ai_will_do = { - if = { - limit = { - OR = { - has_realm_law = confederate_partition_succession_law - has_realm_law = partition_succession_law - has_realm_law = high_partition_succession_law - } - } - value = 3 - } - } - - potential = { - government_has_flag = government_is_celestial - is_independent_ruler = no - } - } - - japanese_regency_succession_law = { - can_keep = { - can_have_japanese_regency_succession_law_trigger = yes - } - can_pass = { - can_have_japanese_regency_succession_law_trigger = yes - } - can_have = { - can_have_japanese_regency_succession_law_trigger = yes - } - can_title_have = { - exists = var:administrative_ui_special_title - } - should_show_for_title = { # Never show this in the UI, just apply it through script - always = no - } - can_remove_from_title = { - always = no - } - should_start_with = { - always = no - } - succession = { - order_of_succession = appointment - appointment_type = japanese_regent - } - flag = advanced_succession_law - flag = can_designate_heirs - flag = appointment_type_succession - pass_cost = { - prestige = change_succession_law_prestige_cost - } - ai_will_do = { - if = { - limit = { has_realm_law = confederate_partition_succession_law } - value = 1 - } - } - potential = { - government_has_flag = government_is_japan_administrative - } - } - - japanese_appointment_succession_law = { - can_keep = { - can_keep_japanese_appointment_succession_law_trigger = yes - } - can_pass = { - can_change_japanese_appointment_succession_law_trigger = yes - } - can_have = { - can_have_japanese_appointment_succession_law_trigger = yes - } - should_start_with = { - government_has_flag = government_is_japan_administrative - is_independent_ruler = no - NOT = { has_title = title:k_chrysanthemum_throne } - } - succession = { - order_of_succession = appointment - appointment_type = japanese_governor - } - flag = advanced_succession_law - flag = appointment_type_succession - modifier = { - glory_hound_opinion = -10 - parochial_opinion = -5 - player_heir_opinion = 20 - eligible_child_except_player_heir_opinion = -5 - } - pass_cost = { - prestige = change_succession_law_prestige_cost - } - revoke_cost = { - prestige = change_succession_law_prestige_cost - } - - ai_will_do = { - if = { - limit = { - OR = { - has_realm_law = confederate_partition_succession_law - has_realm_law = partition_succession_law - has_realm_law = high_partition_succession_law - } - } - value = 3 - } - } - - potential = { - government_has_flag = government_is_japan_administrative - is_independent_ruler = no - } - } - - japanese_military_appointment_succession_law = { - can_keep = { - government_allows = administrative - is_independent_ruler = no - custom_tooltip = { - text = celestial_military_appointment_allowed_desc - vassal_contract_has_flag = japan_administrative_military_appointment - } - # Vassal Contract allows it - custom_description = { - NAND = { - is_independent_ruler = no - vassal_contract_has_flag = locked_to_partition - } - } - } - can_have = { - government_allows = administrative - is_independent_ruler = no - } - can_pass = { - can_change_succession_law_trigger = yes - government_allows = administrative - is_independent_ruler = no - } - should_start_with = { - government_has_flag = government_is_japan_administrative - is_independent_ruler = no - custom_tooltip = { - text = celestial_military_appointment_allowed_desc - vassal_contract_has_flag = japan_administrative_military_appointment - } - } - succession = { - order_of_succession = appointment - appointment_type = japanese_military_governor - } - flag = advanced_succession_law - flag = appointment_type_succession - modifier = { - glory_hound_opinion = 5 - courtly_opinion = -10 - player_heir_opinion = 20 - eligible_child_except_player_heir_opinion = -5 - } - pass_cost = { - prestige = change_succession_law_prestige_cost - } - revoke_cost = { - prestige = change_succession_law_prestige_cost - } - - ai_will_do = { - if = { - limit = { - OR = { - has_realm_law = confederate_partition_succession_law - has_realm_law = partition_succession_law - has_realm_law = high_partition_succession_law - } - } - value = 3 - } - } - - potential = { - government_has_flag = government_is_japan_administrative - is_independent_ruler = no - } - } - - mandala_succession_law = { - can_keep = { - realm_law_is_mandala = yes - } - can_have = { - realm_law_is_mandala = yes - } - can_pass = { - realm_law_is_mandala = yes - } - should_start_with = { - realm_law_is_mandala = yes - } - should_show_for_title = { # Never show this in the UI, just apply it through script - always = no - } - can_remove_from_title = { - always = no - } - succession = { - order_of_succession = inheritance - traversal_order = children - rank = oldest - title_division = single_heir - } - flag = can_designate_heirs - - potential = { - realm_law_is_mandala = yes - } - } - - meritocratic_appointment_succession_law = { - can_keep = { - government_allows = administrative - is_independent_ruler = no - custom_tooltip = { - text = celestial_military_appointment_allowed_desc - NOT = { vassal_contract_has_flag = meritocratic_military_appointment } - } - # Vassal Contract allows it - custom_description = { - text = succession_laws_must_not_be_forced_partition - NAND = { - is_independent_ruler = no - vassal_contract_has_flag = locked_to_partition - } - } - } - can_have = { - government_allows = administrative - is_independent_ruler = no - } - can_pass = { - government_allows = administrative - is_independent_ruler = no - } - should_start_with = { - government_has_flag = government_is_meritocratic - is_independent_ruler = no - custom_tooltip = { - text = celestial_military_appointment_allowed_desc - NOT = { vassal_contract_has_flag = meritocratic_military_appointment } - } - } - succession = { - order_of_succession = appointment - appointment_type = meritocratic_civic_governor - } - flag = advanced_succession_law - flag = appointment_type_succession - modifier = { - glory_hound_opinion = -10 - courtly_opinion = 5 - player_heir_opinion = 20 - eligible_child_except_player_heir_opinion = -5 - } - pass_cost = { - prestige = change_succession_law_prestige_cost - } - revoke_cost = { - prestige = change_succession_law_prestige_cost - } - - ai_will_do = { - if = { - limit = { - OR = { - has_realm_law = confederate_partition_succession_law - has_realm_law = partition_succession_law - has_realm_law = high_partition_succession_law - } - } - value = 3 - } - } - - potential = { - government_has_flag = government_is_meritocratic - is_independent_ruler = no - } - } - - meritocratic_military_appointment_succession_law = { - can_keep = { - government_allows = administrative - is_independent_ruler = no - custom_tooltip = { - text = celestial_military_appointment_allowed_desc - vassal_contract_has_flag = meritocratic_military_appointment - } - # Vassal Contract allows it - custom_description = { - text = succession_laws_must_not_be_forced_partition - NAND = { - is_independent_ruler = no - vassal_contract_has_flag = locked_to_partition - } - } - } - can_have = { - government_allows = administrative - is_independent_ruler = no - } - can_pass = { - government_allows = administrative - is_independent_ruler = no - } - should_start_with = { - government_has_flag = government_is_meritocratic - is_independent_ruler = no - custom_tooltip = { - text = celestial_military_appointment_allowed_desc - vassal_contract_has_flag = meritocratic_military_appointment - } - } - succession = { - order_of_succession = appointment - appointment_type = meritocratic_military_governor - } - flag = advanced_succession_law - flag = appointment_type_succession - modifier = { - glory_hound_opinion = -10 - courtly_opinion = 5 - player_heir_opinion = 20 - eligible_child_except_player_heir_opinion = -5 - } - pass_cost = { - prestige = change_succession_law_prestige_cost - } - revoke_cost = { - prestige = change_succession_law_prestige_cost - } - - ai_will_do = { - if = { - limit = { - OR = { - has_realm_law = confederate_partition_succession_law - has_realm_law = partition_succession_law - has_realm_law = high_partition_succession_law - } - } - value = 3 - } - } - - potential = { - government_has_flag = government_is_meritocratic - is_independent_ruler = no - } - } - - meritocratic_regency_succession_law = { - can_keep = { - can_have_meritocratic_regency_succession_law_trigger = yes - } - can_pass = { - can_have_meritocratic_regency_succession_law_trigger = yes - } - can_have = { - can_have_meritocratic_regency_succession_law_trigger = yes - } - can_title_have = { - exists = var:administrative_ui_special_title - } - should_show_for_title = { # Never show this in the UI, just apply it through script - always = no - } - can_remove_from_title = { - always = no - } - should_start_with = { - always = no - } - succession = { - order_of_succession = appointment - appointment_type = meritocratic_regent - } - flag = advanced_succession_law - flag = can_designate_heirs - flag = appointment_type_succession - pass_cost = { - prestige = change_succession_law_prestige_cost - } - ai_will_do = { - if = { - limit = { has_realm_law = confederate_partition_succession_law } - value = 1 - } - } - potential = { - government_allows = administrative - government_allows = merit - tgp_realm_has_ceremonial_liege_trigger = yes - } - } -} - -succession_gender_laws = { - default = male_preference_law - flag = succession_gender_laws - - male_only_law = { - can_title_have = { - can_title_have_law_general_trigger = yes - } - should_show_for_title = { # Never show this in the UI, just apply it through script - always = no - } - can_keep = { - trigger_if = { - limit = { - top_liege != this - government_allows = administrative - } - top_liege = { has_realm_law = male_only_law } - } - trigger_else = { - custom_tooltip = { - text = culture_not_male_only_tt - OR = { - faith = { has_doctrine = doctrine_gender_male_dominated } - NOT = { - culture = { has_cultural_parameter = female_only_inheritance } - } - } - } - } - } - can_pass = { - can_change_succession_law_trigger = yes - } - should_start_with = { - trigger_if = { - limit = { - government_has_flag = government_has_merit - } - faith = { - has_doctrine = doctrine_gender_male_dominated - } - } - trigger_else_if = { - limit = { - top_liege != this - government_allows = administrative - } - top_liege = { has_realm_law = male_only_law } - } - trigger_else = { - faith = { - has_doctrine = doctrine_gender_male_dominated - religion_tag = islam_religion - } - } - } - succession = { - gender_law = male_only - } - flag = men_can_have_multiple_spouses - flag = men_can_have_consorts - flag = no_female_commanders - - pass_cost = { - prestige = change_succession_law_prestige_cost - } - revoke_cost = { - prestige = change_succession_law_prestige_cost - } - } - - male_preference_law = { - can_title_have = { - can_title_have_law_general_trigger = yes - } - should_show_for_title = { # Never show this in the UI, just apply it through script - always = no - } - can_keep = { - trigger_if = { - limit = { - top_liege != this - government_allows = administrative - } - top_liege = { has_realm_law = male_preference_law } - } - trigger_else = { - custom_description = { - text = change_law_male_preference_faith_requirement - faith = { - NOT = { has_doctrine = doctrine_gender_female_dominated } - } - } - custom_tooltip = { - text = culture_not_female_only_tt - OR = { - faith = { has_doctrine = doctrine_gender_male_dominated } - NOT = { - culture = { has_cultural_parameter = female_only_inheritance } - } - } - } - } - } - can_pass = { - can_change_succession_law_trigger = yes - } - should_start_with = { - trigger_if = { - limit = { - top_liege != this - government_allows = administrative - } - top_liege = { has_realm_law = male_preference_law } - } - trigger_else = { - NOT = { - culture = { has_cultural_parameter = female_preference_inheritance } - } - OR = { - faith = { - NOR = { - religion_tag = islam_religion - AND = { - root = { - government_has_flag = government_has_merit - } - has_doctrine = doctrine_gender_male_dominated - } - } - has_doctrine = doctrine_gender_male_dominated - } - AND = { - has_realm_law = male_only_law # For when male_only_law ceases to be a legal option - trigger_if = { - limit = { - is_independent_ruler = no - government_allows = administrative - } - NOT = { - top_liege = { has_realm_law = male_only_law } - } - } - trigger_else = { - custom_tooltip = { - text = culture_not_female_only_tt - NOR = { - faith = { has_doctrine = doctrine_gender_male_dominated } - NOT = { - culture = { has_cultural_parameter = female_only_inheritance } - } - } - } - } - } - } - } - } - succession = { - gender_law = male_preference - } - flag = men_can_have_multiple_spouses - flag = men_can_have_consorts - flag = no_female_commanders - - pass_cost = { - prestige = change_succession_law_prestige_cost - } - revoke_cost = { - prestige = change_succession_law_prestige_cost - } - } - - equal_law = { - can_title_have = { - can_title_have_law_general_trigger = yes - } - should_show_for_title = { # Never show this in the UI, just apply it through script - always = no - } - can_keep = { - trigger_if = { - limit = { - top_liege != this - government_allows = administrative - } - top_liege = { has_realm_law = equal_law } - } - trigger_else = { - custom_tooltip = { - text = equal_law_culture_faith_or_innovation_trigger - OR = { - culture = { has_cultural_parameter = gender_equal_inheritance } - #culture = { has_innovation = innovation_visigothic_codes } - faith = { has_doctrine = doctrine_gender_equal } - AND = { #Culture is female dominated but religion is male dominated - faith = { has_doctrine = doctrine_gender_male_dominated } - culture = { has_cultural_parameter = female_only_inheritance } - } - AND = { #Culture is male dominated but faith is female dominated - faith = { has_doctrine = doctrine_gender_female_dominated } - NOT = { culture = { has_cultural_parameter = female_only_inheritance } } - } - primary_title.var:can_keep_realm_law ?= flag:equal_law - } - } - } - } - can_pass = { - #can_change_to_equal_succession_law_trigger = yes - can_change_succession_law_trigger = yes - } - should_start_with = { - trigger_if = { - limit = { - top_liege != this - government_allows = administrative - } - top_liege = { has_realm_law = equal_law } - } - trigger_else = { - NOR = { - culture = { has_cultural_parameter = female_preference_inheritance } - culture = { has_cultural_tradition = tradition_nubian_warrior_queens } - } - faith = { - has_doctrine = doctrine_gender_equal - } - NOT = { has_realm_law = female_only_law } # For when female_only_law ceases to be valid - } - } - succession = { - gender_law = equal - } - flag = men_can_have_multiple_spouses - flag = men_can_have_consorts - flag = women_can_have_multiple_spouses - flag = women_can_have_consorts - - pass_cost = { - prestige = change_succession_law_prestige_cost - } - revoke_cost = { - prestige = change_succession_law_prestige_cost - } - - ai_will_do = { - if = { - limit = { - exists = primary_title - primary_title.tier > tier_county - faith = { - NOT = { - has_dominant_ruling_gender = prev - } - } - } - value = 2 - } - } - } - - female_preference_law = { - can_title_have = { - can_title_have_law_general_trigger = yes - } - should_show_for_title = { # Never show this in the UI, just apply it through script - always = no - } - can_keep = { - trigger_if = { - limit = { - top_liege != this - government_allows = administrative - } - top_liege = { has_realm_law = female_preference_law } - } - trigger_else = { - custom_description = { - text = change_law_female_preference_faith_requirement - faith = { - NOT = { has_doctrine = doctrine_gender_male_dominated } - } - } - custom_tooltip = { - text = female_preference_law_faith_or_culture_trigger - OR = { - faith = { has_doctrine = doctrine_gender_female_dominated } - NOT = { - culture = { has_cultural_parameter = male_only_inheritance } - } - } - } - } - } - should_start_with = { - trigger_if = { - limit = { - top_liege != this - government_allows = administrative - } - top_liege = { has_realm_law = female_preference_law } - } - trigger_else = { - OR = { - culture = { has_cultural_parameter = female_preference_inheritance } - faith = { - has_doctrine = doctrine_gender_female_dominated - } - has_realm_law = female_only_law # For when male_only_law ceases to be a legal option - } - } - } - can_pass = { - can_change_succession_law_trigger = yes - } - succession = { - gender_law = female_preference - } - flag = women_can_have_multiple_spouses - flag = women_can_have_consorts - - pass_cost = { - prestige = change_succession_law_prestige_cost - } - revoke_cost = { - prestige = change_succession_law_prestige_cost - } - } - - female_only_law = { - can_title_have = { - can_title_have_law_general_trigger = yes - } - should_show_for_title = { # Never show this in the UI, just apply it through script - always = no - } - can_keep = { - trigger_if = { - limit = { - top_liege != this - government_allows = administrative - } - top_liege = { has_realm_law = female_only_law } - } - trigger_else = { - custom_tooltip = { - text = culture_not_female_only_tt - faith = { has_doctrine = doctrine_gender_female_dominated } - NOT = { - culture = { has_cultural_parameter = male_only_inheritance } - } - } - } - } - can_pass = { - can_change_succession_law_trigger = yes - } - succession = { - gender_law = female_only - } - flag = women_can_have_multiple_spouses - flag = women_can_have_consorts - - pass_cost = { - prestige = change_succession_law_prestige_cost - } - revoke_cost = { - prestige = change_succession_law_prestige_cost - } - - should_start_with = { - trigger_if = { - limit = { - top_liege != this - government_allows = administrative - } - top_liege = { has_realm_law = female_only_law } - } - trigger_else = { - culture = { has_cultural_parameter = female_only_inheritance } - } - } - } -} - -succession_faith = { - same_faith_only_law = { - can_keep = { - should_have_same_faith_succession_trigger = yes - } - can_pass = { - should_have_same_faith_succession_trigger = yes - } - should_start_with = { - should_have_same_faith_succession_trigger = yes - } - succession = { - faith = same_faith - } - } -} - -succession_rel_head = { - same_faith_theocratic_succession_law = { - can_keep = { - faith = { - religious_head = root - has_doctrine = doctrine_spiritual_head - } - } - succession = { - order_of_succession = theocratic - faith = same_faith - pool_character_config = pool_theocratic_succession - } - } - same_faith_succession_law = { - shown_in_encyclopedia = no - can_keep = { - faith = { - religious_head = root - has_doctrine = doctrine_temporal_head - } - } - succession = { - faith = same_faith - } - } -} diff --git a/N3OW/common/laws/01_title_succession_laws.txt b/N3OW/common/laws/01_title_succession_laws.txt index 4c6b3c62..90dda5af 100644 --- a/N3OW/common/laws/01_title_succession_laws.txt +++ b/N3OW/common/laws/01_title_succession_laws.txt @@ -16,8 +16,6 @@ can_title_have = { can_title_have_law_general_trigger = yes } - should_start_with = { - } succession = { order_of_succession = election election_type = feudal_elective diff --git a/N3OW/common/laws/02_admininistrative_laws.txt b/N3OW/common/laws/02_admininistrative_laws.txt deleted file mode 100644 index 9e5a034e..00000000 --- a/N3OW/common/laws/02_admininistrative_laws.txt +++ /dev/null @@ -1,3428 +0,0 @@ -##################### -# ADMINISTRATIVE LAWS -##################### -@admin_law_cooldown_value = 5 - -# ADMINISTRATIVE GOVERNMENT -province_war_law = { - default = province_war_law_0 - cumulative = yes - flag = admin_law - - province_war_law_0 = { - modifier = { - } - flag = uses_imperial_bureaucracy - - can_keep = { - realm_law_use_imperial_bureaucracy = yes - trigger_if = { - limit = { - top_liege != this - } - liege = { has_realm_law = province_war_law_0 } - } - } - - can_pass = { - trigger_if = { - limit = { - top_liege != this - liege = { has_realm_law = province_war_law_0 } - } - custom_tooltip = { - text = imperial_bureaucracy_pending_law_change - always = no - } - } - } - - on_pass = { - ## Set cooldown - set_variable = { - name = admin_law_cooldown - years = @admin_law_cooldown_value - } - } - } - - province_war_law_1 = { - modifier = { - } - flag = uses_imperial_bureaucracy - flag = admin_vassal_wars_restricted - - can_keep = { - realm_law_use_imperial_bureaucracy = yes - trigger_if = { - limit = { - top_liege = this - } - custom_tooltip = { - text = have_bureaucracy_1_or_higher - OR = { - has_realm_law = imperial_bureaucracy_1 - has_realm_law = imperial_bureaucracy_2 - has_realm_law = imperial_bureaucracy_3 - } - } - } - trigger_if = { - limit = { - top_liege != this - } - liege = { has_realm_law = province_war_law_1 } - } - } - - can_pass = { - trigger_if = { - limit = { - top_liege = this - } - custom_tooltip = { - text = admin_law_cooldown_desc - NOT = { has_variable = admin_law_cooldown } - } - } - trigger_if = { - limit = { - top_liege != this - liege = { has_realm_law = province_war_law_1 } - } - custom_tooltip = { - text = imperial_bureaucracy_pending_law_change - always = no - } - } - } - - pass_cost = { - prestige = { - add = admin_law_prestige_cost - } - } - - on_pass = { - ## Set cooldown - set_variable = { - name = admin_law_cooldown - years = @admin_law_cooldown_value - } - } - - ai_will_do = { - if = { - limit = { - ai_has_warlike_personality = yes - } - value = 1 - } - if = { - limit = { - has_realm_law = province_war_law_0 - ai_has_economical_boom_personality = yes - } - value = 1 - } - } - } - - province_war_law_2 = { - modifier = { - } - flag = uses_imperial_bureaucracy - flag = admin_vassal_wars_permission_only - - can_keep = { - realm_law_use_imperial_bureaucracy = yes - trigger_if = { - limit = { - top_liege = this - } - custom_tooltip = { - text = have_bureaucracy_2_or_higher - OR = { - has_realm_law = imperial_bureaucracy_2 - has_realm_law = imperial_bureaucracy_3 - } - } - } - trigger_if = { - limit = { - top_liege != this - } - liege = { has_realm_law = province_war_law_2 } - } - } - - can_pass = { - trigger_if = { - limit = { - top_liege = this - } - custom_tooltip = { - text = admin_law_cooldown_desc - NOT = { has_variable = admin_law_cooldown } - } - } - trigger_if = { - limit = { - top_liege != this - liege = { has_realm_law = province_war_law_2 } - } - custom_tooltip = { - text = imperial_bureaucracy_pending_law_change - always = no - } - } - } - - pass_cost = { - prestige = { - add = admin_law_prestige_cost - } - } - - on_pass = { - ## Set cooldown - set_variable = { - name = admin_law_cooldown - years = @admin_law_cooldown_value - } - } - - ai_will_do = { - if = { - limit = { - has_realm_law = province_war_law_1 - ai_has_builder_or_pious_builder_personality = yes - } - value = 1 - } - } - } - - province_war_law_3 = { - modifier = { - } - flag = uses_imperial_bureaucracy - flag = admin_vassal_wars_banned - - can_keep = { - realm_law_use_imperial_bureaucracy = yes - trigger_if = { - limit = { - top_liege = this - } - custom_tooltip = { - text = have_bureaucracy_3 - has_realm_law = imperial_bureaucracy_3 - } - } - trigger_if = { - limit = { - top_liege != this - } - liege = { has_realm_law = province_war_law_3 } - } - } - - can_pass = { - trigger_if = { - limit = { - top_liege = this - } - custom_tooltip = { - text = admin_law_cooldown_desc - NOT = { has_variable = admin_law_cooldown } - } - } - trigger_if = { - limit = { - top_liege != this - liege = { has_realm_law = province_war_law_3 } - } - custom_tooltip = { - text = imperial_bureaucracy_pending_law_change - always = no - } - } - } - - pass_cost = { - prestige = { - add = admin_law_prestige_cost - } - } - - on_pass = { - ## Set cooldown - set_variable = { - name = admin_law_cooldown - years = @admin_law_cooldown_value - } - } - - ai_will_do = { - if = { - limit = { - has_realm_law = province_war_law_2 - ai_has_pious_builder_personality = yes - } - value = 1 - } - } - } -} - -province_border_law = { - default = province_border_law_0 - cumulative = no - flag = admin_law - - province_border_law_0 = { - modifier = { - } - flag = uses_imperial_bureaucracy - - can_keep = { - realm_law_use_imperial_bureaucracy = yes - trigger_if = { - limit = { - top_liege != this - } - liege = { has_realm_law = province_border_law_0 } - } - } - - can_pass = { - trigger_if = { - limit = { - top_liege != this - liege = { has_realm_law = province_border_law_0 } - } - custom_tooltip = { - text = imperial_bureaucracy_pending_law_change - always = no - } - } - } - - on_pass = { - ## Set cooldown - set_variable = { - name = admin_law_cooldown - years = @admin_law_cooldown_value - } - } - - ai_will_do = { - value = 1 - } - } - - province_border_law_1 = { - modifier = { - administrative_government_vassal_opinion = -5 - } - flag = uses_imperial_bureaucracy - flag = admin_vassal_border_restricted - - can_keep = { - realm_law_use_imperial_bureaucracy = yes - trigger_if = { - limit = { - top_liege = this - realm_law_use_imperial_bureaucracy = yes - } - custom_tooltip = { - text = have_bureaucracy_2_or_higher - OR = { - has_realm_law = imperial_bureaucracy_2 - has_realm_law = imperial_bureaucracy_3 - } - } - } - trigger_if = { - limit = { - top_liege = this - realm_law_use_celestial_bureaucracy = yes - } - custom_tooltip = { - text = have_celestial_bureaucracy_2_or_higher - OR = { - has_realm_law = celestial_bureaucracy_2 - has_realm_law = celestial_bureaucracy_3 - } - } - } - trigger_if = { - limit = { - top_liege != this - } - liege = { has_realm_law = province_border_law_1 } - } - } - - can_pass = { - trigger_if = { - limit = { - top_liege = this - } - custom_tooltip = { - text = admin_law_cooldown_desc - NOT = { has_variable = admin_law_cooldown } - } - } - trigger_if = { - limit = { - top_liege != this - liege = { has_realm_law = province_border_law_1 } - } - custom_tooltip = { - text = imperial_bureaucracy_pending_law_change - always = no - } - } - } - - pass_cost = { - prestige = { - add = admin_law_prestige_cost - } - } - - on_pass = { - ## Set cooldown - set_variable = { - name = admin_law_cooldown - years = @admin_law_cooldown_value - } - } - - ai_will_do = { - value = 0 - if = { - limit = { - OR = { - ai_has_cautious_personality = yes - ai_has_economical_boom_personality = yes - } - } - add = 2 - } - } - } - - province_border_law_2 = { - modifier = { - administrative_government_vassal_opinion = -10 - } - flag = uses_imperial_bureaucracy - flag = admin_vassal_border_limit - - can_keep = { - realm_law_use_imperial_bureaucracy = yes - trigger_if = { - limit = { - top_liege = this - realm_law_use_imperial_bureaucracy = yes - } - custom_tooltip = { - text = have_bureaucracy_3 - has_realm_law = imperial_bureaucracy_3 - } - } - trigger_if = { - limit = { - top_liege = this - realm_law_use_celestial_bureaucracy = yes - } - custom_tooltip = { - text = have_celestial_bureaucracy_3 - has_realm_law = celestial_bureaucracy_3 - } - } - trigger_if = { - limit = { - top_liege != this - } - liege = { has_realm_law = province_border_law_2 } - } - } - - can_pass = { - trigger_if = { - limit = { - top_liege = this - } - custom_tooltip = { - text = admin_law_cooldown_desc - NOT = { has_variable = admin_law_cooldown } - } - } - trigger_if = { - limit = { - top_liege != this - liege = { has_realm_law = province_border_law_2 } - } - custom_tooltip = { - text = imperial_bureaucracy_pending_law_change - always = no - } - } - } - - pass_cost = { - prestige = { - add = admin_law_prestige_cost - } - } - - on_pass = { - ## Set cooldown - set_variable = { - name = admin_law_cooldown - years = @admin_law_cooldown_value - } - } - - ai_will_do = { - value = 0 - } - } -} - -# CELESTIAL GOVERNMENT -celestial_army_liege_law = { - # NOTE: This law is mirrored by `celestial_army_vassal_law`! - # The top-liege has `celestial_army_liege_law` and all vassals have the `celestial_army_vassal_law` at the same level. - - default = celestial_army_liege_law_0 - cumulative = no - flag = admin_law - - celestial_army_liege_law_0 = { - modifier = { - celestial_government_tax_contribution_add = -0.05 - } - - can_keep = { - realm_law_use_celestial_bureaucracy = yes - is_independent_ruler = yes - } - - can_pass = { - custom_tooltip = { - text = admin_law_cooldown_desc - NOT = { has_variable = admin_law_cooldown } - } - } - - on_pass = { - ## Set cooldown - set_variable = { - name = admin_law_cooldown - years = @admin_law_cooldown_value - } - } - - ai_will_do = { - value = 0 - if = { - limit = { - NOR = { # Rulers should keep any higher levels - has_realm_law = celestial_army_liege_law_1 - has_realm_law = celestial_army_liege_law_2 - has_realm_law = celestial_army_liege_law_3 - } - } - add = 1 - } - } - } - - celestial_army_liege_law_1 = { - modifier = { - celestial_government_vassal_opinion = -5 - men_at_arms_title_cap = 1 - } - flag = admin_title_troop_cost_reduction - - can_keep = { - realm_law_use_celestial_bureaucracy = yes - is_independent_ruler = yes - custom_tooltip = { - text = have_celestial_bureaucracy_1_or_higher - OR = { - has_realm_law = celestial_bureaucracy_1 - has_realm_law = celestial_bureaucracy_2 - has_realm_law = celestial_bureaucracy_3 - } - } - } - - can_pass = { - is_independent_ruler = yes - custom_tooltip = { - text = admin_law_cooldown_desc - NOT = { has_variable = admin_law_cooldown } - } - } - - pass_cost = { - prestige = { - add = admin_law_prestige_cost - } - } - - on_pass = { - ## Set cooldown - set_variable = { - name = admin_law_cooldown - years = @admin_law_cooldown_value - } - } - - ai_will_do = { - value = 0 - if = { - limit = { - NOR = { # Rulers should keep any higher levels - has_realm_law = celestial_army_liege_law_2 - has_realm_law = celestial_army_liege_law_3 - } - OR = { - ai_has_cautious_personality = yes - ai_has_warlike_personality = yes - } - } - add = 2 - } - } - } - - celestial_army_liege_law_2 = { - modifier = { - celestial_government_vassal_opinion = -10 - } - flag = admin_title_troop_cost_reduction_high - - can_keep = { - realm_law_use_celestial_bureaucracy = yes - is_independent_ruler = yes - custom_tooltip = { - text = have_celestial_bureaucracy_2_or_higher - OR = { - has_realm_law = celestial_bureaucracy_2 - has_realm_law = celestial_bureaucracy_3 - } - } - } - - can_pass = { - is_independent_ruler = yes - custom_tooltip = { - text = admin_law_cooldown_desc - NOT = { has_variable = admin_law_cooldown } - } - } - - pass_cost = { - prestige = { - add = admin_law_prestige_cost - } - } - - on_pass = { - ## Set cooldown - set_variable = { - name = admin_law_cooldown - years = @admin_law_cooldown_value - } - } - - ai_will_do = { - value = 0 - if = { - limit = { - NOT = { # Rulers should keep any higher levels - has_realm_law = celestial_army_liege_law_3 - } - OR = { # AI should want this if warlike, or if in the expansion phase, regardless of personality - ai_has_warlike_personality = yes - situation:dynastic_cycle ?= { - situation_current_phase = situation_dynastic_cycle_phase_stability_expansion - } - } - } - add = 3 - } - } - } - - celestial_army_liege_law_3 = { - modifier = { - celestial_government_vassal_opinion = -15 - men_at_arms_title_cap = 2 - } - flag = admin_title_troop_cost_reduction_very_high - - can_keep = { - realm_law_use_celestial_bureaucracy = yes - is_independent_ruler = yes - custom_tooltip = { - text = have_celestial_bureaucracy_3 - has_realm_law = celestial_bureaucracy_3 - } - trigger_if = { - limit = { - this = title:h_china.holder - } - situation:dynastic_cycle ?= { - situation_current_phase = situation_dynastic_cycle_phase_stability_expansion - } - } - } - - can_pass = { - is_independent_ruler = yes - custom_tooltip = { - text = admin_law_cooldown_desc - NOT = { has_variable = admin_law_cooldown } - } - } - - pass_cost = { - prestige = { - add = admin_law_prestige_cost - } - } - - on_pass = { - ## Set cooldown - set_variable = { - name = admin_law_cooldown - years = @admin_law_cooldown_value - } - } - - ai_will_do = { - value = 0 - if = { - limit = { - ai_has_warlike_personality = yes - } - add = 4 - } - } - } -} - -celestial_army_vassal_law = { - default = celestial_army_vassal_law_0 - cumulative = no - flag = admin_law - - celestial_army_vassal_law_0 = { - modifier = { - celestial_government_tax_contribution_add = -0.05 - men_at_arms_cap = 2 - } - - can_keep = { - realm_law_use_celestial_bureaucracy = yes - is_independent_ruler = no - trigger_if = { - limit = { - liege = { is_independent_ruler = yes } - } - liege = { has_realm_law = celestial_army_liege_law_0 } - } - trigger_else = { - liege = { has_realm_law = celestial_army_vassal_law_0 } - } - } - - can_pass = { - trigger_if = { - limit = { - liege = { - OR = { - has_realm_law = celestial_army_liege_law_0 - has_realm_law = celestial_army_vassal_law_0 - } - } - } - custom_tooltip = { - text = imperial_bureaucracy_pending_law_change - always = no - } - } - } - - on_pass = { - ## Set cooldown - set_variable = { - name = admin_law_cooldown - years = @admin_law_cooldown_value - } - } - - ai_will_do = { - value = 0 - } - } - - celestial_army_vassal_law_1 = { - modifier = { - men_at_arms_cap = -2 - men_at_arms_title_cap = 1 - } - - can_keep = { - realm_law_use_celestial_bureaucracy = yes - is_independent_ruler = no - trigger_if = { - limit = { - liege = { is_independent_ruler = yes } - } - liege = { has_realm_law = celestial_army_liege_law_1 } - } - trigger_else = { - liege = { has_realm_law = celestial_army_vassal_law_1 } - } - } - - can_pass = { - trigger_if = { - limit = { - liege = { - OR = { - has_realm_law = celestial_army_liege_law_1 - has_realm_law = celestial_army_vassal_law_1 - } - } - } - custom_tooltip = { - text = imperial_bureaucracy_pending_law_change - always = no - } - } - } - - pass_cost = { - prestige = { - add = admin_law_prestige_cost - } - } - - on_pass = { - ## Set cooldown - set_variable = { - name = admin_law_cooldown - years = @admin_law_cooldown_value - } - } - - ai_will_do = { - value = 0 - } - } - - celestial_army_vassal_law_2 = { - modifier = { - men_at_arms_cap = -20 - men_at_arms_title_cap = 2 - } - - can_keep = { - realm_law_use_celestial_bureaucracy = yes - is_independent_ruler = no - trigger_if = { - limit = { - liege = { is_independent_ruler = yes } - } - liege = { has_realm_law = celestial_army_liege_law_2 } - } - trigger_else = { - liege = { has_realm_law = celestial_army_vassal_law_2 } - } - } - - can_pass = { - trigger_if = { - limit = { - liege = { - OR = { - has_realm_law = celestial_army_liege_law_2 - has_realm_law = celestial_army_vassal_law_2 - } - } - } - custom_tooltip = { - text = imperial_bureaucracy_pending_law_change - always = no - } - } - } - - pass_cost = { - prestige = { - add = admin_law_prestige_cost - } - } - - on_pass = { - ## Set cooldown - set_variable = { - name = admin_law_cooldown - years = @admin_law_cooldown_value - } - } - - ai_will_do = { - value = 0 - } - } - - celestial_army_vassal_law_3 = { - modifier = { - men_at_arms_cap = -20 - men_at_arms_title_cap = 4 - } - - can_keep = { - realm_law_use_celestial_bureaucracy = yes - is_independent_ruler = no - trigger_if = { - limit = { - liege = { is_independent_ruler = yes } - } - liege = { has_realm_law = celestial_army_liege_law_3 } - } - trigger_else = { - liege = { has_realm_law = celestial_army_vassal_law_3 } - } - } - - can_pass = { - trigger_if = { - limit = { - liege = { - OR = { - has_realm_law = celestial_army_liege_law_3 - has_realm_law = celestial_army_vassal_law_3 - } - } - } - custom_tooltip = { - text = imperial_bureaucracy_pending_law_change - always = no - } - } - } - - pass_cost = { - prestige = { - add = admin_law_prestige_cost - } - } - - on_pass = { - ## Set cooldown - set_variable = { - name = admin_law_cooldown - years = @admin_law_cooldown_value - } - } - - ai_will_do = { - value = 0 - } - } -} - -celestial_retirement_law = { - default = celestial_retirement_law_5 - cumulative = no - flag = admin_law - - celestial_retirement_law_0 = { - flag = celestial_retirement_age_0 - flag = celestial_retirement_law - - can_keep = { - realm_law_use_celestial_bureaucracy = yes - trigger_if = { - limit = { - top_liege = this - } - custom_tooltip = { - text = have_celestial_bureaucracy_1_or_higher - NOT = { realm_law_group_at_minimum_level = celestial_bureaucracy } - } - } - trigger_if = { - limit = { - top_liege != this - } - liege = { has_realm_law = celestial_retirement_law_0 } - } - } - - can_pass = { - trigger_if = { - limit = { - top_liege = this - } - custom_tooltip = { - text = admin_law_cooldown_desc - NOT = { has_variable = admin_law_cooldown } - } - } - trigger_if = { - limit = { - top_liege != this - liege = { has_realm_law = province_border_law_1 } - } - custom_tooltip = { - text = imperial_bureaucracy_pending_law_change - always = no - } - } - } - - pass_cost = { - prestige = { - add = admin_law_prestige_cost - } - } - - on_pass = { - ## Set cooldown - set_variable = { - name = admin_law_cooldown - years = @admin_law_cooldown_value - } - } - - ai_will_do = { - value = 0 - } - } - - celestial_retirement_law_1 = { - flag = celestial_retirement_age_1 - flag = celestial_retirement_law - - can_keep = { - realm_law_use_celestial_bureaucracy = yes - trigger_if = { - limit = { - top_liege = this - } - custom_tooltip = { - text = have_celestial_bureaucracy_1_or_higher - NOT = { realm_law_group_at_minimum_level = celestial_bureaucracy } - } - } - trigger_if = { - limit = { - top_liege != this - } - liege = { has_realm_law = celestial_retirement_law_1 } - } - } - - can_pass = { - trigger_if = { - limit = { - top_liege = this - } - custom_tooltip = { - text = admin_law_cooldown_desc - NOT = { has_variable = admin_law_cooldown } - } - } - trigger_if = { - limit = { - top_liege != this - liege = { has_realm_law = celestial_retirement_law_1 } - } - custom_tooltip = { - text = imperial_bureaucracy_pending_law_change - always = no - } - } - } - - pass_cost = { - prestige = { - add = admin_law_prestige_cost - } - } - - on_pass = { - ## Set cooldown - set_variable = { - name = admin_law_cooldown - years = @admin_law_cooldown_value - } - } - - ai_will_do = { - value = 0 - } - } - - celestial_retirement_law_2 = { - flag = celestial_retirement_age_2 - flag = celestial_retirement_law - - can_keep = { - realm_law_use_celestial_bureaucracy = yes - trigger_if = { - limit = { - top_liege = this - } - custom_tooltip = { - text = have_celestial_bureaucracy_1_or_higher - NOT = { realm_law_group_at_minimum_level = celestial_bureaucracy } - } - } - trigger_if = { - limit = { - top_liege != this - } - liege = { has_realm_law = celestial_retirement_law_2 } - } - } - - can_pass = { - trigger_if = { - limit = { - top_liege = this - } - custom_tooltip = { - text = admin_law_cooldown_desc - NOT = { has_variable = admin_law_cooldown } - } - } - trigger_if = { - limit = { - top_liege != this - liege = { has_realm_law = celestial_retirement_law_2 } - } - custom_tooltip = { - text = imperial_bureaucracy_pending_law_change - always = no - } - } - } - - pass_cost = { - prestige = { - add = admin_law_prestige_cost - } - } - - on_pass = { - ## Set cooldown - set_variable = { - name = admin_law_cooldown - years = @admin_law_cooldown_value - } - } - - ai_will_do = { - value = 0 - } - } - - celestial_retirement_law_3 = { - flag = celestial_retirement_age_3 - flag = celestial_retirement_law - - can_keep = { - realm_law_use_celestial_bureaucracy = yes - trigger_if = { - limit = { - top_liege = this - } - custom_tooltip = { - text = have_celestial_bureaucracy_1_or_higher - NOT = { realm_law_group_at_minimum_level = celestial_bureaucracy } - } - } - trigger_if = { - limit = { - top_liege != this - } - liege = { has_realm_law = celestial_retirement_law_3 } - } - } - - can_pass = { - trigger_if = { - limit = { - top_liege = this - } - custom_tooltip = { - text = admin_law_cooldown_desc - NOT = { has_variable = admin_law_cooldown } - } - } - trigger_if = { - limit = { - top_liege != this - liege = { has_realm_law = celestial_retirement_law_3 } - } - custom_tooltip = { - text = imperial_bureaucracy_pending_law_change - always = no - } - } - } - - pass_cost = { - prestige = { - add = admin_law_prestige_cost - } - } - - on_pass = { - ## Set cooldown - set_variable = { - name = admin_law_cooldown - years = @admin_law_cooldown_value - } - } - - ai_will_do = { - value = 0 - } - } - - celestial_retirement_law_4 = { - flag = celestial_retirement_age_4 - flag = celestial_retirement_law - - can_keep = { - realm_law_use_celestial_bureaucracy = yes - trigger_if = { - limit = { - top_liege = this - } - custom_tooltip = { - text = have_celestial_bureaucracy_1_or_higher - NOT = { realm_law_group_at_minimum_level = celestial_bureaucracy } - } - } - trigger_if = { - limit = { - top_liege != this - } - liege = { has_realm_law = celestial_retirement_law_4 } - } - } - - can_pass = { - trigger_if = { - limit = { - top_liege = this - } - custom_tooltip = { - text = admin_law_cooldown_desc - NOT = { has_variable = admin_law_cooldown } - } - } - trigger_if = { - limit = { - top_liege != this - liege = { has_realm_law = celestial_retirement_law_4 } - } - custom_tooltip = { - text = imperial_bureaucracy_pending_law_change - always = no - } - } - } - - pass_cost = { - prestige = { - add = admin_law_prestige_cost - } - } - - on_pass = { - ## Set cooldown - set_variable = { - name = admin_law_cooldown - years = @admin_law_cooldown_value - } - } - - ai_will_do = { - value = 0 - } - } - - celestial_retirement_law_5 = { - flag = celestial_retirement_age_5 - flag = celestial_retirement_law - - can_keep = { - realm_law_use_celestial_bureaucracy = yes - trigger_if = { - limit = { - top_liege != this - } - liege = { has_realm_law = celestial_retirement_law_5 } - } - } - - can_pass = { - trigger_if = { - limit = { - top_liege != this - liege = { has_realm_law = celestial_retirement_law_5 } - } - custom_tooltip = { - text = imperial_bureaucracy_pending_law_change - always = no - } - } - } - - on_pass = { - ## Set cooldown - set_variable = { - name = admin_law_cooldown - years = @admin_law_cooldown_value - } - } - - ai_will_do = { - value = 0 - } - } -} - -# BORDER WARS -border_wars_laws = { - default = top_liege_redirected_to_border_wars_law - cumulative = no - flag = imperial_policy - - top_liege_redirected_to_border_wars_law = { - flag = top_liege_redirected_to_border_wars_law - - can_keep = { - is_landed = yes - highest_held_title_tier >= tier_duchy - #Empire or lower tier - highest_held_title_tier < tier_hegemony - #Small realm size - sub_realm_size < border_war_sized_realm_value - #Not an antagonitsic house - house ?= { - NOT = { has_house_unity_stage = antagonistic } - } - #Not defending in any civil wars - NOT = { - any_character_war = { - primary_defender = root - using_civil_war_cb_trigger = yes - } - } - } - - on_pass = { - primary_title = { - set_vassal_wars_are_redirected_to_holder = yes - } - } - - ai_will_do = { - value = 0 - } - } - - top_liege_not_redirected_to_border_wars_law = { - flag = top_liege_not_redirected_to_border_wars_law - - can_keep = { - is_independent_ruler = yes - is_landed = yes - highest_held_title_tier >= tier_duchy - custom_description = { - text = border_wars_laws_triggers - value = sub_realm_size - OR = { - #hegemonies - highest_held_title_tier >= tier_hegemony - #any large realm - sub_realm_size >= border_war_sized_realm_value - #antagonistic houses - house ?= { - has_house_unity_stage = antagonistic - } - #defending in a civil war - any_character_war = { - primary_defender = root - using_civil_war_cb_trigger = yes - } - } - } - } - - on_pass = { - primary_title = { - set_vassal_wars_are_redirected_to_holder = no - } - } - should_start_with = { - OR = { - #hegemonies - highest_held_title_tier >= tier_hegemony - #any large realm - sub_realm_size >= border_war_sized_realm_value - #antagonistic houses - house ?= { - has_house_unity_stage = antagonistic - } - #defending in a civil war - any_character_war = { - primary_defender = root - using_civil_war_cb_trigger = yes - } - } - } - ai_will_do = { - value = 0 - } - } -} - -# REGENCY -grand_secretariat_laws = { - default = grand_chancellor_law - cumulative = no - flag = imperial_policy - - grand_chancellor_law = { - flag = grand_chancellor_law - can_have = { - has_title = title:h_china - government_has_flag = government_is_celestial - } - can_pass = { - exists = title:e_minister_chancellor.holder - OR = { - situation:dynastic_cycle ?= { - situation_current_phase = situation_dynastic_cycle_phase_stability_advancement - } - is_movement_in_power = { - MOVEMENT = advancement_movement - } - } - custom_tooltip = { - text = admin_law_cooldown_desc - NOT = { has_variable = admin_law_cooldown } - } - } - - on_pass = { - hidden_effect = { - designate_diarch = title:e_minister_chancellor.holder - diarch = { - depose_diarch = yes - } - } - ## Set cooldown - set_variable = { - name = admin_law_cooldown - years = @admin_law_cooldown_value - } - } - - ai_will_do = { - value = 10 - if = { - limit = { - is_movement_in_power = { - MOVEMENT = advancement_movement - } - } - add = 1 - } - if = { - limit = { - situation:dynastic_cycle ?= { - situation_current_phase = situation_dynastic_cycle_phase_stability_expansion - } - } - add = -10 - } - if = { - limit = { - title:e_minister_grand_marshal.holder = { - is_ai = no - NOT = { has_court_position = favored_minister_court_position } - } - } - add = 20 - } - if = { - limit = { - diarch = { - has_variable = asked_to_be_secretary_director - } - } - add = -1000 - } - } - } - - grand_marshal_law = { - flag = grand_marshal_law - can_have = { - has_title = title:h_china - government_has_flag = government_is_celestial - } - - can_pass = { - exists = title:e_minister_grand_marshal.holder - situation:dynastic_cycle ?= { - NOR = { - situation_current_phase = situation_dynastic_cycle_phase_stability_advancement - situation_current_phase = situation_dynastic_cycle_phase_instability - } - situation_participant_group:expansion_movement ?= { - save_temporary_scope_as = my_movement - - custom_tooltip = { - text = my_movement_is_not_in_power - exists = var:movement_favored - } - } - } - custom_tooltip = { - text = admin_law_cooldown_desc - NOT = { has_variable = admin_law_cooldown } - } - } - - on_pass = { - hidden_effect = { - designate_diarch = title:e_minister_grand_marshal.holder - diarch = { - depose_diarch = yes - } - } - ## Set cooldown - set_variable = { - name = admin_law_cooldown - years = @admin_law_cooldown_value - } - } - - ai_will_do = { - value = -2 - if = { - limit = { - is_movement_in_power = { - MOVEMENT = expansion_movement - } - } - add = 1 - } - if = { - limit = { - title:e_minister_chancellor.holder ?= { - is_ai = no - NOT = { has_court_position = favored_minister_court_position } - } - } - add = 20 - } - if = { - limit = { - exists = title:e_minister_grand_marshal.holder - title:e_minister_grand_marshal.holder.merit_level >= root.diarch.merit_level - title:e_minister_grand_marshal.holder.merit >= root.diarch.merit - } - add = 1 - } - if = { - limit = { - exists = root.diarch.var:movement_power - exists = var:movement_power - } - if = { - limit = { - var:movement_power >= root.diarch.var:movement_power - } - add = 1 - } - else = { - add = -1 - } - } - if = { - limit = { - diarch = { - has_variable = asked_to_be_secretary_director - } - } - add = -1000 - } - } - } - - grand_censor_law = { - flag = grand_censor_law - can_have = { - has_title = title:h_china - government_has_flag = government_is_celestial - } - - can_pass = { - exists = title:e_minister_censor.holder - situation:dynastic_cycle ?= { - NOR = { - situation_current_phase = situation_dynastic_cycle_phase_stability_expansion - situation_current_phase = situation_dynastic_cycle_phase_stability_advancement - } - } - situation:dynastic_cycle.situation_participant_group:conservative_movement ?= { - save_temporary_scope_as = my_movement - - custom_tooltip = { - text = my_movement_is_not_in_power - exists = var:movement_favored - } - } - custom_tooltip = { - text = admin_law_cooldown_desc - NOT = { has_variable = admin_law_cooldown } - } - } - - on_pass = { - hidden_effect = { - designate_diarch = title:e_minister_censor.holder - diarch = { - depose_diarch = yes - } - } - ## Set cooldown - set_variable = { - name = admin_law_cooldown - years = @admin_law_cooldown_value - } - } - - ai_will_do = { - value = -2 - if = { - limit = { - is_movement_in_power = { - MOVEMENT = conservative_movement - } - } - add = 1 - } - if = { - limit = { - title:e_minister_chancellor.holder = { - is_ai = no - NOT = { has_court_position = favored_minister_court_position } - } - } - add = 20 - } - if = { - limit = { - exists = title:e_minister_censor.holder - title:e_minister_censor.holder.merit_level >= root.diarch.merit_level - title:e_minister_censor.holder.merit >= root.diarch.merit - } - add = 1 - } - if = { - limit = { - exists = root.diarch.var:movement_power - exists = var:movement_power - } - if = { - limit = { - var:movement_power >= root.diarch.var:movement_power - } - add = 1 - } - else = { - add = -1 - } - } - if = { - limit = { - diarch = { - has_variable = asked_to_be_secretary_director - } - } - add = -1000 - } - } - } -} - -candidate_score_laws = { - default = candidate_score_merit_law - cumulative = no - flag = imperial_policy - - candidate_score_merit_law = { - flag = candidate_score_merit_law - can_have = { - has_title = title:h_china - government_has_flag = government_is_celestial - } - can_pass = { - NOT = { - is_movement_in_power = { - MOVEMENT = conservative_movement - } - } - can_pass_candidate_score_merit_law_trigger = yes - custom_tooltip = { - text = admin_law_cooldown_desc - NOT = { has_variable = admin_law_cooldown } - } - } - - pass_cost = { - influence = 1000 - treasury = { - value = realm_size - multiply = 10 - } - } - - on_pass = { - ## Set cooldown - set_variable = { - name = admin_law_cooldown - years = @admin_law_cooldown_value - } - } - - ai_will_do = { #AI can only do it if convinced through Movement Petition - value = 0 - } - } - - candidate_score_prestige_law = { - flag = candidate_score_prestige_law - can_have = { - has_title = title:h_china - government_has_flag = government_is_celestial - } - - can_pass = { - is_movement_in_power = { - MOVEMENT = conservative_movement - } - can_pass_candidate_score_prestige_law_trigger = yes - custom_tooltip = { - text = admin_law_cooldown_desc - NOT = { has_variable = admin_law_cooldown } - } - } - - pass_cost = { - influence = 1000 - treasury = { - value = realm_size - multiply = 10 - } - } - - on_pass = { - ## Set cooldown - set_variable = { - name = admin_law_cooldown - years = @admin_law_cooldown_value - } - } - - ai_will_do = { #AI can only do it if convinced through Movement Petition - value = 0 - } - } -} - -budget_allocation_salary_law = { - is_treasury_budget_group = yes - - flag = treasury_budget_law - flag = treasury_budget_salary - - default = budget_allocation_salary_30 - - budget_allocation_salary_0 = { - shown_in_encyclopedia = no - - flag = salary_budget_law_major_negative_impact - - can_keep = { - realm_uses_treasury_laws_trigger = yes - is_independent_ruler = yes - } - - modifier = { - treasury_salary_budget_allocation = 0.0 - - vassal_opinion = -30 - vassal_tax_mult = -0.3 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - on_pass = { - add_legitimacy = { - value = treasury_budget_law_change_legitimacy_loss_base - multiply = 4 - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_salary_5 = { - shown_in_encyclopedia = no - - flag = salary_budget_law_major_negative_impact - - can_keep = { - realm_uses_treasury_laws_trigger = yes - is_independent_ruler = yes - } - - modifier = { - treasury_salary_budget_allocation = 0.05 - - vassal_opinion = -25 - vassal_tax_mult = -0.25 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - on_pass = { - add_legitimacy = { - value = treasury_budget_law_change_legitimacy_loss_base - multiply = 4 - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_salary_10 = { - shown_in_encyclopedia = no - - flag = salary_budget_law_major_negative_impact - - can_keep = { - realm_uses_treasury_laws_trigger = yes - is_independent_ruler = yes - } - - modifier = { - treasury_salary_budget_allocation = 0.10 - - vassal_opinion = -20 - vassal_tax_mult = -0.20 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - on_pass = { - add_legitimacy = { - value = treasury_budget_law_change_legitimacy_loss_base - multiply = 3 - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_salary_15 = { - shown_in_encyclopedia = no - - flag = salary_budget_law_major_negative_impact - - can_keep = { - realm_uses_treasury_laws_trigger = yes - is_independent_ruler = yes - } - - modifier = { - treasury_salary_budget_allocation = 0.15 - - vassal_opinion = -15 - vassal_tax_mult = -0.15 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - on_pass = { - add_legitimacy = { - value = treasury_budget_law_change_legitimacy_loss_base - multiply = 2 - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_salary_20 = { - shown_in_encyclopedia = no - - flag = salary_budget_law_major_negative_impact - - can_keep = { - realm_uses_treasury_laws_trigger = yes - is_independent_ruler = yes - } - - modifier = { - treasury_salary_budget_allocation = 0.20 - - vassal_opinion = -10 - vassal_tax_mult = -0.1 - } - - on_pass = { - add_legitimacy = { - value = treasury_budget_law_change_legitimacy_loss_base - multiply = 1 - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_salary_25 = { - shown_in_encyclopedia = no - - flag = salary_budget_law_minor_negative_impact - - can_keep = { - realm_uses_treasury_laws_trigger = yes - is_independent_ruler = yes - } - - modifier = { - treasury_salary_budget_allocation = 0.25 - - vassal_opinion = -5 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_salary_30 = { - shown_in_encyclopedia = no - - can_keep = { - realm_uses_treasury_laws_trigger = yes - is_independent_ruler = yes - } - - should_start_with = { - always = yes - } - - modifier = { - treasury_salary_budget_allocation = 0.30 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_salary_35 = { - shown_in_encyclopedia = no - - can_keep = { - realm_uses_treasury_laws_trigger = yes - is_independent_ruler = yes - } - - modifier = { - treasury_salary_budget_allocation = 0.35 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_salary_40 = { - shown_in_encyclopedia = no - - can_keep = { - realm_uses_treasury_laws_trigger = yes - is_independent_ruler = yes - } - - modifier = { - treasury_salary_budget_allocation = 0.40 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_salary_45 = { - shown_in_encyclopedia = no - - can_keep = { - realm_uses_treasury_laws_trigger = yes - is_independent_ruler = yes - } - - modifier = { - treasury_salary_budget_allocation = 0.45 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_salary_50 = { - shown_in_encyclopedia = no - - can_keep = { - realm_uses_treasury_laws_trigger = yes - is_independent_ruler = yes - } - - modifier = { - treasury_salary_budget_allocation = 0.50 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_salary_55 = { - shown_in_encyclopedia = no - - can_keep = { - realm_uses_treasury_laws_trigger = yes - is_independent_ruler = yes - } - - modifier = { - treasury_salary_budget_allocation = 0.55 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_salary_60 = { - shown_in_encyclopedia = no - - can_keep = { - realm_uses_treasury_laws_trigger = yes - is_independent_ruler = yes - } - - modifier = { - treasury_salary_budget_allocation = 0.60 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_salary_65 = { - shown_in_encyclopedia = no - - can_keep = { - realm_uses_treasury_laws_trigger = yes - is_independent_ruler = yes - } - - modifier = { - treasury_salary_budget_allocation = 0.65 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_salary_70 = { - shown_in_encyclopedia = no - - can_keep = { - realm_uses_treasury_laws_trigger = yes - is_independent_ruler = yes - } - - modifier = { - treasury_salary_budget_allocation = 0.70 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_salary_75 = { - shown_in_encyclopedia = no - - can_keep = { - realm_uses_treasury_laws_trigger = yes - is_independent_ruler = yes - } - - modifier = { - treasury_salary_budget_allocation = 0.75 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_salary_80 = { - shown_in_encyclopedia = no - - can_keep = { - realm_uses_treasury_laws_trigger = yes - is_independent_ruler = yes - } - - modifier = { - treasury_salary_budget_allocation = 0.80 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_salary_85 = { - shown_in_encyclopedia = no - - can_keep = { - realm_uses_treasury_laws_trigger = yes - is_independent_ruler = yes - } - - modifier = { - treasury_salary_budget_allocation = 0.85 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_salary_90 = { - shown_in_encyclopedia = no - - can_keep = { - realm_uses_treasury_laws_trigger = yes - is_independent_ruler = yes - } - - modifier = { - treasury_salary_budget_allocation = 0.90 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_salary_95 = { - shown_in_encyclopedia = no - - can_keep = { - realm_uses_treasury_laws_trigger = yes - is_independent_ruler = yes - } - - modifier = { - treasury_salary_budget_allocation = 0.95 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_salary_100 = { - shown_in_encyclopedia = no - - can_keep = { - realm_uses_treasury_laws_trigger = yes - is_independent_ruler = yes - } - - modifier = { - treasury_salary_budget_allocation = 1.00 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } -} - -budget_allocation_ministry_law = { - is_treasury_budget_group = yes - - flag = treasury_budget_law - flag = treasury_budget_ministry - - default = budget_allocation_ministry_25 - - budget_allocation_ministry_0 = { - shown_in_encyclopedia = no - - flag = ministry_budget_law_major_negative_impact - - can_keep = { - realm_law_use_celestial_bureaucracy = yes - is_independent_ruler = yes - } - - modifier = { - treasury_ministry_budget_allocation = 0 - - vassal_tax_mult = -0.2 - monthly_legitimacy_add = -20 - courtly_opinion = -30 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - on_pass = { - add_legitimacy = { - value = treasury_budget_law_change_legitimacy_loss_base - multiply = 4 - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_ministry_5 = { - shown_in_encyclopedia = no - - flag = ministry_budget_law_major_negative_impact - - can_keep = { - realm_law_use_celestial_bureaucracy = yes - is_independent_ruler = yes - } - - modifier = { - treasury_ministry_budget_allocation = 0.05 - - vassal_tax_mult = -0.15 - monthly_legitimacy_add = -15 - courtly_opinion = -25 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - on_pass = { - add_legitimacy = { - value = treasury_budget_law_change_legitimacy_loss_base - multiply = 4 - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_ministry_10 = { - shown_in_encyclopedia = no - - flag = ministry_budget_law_major_negative_impact - - can_keep = { - realm_law_use_celestial_bureaucracy = yes - is_independent_ruler = yes - } - - modifier = { - treasury_ministry_budget_allocation = 0.10 - - vassal_tax_mult = -0.1 - monthly_legitimacy_add = -10 - courtly_opinion = -20 - } - - on_pass = { - add_legitimacy = { - value = treasury_budget_law_change_legitimacy_loss_base - multiply = 3 - } - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } - - - budget_allocation_ministry_15 = { - shown_in_encyclopedia = no - - flag = ministry_budget_law_major_negative_impact - - can_keep = { - realm_law_use_celestial_bureaucracy = yes - is_independent_ruler = yes - } - - modifier = { - treasury_ministry_budget_allocation = 0.15 - - vassal_tax_mult = -0.05 - monthly_legitimacy_add = -5 - courtly_opinion = -15 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - on_pass = { - add_legitimacy = { - value = treasury_budget_law_change_legitimacy_loss_base - multiply = 1 - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_ministry_20 = { - shown_in_encyclopedia = no - - flag = ministry_budget_law_minor_negative_impact - - can_keep = { - realm_law_use_celestial_bureaucracy = yes - is_independent_ruler = yes - } - - modifier = { - treasury_ministry_budget_allocation = 0.20 - - courtly_opinion = -10 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_ministry_25 = { - shown_in_encyclopedia = no - - can_keep = { - realm_law_use_celestial_bureaucracy = yes - is_independent_ruler = yes - } - - modifier = { - treasury_ministry_budget_allocation = 0.25 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_ministry_30 = { - shown_in_encyclopedia = no - - can_keep = { - realm_law_use_celestial_bureaucracy = yes - is_independent_ruler = yes - } - - ai_will_do = { - value = 0 - } - - should_start_with = { - always = yes - } - - modifier = { - treasury_ministry_budget_allocation = 0.30 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_ministry_35 = { - shown_in_encyclopedia = no - - can_keep = { - realm_law_use_celestial_bureaucracy = yes - is_independent_ruler = yes - } - - modifier = { - treasury_ministry_budget_allocation = 0.35 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_ministry_40 = { - shown_in_encyclopedia = no - - can_keep = { - realm_law_use_celestial_bureaucracy = yes - is_independent_ruler = yes - } - - modifier = { - treasury_ministry_budget_allocation = 0.40 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_ministry_45 = { - shown_in_encyclopedia = no - - can_keep = { - realm_law_use_celestial_bureaucracy = yes - is_independent_ruler = yes - } - - modifier = { - treasury_ministry_budget_allocation = 0.45 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_ministry_50 = { - shown_in_encyclopedia = no - - can_keep = { - realm_law_use_celestial_bureaucracy = yes - is_independent_ruler = yes - } - - modifier = { - treasury_ministry_budget_allocation = 0.50 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_ministry_55 = { - shown_in_encyclopedia = no - - can_keep = { - realm_law_use_celestial_bureaucracy = yes - is_independent_ruler = yes - } - - modifier = { - treasury_ministry_budget_allocation = 0.55 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_ministry_60 = { - shown_in_encyclopedia = no - - can_keep = { - realm_law_use_celestial_bureaucracy = yes - is_independent_ruler = yes - } - - modifier = { - treasury_ministry_budget_allocation = 0.60 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_ministry_65 = { - shown_in_encyclopedia = no - - can_keep = { - realm_law_use_celestial_bureaucracy = yes - is_independent_ruler = yes - } - - modifier = { - treasury_ministry_budget_allocation = 0.65 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_ministry_70 = { - shown_in_encyclopedia = no - - can_keep = { - realm_law_use_celestial_bureaucracy = yes - is_independent_ruler = yes - } - - modifier = { - treasury_ministry_budget_allocation = 0.70 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_ministry_75 = { - shown_in_encyclopedia = no - - can_keep = { - realm_law_use_celestial_bureaucracy = yes - is_independent_ruler = yes - } - - modifier = { - treasury_ministry_budget_allocation = 0.75 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_ministry_80 = { - shown_in_encyclopedia = no - - can_keep = { - realm_law_use_celestial_bureaucracy = yes - is_independent_ruler = yes - } - - modifier = { - treasury_ministry_budget_allocation = 0.80 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_ministry_85 = { - shown_in_encyclopedia = no - - can_keep = { - realm_law_use_celestial_bureaucracy = yes - is_independent_ruler = yes - } - - modifier = { - treasury_ministry_budget_allocation = 0.85 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_ministry_90 = { - shown_in_encyclopedia = no - - can_keep = { - realm_law_use_celestial_bureaucracy = yes - is_independent_ruler = yes - } - - modifier = { - treasury_ministry_budget_allocation = 0.9 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_ministry_95 = { - shown_in_encyclopedia = no - - can_keep = { - realm_law_use_celestial_bureaucracy = yes - is_independent_ruler = yes - } - - modifier = { - treasury_ministry_budget_allocation = 0.95 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_ministry_100 = { - shown_in_encyclopedia = no - - can_keep = { - realm_law_use_celestial_bureaucracy = yes - is_independent_ruler = yes - } - - modifier = { - treasury_ministry_budget_allocation = 1.0 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } -} - -budget_allocation_military_law = { - is_treasury_budget_group = yes - - flag = treasury_budget_law - flag = treasury_budget_military - - default = budget_allocation_military_20 - - budget_allocation_military_0 = { - shown_in_encyclopedia = no - - flag = military_budget_law_major_negative_impact - - can_keep = { - realm_uses_treasury_laws_trigger = yes - is_independent_ruler = yes - } - - modifier = { - treasury_military_budget_allocation = 0 - - glory_hound_opinion = -35 - army_damage_mult = -0.4 - army_toughness_mult = -0.4 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - on_pass = { - add_legitimacy = { - value = treasury_budget_law_change_legitimacy_loss_base - multiply = 4 - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_military_5 = { - shown_in_encyclopedia = no - - flag = military_budget_law_major_negative_impact - - can_keep = { - realm_uses_treasury_laws_trigger = yes - is_independent_ruler = yes - } - - modifier = { - treasury_military_budget_allocation = 0.05 - - glory_hound_opinion = -30 - army_damage_mult = -0.3 - army_toughness_mult = -0.3 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - on_pass = { - add_legitimacy = { - value = treasury_budget_law_change_legitimacy_loss_base - multiply = 2 - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_military_10 = { - shown_in_encyclopedia = no - - flag = military_budget_law_major_negative_impact - - can_keep = { - realm_uses_treasury_laws_trigger = yes - is_independent_ruler = yes - } - - modifier = { - treasury_military_budget_allocation = 0.10 - - glory_hound_opinion = -25 - army_damage_mult = -0.2 - army_toughness_mult = -0.2 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - on_pass = { - add_legitimacy = { - value = treasury_budget_law_change_legitimacy_loss_base - multiply = 1 - } - } - - ai_will_do = { - value = 0 - } - } - - - budget_allocation_military_15 = { - shown_in_encyclopedia = no - - flag = military_budget_law_major_negative_impact - - can_keep = { - realm_uses_treasury_laws_trigger = yes - is_independent_ruler = yes - } - - modifier = { - treasury_military_budget_allocation = 0.15 - - glory_hound_opinion = -20 - army_damage_mult = -0.1 - army_toughness_mult = -0.1 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_military_20 = { - shown_in_encyclopedia = no - - flag = military_budget_law_minor_negative_impact - - can_keep = { - realm_uses_treasury_laws_trigger = yes - is_independent_ruler = yes - } - - should_start_with = { - always = yes - } - - modifier = { - treasury_military_budget_allocation = 0.20 - - glory_hound_opinion = -10 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_military_25 = { - shown_in_encyclopedia = no - - can_keep = { - realm_uses_treasury_laws_trigger = yes - is_independent_ruler = yes - } - - modifier = { - treasury_military_budget_allocation = 0.25 - - glory_hound_opinion = -5 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_military_30 = { - shown_in_encyclopedia = no - - can_keep = { - realm_uses_treasury_laws_trigger = yes - is_independent_ruler = yes - } - - ai_will_do = { - value = 0 - } - - modifier = { - treasury_military_budget_allocation = 0.30 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_military_35 = { - shown_in_encyclopedia = no - - can_keep = { - realm_uses_treasury_laws_trigger = yes - is_independent_ruler = yes - } - - modifier = { - treasury_military_budget_allocation = 0.35 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_military_40 = { - shown_in_encyclopedia = no - - can_keep = { - realm_uses_treasury_laws_trigger = yes - is_independent_ruler = yes - } - - modifier = { - treasury_military_budget_allocation = 0.40 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_military_45 = { - shown_in_encyclopedia = no - - can_keep = { - realm_uses_treasury_laws_trigger = yes - is_independent_ruler = yes - } - - modifier = { - treasury_military_budget_allocation = 0.45 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_military_50 = { - shown_in_encyclopedia = no - - can_keep = { - realm_uses_treasury_laws_trigger = yes - is_independent_ruler = yes - } - - modifier = { - treasury_military_budget_allocation = 0.50 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_military_55 = { - shown_in_encyclopedia = no - - can_keep = { - realm_uses_treasury_laws_trigger = yes - is_independent_ruler = yes - } - - modifier = { - treasury_military_budget_allocation = 0.55 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_military_60 = { - shown_in_encyclopedia = no - - can_keep = { - realm_uses_treasury_laws_trigger = yes - is_independent_ruler = yes - } - - modifier = { - treasury_military_budget_allocation = 0.60 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_military_65 = { - shown_in_encyclopedia = no - - can_keep = { - realm_uses_treasury_laws_trigger = yes - is_independent_ruler = yes - } - - modifier = { - treasury_military_budget_allocation = 0.65 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_military_70 = { - shown_in_encyclopedia = no - - can_keep = { - realm_uses_treasury_laws_trigger = yes - is_independent_ruler = yes - } - - modifier = { - treasury_military_budget_allocation = 0.70 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_military_75 = { - shown_in_encyclopedia = no - - can_keep = { - realm_uses_treasury_laws_trigger = yes - is_independent_ruler = yes - } - - modifier = { - treasury_military_budget_allocation = 0.75 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_military_80 = { - shown_in_encyclopedia = no - - can_keep = { - realm_uses_treasury_laws_trigger = yes - is_independent_ruler = yes - } - - modifier = { - treasury_military_budget_allocation = 0.8 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_military_85 = { - shown_in_encyclopedia = no - - can_keep = { - realm_uses_treasury_laws_trigger = yes - is_independent_ruler = yes - } - - modifier = { - treasury_military_budget_allocation = 0.85 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_military_90 = { - shown_in_encyclopedia = no - - can_keep = { - realm_uses_treasury_laws_trigger = yes - is_independent_ruler = yes - } - - modifier = { - treasury_military_budget_allocation = 0.9 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_military_95 = { - shown_in_encyclopedia = no - - can_keep = { - realm_uses_treasury_laws_trigger = yes - is_independent_ruler = yes - } - - modifier = { - treasury_military_budget_allocation = 0.95 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } - - budget_allocation_military_100 = { - shown_in_encyclopedia = no - - can_keep = { - realm_uses_treasury_laws_trigger = yes - is_independent_ruler = yes - } - - modifier = { - treasury_military_budget_allocation = 1.0 - } - - pass_cost = { - prestige = { - add = change_admin_budget_law_prestige_cost - } - } - - ai_will_do = { - value = 0 - } - } -} diff --git a/N3OW/common/laws/03_imperial_policies.txt b/N3OW/common/laws/03_imperial_policies.txt deleted file mode 100644 index 6ec6c61d..00000000 --- a/N3OW/common/laws/03_imperial_policies.txt +++ /dev/null @@ -1,361 +0,0 @@ -##################### -# IMPERIAL POLICIES # -##################### - -@imperial_policy_laws_cooldown_value = 10 -@imperial_policy_cost_value = 500 - -imperial_policy_laws = { - default = manor_reform_law - cumulative = no - flag = imperial_policy - - defense_mobilization_law = { - flag = defense_mobilization_law - - can_keep = { - realm_law_use_imperial_policy_trigger = yes - trigger_if = { - limit = { is_independent_ruler = no } - liege = { has_realm_law = defense_mobilization_law } - } - } - - can_pass = { - trigger_if = { - limit = { - top_liege = this - } - custom_tooltip = { - text = imperial_policy_laws_cooldown_desc - NOT = { has_variable = imperial_policy_laws_cooldown } - } - } - tgp_japan_defense_mobilization_valid_trigger = yes - } - - on_pass = { - ## Set cooldown - set_variable = { - name = imperial_policy_laws_cooldown - years = @imperial_policy_laws_cooldown_value - } - tgp_imperial_policy_event_effect = yes - } - - modifier = { - same_heritage_county_advantage_add = 5 - men_at_arms_maintenance = -0.15 - fort_level = 1 - hostile_raid_time = 0.15 - } - flag = governors_may_recruit_japanese_horse_archers - flag = cheaper_japanese_domicile_military_buildings - - pass_cost = { - prestige = @imperial_policy_cost_value - } - - ai_will_do = { - value = 250 - } - } - - disarmament_law = { - flag = disarmament_law - flag = vassal_internal_wars_cost_doubled - flag = japan_administrative_can_build_castles - - can_keep = { - realm_law_use_imperial_policy_trigger = yes - trigger_if = { - limit = { is_independent_ruler = no } - liege = { has_realm_law = disarmament_law } - } - } - - can_pass = { - trigger_if = { - limit = { - top_liege = this - } - custom_tooltip = { - text = imperial_policy_laws_cooldown_desc - NOT = { has_variable = imperial_policy_laws_cooldown } - } - } - } - - on_pass = { - ## Set cooldown - set_variable = { - name = imperial_policy_laws_cooldown - years = @imperial_policy_laws_cooldown_value - } - tgp_imperial_policy_event_effect = yes - } - - modifier = { - men_at_arms_recruitment_cost = 0.25 - japan_feudal_government_vassal_opinion = -15 - development_growth_factor = 0.15 - } - - pass_cost = { - prestige = @imperial_policy_cost_value - } - - ai_will_do = { - value = 200 - if = { - limit = { - ai_has_warlike_personality = yes - } - value = -50 - } - if = { - limit = { government_has_flag = government_is_japan_feudal } - add = -1000 - } - } - } - - isolation_law = { - flag = isolation_law - flag = better_physician_treatments - - can_keep = { - realm_law_use_imperial_policy_trigger = yes - trigger_if = { - limit = { is_independent_ruler = no } - liege = { has_realm_law = isolation_law } - } - } - - can_pass = { - trigger_if = { - limit = { - top_liege = this - } - custom_tooltip = { - text = imperial_policy_laws_cooldown_desc - NOT = { has_variable = imperial_policy_laws_cooldown } - } - } - } - - on_pass = { - ## Set cooldown - set_variable = { - name = imperial_policy_laws_cooldown - years = @imperial_policy_laws_cooldown_value - } - tgp_imperial_policy_event_effect = yes - } - - modifier = { - development_growth_factor = -0.15 - epidemic_resistance = 15 - diplomatic_range_mult = -0.15 - } - - pass_cost = { - prestige = @imperial_policy_cost_value - } - - ai_will_do = { - value = 0 - if = { - limit = { - any_realm_county = { - any_county_province = { - any_province_epidemic = { - count >= 1 - outbreak_intensity >= apocalyptic - } - } - } - } - add = 200 - } - } - } - - imperial_expansion_law = { - flag = imperial_expansion_law - flag = cheaper_japanese_domicile_military_buildings - - can_keep = { - realm_law_use_imperial_policy_trigger = yes - trigger_if = { - limit = { is_independent_ruler = no } - liege = { has_realm_law = imperial_expansion_law } - } - } - - can_pass = { - trigger_if = { - limit = { - top_liege = this - } - custom_tooltip = { - text = imperial_policy_laws_cooldown_desc - NOT = { has_variable = imperial_policy_laws_cooldown } - } - } - tgp_japan_imperial_expansion_internal_peace_trigger = yes - } - - on_pass = { - ## Set cooldown - set_variable = { - name = imperial_policy_laws_cooldown - years = @imperial_policy_laws_cooldown_value - } - tgp_imperial_policy_event_effect = yes - } - - modifier = { - mercenary_hire_cost_mult = -0.15 - men_at_arms_recruitment_cost = -0.15 - japan_administrative_government_vassal_opinion = -35 - travel_danger = 20 - } - - pass_cost = { - prestige = @imperial_policy_cost_value - } - - ai_will_do = { - value = 80 - if = { - limit = { - ai_has_warlike_personality = yes - } - add = 50 - } - if = { - limit = { government_has_flag = government_is_japan_administrative } - add = -1000 - } - } - } - - manor_reform_law = { - flag = manor_reform_law - - can_keep = { - realm_law_use_imperial_policy_trigger = yes - trigger_if = { - limit = { is_independent_ruler = no } - liege = { has_realm_law = manor_reform_law } - } - } - - can_pass = { - trigger_if = { - limit = { - top_liege = this - } - custom_tooltip = { - text = imperial_policy_laws_cooldown_desc - NOT = { has_variable = imperial_policy_laws_cooldown } - } - } - } - - on_pass = { - ## Set cooldown - set_variable = { - name = imperial_policy_laws_cooldown - years = @imperial_policy_laws_cooldown_value - } - tgp_imperial_policy_event_effect = yes - } - - should_start_with = { - realm_law_use_imperial_policy_trigger = yes - } - - modifier = { - domicile_build_gold_cost = 0.25 - domicile_monthly_influence_mult = -0.25 - domicile_build_speed = 0.25 - build_gold_cost = -0.15 - build_speed = -0.15 - japan_administrative_government_vassal_opinion = -15 - } - - pass_cost = { - prestige = @imperial_policy_cost_value - } - - ai_will_do = { - value = 100 - if = { - limit = { - ai_has_builder_or_pious_builder_personality = yes - } - add = 25 - } - if = { - limit = { government_has_flag = government_is_japan_administrative } - add = -100 - } - } - } - - bandit_crackdown_law = { - flag = bandit_crackdown_law - - can_keep = { - realm_law_use_imperial_policy_trigger = yes - trigger_if = { - limit = { is_independent_ruler = no } - liege = { has_realm_law = bandit_crackdown_law } - } - } - - can_pass = { - trigger_if = { - limit = { - top_liege = this - } - custom_tooltip = { - text = imperial_policy_laws_cooldown_desc - NOT = { has_variable = imperial_policy_laws_cooldown } - } - } - } - - on_pass = { - ## Set cooldown - set_variable = { - name = imperial_policy_laws_cooldown - years = @imperial_policy_laws_cooldown_value - } - tgp_imperial_policy_event_effect = yes - } - - modifier = { - city_holding_build_gold_cost = -0.1 - barons_and_minor_landholders_opinion = 15 - monthly_county_control_growth_factor = 0.05 - monthly_county_control_growth_add = 0.2 - development_growth_factor = -0.15 - travel_danger = -10 - } - - pass_cost = { - prestige = @imperial_policy_cost_value - } - - ai_will_do = { - value = 0 - if = { - limit = { capital_county.county_control <= low_county_control } - add = 150 - } - } - } -} diff --git a/N3OW/common/on_action/game_start.txt b/N3OW/common/on_action/game_start.txt index e89509f8..fd364bcb 100644 --- a/N3OW/common/on_action/game_start.txt +++ b/N3OW/common/on_action/game_start.txt @@ -312,160 +312,160 @@ on_game_start = { has_dlc_feature = coronations } # London (England) - province:1527 = { - add_province_modifier = coronation_tradition_modifier + province:1527 = { + add_province_modifier = coronation_tradition_modifier set_variable = { name = coronation_tradition_location value = 5 } } # Aachen (Germany) - province:2092 = { - add_province_modifier = coronation_tradition_modifier + province:2092 = { + add_province_modifier = coronation_tradition_modifier set_variable = { name = coronation_tradition_location value = 5 } } # Reims (France) - province:2390 = { - add_province_modifier = coronation_tradition_modifier + province:2390 = { + add_province_modifier = coronation_tradition_modifier set_variable = { name = coronation_tradition_location value = 5 } } # Rome (Italy) - province:2575 = { - add_province_modifier = coronation_tradition_modifier + province:2575 = { + add_province_modifier = coronation_tradition_modifier set_variable = { name = coronation_tradition_location value = 5 } } # Milan (Italy) - province:2482 = { - add_province_modifier = coronation_tradition_modifier + province:2482 = { + add_province_modifier = coronation_tradition_modifier set_variable = { name = coronation_tradition_location value = 5 } } # Gniezno (Poland) - province:4905 = { - add_province_modifier = coronation_tradition_modifier + province:4905 = { + add_province_modifier = coronation_tradition_modifier set_variable = { name = coronation_tradition_location value = 5 } } # Szekesfehervar (Hungary) - province:3805 = { - add_province_modifier = coronation_tradition_modifier + province:3805 = { + add_province_modifier = coronation_tradition_modifier set_variable = { name = coronation_tradition_location value = 5 } } # Scone Abbey, Gowrie (Scotland) - province:1741 = { - add_province_modifier = coronation_tradition_modifier + province:1741 = { + add_province_modifier = coronation_tradition_modifier set_variable = { name = coronation_tradition_location value = 5 } } # Byzantium (Byzantines) - province:496 = { - add_province_modifier = coronation_long_tradition_modifier + province:496 = { + add_province_modifier = coronation_long_tradition_modifier set_variable = { name = coronation_tradition_location value = 10 } } # Mahdiya (Africa) - province:4578 = { - add_province_modifier = coronation_tradition_modifier + province:4578 = { + add_province_modifier = coronation_tradition_modifier set_variable = { name = coronation_tradition_location value = 5 } } # Cairo (Egypt) - province:6042 = { - add_province_modifier = coronation_tradition_modifier + province:6042 = { + add_province_modifier = coronation_tradition_modifier set_variable = { name = coronation_tradition_location value = 5 } } # Damascus (Syria) - province:5924 = { - add_province_modifier = coronation_tradition_modifier + province:5924 = { + add_province_modifier = coronation_tradition_modifier set_variable = { name = coronation_tradition_location value = 5 } } # Baghdad (Mesopotamia) - province:4828 = { - add_province_modifier = coronation_long_tradition_modifier + province:4828 = { + add_province_modifier = coronation_long_tradition_modifier set_variable = { name = coronation_tradition_location value = 10 } } # Rayy (Persia) - province:4319 = { - add_province_modifier = coronation_tradition_modifier + province:4319 = { + add_province_modifier = coronation_tradition_modifier set_variable = { name = coronation_tradition_location value = 5 } } # Ghazna (Kabulistan) - province:4500 = { - add_province_modifier = coronation_tradition_modifier + province:4500 = { + add_province_modifier = coronation_tradition_modifier set_variable = { name = coronation_tradition_location value = 5 } } # Lahur (Punjab) - province:1362 = { - add_province_modifier = coronation_tradition_modifier + province:1362 = { + add_province_modifier = coronation_tradition_modifier set_variable = { name = coronation_tradition_location value = 5 } } # Samarkand (Transoxiana) - province:4404 = { - add_province_modifier = coronation_tradition_modifier + province:4404 = { + add_province_modifier = coronation_tradition_modifier set_variable = { name = coronation_tradition_location value = 5 } } # Bukhara (Transoxiana) - province:4394 = { - add_province_modifier = coronation_tradition_modifier + province:4394 = { + add_province_modifier = coronation_tradition_modifier set_variable = { name = coronation_tradition_location value = 5 } } # Medina (Arabia) - province:6212 = { - add_province_modifier = coronation_tradition_modifier + province:6212 = { + add_province_modifier = coronation_tradition_modifier set_variable = { name = coronation_tradition_location value = 5 } } # Kutaisi (Georgia) - province:601 = { - add_province_modifier = coronation_tradition_modifier + province:601 = { + add_province_modifier = coronation_tradition_modifier set_variable = { name = coronation_tradition_location value = 5 @@ -478,16 +478,16 @@ on_game_start = { has_dlc_feature = coronations } # Marrakesh (Maghreb) - province:4718 = { - add_province_modifier = coronation_tradition_modifier + province:4718 = { + add_province_modifier = coronation_tradition_modifier set_variable = { name = coronation_tradition_location value = 5 } } # Karakorum (Mongolia) - province:1457 = { - add_province_modifier = coronation_tradition_modifier + province:1457 = { + add_province_modifier = coronation_tradition_modifier set_variable = { name = coronation_tradition_location value = 5 @@ -527,7 +527,7 @@ on_game_start = { } } - + # To prevent the Season Changes event from triggering on game start situation:the_great_steppe ?= { @@ -1060,7 +1060,13 @@ on_game_start = { limit = { game_start_date >= 1067.12.25 } - title:k_england = { set_coa = k_england_norman} + title:k_england = { set_coa = k_england_norman } + } + if = { + limit = { + game_start_date >= 938.1.1 + } + title:k_viet = { set_coa = k_dai_viet } } ### GRANDEUR ### @@ -1344,7 +1350,7 @@ on_game_start = { change_government = tribal_government } } - + # Set Coronation laws for everyone if = { limit = { @@ -2380,7 +2386,7 @@ on_game_start = { FAITH = scope:ruler.faith } faith = { has_doctrine = doctrine_no_anointment } - } + } } if = { limit = { @@ -3253,7 +3259,7 @@ on_game_start_after_lobby = { } trigger_event = game_rule.1001 } - + ### CE1 LEGITIMACY SETUP ### if = { limit = { @@ -3262,10 +3268,10 @@ on_game_start_after_lobby = { } add_legitimacy = base_legitimacy_value } - + ### MANDALA SETUP ### if = { - limit = { government_has_flag = government_is_mandala } + limit = { government_has_flag = government_is_mandala } #Triple Mandala's Legitimacy to make them not start at a negative expectation at game start add_legitimacy = { @@ -3291,7 +3297,7 @@ on_game_start_after_lobby = { limit = { var:not_subject_to_succession_trials ?= flag:started_as_mandala } #To prevent 'unused except in loc' errors :catto: } - + #Aspect modifiers? house = { #Start counting years of peace @@ -3335,7 +3341,7 @@ on_game_start_after_lobby = { } } } - + if = { limit = { title:h_china.holder ?= top_liege @@ -3389,8 +3395,8 @@ on_game_start_after_lobby = { } } change_merit = { - value = merit - multiply = 0.1 + value = merit + multiply = 0.1 } } if = { @@ -4261,7 +4267,7 @@ on_game_start_after_lobby = { } save_scope_as = governor } - + if = { limit = { government_has_flag = government_has_merit @@ -4309,7 +4315,7 @@ on_game_start_after_lobby = { add_to_list = disciple } } - + # Sexualities if game rules are default if = { limit = { has_game_rule = sexuality_distribution_default } @@ -4332,7 +4338,7 @@ on_game_start_after_lobby = { } } } - + if = { limit = { has_game_rule = sexuality_distribution_default } every_duchy = { @@ -4360,7 +4366,7 @@ on_game_start_after_lobby = { } } } - + #elder/disciple setup (continued from above) every_in_list = { list = disciple @@ -6003,7 +6009,7 @@ on_game_start_after_lobby = { } } #set up cultural acceptance between China and East Asian Empires to aid in the learning of Chinese effect for on_birthday_adulthood - + if = { limit = { game_start_date = 867.1.1 } culture:japanese = { @@ -6374,8 +6380,8 @@ on_game_start_after_lobby = { add_realm_law_skip_effects = camp_purpose_mercenaries } } - ## Liang Zhu Quanzhong - character:liang_zhu_1 ?= { + ## Zhu Quanzhong + character:zhu_quanzhong_1 ?= { if = { limit = { is_alive = yes @@ -6385,7 +6391,7 @@ on_game_start_after_lobby = { } } ## Miyoshi Kiyotsura - character:miyoshi_kiyotsura_1 ?= { + character:japanese_miyoshi_4 ?= { if = { limit = { is_alive = yes @@ -6394,8 +6400,8 @@ on_game_start_after_lobby = { add_realm_law_skip_effects = camp_purpose_scholars } } - ## Yang-kil - character:yang_kil_1 ?= { + ## Ki Hwon + character:ki_hwon_1 ?= { if = { limit = { is_alive = yes @@ -6761,7 +6767,7 @@ on_game_start_after_lobby = { ### DYNASTY TRACKING SETUP japan_dynasty_tracker_setup_effect = yes - + ### TGP NOBLE FAMILIES & DOMICILE SETUP ### # Required due to landless top liege title:e_japan.holder ?= { @@ -6783,7 +6789,7 @@ on_game_start_after_lobby = { ### MANDALA - + #Starting Mandala Temple Complexes #Dvaravati province:10822 = { @@ -7072,7 +7078,7 @@ on_game_start_after_lobby = { tgp_learn_chinese_effect_game_start = yes } } - } + } } } # Byzantium naming @@ -7687,18 +7693,87 @@ on_game_start_after_lobby = { set_global_variable = game_has_started every_independent_ruler = { - # Border War Law setup - if = { - limit = { - has_realm_law_flag = top_liege_not_redirected_to_border_wars_law - } - primary_title = { - set_vassal_wars_are_redirected_to_holder = no - } - } # Treasury setup for any government using treasury tgp_treasury_setup_effect = yes } + + # TGP China education track switch + + if = { + limit = { + exists = title:h_china.holder + } + title:h_china.holder = { + add_to_list = realm_potential_education_flip_list + } + } + if = { + limit = { + exists = title:e_goryeo.holder + } + title:e_goryeo.holder = { + add_to_list = realm_potential_education_flip_list + } + } + if = { + limit = { + exists = title:k_dali.holder + } + title:k_dali.holder = { + add_to_list = realm_potential_education_flip_list + } + } + if = { + limit = { + exists = title:k_viet.holder + } + title:k_viet.holder = { + add_to_list = realm_potential_education_flip_list + } + } + if = { + limit = { + exists = title:k_xia.holder + } + title:k_xia.holder = { + add_to_list = realm_potential_education_flip_list + } + } + if = { + limit = { + exists = title:e_andong.holder + } + title:e_andong.holder = { + add_to_list = realm_potential_education_flip_list + } + } + + every_in_list = { + list = realm_potential_education_flip_list + every_vassal_or_below = { + limit = { + is_ai = yes + OR = { + AND = { + OR = { + vassal_contract_has_flag = celestial_province_military + vassal_contract_has_flag = celestial_province_protectorate + } + has_trait_with_flag = civilian_province + } + AND = { + OR = { + vassal_contract_has_flag = celestial_province_standard + vassal_contract_has_flag = celestial_province_industrial + vassal_contract_has_flag = celestial_province_metropolitan + } + has_trait_with_flag = military_province + } + } + } + tgp_flip_education_track_on_game_start = yes + } + } } events = { diff --git a/N3OW/common/on_action/title_on_actions.txt b/N3OW/common/on_action/title_on_actions.txt index c54a4352..efe4b846 100644 --- a/N3OW/common/on_action/title_on_actions.txt +++ b/N3OW/common/on_action/title_on_actions.txt @@ -35,7 +35,7 @@ on_title_destroyed = { top_liege = this administrative_counts_can_be_independent = no NOT = { - has_government_flag = government_is_special_republic2 + has_government_flag = government_is_special_republic } NOT = { any_held_title = { @@ -590,7 +590,6 @@ on_title_gain = { scope:title = { has_county_modifier = mpo_siberian_permafrost_modifier_bad } - culture ?= scope:title.culture culture ?= { has_cultural_parameter = permafrost_modifier_mechanic } } scope:title = { @@ -604,7 +603,6 @@ on_title_gain = { has_county_modifier = mpo_siberian_permafrost_modifier } NOR = { - culture ?= scope:title.culture culture ?= { has_cultural_parameter = permafrost_modifier_mechanic } } } @@ -1045,14 +1043,24 @@ on_title_gain = { # KING+ TIER TITLES # ##################### else = { + # Newly formed Hegemon of China should spruce up their council + if = { + limit = { scope:title = title:h_china } + save_scope_as = councillor_liege + fill_the_ministry_effect = yes + } # Hegemonies cannot have Ceremonial Regents if = { limit = { exists = this - tgp_realm_has_ceremonial_liege_trigger = yes + any_held_title = { exists = var:administrative_ui_special_title } scope:title.tier = tier_hegemony } tgp_destroy_ceremonial_throne_effect = yes + if = { + limit = { has_trait = former_emperor } + remove_trait = former_emperor + } } # Ceremonial Liege if = { @@ -1342,20 +1350,36 @@ on_title_gain = { # When conquering China - Change to conquest phase if = { limit = { - root.house != scope:previous_holder.house - is_valid_celestial_dynasty = no + root.dynasty != scope:previous_holder.dynasty } - situation:dynastic_cycle = { - situation_top_sub_region = { - change_phase = { phase = situation_dynastic_cycle_phase_instability_conquest } + if = { + limit = { + is_valid_celestial_dynasty = no + } + situation:dynastic_cycle = { + situation_top_sub_region = { + change_phase = { phase = situation_dynastic_cycle_phase_instability_conquest } + } + } + } + else_if = { + limit = { + situation:dynastic_cycle ?= { + situation_current_phase = situation_dynastic_cycle_phase_instability_conquest + } + } + situation:dynastic_cycle = { + situation_top_sub_region = { + change_phase = { phase = situation_dynastic_cycle_phase_instability } + } } } } # When inheriting China - Move towards instability/chaotic phase - else_if = { + if = { limit = { root.house != scope:previous_holder.house - months_from_game_start > 0 # We check this to avoid potentially triggering this immediately on game start + current_date_is_start_date_trigger = no # We check this to avoid potentially triggering this immediately on game start } situation:dynastic_cycle = { if = { @@ -1364,14 +1388,6 @@ on_title_gain = { } trigger_situation_catalyst = catalyst_new_dynasty_inherits } - else_if = { - limit = { - situation_current_phase = situation_dynastic_cycle_phase_instability_conquest - } - situation_top_sub_region = { - change_phase = { phase = situation_dynastic_cycle_phase_instability } - } - } } } # Clear the Strengthen Capital great project cooldown @@ -1429,6 +1445,10 @@ on_title_gain = { scope:title = title:e_minister_of_works } } + # set up the council holder as dejure liege of the ministry title, as this effect is not called with the same scope as council onactions + scope:title.de_jure_liege.holder = { + save_scope_as = councillor_liege + } # If we get a minister title, make sure we set things up correctly switch = { trigger = scope:title @@ -2303,21 +2323,32 @@ on_title_gain = { primary_title.tier <= scope:title.tier } every_vassal = { - limit = { - culture = { has_cultural_parameter = must_pledge_loyalty_to_liege } - NOT = { var:pledge_loyalty_to_liege_grace ?= liege } - NOT = { owns_story_of_type = story_cycle_pledge_loyalty_to_liege_overdue } - } - create_story = story_cycle_pledge_loyalty_to_liege_overdue - random_owned_story = { - type = story_cycle_pledge_loyalty_to_liege_overdue - set_variable = new_liege_variant + if = { + limit = { + culture = { has_cultural_parameter = must_pledge_loyalty_to_liege } + OR = { + government_has_flag = government_is_feudal + government_has_flag = government_is_clan + government_has_flag = government_is_japan_feudal + } + NOT = { var:pledge_loyalty_to_liege_grace ?= liege } + NOT = { owns_story_of_type = story_cycle_pledge_loyalty_to_liege_overdue } + } + create_story = story_cycle_pledge_loyalty_to_liege_overdue + story:story_cycle_pledge_loyalty_to_liege_overdue = { + set_variable = new_liege_variant + } } } } else_if = { # if you now have a new liege, and they also follow a culture with the Pay Homage requirement, you must swear continued fealty limit = { liege.culture = { has_cultural_parameter = must_pledge_loyalty_to_liege } + OR = { + government_has_flag = government_is_feudal + government_has_flag = government_is_clan + government_has_flag = government_is_japan_feudal + } NOT = { var:pledge_loyalty_to_liege_grace ?= liege } NOT = { owns_story_of_type = story_cycle_pledge_loyalty_to_liege_overdue } } @@ -2693,14 +2724,81 @@ on_title_gain = { is_house_head = no is_ai = yes government_is_japanese_trigger = yes + scope:previous_holder = { + is_ai = yes + player_heir = { is_ai = yes } + } + scope:new_holder = { + is_ai = yes + player_heir = { is_ai = yes } + } house.house_head = { is_ai = yes + player_heir = { is_ai = yes } is_vassal_or_below_of = root } is_independent_ruler = yes } house = { set_house_head = root } } + + if = { # If courtiers get lost between governorship assignments, move them home + limit = { + is_ai = no + government_allows = merit + } + if = { + limit = { + is_landed = yes + } + every_courtier = { + limit = { + location != root.capital_province + is_imprisoned = no + is_travelling = no + is_commanding_army = no + NOR = { + exists = involved_activity + exists = knight_army + } + } + set_location_to_default = yes + } + } + else_if = { + limit = { + exists = domicile.domicile_location + } + every_courtier = { + limit = { + location != root.domicile.domicile_location + is_imprisoned = no + is_travelling = no + is_commanding_army = no + NOR = { + exists = involved_activity + exists = knight_army + } + } + set_location_to_default = yes + } + } + } + # If you take another realm's dynasty-named title, reset its name + if = { + limit = { + is_independent_ruler = yes + government_has_flag = government_is_celestial + scope:title ?= { + tier >= tier_kingdom + has_custom_title_name = yes + this != root.primary_title + } + } + scope:title = { + reset_title_name = yes + } + } } events = { roman_restoration.0005 #New Roman Emperor gets Augustus trait. (old holder, if still alive, loses it) @@ -3455,6 +3553,70 @@ on_title_lost = { } } } + + if = { # If courtiers get lost between governorship assignments, move them home + limit = { + is_ai = no + government_allows = merit + } + if = { + limit = { + is_landed = yes + } + every_courtier = { + limit = { + location != root.capital_province + is_imprisoned = no + is_travelling = no + is_commanding_army = no + NOR = { + exists = involved_activity + exists = knight_army + } + } + set_location_to_default = yes + } + } + else_if = { + limit = { + is_landed = no + exists = domicile.domicile_location + } + every_courtier = { + limit = { + location != root.domicile.domicile_location + is_imprisoned = no + is_travelling = no + is_commanding_army = no + NOR = { + exists = involved_activity + exists = knight_army + } + } + set_location_to_default = yes + } + } + } + + # Remove manually added Ministers if they're not ministers anymore + if = { + limit = { + NOR = { + primary_title = title:e_minister_chancellor + primary_title = title:e_minister_censor + primary_title = title:e_minister_grand_marshal + primary_title = title:e_minister_of_personnel + primary_title = title:e_minister_of_revenue + primary_title = title:e_minister_of_rites + primary_title = title:e_minister_of_war + primary_title = title:e_minister_of_justice + primary_title = title:e_minister_of_works + } + } + situation:dynastic_cycle = { + remove_manual_participant = prev + } + } } } @@ -3953,14 +4115,14 @@ on_vassal_change = { liege = root # I.e. root is independent government_has_flag = government_is_administrative NOT = { - government_has_flag = government_is_special_republic2 + government_has_flag = government_is_special_republic } } # And is not of a high enough rank, change government if = { limit = { NOT = { - government_has_flag = government_is_special_republic2 + government_has_flag = government_is_special_republic } administrative_tier_allows_independence = no } @@ -3996,11 +4158,14 @@ on_vassal_change = { ### If a minister becomes independent we destroy the ministry title if = { limit = { + # independent title OR = { liege ?= { tgp_has_access_to_ministry_trigger = no } this = top_liege } + any_held_title = { + # has a ministry title that is not being swapped OR = { this = title:e_minister_chancellor this = title:e_minister_censor @@ -4113,6 +4278,10 @@ on_vassal_change = { } # TGP end the ceremonial liege tgp_destroy_ceremonial_throne_effect = yes + if = { + limit = { has_trait = former_emperor } + remove_trait = former_emperor + } } # Bloc diff --git a/N3OW/common/on_action/yearly_on_actions.txt b/N3OW/common/on_action/yearly_on_actions.txt index d8806568..0031f7f1 100644 --- a/N3OW/common/on_action/yearly_on_actions.txt +++ b/N3OW/common/on_action/yearly_on_actions.txt @@ -2,29 +2,6 @@ # Root does not exist yearly_global_pulse = { effect = { - - if = { - limit = { - government_allows = administrative - is_house_head = yes - trigger_if = { - # This trigger is intentionally different from the similar effecy in on_title_gain up above. We want all direct vassals of the top liege to have a family title if they can - limit = { government_has_flag = government_has_county_tier_noble_families } - highest_held_title_tier >= tier_county - } - trigger_else = { highest_held_title_tier >= tier_duchy } - NOR = { - any_held_title = { is_noble_family_title = yes } - house = { - any_house_member = { - any_held_title = { is_noble_family_title = yes } - } - } - } - } - create_noble_family_effect = { GOVERNMENT_GIVER = this } - domicile ?= { set_up_domicile_estate_effect = yes } - } # Historical character spawner if = { limit = { @@ -379,7 +356,7 @@ yearly_global_pulse = { } } } - + # Rabbinicism becomes Monogamous if = { limit = { @@ -441,7 +418,7 @@ yearly_global_pulse = { } } } - + # The Rise of the Seljuk if = { limit = { has_game_rule = never_seljuk_invasion } } else_if = { # Random Seljuk Invasion @@ -528,8 +505,8 @@ yearly_global_pulse = { # Zanj Rebellion if = { - limit = { - current_date = 868.1.2 + limit = { + current_date = 868.1.2 NOT = { exists = global_var:zanj_rebellion_happened } } debug_log = "Zanj Rebellion Story Cycle Started" @@ -701,7 +678,7 @@ yearly_global_pulse = { custom_tooltip = lose_greek_anarchy_cb_tt } } - } + } } # TGP House Relations tracking every_active_dynasty = { @@ -738,7 +715,7 @@ yearly_global_pulse = { region = tgp_china_tributary_region limit = { holder.top_overlord = { - is_ai = yes + is_ai = yes is_independent_ruler = yes any_county_in_region = { region = tgp_china_tributary_region @@ -767,7 +744,7 @@ yearly_global_pulse = { } } } - + on_actions = { inspiration_maintenance_global_pulse natural_disaster_maintenance_global_pulse @@ -779,7 +756,7 @@ yearly_global_pulse = { yearly_playable_pulse = { effect = { ai_budget_manipulation_effect = yes - + #Mandala if = { limit = { @@ -788,7 +765,7 @@ yearly_playable_pulse = { has_mandala_aspect_trigger = yes house.house_head ?= root is_adult = yes - is_at_war = no + is_at_war = no } ai_chance_to_become_mandala_godking_effect = yes # Mandala Contracts @@ -796,7 +773,7 @@ yearly_playable_pulse = { limit = { trigger_if = { limit = { is_ai = yes } - is_available = yes + is_available = yes } trigger_else = { always = yes } } @@ -868,7 +845,7 @@ yearly_playable_pulse = { } } } - + } # Mercenary cultrad else_if = { @@ -898,29 +875,6 @@ yearly_playable_pulse = { } trigger_event = tgp_china_ministry.0100 } - # Border War Law - if = { - limit = { - has_realm_law_flag = top_liege_not_redirected_to_border_wars_law - primary_title = { - are_vassal_wars_redirected_to_holder = yes - } - } - primary_title = { - set_vassal_wars_are_redirected_to_holder = no - } - } - else_if = { - limit = { - has_realm_law_flag = top_liege_redirected_to_border_wars_law - primary_title = { - are_vassal_wars_redirected_to_holder = no - } - } - primary_title = { - set_vassal_wars_are_redirected_to_holder = yes - } - } } # Assign or level up court type trait for courtiers in a royal court if = { @@ -938,11 +892,11 @@ yearly_playable_pulse = { } #Dynasty of Many Khans mpo_yearly_dynasty_of_many_khans_effect = yes - + #Yearly yurt rewards domicile ?= { if = { - limit = { + limit = { OR = { has_domicile_building_or_higher = family_yurt_01 has_domicile_building_or_higher = mystical_yurt_01 @@ -1068,7 +1022,7 @@ yearly_playable_pulse = { } } } - + # ADMINISTRATIVE GOVERNMENT # Governor contract generation if = { @@ -1168,7 +1122,7 @@ yearly_playable_pulse = { if = { # Is Admin limit = { government_has_flag = government_is_administrative - is_landed = yes + is_landed = yes } # Failsafe to ensure we don't get independent admin rulers of too low a rank (i.e. below king) if = { @@ -1336,7 +1290,48 @@ yearly_playable_pulse = { } set_location_to_default = yes } - if = { + if = { # If courtiers get lost between governorship assignments, move them home + limit = { + government_allows = merit + } + if = { + limit = { + is_landed = yes + } + every_courtier = { + limit = { + location != root.capital_province + is_imprisoned = no + is_travelling = no + is_commanding_army = no + NOR = { + exists = involved_activity + exists = knight_army + } + } + set_location_to_default = yes + } + } + else_if = { + limit = { + exists = domicile.domicile_location + } + every_courtier = { + limit = { + location != root.domicile.domicile_location + is_imprisoned = no + is_travelling = no + is_commanding_army = no + NOR = { + exists = involved_activity + exists = knight_army + } + } + set_location_to_default = yes + } + } + } + if = { limit = { NOT = { top_liege ?= { @@ -1366,7 +1361,7 @@ yearly_playable_pulse = { } change_government = nomad_government } - + ###################### # Various safeguarding against realm setups with landless participants ###################### @@ -1374,13 +1369,13 @@ yearly_playable_pulse = { limit = { is_landed = no } - + save_scope_as = scoped_ruler - + ###################### # Fix Adventurers that end up with a Liege or Noble Family title ###################### - + if = { limit = { government_has_flag = government_is_landless_adventurer @@ -1415,22 +1410,22 @@ yearly_playable_pulse = { } } } - + ###################### # Repair realms with Landless participants having vassals ###################### - + if = { limit = { any_sub_realm_county = { is_landless_type_title = no } } - + ###################### # Landless Lieges with Landed Vassals should take a County from a Vassal ###################### - + if = { limit = { # Make sure we repair realms in the right order OR = { @@ -1466,11 +1461,11 @@ yearly_playable_pulse = { } } resolve_title_and_vassal_change = scope:change - + ###################### # Landless vassals with Landed vassals should take something and become landed ###################### - + every_vassal = { limit = { is_landed = no @@ -1508,11 +1503,11 @@ yearly_playable_pulse = { } } } - + ###################### # Destroy the AI's landless nomad vassals, as they'll just bloat the game for no gain ###################### - + else_if = { limit = { is_ai = yes @@ -1547,11 +1542,11 @@ yearly_playable_pulse = { becomes_independent = { change = scope:change } resolve_title_and_vassal_change = scope:change } - + ###################### # AI's with a Nomadic Camp title that somehow end up with the wrong government and landless should be purged ###################### - + if = { limit = { NOT = { government_has_flag = government_is_nomadic } @@ -1581,11 +1576,11 @@ yearly_playable_pulse = { change_government = nomad_government } } - + ###################### # Landless nomads outside any migration area? Cleanup. ###################### - + if = { limit = { is_ai = yes @@ -1802,9 +1797,9 @@ three_year_playable_pulse = { government_has_flag = government_is_herder } } - + save_scope_as = scoped_ruler - + ###################### # Nomadic titles that end up with non-nomadic holders are destroyed ###################### @@ -1823,11 +1818,11 @@ three_year_playable_pulse = { } } } - + ###################### # Anyone who *only* holds Nomadic lands should become Nomadic ###################### - + if = { limit = { highest_held_title_tier >= tier_county @@ -1862,7 +1857,7 @@ three_year_playable_pulse = { } } change_government = nomad_government - + # We don't want overly-funky nomad camps to spring up, so set an appropriate culture/faith if = { limit = { @@ -1887,13 +1882,13 @@ three_year_playable_pulse = { government_has_flag = government_is_nomadic is_ruler = yes } - + save_scope_as = scoped_ruler - + ###################### # If you end up losing your Nomadic Capital, get a new one ###################### - + if = { limit = { NOT = { @@ -1917,11 +1912,11 @@ three_year_playable_pulse = { upgrade_random_yurt_external_building_effect = yes } } - + ###################### # If your nomadic capital domicile somehow gets lost, move it to your capital province ###################### - + if = { limit = { is_at_war = no @@ -1951,7 +1946,7 @@ three_year_playable_pulse = { left_icon = scope:inspired_courtier title = courtier_inspired_message desc = courtier_inspired_effect - } + } } } } @@ -1967,8 +1962,8 @@ five_year_playable_pulse = { has_dlc_feature = legends piety_level >= very_high_piety_level NOT = { has_variable = saintly_deed_var } - NOR = { - has_game_rule = historical_legends_only + NOR = { + has_game_rule = historical_legends_only has_personal_legend_seed = holy } } @@ -2335,7 +2330,7 @@ random_yearly_playable_pulse = { } on_actions = { delay = { days = { 45 75 } } - on_yearly_common_events + on_yearly_common_events delay = { days = { 50 80 } } on_yearly_invisible_events delay = { days = { 85 165 } } @@ -2411,7 +2406,7 @@ five_year_everyone_pulse = { add_trait = lifestyle_seasoned_pastor } } - + if = { # Non-lowborn Barons should marry and produce a family limit = { primary_title.tier ?= tier_barony @@ -2419,7 +2414,7 @@ five_year_everyone_pulse = { is_married = no is_lowborn = no NOT = { - government_has_flag = government_is_republic + government_has_flag = government_is_special_republic } can_marry_trigger = yes } @@ -2472,10 +2467,10 @@ five_year_everyone_pulse = { marry = scope:spouse } } - + } - - + + if = { # Long term gold is pointless for Barons - add it to short term instead limit = { is_ai = yes @@ -2684,9 +2679,9 @@ on_yearly_events = { 10 = yearly.7010 #Opportunity to participate in a football game 10 = yearly.7050 #Foggy Hill - + 200 = major_decisions.2011 #Gain a scholar character if you have a University in your sub-realm - + #'Nice' events (positive effects) 100 = yearly.8000 # Vassal offers liege a gift 100 = yearly.8100 # The peasantry of a Domain province gives you a gift @@ -2708,7 +2703,7 @@ on_yearly_events = { 100 = stress_trait_ongoing.4501 # Comfort Eater runs out of favorite food. 100 = stress_trait_ongoing.4502 # Cannibal needs to satisfy their craving! 100 = stress_trait_ongoing.5001 # Inappetetic has a important character prepare a feast for them. - + #Elephant events for India 300 = yearly.9020 # A Mighty Elephant @@ -2755,13 +2750,13 @@ on_yearly_events = { 1000 = holy_order.2004 # Child returns to pick up the mantle 100 = holy_order.2005 # A - Possibly Undesirable - Child Returns Home 1000 = fp1_jomsvikings.0011 # FP1 - Jomsvikings terrorise their neighbours - - #Relationship Upgrade Events + + #Relationship Upgrade Events 75 = relation_upgrade.0001 75 = relation_upgrade.1001 75 = relation_upgrade.2001 75 = relation_upgrade.2101 - + #lunatic 100 = trait_specific_ongoing.1001 # You're developing 'glass delusion' 100 = trait_specific_ongoing.1003 # Collecting animals @@ -2800,7 +2795,7 @@ on_yearly_events = { 100 = witch.4010 #Personal witch ritual 100 = witch.4020 #Pray with potential friends 25 = witch.4030 #Rare book - + # Friend Events 10 = friendship.0003 #Friend might become Lover 100 = friendship.1001 #Send Friend a gift @@ -2813,8 +2808,8 @@ on_yearly_events = { 25 = friendship.3003 #You hate your spouse's friend 100 = friendship.3006 #A Friend gets you a favor hook on one of your Councillors 300 = friendship.3007 # Hanging out with your Friend reduces Stress - - # Rival Events + + # Rival Events 200 = rivalry.2001 #Hinder the progress of rival's Befriend scheme 100 = rivalry.1001 #Rival adds stress 100 = rivalry.1010 #Spiteful Acts ( my rival's aggravating behavior has gone on long enough) @@ -2822,7 +2817,7 @@ on_yearly_events = { 100 = rivalry.3001 #Rival insults you 100 = rivalry.3002 #You like the Rival of a Friend less 100 = rivalry.3004 #Decrease opinion of rival because of opposing personality trait - + # Vassal Events 100 = vassal.1001 # Religious liege wants you to build temple 100 = vassal.1101 # Religious vassal wants you to build temple @@ -2841,7 +2836,7 @@ on_yearly_events = { 100 = vassal.3001 # You have no heir, ask a vassal for help 100 = vassal.5010 # Zealous vassal wants liege to fight religious enemies 100 = vassal.5050 # Vassal wants liege to fight war over his claim - + # Spouse Events 75 = spouse.0001 #Increase opinion of spouse because of common personality 75 = spouse.0003 #Increase opinion of spouse because of common lifestyle or education @@ -2857,8 +2852,8 @@ on_yearly_events = { 75 = spouse.3002 #Spread rumours about your spouse 75 = spouse.3012 #Pretend there is a plot against your spouse 100 = intrigue_scheme_ongoing.5021 #Spouse/parent is plotting against someone! - - # Parent Events + + # Parent Events 75 = parent.1001 #Parent aids with Martial 75 = parent.1002 #Parent aids with Diplomacy 75 = parent.1003 #Parent aids with Intrigue @@ -2868,8 +2863,8 @@ on_yearly_events = { 75 = parent.1007 #Parent helps with courtier opinion 50 = parent.1009 #Parent gives you a new courtier 75 = parent.1010 #Parent gives stress_loss - - # Secret Events + + # Secret Events 100 = secrets.1001 #Randomly learn a courtier's secrets 100 = secrets.1002 #Courtier randomly learns one of court owner's minor secrets 50 = secrets.1003 #Courtier randomly learns one of court owner's major secrets @@ -2880,7 +2875,7 @@ on_yearly_events = { #Blackmail events 100 = blackmail.1001 #Blackmailing a vassal causes Dread with the others 100 = blackmail.1002 #Gain Stress from being under Blackmail - + # Lover Events 50 = lover.1001 #A Lover shares someone's secret with you 50 = lover.1002 #A Lover aids a diplomatic scheme @@ -2905,7 +2900,7 @@ on_yearly_events = { 100 = lover.7001 #Chance that a good friend becomes a potential lover 100 = lover.7003 #Chance that a rival becomes a potential lover 50 = lover.7005 #Chance that a close family member becomes a potential lover - + #TGP Elder/Disciple events 100 = chinese_students.001 #Rivalry between two students 100 = chinese_students.010 #Disciple writes a scroll @@ -2923,7 +2918,7 @@ on_yearly_events = { 200 = fp1_yearly.0671 # A Slippery Slope - your child wants to go sledding. 200 = fp1_yearly.0071 # In the Deep Places of the World - locals in your Scandi capital report a troll. 15 = fp1_yearly.2000 # A Child wants to run away to marry their beloved - + #EP1 Flavor Events 50 = ep1_flavor.0001 # A neighbouring court has a secret child 100 = ep1_flavor.0011 # Diplomats from nearby realms have trashed your favourite hall. @@ -2939,7 +2934,7 @@ on_yearly_events = { 25 = ep1_flavor.2060 # Local merchant outed by local policeman 25 = ep1_flavor.2070 # Interfere in a debate with a gifted visting scholar 100 = language_events.0002 # Vassal who speak the language lauds your efforts - + #Flavor Events 200 = yearly.9100 # Trouble in the Garden 200 = yearly.9110 # The Flower Thief @@ -2993,16 +2988,16 @@ on_yearly_events = { #Trait Events 100 = trait_specific.8501 # Someone mocks your lisp - + # FP2 - Fate of Iberia Events 180 = fp2_yearly.2020 # Horchata colonialism event 160 = fp2_yearly.8000 # Burning the Vineyards 180 = fp2_yearly.8001 # Assembling the Cortes - 180 = fp2_yearly.8002 # A Dietary Dilemma + 180 = fp2_yearly.8002 # A Dietary Dilemma 180 = fp2_yearly.8003 # Flight of Fancy - 180 = fp2_yearly.8004 # Translation School - 180 = fp2_yearly.8005 # Under the Stone Pine - 180 = fp2_yearly.8006 # Saqaliba Settlers + 180 = fp2_yearly.8004 # Translation School + 180 = fp2_yearly.8005 # Under the Stone Pine + 180 = fp2_yearly.8006 # Saqaliba Settlers 180 = fp2_struggle.1002 # Xenophilic Advancment 160 = fp2_struggle.1050 # Dreams of Destruction 150 = fp2_struggle.2000 # Disorderly Market @@ -3051,7 +3046,7 @@ on_yearly_events = { 100 = bp1_yearly.3100 # Your vassal/friend/family member offers you a skilled courtier 20 = bp1_yearly.3101 # Friend offers to sell you a county you have a claim on 100 = bp1_yearly.3201 #Fake feast invite from rival/nemesis - 100 = bp1_yearly.3300 # Remembering a pilgrimage + 100 = bp1_yearly.3300 # Remembering a pilgrimage 200 = bp1_yearly.3301 # Remembering a pilgrimage w/ a friend 100 = bp1_yearly.4000 # Reflect over a family memory 100 = bp1_yearly.4010 # Spouse demands their child gets a better guardian @@ -3167,10 +3162,10 @@ on_yearly_events = { #FP3 - Extra Yearly Events 150 = fp3_yearly.8045 #The Mysterious Bundle (the Buzina Chain) 500 = false_conversion.2000 # A Moment of Weakness - + # FP3 - Zoroastrian Events 200 = fp3_yearly.8050 #The Fate of the Dead - 200 = fp3_yearly.8051 # The Purest Fire + 200 = fp3_yearly.8051 # The Purest Fire # Guardianship Events 200 = childhood.2400 # Ward approaches guardian with theological doubts @@ -3188,7 +3183,7 @@ on_yearly_events = { 10 = destiny_child.0001 #Destiny Child Story Cycle 100 = bp2_yearly_extra.0001 #My favorite councilor - + 200 = bp2_yearly.0601 # Ruling Rightly - Regent tries to teach you about state. 100 = bp2_yearly.0611 # PrimaryTitle's Second Capital - Far away regent never seems to visit. 200 = bp2_yearly.0621 # AuntUncle RegentFirstName - Nearby regents visits often. @@ -3196,7 +3191,7 @@ on_yearly_events = { 100 = bp2_yearly.0641 # Regent offers special present in exchange for your agreement on some documents. 100 = bp2_yearly.0651 # Regent makes time for your interests, be they play or poetry. 200 = bp2_yearly.0661 # Regent quarrels with your family about access to you. - + 100 = bp2_yearly.1000 # Parent/Guardian: Your child/ward walks in on you performing your stress trait 100 = bp2_yearly.1005 # Child: You notice your parent/guardian performing a stress trait 100 = bp2_yearly.1010 # Parent/Guardian: Your child gives you a hug @@ -3209,9 +3204,9 @@ on_yearly_events = { 100 = bp2_yearly.2000 # You (a kid) learn about your house founder and can gain one of their traits (or the opposite) 100 = bp2_yearly.2001 # You (a kid) learn about an ancestor and can gain one of their traits (or the opposite) - 100 = bp2_yearly.2100 # Build something with another child + 100 = bp2_yearly.2100 # Build something with another child # The following are upweighted for non-ai characters because we don't want the ai to start getting these traits at an inordinate rate - 10 = bp2_yearly.2110 # Gain Humble or Arrogant + 10 = bp2_yearly.2110 # Gain Humble or Arrogant 10 = bp2_yearly.2120 # Gain Temperate or Gluttonous 10 = bp2_yearly.2130 # Gain Generous or Greedy 10 = bp2_yearly.2140 # Gain Honest or Deceitful @@ -3219,7 +3214,7 @@ on_yearly_events = { 10 = bp2_yearly.2160 # Gain Compassionate or Sadistic 100 = bp2_yearly.3000 # Child bored of lesson - + 150 = bp2_yearly.5000 # You have a chance to imprison the young prince/ss 300 = bp2_yearly.5009 # You promise? 100 = bp2_yearly.5050 # You learn a language off a guest or courtier @@ -3235,11 +3230,11 @@ on_yearly_events = { 100 = bp2_yearly.6150 # hostage is reticent to keep taking their place next to you during court appearances 100 = bp2_yearly.6160 # your kid and your hostage snuck out of the palace to see your capital 150 = bp2_yearly.6170 # your family mad that you sent a hostage to an uncivilized court - + 100 = bp2_yearly.7000 # Wet nurse has a disease and can pass it down to a child 100 = bp2_yearly.7001 # Spouse is jealous about wet nurse 100 = bp2_yearly.7002 # Court Chaplain informs You that your marraige is incestuous, due to you having same wet nurse as your spouse - 10 = bp2_yearly.7003 # Wet Nurse informs you about first words of your child + 10 = bp2_yearly.7003 # Wet Nurse informs you about first words of your child 10 = bp2_yearly.7004 # Wet Nurse informs you about first steps of your child 10 = bp2_yearly.7005 # Wet Nurse informs you about first fallen teeth of your child 10 = bp2_yearly.7006 # Wet Nurse informs you about first independent dress up of your child @@ -3260,7 +3255,7 @@ on_yearly_events = { 100 = bp2_yearly_extra.0001 #My favorite councilor #FP3 - Clan Events - 250 = fp3_clan.8000 # Usury against Unity, by Ola Jentzsch + 250 = fp3_clan.8000 # Usury against Unity, by Ola Jentzsch 250 = fp3_clan.8001 # Clan Quarrel, by Ola Jentzsch 250 = fp3_clan.8002 # Bonds of Faith, by Ola Jentzsch 250 = fp3_clan.8003 # The Power of a Name, by Ola Jentzsch @@ -3275,7 +3270,7 @@ on_yearly_events = { 240 = fp3_clan.8013 # The Burden of Tax Farming, by Ola Jentzsch 250 = fp3_clan.8015 # Scandalous Scion, by Ola Jentzsch 250 = fp3_clan.8016 # Hammam Havoc, by Ola Jentzsch - 250 = fp3_clan.8017 # A Questionable Position, by Ola Jentzsch + 250 = fp3_clan.8017 # A Questionable Position, by Ola Jentzsch 175 = fp3_clan.3000 # Ravaged Tulips, by Hugo Cortell # FP3 - Eren Events @@ -3322,7 +3317,7 @@ on_yearly_events = { 250 = ep3_governor_yearly.8120 # Support disaster victims in your governorship 250 = ep3_governor_yearly.8130 # Raise arbitrary taxes on your province 250 = ep3_governor_yearly.8140 # Stand up to an estate in your province - 250 = ep3_governor_yearly.8150 # Response to rebels in your province + 250 = ep3_governor_yearly.8150 # Response to rebels in your province 250 = ep3_governor_yearly.8160 # Minority access to governor bureaucracy 250 = ep3_governor_yearly.8170 # Prepare defense against nearby raiders @@ -3336,7 +3331,7 @@ on_yearly_events = { 250 = ep3_powerful_families.8040 250 = ep3_powerful_families.8060 250 = ep3_powerful_families.8070 - + # EP3 - Landless Admin Events 250 = ep3_landless_admin.1000 # This guy could be a cool councillor 250 = ep3_landless_admin.1010 # You have upgraded your estate a bunch, locals are impressed @@ -3412,10 +3407,10 @@ on_yearly_events = { 200 = nomad_events.0110 # A snow wolf attacks a child (weighted up during white zud/cold zud) 500 = nomad_events.0210 # Spouse/Child is worried about low herd 200 = mpo_nomad_events.1120 #It's winter. wolves are hungry for your herd (weighted up during white zud/cold zud) - + # MPO - Settled Rulers Events 500 = mpo_flavor_events_settled.0010 # Horse Lord at your door - + # TGP - Movement Events 200 = tgp_movement_events.0001 # Marshal urges you to prepare for Expansion 200 = tgp_movement_events.0010 # Try to convince an undecided ruler to join your movement @@ -3434,7 +3429,7 @@ on_yearly_events = { 200 = tgp_movement_events.0140 # Disciple brings you a gift 200 = tgp_movement_events.0150 # Shinto visitor at court 200 = tgp_movement_events.0160 # Promise Movement leader to not scheme against each other - + # TGP - Dynastic Cycle Events 200 = tgp_dynastic_cycle_events.0001 # Tilt the scales towards Advancement 200 = tgp_dynastic_cycle_events.0010 # Disciple has a mental breakdown in Instability diff --git a/N3OW/common/religion/holy_sites/00_holy_sites.txt b/N3OW/common/religion/holy_sites/00_holy_sites.txt index c56cf1cf..6d1b5516 100644 --- a/N3OW/common/religion/holy_sites/00_holy_sites.txt +++ b/N3OW/common/religion/holy_sites/00_holy_sites.txt @@ -1,10 +1,8 @@ - - -############# +############# # Christian # ############# -#novelist +# novelist aachen = { county = c_aachen @@ -420,6 +418,57 @@ antioch = { } +kent = { + county = c_kent + barony = b_canterbury + + character_modifier = { + name = holy_site_kent_effect_name + religious_vassal_opinion = 5 + sway_scheme_phase_duration_add = minor_scheme_phase_duration_bonus_value + } +} + +segrada_familia = { + county = c_barcelona + is_active = no + + character_modifier = { + name = holy_site_segrada_familia_effect_name + monthly_piety_gain_mult = 0.1 + } +} + +# Orthodox +constantinople = { + county = c_byzantion + + character_modifier = { + name = holy_site_constantinople_effect_name + cultural_head_fascination_mult = 0.15 + } +} + +alexandria = { + county = c_alexandria + + character_modifier = { + name = holy_site_alexandria_effect_name + learning_per_piety_level = 1 + } +} + +antioch = { + county = c_antiocheia + + character_modifier = { + name = holy_site_antioch_effect_name + martial_per_piety_level = 1 + knight_effectiveness_mult = 0.1 + } +} + + # Coptic aksum = { @@ -1004,7 +1053,7 @@ bodh_gaya = { # Where Buddha reached enlightenment } } -kusinagara = { # Where Buddha was born - Actually Lumbini +kusinagara = { # Where Buddha was born - Actually Lumbini but that was not known at this time county = c_lumbini character_modifier = { @@ -1111,7 +1160,7 @@ amaravati = { # Amaravati - An important place for the early spread and developm #Hindu -varanasi = { # Sarnath, where Buddha first taught his diciples. Also a holy site in Buddhism (Sarnath) +varanasi = { # Sarnath, where Buddha first taught his disciples. Also a holy site in Buddhism (Sarnath) county = c_varanasi character_modifier = { @@ -1179,6 +1228,176 @@ dwarka = { } } +puri = { + county = c_puri + + character_modifier = { + name = holy_site_puri_effect_name + monthly_piety_gain_mult = 0.05 + learning_per_piety_level = 1 + } +} + +badrinath = { + county = c_garwhal + barony = b_uttarkashi + + character_modifier = { + name = holy_site_badrinath_effect_name + short_reign_duration_mult = -0.25 + vassal_opinion = 3 + } +} + +shringeri = { + county = c_banavasi + barony = b_shringeri + + character_modifier = { + name = holy_site_shringeri_effect_name + stewardship_per_piety_level = 1 + } +} + +konarak = { + county = c_kataka + barony = b_konarak + + character_modifier = { + name = holy_site_konarak_effect_name + development_growth_factor = 0.1 + church_holding_build_gold_cost = -0.1 + } +} + +#Southeast Asia +angkor = { #Shaivism + county = c_angkor + + character_modifier = { + name = holy_site_angkor_effect_name + tributary_opinion = 5 + jungle_construction_gold_cost = -0.1 + } +} + +bantey_srei = { #Vaishnavism + county = c_angkor + + character_modifier = { + name = holy_site_bantey_srei_effect_name + county_opinion_add = 5 + great_project_build_speed = -0.05 + } +} + +borobudur = { #Mahayana + county = c_JAV_mataram + barony = b_JAV_Borobodur + + character_modifier = { + name = holy_site_borobudur_effect_name + monthly_piety_gain_per_knight_mult = 0.01 + knight_effectiveness_mult = 0.1 + } +} + +muara_takus = { #Vajrayana + county = c_SUM_muara_takus + barony = b_SUM_Muara_Takus + + character_modifier = { + name = holy_site_muara_takus_effect_name + tributary_opinion = 5 + temple_citadel_holding_build_gold_cost = -0.1 + } +} + +prambanan = { #Shaivism & Krishnaism + county = c_JAV_mataram + barony = b_JAV_Mataram + + character_modifier = { + name = holy_site_prambanan_effect_name + different_culture_opinion = 10 + } +} + +kalasan = { #Vajrayana & Mahayana + county = c_JAV_mataram + barony = b_JAV_Mataram + + character_modifier = { + name = holy_site_kalasan_effect_name + diplomacy = 1 + powerful_vassal_opinion = 5 + } +} + +preah_vihear = { #Shaivism + county = c_prea_vihear + barony = b_prea_vihear + + character_modifier = { + name = holy_site_preah_vihear_effect_name + jungle_development_growth_factor = 0.2 + county_opinion_add = 5 + } +} + +my_son = { #Shaivism + county = c_indrapura + barony = b_my_son + + character_modifier = { + name = holy_site_my_son_effect_name + monthly_prestige_gain_per_knight_mult = 0.01 + build_prestige_cost = -0.15 + } +} + +bayon = { #Mahayana + county = c_angkor + + character_modifier = { + name = holy_site_bayon_effect_name + wetlands_development_growth_factor = 0.2 + county_opinion_add = 5 + } +} + +bumiayu = { #Shaivism + county = c_SUM_palembang + barony = b_SUM_Musi + + character_modifier = { + name = holy_site_bumiayu_effect_name + clergy_opinion = 5 + monthly_piety_gain_mult = 0.1 + } +} + +khao_khlang_nai = { #Vaishnavism + county = c_lop_buri + barony = b_sri_thep + + character_modifier = { + name = holy_site_khao_khlang_nai_effect_name + tributary_opinion = 5 + temple_citadel_holding_build_gold_cost = -0.1 + } +} + +bupaya = { #Theravada + county = c_pagan + barony = b_pagan + + character_modifier = { + name = holy_site_bupaya_effect_name + monthly_piety_gain_mult = 0.1 + } +} + #Jain palitana = { @@ -1310,7 +1529,7 @@ jumla = { #Qiangic/Hsexje maowun = { - county = c_maowun + county = c_hanzhou character_modifier = { name = holy_site_maowun_effect_name @@ -1355,7 +1574,7 @@ rebgong = { } xingqing = { - county = c_xingqing + county = c_lingzhou character_modifier = { name = holy_site_xingqing_effect_name @@ -1364,7 +1583,7 @@ xingqing = { } yijinai = { - county = c_yijinai + county = c_tongcheng character_modifier = { name = holy_site_yijinai_effect_name @@ -1585,13 +1804,13 @@ ranaheim = { character_modifier = { name = holy_site_ranaheim_effect_name - naval_movement_speed_mult = 0.2 men_at_arms_maintenance = -0.05 } } jorvik = { county = c_north_riding + barony = b_yarlestre character_modifier = { name = holy_site_jorvik_effect_name @@ -1666,6 +1885,7 @@ kiev = { novgorod = { county = c_novgorod + barony = b_soltsy character_modifier = { name = holy_site_novgorod_effect_name @@ -1739,6 +1959,7 @@ rugen = { pest = { county = c_visegrad + barony = b_pest character_modifier = { name = holy_site_pest_effect_name @@ -1903,6 +2124,7 @@ bost = { khotan = { county = c_khotan + barony = b_lafak #Rawak Stupa character_modifier = { name = holy_site_khotan_effect_name @@ -1912,7 +2134,6 @@ khotan = { balkh = { county = c_balkh #Also important to Zoroastrianism (supposed birthplace of Gayomart and Zoroaster), as well as Mayahana buddhism. - #TODO FP3 CD: Make holy site for Mahayana or Pure Land. character_modifier = { name = holy_site_balkh_effect_name @@ -1922,6 +2143,7 @@ balkh = { lhasa = { county = c_lhasa + barony = b_lhasa character_modifier = { name = holy_site_lhasa_effect_name @@ -2369,6 +2591,41 @@ mogadishu = { # An extremely important local city, and thus probable religious h } } +############# +# Ngaiism +# Reusing some Waaqism sites +############# + +kirinyaga = { # Mount Kenya. Central to Kikuyu worship of Ngai + county = c_kirinyaga + + character_modifier = { + name = holy_site_kirinyaga_effect_name + health = 0.1 + monthly_piety_gain_mult = 0.1 + } +} + +mangea = { # Significant mythical origin of the Mijikenda + county = c_mombasa + barony = b_mtwapa # Mangea proper is near the coast, just a little north of Mtwapa + + character_modifier = { + name = holy_site_mangea_effect_name + direct_vassal_opinion = 5 + } +} + +kilimanjaro = { # Central to Chagga worship of Ngai + county = c_kilimanjaro + + character_modifier = { + name = holy_site_kilimanjaro_effect_name + controlled_province_advantage = 5 + prowess_per_piety_level = 1 + } +} + ############# # Other ############# @@ -2383,12 +2640,1274 @@ gilgit = { } } +nakkavaram = { + county = c_nakkavaram + + character_modifier = { + name = holy_site_nakkavaram_effect_name + build_gold_cost = -0.1 + stewardship = 1 + } +} + +ar_kol = { + county = c_andamans + + character_modifier = { + name = holy_site_ar_kol_effect_name + jungle_tax_mult = 0.15 + monthly_piety_gain_mult = 0.1 + } +} + +##################### +# Taoism # +##################### + suzhou = { county = c_suzhou character_modifier = { name = holy_site_suzhou_effect_name diplomacy = 1 + } +} + +mount_heng = { + #One of the 5 great Mountains of China + #Numerous Temples, such as the Hanging Temple + county = c_shuozhou + + character_modifier = { + name = holy_site_mount_heng_effect_name + direct_vassal_opinion = 5 + } +} + +mount_longhu = { + # Where Zhang Daoling had obtained the Tao + county = c_fuzhou_3 + + character_modifier = { + name = holy_site_mount_longhu_effect_name + clergy_opinion = 5 + personal_scheme_phase_duration_add = minor_scheme_phase_duration_bonus_value + } +} + +mount_qingcheng = { + #Misty Green City Wall + #One of the 4 Sacred Mountains of Taoism + #"The most secluded place in China" + county = c_chengdu + + character_modifier = { + name = holy_site_mount_qingcheng_effect_name + life_expectancy = 1 + monthly_diplomacy_lifestyle_xp_gain_mult = 0.15 + } +} + +mount_tai = { + #Foremost of the 5 sacred mountains of China + county = c_yunzhou + + character_modifier = { + name = holy_site_mount_tai_effect_name + monthly_piety_gain_mult = 0.05 + learning = 1 + } +} + +mount_mian = { + #Important Taoist and Buddhist site + county = c_taiyuan + + character_modifier = { + name = holy_site_mount_mian_effect_name + martial_per_piety_level = 1 + knight_effectiveness_mult = 0.1 + } +} + +mount_kunyu = { + #Location where the quanzhen school was founded + #Curated by emperors and Taoist monks + county = c_dengzhou + + character_modifier = { + name = holy_site_mount_kunyu_effect_name + stress_loss_mult = 0.2 + life_expectancy = 1 #Connection to Eternal Life + } +} + +mount_wudang = { + #Military Wherewithal + #One of the 4 Sacred mountains of Taoism + county = c_junzhou + + character_modifier = { + name = holy_site_mount_wudang_effect_name + martial = 1 + prowess_per_prestige_level = 1 + } +} + +mount_qiyung = { + #Neat Clouds + #One of the 4 sacred mountains of Taoism + county = c_shezhou + + character_modifier = { + name = holy_site_mount_wudang_effect_name + learning = 2 + } +} + +luyi = { + #Birthplace of Lǎozǐ + county = c_bozhou + barony = b_luyi + + character_modifier = { + name = holy_site_luyi_effect_name + learning = 1 + monthly_piety = 1 + } +} + +##################### +# Shugendo # +##################### + +# Kumano covered elsewhere +# Dewa covered elsewhere + +ishizuchi = { + # Ishizuchi, sacred Shugendo mountain + county = c_iyo + barony = b_ishizuchi + + character_modifier = { + name = holy_site_ishizuchi_effect_name + cultural_head_fascination_mult = 0.15 + } +} + +fuji = { + # Fujisan + county = c_suruga + barony = b_fuji + + character_modifier = { + name = holy_site_fuji_effect_name + councillor_opinion = 5 + } +} + +haku = { + # Hakusan, sacred Shugendo mountain + county = c_kaga + barony = b_haku + + character_modifier = { + name = holy_site_haku_effect_name + vassal_levy_contribution_add = 0.15 + } +} + +##################### +# Shinto # +##################### + +ise_jingu = { # Ise Grand Shrine, home of the Saigu + county = c_ise + barony = b_ise_jingu + + character_modifier = { + name = holy_site_ise_jingu_effect_name + learning_per_piety_level = 1 + } +} + +koya = { # Mount Koya + county = c_kii + barony = b_kongobu_ji + + character_modifier = { + name = holy_site_koya_effect_name + clergy_opinion = 5 + } +} + +haguro = { # Mount Haguro + county = c_tokisara + barony = b_tokisara + + character_modifier = { + name = holy_site_haguro_effect_name + mountains_advantage = 5 + mountains_development_growth_factor = 0.2 + } +} + +itsukushima = { # Miyajima + county = c_aki + barony = b_itsukushima + + character_modifier = { + name = holy_site_itsukushima_effect_name + knight_effectiveness_mult = 0.2 + } +} + +hachimangu = { # Hachimangu + county = c_buzen + barony = b_usa + + character_modifier = { + name = holy_site_hachimangu_effect_name + men_at_arms_maintenance = -0.05 + } +} + +##################### +# Chan Buddhism # +##################### + +# Bodh Gaya covered elsewhere +# Kusinagara covered elsewhere + +shaolin = { + county = c_henan + barony = b_dengfeng + + character_modifier = { + name = holy_site_shaolin_effect_name + prowess_per_piety_level = 1 + clergy_opinion = 5 + } +} + +hangzhou = { + county = c_hangzhou + + character_modifier = { + name = holy_site_lingyin_effect_name + diplomacy = 1 + councillor_opinion = 5 + } +} + +wutai = { # Mount Wutai + county = c_daizhou + + character_modifier = { + name = holy_site_wutai_effect_name + learning = 2 + } +} + +##################### +# Huayan Buddhism # +##################### + +# Kusinagara covered elsewhere +# Bodh Gaya covered elsewhere +# Mount Tai covered elsewhere +# Mount Wutai covered elsewhere + +emei = { # Mount Emei + county = c_jiazhou + + character_modifier = { + name = holy_site_emei_effect_name + development_growth_factor = 0.1 + } +} + +##################### +# Jingtu Buddhism # +##################### + +# Kusinagara covered elsewhere +# Bodh Gaya covered elsewhere +# Mount Heng covered elsewhere + +jiuhua = { + county = c_chizhou + + character_modifier = { + name = holy_site_jiuhua_effect_name + owned_personal_scheme_success_chance_add = 5 + diplomacy = 1 + } +} + +putuo = { + county = c_yuezhou_1 + + character_modifier = { + name = holy_site_putuo_effect_name + county_opinion_add = 5 #Center of Worship for Guanyin - Boddhisatva of Compassion + different_faith_opinion = 5 + } +} + +##################### +# Aluk # +##################### + +# Sonba-i already covered elsewhere +# Kepala Burung already covered elsewhere +# Buru-Sula already covered elsewhere + +wenang = { + county = c_SuMa_wenang + + character_modifier = { + name = holy_site_wenang_effect_name + stewardship_per_piety_level = 1 + } +} + +siang = { + county = c_SuMa_siang + + character_modifier = { + name = holy_site_siang_effect_name + martial = 1 + clergy_opinion = 5 + } +} + +tengchong = { + county = c_monyin + + character_modifier = { + name = holy_site_tengchong_effect_name + clergy_opinion = 5 + personal_scheme_phase_duration_add = minor_scheme_phase_duration_bonus_value + } +} + +dali = { + county = c_dali + + character_modifier = { + name = holy_site_dali_effect_name + knight_effectiveness_mult = 0.2 + prowess_per_prestige_level = 1 + } +} + +shicheng = { + county = c_shicheng + + character_modifier = { + name = holy_site_shicheng_effect_name + diplomacy = 1 + powerful_vassal_opinion = 5 + } +} + +jinglong = { + county = c_chiang_rung + + character_modifier = { + name = holy_site_jinglong_effect_name + jungle_advantage = 3 + } +} + +jianchang = { + county = c_jingzhou_2 + + character_modifier = { + name = holy_site_jianchang_effect_name + learning = 1 + clergy_opinion = 5 + } +} + +##################### +# Bimoism # +##################### + +# Dali already covered elsewhere +# Tengchong already covered elsewhere +# Jinglong already covered elsewhere + +zhaotong = { + county = c_huizhou + + character_modifier = { + name = holy_site_zhaotong_effect_name + knight_limit = 1 + light_cavalry_toughness_mult = 0.1 + } +} + +xuhen = { + county = c_jingzhou_2 + + character_modifier = { + name = holy_site_xuhen_effect_name + tributary_opinion = 4 + } +} + +# Buddhist + +chang_an = { + county = c_jingzhao + + character_modifier = { + name = holy_site_xi_an_effect_name + monthly_piety_gain_mult = 0.1 + } +} + +bulguksa = { + county = c_gyeongju + + character_modifier = { + name = holy_site_bulguksa_effect_name + controlled_province_advantage = 5 + } +} + +donggang = { + county = c_jangheung + + character_modifier = { + name = holy_site_donggang_effect_name + learning = 1 + health = 0.1 + } +} + +##################### +# Dayawism # +##################### + +cotabato = { + county = c_PHI_cotabato + + character_modifier = { + name = holy_site_cotabato_effect_name + learning = 1 + tributary_opinion = 5 + } +} + +biri_larosa = { + county = c_PHI_samar + + character_modifier = { + name = holy_site_biri_larosa_effect_name + monthly_piety_gain_mult = 0.1 + } +} + +pinatubo = { + county = c_PHI_tondo + + character_modifier = { + name = holy_site_pinatubo_effect_name + jungle_tax_mult = 0.15 + } +} + +ivatan = { + county = c_PHI_ivatan + + character_modifier = { + name = holy_site_pulag_effect_name + same_faith_opinion = 10 + } +} + +mantalingajan = { + county = c_PHI_south_palawan + + character_modifier = { + name = holy_site_mantalingajan_effect_name + monthly_prestige_gain_per_knight_mult = 0.01 + build_prestige_cost = -0.15 + } +} + +##################### +# Azhali # +##################### + +# Dali already covered elsewhere +# Kusinagara already covered elsewhere +# Pagan already covered elsewhere + +danai = { + county = c_myitkyina + + character_modifier = { + name = holy_site_danai_effect_name + owned_personal_scheme_success_chance_add = 5 + } +} + +magadha = { + county = c_magadha + + character_modifier = { + name = holy_site_magadha_effect_name + short_reign_duration_mult = -0.25 + } +} + +##################### +# Satsana Phi # +##################### + +# Qufu already covered elsewhere + +vien_chan = { + county = c_vien_chan + + character_modifier = { + name = holy_site_vien_chan_effect_name + sway_scheme_phase_duration_add = minor_scheme_phase_duration_bonus_value + } +} + +hsenwi = { + county = c_hsenwi + + character_modifier = { + name = holy_site_hsenwi_effect_name + personal_scheme_phase_duration_add = minor_scheme_phase_duration_bonus_value + } +} + +sukhothai = { + county = c_sukhothai + + character_modifier = { + name = holy_site_sukhothai_effect_name + owned_personal_scheme_success_chance_add = 5 + } +} + +cao_bang = { + county = c_binh_nguyen + + character_modifier = { + name = holy_site_cao_bang_effect_name + intrigue = 1 + } +} + +##################### +# Shamanism # +##################### + +# Tarayka already covered elsewhere + +molihewen = { + county = c_eman_molihewen + + character_modifier = { + name = holy_site_molihewen_effect_name + prowess_per_piety_level = 1 + } +} + +yam_alin = { + county = c_eman_yam_alin + + character_modifier = { + name = holy_site_yam_alin_effect_name martial = 1 } } + +chupka = { + county = c_chupka + + character_modifier = { + name = holy_site_kunasir_effect_name + controlled_province_advantage = 5 + } +} + +yizhou = { + county = c_BAL_dongpyeong_yizhou + + character_modifier = { + name = holy_site_yizhou_effect_name + levy_size = 0.1 + } +} + +##################### +# Utaki # +##################### + +# Fuji already covered elsewhere + +amandee = { + county = c_amami + barony = b_amami + + character_modifier = { + name = holy_site_amandee_effect_name + mountains_development_growth_factor = 0.2 + } +} + +sefa_utaki = { + county = c_ucinaa + barony = b_simajiri + + character_modifier = { + name = holy_site_sefa_utaki_effect_name + mountains_advantage = 5 + } +} + +tate = { + county = c_shinano + + character_modifier = { + name = holy_site_tate_effect_name + levy_size = 0.1 + } +} + +awa = { + county = c_awa + + character_modifier = { + name = holy_site_awa_effect_name + title_creation_cost_mult = -0.15 + } +} + +##################### +# Kaharingan # +##################### + +iban = { + county = c_BOR_iban + + character_modifier = { + name = holy_site_iban_effect_name + martial = 1 + supply_duration = 0.25 + } +} + +kudat = { + county = c_BOR_kudat + + character_modifier = { + name = holy_site_kudat_effect_name + jungle_advantage = 5 + } +} + +taiao = { + county = c_BOR_taiao + + character_modifier = { + name = holy_site_taiao_effect_name + advantage_against_coreligionists = 1 + } +} + +sukadana = { + county = c_BOR_sukadana + + character_modifier = { + name = holy_site_sukadana_effect_name + courtier_and_guest_opinion = 5 + councillor_opinion = 5 + } +} + +kutai = { + county = c_BOR_kutai_utara + + character_modifier = { + name = holy_site_kutai_effect_name + prowess_per_piety_level = 1 + } +} + +##################### +# Mingism # +##################### + +# Xi'an already covered elsewhere +# Luoyang already covered elsewhere +# Samarkand already covered elsewhere + +quanzhou = { + county = c_quanzhou + + character_modifier = { + name = holy_site_quanzhou_effect_name + monthly_piety_gain_mult = 0.1 + stress_loss_per_piety_level = 0.05 + } +} + +turpan = { + county = c_kara_khoja + barony = b_turpan + + character_modifier = { + name = holy_site_turpan_effect_name + development_growth_factor = 0.1 + } +} + +##################### +# Confucianism # +##################### + +qufu = { + county = c_yanzhou + barony = b_fuqu + + character_modifier = { + name = holy_site_qufu_effect_name + legitimacy_gain_mult = 0.1 + monthly_merit_mult = 0.05 + } +} + +quzhou = { + county = c_quzhou + + character_modifier = { + name = holy_site_quzhou_effect_name + negate_learning_penalty_add = 4 + } +} + +linzi = { + county = c_qingzhou + + character_modifier = { + name = holy_site_linzi_effect_name + monthly_piety_gain_mult = 0.15 + monthly_prestige_gain_mult = 0.05 + } +} + +bianliang = { + county = c_bianzhou + + character_modifier = { + name = holy_site_bianliang_effect_name + courtier_and_guest_opinion = 5 + councillor_opinion = 5 + } +} + +zhuolu = { + county = c_datong + + character_modifier = { + name = holy_site_zhuolu_effect_name + county_opinion_add = 5 + } +} + +dongting = { + county = c_langzhou_1 + + character_modifier = { + name = holy_site_dongting_effect_name + levy_reinforcement_rate_same_faith = 0.2 + } +} + +wehale = { + county = c_IDO_wehale + + character_modifier = { + name = holy_site_wehale_effect_name + cultural_head_fascination_mult = 0.15 + } +} + +qiongzhou = { + county = c_qiongzhou + + character_modifier = { + name = holy_site_qiongzhou_effect_name + controlled_province_advantage = 5 + } +} + +##################### +# Tolotang # +##################### + +# Sonba_i already covered elsewhere + +amparita = { + county = c_SuMa_ajatappareng + barony = b_SUL_Amparita + + character_modifier = { + name = holy_site_amparita_effect_name + jungle_tax_mult = 0.1 + } +} + +buru-sula = { + county = c_SuMa_buru-sula + + character_modifier = { + name = holy_site_buru_sula_effect_name + stewardship = 1 + } +} + +papua_selatan = { + county = c_papua_selatan + + character_modifier = { + name = holy_site_papua_selatan_effect_name + dread_gain_mult = 0.1 + } +} + +kepala_burung = { + county = c_kepala_burung + + character_modifier = { + name = holy_site_kepala_burung_effect_name + monthly_tyranny = -0.1 + tyranny_gain_mult = -0.2 + } +} + +##################### +# Hantuism # +##################### + +# Qiongzhou already covered elsewhere + +hoanya = { + county = c_hoanya + + character_modifier = { + name = holy_site_hoanya_effect_name + development_growth_factor = 0.1 + } +} + +sonba_i = { + county = c_IDO_sonba_i + + character_modifier = { + name = holy_site_sonba_i_effect_name + learning = 2 + } +} + +riak_nan_berbedur = { + county = c_SUM_riak_nan_berbedur + + character_modifier = { + name = holy_site_riak_nan_berbedur_effect_name + monthly_prestige_gain_mult = 0.2 + } +} + +gangganegara = { + county = c_MAL_gangganegara + + character_modifier = { + name = holy_site_gangganegara_effect_name + county_opinion_add = 10 + same_faith_opinion = 10 + } +} + +##################### +# Kamuyist # +##################### + +nutapkauspe = { + county = c_menas + barony = b_opereperkep + + character_modifier = { + name = holy_site_nutapkauspe_effect_name + supply_duration = 0.2 + men_at_arms_maintenance = -0.05 + } +} + +makkarinupuri = { + county = c_ioci + barony = b_aptapet_ainu + + character_modifier = { + name = holy_site_simenas_effect_name + controlled_province_advantage = 5 + } +} + +tarayka = { + county = c_tarayka + barony = b_tarayka + + character_modifier = { + name = holy_site_tarayka_effect_name + same_faith_opinion = 5 + } +} + +kamuykotan = { + county = c_iskar + barony = b_cup_pet + + character_modifier = { + name = holy_site_kamuykotan_effect_name + development_growth_factor = 0.1 + } +} + +hitakami = { + county = c_isawa + barony = b_isawa + + character_modifier = { + name = holy_site_uskes_effect_name + cultural_head_fascination_mult = 0.15 + } +} + +##################### +# Moism # +##################### + +nanning = { + county = c_yongzhou + + character_modifier = { + name = holy_site_nanning_effect_name + title_creation_cost_mult = -0.15 + } +} + +muze = { + county = c_muze + + character_modifier = { + name = holy_site_muze_effect_name + learning = 1 + } +} + +sizhou = { + county = c_jiangzhou_2 + + character_modifier = { + name = holy_site_sizhou_effect_name + monthly_prestige_gain_mult = 0.15 + } +} + +daozhou = { + county = c_daozhou + + character_modifier = { + name = holy_site_daozhou_effect_name + development_growth_factor = 0.1 + } +} + +anlong = { + county = c_yanchuan + + character_modifier = { + name = holy_site_anlong_effect_name + knight_effectiveness_mult = 0.2 + } +} + +##################### +# Dab Qhuas # +##################### + +# Anlong already covered elsewhere + +haripunjaya = { + county = c_haripunjaya + + character_modifier = { + name = holy_site_haripunjaya_effect_name + cultural_head_fascination_mult = 0.15 + } +} + +nguu_hong = { + county = c_quoc_oai + + character_modifier = { + name = holy_site_nguu_hong_effect_name + monthly_piety_gain_mult = 0.05 + } +} + +yangtze = { + county = c_ezhou + + character_modifier = { + name = holy_site_yangtze_effect_name + same_faith_opinion = 10 + dynasty_house_opinion = 5 + } +} + +zunyi = { + county = c_bozhou_1 + + character_modifier = { + name = holy_site_zunyi_effect_name + levy_reinforcement_rate_same_faith = 0.2 + } +} + +##################### +# Seon Buddhism # +##################### + +# Bodh Gaya already covered elsewhere +# Donggang already covered elsewhere +# Shaolin already covered elsewhere + +cheongju = { + county = c_cheongju + + character_modifier = { + name = holy_site_cheongju_effect_name + direct_vassal_opinion = 5 + } +} + +goseong = { + county = c_goseong + + character_modifier = { + name = holy_site_goseong_effect_name + monthly_piety = 1 + } +} + +##################### +# Other # +##################### + +baekdu = { # Mount Paektu/Baekdu + county = c_BAL_east_amnok + barony = b_FIC_Liao_Changbaishan + + character_modifier = { + name = holy_site_baekdu_effect_name + mountains_tax_mult = 0.15 + stress_loss_mult = 0.1 + } +} + +taebaek = { # Mount Taebaek + county = c_andong + + character_modifier = { + name = holy_site_taebaek_effect_name + monthly_prestige_gain_mult = 0.2 + same_faith_opinion = 5 + } +} + +halla = { # Mount Halla + county = c_tamna + + character_modifier = { + name = holy_site_halla_effect_name + fertility = 0.10 + monthly_lifestyle_xp_gain_mult = 0.15 + } +} + +mani = { # Mount Mani + county = c_gaeseong + + character_modifier = { + name = holy_site_mani_effect_name + legitimacy_gain_mult = 0.1 + county_opinion_add = 5 + } +} + +seorak = { # Mount Geumgang + county = c_goseong + + character_modifier = { + name = holy_site_seorak_effect_name + different_faith_opinion = 10 + } +} + +##################### +# Eastern Buddhism # +##################### + +sikong = { + county = c_qizhou_1 + + character_modifier = { + name = holy_site_mount_sikong_effect_name + monthly_county_control_growth_factor = 0.1 + } +} + +nanhua = { + county = c_caozhou + + character_modifier = { + name = holy_site_nanhua_effect_name + monthly_piety_gain_mult = 0.2 + } +} + +sarasvati = { + county = c_sarasvati + barony = b_sarasvati + + character_modifier = { + name = holy_site_sarasvati_effect_name + learning = 1 + } +} + +mount_lu = { + county = c_yunyang + barony = b_xunyang + + character_modifier = { + name = holy_site_mount_lu_effect_name + same_heritage_county_advantage_add = 2 + } +} + +nara = { + county = c_yamato + barony = b_kofuku_ji + + character_modifier = { + name = holy_site_nara_effect_name + same_faith_opinion = 5 + } +} + +vaishali = { + county = c_vaisali + barony = b_vaisali + + character_modifier = { + name = holy_site_vaishali_effect_name + monthly_piety = 0.5 + } +} + +mogao = { + county = c_shazhou + barony = b_mogao + + character_modifier = { + name = holy_site_mogao_effect_name + development_growth_factor = 0.1 + } +} + +luoyang = { + county = c_henan + barony = b_luoyang + + character_modifier = { + name = holy_site_luoyang_effect_name + county_opinion_add = 10 + diplomacy = 1 + } +} + +gaeseong = { + county = c_gaeseong + barony = b_Goryeo_Gaeseong_Gaeseong + + character_modifier = { + name = holy_site_gaeseong_effect_name + monthly_county_control_growth_factor = 0.1 + } +} + +tiantai = { + # Origin of Tiantai Buddhism, birthplace of Zhiyi + county = c_taizhou + + character_modifier = { + name = holy_site_tiantai_effect_name + learning = 2 + } +} + +hiei = { + # Main Tendai temple overlooking Kyoto + county = c_omi + barony = b_enryaku_ji + + character_modifier = { + name = holy_site_hiei_effect_name + monthly_piety_gain_mult = 0.2 + } +} + +heiankyo = { + county = c_yamashiro + barony = b_kyo + + character_modifier = { + name = holy_site_heiankyo_effect_name + monthly_piety_gain_mult = 0.2 + } +} + +kizuki = { + county = c_izumo + barony = b_kizuki_taisha + + character_modifier = { + name = holy_site_kizuki_effect_name + clergy_opinion = 5 + } +} + +kashima = { + county = c_hitachi + barony = b_kashima_hitachi + + character_modifier = { + name = holy_site_kashima_effect_name + tax_mult = 0.05 + } +} + + diff --git a/N3OW/common/script_values/00_activity_values.txt b/N3OW/common/script_values/00_activity_values.txt deleted file mode 100644 index 18e73e5f..00000000 --- a/N3OW/common/script_values/00_activity_values.txt +++ /dev/null @@ -1,2649 +0,0 @@ -####################### -# 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 - } - if = { - limit = { - is_ai = yes - has_game_rule = hard_difficulty - } - multiply = 0.5 - } - else_if = { - limit = { - is_ai = yes - has_game_rule = very_hard_difficulty - } - multiply = 0.25 - } -} - -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 - } - if = { - limit = { - is_ai = yes - has_game_rule = hard_difficulty - } - multiply = 0.5 - } - else_if = { - limit = { - is_ai = yes - has_game_rule = very_hard_difficulty - } - multiply = 0.25 - } -} - -# 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 - } - if = { - limit = { - is_ai = yes - has_game_rule = hard_difficulty - } - multiply = 0.5 - } - else_if = { - limit = { - is_ai = yes - has_game_rule = very_hard_difficulty - } - multiply = 0.25 - } -} - - -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.3 -} - -### 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 - if = { - limit = { - is_ai = yes - has_game_rule = hard_difficulty - } - multiply = 0.5 - } - else_if = { - limit = { - is_ai = yes - has_game_rule = very_hard_difficulty - } - multiply = 0.25 - } -} - -funeral_good_option_cost = { - value = 35 - multiply = activity_cost_scale_by_tier - multiply = activity_cost_scale_by_era - if = { - limit = { - is_ai = yes - has_game_rule = hard_difficulty - } - multiply = 0.5 - } - else_if = { - limit = { - is_ai = yes - has_game_rule = very_hard_difficulty - } - multiply = 0.25 - } -} - -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 = { - has_building_or_higher = wawel_cathedral_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 = { - has_building_or_higher = wawel_cathedral_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_fourth_try_modifier } - } - add = { - value = 30 - desc = inspection_success_chance.second_try_modifier - } - } - else_if = { - limit = { - activity_host = { is_ai = no } - activity_location = { has_province_modifier = inspection_third_try_modifier } - } - add = { - value = 20 - desc = inspection_success_chance.second_try_modifier - } - } - else_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/N3OW/common/script_values/00_age_values.txt b/N3OW/common/script_values/00_age_values.txt deleted file mode 100644 index 3276b07d..00000000 --- a/N3OW/common/script_values/00_age_values.txt +++ /dev/null @@ -1,126 +0,0 @@ - -#Childhood -childhood_personality_age = 3 -childhood_education_start_age = 6 - -adulthood_start_age = 16 - -age_plus_1 = { - value = age - add = 1 -} -age_plus_3 = { - value = age - add = 3 -} -age_plus_5 = { - value = age - add = 5 -} -age_plus_10 = { - value = age - add = 10 -} -age_plus_25 = { - value = age - add = 25 -} -age_minus_1 = { - value = age - subtract = 1 -} -age_minus_3 = { - value = age - subtract = 3 -} -age_minus_5 = { - value = age - subtract = 5 -} -age_minus_10 = { - value = age - subtract = 10 -} -age_minus_25 = { - value = age - subtract = 25 -} - - -age_dif_child_up = { - value = age - multiply = 1.4 -} - -age_dif_child_down = { - value = age - divide = 1.2 -} - - -age_dif_child_up_friend = { - value = age - multiply = 1.3 -} - -age_dif_child_down_friend = { - value = age - divide = 1.3 -} - -years_to_adulthood = { - value = adulthood_start_age - subtract = age - min = 0 -} - -less_than_two_years_to_adulthood_value = { - value = adulthood_start_age - subtract = 2 -} - -# Calculates the difference between the current scope and scope:comparator, with greater age difference resulting in lower negative numbers. Made to use with ordered lists to find characters close in age. -age_difference = { - value = age - subtract = scope:comparator.age - abs = yes - multiply = -1 -} - -grand_wedding_timeout = { - value = 3 #please update GRAND_WEDDING_PROMISE_INFO loc if this changes - if = { - limit = { - scope:spouse_1.age <= scope:spouse_2.age - } - add = scope:spouse_1.years_to_adulthood - } - else = { - add = scope:spouse_2.years_to_adulthood - } -} - -grand_wedding_timeout_alt = { - value = 3 #please update GRAND_WEDDING_PROMISE_INFO loc if this changes - if = { - limit = { - scope:temp_marriage_scope.age <= scope:temp_marriage_scope.betrothed.age - } - add = scope:temp_marriage_scope.years_to_adulthood - } - else = { - add = scope:temp_marriage_scope.betrothed.years_to_adulthood - } -} - -grand_wedding_timeout_notification = { - value = grand_wedding_timeout - multiply = 365 - subtract = 1 -} - -grand_wedding_timeout_notification_alt = { - value = grand_wedding_timeout_alt - multiply = 365 - subtract = 1 -} diff --git a/N3OW/common/script_values/00_ai_values.txt b/N3OW/common/script_values/00_ai_values.txt deleted file mode 100644 index 03b54445..00000000 --- a/N3OW/common/script_values/00_ai_values.txt +++ /dev/null @@ -1,2339 +0,0 @@ -#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 -} - -current_power_with_allies_value = { - value = military_power - every_ally = { add = military_power } -} - -current_power_ninety_percent_value = { - value = military_power - multiply = 0.9 -} - -# 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 = { - government_has_flag = government_is_nomadic - } - add = { - desc = government_is_nomadic - value = 0.15 - if = { - limit = { - max_military_strength >= 100 - domicile.num_domicile_buildings <= 4 - } - add = -0.2 - } - } - } - - - 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_has_flag = government_is_administrative - NOT = { vassal_contract_has_flag = admin_theme_civilian } - } - add = { - desc = ai_admin_vassal - value = 0.3 - } - } - - min = 0 - max = 0.9 - - if = { - limit = { - OR = { - government_has_flag = government_is_administrative - government_has_flag = government_is_nomadic - } - 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 fulfills 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_has_flag = government_is_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/N3OW/common/script_values/00_artifact_values.txt b/N3OW/common/script_values/00_artifact_values.txt deleted file mode 100644 index 107df551..00000000 --- a/N3OW/common/script_values/00_artifact_values.txt +++ /dev/null @@ -1,256 +0,0 @@ - - -low_high_wealth_cutoff = 50 # The mid-point between the minimum wealth of an artifact and the maximum wealth of an artifact. Currently minimum and maximum are 0 and 100, respectively. - -reforge_artifact_cost = { - value = { # Base cost is the missing durability - It shouldn't matter how often, or when, you repair an artifact - value = scope:artifact.artifact_max_durability - subtract = scope:artifact.artifact_durability - desc = "BASE" - } - if = { # Multiply base cost with artifact rarity - Except for trinkets - limit = { - scope:artifact = { rarity = illustrious } - } - multiply = { - value = 4 - desc = reforge_artifact_durability_desc - } - } - else_if = { - limit = { - scope:artifact = { rarity = famed } - } - multiply = { - value = 3 - desc = reforge_artifact_durability_desc - } - } - else_if = { - limit = { - scope:artifact = { rarity = masterwork } - } - multiply = { - value = 2 - desc = reforge_artifact_durability_desc - } - } -} - -# Used by AI when scoring artifacts for equipping -# Will be added to the score of -# code calculation: quality + wealth + (rarity * NDefines::NInventory::ARTIFACT_RARITY_AI_SCORE_MULT) + Scripted Template ai_score (if artifact has a scripted template) -# The score of this will be added to the score of above -# Best artifact will be selected to be equipped, and only artifacts with scores above 0 will be equipped. -# root: character - owner of the Artifact -# scope:artifact: artifact -# scope:current_weight: is the score from the code calculation -artifact_ai_will_equip_score = { - if = { # To prevent the AI from equipping actively detrimental artifacts - limit = { - exists = scope:artifact - scope:artifact = { - has_variable = cursed_artifact - } - } - add = { - value = -10000 - } - } -} - -# Used by AI when scoring artifacts for reforging -# Will be added to the score of -# code calculation: quality + wealth + (rarity * NDefines::NInventory::ARTIFACT_RARITY_AI_SCORE_MULT) + Scripted Template ai_score (if artifact has a scripted template) -# The score of this will be added to the score of above -# Best artifact will be selected to be reforged, and only artifacts with scores above 0 will be reforged. -# Only artifacts that are not good enough for equipping, will be considered for reforging - -# root: character - owner of the Artifact -# scope:artifact: artifact -# scope:current_weight: is the score from the code calculation -artifact_ai_will_reforge_score = { - if = { - limit = { - scope:artifact = { - artifact_slot_type = miscellaneous - } - } - multiply = { - value = 0 - } - } - if = { - limit = { - root = { - gold < 200 - } - } - multiply = { - value = 0 - } - } - if = { - limit = { - root = { - is_at_war = yes - } - } - multiply = { - value = 0 - } - } -} - -artifact_rarity = { - value = 1 - if = { - limit = { rarity = common } - add = 1 - } - else_if = { - limit = { rarity = masterwork } - add = 2 - } - else_if = { - limit = { rarity = famed } - add = 3 - } - else_if = { - limit = { rarity = illustrious } - add = 4 - } -} - -cheese_artifact_strength = { - value = scope:cheese_artifact.artifact_max_durability - subtract = scope:cheese_artifact.artifact_durability - multiply = -1 -} - -very_low_mummy_quality = 0 -low_mummy_quality = 100 -medium_mummy_quality = 250 -high_mummy_quality = 500 -very_high_mummy_quality = 1000 - -mummy_quality = { - value = 0 - # Am I a good person? - if = { - limit = { - num_virtuous_traits >= 1 - } - add = 50 - } - if = { # 100 - limit = { - num_virtuous_traits >= 2 - } - add = 50 - } - if = { # 250 - limit = { - num_virtuous_traits >= 3 - } - add = 250 - } - # Am I a bad person? - if = { - limit = { - num_sinful_traits >= 1 - } - add = -25 - } - if = { # -50 - limit = { - num_sinful_traits >= 2 - } - add = -25 - } - if = { # -100 - limit = { - num_sinful_traits >= 3 - } - add = -50 - } - # Am I a prestigious person? - if = { - limit = { - highest_held_title_tier >= tier_county - } - add = 25 - } - if = { # 50 - limit = { - highest_held_title_tier >= tier_duchy - } - add = 25 - } - if = { # 100 - limit = { - highest_held_title_tier >= tier_kingdom - } - add = 50 - } - if = { # 250 - limit = { - highest_held_title_tier >= tier_empire - } - add = 150 - } - # Am I a HoF? - if = { - limit = { - primary_title = { is_head_of_faith = yes } - } - add = 100 - } - # Traits that would make someone a good mummy probably - if = { - limit = { - has_trait = pilgrim - NOT = { - faith = { has_doctrine_parameter = forbidden_from_pilgrimage } - } - } - add = 25 - } - if = { - limit = { - has_trait = tourney_participant - } - add = 25 - } - if = { # Other lifestyles get 25 - limit = { - any_trait_in_category = { - category = lifestyle - count >= 1 - } - } - add = 25 - } - if = { - limit = { - OR = { - has_trait = education_intrigue_5 - has_trait = education_diplomacy_5 - has_trait = education_stewardship_5 - has_trait = education_martial_5 - has_trait = education_learning_5 - } - } - add = 25 - } - #Living Legend and Saints get more value - if = { - limit = { - OR = { - has_trait = legend - has_trait = saint - } - } - multiply = 1.5 - } -} diff --git a/N3OW/common/script_values/00_basic_values.txt b/N3OW/common/script_values/00_basic_values.txt deleted file mode 100644 index 02e23c9c..00000000 --- a/N3OW/common/script_values/00_basic_values.txt +++ /dev/null @@ -1,1969 +0,0 @@ -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 -prophecy_duration = 25 #years - -#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 - -minor_dread_value = 20 -medium_dread_value = 45 -major_dread_value = 70 -massive_dread_value = 95 - -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 -monumental_piety_value = 1000 - - -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 -} -monumental_piety_loss = { - value = 0 - subtract = monumental_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 -monumental_piety_gain = monumental_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 - if = { - limit = { - is_ai = no - has_game_rule = hard_difficulty - } - multiply = 3 - } - else_if = { - limit = { - is_ai = no - has_game_rule = very_hard_difficulty - } - multiply = 5 - } -} - -#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/N3OW/common/script_values/00_bastardy_values.txt b/N3OW/common/script_values/00_bastardy_values.txt deleted file mode 100644 index 7850482b..00000000 --- a/N3OW/common/script_values/00_bastardy_values.txt +++ /dev/null @@ -1,60 +0,0 @@ - - -bastard_legitimacy_change_cutoff_age = 6 - -real_father_suspicion_base_value = 50 -husband_suspicion_base_value = 3 - -bastard_legitimization_prestige_cost = 150 - -house_head_legitimize_acceptance_base_value = -100 - -house_head_legitimize_approval_rating = { - value = house_head_legitimize_acceptance_base_value - - if = { - limit = { - scope:the_house_head = scope:the_legitimizer - } - add = 1000 - } - - add = { - value = scope:the_legitimizer.prestige_level - multiply = 20 - } - - if = { - limit = { - scope:the_house_head = { - opinion = { - target = scope:the_legitimizer - value >= 50 - } - } - } - add = 51 - } - if = { - limit = { - scope:the_house_head = { - opinion = { - target = scope:the_bastard - value >= 80 - } - } - } - add = 51 - } - if = { - limit = { - scope:the_house_head = { - opinion = { - target = scope:the_legitimizer - value <= 0 - } - } - } - add = -30 - } -} \ No newline at end of file diff --git a/N3OW/common/script_values/00_building_values.txt b/N3OW/common/script_values/00_building_values.txt deleted file mode 100644 index 8407d622..00000000 --- a/N3OW/common/script_values/00_building_values.txt +++ /dev/null @@ -1,1824 +0,0 @@ -################### -# Building Values # -################### - -# Beware, this file is full of MATH! - -################### -# Values to edit! # -################### - -# These values control things like how building modifiers scale. -# You shouldn't have to change more than a few numbers to affect every single building in the game! - -####### -# Tax # -####### - -# Base -@poor_tax_base = 0.25 -@normal_tax_base = 0.35 -@good_tax_base = 0.5 -@excellent_tax_base = 0.7 - -@copper_mine_tax_base = 2 -@silver_mine_tax_base = 3 -@special_mine_tax_base = 5 - -# We have four 'tax classes', each one has a better scale than the others. -@poor_tax_scale_addition_per_tier = 0.15 -@normal_tax_scale_addition_per_tier = 0.2 -@good_tax_scale_addition_per_tier = 0.3 -@excellent_tax_scale_addition_per_tier = 0.45 - -@copper_mine_tax_scale_addition_per_tier = 1.5 -@silver_mine_tax_scale_addition_per_tier = 2 -@special_mine_tax_scale_addition_per_tier = 3 - -######## -# Levy # -######## - -# Base -@poor_levy_base = 50 -@small_levy_base = 75 -@normal_levy_base = 100 -@good_levy_base = 125 -@excellent_levy_base = 150 - -# Scaling Increase -@poor_levy_scale_addition_per_tier = 25 -@small_levy_scale_addition_per_tier = 50 -@normal_levy_scale_addition_per_tier = 75 -@good_levy_scale_addition_per_tier = 100 -@excellent_levy_scale_addition_per_tier = 125 - -################ -# Supply Limit # -################ - -# Base -@poor_supply_limit_base = 50 -@small_supply_limit_base = 100 -@normal_supply_limit_base = 200 -@good_supply_limit_base = 300 -@excellent_supply_limit_base = 400 - -# Scaling Increase -@poor_supply_limit_scale_addition_per_tier = 50 -@small_supply_limit_scale_addition_per_tier = 100 -@normal_supply_limit_scale_addition_per_tier = 200 -@good_supply_limit_scale_addition_per_tier = 300 -@excellent_supply_limit_scale_addition_per_tier = 400 - -################### -# MaA Maintenance # -################### - -# Base -@normal_maa_maintenance_base = -0.008 -@good_maa_maintenance_base = -0.016 - -# Scaling Increase -@normal_maa_maintenance_addition_per_tier = -0.008 -@good_maa_maintenance_addition_per_tier = -0.016 - -########################### -# Development Growth Flat # -########################### - -# Base -@normal_development_growth_base = 0.02 -@good_development_growth_base = 0.04 - -# Scaling Increase -@normal_development_growth_addition_per_tier = 0.02 -@good_development_growth_addition_per_tier = 0.04 - -######################## -# Development Growth % # -######################## - -# Base -@normal_development_growth_factor_base = 0.04 -@good_development_growth_factor_base = 0.06 - -# Scaling Increase -@normal_development_growth_factor_addition_per_tier = 0.04 -@good_development_growth_factor_addition_per_tier = 0.06 - -############ -# Tax Mult # -############ - -# Base -@low_tax_mult_base = 0.02 -@normal_tax_mult_base = 0.04 -@good_tax_mult_base = 0.06 - -# Scaling Increase -@low_tax_mult_addition_per_tier = 0.02 -@normal_tax_mult_addition_per_tier = 0.04 -@good_tax_mult_addition_per_tier = 0.06 - -############### -# MaA Bonuses # -############### - -# Base Damage Mult -@low_damage_mult_base = 0.10 -@normal_damage_mult_base = 0.15 -@high_damage_mult_base = 0.20 -@very_high_damage_mult_base = 0.30 - -# Scaling Increase Damage Mult -@low_damage_mult_addition_per_tier = 0.025 -@normal_damage_mult_addition_per_tier = 0.05 -@high_damage_mult_addition_per_tier = 0.10 -@very_high_damage_mult_addition_per_tier = 0.15 - - -# Base Toughness Mult -@low_toughness_mult_base = 0.10 -@normal_toughness_mult_base = 0.15 -@high_toughness_mult_base = 0.20 -@very_high_toughness_mult_base = 0.30 - -# Scaling Increase Toughness Mult -@low_toughness_mult_addition_per_tier = 0.025 -@normal_toughness_mult_addition_per_tier = 0.05 -@high_toughness_mult_addition_per_tier = 0.10 -@very_high_toughness_mult_addition_per_tier = 0.15 - - -# Base Screen Mult -@low_screen_mult_base = 0.10 -@normal_screen_mult_base = 0.15 -@high_screen_mult_base = 0.20 -@very_high_screen_mult_base = 0.30 - -# Scaling Increase Toughness Mult -@low_screen_mult_addition_per_tier = 0.025 -@normal_screen_mult_addition_per_tier = 0.05 -@high_screen_mult_addition_per_tier = 0.10 -@very_high_screen_mult_addition_per_tier = 0.15 - - -# Base Pursuit Mult -@low_pursuit_mult_base = 0.10 -@normal_pursuit_mult_base = 0.15 -@high_pursuit_mult_base = 0.20 -@very_high_pursuit_mult_base = 0.30 - -# Scaling Increase Pursuit Mult -@low_pursuit_mult_addition_per_tier = 0.025 -@normal_pursuit_mult_addition_per_tier = 0.05 -@high_pursuit_mult_addition_per_tier = 0.10 -@very_high_pursuit_mult_addition_per_tier = 0.15 - - -# Base Siege Value Mult -@low_siege_value_mult_base = 0.05 -@normal_siege_value_mult_base = 0.10 -@high_siege_value_mult_base = 0.15 -@very_high_siege_value_mult_base = 0.20 - -# Scaling Increase Siege Mult -@low_siege_value_mult_addition_per_tier = 0.025 -@normal_siege_value_mult_addition_per_tier = 0.05 -@high_siege_value_mult_addition_per_tier = 0.075 -@very_high_siege_value_mult_addition_per_tier = 0.10 - -################## -# Movement Speed # -################## - -# Base Movement Speed Value -@normal_movement_speed_base = 0.01 -@high_movement_speed_base = 0.02 - -# Scaling Increase Movement Speed -@normal_movement_speed_addition_per_tier = 0.01 -@high_movement_speed_addition_per_tier = 0.02 - -######################## -# Knight Effectiveness # -######################## - -# Base Knight Effectiveness Value -@normal_knight_effectiveness_mult_base = 0.01 -@high_knight_effectiveness_mult_base = 0.02 - -# Scaling Increase Knight Effectiveness -@normal_knight_effectiveness_mult_addition_per_tier = 0.01 -@high_knight_effectiveness_mult_addition_per_tier = 0.02 - -###################### -# Levy Reinforcement # -###################### - -# Base Levy Reinforcement Value -@normal_levy_reinforcement_rate_base = 0.1 -@high_levy_reinforcement_rate_base = 0.2 - -# Scaling Increase Levy Reinforcement -@normal_levy_reinforcement_rate_addition_per_tier = 0.05 -@high_levy_reinforcement_rate_addition_per_tier = 0.1 - -############ -# Garrison # -############ - -# Base -@normal_max_garrison_base = 150 -@good_max_garrison_base = 250 - -# Scaling Increase -@normal_max_garrison_scale_addition_per_tier = 150 -@good_max_garrison_scale_addition_per_tier = 250 - - -########################## -# Garrison Reinforcement # -########################## - -# Reinforcement rate: by default it takes 2,8 years to completly refill a garrison -@base_garrison_reinforcement_factor = 0.03 - -# Scaling increase: at level 8, it takes a bit less than 1 year to completly refill a garrison -@garrison_reinforcement_factor_addition_per_tier = 0.01 - - -# Tier values -@garrison_reinforcement_factor_tier_1 = @[base_garrison_reinforcement_factor] -@garrison_reinforcement_factor_tier_2 = @[garrison_reinforcement_factor_tier_1 + garrison_reinforcement_factor_addition_per_tier] -@garrison_reinforcement_factor_tier_3 = @[garrison_reinforcement_factor_tier_2 + garrison_reinforcement_factor_addition_per_tier] -@garrison_reinforcement_factor_tier_4 = @[garrison_reinforcement_factor_tier_3 + garrison_reinforcement_factor_addition_per_tier] -@garrison_reinforcement_factor_tier_5 = @[garrison_reinforcement_factor_tier_4 + garrison_reinforcement_factor_addition_per_tier] -@garrison_reinforcement_factor_tier_6 = @[garrison_reinforcement_factor_tier_5 + garrison_reinforcement_factor_addition_per_tier] -@garrison_reinforcement_factor_tier_7 = @[garrison_reinforcement_factor_tier_6 + garrison_reinforcement_factor_addition_per_tier] -@garrison_reinforcement_factor_tier_8 = @[garrison_reinforcement_factor_tier_7 + garrison_reinforcement_factor_addition_per_tier] - -############### -# Fort Levels # -############### - -# Base -@normal_fort_level_base = 1 -@good_fort_level_base = 2 -@great_fort_level_base = 1 - -# Scaling Increase -@normal_fort_level_scale_addition_per_tier = 1 -@good_fort_level_scale_addition_per_tier = 2 -@great_fort_level_scale_addition_per_tier = 3 - -############## -# Advantage # -############## - -# Base -@normal_advantage_base = 2 -@good_advantage_base = 3 - -# Scaling Increase -@normal_advantage_scale_addition_per_tier = 2 -@good_advantage_scale_addition_per_tier = 3 - - -################# -# Building Cost # -################# - -@cheap_cost_base = 100 -@normal_cost_base = 150 -@expensive_cost_base = 200 -@main_cost_base = 400 -@tribal_cost_base = 75 - -@building_cost_scaling_modifier_cheap = 0.1 -@building_cost_scaling_modifier_normal = 0.1 -@building_cost_scaling_modifier_expensive = 0.1 - -# We have four 'building cost classes', each one has a better scale than the others. -@cheap_cost_scale_addition_per_tier = 50 -@normal_cost_scale_addition_per_tier = 100 -@expensive_cost_scale_addition_per_tier = 150 -@main_cost_scale_addition_per_tier = 150 -@tribal_cost_scale_addition_per_tier = 25 - -##################### -# Construction Time # -##################### - -# Base -@very_quick_construction_time_base = 365 -@quick_construction_time_base = 730 -@standard_construction_time_base = 1095 -@slow_construction_time_base = 1825 -@very_slow_construction_time_base = 2190 - -##################### -# Build Speed Bonus # -##################### - -# Base -@normal_build_speed_base = -0.01 -@good_build_speed_base = -0.025 -@great_build_speed_base = -0.05 - -# Scaling Increase -@normal_build_speed_scale_addition_per_tier = -0.01 -@good_build_speed_scale_addition_per_tier = -0.025 -@great_build_speed_scale_addition_per_tier = -0.05 - -######## -# Misc # -######## - -building_disable_inefficient_value = { - add = domain_limit - add = building_disable_inefficient_value_add -} - -building_disable_inefficient_value_add = 5 - -########################################################################################### -# Nothing below this line should need to be edited if you want to change building balance # -########################################################################################### - -@poor_tax_tier_1 = @[poor_tax_base] -@poor_tax_tier_2 = @[poor_tax_tier_1 + poor_tax_scale_addition_per_tier] -@poor_tax_tier_3 = @[poor_tax_tier_2 + poor_tax_scale_addition_per_tier] -@poor_tax_tier_4 = @[poor_tax_tier_3 + poor_tax_scale_addition_per_tier] -@poor_tax_tier_5 = @[poor_tax_tier_4 + poor_tax_scale_addition_per_tier] -@poor_tax_tier_6 = @[poor_tax_tier_5 + poor_tax_scale_addition_per_tier] -@poor_tax_tier_7 = @[poor_tax_tier_6 + poor_tax_scale_addition_per_tier] -@poor_tax_tier_8 = @[poor_tax_tier_7 + poor_tax_scale_addition_per_tier] - -@normal_tax_tier_1 = @[normal_tax_base] -@normal_tax_tier_2 = @[normal_tax_tier_1 + normal_tax_scale_addition_per_tier] -@normal_tax_tier_3 = @[normal_tax_tier_2 + normal_tax_scale_addition_per_tier] -@normal_tax_tier_4 = @[normal_tax_tier_3 + normal_tax_scale_addition_per_tier] -@normal_tax_tier_5 = @[normal_tax_tier_4 + normal_tax_scale_addition_per_tier] -@normal_tax_tier_6 = @[normal_tax_tier_5 + normal_tax_scale_addition_per_tier] -@normal_tax_tier_7 = @[normal_tax_tier_6 + normal_tax_scale_addition_per_tier] -@normal_tax_tier_8 = @[normal_tax_tier_7 + normal_tax_scale_addition_per_tier] - -@good_tax_tier_1 = @[good_tax_base] -@good_tax_tier_2 = @[good_tax_tier_1 + good_tax_scale_addition_per_tier] -@good_tax_tier_3 = @[good_tax_tier_2 + good_tax_scale_addition_per_tier] -@good_tax_tier_4 = @[good_tax_tier_3 + good_tax_scale_addition_per_tier] -@good_tax_tier_5 = @[good_tax_tier_4 + good_tax_scale_addition_per_tier] -@good_tax_tier_6 = @[good_tax_tier_5 + good_tax_scale_addition_per_tier] -@good_tax_tier_7 = @[good_tax_tier_6 + good_tax_scale_addition_per_tier] -@good_tax_tier_8 = @[good_tax_tier_7 + good_tax_scale_addition_per_tier] - -@excellent_tax_tier_1 = @[excellent_tax_base] -@excellent_tax_tier_2 = @[excellent_tax_tier_1 + excellent_tax_scale_addition_per_tier] -@excellent_tax_tier_3 = @[excellent_tax_tier_2 + excellent_tax_scale_addition_per_tier] -@excellent_tax_tier_4 = @[excellent_tax_tier_3 + excellent_tax_scale_addition_per_tier] -@excellent_tax_tier_5 = @[excellent_tax_tier_4 + excellent_tax_scale_addition_per_tier] -@excellent_tax_tier_6 = @[excellent_tax_tier_5 + excellent_tax_scale_addition_per_tier] -@excellent_tax_tier_7 = @[excellent_tax_tier_6 + excellent_tax_scale_addition_per_tier] -@excellent_tax_tier_8 = @[excellent_tax_tier_7 + excellent_tax_scale_addition_per_tier] - -@special_mine_tax_tier_1 = @[special_mine_tax_base] -@special_mine_tax_tier_2 = @[special_mine_tax_tier_1 + special_mine_tax_scale_addition_per_tier] -@special_mine_tax_tier_3 = @[special_mine_tax_tier_2 + special_mine_tax_scale_addition_per_tier] -@special_mine_tax_tier_4 = @[special_mine_tax_tier_3 + special_mine_tax_scale_addition_per_tier] -@special_mine_tax_tier_5 = @[special_mine_tax_tier_4 + special_mine_tax_scale_addition_per_tier] -@special_mine_tax_tier_6 = @[special_mine_tax_tier_5 + special_mine_tax_scale_addition_per_tier] -@special_mine_tax_tier_7 = @[special_mine_tax_tier_6 + special_mine_tax_scale_addition_per_tier] -@special_mine_tax_tier_8 = @[special_mine_tax_tier_7 + special_mine_tax_scale_addition_per_tier] - -@copper_mine_tax_tier_1 = @[copper_mine_tax_base] -@copper_mine_tax_tier_2 = @[copper_mine_tax_tier_1 + copper_mine_tax_scale_addition_per_tier] -@copper_mine_tax_tier_3 = @[copper_mine_tax_tier_2 + copper_mine_tax_scale_addition_per_tier] -@copper_mine_tax_tier_4 = @[copper_mine_tax_tier_3 + copper_mine_tax_scale_addition_per_tier] -@copper_mine_tax_tier_5 = @[copper_mine_tax_tier_4 + copper_mine_tax_scale_addition_per_tier] -@copper_mine_tax_tier_6 = @[copper_mine_tax_tier_5 + copper_mine_tax_scale_addition_per_tier] -@copper_mine_tax_tier_7 = @[copper_mine_tax_tier_6 + copper_mine_tax_scale_addition_per_tier] -@copper_mine_tax_tier_8 = @[copper_mine_tax_tier_7 + copper_mine_tax_scale_addition_per_tier] - -@silver_mine_tax_tier_1 = @[silver_mine_tax_base] -@silver_mine_tax_tier_2 = @[silver_mine_tax_tier_1 + silver_mine_tax_scale_addition_per_tier] -@silver_mine_tax_tier_3 = @[silver_mine_tax_tier_2 + silver_mine_tax_scale_addition_per_tier] -@silver_mine_tax_tier_4 = @[silver_mine_tax_tier_3 + silver_mine_tax_scale_addition_per_tier] -@silver_mine_tax_tier_5 = @[silver_mine_tax_tier_4 + silver_mine_tax_scale_addition_per_tier] -@silver_mine_tax_tier_6 = @[silver_mine_tax_tier_5 + silver_mine_tax_scale_addition_per_tier] -@silver_mine_tax_tier_7 = @[silver_mine_tax_tier_6 + silver_mine_tax_scale_addition_per_tier] -@silver_mine_tax_tier_8 = @[silver_mine_tax_tier_7 + silver_mine_tax_scale_addition_per_tier] - -@poor_supply_limit_tier_1 = @[poor_supply_limit_base] -@poor_supply_limit_tier_2 = @[poor_supply_limit_tier_1 + poor_supply_limit_scale_addition_per_tier] -@poor_supply_limit_tier_3 = @[poor_supply_limit_tier_2 + poor_supply_limit_scale_addition_per_tier] -@poor_supply_limit_tier_4 = @[poor_supply_limit_tier_3 + poor_supply_limit_scale_addition_per_tier] -@poor_supply_limit_tier_5 = @[poor_supply_limit_tier_4 + poor_supply_limit_scale_addition_per_tier] -@poor_supply_limit_tier_6 = @[poor_supply_limit_tier_5 + poor_supply_limit_scale_addition_per_tier] -@poor_supply_limit_tier_7 = @[poor_supply_limit_tier_6 + poor_supply_limit_scale_addition_per_tier] -@poor_supply_limit_tier_8 = @[poor_supply_limit_tier_7 + poor_supply_limit_scale_addition_per_tier] - -@small_supply_limit_tier_1 = @[small_supply_limit_base] -@small_supply_limit_tier_2 = @[small_supply_limit_tier_1 + small_supply_limit_scale_addition_per_tier] -@small_supply_limit_tier_3 = @[small_supply_limit_tier_2 + small_supply_limit_scale_addition_per_tier] -@small_supply_limit_tier_4 = @[small_supply_limit_tier_3 + small_supply_limit_scale_addition_per_tier] -@small_supply_limit_tier_5 = @[small_supply_limit_tier_4 + small_supply_limit_scale_addition_per_tier] -@small_supply_limit_tier_6 = @[small_supply_limit_tier_5 + small_supply_limit_scale_addition_per_tier] -@small_supply_limit_tier_7 = @[small_supply_limit_tier_6 + small_supply_limit_scale_addition_per_tier] -@small_supply_limit_tier_8 = @[small_supply_limit_tier_7 + small_supply_limit_scale_addition_per_tier] - -@normal_supply_limit_tier_1 = @[normal_supply_limit_base] -@normal_supply_limit_tier_2 = @[normal_supply_limit_tier_1 + normal_supply_limit_scale_addition_per_tier] -@normal_supply_limit_tier_3 = @[normal_supply_limit_tier_2 + normal_supply_limit_scale_addition_per_tier] -@normal_supply_limit_tier_4 = @[normal_supply_limit_tier_3 + normal_supply_limit_scale_addition_per_tier] -@normal_supply_limit_tier_5 = @[normal_supply_limit_tier_4 + normal_supply_limit_scale_addition_per_tier] -@normal_supply_limit_tier_6 = @[normal_supply_limit_tier_5 + normal_supply_limit_scale_addition_per_tier] -@normal_supply_limit_tier_7 = @[normal_supply_limit_tier_6 + normal_supply_limit_scale_addition_per_tier] -@normal_supply_limit_tier_8 = @[normal_supply_limit_tier_7 + normal_supply_limit_scale_addition_per_tier] - -@good_supply_limit_tier_1 = @[good_supply_limit_base] -@good_supply_limit_tier_2 = @[good_supply_limit_tier_1 + good_supply_limit_scale_addition_per_tier] -@good_supply_limit_tier_3 = @[good_supply_limit_tier_2 + good_supply_limit_scale_addition_per_tier] -@good_supply_limit_tier_4 = @[good_supply_limit_tier_3 + good_supply_limit_scale_addition_per_tier] -@good_supply_limit_tier_5 = @[good_supply_limit_tier_4 + good_supply_limit_scale_addition_per_tier] -@good_supply_limit_tier_6 = @[good_supply_limit_tier_5 + good_supply_limit_scale_addition_per_tier] -@good_supply_limit_tier_7 = @[good_supply_limit_tier_6 + good_supply_limit_scale_addition_per_tier] -@good_supply_limit_tier_8 = @[good_supply_limit_tier_7 + good_supply_limit_scale_addition_per_tier] - -@excellent_supply_limit_tier_1 = @[excellent_supply_limit_base] -@excellent_supply_limit_tier_2 = @[excellent_supply_limit_tier_1 + excellent_supply_limit_scale_addition_per_tier] -@excellent_supply_limit_tier_3 = @[excellent_supply_limit_tier_2 + excellent_supply_limit_scale_addition_per_tier] -@excellent_supply_limit_tier_4 = @[excellent_supply_limit_tier_3 + excellent_supply_limit_scale_addition_per_tier] -@excellent_supply_limit_tier_5 = @[excellent_supply_limit_tier_4 + excellent_supply_limit_scale_addition_per_tier] -@excellent_supply_limit_tier_6 = @[excellent_supply_limit_tier_5 + excellent_supply_limit_scale_addition_per_tier] -@excellent_supply_limit_tier_7 = @[excellent_supply_limit_tier_6 + excellent_supply_limit_scale_addition_per_tier] -@excellent_supply_limit_tier_8 = @[excellent_supply_limit_tier_7 + excellent_supply_limit_scale_addition_per_tier] - -@poor_levy_tier_1 = @[poor_levy_base] -@poor_levy_tier_2 = @[poor_levy_tier_1 + poor_levy_scale_addition_per_tier] -@poor_levy_tier_3 = @[poor_levy_tier_2 + poor_levy_scale_addition_per_tier] -@poor_levy_tier_4 = @[poor_levy_tier_3 + poor_levy_scale_addition_per_tier] -@poor_levy_tier_5 = @[poor_levy_tier_4 + poor_levy_scale_addition_per_tier] -@poor_levy_tier_6 = @[poor_levy_tier_5 + poor_levy_scale_addition_per_tier] -@poor_levy_tier_7 = @[poor_levy_tier_6 + poor_levy_scale_addition_per_tier] -@poor_levy_tier_8 = @[poor_levy_tier_7 + poor_levy_scale_addition_per_tier] - -@small_levy_tier_1 = @[small_levy_base] -@small_levy_tier_2 = @[small_levy_tier_1 + small_levy_scale_addition_per_tier] -@small_levy_tier_3 = @[small_levy_tier_2 + small_levy_scale_addition_per_tier] -@small_levy_tier_4 = @[small_levy_tier_3 + small_levy_scale_addition_per_tier] -@small_levy_tier_5 = @[small_levy_tier_4 + small_levy_scale_addition_per_tier] -@small_levy_tier_6 = @[small_levy_tier_5 + small_levy_scale_addition_per_tier] -@small_levy_tier_7 = @[small_levy_tier_6 + small_levy_scale_addition_per_tier] -@small_levy_tier_8 = @[small_levy_tier_7 + small_levy_scale_addition_per_tier] - -@normal_levy_tier_1 = @[normal_levy_base] -@normal_levy_tier_2 = @[normal_levy_tier_1 + normal_levy_scale_addition_per_tier] -@normal_levy_tier_3 = @[normal_levy_tier_2 + normal_levy_scale_addition_per_tier] -@normal_levy_tier_4 = @[normal_levy_tier_3 + normal_levy_scale_addition_per_tier] -@normal_levy_tier_5 = @[normal_levy_tier_4 + normal_levy_scale_addition_per_tier] -@normal_levy_tier_6 = @[normal_levy_tier_5 + normal_levy_scale_addition_per_tier] -@normal_levy_tier_7 = @[normal_levy_tier_6 + normal_levy_scale_addition_per_tier] -@normal_levy_tier_8 = @[normal_levy_tier_7 + normal_levy_scale_addition_per_tier] - -@good_levy_tier_1 = @[good_levy_base] -@good_levy_tier_2 = @[good_levy_tier_1 + good_levy_scale_addition_per_tier] -@good_levy_tier_3 = @[good_levy_tier_2 + good_levy_scale_addition_per_tier] -@good_levy_tier_4 = @[good_levy_tier_3 + good_levy_scale_addition_per_tier] -@good_levy_tier_5 = @[good_levy_tier_4 + good_levy_scale_addition_per_tier] -@good_levy_tier_6 = @[good_levy_tier_5 + good_levy_scale_addition_per_tier] -@good_levy_tier_7 = @[good_levy_tier_6 + good_levy_scale_addition_per_tier] -@good_levy_tier_8 = @[good_levy_tier_7 + good_levy_scale_addition_per_tier] - -@excellent_levy_tier_1 = @[excellent_levy_base] -@excellent_levy_tier_2 = @[excellent_levy_tier_1 + excellent_levy_scale_addition_per_tier] -@excellent_levy_tier_3 = @[excellent_levy_tier_2 + excellent_levy_scale_addition_per_tier] -@excellent_levy_tier_4 = @[excellent_levy_tier_3 + excellent_levy_scale_addition_per_tier] -@excellent_levy_tier_5 = @[excellent_levy_tier_4 + excellent_levy_scale_addition_per_tier] -@excellent_levy_tier_6 = @[excellent_levy_tier_5 + excellent_levy_scale_addition_per_tier] -@excellent_levy_tier_7 = @[excellent_levy_tier_6 + excellent_levy_scale_addition_per_tier] -@excellent_levy_tier_8 = @[excellent_levy_tier_7 + excellent_levy_scale_addition_per_tier] - -@normal_max_garrison_tier_1 = @[normal_max_garrison_base] -@normal_max_garrison_tier_2 = @[normal_max_garrison_tier_1 + normal_max_garrison_scale_addition_per_tier] -@normal_max_garrison_tier_3 = @[normal_max_garrison_tier_2 + normal_max_garrison_scale_addition_per_tier] -@normal_max_garrison_tier_4 = @[normal_max_garrison_tier_3 + normal_max_garrison_scale_addition_per_tier] -@normal_max_garrison_tier_5 = @[normal_max_garrison_tier_4 + normal_max_garrison_scale_addition_per_tier] -@normal_max_garrison_tier_6 = @[normal_max_garrison_tier_5 + normal_max_garrison_scale_addition_per_tier] -@normal_max_garrison_tier_7 = @[normal_max_garrison_tier_6 + normal_max_garrison_scale_addition_per_tier] -@normal_max_garrison_tier_8 = @[normal_max_garrison_tier_7 + normal_max_garrison_scale_addition_per_tier] - -@good_max_garrison_tier_1 = @[good_max_garrison_base] -@good_max_garrison_tier_2 = @[good_max_garrison_tier_1 + good_max_garrison_scale_addition_per_tier] -@good_max_garrison_tier_3 = @[good_max_garrison_tier_2 + good_max_garrison_scale_addition_per_tier] -@good_max_garrison_tier_4 = @[good_max_garrison_tier_3 + good_max_garrison_scale_addition_per_tier] -@good_max_garrison_tier_5 = @[good_max_garrison_tier_4 + good_max_garrison_scale_addition_per_tier] -@good_max_garrison_tier_6 = @[good_max_garrison_tier_5 + good_max_garrison_scale_addition_per_tier] -@good_max_garrison_tier_7 = @[good_max_garrison_tier_6 + good_max_garrison_scale_addition_per_tier] -@good_max_garrison_tier_8 = @[good_max_garrison_tier_7 + good_max_garrison_scale_addition_per_tier] - -@normal_build_speed_tier_1 = @[normal_build_speed_base] -@normal_build_speed_tier_2 = @[normal_build_speed_tier_1 + normal_build_speed_scale_addition_per_tier] -@normal_build_speed_tier_3 = @[normal_build_speed_tier_2 + normal_build_speed_scale_addition_per_tier] -@normal_build_speed_tier_4 = @[normal_build_speed_tier_3 + normal_build_speed_scale_addition_per_tier] -@normal_build_speed_tier_5 = @[normal_build_speed_tier_4 + normal_build_speed_scale_addition_per_tier] -@normal_build_speed_tier_6 = @[normal_build_speed_tier_5 + normal_build_speed_scale_addition_per_tier] -@normal_build_speed_tier_7 = @[normal_build_speed_tier_6 + normal_build_speed_scale_addition_per_tier] -@normal_build_speed_tier_8 = @[normal_build_speed_tier_7 + normal_build_speed_scale_addition_per_tier] - -@good_build_speed_tier_1 = @[good_build_speed_base] -@good_build_speed_tier_2 = @[good_build_speed_tier_1 + good_build_speed_scale_addition_per_tier] -@good_build_speed_tier_3 = @[good_build_speed_tier_2 + good_build_speed_scale_addition_per_tier] -@good_build_speed_tier_4 = @[good_build_speed_tier_3 + good_build_speed_scale_addition_per_tier] -@good_build_speed_tier_5 = @[good_build_speed_tier_4 + good_build_speed_scale_addition_per_tier] -@good_build_speed_tier_6 = @[good_build_speed_tier_5 + good_build_speed_scale_addition_per_tier] -@good_build_speed_tier_7 = @[good_build_speed_tier_6 + good_build_speed_scale_addition_per_tier] -@good_build_speed_tier_8 = @[good_build_speed_tier_7 + good_build_speed_scale_addition_per_tier] - -@great_build_speed_tier_1 = @[great_build_speed_base] -@great_build_speed_tier_2 = @[great_build_speed_tier_1 + great_build_speed_scale_addition_per_tier] -@great_build_speed_tier_3 = @[great_build_speed_tier_2 + great_build_speed_scale_addition_per_tier] -@great_build_speed_tier_4 = @[great_build_speed_tier_3 + great_build_speed_scale_addition_per_tier] -@great_build_speed_tier_5 = @[great_build_speed_tier_4 + great_build_speed_scale_addition_per_tier] -@great_build_speed_tier_6 = @[great_build_speed_tier_5 + great_build_speed_scale_addition_per_tier] -@great_build_speed_tier_7 = @[great_build_speed_tier_6 + great_build_speed_scale_addition_per_tier] -@great_build_speed_tier_8 = @[great_build_speed_tier_7 + great_build_speed_scale_addition_per_tier] - -@normal_fort_level_tier_1 = @[normal_fort_level_base] -@normal_fort_level_tier_2 = @[normal_fort_level_tier_1 + normal_fort_level_scale_addition_per_tier] -@normal_fort_level_tier_3 = @[normal_fort_level_tier_2 + normal_fort_level_scale_addition_per_tier] -@normal_fort_level_tier_4 = @[normal_fort_level_tier_3 + normal_fort_level_scale_addition_per_tier] -@normal_fort_level_tier_5 = @[normal_fort_level_tier_4 + normal_fort_level_scale_addition_per_tier] -@normal_fort_level_tier_6 = @[normal_fort_level_tier_5 + normal_fort_level_scale_addition_per_tier] -@normal_fort_level_tier_7 = @[normal_fort_level_tier_6 + normal_fort_level_scale_addition_per_tier] -@normal_fort_level_tier_8 = @[normal_fort_level_tier_7 + normal_fort_level_scale_addition_per_tier] - -@good_fort_level_tier_1 = @[good_fort_level_base] -@good_fort_level_tier_2 = @[good_fort_level_tier_1 + good_fort_level_scale_addition_per_tier] -@good_fort_level_tier_3 = @[good_fort_level_tier_2 + good_fort_level_scale_addition_per_tier] -@good_fort_level_tier_4 = @[good_fort_level_tier_3 + good_fort_level_scale_addition_per_tier] -@good_fort_level_tier_5 = @[good_fort_level_tier_4 + good_fort_level_scale_addition_per_tier] -@good_fort_level_tier_6 = @[good_fort_level_tier_5 + good_fort_level_scale_addition_per_tier] -@good_fort_level_tier_7 = @[good_fort_level_tier_6 + good_fort_level_scale_addition_per_tier] -@good_fort_level_tier_8 = @[good_fort_level_tier_7 + good_fort_level_scale_addition_per_tier] - -@great_fort_level_tier_1 = @[great_fort_level_base] -@great_fort_level_tier_2 = @[great_fort_level_tier_1 + great_fort_level_scale_addition_per_tier] -@great_fort_level_tier_3 = @[great_fort_level_tier_2 + great_fort_level_scale_addition_per_tier + 1] -@great_fort_level_tier_4 = @[great_fort_level_tier_3 + great_fort_level_scale_addition_per_tier + 2] -@great_fort_level_tier_5 = @[great_fort_level_tier_4 + great_fort_level_scale_addition_per_tier + 3] -@great_fort_level_tier_6 = @[great_fort_level_tier_5 + great_fort_level_scale_addition_per_tier + 4] -@great_fort_level_tier_7 = @[great_fort_level_tier_6 + great_fort_level_scale_addition_per_tier + 5] -@great_fort_level_tier_8 = @[great_fort_level_tier_7 + great_fort_level_scale_addition_per_tier + 6] - -@normal_advantage_tier_1 = @[normal_advantage_base] -@normal_advantage_tier_2 = @[normal_advantage_tier_1 + normal_advantage_scale_addition_per_tier] -@normal_advantage_tier_3 = @[normal_advantage_tier_2 + normal_advantage_scale_addition_per_tier] -@normal_advantage_tier_4 = @[normal_advantage_tier_3 + normal_advantage_scale_addition_per_tier] -@normal_advantage_tier_5 = @[normal_advantage_tier_4 + normal_advantage_scale_addition_per_tier] -@normal_advantage_tier_6 = @[normal_advantage_tier_5 + normal_advantage_scale_addition_per_tier] -@normal_advantage_tier_7 = @[normal_advantage_tier_6 + normal_advantage_scale_addition_per_tier] -@normal_advantage_tier_8 = @[normal_advantage_tier_7 + normal_advantage_scale_addition_per_tier] - -@good_advantage_tier_1 = @[good_advantage_base] -@good_advantage_tier_2 = @[good_advantage_tier_1 + good_advantage_scale_addition_per_tier] -@good_advantage_tier_3 = @[good_advantage_tier_2 + good_advantage_scale_addition_per_tier] -@good_advantage_tier_4 = @[good_advantage_tier_3 + good_advantage_scale_addition_per_tier] -@good_advantage_tier_5 = @[good_advantage_tier_4 + good_advantage_scale_addition_per_tier] -@good_advantage_tier_6 = @[good_advantage_tier_5 + good_advantage_scale_addition_per_tier] -@good_advantage_tier_7 = @[good_advantage_tier_6 + good_advantage_scale_addition_per_tier] -@good_advantage_tier_8 = @[good_advantage_tier_7 + good_advantage_scale_addition_per_tier] - -@cheap_cost_tier_1 = @[cheap_cost_base] #values progress quadratically with for from T3 onwards. The addition at the end is to have nice, round numbers displayed -@cheap_cost_tier_2 = @[cheap_cost_tier_1 + cheap_cost_scale_addition_per_tier] -@cheap_cost_tier_3 = @[cheap_cost_tier_2 + 3*3*cheap_cost_scale_addition_per_tier*building_cost_scaling_modifier_cheap + 0] -@cheap_cost_tier_4 = @[cheap_cost_tier_3 + 4*4*cheap_cost_scale_addition_per_tier*building_cost_scaling_modifier_cheap + 0] -@cheap_cost_tier_5 = @[cheap_cost_tier_4 + 5*5*cheap_cost_scale_addition_per_tier*building_cost_scaling_modifier_cheap + 0] -@cheap_cost_tier_6 = @[cheap_cost_tier_5 + 6*6*cheap_cost_scale_addition_per_tier*building_cost_scaling_modifier_cheap + 0] -@cheap_cost_tier_7 = @[cheap_cost_tier_6 + 7*7*cheap_cost_scale_addition_per_tier*building_cost_scaling_modifier_cheap + 0] -@cheap_cost_tier_8 = @[cheap_cost_tier_7 + 8*8*cheap_cost_scale_addition_per_tier*building_cost_scaling_modifier_cheap + 0] - -@normal_cost_tier_1 = @[normal_cost_base] #values progress quadratically with for from T3 onwards. The addition at the end is to have nice, round numbers displayed -@normal_cost_tier_2 = @[normal_cost_tier_1 + normal_cost_scale_addition_per_tier] -@normal_cost_tier_3 = @[normal_cost_tier_2 + 3*3*normal_cost_scale_addition_per_tier*building_cost_scaling_modifier_normal + 0] -@normal_cost_tier_4 = @[normal_cost_tier_3 + 4*4*normal_cost_scale_addition_per_tier*building_cost_scaling_modifier_normal + 0] -@normal_cost_tier_5 = @[normal_cost_tier_4 + 5*5*normal_cost_scale_addition_per_tier*building_cost_scaling_modifier_normal + 0] -@normal_cost_tier_6 = @[normal_cost_tier_5 + 6*6*normal_cost_scale_addition_per_tier*building_cost_scaling_modifier_normal + 0] -@normal_cost_tier_7 = @[normal_cost_tier_6 + 7*7*normal_cost_scale_addition_per_tier*building_cost_scaling_modifier_normal + 0] -@normal_cost_tier_8 = @[normal_cost_tier_7 + 8*8*normal_cost_scale_addition_per_tier*building_cost_scaling_modifier_normal + 0] - -@expensive_cost_tier_1 = @[expensive_cost_base] #values progress quadratically for tiers from T3 onwards. The addition at the end is to have nice, round numbers displayed -@expensive_cost_tier_2 = @[expensive_cost_tier_1 + expensive_cost_scale_addition_per_tier] -@expensive_cost_tier_3 = @[expensive_cost_tier_2 + 3*3*expensive_cost_scale_addition_per_tier*building_cost_scaling_modifier_expensive + 0] -@expensive_cost_tier_4 = @[expensive_cost_tier_3 + 4*4*expensive_cost_scale_addition_per_tier*building_cost_scaling_modifier_expensive + 0] -@expensive_cost_tier_5 = @[expensive_cost_tier_4 + 5*5*expensive_cost_scale_addition_per_tier*building_cost_scaling_modifier_expensive + 0] -@expensive_cost_tier_6 = @[expensive_cost_tier_5 + 6*6*expensive_cost_scale_addition_per_tier*building_cost_scaling_modifier_expensive + 0] -@expensive_cost_tier_7 = @[expensive_cost_tier_6 + 7*7*expensive_cost_scale_addition_per_tier*building_cost_scaling_modifier_expensive + 0] -@expensive_cost_tier_8 = @[expensive_cost_tier_7 + 8*8*expensive_cost_scale_addition_per_tier*building_cost_scaling_modifier_expensive + 0] - -@main_cost_tier_1 = @[main_cost_base] -@main_cost_tier_2 = @[main_cost_tier_1 + main_cost_scale_addition_per_tier] -@main_cost_tier_3 = @[main_cost_tier_2 + main_cost_scale_addition_per_tier] -@main_cost_tier_4 = @[main_cost_tier_3 + main_cost_scale_addition_per_tier] -@main_cost_tier_5 = @[main_cost_tier_4 + main_cost_scale_addition_per_tier] - -@normal_maa_maintenance_tier_1 = @[normal_maa_maintenance_base] -@normal_maa_maintenance_tier_2 = @[normal_maa_maintenance_tier_1 + normal_maa_maintenance_addition_per_tier] -@normal_maa_maintenance_tier_3 = @[normal_maa_maintenance_tier_2 + normal_maa_maintenance_addition_per_tier] -@normal_maa_maintenance_tier_4 = @[normal_maa_maintenance_tier_3 + normal_maa_maintenance_addition_per_tier] -@normal_maa_maintenance_tier_5 = @[normal_maa_maintenance_tier_4 + normal_maa_maintenance_addition_per_tier] -@normal_maa_maintenance_tier_6 = @[normal_maa_maintenance_tier_5 + normal_maa_maintenance_addition_per_tier] -@normal_maa_maintenance_tier_7 = @[normal_maa_maintenance_tier_6 + normal_maa_maintenance_addition_per_tier] -@normal_maa_maintenance_tier_8 = @[normal_maa_maintenance_tier_7 + normal_maa_maintenance_addition_per_tier] - -@good_maa_maintenance_tier_1 = @[good_maa_maintenance_base] -@good_maa_maintenance_tier_2 = @[good_maa_maintenance_tier_1 + normal_maa_maintenance_addition_per_tier] -@good_maa_maintenance_tier_3 = @[good_maa_maintenance_tier_2 + normal_maa_maintenance_addition_per_tier] -@good_maa_maintenance_tier_4 = @[good_maa_maintenance_tier_3 + normal_maa_maintenance_addition_per_tier] -@good_maa_maintenance_tier_5 = @[good_maa_maintenance_tier_4 + normal_maa_maintenance_addition_per_tier] -@good_maa_maintenance_tier_6 = @[good_maa_maintenance_tier_5 + normal_maa_maintenance_addition_per_tier] -@good_maa_maintenance_tier_7 = @[good_maa_maintenance_tier_6 + normal_maa_maintenance_addition_per_tier] -@good_maa_maintenance_tier_8 = @[good_maa_maintenance_tier_7 + normal_maa_maintenance_addition_per_tier] - -@normal_development_growth_tier_1 = @[normal_development_growth_base] -@normal_development_growth_tier_2 = @[normal_development_growth_tier_1 + normal_development_growth_addition_per_tier] -@normal_development_growth_tier_3 = @[normal_development_growth_tier_2 + normal_development_growth_addition_per_tier] -@normal_development_growth_tier_4 = @[normal_development_growth_tier_3 + normal_development_growth_addition_per_tier] -@normal_development_growth_tier_5 = @[normal_development_growth_tier_4 + normal_development_growth_addition_per_tier] -@normal_development_growth_tier_6 = @[normal_development_growth_tier_5 + normal_development_growth_addition_per_tier] -@normal_development_growth_tier_7 = @[normal_development_growth_tier_6 + normal_development_growth_addition_per_tier] -@normal_development_growth_tier_8 = @[normal_development_growth_tier_7 + normal_development_growth_addition_per_tier] - -@good_development_growth_tier_1 = @[good_development_growth_base] -@good_development_growth_tier_2 = @[good_development_growth_tier_1 + normal_development_growth_addition_per_tier] -@good_development_growth_tier_3 = @[good_development_growth_tier_2 + normal_development_growth_addition_per_tier] -@good_development_growth_tier_4 = @[good_development_growth_tier_3 + normal_development_growth_addition_per_tier] -@good_development_growth_tier_5 = @[good_development_growth_tier_4 + normal_development_growth_addition_per_tier] -@good_development_growth_tier_6 = @[good_development_growth_tier_5 + normal_development_growth_addition_per_tier] -@good_development_growth_tier_7 = @[good_development_growth_tier_6 + normal_development_growth_addition_per_tier] -@good_development_growth_tier_8 = @[good_development_growth_tier_7 + normal_development_growth_addition_per_tier] - -@normal_development_growth_factor_tier_1 = @[normal_development_growth_factor_base] -@normal_development_growth_factor_tier_2 = @[normal_development_growth_factor_tier_1 + normal_development_growth_factor_addition_per_tier] -@normal_development_growth_factor_tier_3 = @[normal_development_growth_factor_tier_2 + normal_development_growth_factor_addition_per_tier] -@normal_development_growth_factor_tier_4 = @[normal_development_growth_factor_tier_3 + normal_development_growth_factor_addition_per_tier] -@normal_development_growth_factor_tier_5 = @[normal_development_growth_factor_tier_4 + normal_development_growth_factor_addition_per_tier] -@normal_development_growth_factor_tier_6 = @[normal_development_growth_factor_tier_5 + normal_development_growth_factor_addition_per_tier] -@normal_development_growth_factor_tier_7 = @[normal_development_growth_factor_tier_6 + normal_development_growth_factor_addition_per_tier] -@normal_development_growth_factor_tier_8 = @[normal_development_growth_factor_tier_7 + normal_development_growth_factor_addition_per_tier] - -@good_development_growth_factor_tier_1 = @[good_development_growth_factor_base] -@good_development_growth_factor_tier_2 = @[good_development_growth_factor_tier_1 + normal_development_growth_factor_addition_per_tier] -@good_development_growth_factor_tier_3 = @[good_development_growth_factor_tier_2 + normal_development_growth_factor_addition_per_tier] -@good_development_growth_factor_tier_4 = @[good_development_growth_factor_tier_3 + normal_development_growth_factor_addition_per_tier] -@good_development_growth_factor_tier_5 = @[good_development_growth_factor_tier_4 + normal_development_growth_factor_addition_per_tier] -@good_development_growth_factor_tier_6 = @[good_development_growth_factor_tier_5 + normal_development_growth_factor_addition_per_tier] -@good_development_growth_factor_tier_7 = @[good_development_growth_factor_tier_6 + normal_development_growth_factor_addition_per_tier] -@good_development_growth_factor_tier_8 = @[good_development_growth_factor_tier_7 + normal_development_growth_factor_addition_per_tier] - -@normal_tax_mult_tier_1 = @[normal_tax_mult_base] -@normal_tax_mult_tier_2 = @[normal_tax_mult_tier_1 + normal_tax_mult_addition_per_tier] -@normal_tax_mult_tier_3 = @[normal_tax_mult_tier_2 + normal_tax_mult_addition_per_tier] -@normal_tax_mult_tier_4 = @[normal_tax_mult_tier_3 + normal_tax_mult_addition_per_tier] -@normal_tax_mult_tier_5 = @[normal_tax_mult_tier_4 + normal_tax_mult_addition_per_tier] -@normal_tax_mult_tier_6 = @[normal_tax_mult_tier_5 + normal_tax_mult_addition_per_tier] -@normal_tax_mult_tier_7 = @[normal_tax_mult_tier_6 + normal_tax_mult_addition_per_tier] -@normal_tax_mult_tier_8 = @[normal_tax_mult_tier_7 + normal_tax_mult_addition_per_tier] - -@good_tax_mult_tier_1 = @[good_tax_mult_base] -@good_tax_mult_tier_2 = @[good_tax_mult_tier_1 + normal_tax_mult_addition_per_tier] -@good_tax_mult_tier_3 = @[good_tax_mult_tier_2 + normal_tax_mult_addition_per_tier] -@good_tax_mult_tier_4 = @[good_tax_mult_tier_3 + normal_tax_mult_addition_per_tier] -@good_tax_mult_tier_5 = @[good_tax_mult_tier_4 + normal_tax_mult_addition_per_tier] -@good_tax_mult_tier_6 = @[good_tax_mult_tier_5 + normal_tax_mult_addition_per_tier] -@good_tax_mult_tier_7 = @[good_tax_mult_tier_6 + normal_tax_mult_addition_per_tier] -@good_tax_mult_tier_8 = @[good_tax_mult_tier_7 + normal_tax_mult_addition_per_tier] - -@tribal_cost_tier_1 = @[tribal_cost_base] -@tribal_cost_tier_2 = @[tribal_cost_tier_1 + tribal_cost_scale_addition_per_tier] - -# Low Damage Mult -@low_maa_damage_tier_1 = @[low_damage_mult_base] -@low_maa_damage_tier_2 = @[low_maa_damage_tier_1 + low_damage_mult_addition_per_tier] -@low_maa_damage_tier_3 = @[low_maa_damage_tier_2 + low_damage_mult_addition_per_tier] -@low_maa_damage_tier_4 = @[low_maa_damage_tier_3 + low_damage_mult_addition_per_tier] -@low_maa_damage_tier_5 = @[low_maa_damage_tier_4 + low_damage_mult_addition_per_tier] -@low_maa_damage_tier_6 = @[low_maa_damage_tier_5 + low_damage_mult_addition_per_tier] -@low_maa_damage_tier_7 = @[low_maa_damage_tier_6 + low_damage_mult_addition_per_tier] -@low_maa_damage_tier_8 = @[low_maa_damage_tier_7 + low_damage_mult_addition_per_tier] - -# Normal Damage Mult -@normal_maa_damage_tier_1 = @[normal_damage_mult_base] -@normal_maa_damage_tier_2 = @[normal_maa_damage_tier_1 + normal_damage_mult_addition_per_tier] -@normal_maa_damage_tier_3 = @[normal_maa_damage_tier_2 + normal_damage_mult_addition_per_tier] -@normal_maa_damage_tier_4 = @[normal_maa_damage_tier_3 + normal_damage_mult_addition_per_tier] -@normal_maa_damage_tier_5 = @[normal_maa_damage_tier_4 + normal_damage_mult_addition_per_tier] -@normal_maa_damage_tier_6 = @[normal_maa_damage_tier_5 + normal_damage_mult_addition_per_tier] -@normal_maa_damage_tier_7 = @[normal_maa_damage_tier_6 + normal_damage_mult_addition_per_tier] -@normal_maa_damage_tier_8 = @[normal_maa_damage_tier_7 + normal_damage_mult_addition_per_tier] - -# High Damage Mult -@high_maa_damage_tier_1 = @[high_damage_mult_base] -@high_maa_damage_tier_2 = @[high_maa_damage_tier_1 + high_damage_mult_addition_per_tier] -@high_maa_damage_tier_3 = @[high_maa_damage_tier_2 + high_damage_mult_addition_per_tier] -@high_maa_damage_tier_4 = @[high_maa_damage_tier_3 + high_damage_mult_addition_per_tier] -@high_maa_damage_tier_5 = @[high_maa_damage_tier_4 + high_damage_mult_addition_per_tier] -@high_maa_damage_tier_6 = @[high_maa_damage_tier_5 + high_damage_mult_addition_per_tier] -@high_maa_damage_tier_7 = @[high_maa_damage_tier_6 + high_damage_mult_addition_per_tier] -@high_maa_damage_tier_8 = @[high_maa_damage_tier_7 + high_damage_mult_addition_per_tier] - -# Very High Damage Mult -@very_high_maa_damage_tier_1 = @[very_high_damage_mult_base] -@very_high_maa_damage_tier_2 = @[very_high_maa_damage_tier_1 + very_high_damage_mult_addition_per_tier] -@very_high_maa_damage_tier_3 = @[very_high_maa_damage_tier_2 + very_high_damage_mult_addition_per_tier] -@very_high_maa_damage_tier_4 = @[very_high_maa_damage_tier_3 + very_high_damage_mult_addition_per_tier] -@very_high_maa_damage_tier_5 = @[very_high_maa_damage_tier_4 + very_high_damage_mult_addition_per_tier] -@very_high_maa_damage_tier_6 = @[very_high_maa_damage_tier_5 + very_high_damage_mult_addition_per_tier] -@very_high_maa_damage_tier_7 = @[very_high_maa_damage_tier_6 + very_high_damage_mult_addition_per_tier] -@very_high_maa_damage_tier_8 = @[very_high_maa_damage_tier_7 + very_high_damage_mult_addition_per_tier] - -# Low Toughness Mult -@low_maa_toughness_tier_1 = @[low_toughness_mult_base] -@low_maa_toughness_tier_2 = @[low_maa_toughness_tier_1 + low_toughness_mult_addition_per_tier] -@low_maa_toughness_tier_3 = @[low_maa_toughness_tier_2 + low_toughness_mult_addition_per_tier] -@low_maa_toughness_tier_4 = @[low_maa_toughness_tier_3 + low_toughness_mult_addition_per_tier] -@low_maa_toughness_tier_5 = @[low_maa_toughness_tier_4 + low_toughness_mult_addition_per_tier] -@low_maa_toughness_tier_6 = @[low_maa_toughness_tier_5 + low_toughness_mult_addition_per_tier] -@low_maa_toughness_tier_7 = @[low_maa_toughness_tier_6 + low_toughness_mult_addition_per_tier] -@low_maa_toughness_tier_8 = @[low_maa_toughness_tier_7 + low_toughness_mult_addition_per_tier] - -# Normal Toughness Mult -@normal_maa_toughness_tier_1 = @[normal_toughness_mult_base] -@normal_maa_toughness_tier_2 = @[normal_maa_toughness_tier_1 + normal_toughness_mult_addition_per_tier] -@normal_maa_toughness_tier_3 = @[normal_maa_toughness_tier_2 + normal_toughness_mult_addition_per_tier] -@normal_maa_toughness_tier_4 = @[normal_maa_toughness_tier_3 + normal_toughness_mult_addition_per_tier] -@normal_maa_toughness_tier_5 = @[normal_maa_toughness_tier_4 + normal_toughness_mult_addition_per_tier] -@normal_maa_toughness_tier_6 = @[normal_maa_toughness_tier_5 + normal_toughness_mult_addition_per_tier] -@normal_maa_toughness_tier_7 = @[normal_maa_toughness_tier_6 + normal_toughness_mult_addition_per_tier] -@normal_maa_toughness_tier_8 = @[normal_maa_toughness_tier_7 + normal_toughness_mult_addition_per_tier] - -# High Toughness Mult -@high_maa_toughness_tier_1 = @[high_toughness_mult_base] -@high_maa_toughness_tier_2 = @[high_maa_toughness_tier_1 + high_toughness_mult_addition_per_tier] -@high_maa_toughness_tier_3 = @[high_maa_toughness_tier_2 + high_toughness_mult_addition_per_tier] -@high_maa_toughness_tier_4 = @[high_maa_toughness_tier_3 + high_toughness_mult_addition_per_tier] -@high_maa_toughness_tier_5 = @[high_maa_toughness_tier_4 + high_toughness_mult_addition_per_tier] -@high_maa_toughness_tier_6 = @[high_maa_toughness_tier_5 + high_toughness_mult_addition_per_tier] -@high_maa_toughness_tier_7 = @[high_maa_toughness_tier_6 + high_toughness_mult_addition_per_tier] -@high_maa_toughness_tier_8 = @[high_maa_toughness_tier_7 + high_toughness_mult_addition_per_tier] - -# Very High Toughness Mult -@very_high_maa_toughness_tier_1 = @[very_high_toughness_mult_base] -@very_high_maa_toughness_tier_2 = @[very_high_maa_toughness_tier_1 + very_high_toughness_mult_addition_per_tier] -@very_high_maa_toughness_tier_3 = @[very_high_maa_toughness_tier_2 + very_high_toughness_mult_addition_per_tier] -@very_high_maa_toughness_tier_4 = @[very_high_maa_toughness_tier_3 + very_high_toughness_mult_addition_per_tier] -@very_high_maa_toughness_tier_5 = @[very_high_maa_toughness_tier_4 + very_high_toughness_mult_addition_per_tier] -@very_high_maa_toughness_tier_6 = @[very_high_maa_toughness_tier_5 + very_high_toughness_mult_addition_per_tier] -@very_high_maa_toughness_tier_7 = @[very_high_maa_toughness_tier_6 + very_high_toughness_mult_addition_per_tier] -@very_high_maa_toughness_tier_8 = @[very_high_maa_toughness_tier_7 + very_high_toughness_mult_addition_per_tier] - -# Low Pursuit Mult -@low_maa_pursuit_tier_1 = @[low_pursuit_mult_base] -@low_maa_pursuit_tier_2 = @[low_maa_pursuit_tier_1 + low_pursuit_mult_addition_per_tier] -@low_maa_pursuit_tier_3 = @[low_maa_pursuit_tier_2 + low_pursuit_mult_addition_per_tier] -@low_maa_pursuit_tier_4 = @[low_maa_pursuit_tier_3 + low_pursuit_mult_addition_per_tier] -@low_maa_pursuit_tier_5 = @[low_maa_pursuit_tier_4 + low_pursuit_mult_addition_per_tier] -@low_maa_pursuit_tier_6 = @[low_maa_pursuit_tier_5 + low_pursuit_mult_addition_per_tier] -@low_maa_pursuit_tier_7 = @[low_maa_pursuit_tier_6 + low_pursuit_mult_addition_per_tier] -@low_maa_pursuit_tier_8 = @[low_maa_pursuit_tier_7 + low_pursuit_mult_addition_per_tier] - -# Normal Pursuit Mult -@normal_maa_pursuit_tier_1 = @[normal_pursuit_mult_base] -@normal_maa_pursuit_tier_2 = @[normal_maa_pursuit_tier_1 + normal_pursuit_mult_addition_per_tier] -@normal_maa_pursuit_tier_3 = @[normal_maa_pursuit_tier_2 + normal_pursuit_mult_addition_per_tier] -@normal_maa_pursuit_tier_4 = @[normal_maa_pursuit_tier_3 + normal_pursuit_mult_addition_per_tier] -@normal_maa_pursuit_tier_5 = @[normal_maa_pursuit_tier_4 + normal_pursuit_mult_addition_per_tier] -@normal_maa_pursuit_tier_6 = @[normal_maa_pursuit_tier_5 + normal_pursuit_mult_addition_per_tier] -@normal_maa_pursuit_tier_7 = @[normal_maa_pursuit_tier_6 + normal_pursuit_mult_addition_per_tier] -@normal_maa_pursuit_tier_8 = @[normal_maa_pursuit_tier_7 + normal_pursuit_mult_addition_per_tier] - -# High Pursuit Mult -@high_maa_pursuit_tier_1 = @[high_pursuit_mult_base] -@high_maa_pursuit_tier_2 = @[high_maa_pursuit_tier_1 + high_pursuit_mult_addition_per_tier] -@high_maa_pursuit_tier_3 = @[high_maa_pursuit_tier_2 + high_pursuit_mult_addition_per_tier] -@high_maa_pursuit_tier_4 = @[high_maa_pursuit_tier_3 + high_pursuit_mult_addition_per_tier] -@high_maa_pursuit_tier_5 = @[high_maa_pursuit_tier_4 + high_pursuit_mult_addition_per_tier] -@high_maa_pursuit_tier_6 = @[high_maa_pursuit_tier_5 + high_pursuit_mult_addition_per_tier] -@high_maa_pursuit_tier_7 = @[high_maa_pursuit_tier_6 + high_pursuit_mult_addition_per_tier] -@high_maa_pursuit_tier_8 = @[high_maa_pursuit_tier_7 + high_pursuit_mult_addition_per_tier] - -# Very High Pursuit Mult -@very_high_maa_pursuit_tier_1 = @[very_high_pursuit_mult_base] -@very_high_maa_pursuit_tier_2 = @[very_high_maa_pursuit_tier_1 + very_high_pursuit_mult_addition_per_tier] -@very_high_maa_pursuit_tier_3 = @[very_high_maa_pursuit_tier_2 + very_high_pursuit_mult_addition_per_tier] -@very_high_maa_pursuit_tier_4 = @[very_high_maa_pursuit_tier_3 + very_high_pursuit_mult_addition_per_tier] -@very_high_maa_pursuit_tier_5 = @[very_high_maa_pursuit_tier_4 + very_high_pursuit_mult_addition_per_tier] -@very_high_maa_pursuit_tier_6 = @[very_high_maa_pursuit_tier_5 + very_high_pursuit_mult_addition_per_tier] -@very_high_maa_pursuit_tier_7 = @[very_high_maa_pursuit_tier_6 + very_high_pursuit_mult_addition_per_tier] -@very_high_maa_pursuit_tier_8 = @[very_high_maa_pursuit_tier_7 + very_high_pursuit_mult_addition_per_tier] - -# Low Screen Mult -@low_maa_screen_tier_1 = @[low_screen_mult_base] -@low_maa_screen_tier_2 = @[low_maa_screen_tier_1 + low_screen_mult_addition_per_tier] -@low_maa_screen_tier_3 = @[low_maa_screen_tier_2 + low_screen_mult_addition_per_tier] -@low_maa_screen_tier_4 = @[low_maa_screen_tier_3 + low_screen_mult_addition_per_tier] -@low_maa_screen_tier_5 = @[low_maa_screen_tier_4 + low_screen_mult_addition_per_tier] -@low_maa_screen_tier_6 = @[low_maa_screen_tier_5 + low_screen_mult_addition_per_tier] -@low_maa_screen_tier_7 = @[low_maa_screen_tier_6 + low_screen_mult_addition_per_tier] -@low_maa_screen_tier_8 = @[low_maa_screen_tier_7 + low_screen_mult_addition_per_tier] - -# Normal Screen Mult -@normal_maa_screen_tier_1 = @[normal_screen_mult_base] -@normal_maa_screen_tier_2 = @[normal_maa_screen_tier_1 + normal_screen_mult_addition_per_tier] -@normal_maa_screen_tier_3 = @[normal_maa_screen_tier_2 + normal_screen_mult_addition_per_tier] -@normal_maa_screen_tier_4 = @[normal_maa_screen_tier_3 + normal_screen_mult_addition_per_tier] -@normal_maa_screen_tier_5 = @[normal_maa_screen_tier_4 + normal_screen_mult_addition_per_tier] -@normal_maa_screen_tier_6 = @[normal_maa_screen_tier_5 + normal_screen_mult_addition_per_tier] -@normal_maa_screen_tier_7 = @[normal_maa_screen_tier_6 + normal_screen_mult_addition_per_tier] -@normal_maa_screen_tier_8 = @[normal_maa_screen_tier_7 + normal_screen_mult_addition_per_tier] - -# High Screen Mult -@high_maa_screen_tier_1 = @[high_screen_mult_base] -@high_maa_screen_tier_2 = @[high_maa_screen_tier_1 + high_screen_mult_addition_per_tier] -@high_maa_screen_tier_3 = @[high_maa_screen_tier_2 + high_screen_mult_addition_per_tier] -@high_maa_screen_tier_4 = @[high_maa_screen_tier_3 + high_screen_mult_addition_per_tier] -@high_maa_screen_tier_5 = @[high_maa_screen_tier_4 + high_screen_mult_addition_per_tier] -@high_maa_screen_tier_6 = @[high_maa_screen_tier_5 + high_screen_mult_addition_per_tier] -@high_maa_screen_tier_7 = @[high_maa_screen_tier_6 + high_screen_mult_addition_per_tier] -@high_maa_screen_tier_8 = @[high_maa_screen_tier_7 + high_screen_mult_addition_per_tier] - -# Very High Screen Mult -@very_high_maa_screen_tier_1 = @[very_high_screen_mult_base] -@very_high_maa_screen_tier_2 = @[very_high_maa_screen_tier_1 + very_high_screen_mult_addition_per_tier] -@very_high_maa_screen_tier_3 = @[very_high_maa_screen_tier_2 + very_high_screen_mult_addition_per_tier] -@very_high_maa_screen_tier_4 = @[very_high_maa_screen_tier_3 + very_high_screen_mult_addition_per_tier] -@very_high_maa_screen_tier_5 = @[very_high_maa_screen_tier_4 + very_high_screen_mult_addition_per_tier] -@very_high_maa_screen_tier_6 = @[very_high_maa_screen_tier_5 + very_high_screen_mult_addition_per_tier] -@very_high_maa_screen_tier_7 = @[very_high_maa_screen_tier_6 + very_high_screen_mult_addition_per_tier] -@very_high_maa_screen_tier_8 = @[very_high_maa_screen_tier_7 + very_high_screen_mult_addition_per_tier] - -# Low Siege Value Mult -@low_maa_siege_value_tier_1 = @[low_siege_value_mult_base] -@low_maa_siege_value_tier_2 = @[low_maa_siege_value_tier_1 + low_siege_value_mult_addition_per_tier] -@low_maa_siege_value_tier_3 = @[low_maa_siege_value_tier_2 + low_siege_value_mult_addition_per_tier] -@low_maa_siege_value_tier_4 = @[low_maa_siege_value_tier_3 + low_siege_value_mult_addition_per_tier] -@low_maa_siege_value_tier_5 = @[low_maa_siege_value_tier_4 + low_siege_value_mult_addition_per_tier] -@low_maa_siege_value_tier_6 = @[low_maa_siege_value_tier_5 + low_siege_value_mult_addition_per_tier] -@low_maa_siege_value_tier_7 = @[low_maa_siege_value_tier_6 + low_siege_value_mult_addition_per_tier] -@low_maa_siege_value_tier_8 = @[low_maa_siege_value_tier_7 + low_siege_value_mult_addition_per_tier] - -# Normal Siege Value Mult -@normal_maa_siege_value_tier_1 = @[normal_siege_value_mult_base] -@normal_maa_siege_value_tier_2 = @[normal_maa_siege_value_tier_1 + normal_siege_value_mult_addition_per_tier] -@normal_maa_siege_value_tier_3 = @[normal_maa_siege_value_tier_2 + normal_siege_value_mult_addition_per_tier] -@normal_maa_siege_value_tier_4 = @[normal_maa_siege_value_tier_3 + normal_siege_value_mult_addition_per_tier] -@normal_maa_siege_value_tier_5 = @[normal_maa_siege_value_tier_4 + normal_siege_value_mult_addition_per_tier] -@normal_maa_siege_value_tier_6 = @[normal_maa_siege_value_tier_5 + normal_siege_value_mult_addition_per_tier] -@normal_maa_siege_value_tier_7 = @[normal_maa_siege_value_tier_6 + normal_siege_value_mult_addition_per_tier] -@normal_maa_siege_value_tier_8 = @[normal_maa_siege_value_tier_7 + normal_siege_value_mult_addition_per_tier] - -# High Siege Value Mult -@high_maa_siege_value_tier_1 = @[high_siege_value_mult_base] -@high_maa_siege_value_tier_2 = @[high_maa_siege_value_tier_1 + high_siege_value_mult_addition_per_tier] -@high_maa_siege_value_tier_3 = @[high_maa_siege_value_tier_2 + high_siege_value_mult_addition_per_tier] -@high_maa_siege_value_tier_4 = @[high_maa_siege_value_tier_3 + high_siege_value_mult_addition_per_tier] -@high_maa_siege_value_tier_5 = @[high_maa_siege_value_tier_4 + high_siege_value_mult_addition_per_tier] -@high_maa_siege_value_tier_6 = @[high_maa_siege_value_tier_5 + high_siege_value_mult_addition_per_tier] -@high_maa_siege_value_tier_7 = @[high_maa_siege_value_tier_6 + high_siege_value_mult_addition_per_tier] -@high_maa_siege_value_tier_8 = @[high_maa_siege_value_tier_7 + high_siege_value_mult_addition_per_tier] - -# Very High Siege Value Mult -@very_high_maa_siege_value_tier_1 = @[very_high_siege_value_mult_base] -@very_high_maa_siege_value_tier_2 = @[very_high_maa_siege_value_tier_1 + very_high_siege_value_mult_addition_per_tier] -@very_high_maa_siege_value_tier_3 = @[very_high_maa_siege_value_tier_2 + very_high_siege_value_mult_addition_per_tier] -@very_high_maa_siege_value_tier_4 = @[very_high_maa_siege_value_tier_3 + very_high_siege_value_mult_addition_per_tier] -@very_high_maa_siege_value_tier_5 = @[very_high_maa_siege_value_tier_4 + very_high_siege_value_mult_addition_per_tier] -@very_high_maa_siege_value_tier_6 = @[very_high_maa_siege_value_tier_5 + very_high_siege_value_mult_addition_per_tier] -@very_high_maa_siege_value_tier_7 = @[very_high_maa_siege_value_tier_6 + very_high_siege_value_mult_addition_per_tier] -@very_high_maa_siege_value_tier_8 = @[very_high_maa_siege_value_tier_7 + very_high_siege_value_mult_addition_per_tier] - -# Normal Movement Speed -@normal_movement_speed_tier_1 = @[normal_movement_speed_base] -@normal_movement_speed_tier_2 = @[normal_movement_speed_tier_1 + normal_movement_speed_addition_per_tier] -@normal_movement_speed_tier_3 = @[normal_movement_speed_tier_2 + normal_movement_speed_addition_per_tier] -@normal_movement_speed_tier_4 = @[normal_movement_speed_tier_3 + normal_movement_speed_addition_per_tier] -@normal_movement_speed_tier_5 = @[normal_movement_speed_tier_4 + normal_movement_speed_addition_per_tier] -@normal_movement_speed_tier_6 = @[normal_movement_speed_tier_5 + normal_movement_speed_addition_per_tier] -@normal_movement_speed_tier_7 = @[normal_movement_speed_tier_6 + normal_movement_speed_addition_per_tier] -@normal_movement_speed_tier_8 = @[normal_movement_speed_tier_7 + normal_movement_speed_addition_per_tier] - -# High Movement Speed -@high_movement_speed_tier_1 = @[high_movement_speed_base] -@high_movement_speed_tier_2 = @[high_movement_speed_tier_1 + high_movement_speed_addition_per_tier] -@high_movement_speed_tier_3 = @[high_movement_speed_tier_2 + high_movement_speed_addition_per_tier] -@high_movement_speed_tier_4 = @[high_movement_speed_tier_3 + high_movement_speed_addition_per_tier] -@high_movement_speed_tier_5 = @[high_movement_speed_tier_4 + high_movement_speed_addition_per_tier] -@high_movement_speed_tier_6 = @[high_movement_speed_tier_5 + high_movement_speed_addition_per_tier] -@high_movement_speed_tier_7 = @[high_movement_speed_tier_6 + high_movement_speed_addition_per_tier] -@high_movement_speed_tier_8 = @[high_movement_speed_tier_7 + high_movement_speed_addition_per_tier] - -# Normal Knight Effectiveness -@normal_knight_effectiveness_mult_tier_1 = @[normal_knight_effectiveness_mult_base] -@normal_knight_effectiveness_mult_tier_2 = @[normal_knight_effectiveness_mult_tier_1 + normal_knight_effectiveness_mult_addition_per_tier] -@normal_knight_effectiveness_mult_tier_3 = @[normal_knight_effectiveness_mult_tier_2 + normal_knight_effectiveness_mult_addition_per_tier] -@normal_knight_effectiveness_mult_tier_4 = @[normal_knight_effectiveness_mult_tier_3 + normal_knight_effectiveness_mult_addition_per_tier] -@normal_knight_effectiveness_mult_tier_5 = @[normal_knight_effectiveness_mult_tier_4 + normal_knight_effectiveness_mult_addition_per_tier] -@normal_knight_effectiveness_mult_tier_6 = @[normal_knight_effectiveness_mult_tier_5 + normal_knight_effectiveness_mult_addition_per_tier] -@normal_knight_effectiveness_mult_tier_7 = @[normal_knight_effectiveness_mult_tier_6 + normal_knight_effectiveness_mult_addition_per_tier] -@normal_knight_effectiveness_mult_tier_8 = @[normal_knight_effectiveness_mult_tier_7 + normal_knight_effectiveness_mult_addition_per_tier] - -# High Knight Effectiveness -@high_knight_effectiveness_mult_tier_1 = @[high_knight_effectiveness_mult_base] -@high_knight_effectiveness_mult_tier_2 = @[high_knight_effectiveness_mult_tier_1 + high_knight_effectiveness_mult_addition_per_tier] -@high_knight_effectiveness_mult_tier_3 = @[high_knight_effectiveness_mult_tier_2 + high_knight_effectiveness_mult_addition_per_tier] -@high_knight_effectiveness_mult_tier_4 = @[high_knight_effectiveness_mult_tier_3 + high_knight_effectiveness_mult_addition_per_tier] -@high_knight_effectiveness_mult_tier_5 = @[high_knight_effectiveness_mult_tier_4 + high_knight_effectiveness_mult_addition_per_tier] -@high_knight_effectiveness_mult_tier_6 = @[high_knight_effectiveness_mult_tier_5 + high_knight_effectiveness_mult_addition_per_tier] -@high_knight_effectiveness_mult_tier_7 = @[high_knight_effectiveness_mult_tier_6 + high_knight_effectiveness_mult_addition_per_tier] -@high_knight_effectiveness_mult_tier_8 = @[high_knight_effectiveness_mult_tier_7 + high_knight_effectiveness_mult_addition_per_tier] - -# Normal Levy Reinforcement -@normal_levy_reinforcement_rate_tier_1 = @[normal_levy_reinforcement_rate_base] -@normal_levy_reinforcement_rate_tier_2 = @[normal_levy_reinforcement_rate_tier_1 + normal_levy_reinforcement_rate_addition_per_tier] -@normal_levy_reinforcement_rate_tier_3 = @[normal_levy_reinforcement_rate_tier_2 + normal_levy_reinforcement_rate_addition_per_tier] -@normal_levy_reinforcement_rate_tier_4 = @[normal_levy_reinforcement_rate_tier_3 + normal_levy_reinforcement_rate_addition_per_tier] -@normal_levy_reinforcement_rate_tier_5 = @[normal_levy_reinforcement_rate_tier_4 + normal_levy_reinforcement_rate_addition_per_tier] -@normal_levy_reinforcement_rate_tier_6 = @[normal_levy_reinforcement_rate_tier_5 + normal_levy_reinforcement_rate_addition_per_tier] -@normal_levy_reinforcement_rate_tier_7 = @[normal_levy_reinforcement_rate_tier_6 + normal_levy_reinforcement_rate_addition_per_tier] -@normal_levy_reinforcement_rate_tier_8 = @[normal_levy_reinforcement_rate_tier_7 + normal_levy_reinforcement_rate_addition_per_tier] - -# High Levy Reinforcement -@high_levy_reinforcement_rate_tier_1 = @[high_levy_reinforcement_rate_base] -@high_levy_reinforcement_rate_tier_2 = @[high_levy_reinforcement_rate_tier_1 + high_levy_reinforcement_rate_addition_per_tier] -@high_levy_reinforcement_rate_tier_3 = @[high_levy_reinforcement_rate_tier_2 + high_levy_reinforcement_rate_addition_per_tier] -@high_levy_reinforcement_rate_tier_4 = @[high_levy_reinforcement_rate_tier_3 + high_levy_reinforcement_rate_addition_per_tier] -@high_levy_reinforcement_rate_tier_5 = @[high_levy_reinforcement_rate_tier_4 + high_levy_reinforcement_rate_addition_per_tier] -@high_levy_reinforcement_rate_tier_6 = @[high_levy_reinforcement_rate_tier_5 + high_levy_reinforcement_rate_addition_per_tier] -@high_levy_reinforcement_rate_tier_7 = @[high_levy_reinforcement_rate_tier_6 + high_levy_reinforcement_rate_addition_per_tier] -@high_levy_reinforcement_rate_tier_8 = @[high_levy_reinforcement_rate_tier_7 + high_levy_reinforcement_rate_addition_per_tier] - -############## -# MaA Values # -############## - -# Low Damage Mult -low_maa_damage_tier_1 = @low_maa_damage_tier_1 -low_maa_damage_tier_2 = @low_maa_damage_tier_2 -low_maa_damage_tier_3 = @low_maa_damage_tier_3 -low_maa_damage_tier_4 = @low_maa_damage_tier_4 -low_maa_damage_tier_5 = @low_maa_damage_tier_5 -low_maa_damage_tier_6 = @low_maa_damage_tier_6 -low_maa_damage_tier_7 = @low_maa_damage_tier_7 -low_maa_damage_tier_8 = @low_maa_damage_tier_8 - -# Normal Damage Mult -normal_maa_damage_tier_1 = @normal_maa_damage_tier_1 -normal_maa_damage_tier_2 = @normal_maa_damage_tier_2 -normal_maa_damage_tier_3 = @normal_maa_damage_tier_3 -normal_maa_damage_tier_4 = @normal_maa_damage_tier_4 -normal_maa_damage_tier_5 = @normal_maa_damage_tier_5 -normal_maa_damage_tier_6 = @normal_maa_damage_tier_6 -normal_maa_damage_tier_7 = @normal_maa_damage_tier_7 -normal_maa_damage_tier_8 = @normal_maa_damage_tier_8 - -# High Damage Mult -high_maa_damage_tier_1 = @high_maa_damage_tier_1 -high_maa_damage_tier_2 = @high_maa_damage_tier_2 -high_maa_damage_tier_3 = @high_maa_damage_tier_3 -high_maa_damage_tier_4 = @high_maa_damage_tier_4 -high_maa_damage_tier_5 = @high_maa_damage_tier_5 -high_maa_damage_tier_6 = @high_maa_damage_tier_6 -high_maa_damage_tier_7 = @high_maa_damage_tier_7 -high_maa_damage_tier_8 = @high_maa_damage_tier_8 - -# Very High Damage Mult -very_high_maa_damage_tier_1 = @very_high_maa_damage_tier_1 -very_high_maa_damage_tier_2 = @very_high_maa_damage_tier_2 -very_high_maa_damage_tier_3 = @very_high_maa_damage_tier_3 -very_high_maa_damage_tier_4 = @very_high_maa_damage_tier_4 -very_high_maa_damage_tier_5 = @very_high_maa_damage_tier_5 -very_high_maa_damage_tier_6 = @very_high_maa_damage_tier_6 -very_high_maa_damage_tier_7 = @very_high_maa_damage_tier_7 -very_high_maa_damage_tier_8 = @very_high_maa_damage_tier_8 - -# Low Toughness Mult -low_maa_toughness_tier_1 = @low_maa_toughness_tier_1 -low_maa_toughness_tier_2 = @low_maa_toughness_tier_2 -low_maa_toughness_tier_3 = @low_maa_toughness_tier_3 -low_maa_toughness_tier_4 = @low_maa_toughness_tier_4 -low_maa_toughness_tier_5 = @low_maa_toughness_tier_5 -low_maa_toughness_tier_6 = @low_maa_toughness_tier_6 -low_maa_toughness_tier_7 = @low_maa_toughness_tier_7 -low_maa_toughness_tier_8 = @low_maa_toughness_tier_8 - -# Normal Toughness Mult -normal_maa_toughness_tier_1 = @normal_maa_toughness_tier_1 -normal_maa_toughness_tier_2 = @normal_maa_toughness_tier_2 -normal_maa_toughness_tier_3 = @normal_maa_toughness_tier_3 -normal_maa_toughness_tier_4 = @normal_maa_toughness_tier_4 -normal_maa_toughness_tier_5 = @normal_maa_toughness_tier_5 -normal_maa_toughness_tier_6 = @normal_maa_toughness_tier_6 -normal_maa_toughness_tier_7 = @normal_maa_toughness_tier_7 -normal_maa_toughness_tier_8 = @normal_maa_toughness_tier_8 - -# High Toughness Mult -high_maa_toughness_tier_1 = @high_maa_toughness_tier_1 -high_maa_toughness_tier_2 = @high_maa_toughness_tier_2 -high_maa_toughness_tier_3 = @high_maa_toughness_tier_3 -high_maa_toughness_tier_4 = @high_maa_toughness_tier_4 -high_maa_toughness_tier_5 = @high_maa_toughness_tier_5 -high_maa_toughness_tier_6 = @high_maa_toughness_tier_6 -high_maa_toughness_tier_7 = @high_maa_toughness_tier_7 -high_maa_toughness_tier_8 = @high_maa_toughness_tier_8 - -# Very High Toughness Mult -very_high_maa_toughness_tier_1 = @very_high_maa_toughness_tier_1 -very_high_maa_toughness_tier_2 = @very_high_maa_toughness_tier_2 -very_high_maa_toughness_tier_3 = @very_high_maa_toughness_tier_3 -very_high_maa_toughness_tier_4 = @very_high_maa_toughness_tier_4 -very_high_maa_toughness_tier_5 = @very_high_maa_toughness_tier_5 -very_high_maa_toughness_tier_6 = @very_high_maa_toughness_tier_6 -very_high_maa_toughness_tier_7 = @very_high_maa_toughness_tier_7 -very_high_maa_toughness_tier_8 = @very_high_maa_toughness_tier_8 - -# Low Pursuit Mult -low_maa_pursuit_tier_1 = @low_maa_pursuit_tier_1 -low_maa_pursuit_tier_2 = @low_maa_pursuit_tier_2 -low_maa_pursuit_tier_3 = @low_maa_pursuit_tier_3 -low_maa_pursuit_tier_4 = @low_maa_pursuit_tier_4 -low_maa_pursuit_tier_5 = @low_maa_pursuit_tier_5 -low_maa_pursuit_tier_6 = @low_maa_pursuit_tier_6 -low_maa_pursuit_tier_7 = @low_maa_pursuit_tier_7 -low_maa_pursuit_tier_8 = @low_maa_pursuit_tier_8 - -# Normal Pursuit Mult -normal_maa_pursuit_tier_1 = @normal_maa_pursuit_tier_1 -normal_maa_pursuit_tier_2 = @normal_maa_pursuit_tier_2 -normal_maa_pursuit_tier_3 = @normal_maa_pursuit_tier_3 -normal_maa_pursuit_tier_4 = @normal_maa_pursuit_tier_4 -normal_maa_pursuit_tier_5 = @normal_maa_pursuit_tier_5 -normal_maa_pursuit_tier_6 = @normal_maa_pursuit_tier_6 -normal_maa_pursuit_tier_7 = @normal_maa_pursuit_tier_7 -normal_maa_pursuit_tier_8 = @normal_maa_pursuit_tier_8 - -# High Pursuit Mult -high_maa_pursuit_tier_1 = @high_maa_pursuit_tier_1 -high_maa_pursuit_tier_2 = @high_maa_pursuit_tier_2 -high_maa_pursuit_tier_3 = @high_maa_pursuit_tier_3 -high_maa_pursuit_tier_4 = @high_maa_pursuit_tier_4 -high_maa_pursuit_tier_5 = @high_maa_pursuit_tier_5 -high_maa_pursuit_tier_6 = @high_maa_pursuit_tier_6 -high_maa_pursuit_tier_7 = @high_maa_pursuit_tier_7 -high_maa_pursuit_tier_8 = @high_maa_pursuit_tier_8 - -# Very High Pursuit Mult -very_high_maa_pursuit_tier_1 = @very_high_maa_pursuit_tier_1 -very_high_maa_pursuit_tier_2 = @very_high_maa_pursuit_tier_2 -very_high_maa_pursuit_tier_3 = @very_high_maa_pursuit_tier_3 -very_high_maa_pursuit_tier_4 = @very_high_maa_pursuit_tier_4 -very_high_maa_pursuit_tier_5 = @very_high_maa_pursuit_tier_5 -very_high_maa_pursuit_tier_6 = @very_high_maa_pursuit_tier_6 -very_high_maa_pursuit_tier_7 = @very_high_maa_pursuit_tier_7 -very_high_maa_pursuit_tier_8 = @very_high_maa_pursuit_tier_8 - -# Low Screen Mult -low_maa_screen_tier_1 = @low_maa_screen_tier_1 -low_maa_screen_tier_2 = @low_maa_screen_tier_2 -low_maa_screen_tier_3 = @low_maa_screen_tier_3 -low_maa_screen_tier_4 = @low_maa_screen_tier_4 -low_maa_screen_tier_5 = @low_maa_screen_tier_5 -low_maa_screen_tier_6 = @low_maa_screen_tier_6 -low_maa_screen_tier_7 = @low_maa_screen_tier_7 -low_maa_screen_tier_8 = @low_maa_screen_tier_8 - -# Normal Screen Mult -normal_maa_screen_tier_1 = @normal_maa_screen_tier_1 -normal_maa_screen_tier_2 = @normal_maa_screen_tier_2 -normal_maa_screen_tier_3 = @normal_maa_screen_tier_3 -normal_maa_screen_tier_4 = @normal_maa_screen_tier_4 -normal_maa_screen_tier_5 = @normal_maa_screen_tier_5 -normal_maa_screen_tier_6 = @normal_maa_screen_tier_6 -normal_maa_screen_tier_7 = @normal_maa_screen_tier_7 -normal_maa_screen_tier_8 = @normal_maa_screen_tier_8 - -# High Screen Mult -high_maa_screen_tier_1 = @high_maa_screen_tier_1 -high_maa_screen_tier_2 = @high_maa_screen_tier_2 -high_maa_screen_tier_3 = @high_maa_screen_tier_3 -high_maa_screen_tier_4 = @high_maa_screen_tier_4 -high_maa_screen_tier_5 = @high_maa_screen_tier_5 -high_maa_screen_tier_6 = @high_maa_screen_tier_6 -high_maa_screen_tier_7 = @high_maa_screen_tier_7 -high_maa_screen_tier_8 = @high_maa_screen_tier_8 - -# Very High Screen Mult -very_high_maa_screen_tier_1 = @very_high_maa_screen_tier_1 -very_high_maa_screen_tier_2 = @very_high_maa_screen_tier_2 -very_high_maa_screen_tier_3 = @very_high_maa_screen_tier_3 -very_high_maa_screen_tier_4 = @very_high_maa_screen_tier_4 -very_high_maa_screen_tier_5 = @very_high_maa_screen_tier_5 -very_high_maa_screen_tier_6 = @very_high_maa_screen_tier_6 -very_high_maa_screen_tier_7 = @very_high_maa_screen_tier_7 -very_high_maa_screen_tier_8 = @very_high_maa_screen_tier_8 - -# Low Siege Value Mult -low_maa_siege_value_tier_1 = @low_maa_siege_value_tier_1 -low_maa_siege_value_tier_2 = @low_maa_siege_value_tier_2 -low_maa_siege_value_tier_3 = @low_maa_siege_value_tier_3 -low_maa_siege_value_tier_4 = @low_maa_siege_value_tier_4 -low_maa_siege_value_tier_5 = @low_maa_siege_value_tier_5 -low_maa_siege_value_tier_6 = @low_maa_siege_value_tier_6 -low_maa_siege_value_tier_7 = @low_maa_siege_value_tier_7 -low_maa_siege_value_tier_8 = @low_maa_siege_value_tier_8 - -# Normal Siege Value Mult -normal_maa_siege_value_tier_1 = @normal_maa_siege_value_tier_1 -normal_maa_siege_value_tier_2 = @normal_maa_siege_value_tier_2 -normal_maa_siege_value_tier_3 = @normal_maa_siege_value_tier_3 -normal_maa_siege_value_tier_4 = @normal_maa_siege_value_tier_4 -normal_maa_siege_value_tier_5 = @normal_maa_siege_value_tier_5 -normal_maa_siege_value_tier_6 = @normal_maa_siege_value_tier_6 -normal_maa_siege_value_tier_7 = @normal_maa_siege_value_tier_7 -normal_maa_siege_value_tier_8 = @normal_maa_siege_value_tier_8 - -# High Siege Value Mult -high_maa_siege_value_tier_1 = @high_maa_siege_value_tier_1 -high_maa_siege_value_tier_2 = @high_maa_siege_value_tier_2 -high_maa_siege_value_tier_3 = @high_maa_siege_value_tier_3 -high_maa_siege_value_tier_4 = @high_maa_siege_value_tier_4 -high_maa_siege_value_tier_5 = @high_maa_siege_value_tier_5 -high_maa_siege_value_tier_6 = @high_maa_siege_value_tier_6 -high_maa_siege_value_tier_7 = @high_maa_siege_value_tier_7 -high_maa_siege_value_tier_8 = @high_maa_siege_value_tier_8 - -# Very High Siege Value Mult -very_high_maa_siege_value_tier_1 = @very_high_maa_siege_value_tier_1 -very_high_maa_siege_value_tier_2 = @very_high_maa_siege_value_tier_2 -very_high_maa_siege_value_tier_3 = @very_high_maa_siege_value_tier_3 -very_high_maa_siege_value_tier_4 = @very_high_maa_siege_value_tier_4 -very_high_maa_siege_value_tier_5 = @very_high_maa_siege_value_tier_5 -very_high_maa_siege_value_tier_6 = @very_high_maa_siege_value_tier_6 -very_high_maa_siege_value_tier_7 = @very_high_maa_siege_value_tier_7 -very_high_maa_siege_value_tier_8 = @very_high_maa_siege_value_tier_8 - -################## -# Movement Speed # -################## - -# Normal Movement Speed -normal_movement_speed_tier_1 = @normal_movement_speed_tier_1 -normal_movement_speed_tier_2 = @normal_movement_speed_tier_2 -normal_movement_speed_tier_3 = @normal_movement_speed_tier_3 -normal_movement_speed_tier_4 = @normal_movement_speed_tier_4 -normal_movement_speed_tier_5 = @normal_movement_speed_tier_5 -normal_movement_speed_tier_6 = @normal_movement_speed_tier_6 -normal_movement_speed_tier_7 = @normal_movement_speed_tier_7 -normal_movement_speed_tier_8 = @normal_movement_speed_tier_8 - -# High Movement Speed -high_movement_speed_tier_1 = @high_movement_speed_tier_1 -high_movement_speed_tier_2 = @high_movement_speed_tier_2 -high_movement_speed_tier_3 = @high_movement_speed_tier_3 -high_movement_speed_tier_4 = @high_movement_speed_tier_4 -high_movement_speed_tier_5 = @high_movement_speed_tier_5 -high_movement_speed_tier_6 = @high_movement_speed_tier_6 -high_movement_speed_tier_7 = @high_movement_speed_tier_7 -high_movement_speed_tier_8 = @high_movement_speed_tier_8 - -######################## -# Knight Effectiveness # -######################## - -# Normal Knight Effectiveness -normal_knight_effectiveness_mult_tier_1 = @normal_knight_effectiveness_mult_tier_1 -normal_knight_effectiveness_mult_tier_2 = @normal_knight_effectiveness_mult_tier_2 -normal_knight_effectiveness_mult_tier_3 = @normal_knight_effectiveness_mult_tier_3 -normal_knight_effectiveness_mult_tier_4 = @normal_knight_effectiveness_mult_tier_4 -normal_knight_effectiveness_mult_tier_5 = @normal_knight_effectiveness_mult_tier_5 -normal_knight_effectiveness_mult_tier_6 = @normal_knight_effectiveness_mult_tier_6 -normal_knight_effectiveness_mult_tier_7 = @normal_knight_effectiveness_mult_tier_7 -normal_knight_effectiveness_mult_tier_8 = @normal_knight_effectiveness_mult_tier_8 - -# High Knight Effectiveness -high_knight_effectiveness_mult_tier_1 = @high_knight_effectiveness_mult_tier_1 -high_knight_effectiveness_mult_tier_2 = @high_knight_effectiveness_mult_tier_2 -high_knight_effectiveness_mult_tier_3 = @high_knight_effectiveness_mult_tier_3 -high_knight_effectiveness_mult_tier_4 = @high_knight_effectiveness_mult_tier_4 -high_knight_effectiveness_mult_tier_5 = @high_knight_effectiveness_mult_tier_5 -high_knight_effectiveness_mult_tier_6 = @high_knight_effectiveness_mult_tier_6 -high_knight_effectiveness_mult_tier_7 = @high_knight_effectiveness_mult_tier_7 -high_knight_effectiveness_mult_tier_8 = @high_knight_effectiveness_mult_tier_8 - -###################### -# Levy Reinforcement # -###################### - -# Normal Levy Reinforcement -normal_levy_reinforcement_rate_tier_1 = @normal_levy_reinforcement_rate_tier_1 -normal_levy_reinforcement_rate_tier_2 = @normal_levy_reinforcement_rate_tier_2 -normal_levy_reinforcement_rate_tier_3 = @normal_levy_reinforcement_rate_tier_3 -normal_levy_reinforcement_rate_tier_4 = @normal_levy_reinforcement_rate_tier_4 -normal_levy_reinforcement_rate_tier_5 = @normal_levy_reinforcement_rate_tier_5 -normal_levy_reinforcement_rate_tier_6 = @normal_levy_reinforcement_rate_tier_6 -normal_levy_reinforcement_rate_tier_7 = @normal_levy_reinforcement_rate_tier_7 -normal_levy_reinforcement_rate_tier_8 = @normal_levy_reinforcement_rate_tier_8 - -# High Levy Reinforcement -high_levy_reinforcement_rate_tier_1 = @high_levy_reinforcement_rate_tier_1 -high_levy_reinforcement_rate_tier_2 = @high_levy_reinforcement_rate_tier_2 -high_levy_reinforcement_rate_tier_3 = @high_levy_reinforcement_rate_tier_3 -high_levy_reinforcement_rate_tier_4 = @high_levy_reinforcement_rate_tier_4 -high_levy_reinforcement_rate_tier_5 = @high_levy_reinforcement_rate_tier_5 -high_levy_reinforcement_rate_tier_6 = @high_levy_reinforcement_rate_tier_6 -high_levy_reinforcement_rate_tier_7 = @high_levy_reinforcement_rate_tier_7 -high_levy_reinforcement_rate_tier_8 = @high_levy_reinforcement_rate_tier_8 - -################# -# Building Cost # -################# - -# Cheap Buildings -cheap_building_tier_1_cost = @[cheap_cost_tier_1] -cheap_building_tier_2_cost = @[cheap_cost_tier_2] -cheap_building_tier_3_cost = @[cheap_cost_tier_3] -cheap_building_tier_4_cost = @[cheap_cost_tier_4] -cheap_building_tier_5_cost = @[cheap_cost_tier_5] -cheap_building_tier_6_cost = @[cheap_cost_tier_6] -cheap_building_tier_7_cost = @[cheap_cost_tier_7] -cheap_building_tier_8_cost = @[cheap_cost_tier_8] - -# Normal Buildings -normal_building_tier_1_cost = @[normal_cost_tier_1] -normal_building_tier_2_cost = @[normal_cost_tier_2] -normal_building_tier_3_cost = @[normal_cost_tier_3] -normal_building_tier_4_cost = @[normal_cost_tier_4] -normal_building_tier_5_cost = @[normal_cost_tier_5] -normal_building_tier_6_cost = @[normal_cost_tier_6] -normal_building_tier_7_cost = @[normal_cost_tier_7] -normal_building_tier_8_cost = @[normal_cost_tier_8] - -# Expensive Buildings -expensive_building_tier_1_cost = @[expensive_cost_tier_1] -expensive_building_tier_2_cost = @[expensive_cost_tier_2] -expensive_building_tier_3_cost = @[expensive_cost_tier_3] -expensive_building_tier_4_cost = @[expensive_cost_tier_4] -expensive_building_tier_5_cost = @[expensive_cost_tier_5] -expensive_building_tier_6_cost = @[expensive_cost_tier_6] -expensive_building_tier_7_cost = @[expensive_cost_tier_7] -expensive_building_tier_8_cost = @[expensive_cost_tier_8] - -# Main Buildings (Castle, Temple, City) -main_building_tier_1_cost = @[main_cost_tier_1] -main_building_tier_2_cost = @[main_cost_tier_2] -main_building_tier_3_cost = @[main_cost_tier_3] -main_building_tier_4_cost = @[main_cost_tier_4] - -# Tribal Buildings -tribal_building_tier_1_cost = @[tribal_cost_tier_1] -tribal_building_tier_2_cost = @[tribal_cost_tier_2] - -############## -# Tax Values # -############## - -# Poor Tax -poor_building_tax_tier_1 = @[poor_tax_tier_1] -poor_building_tax_tier_2 = @[poor_tax_tier_2] -poor_building_tax_tier_3 = @[poor_tax_tier_3] -poor_building_tax_tier_4 = @[poor_tax_tier_4] -poor_building_tax_tier_5 = @[poor_tax_tier_5] -poor_building_tax_tier_6 = @[poor_tax_tier_6] -poor_building_tax_tier_7 = @[poor_tax_tier_7] -poor_building_tax_tier_8 = @[poor_tax_tier_8] - -# Normal Tax -normal_building_tax_tier_1 = @[normal_tax_tier_1] -normal_building_tax_tier_2 = @[normal_tax_tier_2] -normal_building_tax_tier_3 = @[normal_tax_tier_3] -normal_building_tax_tier_4 = @[normal_tax_tier_4] -normal_building_tax_tier_5 = @[normal_tax_tier_5] -normal_building_tax_tier_6 = @[normal_tax_tier_6] -normal_building_tax_tier_7 = @[normal_tax_tier_7] -normal_building_tax_tier_8 = @[normal_tax_tier_8] - -# Good Tax -good_building_tax_tier_1 = @[good_tax_tier_1] -good_building_tax_tier_2 = @[good_tax_tier_2] -good_building_tax_tier_3 = @[good_tax_tier_3] -good_building_tax_tier_4 = @[good_tax_tier_4] -good_building_tax_tier_5 = @[good_tax_tier_5] -good_building_tax_tier_6 = @[good_tax_tier_6] -good_building_tax_tier_7 = @[good_tax_tier_7] -good_building_tax_tier_8 = @[good_tax_tier_8] - -# Excellent Tax -excellent_building_tax_tier_1 = @[excellent_tax_tier_1] -excellent_building_tax_tier_2 = @[excellent_tax_tier_2] -excellent_building_tax_tier_3 = @[excellent_tax_tier_3] -excellent_building_tax_tier_4 = @[excellent_tax_tier_4] -excellent_building_tax_tier_5 = @[excellent_tax_tier_5] -excellent_building_tax_tier_6 = @[excellent_tax_tier_6] -excellent_building_tax_tier_7 = @[excellent_tax_tier_7] -excellent_building_tax_tier_8 = @[excellent_tax_tier_8] - -# Cultural Tradition Extra - Poor Tax -poor_building_extra_tax_tier_1 = @[poor_tax_tier_1 / 4] -poor_building_extra_tax_tier_2 = @[poor_tax_tier_2 / 4] -poor_building_extra_tax_tier_3 = @[poor_tax_tier_3 / 4] -poor_building_extra_tax_tier_4 = @[poor_tax_tier_4 / 4] -poor_building_extra_tax_tier_5 = @[poor_tax_tier_5 / 4] -poor_building_extra_tax_tier_6 = @[poor_tax_tier_6 / 4] -poor_building_extra_tax_tier_7 = @[poor_tax_tier_7 / 4] -poor_building_extra_tax_tier_8 = @[poor_tax_tier_8 / 4] - -# Cultural Tradition - Super Poor Tax -super_poor_building_tax_tier_1 = @[poor_tax_tier_1 / 2] -super_poor_building_tax_tier_2 = @[poor_tax_tier_2 / 2] -super_poor_building_tax_tier_3 = @[poor_tax_tier_3 / 2] -super_poor_building_tax_tier_4 = @[poor_tax_tier_4 / 2] -super_poor_building_tax_tier_5 = @[poor_tax_tier_5 / 2] -super_poor_building_tax_tier_6 = @[poor_tax_tier_6 / 2] -super_poor_building_tax_tier_7 = @[poor_tax_tier_7 / 2] -super_poor_building_tax_tier_8 = @[poor_tax_tier_8 / 2] - -# Special Mine Tax, for unique buildings and such -special_mine_building_tax_tier_1 = @[special_mine_tax_tier_1] -special_mine_building_tax_tier_2 = @[special_mine_tax_tier_2] -special_mine_building_tax_tier_3 = @[special_mine_tax_tier_3] -special_mine_building_tax_tier_4 = @[special_mine_tax_tier_4] -special_mine_building_tax_tier_5 = @[special_mine_tax_tier_5] -special_mine_building_tax_tier_6 = @[special_mine_tax_tier_6] -special_mine_building_tax_tier_7 = @[special_mine_tax_tier_7] -special_mine_building_tax_tier_8 = @[special_mine_tax_tier_8] - -gold_mine_generic_building_tax_tier_1 = @[special_mine_tax_tier_1 / 2] -gold_mine_generic_building_tax_tier_2 = @[special_mine_tax_tier_2 / 2] -gold_mine_generic_building_tax_tier_3 = @[special_mine_tax_tier_3 / 2] -gold_mine_generic_building_tax_tier_4 = @[special_mine_tax_tier_4 / 2] -gold_mine_generic_building_tax_tier_5 = @[special_mine_tax_tier_5 / 2] -gold_mine_generic_building_tax_tier_6 = @[special_mine_tax_tier_6 / 2] -gold_mine_generic_building_tax_tier_7 = @[special_mine_tax_tier_7 / 2] -gold_mine_generic_building_tax_tier_8 = @[special_mine_tax_tier_8 / 2] - -copper_mine_building_tax_tier_1 = @[copper_mine_tax_tier_1] -copper_mine_building_tax_tier_2 = @[copper_mine_tax_tier_2] -copper_mine_building_tax_tier_3 = @[copper_mine_tax_tier_3] -copper_mine_building_tax_tier_4 = @[copper_mine_tax_tier_4] -copper_mine_building_tax_tier_5 = @[copper_mine_tax_tier_5] -copper_mine_building_tax_tier_6 = @[copper_mine_tax_tier_6] -copper_mine_building_tax_tier_7 = @[copper_mine_tax_tier_7] -copper_mine_building_tax_tier_8 = @[copper_mine_tax_tier_8] - -copper_mine_generic_building_tax_tier_1 = @[copper_mine_tax_tier_1 / 2] -copper_mine_generic_building_tax_tier_2 = @[copper_mine_tax_tier_2 / 2] -copper_mine_generic_building_tax_tier_3 = @[copper_mine_tax_tier_3 / 2] -copper_mine_generic_building_tax_tier_4 = @[copper_mine_tax_tier_4 / 2] -copper_mine_generic_building_tax_tier_5 = @[copper_mine_tax_tier_5 / 2] -copper_mine_generic_building_tax_tier_6 = @[copper_mine_tax_tier_6 / 2] -copper_mine_generic_building_tax_tier_7 = @[copper_mine_tax_tier_7 / 2] -copper_mine_generic_building_tax_tier_8 = @[copper_mine_tax_tier_8 / 2] - -silver_mine_building_tax_tier_1 = @[silver_mine_tax_tier_1] -silver_mine_building_tax_tier_2 = @[silver_mine_tax_tier_2] -silver_mine_building_tax_tier_3 = @[silver_mine_tax_tier_3] -silver_mine_building_tax_tier_4 = @[silver_mine_tax_tier_4] -silver_mine_building_tax_tier_5 = @[silver_mine_tax_tier_5] -silver_mine_building_tax_tier_6 = @[silver_mine_tax_tier_6] -silver_mine_building_tax_tier_7 = @[silver_mine_tax_tier_7] -silver_mine_building_tax_tier_8 = @[silver_mine_tax_tier_8] - -silver_mine_generic_building_tax_tier_1 = @[silver_mine_tax_tier_1 / 2] -silver_mine_generic_building_tax_tier_2 = @[silver_mine_tax_tier_2 / 2] -silver_mine_generic_building_tax_tier_3 = @[silver_mine_tax_tier_3 / 2] -silver_mine_generic_building_tax_tier_4 = @[silver_mine_tax_tier_4 / 2] -silver_mine_generic_building_tax_tier_5 = @[silver_mine_tax_tier_5 / 2] -silver_mine_generic_building_tax_tier_6 = @[silver_mine_tax_tier_6 / 2] -silver_mine_generic_building_tax_tier_7 = @[silver_mine_tax_tier_7 / 2] -silver_mine_generic_building_tax_tier_8 = @[silver_mine_tax_tier_8 / 2] - -normal_building_maa_maintenance_tier_1 = @[normal_maa_maintenance_tier_1] -normal_building_maa_maintenance_tier_2 = @[normal_maa_maintenance_tier_2] -normal_building_maa_maintenance_tier_3 = @[normal_maa_maintenance_tier_3] -normal_building_maa_maintenance_tier_4 = @[normal_maa_maintenance_tier_4] -normal_building_maa_maintenance_tier_5 = @[normal_maa_maintenance_tier_5] -normal_building_maa_maintenance_tier_6 = @[normal_maa_maintenance_tier_6] -normal_building_maa_maintenance_tier_7 = @[normal_maa_maintenance_tier_7] -normal_building_maa_maintenance_tier_8 = @[normal_maa_maintenance_tier_8] - -good_building_maa_maintenance_tier_1 = @[good_maa_maintenance_tier_1] -good_building_maa_maintenance_tier_2 = @[good_maa_maintenance_tier_2] -good_building_maa_maintenance_tier_3 = @[good_maa_maintenance_tier_3] -good_building_maa_maintenance_tier_4 = @[good_maa_maintenance_tier_4] -good_building_maa_maintenance_tier_5 = @[good_maa_maintenance_tier_5] -good_building_maa_maintenance_tier_6 = @[good_maa_maintenance_tier_6] -good_building_maa_maintenance_tier_7 = @[good_maa_maintenance_tier_7] -good_building_maa_maintenance_tier_8 = @[good_maa_maintenance_tier_8] - -normal_building_development_growth_tier_1 = @[normal_development_growth_tier_1] -normal_building_development_growth_tier_2 = @[normal_development_growth_tier_2] -normal_building_development_growth_tier_3 = @[normal_development_growth_tier_3] -normal_building_development_growth_tier_4 = @[normal_development_growth_tier_4] -normal_building_development_growth_tier_5 = @[normal_development_growth_tier_5] -normal_building_development_growth_tier_6 = @[normal_development_growth_tier_6] -normal_building_development_growth_tier_7 = @[normal_development_growth_tier_7] -normal_building_development_growth_tier_8 = @[normal_development_growth_tier_8] - -good_building_development_growth_tier_1 = @[good_development_growth_tier_1] -good_building_development_growth_tier_2 = @[good_development_growth_tier_2] -good_building_development_growth_tier_3 = @[good_development_growth_tier_3] -good_building_development_growth_tier_4 = @[good_development_growth_tier_4] -good_building_development_growth_tier_5 = @[good_development_growth_tier_5] -good_building_development_growth_tier_6 = @[good_development_growth_tier_6] -good_building_development_growth_tier_7 = @[good_development_growth_tier_7] -good_building_development_growth_tier_8 = @[good_development_growth_tier_8] - -normal_building_development_growth_factor_tier_1 = @[normal_development_growth_factor_tier_1] -normal_building_development_growth_factor_tier_2 = @[normal_development_growth_factor_tier_2] -normal_building_development_growth_factor_tier_3 = @[normal_development_growth_factor_tier_3] -normal_building_development_growth_factor_tier_4 = @[normal_development_growth_factor_tier_4] -normal_building_development_growth_factor_tier_5 = @[normal_development_growth_factor_tier_5] -normal_building_development_growth_factor_tier_6 = @[normal_development_growth_factor_tier_6] -normal_building_development_growth_factor_tier_7 = @[normal_development_growth_factor_tier_7] -normal_building_development_growth_factor_tier_8 = @[normal_development_growth_factor_tier_8] - -good_building_development_growth_factor_tier_1 = @[good_development_growth_factor_tier_1] -good_building_development_growth_factor_tier_2 = @[good_development_growth_factor_tier_2] -good_building_development_growth_factor_tier_3 = @[good_development_growth_factor_tier_3] -good_building_development_growth_factor_tier_4 = @[good_development_growth_factor_tier_4] -good_building_development_growth_factor_tier_5 = @[good_development_growth_factor_tier_5] -good_building_development_growth_factor_tier_6 = @[good_development_growth_factor_tier_6] -good_building_development_growth_factor_tier_7 = @[good_development_growth_factor_tier_7] -good_building_development_growth_factor_tier_8 = @[good_development_growth_factor_tier_8] - -low_building_tax_mult_tier_1 = @[normal_tax_mult_tier_1] -low_building_tax_mult_tier_2 = @[normal_tax_mult_tier_2] -low_building_tax_mult_tier_3 = @[normal_tax_mult_tier_3] -low_building_tax_mult_tier_4 = @[normal_tax_mult_tier_4] -low_building_tax_mult_tier_5 = @[normal_tax_mult_tier_5] -low_building_tax_mult_tier_6 = @[normal_tax_mult_tier_6] -low_building_tax_mult_tier_7 = @[normal_tax_mult_tier_7] -low_building_tax_mult_tier_8 = @[normal_tax_mult_tier_8] - -normal_building_tax_mult_tier_1 = @[normal_tax_mult_tier_1] -normal_building_tax_mult_tier_2 = @[normal_tax_mult_tier_2] -normal_building_tax_mult_tier_3 = @[normal_tax_mult_tier_3] -normal_building_tax_mult_tier_4 = @[normal_tax_mult_tier_4] -normal_building_tax_mult_tier_5 = @[normal_tax_mult_tier_5] -normal_building_tax_mult_tier_6 = @[normal_tax_mult_tier_6] -normal_building_tax_mult_tier_7 = @[normal_tax_mult_tier_7] -normal_building_tax_mult_tier_8 = @[normal_tax_mult_tier_8] - -good_building_tax_mult_tier_1 = @[good_tax_mult_tier_1] -good_building_tax_mult_tier_2 = @[good_tax_mult_tier_2] -good_building_tax_mult_tier_3 = @[good_tax_mult_tier_3] -good_building_tax_mult_tier_4 = @[good_tax_mult_tier_4] -good_building_tax_mult_tier_5 = @[good_tax_mult_tier_5] -good_building_tax_mult_tier_6 = @[good_tax_mult_tier_6] -good_building_tax_mult_tier_7 = @[good_tax_mult_tier_7] -good_building_tax_mult_tier_8 = @[good_tax_mult_tier_8] - -############### -# Levy Values # -############### - -# Poor levy -poor_building_levy_tier_1 = @[poor_levy_tier_1] -poor_building_levy_tier_2 = @[poor_levy_tier_2] -poor_building_levy_tier_3 = @[poor_levy_tier_3] -poor_building_levy_tier_4 = @[poor_levy_tier_4] -poor_building_levy_tier_5 = @[poor_levy_tier_5] -poor_building_levy_tier_6 = @[poor_levy_tier_6] -poor_building_levy_tier_7 = @[poor_levy_tier_7] -poor_building_levy_tier_8 = @[poor_levy_tier_8] - -# small levy -small_building_levy_tier_1 = @[small_levy_tier_1] -small_building_levy_tier_2 = @[small_levy_tier_2] -small_building_levy_tier_3 = @[small_levy_tier_3] -small_building_levy_tier_4 = @[small_levy_tier_4] -small_building_levy_tier_5 = @[small_levy_tier_5] -small_building_levy_tier_6 = @[small_levy_tier_6] -small_building_levy_tier_7 = @[small_levy_tier_7] -small_building_levy_tier_8 = @[small_levy_tier_8] - -# Normal levy -normal_building_levy_tier_1 = @[normal_levy_tier_1] -normal_building_levy_tier_2 = @[normal_levy_tier_2] -normal_building_levy_tier_3 = @[normal_levy_tier_3] -normal_building_levy_tier_4 = @[normal_levy_tier_4] -normal_building_levy_tier_5 = @[normal_levy_tier_5] -normal_building_levy_tier_6 = @[normal_levy_tier_6] -normal_building_levy_tier_7 = @[normal_levy_tier_7] -normal_building_levy_tier_8 = @[normal_levy_tier_8] - -# Good levy -good_building_levy_tier_1 = @[good_levy_tier_1] -good_building_levy_tier_2 = @[good_levy_tier_2] -good_building_levy_tier_3 = @[good_levy_tier_3] -good_building_levy_tier_4 = @[good_levy_tier_4] -good_building_levy_tier_5 = @[good_levy_tier_5] -good_building_levy_tier_6 = @[good_levy_tier_6] -good_building_levy_tier_7 = @[good_levy_tier_7] -good_building_levy_tier_8 = @[good_levy_tier_8] - -# Excellent levy -excellent_building_levy_tier_1 = @[excellent_levy_tier_1] -excellent_building_levy_tier_2 = @[excellent_levy_tier_2] -excellent_building_levy_tier_3 = @[excellent_levy_tier_3] -excellent_building_levy_tier_4 = @[excellent_levy_tier_4] -excellent_building_levy_tier_5 = @[excellent_levy_tier_5] -excellent_building_levy_tier_6 = @[excellent_levy_tier_6] -excellent_building_levy_tier_7 = @[excellent_levy_tier_7] -excellent_building_levy_tier_8 = @[excellent_levy_tier_8] - -####################### -# Supply Limit Values # -####################### - -# Poor supply_limit -poor_building_supply_limit_tier_1 = @[poor_supply_limit_tier_1] -poor_building_supply_limit_tier_2 = @[poor_supply_limit_tier_2] -poor_building_supply_limit_tier_3 = @[poor_supply_limit_tier_3] -poor_building_supply_limit_tier_4 = @[poor_supply_limit_tier_4] -poor_building_supply_limit_tier_5 = @[poor_supply_limit_tier_5] -poor_building_supply_limit_tier_6 = @[poor_supply_limit_tier_6] -poor_building_supply_limit_tier_7 = @[poor_supply_limit_tier_7] -poor_building_supply_limit_tier_8 = @[poor_supply_limit_tier_8] - -# small supply_limit -small_building_supply_limit_tier_1 = @[small_supply_limit_tier_1] -small_building_supply_limit_tier_2 = @[small_supply_limit_tier_2] -small_building_supply_limit_tier_3 = @[small_supply_limit_tier_3] -small_building_supply_limit_tier_4 = @[small_supply_limit_tier_4] -small_building_supply_limit_tier_5 = @[small_supply_limit_tier_5] -small_building_supply_limit_tier_6 = @[small_supply_limit_tier_6] -small_building_supply_limit_tier_7 = @[small_supply_limit_tier_7] -small_building_supply_limit_tier_8 = @[small_supply_limit_tier_8] - -# Normal supply_limit -normal_building_supply_limit_tier_1 = @[normal_supply_limit_tier_1] -normal_building_supply_limit_tier_2 = @[normal_supply_limit_tier_2] -normal_building_supply_limit_tier_3 = @[normal_supply_limit_tier_3] -normal_building_supply_limit_tier_4 = @[normal_supply_limit_tier_4] -normal_building_supply_limit_tier_5 = @[normal_supply_limit_tier_5] -normal_building_supply_limit_tier_6 = @[normal_supply_limit_tier_6] -normal_building_supply_limit_tier_7 = @[normal_supply_limit_tier_7] -normal_building_supply_limit_tier_8 = @[normal_supply_limit_tier_8] - -# Good supply_limit -good_building_supply_limit_tier_1 = @[good_supply_limit_tier_1] -good_building_supply_limit_tier_2 = @[good_supply_limit_tier_2] -good_building_supply_limit_tier_3 = @[good_supply_limit_tier_3] -good_building_supply_limit_tier_4 = @[good_supply_limit_tier_4] -good_building_supply_limit_tier_5 = @[good_supply_limit_tier_5] -good_building_supply_limit_tier_6 = @[good_supply_limit_tier_6] -good_building_supply_limit_tier_7 = @[good_supply_limit_tier_7] -good_building_supply_limit_tier_8 = @[good_supply_limit_tier_8] - -# Excellent supply_limit -excellent_building_supply_limit_tier_1 = @[excellent_supply_limit_tier_1] -excellent_building_supply_limit_tier_2 = @[excellent_supply_limit_tier_2] -excellent_building_supply_limit_tier_3 = @[excellent_supply_limit_tier_3] -excellent_building_supply_limit_tier_4 = @[excellent_supply_limit_tier_4] -excellent_building_supply_limit_tier_5 = @[excellent_supply_limit_tier_5] -excellent_building_supply_limit_tier_6 = @[excellent_supply_limit_tier_6] -excellent_building_supply_limit_tier_7 = @[excellent_supply_limit_tier_7] -excellent_building_supply_limit_tier_8 = @[excellent_supply_limit_tier_8] - -################### -# Garrison Values # -################### - -# Normal garrison -normal_building_max_garrison_tier_1 = @[normal_max_garrison_tier_1] -normal_building_max_garrison_tier_2 = @[normal_max_garrison_tier_2] -normal_building_max_garrison_tier_3 = @[normal_max_garrison_tier_3] -normal_building_max_garrison_tier_4 = @[normal_max_garrison_tier_4] -normal_building_max_garrison_tier_5 = @[normal_max_garrison_tier_5] -normal_building_max_garrison_tier_6 = @[normal_max_garrison_tier_6] -normal_building_max_garrison_tier_7 = @[normal_max_garrison_tier_7] -normal_building_max_garrison_tier_8 = @[normal_max_garrison_tier_8] - -# Good garrison -good_building_max_garrison_tier_1 = @[good_max_garrison_tier_1] -good_building_max_garrison_tier_2 = @[good_max_garrison_tier_2] -good_building_max_garrison_tier_3 = @[good_max_garrison_tier_3] -good_building_max_garrison_tier_4 = @[good_max_garrison_tier_4] -good_building_max_garrison_tier_5 = @[good_max_garrison_tier_5] -good_building_max_garrison_tier_6 = @[good_max_garrison_tier_6] -good_building_max_garrison_tier_7 = @[good_max_garrison_tier_7] -good_building_max_garrison_tier_8 = @[good_max_garrison_tier_8] - -###################### -# Build Speed Values # -###################### - -# Normal build_speed -normal_building_build_speed_tier_1 = @[normal_build_speed_tier_1] -normal_building_build_speed_tier_2 = @[normal_build_speed_tier_2] -normal_building_build_speed_tier_3 = @[normal_build_speed_tier_3] -normal_building_build_speed_tier_4 = @[normal_build_speed_tier_4] -normal_building_build_speed_tier_5 = @[normal_build_speed_tier_5] -normal_building_build_speed_tier_6 = @[normal_build_speed_tier_6] -normal_building_build_speed_tier_7 = @[normal_build_speed_tier_7] -normal_building_build_speed_tier_8 = @[normal_build_speed_tier_8] - -# Good build_speed -good_building_build_speed_tier_1 = @[good_build_speed_tier_1] -good_building_build_speed_tier_2 = @[good_build_speed_tier_2] -good_building_build_speed_tier_3 = @[good_build_speed_tier_3] -good_building_build_speed_tier_4 = @[good_build_speed_tier_4] -good_building_build_speed_tier_5 = @[good_build_speed_tier_5] -good_building_build_speed_tier_6 = @[good_build_speed_tier_6] -good_building_build_speed_tier_7 = @[good_build_speed_tier_7] -good_building_build_speed_tier_8 = @[good_build_speed_tier_8] - -# Great build_speed -great_building_build_speed_tier_1 = @[great_build_speed_tier_1] -great_building_build_speed_tier_2 = @[great_build_speed_tier_2] -great_building_build_speed_tier_3 = @[great_build_speed_tier_3] -great_building_build_speed_tier_4 = @[great_build_speed_tier_4] -great_building_build_speed_tier_5 = @[great_build_speed_tier_5] -great_building_build_speed_tier_6 = @[great_build_speed_tier_6] -great_building_build_speed_tier_7 = @[great_build_speed_tier_7] -great_building_build_speed_tier_8 = @[great_build_speed_tier_8] - -##################### -# Fort Level Values # -##################### - -# Normal fort_level -normal_building_fort_level_tier_1 = @[normal_fort_level_tier_1] -normal_building_fort_level_tier_2 = @[normal_fort_level_tier_2] -normal_building_fort_level_tier_3 = @[normal_fort_level_tier_3] -normal_building_fort_level_tier_4 = @[normal_fort_level_tier_4] -normal_building_fort_level_tier_5 = @[normal_fort_level_tier_5] -normal_building_fort_level_tier_6 = @[normal_fort_level_tier_6] -normal_building_fort_level_tier_7 = @[normal_fort_level_tier_7] -normal_building_fort_level_tier_8 = @[normal_fort_level_tier_8] - -# Good fort_level -good_building_fort_level_tier_1 = @[good_fort_level_tier_1] -good_building_fort_level_tier_2 = @[good_fort_level_tier_2] -good_building_fort_level_tier_3 = @[good_fort_level_tier_3] -good_building_fort_level_tier_4 = @[good_fort_level_tier_4] -good_building_fort_level_tier_5 = @[good_fort_level_tier_5] -good_building_fort_level_tier_6 = @[good_fort_level_tier_6] -good_building_fort_level_tier_7 = @[good_fort_level_tier_7] -good_building_fort_level_tier_8 = @[good_fort_level_tier_8] - -# Great fort_level -great_building_fort_level_tier_1 = @[great_fort_level_tier_1] -great_building_fort_level_tier_2 = @[great_fort_level_tier_2] -great_building_fort_level_tier_3 = @[great_fort_level_tier_3] -great_building_fort_level_tier_4 = @[great_fort_level_tier_4] -great_building_fort_level_tier_5 = @[great_fort_level_tier_5] -great_building_fort_level_tier_6 = @[great_fort_level_tier_6] -great_building_fort_level_tier_7 = @[great_fort_level_tier_7] -great_building_fort_level_tier_8 = @[great_fort_level_tier_8] - -############# -# Advantage # -############# - -# Normal advantage -normal_building_advantage_tier_1 = @[normal_advantage_tier_1] -normal_building_advantage_tier_2 = @[normal_advantage_tier_2] -normal_building_advantage_tier_3 = @[normal_advantage_tier_3] -normal_building_advantage_tier_4 = @[normal_advantage_tier_4] -normal_building_advantage_tier_5 = @[normal_advantage_tier_5] -normal_building_advantage_tier_6 = @[normal_advantage_tier_6] -normal_building_advantage_tier_7 = @[normal_advantage_tier_7] -normal_building_advantage_tier_8 = @[normal_advantage_tier_8] - -# Good advantage -good_building_advantage_tier_1 = @[good_advantage_tier_1] -good_building_advantage_tier_2 = @[good_advantage_tier_2] -good_building_advantage_tier_3 = @[good_advantage_tier_3] -good_building_advantage_tier_4 = @[good_advantage_tier_4] -good_building_advantage_tier_5 = @[good_advantage_tier_5] -good_building_advantage_tier_6 = @[good_advantage_tier_6] -good_building_advantage_tier_7 = @[good_advantage_tier_7] -good_building_advantage_tier_8 = @[good_advantage_tier_8] - -############################# -# Construction Speed Values # -############################# - -very_quick_construction_time = @[very_quick_construction_time_base] -quick_construction_time = @[quick_construction_time_base] -standard_construction_time = @[standard_construction_time_base] -slow_construction_time = @[slow_construction_time_base] -very_slow_construction_time = @[very_slow_construction_time_base] - - -# Chance of filling one more building slot. Used when starting from a bookmark -# root = province -# scope:county = county -# scope:holder = holder -fill_building_slot_chance = { - value = 240 - if = { - limit = { - current_date < 1066.1.1 - } - subtract = 170 - } - if = { - limit = { - has_building_or_higher = tribe_01 - } - subtract = 15 - } - if = { - limit = { - has_special_building = yes - NOR = { - has_building_or_higher = hadrians_wall_01 - has_building_or_higher = offas_dyke_01 - has_building_or_higher = stonehenge_01 - has_building_or_higher = the_pyramids_01 - has_building_or_higher = the_colosseum_01 - has_building_or_higher = alhambra_01 - } - num_buildings <= 1 - } - add = 35 - } - add = { - value = county.development_level - multiply = 1.5 - max = 35 - } - multiply = { - value = county.development_rate_modifier - max = 1.5 - min = 0.85 - } - if = { - limit = { - num_buildings >= 3 - } - subtract = { - value = 50 - multiply = num_buildings # Note that the holding itself is a building - } - } - if = { - limit = { - free_building_slots <= 1 - } - subtract = 1000 - } -} - -# Chance of upgrading one more building. Used when starting from a bookmark. Done after filling out building slots -upgrade_building_chance = { - value = 150 - if = { # Very few upgraded buildings in 867 - limit = { - current_date < 1066.1.1 - } - subtract = 145 - } - if = { - limit = { - has_building_or_higher = tribe_01 - } - subtract = 15 - } - add = { - value = county.development_level - multiply = 1.5 - max = 35 - } - multiply = { - value = county.development_rate_modifier - max = 1.5 - min = 0.85 - } - if = { - limit = { - combined_building_level >= 3 - } - subtract = { - value = 50 - multiply = combined_building_level - } - } -} - -################################# -# Garrison Reinforcement Values # -################################# - -building_garrison_reinforcement_factor_tier_1 = @[garrison_reinforcement_factor_tier_1] -building_garrison_reinforcement_factor_tier_2 = @[garrison_reinforcement_factor_tier_2] -building_garrison_reinforcement_factor_tier_3 = @[garrison_reinforcement_factor_tier_3] -building_garrison_reinforcement_factor_tier_4 = @[garrison_reinforcement_factor_tier_4] -building_garrison_reinforcement_factor_tier_5 = @[garrison_reinforcement_factor_tier_5] -building_garrison_reinforcement_factor_tier_6 = @[garrison_reinforcement_factor_tier_6] -building_garrison_reinforcement_factor_tier_7 = @[garrison_reinforcement_factor_tier_7] -building_garrison_reinforcement_factor_tier_8 = @[garrison_reinforcement_factor_tier_8] - diff --git a/N3OW/common/script_values/00_character_legacy_values.txt b/N3OW/common/script_values/00_character_legacy_values.txt deleted file mode 100644 index 9f2ee388..00000000 --- a/N3OW/common/script_values/00_character_legacy_values.txt +++ /dev/null @@ -1,8 +0,0 @@ -# Referenced by code. Scoring for the legacy screen -# Root is the played character -legacy_score = { - value = 0 - add = prestige_level - add = piety_level - add = dynasty.dynasty_prestige_level -} diff --git a/N3OW/common/script_values/00_character_values.txt b/N3OW/common/script_values/00_character_values.txt deleted file mode 100644 index 9ab3e49d..00000000 --- a/N3OW/common/script_values/00_character_values.txt +++ /dev/null @@ -1,166 +0,0 @@ -# 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 = { - government_has_flag = government_is_nomadic - age >= 25 - } - add = 10 - } - 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/N3OW/common/script_values/00_combat_values.txt b/N3OW/common/script_values/00_combat_values.txt deleted file mode 100644 index a8ae47cf..00000000 --- a/N3OW/common/script_values/00_combat_values.txt +++ /dev/null @@ -1,10 +0,0 @@ -# Check for an enemy Knight with at least 80% of our Prowess to be our opponent/wound-inflicter in combat events -prowess_for_combat_event_opponent = { - value = prowess - multiply = 0.8 -} - -vastly_outnumbered_combat_side_threshold = { - value = side_strength - multiply = 5 -} diff --git a/N3OW/common/script_values/00_contract_script_values.txt b/N3OW/common/script_values/00_contract_script_values.txt deleted file mode 100644 index ff3d3b7e..00000000 --- a/N3OW/common/script_values/00_contract_script_values.txt +++ /dev/null @@ -1,192 +0,0 @@ -################################################## -# Weights - -# Control values. -## For default weights. -task_contract_weight_default_value = 50 -task_contract_weight_standard_bonus_value = 300 -task_contract_weight_slight_bonus_value = 100 -task_contract_weight_massive_bonus_value = 700 -## For contracts that are a bit shinier, but also quite a bit more specialised — stuff that won't be able to appear as often so we want to weight it up when it does. -task_contract_weight_interesting_almost_rare_value = 100 -task_contract_weight_interesting_somewhat_rare_value = 200 -task_contract_weight_interesting_quite_rare_value = 300 -task_contract_weight_interesting_very_rare_value = 500 -## For contract employer traits. -task_contract_weight_bonus_employer_has_associated_traits_value = 50 -task_contract_weight_malus_employer_has_associated_traits_value = -25 -task_contract_weight_employer_associated_traits_min_value = -50 -task_contract_weight_employer_associated_traits_max_value = 50 -## Change our weight by tier. -task_contract_weight_by_tier_value = { - ## Weight up kings and emperors, if we can get 'em. - if = { - limit = { highest_held_title_tier >= tier_kingdom } - add = 2 - } - ## And dukes somewhat. - else_if = { - limit = { highest_held_title_tier >= tier_duchy } - add = 1.5 - } - ## Weight down barons, as they're dramatically less interesting to get work from. - else_if = { - limit = { highest_held_title_tier <= tier_barony } - add = 0.01 - } - else = { add = 1 } -} -## For contract employers already being your contact, has to be very high to overcome the above values -task_contract_weight_employer_contact_list_value = { - if = { - limit = { is_contact_of = root } - add = 10000 - } -} - -# Government weighting values. -## Special contracts. -laamp_contracts_weight_up_mercenary_value = { - if = { - limit = { has_realm_law_flag = laamp_contracts_weight_up_mercenary } - add = task_contract_weight_standard_bonus_value - } -} -laamp_contracts_weight_up_transport_value = { - if = { - limit = { has_realm_law_flag = laamp_contracts_weight_up_transport } - add = task_contract_weight_standard_bonus_value - } - if = { - limit = { - domicile = { has_domicile_parameter = receives_more_escort_contracts } - } - add = task_contract_weight_slight_bonus_value - } -} -laamp_contracts_weight_up_criminal_value = { - if = { - limit = { has_realm_law_flag = laamp_contracts_weight_up_criminal } - add = task_contract_weight_standard_bonus_value - } - # Otherwise, make criminal contracts a bit less likely — unless you're in dire straits... - else_if = { - limit = { gold >= 100 } - add = { - value = task_contract_weight_standard_bonus_value - multiply = -0.75 - } - } -} -laamp_contracts_weight_up_criminal_massive_value = { - if = { - limit = { has_realm_law_flag = laamp_contracts_weight_up_criminal } - add = task_contract_weight_massive_bonus_value - } - # Otherwise, make criminal contracts a bit less likely — unless you're in dire straits... - else_if = { - limit = { gold >= 100 } - add = { - value = task_contract_weight_massive_bonus_value - multiply = -0.75 - } - } -} -## Diplo contracts. -laamp_contracts_weight_up_diplomacy_value = { - if = { - limit = { has_realm_law_flag = laamp_contracts_weight_up_diplomacy } - add = task_contract_weight_standard_bonus_value - } -} -laamp_contracts_weight_up_diplomacy_slight_value = { - if = { - limit = { has_realm_law_flag = laamp_contracts_weight_up_diplomacy_slight } - add = task_contract_weight_slight_bonus_value - } -} -## Martial contracts. -laamp_contracts_weight_up_martial_value = { - if = { - limit = { has_realm_law_flag = laamp_contracts_weight_up_martial } - add = task_contract_weight_standard_bonus_value - } -} -laamp_contracts_weight_up_martial_slight_value = { - if = { - limit = { has_realm_law_flag = laamp_contracts_weight_up_martial_slight } - add = task_contract_weight_slight_bonus_value - } -} -## Stewardship contracts. -laamp_contracts_weight_up_stewardship_value = { - if = { - limit = { has_realm_law_flag = laamp_contracts_weight_up_stewardship } - add = task_contract_weight_standard_bonus_value - } -} -## Intrigue contracts. -laamp_contracts_weight_up_intrigue_value = { - if = { - limit = { has_realm_law_flag = laamp_contracts_weight_up_intrigue } - add = task_contract_weight_standard_bonus_value - } -} -## Learning contracts. -laamp_contracts_weight_up_learning_value = { - if = { - limit = { has_realm_law_flag = laamp_contracts_weight_up_learning } - add = task_contract_weight_standard_bonus_value - } -} -## Prowess contracts. -laamp_contracts_weight_up_prowess_value = { - if = { - limit = { has_realm_law_flag = laamp_contracts_weight_up_prowess } - add = task_contract_weight_standard_bonus_value - } -} - -# Hygiene values. -## Would this character unguardedly let others know what wealth they have? -laamp_contract_would_signpost_own_prosperity_value = { - # Weight up. - ## Traits that broadcast their wealth. - if = { - limit = { has_trait = arrogant } - add = task_contract_weight_bonus_employer_has_associated_traits_value - } - if = { - limit = { has_trait = ambitious } - add = task_contract_weight_bonus_employer_has_associated_traits_value - } - if = { - limit = { has_trait = improvident } - add = task_contract_weight_bonus_employer_has_associated_traits_value - } - if = { - limit = { has_trait = profligate } - add = task_contract_weight_bonus_employer_has_associated_traits_value - } - # Weight down. - ## Traits that hide their prosperity. - if = { - limit = { has_trait = humble } - add = task_contract_weight_malus_employer_has_associated_traits_value - } - if = { - limit = { has_trait = content } - add = task_contract_weight_malus_employer_has_associated_traits_value - } - if = { - limit = { has_trait = greedy } - add = task_contract_weight_malus_employer_has_associated_traits_value - } - if = { - limit = { has_trait = deceitful } - add = task_contract_weight_malus_employer_has_associated_traits_value - } - # Restrictions. - min = task_contract_weight_employer_associated_traits_min_value - max = task_contract_weight_employer_associated_traits_max_value -} diff --git a/N3OW/common/script_values/00_council_values.txt b/N3OW/common/script_values/00_council_values.txt deleted file mode 100644 index 385f50c5..00000000 --- a/N3OW/common/script_values/00_council_values.txt +++ /dev/null @@ -1,91 +0,0 @@ - - - -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 - -kurultai_task_side_effect_cooldown = 95 - -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_has_flag = government_is_administrative } - multiply = 0 - } -} - -council_scaled_by_liege_tier_nomad = { - value = council_scaled_by_liege_tier - if = { - limit = { NOT = { government_has_flag = government_is_nomadic } } - multiply = 0 - } -} - -council_scaled_by_liege_tier_not_nomad = { - value = council_scaled_by_liege_tier - if = { - limit = { government_has_flag = government_is_nomadic } - multiply = 0 - } -} - -council_scaled_admin_value = { - value = 0 # This value should be 0 for anyone who isn't admin - if = { - limit = { - government_has_flag = government_is_administrative - } - add = 1 - if = { - limit = { - liege = { highest_held_title_tier >= tier_empire } - } - multiply = 2 - } - } -} diff --git a/N3OW/common/script_values/00_county_control_values.txt b/N3OW/common/script_values/00_county_control_values.txt deleted file mode 100644 index 2111a070..00000000 --- a/N3OW/common/script_values/00_county_control_values.txt +++ /dev/null @@ -1,159 +0,0 @@ -###################### -# 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 - } - if = { - limit = { - has_county_modifier = county_corruption_roaming_bandits_modifier - } - add = 1 - } - if = { - limit = { - has_county_modifier = county_corruption_wild_beast_attacks_modifier - } - add = 1 - } - if = { - limit = { - has_county_modifier = county_corruption_upset_shepherds_modifier - } - add = 1 - } - if = { - limit = { - has_county_modifier = county_corruption_rogue_warriors_modifier - } - add = 1 - } - if = { - limit = { - has_county_modifier = county_corruption_unruly_nomads_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/N3OW/common/script_values/00_county_fertility.txt b/N3OW/common/script_values/00_county_fertility.txt deleted file mode 100644 index 6132e5a4..00000000 --- a/N3OW/common/script_values/00_county_fertility.txt +++ /dev/null @@ -1,96 +0,0 @@ -# COUNTY FERTILITY VALUES -# GATHERED TOGETHER IN ONE PLACE FOR BALANCING CONVENIENCE - -# SEASONS -# -## ABUNDANT GRAZING (GOOD) - -cf_abundant_grazing_growth_add_value = 2.0 -cf_abundant_grazing_growth_mult_value = 0.25 - -## SEVERE DROUGHT (BAD) - -cf_severe_drought_decline_add_value = -0.5 -cf_severe_drought_decline_mult_value = 0.2 -cf_severe_drought_growth_mult_value = -0.2 - -## WHITE ZUD (BAD-BAD) - -cf_white_zud_decline_add_value = -2 -cf_white_zud_decline_mult_value = 0.8 -cf_white_zud_growth_mult_value = -0.8 - -## COLD ZUD ( BAD ) - -cf_cold_zud_decline_add_value = -1 -cf_cold_zud_decline_mult_value = 0.4 -cf_cold_zud_growth_mult_value = -0.4 - -## EVERLASTING SUMMER ( GOOD-GOOD ) - -cf_warm_nights_growth_add_value = 2.0 -cf_warm_nights_growth_mult_value = 0.75 - -## BLESSING OF THE BLUE SKY ( BLISS ) - -cf_sky_blessing_growth_add_value = 8 -cf_sky_blessing_growth_mult_value = 3 - -# HAVSARSAN ( EVERYBODY WILL PERISH ) - -cf_havsarsan_decline_add_value = 4 -cf_havsarsan_decline_mult_value = 1 -cf_havsarsan_growth_mult_value = -3 - -# TERRAIN (only growth add) -# NOTE: these are added per province in the county, so be mindful with the values - -steppe_county_fertility_value = 0.35 -farmlands_county_fertility_value = 0.35 -oasis_county_fertility_value = 0.35 -plains_county_fertility_value = 0.25 -desert_county_fertility_value = 0.25 -drylands_county_fertility_value = 0.25 -hills_county_fertility_value = 0.2 -floodplains_county_fertility_value = 0.2 -wetlands_county_fertility_value = 0.2 -mountains_county_fertility_value = 0.15 -desert_mountains_county_fertility_value = 0.15 -forest_county_fertility_value = 0.15 -taiga_county_fertility_value = 0.15 -jungle_county_fertility_value = 0.05 - -# TERRAIN CULTURE MODIFIERS - -high_culture_county_fertility_value_add = 0.4 -medium_culture_county_fertility_value_add = 0.1 -low_culture_county_fertility_value_add = 0.05 - -high_culture_county_fertility_value_mult = 0.2 -medium_culture_county_fertility_value_mult = 0.1 -low_culture_county_fertility_value_mult = 0.05 - - -# EVENT ETC MODIFIERS - -massive_county_fertility_value_positive_add = 8 -major_county_fertility_value_positive_add = 6 -medium_county_fertility_value_positive_add = 4 -minor_county_fertility_value_positive_add = 2 - -massive_county_fertility_value_positive_mult = 1 -major_county_fertility_value_positive_mult = 0.6 -medium_county_fertility_value_positive_mult = 0.4 -minor_county_fertility_value_positive_mult = 0.2 - -massive_county_fertility_value_negative_add = -6 -major_county_fertility_value_negative_add = -4 -medium_county_fertility_value_negative_add = -2 -minor_county_fertility_value_negative_add = -1 - -massive_county_fertility_value_negative_mult = -0.8 -major_county_fertility_value_negative_mult = -0.6 -medium_county_fertility_value_negative_mult = -0.2 -minor_county_fertility_value_negative_mult = -0.1 - - diff --git a/N3OW/common/script_values/00_court_amenities_values.txt b/N3OW/common/script_values/00_court_amenities_values.txt deleted file mode 100644 index d275c80c..00000000 --- a/N3OW/common/script_values/00_court_amenities_values.txt +++ /dev/null @@ -1,400 +0,0 @@ -############################ -# 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 - } - } - if = { - limit = { - has_game_rule = hard_difficulty - is_ai = yes - } - multiply = 0.75 - } - else_if = { - limit = { - has_game_rule = very_hard_difficulty - is_ai = yes - } - multiply = 0.5 - } -} - -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/N3OW/common/script_values/00_court_grandeur_values.txt b/N3OW/common/script_values/00_court_grandeur_values.txt deleted file mode 100644 index bb787ec1..00000000 --- a/N3OW/common/script_values/00_court_grandeur_values.txt +++ /dev/null @@ -1,20 +0,0 @@ -court_grandeur_rank_4_min_level = 9 -court_grandeur_rank_3_min_level = 6 -court_grandeur_rank_2_min_level = 3 - -current_cgv_above_expected_exact_value = { - value = court_grandeur_current - subtract = court_grandeur_minimum_expected -} - -indebt_guest_interaction_lost_test_grandeur_cost_value = { value = minor_court_grandeur_loss } - -# Note: base chance is 50, so this works out at 50 + [this value] = guestimated likelihood (i.e., before traits and such) before the AI will consider using this interaction. -indebt_guest_interaction_likely_success_control_value = 25 - -indebt_guest_interaction_get_intrigue_difference_value = { - # Grab scope:actor's intrigue. - value = scope:actor.intrigue - # And then remove scope:recipient's. - subtract = scope:recipient.intrigue -} diff --git a/N3OW/common/script_values/00_court_position_values.txt b/N3OW/common/script_values/00_court_position_values.txt deleted file mode 100644 index 0d062444..00000000 --- a/N3OW/common/script_values/00_court_position_values.txt +++ /dev/null @@ -1,2804 +0,0 @@ - -############################ -# MINOR TITLE COSTS -############################ - -tiny_court_position_salary = { - add = { - value = 0.05 - 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 = { - government_has_flag = government_is_nomadic - } - } - multiply = { - value = 0.5 - desc = nomad_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" - } - } - if = { - limit = { - OR = { - has_game_rule = hard_difficulty - has_game_rule = very_hard_difficulty - } - scope:liege = { - is_ai = yes - } - } - multiply = 0 - } -} - -minor_court_position_salary = { - add = { - value = 0.12 - 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 = { - government_has_flag = government_is_nomadic - } - } - multiply = { - value = 0.5 - desc = nomad_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" - } - } - if = { - limit = { - OR = { - has_game_rule = hard_difficulty - has_game_rule = very_hard_difficulty - } - scope:liege = { - is_ai = yes - } - } - multiply = 0 - } -} -medium_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 = { - government_has_flag = government_is_nomadic - } - } - multiply = { - value = 0.5 - desc = nomad_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" - } - } - if = { - limit = { - OR = { - has_game_rule = hard_difficulty - has_game_rule = very_hard_difficulty - } - scope:liege = { - is_ai = yes - } - } - multiply = 0 - } -} -major_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 = { - government_has_flag = government_is_nomadic - } - } - multiply = { - value = 0.5 - desc = nomad_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" - } - } - if = { - limit = { - OR = { - has_game_rule = hard_difficulty - has_game_rule = very_hard_difficulty - } - scope:liege = { - is_ai = yes - } - } - multiply = 0 - } -} - -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" - } - } - } - if = { - limit = { - OR = { - has_game_rule = hard_difficulty - has_game_rule = very_hard_difficulty - } - scope:liege = { - is_ai = yes - } - } - multiply = 0 - } -} - -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" - } - } - if = { - limit = { - OR = { - has_game_rule = hard_difficulty - has_game_rule = very_hard_difficulty - } - scope:liege = { - is_ai = yes - } - } - multiply = 0 - } -} - -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" - } - } - if = { - limit = { - OR = { - has_game_rule = hard_difficulty - has_game_rule = very_hard_difficulty - } - scope:liege = { - is_ai = yes - } - } - multiply = 0 - } -} - -minor_court_position_task_prestige_salary = 0.2 - -minor_court_position_prestige_salary = { - add = { - value = 0.1 - 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 = { - government_has_flag = government_is_nomadic - } - } - multiply = { - value = 0.5 - desc = nomad_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" - } - } - if = { - limit = { - OR = { - has_game_rule = hard_difficulty - has_game_rule = very_hard_difficulty - } - scope:liege = { - is_ai = yes - } - } - multiply = 0 - } -} -medium_court_position_prestige_salary = { - add = { - value = 0.2 - 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 = { - government_has_flag = government_is_nomadic - } - } - multiply = { - value = 0.5 - desc = nomad_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" - } - } - if = { - limit = { - OR = { - has_game_rule = hard_difficulty - has_game_rule = very_hard_difficulty - } - scope:liege = { - is_ai = yes - } - } - multiply = 0 - } -} -major_court_position_prestige_salary = { - add = { - value = 0.3 - 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 = { - government_has_flag = government_is_nomadic - } - } - multiply = { - value = 0.5 - desc = nomad_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" - } - } - if = { - limit = { - OR = { - has_game_rule = hard_difficulty - has_game_rule = very_hard_difficulty - } - scope:liege = { - is_ai = yes - } - } - multiply = 0 - } -} - -minor_court_position_piety_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 = { - government_has_flag = government_is_nomadic - } - } - multiply = { - value = 0.5 - desc = nomad_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" - } - } - if = { - limit = { - OR = { - has_game_rule = hard_difficulty - has_game_rule = very_hard_difficulty - } - scope:liege = { - is_ai = yes - } - } - multiply = 0 - } -} -medium_court_position_piety_salary = { - add = { - value = 1 - 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 = { - government_has_flag = government_is_nomadic - } - } - multiply = { - value = 0.5 - desc = nomad_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" - } - } - if = { - limit = { - OR = { - has_game_rule = hard_difficulty - has_game_rule = very_hard_difficulty - } - scope:liege = { - is_ai = yes - } - } - multiply = 0 - } -} -major_court_position_piety_salary = { - add = { - value = 2 - 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 = { - government_has_flag = government_is_nomadic - } - } - multiply = { - value = 0.5 - desc = nomad_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" - } - } - if = { - limit = { - OR = { - has_game_rule = hard_difficulty - has_game_rule = very_hard_difficulty - } - scope:liege = { - is_ai = yes - } - } - multiply = 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 - } -} - -######################## -# COURT POSITION TASKS # -######################## - -seneschal_improve_court_value = { - value = 0 - if = { - limit = { - aptitude = { - court_position = seneschal_court_position - value = 4 - } - } - value = 10 - } - else_if = { - limit = { - aptitude = { - court_position = seneschal_court_position - value = 3 - } - } - value = 7 - } - else_if = { - limit = { - aptitude = { - court_position = seneschal_court_position - value = 2 - } - } - value = 5 - } - else_if = { - limit = { - aptitude = { - court_position = seneschal_court_position - value = 1 - } - } - value = 3 - } - else_if = { - limit = { - aptitude = { - court_position = seneschal_court_position - value = 0 - } - } - value = 2 - } -} - -yeke_jarquchi_improve_court_value = { - value = 0 - if = { - limit = { - aptitude = { - court_position = yeke_jarquchi_court_position - value = 4 - } - } - value = 10 - } - else_if = { - limit = { - aptitude = { - court_position = yeke_jarquchi_court_position - value = 3 - } - } - value = 7 - } - else_if = { - limit = { - aptitude = { - court_position = yeke_jarquchi_court_position - value = 2 - } - } - value = 5 - } - else_if = { - limit = { - aptitude = { - court_position = yeke_jarquchi_court_position - value = 1 - } - } - value = 3 - } - else_if = { - limit = { - aptitude = { - court_position = yeke_jarquchi_court_position - value = 0 - } - } - value = 2 - } -} - -caravan_master_prepare_travels_max_value = { - value = 3 - if = { - limit = { - aptitude = { - court_position = travel_leader_court_position - value = 4 - } - } - value = 20 - } - else_if = { - limit = { - aptitude = { - court_position = travel_leader_court_position - value = 3 - } - } - value = 15 - } - else_if = { - limit = { - aptitude = { - court_position = travel_leader_court_position - value = 2 - } - } - value = 10 - } - else_if = { - limit = { - aptitude = { - court_position = travel_leader_court_position - value = 1 - } - } - value = 6 - } -} - -caravan_master_prepare_travels_change_value = { - value = caravan_master_prepare_travels_max_value - divide = 10 -} - -caravan_master_prepare_travels_current_value = { - value = 0 - liege_or_court_owner ?= { - if = { - limit = { - has_variable = prepare_travels_value - } - value = var:prepare_travels_value - } - } -} - -caravan_master_prepare_travels_current_value_employer = { - value = 0 - scope:liege = { - if = { - limit = { - has_variable = prepare_travels_value - } - value = var:prepare_travels_value - } - } -} - -prepare_travels_modifier_value = { - value = 0 - if = { - limit = { - has_variable = prepare_travels_modifier_value - } - value = var:prepare_travels_modifier_value - } - - desc = MODIFIER_DEFINITION_PREPARE_TRAVELS_VALUE -} - -# Aptitude Values -kurultai_task_value = { - if = { - limit = { - OR = { - employer.cp:councillor_kurultai_1 ?= { is_performing_council_task = task_kurultai_court_astrologer_1 } - employer.cp:councillor_kurultai_2 ?= { is_performing_council_task = task_kurultai_court_astrologer_2 } - employer.cp:councillor_kurultai_3 ?= { is_performing_council_task = task_kurultai_court_astrologer_3 } - employer.cp:councillor_kurultai_4 ?= { is_performing_council_task = task_kurultai_court_astrologer_4 } - } - } - add = { - if = { - limit = { - employer.cp:councillor_kurultai_1 ?= { is_performing_council_task = task_kurultai_court_astrologer_1 } - } - add = employer.cp:councillor_kurultai_1.kurultai_court_astrologer_aptitude_final_value - } - if = { - limit = { - employer.cp:councillor_kurultai_2 ?= { is_performing_council_task = task_kurultai_court_astrologer_2 } - } - add = employer.cp:councillor_kurultai_2.kurultai_court_astrologer_aptitude_final_value - } - if = { - limit = { - employer.cp:councillor_kurultai_3 ?= { is_performing_council_task = task_kurultai_court_astrologer_3 } - } - add = employer.cp:councillor_kurultai_3.kurultai_court_astrologer_aptitude_final_value - } - if = { - limit = { - employer.cp:councillor_kurultai_4 ?= { is_performing_council_task = task_kurultai_court_astrologer_4 } - } - add = employer.cp:councillor_kurultai_4.kurultai_court_astrologer_aptitude_final_value - } - desc = task_kurultai_court_astrologer_modifier - } - } -} - -aptitude_commander_trait_value = { - add = aptitude_logistician_value - add = aptitude_military_engineer_value - add = aptitude_aggressive_attacker_value - add = aptitude_unyielding_defender_value - add = aptitude_forder_value - add = aptitude_flexible_leader_value - add = aptitude_desert_warrior_value - add = aptitude_jungle_stalker_value - add = aptitude_reaver_value - add = aptitude_reckless_value - add = aptitude_holy_warrior_value - add = aptitude_open_terrain_expert_value - add = aptitude_rough_terrain_expert_value - add = aptitude_forest_fighter_value - add = aptitude_cautious_leader_value - add = aptitude_organizer_value - add = aptitude_winter_soldier_value -} - -aptitude_logistician_value = { - value = 0 - if = { - limit = { - has_trait = logistician - } - add = 10 - if = { - limit = { - has_trait_xp = { - trait = logistician - value >= 100 - } - } - add = 15 - } - else_if = { - limit = { - has_trait_xp = { - trait = logistician - value >= 66 - } - } - add = 10 - } - else_if = { - limit = { - has_trait_xp = { - trait = logistician - value >= 33 - } - } - add = 5 - } - } - desc = court_position_logistician_trait -} - -aptitude_military_engineer_value = { - value = 0 - if = { - limit = { - has_trait = military_engineer - } - add = 10 - if = { - limit = { - has_trait_xp = { - trait = military_engineer - value >= 100 - } - } - add = 15 - } - else_if = { - limit = { - has_trait_xp = { - trait = military_engineer - value >= 66 - } - } - add = 10 - } - else_if = { - limit = { - has_trait_xp = { - trait = military_engineer - value >= 33 - } - } - add = 5 - } - } - desc = court_position_military_engineer_trait -} - -aptitude_aggressive_attacker_value = { - value = 0 - if = { - limit = { - has_trait = aggressive_attacker - } - add = 10 - if = { - limit = { - has_trait_xp = { - trait = aggressive_attacker - value >= 100 - } - } - add = 15 - } - else_if = { - limit = { - has_trait_xp = { - trait = aggressive_attacker - value >= 66 - } - } - add = 10 - } - else_if = { - limit = { - has_trait_xp = { - trait = aggressive_attacker - value >= 33 - } - } - add = 5 - } - } - desc = court_position_aggressive_attacker_trait -} - -aptitude_unyielding_defender_value = { - value = 0 - if = { - limit = { - has_trait = unyielding_defender - } - add = 10 - if = { - limit = { - has_trait_xp = { - trait = unyielding_defender - value >= 100 - } - } - add = 15 - } - else_if = { - limit = { - has_trait_xp = { - trait = unyielding_defender - value >= 66 - } - } - add = 10 - } - else_if = { - limit = { - has_trait_xp = { - trait = unyielding_defender - value >= 33 - } - } - add = 5 - } - } - desc = court_position_unyielding_defender_trait -} - -aptitude_forder_value = { - value = 0 - if = { - limit = { - has_trait = forder - } - add = 10 - if = { - limit = { - has_trait_xp = { - trait = forder - value >= 100 - } - } - add = 15 - } - else_if = { - limit = { - has_trait_xp = { - trait = forder - value >= 66 - } - } - add = 10 - } - else_if = { - limit = { - has_trait_xp = { - trait = forder - value >= 33 - } - } - add = 5 - } - } - desc = court_position_forder_trait -} - -aptitude_flexible_leader_value = { - value = 0 - if = { - limit = { - has_trait = flexible_leader - } - add = 10 - if = { - limit = { - has_trait_xp = { - trait = flexible_leader - value >= 100 - } - } - add = 15 - } - else_if = { - limit = { - has_trait_xp = { - trait = flexible_leader - value >= 66 - } - } - add = 10 - } - else_if = { - limit = { - has_trait_xp = { - trait = flexible_leader - value >= 33 - } - } - add = 5 - } - } - desc = court_position_flexible_leader_trait -} - -aptitude_desert_warrior_value = { - value = 0 - if = { - limit = { - has_trait = desert_warrior - } - add = 10 - if = { - limit = { - has_trait_xp = { - trait = desert_warrior - value >= 100 - } - } - add = 15 - } - else_if = { - limit = { - has_trait_xp = { - trait = desert_warrior - value >= 66 - } - } - add = 10 - } - else_if = { - limit = { - has_trait_xp = { - trait = desert_warrior - value >= 33 - } - } - add = 5 - } - } - desc = court_position_desert_warrior_trait -} - -aptitude_jungle_stalker_value = { - value = 0 - if = { - limit = { - has_trait = jungle_stalker - } - add = 10 - if = { - limit = { - has_trait_xp = { - trait = jungle_stalker - value >= 100 - } - } - add = 15 - } - else_if = { - limit = { - has_trait_xp = { - trait = jungle_stalker - value >= 66 - } - } - add = 10 - } - else_if = { - limit = { - has_trait_xp = { - trait = jungle_stalker - value >= 33 - } - } - add = 5 - } - } - desc = court_position_jungle_stalker_trait -} - -aptitude_reaver_value = { - value = 0 - if = { - limit = { - has_trait = reaver - } - add = 10 - if = { - limit = { - has_trait_xp = { - trait = reaver - value >= 100 - } - } - add = 15 - } - else_if = { - limit = { - has_trait_xp = { - trait = reaver - value >= 66 - } - } - add = 10 - } - else_if = { - limit = { - has_trait_xp = { - trait = reaver - value >= 33 - } - } - add = 5 - } - } - desc = court_position_reaver_trait -} - -aptitude_reckless_value = { - value = 0 - if = { - limit = { - has_trait = reckless - } - add = 10 - if = { - limit = { - has_trait_xp = { - trait = reckless - value >= 100 - } - } - add = 15 - } - else_if = { - limit = { - has_trait_xp = { - trait = reckless - value >= 66 - } - } - add = 10 - } - else_if = { - limit = { - has_trait_xp = { - trait = reckless - value >= 33 - } - } - add = 5 - } - } - desc = court_position_reckless_trait -} - -aptitude_holy_warrior_value = { - value = 0 - if = { - limit = { - has_trait = holy_warrior - } - add = 10 - if = { - limit = { - has_trait_xp = { - trait = holy_warrior - value >= 100 - } - } - add = 15 - } - else_if = { - limit = { - has_trait_xp = { - trait = holy_warrior - value >= 66 - } - } - add = 10 - } - else_if = { - limit = { - has_trait_xp = { - trait = holy_warrior - value >= 33 - } - } - add = 5 - } - } - desc = court_position_holy_warrior_trait -} - -aptitude_open_terrain_expert_value = { - value = 0 - if = { - limit = { - has_trait = open_terrain_expert - } - add = 10 - if = { - limit = { - has_trait_xp = { - trait = open_terrain_expert - value >= 100 - } - } - add = 15 - } - else_if = { - limit = { - has_trait_xp = { - trait = open_terrain_expert - value >= 66 - } - } - add = 10 - } - else_if = { - limit = { - has_trait_xp = { - trait = open_terrain_expert - value >= 33 - } - } - add = 5 - } - } - desc = court_position_open_terrain_expert_trait -} - -aptitude_rough_terrain_expert_value = { - value = 0 - if = { - limit = { - has_trait = rough_terrain_expert - } - add = 10 - if = { - limit = { - has_trait_xp = { - trait = rough_terrain_expert - value >= 100 - } - } - add = 15 - } - else_if = { - limit = { - has_trait_xp = { - trait = rough_terrain_expert - value >= 66 - } - } - add = 10 - } - else_if = { - limit = { - has_trait_xp = { - trait = rough_terrain_expert - value >= 33 - } - } - add = 5 - } - } - desc = court_position_rough_terrain_expert_trait -} - -aptitude_forest_fighter_value = { - value = 0 - if = { - limit = { - has_trait = forest_fighter - } - add = 10 - if = { - limit = { - has_trait_xp = { - trait = forest_fighter - value >= 100 - } - } - add = 15 - } - else_if = { - limit = { - has_trait_xp = { - trait = forest_fighter - value >= 66 - } - } - add = 10 - } - else_if = { - limit = { - has_trait_xp = { - trait = forest_fighter - value >= 33 - } - } - add = 5 - } - } - desc = court_position_forest_fighter_trait -} - -aptitude_cautious_leader_value = { - value = 0 - if = { - limit = { - has_trait = cautious_leader - } - add = 10 - if = { - limit = { - has_trait_xp = { - trait = cautious_leader - value >= 100 - } - } - add = 15 - } - else_if = { - limit = { - has_trait_xp = { - trait = cautious_leader - value >= 66 - } - } - add = 10 - } - else_if = { - limit = { - has_trait_xp = { - trait = cautious_leader - value >= 33 - } - } - add = 5 - } - } - desc = court_position_cautious_leader_trait -} - -aptitude_organizer_value = { - value = 0 - if = { - limit = { - has_trait = organizer - } - add = 10 - if = { - limit = { - has_trait_xp = { - trait = organizer - value >= 100 - } - } - add = 15 - } - else_if = { - limit = { - has_trait_xp = { - trait = organizer - value >= 66 - } - } - add = 10 - } - else_if = { - limit = { - has_trait_xp = { - trait = organizer - value >= 33 - } - } - add = 5 - } - } - desc = court_position_organizer_trait -} - -aptitude_winter_soldier_value = { - value = 0 - if = { - limit = { - has_trait = winter_soldier - } - add = 10 - if = { - limit = { - has_trait_xp = { - trait = winter_soldier - value >= 100 - } - } - add = 15 - } - else_if = { - limit = { - has_trait_xp = { - trait = winter_soldier - value >= 66 - } - } - add = 10 - } - else_if = { - limit = { - has_trait_xp = { - trait = winter_soldier - value >= 33 - } - } - add = 5 - } - } - desc = court_position_winter_soldier_trait -} diff --git a/N3OW/common/script_values/00_culture_values.txt b/N3OW/common/script_values/00_culture_values.txt deleted file mode 100644 index 10923189..00000000 --- a/N3OW/common/script_values/00_culture_values.txt +++ /dev/null @@ -1,969 +0,0 @@ - -# 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 - } - else_if = { - limit = { - root = { - has_trait = nomadic_philosophy - NOT = { - government_has_flag = government_is_nomadic - } - } - } - 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 - } - # Council Position - if = { - limit = { - root = { - has_variable = kurultai_culture_variable_value - } - } - multiply = { - value = 100 - subtract = root.var:kurultai_culture_variable_value - divide = 100 - } - } - 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 = { - value = 50 - if = { - limit = { - culture_head ?= { - has_variable = kurultai_culture_variable_value - } - } - multiply = { - value = 100 - subtract = culture_head.var:kurultai_culture_variable_value - divide = 100 - } - } -} - -tradition_base_cost = { - value = 2000 - if = { - limit = { - culture_head ?= { - has_variable = kurultai_culture_variable_value - } - } - multiply = { - value = 100 - subtract = culture_head.var:kurultai_culture_variable_value - divide = 100 - } - } -} - -tradition_double_base_cost = { - value = tradition_base_cost - multiply = 2 -} -tradition_incompatible_ethos_penalty = { - value = 2000 - if = { - limit = { - culture_head ?= { - has_variable = kurultai_culture_variable_value - } - } - multiply = { - value = 100 - subtract = culture_head.var:kurultai_culture_variable_value - divide = 100 - } - } -} - -tradition_unfulfilled_criteria_penalty = { - value = 3000 - if = { - limit = { - culture_head ?= { - has_variable = kurultai_culture_variable_value - } - } - multiply = { - value = 100 - subtract = culture_head.var:kurultai_culture_variable_value - divide = 100 - } - } -} - -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 = { - government_has_flag = government_is_nomadic - domicile ?= { has_domicile_parameter = nomad_yurt_language_cap } - } - 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/N3OW/common/script_values/00_decision_values.txt b/N3OW/common/script_values/00_decision_values.txt deleted file mode 100644 index 4e0462ce..00000000 --- a/N3OW/common/script_values/00_decision_values.txt +++ /dev/null @@ -1,103 +0,0 @@ - -# Accuse the Krstjani of Heresy -accuse_the_krstjani_of_heresy_cancellation_cooldown_value = 10 -accuse_the_krstjani_of_heresy_failure_cooldown_value = 30 -accuse_the_krstjani_of_heresy_critical_failure_cooldown_value = 50 - -# Negotiate the Danelaw -negotiate_the_danelaw_preferable_opponent_value = { - value = 0 - - # Add 75 for every held duchy in k_england. - every_held_title = { - limit = { - tier = tier_duchy - kingdom = title:k_england - } - add = 75 - } - # 50 for every directly held county in k_england. - every_held_title = { - limit = { - tier = tier_county - kingdom = title:k_england - } - add = 50 - } - # And 25 for every vassalised county in k_england. - every_vassal = { - limit = { - any_held_title = { - tier = tier_county - kingdom = title:k_england - } - } - every_held_title = { - limit = { - tier = tier_county - kingdom = title:k_england - } - add = 25 - } - } -} - -standard_commission_artifact_cooldown_time = { - value = 1825 - #if = { - # limit = { - # root.culture = { - # has_cultural_parameter = more_frequent_hunts - # } - # } - # multiply = 0.5 - #} -} - -found_witch_coven_member_count_value = { - value = 4 -} - -found_witch_coven_member_percent_value = { - value = 0.6 -} - -found_witch_coven_member_percent_display_value = { - value = found_witch_coven_member_percent_value - multiply = 100 -} - -invite_knights_decision_standard_value = { - value = 12 - if = { - limit = { - root = { - dynasty ?= { has_dynasty_perk = ep2_activities_legacy_5 } - involved_activity ?= { has_activity_type = activity_tournament } - } - } - add = 6 - } -} - -invite_knights_decision_upper_value = { - value = invite_knights_decision_standard_value - add = 3 -} - -fp3_antagonize_character_interaction_cooldown = { - value = 2 - if = { - limit = { NOT = { any_character_struggle = { is_struggle_type = persian_struggle } } } - add = 3 - } -} - -invite_poets_decision_standard_value = { - value = 14 -} - -invite_poets_decision_upper_value = { - value = invite_poets_decision_standard_value - add = 4 -} \ No newline at end of file diff --git a/N3OW/common/script_values/00_diarchy_values.txt b/N3OW/common/script_values/00_diarchy_values.txt deleted file mode 100644 index e943fd63..00000000 --- a/N3OW/common/script_values/00_diarchy_values.txt +++ /dev/null @@ -1,3569 +0,0 @@ -############# -# 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 - } - } - } - } - # Obedience matters if you have obedience - if = { - limit = { - liege = { government_allows = obedience } - } - add = { - desc = game_concept_obedience - value = obedience_value - } - } - # 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 = { - OR = { - has_court_type = court_tribal - has_court_type = court_nomadic - } - } - } - 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 = { - OR = { - has_court_type = court_tribal - has_court_type = court_nomadic - } - } - } - 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/N3OW/common/script_values/00_difficulty_values.txt b/N3OW/common/script_values/00_difficulty_values.txt deleted file mode 100644 index d481cb05..00000000 --- a/N3OW/common/script_values/00_difficulty_values.txt +++ /dev/null @@ -1,1395 +0,0 @@ -# Various character difficulty values for use with Choose your Destiny -skill_difficulty_measurement_value = { - value = { - value = 50 - subtract = diplomacy - subtract = stewardship - subtract = martial - subtract = intrigue - subtract = learning - if = { - limit = { - is_adult = no - } - subtract = 10 - } - multiply = 10 - desc = skills_difficulty - } -} - -legitimacy_difficulty_value = { - if = { - limit = { - is_ruler = yes - highest_held_title_tier <= tier_county - government_allows = legitimacy - legitimacy_level <= 0 - } - add = { - value = 100 - desc = legitimacy_difficulty - } - } - else_if = { - limit = { - highest_held_title_tier = tier_duchy - government_allows = legitimacy - legitimacy_level <= 1 - } - add = { - value = { - value = 100 - if = { - limit = { - legitimacy_level <= 0 - } - add = 100 - } - } - desc = legitimacy_difficulty - } - } - else_if = { - limit = { - highest_held_title_tier > tier_duchy - government_allows = legitimacy - legitimacy_level <= 2 - } - add = { - value = { - value = 200 - if = { - limit = { - legitimacy_level <= 1 - } - add = 200 - } - if = { - limit = { - legitimacy_level <= 0 - } - add = 300 - } - } - desc = legitimacy_difficulty - } - } - else_if = { - limit = { - government_allows = legitimacy - legitimacy_level >= 5 - } - add = { - value = { - value = -100 - } - desc = legitimacy_difficulty - } - } - else_if = { - limit = { - highest_held_title_tier <= tier_duchy - government_allows = legitimacy - legitimacy_level >= 4 - } - add = { - value = { - value = -50 - } - desc = legitimacy_difficulty - } - } -} - -extreme_trait_difficulty = 500 -very_high_trait_difficulty = 200 -high_trait_difficulty = 100 -medium_trait_difficulty = 50 -medium_low_trait_difficulty = 20 -low_trait_difficulty = 10 - -negative_extreme_trait_difficulty = -250 -negative_very_high_trait_difficulty = -100 -negative_high_trait_difficulty = -50 -negative_medium_trait_difficulty = -25 -negative_medium_low_trait_difficulty = -10 -negative_low_trait_difficulty = -5 - -trait_difficulty_values = { - #Positives! - if = { - limit = { - num_virtuous_traits > 0 - } - add = { - value = negative_high_trait_difficulty - multiply = num_virtuous_traits - desc = virtuous_traits_difficulty - } - } - if = { - limit = { - has_trait = physique_good_3 - } - add = { - value = negative_high_trait_difficulty - desc = physique_good_3_difficulty - } - } - if = { - limit = { - has_trait = physique_good_2 - } - add = { - value = negative_medium_trait_difficulty - desc = physique_good_2_difficulty - } - } - if = { - limit = { - has_trait = physique_good_1 - } - add = { - value = negative_medium_low_trait_difficulty - desc = physique_good_1_difficulty - } - } - if = { - limit = { - has_trait = intellect_good_3 - } - add = { - value = negative_high_trait_difficulty - desc = intellect_good_3_difficulty - } - } - if = { - limit = { - has_trait = intellect_good_2 - } - add = { - value = negative_medium_trait_difficulty - desc = intellect_good_2_difficulty - } - } - if = { - limit = { - has_trait = intellect_good_1 - } - add = { - value = negative_medium_low_trait_difficulty - desc = intellect_good_1_difficulty - } - } - if = { - limit = { - has_trait = beauty_good_3 - } - add = { - value = negative_high_trait_difficulty - desc = beauty_good_3_difficulty - } - } - if = { - limit = { - has_trait = beauty_good_2 - } - add = { - value = negative_medium_trait_difficulty - desc = beauty_good_2_difficulty - } - } - if = { - limit = { - has_trait = beauty_good_1 - } - add = { - value = negative_medium_low_trait_difficulty - desc = beauty_good_1_difficulty - } - } - if = { - limit = { - has_trait = shrewd - } - add = { - value = negative_medium_trait_difficulty - desc = shrewd_difficulty - } - } - if = { - limit = { - has_trait = strong - } - add = { - value = negative_medium_trait_difficulty - desc = strong_difficulty - } - } - - #Negatives! - if = { - limit = { - num_sinful_traits > 0 - } - add = { - value = medium_trait_difficulty - multiply = num_sinful_traits - desc = sinful_traits_difficulty - } - } - if = { - limit = { - has_trait = incapable - } - add = { - value = extreme_trait_difficulty - desc = incapable_difficulty - } - } - if = { - limit = { - has_trait = leper - } - add = { - value = extreme_trait_difficulty - desc = leper_difficulty - } - } - if = { - limit = { - has_trait = maimed - } - add = { - value = extreme_trait_difficulty - desc = maimed_difficulty - } - } - if = { - limit = { - has_trait = inbred - } - add = { - value = extreme_trait_difficulty - desc = inbred_difficulty - } - } - if = { - limit = { - OR = { - has_trait = wounded_2 - has_trait = wounded_3 - } - } - add = { - value = extreme_trait_difficulty - desc = severely_wounded_difficulty - } - } - if = { - limit = { - has_trait = disinherited - } - add = { - value = high_trait_difficulty - desc = disinherited_difficulty - } - } - if = { - limit = { - has_trait = sickly - } - add = { - value = high_trait_difficulty - desc = sickly_difficulty - } - } - if = { - limit = { - OR = { - has_trait = early_great_pox - has_trait = great_pox - } - } - add = { - value = high_trait_difficulty - desc = poxed_difficulty - } - } - if = { - limit = { - has_trait = blind - } - add = { - value = high_trait_difficulty - desc = blind_difficulty - } - } - if = { - limit = { - has_trait = infirm - } - add = { - value = high_trait_difficulty - desc = infirm_difficulty - } - } - if = { - limit = { - is_eunuch_trigger = yes - } - add = { - value = high_trait_difficulty - desc = eunuch_difficulty - } - } - if = { - limit = { - has_trait = lunatic - } - add = { - value = high_trait_difficulty - desc = lunatic_difficulty - } - } - if = { - limit = { - has_trait = murderer - } - add = { - value = high_trait_difficulty - desc = murderer_difficulty - } - } - if = { - limit = { - has_trait = excommunicated - } - add = { - value = high_trait_difficulty - desc = excommunicated_difficulty - } - } - if = { - limit = { - has_trait = bleeder - } - add = { - value = high_trait_difficulty - desc = bleeder_difficulty - } - } - if = { - limit = { - has_trait = physique_bad_3 - } - add = { - value = high_trait_difficulty - desc = physique_bad_3_difficulty - } - } - if = { - limit = { - has_trait = physique_bad_2 - } - add = { - value = medium_trait_difficulty - desc = physique_bad_2_difficulty - } - } - if = { - limit = { - has_trait = physique_bad_1 - } - add = { - value = medium_low_trait_difficulty - desc = physique_bad_1_difficulty - } - } - if = { - limit = { - has_trait = intellect_bad_3 - } - add = { - value = high_trait_difficulty - desc = intellect_bad_3_difficulty - } - } - if = { - limit = { - has_trait = intellect_bad_2 - } - add = { - value = medium_trait_difficulty - desc = intellect_bad_2_difficulty - } - } - if = { - limit = { - has_trait = intellect_bad_1 - } - add = { - value = medium_low_trait_difficulty - desc = intellect_bad_1_difficulty - } - } - if = { - limit = { - has_trait = beauty_bad_3 - } - add = { - value = high_trait_difficulty - desc = beauty_bad_3_difficulty - } - } - if = { - limit = { - has_trait = beauty_bad_2 - } - add = { - value = medium_trait_difficulty - desc = beauty_bad_2_difficulty - } - } - if = { - limit = { - has_trait = beauty_bad_1 - } - add = { - value = medium_low_trait_difficulty - desc = beauty_bad_1_difficulty - } - } - if = { - limit = { - has_trait = dull - } - add = { - value = medium_trait_difficulty - desc = dull_difficulty - } - } - if = { - limit = { - has_trait = weak - } - add = { - value = medium_trait_difficulty - desc = weak_difficulty - } - } - if = { - limit = { - has_trait = sodomite - trait_is_shunned_or_criminal_in_faith_trigger = { TRAIT = sodomite FAITH = faith GENDER_CHARACTER = this } - } - add = { - value = medium_trait_difficulty - desc = sodomite_difficulty - } - } - if = { - limit = { - has_trait = incestuous - trait_is_shunned_or_criminal_in_faith_trigger = { TRAIT = incestuous FAITH = faith GENDER_CHARACTER = this } - } - add = { - value = medium_trait_difficulty - desc = incestuous_difficulty - } - } - if = { - limit = { - has_trait = fornicator - trait_is_shunned_or_criminal_in_faith_trigger = { TRAIT = fornicator FAITH = faith GENDER_CHARACTER = this } - } - add = { - value = medium_trait_difficulty - desc = fornicator_difficulty - } - } - if = { - limit = { - has_trait = adulterer - trait_is_shunned_or_criminal_in_faith_trigger = { TRAIT = adulterer FAITH = faith GENDER_CHARACTER = this } - } - add = { - value = medium_trait_difficulty - desc = adulterer_difficulty - } - } - if = { - limit = { - has_trait = deviant - trait_is_shunned_or_criminal_in_faith_trigger = { TRAIT = deviant FAITH = faith GENDER_CHARACTER = this } - } - add = { - value = medium_trait_difficulty - desc = adulterer_difficulty - } - } - if = { - limit = { - has_trait = cannibal - trait_is_shunned_or_criminal_in_faith_trigger = { TRAIT = cannibal FAITH = faith GENDER_CHARACTER = this } - } - add = { - value = medium_trait_difficulty - desc = cannibal_difficulty - } - } - if = { - limit = { - has_trait = witch - trait_is_shunned_or_criminal_in_faith_trigger = { TRAIT = witch FAITH = faith GENDER_CHARACTER = this } - } - add = { - value = medium_trait_difficulty - desc = witch_difficulty - } - } - if = { - limit = { - OR = { - has_trait = kinslayer_1 - has_trait = kinslayer_2 - has_trait = kinslayer_3 - } - trait_is_shunned_or_criminal_in_faith_trigger = { TRAIT = kinslayer_1 FAITH = faith GENDER_CHARACTER = this } - } - add = { - value = medium_trait_difficulty - desc = kinslayer_difficulty - } - } - if = { - limit = { - has_trait = flagellant - } - add = { - value = medium_trait_difficulty - desc = flagellant_difficulty - } - } - if = { - limit = { - has_trait = improvident - } - add = { - value = medium_trait_difficulty - desc = improvident_difficulty - } - } - if = { - limit = { - has_trait = profligate - } - add = { - value = medium_trait_difficulty - desc = profligate_difficulty - } - } - if = { - limit = { - has_trait = disfigured - } - add = { - value = medium_trait_difficulty - desc = disfigured_difficulty - } - } - if = { - limit = { - has_trait = drunkard - } - add = { - value = medium_trait_difficulty - desc = drunkard_difficulty - } - } - if = { - limit = { - has_trait = possessed - } - add = { - value = medium_trait_difficulty - desc = possessed_difficulty - } - } - if = { - limit = { - has_trait = depressed - } - add = { - value = medium_trait_difficulty - desc = depressed_difficulty - } - } - if = { - limit = { - has_trait = infertile - } - add = { - value = medium_trait_difficulty - desc = infertile_difficulty - } - } - if = { - limit = { - has_trait = spindly - } - add = { - value = medium_trait_difficulty - desc = spindly_difficulty - } - } - if = { - limit = { - has_trait = paranoid - } - add = { - value = medium_trait_difficulty - desc = paranoid_difficulty - } - } - if = { - limit = { - has_trait = gout_ridden - } - add = { - value = medium_low_trait_difficulty - desc = gout_difficulty - } - } - if = { - limit = { - has_trait = wheezing - } - add = { - value = medium_low_trait_difficulty - desc = wheezing_difficulty - } - } - if = { - limit = { - has_trait = craven - } - add = { - value = medium_low_trait_difficulty - desc = craven_difficulty - } - } - if = { - limit = { - has_trait = shy - } - add = { - value = medium_low_trait_difficulty - desc = shy_difficulty - } - } - if = { - limit = { - has_trait = decadent - } - add = { - value = medium_low_trait_difficulty - desc = decadent_difficulty - } - } - if = { - limit = { - has_trait = denounced - } - add = { - value = medium_low_trait_difficulty - desc = denounced_difficulty - } - } - if = { - limit = { - OR = { - has_trait = bastard - has_trait = legitimized_bastard - } - } - add = { - value = low_trait_difficulty - desc = bastard_difficulty - } - } - if = { - limit = { - OR = { - has_trait = child_of_concubine - has_trait = wild_oat - has_trait = disputed_heritage - } - } - add = { - value = low_trait_difficulty - desc = weak_heritage_difficulty - } - } - if = { - limit = { - has_trait = comfort_eater - } - add = { - value = low_trait_difficulty - desc = comfort_eater_difficulty - } - } - if = { - limit = { - has_trait = inappetetic - } - add = { - value = low_trait_difficulty - desc = inappetetic_difficulty - } - } - if = { - limit = { - has_trait = reclusive - } - add = { - value = low_trait_difficulty - desc = reclusive_difficulty - } - } - if = { - limit = { - has_trait = irritable - } - add = { - value = low_trait_difficulty - desc = irritable_difficulty - } - } - if = { - limit = { - has_trait = rakish - } - add = { - value = low_trait_difficulty - desc = rakish_difficulty - } - } - if = { - limit = { - has_trait = hashishiyah - } - add = { - value = low_trait_difficulty - desc = hashishiyah_difficulty - } - } - if = { - limit = { - has_trait = celibate - } - add = { - value = low_trait_difficulty - desc = celibate_difficulty - } - } - if = { - limit = { - has_trait = lovers_pox - } - add = { - value = low_trait_difficulty - desc = lovers_pox_difficulty - } - } - if = { - limit = { - has_trait = wounded_1 - } - add = { - value = low_trait_difficulty - desc = wounded_difficulty - } - } - if = { - limit = { - has_trait = albino - } - add = { - value = low_trait_difficulty - desc = albino_difficulty - } - } - if = { - limit = { - has_trait = lisping - } - add = { - value = low_trait_difficulty - desc = lisping_difficulty - } - } - if = { - limit = { - has_trait = stuttering - } - add = { - value = low_trait_difficulty - desc = stuttering_difficulty - } - } - if = { - limit = { - has_trait = giant - } - add = { - value = low_trait_difficulty - desc = giant_difficulty - } - } - if = { - limit = { - has_trait = scaly - } - add = { - value = low_trait_difficulty - desc = scaly_difficulty - } - } - if = { - limit = { - has_trait = clubfooted - } - add = { - value = low_trait_difficulty - desc = clubfooted_difficulty - } - } - if = { - limit = { - has_trait = dwarf - } - add = { - value = low_trait_difficulty - desc = dwarf_difficulty - } - } - if = { - limit = { - has_trait = hunchbacked - } - add = { - value = low_trait_difficulty - desc = hunchbacked_difficulty - } - } - if = { - limit = { - has_trait = lazy - } - add = { - value = low_trait_difficulty - desc = lazy_difficulty - } - } - if = { - limit = { - has_trait = gluttonous - } - add = { - value = low_trait_difficulty - desc = gluttonous_difficulty - } - } -} - -factions_and_war_values = { - if = { - limit = { - is_at_war = yes - } - add = { - value = 50 - desc = at_war_difficulty - } - } - if = { - limit = { - is_at_war = yes - any_character_war = { - is_war_leader = root - OR = { - AND = { - primary_defender = root - attacker_war_score >= 40 - } - AND = { - primary_attacker = root - defender_war_score >= 40 - } - } - } - } - add = { - value = { - value = 100 - if = { - limit = { - any_character_war = { - is_war_leader = root - OR = { - AND = { - primary_defender = root - attacker_war_score >= 60 - } - AND = { - primary_attacker = root - defender_war_score >= 60 - } - } - } - } - add = 200 - } - if = { - limit = { - any_character_war = { - is_war_leader = root - OR = { - AND = { - primary_defender = root - attacker_war_score >= 80 - } - AND = { - primary_attacker = root - defender_war_score >= 80 - } - } - } - } - add = 200 - } - } - desc = losing_war_difficulty - } - } - if = { - limit = { - any_targeting_faction = { - count >= 1 - NOT = { faction_is_type = peasant_faction } - target_of_powerful_faction_trigger = yes - } - } - add = { - value = { - value = 0 - every_targeting_faction = { - limit = { - NOT = { faction_is_type = peasant_faction } - target_of_powerful_faction_trigger = yes - } - add = 500 - } - } - desc = faction_difficulty - } - } - if = { - limit = { - is_independent_ruler = yes - any_neighboring_top_liege_realm_owner = { - has_any_cb_on = root - current_military_strength >= root.one_and_a_half_times_current_military_strength - } - } - add = { - value = { - value = 0 - every_neighboring_top_liege_realm_owner = { - limit = { - has_any_cb_on = root - current_military_strength >= root.one_and_a_half_times_current_military_strength - } - add = 50 - } - if = { - limit = { - any_neighboring_top_liege_realm_owner = { - count = all - has_any_cb_on = root - current_military_strength >= root.one_and_a_half_times_current_military_strength - } - } - add = 150 - } - } - desc = powerful_neighbors_difficulty - } - } - if = { - limit = { - is_ruler = yes - current_military_strength < max_military_strength - } - add = { - value = { - value = 50 - if = { - limit = { - current_military_strength < eighty_percent_of_max_military_strength - } - add = 50 - } - if = { - limit = { - current_military_strength < fifty_percent_of_max_military_strength - } - add = 50 - } - if = { - limit = { - current_military_strength < twenty_percent_of_max_military_strength - } - add = 50 - } - if = { - limit = { - is_at_war = yes - current_military_strength < eighty_percent_of_max_military_strength - } - add = 50 - } - if = { - limit = { - is_at_war = yes - current_military_strength < fifty_percent_of_max_military_strength - } - add = 150 - } - if = { - limit = { - is_at_war = yes - current_military_strength < twenty_percent_of_max_military_strength - } - add = 250 - } - } - desc = military_difficulty - } - } -} - -circumstantial_difficulty_values = { - if = { - limit = { - num_of_relation_rival >= 1 - } - add = { - value = { - add = 10 - multiply = num_of_relation_rival - } - desc = rivals_difficulty - } - } - if = { - limit = { - exists = primary_heir - primary_heir = { - OR = { - is_child_of = root - is_grandchild_of = root - is_great_grandchild_of = root - } - } - NOT = { primary_heir.dynasty = root.dynasty } - } - add = { - value = 500 - desc = primary_heir_wrong_dynasty_difficulty - } - } - if = { - limit = { - any_child = { - count >= 1 - } - any_child = { - count = all - NOT = { dynasty = root.dynasty } - } - } - add = { - value = 1000 - desc = children_wrong_dynasty_difficulty - } - } - if = { - limit = { - liege ?= { - faith = { - faith_hostility_level = { - target = root.faith - value >= faith_hostile_level - } - } - } - } - add = { - value = 100 - desc = hostile_faith_liege_difficulty - } - } - if = { - limit = { - OR = { - AND = { - is_female = yes - faith = { has_doctrine = doctrine_gender_male_dominated } - } - AND = { - is_female = no - faith = { has_doctrine = doctrine_gender_female_dominated } - } - } - } - add = { - value = 100 - desc = nonpreferred_gender_difficulty - } - } - if = { - limit = { - OR = { - AND = { - is_female = yes - patrilinear_marriage = yes - } - AND = { - is_female = no - matrilinear_marriage = yes - } - } - } - add = { - value = 200 - desc = wrong_lineality_difficulty - } - } - if = { - limit = { - stress_level >= 1 - } - add = { - value = { - add = 25 - multiply = stress_level - if = { - limit = { - stress_level >= 3 - } - multiply = 3 - } - } - desc = stress_level_difficulty - } - } - if = { - limit = { - gold >= 500 - gold >= major_gold_value - } - add = { - value = { - value = -50 - if = { - limit = { - gold >= 1000 - gold >= massive_gold_value - } - add = -100 - } - } - desc = gold_difficulty - } - } - if = { - limit = { - monthly_character_income > 0 - debt_level > 0 - } - add = { - value = 100 - multiply = debt_level - desc = debt_level_difficulty - } - } - if = { - limit = { - has_trait_with_flag = debilitating_illness - } - add = { - value = high_trait_difficulty - desc = is_ill_difficulty - } - } - if = { - limit = { - is_imprisoned = yes - } - add = { - value = 500 - desc = imprisoned_difficulty - } - } - if = { - limit = { - is_landed = yes - domain_size < domain_limit - } - add = { - value = { - value = 25 - if = { - limit = { - domain_size < 3 - } - add = 25 - } - if = { - limit = { - domain_size < 2 - } - add = 50 - } - } - desc = weak_domain_difficulty - } - } - if = { - limit = { - is_ruler = no - } - add = { - value = 50 - desc = unlanded_difficulty - } - } - if = { - limit = { - is_independent_ruler = no - } - add = { - value = 25 - desc = is_a_vassal_difficulty - } - } -} - -health_difficulty_values = { - if = { - limit = { - age >= 50 - } - add = { - value = { - value = 100 - if = { - limit = { - age >= 55 - } - add = 50 - } - if = { - limit = { - age >= 60 - } - add = 50 - } - if = { - limit = { - age >= 65 - } - add = 50 - } - if = { - limit = { - age >= 70 - } - add = 100 - } - if = { - limit = { - age >= 75 - } - add = 100 - } - if = { - limit = { - age >= 80 - } - add = 100 - } - } - desc = elder_difficulty - } - } - if = { - limit = { - health <= 4 - } - add = { - value = { - add = 100 - if = { - limit = { - health <= 3.5 - } - add = 150 - } - if = { - limit = { - health <= 3 - } - add = 300 - } - } - desc = poor_health_difficulty - } - } - if = { - limit = { - is_adult = no - } - add = { - value = { - value = 50 - if = { - limit = { - age < 10 - } - add = 50 - } - } - desc = non_adult_difficulty - } - } -} - -difficulty_bulk_add_values = { - add = skill_difficulty_measurement_value - add = legitimacy_difficulty_value - add = trait_difficulty_values - add = factions_and_war_values - add = health_difficulty_values - add = circumstantial_difficulty_values -} - -# Main Character Difficulty Score -character_difficulty_value = { - add = difficulty_bulk_add_values - max = 10000 -} diff --git a/N3OW/common/script_values/00_distance_values.txt b/N3OW/common/script_values/00_distance_values.txt deleted file mode 100644 index 8d599f5d..00000000 --- a/N3OW/common/script_values/00_distance_values.txt +++ /dev/null @@ -1,10 +0,0 @@ - -#Values used for checking distance with the 'squared_distance' trigger. - -squared_distance_small = 22500 #150 map-pixels. Roughly one Wales away (top to bottom). -squared_distance_medium = 62500 #250 map-pixels. Roughly one Ireland away (top to bottom). -squared_distance_large = 422500 #650 map-pixels. Roughly one France away (top to bottom). -squared_distance_huge = 722500 #850 map-pixels. Roughly one Holy Roman Empire away (left to right). -squared_distance_almost_massive = 1440000 #1200 map-pixels. Roughly 1.5 Holy Roman Empire away (left to right). -squared_distance_massive = 2402500 #1550 map-pixels. -squared_distance_monstrous = 9000000 #3000 map-pixels \ No newline at end of file diff --git a/N3OW/common/script_values/00_dlc_fp3_script_values.txt b/N3OW/common/script_values/00_dlc_fp3_script_values.txt deleted file mode 100644 index fd944db7..00000000 --- a/N3OW/common/script_values/00_dlc_fp3_script_values.txt +++ /dev/null @@ -1,1453 +0,0 @@ -############# -# 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 } - -base_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 - } - } - - if = { - limit = { - is_landed = yes - } - add = { - value = -10 - desc = court_position_landed_penalty - } - } - - # Flag Check (for debug/event usage) - Use debug.9610 - if = { - limit = { has_character_flag = is_guaranteed_excellent_tax_collector } - add = 130 - } - - add = court_position_aptitude_family_business_value - add = court_position_aptitude_eunuch_tradition_value -} - -tax_collector_aptitude_score = { - value = base_tax_collector_aptitude_score - - # 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.base_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.base_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.base_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.base_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 -} - -fp3_request_invasion_troop_value_bonus_levy_nomads = { - value = fp3_request_invasion_troop_value_bonus_troops -} - - - -# 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/N3OW/common/script_values/00_dynasty_values.txt b/N3OW/common/script_values/00_dynasty_values.txt deleted file mode 100644 index 72c62371..00000000 --- a/N3OW/common/script_values/00_dynasty_values.txt +++ /dev/null @@ -1,114 +0,0 @@ -############### -# DYNASTY -############### - -# Dynasty Warfare CB Discount Perk -warfare_legacy_2_discount = 0.8 # 20% discount - -# Dynasty Glory Marriage Acceptance Perk -glory_legacy_1_marriage_acceptance = 30 - -# Dynasty Kin Personal Scheme Success Chance on Dynasty Perk -kin_legacy_4_success_chance = 30 - -# Dynasty House Scheme Success Chance on Cultural Paramater -cultural_house_personal_scheme_success_chance = 30 - -# Dynasty Blood 4 extra Genetic Trait chance -blood_legacy_4_chance = 5 -blood_legacy_4_extra_player_chance = 5 - -# What age does Graceful Aging start -kin_legacy_5_start_age = 30 - -# How often should the effect fire -kin_legacy_5_every_x_year = 5 - -# Calculate whether the effect should be applied this year -kin_legacy_5_age_modulo = { - value = age - modulo = kin_legacy_5_every_x_year -} - -erudition_legacy_5_percentage = 10 - -customs_legacy_percentage = 30 - -fp1_adventure_legacy_2_success_chance_seduction = 15 - -fp1_adventure_legacy_2_prestige_value = { - value = 100 - if = { - limit = { - exists = scope:target.primary_title - } - multiply = { - value = scope:target.primary_title.tier - add = 1 - } - } - if = { - limit = { - scope:target = { - NOT = { - exists = scope:target.primary_title - } - exists = scope:target.primary_spouse - NOT = { - scope:target.primary_spouse = prev - } - exists = scope:target.primary_spouse.primary_title - } - } - multiply = { - value = scope:target.primary_spouse.primary_title.tier - add = 1 - } - } - if = { - limit = { - any_liege_or_above = { - scope:target = { - OR = { - is_close_family_of = prev - is_consort_of = prev - } - } - } - } - multiply = 1.5 - } - if = { - limit = { - scope:target = { - is_courtier_of = prev - } - } - multiply = 0.5 - } -} - -ep2_activities_legacy_2_grand_weddings_discount_value = 0.5 - -ep2_activities_legacy_2_grand_weddings_acceptance_boost_value = 15 - -ep2_activities_legacy_1_pilgrimages_discount_value = 0.5 - -ep2_activities_legacy_1_pilgrimages_learning_add_value = 2 - -ep2_activities_legacy_1_pilgrimages_learning_learning_per_holy_site_value = 2 - -ep2_activities_legacy_1_pilgrimages_learning_visitable_holy_sites_cap_value = 5 - -ep2_activities_legacy_1_pilgrimages_learning_cap_value = { - value = ep2_activities_legacy_1_pilgrimages_learning_learning_per_holy_site_value - multiply = ep2_activities_legacy_1_pilgrimages_learning_visitable_holy_sites_cap_value -} - -ep2_activities_legacy_3_tours_modifier_duration_value = 20 - -#FP3 Values - -khvarenah_legacy_marriage_acceptance = 10 - -khvarenah_legacy_aptitude = 10 diff --git a/N3OW/common/script_values/00_education_values.txt b/N3OW/common/script_values/00_education_values.txt deleted file mode 100644 index 981b79e8..00000000 --- a/N3OW/common/script_values/00_education_values.txt +++ /dev/null @@ -1,70 +0,0 @@ -#Values used in the education of children - -matching_childhood_trait_modifier_value = 20 -mismatching_childhood_trait_modifier_value = -20 -educator_skill_modifier_factor = 0.4 -educator_learning_skill_modifier_factor = 0.2 - -#Values to trigger outcome events from (How well did the child do?) -education_level_1 = 7 # Required for education rank 2 -education_level_2 = 12 # Required for education rank 3 -education_level_3 = 17 # Required for education rank 4 - -#One-time bonuses / penalties -education_small_bonus = 1 -education_medium_bonus = 2 -education_large_bonus = 3 -education_small_penalty = -1 -education_medium_penalty = -2 -education_large_penalty = -3 - -#Value for balancing point conversion between educations -point_conversion_factor = 0.5 - -child_education_conversion_chance = { - add = 0.1 - if = { - limit = { - age < 14 - } - multiply = 0.2 - multiply = 0.3 - } - if = { - limit = { - age < 13 - } - multiply = 0.4 - multiply = 0.5 - } - if = { - limit = { - age < 12 - } - multiply = 0.6 - multiply = 0.7 - } - if = { - limit = { - age < 11 - } - multiply = 0.8 - multiply = 0.9 - } -} - -child_education_conversion_tooltip_chance = { - add = 1 - if = { - limit = { - age >= 15 - } - subtract = 1 - } - else_if = { - limit = { - age > 10 - } - subtract = child_education_conversion_chance - } -} diff --git a/N3OW/common/script_values/00_ep1_artifact_values.txt b/N3OW/common/script_values/00_ep1_artifact_values.txt deleted file mode 100644 index 562a00bb..00000000 --- a/N3OW/common/script_values/00_ep1_artifact_values.txt +++ /dev/null @@ -1,325 +0,0 @@ -weapon_inspiration_average_skill_value = { - value = martial - add = { - value = prowess - multiply = 2 - } - divide = 2 -} -armor_inspiration_average_skill_value = { - value = martial - add = { - value = prowess - multiply = 2 - } - divide = 2 -} -book_inspiration_average_skill_value = { - value = learning - - if = { - limit = { - has_variable = legendary_author - } - add = 1000 - } -} -weaver_inspiration_average_skill_value = { - value = diplomacy -} -adventure_inspiration_average_skill_value = { - value = prowess - multiply = 3 - add = { - value = diplomacy - multiply = 1.5 - } - add = { - value = learning - multiply = 1.5 - } - divide = 4 -} -artisan_inspiration_average_skill_value = { - value = stewardship -} -smith_inspiration_average_skill_value = { - value = stewardship - multiply = 2 - add = { - value = prowess - multiply = 2 - } - add = diplomacy - divide = 4 -} - -alchemy_inspiration_average_skill_value = { - value = learning -} - -low_inspiration_skill = 8 -medium_inspiration_skill = 12 -high_inspiration_skill = 16 - -#This is how much var:artifact_quality needs to have been improved in events to correspond to high or medium skill. -medium_adventurer_epic_quality_level = 6 -high_adventurer_epic_quality_level = 8 - -more_expensive_inspirations_multiplier_value = 0.5 - -artifact_brooch_value = { - value = 0 - # Base score of up to 50 based on brooch quality. - add = { - value = scope:quality - multiply = 0.5 - } - - # Brooches made out of certain materials gain bonus points. - if = { - limit = { has_artifact_feature = decoration_material_wire_gold } - add = 25 - } - else_if = { - limit = { has_artifact_feature = decoration_material_wire_electrum } - add = 15 - } - else_if = { - limit = { has_artifact_feature = decoration_material_wire_silver } - add = 10 - } - - if = { - # brooches set with gems gain up to 25 points based on the wealth/rarity of the gemstones. - limit = { has_artifact_feature = brooch_decoration_centerpiece_and_adornment } - add = { - value = scope:wealth - multiply = 0.25 - } - } - else_if = { - # brooches decorating with filigree gain up to 20 points based on quality, or the artisan's skill. - limit = { has_artifact_feature = brooch_decoration_centerpiece } - add = { - value = scope:quality - multiply = 0.20 - } - } - else_if = { - # brooches decorating with just an adornment gain up to 15 points based on wealth/rarity of the adornment - limit = { has_artifact_feature = brooch_decoration_adornment } - add = { - value = scope:wealth - multiply = 0.15 - } - } - else = { - # Assume brooch value is just based on wealth - add = { - value = scope:wealth - multiply = 0.10 - } - } -} - -artifact_wealth_quality_average_value = { - if = { - limit = { - exists = var:wealth - exists = var:quality - } - value = var:wealth - add = var:quality - multiply = 0.5 - } - else_if = { - limit = { - exists = scope:wealth - exists = scope:quality - } - value = scope:wealth - add = scope:quality - multiply = 0.5 - } - else_if = { - limit = { - exists = var:quality - } - value = var:quality - } - else_if = { - limit = { - exists = scope:quality - } - value = scope:quality - } - else_if = { - limit = { - exists = var:wealth - } - value = var:wealth - } - else_if = { - limit = { - exists = scope:wealth - } - value = scope:wealth - } - else = { - value = 20 - } -} - -artifact_wealth_quality_combined_value = { - value = 0 - if = { - limit = { exists = scope:wealth } - add = scope:wealth - } - if = { - limit = { exists = scope:quality } - add = scope:quality - } -} - - -# Modifiers to decide what armor type someone wants to make/is created -artifact_armor_type_mail_weight_value = { - value = 0 - if = { - limit = { - current_date >= 1100.1.1 #Chainmail arrives in India during 12th century - culture_has_south_asian_heritage_pillar_trigger = yes - } - add = 10 - } -} -artifact_armor_type_plate_weight_value = { - value = 0 - if = { - limit = { - #Full plate armor developed and became more wide-spread (mostly) during the late middle ages - current_date >= 1250.1.1 - } - add = 10 - } - if = { - limit = { - #Full plate armor developed and became more wide-spread (mostly) during the late middle ages - current_date >= 1300.1.1 - } - add = 10 - } - if = { - limit = { - #Mostly used in Europe (at least initially) - culture_has_european_heritage_pillar_trigger = yes - } - multiply = 2 - } -} - -artifact_armor_type_scale_weight_value = { - value = 0 - if = { - limit = { - #Fairly common everywhere, but use in Europe had declined - culture_has_european_heritage_pillar_trigger = yes - NOR = { - culture = { has_cultural_pillar = heritage_byzantine } - culture = { has_cultural_pillar = heritage_caucasian } - culture = { has_cultural_pillar = heritage_turkic } - } - } - add = -10 - } - if = { - limit = { - # Much more commonly used by the nomadic mongols - culture = { has_cultural_pillar = heritage_mongolic } - } - add = 30 - } -} -artifact_armor_type_lamellar_weight_value = { - value = 0 - if = { - #More common in the Middle East and Asia - limit = { - OR = { - culture_has_mena_heritage_pillar_trigger = yes - culture_has_asian_heritage_pillar_trigger = yes - } - } - add = 30 - } -} -artifact_armor_type_laminar_weight_value = { - value = 0 - if = { - #More common in the Middle East and Asia - - limit = { - OR = { - culture_has_asian_heritage_pillar_trigger = yes - culture = { has_cultural_pillar = heritage_ugro_permian } - culture_has_mena_heritage_pillar_trigger = yes - } - } - add = 30 - } -} -artifact_armor_type_brigandine_weight_value = { - value = 0 - if = { - limit = { - culture_has_mena_heritage_pillar_trigger = yes - culture_has_asian_heritage_pillar_trigger = yes - } - add = 30 - } - if = { - limit = { - OR = { - AND = { - current_date >= 1240.1.1 #Reached eastern Europe after the Mongol invasion - culture_has_east_european_heritage_pillar_trigger = yes - } - AND = { - current_date >= 1270.1.1 #Reached the rest of Europe some centuries later - culture_has_european_heritage_pillar_trigger = yes - } - } - } - add = 10 - } -} - -# Used to set quality and wealth for banners found after a battle -conquered_banner_value = { - value = 10 - if = { - limit = { - scope:epic_loser = { highest_held_title_tier >= tier_empire } - } - add = 90 - } - if = { - limit = { - scope:epic_loser = { highest_held_title_tier = tier_kingdom } - } - add = 60 - } - if = { - limit = { - scope:epic_loser = { highest_held_title_tier = tier_duchy } - } - add = 20 - } -} - -artifact_durability_percent = { - value = artifact_durability - divide = artifact_max_durability -} diff --git a/N3OW/common/script_values/00_ep1_script_values.txt b/N3OW/common/script_values/00_ep1_script_values.txt deleted file mode 100644 index 802523c1..00000000 --- a/N3OW/common/script_values/00_ep1_script_values.txt +++ /dev/null @@ -1,687 +0,0 @@ -# Referenced from code, in code value will be clamped between NRoyalCourt::COURT_GRANDEUR_MIN and NRoyalCourt::COURT_GRANDEUR_MAX -# root = character calculating for -court_grandeur_minimum_expected_value = { - value = sub_realm_size - divide = 4 - if = { # Elective Empires have slightly lower expectations (i.e. the HRE) - limit = { - any_held_title = { - tier = tier_empire - has_title_law_flag = elective_succession_law - } - } - divide = 2 - } - if = { # Add a baseline depending on rank - limit = { - highest_held_title_tier = tier_empire - } - add = 20 - } - else = { - add = 10 - } - if = { - limit = { - government_has_flag = government_is_tribal - } - multiply = 0 - add = court_grandeur_current - } -} - -# Referenced from code for the multiplier of above/below expected court grandeur level modifiers -court_grandeur_level_difference_modifier_multiplier = { - value = 1 - if = { # Small realms receives larger bonuses for being above their expected level - limit = { - court_grandeur_current_level >= court_grandeur_minimum_expected_level - } - value = 100 # Realm size baseline - divide = { - value = sub_realm_size - min = 1 - } - min = 1 - max = 4 - } - else = { # Big realms receives larger penalties for being below their expected level - value = sub_realm_size - multiply = 0.025 - min = 1 - max = 4 - } -} - -delusions_of_grandeur_level_difference = { - value = court_grandeur_minimum_expected_level - add = 6 -} - -ep1_court_grandeur_marriage_acceptance_value = { - scope:actor = { - add = court_grandeur_current_level - subtract = court_grandeur_minimum_expected_level - multiply = 5 - if = { - limit = { - scope:recipient.faith = { - faith_hostility_level = { - target = scope:actor.faith - value = faith_astray_level - } - } - } - divide = 2 - } - else_if = { - limit = { - scope:recipient.faith = { - faith_hostility_level = { - target = scope:actor.faith - value = faith_hostile_level - } - } - } - divide = 3 - } - else_if = { - limit = { - scope:recipient.faith = { - faith_hostility_level = { - target = scope:actor.faith - value = faith_evil_level - } - } - } - divide = 4 - } - } -} - -ep1_court_grandeur_marriage_acceptance_value_penalty = { - scope:actor = { - add = court_grandeur_current_level - subtract = court_grandeur_minimum_expected_level - multiply = 10 - } -} - -grandeur_loss_on_succession_value = { - value = -10 - if = { # 100 Dread makes you lose 5 more grandeur - limit = { - dread > 0 - } - subtract = { - value = dread - divide = 20 - } - } - if = { # 100 Tyranny makes you lose 10 more grandeur - limit = { - tyranny > 0 - } - subtract = { - value = tyranny - divide = 10 - } - } - if = { - limit = { - exists = primary_heir - primary_heir = { - has_trait = ambitious - } - } - multiply = 0.5 - } - if = { - limit = { - exists = primary_title - primary_title = { - has_order_of_succession = election - } - } - multiply = 0.5 - } -} - -# The unmodified, average cost of sponsoring an Inspiration. -basic_fund_inspiration_cost = { - value = 100 -} - -inspiration_cost_skill_multiplier = 0.5 -quality_bonus_per_skill_level_value = 2 # A character with an average skill value of 20 will produce artifacts with +40 quality - -# Calculates the total number of characters in the world who have an active Inspiration. -num_world_inspired_characters_value = { - value = 0 - every_inspired_character = { - limit = { has_completed_inspiration = no } - add = 1 - } -} - -# Calculates the total number of characters in the world who currently have a Royal Court. -num_world_royal_courts_value = { - value = 0 - every_character_with_royal_court = { - add = 1 - } -} - -# How many new inspirations can be created by inspiration_system.0005 each year if we are below the limit. -max_new_inspirations_per_year_value = { - value = 3 # 16% of the existing world region have a chance to get an inspired character - add = { - value = 15 #if every royal court is wealthy enough, we generate 1x nb of world region inspired characters - multiply = { - value = 0 - add = { - every_character_with_royal_court = { - limit = { - OR = { - is_ai = no - AND = { - is_ai = yes - short_term_gold >= ai_inspiration_desired_gold_value - } - } - } - add = 1 - } - divide = { - every_character_with_royal_court = { - add = 1 - } - min = 1 # security to avoid dividing by 0 if there is none royal court - } - } - } - ceiling = yes - } -} - -# The 'ideal' limit for how many total inspirations will exist in the world at a time, per royal court. -# Scripted effects can bring us over this value, but inspiration_system.0005 will not generate new inspirations until we fall back under it. -ideal_total_inspirations_per_royal_court_value = 1.875 - -ideal_total_world_inspirations = { - value = num_world_royal_courts_value - multiply = ideal_total_inspirations_per_royal_court_value -} - -# How many months an inspired character will wait around in a court for before moving on to a new one. -inspired_character_recent_arrival_duration_value = { - value = 15 - # Adds -3 or +3 months, if they are (im)patient. - if = { - limit = { has_trait = impatient } - subtract = 3 - } - else_if = { - limit = { has_trait = patient } - add = 3 - } - # Adds between +3 and -3 months before moving on, based on ai_energy. - add = { - value = ai_energy - multiply = -0.03 - round = yes - } -} - -# How many years a courtier must serve in a specific court to get the court type trait -years_to_gain_court_type_trait = 5 - -# The trigger to check time served ("days_since_joined_court") needs days, so we convert the years here -days_to_gain_court_type_trait = { - add = years_to_gain_court_type_trait - multiply = 365 -} - -cgv_level_threshold_court_type_trait_1 = 5 -cgv_level_threshold_court_type_trait_2 = 8 - -# Court Type Values -court_intrigue_spymaster_task_bonus = 20 -court_administrative_steward_task_bonus = 30 - -# Hold Court Grace Values -hold_court_grace_period_years = 1825 - -hold_court_grace_period_comparison = { - value = 1 - add = { - value = current_year - subtract = var:last_hold_court_date - subtract = hold_court_grace_period_years # 5 - multiply = 0.1 - min = 0 - max = 1 - } - # example - # 1066 - 1054 = 12 - 5 = 7 * 0.1 = 0.7 + 1 = 1.7 - # subtract 5 as this is the hard cooldown, we only want to increase weight for years beyond that - # modifier caps at 2 (10 years since last hold court) -} - -# To be used for court positions that are very mobile and requires a healthy and strong body -court_position_aptitude_high_penalty_value = { - if = { - limit = { - is_playable_character = yes - } - add = { - value = -20 - desc = court_position_landed_penalty - } - } - if = { - limit = { - has_trait = maimed - } - add = { - value = -25 - desc = court_position_maimed_trait - } - } - if = { - limit = { - has_trait = wounded_3 - } - add = { - value = -25 - desc = court_position_wounded_3_trait - } - } - else_if = { - limit = { - has_trait = wounded_2 - } - add = { - value = -15 - desc = court_position_wounded_2_trait - } - } - #Wounded_1 is ok since it's not a serious injury... yet - if = { - limit = { - has_trait = blind - } - add = { - value = -50 - desc = court_position_blind_trait - } - } - if = { - limit = { - has_trait = infirm - } - add = { - value = -75 - desc = court_position_infirm_trait - } - } -} - -# To be used for court positions that are NOT very mobile and doesn't really require a strong/healthy body -court_position_aptitude_low_penalty_value = { - if = { - limit = { - is_playable_character = yes - } - add = { - value = -20 - desc = court_position_landed_penalty - } - } - if = { - limit = { - has_trait = maimed - } - add = { - value = -15 - desc = court_position_maimed_trait - } - } - if = { - limit = { - has_trait = wounded_3 - } - add = { - value = -15 - desc = court_position_wounded_3_trait - } - } - else_if = { - limit = { - has_trait = wounded_2 - } - add = { - value = -10 - desc = court_position_wounded_2_trait - } - } - #Wounded_1 is ok since it's not a serious injury... yet - if = { - limit = { - has_trait = infirm - } - add = { - value = -75 - desc = court_position_infirm_trait - } - } -} - -court_position_candidate_score_base_value = { - scope:liege = { - # Not very likely to hire rivals - if = { - limit = { - has_relation_rival = scope:employee - } - add = -1000 - } - if = { - limit = { - NOT = { exists = scope:firing_court_position } - scope:employee = { has_any_court_position = yes } - } - add = -150 - } - } -} - -# Aptitude goes from 1 to 5, so the score here goes from 4 to 20 (except significantly discouraging hiring someone who isn't the best) -court_position_candidate_aptitude_value = { - scope:employee = { - # Does the liege have a better candidate that they should be hiring instead? - if = { - limit = { - scope:highest_available_aptitude > scope:employee_aptitude - } - add = -125 - } - # More likely to pick a courtier with a high aptitude, less likely to pick one with low - add = { - value = scope:employee_aptitude - multiply = 4 - } - } -} - -court_position_debt_considerations_value = { - scope:liege = { - if = { - limit = { - debt_level >= 5 - } - add = -5000 - } - else_if = { - limit = { - debt_level >= 4 - } - add = -1000 - } - else_if = { - limit = { - debt_level >= 3 - } - add = -500 - } - else_if = { - limit = { - debt_level >= 2 - } - add = -200 - } - else_if = { - limit = { - debt_level >= 1 - } - add = -50 - } - if = { # Needs money for WAR! - limit = { - ai_has_conqueror_personality = yes - } - add = -100 - } - } -} - -court_position_seneschal_debt_considerations_value = { # Regardless of debt, having a seneschal is good if your control is abysmal - scope:liege = { - if = { - limit = { - is_at_war = no - NOT = { - any_held_title = { - tier = tier_county - county_control < 100 - } - } - } - if = { - limit = { - debt_level >= 5 - } - add = -5000 - } - else_if = { - limit = { - debt_level >= 4 - } - add = -1000 - } - else_if = { - limit = { - debt_level >= 3 - } - add = -500 - } - else_if = { - limit = { - debt_level >= 2 - } - add = -200 - } - else_if = { - limit = { - debt_level >= 1 - } - add = -50 - } - } - } -} - -# This is balanced against a typical base score of 50 -# And a typical skill score of 12 (aptitude of 3) -# We want to sit at roughly 10% of income spent -# So 10% income spent needs to give -62 score -# So the cost of them all we multiply by 600, for 10% = -60 -# While the cost of the position itself with 100. 5 positions of 2% each will then each get -2 -court_position_liege_score_base_value = { - value = 0 - scope:liege = { - subtract = { - # Less likely to hire for the really expensive positions - # But this is a pretty minor impact - value = 100 - multiply = scope:percent_of_monthly_gold_income - } - subtract = { - # Value decreases as cost of all positions increase - value = 600 - if = { - limit = { - ai_should_focus_on_building_in_their_capital = yes - } - add = 400 - } - multiply = scope:percent_of_monthly_gold_income_all_positions - } - } -} - -order_mass_eviction_decision_cost_value = 350 - -exoticise_a_grand_hall_decision_cost_value = { - # A nicely hefty base cost. - value = massive_gold_value - - # Modified down a bit for architect. - if = { - limit = { has_trait = architect } - multiply = 0.75 - } -} - -# Check the guts of the value inside a sub-value so that we can script a fallback. -ep1_decision_0111_proportional_cgv_actual_gain_value = { - value = 0 - - # Add the target's CGV. - add = court_grandeur_current - # Subtract root's CGV to get the difference. - subtract = root.court_grandeur_current - # Reduce it down a bit. - multiply = 0.5 - # Round it out. - round = yes -} - -ep1_decision_0111_proportional_cgv_gain_value = { - value = 0 - - # Import the real tally from elsewhere. - add = ep1_decision_0111_proportional_cgv_actual_gain_value - # Fallback: we can't set a minimum, since we can have values either side of zero. If we hit zero, default to 1 instead. - if = { - limit = { - ep1_decision_0111_proportional_cgv_actual_gain_value = 0 - } - add = 1 - } -} - -ep1_decision_0111_proportional_prestige_cost_value = { - # Carry over our CGV differential. - value = ep1_decision_0111_proportional_cgv_gain_value - - # Invert it: if you lose CGV, we want you to gain prestige, and if you gain CGV, you should lose prestige. - multiply = -1 - # Whilst we're here (and numbers are low), round things. - round = yes - # Make the cost a noteworthy fraction. - multiply = 50 -} - -ep1_flavour_0001_scion_minimum_age_value = 18 - -ep1_flavour_0001_scion_parent_minimum_age_value = { - # Base of 20 for something kinda sensible. - value = 20 - # Plus the scion's minimum age. - add = ep1_flavour_0001_scion_minimum_age_value -} - -# Scripted value used so we can reference it in a custom tooltip. -ep1_flavour_0021_courts_lose_opinion_value = 20 - -# Aaaaand a further linked value so that the loc plays nicely; otherwise we get a double negative of "loses -20". -ep1_flavour_0021_courts_lose_opinion_actual_value = { - value = ep1_flavour_0021_courts_lose_opinion_value - multiply = -1 -} - -# Scripted value used so we can reference it in a custom tooltip. -ep1_flavour_0021_courts_gain_opinion_value = 20 - -# As the name says... value of gained prestige per level of food amenities at feasts! -ep1_feast_prestige_per_food_amenities_value = { - value = medium_prestige_gain - if = { - limit = { - amenity_level = { type = court_food_quality value >= max_amenity_level } - } - add = { - value = medium_prestige_gain - multiply = 0.4 - } - } - else_if = { - limit = { - amenity_level = { type = court_food_quality value = very_high_amenity_level } - } - add = { - value = medium_prestige_gain - multiply = 0.25 - } - } - else_if = { - limit = { - amenity_level = { type = court_food_quality value = medium_amenity_level } - } - add = { - value = medium_prestige_gain - multiply = -0.25 - } - } - else_if = { - limit = { - amenity_level = { type = court_food_quality value <= low_amenity_level } - } - add = { - value = medium_prestige_gain - multiply = -0.4 - } - } -} - -challenge_for_artifact_prestige_cost_value = { - value = 150 - scope:target = { - if = { - limit = { rarity = masterwork } - multiply = 2 - } - else_if = { - limit = { rarity = famed } - multiply = 3 - } - else_if = { - limit = { rarity = illustrious } - multiply = 4 - } - } -} - -challenge_for_artifact_prestige_limit_value = { - value = challenge_for_artifact_prestige_cost_value - divide = 3 - min = 150 -} - -ep1_fund_inspiration_2100_rival_difference = { - add = scope:other_inspiration_owner.inspiration.inspiration_gold_invested - subtract = scope:inspiration_owner.inspiration.inspiration_gold_invested -} - -50_percent_of_owned_gold = { - value = current_gold_value - multiply = 0.5 - min = 1 -} - -80_percent_of_owned_gold = { - value = current_gold_value - multiply = 0.8 - min = 1 -} diff --git a/N3OW/common/script_values/00_faction_values.txt b/N3OW/common/script_values/00_faction_values.txt deleted file mode 100644 index 641152a1..00000000 --- a/N3OW/common/script_values/00_faction_values.txt +++ /dev/null @@ -1,156 +0,0 @@ -################### -# 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_horde_riders_to_raise = { - if = { - limit = { - uses_county_fertility = yes - } - value = county_fertility - } - else = { - value = 25 - } - min = 10 - multiply = 30 - - # 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_horde_riders_to_raise_power = { - value = county_horde_riders_to_raise - multiply = 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/N3OW/common/script_values/00_game_rule_values.txt b/N3OW/common/script_values/00_game_rule_values.txt deleted file mode 100644 index c9f7fc87..00000000 --- a/N3OW/common/script_values/00_game_rule_values.txt +++ /dev/null @@ -1,183 +0,0 @@ -slower_game_rule_value = 0.5 -significantly_slower_game_rule_value = 0.25 -faster_game_rule_value = 2 -significantly_faster_game_rule_value = 4 - -random_harm_spiteful_diverse_skilled_value = 15 -random_harm_spiteful_multi_skilled_value = 18 -random_harm_spiteful_specialist_skilled_value = 23 - -random_harm_spiteful_perks_in_tree_total_value = 20 - -harm_game_rule_likelihood_minor_increase_value = 0.1 -harm_game_rule_likelihood_medium_increase_value = 0.25 -harm_game_rule_likelihood_major_increase_value = 0.4 - -harm_game_rule_likelihood_value = { - value = 0 - # Set a base from the for various game rule configurations. - ## Default. - if = { - limit = { - OR = { - has_game_rule = harm_dangerous - has_game_rule = harm_spiteful - } - } - add = 1 - } - ## Reduced. - else_if = { - limit = { has_game_rule = harm_illusion_of_safety } - add = 0.25 - } - ## Disabled. - ### Covered in the trigger. - ## Increased. - else_if = { - limit = { - OR = { - has_game_rule = harm_tragic - has_game_rule = harm_tragically_spiteful - } - } - add = 1.5 - } - ## Increased even further for interesting characters. - if = { - limit = { - # Must have an appropriate game rule. - OR = { - has_game_rule = harm_spiteful - has_game_rule = harm_tragically_spiteful - } - } - # And be suitably worthwhile! - ## Highly skilled. - if = { - limit = { - calc_true_if = { - amount >= 4 - diplomacy >= random_harm_spiteful_diverse_skilled_value - martial >= random_harm_spiteful_diverse_skilled_value - stewardship >= random_harm_spiteful_diverse_skilled_value - intrigue >= random_harm_spiteful_diverse_skilled_value - learning >= random_harm_spiteful_diverse_skilled_value - prowess >= random_harm_spiteful_diverse_skilled_value - } - calc_true_if = { - amount >= 2 - diplomacy >= random_harm_spiteful_multi_skilled_value - martial >= random_harm_spiteful_multi_skilled_value - stewardship >= random_harm_spiteful_multi_skilled_value - intrigue >= random_harm_spiteful_multi_skilled_value - learning >= random_harm_spiteful_multi_skilled_value - prowess >= random_harm_spiteful_multi_skilled_value - } - OR = { - diplomacy >= random_harm_spiteful_specialist_skilled_value - martial >= random_harm_spiteful_specialist_skilled_value - stewardship >= random_harm_spiteful_specialist_skilled_value - intrigue >= random_harm_spiteful_specialist_skilled_value - learning >= random_harm_spiteful_specialist_skilled_value - prowess >= random_harm_spiteful_specialist_skilled_value - } - } - add = harm_game_rule_likelihood_medium_increase_value - } - ## Positive genetic traits. - ### First, we check number. - #### We don't tolerate excess. - if = { - limit = { num_of_good_genetic_traits >= 2 } - add = harm_game_rule_likelihood_minor_increase_value - } - #### Let alone impractical excess. - else_if = { - limit = { num_of_good_genetic_traits >= 3 } - add = harm_game_rule_likelihood_medium_increase_value - } - ### Then we check quality. - #### Some buffs. - if = { - limit = { - OR = { - has_trait = beauty_good_1 - has_trait = intellect_good_1 - has_trait = physique_good_1 - } - } - add = harm_game_rule_likelihood_minor_increase_value - } - #### Clearly doing some breeding. - else_if = { - limit = { - OR = { - has_trait = beauty_good_2 - has_trait = intellect_good_2 - has_trait = physique_good_2 - } - } - add = harm_game_rule_likelihood_medium_increase_value - } - #### Remember: you opted into this. - else_if = { - limit = { - OR = { - has_trait = beauty_good_3 - has_trait = intellect_good_3 - has_trait = physique_good_3 - } - } - add = harm_game_rule_likelihood_major_increase_value - } - ## Notable levels of prestige or piety. - if = { - limit = { - OR = { - prestige_level >= max_prestige_level - piety_level >= max_piety_level - } - } - add = harm_game_rule_likelihood_minor_increase_value - } - ## Very young or getting old & in charge of an important realm. - if = { - limit = { - OR = { - AND = { - age <= 28 - OR = { - highest_held_title_tier >= tier_kingdom - realm_size >= monumental_realm_size - } - } - AND = { - age >= 66 - OR = { - highest_held_title_tier >= tier_kingdom - realm_size >= monumental_realm_size - } - } - } - } - add = harm_game_rule_likelihood_medium_increase_value - } - ## Has capped out a noble number of perk trees. - if = { - limit = { - calc_true_if = { - amount >= 2 - perks_in_diplomacy_lifestyle >= random_harm_spiteful_perks_in_tree_total_value - perks_in_martial_lifestyle >= random_harm_spiteful_perks_in_tree_total_value - perks_in_stewardship_lifestyle >= random_harm_spiteful_perks_in_tree_total_value - perks_in_intrigue_lifestyle >= random_harm_spiteful_perks_in_tree_total_value - perks_in_learning_lifestyle >= random_harm_spiteful_perks_in_tree_total_value - } - } - add = harm_game_rule_likelihood_medium_increase_value - } - } - # But uhhh, make sure it never gets too ungodly kill-crazy. - max = 2.5 -} diff --git a/N3OW/common/script_values/00_goverment_values.txt b/N3OW/common/script_values/00_goverment_values.txt deleted file mode 100644 index 4b1f5b80..00000000 --- a/N3OW/common/script_values/00_goverment_values.txt +++ /dev/null @@ -1,211 +0,0 @@ -################### -# 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 = 4 - -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 -} - -#Nomadic government values -exempt_herd_tax = 0 -low_herd_tax = 0.05 -normal_herd_tax = 0.1 -high_herd_tax = 0.25 -extortionate_herd_tax = 0.4 - -herd_tax_exempt_level = 0 -herd_tax_low_level = 1 -herd_tax_normal_level = 2 -herd_tax_high_level = 3 -herd_tax_extortionate_level = 4 - -exempt_nomad_tax = 0 -low_nomad_tax = 0.05 -normal_nomad_tax = 0.1 -high_nomad_tax = 0.15 -extortionate_nomad_tax = 0.2 - -# Default Tributary values -normal_tributary_tax = 0.25 -high_tributary_tax = 0.50 -normal_prestige_transfer = 0.1 -high_prestige_transfer = 0.25 - -#maguh_development_value = { -# value = 0.01 -# multiply = clan_government_tax_collector_aptitude_multiplier -#} diff --git a/N3OW/common/script_values/00_governance_lifestyle_values.txt b/N3OW/common/script_values/00_governance_lifestyle_values.txt deleted file mode 100644 index 3012d805..00000000 --- a/N3OW/common/script_values/00_governance_lifestyle_values.txt +++ /dev/null @@ -1,53 +0,0 @@ - -#Domesday Book Quality Levels -stewardship_domain_special_1500_domesday_perfect_quality = 24 -stewardship_domain_special_1500_domesday_excellent_quality = 20 -stewardship_domain_special_1500_domesday_high_quality = 15 -stewardship_domain_special_1500_domesday_mediocre_quality = 10 -stewardship_domain_special_1500_domesday_poor_quality = 5 - - -#How much more monthly tax would character have to pay to their liege if obligation level was increased -stewardship_duty_5021_monthly_tax_difference = { - value = 0 - if = { - limit = { vassal_contract_obligation_level:feudal_government_taxes = feudal_tax_exempt_level } - add = low_feudal_tax - subtract = feudal_tax_exempt_level - } - else_if = { - limit = { vassal_contract_obligation_level:feudal_government_taxes = feudal_tax_low_level } - add = normal_feudal_tax - subtract = low_feudal_tax - } - else_if = { - limit = { vassal_contract_obligation_level:feudal_government_taxes = feudal_tax_normal_level } - add = high_feudal_tax - subtract = normal_feudal_tax - } - else = { #Else because vassal obligation doesn't go any higher - add = extortionate_feudal_tax - subtract = high_feudal_tax - } - multiply = monthly_character_income -} - -#5 years of tax difference -stewardship_duty_5021_big_money = { - value = stewardship_duty_5021_monthly_tax_difference - multiply = 120 #120 months = 10 years - - divide = 5 - ceiling = yes - multiply = 5 -} - -#2.5 years of tax difference -stewardship_duty_5021_small_money = { - value = stewardship_duty_5021_monthly_tax_difference - multiply = 60 #60 months = 5 years - - divide = 5 - ceiling = yes - multiply = 5 -} \ No newline at end of file diff --git a/N3OW/common/script_values/00_hold_court_values.txt b/N3OW/common/script_values/00_hold_court_values.txt deleted file mode 100644 index d59560c2..00000000 --- a/N3OW/common/script_values/00_hold_court_values.txt +++ /dev/null @@ -1,228 +0,0 @@ - -#Values used for checking relative strengths of neighbors - -hold_court_8010_75_strength_value = { - value = ROOT.max_military_strength - multiply = 0.75 -} - -hold_court_8010_border_length_value = { - value = 0 - every_sub_realm_county = { - limit = { hold_court_8010_county_trigger = yes } - add = 1 - } - if = { - limit = { has_trait = paranoid } - add = 1 - } - if = { - limit = { has_trait = lazy } - add = 1 - } - if = { - limit = { has_trait = craven } - add = 1 - } - if = { - limit = { is_powerful_vassal = yes } - add = 1 - } -} - -hold_court_holding_cost_cheaper_value = { - value = main_building_tier_1_cost - multiply = 0.8 -} - -hold_court_holding_cost_half_value = { - value = main_building_tier_1_cost - multiply = 0.8 - divide = 2 -} - -hold_court_holding_cost_double_value = { - value = main_building_tier_1_cost - multiply = 2 -} - -hold_court_holding_cost_architect_cheaper_value = { - value = main_building_tier_1_cost - multiply = 0.6 -} - -hold_court_holding_cost_architect_expensive_value = { - value = main_building_tier_1_cost - multiply = 1.2 -} - -hold_court_8180_contract_weak_value = { - value = 2 -} - -hold_court_8180_contract_average_value = { - value = 3 -} - -hold_court_8180_contract_good_value = { - value = 4 -} - -hold_court_8180_contract_great_value = { - value = 5 -} - -hold_court_8180_contract_value = { - value = 0 - if = { - limit = { scope:contract_lord.var:hc_8180_contract_var = 1 } - add = hold_court_8180_contract_good_value - } - if = { - limit = { scope:contract_lord.var:hc_8180_contract_var = 2 } - add = hold_court_8180_contract_weak_value - } - if = { - limit = { scope:contract_lord.var:hc_8180_contract_var = 3 } - add = hold_court_8180_contract_weak_value - } - if = { - limit = { scope:contract_lord.var:hc_8180_contract_var = 4 } - add = hold_court_8180_contract_average_value - } - if = { - limit = { scope:contract_lord.var:hc_8180_contract_var = 5 } - add = hold_court_8180_contract_good_value - } - if = { - limit = { scope:contract_lord.var:hc_8180_contract_var = 6 } - add = hold_court_8180_contract_good_value - } - if = { - limit = { scope:contract_lord.var:hc_8180_contract_var = 7 } - add = hold_court_8180_contract_average_value - } - if = { - limit = { scope:contract_lord.var:hc_8180_contract_var = 8 } - add = hold_court_8180_contract_average_value - } - if = { - limit = { scope:contract_lord.var:hc_8180_contract_var = 9 } - add = hold_court_8180_contract_great_value - } - if = { - limit = { scope:contract_lord.var:hc_8180_contract_var = 10 } - add = hold_court_8180_contract_average_value - } - if = { - limit = { scope:contract_lord.var:hc_8180_contract_var = 11 } - add = hold_court_8180_contract_average_value - } -} - -hold_court_8180_artifact_value = { - value = scope:vassal_artifact.var:quality - divide = 2 -} - -court_8190_vassal_modifier_value = { - value = 0 - subtract = steward_promote_culture_base_total - multiply = -0.10 -} - -court_8190_county_value = { - value = 0 - if = { - limit = { - any_realm_county = { culture = scope:other_vassal.culture } - } - every_realm_county = { - limit = { culture = scope:other_vassal.culture } - add = 1 - } - } -} - -court_8200_pope_modifier_value = { - value = 0 - subtract = court_chaplain_conversion_base_total - multiply = -0.15 -} - -court_8200_vassal_modifier_value = { - value = 0 - subtract = court_chaplain_conversion_base_total - multiply = -0.10 -} - -court_8200_county_value = { - value = 0 - if = { - limit = { - any_realm_county = { faith = scope:infidel_vassal.faith } - } - every_realm_county = { - limit = { faith = scope:infidel_vassal.faith } - add = 1 - } - } -} - -court_8260_faction_value = { - value = 0 - if = { - limit = { exists = scope:vassal_faction } - scope:vassal_faction = { - every_faction_member = { add = 1 } - } - } -} - -court_8090_half_building_cost_value = { - value = medium_gold_value - divide = 2 - max = 50 -} - -court_8090_discount_building_cost_value = { - value = medium_gold_value - divide = 3 - multiply = 2 - max = 65 -} - -hold_court_8330_other_vassals_count = { - value = 0 - every_vassal = { - limit = { - NOR = { - has_vassal_stance = barons_and_minor_landholders - trigger_if = { - limit = { exists = scope:vassal_1 } - has_same_vassal_stance_as_trigger = { COMPARE = scope:vassal_1 } - } - trigger_if = { - limit = { exists = scope:vassal_2 } - has_same_vassal_stance_as_trigger = { COMPARE = scope:vassal_2 } - } - } - } - add = 1 - } -} - -initial_petitioners_value = 3 - -petitioner_total_chain_length_value = { - value = initial_petitioners_value - # Add the start and end events. - add = 2 -} - -petitioner_current_progress_value = { - value = scope:event_chain_progress - add = 1 -} - - diff --git a/N3OW/common/script_values/00_holy_order_values.txt b/N3OW/common/script_values/00_holy_order_values.txt deleted file mode 100644 index a28846fd..00000000 --- a/N3OW/common/script_values/00_holy_order_values.txt +++ /dev/null @@ -1,99 +0,0 @@ - -#Holy Order standard values -holy_order_barony_number_soft_threshold = 10 - -#Setup values -holy_order_gold_cost = { - value = 500 - if = { - limit = { - is_ai = yes - } - add = -300 - } - # Remove cost if there's a free credit available. - if = { - limit = { has_character_modifier = next_free_ho_hire_modifier } - multiply = 0 - } -} - -holy_order_piety_cost = { - value = 1000 - if = { - limit = { - is_ai = yes - } - add = -600 - } - # Remove cost if there's a free credit available. - if = { - limit = { has_character_modifier = next_free_ho_hire_modifier } - multiply = 0 - } -} - -holy_order_starting_gold = { - value = 250 -} - -cancel_holy_order_piety_cost = { - value = 500 -} - - -#Holy Order province calculations -holy_order_barony_value_calculation = { - value = 0 - add = scope:request_target.major_gold_value - add = { - value = scope:request_target.medium_gold_value - multiply = { - value = county.development_level - multiply = 0.1 - } - } - if = { - limit = { - title_province = { - has_holding_type = castle_holding - } - } - multiply = 1.2 - } - if = { - limit = { - title_province = { - OR = { - has_building = castle_02 - has_building = city_02 - } - } - } - multiply = 1.2 - } - if = { - limit = { - title_province = { - OR = { - has_building = castle_03 - has_building = city_03 - } - } - } - multiply = 1.4 - } - if = { - limit = { - title_province = { - OR = { - has_building = castle_04 - has_building = city_04 - } - } - } - multiply = 1.6 - } - - max = massive_gold_max_value -} diff --git a/N3OW/common/script_values/00_interaction_values.txt b/N3OW/common/script_values/00_interaction_values.txt deleted file mode 100644 index 45a364b9..00000000 --- a/N3OW/common/script_values/00_interaction_values.txt +++ /dev/null @@ -1,918 +0,0 @@ -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_herd_value_recipient = { - value = 0 - if = { - limit = { - exists = scope:recipient.domicile - } - add = scope:recipient.domicile.medium_herd_value - } -} - -ransom_herd_value_actor = { - value = 0 - if = { - limit = { - exists = scope:actor.domicile - } - add = scope:actor.domicile.medium_herd_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 - } - } - if = { - limit = { - has_game_rule = hard_difficulty - OR = { - scope:imprisoner ?= { - is_ai = no - } - imprisoner ?= { - is_ai = no - } - } - } - multiply = 0.5 - } - else_if = { - limit = { - has_game_rule = very_hard_difficulty - OR = { - scope:imprisoner ?= { - is_ai = no - } - imprisoner ?= { - is_ai = no - } - } - } - multiply = 0.25 - } -} - -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_belligerent_vassals = { - value = 0 - every_vassal = { - limit = { - has_vassal_stance = belligerent - } - add = 1 - } -} - -number_of_participating_belligerent_vassals = { - value = 0 - every_vassal = { - limit = { - has_vassal_stance = belligerent - is_participant_in_activity = root.involved_activity - } - 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 - } -} - -ten_percent_of_current_military_strength = { - value = { - add = current_military_strength - multiply = 0.1 - } -} - -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 -} - -duchy_confederation_vassals_value = { - value = 0 - scope:actor.confederation = { - every_confederation_member = { - limit = { - highest_held_title_tier >= tier_county - } - add = -1 - } - } - #First 3 confederates are free - add = 3 - #Multiply by 20 to get impact - max = 0 - multiply = 15 -} - -duchy_confederation_vassals_value_recipient = { - value = 0 - scope:recipient.confederation = { - every_confederation_member = { - limit = { - highest_held_title_tier >= tier_county - } - add = -1 - } - } - #First 5 confederates are free - add = 5 - #Multiply by 20 to get impact - max = 0 - multiply = 15 -} diff --git a/N3OW/common/script_values/00_intrigue_lifestyle_values.txt b/N3OW/common/script_values/00_intrigue_lifestyle_values.txt deleted file mode 100644 index 01d2b46a..00000000 --- a/N3OW/common/script_values/00_intrigue_lifestyle_values.txt +++ /dev/null @@ -1,10 +0,0 @@ -scheme_starting_opportunities_per_intrigue_threshold_value = 15 -scheme_starting_opportunities_per_intrigue_increment_value = 5 - -#Depravity Tracking -intrigue_depravity_compassionate_loss_threshold = 3 -intrigue_depravity_threshold = 3 - -#Deceit Tracking -intrigue_deception_honest_loss_threshold = 3 -intrigue_deception_threshold = 3 \ No newline at end of file diff --git a/N3OW/common/script_values/00_invasion_values.txt b/N3OW/common/script_values/00_invasion_values.txt deleted file mode 100644 index 2d8cc423..00000000 --- a/N3OW/common/script_values/00_invasion_values.txt +++ /dev/null @@ -1,12 +0,0 @@ - -################################ -# Almohads -################################ -almohad_appearance_base_chance = 1 - -titles_held_in_k_maghreb = { - every_sub_realm_county = { - limit = { kingdom = title:k_maghreb } - add = 1 - } -} \ No newline at end of file diff --git a/N3OW/common/script_values/00_law_values.txt b/N3OW/common/script_values/00_law_values.txt deleted file mode 100644 index 02997712..00000000 --- a/N3OW/common/script_values/00_law_values.txt +++ /dev/null @@ -1,739 +0,0 @@ -############## -# 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 -} - -# Prowess: Base Dominance Cost Reduction -prowess_law_cost_modifier = { - value = 0 - subtract = prowess - add = 8 - divide = 75 - 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: The modifier used to calculate the Warmonger modifier if the character's faith has Warmonger -warmonger_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 = { - OR = { - has_variable = crown_authority_cooldown - has_variable = imperial_bureaucracy_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% - } - } -} - -#Dominance / Nomadic Authority Change -increase_nomadic_authority_herd_cost_base = 500 - -increase_nomadic_authority_herd_cost = { - add = { - desc = "BASE_VALUE" - value = increase_nomadic_authority_herd_cost_base - format = "BASE_VALUE_FORMAT" - } - multiply = { - desc = "era_law_cost_scale" - value = domicile.herd_value_scale_by_era - } - multiply = { - desc = "dominance_law_cost_scale" - value = dominance_value - } -} - -increase_nomadic_authority_prestige_base = 300 - -increase_nomadic_authority_prestige_cost = { - add = { - desc = "BASE_VALUE" - value = increase_nomadic_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 - } - - # Prowess Modifier (2% more expensive for each skill point below 8 Prowess) - if = { - limit = { - prowess < 8 - } - add = { - desc = "poor_prowess_law_cost_tooltip" - value = { - add = increase_nomadic_authority_prestige_base - add = subrealm_size_modifier - } - multiply = prowess_law_cost_modifier - } - } - else_if = { # (2% less expensive for each skill point above 8 Prowess) - limit = { - prowess > 8 - } - add = { - desc = "prowess_law_cost_tooltip" - value = { - add = increase_nomadic_authority_prestige_base - add = subrealm_size_modifier - } - multiply = prowess_law_cost_modifier - } - } - - # Tenet Modifiers - if = { - limit = { - faith = { - has_doctrine_parameter = warmonger - } - } - add = { - desc = "tenet_warmonger_law_cost_tooltip" - value = { - add = increase_crown_authority_prestige_base - add = subrealm_size_modifier - } - multiply = warmonger_law_cost_modifier - } - } - - # Apply All-Things cooldown breaker multiplier. - if = { - limit = { - has_variable = nomadic_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 - } - } - } -} - -#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/N3OW/common/script_values/00_legitimacy_values.txt b/N3OW/common/script_values/00_legitimacy_values.txt deleted file mode 100644 index 366e893b..00000000 --- a/N3OW/common/script_values/00_legitimacy_values.txt +++ /dev/null @@ -1,1091 +0,0 @@ -###################### -# 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 -monumental_legitimacy_gain = 500 - -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 -} -monumental_legitimacy_loss = { - value = 0 - subtract = monumental_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_has_flag = government_is_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_has_flag = government_is_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 = golden_lineage } - 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 - } -} - -nomadic_legitimacy_claimant_multiplier = { - value = 1 - if = { - limit = { - scope:the_claimant = { government_has_flag = government_is_nomadic } - } - multiply = 1.5 - } -} diff --git a/N3OW/common/script_values/00_lifestyle_values.txt b/N3OW/common/script_values/00_lifestyle_values.txt deleted file mode 100644 index 2999639e..00000000 --- a/N3OW/common/script_values/00_lifestyle_values.txt +++ /dev/null @@ -1,1037 +0,0 @@ -###################### -# 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_miniscule_lifestyle_xp = { - value = miniscule_lifestyle_xp - multiply = 1.5 - if = { - limit = { - has_perk = been_there_done_that_perk - } - multiply = been_there_done_that_multiplier_value - } -} - -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 -zealous_proselytizer_stargazer_percentage = 10 - -# 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/N3OW/common/script_values/00_memory_values.txt b/N3OW/common/script_values/00_memory_values.txt deleted file mode 100644 index be360c3a..00000000 --- a/N3OW/common/script_values/00_memory_values.txt +++ /dev/null @@ -1,61 +0,0 @@ -memory_default_duration = { - value = 5 - if = { - limit = { - OR = { - is_ruler = yes - any_close_family_member = { - is_ruler = yes - } - any_spouse = { - is_ruler = yes - } - } - } - add = 125 - } - if = { - limit = { - highest_held_title_tier >= tier_duchy - } - add = 25 - } - if = { - limit = { - any_relation = { - type = rival - is_ai = no - } - } - add = 25 - } - if = { - limit = { - any_relation = { - type = friend - is_ai = no - } - } - add = 25 - } - if = { - limit = { - any_relation = { - type = ward - is_ai = no - } - } - add = 25 - } - if = { - limit = { - OR = { - is_ai = no - any_parent = { - is_ai = no - } - } - } - add = 195 - } -} \ No newline at end of file diff --git a/N3OW/common/script_values/00_men_at_arms_values.txt b/N3OW/common/script_values/00_men_at_arms_values.txt deleted file mode 100644 index dad38c01..00000000 --- a/N3OW/common/script_values/00_men_at_arms_values.txt +++ /dev/null @@ -1,926 +0,0 @@ -###################### -# 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] - -@gunpowder_recruitment_cost = 76 -@gunpowder_low_maint_cost = 0.35 -@gunpowder_high_maint_cost = @[gunpowder_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] - -handgunner_recruitment_cost = @[gunpowder_recruitment_cost] -handgunner_low_maint_cost = @[gunpowder_low_maint_cost] -handgunner_high_maint_cost = @[gunpowder_high_maint_cost] - - -### Siege Weapons MAA -torch_bearers_recruitment_cost = @[siege_weapons_recruitment_cost * 0.5] -torch_bearers_low_maint_cost = @[siege_weapons_low_maint_cost * 0.5] -torch_bearers_high_maint_cost = @[siege_weapons_high_maint_cost * 0.5] - -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] - -ballista_recruitment_cost = @[siege_weapons_recruitment_cost] -ballista_low_maint_cost = @[siege_weapons_low_maint_cost] -ballista_high_maint_cost = @[siege_weapons_high_maint_cost] - -cloud_ladder_recruitment_cost = @[siege_weapons_recruitment_cost * 1.1] -cloud_ladder_low_maint_cost = @[siege_weapons_low_maint_cost * 1.1] -cloud_ladder_high_maint_cost = @[siege_weapons_high_maint_cost * 1.1] - -siege_tower_recruitment_cost = @[siege_weapons_recruitment_cost * 1.3] -siege_tower_low_maint_cost = @[siege_weapons_low_maint_cost * 1.3] -siege_tower_high_maint_cost = @[siege_weapons_high_maint_cost * 1.3] - -cannon_recruitment_cost = @[gunpowder_recruitment_cost * 1.6] -cannon_low_maint_cost = @[gunpowder_low_maint_cost * 1.6] -cannon_high_maint_cost = @[gunpowder_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] - -warrior_monks_gold_recruitment_cost = 45 -warrior_monks_piety_recruitment_cost = 200 -warrior_monks_gold_low_maint_cost = 0.1 -warrior_monks_gold_high_maint_cost = 0.3 -warrior_monks_piety_low_maint_cost = 0.2 -warrior_monks_piety_high_maint_cost = 0.6 - -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] - -shenbigong_recruitment_cost = @[archers_recruitment_cost * 1.75] -shenbigong_low_maint_cost = @[archers_low_maint_cost * 1.75] -shenbigong_high_maint_cost = @[archers_high_maint_cost * 1.75] - -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 - -fire_lancers_recruitment_cost = @[gunpowder_recruitment_cost] -fire_lancers_low_maint_cost = @[gunpowder_low_maint_cost] -fire_lancers_high_maint_cost = @[gunpowder_high_maint_cost] - -gakgung_archers_recruitment_cost = @[archers_recruitment_cost * 1.2] -gakgung_archers_low_maint_cost = @[archers_low_maint_cost * 1.2] -gakgung_archers_high_maint_cost = @[archers_high_maint_cost * 1.2] - -ballista_elephant_recruitment_cost = @[heavy_cavalry_recruitment_cost * 2.2] -ballista_elephant_low_maint_cost = @[heavy_cavalry_low_maint_cost * 1.4] -ballista_elephant_high_maint_cost = @[heavy_cavalry_high_maint_cost * 1.6] - -pesilat_warriors_recruitment_cost = @[skirmisher_recruitment_cost * 0.9] -pesilat_warriors_low_maint_cost = @[skirmisher_low_maint_cost * 0.9] -pesilat_warriors_high_maint_cost = @[skirmisher_high_maint_cost * 0.9] - -samurai_recruitment_cost = @[heavy_infantry_recruitment_cost * 1.67] -samurai_low_maint_cost = @[heavy_infantry_low_maint_cost * 1.67] -samurai_high_maint_cost = @[heavy_infantry_high_maint_cost * 1.67] - -zhanmadao_infantry_recruitment_cost = @[heavy_infantry_recruitment_cost * 1.2] -zhanmadao_infantry_low_maint_cost = @[heavy_infantry_low_maint_cost * 1.2] -zhanmadao_infantry_high_maint_cost = @[heavy_infantry_high_maint_cost * 1.2] - -burenjia_recruitment_cost = @[heavy_infantry_recruitment_cost * 1.33] -burenjia_low_maint_cost = @[heavy_infantry_low_maint_cost * 1.33] -burenjia_high_maint_cost = @[heavy_infantry_high_maint_cost * 1.33] - -tiefutu_recruitment_cost = @[heavy_cavalry_recruitment_cost * 1.3] -tiefutu_low_maint_cost = @[heavy_cavalry_low_maint_cost * 1.3] -tiefutu_high_maint_cost = @[heavy_cavalry_high_maint_cost * 1.3] - -rocket_carts_recruitment_cost = @[archers_recruitment_cost * 1.25] -rocket_carts_low_maint_cost = @[archers_low_maint_cost * 0.9] # uses gunpowder, but also uses less men than archers would -rocket_carts_high_maint_cost = @[archers_high_maint_cost * 0.9] - -### 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] - -#MPO - - steppe_raiders_recruitment_cost = @[light_cavalry_recruitment_cost * 0.9] - steppe_raiders_low_maint_cost = @[light_cavalry_low_maint_cost * 0.9] - steppe_raiders_high_maint_cost = @[light_cavalry_high_maint_cost * 0.9] - - heavy_horse_archers_recruitment_cost = @[skirmisher_recruitment_cost * 3.5] - heavy_horse_archers_low_maint_cost = @[skirmisher_low_maint_cost * 3.5] - heavy_horse_archers_high_maint_cost = @[skirmisher_high_maint_cost * 3.5] - - nomad_lancers_recruitment_cost = @[heavy_cavalry_recruitment_cost * 0.95] - nomad_lancers_low_maint_cost = @[heavy_cavalry_low_maint_cost * 0.95] - nomad_lancers_high_maint_cost = @[heavy_cavalry_high_maint_cost * 0.95] - - kheshig_recruitment_cost = @[skirmisher_recruitment_cost * 5] - kheshig_veterans_low_maint_cost = @[skirmisher_low_maint_cost * 5] - kheshig_veterans_high_maint_cost = @[skirmisher_high_maint_cost * 5] - - mangudai_recruitment_cost = @[skirmisher_recruitment_cost * 2.2] - mangudai_low_maint_cost = @[skirmisher_low_maint_cost * 2.2] - mangudai_high_maint_cost = @[skirmisher_high_maint_cost * 2.2] - - cataphract_archers_recruitment_cost = @[heavy_cavalry_recruitment_cost * 1.3] - cataphract_archers_low_maint_cost = @[heavy_cavalry_low_maint_cost * 1.3] - cataphract_archers_high_maint_cost = @[heavy_cavalry_high_maint_cost * 1.3] - - maturkan_warriors_recruitment_cost = @[archers_recruitment_cost * 1.05] - maturkan_warriors_low_maint_cost = @[archers_low_maint_cost * 1.05] - maturkan_warriors_high_maint_cost = @[archers_high_maint_cost * 1.05] - -############## -# 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 = { - OR = { - culture = { - culture_has_heavy_infantry_maa = yes - } - - # Zhanmadao (China) - vassal_contract_has_flag = celestial_province_military - vassal_contract_has_flag = celestial_province_protectorate - } - } - 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 = { - mpo_can_recruit_nomad_maa_trigger = no - OR = { - culture = { has_cultural_pillar = heritage_iranian } - } - } - add = 80 - } - if = { # Cultures that favours light cavalry - limit = { - mpo_can_recruit_nomad_maa_trigger = no - culture = { - OR = { - has_cultural_pillar = heritage_arabic - has_cultural_pillar = heritage_berber - has_cultural_pillar = heritage_iberian - has_cultural_pillar = heritage_indo_aryan - has_cultural_pillar = heritage_turkic - has_cultural_pillar = heritage_mongolic - } - } - } - 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 = { - mpo_can_recruit_nomad_maa_trigger = no - 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 = { - mpo_can_recruit_nomad_maa_trigger = no - 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_gunpowder = { - value = 200 # Since these are hard-limited elsewhere, prefer them highly - if = { - limit = { - culture = { has_cultural_era_or_later = culture_era_late_medieval } - number_maa_regiments_of_base_type = { - type = pikemen - value >= 3 - } - NOT = { - number_maa_regiments_of_base_type = { - type = gunpowder - value >= 1 - } - } - } - add = 60 - } - if = { - limit = { - culture = { has_cultural_pillar = heritage_chinese } - } - add = 10 # more gun - } -} - -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 - } -} - -culture_ai_weight_crossbowmen = { - value = counter_synergy_ai_weight_crossbowmen - - if = { # Cultures with a special MaA of that type should avoid the base version of the unit - limit = { - culture = { - culture_has_improved_crossbowmen = yes - } - } - add = -500 - } -} - -counter_synergy_ai_weight_crossbowmen = { - value = counter_synergy_ai_weight_archers - - if = { # They counter heavy cavalry, so less interesting early on - limit = { - current_date < 1150.1.1 - } - add = -100 - } -} - -################### -# Provisions Costs # -################### - -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 - -############ -# GUN MATH # -############ - -gunpowder_raise_limit_existing_gunpowder_units = { - value = 0 - - every_maa_regiment = { - limit = { - is_personal_maa_regiment = yes - OR = { - is_maa_type = handgunners - is_maa_type = fire_lancers - } - } - add = 1 - } -} - -gunpowder_raise_limit_existing_gunpowder_buildings = { - value = 0 - - every_directly_owned_province = { - limit = { - has_building_or_higher = powder_magazine_01 - } - if = { - limit = { - has_building_or_higher = powder_magazine_07 - } - add = gunpowder_building_limit_bonus_3 - } - else_if = { - limit = { - has_building_or_higher = powder_magazine_04 - } - add = gunpowder_building_limit_bonus_2 - } - else = { - add = gunpowder_building_limit_bonus_1 - } - } - if = { - limit = { - exists = domicile - } - domicile = { - if = { - limit = { - has_domicile_building_or_higher = east_asian_estate_gunpowder_storage_03 - } - add = gunpowder_building_limit_bonus_2 - } - else_if = { - limit = { - has_domicile_building_or_higher = east_asian_estate_gunpowder_storage_01 - } - add = gunpowder_building_limit_bonus_1 - } - } - } -} - -gunpowder_building_limit_bonus_1 = 1 -gunpowder_building_limit_bonus_2 = 2 -gunpowder_building_limit_bonus_3 = 3 diff --git a/N3OW/common/script_values/00_mongol_values.txt b/N3OW/common/script_values/00_mongol_values.txt deleted file mode 100644 index ad3ee507..00000000 --- a/N3OW/common/script_values/00_mongol_values.txt +++ /dev/null @@ -1,239 +0,0 @@ -####################### -# 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 = { - value = 1 - #player temujin should start getting a higher chance of becoming Genghis faster - if = { - limit = { - exists = character:125501 - character:125501 = { - is_ai = no - is_physically_able_ai_adult = yes - } - current_date > 1190.1.1 - } - add = 30 - } -} - -# 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 - } - } -} diff --git a/N3OW/common/script_values/00_poetry_values.txt b/N3OW/common/script_values/00_poetry_values.txt deleted file mode 100644 index df3b187c..00000000 --- a/N3OW/common/script_values/00_poetry_values.txt +++ /dev/null @@ -1,5 +0,0 @@ -################################################## -# Send Poem Interaction - -# This needs to be synced with @send_poem_cooldown_years_value in 00_poetry_opinions.txt. -send_poem_cooldown_years_value = 5 diff --git a/N3OW/common/script_values/00_prison_values.txt b/N3OW/common/script_values/00_prison_values.txt deleted file mode 100644 index 39d08afa..00000000 --- a/N3OW/common/script_values/00_prison_values.txt +++ /dev/null @@ -1,4 +0,0 @@ - -dungeon_events_on_action_chance = { - add = 50 -} \ No newline at end of file diff --git a/N3OW/common/script_values/00_regional_values.txt b/N3OW/common/script_values/00_regional_values.txt deleted file mode 100644 index 1370f235..00000000 --- a/N3OW/common/script_values/00_regional_values.txt +++ /dev/null @@ -1,38 +0,0 @@ -############# -# SAHARA & SAHEL -############# - -local_slave_gold_value = { #How much would a colossal slave raid fetch from this place? - value = monthly_income - multiply = 10 - - #Sensible max-mins. - min = 30 - max = 100 - - #Give a whole number. - ceiling = yes -} - -slaver_reparations_value = { - value = monthly_character_income - - #Sensible max-mins. - min = 10 - max = 120 - - #Give a whole number. - ceiling = yes -} - -selfish_liege_slave_gold_value = { - value = monthly_income - multiply = 5 - - #Sensible max-mins. - min = 15 - max = 80 - - #Give a whole number. - ceiling = yes -} \ No newline at end of file diff --git a/N3OW/common/script_values/00_relation_values.txt b/N3OW/common/script_values/00_relation_values.txt deleted file mode 100644 index 5f9cd1ce..00000000 --- a/N3OW/common/script_values/00_relation_values.txt +++ /dev/null @@ -1,44 +0,0 @@ -# Default relation opinions -default_friend_opinion = 15 -default_rival_opinion = -15 -default_lover_opinion = 15 - -#Rivalry score adjustments -minor_rival_score_gain = 10 -medium_rival_score_gain = 20 -major_rival_score_gain = 30 -massive_rival_score_gain = 40 - -#Rivalry score diff thresholds -minor_story_owner_advantage = 10 -medium_story_owner_advantage = 30 -major_story_owner_advantage = 50 -minor_target_rival_advantage = -10 -medium_target_rival_advantage = -30 -major_target_rival_advantage = -50 - -# Existing Relationship Tallies -sum_friends_and_rivals_tally_value = { - value = 0 - every_relation = { - type = friend - add = 1 - } - every_relation = { - type = rival - add = 1 - } -} -sum_potential_friends_and_potential_rivals_tally_value = { - value = 0 - every_relation = { - type = potential_friend - add = 1 - } - every_relation = { - type = potential_rival - add = 1 - } -} - -getwomanmangirlboy_age_threshold_value = 20 diff --git a/N3OW/common/script_values/00_scheme_values.txt b/N3OW/common/script_values/00_scheme_values.txt deleted file mode 100644 index 9fac7690..00000000 --- a/N3OW/common/script_values/00_scheme_values.txt +++ /dev/null @@ -1,5104 +0,0 @@ -################### -# 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 -} -scheme_progress_33 = { - value = scope:scheme.scheme_phase_duration - multiply = 0.33 -} -scheme_progress_50 = { - value = scope:scheme.scheme_phase_duration - multiply = 0.5 -} -scheme_progress_66 = { - value = scope:scheme.scheme_phase_duration - multiply = 0.66 -} -# 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 - } -} - -herd_bribe_value = { - # Base. - value = major_herd_value_static - # 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 = { - exists = scope:target.holder - } - scope:target.holder = { - # 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_holder.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_holder.number_of_valid_vassal_agents - } - } - } - } - else = { - 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_diplomacy_title_value = { - add = { - value = scope:owner.diplomacy - desc = scheme_odds.diplomacy.owner - } - scope:target.holder ?= { - add = { - value = scope:target.holder.diplomacy - desc = scheme_odds.diplomacy.target_holder - 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_variables_contribution_murder = { - ## nomad_events.0006 - if = { - limit = { - scope:owner = { - has_variable = achmach_murder_help_var - any_councillor = { - has_variable = achmach_murder_help_councillor_var - } - } - } - add = { - value = 15 - desc = "ACHMACH_MURDER_BONUS" - } - } -} - -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 - } - if = { - limit = { - scope:owner ?= { - var:family_widow_forbidden_divorce ?= scope:target - } - } - add = 20 - } - } - -} - -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 - } - } - -} - -# same as odds_raid_estate_scheme_misc_value but target is a title -odds_dispute_border_scheme_misc_value = { - add = { - value = 0 - desc = scheme_odds.misc_modifiers - add = { - value = scope:owner.influence_level - multiply = 2 - } - add = { - value = scope:target.influence_level - multiply = -4 - } - if = { - limit = { - scope:target.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.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_dispute_border_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.holder.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.holder.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 - } - } -} - -# same as odds_dispute_border_scheme_misc_value but target is a character -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.influence_level - multiply = -4 - } - if = { - limit = { - scope:target.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.house = { - is_powerful_family = yes - is_dominant_family = no - } - } - add = -16 - } - if = { - limit = { - scope:target.holder.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.holder.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 = lifestyle_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 - } - if = { - limit = { - scope:owner ?= { - var:family_widow_forbidden_divorce ?= scope:target - } - } - add = 20 - } - } -} - -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/N3OW/common/script_values/00_scholarship_lifestyle_values.txt b/N3OW/common/script_values/00_scholarship_lifestyle_values.txt deleted file mode 100644 index d1eca6fb..00000000 --- a/N3OW/common/script_values/00_scholarship_lifestyle_values.txt +++ /dev/null @@ -1,6 +0,0 @@ - -#Zealous Tracking -scholarship_zealous_threshold = -3 - -#Cynical Tracking -scholarsip_cynical_threshold = 3 \ No newline at end of file diff --git a/N3OW/common/script_values/00_single_combat_values.txt b/N3OW/common/script_values/00_single_combat_values.txt deleted file mode 100644 index 567a751a..00000000 --- a/N3OW/common/script_values/00_single_combat_values.txt +++ /dev/null @@ -1,179 +0,0 @@ -############################ -# COMBAT SETTINGS -############################ - -# By default, how much % extra do we pump it up when someone is risking injury? Occurs *after* it has been determined that they may be injured, and just increases that chance. -starting_injury_bonus = 10 - -# How much of a gap do you need, initially, between you and your opponent in order to win? -starting_success_threshold = 125 - -# How many rounds can the single combat go before it enters sudden death? -round_cap_limit = 4 - -# When does it get easier to injure yourself, and by how much? -round_injury_bonus_lower = 3 -round_injury_bonus_lowest = 4 -round_injury_adjustment_lower = 10 -round_injury_adjustment_lowest = 30 - -# When does it get easier to win, and by how much? -round_success_threshold_lower = 3 -round_success_threshold_lowest = 4 -round_success_adjustment_lower = -15 -round_success_adjustment_lowest = -20 - -############################ -# SINGLE COMBAT SKILL RATINGS -############################ - -low_scsk = low_skill_rating -mediocre_scsk = mediocre_skill_rating -medium_scsk = medium_skill_rating -decent_scsk = decent_skill_rating -high_scsk = high_skill_rating -very_high_scsk = very_high_skill_rating -extremely_high_scsk = extremely_high_skill_rating - -############################ -# COMBAT ROLLS -############################ - -# Injury Risk values -injury_risk_none = 0 -injury_risk_low = 25 -injury_risk_medium = 50 -injury_risk_high = 75 -injury_risk_very_high = 100 - -# Duel Success values -duel_success_none = 0 -duel_success_low = 25 -duel_success_medium = 50 -duel_success_high = 75 -duel_success_very_high = 100 - -############################ -# DESC THRESHOLDS -############################ - -sc_defender_injury_check_actual = { - value = scope:sc_defender.var:sc_defender_injury_risk_check - subtract = scope:sc_defender.var:sc_defender_duel_success_score -} - -sc_attacker_injury_check_actual = { - value = scope:sc_attacker.var:sc_attacker_injury_risk_check - subtract = scope:sc_attacker.var:sc_attacker_duel_success_score -} - -single_combat_injury_very_unlikely_value = -50 -single_combat_injury_unlikely_value = -10 -single_combat_injury_neutral_value = 10 -single_combat_injury_likely_value = 40 - -single_combat_success_almost_impossible_value = -70 -single_combat_success_very_unlikely_value = -45 -single_combat_success_unlikely_value = -20 -single_combat_success_likely_value = 20 -single_combat_success_very_likely_value = 45 -single_combat_success_almost_certain_value = 70 - -############################ -# COMBAT MOVE WEIGHTING CONTROLS -############################ - -sce_regular_combat_repeat_down_weight = -750 - -############################ -# COMBAT MOVE AI WEIGHTS -############################ - -sce_ai_mod_trait_weight_light = 25 - -sce_ai_mod_trait_weight_medium = 50 - -sce_ai_mod_trait_weight_heavy = 75 - -sce_ai_mod_trait_down_weight_medium = -50 - -############################ -# COMBAT MOVE SPECIAL EFFECTS VALUES -############################ - -combat_move_pocket_silver_value = 20 - -combat_move_reason_you_suck_speech_value = { - value = diplomacy - # Every 1pts of diplomacy gives 5 prestige. - multiply = 5 -} - -combat_move_butchery_dread_value = { - value = prowess - # Every 2pts of prowess gives a point of dread. - divide = 2 - # Up to a sensible maximum. - max = 10 -} - -combat_move_blade_dance_value = { - value = prowess - # Every 1pts of prowess gives 5 prestige. - multiply = 5 -} - -# Since this doesn't refere to a true threshold, a malus means incrementing the number (bringing you closer to the eventual target). -combat_move_wound_threshold_malus_1 = 30 -combat_move_wound_threshold_malus_2 = 40 -combat_move_wound_threshold_malus_3 = 50 - -# Since this doesn't refere to a true threshold, a bonus means decrementing the number (bringing you further away from the eventual target). -combat_move_wound_threshold_bonus_1 = -30 -combat_move_wound_threshold_bonus_2 = -40 -combat_move_wound_threshold_bonus_3 = -50 - -############################ -# MISC -############################ - -# Calculates a character's prowess, plus the number of traits they have with beneficial special combat moves. -sce_has_single_combat_special_traits_value = { - value = prowess - - # Blademaster. - if = { - limit = { has_trait = lifestyle_blademaster } - add = 10 - } - # Hunter. - if = { - limit = { has_trait = lifestyle_hunter } - add = 10 - } - # Berserker. - if = { - limit = { has_trait = berserker } - add = 10 - } - # Shieldmaiden. - if = { - limit = { has_trait = shieldmaiden } - add = 10 - } - # Varangian. - if = { - limit = { has_trait = varangian } - add = 10 - } - # Deviant. - if = { - limit = { has_trait = deviant } - add = 10 - } - # Viking. - if = { - limit = { has_trait = viking } - add = 10 - } -} \ No newline at end of file diff --git a/N3OW/common/script_values/00_stress_values.txt b/N3OW/common/script_values/00_stress_values.txt deleted file mode 100644 index c55befee..00000000 --- a/N3OW/common/script_values/00_stress_values.txt +++ /dev/null @@ -1,159 +0,0 @@ -############################ -# STRESS CHANGES -############################ - -miniscule_stress_gain = 10 -minor_stress_gain = 20 -medium_stress_gain = 40 -major_stress_gain = 60 -massive_stress_gain = 100 -monumental_stress_gain = 150 - -miniscule_stress_loss = -5 -minor_stress_loss = -10 -medium_stress_loss = -20 -major_stress_loss = -40 -massive_stress_loss = -60 -monumental_stress_loss = -100 - -#Thresholds -minor_stress_gain_threshold = 100 -medium_stress_gain_threshold = 200 -major_stress_gain_threshold = 300 -max_stress_gain_threshold = 400 - -#Values to be used in "stress_impact" -miniscule_stress_impact_gain = 10 -minor_stress_impact_gain = 20 -medium_stress_impact_gain = 40 -major_stress_impact_gain = 80 -massive_stress_impact_gain = 100 -miniscule_stress_impact_loss = -5 -minor_stress_impact_loss = -15 -medium_stress_impact_loss = -30 -major_stress_impact_loss = -65 -massive_stress_impact_loss = -100 - -# For certain traits 'nullifying' most of a medium stress gain, but some left for flavor. -sub_medium_stress_impact_loss = -30 -sub_medium_stress_impact_gain = 30 - -refund_perks_stress_impact = 100 - -mental_break_opt_out_stress_gain = 25 -hunt_stress_loss_value = -30 -meager_feast_stress_loss_value = -10 -feast_stress_loss_value = -30 -medium_feast_stress_loss_value = -35 -lavish_feast_stress_loss_value = -40 -exotic_feast_stress_loss_value = -45 -activity_stress_loss_impact = -15 -activity_stress_gain_impact = 15 - -#Duration of stress-induced opinion penalties in days -default_stress_opinion_duration = 3650 - - -#Cost of changing a child's traits -child_trait_change_stress_penalty = 30 -depart_from_own_trait_stress_cost = 10 - - -#Stress trigger values -very_low_stress = 10 -low_stress = 25 -lower_than_baseline_stress = 50 -normal_baseline_stress = 75 -higher_than_baseline_stress = 100 -low_medium_stress = 125 -medium_stress = 150 -high_medium_stress = 175 -high_stress = 200 -very_high_stress = 250 -extremely_high_stress = 300 - - -# Mental Break values -stress_threshold_cooldown_duration = { - value = 1824 # 1 day less than 5 years - if = { - limit = { - has_perk = mental_resilience_perk - } - add = 1095 # 3 years extra - } - floor = yes # Should be unneccessary, but ensures it's an int -} -stress_threshold_cooldown_duration_in_years = { - value = 5 - if = { - limit = { - has_perk = mental_resilience_perk - } - add = 3 - } -} -stress_threshold_second_check_timing = { - value = 1825 # 5 years - if = { - limit = { - has_perk = mental_resilience_perk - } - add = 1095 # 3 years extra - } - floor = yes # Should be unneccessary, but ensures it's an int -} - -generous_title_grant_value = { - value = 0 - # Base stress value scaled on title tier. - every_in_list = { - list = target_titles - - add = { - value = 0 - - if = { - limit = { this.tier = tier_county } - add = minor_stress_loss # 10 base - } - else_if = { - limit = { this.tier = tier_duchy } - add = { - value = medium_stress_loss - multiply = 1.25 # 25 base - } - } - else_if = { - limit = { this.tier = tier_kingdom } - add = { - value = major_stress_loss - multiply = 2 # 80 base - } - } - else_if = { - limit = { this.tier = tier_empire } - add = { - value = monumental_stress_loss - multiply = 2 # 200 base - } - } - - # Lose more stress for giving away titles of your primary tier; lose less stress for giving away titles far below your primary in tier. - multiply = { - value = this.tier - add = 1 - divide = scope:actor.primary_title.tier - } - - # Round to the nearest multiple of 5. - divide = 5 - round = yes - multiply = 5 - - # For a Duke, this will be x1.25 for Duchies (-30) and x1 for Counties(-10) - # For a King, this will be x1.25 for a Kingdom (-100), x1 for a Duchy (-25) and x0.75 for Counties(-10) - # For an Emperor, this will be x1.25 for an Empire(-200), x1 for a Kingdom(-80), x0.75 for a Duchy(-20) and x0.4 for a Counties (-5) - } - } -} diff --git a/N3OW/common/script_values/00_struggle_values.txt b/N3OW/common/script_values/00_struggle_values.txt deleted file mode 100644 index bd0210ec..00000000 --- a/N3OW/common/script_values/00_struggle_values.txt +++ /dev/null @@ -1,174 +0,0 @@ -################################################## -# Struggle Scripted Values -################################################## - -################################################## -# Agnostic Values - -# Since we never take points away from catalysts, we only need them in the positive. -minimal_struggle_catalyst_gain = 1 -minor_struggle_catalyst_gain = 3 -medium_struggle_catalyst_gain = 5 -major_struggle_catalyst_gain = 10 -massive_struggle_catalyst_gain = 25 -monumental_struggle_catalyst_gain = 50 - -# "over time" values for balancing passage of time catalysts. -minimal_struggle_catalyst_over_time_gain = 1 -minor_struggle_catalyst_over_time_gain = 2 -medium_struggle_catalyst_over_time_gain = 3 -major_struggle_catalyst_over_time_gain = 5 -massive_struggle_catalyst_over_time_gain = 10 -monumental_struggle_catalyst_over_time_gain = 20 - -# Special values for syncing catalysts between phases that need different values than the standard for balancing purposes. -catalyst_forming_alliance_between_supporter_detractor_rulers_value = 2 -catalyst_fp3_yearly_time_out_ending_drift = { - value = 1 - # If we're past 960, bump it up. - if = { - limit = { current_year >= 960 } - add = 1 - } - # If we're past 1000, really bump it up. - ## Remember that this is cumulative. - if = { - limit = { current_year >= 1000 } - add = 3 - } -} - -# Mess around with the AI's priorities for war targets. -## We mostly apply this in nakedly aggressive wars; AI with claims or de jure rights elsewhere shouldn't want to forgo them completely. -struggle_wars_prioritise_struggle_targets_value = { - value = 1 - - # If scope:attacker is involved in a struggle, we tank how much they want to attack non-struggle characters. - if = { - limit = { - scope:attacker = { - any_character_struggle = { - involvement = involved - is_secondary_character_involvement_neither_trigger = { CHAR = scope:defender } - } - } - } - multiply = 0.25 - } - # And scope:defender is an interloper in the same struggle, we double-dip. - if = { - limit = { - scope:attacker = { - any_character_struggle = { - involvement = involved - is_secondary_character_involvement_interloper_trigger = { CHAR = scope:defender } - } - } - } - multiply = 1.5 - } - - # Agenda impact - if = { - limit = { - scope:attacker = { - any_character_struggle = { - involvement = involved - } - } - } - multiply = { - value = 0 - if = { - limit = { - scope:attacker = { - any_character_struggle = { - phase_has_catalyst = catalyst_winning_large_conquest_war - } - has_character_flag = agenda_towards_escalation - } - } - add = 2 - } - else_if = { - limit = { - scope:attacker = { - any_character_struggle = { - phase_has_catalyst = catalyst_winning_large_conquest_war - } - } - } - add = 0.25 - } - } - } -} - -################################################## -# Catalyst Values - -catalyst_forming_alliance_with_major_uninvolved_power_power_realm_size_value = { value = massive_realm_size } - -catalyst_cooldown_between_significant_character_deaths_years_value = 25 - -################################################## -# Phase Values - -# Sundry bonuses for council tasks and such. -boost_county_conversion_phase_bonus_value = { - value = court_chaplain_conversion_base_total - multiply = 0.25 -} - -boost_county_conversion_phase_malus_value = { - value = court_chaplain_conversion_base_total - multiply = -0.25 -} - -# Used for random weighting. -add_X_per_sub_realm_struggle_county_value = { - every_sub_realm_county = { - limit = { - any_county_struggle = { this = root } - } - add = 2 - } -} - -fp2_struggle_0011_gift_cost_value = { value = major_gold_value } - -fp2_struggle_compromise_ending_minimal_empire_size = 5 - -# What we show in loc. -fp3_caliph_gets_cheaper_subjugation_cb_show_value = 0.2 -# What we actually use in script. -fp3_caliph_gets_cheaper_subjugation_cb_actual_value = { - value = 1 - subtract = fp3_caliph_gets_cheaper_subjugation_cb_show_value -} - -# Empower viziers. -fp3_empower_viziers_swing_value = 25 - -################################################## -# FP3 Control Values - -# At what threshold of house heads do we activate successively larger antagonistic house catalysts? -catalyst_yearly_influential_house_is_antagonistic_major_control_value = 10 -catalyst_yearly_influential_house_is_antagonistic_medium_control_value = 6 -catalyst_yearly_influential_house_is_antagonistic_minor_control_value = 3 -catalyst_yearly_influential_house_is_antagonistic_minimal_control_value = 1 - -# At what threshold of house heads do we activate successively larger harmonious house catalysts? -catalyst_yearly_influential_house_is_harmonious_major_control_value = 10 -catalyst_yearly_influential_house_is_harmonious_medium_control_value = 6 -catalyst_yearly_influential_house_is_harmonious_minor_control_value = 3 -catalyst_yearly_influential_house_is_harmonious_minimal_control_value = 1 - -sub_realm_size_value = { - value = sub_realm_size -} - -caliph_realm_size_value = { - value = title:d_sunni.holder.realm_size -} diff --git a/N3OW/common/script_values/00_suggestion_values.txt b/N3OW/common/script_values/00_suggestion_values.txt deleted file mode 100644 index 24030cb2..00000000 --- a/N3OW/common/script_values/00_suggestion_values.txt +++ /dev/null @@ -1,5 +0,0 @@ -recommended_num_maa_regiments_value = { - # 1 for counts, 2 for dukes, 3 for kings, 4 for emperors - value = highest_held_title_tier - subtract = 1 -} \ No newline at end of file diff --git a/N3OW/common/script_values/00_title_tiers_values.txt b/N3OW/common/script_values/00_title_tiers_values.txt deleted file mode 100644 index 63683463..00000000 --- a/N3OW/common/script_values/00_title_tiers_values.txt +++ /dev/null @@ -1,173 +0,0 @@ -tier_unlanded = 0 -tier_barony = 1 -tier_county = 2 -tier_duchy = 3 -tier_kingdom = 4 -tier_empire = 5 - -highest_held_title_tier_plus_one = { - value = highest_held_title_tier - add = 1 - max = tier_empire -} - -highest_held_title_tier_minus_one = { - value = highest_held_title_tier - subtract = 1 - min = tier_unlanded -} - -# Referenced in code, what % of a title's counties you need to own to create it -# Note: First item with 'desc' is considered the base and will be shown as 'neutral' -# root = creating character -# scope:title = the title -create_title_counties_percentage = { - scope:title = { - if = { - limit = { - OR = { - tier = tier_duchy - tier = tier_kingdom - } - } - add = { - value = 0.5 - desc = CREATE_TITLE_PERCENTAGE_BASE_DUCHY_KINGDOM - } - if = { - limit = { # Do you have Legitimacy? - root ?= { - has_legitimacy = yes - } - } - if = { - limit = { - root = { - has_legitimacy_flag = extra_reduced_title_creation_cost - } - } - add = { - value = -0.25 #25% - desc = CREATE_TITLE_PERCENTAGE_LEGITIMACY_DISCOUNT_EXTRA_REDUCED - } - } - else_if = { - limit = { - root = { has_legitimacy_flag = very_reduced_title_creation_cost } - } - add = { - value = -0.20 #30% - desc = CREATE_TITLE_PERCENTAGE_LEGITIMACY_DISCOUNT_VERY_REDUCED - } - } - else_if = { - limit = { - root = { has_legitimacy_flag = reduced_title_creation_cost } - } - add = { - value = -0.15 #35% - desc = CREATE_TITLE_PERCENTAGE_LEGITIMACY_DISCOUNT_REDUCED - } - } - else = { - #If you're level 2/1/0 or don't have Legitimacy you get no discounts - add = { - value = 0.0 - desc = CREATE_TITLE_PERCENTAGE_LEGITIMACY_DISCOUNT_NONE - } - } - } - else = { - #If you're level 2/1/0 or don't have Legitimacy you get no discounts - add = { - # We add 0 with a 'desc', so we show up in the GUI and people understand legitimacy is a way to improve this - value = 0.0 - desc = CREATE_TITLE_PERCENTAGE_LEGITIMACY_DISCOUNT_NONE - } - } - } - else_if = { #Smaller discounts for Empires - limit = { - tier = tier_empire - } - add = { - value = 0.8 - desc = CREATE_TITLE_PERCENTAGE_BASE_EMPIRE - } - if = { - limit = { # Do you have Legitimacy? - root = { - has_legitimacy = yes - } - } - if = { - limit = { - root = { - has_legitimacy_flag = extra_reduced_title_creation_cost - } - } - add = { - value = -0.15 #65% - desc = CREATE_TITLE_PERCENTAGE_LEGITIMACY_DISCOUNT_EXTRA_REDUCED - } - } - else_if = { - limit = { - root = { has_legitimacy_flag = very_reduced_title_creation_cost } - } - add = { - value = -0.10 #70% - desc = CREATE_TITLE_PERCENTAGE_LEGITIMACY_DISCOUNT_VERY_REDUCED - } - } - else_if = { - limit = { - root = { has_legitimacy_flag = reduced_title_creation_cost } - } - add = { - value = -0.05 #75% - desc = CREATE_TITLE_PERCENTAGE_LEGITIMACY_DISCOUNT_REDUCED - } - } - else = { - #If you're level 1/0 or don't have Legitimacy you get no discounts - add = { - value = 0.0 - desc = CREATE_TITLE_PERCENTAGE_LEGITIMACY_DISCOUNT_NONE - } - } - } - else = { - #If you're level 1/0 or don't have Legitimacy you get no discounts - add = { - # We add 0 with a 'desc', so we show up in the GUI and people understand legitimacy is a way to improve this - value = 0.0 - desc = CREATE_TITLE_PERCENTAGE_LEGITIMACY_DISCOUNT_NONE - } - } - } - } -} - -# Referenced in code, what % of a title's counties you need to own to usurp it -# root = creating character -# scope:title = the title -usurp_title_counties_percentage = { - scope:title = { - if = { - limit = { - OR = { - tier = tier_duchy - tier = tier_kingdom - } - } - add = 0.5 - } - else_if = { - limit = { - tier = tier_empire - } - add = 0.8 - } - } -} diff --git a/N3OW/common/script_values/00_trait_values.txt b/N3OW/common/script_values/00_trait_values.txt deleted file mode 100644 index cc2cdc23..00000000 --- a/N3OW/common/script_values/00_trait_values.txt +++ /dev/null @@ -1,10 +0,0 @@ -#Trait xp -miniscule_trait_xp = 1 -minor_trait_xp = 3 -medium_trait_xp = 5 -major_trait_xp = 10 -massive_trait_xp = 20 #Rarely ever use - -#XP needed for trait level -trait_second_level = 50 -trait_third_level = 100 \ No newline at end of file diff --git a/N3OW/common/script_values/00_travel_values.txt b/N3OW/common/script_values/00_travel_values.txt deleted file mode 100644 index 1361b584..00000000 --- a/N3OW/common/script_values/00_travel_values.txt +++ /dev/null @@ -1,164 +0,0 @@ -traveler_rank_up_1_threshold = 10 -traveler_rank_up_2_threshold = 20 -traveler_rank_up_3_threshold = 30 -traveler_rank_up_4_threshold = 40 -traveler_rank_up_5_threshold = 50 -traveler_rank_up_6_threshold = 60 -traveler_rank_up_7_threshold = 70 -traveler_rank_up_8_threshold = 80 -traveler_rank_up_9_threshold = 90 -traveler_rank_up_10_threshold = 100 - -# Read time constants -@hills_danger_value = 45 -@mountains_danger_value = 65 -@desert_danger_value = 50 -@desert_mountains_danger_value = 65 -@jungle_danger_value = 65 -@forest_danger_value = 45 -@taiga_danger_value = 55 -@wetlands_danger_value = 65 -@steppe_danger_value = 50 -@floodplains_danger_value = 35 -@drylands_danger_value = 35 -@epidemic_danger_value = 80 -@high_reduction_constant = -1 -@medium_reduction_constant = @[2 / 3 * -1] -@low_reduction_constant = @[1 / 3 * -1] - -# Script values other files can reference -hills_danger_value = @hills_danger_value -mountains_danger_value = @mountains_danger_value -desert_danger_value = @desert_danger_value -desert_mountains_danger_value = @desert_mountains_danger_value -jungle_danger_value = @jungle_danger_value -forest_danger_value = @forest_danger_value -taiga_danger_value = @taiga_danger_value -wetlands_danger_value = @wetlands_danger_value -steppe_danger_value = @steppe_danger_value -floodplains_danger_value = @floodplains_danger_value -drylands_danger_value = @drylands_danger_value -epidemic_danger_value = @epidemic_danger_value - -ocean_danger_value = 75 -coastal_sea_danger_value = 50 -low_sea_danger_reduction = -25 -medium_sea_danger_reduction = -45 - -hills_high_danger_reduction = @[hills_danger_value * high_reduction_constant] -hills_medium_danger_reduction = @[hills_danger_value * medium_reduction_constant -2] -hills_low_danger_reduction = @[hills_danger_value * low_reduction_constant +1] - -mountains_high_danger_reduction = @[mountains_danger_value * high_reduction_constant] -mountains_medium_danger_reduction = @[mountains_danger_value * medium_reduction_constant +1] -mountains_low_danger_reduction = @[mountains_danger_value * low_reduction_constant -2] - -desert_high_danger_reduction = @[desert_danger_value * high_reduction_constant] -desert_medium_danger_reduction = @[desert_danger_value * medium_reduction_constant +1] -desert_low_danger_reduction = @[desert_danger_value * low_reduction_constant -2] - - -desert_mountains_high_danger_reduction = @[desert_mountains_danger_value * high_reduction_constant] -desert_mountains_medium_danger_reduction = @[desert_mountains_danger_value * medium_reduction_constant +1] -desert_mountains_low_danger_reduction = @[desert_mountains_danger_value * low_reduction_constant -2] - -jungle_high_danger_reduction = @[jungle_danger_value * high_reduction_constant] -jungle_medium_danger_reduction = @[jungle_danger_value * medium_reduction_constant +1] -jungle_low_danger_reduction = @[jungle_danger_value * low_reduction_constant -2] - -forest_high_danger_reduction = @[forest_danger_value * high_reduction_constant] -forest_medium_danger_reduction = @[forest_danger_value * medium_reduction_constant -2] -forest_low_danger_reduction = @[forest_danger_value * low_reduction_constant +1] - -taiga_high_danger_reduction = @[taiga_danger_value * high_reduction_constant] -taiga_medium_danger_reduction = @[taiga_danger_value * medium_reduction_constant -1] -taiga_low_danger_reduction = @[taiga_danger_value * low_reduction_constant -1] - -wetlands_high_danger_reduction = @[wetlands_danger_value * high_reduction_constant] -wetlands_medium_danger_reduction = @[wetlands_danger_value * medium_reduction_constant +1] -wetlands_low_danger_reduction = @[wetlands_danger_value * low_reduction_constant -2] - -steppe_high_danger_reduction = @[steppe_danger_value * high_reduction_constant] -steppe_medium_danger_reduction = @[steppe_danger_value * medium_reduction_constant +1] -steppe_low_danger_reduction = @[steppe_danger_value * low_reduction_constant -2] - -floodplains_high_danger_reduction = @[floodplains_danger_value * high_reduction_constant] -floodplains_medium_danger_reduction = @[floodplains_danger_value * medium_reduction_constant +1] -floodplains_low_danger_reduction = @[floodplains_danger_value * low_reduction_constant -2] - -drylands_high_danger_reduction = @[drylands_danger_value * high_reduction_constant] -drylands_medium_danger_reduction = @[drylands_danger_value * medium_reduction_constant +1] -drylands_low_danger_reduction = @[drylands_danger_value * low_reduction_constant -2] - -epidemic_high_danger_reduction = @[epidemic_danger_value * high_reduction_constant] -epidemic_medium_danger_reduction = @[epidemic_danger_value * medium_reduction_constant +1] -epidemic_low_danger_reduction = @[epidemic_danger_value * low_reduction_constant -2] - -# Travel Option Cost Scripted Values -low_travel_option_base_cost = 2 -medium_travel_option_base_cost = 5 -high_travel_option_base_cost = 10 - -tier_multiplier = { - value = primary_title.tier - subtract = 1 - min = 1 -} - -very_low_travel_option_cost = { - value = low_travel_option_cost - multiply = 0.5 -} -low_travel_option_cost = { - value = low_travel_option_base_cost - multiply = tier_multiplier - if = { - limit = { - has_perk = well_prepared_perk - } - multiply = 0.75 - } -} -medium_travel_option_cost = { - value = medium_travel_option_base_cost - multiply = tier_multiplier - if = { - limit = { - has_perk = well_prepared_perk - } - multiply = 0.75 - } -} -high_travel_option_cost = { - value = high_travel_option_base_cost - multiply = tier_multiplier - if = { - limit = { - has_perk = well_prepared_perk - } - multiply = 0.75 - } -} - -struggle_low_danger_impact = { - value = 15 -} - -struggle_medium_danger_impact = { - value = 30 -} - -struggle_high_danger_impact = { - value = 50 -} - -food_poison_value = { - value = 15 - subtract = health - if = { - limit = { - has_perk = iron_constitution_perk - } - add = -5 - } -} diff --git a/N3OW/common/script_values/00_unity_values.txt b/N3OW/common/script_values/00_unity_values.txt deleted file mode 100644 index ef93735f..00000000 --- a/N3OW/common/script_values/00_unity_values.txt +++ /dev/null @@ -1,113 +0,0 @@ -################### -# UNITY VALUES # -################### - -# BASE HOUSE UNITY VALUES -miniscule_unity_value = 1 -minor_unity_value = 2 -medium_unity_value = 4 -major_unity_value = 6 -massive_unity_value = 10 - -miniscule_unity_loss = { - value = 0 - subtract = miniscule_unity_value -} -minor_unity_loss = { - value = 0 - subtract = minor_unity_value -} -medium_unity_loss = { - value = 0 - subtract = medium_unity_value -} -major_unity_loss = { - value = 0 - subtract = major_unity_value -} -massive_unity_loss = { - value = 0 - subtract = massive_unity_value -} - -miniscule_unity_gain = miniscule_unity_value -minor_unity_gain = minor_unity_value -medium_unity_gain = medium_unity_value -major_unity_gain = major_unity_value -massive_unity_gain = massive_unity_value - -unity_house_head_multiplier_value = 2 # How much more of an impact house heads have on house unity - -number_of_landed_house_members_value = { - value = 0 - house = { - every_house_member = { - limit = { - is_landed_or_landless_administrative = yes - } - add = 1 - } - } -} -number_of_landed_house_unity_members_value = { - value = 0 - every_house_member = { - limit = { - is_landed_or_landless_administrative = yes - } - add = 1 - max = 10 - } - desc = MODIFIER_DEFINITION_MAIN_DESC_HOUSE_UNITY -} - -# EFFECTS AND PARAMETER VALUES -unity_antagonistic_cb_cost_display_value = -30 -unity_antagonistic_cb_cost_value = { - value = 1 - add = { - value = unity_antagonistic_cb_cost_display_value - divide = 100 - } -} - -unity_competitive_cb_cost_display_value = -15 -unity_competitive_cb_cost_value = { - value = 1 - add = { - value = unity_competitive_cb_cost_display_value - divide = 100 - } -} - -unity_friendly_cb_cost_display_value = 15 -unity_friendly_cb_cost_value = { - value = 1 - add = { - value = unity_friendly_cb_cost_display_value - divide = 100 - } -} - -unity_harmonious_cb_cost_display_value = 30 -unity_harmonious_cb_cost_value = { - value = 1 - add = { - value = unity_harmonious_cb_cost_display_value - divide = 100 - } -} - -unity_antagonistic_invasion_cooldown_value = { - value = 10 -} - -clan_powerful_vassal_no_alliance_opinion_penalty_value = { - value = -30 -} -clan_vassal_no_alliance_opinion_penalty_value = { - value = -15 -} - -unity_major_decision_piety_cost = { value = 200 } -unity_minor_decision_piety_cost = { value = 100 } diff --git a/N3OW/common/script_values/00_visit_settlement_values.txt b/N3OW/common/script_values/00_visit_settlement_values.txt deleted file mode 100644 index 6c7e41a9..00000000 --- a/N3OW/common/script_values/00_visit_settlement_values.txt +++ /dev/null @@ -1,69 +0,0 @@ - -visit_settlement_lock_days = { - value = 0 - add = define:NGame|MULTIPLAYER_EVENT_TIME_OUT - add = 2 #Some buffer -} - -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 -} diff --git a/N3OW/common/script_values/00_war_values.txt b/N3OW/common/script_values/00_war_values.txt deleted file mode 100644 index 2f23a8f2..00000000 --- a/N3OW/common/script_values/00_war_values.txt +++ /dev/null @@ -1,970 +0,0 @@ -############## -# 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 - } - ## Shorter truce if both sides are nomads - if = { - limit = { - scope:attacker = { government_has_flag = government_is_nomadic } - scope:defender = { government_has_flag = government_is_nomadic } - } - subtract = 730 - } - # 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 # -###################### - -# Compute military strength against *scope:target_military*. -# -# This script value and the one after it are to be used in combination as -# "root_military_strength_higher_than_military_target_value > target_military_strength_root_value" -# to check player vs enemy strength. -root_military_strength_higher_than_military_target_value = { - 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!! - } -} - -# One above calcs player strength (plus multiplier), this one is enemy strength. -target_military_strength_root_value = { - value = 0 - if = { - limit = { exists = scope:target_military } - add = scope:target_military.max_military_strength # this should be a character, probably a top liege - scope:target_military = { - every_ally = { - limit = { - NOT = { has_truce = root } - } - add = max_military_strength - } - } - } -} - -# Compute military strength against *scope:recipient*. -# -# This script value and the one after it are to be used in combination as -# "root_military_strength_higher_than_recipient_value > recipient_strength_root_value" -# to check player vs enemy strength. -root_military_strength_higher_than_recipient_value = { - value = 0 - add = max_military_strength # Add num of troops - if = { - limit = { - any_ally = { - NOT = { has_truce = scope:recipient } - } - } - every_ally = { - limit = { - NOT = { has_truce = scope:recipient } - } - 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!! - } -} - -# One above calcs player strength (plus multiplier), this one is enemy strength. -recipient_strength_root_value = { - value = 0 - if = { - limit = { exists = scope:recipient } - add = scope:recipient.max_military_strength # this should be a character, probably a top liege - scope:recipient = { - 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/N3OW/common/script_values/01_character_weighting_values.txt b/N3OW/common/script_values/01_character_weighting_values.txt deleted file mode 100644 index c01f2937..00000000 --- a/N3OW/common/script_values/01_character_weighting_values.txt +++ /dev/null @@ -1,146 +0,0 @@ -################################### -# Character Weighting Values -# For a given character, each value will return a given score based on how relevant/important that character is to ROOT given the situation. -################################### -# Weight List: -# captured_combatant_weights_for_root_participant - For evaluating importance of prisoners captured during war, for the participants of that war. -# captured_combatant_weights_for_root_nonparticipant - For evaluating importance of prisoners captured during war for noncombatants (e.g., relatives of the prisoner). -# slain_combatant_weights_for_root_participant - For evaluating importance of casualties slain during war, for the participants of that war. -# slain_combatant_weights_for_root_nonparticipant - For evaluating importance of casualties slain during war for noncombatants (e.g., relatives of the deceased). - -captured_combatant_weights_for_root_participant = { - value = 0 - if = { - limit = { - # Captured primary participants are worth 100% warscore, so are absolute #1 priority. - exists = scope:combat_war - OR = { - this = scope:combat_war.primary_attacker - this = scope:combat_war.primary_defender - } - } - add = 5000 - } - if = { - limit = { - # Captured heirs of primary participants are worth 50% warscore, so are #2 priority. - exists = scope:combat_war - OR = { - is_heir_of = scope:combat_war.primary_attacker - is_heir_of = scope:combat_war.primary_defender - } - } - add = 1000 - } - if = { limit = { this = root.player_heir } # My own heir is of 3rd importance, since they are very important in the long term but not immediately relevant to the ongoing war. - add = 500 - } - if = { - limit = { - # The person I just defeated in combat is of 4th importance, since they are defeated 'for good' (for the moment). - exists = scope:combat_loser - this = scope:combat_loser - } - add = 100 - } - if = { limit = { is_close_family_of = root} - add = 50 - } - if = { limit = { is_of_major_interest_to_root_trigger = yes } - add = 10 - } - if = { limit = { is_of_minor_interest_to_root_trigger = yes} - add = 5 - } - add = this.highest_held_title_tier -} - -captured_combatant_weights_for_root_nonparticipant = { - value = 0 - - if = { limit = { this = root.player_heir } - add = 1000 - } - if = { limit = { is_heir_of = root } - add = 500 - } - if = { limit = { is_of_major_interest_to_root_trigger = yes } - add = 100 - } - if = { limit = { is_consort_of = root } - add = 50 - } - if = { limit = { is_child_of = root } - add = 25 - } - if = { limit = { is_of_minor_interest_to_root_trigger = yes } - add = 10 - } - if = { limit = { is_courtier_of = root } - add = 1 - } - add = this.highest_held_title_tier -} - -slain_combatant_weights_for_root_participant = { - value = 0 - if = { - limit = { - # Slain primary participants do not give warscore, but can change the outcome of the ongoing war (esp. if their successors are reluctant to continue the war). - exists = scope:combat_war - OR = { - this = scope:combat_war.primary_attacker - this = scope:combat_war.primary_defender - } - } - add = 1000 - } - if = { limit = { this = root.player_heir } # I care about my heir in the long-term, even if not immediately relevant. - add = 500 - } - if = { - limit = { - # If I killed the person I just fought in battle, I don't have to worry about them any more! - exists = scope:combat_loser - this = scope:combat_loser - } - add = 100 - } - if = { limit = { is_close_family_of = root} - add = 50 - } - if = { limit = { is_of_major_interest_to_root_trigger = yes } - add = 10 - } - if = { limit = { is_of_minor_interest_to_root_trigger = yes} - add = 5 - } - add = this.highest_held_title_tier -} - -slain_combatant_weights_for_root_nonparticipant = { - value = 0 - - if = { limit = { this = root.player_heir } - add = 1000 - } - if = { limit = { is_heir_of = root } - add = 500 - } - if = { limit = { is_of_major_interest_to_root_trigger = yes } - add = 100 - } - if = { limit = { is_consort_of = root } - add = 50 - } - if = { limit = { is_child_of = root } - add = 25 - } - if = { limit = { is_of_minor_interest_to_root_trigger = yes } - add = 10 - } - if = { limit = { is_courtier_of = root } - add = 1 - } - add = this.highest_held_title_tier -} \ No newline at end of file diff --git a/N3OW/common/script_values/01_dlc_bp1_script_values.txt b/N3OW/common/script_values/01_dlc_bp1_script_values.txt deleted file mode 100644 index 5bdf7620..00000000 --- a/N3OW/common/script_values/01_dlc_bp1_script_values.txt +++ /dev/null @@ -1,16 +0,0 @@ -house_feud_death_counter_value = { - value = var:house_feud_death_counter -} - -house_feud_kill_counter_value = { - value = var:house_feud_kill_counter -} - -house_feud_balance_value = { - value = house_feud_kill_counter_value - subtract = house_feud_death_counter_value -} - -house_feud_small_counter_value = 0.5 -house_feud_medium_counter_value = 1 -house_feud_big_counter_value = 2 diff --git a/N3OW/common/script_values/01_dlc_bp2_script_values.txt b/N3OW/common/script_values/01_dlc_bp2_script_values.txt deleted file mode 100644 index 961f24b5..00000000 --- a/N3OW/common/script_values/01_dlc_bp2_script_values.txt +++ /dev/null @@ -1,55 +0,0 @@ -event_troop_150_root_scale = { - value = 150 - multiply = { - value = root.primary_title.tier - } -} - -event_troop_150_vassal_scale = { - value = 150 - multiply = { - value = scope:vassal.primary_title.tier - } -} - -event_troop_100_root_scale = { - value = 100 - multiply = { - value = root.primary_title.tier - } -} - -event_troop_100_vassal_scale = { - value = 100 - multiply = { - value = scope:vassal.primary_title.tier - } -} - -event_troop_50_root_scale = { - value = 50 - multiply = { - value = root.primary_title.tier - } -} - -event_troop_50_vassal_scale = { - value = 50 - multiply = { - value = scope:vassal.primary_title.tier - } -} - -event_troop_25_root_scale = { - value = 25 - multiply = { - value = root.primary_title.tier - } -} - -event_troop_25_vassal_scale = { - value = 25 - multiply = { - value = scope:vassal.primary_title.tier - } -} \ No newline at end of file diff --git a/N3OW/common/script_values/01_dlc_fp1_script_values.txt b/N3OW/common/script_values/01_dlc_fp1_script_values.txt deleted file mode 100644 index 892d8ead..00000000 --- a/N3OW/common/script_values/01_dlc_fp1_script_values.txt +++ /dev/null @@ -1,1133 +0,0 @@ -############# -# Fury of the Northmen Scripted Values -############# - -################################################## -# Decisions - -defiant_high_monarch_conversion_boost_value = { - value = 0 - add = court_chaplain_conversion_base_total - multiply = 1.25 -} - -hold_gruesome_festival_decision_value = { - value = 0 - if = { - limit = { religion = religion:germanic_religion } - # This actually probably *isn't* Biblical numerology creeping into accounts of pagan worship, since we have records of fighting in Sweden that was probably about this around every nine years or so between Christians and pagans. - add = 9 - } - else = { add = 10 } -} - -gruesome_festival_prestige_cost_value = 200 - -gruesome_festival_key_sacrifice_piety_value = { - value = 0 - # For a base, take the general stand of human sacrifice. - if = { - limit = { scope:activity.var:blot_sacrifice = flag:humans_regular } - add = gruesome_festival_regular_human_piety_value - } - if = { - limit = { scope:activity.var:blot_sacrifice = flag:humans_magnificent } - add = gruesome_festival_magnificent_human_piety_value - } - # Landless faith hostility block. - if = { - limit = { - scope:sacrifice = { is_landed_or_landless_administrative = no } - } - # HumSac'ing a hostile faith. - if = { - limit = { - scope:gf_faith = { - faith_hostility_level = { - target = scope:sacrifice.faith - value = faith_hostile_level - } - # Exempt faiths/families you syncretise with. - NOR = { - # Eastern Family syncretism. - AND = { - has_doctrine = tenet_eastern_syncretism - scope:sacrifice.religion = { is_in_family = rf_eastern } - } - # Unreformed pagans syncretism. - AND = { - has_doctrine = tenet_unreformed_syncretism - scope:sacrifice.faith = { has_doctrine_parameter = unreformed } - } - # Christian syncretism. - AND = { - has_doctrine = tenet_christian_syncretism - scope:sacrifice.religion = religion:christianity_religion - } - # Islamic syncretism. - AND = { - has_doctrine = tenet_islamic_syncretism - scope:sacrifice.religion = religion:islam_religion - } - # Jewish syncretism. - AND = { - has_doctrine = tenet_jewish_syncretism - scope:sacrifice.religion = religion:judaism_religion - } - } - } - } - add = minor_piety_gain - } - # HumSac'ing an evil faith. - if = { - limit = { - scope:gf_faith = { - faith_hostility_level = { - target = scope:sacrifice.faith - value = faith_evil_level - } - } - } - add = medium_piety_gain - } - } - # Landed rank block. - scope:sacrifice = { - if = { - limit = { - is_landed_or_landless_administrative = yes - # Exempt HoFs: they get their own block. - NOT = { this = faith.religious_head } - } - # No extra gain for HumSac'ing a baron. - # HumSac'ing a count. - if = { - limit = { highest_held_title_tier = tier_county } - add = miniscule_piety_gain - } - # HumSac'ing a duke. - if = { - limit = { highest_held_title_tier = tier_duchy } - add = minor_piety_gain - } - # HumSac'ing a king. - if = { - limit = { highest_held_title_tier = tier_kingdom } - add = medium_piety_gain - } - # HumSac'ing an emperor. - if = { - limit = { highest_held_title_tier = tier_empire } - add = major_piety_gain - } - } - } - # HoF block. - ## Weigh up HoFs that are not scope:gf_faith's own. - if = { - limit = { - scope:sacrifice = { - this = faith.religious_head - NOT = { faith = scope:gf_faith } - } - } - add = major_piety_gain - } - ## Weigh up HoFs that *are* the HoF for scope:gf_faith. - scope:sacrifice = { - if = { - limit = { - this = faith.religious_head - faith = scope:gf_faith - } - ## HumSac'ing scope:gf_faith's own HoF, but they're sinful. - if = { - limit = { num_sinful_traits >= 2 } - add = minor_piety_loss - } - ## HumSac'ing scope:gf_faith's own HoF, and they're virtuous. - else_if = { - limit = { num_virtuous_traits >= 2 } - add = major_piety_loss - } - ## HumSac'ing scope:gf_faith's own HoF, and they're neutral. - else = { add = medium_piety_loss } - } - } -} - -gruesome_festival_regular_animal_piety_value = { - value = minor_piety_gain - - # If not of the faith, invert this & reduce it a little. - if = { - limit = { - NOT = { faith = scope:gf_faith } - } - # HumSac faiths still aren't happy. - if = { - limit = { - faith = { - OR = { - has_doctrine_parameter = flower_war_cb_active - has_doctrine_parameter = human_sacrifice_active - has_doctrine_parameter = gruesome_festivals_active - } - } - } - multiply = -0.25 - } - # Non-HumSac faiths are horrified. - else = { multiply = -0.75 } - } -} - -gruesome_festival_magnificent_animal_piety_value = { - value = medium_piety_gain - - # If not of the faith, invert this & reduce it a little. - if = { - limit = { - NOT = { faith = scope:gf_faith } - } - # HumSac faiths still aren't happy. - if = { - limit = { - faith = { - OR = { - has_doctrine_parameter = flower_war_cb_active - has_doctrine_parameter = human_sacrifice_active - has_doctrine_parameter = gruesome_festivals_active - } - } - } - multiply = -0.25 - } - # Non-HumSac faiths are horrified. - else = { multiply = -0.75 } - } -} - -gruesome_festival_regular_human_piety_value = { - value = medium_piety_gain - - # If not of the faith, invert this & reduce it a little. - if = { - limit = { - NOT = { faith = scope:gf_faith } - } - # HumSac faiths still aren't happy. - if = { - limit = { - faith = { - OR = { - has_doctrine_parameter = flower_war_cb_active - has_doctrine_parameter = human_sacrifice_active - has_doctrine_parameter = gruesome_festivals_active - } - } - } - multiply = -0.25 - } - # Non-HumSac faiths are horrified. - else = { multiply = -0.75 } - } -} - -gruesome_festival_magnificent_human_piety_value = { - value = major_piety_gain - - # If not of the faith, invert this & reduce it a little. - if = { - limit = { - NOT = { faith = scope:gf_faith } - } - # HumSac faiths still aren't happy. - if = { - limit = { - faith = { - OR = { - has_doctrine_parameter = flower_war_cb_active - has_doctrine_parameter = human_sacrifice_active - has_doctrine_parameter = gruesome_festivals_active - } - } - } - multiply = -0.25 - } - # Non-HumSac faiths are horrified. - else = { multiply = -0.75 } - } -} - -gruesome_festival_gf_guests_rejecting_invite_list_max_value = { - value = 0 - - # Add +1 for every entity in the list. - every_in_list = { - variable = gf_guests_rejecting_invite_list - add = 1 - } - # Cap it out at the max for the event. - max = 5 -} - -raise_stele_gold_cost = { value = medium_gold_value } - -raise_stele_county_preference_cap_value = { - value = 0 - - # Add +1 for every entity in the list. - every_in_list = { - list = personally_held_counties_list - add = 1 - } - # Cap it out at the max for the event. - max = 3 -} - -raise_stele_variant_ancestor_value = { - value = 0 - - # Weight up for stele-celebrating culture. - if = { - limit = { fp1_can_raise_stele_title_scope_trigger = yes } - add = 25 - } - # Weight up for low popular opinion. - add = { - value = this.county_opinion - multiply = -1 - } - # Weight down for existing stele. - if = { - limit = { exists = this.var:stele_slot_occupied } - add = -100 - } -} - -raise_stele_variant_conquest_value = { - value = 0 - - # Weight up for stele-celebrating culture. - if = { - limit = { fp1_can_raise_stele_title_scope_trigger = yes } - add = 25 - } - # Weight up for low control. - add = { - value = 100 - subtract = this.county_control - } - # Weight down for existing stele. - if = { - limit = { exists = this.var:stele_slot_occupied } - add = -100 - } -} - -raise_stele_variant_promotion_value = { - value = 0 - - # Weight up for stele-celebrating culture. - if = { - limit = { fp1_can_raise_stele_title_scope_trigger = yes } - add = 25 - } - # Weight up for development. - add = this.development_level - # Weight down for existing stele. - if = { - limit = { exists = this.var:stele_slot_occupied } - add = -100 - } -} - -fp1_stele_duration_value = { - value = 50 - - # Tone the power down for promotion stelae, as they're quite powerful. - if = { - limit = { scope:stele_type = flag:promotion } - add = -30 - } -} - -fp1_stele_desc_normal_weight_value = 1 - -fp1_stele_desc_upweight_weight_value = 5 - -fp1_stele_desc_heavy_upweight_weight_value = 50 - -fp1_stele_desc_always_upweight_weight_value = 10000 - - -################################################## -# Adventurer System - -scandinavian_adventurer_priority_value = { - value = 0 - - # Weight up preferred adventurers. - if = { - limit = { has_character_flag = prioritised_scandinavian_adventurer } - add = 1000 - } - #Add martial score directly - add = martial - #Add prowess score directly - add = prowess - #Add reduced diplomacy score - add = { - value = diplomacy - multiply = 0.5 - } - #Add reduced intrigue score - add = { - value = intrigue - multiply = 0.5 - } - #Weight up for prestige level - add = { - value = prestige_level - multiply = 10 - } - #+++Ambitious - if = { - limit = { has_trait = ambitious } - add = 15 - } - #+++Viking - if = { - limit = { has_trait = viking } - add = 15 - } - #++Strategist - if = { - limit = { has_trait = strategist } - add = 10 - } - #++Brave - if = { - limit = { has_trait = brave } - add = 10 - } - #++Stubborn - if = { - limit = { has_trait = stubborn } - add = 10 - } - #++Varangian - if = { - limit = { has_trait = varangian } - add = 10 - } - #+Any blademaster - if = { - limit = { has_trait = lifestyle_blademaster } - add = 5 - } - #+Diligent - if = { - limit = { has_trait = diligent } - add = 5 - } - #+Wrathful - if = { - limit = { has_trait = wrathful } - add = 5 - } - #+Impatient - if = { - limit = { has_trait = impatient } - add = 5 - } - #+Arrogant - if = { - limit = { has_trait = arrogant } - add = 5 - } - #+Vengeful - if = { - limit = { has_trait = vengeful } - add = 5 - } - #+Berserker - if = { - limit = { has_trait = berserker } - add = 5 - } - #+Shieldmaiden - if = { - limit = { has_trait = shieldmaiden } - add = 5 - } - #-Forgiving - if = { - limit = { has_trait = forgiving } - add = -5 - } - #-Humble - if = { - limit = { has_trait = humble } - add = -5 - } - #-Patient - if = { - limit = { has_trait = patient } - add = -5 - } - #-Calm - if = { - limit = { has_trait = calm } - add = -5 - } - #-Lazy - if = { - limit = { has_trait = lazy } - add = -5 - } - #--Craven - if = { - limit = { has_trait = craven } - add = -10 - } - #---Content - if = { - limit = { has_trait = content } - add = -15 - } - #Weight down heavily for pacifist faith. - if = { - limit = { - faith = { has_doctrine_parameter = pacifist_opinion_active } - } - add = -30 - } - #Weight up substantially if they have a (potential) relationship with a player. - if = { - limit = { - OR = { - any_relation = { type = soulmate this = { is_ai = no } } - any_relation = { type = best_friend this = { is_ai = no } } - any_relation = { type = nemesis this = { is_ai = no } } - } - } - add = 300 - } - else_if = { - limit = { - OR = { - any_relation = { type = lover this = { is_ai = no } } - any_relation = { type = friend this = { is_ai = no } } - any_relation = { type = rival this = { is_ai = no } } - } - } - add = 200 - } - else_if = { - limit = { - OR = { - any_relation = { type = potential_lover this = { is_ai = no } } - any_relation = { type = potential_friend this = { is_ai = no } } - any_relation = { type = potential_rival this = { is_ai = no } } - } - } - add = 100 - } -} - -scandinavian_adventurer_target_title_priority_value = { - value = 0 - #Mark up larger sub-realms - add = { - value = 5 - multiply = holder.domain_size - } - #Mark up coastal counties. - if = { - limit = { is_coastal_county = yes } - add = 10 - } - #Mark up potential rivals & rivals. - if = { - limit = { - holder = { - any_relation = { - type = potential_rival - this = scope:scandi_adventurer - } - } - } - add = 25 - } - if = { - limit = { - scope:scandi_adventurer = { - any_relation = { - type = rival - this = scope:scandi_adventurer - } - } - } - add = 50 - } - #Mark down potential friends & friends. - if = { - limit = { - scope:scandi_adventurer = { - any_relation = { - type = potential_friend - this = scope:scandi_adventurer - } - } - } - add = -25 - } - if = { - limit = { - scope:scandi_adventurer = { - any_relation = { - type = friend - this = scope:scandi_adventurer - } - } - } - add = -50 - } - #Mark down potential lovers & lovers. - if = { - limit = { - scope:scandi_adventurer = { - any_relation = { - type = potential_lover - this = scope:scandi_adventurer - } - } - } - add = -25 - } - if = { - limit = { - scope:scandi_adventurer = { - any_relation = { - type = lover - this = scope:scandi_adventurer - } - } - } - add = -50 - } - #Mark up Northern Germanic culture group counties. - if = { - limit = { culture = { has_cultural_pillar = heritage_north_germanic } } - add = 20 - } - #Mark up farmland, as it's good terrain. - if = { - limit = { - title_province = { terrain = farmlands } - } - add = 15 - } - #Mark up plains, as it's not bad terrain. - if = { - limit = { - title_province = { terrain = plains } - } - add = 10 - } - #Mark up wetlands, as it beats forests & taiga. - if = { - limit = { - title_province = { terrain = wetlands} - } - add = 5 - } - #Mark down hills, as there who wants to walk uphill? - if = { - limit = { - title_province = { terrain = hills } - } - add = -5 - } - #Non-tribal lands are desirable, since they're richer. - if = { - limit = { - holder = { - NOT = { government_has_flag = government_is_tribal } - } - } - add = 10 - } - #Mark down players a little more, since we don't want them to be constantly fending off pagans unless they've got the juciest lands around. - if = { - limit = { - holder = { is_ai = no } - } - add = -20 - } - #Mark down if holder has same faith. - if = { - limit = { holder.faith = scope:scandi_adventurer.faith } - add = -20 - } -} - -scandinavian_adventurer_fp1_0041_gold_value = { value = massive_gold_value } - -scandinavian_adventurer_efficacy_loan_value = 500 - -################################################## -# Yearlies - -fp1_funeral_longship_preferred_mourner_value = { - value = 0 - - # Weight up the player heir dramatically. - if = { - limit = { - exists = root.player_heir - this = root.player_heir - } - add = 100 - } - # Soulmates get a boost. - if = { - limit = { - any_relation = { - type = soulmate - this = root - } - } - add = 75 - } - # Best friends get a similar boost. - if = { - limit = { - any_relation = { - type = best_friend - this = root - } - } - add = 60 - } - # Close family get a minor boost. - if = { - limit = { is_close_family_of = root } - add = 25 - } - - # Players get a generic boost regardless. - if = { - limit = { is_ai = no } - add = 50 - } -} - -fp1_best_available_riddler_value = { - value = 0 - - # Wordy characters first and foremost. - add = learning - add = diplomacy - # Weight up a little for wordsy trait-havers. - if = { - limit = { has_trait = journaller } - add = 5 - } - if = { - limit = { has_trait = scholar } - add = 5 - } - if = { - limit = { has_trait = theologian } - add = 5 - } - if = { - limit = { has_trait = architect } - add = 5 - } -} - -fp1_0091_standard_ship_gold_cost = { value = major_gold_value } - -fp1_0111_sorcerer_intrigue_high = very_high_skill_rating -fp1_0111_sorcerer_learning_high = very_high_skill_rating -fp1_0111_sorcerer_intrigue_low = mediocre_skill_rating -fp1_0111_sorcerer_learning_low = mediocre_skill_rating - -################################################## -# Wars - -varangian_adventurers_standard_levy_cap_value = 2000 - -varangian_adventurers_bonus_levies_value = { - value = 0 - - # Add troops for each appropriate county. - every_sub_realm_county = { - limit = { - title_province = { geographical_region = dlc_fp1_region_core_mainland_scandinavia } - culture = scope:attacker.culture - faith = scope:attacker.faith - } - add = 1 - } - - max = { - # Standard base max. - value = varangian_adventurers_standard_levy_cap_value - } -} - -varangian_adventurer_cb_cost = { - add = { value = 1000 desc = "CB_BASE_COST" } - - if = { - limit = { - scope:attacker = { has_variable = va_cb_tally } - } - multiply = scope:attacker.var:va_cb_tally - desc = "PREVIOUS_VARANGIAN_ADVENTURES_COST" - } - - # Reduce the cost to make this more feasible for the AI. - scope:attacker = { - if = { - limit = { is_ai = yes } - multiply = -0.75 - } - } -} - -varangian_adventures_bounty_amount_value = { - # Base value for the minimum pot. - value = 200 - - # Add another 100g for non-tribals, since they're generally in harder spots. - if = { - limit = { - scope:defender = { - NOT = { government_has_flag = government_is_tribal } - } - } - add = 100 - } - # *Another* 100g per rank of scope:defender over ducal. - if = { - limit = { - scope:defender = { highest_held_title_tier >= tier_kingdom } - } - add = 100 - } - if = { - limit = { - scope:defender = { highest_held_title_tier >= tier_empire } - } - add = 100 - } -} - -varangian_adventure_ai_targeting_value = { - value = 100 - scope:attacker = { - # Weight up independent dukes. - if = { - limit = { - scope:defender = { highest_held_title_tier = tier_duchy} - } - add = 100 - } - # 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 - } - } -} - -################################################## -# Shieldmaidens - -shieldmaiden_veterancy_cap = 20 - -################################################## -# Laws - -authority_cooldown_breaker_value = { - value = 0 - - # Tribals get a slightly milder penalty, as their base cost is already high. - if = { - limit = { government_has_flag = government_is_tribal } - add = 4 - } - # Everyone else gets the standard multiplier. - else = { add = 5 } -} - -################################################## -# Trade Events - -fp1_trade_events_eligible_settlement_value = { - value = 0 - - # Add fort level multiplied by 1000. - if = { - limit = { - scope:barony.title_province = { fort_level = 1 } - } - add = 1000 - } - if = { - limit = { - scope:barony.title_province = { fort_level = 2 } - } - add = 2000 - } - if = { - limit = { - scope:barony.title_province = { fort_level = 3 } - } - add = 3000 - } - if = { - limit = { - scope:barony.title_province = { fort_level = 4 } - } - add = 4000 - } - if = { - limit = { - scope:barony.title_province = { fort_level = 5 } - } - add = 5000 - } - if = { - limit = { - scope:barony.title_province = { fort_level = 6 } - } - add = 6000 - } - if = { - limit = { - scope:barony.title_province = { fort_level = 7 } - } - add = 7000 - } - if = { - limit = { - scope:barony.title_province = { fort_level = 8 } - } - add = 8000 - } - if = { - limit = { - scope:barony.title_province = { fort_level = 9 } - } - add = 9000 - } - if = { - limit = { - scope:barony.title_province = { fort_level >= 10 } - } - add = 10000 - } - # Subtract 500 to give room for error. - add = -500 -} - -fp1_trade_events_cash_settlement_value = { - value = 0 - - # Every point of development is worth 1g extra. - add = scope:county.development_level - - # Keeping to a sensible minimum & a balanced maximum. - min = 10 - max = 50 -} - -fp1_trade_events_truce_length_value = 3650 - -fp1_trade_events_truce_renewal_date_value = { - value = fp1_trade_events_truce_length_value - - add = -30 -} - -################################################## -# Jomsvikings - -fp1_jomsvikings_coup_priority_value = { - value = 0 - - # Weight up the Jomsvikings historical home, Walin. - if = { - limit = { this = title:c_kolobrzeg } - add = 1000 - } - # Weight up OCMs. - if = { - limit = { - holder = { - any_held_title = { - tier = tier_county - count = 1 - } - NOT = { - any_vassal = { highest_held_title_tier >= tier_county } - } - } - } - add = 100 - } - # Weight up holders who have poor martial. - add = { - value = 50 - subtract = holder.martial - } - # Weight down larger realms. - if = { - limit = { - holder = { realm_size >= minor_realm_size } - } - add = -20 - } - if = { - limit = { - holder = { realm_size >= medium_realm_size } - } - add = -20 - } - if = { - limit = { - holder = { realm_size >= major_realm_size } - } - add = -20 - } - if = { - limit = { - holder = { realm_size >= massive_realm_size } - } - add = -20 - } -} - -fp1_jomvsvikings_raid_value = { - value = 0 - - # Weight up for development. - add = development_level - # Weight up high control. - add = county_control - # Weight up for coastal counties. - if = { - limit = { is_coastal_county = yes } - add = 50 - } - # Weight down for fort level. - if = { - limit = { - title_province = { fort_level >= 2 } - } - add = -25 - } - if = { - limit = { - title_province = { fort_level >= 3 } - } - add = -25 - } - if = { - limit = { - title_province = { fort_level >= 4 } - } - add = -25 - } - if = { - limit = { - title_province = { fort_level >= 5 } - } - add = -25 - } - if = { - limit = { - title_province = { fort_level >= 6 } - } - add = -25 - } - # Weight down for capital. - if = { - limit = { this = root.capital_county } - add = -200 - } -} - -number_of_huscarls = { - value = 50 - multiply = { - value = scope:recruiting_character.primary_title.tier - add = -1 - } -} - -number_of_bondi = { - value = 100 - multiply = { - value = scope:recruiting_character.primary_title.tier - add = -1 - } -} - -huscarls_gold_value = { - value = monthly_character_income - multiply = 24 - min = 30 - max = 225 - - #Rounds up to the closest number divisible by 5 - divide = 5 - ceiling = yes - multiply = 5 -} - -bondi_gold_value = { - value = monthly_character_income - multiply = 12 - min = 15 - max = 125 - - #Rounds up to the closest number divisible by 5 - divide = 5 - ceiling = yes - multiply = 5 -} diff --git a/N3OW/common/script_values/01_dynamic_values.txt b/N3OW/common/script_values/01_dynamic_values.txt deleted file mode 100644 index 7634c263..00000000 --- a/N3OW/common/script_values/01_dynamic_values.txt +++ /dev/null @@ -1,1855 +0,0 @@ - -# 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 = { government_has_flag = government_is_nomadic } # Nomads - 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 = { government_has_flag = government_is_nomadic } # Nomads - 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 = { government_has_flag = government_is_nomadic } # Nomads - 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 - } - if = { - limit = { - scope:actor = { - is_ai = yes - } - OR = { - has_game_rule = hard_difficulty - has_game_rule = very_hard_difficulty - } - } - multiply = 0 - } -} - -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 = 3 - min = 100 -} - -steward_increase_development_value = { - value = yearly_character_income - multiply = 2 - min = 50 -} - -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/N3OW/common/script_values/01_starting_values.txt b/N3OW/common/script_values/01_starting_values.txt deleted file mode 100644 index bcdf68fe..00000000 --- a/N3OW/common/script_values/01_starting_values.txt +++ /dev/null @@ -1,403 +0,0 @@ - - -starting_prestige = { - value = { - # Longer-lived characters start with some inherent prestige. - add = { - value = medium_prestige_value - multiply = { - value = 0 - - # Bonus for older characters (who have presumably accomplished more). - if = { - limit = { age > 12} - add = 1 - } - else_if = { - limit = { age > 24} - add = 2 - } - else_if = { - limit = { age > 36} - add = 3 - } - else_if = { - limit = { age > 48} - add = 4 - } - else_if = { - limit = { age > 60} - add = 5 - } - - # Bonus/penalty for traits. - if = { - limit = { - OR = { - has_trait = arrogant - has_trait = ambitious - } - } - add = 1 - } - else_if = { - limit = { - OR = { - has_trait = humble - has_trait = content - } - } - add = -1 - } - - # Humble/content children shouldn't have a prestige penalty! - min = 0 - } - } - - # Rulers also gain bonus prestige based on their tier. - add = { - value = medium_prestige_value - multiply = highest_held_title_tier - } - } -} - -starting_piety = { - value = { - # All characters start with some about of piety based on how long they have lived a virtuous life. - add = { - value = medium_piety_value - multiply = { - add = num_virtuous_traits - subtract = num_sinful_traits - if = { - limit = { has_trait = zealous } - add = 1 - } - else_if = { - limit = { has_trait = cynical } - add = -1 - } - } - multiply = { - value = 0 - if = { - limit = { age > 12} - add = 1 - } - else_if = { - limit = { age > 24} - add = 2 - } - else_if = { - limit = { age > 36} - add = 3 - } - else_if = { - limit = { age > 48} - add = 4 - } - else_if = { - limit = { age > 60} - add = 5 - } - } - } - - # Rulers also gain some Piety based on tier (but less than piety than prestige). - add = { - value = minor_piety_value - multiply = highest_held_title_tier - } - - # Nobody starts with negative piety, not even even sinful characters. - min = minor_piety_value - } -} - -starting_influence = { - value = { - # Longer-lived characters start with some inherent influence. - add = { - value = medium_influence_value - multiply = { - value = 0 - - # Bonus for older characters (who have presumably had time to establish themselves more). - if = { - limit = { age > 12} - add = 1 - } - else_if = { - limit = { age > 24} - add = 2 - } - else_if = { - limit = { age > 36} - add = 3 - } - else_if = { - limit = { age > 48} - add = 4 - } - else_if = { - limit = { age > 60} - add = 5 - } - - # Bonus/penalty for traits. - if = { - limit = { - OR = { - has_trait = generous - has_trait = deceitful - } - } - add = 1 - } - else_if = { - limit = { - OR = { - has_trait = impatient - has_trait = trusting - } - } - add = -1 - } - - # Children who are impatient/trusting children shouldn't start with negative influence! - min = 0 - } - } - - # Rulers also gain bonus prestige based on their tier. - add = { - value = medium_prestige_value - multiply = highest_held_title_tier - } - } -} -# What cultural acceptance should two cultures start with? -# root = culture 1 -# scope:culture = culture 2 -starting_culture_acceptance = { - # Cultures start with the baseline as their default acceptance - value = culture_acceptance_baseline - - # Historical one-time increases to Cultural Acceptance (added on top of the baseline) - # Note: List the cultures in the same order as they appear in script in common\culture\cultures. - if = { - limit = { current_date >= 1060.1.1 } # Changes for the 1066 bookmark - if = { - limit = { # The Ghaznavids have ruled over Afghan land for a few generations - Let's help them keep it - this = culture:afghan - scope:culture = culture:turkish - } - add = 25 - } - if = { - limit = { # The Ghaznavids have ruled over Punjabi land for some time - We don't want them to revolt too quickly - this = culture:punjabi - scope:culture = culture:turkish - } - add = 20 - } - } -} - -# What cultural acceptance should two cultures drift down towards if above? -# root = culture 1 -# scope:culture = culture 2 -# this is calculated late in startup after history setup -culture_acceptance_baseline = { - value = 0 - if = { - limit = { # To stop errors in observe mode - exists = root - exists = scope:culture - - # Set up some scopes we'll need - trigger_if = { - limit = { - culture_number_of_counties > 0 - } - calc_culture_dominant_religion = { save_temporary_scope_as = our_religion } - calc_culture_dominant_faith = { save_temporary_scope_as = our_faith } - } - scope:culture = { - trigger_if = { - limit = { - culture_number_of_counties > 0 - } - calc_culture_dominant_religion = { save_temporary_scope_as = their_religion } - calc_culture_dominant_faith = { save_temporary_scope_as = their_faith } - } - } - } - # Increase base acceptance for sharing the same heritage - if = { - limit = { - has_same_culture_heritage = scope:culture - } - add = { - value = 20 # please update CULTURE_PILLAR_TOOLTIP_HERITAGE_EFFECT if this number changes - desc = ACCEPTANCE_BASELINE_HERITAGE - } - } - # Increase base acceptance for sharing same language - if = { - limit = { - has_same_culture_language = scope:culture - } - add = { - value = 10 # please update CULTURE_PILLAR_TOOLTIP_LANGUAGE_EFFECT if this number changes - desc = ACCEPTANCE_BASELINE_LANGUAGE - } - } - # Increase base acceptance for sharing the same ethos if cultures are present within the same geographical area - if = { - limit = { - has_same_culture_ethos = scope:culture - OR = { - cultures_share_relevant_region_trigger = yes - #In case cultures are bordering each other in two different regions - any_culture_county = { - any_neighboring_county = { - culture = scope:culture - } - } - } - } - add = { - value = 10 - desc = ACCEPTANCE_BASELINE_ETHOS - } - } - # General Faith acceptance modifiers - if = { # Same Religion - limit = { - exists = scope:our_religion - exists = scope:their_religion - scope:our_religion = scope:their_religion - root = { - any_culture_county = { - percent >= 0.5 - religion = scope:our_religion - } - } - scope:culture = { - any_culture_county = { - percent >= 0.5 - religion = scope:our_religion - } - } - } - add = { - value = 5 - desc = ACCEPTANCE_BASELINE_RELIGION - } - } - if = { # Same exact Faith - limit = { - exists = scope:our_faith - exists = scope:their_faith - scope:our_faith = scope:their_faith - root = { - any_culture_county = { - percent >= 0.5 - faith = scope:our_faith - } - } - scope:culture = { - any_culture_county = { - percent >= 0.5 - faith = scope:our_faith - } - } - } - add = { - value = 10 - desc = ACCEPTANCE_BASELINE_FAITH - } - } - if = { # Eastern faiths - limit = { - exists = scope:our_religion - exists = scope:their_religion - scope:our_religion = { - is_in_family = rf_eastern - } - scope:their_religion = { - is_in_family = rf_eastern - } - - any_culture_county = { - percent >= 0.5 - title_province = { - religion = { - is_in_family = rf_eastern - } - } - } - scope:culture = { - any_culture_county = { - percent >= 0.5 - title_province = { - religion = { - is_in_family = rf_eastern - } - } - } - } - } - add = { - value = 5 - desc = ACCEPTANCE_BASELINE_EASTERN_RELIGION - } - } - if = { # Pluralistic close faiths - limit = { - exists = scope:our_faith - exists = scope:their_faith - scope:our_faith = { - has_doctrine = doctrine_pluralism_pluralistic - } - scope:their_faith = { - has_doctrine = doctrine_pluralism_pluralistic - } - any_culture_county = { - percent >= 0.5 - title_province = { - faith = { - has_doctrine = doctrine_pluralism_pluralistic - } - } - } - scope:culture = { - any_culture_county = { - percent >= 0.5 - title_province = { - faith = { - has_doctrine = doctrine_pluralism_pluralistic - } - } - } - } - OR = { - cultures_share_relevant_region_trigger = yes - #In case cultures are bordering each other in two different regions - any_culture_county = { - any_neighboring_county = { - culture = scope:culture - } - } - } - } - add = { - value = 10 - desc = ACCEPTANCE_BASELINE_CLOSE_PLURALISTS - } - } - } -} diff --git a/N3OW/common/script_values/02_dlc_ep1_script_values.txt b/N3OW/common/script_values/02_dlc_ep1_script_values.txt deleted file mode 100644 index fe345157..00000000 --- a/N3OW/common/script_values/02_dlc_ep1_script_values.txt +++ /dev/null @@ -1,84 +0,0 @@ -## Referenced from code, in code value will be clamped between NRoyalCourt::COURT_GRANDEUR_MIN and NRoyalCourt::COURT_GRANDEUR_MAX -## root = character calculating for -#court_grandeur_minimum_expected_value = { -# value = 50 -#} -# -#ep1_court_grandeur_marriage_acceptance_value = 50 -# -## Referenced from code for the multiplier of above/below expected court grandeur level modifiers -#court_grandeur_level_difference_modifier_multiplier = { -# value = sub_realm_size -# multiply = 0.01 -#} - -0_levels_above_expected_level = { - value = court_grandeur_minimum_expected_level -} - -1_levels_above_expected_level = { - value = court_grandeur_minimum_expected_level - add = 1 -} - -2_levels_above_expected_level = { - value = court_grandeur_minimum_expected_level - add = 2 -} - -3_levels_above_expected_level = { - value = court_grandeur_minimum_expected_level - add = 3 -} - -4_levels_above_expected_level = { - value = court_grandeur_minimum_expected_level - add = 4 -} - -5_levels_above_expected_level = { - value = court_grandeur_minimum_expected_level - add = 5 -} - -6_levels_above_expected_level = { - value = court_grandeur_minimum_expected_level - add = 6 -} - -7_levels_above_expected_level = { - value = court_grandeur_minimum_expected_level - add = 7 -} - -9_levels_above_expected_level = { - value = court_grandeur_minimum_expected_level - add = 9 -} - -1_levels_below_expected_level = { - value = court_grandeur_minimum_expected_level - subtract = 1 -} - -3_levels_below_expected_level = { - value = court_grandeur_minimum_expected_level - subtract = 3 -} - -5_levels_below_expected_level = { - value = court_grandeur_minimum_expected_level - subtract = 5 -} - -7_levels_below_expected_level = { - value = court_grandeur_minimum_expected_level - subtract = 7 -} - -9_levels_below_expected_level = { - value = court_grandeur_minimum_expected_level - subtract = 9 -} - -cp_bonus_aptitude_value = 10 diff --git a/N3OW/common/script_values/02_religion_values.txt b/N3OW/common/script_values/02_religion_values.txt index b49944da..318c49f6 100644 --- a/N3OW/common/script_values/02_religion_values.txt +++ b/N3OW/common/script_values/02_religion_values.txt @@ -38,13 +38,13 @@ faith_doctrine_cost_mid = 400 faith_doctrine_cost_high = 600 faith_doctrine_cost_massive = 1000 +faith_tenet_cost_discount_scholar_official_tradition = 0 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_unchanged_tolerance_doctrine_cost_mult = 0 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 @@ -74,6 +74,8 @@ regional_heresy_factor = { meditation_duration = 185 # In days +local_shrine_duration = 14 + faction_county_opinion_astray = { value = county_opinion multiply = -1.0 @@ -377,7 +379,7 @@ claim_piety_value = { # Landless adventurers can't get cheap access to legitimists without putting in some leg-work. if = { limit = { - scope:actor = { is_landless_adventurer = yes } + scope:actor = { has_government = landless_adventurer_government } } multiply = 10 } @@ -2221,7 +2223,7 @@ great_holy_war_target_kingdom_weight = { limit = { title_capital_county = { squared_distance = { - target = title:c_wuluhai + target = title:c_langshan value >= ghw_target_distance_01_threshold } } @@ -2625,7 +2627,7 @@ great_holy_war_target_kingdom_weight = { limit = { title_capital_county = { squared_distance = { - target = title:c_wuluhai + target = title:c_langshan value >= ghw_target_distance_02_threshold } } @@ -3029,7 +3031,7 @@ great_holy_war_target_kingdom_weight = { limit = { title_capital_county = { squared_distance = { - target = title:c_wuluhai + target = title:c_langshan value >= ghw_target_distance_03_threshold } } @@ -3075,6 +3077,8 @@ great_holy_war_target_kingdom_weight = { geographical_region = ghw_region_the_sahel geographical_region = ghw_region_north_african_interior geographical_region = ghw_region_subsahelian_africa + geographical_region = world_steppe + geographical_region = world_asia_north_east } } } @@ -3507,56 +3511,38 @@ faith_conversion_cost_mult = { # 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 } - } - } - } + scope:new_faith = { has_doctrine = special_doctrine_immaterial_harmony } + scope:character.faith = { has_doctrine = special_doctrine_immaterial_harmony } } multiply = { value = 1 add = { - desc = faith_conversion_cost_other_religion_family + desc = faith_conversion_cost_immaterial_harmony format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" - value = 2 + value = -0.5 } } } - if = { + else_if = { limit = { - scope:new_faith = { - religion = { is_in_family = rf_eastern } - } - scope:character = { - faith = { - religion = { - NOT = { is_in_family = rf_eastern } + OR = { + AND = { + scope:new_faith.religion = { is_in_family = rf_abrahamic } + NOT = { + scope:character.faith.religion = { 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_pagan } - } - scope:character = { - faith = { - religion = { NOT = { is_in_family = rf_pagan } } + AND = { + scope:new_faith.religion = { is_in_family = rf_eastern } + NOT = { + scope:character.faith.religion = { is_in_family = rf_eastern } + } + } + AND = { + scope:new_faith.religion = { is_in_family = rf_pagan } + NOT = { + scope:character.faith.religion = { is_in_family = rf_pagan } + } } } } @@ -3574,15 +3560,9 @@ faith_conversion_cost_mult = { if = { limit = { scope:new_faith = { - NOT = { - has_doctrine_parameter = unreformed - } - } - scope:character = { - faith = { - has_doctrine_parameter = unreformed - } + NOT = { has_doctrine_parameter = unreformed } } + scope:character.faith = { has_doctrine_parameter = unreformed } } multiply = { value = 1 @@ -3593,20 +3573,50 @@ faith_conversion_cost_mult = { } } } + + if = { + limit = { + scope:character = { + any_courtier = { + has_character_flag = suzerains_missionary + faith = scope:new_faith + } + } + } + multiply = { + value = 1 + subtract = { + desc = faith_conversion_cost_suzerains_missionary + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.1 + } + } + } # 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:new_faith.religion = { is_in_family = rf_abrahamic } + scope:character.faith.religion = { + is_in_family = rf_abrahamic + this != scope:new_faith.religion } - 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 + } + } + } + else_if = { + limit = { + scope:new_faith.religion = { is_in_family = rf_eastern } + scope:character.faith.religion = { + is_in_family = rf_eastern + this != scope:new_faith.religion } } multiply = { @@ -3620,39 +3630,10 @@ faith_conversion_cost_mult = { } 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} - } - } + scope:new_faith.religion = { is_in_family = rf_pagan } + scope:character.faith.religion = { + is_in_family = rf_pagan + this != scope:new_faith.religion } } multiply = { @@ -3843,18 +3824,13 @@ faith_conversion_cost_mult = { any_realm_province = { faith = scope:new_faith } - AND = { - exists = liege - liege = { - faith = scope:new_faith - } + liege ?= { + faith = scope:new_faith } - AND = { - exists = liege - liege = { - any_vassal = { - faith = scope:new_faith - } + + liege ?= { + any_vassal = { + faith = scope:new_faith } } } @@ -3891,18 +3867,13 @@ faith_conversion_cost_mult = { any_realm_province = { faith = scope:new_faith } - AND = { - exists = liege - liege = { - faith = scope:new_faith - } + liege ?= { + faith = scope:new_faith } - AND = { - exists = liege - liege = { - any_vassal = { - faith = scope:new_faith - } + + liege ?= { + any_vassal = { + faith = scope:new_faith } } } @@ -3939,18 +3910,13 @@ faith_conversion_cost_mult = { any_realm_province = { faith = scope:new_faith } - AND = { - exists = liege - liege = { - faith = scope:new_faith - } + liege ?= { + faith = scope:new_faith } - AND = { - exists = liege - liege = { - any_vassal = { - faith = scope:new_faith - } + + liege ?= { + any_vassal = { + faith = scope:new_faith } } } @@ -3975,7 +3941,7 @@ faith_conversion_cost_mult = { faith = { religion = { is_in_family = rf_abrahamic - NOT = { this = scope:new_faith.religion} + this != scope:new_faith.religion } } OR = { @@ -3988,18 +3954,13 @@ faith_conversion_cost_mult = { any_realm_province = { faith = scope:new_faith } - AND = { - exists = liege - liege = { - faith = scope:new_faith - } + liege ?= { + faith = scope:new_faith } - AND = { - exists = liege - liege = { - any_vassal = { - faith = scope:new_faith - } + + liege ?= { + any_vassal = { + faith = scope:new_faith } } } @@ -4024,7 +3985,7 @@ faith_conversion_cost_mult = { faith = { religion = { is_in_family = rf_eastern - NOT = { this = scope:new_faith.religion} + this != scope:new_faith.religion } } OR = { @@ -4037,18 +3998,13 @@ faith_conversion_cost_mult = { any_realm_province = { faith = scope:new_faith } - AND = { - exists = liege - liege = { - faith = scope:new_faith - } + liege ?= { + faith = scope:new_faith } - AND = { - exists = liege - liege = { - any_vassal = { - faith = scope:new_faith - } + + liege ?= { + any_vassal = { + faith = scope:new_faith } } } @@ -4073,7 +4029,7 @@ faith_conversion_cost_mult = { faith = { religion = { is_in_family = rf_pagan - NOT = { this = scope:new_faith.religion} + this != scope:new_faith.religion } } OR = { @@ -4086,18 +4042,13 @@ faith_conversion_cost_mult = { any_realm_province = { faith = scope:new_faith } - AND = { - exists = liege - liege = { - faith = scope:new_faith - } + liege ?= { + faith = scope:new_faith } - AND = { - exists = liege - liege = { - any_vassal = { - faith = scope:new_faith - } + + liege ?= { + any_vassal = { + faith = scope:new_faith } } } @@ -4125,18 +4076,13 @@ faith_conversion_cost_mult = { any_realm_province = { faith = scope:new_faith } - AND = { - exists = liege - liege = { - faith = scope:new_faith - } + liege ?= { + faith = scope:new_faith } - AND = { - exists = liege - liege = { - any_vassal = { - faith = scope:new_faith - } + + liege ?= { + any_vassal = { + faith = scope:new_faith } } } @@ -4172,6 +4118,87 @@ faith_conversion_cost_mult = { } } + ################################################ + # Conversion Discount from Confucian Education + ################################################ + + if = { + limit = { + scope:new_faith.religion = religion:confucianism_religion + scope:character = { + has_trait = confucian_education + has_trait_xp = { + trait = confucian_education + value >= 20 #Confused Confucian + } + } + } + if = { + limit = { + scope:character = { + has_trait_xp = { + trait = confucian_education + value >= 80 #Moral Paragon + } + } + } + multiply = { + value = 1 + subtract = { + desc = faith_conversion_cost_confucian_education + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.7 + } + } + } + else_if = { + limit = { + scope:character = { + has_trait_xp = { + trait = confucian_education + value >= 60 #Virtuous Ethicist + } + } + } + multiply = { + value = 1 + subtract = { + desc = faith_conversion_cost_confucian_education + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.5 + } + } + } + else_if = { + limit = { + scope:character = { + has_trait_xp = { + trait = confucian_education + value >= 40 #Studious Classicist + } + } + } + multiply = { + value = 1 + subtract = { + desc = faith_conversion_cost_confucian_education + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.25 + } + } + } + else = { + multiply = { + value = 1 + subtract = { + desc = faith_conversion_cost_confucian_education + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.1 + } + } + } + } + ######################################## # Conversion Discounts from Traditions # ######################################## @@ -4236,6 +4263,38 @@ faith_conversion_cost_mult = { } } } + if = { + limit = { + scope:character = { + has_variable = japan_1010_discount + } + scope:new_faith = var:japan_1010_discount + } + multiply = { + value = 1 + subtract = { + desc = faith_conversion_cost_tgp_japan_1010_event + format = "BREAKDOWN_FORMAT_PIETY_PERCENTAGE_POSITIVE_IS_BAD" + value = 0.5 + } + } + } + if = { + limit = { + scope:character = { + has_character_flag = tgp_japan_1040_discount + } + scope:new_faith.religion = religion:shintoism_religion + } + multiply = { + value = 1 + subtract = { + desc = faith_conversion_cost_tgp_japan_1040_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 = { @@ -4561,6 +4620,7 @@ holy_site_reform_tracker_value = { OR = { is_holy_site_controlled_by = root root.confederation ?= { + is_house_based = no # any_confederation_member is not performant for house blocs any_confederation_member = { scope:current_holy_site = { is_holy_site_controlled_by = prev diff --git a/N3OW/common/script_values/02_ruler_designer_values.txt b/N3OW/common/script_values/02_ruler_designer_values.txt deleted file mode 100644 index 00953d98..00000000 --- a/N3OW/common/script_values/02_ruler_designer_values.txt +++ /dev/null @@ -1,123 +0,0 @@ -ruler_designer_general_skill_value_cost = { - value = 0 - if = { - limit = { - scope:value > 0 - scope:value < 5 - } - add = 2 - multiply = scope:value - } - else_if = { - limit = { - scope:value > 4 - scope:value < 9 - } - add = 4 - multiply = { - value = scope:value - subtract = 4 - } - add = 8 - } - else_if = { - limit = { - scope:value > 8 - scope:value < 13 - } - add = 7 - multiply = { - value = scope:value - subtract = 8 - } - add = 24 - } - else_if = { - limit = { - scope:value > 12 - scope:value < 17 - } - add = 11 - multiply = { - value = scope:value - subtract = 12 - } - add = 52 - } - else_if = { - limit = { - scope:value > 16 - } - add = 17 - multiply = { - value = scope:value - subtract = 16 - } - add = 96 - } -} - -ruler_designer_diplomacy_skill_value_cost = { value = ruler_designer_general_skill_value_cost } -ruler_designer_martial_skill_value_cost = { value = ruler_designer_general_skill_value_cost } -ruler_designer_stewardship_skill_value_cost = { value = ruler_designer_general_skill_value_cost } -ruler_designer_intrigue_skill_value_cost = { value = ruler_designer_general_skill_value_cost } -ruler_designer_learning_skill_value_cost = { value = ruler_designer_general_skill_value_cost } - -ruler_designer_prowess_skill_value_cost = { - value = 0 - if = { - limit = { - scope:value > 0 - scope:value < 5 - } - add = 1 - multiply = scope:value - } - else_if = { - limit = { - scope:value > 4 - scope:value < 9 - } - add = 2 - multiply = { - value = scope:value - subtract = 4 - } - add = 4 - } - else_if = { - limit = { - scope:value > 8 - scope:value < 13 - } - add = 4 - multiply = { - value = scope:value - subtract = 8 - } - add = 12 - } - else_if = { - limit = { - scope:value > 12 - scope:value < 17 - } - add = 7 - multiply = { - value = scope:value - subtract = 12 - } - add = 28 - } - else_if = { - limit = { - scope:value > 16 - } - add = 11 - multiply = { - value = scope:value - subtract = 16 - } - add = 56 - } -} diff --git a/N3OW/common/script_values/02_vassal_values.txt b/N3OW/common/script_values/02_vassal_values.txt deleted file mode 100644 index f73fafc2..00000000 --- a/N3OW/common/script_values/02_vassal_values.txt +++ /dev/null @@ -1,355 +0,0 @@ -#Needs to be loaded after - -################ -# Stop War attacker chance calculation -################ - -stop_war_diplomacy_modifier = { - value = diplomacy - multiply = 5 -} - -stop_war_relation_penalties = { - # Opinion Penalties - if = { - limit = { - opinion = { - target = scope:actor - value < -49 - } - } - add = -50 - } - else_if = { - limit = { - opinion = { - target = scope:actor - value < 0 - } - } - add = -25 - } - - # Relationship Penalty - if = { - limit = { - has_relation_rival = scope:actor - } - add = -100 - } -} - -stop_war_relation_bonuses = { - # Opinion Bonuses - if = { - limit = { - opinion = { - target = scope:actor - value >= 50 - } - } - add = 50 - } - else_if = { - limit = { - opinion = { - target = scope:actor - value > 0 - } - } - add = 25 - } - - # Relationship Bonus - if = { - limit = { - has_relation_friend = scope:actor - } - add = 25 - } -} - -#Calculated in scope:recipient -stop_war_attacker_likelihood_calculation = { - if = { - # Cowed characters always accept. - limit = { - has_dread_level_towards = { - target = scope:actor - level = 2 - } - } - value = 100 - } - else = { - # Calculate chance of character accepting. - # Penalties are added first, which then get reduced by Intimidation (if applicable). - # Then bonuses are added, and finally circumstantial modifiers. - - ################### - # Negative Values # - ################### - subtract = stop_war_diplomacy_modifier - add = stop_war_relation_penalties - - # Trait Penalties - if = { - limit = { - has_trait = stubborn - } - add = -50 - } - if = { - limit = { - has_trait = ambitious - } - add = -30 - } - if = { - limit = { - has_trait = disloyal - } - add = -25 - } - - ######################### - # Indimidation Modifier # - ######################### - if = { - limit = { - has_dread_level_towards = { - target = scope:actor - level = 1 - } - } - multiply = 0.5 # Reduces all current penalties by 50% - } - - ################### - # Positive Values # - ################### - - # Liege's Diplomacy - add = scope:actor.stop_war_diplomacy_modifier - add = stop_war_relation_bonuses - - # Traits - if = { - limit = { - has_trait = fickle - } - add = 30 - } - if = { - limit = { - has_trait = loyal - } - add = 50 - } - - ####################### - # Other Circumstances # - ####################### - - # Warscore - if = { - limit = { - exists = scope:target - } - subtract = scope:target.attacker_war_score - } - - # Admin - if = { - limit = { - is_governor = yes - } - add = 50 - if = { - limit = { - scope:target = { has_realm_law = imperial_bureaucracy_3 } - } - add = 30 - } - else_if = { - limit = { - scope:target = { has_realm_law = imperial_bureaucracy_2 } - } - add = 20 - } - else_if = { - limit = { - scope:target = { has_realm_law = imperial_bureaucracy_1 } - } - add = 10 - } - } - - #TODO: Strong claim/Weak claim difference - - #TODO: Laws - - min = 5 - max = 95 - } -} - -stop_war_defender_likelihood_calculation = { - if = { - # Cowed characters always accept. - limit = { - has_dread_level_towards = { - target = scope:actor - level = 2 - } - } - value = 100 - } - else_if = { - #If it's a war over the defender's last county, they won't say yes. - if = { - limit = { - exists = scope:target - any_held_title = { - count = 1 - tier = tier_county - always = yes - save_temporary_scope_as = last_county_title - } - scope:target.casus_belli = { - any_target_title = { - this = scope:last_county_title - } - } - } - value = 0 - } - } - else = { - # Calculate chance of character accepting. - # Penalties are added first, which then get reduced by Intimidation (if applicable). - # Then bonuses are added, and finally circumstantial modifiers. - - ################### - # Negative Values # - ################### - subtract = stop_war_diplomacy_modifier - add = stop_war_relation_penalties - - # Traits - if = { - limit = { - has_trait = arrogant - } - add = -50 - } - if = { - limit = { - has_trait = ambitious - } - add = -30 - } - if = { - limit = { - has_trait = disloyal - } - add = -25 - } - if = { - limit = { - has_trait = greedy - } - add = -20 - } - - ######################### - # Intimidation Modifier # - ######################### - if = { - limit = { - has_dread_level_towards = { - target = scope:actor - level = 1 - } - } - multiply = 0.75 # Reduces all current penalties by 25% (Intentionally less than the 50% reduction for attackers, because defenders have more to lose). - } - - ################### - # Positive Values # - ################### - - # Liege's Diplomacy - add = scope:actor.stop_war_diplomacy_modifier - add = stop_war_relation_bonuses - - # Traits - if = { - limit = { - has_trait = humble - } - add = 20 - } - if = { - limit = { - has_trait = loyal - } - add = 50 - } - - ####################### - # Other Circumstances # - ####################### - - # Warscore - if = { - limit = { - exists = scope:target - } - subtract = scope:target.defender_war_score - } - - # Admin - if = { - limit = { - is_governor = yes - } - add = 50 - if = { - limit = { - scope:target = { has_realm_law = imperial_bureaucracy_3 } - } - add = 30 - } - else_if = { - limit = { - scope:target = { has_realm_law = imperial_bureaucracy_2 } - } - add = 20 - } - else_if = { - limit = { - scope:target = { has_realm_law = imperial_bureaucracy_1 } - } - add = 10 - } - } - - #TODO: Strong claim/Weak claim difference - - #TODO: Laws - - min = 1 - max = 95 - } -} - -stop_war_attacker_bribe_size = { - value = medium_gold_value - multiply = 2 -} - -stop_war_defender_bribe_size = { - value = medium_gold_value - multiply = 4 -} \ No newline at end of file diff --git a/N3OW/common/script_values/03_dlc_fp2_script_values.txt b/N3OW/common/script_values/03_dlc_fp2_script_values.txt deleted file mode 100644 index d77a76c8..00000000 --- a/N3OW/common/script_values/03_dlc_fp2_script_values.txt +++ /dev/null @@ -1,1181 +0,0 @@ - -################################################## -# 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 - - #Guess you don't have a monthly income, most of the time - if = { - limit = { - scope:actor = { - monthly_character_income <= 0 - is_landless_adventurer = yes - } - } - if = { - limit = { scope:actor.gold > scope:recipient.gold } - add = scope:recipient.monthly_character_income - multiply = 9 - } - else = { add = scope:actor.gold } - } - else = { - # 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 - } - if = { # double the cost if you're just buying off a nomad without any prerequisites - limit = { fp2_purchase_truce_interaction_soft_requirements_trigger = no } - multiply = 2 - } -} - -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 - } - if = { # double the cost if you're just buying off a nomad without any prerequisites - limit = { fp2_purchase_truce_interaction_soft_requirements_trigger = no } - multiply = 2 - } -} - -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 - } - if = { # double the cost if you're just buying off a nomad without any prerequisites - limit = { fp2_purchase_truce_interaction_soft_requirements_trigger = no } - multiply = 2 - } -} diff --git a/N3OW/common/script_values/04_ep2_accolade_values.txt b/N3OW/common/script_values/04_ep2_accolade_values.txt deleted file mode 100644 index 71e6aaf0..00000000 --- a/N3OW/common/script_values/04_ep2_accolade_values.txt +++ /dev/null @@ -1,209 +0,0 @@ -####################################### -# KNIGHTLY ACCOLADE VALUES -####################################### - -accolade_low_value = 5 -accolade_medium_value = 10 -accolade_high_value = 20 - -accolade_prowess_requirement_value = 8 -accolade_prowess_requirement_high_value = 15 - -accolade_opinion_multiplier_value = { - value = 0 - ## Below the minimum opinion, we don't want to factor them in at all. - if = { - limit = { - reverse_opinion = { - target = scope:owner - value < -25 - } - } - # Here, we do nothing. Zero is the desired multiplier. - } - ## Below the recommended opinion, we like them less. - else_if = { - limit = { - reverse_opinion = { - target = scope:owner - value < 10 - } - } - add = 0.5 - } - ## Above the nepotistic opinion, we prioritise their wants more heavily. - else_if = { - limit = { - reverse_opinion = { - target = scope:owner - value >= 90 - } - } - add = 2 - } - ## Or else they're in the default range, so x1 is good enough. - else = { add = 1 } -} - -accolade_uninteresting_base_value = 0 -accolade_standard_base_value = 200 -accolade_fascinating_base_value = 400 -accolade_must_have_base_value = 800 - -accolade_weighted_up_in_earlier_eras_value = { - value = 0 - culture ?= { - # If we're in the TE, weight this attribute up a bit. - if = { - limit = { - NOT = { has_cultural_era_or_later = culture_era_early_medieval } - } - add = 50 - } - # If we're in the EME, weight this attribute up even further. - if = { - limit = { - NOT = { has_cultural_era_or_later = culture_era_high_medieval } - } - add = 100 - } - } -} - -accolade_weighted_up_in_later_eras_value = { - value = 0 - culture ?= { - # If we're in the HME, weight this attribute up a bit. - if = { - limit = { has_cultural_era_or_later = culture_era_high_medieval } - add = 100 - } - # If we're in the LME, weight this attribute up even further. - if = { - limit = { has_cultural_era_or_later = culture_era_late_medieval } - add = 200 - } - } -} - -maa_accolade_minimum_martial_value = medium_skill_rating - -############### -# COMMON ATTRIBUTES -############### - -accolade_agent_acceptance_chance_bonus = accolade_medium_value -accolade_agent_acceptance_chance_bonus_high = accolade_high_value -accolade_invite_courtiers_value = accolade_high_value -accolade_imprisonment_chance_value = 15 -accolade_imprisonment_chance_value_high = 25 -accolade_wise_educator_prestige = 100 -accolade_wise_educator_prestige_high = 250 -accolade_wise_educator_prowess = 1 -accolade_wise_educator_prowess_high = 3 -accolade_white_peace_prestige_value = major_prestige_value -accolade_seduction_vulnerability_value = 15 -accolade_politicker_join_scheme_value = 25 -accolade_charmer_fertility_value = 0.25 -accolade_charmer_fertility_high_value = 0.5 -accolade_charmer_attraction_opinion_value = accolade_medium_value -accolade_charmer_attraction_opinion_high_value = accolade_high_value -accolade_piety_reduction_value = 0.5 -accolade_piety_reduction_value_high = 0.25 - -############### -# SKILLED ATTRIBUTES -############### - -accolade_scales_of_power_value = -10 -accolade_scales_of_power_value_high = -15 - -accolade_development_growth_on_tournament_completion_value = 50 -accolade_development_level_on_tournament_completion_value = 1 -accolade_county_control_gain_value = medium_county_control_gain - -accolade_contender_trait_xp_low_value = 10 -accolade_contender_trait_xp_medium_value = 15 -accolade_contender_trait_xp_high_value = 20 - -accolade_all_knights_trait_xp_low_value = 5 -accolade_all_knights_trait_xp_high_value = 10 - - -############### -# MAA ATTRIBUTES -############### - -accolade_hostile_knight_death_in_battle_low_value = 0.25 -accolade_hostile_knight_death_in_battle_medium_value = 0.5 -accolade_hostile_knight_death_in_battle_high_value = 0.75 - -accolade_hostile_knight_death_in_battle_actual_low_value = { - value = accolade_hostile_knight_death_in_battle_low_value - add = 1 -} -accolade_hostile_knight_death_in_battle_actual_medium_value = { - value = accolade_hostile_knight_death_in_battle_medium_value - add = 1 -} -accolade_hostile_knight_death_in_battle_actual_high_value = { - value = accolade_hostile_knight_death_in_battle_high_value - add = 1 -} - -############### -# EMINENT ATTRIBUTES -############### - -acclaimed_knight_hunt_danger_value = 10 -acclaimed_knight_hunt_danger_value_high = 15 -accolade_tournament_invite_acceptance_value = 20 -accolade_feast_wedding_invite_acceptance_value = 20 -acclaimed_knight_prestige_from_victory_value = miniscule_prestige_value -acclaimed_knight_prestige_from_victory_value_high = minor_prestige_value - -accolade_defends_family_low_value = -0.25 -accolade_defends_family_medium_value = -0.5 -accolade_defends_family_high_value = -0.75 - -accolade_defends_family_actual_low_value = { - value = accolade_defends_family_low_value - add = 1 -} -accolade_defends_family_actual_medium_value = { - value = accolade_defends_family_medium_value - add = 1 -} -accolade_defends_family_actual_high_value = { - value = accolade_defends_family_high_value - add = 1 -} - -num_accolades_multiplier = { - value = 0 - every_accolade = { - limit = { - is_accolade_active = no - NOT = { exists = accolade_successor } - has_potential_accolade_successors = no - NOT = { - primary_type = { - this = accolade_type:house_knight_attribute - } - } - } - add = 1 - if = { - limit = { - accolade_rank = 3 - } - add = 1 - } - else_if = { - limit = { - accolade_rank > 3 - } - add = 2 - } - } -} diff --git a/N3OW/common/script_values/04_ep2_hunt_values.txt b/N3OW/common/script_values/04_ep2_hunt_values.txt deleted file mode 100644 index a78307f7..00000000 --- a/N3OW/common/script_values/04_ep2_hunt_values.txt +++ /dev/null @@ -1,1826 +0,0 @@ -###################### -# 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 - } - add = { - if = { - limit = { has_building = visegrad_castle_01 } - add = 24 - } - desc = hunt_success_chance.visegrad_castle_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 = { # Daydreaming about Birds - limit = { - involved_activity = { - has_activity_option = { category = special_type option = hunt_type_falconry } - } - has_character_modifier = mpo_daydreaming_birds_modifier - } - add = { - value = 5 - desc = hunt_success_chance.mpo_daydreaming_birds_modifier - } - } - if = { # Le childhood - limit = { has_character_modifier = eagle_hunter_childhood_modifier } - - add = { - value = 5 - desc = hunt_success_chance.eagle_hunter_childhood_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 - } - } - if = { - limit = { - has_court_position = master_of_hunt_court_position - } - add = { - value = 10 - desc = hunt_success_chance.master_of_hunt_holder - } - } - # 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 - } - } - # HUNTING EAGLE - if = { - limit = { - involved_activity = { - has_activity_option = { category = special_type option = hunt_type_falconry } - } - has_available_eagle_trigger = yes - } - add = { - value = 10 - desc = hunt_success_chance.hunting_eagle - } - } - } - # 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 = { # Nomads do not use Attendants option - limit = { - activity_host = { government_has_flag = government_is_nomadic } - } - add = { - value = 2.5 - multiply = hunt_success_chance_roco_amenity_level_value - desc = hunt_success_chance.nomadic - } - } - else_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 = { - NOT = { scope:special_option ?= flag:hunt_type_nerge } - } - 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 - NOT = { scope:special_option ?= flag:hunt_type_nerge } - } - add = { - value = 10 - desc = hunt_success_chance.no_holding - } - } - if = { - limit = { - county.development_level >= terrible_development_level - NOT = { scope:special_option ?= flag:hunt_type_nerge } - } - # 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 - has_building_or_higher = visegrad_castle_01 - } - NOT = { scope:special_option ?= flag:hunt_type_nerge } - } - add = hunt_hunting_grounds_success_value - } - if = { # Logging Camps - limit = { - has_building_or_higher = logging_camps_01 - NOT = { scope:special_option ?= flag:hunt_type_nerge } - } - add = hunt_logging_camps_success_value - } - if = { # Royal Reserves - limit = { - county.title_province ?= { has_building_or_higher = royal_forest_01 } - NOT = { scope:special_option ?= flag:hunt_type_nerge } - } - county.title_province = { add = hunt_royal_reserves_success_value } - } - # MODIFIERS - if = { - limit = { - county ?= { has_county_modifier = hunt_mismanaged_game_modifier } - NOT = { scope:special_option ?= flag:hunt_type_nerge } - } - add = { - value = -5 - desc = hunt_success_chance.hunt_mismanaged_game_modifier - } - } - if = { # Abundant Game - limit = { - county ?= { has_county_modifier = ep3_abundant_game_modifier } - NOT = { scope:special_option ?= flag:hunt_type_nerge } - } - add = { - value = 10 - desc = hunt_success_chance.hunt_abundant_game_modifier - } - } - if = { # Wild Predators - limit = { - county ?= { has_county_modifier = ep3_wild_predators_modifier } - NOT = { scope:special_option ?= flag:hunt_type_nerge } - } - add = { - value = -5 - desc = hunt_success_chance.hunt_wild_predators_modifier - } - } - if = { - limit = { - county ?= { has_county_modifier = hunt_punished_locals_modifier } - NOT = { scope:special_option ?= flag:hunt_type_nerge } - } - add = { - value = 5 - desc = hunt_success_chance.hunt_punished_locals_modifier - } - } - if = { # Inspection Modifiers - limit = { - has_province_modifier = inspection_hidden_hinterlands_recruit_modifier - NOT = { scope:special_option ?= flag:hunt_type_nerge } - } - add = { - value = 10 - desc = hunt_success_chance.hidden_hinterlands_recruit_modifier - } - } - if = { # Inspection Modifiers - limit = { - has_province_modifier = inspection_hidden_hinterlands_hunters_modifier - NOT = { scope:special_option ?= flag:hunt_type_nerge } - } - add = { - value = 10 - desc = hunt_success_chance.hidden_hinterlands_huntsmen_modifier - } - } - # VARIABLES - if = { - limit = { - exists = var:recent_hunt_held - NOT = { scope:special_option ?= flag:hunt_type_nerge } - } - 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 - } - } -} - -### Nerge Outcome Values -# Unimpressive Nerge -unimpressive_nerge_dread_value = -25 - -# Regular Nerge -regular_nerge_dread_value = 10 -regular_nerge_prestige_value = { - value = 100 - multiply = nerge_prestige_multiplier -} -regular_nerge_gold_value = 25 -regular_nerge_legitimacy_value = 10 -regular_nerge_guest_prestige_value = 25 - -# Impressive Nerge -impressive_nerge_dread_value = 30 -impressive_nerge_prestige_value = { - value = 200 - multiply = nerge_prestige_multiplier -} -impressive_nerge_gold_value = 75 -impressive_nerge_legitimacy_value = { - value = great_nerge_legitimacy_value - divide = 2 -} -impressive_nerge_guest_prestige_value = { - value = impressive_nerge_prestige_value - divide = 2 -} - -# Great Nerge -great_nerge_dread_value = 40 -great_nerge_prestige_value = { - value = 250 - multiply = nerge_prestige_multiplier -} -great_nerge_gold_value = 150 -great_nerge_legitimacy_value = { - value = fantastic_nerge_legitimacy_value - divide = 2 -} -great_nerge_guest_prestige_value = { - value = great_nerge_prestige_value - divide = 2 -} - -# Fantastic Nerge -fantastic_nerge_dread_value = 50 -fantastic_nerge_prestige_value = { - value = 350 - multiply = nerge_prestige_multiplier -} -fantastic_nerge_gold_value = 250 -fantastic_nerge_legitimacy_value = 200 -fantastic_nerge_martial_value = 1 -fantastic_nerge_guest_prestige_value = { - value = fantastic_nerge_prestige_value - divide = 2 -} -fantastic_nerge_guest_martial_value = fantastic_nerge_martial_value - -nerge_score_multiplier_value = { - value = 1 - add = { - value = scope:activity.activity_location.county.county_fertility - divide = 200 - } - if = { - limit = { - scope:activity.activity_location.county = { - any_county_situation_sub_region = { - sub_region_current_phase = situation_steppe_sky_blessing_season - } - } - } - add = 0.5 - } - else_if = { - limit = { - scope:activity.activity_location.county = { - any_county_situation_sub_region = { - OR = { - sub_region_current_phase = situation_steppe_warm_nights_season - sub_region_current_phase = situation_steppe_abundant_grazing_season - } - } - } - } - add = 0.25 - } - else_if = { - limit = { - scope:activity.activity_location.county = { - any_county_situation_sub_region = { - OR = { - sub_region_current_phase = situation_steppe_white_zud_season - sub_region_current_phase = situation_steppe_cold_zud_season - } - } - } - } - add = -0.1 - } - else_if = { - limit = { - scope:activity.activity_location.county = { - any_county_situation_sub_region = { - sub_region_current_phase = situation_steppe_severe_drought_season - } - } - } - add = -0.25 - } - else_if = { - limit = { - scope:activity.activity_location.county = { - any_county_situation_sub_region = { - sub_region_current_phase = situation_steppe_havsarsan_zud_season - } - } - } - add = -0.5 - } - if = { - limit = { - scope:activity.activity_host = { has_activity_intent = successful_nerge_intent } - } - add = 0.1 - } - scope:activity = { - every_attending_character = { - if = { - limit = { - NOT = { this = scope:activity.activity_host } - OR = { - has_activity_intent = successful_nerge_intent - has_trait = lifestyle_hunter - martial >= 16 - prowess >= 16 - } - } - add = 0.1 - } - } - activity_host = { - add = { - value = martial - divide = 200 - } - } - } - scope:activity.activity_host = { - switch = { - trigger = has_realm_law - nomadic_authority_5 = { add = 0.25 } - nomadic_authority_4 = { add = 0.2 } - nomadic_authority_3 = { add = 0.1 } - nomadic_authority_2 = { add = 0.05 } - } - } -} - -nerge_prestige_multiplier = { - value = 1 - if = { - limit = { - involved_activity = { - has_activity_option = { - category = hunt_option_party_size - option = hunt_party_size_many - } - } - } - multiply = 1.5 - } - else_if = { - limit = { - involved_activity = { - has_activity_option = { - category = hunt_option_party_size - option = hunt_party_size_normal - } - } - } - multiply = 1.25 - } -} diff --git a/N3OW/common/script_values/04_ep2_tour_values.txt b/N3OW/common/script_values/04_ep2_tour_values.txt deleted file mode 100644 index cd58ae7c..00000000 --- a/N3OW/common/script_values/04_ep2_tour_values.txt +++ /dev/null @@ -1,86 +0,0 @@ -tour_stop_value = { # the cost of adding a tour stop - value = medium_gold_value - if = { - limit = { exists = scope:province } - if = { - limit = { "scope:previous_province.squared_distance(scope:province)" <= squared_distance_small } - multiply = 0.25 - } - if = { - limit = { - "scope:previous_province.squared_distance(scope:province)" > squared_distance_small - "scope:previous_province.squared_distance(scope:province)" <= squared_distance_medium - } - multiply = 0.45 - } - if = { - limit = { - "scope:previous_province.squared_distance(scope:province)" > squared_distance_medium - "scope:previous_province.squared_distance(scope:province)" <= squared_distance_large - } - multiply = 0.65 - } - if = { - limit = { - "scope:previous_province.squared_distance(scope:province)" > squared_distance_large - "scope:previous_province.squared_distance(scope:province)" <= squared_distance_huge - } - multiply = 0.85 - } - if = { - limit = { - "scope:previous_province.squared_distance(scope:province)" > squared_distance_huge - "scope:previous_province.squared_distance(scope:province)" <= squared_distance_almost_massive - } - multiply = 1.05 - } - if = { - limit = { - "scope:previous_province.squared_distance(scope:province)" > squared_distance_almost_massive - "scope:previous_province.squared_distance(scope:province)" <= squared_distance_massive - } - multiply = 1.25 - } - #Klingenberg -> Jerusalem - if = { - limit = { - "scope:previous_province.squared_distance(scope:province)" > squared_distance_massive - "scope:previous_province.squared_distance(scope:province)" <= squared_distance_monstrous - } - multiply = 1.55 - } - #Klingenberg -> Kanchipuram - if = { - limit = { "scope:previous_province.squared_distance(scope:province)" > squared_distance_monstrous } - multiply = 2.05 - } - } - multiply = activity_cost_scale_by_era -} - - -welcome = 3 -neutral = 2 -suspicious = 1 - -tour_entourage_weight_value = { - value = 100 - add = standard_travel_entourage_additions - if = { - limit = { - OR = { - has_trait = gregarious - has_trait = lifestyle_reveler - has_trait = gluttonous - } - } - add = 10 - } - if = { - limit = { - is_close_family_of = scope:host - } - add = 20 - } -} - diff --git a/N3OW/common/script_values/04_ep2_tournament_values.txt b/N3OW/common/script_values/04_ep2_tournament_values.txt deleted file mode 100644 index 1b11cec3..00000000 --- a/N3OW/common/script_values/04_ep2_tournament_values.txt +++ /dev/null @@ -1,2605 +0,0 @@ -###################### -# 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 = lifestyle_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 - if = { - limit = { - is_ai = yes - has_game_rule = hard_difficulty - } - multiply = 0.5 - } - else_if = { - limit = { - is_ai = yes - has_game_rule = very_hard_difficulty - } - multiply = 0.25 - } -} - -tournament_option_bad_cost = { - value = 20 - if = { - limit = { - is_ai = yes - has_game_rule = hard_difficulty - } - multiply = 0.5 - } - else_if = { - limit = { - is_ai = yes - has_game_rule = very_hard_difficulty - } - multiply = 0.25 - } -} - -tournament_option_normal_cost = { - value = 60 - if = { - limit = { - is_ai = yes - has_game_rule = hard_difficulty - } - multiply = 0.5 - } - else_if = { - limit = { - is_ai = yes - has_game_rule = very_hard_difficulty - } - multiply = 0.25 - } -} - -tournament_option_good_cost = { - value = 180 - if = { - limit = { - is_ai = yes - has_game_rule = hard_difficulty - } - multiply = 0.5 - } - else_if = { - limit = { - is_ai = yes - has_game_rule = very_hard_difficulty - } - multiply = 0.25 - } -} - -tournament_option_very_good_cost = { - value = 360 - if = { - limit = { - is_ai = yes - has_game_rule = hard_difficulty - } - multiply = 0.5 - } - else_if = { - limit = { - is_ai = yes - has_game_rule = very_hard_difficulty - } - multiply = 0.25 - } -} - -tournament_option_splendid_cost = { - value = 720 - if = { - limit = { - is_ai = yes - has_game_rule = hard_difficulty - } - multiply = 0.5 - } - else_if = { - limit = { - is_ai = yes - has_game_rule = very_hard_difficulty - } - multiply = 0.25 - } -} - -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/N3OW/common/script_values/04_ep2_wedding_values.txt b/N3OW/common/script_values/04_ep2_wedding_values.txt index 606751fc..8e035f68 100644 --- a/N3OW/common/script_values/04_ep2_wedding_values.txt +++ b/N3OW/common/script_values/04_ep2_wedding_values.txt @@ -7,6 +7,13 @@ } add = true_ruler_value } + # Education 5 boost + if = { + limit = { + has_trait_with_flag = offer_vassalisation_25 + } + add = 25 + } #Events if = { limit = { @@ -14,6 +21,38 @@ } add = 20 } + # Struggles + if = { + limit = { + scope:impress_check = { + has_opinion_modifier = { + modifier = scheme_sway_and_compelled_to_submit_opinion + target = prev + } + } + } + add = 20 + } + #Rekindler of Iran + if = { + limit = { + dynasty ?= { has_dynasty_modifier = fp3_rekindler_of_iran_modifier } + scope:impress_check = { + culture = { has_cultural_pillar = heritage_iranian } + } + } + add = 20 + } + #Obedience + if = { + limit = { + scope:impress_check = { + is_obedient_to = prev + } + } + add = 20 + } + #Cultural Acceptance if = { limit = { @@ -24,6 +63,12 @@ } add = offer_vassalage_acceptance_value } + #Has no Available Vassal Limit + if = { + limit = { vassal_limit_available < 1 } + add = -1000 + } + #Different faith, no pluralism. if = { limit = { @@ -64,9 +109,7 @@ if = { limit = { scope:impress_check = { - NOT = { - faith = root.faith - } + faith != root.faith faith = { has_doctrine = doctrine_pluralism_pluralistic } } NOT = { @@ -103,9 +146,7 @@ if = { limit = { scope:impress_check = { - NOT = { - faith = root.faith - } + faith != root.faith root.faith = { has_doctrine = doctrine_pluralism_pluralistic } faith = { has_doctrine = doctrine_pluralism_pluralistic } } @@ -136,7 +177,7 @@ } } } - #I am a King! + #I am a King! Or Emperor if = { limit = { scope:impress_check = { highest_held_title_tier = tier_kingdom } @@ -166,6 +207,12 @@ } add = -100 } + if = { + limit = { + scope:impress_check.highest_held_title_tier = tier_empire + } + multiply = 1.5 + } } } #We just fought against each other. @@ -213,12 +260,34 @@ } add = -20 } + # I am Nomadic and you are Nomadic + if = { + limit = { + scope:impress_check = { government_has_flag = government_is_nomadic } + government_has_flag = government_is_nomadic + } + add = -50 + } + # I am Nomadic and you are not + if = { + limit = { + scope:impress_check = { government_has_flag = government_is_nomadic } + NOT = { government_has_flag = government_is_nomadic } + } + add = -75 + } + # You are Nomadic and I am not + if = { + limit = { + government_has_flag = government_is_nomadic + scope:impress_check = { government_has_flag = government_is_nomadic } + } + add = -75 + } #Isolationist tradition if = { limit = { - NOT = { - root.culture = scope:impress_check.culture - } + root.culture != scope:impress_check.culture scope:impress_check.culture = { has_cultural_tradition = tradition_isolationist } @@ -244,6 +313,13 @@ } add = 10 } + # Is a Hegemon + if = { + limit = { + highest_held_title_tier = tier_hegemony + } + add = 10 + } # Allied if = { limit = { @@ -270,9 +346,7 @@ scope:impress_check = { NOT = { any_neighboring_top_liege_realm_owner = { - NOT = { - this = root - } + this != root } } NOT = { @@ -297,177 +371,71 @@ } add = -100 } - + #Distant Realm - No Connection if = { limit = { - root = { - number_of_powerful_vassals >= 1 + NOT = { + character_is_realm_neighbor = scope:impress_check + } + scope:impress_check.capital_province = { + squared_distance = { target = prev.capital_province value < 200000 } } } - add = { + add = -250 + } + if = { #Remote Realm. + limit = { + NOT = { + character_is_realm_neighbor = scope:impress_check + } + scope:impress_check.capital_province = { squared_distance = { target = prev.capital_province value >= 200000 } } + } + add = -500 + } + #Military Strength + add = { + value = 1 + subtract = { + value = scope:impress_check.max_military_strength # Intended for recipient to use max, to avoid having vassalizations become too easy for weakened realms + divide = { value = current_military_strength min = 1 } + } + multiply = 20 + ceiling = yes + } + #Vassal Opinion + if = { + limit = { + 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 - } - + every_powerful_vassal = { if = { limit = { - number_of_powerful_vassals > 0 + save_temporary_opinion_value_as = { + name = vassal_opinion + target = prev + } } - divide = number_of_powerful_vassals + add = scope:vassal_opinion } - else = { - divide = 5 + } + + if = { + limit = { + number_of_powerful_vassals > 0 } + divide = number_of_powerful_vassals + } + else = { divide = 5 } - } + + divide = 5 + } } + + #MINOR #Friend modifier. if = { limit = { @@ -690,7 +658,7 @@ limit = { scope:impress_check = { has_dread_level_towards = { - target = root + target = prev level = 2 } } @@ -699,11 +667,9 @@ value = 20 if = { limit = { - root = { - exists = root.dynasty - dynasty = { - has_dynasty_perk = guile_legacy_5 - } + exists = dynasty + dynasty = { + has_dynasty_perk = guile_legacy_5 } } multiply = 2 @@ -711,22 +677,18 @@ } } - if = { + if = { # DIPLOMATIC COURT GRANDEUR BONUS limit = { - root = { - has_royal_court = yes - has_dlc_feature = royal_court - has_court_type = court_diplomatic - court_grandeur_current_level >= 1 - } + 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 + value = 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 - } + court_grandeur_current_level < court_grandeur_minimum_expected_level } multiply = 0.15 } @@ -735,38 +697,111 @@ } } } - # LEGITIMACY + + # INSPECTION BONUSES if = { limit = { - root = { - is_valid_for_legitimacy_change = yes - legitimacy_level != 3 - is_rightful_liege_of = scope:impress_check + scope:impress_check = { + has_variable_list = lesser_inspection_bonus + is_target_in_variable_list = { + name = lesser_inspection_bonus + target = prev + } } } - 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 + add = 5 + } + if = { + limit = { + scope:impress_check = { + has_variable_list = inspection_bonus + is_target_in_variable_list = { + name = inspection_bonus + target = prev + } } } + add = 10 + } + if = { + limit = { + scope:impress_check = { + has_variable_list = inspection_reward + is_target_in_variable_list = { + name = inspection_reward + target = prev + } + } + } + add = 10 + } + if = { + limit = { + has_character_modifier = inspection_reward_focused_vassal_acceptance + } + add = 10 + } + + # LOW LEGITIMACY + if = { + limit = { + has_legitimacy_flag = reduced_vassalization_acceptance + } + add = -25 + } + if = { + limit = { + has_legitimacy_flag = very_reduced_vassalization_acceptance + } + add = -50 + } + if = { + limit = { + has_legitimacy_flag = massively_reduced_vassalization_acceptance + } + add = -75 + } + # HIGH LEGITIMACY + if = { + limit = { + has_legitimacy_flag = increased_vassalization_acceptance + } + add = 25 + } + if = { + limit = { + has_legitimacy_flag = very_increased_vassalization_acceptance + } + add = 50 + } + if = { + limit = { + has_legitimacy_flag = extra_increased_vassalization_acceptance + } + add = 75 + } + + #HISTORICALLY ADMIN PEOPLES WANT TO BE ADMIN + if = { + limit = { + government_has_flag = government_is_administrative + scope:impress_check = { + culture = { + OR = { + this = culture:greek + any_parent_culture_or_above = { + this = culture:greek + } + this = culture:han + any_parent_culture_or_above = { + this = culture:han + } + } + } + } + } + + add = 30 } # AI-only weights, keep the pope from vassalizing too fast @@ -778,6 +813,45 @@ } add = -50 } + + if = { + limit = { + scope:actor = { + has_variable = severed_head_vassalization + var:severed_head_vassalization = { + this = scope:impress_check + } + } + } + add = 200 + desc = COWED_BY_SEVERED_HEAD_MODIFIER + } + + #Mandala Tributaries should not want to be vassals + if = { + limit = { + government_has_flag = government_is_mandala + scope:impress_check = { is_tributary_of = scope:actor } + } + add = -35 + } + + if = { + limit = { + government_has_flag = government_is_mandala + scope:impress_check = { government_has_flag = government_is_mandala } + } + + add = -25 + } + + #Your Radiance + if = { + limit = { + has_unruined_mandala_capital_trigger = yes + } + add = mandala_radiance_value + } } base_wedding_cost = { @@ -1132,7 +1206,7 @@ number_of_current_and_former_spouses = { add = 1 } every_memory = { - limit = { has_memory_type = spouse_died } + memory_type = spouse_died add = 1 } } diff --git a/N3OW/common/script_values/05_bp2_hostage_values.txt b/N3OW/common/script_values/05_bp2_hostage_values.txt deleted file mode 100644 index 2230dfd9..00000000 --- a/N3OW/common/script_values/05_bp2_hostage_values.txt +++ /dev/null @@ -1,928 +0,0 @@ -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 -} - -max_strength_with_allies_value = { - value = max_military_strength - every_ally = { add = max_military_strength } -} - -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/N3OW/common/script_values/06_ce1_epidemics_values.txt b/N3OW/common/script_values/06_ce1_epidemics_values.txt deleted file mode 100644 index 67fd80db..00000000 --- a/N3OW/common/script_values/06_ce1_epidemics_values.txt +++ /dev/null @@ -1,2142 +0,0 @@ -###################### -# 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 - } - if = { - limit = { - OR = { - has_holding_type = herder_holding - has_holding_type = nomad_holding - } - } - add = outbreak_decrease_mult_high - } - - 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 - } - if = { - limit = { - OR = { - has_holding_type = herder_holding - has_holding_type = nomad_holding - } - } - add = outbreak_decrease_mult_high - } - - 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_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 - } - if = { - limit = { - OR = { - has_holding_type = herder_holding - has_holding_type = nomad_holding - } - } - add = spread_decrease_mult_unlikely - } -} - -#### 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 - } -} - -#How badly effected is a county's fertility? -epidemic_fertility_loss_value = { - subtract = scope:base_loss - - scope:epidemic = { - switch = { - trigger = outbreak_intensity - minor = { subtract = 2.5 } - major = { subtract = 5 } - apocalyptic = { subtract = 7.5 } - } - } - - # Fertility - subtract = { - value = county_fertility - multiply = 0.3 - } - - multiply = { - value = 6 - divide = num_county_holdings - } - - multiply = { - value = 50 - 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/N3OW/common/script_values/06_ce1_legends_values.txt b/N3OW/common/script_values/06_ce1_legends_values.txt deleted file mode 100644 index 15b22edf..00000000 --- a/N3OW/common/script_values/06_ce1_legends_values.txt +++ /dev/null @@ -1,1550 +0,0 @@ -###################### -# 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.05 -} - -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 - } - 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 = { - OR = { - has_game_rule = hard_difficulty - has_game_rule = very_hard_difficulty - } - scope:liege = { - is_ai = yes - } - } - multiply = 0 - } -} - -monthly_court_position_task_cost_double = { - value = monthly_court_position_task_cost - multiply = 2 -} - -monthly_court_position_task_cost_triple = { - value = monthly_court_position_task_cost - multiply = 3 -} - -monthly_court_position_task_cost_quadruple = { - value = monthly_court_position_task_cost - multiply = 4 -} - -### 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/N3OW/common/script_values/07_ep3_values.txt b/N3OW/common/script_values/07_ep3_values.txt deleted file mode 100644 index 6f8d71b8..00000000 --- a/N3OW/common/script_values/07_ep3_values.txt +++ /dev/null @@ -1,5625 +0,0 @@ -# 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 - } - } -} - -# Eparch values -eparch_aptitude_modifier_scaling_value = { - value = 1 - if = { - limit = { exists = root } - add = root.aptitude:eparch_court_position - } - desc = MODIFIER_DEFINITION_MAIN_DESC_EPARCH_APTITUDE -} -university_cost_reduction_value = 0.25 -eparch_scheme_secrecy_bonus_value = { - if = { - limit = { - scope:owner = { has_court_position = eparch_court_position } - scope:target = { - domicile ?= { domicile_location = owner.top_liege.capital_province } - } - } - add = { - value = 15 - desc = eparch_scheme_bonus_desc - } - } -} - -# State Faith -ep3_state_faith_conversion_mult_value = 2 - -# Hold Triumph Decision -ep3_triumph_gold_cost = { - value = 100 - if = { - limit = { - NOT = { government_has_flag = government_is_administrative } - } - add = 100 - if = { - limit = { - NOT = { - has_variable = ep3_valid_triumph_victory - } - } - add = 200 - } - } -} - -ep3_triumph_influence_cost = { - value = 0 - if = { - limit = { - government_has_flag = government_is_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_character_trait = { - limit = { - OR = { - has_trait_category = fame - has_trait_category = lifestyle - has_trait_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 = { - has_trait = nomadic_philosophy - } - 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_race_base_cost_value = { - value = 200 -} - -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 - } - } - - # Eparch court position - if = { - limit = { - employs_court_position = eparch_court_position - } - add = { - add = { - value = 1 - court_position:eparch_court_position ?= { - add = aptitude:eparch_court_position - } - multiply = 2 - desc = eparch_increase_efficiency_desc - } - divide = 100 - } - } - else_if = { - limit = { - top_liege ?= { - employs_court_position = eparch_court_position - } - NOT = { has_court_position = eparch_court_position } - domicile ?= { - domicile_location = { - this = county.holder.top_liege.capital_province - } - } - } - add = { - add = { - value = 1 - top_liege ?= { - court_position:eparch_court_position ?= { - add = aptitude:eparch_court_position - } - } - desc = eparch_increase_efficiency_vassal_desc - } - 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 - NOT = { scope:secondary_recipient = scope:target.current_heir } - } - 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 = { - value = 1 # Barons and counts are neutral, so no multiplier needed here. - if = { - limit = { exists = scope:task_contract.task_contract_employer } - # Kings'n'emperors. - if = { - limit = { scope:task_contract.task_contract_employer.highest_held_title_tier >= define:NTaskContract|HIGH_TASK_CONTRACT_TIER } - add = 3 - } - # Dukes. - else_if = { - limit = { scope:task_contract.task_contract_employer.highest_held_title_tier >= define:NTaskContract|MEDIUM_TASK_CONTRACT_TIER } - add = 2 - } - # Courtiers first, as we give them a bit less. - else_if = { - limit = { scope:task_contract.task_contract_employer.highest_held_title_tier <= 0 } - add = 0.5 - ceiling = yes - } - } -} -# 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 = { - value = 1 # Barons and counts are neutral, so no multiplier needed here. - if = { - limit = { exists = scope:task_contract.task_contract_employer } - # Kings'n'emperors. - if = { - limit = { scope:task_contract.task_contract_employer.highest_held_title_tier >= define:NTaskContract|HIGH_TASK_CONTRACT_TIER } - add = 2.5 - } - # Dukes. - else_if = { - limit = { scope:task_contract.task_contract_employer.highest_held_title_tier >= define:NTaskContract|MEDIUM_TASK_CONTRACT_TIER } - add = 1.5 - } - } -} - -# 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 - } - if = { - limit = { - scope:taker ?= { - house = { - has_house_modifier = legacy_adventurer_house_modifier - } - } - } - multiply = 1.15 - } -} -## 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 = { - exists = scope:task_contract.task_contract_taker - 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 = { - exists = scope:task_contract.task_contract_taker - 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. - if = { - limit = { exists = 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 = { - exists = scope:gold_safety_margin - 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 = { exists = scope:task_contract.task_contract_taker } - 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 = { - exists = scope:task_contract.task_contract_employer - 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. - if = { - limit = { exists = 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 = { - exists = scope:gold_safety_margin - 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 = { exists = scope:task_contract.task_contract_taker } - 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 = { exists = scope:task_contract.task_contract_employer } - 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. - if = { - limit = { exists = 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 = { - exists = scope:gold_safety_margin - 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 = { - holder.highest_held_title_tier = tier_barony - NOT = { title_province = 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 = { - limit = { top_liege = scope:target_house.house_head.top_liege } - 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 = { - exists = house - scope:target_house ?= house - } - add = 15 - } - } - desc = house_members_on_council_desc - } - - # Malus for not practicing the state faith - if = { - limit = { - exists = house_head - 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 - house.house_head.top_liege ?= 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 - house.house_head.top_liege ?= 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 - } - if = { - limit = { - scope:laamp_temp ?= { - is_ai = no - has_game_rule = hard_difficulty - } - } - multiply = 0.5 - } - else_if = { - limit = { - scope:laamp_temp ?= { - is_ai = no - has_game_rule = very_hard_difficulty - } - } - multiply = 0.2 - } -} - -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 - } - if = { - limit = { - is_ai = no - has_game_rule = hard_difficulty - } - multiply = 0.5 - } - else_if = { - limit = { - is_ai = no - has_game_rule = very_hard_difficulty - } - multiply = 0.2 - } -} - -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 - } - if = { - limit = { - scope:laamp_temp ?= { - government_has_flag = government_is_nomadic - } - } - multiply = 1.5 - } - if = { - limit = { - scope:laamp_temp ?= { - is_ai = no - has_game_rule = hard_difficulty - } - } - multiply = 0.5 - } - else_if = { - limit = { - scope:laamp_temp ?= { - is_ai = no - has_game_rule = very_hard_difficulty - } - } - multiply = 0.2 - } - if = { - limit = { - trigger_if = { - limit = { exists = scope:laamp_temp } - scope:laamp_temp = { government_has_flag = government_is_nomadic } - } - trigger_else = { always = no } - } - multiply = { - add = scope:laamp_temp.martial - subtract = 8 - divide = 100 - add = 1 - } - } -} - -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 - } - if = { - limit = { - government_has_flag = government_is_nomadic - } - multiply = 1.5 - } - if = { - limit = { - is_ai = no - has_game_rule = hard_difficulty - } - multiply = 0.5 - } - else_if = { - limit = { - is_ai = no - has_game_rule = very_hard_difficulty - } - multiply = 0.2 - } - if = { - limit = { - government_has_flag = government_is_nomadic - } - multiply = { - add = martial - subtract = 8 - divide = 100 - add = 1 - } - } -} - -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/N3OW/common/script_values/08_bp3_values.txt b/N3OW/common/script_values/08_bp3_values.txt deleted file mode 100644 index 5bceacdf..00000000 --- a/N3OW/common/script_values/08_bp3_values.txt +++ /dev/null @@ -1,250 +0,0 @@ -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 = 3000 - 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 -} - -tally_current_followers = { - value = 0 - - every_courtier_or_guest = { - add = 1 - } -} - -tally_roll_of_patrons = { - value = 0 - - every_contact = { - add = 1 - } -} - -camp_pavillion_level = { - value = 0 - - if = { - limit = { - domicile ?= { has_domicile_building_or_higher = camp_main_01 } - } - add = 1 - } - else_if = { - limit = { - domicile ?= { has_domicile_building_or_higher = camp_main_02 } - } - add = 1 - } - else_if = { - limit = { - domicile ?= { has_domicile_building_or_higher = camp_main_03 } - } - add = 1 - } - else_if = { - limit = { - domicile ?= { has_domicile_building_or_higher = camp_main_04 } - } - add = 1 - } -} - diff --git a/N3OW/common/script_values/09_mpo_domicile_values.txt b/N3OW/common/script_values/09_mpo_domicile_values.txt deleted file mode 100644 index 419e735b..00000000 --- a/N3OW/common/script_values/09_mpo_domicile_values.txt +++ /dev/null @@ -1,474 +0,0 @@ -################### -# NOMAD YURT VALUES # -################### - -# Beware, this file is full of MATH! - -############################### -#AI VALUES - -nomadic_capital_literally_invaluable_building = { - value = 1000 -} - -nomadic_capital_extremely_important_building = { - value = 100 -} - -nomadic_capital_very_important_building = { - value = 15 -} - -nomadic_capital_main_building_1 = { - value = 8 -} - -nomadic_capital_main_building_2 = { - value = 7 - if = { - limit = { - owner = { - short_term_gold >= yurt_main_building_gold_cost_tier_2 - prestige >= yurt_main_building_prestige_cost_tier_2 - } - herd >= yurt_main_building_herd_cost_tier_2 - } - add = 4 - } - if = { - limit = { - herd >= { - value = max_herd - multiply = 0.9 - } - } - add = 5 - } -} - -nomadic_capital_main_building_3 = { - value = 6 - if = { - limit = { - owner = { - short_term_gold >= yurt_main_building_gold_cost_tier_3 - prestige >= yurt_main_building_prestige_cost_tier_3 - } - herd >= yurt_main_building_herd_cost_tier_3 - } - add = 4 - } - if = { - limit = { - herd >= { - value = max_herd - multiply = 0.9 - } - } - add = 5 - } -} - -nomadic_capital_main_building_4 = { - value = 5 - if = { - limit = { - owner = { - short_term_gold >= yurt_main_building_gold_cost_tier_4 - prestige >= yurt_main_building_prestige_cost_tier_4 - } - herd >= yurt_main_building_herd_cost_tier_4 - } - add = 4 - } - if = { - limit = { - herd >= { - value = max_herd - multiply = 0.9 - } - } - add = 5 - } -} - -nomadic_capital_main_building_5 = { - value = 4 - if = { - limit = { - owner = { - short_term_gold >= yurt_main_building_gold_cost_tier_5 - prestige >= yurt_main_building_prestige_cost_tier_5 - } - herd >= yurt_main_building_herd_cost_tier_5 - } - add = 4 - } - if = { - limit = { - herd >= { - value = max_herd - multiply = 0.9 - } - } - add = 5 - } -} - -nomadic_capital_main_building_6 = { - value = 3 - if = { - limit = { - owner = { - short_term_gold >= yurt_main_building_gold_cost_tier_6 - prestige >= yurt_main_building_prestige_cost_tier_6 - } - herd >= yurt_main_building_herd_cost_tier_6 - } - add = 4 - } - if = { - limit = { - herd >= { - value = max_herd - multiply = 0.9 - } - } - add = 5 - } -} - -nomadic_capital_interior_building_1 = { - value = 9 -} - -nomadic_capital_interior_building_2 = { - value = 8 -} - -nomadic_capital_interior_building_3 = { - value = 7 -} - -nomadic_capital_interior_building_4 = { - value = 6 -} - -nomadic_capital_interior_building_5 = { - value = 5 -} - -nomadic_capital_interior_building_6 = { - value = 4 -} - -nomadic_capital_interior_building_7 = { - value = 3 -} - -nomadic_capital_interior_building_8 = { - value = 2 -} - -nomadic_capital_exterior_building_1 = { - value = 11 -} - -nomadic_capital_exterior_building_2 = { - value = 7 -} - -nomadic_capital_exterior_building_3 = { - value = 6 -} - -nomadic_capital_exterior_building_4 = { - value = 5 -} - -nomadic_capital_exterior_building_5 = { - value = 4 -} - -nomadic_capital_exterior_building_6 = { - value = 3 -} - -nomadic_capital_exterior_building_7 = { - value = 2 -} - -nomadic_capital_exterior_building_8 = { - value = 4 -} - -################################### -# Construction Cost -# NOTE: the costs are designed with different progression. The early tiers are cheap and cost mostly herd, the higher cost more and more prestige, then skyrocket with gold cost - -# Control mult values -# They follow the equation Xn = A*X(n-1)+ B^(n-1)*(increase_value), X1 = base_value + increase_value -# Set them all to 1 to get your standard, boring like your life, linear progression - -@yurt_building_herd_mult_A = 1 -@yurt_building_herd_mult_B = 1 - -@yurt_building_prestige_mult_A = 1.1 -@yurt_building_prestige_mult_B = 0.8 - -@yurt_building_gold_mult_A = 0.6 -@yurt_building_gold_mult_B = 1.6 - -#main building control costs - -@yurt_main_building_herd_base_cost = 200 -@yurt_main_building_herd_increase_cost = 200 - -@yurt_main_building_prestige_base_cost = 40 -@yurt_main_building_prestige_increase_cost = 80 - -@yurt_main_building_gold_base_cost = 100 -@yurt_main_building_gold_increase_cost = 40 - - -#external building control costs - -@yurt_external_building_herd_base_cost = 200 -@yurt_external_building_herd_increase_cost = 100 - -@yurt_external_building_prestige_base_cost = 15 -@yurt_external_building_prestige_increase_cost = 45 - -@yurt_external_building_gold_base_cost = 0 -@yurt_external_building_gold_increase_cost = 20 - - -#internal building control costs - -@yurt_internal_building_herd_base_cost = 100 -@yurt_internal_building_herd_increase_cost = 50 - -@yurt_internal_building_prestige_base_cost = 8 -@yurt_internal_building_prestige_increase_cost = 24 - -@yurt_internal_building_gold_base_cost = 4 -@yurt_internal_building_gold_increase_cost = 8 - -################################### -# Construction herd values - -# main yurt - -@yurt_main_building_herd_cost_1 = @[yurt_main_building_herd_base_cost + yurt_main_building_herd_increase_cost] -@yurt_main_building_herd_cost_2 = @[yurt_building_herd_mult_A*yurt_main_building_herd_cost_1 + yurt_building_herd_mult_B*yurt_main_building_herd_increase_cost] -@yurt_main_building_herd_cost_3 = @[yurt_building_herd_mult_A*yurt_main_building_herd_cost_2 + yurt_building_herd_mult_B*yurt_building_herd_mult_B*yurt_main_building_herd_increase_cost] -@yurt_main_building_herd_cost_4 = @[yurt_building_herd_mult_A*yurt_main_building_herd_cost_3 + yurt_building_herd_mult_B*yurt_building_herd_mult_B*yurt_building_herd_mult_B*yurt_main_building_herd_increase_cost] -@yurt_main_building_herd_cost_5 = @[yurt_building_herd_mult_A*yurt_main_building_herd_cost_4 + yurt_building_herd_mult_B*yurt_building_herd_mult_B*yurt_building_herd_mult_B*yurt_building_herd_mult_B*yurt_main_building_herd_increase_cost] -@yurt_main_building_herd_cost_6 = @[yurt_building_herd_mult_A*yurt_main_building_herd_cost_5 + yurt_building_herd_mult_B*yurt_building_herd_mult_B*yurt_building_herd_mult_B*yurt_building_herd_mult_B*yurt_building_herd_mult_B*yurt_building_herd_mult_B*yurt_main_building_herd_increase_cost] - - -# external yurts - -@yurt_external_building_herd_cost_1 = @[yurt_external_building_herd_base_cost + yurt_external_building_herd_increase_cost] -@yurt_external_building_herd_cost_2 = @[yurt_building_herd_mult_A*yurt_external_building_herd_cost_1 + yurt_building_herd_mult_B*yurt_external_building_herd_increase_cost] -@yurt_external_building_herd_cost_3 = @[yurt_building_herd_mult_A*yurt_external_building_herd_cost_2 + yurt_building_herd_mult_B*yurt_building_herd_mult_B*yurt_external_building_herd_increase_cost] -@yurt_external_building_herd_cost_4 = @[yurt_building_herd_mult_A*yurt_external_building_herd_cost_3 + yurt_building_herd_mult_B*yurt_building_herd_mult_B*yurt_building_herd_mult_B*yurt_external_building_herd_increase_cost] -@yurt_external_building_herd_cost_5 = @[yurt_building_herd_mult_A*yurt_external_building_herd_cost_4 + yurt_building_herd_mult_B*yurt_building_herd_mult_B*yurt_building_herd_mult_B*yurt_building_herd_mult_B*yurt_external_building_herd_increase_cost] -@yurt_external_building_herd_cost_6 = @[yurt_building_herd_mult_A*yurt_external_building_herd_cost_5 + yurt_building_herd_mult_B*yurt_building_herd_mult_B*yurt_building_herd_mult_B*yurt_building_herd_mult_B*yurt_building_herd_mult_B*yurt_external_building_herd_increase_cost] - - -# internal yurts - -@yurt_internal_building_herd_cost_1 = @[yurt_internal_building_herd_base_cost + yurt_internal_building_herd_increase_cost] -@yurt_internal_building_herd_cost_2 = @[yurt_building_herd_mult_A*yurt_internal_building_herd_cost_1 + yurt_building_herd_mult_B*yurt_internal_building_herd_increase_cost] -@yurt_internal_building_herd_cost_3 = @[yurt_building_herd_mult_A*yurt_internal_building_herd_cost_2 + yurt_building_herd_mult_B*yurt_building_herd_mult_B*yurt_internal_building_herd_increase_cost] -@yurt_internal_building_herd_cost_4 = @[yurt_building_herd_mult_A*yurt_internal_building_herd_cost_3 + yurt_building_herd_mult_B*yurt_building_herd_mult_B*yurt_building_herd_mult_B*yurt_internal_building_herd_increase_cost] -@yurt_internal_building_herd_cost_5 = @[yurt_building_herd_mult_A*yurt_internal_building_herd_cost_4 + yurt_building_herd_mult_B*yurt_building_herd_mult_B*yurt_building_herd_mult_B*yurt_building_herd_mult_B*yurt_internal_building_herd_increase_cost] -@yurt_internal_building_herd_cost_6 = @[yurt_building_herd_mult_A*yurt_internal_building_herd_cost_5 + yurt_building_herd_mult_B*yurt_building_herd_mult_B*yurt_building_herd_mult_B*yurt_building_herd_mult_B*yurt_building_herd_mult_B*yurt_internal_building_herd_increase_cost] - -################################### -# Construction prestige values - -# main yurt - -@yurt_main_building_prestige_cost_1 = @[yurt_main_building_prestige_base_cost + yurt_main_building_prestige_increase_cost] -@yurt_main_building_prestige_cost_2 = @[yurt_building_prestige_mult_A*yurt_main_building_prestige_cost_1 + yurt_building_prestige_mult_B*yurt_main_building_prestige_increase_cost] -@yurt_main_building_prestige_cost_3 = @[yurt_building_prestige_mult_A*yurt_main_building_prestige_cost_2 + yurt_building_prestige_mult_B*yurt_building_prestige_mult_B*yurt_main_building_prestige_increase_cost] -@yurt_main_building_prestige_cost_4 = @[yurt_building_prestige_mult_A*yurt_main_building_prestige_cost_3 + yurt_building_prestige_mult_B*yurt_building_prestige_mult_B*yurt_building_prestige_mult_B*yurt_main_building_prestige_increase_cost] -@yurt_main_building_prestige_cost_5 = @[yurt_building_prestige_mult_A*yurt_main_building_prestige_cost_4 + yurt_building_prestige_mult_B*yurt_building_prestige_mult_B*yurt_building_prestige_mult_B*yurt_building_prestige_mult_B*yurt_main_building_prestige_increase_cost] -@yurt_main_building_prestige_cost_6 = @[yurt_building_prestige_mult_A*yurt_main_building_prestige_cost_5 + yurt_building_prestige_mult_B*yurt_building_prestige_mult_B*yurt_building_prestige_mult_B*yurt_building_prestige_mult_B*yurt_building_prestige_mult_B*yurt_main_building_prestige_increase_cost] - - -# external yurts - -@yurt_external_building_prestige_cost_1 = @[yurt_external_building_prestige_base_cost + yurt_external_building_prestige_increase_cost] -@yurt_external_building_prestige_cost_2 = @[yurt_building_prestige_mult_A*yurt_external_building_prestige_cost_1 + yurt_building_prestige_mult_B*yurt_external_building_prestige_increase_cost] -@yurt_external_building_prestige_cost_3 = @[yurt_building_prestige_mult_A*yurt_external_building_prestige_cost_2 + yurt_building_prestige_mult_B*yurt_building_prestige_mult_B*yurt_external_building_prestige_increase_cost] -@yurt_external_building_prestige_cost_4 = @[yurt_building_prestige_mult_A*yurt_external_building_prestige_cost_3 + yurt_building_prestige_mult_B*yurt_building_prestige_mult_B*yurt_building_prestige_mult_B*yurt_external_building_prestige_increase_cost] -@yurt_external_building_prestige_cost_5 = @[yurt_building_prestige_mult_A*yurt_external_building_prestige_cost_4 + yurt_building_prestige_mult_B*yurt_building_prestige_mult_B*yurt_building_prestige_mult_B*yurt_building_prestige_mult_B*yurt_external_building_prestige_increase_cost] -@yurt_external_building_prestige_cost_6 = @[yurt_building_prestige_mult_A*yurt_external_building_prestige_cost_5 + yurt_building_prestige_mult_B*yurt_building_prestige_mult_B*yurt_building_prestige_mult_B*yurt_building_prestige_mult_B*yurt_building_prestige_mult_B*yurt_external_building_prestige_increase_cost] - - -# internal yurts - -@yurt_internal_building_prestige_cost_1 = @[yurt_internal_building_prestige_base_cost + yurt_internal_building_prestige_increase_cost] -@yurt_internal_building_prestige_cost_2 = @[yurt_building_prestige_mult_A*yurt_internal_building_prestige_cost_1 + yurt_building_prestige_mult_B*yurt_internal_building_prestige_increase_cost] -@yurt_internal_building_prestige_cost_3 = @[yurt_building_prestige_mult_A*yurt_internal_building_prestige_cost_2 + yurt_building_prestige_mult_B*yurt_building_prestige_mult_B*yurt_internal_building_prestige_increase_cost] -@yurt_internal_building_prestige_cost_4 = @[yurt_building_prestige_mult_A*yurt_internal_building_prestige_cost_3 + yurt_building_prestige_mult_B*yurt_building_prestige_mult_B*yurt_building_prestige_mult_B*yurt_internal_building_prestige_increase_cost] -@yurt_internal_building_prestige_cost_5 = @[yurt_building_prestige_mult_A*yurt_internal_building_prestige_cost_4 + yurt_building_prestige_mult_B*yurt_building_prestige_mult_B*yurt_building_prestige_mult_B*yurt_building_prestige_mult_B*yurt_internal_building_prestige_increase_cost] -@yurt_internal_building_prestige_cost_6 = @[yurt_building_prestige_mult_A*yurt_internal_building_prestige_cost_5 + yurt_building_prestige_mult_B*yurt_building_prestige_mult_B*yurt_building_prestige_mult_B*yurt_building_prestige_mult_B*yurt_building_prestige_mult_B*yurt_internal_building_prestige_increase_cost] - - -################################### -# Construction gold values - -# main yurt - -@yurt_main_building_gold_cost_1 = @[yurt_main_building_gold_base_cost + yurt_main_building_gold_increase_cost] -@yurt_main_building_gold_cost_2 = @[yurt_building_gold_mult_A*yurt_main_building_gold_cost_1 + yurt_building_gold_mult_B*yurt_main_building_gold_increase_cost] -@yurt_main_building_gold_cost_3 = @[yurt_building_gold_mult_A*yurt_main_building_gold_cost_2 + yurt_building_gold_mult_B*yurt_building_gold_mult_B*yurt_main_building_gold_increase_cost] -@yurt_main_building_gold_cost_4 = @[yurt_building_gold_mult_A*yurt_main_building_gold_cost_3 + yurt_building_gold_mult_B*yurt_building_gold_mult_B*yurt_building_gold_mult_B*yurt_main_building_gold_increase_cost] -@yurt_main_building_gold_cost_5 = @[yurt_building_gold_mult_A*yurt_main_building_gold_cost_4 + yurt_building_gold_mult_B*yurt_building_gold_mult_B*yurt_building_gold_mult_B*yurt_building_gold_mult_B*yurt_main_building_gold_increase_cost] -@yurt_main_building_gold_cost_6 = @[yurt_building_gold_mult_A*yurt_main_building_gold_cost_5 + yurt_building_gold_mult_B*yurt_building_gold_mult_B*yurt_building_gold_mult_B*yurt_building_gold_mult_B*yurt_building_gold_mult_B*yurt_main_building_gold_increase_cost] - - -# external yurts - -@yurt_external_building_gold_cost_1 = @[yurt_external_building_gold_base_cost + yurt_external_building_gold_increase_cost] -@yurt_external_building_gold_cost_2 = @[yurt_building_gold_mult_A*yurt_external_building_gold_cost_1 + yurt_building_gold_mult_B*yurt_external_building_gold_increase_cost] -@yurt_external_building_gold_cost_3 = @[yurt_building_gold_mult_A*yurt_external_building_gold_cost_2 + yurt_building_gold_mult_B*yurt_building_gold_mult_B*yurt_external_building_gold_increase_cost] -@yurt_external_building_gold_cost_4 = @[yurt_building_gold_mult_A*yurt_external_building_gold_cost_3 + yurt_building_gold_mult_B*yurt_building_gold_mult_B*yurt_building_gold_mult_B*yurt_external_building_gold_increase_cost] -@yurt_external_building_gold_cost_5 = @[yurt_building_gold_mult_A*yurt_external_building_gold_cost_4 + yurt_building_gold_mult_B*yurt_building_gold_mult_B*yurt_building_gold_mult_B*yurt_building_gold_mult_B*yurt_external_building_gold_increase_cost] -@yurt_external_building_gold_cost_6 = @[yurt_building_gold_mult_A*yurt_external_building_gold_cost_5 + yurt_building_gold_mult_B*yurt_building_gold_mult_B*yurt_building_gold_mult_B*yurt_building_gold_mult_B*yurt_building_gold_mult_B*yurt_external_building_gold_increase_cost] - - -# internal yurts - -@yurt_internal_building_gold_cost_1 = @[yurt_internal_building_gold_base_cost + yurt_internal_building_gold_increase_cost] -@yurt_internal_building_gold_cost_2 = @[yurt_building_gold_mult_A*yurt_internal_building_gold_cost_1 + yurt_building_gold_mult_B*yurt_internal_building_gold_increase_cost] -@yurt_internal_building_gold_cost_3 = @[yurt_building_gold_mult_A*yurt_internal_building_gold_cost_2 + yurt_building_gold_mult_B*yurt_building_gold_mult_B*yurt_internal_building_gold_increase_cost] -@yurt_internal_building_gold_cost_4 = @[yurt_building_gold_mult_A*yurt_internal_building_gold_cost_3 + yurt_building_gold_mult_B*yurt_building_gold_mult_B*yurt_building_gold_mult_B*yurt_internal_building_gold_increase_cost] -@yurt_internal_building_gold_cost_5 = @[yurt_building_gold_mult_A*yurt_internal_building_gold_cost_4 + yurt_building_gold_mult_B*yurt_building_gold_mult_B*yurt_building_gold_mult_B*yurt_building_gold_mult_B*yurt_internal_building_gold_increase_cost] -@yurt_internal_building_gold_cost_6 = @[yurt_building_gold_mult_A*yurt_internal_building_gold_cost_5 + yurt_building_gold_mult_B*yurt_building_gold_mult_B*yurt_building_gold_mult_B*yurt_building_gold_mult_B*yurt_building_gold_mult_B*yurt_internal_building_gold_increase_cost] - - - -################################### -# Getting the final values, no calculations - -yurt_main_building_herd_cost_tier_1 = @yurt_main_building_herd_cost_1 -yurt_main_building_herd_cost_tier_2 = @yurt_main_building_herd_cost_2 -yurt_main_building_herd_cost_tier_3 = @yurt_main_building_herd_cost_3 -yurt_main_building_herd_cost_tier_4 = @yurt_main_building_herd_cost_4 -yurt_main_building_herd_cost_tier_5 = @yurt_main_building_herd_cost_5 -yurt_main_building_herd_cost_tier_6 = @yurt_main_building_herd_cost_6 - -yurt_external_building_herd_cost_tier_1 = @yurt_external_building_herd_cost_1 -yurt_external_building_herd_cost_tier_2 = @yurt_external_building_herd_cost_2 -yurt_external_building_herd_cost_tier_3 = @yurt_external_building_herd_cost_3 -yurt_external_building_herd_cost_tier_4 = @yurt_external_building_herd_cost_4 -yurt_external_building_herd_cost_tier_5 = @yurt_external_building_herd_cost_5 -yurt_external_building_herd_cost_tier_6 = @yurt_external_building_herd_cost_6 - -yurt_internal_building_herd_cost_tier_1 = @yurt_internal_building_herd_cost_1 -yurt_internal_building_herd_cost_tier_2 = @yurt_internal_building_herd_cost_2 -yurt_internal_building_herd_cost_tier_3 = @yurt_internal_building_herd_cost_3 -yurt_internal_building_herd_cost_tier_4 = @yurt_internal_building_herd_cost_4 -yurt_internal_building_herd_cost_tier_5 = @yurt_internal_building_herd_cost_5 -yurt_internal_building_herd_cost_tier_6 = @yurt_internal_building_herd_cost_6 - -yurt_main_building_prestige_cost_tier_1 = @yurt_main_building_prestige_cost_1 -yurt_main_building_prestige_cost_tier_2 = @yurt_main_building_prestige_cost_2 -yurt_main_building_prestige_cost_tier_3 = @yurt_main_building_prestige_cost_3 -yurt_main_building_prestige_cost_tier_4 = @yurt_main_building_prestige_cost_4 -yurt_main_building_prestige_cost_tier_5 = @yurt_main_building_prestige_cost_5 -yurt_main_building_prestige_cost_tier_6 = @yurt_main_building_prestige_cost_6 - -yurt_external_building_prestige_cost_tier_1 = @yurt_external_building_prestige_cost_1 -yurt_external_building_prestige_cost_tier_2 = @yurt_external_building_prestige_cost_2 -yurt_external_building_prestige_cost_tier_3 = @yurt_external_building_prestige_cost_3 -yurt_external_building_prestige_cost_tier_4 = @yurt_external_building_prestige_cost_4 -yurt_external_building_prestige_cost_tier_5 = @yurt_external_building_prestige_cost_5 -yurt_external_building_prestige_cost_tier_6 = @yurt_external_building_prestige_cost_6 - -yurt_internal_building_prestige_cost_tier_1 = @yurt_internal_building_prestige_cost_1 -yurt_internal_building_prestige_cost_tier_2 = @yurt_internal_building_prestige_cost_2 -yurt_internal_building_prestige_cost_tier_3 = @yurt_internal_building_prestige_cost_3 -yurt_internal_building_prestige_cost_tier_4 = @yurt_internal_building_prestige_cost_4 -yurt_internal_building_prestige_cost_tier_5 = @yurt_internal_building_prestige_cost_5 -yurt_internal_building_prestige_cost_tier_6 = @yurt_internal_building_prestige_cost_6 - -yurt_main_building_gold_cost_tier_1 = { - value = @yurt_main_building_gold_cost_1 - -} -yurt_main_building_gold_cost_tier_2 = { - value = @yurt_main_building_gold_cost_2 - -} -yurt_main_building_gold_cost_tier_3 = { - value = @yurt_main_building_gold_cost_3 - -} -yurt_main_building_gold_cost_tier_4 = { - value = @yurt_main_building_gold_cost_4 - -} -yurt_main_building_gold_cost_tier_5 = { - value = @yurt_main_building_gold_cost_5 - -} -yurt_main_building_gold_cost_tier_6 = { - value = @yurt_main_building_gold_cost_6 - -} - -yurt_external_building_gold_cost_tier_1 = { - value = @yurt_external_building_gold_cost_1 - -} -yurt_external_building_gold_cost_tier_2 = { - value = @yurt_external_building_gold_cost_2 - -} -yurt_external_building_gold_cost_tier_3 = { - value = @yurt_external_building_gold_cost_3 - -} -yurt_external_building_gold_cost_tier_4 = { - value = @yurt_external_building_gold_cost_4 - -} -yurt_external_building_gold_cost_tier_5 = { - value = @yurt_external_building_gold_cost_5 - -} -yurt_external_building_gold_cost_tier_6 = { - value = @yurt_external_building_gold_cost_6 - -} - -yurt_internal_building_gold_cost_tier_1 = { - value = @yurt_internal_building_gold_cost_1 - -} -yurt_internal_building_gold_cost_tier_2 = { - value = @yurt_internal_building_gold_cost_2 - -} -yurt_internal_building_gold_cost_tier_3 = { - value = @yurt_internal_building_gold_cost_3 - -} -yurt_internal_building_gold_cost_tier_4 = { - value = @yurt_internal_building_gold_cost_4 - -} -yurt_internal_building_gold_cost_tier_5 = { - value = @yurt_internal_building_gold_cost_5 - -} -yurt_internal_building_gold_cost_tier_6 = { - value = @yurt_internal_building_gold_cost_6 - -} diff --git a/N3OW/common/script_values/09_mpo_the_great_steppe_values.txt b/N3OW/common/script_values/09_mpo_the_great_steppe_values.txt deleted file mode 100644 index 99b740c0..00000000 --- a/N3OW/common/script_values/09_mpo_the_great_steppe_values.txt +++ /dev/null @@ -1,5 +0,0 @@ -# Catalyst values -minor_the_great_steppe_catalyst_gain = 15 -medium_the_great_steppe_catalyst_gain = 100 -major_the_great_steppe_catalyst_gain = 250 -massive_the_great_steppe_catalyst_gain = 500 \ No newline at end of file diff --git a/N3OW/common/script_values/09_mpo_values.txt b/N3OW/common/script_values/09_mpo_values.txt deleted file mode 100644 index b417a054..00000000 --- a/N3OW/common/script_values/09_mpo_values.txt +++ /dev/null @@ -1,2866 +0,0 @@ -# Migration values -migration_cooldown_value = 5 # Years - -# Temp Tributary Protection after winning a war -temp_tributary_protection_value = 3 # Years - -#ratio between attacker's military strength and defender's strength -confederation_worthy_foe_strength_ratio_value = { - value = scope:confederate.max_military_strength - divide = max_military_strength_plus_one_value -} - -confederation_worthy_foe_strength_ratio_value_root = { - value = root.max_military_strength - divide = max_military_strength_plus_one_value -} - -max_military_strength_plus_one_value = { - value = max_military_strength - add = 1 -} - -confederation_cb_cost_display_value = 200 -confederation_cb_cost_value = { - value = 1 - add = { - value = confederation_cb_cost_display_value - divide = 100 - } -} - -#ratio between attacker's military strength and defender's strength -blood_brother_strength_ratio_value = { - value = scope:actor.max_military_strength - divide = { - value = scope:recipient.max_military_strength - min = 1 - } -} -## Herd Values ## -# Used by Code, do not rename or remove -# Used to initialize how much Herd a nomad gets upon getting a domicile -# root = domicile owner, aka the ruling nomad leader -initial_nomad_herd = { - value = 0 - add = { - #ADDITIVE SOURCES - add = { - value = current_domain_fertility - multiply = 8 - } - every_vassal = { - limit = { - government_has_flag = government_is_nomadic - } - add = { - value = 0 - add = { - value = current_domain_fertility - multiply = 4 - } - every_vassal = { - limit = { - government_has_flag = government_is_nomadic - } - add = { - value = current_domain_fertility - multiply = 2 - } - } - multiply = { - value = 140 - add = "this.opinion(root)" - add = root.dread - multiply = 0.01 - min = 0 - max = 2 - } - multiply = primary_title.tier - multiply = 0.2 - min = 100 - max = 4000 - } - } - every_vassal = { - limit = { - government_has_flag = government_is_herder - } - add = { - value = current_domain_fertility - multiply = 4 - } - } - every_tributary = { - add = { - value = realm_size - multiply = primary_title.tier - multiply = 10 - min = 100 - max = 2000 - } - } - } -} - -# This will randomly be added on top of the initial nomad herd depending on your title tier -# This is the lower range -# root = domicile owner, aka the ruling nomad leader -initial_nomad_herd_title_min = { - value = 0 - add = { - switch = { - trigger = primary_title.tier - tier_barony = { - value = 100 - } - tier_county = { - value = 250 - } - tier_duchy = { - value = 750 - } - tier_kingdom = { - value = 1250 - } - tier_empire = { - value = 2500 - } - } - } -} - -# This will randomly be added on top of the initial nomad herd depending on your title tier -# This is the upper range -# root = domicile owner, aka the ruling nomad leader -initial_nomad_herd_title_max = { - value = 0 - add = { - switch = { - trigger = primary_title.tier - tier_barony = { - value = 200 - } - tier_county = { - value = 500 - } - tier_duchy = { - value = 1500 - } - tier_kingdom = { - value = 2500 - } - tier_empire = { - value = 5000 - } - } - } -} - -# Used on game start to give Nomads some starting gold -gold_value_scale_by_era = { - value = 0 - if = { - limit = { - culture = { has_cultural_era_or_later = culture_era_late_medieval } - } - add = 3 - } - else_if = { - limit = { - culture = { has_cultural_era_or_later = culture_era_high_medieval } - } - add = 1.5 - } - else_if = { - limit = { - culture = { has_cultural_era_or_later = culture_era_early_medieval } - } - add = 1 - } - else = { - add = 0.75 - } -} - - -# Dynamic Herd values -# START of use only with a domicile scope -herd_value_scale_by_era = { - value = 0 - if = { - limit = { - owner.culture ?= { has_cultural_era_or_later = culture_era_late_medieval } - } - add = 1.75 - } - else_if = { - limit = { - owner.culture ?= { has_cultural_era_or_later = culture_era_high_medieval } - } - add = 1.25 - } - else_if = { - limit = { - owner.culture ?= { has_cultural_era_or_later = culture_era_early_medieval } - } - add = 1 - } - else = { - add = 0.75 - } -} - -herd_value_scale_by_tier = { - value = 0 - if = { - limit = { exists = owner.primary_title } - add = { - value = owner.primary_title.tier - subtract = 1 - } - multiply = 0.5 - } - min = 1 -} - -herd_value_scale_owner_dominance = { - value = owner.dominance_value - multiply = 0.5 - min = 1 -} - -miniscule_herd_value_static = 25 -miniscule_herd_value = { - value = miniscule_herd_value_static - multiply = herd_value_scale_by_era - multiply = herd_value_scale_by_tier - multiply = herd_value_scale_owner_dominance -} - -minor_herd_value_static = 150 -minor_herd_value = { - value = minor_herd_value_static - multiply = herd_value_scale_by_era - multiply = herd_value_scale_by_tier - multiply = herd_value_scale_owner_dominance -} - -medium_herd_value_static = 300 -medium_herd_value = { - value = medium_herd_value_static - multiply = herd_value_scale_by_era - multiply = herd_value_scale_by_tier - multiply = herd_value_scale_owner_dominance -} - -major_herd_value_static = 600 -major_herd_value = { - value = major_herd_value_static - multiply = herd_value_scale_by_era - multiply = herd_value_scale_by_tier - multiply = herd_value_scale_owner_dominance -} - -massive_herd_value_static = 1200 -massive_herd_value = { - value = massive_herd_value_static - multiply = herd_value_scale_by_era - multiply = herd_value_scale_by_tier - multiply = owner.dominance_value -} - -monumental_herd_value_static = 2400 -monumental_herd_value = { - value = monumental_herd_value_static - multiply = herd_value_scale_by_era - multiply = herd_value_scale_by_tier - multiply = owner.dominance_value -} - -miniscule_herd_loss = { - value = 0 - subtract = miniscule_herd_value -} -minor_herd_loss = { - value = 0 - subtract = minor_herd_value -} -medium_herd_loss = { - value = 0 - subtract = medium_herd_value -} -major_herd_loss = { - value = 0 - subtract = major_herd_value -} -massive_herd_loss = { - value = 0 - subtract = massive_herd_value -} -monumental_herd_loss = { - value = 0 - subtract = monumental_herd_value -} - -miniscule_herd_gain = { - value = 0 - add = miniscule_herd_value -} -minor_herd_gain = { - value = 0 - add = minor_herd_value -} -medium_herd_gain = { - value = 0 - add = medium_herd_value -} -major_herd_gain = { - value = 0 - add = major_herd_value -} -massive_herd_gain = { - value = 0 - add = massive_herd_value -} -monumental_herd_gain = { - value = 0 - add = monumental_herd_value -} - -five_percent_herd_value = { - value = max_herd - multiply = 0.05 -} -ten_percent_herd_value = { - value = max_herd - multiply = 0.1 -} -fifteen_percent_herd_value = { - value = max_herd - multiply = 0.15 -} -twenty_percent_herd_value = { - value = max_herd - multiply = 0.2 -} -twentyfive_percent_herd_value = { - value = max_herd - multiply = 0.25 -} -thirty_percent_herd_value = { - value = max_herd - multiply = 0.3 -} -forty_percent_herd_value = { - value = max_herd - multiply = 0.4 -} -fifty_percent_herd_value = { - value = max_herd - multiply = 0.5 -} -sixty_percent_herd_value = { - value = max_herd - multiply = 0.6 -} -seventy_percent_herd_value = { - value = max_herd - multiply = 0.7 -} -eighty_percent_herd_value = { - value = max_herd - multiply = 0.8 -} -ninety_percent_herd_value = { - value = max_herd - multiply = 0.9 -} - -five_percent_current_herd_value = { - value = herd - multiply = 0.05 -} -ten_percent_current_herd_value = { - value = herd - multiply = 0.1 -} -fifteen_percent_current_herd_value = { - value = herd - multiply = 0.15 -} -twenty_percent_current_herd_value = { - value = herd - multiply = 0.2 -} -twentyfive_percent_current_herd_value = { - value = herd - multiply = 0.25 -} -thirty_percent_current_herd_value = { - value = herd - multiply = 0.3 -} -forty_percent_current_herd_value = { - value = herd - multiply = 0.4 -} -fifty_percent_current_herd_value = { - value = herd - multiply = 0.5 -} -sixty_percent_current_herd_value = { - value = herd - multiply = 0.6 -} -seventy_percent_current_herd_value = { - value = herd - multiply = 0.7 -} -eighty_percent_current_herd_value = { - value = herd - multiply = 0.8 -} -ninety_percent_current_herd_value = { - value = herd - multiply = 0.9 -} - -negative_seventy_five_percent_herd_value = { - value = herd - multiply = -0.75 -} - -ask_for_herd_base_value = { - value = 0 - switch = { - trigger = owner.primary_title.tier - tier_barony = { add = miniscule_herd_value } - tier_county = { add = minor_herd_value} - tier_duchy = { add = minor_herd_value } - tier_kingdom = { add = medium_herd_value } - tier_empire = { add = medium_herd_value } - } -} - -ask_for_herd_double_value = { - value = ask_for_herd_base_value - multiply = 2 -} - -ask_for_herd_half_value = { - value = ask_for_herd_base_value - multiply = 0.5 -} -# END of use only with domicile scope - -# START of use only with a character scope -dominance_value = { - value = 0 - if = { - limit = { government_has_flag = government_is_nomadic } - switch = { - trigger = has_realm_law - nomadic_authority_1 = { - add = 1 - } - nomadic_authority_2 = { - add = 2 - } - nomadic_authority_3 = { - add = 3 - } - nomadic_authority_4 = { - add = 4 - } - nomadic_authority_5 = { - add = 5 - } - } - } - - min = 1 -} - -excess_herd_value = { - value = domicile.herd - subtract = domicile.max_herd -} - -excess_herd_value_negative = { - value = domicile.max_herd - subtract = domicile.herd -} - -nomadic_authority_requirement_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 - } - } - } -} - -nomadic_authority_level_2_requirement = 2500 - -nomadic_authority_level_3_requirement = 10000 - -nomadic_authority_level_4_requirement = 30000 - -nomadic_authority_level_5_requirement = 75000 -# END of use only with character scope - -hunting_eagle_sell_value = { - value = 24 - if = { # They are pretty valuable - limit = { - is_landless_adventurer = yes - } - add = massive_gold_laamps_value - } - else = { - add = massive_gold_value - } - if = { # The younger, the better - limit = { - has_variable = eagle_age_variable - } - subtract = { - value = { - add = var:eagle_age_variable - multiply = 4 - } - } - } - if = { # Developed pets are worth more - limit = { - has_eagle_personality_trait_trigger = yes - } - multiply = { - value = { - add = 1.2 - add = { #0.2 per level - value = 0.2 - multiply = var:eagle_personality_level - } - } - } - if = { - limit = { - has_secondary_eagle_personality_trait_trigger = yes - } - multiply = 1.25 - } - } - if = { # Weak pets are worth less - limit = { - has_character_modifier = weak_eagle_modifier - } - multiply = 0.75 - } - if = { # Very weak pets are worth less - limit = { - has_character_modifier = very_weak_eagle_modifier - } - multiply = 0.5 - } - if = { - limit = { # Can't get an eagle from a non-steppe location - NOT = { location = { geographical_region = world_steppe } } - } - multiply = 2 - } - #Better buyers in City Holding - if = { - limit = { - location = { has_holding_type = city_holding } - } - multiply = { 1.15 1.25 } - } - # Some variance - multiply = { 0.8 1.1 } -} - -nomad_contract_cooldown_value = 5 - -study_commander_trait_success_chance_very_good_value = 80 -study_commander_trait_success_chance_good_value = 60 -study_commander_trait_success_chance_fair_value = 40 -study_commander_trait_success_chance_poor_value = 20 - -study_commander_trait_success_chance_value = { - value = 40 - - if = { # More likely to succeed if you've done it more times - limit = { - has_variable = study_commander_trait_tally - } - add = { - value = var:study_commander_trait_tally - multiply = 5 - } - } - - # Traits - if = { - limit = { - has_trait = diligent - } - add = 5 - } - if = { - limit = { - has_trait = lazy - } - add = -5 - } - if = { - limit = { - has_trait = intellect_bad - } - add = -10 - } - if = { - limit = { - has_wounds_trigger = yes - } - add = -10 - } - if = { - limit = { - has_any_illness = yes - } - add = -10 - } - if = { - limit = { - has_any_debilitating_illness = yes - } - add = -10 - } - if = { - limit = { - has_trait = education_martial - } - add = 5 - } - - #Other - if = { - limit = { - culture = { has_cultural_pillar = ethos_bellicose } - } - add = 5 - } - if = { - limit = { - has_variable = study_commander_trait_success_chance_var - } - add = var:study_commander_trait_success_chance_var - } - - max = 99 - min = 1 -} - -study_commander_trait_success_chance_value_neg = { - value = study_commander_trait_success_chance_value - multiply = -1 -} - -study_commander_trait_mentor_hire_cost = { - value = 15 - - add = { - value = number_of_commander_traits - multiply = 5 - } - - add = { - value = martial - multiply = 2 - } - - if = { - limit = { - has_character_flag = commander_trait_mentor - } - multiply = 0.5 # Cheaper to hire - } -} - -##### Fertility ##### - -#Levels values -terrible_county_fertility_level = 10 -bad_county_fertility_level = 20 -medium_county_fertility_level = 40 -good_county_fertility_level = 60 -great_county_fertility_level = 80 -max_county_fertility_level = 100 - -#Change Values -tiny_county_fertility_level_loss = -5 -minor_county_fertility_level_loss = -10 -medium_county_fertility_level_loss = -20 -major_county_fertility_level_loss = -30 -tiny_county_fertility_level_gain = 5 -minor_county_fertility_level_gain = 10 -medium_county_fertility_level_gain = 20 -major_county_fertility_level_gain = 30 - -#Growth Values -tiny_county_fertility_growth_gain = 0.05 -small_county_fertility_growth_gain = 0.1 -medium_county_fertility_growth_gain = 0.2 -large_county_fertility_growth_gain = 0.3 -very_large_county_fertility_growth_gain = 0.5 - -tiny_county_fertility_growth_loss = -0.1 -small_county_fertility_growth_loss = -0.2 -medium_county_fertility_growth_loss = -0.3 -large_county_fertility_growth_loss = -0.5 -very_large_county_fertility_growth_loss = -0.8 -fertility_dance_bonus_value = { - value = minor_county_fertility_level_gain - - # Based on the county's fertility level - # No bonuses if higher than 60 - if = { - limit = { - county_fertility <= bad_county_fertility_level - } - multiply = 2.5 - } - else_if = { - limit = { - county_fertility <= medium_county_fertility_level - } - multiply = 2 - } - else_if = { - limit = { - county_fertility <= good_county_fertility_level - } - multiply = 1.5 - } - - # Based on the shaman's learning skill - add = { - add = 1 - add = { - value = holder.court_position:court_astrologer_court_position.learning - multiply = 0.3 - } - } - - #Based on the player's piety level - multiply = { - add = 1 - add = { - value = holder.piety_level - multiply = 0.2 - } - } - - max = { - value = 100 - subtract = county_fertility - } -} -fertility_dance_bonus_growth_value = { - value = 1 - - # Based on the county's fertility level - # No bonuses if higher than 60 - if = { - limit = { - county_fertility <= bad_county_fertility_level - } - multiply = 2.5 - } - else_if = { - limit = { - county_fertility <= medium_county_fertility_level - } - multiply = 2 - } - else_if = { - limit = { - county_fertility <= good_county_fertility_level - } - multiply = 1.5 - } - - # Based on the shaman's learning skill - add = { - add = 1 - add = { - value = holder.court_position:court_astrologer_court_position.learning - multiply = 0.3 - } - } - - #Based on the player's learning skill - add = { - add = 1 - add = { - value = holder.learning - multiply = 0.3 - } - } -} - -mpo_paiza_abuse_khan_reaction_value = { - value = 0 - add = { - value = "scope:paiza_patron.opinion(scope:paiza_abuser)" - divide = 10 - } - add = { - value = scope:paiza_patron.max_military_strength - subtract = scope:paiza_abuser.max_military_strength - divide = scope:paiza_patron.max_military_strength - multiply = 10 - } - -} - -mpo_introduce_heir_prestige_cost = medium_prestige_value -mpo_introduce_heir_piety_cost = major_piety_value - -age_compared_to_player_heir = { - add = age - subtract = root.player_heir.age -} - -mpo_friendship_setup_positive_modifiers_value = { - value = 0 - if = { - limit = { - scope:friendship_target = { - opinion = { - target = scope:heir - value >= 25 - } - } - } - add = 40 - } - if = { - limit = { - scope:friendship_target = { - opinion = { - target = scope:heir - value >= 75 - } - } - } - add = 60 - } - if = { - limit = { - scope:friendship_target = { - is_allied_to = root - } - } - add = 30 - } - if = { - limit = { - scope:friendship_target = { - OR = { - culture = { - this = scope:heir.culture - } - culture = { - cultural_acceptance = { - target = scope:heir.culture - value >= 80 - } - } - } - } - } - add = 40 - } - if = { - limit = { - scope:friendship_target = { - AND = { - exists = house - exists = scope:heir.house - house = { - this = root.house - } - } - } - } - add = 40 - } - if = { - limit = { - scope:friendship_target = { - OR = { - has_relation_friend = root - has_relation_best_friend = root - has_relation_soulmate = root - has_relation_lover = root - has_relation_blood_brother = root - } - } - } - add = 40 - } -} - -mpo_friendship_setup_negative_modifiers_value = { - value = 0 - if = { - limit = { - scope:friendship_target = { - highest_held_title_tier >= tier_empire - } - } - add = 40 - } - if = { - limit = { - scope:friendship_target = { - highest_held_title_tier >= tier_kingdom - } - } - add = 40 - } - if = { - limit = { - scope:friendship_target = { - OR = { - age_compared_to_player_heir >= 20 - age_compared_to_player_heir <= -20 - } - } - } - add = 40 - } - if = { - limit = { - scope:friendship_target = { - save_temporary_scope_as = temp_target - NOR = { - knows_language_of_culture = scope:heir.culture - scope:heir = { - knows_language_of_culture = scope:temp_target.culture - } - } - } - } - add = 60 - } - if = { - limit = { - scope:friendship_target = { - opinion = { - target = scope:heir - value <= 0 - } - opinion = { - target = scope:heir - value > -40 - } - } - } - add = 60 - } - if = { - limit = { - scope:friendship_target = { - opinion = { - target = scope:heir - value < -40 - } - } - } - add = 200 - } -} - -mpo_convert_capital_duchy_nomad_value = { - value = 0 - if = { - limit = { - capital_county.kingdom = { - any_de_jure_county = { - count >= 20 - OR = { - holder.liege = { - this = root - } - holder = root - holder.top_liege = { - this = root - } - } - } - } - } - add = 100 - } - if = { - limit = { - capital_county.kingdom = { - any_de_jure_county = { - count >= 35 - OR = { - holder.liege = { - this = root - } - holder = root - holder.top_liege = { - this = root - } - } - } - } - } - add = 100 - } - if = { - limit = { - capital_county.kingdom = { - any_de_jure_county = { - count >= 50 - OR = { - holder.liege = { - this = root - } - holder = root - holder.top_liege = { - this = root - } - } - } - } - } - add = 100 - } -} - -mpo_introduce_heir_prestige_cost = medium_prestige_value -mpo_introduce_heir_piety_cost = major_piety_value - -age_compared_to_player_heir = { - add = age - subtract = root.player_heir.age -} - -odds_steal_herd_scheme_misc_value = { - value = 10 - add = { - value = 0 - desc = scheme_odds.misc_modifiers - - if = { - limit = { - scope:target = { - has_opinion_modifier = { - target = scope:owner - modifier = attempted_to_steal_herd_crime - } - } - } - add = -50 - } - } - - add = { - value = scope:owner.prowess - desc = scheme_odds.prowess.owner - } - - if = { - limit = { - scope:owner = { has_trait = gallowsbait } - } - add = { - value = 10 - desc = SCHEME_STEAL_HERD_GALLOWSBAIT - } - } - - # If it's a herder, even though you probably shouldn't be stealing from them anyways - if = { - limit = { - scope:target = { - government_has_flag = government_is_herder - } - } - add = { - value = -10 - desc = scheme_odds.misc_is_herder - } - } -} - -odds_steal_herd_scheme_misc_value = { - value = 10 - add = { - value = 0 - desc = scheme_odds.misc_modifiers - - if = { - limit = { - scope:target = { - has_opinion_modifier = { - target = scope:owner - modifier = attempted_to_steal_herd_crime - } - } - } - add = -50 - } - } - - add = { - value = scope:owner.prowess - desc = scheme_odds.prowess.owner - } - - if = { - limit = { - scope:owner = { has_trait = gallowsbait } - } - add = { - value = 10 - desc = SCHEME_STEAL_HERD_GALLOWSBAIT - } - } - - # If it's a herder, even though you probably shouldn't be stealing from them anyways - if = { - limit = { - scope:target = { - government_has_flag = government_is_herder - } - } - add = { - value = -10 - desc = scheme_odds.misc_is_herder - } - } -} - -mpo_tsagaan_sar_gift_likely_value = { - value = 25 - - # Vassals should always gift - if = { - limit = { - is_vassal_of = scope:host - } - add = 20 - - if = { - limit = { - is_powerful_vassal_of = scope:host - } - add = 10 - } - } - - # Employees should gift - if = { - limit = { - is_councillor_of = scope:host - } - add = 25 - } - if = { - limit = { - is_courtier_of = scope:host - has_any_court_position = yes - } - add = 15 - } - - # Don't want to piss him/her off - if = { - limit = { - has_dread_level_towards = { - target = scope:host - level = 1 - } - } - add = 25 - } - - if = { - limit = { - has_dread_level_towards = { - target = scope:host - level = 2 - } - } - add = 35 - } - - # Relation - if = { - limit = { - has_any_good_relationship_with_character_trigger = { CHARACTER = scope:host } - } - add = 15 - - if = { - limit = { - likes_character_trigger = { CHARACTER = scope:host } - } - add = 10 - } - } - - if = { - limit = { - has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:host } - } - - add = -10 - - if = { - limit = { - has_relation_rival = scope:host - } - add = -10 - } - - if = { - limit = { - has_relation_nemesis = scope:host - } - add = -20 - } - } - - if = { - limit = { - is_any_family_relation_or_spouse_trigger = { CHARACTER = scope:host } - } - add = 15 - } - - # Respect - if = { - limit = { - has_opinion_modifier = { - modifier = respect_opinion - target = scope:host - } - } - add = 5 - } - - if = { - limit = { - has_opinion_modifier = { - modifier = disrespect_opinion - target = scope:host - } - } - add = -5 - } - - if = { - limit = { - is_allied_to = scope:host - } - add = 10 - } - - # Personality - if = { - limit = { - has_trait = generous - } - add = 25 - } - - if = { - limit = { - OR = { - has_trait = greedy - has_trait = avaricious - } - } - add = -25 - } - - if = { - limit = { - OR = { - has_trait = arrogant - has_trait = arbitrary - has_trait = callous - has_trait = sadistic - } - } - add = -10 - } - - if = { - limit = { - OR = { - has_trait = compassionate - has_trait = gregarious - } - } - add = 10 - } - - # I'm broke! - if = { - limit = { - OR = { - short_term_gold <= minor_gold_value - domicile ?= { herd <= minor_herd_value } - } - } - add = -25 - } - if = { - limit = { - is_lowborn = yes - } - add = -50 - } - - if = { - limit = { - scope:host = { - has_legitimacy = yes - } - } - - add = { - value = 5 - multiply = scope:host.legitimacy_level - } - } - - add = { - value = 10 - multiply = scope:host.prestige_level - } - - add = { - value = scope:host.tyranny - multiply = -2 - } - - add = { - value = "opinion(scope:host)" - divide = 3 - } - - min = 0 - max = 100 -} - -mpo_tsagaan_sar_guest_count = { - value = 0 - involved_activity = { - every_attending_character = { - limit = { - is_adult = yes - NOT = { this = root } - can_gift_anything_trigger = yes - } - add = 1 - } - } -} - -mpo_tsagaan_sar_guest_gifters = { - involved_activity = { - every_attending_character = { - limit = { - is_adult = yes - NOT = { this = root } - can_gift_anything_trigger = yes - var:tsagaan_sar_gift ?= flag:will_gift - } - add = 1 - } - } -} - -mpo_tsagaan_sar_guest_gifters_no = { - involved_activity = { - every_attending_character = { - limit = { - is_adult = yes - NOT = { this = root } - can_gift_anything_trigger = yes - var:tsagaan_sar_gift ?= flag:no_gift - } - add = 1 - } - } -} - -miniscule_gold_value = { - value = tiny_gold_value -} - -tiny_gold_value_double = { - value = tiny_gold_value - multiply = 2 -} - -mpo_zodiac_calculation_value_no_decimal = { - value = current_year - divide = 12 - floor = yes -} - -mpo_zodiac_calculation_value = { - value = current_year - divide = 12 - subtract = mpo_zodiac_calculation_value_no_decimal # To just get the decimal - multiply = 12 - round = yes -} - -### FERTILITY GAIN/LOSS VALUES - -miniscule_county_fertility_value = 5 -minor_county_fertility_value = 10 -medium_county_fertility_value = 20 -major_county_fertility_value = 30 -extreme_county_fertility_value = 40 -massive_county_fertility_value = 50 -monumental_county_fertility_value = 75 - -miniscule_county_fertility_loss = -5 -minor_county_fertility_loss = -10 -medium_county_fertility_loss = -20 -major_county_fertility_loss = -30 -extreme_county_fertility_loss = -40 -massive_county_fertility_loss = -50 -monumental_county_fertility_loss = -75 - -miniscule_county_fertility_gain = 5 -minor_county_fertility_gain = 10 -medium_county_fertility_gain = 20 -major_county_fertility_gain = 30 -extreme_county_fertility_gain = 40 -massive_county_fertility_gain = 50 -monumental_county_fertility_gain = 75 - -herder_list_county_fertility_value = { - value = 0 - every_in_list = { - list = herder_list - add = 1 - } - multiply = medium_county_fertility_value - max = 100 -} - -fishing_counties_gold_value = { - value = 4 - every_in_list = { - list = fishing_counties - add = 2 - } - max = 100 -} - -fishing_counties_gold_high_value = { - value = 8 - every_in_list = { - list = fishing_counties - add = 4 - } - max = 100 -} - -### OBEDIENCE VALUES - -# Used by Code, do not rename or remove -# Used to determine how much obedience_value must reach in order for -# the root character to be considered 'obedient' -# -# root = the character we're calculating the threshold for -obedience_threshold = { - value = { - value = 50 - desc = BASE - } - if = { # Duke - limit = { obedience_target.primary_title.tier ?= tier_duchy } - add = { - value = 20 - desc = duchy - } - } - else_if = { # King - limit = { obedience_target.primary_title.tier ?= tier_kingdom } - add = { - value = 50 - desc = kingdom - } - } - else_if = { # Emperor - limit = { obedience_target.primary_title.tier ?= tier_empire } - add = { - value = 100 - desc = empire - } - } - if = { # Yeke Jarquchi / Chief Law Overseer bonus - limit = { exists = overlord.court_position:yeke_jarquchi_court_position } - add = { - value = -1 - multiply = "overlord.court_position:yeke_jarquchi_court_position.aptitude(yeke_jarquchi_court_position)" - min = -5 - max = 0 - desc = court_position_jarquchi_obedience_modifier - } - } -} - -# Used by Code, do not rename or remove -# Used to determine if a character is obedient to another character -# Any resulting value greater than obedience_threshold above will -# make the root character 'obedient' -# Note: tributaries are considered independent -# -# root = the character for whom we are changing the obedience value -obedience_value = { - value = { - value = 0 - desc = BASE - } - if = { - limit = { - exists = obedience_target - } - if = { - limit = { # Herders are ALWAYS obedient -- we don't even run the rest of calculations - government_has_flag = government_is_herder - } - add = { - value = obedience_threshold - add = 1000 - desc = obedience_value_herder - } - } - else = { - # Have you been overruled to NOT be obedient? - if = { - limit = { - has_variable = not_obedient_humiliation_var - var:not_obedient_humiliation_var = obedience_target - } - add = { value = -850 desc = not_obedient_humiliation_var_tt } - } - else_if = { - limit = { - has_variable = not_obedient_declined_call - var:not_obedient_declined_call = obedience_target - } - add = { value = -850 desc = request_influence_war_recipient_declined_opinion } - } - else_if = { # If you're not overruled to be disobedient, do you have an obedience reason? - limit = { - has_obedience_reason = obedience_target - } - add = { value = 1000 desc = opinion_obedient_reason } - } - - add = { # Opinion - desc = obedience_value_opinion - value = "opinion(obedience_target)" - } - - # Lifestyle Perks - if = { - limit = { - obedience_target = { has_perk = loyalty_and_respect_perk } - is_spouse_of = obedience_target - } - add = { value = 25 desc = obedience_value_loyalty_and_respect } # If you change this value remember changing it in the perk loc key as well - } - if = { - limit = { - obedience_target = { has_perk = honored_to_serve_perk } - is_kurultai_trigger = yes - } - add = { value = 25 desc = obedience_value_honored_to_serve } # If you change this value remember changing it in the perk loc key as well - } - # Family - if = { - limit = { is_primary_heir_of = obedience_target } - add = { value = 250 desc = obedience_value_heir } - } - else_if = { # You are not the preferred heir - limit = { - is_male = yes - is_child_of = obedience_target - obedience_target = { - OR = { - has_realm_law = male_only_law - has_realm_law = male_preference_law - has_realm_law = equal_law - } - } - } - add = { value = -100 desc = obedience_value_heir_not_preferred } - } - else_if = { - limit = { is_spouse_of = obedience_target } - add = { value = 50 desc = obedience_value_spouse } - } - else_if = { - limit = { is_child_of = obedience_target } - add = { value = 50 desc = obedience_value_child } - } - else_if = { - limit = { is_concubine_of = obedience_target } - add = { value = 25 desc = obedience_value_concubine } - } - else_if = { - limit = { is_close_family_of = obedience_target } - add = { value = 25 desc = obedience_value_close_family } - } - else_if = { - limit = { is_extended_family_of = obedience_target } - add = { value = 10 desc = obedience_value_extended_family } - } - - #Yurts - if = { - limit = { - exists = obedience_target.domicile - } - if = { - limit = { - OR = { - has_council_position = councillor_kurultai_1 - has_council_position = councillor_kurultai_2 - has_council_position = councillor_kurultai_3 - has_council_position = councillor_kurultai_4 - } - } - obedience_target.domicile = { - switch = { - trigger = has_domicile_parameter - nomad_yurt_kurultai_obedience_per_piety_lvl_1 = { - add = { value = prev.obedience_target.piety_level desc = kurultai_mystical_yurt_01_domicile_building } - } - nomad_yurt_kurultai_obedience_per_piety_lvl_2 = { - add = { value = prev.obedience_target.piety_level multiply = 2 desc = kurultai_mystical_yurt_01_domicile_building } - } - } - switch = { - trigger = has_domicile_parameter - nomad_yurt_kurultai_more_loyal_lvl_1 = { - add = { value = 6 desc = kurultai_yurt_01 } - } - nomad_yurt_kurultai_more_loyal_lvl_2 = { - add = { value = 12 desc = kurultai_yurt_01 } - } - nomad_yurt_kurultai_more_loyal_lvl_3 = { - add = { value = 18 desc = kurultai_yurt_01 } - } - } - } - } - else_if = { - limit = { - is_courtier_of = obedience_target - } - obedience_target.domicile = { - switch = { - trigger = has_domicile_parameter - loyal_soldiers_yurt_more_obedient_lvl_1 = { - add = { value = 4 desc = loyal_soldiers_yurt_06_domicile_building } - } - loyal_soldiers_yurt_more_obedient_lvl_2 = { - add = { value = 8 desc = loyal_soldiers_yurt_06_domicile_building } - } - loyal_soldiers_yurt_more_obedient_lvl_3 = { - add = { value = 16 desc = loyal_soldiers_yurt_06_domicile_building } - } - } - } - } - if = { - limit = { - obedience_target = { - has_character_flag = established_paiza_system - } - any_equipped_character_artifact = { - root = { can_benefit_from_artifact = prev } - exists = var:paiza_patron - var:paiza_patron = { - this = obedience_target - is_gurkhan = yes - } - } - } - obedience_target.domicile = { - switch = { - trigger = has_domicile_parameter - nomad_yurt_paiza_obedience_bonus_lvl_1 = { - add = { value = 8 desc = domicile_building_parameter_nomad_yurt_paiza_obedience_bonus_lvl_1 } - } - nomad_yurt_paiza_obedience_bonus_lvl_2 = { - add = { value = 16 desc = domicile_building_parameter_nomad_yurt_paiza_obedience_bonus_lvl_2 } - } - nomad_yurt_paiza_obedience_bonus_lvl_3 = { - add = { value = 24 desc = domicile_building_parameter_nomad_yurt_paiza_obedience_bonus_lvl_3 } - } - } - } - } - } - - # Relationships - if = { - limit = { has_relation_blood_brother = obedience_target } - add = { value = 1250 desc = obedience_value_blood_brother } - } - else_if = { - limit = { has_relation_best_friend = obedience_target } - add = { value = 1000 desc = obedience_value_best_friend } - } - else_if = { - limit = { has_relation_friend = obedience_target } - add = { value = 100 desc = obedience_value_friend } - } - else_if = { - limit = { has_relation_ward = obedience_target } - add = { value = 50 desc = obedience_value_ward } - } - else_if = { - limit = { has_relation_guardian = obedience_target } - add = { value = 50 desc = obedience_value_guardian } - } - else_if = { - limit = { has_relation_rival = obedience_target } - add = { value = -100 desc = obedience_value_rival } - } - else_if = { - limit = { has_relation_nemesis = obedience_target } - add = { value = -1000 desc = obedience_value_nemesis } - } - else_if = { - limit = { - NOR = { - has_relation_lover = obedience_target - has_relation_potential_lover = obedience_target - has_relation_crush = obedience_target - has_relation_potential_friend = obedience_target - } - } - add = { value = -50 desc = obedience_value_not_good_relationship } - } - - # Employment - if = { # Is this person in your kurultai? - limit = { - this != obedience_target.primary_spouse - is_councillor_of = obedience_target - } - add = { value = 25 desc = obedience_value_councillor } - } - else_if = { # They're not in your Kurultai - limit = { - NOT = { - is_councillor_of = obedience_target - } - can_be_any_kurultai_trigger = { COURT_OWNER = obedience_target } - } - add = { value = -25 desc = obedience_value_no_kurultai } - } - if = { # Is this your Yeke Jarquchi? - limit = { - obedience_target.court_position:yeke_jarquchi_court_position ?= this - } - add = { value = 50 desc = obedience_value_yeke_jarquchi } - } - else_if = { # Is this your Court Astrologer? - limit = { - obedience_target.court_position:court_astrologer_court_position ?= this - } - add = { value = 25 desc = obedience_value_court_astrologer } - } - else_if = { # Or are they employed by you in any other way? - limit = { - is_courtier_of = obedience_target - has_any_court_position = yes - } - add = { value = 15 desc = obedience_value_court_position } - } - else_if = { # You don't employ them - limit = { - is_courtier_of = obedience_target - has_any_court_position = no - } - add = { value = -15 desc = obedience_value_no_court_position } - } - - # Legitimacy - if = { - limit = { - obedience_target = { - has_nomadic_legitimacy = yes - legitimacy_level >= 3 - } - } - add = { value = 25 desc = obedience_value_high_legitimacy } - } - else = { - add = { value = -15 desc = obedience_value_low_legitimacy } - } - - # Traits - switch = { - trigger = has_trait - loyal = { add = { value = 25 desc = personality_traitdesc.trait.loyal } } - craven = { add = { value = 25 desc = personality_traitdesc.trait.craven } } - content = { add = { value = 10 desc = personality_traitdesc.trait.content } } - humble = { add = { value = 10 desc = personality_traitdesc.trait.humble } } - gregarious = { add = { value = 5 desc = personality_traitdesc.trait.gregarious } } - diligent = { add = { value = 5 desc = personality_traitdesc.trait.diligent } } - disloyal = { add = { value = -25 desc = personality_traitdesc.trait.disloyal } } - deceitful = { add = { value = -25 desc = personality_traitdesc.trait.deceitful } } - stubborn = { add = { value = -25 desc = personality_traitdesc.trait.stubborn } } - arrogant = { add = { value = -20 desc = personality_traitdesc.trait.arrogant } } - paranoid = { add = { value = -10 desc = personality_traitdesc.trait.paranoid } } - ambitious = { add = { value = -10 desc = personality_traitdesc.trait.ambitious } } - brave = { add = { value = -5 desc = personality_traitdesc.trait.brave } } - } - - if = { - limit = { - obedience_target = { has_trait = greatest_of_khans } - } - add = { value = 50 desc = obedience_greatest_of_khans } - } - else_if = { - limit = { - obedience_target = { has_trait = conqueror } - } - add = { value = 35 desc = obedience_conqueror_trait } - } - else_if = { - limit = { - obedience_target = { has_character_modifier = the_great_khan_modifier } - } - add = { value = 20 desc = obedience_greatest_of_khans_descendant } - } - - # Other - if = { # Children - limit = { is_adult = no } - if = { - limit = { is_courtier_of = obedience_target } - add = { value = 125 desc = obedience_value_child_courtier } - } - else = { - add = { value = 100 desc = obedience_value_child_vassal } - switch = { - trigger = has_trait - rowdy = { add = { value = -25 desc = personality_traitdesc.trait.rowdy } } - bossy = { add = { value = -25 desc = personality_traitdesc.trait.bossy } } - charming = { add = { value = 25 desc = personality_traitdesc.trait.charming } } - curious = { add = { value = -25 desc = personality_traitdesc.trait.curious } } - pensive = { add = { value = -25 desc = personality_traitdesc.trait.pensive } } - } - } - } - if = { # Low Prowess - limit = { - obedience_target.prowess <= this.prowess - } - add = { value = -15 desc = obedience_value_low_prowess } - } - - if = { # Low Dread - limit = { - obedience_target.dread < this.dread - } - add = { value = -10 desc = obedience_value_low_dread } - } - else_if = { # High Dread - limit = { - obedience_target.dread > 10 - obedience_target.dread > this.dread - } - add = { - value = obedience_target.dread - multiply = 0.5 - desc = obedience_value_high_dread - } - } - else_if = { - limit = { - obedience_target.dread < 10 - } - add = { value = -5 desc = obedience_value_insignificant_dread } - } - - if = { # Truce - limit = { - has_truce = obedience_target - } - add = { value = 50 desc = obedience_value_truce } - } - - if = { # Larger Herd - limit = { - exists = domicile - domicile.herd >= 100 - domicile.herd > obedience_target.domicile.herd - } - add = { value = -500 desc = obedience_value_herd_size } - } - - if = { # Larger army - limit = { - current_military_strength >= 100 - current_military_strength > obedience_target.current_military_strength - } - add = { value = -500 desc = obedience_value_military_might } - } - - #CULTRADS - if = { - limit = { - culture = { - has_cultural_parameter = nomadic_loyal_soldiers_obedience - } - } - add = { value = 25 desc = obedience_value_loyal_soldiers } - } - } - } -} - -excess_herd_opinion_value = { - min = 10 - max = 50 - - add = 10 - - if = { - limit = { - excess_herd_value >= twenty_percent_over_herd_value - } - add = 10 - } - if = { - limit = { - excess_herd_value >= forty_percent_over_herd_value - } - add = 10 - } - if = { - limit = { - excess_herd_value >= sixty_percent_over_herd_value - } - add = 10 - } - if = { - limit = { - excess_herd_value >= eighty_percent_over_herd_value - } - add = 10 - } -} - -twenty_percent_over_herd_value = { - value = domicile.max_herd - add = domicile.twenty_percent_herd_value -} - -forty_percent_over_herd_value = { - value = domicile.max_herd - add = domicile.forty_percent_herd_value -} - -sixty_percent_over_herd_value = { - value = domicile.max_herd - add = domicile.sixty_percent_herd_value -} - -eighty_percent_over_herd_value = { - value = domicile.max_herd - add = domicile.eighty_percent_herd_value -} - -age_minus_ten = { - value = age - subtract = 10 -} - -age_plus_ten = { - value = age - add = 10 -} - -settlement_issue_control_reward = 25 -settlement_issue_control_penalty = -25 -settlement_issue_herd_reward = minor_herd_value_static -settlement_issue_fertility_reward = tiny_county_fertility_level_gain - -mpo_expand_steppe_prestige_cost = major_prestige_value -mpo_expand_steppe_gold_cost = { - value = medium_gold_value -} - -################################################ -### NOMAD MAA REFILL VALUES - -herd_refill_value = { - value = 0.4 - if = { - limit = { - trigger_if = { - limit = { exists = scope:nomad_temp } - } - trigger_else = { always = no } - } - multiply = { - add = scope:nomad_temp.martial - subtract = 8 - divide = 100 - add = 1 - } - } - if = { - limit = { - has_game_rule = hard_difficulty - scope:nomad_temp ?= { - is_ai = no - } - } - multiply = 0.5 - } - else_if = { - limit = { - has_game_rule = very_hard_difficulty - scope:nomad_temp ?= { - is_ai = no - } - } - multiply = 0.2 - } -} - -herd_refill_value_tt = { - value = 0.4 - multiply = { - add = martial - subtract = 8 - divide = 100 - add = 1 - } - if = { - limit = { - is_ai = no - has_game_rule = hard_difficulty - } - multiply = 0.5 - } - if = { - limit = { - is_ai = no - has_game_rule = very_hard_difficulty - } - multiply = 0.2 - } -} - -martial_discount_herd_refill_value_tt = { - add = martial - subtract = 8 - multiply = -1 - divide = 100 -} - -replenishable_troops_with_herd_value = { - value = replenishable_troops_value - max = { - add = scope:current_herd_max_value_scope - multiply = herd_refill_value - } -} - -replenishable_troops_max_herd_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.herd - divide = herd_refill_value - multiply = -1 -} - -replenishable_troops_payed_herd_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 = herd_refill_value_tt - max = domicile.herd -} - -replenishable_troops_max_herd_tt_value = { - value = 0 - every_maa_regiment = { - add = { - add = maa_max_troops_count - subtract = maa_current_troops_count - } - } - max = { - value = domicile.herd - multiply = herd_refill_value_tt - } -} - -###################################################### - -high_skill_court_astrologer_cost = { - value = medium_gold_value -} - -low_skill_court_astrologer_cost = { - value = minor_gold_value -} - -high_skill_siege_engineer_cost = { - value = medium_gold_value -} - -low_skill_siege_engineer_cost = { - value = minor_gold_value -} - -high_skill_foreign_emissary_cost = { - value = medium_gold_value -} - -low_skill_foreign_emissary_cost = { - value = minor_gold_value -} - -###################################################### - -nomadic_cultural_maa_bonus_low_value = 0.1 -nomadic_cultural_maa_bonus_medium_value = 0.2 -nomadic_cultural_maa_bonus_high_value = 0.4 - -dominate_title_current_ally_strength = { - value = root.current_military_strength - every_tributary = { - limit = { - vassal_contract_has_flag = tributary_contract_tributary_forced_war_override - } - add = root.current_military_strength - } - every_ally = { - add = root.current_military_strength - } -} - -dominate_title_current_enemy_strength = { - value = 0 - root.primary_title.de_jure_liege ?= { - every_de_jure_county_holder = { - limit = { - is_landed = yes - NOR = { - is_allied_to = root - top_liege = root - top_suzerain ?= root - government_has_flag = government_is_herder - } - is_independent_ruler = yes - } - add = current_military_strength - } - } -} - -mpo_de_jure_title_value = { - value = root.highest_held_title_tier - subtract = 1 -} - -sub_realm_with_tributaries_size = { - value = { - add = sub_realm_size - every_tributary = { - every_sub_realm_county = { - add = 1 - } - every_tributary = { - every_sub_realm_county = { - add = 1 - } - every_tributary = { - every_sub_realm_county = { - add = 1 - } - every_tributary = { - every_sub_realm_county = { - add = 1 - } - } - } - } - } - } -} -mpo_greatest_of_khans_target_counties = { - value = 50 -} -mpo_greatest_of_khans_target_counties_tributaries = { - value = 100 -} - -mpo_gok_world_conquest_target_counties = { - value = 1000 -} -mpo_gok_world_conquest_target_counties_tributaries = { - value = 1500 -} - -ninety_percent_gold_value = { - value = gold - multiply = 0.9 -} - -negative_seventy_five_percent_prestige_value = { - value = prestige - multiply = -0.8 -} - -gok_obedient_vassals_strength_value = { - value = 0 - every_in_list = { - list = obedient_nomad_vassals - limit = { - any_character_war = { - using_cb = mpo_great_war_of_defiance_cb - } - } - add = 1 - if = { - limit = { - highest_held_title_tier >= tier_duchy - } - add = 2 - } - if = { - limit = { - highest_held_title_tier >= tier_kingdom - } - add = 3 - } - } - min = 1 -} - -fought_gok_alone_value = { - value = miniscule_dynasty_prestige_gain - multiply = root.var:fought_for_gok_alone - min = 1 -} - -mpo_domicile_yurt_marriage_acceptance_value = { - value = 0 - scope:actor.domicile ?= { - switch = { - trigger = has_domicile_parameter - nomad_yurt_marriage_acceptance_lvl_1 = { add = 5 } - nomad_yurt_marriage_acceptance_lvl_2 = { add = 10 } - nomad_yurt_marriage_acceptance_lvl_3 = { add = 20 } - nomad_yurt_marriage_acceptance_lvl_4 = { add = 30 } - } - switch = { - trigger = has_domicile_parameter - nomad_main_yurt_marriage_acceptance_lvl_1 = { add = 5 } - nomad_main_yurt_marriage_acceptance_lvl_2 = { add = 10 } - nomad_main_yurt_marriage_acceptance_lvl_3 = { add = 15 } - nomad_main_yurt_marriage_acceptance_lvl_4 = { add = 20 } - } - } -} - -potential_joiner_combined_value = { - value = 0 - every_in_list = { - list = potential_joiners - add = 1 - if = { - limit = { - highest_held_title_tier >= tier_duchy - } - add = 2 - } - if = { - limit = { - highest_held_title_tier >= tier_kingdom - } - add = 3 - } - } - min = 1 -} - - -mpo_domicile_yurt_marriage_acceptance_value = { - value = 0 - scope:actor.domicile ?= { - switch = { - trigger = has_domicile_parameter - nomad_yurt_marriage_acceptance_lvl_1 = { add = 5 } - nomad_yurt_marriage_acceptance_lvl_2 = { add = 10 } - nomad_yurt_marriage_acceptance_lvl_3 = { add = 20 } - nomad_yurt_marriage_acceptance_lvl_4 = { add = 30 } - } - switch = { - trigger = has_domicile_parameter - nomad_main_yurt_marriage_acceptance_lvl_1 = { add = 5 } - nomad_main_yurt_marriage_acceptance_lvl_2 = { add = 10 } - nomad_main_yurt_marriage_acceptance_lvl_3 = { add = 15 } - nomad_main_yurt_marriage_acceptance_lvl_4 = { add = 20 } - } - } -} - -sent_herd_opinion_value = { - 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 - } -} - -herd_gift_value = { - value = scope:actor.domicile.minor_herd_value - if = { - limit = { - scope:recipient.ai_greed > 0 - } - add = { - value = scope:recipient.ai_greed - divide = 4 - } - } - - if = { - limit = { - scope:actor = { - exists = dynasty - dynasty = { - has_dynasty_perk = fp1_adventure_legacy_2 - } - } - } - multiply = 0.5 - } -} - -mpo_current_disobedient_kurultai_value = { - value = 0 - every_councillor = { - limit = { - OR = { - root.cp:councillor_kurultai_1 ?= this - root.cp:councillor_kurultai_2 ?= this - root.cp:councillor_kurultai_3 ?= this - root.cp:councillor_kurultai_4 ?= this - } - is_obedient = no - } - add = 1 - } - switch = { - trigger = has_realm_law - nomadic_authority_5 = { - ordered_child = { - order_by = age - max = define:NKurultai|KURULTAI_SUCCESSION_CHILD_ELECTORS_DOMINANCE_5 - check_range_bounds = no - limit = { - age >= define:NKurultai|KURULTAI_SUCCESSION_CHILD_MINIMUM_AGE - obedience_target = root - } - if = { - limit = { - NOR = { - is_obedient_to = root - root.cp:councillor_kurultai_1 ?= this - root.cp:councillor_kurultai_2 ?= this - root.cp:councillor_kurultai_3 ?= this - root.cp:councillor_kurultai_4 ?= this - } - } - add = 1 - } - } - } - nomadic_authority_4 = { - ordered_child = { - order_by = age - max = define:NKurultai|KURULTAI_SUCCESSION_CHILD_ELECTORS_DOMINANCE_4 - check_range_bounds = no - limit = { - age >= define:NKurultai|KURULTAI_SUCCESSION_CHILD_MINIMUM_AGE - obedience_target = root - } - if = { - limit = { - NOR = { - is_obedient_to = root - root.cp:councillor_kurultai_1 ?= this - root.cp:councillor_kurultai_2 ?= this - root.cp:councillor_kurultai_3 ?= this - root.cp:councillor_kurultai_4 ?= this - } - } - add = 1 - } - } - } - nomadic_authority_3 = { - ordered_child = { - order_by = age - max = define:NKurultai|KURULTAI_SUCCESSION_CHILD_ELECTORS_DOMINANCE_3 - check_range_bounds = no - limit = { - age >= define:NKurultai|KURULTAI_SUCCESSION_CHILD_MINIMUM_AGE - obedience_target = root - } - if = { - limit = { - NOR = { - is_obedient_to = root - root.cp:councillor_kurultai_1 ?= this - root.cp:councillor_kurultai_2 ?= this - root.cp:councillor_kurultai_3 ?= this - root.cp:councillor_kurultai_4 ?= this - } - } - add = 1 - } - } - } - nomadic_authority_2 = { - ordered_child = { - order_by = age - max = define:NKurultai|KURULTAI_SUCCESSION_CHILD_ELECTORS_DOMINANCE_2 - check_range_bounds = no - limit = { - age >= define:NKurultai|KURULTAI_SUCCESSION_CHILD_MINIMUM_AGE - obedience_target = root - } - if = { - limit = { - NOR = { - is_obedient_to = root - root.cp:councillor_kurultai_1 ?= this - root.cp:councillor_kurultai_2 ?= this - root.cp:councillor_kurultai_3 ?= this - root.cp:councillor_kurultai_4 ?= this - } - } - add = 1 - } - } - } - nomadic_authority_1 = { - ordered_child = { - order_by = age - max = define:NKurultai|KURULTAI_SUCCESSION_CHILD_ELECTORS_DOMINANCE_1 - check_range_bounds = no - limit = { - age >= define:NKurultai|KURULTAI_SUCCESSION_CHILD_MINIMUM_AGE - obedience_target = root - } - if = { - limit = { - NOR = { - is_obedient_to = root - root.cp:councillor_kurultai_1 ?= this - root.cp:councillor_kurultai_2 ?= this - root.cp:councillor_kurultai_3 ?= this - root.cp:councillor_kurultai_4 ?= this - } - } - add = 1 - } - } - } - } -} - -mpo_missing_kurultai_value = { - value = 0 - if = { - limit = { - NOT = { exists = cp:councillor_kurultai_1 } - } - add = 1 - } - if = { - limit = { - NOT = { exists = cp:councillor_kurultai_2 } - } - add = 1 - } - if = { - limit = { - NOT = { exists = cp:councillor_kurultai_3 } - } - add = 1 - } - if = { - limit = { - NOT = { exists = cp:councillor_kurultai_4 } - } - add = 1 - } -} - -gok_era_scaling_value = { - if = { - limit = { - current_date >= 1300 - } - value = 5 - } - else_if = { - limit = { - any_culture_global = { - has_cultural_era_or_later = culture_era_late_medieval - } - } - value = 3 - } - else_if = { - limit = { - any_culture_global = { - has_cultural_era_or_later = culture_era_high_medieval - } - } - value = 2 - } - else_if = { - limit = { - any_culture_global = { - has_cultural_era_or_later = culture_era_early_medieval - } - } - value = 1.5 - } - else = { - value = 1 - } -} - -gok_nomadic_riders_small_value = { - value = 12 - multiply = gok_era_scaling_value -} - -gok_nomadic_riders_large_value = { - value = 20 - multiply = gok_era_scaling_value -} - -gok_maa_small_value = { - value = 1 - multiply = gok_era_scaling_value -} - -gok_maa_smallish_value = { - value = 2 - multiply = gok_era_scaling_value -} - -gok_maa_medium_value = { - value = 3 - multiply = gok_era_scaling_value -} - -gok_maa_largish_value = { - value = 4 - multiply = gok_era_scaling_value -} - -gok_maa_large_value = { - value = 5 - multiply = gok_era_scaling_value -} - -#These are the values that will have a HUGE impact on how strong the Greatest of Khans gets -#They provide troops when he subjugates lands through war or interaction - -gok_subjugated_army_levy_value = { - value = 200 - if = { - limit = { - scope:army_giver = { - highest_held_title_tier >= tier_kingdom - } - } - add = 300 - } - if = { - limit = { - scope:army_giver = { - highest_held_title_tier >= tier_empire - } - } - add = 300 - } - if = { - limit = { - scope:army_giver = { - realm_size >= 1 - } - } - add = { - value = scope:army_giver.sub_realm_size - multiply = 20 - } - } - multiply = gok_era_scaling_value -} -gok_subjugated_army_maa_value_very_large = { - value = 0 - if = { - limit = { - scope:army_giver = { - realm_size >= 1 - } - } - add = { - value = scope:army_giver.sub_realm_size - divide = 5 - } - } - multiply = gok_era_scaling_value - floor = yes - max = 24 -} -gok_subjugated_army_maa_value_large = { - value = 0 - if = { - limit = { - scope:army_giver = { - realm_size >= 1 - } - } - add = { - value = scope:army_giver.sub_realm_size - divide = 10 - } - } - multiply = gok_era_scaling_value - floor = yes - max = 16 -} -gok_subjugated_army_maa_value_medium = { - value = 0 - if = { - limit = { - scope:army_giver = { - realm_size >= 1 - } - } - add = { - value = scope:army_giver.sub_realm_size - divide = 15 - } - } - multiply = gok_era_scaling_value - floor = yes - max = 12 -} -gok_subjugated_army_maa_value_small = { - value = 0 - if = { - limit = { - scope:army_giver = { - realm_size >= 1 - } - } - add = { - value = scope:army_giver.sub_realm_size - divide = 20 - } - } - multiply = gok_era_scaling_value - floor = yes - max = 8 -} -gok_subjugated_army_maa_value_very_small = { - value = 0 - if = { - limit = { - scope:army_giver = { - realm_size >= 1 - } - } - add = { - value = scope:army_giver.sub_realm_size - divide = 40 - } - } - multiply = gok_era_scaling_value - floor = yes - max = 4 -} - -gok_retribution_dread_value = { - value = 0 - every_in_list = { - list = devastation_area - add = 2 - } -} - -gok_retribution_herd_value = { - value = 0 - every_in_list = { - list = devastation_area - add = scope:attacker.domicile.miniscule_herd_gain - } -} - -gok_retribution_gold_value = { - value = 0 - every_in_list = { - list = devastation_area - add = { - add = development_level - multiply = 3 - } - } -} - -yeke_jarquchi_aptitude_tooltip = { - value = 0 - if = { - limit = { - exists = court_position:yeke_jarquchi_court_position - } - add = "court_position:yeke_jarquchi_court_position.aptitude(yeke_jarquchi_court_position)" - } -} - -foreign_emissary_aptitude_tooltip = { - value = 0 - if = { - limit = { - exists = court_position:foreign_emissary_court_position - } - add = "court_position:foreign_emissary_court_position.aptitude(foreign_emissary_court_position)" - } -} diff --git a/N3OW/common/script_values/10_health_values.txt b/N3OW/common/script_values/10_health_values.txt deleted file mode 100644 index 957bbff0..00000000 --- a/N3OW/common/script_values/10_health_values.txt +++ /dev/null @@ -1,759 +0,0 @@ -# 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 - -underweight_value = -50 -overweight_value = 50 - -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/N3OW/common/script_values/50_major_decision_values.txt b/N3OW/common/script_values/50_major_decision_values.txt deleted file mode 100644 index a65e1ecf..00000000 --- a/N3OW/common/script_values/50_major_decision_values.txt +++ /dev/null @@ -1,48 +0,0 @@ - -#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 - -expand_duchy_max_size_value = { - value = 4 -} diff --git a/N3OW/common/script_values/50_pilgrimage_values.txt b/N3OW/common/script_values/50_pilgrimage_values.txt deleted file mode 100644 index bd8f1dcf..00000000 --- a/N3OW/common/script_values/50_pilgrimage_values.txt +++ /dev/null @@ -1,287 +0,0 @@ -##################### -# PILGRIMAGE VALUES # -##################### - -# Reward values -short_pilgrimage_piety_gain = { - value = medium_piety_gain - if = { - limit = { - exists = dynasty - dynasty = { - has_dynasty_perk = erudition_legacy_4 - } - } - multiply = 1.3 - } -} - -#Needs to be synced with the x_pilgrimage_piety_multiplier below to display the actual increase in % -medium_pilgrimage_piety_gain = { - value = medium_piety_gain - multiply = 1.5 - if = { - limit = { - exists = dynasty - dynasty = { - has_dynasty_perk = erudition_legacy_4 - } - } - multiply = 1.3 - } -} - -medium_pilgrimage_piety_multiplier = { value = 50 } - -long_pilgrimage_piety_gain = { - value = medium_piety_gain - multiply = 2.5 - if = { - limit = { - exists = dynasty - dynasty = { - has_dynasty_perk = erudition_legacy_4 - } - } - multiply = 1.3 - } -} - -long_pilgrimage_piety_multiplier = { value = 150 } - -very_long_pilgrimage_piety_gain = { - value = medium_piety_gain - multiply = 3.5 - if = { - limit = { - exists = dynasty - dynasty = { - has_dynasty_perk = erudition_legacy_4 - } - } - multiply = 1.3 - } -} - -very_long_pilgrimage_piety_multiplier = { value = 250 } - -#This needs to be synced with cost/length multipliers in the Solo Pilgrimage phase cost in the activity_types\pilgrimage.txt file -pilgrimage_length_cost_tier_1 = { - value = scope:host.medium_gold_value - multiply = 0.2 -} - -#Praha -> Cologne -pilgrimage_length_cost_tier_2 = { - value = scope:host.medium_gold_value - multiply = 0.4 -} - -pilgrimage_length_cost_tier_3 = { - value = scope:host.medium_gold_value - multiply = 0.6 -} - -pilgrimage_length_cost_tier_4 = { - value = scope:host.medium_gold_value - multiply = 0.8 -} - -pilgrimage_length_cost_tier_5 = { - value = scope:host.medium_gold_value - multiply = 1 -} - -#Klingenberg -> Jerusalem -pilgrimage_length_cost_tier_6 = { - value = scope:host.medium_gold_value - multiply = 1.2 -} - -#Klingenberg -> Kanchipuram -pilgrimage_length_cost_tier_7 = { - value = scope:host.medium_gold_value - multiply = 1.5 -} - -pilgrimage_low_pious_multiplier = { value = 1.1 } -#Make sure the multiplier values sync up with the multiplier_tt values to display the Reward Tiers as percentages -pilgrimage_low_pious_multiplier_tt = { - value = pilgrimage_low_pious_multiplier - multiply = 100 - subtract = 100 -} -pilgrimage_mid_pious_multiplier = { value = 1.25 } -#Make sure the multiplier values sync up with the multiplier_tt values to display the Reward Tiers as percentages -pilgrimage_mid_pious_multiplier_tt = { - value = pilgrimage_mid_pious_multiplier - multiply = 100 - subtract = 100 -} -pilgrimage_high_pious_multiplier = { value = 1.75 } -#Make sure the multiplier values sync up with the multiplier_tt values to display the Reward Tiers as percentages -pilgrimage_high_pious_multiplier_tt = { - value = pilgrimage_high_pious_multiplier - multiply = 100 - subtract = 100 -} -pilgrimage_perfect_pious_multiplier = { value = 2.5 } -#Make sure the multiplier values sync up with the multiplier_tt values to display the Reward Tiers as percentages -pilgrimage_perfect_pious_multiplier_tt = { - value = pilgrimage_perfect_pious_multiplier - multiply = 100 - subtract = 100 -} - -pilgrimage_low_pious_trait_xp_value = { value = medium_trait_xp } -pilgrimage_mid_pious_trait_xp_value = { value = major_trait_xp } -pilgrimage_high_pious_trait_xp_value = { value = massive_trait_xp } -pilgrimage_perfect_pious_trait_xp_value = { - value = massive_trait_xp - multiply = 2 -} - -pilgrimage_low_worldly_acceptance_value = { value = 1 } -pilgrimage_mid_worldly_acceptance_value = { value = 3 } -pilgrimage_high_worldly_acceptance_value = { value = 5 } -pilgrimage_perfect_worldly_acceptance_value = { value = 7 } - - -# Distances to target holy site -long_pilgrimage_max_length = 5000000 # 5M Over this distance, it will be an exceptionally long pilgrimage -medium_pilgrimage_max_length = 1000000 # 1M, slightly larger than 1 'holy roman empire' away -short_pilgrimage_max_length = 100000 # 100K, slightly larger than 1 'ireland' away. - -hajj_cooldown_value = 1 -pilgrimage_cooldown_value = 5 - -pilgrimage_entourage_pomp_appropriate_max_value = 5 -pilgrimage_entourage_pomp_ceremonial_max_value = 10 -pilgrimage_entourage_pomp_throng_max_value = 20 -# This one doesn't sync with anything, just presenting it here for consistency/ease of tweaking. -pilgrimage_entourage_pomp_humble_max_value = 7 - -pilgrimage_entourage_base_set_weighting_value = { - if = { - limit = { bannable_serving_diarch_trigger = no } - # We want to have bodyguards most of all. - if = { - limit = { has_court_position = bodyguard_court_position } - add = 1000 - } - if = { - limit = { has_court_position = akolouthos_court_position } - add = 1000 - } - # But we'll settle for knights. - else_if = { - limit = { - is_knight = yes - prowess >= high_skill_rating - } - # We keep the weight low, since you'll probably have a good few such knights and we don't want them hogging all the spots. - add = 5 - } - # Also maybe someone to just chat to. - ## Positive relations. - if = { - limit = { - has_any_good_relationship_with_character_trigger = { CHARACTER = scope:host } - } - # Same faith, standard weight. - if = { - limit = { faith = scope:host.faith } - add = 100 - } - # Other faith, _ehhhh_, they're for company but it's still a spiritual shindig. - else = { add = 10 } - } - ## Religious figures. - if = { - limit = { - save_temporary_scope_as = current_char - OR = { - liege ?= { cp:councillor_court_chaplain ?= scope:current_char } - AND = { - faith = scope:host.faith - has_trait = devoted - } - } - } - add = 300 - } - } - if = { - limit = { - bannable_serving_diarch_trigger = yes - } - add = -5000 - } -} - -pilgrimage_entourage_extras_set_weighting_value = { - # Same-faith only for all of these. - if = { - limit = { - faith = scope:host.faith - bannable_serving_diarch_trigger = no - } - # Assorted hangers-on. - ## Anyone with a court position. - if = { - limit = { has_any_court_position = yes } - add = 50 - } - ## Zealous courtiers & those with high learning. - if = { - limit = { - OR = { - has_trait = zealous - AND = { - learning >= very_high_skill_rating - NOT = { has_trait = cynical } - } - } - } - add = 25 - } - } - if = { - limit = { - bannable_serving_diarch_trigger = yes - } - add = -5000 - } -} - -pilgrimage_entourage_sodding_everyone_set_weighting_value = { - # Same-faith only for all of these. - if = { - limit = { - faith = scope:host.faith - is_designated_diarch = no - } - # Alright, now we're just grabbing everyone. - ## Plus landless councillors. - if = { - limit = { is_councillor = yes } - add = 100 - } - ## Anyone with a learning education. - if = { - limit = { has_trait = education_learning } - add = 25 - } - ## Finally, any adult courtier. - if = { - limit = { is_adult = yes } - add = 1 - } - } - if = { - limit = { - bannable_serving_diarch_trigger = yes - } - add = -5000 - } -} diff --git a/N3OW/common/script_values/50_province_values.txt b/N3OW/common/script_values/50_province_values.txt deleted file mode 100644 index fb5ae168..00000000 --- a/N3OW/common/script_values/50_province_values.txt +++ /dev/null @@ -1,3 +0,0 @@ -low_available_loot_value = 5 -medium_available_loot_value = 10 -high_available_loot_value = 15 \ No newline at end of file diff --git a/N3OW/common/script_values/50_tribal_values.txt b/N3OW/common/script_values/50_tribal_values.txt deleted file mode 100644 index 54bc699d..00000000 --- a/N3OW/common/script_values/50_tribal_values.txt +++ /dev/null @@ -1,21 +0,0 @@ -feudalize_holding_interaction_cost = { - value = 500 - if = { - limit = { - is_ai = yes - capital_province = { has_holding_type = tribal_holding } - } - add = -250 - } - if = { - limit = { - scope:target ?= { - OR = { - has_county_modifier = mpo_siberian_permafrost_modifier - has_county_modifier = mpo_siberian_permafrost_modifier_bad - } - } - } - add = 2000 - } -} diff --git a/N3OW/common/script_values/99_casus_belli_values.txt b/N3OW/common/script_values/99_casus_belli_values.txt deleted file mode 100644 index 4dfec65d..00000000 --- a/N3OW/common/script_values/99_casus_belli_values.txt +++ /dev/null @@ -1,1304 +0,0 @@ - -# 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 - } - } - #Confederation vassals against fellow vassals - if = { - limit = { - scope:attacker = { - OR = { - government_has_flag = government_is_tribal - government_has_flag = government_is_nomadic - government_has_flag = government_is_herder - } - } - scope:attacker.top_liege = { - is_confederation_member = yes - } - scope:defender.top_liege = { - this = scope:attacker.top_liege - } - } - multiply = { - add = confederation_cb_cost_value - desc = CB_CONFEDERATION_VASSALS - } - } - # 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 = { - OR = { - has_game_rule = hard_difficulty - has_game_rule = very_hard_difficulty - } - scope:attacker = { - is_ai = yes - prestige > 0 - prestige_level > 0 - } - scope:defender = { - is_ai = no - } - } - multiply = { - value = 0 - desc = hard_difficulty - } - } - else_if = { - limit = { - OR = { - has_game_rule = hard_difficulty - has_game_rule = very_hard_difficulty - } - scope:attacker = { - is_ai = yes - prestige > 0 - prestige_level > 0 - } - } - multiply = { - value = 0.5 - desc = hard_difficulty - } - } - - 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 - } - } - #Pissed off by a severed head - if = { - limit = { - scope:defender = { - save_temporary_scope_as = head_giver - } - scope:attacker = { - has_variable = severed_head_cb_revenge - var:severed_head_cb_revenge = { - this = scope:head_giver - } - } - } - multiply = { - value = 0.25 - desc = severed_head_revenge_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" - } - } - #You and your blood brother swore to destroy your target - if = { - limit = { - scope:attacker = { - has_variable = blood_brother_foe - var:blood_brother_foe = { - this = scope:defender - } - } - } - multiply = { - value = 0.25 - desc = "CB_BLOOD_BROTHER_FOE" - } - } -} - -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" - } - } - #You and your blood brother swore to destroy your target - if = { - limit = { - scope:attacker = { - has_variable = blood_brother_foe - var:blood_brother_foe = { - this = scope:defender - } - } - } - multiply = { - value = 0.25 - desc = "CB_BLOOD_BROTHER_FOE" - } - } -} - -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/N3OW/common/script_values/99_chancellor_values.txt b/N3OW/common/script_values/99_chancellor_values.txt deleted file mode 100644 index d617a779..00000000 --- a/N3OW/common/script_values/99_chancellor_values.txt +++ /dev/null @@ -1,856 +0,0 @@ -################## -# 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_has_flag = government_is_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_has_flag = government_is_administrative } - } - trigger_if = { - limit = { exists = scope:county.empire.holder } - scope:county.empire.holder = { government_has_flag = government_is_administrative } - } - trigger_else = { - scope:county.kingdom.holder ?= { - is_independent_ruler = yes - government_has_flag = government_is_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 - } -} -### Kurultai Learn on the Job modifier -kurultai_chancellor_learn_on_the_job_scale = { - value = 0 - if = { - limit = { - exists = liege - liege = { has_perk = learn_on_the_job_perk } - highest_skill = diplomacy - } - 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/N3OW/common/script_values/99_court_chaplain_values.txt b/N3OW/common/script_values/99_court_chaplain_values.txt deleted file mode 100644 index f65ef8d9..00000000 --- a/N3OW/common/script_values/99_court_chaplain_values.txt +++ /dev/null @@ -1,1740 +0,0 @@ - -########## -# 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 - } - } - ## 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 - } - } - ### 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 = { - scope:county ?= { has_county_modifier = petition_liege_county_convert_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_mahoyadapuram = { - 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 - } - } - if = { - limit = { - exists = scope:county - scope:county = { - has_county_modifier = internal_affairs_county_religious_tensions_modifier - } - } - add = { - value = -0.2 - desc = RELIGIOUS_TENSIONS_DESC - } - } - if = { - limit = { - exists = scope:county - scope:county = { - has_county_modifier = internal_affairs_county_religious_tolerance_modifier - } - } - add = { - value = -0.1 - desc = RELIGIOUS_TOLERANCE_DESC - } - } -} - -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_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 - } -} - -##### Kurultai Learn on the Job Skill bonus for Liege -kurultai_court_chaplain_learn_on_the_job_scale = { - value = 0 - if = { - limit = { - liege = { has_perk = learn_on_the_job_perk } - highest_skill = learning - } - 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/N3OW/common/script_values/99_debug_values.txt b/N3OW/common/script_values/99_debug_values.txt deleted file mode 100644 index 5f0021f9..00000000 --- a/N3OW/common/script_values/99_debug_values.txt +++ /dev/null @@ -1,74 +0,0 @@ - -debug_current_dread = { - add = dread -} - -debug_number_of_unintimidated_vassals = { - every_vassal = { - limit = { - has_dread_level_towards = { - target = root - level = 0 - } - } - add = 1 - } -} -debug_number_of_intimidated_vassals = { - every_vassal = { - limit = { - has_dread_level_towards = { - target = root - level = 1 - } - } - add = 1 - } -} -debug_number_of_cowed_vassals = { - every_vassal = { - limit = { - has_dread_level_towards = { - target = root - level = 2 - } - } - add = 1 - } -} - -debug_percentage_of_dread_affected_vassals = { - every_vassal = { - limit = { - has_dread_level_towards = { - target = root - level > 0 - } - } - add = 1 - } - divide = { - every_vassal = { - add = 1 - } - } - multiply = 100 -} - -debug_percentage_of_cowed_vassals = { - every_vassal = { - limit = { - has_dread_level_towards = { - target = root - level = 2 - } - } - add = 1 - } - divide = { - every_vassal = { - add = 1 - } - } - multiply = 100 -} diff --git a/N3OW/common/script_values/99_kurultai_values.txt b/N3OW/common/script_values/99_kurultai_values.txt deleted file mode 100644 index 3c163ab2..00000000 --- a/N3OW/common/script_values/99_kurultai_values.txt +++ /dev/null @@ -1,303 +0,0 @@ -### -# Kurultai yurts bonuses -kurultai_main_yurt_bonus = { - value = 1 - if = { - limit = { - exists = scope:councillor_liege - exists = scope:councillor_liege.domicile - } - scope:councillor_liege.domicile ?= { - switch = { - trigger = has_domicile_parameter - main_yurt_kurultai_bonus_lvl_1 = { - add = 0.05 - } - main_yurt_kurultai_bonus_lvl_2 = { - add = 0.1 - } - main_yurt_kurultai_bonus_lvl_3 = { - add = 0.15 - } - } - switch = { - trigger = has_domicile_parameter - nomad_yurt_better_kurultai_lvl_1 = { - add = 0.05 - } - nomad_yurt_better_kurultai_lvl_2 = { - add = 0.1 - } - nomad_yurt_better_kurultai_lvl_3 = { - add = 0.15 - } - } - switch = { - trigger = has_domicile_parameter - nomad_yurt_kurultai_skill_increase_per_piety_lvl_1 = { - add = { - value = scope:councillor_liege.piety_level - multiply = 0.01 - min = 0 - } - } - nomad_yurt_kurultai_skill_increase_per_piety_lvl_2 = { - add = { - value = scope:councillor_liege.piety_level - multiply = 0.02 - min = 0 - } - } - } - } - } -} - -### Managing Herd -# Base skills -kurultai_manage_herd_skill_tooltip = { - add = diplomacy -} - -# Base value -kurultai_manage_herd_base_value = { - add = 0.5 -} - -kurultai_manage_herd_skill_value = { - add = diplomacy - divide = 4 - if = { - limit = { - councillor_liege_has_erudition_legacy_5_perk = yes - } - multiply = 1.1 - } - multiply = kurultai_main_yurt_bonus -} - -kurultai_manage_herd_final_value = { - add = kurultai_manage_herd_base_value - add = kurultai_manage_herd_skill_value -} - -### Increasing Fertility -kurultai_increased_fertility_skill_tooltip = { - add = stewardship -} - -kurultai_increased_fertility_base_value = { - add = 1 -} - -kurultai_increased_fertility_skill_value = { - add = stewardship - if = { - limit = { - councillor_liege_has_erudition_legacy_5_perk = yes - } - multiply = 1.1 - } - multiply = kurultai_main_yurt_bonus - multiply = 2 -} - -kurultai_increased_fertility_scale_value = { - add = kurultai_increased_fertility_final_value -} - - -kurultai_increased_fertility_final_value = { - add = kurultai_increased_fertility_base_value - add = kurultai_increased_fertility_skill_value -} - -### Increasing Control -kurultai_increase_control_skill_tooltip = { - add = martial -} - -### Aiding Court Astrologer -kurultai_court_astrologer_skill_tooltip = { - add = learning -} - -kurultai_court_astrologer_piety_base_value = { - add = 1 -} - -kurultai_court_astrologer_piety_skill_value = { - add = learning - divide = 5 - if = { - limit = { - councillor_liege_has_erudition_legacy_5_perk = yes - } - multiply = 1.1 - } - multiply = kurultai_main_yurt_bonus -} - -kurultai_court_astrologer_piety_final_value = { - add = kurultai_court_astrologer_piety_base_value - add = kurultai_court_astrologer_piety_skill_value - if = { - limit = { - scope:councillor_liege = { has_perk = zealous_proselytizer_perk } - } - multiply = 2 # Make sure to make this number always match zealous_proselytizer_stargazer_percentage - } - max = 10 -} - -kurultai_court_astrologer_aptitude_base_value = { - add = 1 -} - -kurultai_court_astrologer_aptitude_skill_value = { - add = learning - divide = 4 - if = { - limit = { - councillor_liege_has_erudition_legacy_5_perk = yes - } - multiply = 1.1 - } - multiply = kurultai_main_yurt_bonus -} - -kurultai_court_astrologer_aptitude_final_value = { - add = kurultai_court_astrologer_aptitude_base_value - add = kurultai_court_astrologer_aptitude_skill_value - max = 15 -} - -### Exploit Area -kurultai_exploit_area_fertility_base_value = { - add = 1.5 -} - -kurultai_exploit_area_fertility_skill_value = { - add = stewardship - divide = 25 - if = { - limit = { - councillor_liege_has_erudition_legacy_5_perk = yes - } - multiply = 1.1 - } - multiply = kurultai_main_yurt_bonus - max = 1.3 -} - -kurultai_exploit_area_fertility_final_value = { - add = kurultai_exploit_area_fertility_base_value - subtract = kurultai_exploit_area_fertility_skill_value - min = 0.2 - max = 1.5 -} - -kurultai_exploit_area_income_base_value = { - add = 1 -} - -kurultai_exploit_area_income_skill_value = { - add = stewardship - if = { - limit = { - councillor_liege_has_erudition_legacy_5_perk = yes - } - multiply = 1.1 - } - multiply = kurultai_main_yurt_bonus -} - -kurultai_exploit_area_income_final_value = { - add = kurultai_exploit_area_income_base_value - add = kurultai_exploit_area_income_skill_value -} - -### Organize Raiders -kurultai_organize_raiders_loot_base_value = { - add = 0.5 -} - -kurultai_organize_raiders_loot_skill_value = { - add = martial - if = { - limit = { - councillor_liege_has_erudition_legacy_5_perk = yes - } - multiply = 1.1 - } - multiply = kurultai_main_yurt_bonus -} - -kurultai_organize_raiders_loot_final_value = { - add = kurultai_organize_raiders_loot_base_value - add = kurultai_organize_raiders_loot_skill_value -} - -kurultai_organize_raiders_raid_base_value = { - add = 3 -} - -kurultai_organize_raiders_raid_skill_value = { - add = martial - divide = 2 - if = { - limit = { - councillor_liege_has_erudition_legacy_5_perk = yes - } - multiply = 1.1 - } - multiply = kurultai_main_yurt_bonus -} - -kurultai_organize_raiders_raid_final_value = { - add = kurultai_organize_raiders_raid_base_value - add = kurultai_organize_raiders_raid_skill_value -} - -### Culture -kurultai_culture_max_value = { - add = learning - multiply = 2 - max = 50 -} - -kurultai_culture_base_monthly_increase = { - value = 0.05 -} - -kurultai_culture_skill_monthly_increase = { - add = learning - multiply = 2 - divide = 24 -} - -kurultai_culture_perk_monthly_increase = { - value = 0 - if = { - limit = { - scope:councillor_liege = { has_perk = of_the_people_perk } - } - add = 2 - } -} - -kurultai_culture_monthly_increase = { - add = kurultai_culture_base_monthly_increase - add = kurultai_culture_skill_monthly_increase - add = kurultai_culture_perk_monthly_increase -} - -kurultai_culture_final_value = { - value = 0 - if = { - limit = { - scope:councillor_liege = { has_variable = kurultai_culture_variable_value } - } - add = scope:councillor_liege.var:kurultai_culture_variable_value - } -} diff --git a/N3OW/common/script_values/99_marshal_values.txt b/N3OW/common/script_values/99_marshal_values.txt deleted file mode 100644 index 9bb4c36a..00000000 --- a/N3OW/common/script_values/99_marshal_values.txt +++ /dev/null @@ -1,664 +0,0 @@ - -###################### -# 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 - } -} - -kurultai_marshal_learn_on_the_job_scale = { - value = 0 - if = { - limit = { - liege = { has_perk = learn_on_the_job_perk } - highest_skill = martial - } - 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/N3OW/common/script_values/99_spouse_councillor_values.txt b/N3OW/common/script_values/99_spouse_councillor_values.txt deleted file mode 100644 index 52f0294f..00000000 --- a/N3OW/common/script_values/99_spouse_councillor_values.txt +++ /dev/null @@ -1,411 +0,0 @@ - -spouse_skill_rating_1 = { - add = mediocre_skill_rating -} -spouse_skill_rating_2 = { - add = medium_skill_rating -} -spouse_skill_rating_3 = { - add = decent_skill_rating -} -spouse_skill_rating_4 = { - add = very_high_skill_rating -} - -inverted_spouse_skill_rating_1 = { - subtract = spouse_skill_rating_1 -} -inverted_spouse_skill_rating_2 = { - subtract = spouse_skill_rating_2 -} -inverted_spouse_skill_rating_3 = { - subtract = spouse_skill_rating_3 -} -inverted_spouse_skill_rating_4 = { - subtract = spouse_skill_rating_4 -} - - -spouse_default_task_diplomacy_scale = { - add = diplomacy - if = { - limit = { - scope:councillor_liege = { has_perk = loyalty_and_respect_perk } - } - multiply = 1.25 - } - if = { - limit = { - scope:councillor_liege.culture = { has_cultural_parameter = better_spouses } - } - multiply = 1.25 - } - divide = 5 - if = { - limit = { - OR = { - scope:councillor_liege = { has_perk = loyalty_and_respect_perk } - scope:councillor_liege.culture = { has_cultural_parameter = better_spouses } - } - } - ceiling = yes - } - else = { - floor = yes - } - min = 1 -} - -spouse_default_task_martial_scale = { - add = martial - if = { - limit = { - scope:councillor_liege = { has_perk = loyalty_and_respect_perk } - } - multiply = 1.25 - } - if = { - limit = { - scope:councillor_liege.culture = { has_cultural_parameter = better_spouses } - } - multiply = 1.25 - } - divide = 5 - if = { - limit = { - OR = { - scope:councillor_liege = { has_perk = loyalty_and_respect_perk } - scope:councillor_liege.culture = { has_cultural_parameter = better_spouses } - } - } - ceiling = yes - } - else = { - floor = yes - } - min = 1 -} - -spouse_default_task_intrigue_scale = { - add = intrigue - if = { - limit = { - scope:councillor_liege = { has_perk = loyalty_and_respect_perk } - } - multiply = 1.25 - } - if = { - limit = { - scope:councillor_liege.culture = { has_cultural_parameter = better_spouses } - } - multiply = 1.25 - } - if = { - limit = { - scope:councillor = { - AND = { - exists = dynasty - dynasty = { has_dynasty_perk = fp3_khvarenah_legacy_3 } - } - } - } - multiply = 1.25 - } - divide = 5 - if = { - limit = { - OR = { - scope:councillor_liege = { has_perk = loyalty_and_respect_perk } - scope:councillor_liege.culture = { has_cultural_parameter = better_spouses } - } - } - ceiling = yes - } - else = { - floor = yes - } - min = 1 -} - -spouse_default_task_learning_scale = { - add = learning - if = { - limit = { - scope:councillor_liege = { has_perk = loyalty_and_respect_perk } - } - multiply = 1.25 - } - if = { - limit = { - scope:councillor_liege.culture = { has_cultural_parameter = better_spouses } - } - multiply = 1.25 - } - divide = 5 - if = { - limit = { - OR = { - scope:councillor_liege = { has_perk = loyalty_and_respect_perk } - scope:councillor_liege.culture = { has_cultural_parameter = better_spouses } - } - } - ceiling = yes - } - else = { - floor = yes - } - min = 1 -} - -spouse_default_task_stewardship_scale = { - add = stewardship - if = { - limit = { - scope:councillor_liege = { has_perk = loyalty_and_respect_perk } - } - multiply = 1.25 - } - if = { - limit = { - scope:councillor_liege.culture = { has_cultural_parameter = better_spouses } - } - multiply = 1.25 - } - divide = 5 - if = { - limit = { - OR = { - scope:councillor_liege = { has_perk = loyalty_and_respect_perk } - scope:councillor_liege.culture = { has_cultural_parameter = better_spouses } - } - } - ceiling = yes - } - else = { - floor = yes - } - min = 1 -} - -spouse_task_court_politics_scale = { - add = diplomacy - if = { - limit = { - scope:councillor_liege = { has_perk = loyalty_and_respect_perk } - } - multiply = 1.25 - } - if = { - limit = { - scope:councillor_liege.culture = { has_cultural_parameter = better_spouses } - } - multiply = 1.25 - } - divide = 2 - if = { - limit = { - OR = { - scope:councillor_liege = { has_perk = loyalty_and_respect_perk } - scope:councillor_liege.culture = { has_cultural_parameter = better_spouses } - } - } - ceiling = yes - } - else = { - floor = yes - } - min = 1 -} - -spouse_task_chivalry_scale = { - add = martial - if = { - limit = { - scope:councillor_liege = { has_perk = loyalty_and_respect_perk } - } - multiply = 1.25 - } - if = { - limit = { - scope:councillor_liege.culture = { has_cultural_parameter = better_spouses } - } - multiply = 1.25 - } - divide = 2 - if = { - limit = { - OR = { - scope:councillor_liege = { has_perk = loyalty_and_respect_perk } - scope:councillor_liege.culture = { has_cultural_parameter = better_spouses } - } - } - ceiling = yes - } - else = { - floor = yes - } - min = 1 -} - -spouse_task_court_intrigue_scale = { - add = intrigue - if = { - limit = { - scope:councillor_liege = { has_perk = loyalty_and_respect_perk } - } - multiply = 1.25 - } - if = { - limit = { - scope:councillor_liege.culture = { has_cultural_parameter = better_spouses } - } - multiply = 1.25 - } - if = { - limit = { - scope:councillor = { - AND = { - exists = dynasty - dynasty = { has_dynasty_perk = fp3_khvarenah_legacy_3 } - } - } - } - multiply = 1.25 - } - divide = 2 - if = { - limit = { - OR = { - scope:councillor_liege = { has_perk = loyalty_and_respect_perk } - scope:councillor_liege.culture = { has_cultural_parameter = better_spouses } - } - } - ceiling = yes - } - else = { - floor = yes - } - min = 1 -} - -spouse_task_manage_domain_scale = { - add = stewardship - if = { - limit = { - scope:councillor_liege = { has_perk = loyalty_and_respect_perk } - } - multiply = 1.25 - } - if = { - limit = { - scope:councillor_liege.culture = { has_cultural_parameter = better_spouses } - } - multiply = 1.25 - } - divide = 2 - if = { - limit = { - OR = { - scope:councillor_liege = { has_perk = loyalty_and_respect_perk } - scope:councillor_liege.culture = { has_cultural_parameter = better_spouses } - } - } - ceiling = yes - } - else = { - floor = yes - } - min = 1 -} - -spouse_task_patronage_scale = { - add = learning - if = { - limit = { - scope:councillor_liege = { has_perk = loyalty_and_respect_perk } - } - multiply = 1.25 - } - if = { - limit = { - scope:councillor_liege.culture = { has_cultural_parameter = better_spouses } - } - multiply = 1.25 - } - divide = 2 - if = { - limit = { - OR = { - scope:councillor_liege = { has_perk = loyalty_and_respect_perk } - scope:councillor_liege.culture = { has_cultural_parameter = better_spouses } - } - } - ceiling = yes - } - else = { - floor = yes - } - min = 1 -} - -#Spouse rank up values -councillor_spouse_lifestyle_rank_up_threshold = 4 #Number of half-years the character has to have been performing a task in order to rank up in the relevant skill -councillor_spouse_lifestyle_progress_factor = 0.75 #The factor by which the chance of ranking up each month is multiplied. At 1, one point of progress and one point of skill increase the chance (every six months) by 1% - -councillor_spouse_lifestyle_progress_increase = 1 #How much progress is added every time - - -#FROM EVENTS -opinion_boost_neighboring_ruler_value = { - add = 20 - if = { - limit = { - tier_difference = { - target = root - value = -1 - } - } - multiply = 2 - } - else_if = { - limit = { - tier_difference = { - target = root - value = -2 - } - } - multiply = 2.5 - } -} - -spouse_martial_event_troop_size = { - add = martial - add = prowess - if = { - limit = { - has_trait = strategist - } - multiply = 1.5 - } - if = { - limit = { - has_trait = overseer - } - multiply = 1.5 - } - if = { - limit = { - has_trait = gallant - } - multiply = 1.5 - } - - multiply = 10 - - round = yes -} - -councillor_spouse_martial_1005_a_value = { - add = scope:councillor.martial - divide = 2 -} diff --git a/N3OW/common/script_values/99_spymaster_values.txt b/N3OW/common/script_values/99_spymaster_values.txt deleted file mode 100644 index af0f6abf..00000000 --- a/N3OW/common/script_values/99_spymaster_values.txt +++ /dev/null @@ -1,503 +0,0 @@ - -# Values used by the Spymaster tasks and ongoing Scheme Discovery - - -monthly_scheme_discovery_chance_value = { - # First grab our percentage chance to be discovered. - value = 100 - subtract = scheme_secrecy - # Then reduce it to 10% of itself, as it'll be checked very frequently. - multiply = 0.1 -} - -spymaster_learn_on_the_job_scale = { - value = 0 - if = { - limit = { - exists = liege - liege = { has_perk = learn_on_the_job_perk } - } - add = intrigue - multiply = { - add = learn_on_the_job_percentage - divide = 100 - } - floor = yes - min = 1 - } -} - -### Reliable House modifier -spymaster_reliable_house_scale = { - value = 0 - if = { - limit = { - exists = liege.dynasty - liege.dynasty = { has_dynasty_perk = fp2_coterie_legacy_2 } - house = liege.house - } - add = intrigue - multiply = { - add = council_reliable_house_percentage - divide = 100 - } - floor = yes - min = 1 - } -} - - -######################################### -######## DISRUPT SCHEMES TASK ########### -######################################### - -spymaster_disrupt_schemes_hostile_scheme_resistance_base = { - add = 5 -} - -spymaster_disrupt_schemes_modifier_base_scale = { - add = intrigue - divide = 2 -} - -spymaster_disrupt_schemes_court_of_shadows_modifier_scale = { - value = 0 - if = { - limit = { - exists = liege - liege = { has_perk = court_of_shadows_perk } - } - add = { - value = spymaster_disrupt_schemes_hostile_scheme_resistance_base - add = spymaster_disrupt_schemes_modifier_base_scale - multiply = { - add = court_of_shadows_perk_percentage - divide = 100 - } - } - } -} - -spymaster_disrupt_schemes_erudition_legacy_5_modifier_scale = { - value = 0 - if = { - limit = { - councillor_liege_has_erudition_legacy_5_perk = yes - } - add = { - value = spymaster_disrupt_schemes_hostile_scheme_resistance_base - add = spymaster_disrupt_schemes_modifier_base_scale - multiply = { - add = erudition_legacy_5_percentage - divide = 100 - } - } - } -} - -spymaster_disrupt_schemes_family_business_modifier_scale = { - value = 0 - if = { - limit = { - councillor_liege_has_family_business_bonus = yes - } - add = { - value = spymaster_disrupt_schemes_hostile_scheme_resistance_base - add = spymaster_disrupt_schemes_modifier_base_scale - multiply = { - add = family_business_councillors_percentage - divide = 100 - } - } - } -} - -spymaster_disrupt_schemes_consulted_house_modifier_scale = { - value = 0 - if = { - limit = { - councillor_liege_has_consulted_house_bonus = yes - } - add = { - value = spymaster_disrupt_schemes_hostile_scheme_resistance_base - add = spymaster_disrupt_schemes_modifier_base_scale - multiply = { - add = consulted_house_councillors_percentage - divide = 100 - } - } - } -} - -spymaster_disrupt_schemes_modifier_final_scale = { - add = spymaster_disrupt_schemes_hostile_scheme_resistance_base - add = spymaster_disrupt_schemes_modifier_base_scale - add = spymaster_disrupt_schemes_court_of_shadows_modifier_scale - add = spymaster_disrupt_schemes_erudition_legacy_5_modifier_scale - add = spymaster_disrupt_schemes_family_business_modifier_scale - add = spymaster_disrupt_schemes_consulted_house_modifier_scale -} - -spymaster_disrupt_schemes_scheme_discovery_modifier = { - add = intrigue -} - -spymaster_find_secrets_disrupt_schemes_modifier = { - add = intrigue -} - -spymaster_find_secrets_disrupt_schemes_modifier_factor = { - value = 100 - subtract = { - value = spymaster_find_secrets_disrupt_schemes_modifier - multiply = 3 - } - min = 10 - divide = 100 -} - -spymaster_disrupt_schemes_court_of_shadows_scheme_discovery_modifier_scale = { - value = 0 - if = { - limit = { - exists = liege - liege = { has_perk = court_of_shadows_perk } - } - add = { - add = spymaster_disrupt_schemes_scheme_discovery_modifier - multiply = { - add = court_of_shadows_perk_percentage - divide = 100 - } - } - } -} - -spymaster_disrupt_schemes_erudition_legacy_5_discovery_modifier_scale = { - value = 0 - if = { - limit = { - councillor_liege_has_erudition_legacy_5_perk = yes - } - add = { - add = spymaster_disrupt_schemes_scheme_discovery_modifier - multiply = { - add = erudition_legacy_5_percentage - divide = 100 - } - } - } -} - -spymaster_disrupt_schemes_family_business_discovery_modifier_scale = { - value = 0 - if = { - limit = { - councillor_liege_has_family_business_bonus = yes - } - add = { - add = spymaster_disrupt_schemes_scheme_discovery_modifier - multiply = { - add = family_business_councillors_percentage - divide = 100 - } - } - } -} - -spymaster_disrupt_schemes_consulted_house_discovery_modifier_scale = { - value = 0 - if = { - limit = { - councillor_liege_has_consulted_house_bonus = yes - } - add = { - add = spymaster_disrupt_schemes_scheme_discovery_modifier - multiply = { - add = consulted_house_councillors_percentage - divide = 100 - } - } - } -} - -spymaster_disrupt_schemes_total_modifier = { - add = spymaster_disrupt_schemes_scheme_discovery_modifier - add = spymaster_disrupt_schemes_court_of_shadows_scheme_discovery_modifier_scale - add = spymaster_disrupt_schemes_erudition_legacy_5_discovery_modifier_scale - add = spymaster_disrupt_schemes_family_business_discovery_modifier_scale - add = spymaster_disrupt_schemes_consulted_house_discovery_modifier_scale -} - - -######################################### -######## ESPIONAGE SCHEME TASK ########## -######################################### - -spymaster_espionage_modifier_base_scale = { - add = intrigue - multiply = -1 - max = -1 -} - -spymaster_espionage_legacy_bonus = { - value = 0 - if = { - limit = { - councillor_liege_has_erudition_legacy_5_perk = yes - } - add = { - value = spymaster_espionage_modifier_base_scale - multiply = { - value = erudition_legacy_5_percentage - divide = 100 - } - } - } -} - -spymaster_espionage_family_business_bonus = { - value = 0 - if = { - limit = { - councillor_liege_has_family_business_bonus = yes - } - add = { - value = spymaster_espionage_modifier_base_scale - multiply = { - value = family_business_councillors_percentage - divide = 100 - } - } - } -} - -spymaster_espionage_consulted_house_bonus = { - value = 0 - if = { - limit = { - councillor_liege_has_consulted_house_bonus = yes - } - add = { - value = spymaster_espionage_modifier_base_scale - multiply = { - value = consulted_house_councillors_percentage - divide = 100 - } - } - } -} - -spymaster_espionage_court_type_bonus = { - value = 0 - if = { - limit = { - has_dlc_feature = royal_court - scope:councillor_liege = { - has_royal_court = yes - has_dlc_feature = royal_court - has_court_type = court_intrigue - court_grandeur_current_level >= 4 - } - } - add = { - value = spymaster_espionage_modifier_base_scale - multiply = { - value = court_intrigue_spymaster_task_bonus - divide = 100 - } - } - } -} - -spymaster_espionage_modifier_final_scale = { - add = spymaster_espionage_modifier_base_scale - add = spymaster_espionage_legacy_bonus - add = spymaster_espionage_family_business_bonus - add = spymaster_espionage_consulted_house_bonus - add = spymaster_espionage_court_type_bonus -} - -spymaster_espionage_success_chance_base = { - add = 5 -} - -spymaster_espionage_success_chance_modifier_base_scale = { - add = { - add = intrigue - multiply = 0.5 - } -} - -spymaster_espionage_success_chance_legacy_bonus = { - value = 0 - if = { - limit = { - councillor_liege_has_erudition_legacy_5_perk = yes - } - add = { - value = spymaster_espionage_success_chance_base - add = spymaster_espionage_success_chance_modifier_base_scale - multiply = { - value = erudition_legacy_5_percentage - divide = 100 - } - } - } -} - -spymaster_espionage_success_chance_family_business_bonus = { - value = 0 - if = { - limit = { - councillor_liege_has_family_business_bonus = yes - } - add = { - value = spymaster_espionage_success_chance_base - add = spymaster_espionage_success_chance_modifier_base_scale - multiply = { - value = family_business_councillors_percentage - divide = 100 - } - } - } -} - -spymaster_espionage_success_chance_consulted_house_bonus = { - value = 0 - if = { - limit = { - councillor_liege_has_consulted_house_bonus = yes - } - add = { - value = spymaster_espionage_success_chance_base - add = spymaster_espionage_success_chance_modifier_base_scale - multiply = { - value = consulted_house_councillors_percentage - divide = 100 - } - } - } -} - -spymaster_espionage_success_chance_court_type_bonus = { - value = 0 - if = { - limit = { - has_dlc_feature = royal_court - scope:councillor_liege = { - has_royal_court = yes - has_dlc_feature = royal_court - has_court_type = court_intrigue - court_grandeur_current_level >= 4 - } - } - add = { - value = spymaster_espionage_success_chance_base - add = spymaster_espionage_success_chance_modifier_base_scale - multiply = { - value = court_intrigue_spymaster_task_bonus - divide = 100 - } - } - } -} - -spymaster_espionage_success_chance_total = { - add = spymaster_espionage_success_chance_base - add = spymaster_espionage_success_chance_modifier_base_scale - add = spymaster_espionage_success_chance_legacy_bonus - add = spymaster_espionage_success_chance_family_business_bonus - add = spymaster_espionage_consulted_house_bonus - add = spymaster_espionage_success_chance_court_type_bonus -} - -######################################### -########### FIND SECRET TASK ############ -######################################### - -spymaster_find_secrets_secret_discovery_chance = { - add = scope:councillor.intrigue - multiply = 5 - max = 95 -} - -spymaster_find_secrets_base = 5 - -spymaster_find_secrets_monthly_increase = { - add = intrigue -} - -spymaster_find_secrets_base_total = { - add = spymaster_find_secrets_base - add = spymaster_find_secrets_monthly_increase -} - - - -# Relation impact -spymaster_find_secrets_monthly_increase_friend_bonus = { - value = spymaster_find_secrets_base_total - multiply = { - add = council_friend_impact_percentage - divide = 100 - } -} -spymaster_find_secrets_monthly_increase_best_friend_bonus = { - value = spymaster_find_secrets_base_total - multiply = { - add = council_best_friend_impact_percentage - divide = 100 - } -} -spymaster_find_secrets_monthly_increase_rival_bonus = { - value = spymaster_find_secrets_base_total - multiply = { - add = council_rival_impact_percentage - divide = 100 - } -} -spymaster_find_secrets_monthly_increase_nemesis_bonus = { - value = spymaster_find_secrets_base_total - multiply = { - add = council_nemesis_impact_percentage - divide = 100 - } -} - -spymaster_find_secrets_perk_monthly_increase = { - add = spymaster_find_secrets_base_total - multiply = { - add = digging_for_dirt_perk_percentage - divide = 100 - } -} -spymaster_find_secrets_erudition_monthly_increase = { - add = spymaster_find_secrets_base_total - multiply = { - add = erudition_legacy_5_percentage - divide = 100 - } -} -spymaster_find_secrets_family_business_monthly_increase = { - add = spymaster_find_secrets_base_total - multiply = { - add = family_business_councillors_percentage - divide = 100 - } -} -spymaster_find_secrets_consulted_house_monthly_increase = { - add = spymaster_find_secrets_base_total - multiply = { - add = consulted_house_councillors_percentage - divide = 100 - } -} - -spymaster_court_of_no_secrets_event_increase = { - add = spymaster_find_secrets_base_total - multiply = { - add = 15 - divide = 100 - } -} diff --git a/N3OW/common/script_values/99_steward_values.txt b/N3OW/common/script_values/99_steward_values.txt deleted file mode 100644 index bbf3c105..00000000 --- a/N3OW/common/script_values/99_steward_values.txt +++ /dev/null @@ -1,1266 +0,0 @@ -# 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 - } -} - -kurultai_steward_learn_on_the_job_scale = { - value = 0 - if = { - limit = { - liege = { has_perk = learn_on_the_job_perk } - highest_skill = stewardship - } - 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 = { - 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:councillor_liege.culture = { has_cultural_pillar = heritage_syriac } - exists = scope:county - scope:county = { - has_county_modifier = promote_culture_beth_nahrain_modifier - NOT = { - culture = { has_cultural_pillar = heritage_syriac } - } - } - } - add = { - value = promote_culture_beth_nahrain_bonus - desc = steward_promote_culture_beth_nahrain - } - } - - 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 -} - -promote_culture_beth_nahrain_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/N3OW/common/script_values/99_vizier_councillor_values.txt b/N3OW/common/script_values/99_vizier_councillor_values.txt deleted file mode 100644 index 9e05c366..00000000 --- a/N3OW/common/script_values/99_vizier_councillor_values.txt +++ /dev/null @@ -1,436 +0,0 @@ - -vizier_skill_rating_1 = { - add = mediocre_skill_rating -} -vizier_skill_rating_2 = { - add = medium_skill_rating -} -vizier_skill_rating_3 = { - add = decent_skill_rating -} -vizier_skill_rating_4 = { - add = very_high_skill_rating -} - -inverted_vizier_skill_rating_1 = { - subtract = vizier_skill_rating_1 -} -inverted_vizier_skill_rating_2 = { - subtract = vizier_skill_rating_2 -} -inverted_vizier_skill_rating_3 = { - subtract = vizier_skill_rating_3 -} -inverted_vizier_skill_rating_4 = { - subtract = vizier_skill_rating_4 -} - - -vizier_default_task_diplomacy_scale = { - add = diplomacy - if = { - limit = { - scope:councillor_liege = { has_perk = loyalty_and_respect_perk } - } - multiply = 1.25 - } - if = { - limit = { - scope:councillor = { - AND = { - exists = dynasty - dynasty = { has_dynasty_perk = fp3_khvarenah_legacy_3 } - } - } - } - multiply = 1.25 - } - divide = 5 - if = { - limit = { - OR = { - scope:councillor_liege = { has_perk = loyalty_and_respect_perk } - scope:councillor = { - AND = { - exists = dynasty - dynasty = { has_dynasty_perk = fp3_khvarenah_legacy_3 } - } - } - } - } - ceiling = yes - } - else = { - floor = yes - } - min = 1 -} - -vizier_default_task_martial_scale = { - add = martial - if = { - limit = { - scope:councillor_liege = { has_perk = loyalty_and_respect_perk } - } - multiply = 1.25 - } - if = { - limit = { - scope:councillor = { - AND = { - exists = dynasty - dynasty = { has_dynasty_perk = fp3_khvarenah_legacy_3 } - } - } - } - multiply = 1.25 - } - divide = 5 - if = { - limit = { - OR = { - scope:councillor_liege = { has_perk = loyalty_and_respect_perk } - scope:councillor = { - AND = { - exists = dynasty - dynasty = { has_dynasty_perk = fp3_khvarenah_legacy_3 } - } - } - } - } - ceiling = yes - } - else = { - floor = yes - } - min = 1 -} - -vizier_default_task_intrigue_scale = { - add = intrigue - if = { - limit = { - scope:councillor_liege = { has_perk = loyalty_and_respect_perk } - } - multiply = 1.25 - } - - if = { - limit = { - scope:councillor = { - AND = { - exists = dynasty - dynasty = { has_dynasty_perk = fp3_khvarenah_legacy_3 } - } - } - } - multiply = 1.25 - } - divide = 5 - if = { - limit = { - OR = { - scope:councillor_liege = { has_perk = loyalty_and_respect_perk } - scope:councillor = { - AND = { - exists = dynasty - dynasty = { has_dynasty_perk = fp3_khvarenah_legacy_3 } - } - } - } - } - ceiling = yes - } - else = { - floor = yes - } - min = 1 -} - -vizier_default_task_learning_scale = { - add = learning - if = { - limit = { - scope:councillor_liege = { has_perk = loyalty_and_respect_perk } - } - multiply = 1.25 - } - if = { - limit = { - scope:councillor = { - AND = { - exists = dynasty - dynasty = { has_dynasty_perk = fp3_khvarenah_legacy_3 } - } - } - } - multiply = 1.25 - } - divide = 5 - if = { - limit = { - OR = { - scope:councillor_liege = { has_perk = loyalty_and_respect_perk } - scope:councillor = { - AND = { - exists = dynasty - dynasty = { has_dynasty_perk = fp3_khvarenah_legacy_3 } - } - } - } - } - ceiling = yes - } - else = { - floor = yes - } - min = 1 -} - -vizier_default_task_stewardship_scale = { - add = stewardship - if = { - limit = { - scope:councillor_liege = { has_perk = loyalty_and_respect_perk } - } - multiply = 1.25 - } - if = { - limit = { - scope:councillor = { - AND = { - exists = dynasty - dynasty = { has_dynasty_perk = fp3_khvarenah_legacy_3 } - } - } - } - multiply = 1.25 - } - divide = 5 - if = { - limit = { - OR = { - scope:councillor_liege = { has_perk = loyalty_and_respect_perk } - scope:councillor = { - AND = { - exists = dynasty - dynasty = { has_dynasty_perk = fp3_khvarenah_legacy_3 } - } - } - } - } - ceiling = yes - } - else = { - floor = yes - } - min = 1 -} - -vizier_task_court_politics_scale = { - add = diplomacy - if = { - limit = { - scope:councillor_liege = { has_perk = loyalty_and_respect_perk } - } - multiply = 1.25 - } - if = { - limit = { - scope:councillor = { - AND = { - exists = dynasty - dynasty = { has_dynasty_perk = fp3_khvarenah_legacy_3 } - } - } - } - multiply = 1.25 - } - divide = 2 - if = { - limit = { - OR = { - scope:councillor_liege = { has_perk = loyalty_and_respect_perk } - scope:councillor = { - AND = { - exists = dynasty - dynasty = { has_dynasty_perk = fp3_khvarenah_legacy_3 } - } - } - } - } - ceiling = yes - } - else = { - floor = yes - } - min = 1 -} - -vizier_task_chivalry_scale = { - add = martial - if = { - limit = { - scope:councillor_liege = { has_perk = loyalty_and_respect_perk } - } - multiply = 1.25 - } - if = { - limit = { - scope:councillor = { - AND = { - exists = dynasty - dynasty = { has_dynasty_perk = fp3_khvarenah_legacy_3 } - } - } - } - multiply = 1.25 - } - divide = 2 - if = { - limit = { - OR = { - scope:councillor_liege = { has_perk = loyalty_and_respect_perk } - scope:councillor = { - AND = { - exists = dynasty - dynasty = { has_dynasty_perk = fp3_khvarenah_legacy_3 } - } - } - } - } - ceiling = yes - } - else = { - floor = yes - } - min = 1 -} - -vizier_task_court_intrigue_scale = { - add = intrigue - if = { - limit = { - scope:councillor_liege = { has_perk = loyalty_and_respect_perk } - } - multiply = 1.25 - } - if = { - limit = { - scope:councillor = { - AND = { - exists = dynasty - dynasty = { has_dynasty_perk = fp3_khvarenah_legacy_3 } - } - } - } - multiply = 1.25 - } - divide = 2 - if = { - limit = { - OR = { - scope:councillor_liege = { has_perk = loyalty_and_respect_perk } - scope:councillor = { - AND = { - exists = dynasty - dynasty = { has_dynasty_perk = fp3_khvarenah_legacy_3 } - } - } - } - } - ceiling = yes - } - else = { - floor = yes - } - min = 1 -} - -vizier_task_manage_domain_scale = { - add = stewardship - if = { - limit = { - scope:councillor_liege = { has_perk = loyalty_and_respect_perk } - } - multiply = 1.25 - } - - if = { - limit = { - scope:councillor = { - AND = { - exists = dynasty - dynasty = { has_dynasty_perk = fp3_khvarenah_legacy_3 } - } - } - } - multiply = 1.25 - } - divide = 2 - if = { - limit = { - OR = { - scope:councillor_liege = { has_perk = loyalty_and_respect_perk } - scope:councillor = { - AND = { - exists = dynasty - dynasty = { has_dynasty_perk = fp3_khvarenah_legacy_3 } - } - } - } - } - ceiling = yes - } - else = { - floor = yes - } - min = 1 -} - -vizier_task_patronage_scale = { - add = learning - if = { - limit = { - scope:councillor_liege = { has_perk = loyalty_and_respect_perk } - } - multiply = 1.25 - } - if = { - limit = { - scope:councillor = { - AND = { - exists = dynasty - dynasty = { has_dynasty_perk = fp3_khvarenah_legacy_3 } - } - } - } - multiply = 1.25 - } - divide = 2 - if = { - limit = { - OR = { - scope:councillor_liege = { has_perk = loyalty_and_respect_perk } - - scope:councillor = { - AND = { - exists = dynasty - dynasty = { has_dynasty_perk = fp3_khvarenah_legacy_3 } - } - } - } - } - ceiling = yes - } - else = { - floor = yes - } - min = 1 -} - -#vizier rank up values -councillor_vizier_lifestyle_rank_up_threshold = 4 #Number of half-years the character has to have been performing a task in order to rank up in the relevant skill -councillor_vizier_lifestyle_progress_factor = 0.75 #The factor by which the chance of ranking up each month is multiplied. At 1, one point of progress and one point of skill increase the chance (every six months) by 1% - -councillor_vizier_lifestyle_progress_increase = 1 #How much progress is added every time \ No newline at end of file diff --git a/N3OW/common/script_values/_script_values.info b/N3OW/common/script_values/_script_values.info deleted file mode 100644 index 9da0feef..00000000 --- a/N3OW/common/script_values/_script_values.info +++ /dev/null @@ -1,122 +0,0 @@ -Script values are simple or complex values that can be referenced virtually anywhere in script that takes a number (and in some cases true/false values). - -They come in two main variants; simple static values, and formulas. - -== Static values == -Static values are defined like this: -name_of_scripted_value = value (E.G., "minor_stress_gain = 10") - -They're referenced in script by their name: -add_stress = minor_stress_gain - -== Formulas == -For more complex values, it is possible to define mathematical formulas. These allow you to use everything available in the scope you're currently in. -Be careful with these, as they have to be calculated every single time they're evaluated. Complex formulas can be performance intensive. -Formulas do not work for true/false values. - -A formula is declared using curly brackets, and follow this format: - -name_of_scripted_value = { - # Mathematical operations - add = number/scripted value/scope.something - subtract = ... - multiply = ... - divide = ... # Be careful not to divide by 0 - modulo = ... - - value = ... # Sets the value to this number - - max = ... # Sets the value to this number if it is currently higher. E.G., "max = 10" would cause the number 15 to become 10 - min = ... # Sets the value to this number if it is currently lower - - round = yes # Rounds to nearest whole number - ceiling = yes # Rounds up (towards positive infinity) - floor = yes # Rounds down (towards negative infinity) - - if = { # These operations are executed if the limit is met. You can also put "if" inside an "if" - limit = { some conditions } - add = 5 - divide = ... - ... - } - else_if = { # If the "if" above is not met, these operations are executed, as long as the limit is met. You can put several "else_if" in a row - limit = { some conditions } - operations... - } - else = { # If the "if" or "else_if" above is not met, these operations are executed - operations... - } - - fixed_range = { # Gives a random fixed-point number in the range (E.G., 1.242) - min = ... script value - max = ... - } - - integer_range = { # Gives a random fixed-point number in the range (E.G., 1) - min = ... - max = ... - } -} - -=== Execution order === -Operations are executed in the order defined. -Example: - value = { - add = 5 - multiply = 4 - max = 10 - add = 5 - } -Would result in "15", since "max = 10" would be applied before the last "add = 5" - -=== Inlining === -Formulas can be written inline wherever scripted values work. So if a formula is only to be used once, there's no need to name it and have it in the scriptvalues folder. - -Example: - add_gold = { - value = gold - multiply = { # Yes, you can even inline them in the mathematical operators - value = 1 - multiply = 0.5 - } - } - -=== Chaining === -You can reference named script formulas using scope chaining. For example, if you were to define this formula: - example_age = { - value = age - } -Then the following would work: - add_gold = { - value = mother.example_age - } - -== Ranges == -Script values can also define ranges. -E.G., add_gold = { 1 5 } will add 1 to 5 gold. -add_gold = { named_value another_named_value } will resolve the named values (including formulas). -Note that you can't inline formulas within a range. E.G., you cannot do add_gold = { { value = 1 add = 2 } some_named_value }. If you need that, use integer_range or fixed_range from the script math system. - -== Lists == -Script values support lists. -E.G., add_gold = { every_child = { add = 1 } } will add as much gold as you have children. -All lists should work, including those defined in script. - -Ordered lists also work. E.G., -add_gold = { - ordered_child = { - order_by = age - max = 3 - add = age - } -} - -== Scoping == -You can change scope within script values just as you can in regular script. -Example: - add_gold = { - father = { - any_child = { add = 1 } - } - } -This would add as much gold as your father has children. diff --git a/N3OW/common/script_values/court_events_values.txt b/N3OW/common/script_values/court_events_values.txt deleted file mode 100644 index ac559cd8..00000000 --- a/N3OW/common/script_values/court_events_values.txt +++ /dev/null @@ -1,517 +0,0 @@ -#Learning-oriented intelligence check -learning_intellect_value = { - value = 0 - # Intellect traits - if = { - limit = { has_trait = inbred } - add = -50 - } - if = { - limit = { has_trait = dull } - add = -20 - } - if = { - limit = { has_trait = intellect_bad_1 } - add = -10 - } - if = { - limit = { has_trait = intellect_bad_2 } - add = -20 - } - if = { - limit = { has_trait = intellect_bad_3 } - add = -30 - } - if = { - limit = { has_trait = intellect_good_1 } - add = 10 - } - if = { - limit = { has_trait = intellect_good_2 } - add = 20 - } - if = { - limit = { has_trait = intellect_good_3 } - add = 30 - } - # Lifestyle Traits - if = { - limit = { has_trait = scholar } - add = 15 - } - if = { - limit = { has_trait = theologian } - add = 15 - } - if = { - limit = { has_trait = lifestyle_mystic } - add = 5 - } - if = { - limit = { - has_trait = lifestyle_mystic - has_trait_xp = { - trait = lifestyle_mystic - value >= 50 - } - } - add = 10 - } - if = { - limit = { - has_trait = lifestyle_mystic - has_trait_xp = { - trait = lifestyle_mystic - value >= 100 - } - } - add = 15 - } - if = { - limit = { has_trait = lifestyle_physician } - add = 5 - } - if = { - limit = { - has_trait = lifestyle_physician - has_trait_xp = { - trait = lifestyle_physician - value >= 50 - } - } - add = 10 - } - if = { - limit = { - has_trait = lifestyle_physician - has_trait_xp = { - trait = lifestyle_physician - value >= 100 - } - } - add = 15 - } - # Personality - if = { - limit = { has_trait = shrewd } - add = 15 - } - # Learning education - if = { - limit = { - has_trait_rank = { - trait = education_learning - rank > 2 - } - } - add = 20 - } - if = { - limit = { - learning > 10 - } - add = 10 - } - if = { - limit = { - learning > 20 - } - add = 10 - } -} - -diplomacy_intellect_value = { - value = 0 - # Intellect traits - if = { - limit = { has_trait = inbred } - add = -50 - } - if = { - limit = { has_trait = dull } - add = -20 - } - if = { - limit = { has_trait = intellect_bad_1 } - add = -10 - } - if = { - limit = { has_trait = intellect_bad_2 } - add = -20 - } - if = { - limit = { has_trait = intellect_bad_3 } - add = -30 - } - if = { - limit = { has_trait = intellect_good_1 } - add = 10 - } - if = { - limit = { has_trait = intellect_good_2 } - add = 20 - } - if = { - limit = { has_trait = intellect_good_3 } - add = 30 - } - # Lifestyle - # Personality - if = { - limit = { has_trait = diligent } - add = 5 - } - if = { - limit = { has_trait = patient } - add = 5 - } - if = { - limit = { has_trait = shrewd } - add = 15 - } - if = { - limit = { has_trait = gregarious } - add = 25 - } - if = { - limit = { has_trait = lifestyle_reveler } - add = 10 - } - # Diplomacy education - if = { - limit = { - has_trait_rank = { - trait = education_diplomacy - rank > 2 - } - } - add = 20 - } -} - -intrigue_intellect_value = { - value = 0 - # Intellect - if = { - limit = { has_trait = inbred } - add = -50 - } - if = { - limit = { has_trait = dull } - add = -20 - } - if = { - limit = { has_trait = intellect_bad_1 } - add = -10 - } - if = { - limit = { has_trait = intellect_bad_2 } - add = -20 - } - if = { - limit = { has_trait = intellect_bad_3 } - add = -30 - } - if = { - limit = { has_trait = intellect_good_1 } - add = 10 - } - if = { - limit = { has_trait = intellect_good_2 } - add = 20 - } - if = { - limit = { has_trait = intellect_good_3 } - add = 30 - } - # Lifestyle - if = { - limit = { has_trait = schemer } - add = 25 - } - # Personality - if = { - limit = { has_trait = callous } - add = 10 - } - if = { - limit = { has_trait = sadistic } - add = 10 - } - if = { - limit = { has_trait = paranoid } - add = 15 - } - if = { - limit = { has_trait = patient } - add = 10 - } - if = { - limit = { has_trait = deceitful } - add = 20 - } - if = { - limit = { has_trait = vengeful } - add = 5 - } - if = { - limit = { has_trait = diligent } - add = 5 - } - if = { - limit = { has_trait = calm } - add = 5 - } - if = { - limit = { has_trait = ambitious } - add = 10 - } - # Education - if = { - limit = { - has_trait_rank = { - trait = education_intrigue - rank > 2 - } - } - add = 20 - } -} - -martial_prowess_value = { - value = 0 - # Genetic - if = { - limit = { has_trait = giant } - add = 20 - } - if = { - limit = { has_trait = physique_bad_1 } - add = -10 - } - if = { - limit = { has_trait = physique_bad_2 } - add = -20 - } - if = { - limit = { has_trait = physique_bad_3 } - add = -30 - } - if = { - limit = { has_trait = physique_good_1 } - add = 10 - } - if = { - limit = { has_trait = physique_good_2 } - add = 20 - } - if = { - limit = { has_trait = physique_good_3 } - add = 30 - } - if = { - limit = { has_trait = strong } - add = 15 - } - if = { - limit = { has_trait = weak } - add = -15 - } - if = { - limit = { has_trait = clubfooted } - add = -5 - } - if = { - limit = { has_trait = hunchbacked } - add = -10 - } - if = { - limit = { has_trait = dwarf } - add = -25 - } - if = { - limit = { has_trait = inbred } - add = -30 - } - # Prowess - if = { - limit = { prowess > high_skill_rating } - add = 10 - } - if = { - limit = { has_trait = lifestyle_blademaster } - add = 5 - if = { - limit = { - has_trait_xp = { - trait = lifestyle_blademaster - value >= 50 - } - } - add = 5 - } - if = { - limit = { - has_trait_xp = { - trait = lifestyle_blademaster - value >= 100 - } - } - add = 5 - } - } - if = { - limit = { has_trait = lifestyle_hunter } - add = 5 - } - if = { - limit = { - hunt_lifestyle_track_greater_equal_trigger = { TRACK = hunter GREATER_EQUAL = 50 } - } - add = 5 - } - if = { - limit = { - hunt_lifestyle_track_greater_equal_trigger = { TRACK = hunter GREATER_EQUAL = 100 } - } - add = 5 - } - if = { - limit = { has_trait = gallant } - add = 5 - } - if = { - limit = { has_trait = overseer } - add = 5 - } - # Lifestyle - if = { - limit = { has_trait = lifestyle_blademaster } - add = 5 - if = { - limit = { - has_trait_xp = { - trait = lifestyle_blademaster - value >= 50 - } - } - add = 5 - } - if = { - limit = { - has_trait_xp = { - trait = lifestyle_blademaster - value >= 100 - } - } - add = 5 - } - } - if = { - limit = { has_trait = lifestyle_hunter } - add = 5 - } - if = { - limit = { - hunt_lifestyle_track_greater_equal_trigger = { TRACK = hunter GREATER_EQUAL = 50 } - } - add = 5 - } - if = { - limit = { - hunt_lifestyle_track_greater_equal_trigger = { TRACK = hunter GREATER_EQUAL = 100 } - } - add = 5 - } - if = { - limit = { has_trait = gallant } - add = 5 - } - if = { - limit = { has_trait = overseer } - add = 5 - } - # Personality - if = { - limit = { has_trait = brave } - add = 15 - } - if = { - limit = { has_trait = wrathful } - add = 15 - } - if = { - limit = { has_trait = diligent } - add = 5 - } - if = { - limit = { has_trait = vengeful } - add = 5 - } - if = { - limit = { has_trait = zealous } - add = 5 - } - if = { - limit = { has_trait = sadistic } - add = 5 - } - # Other - if = { - limit = { has_trait = faith_warrior } - add = 5 - } - if = { - limit = { has_trait = berserker } - add = 15 - } - if = { - limit = { has_trait = varangian } - add = 10 - } - if = { - limit = { has_trait = cannibal } - add = 10 - } - if = { - limit = { number_of_commander_traits >= 1 } - add = 5 - } - # Education - if = { - limit = { - has_trait_rank = { - trait = education_martial - rank > 2 - } - } - add = 20 - } -} - -6210_architect_promote_culture_bonus = { - add = steward_promote_culture_base_total - multiply = 1.2 -} - -court_grandeur_current_minus_ten_value = { - value = 0 - add = court_grandeur_current - add = -10 -} - -court_grandeur_current_plus_ten_value = { - value = 0 - add = court_grandeur_current - add = 10 -} - -easier_to_convert_bonus = { - add = steward_promote_culture_base_total - multiply = 1.25 -} - -steward_fashion_bonus = { - add = steward_promote_culture_base_total - multiply = 1.1 -} diff --git a/N3OW/common/script_values/destiny_score_interest_value.txt b/N3OW/common/script_values/destiny_score_interest_value.txt deleted file mode 100644 index 0615fdb6..00000000 --- a/N3OW/common/script_values/destiny_score_interest_value.txt +++ /dev/null @@ -1,1839 +0,0 @@ -destiny_score_interest = { - value = 0 - add = destiny_score_interest_family_relations - add = destiny_score_interest_skills_traits - add = destiny_score_interest_titles_claims - add = destiny_score_interest_story - add = destiny_score_interesting_traits - add = destiny_score_interesting_circumstances -} - -destiny_score_interest_family_relations = { - # Family - if = { - limit = { - is_child_of = scope:predecessor - } - add = { - value = 10 - desc = is_your_child_desc - } - } - if = { - limit = { - is_close_family_of = scope:predecessor - } - add = { - value = 5 - desc = is_your_close_family_desc - } - } - if = { - limit = { - house = scope:predecessor.house - } - add = { - value = 5 - desc = is_your_house_desc - } - } - ## spouse who is ruler/in line to inherit - if = { - limit = { - any_spouse = { - OR = { - is_ruler = yes - any_heir_title = { - exists = holder - place_in_line_of_succession = { - target = prev - value >= 2 - } - } - } - } - } - add = { - value = 100 - desc = landed_spouse_desc - } - } - ## has heir who is ruler or in line to inherit - if = { - limit = { - is_ruler = yes - this = { save_temporary_scope_as = check_character } - exists = player_heir - player_heir = { - OR = { - is_ruler = yes - any_heir_title = { - exists = holder - NOT = { holder = scope:check_character } - place_in_line_of_succession = { - target = prev - value >= 2 - } - } - } - } - } - add = { - value = 50 - desc = landed_heir_desc - } - } - # Relations - ## many good relations - if = { - limit = { - OR = { - any_relation = { - type = lover - count >= 1 - } - any_relation = { - type = friend - count >= 1 - } - } - } - add = { - value = { - every_relation = { - type = lover - add = 20 - } - every_relation = { - type = friend - add = 20 - } - } - desc = has_many_good_relations_desc - } - } - ## many bad relations - if = { - limit = { - OR = { - any_relation = { - type = rival - count >= 1 - } - any_relation = { - type = nemesis - count >= 1 - } - } - } - add = { - value = { - every_relation = { - type = rival - add = 20 - } - every_relation = { - type = nemesis - add = 20 - } - } - desc = has_many_bad_relations_desc - } - } - ## feuding - if = { - limit = { - house.house_head ?= { - any_owned_story = { - story_type = story_cycle_house_feud - } - } - } - add = { - value = 125 - desc = part_of_feud_desc - } - } -} - -destiny_score_interest_skills_traits = { - value = 0 - # Skills/Education - ## high skills - if = { - limit = { - sum_of_all_skills_value >= 65 - } - add = { - value = 75 - desc = high_skills_desc - } - } - if = { - limit = { - diplomacy >= high_skill_rating - } - add = { - value = 10 - desc = high_diplomacy_desc - } - } - if = { - limit = { - martial >= high_skill_rating - } - add = { - value = 10 - desc = high_martial_desc - } - } - if = { - limit = { - stewardship >= high_skill_rating - } - add = { - value = 10 - desc = high_stewardship_desc - } - } - if = { - limit = { - intrigue >= high_skill_rating - } - add = { - value = 10 - desc = high_intrigue_desc - } - } - if = { - limit = { - learning >= high_skill_rating - } - add = { - value = 10 - desc = high_learning_desc - } - } - if = { - limit = { - prowess >= high_skill_rating - } - add = { - value = 10 - desc = high_prowess_desc - } - } - 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 = { - value = 40 - desc = high_education_desc - } - } - ## Better than the current heir - if = { - limit = { - exists = scope:heir - has_trait_rank = { - trait = beauty_good - character > scope:heir - } - } - add = { - value = 80 - desc = more_beautiful_desc - } - } - if = { - limit = { - exists = scope:heir - has_trait_rank = { - trait = intellect_good - character > scope:heir - } - } - add = { - value = 70 - desc = more_smart_desc - } - } - if = { - limit = { - exists = scope:heir - has_trait_rank = { - trait = physique_good - character > scope:heir - } - } - add = { - value = 70 - desc = more_fit_desc - } - } - if = { - limit = { - has_trait = strong - exists = scope:heir - NOT = { scope:heir = { has_trait = strong } } - } - add = { - value = 40 - desc = more_strong_desc - } - } - if = { - limit = { - exists = scope:heir - sum_of_all_skills_value > scope:heir.sum_of_all_skills_value - } - add = { - value = 100 - desc = more_skillful_desc - } - } - if = { - limit = { - has_any_nickname = yes - exists = scope:heir - scope:heir = { has_any_nickname = no } - } - add = { - value = 30 - desc = has_nickname_desc - } - } - if = { - limit = { - exists = scope:heir - prestige_level > scope:heir.prestige_level - } - add = { - value = 60 - desc = more_famous_desc - } - } -} - -destiny_score_interest_titles_claims = { - value = 0 - # Titles - ## is inheriting the most after primary_heir - if = { - limit = { - this = { save_temporary_scope_as = check_character } - scope:predecessor.primary_title ?= { - any_title_heir = { - prev = { - place_in_line_of_succession = { - target = scope:check_character - value = 2 - } - } - } - } - } - add = { - value = 30 - desc = second_in_line_desc - } - } - ## has a higher rank than you - if = { - limit = { - highest_held_title_tier > scope:predecessor.highest_held_title_tier - } - add = { - value = 40 - desc = higher_title_desc - } - } - ## different government - if = { - limit = { - exists = scope:heir - is_ruler = yes - OR = { - NOT = { has_same_government = scope:predecessor } - NOT = { has_same_government = scope:heir } - } - } - add = { - value = 30 - desc = different_government_desc - } - } - ## different liege - if = { - limit = { - is_ruler = yes - is_independent_ruler = no - NOR = { - liege = scope:predecessor - liege = scope:predecessor.liege - } - } - add = { - value = 30 - desc = new_liege_desc - } - } - ## different top liege - if = { - limit = { - is_ruler = yes - is_independent_ruler = no - NOR = { - top_liege = scope:predecessor - top_liege = scope:predecessor.top_liege - } - } - add = { - value = 50 - desc = new_top_liege_desc - } - } - if = { - limit = { - is_ruler = yes - is_independent_ruler = yes - NOT = { - government_has_flag = government_is_landless_adventurer - } - } - add = { - value = 55 - desc = outside_realm_desc - } - } - - # Claims - ## High stakes claims - if = { - limit = { - any_claim = { - tier >= tier_duchy - } - } - # add a point for claim - add = { - value = { - every_claim = { - limit = { - tier = tier_duchy - } - add = 15 - } - every_claim = { - limit = { - tier > tier_duchy - } - add = 30 - } - } - desc = tall_claims_desc - } - } - ## has pressed claims - if = { - limit = { - any_claim = { - pressed = yes - exists = holder - } - NOT = { - is_weak_claimant_due_to_gender_trigger = { FAITH = faith CHARACTER = this } - } - } - add = { - value = { - every_claim = { - pressed = yes - limit = { - exists = holder - tier >= tier_duchy - } - add = 15 - } - every_claim = { - pressed = yes - limit = { - exists = holder - tier < tier_duchy - } - add = 5 - } - } - desc = pressed_claims_desc - } - } - ## has weak claims - if = { - limit = { - any_claim = { - pressed = no - exists = holder - } - NOT = { - is_weak_claimant_due_to_gender_trigger = { FAITH = faith CHARACTER = this } - } - } - add = { - value = { - every_claim = { - pressed = no - limit = { - exists = holder - tier >= tier_duchy - } - add = 5 - } - every_claim = { - pressed = no - limit = { - exists = holder - tier < tier_duchy - } - add = 2 - } - } - desc = unpressed_claims_desc - } - } - ## in line to inherit stuff - if = { - limit = { - any_heir_title = { - place_in_line_of_succession = { - target = prev - value >= 2 - } - } - } - add = { - value = { - every_heir_title = { - limit = { - place_in_line_of_succession = { - target = prev - value >= 2 - } - } - add = 30 - } - } - desc = inheritance_line_desc - } - } -} - -destiny_score_interest_story = { - value = 0 - # Faith/Culture - ## opposite side in a struggle - if = { - limit = { - OR = { - AND = { - has_trait = fp3_struggle_supporter - OR = { - scope:predecessor = { has_trait = fp3_struggle_detractor } - scope:heir = { has_trait = fp3_struggle_detractor } - } - } - AND = { - has_trait = fp3_struggle_detractor - OR = { - scope:predecessor = { has_trait = fp3_struggle_supporter } - scope:heir = { has_trait = fp3_struggle_supporter } - } - } - } - } - add = { - value = 20 - desc = opposite_struggle_faction_desc - } - } - - # Story cycle - if = { - limit = { - any_owned_story = { - exists = this - } - } - add = { - value = 60 - desc = has_interesting_story_desc - } - } - - # Various - if = { - limit = { - has_character_modifier = bp2_tool_of_fate_modifier - } - add = { - value = 500 - desc = child_of_destiny_desc - } - } -} - -destiny_score_interesting_traits = { - # Traits - if = { - limit = { - num_virtuous_traits > 0 - } - add = { - value = 10 - multiply = num_virtuous_traits - desc = virtues_interesting_desc - } - } - ## has levelled/lifestyle traits - if = { - limit = { - has_trait = tourney_participant - } - add = { - value = { - value = 20 - if = { - limit = { - has_trait_xp = { - trait = tourney_participant - track = bow - value >= 30 - } - } - add = 30 - } - if = { - limit = { - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 30 - } - } - add = 30 - } - if = { - limit = { - has_trait_xp = { - trait = tourney_participant - track = horse - value >= 30 - } - } - add = 30 - } - if = { - limit = { - has_trait_xp = { - trait = tourney_participant - track = wit - value >= 30 - } - } - add = 30 - } - if = { - limit = { - has_trait_xp = { - trait = tourney_participant - track = bow - value >= 65 - } - } - add = 30 - } - if = { - limit = { - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 65 - } - } - add = 30 - } - if = { - limit = { - has_trait_xp = { - trait = tourney_participant - track = horse - value >= 65 - } - } - add = 30 - } - if = { - limit = { - has_trait_xp = { - trait = tourney_participant - track = wit - value >= 65 - } - } - add = 30 - } - } - desc = tourney_xp_desc - } - } - if = { - limit = { - has_trait = lifestyle_reveler - } - add = { - value = { - value = 20 - if = { - limit = { - has_trait_xp = { - trait = lifestyle_reveler - value >= 50 - } - } - add = 30 - } - if = { - limit = { - has_trait_xp = { - trait = lifestyle_reveler - value >= 100 - } - } - add = 30 - } - } - desc = reveler_xp_desc - } - } - if = { - limit = { - has_trait = lifestyle_mystic - } - add = { - value = { - value = 20 - if = { - limit = { - has_trait_xp = { - trait = lifestyle_mystic - value >= 50 - } - } - add = 30 - } - if = { - limit = { - has_trait_xp = { - trait = lifestyle_mystic - value >= 100 - } - } - add = 30 - } - } - desc = mystic_xp_desc - } - } - if = { - limit = { - has_trait = lifestyle_hunter - } - add = { - value = { - value = 20 - if = { - limit = { - has_trait_xp = { - trait = lifestyle_hunter - track = hunter - value >= 50 - } - } - add = 30 - } - if = { - limit = { - has_trait_xp = { - trait = lifestyle_hunter - track = hunter - value >= 100 - } - } - add = 30 - } - if = { - limit = { - has_trait_xp = { - trait = lifestyle_hunter - track = falconer - value >= 50 - } - } - add = 30 - } - if = { - limit = { - has_trait_xp = { - trait = lifestyle_hunter - track = falconer - value >= 100 - } - } - add = 30 - } - } - desc = hunter_xp_desc - } - } - if = { - limit = { - has_trait = lifestyle_blademaster - } - add = { - value = { - value = 20 - if = { - limit = { - has_trait_xp = { - trait = lifestyle_blademaster - value >= 50 - } - } - add = 30 - } - if = { - limit = { - has_trait_xp = { - trait = lifestyle_blademaster - value >= 100 - } - } - add = 30 - } - } - desc = blademaster_xp_desc - } - } - if = { - limit = { - has_trait = lifestyle_traveler - } - add = { - value = { - value = 20 - if = { - limit = { - has_trait_xp = { - trait = lifestyle_traveler - track = travel - value >= 50 - } - } - add = 30 - } - if = { - limit = { - has_trait_xp = { - trait = lifestyle_traveler - track = travel - value >= 100 - } - } - add = 30 - } - if = { - limit = { - has_trait_xp = { - trait = lifestyle_traveler - track = danger - value >= 50 - } - } - add = 30 - } - if = { - limit = { - has_trait_xp = { - trait = lifestyle_traveler - track = danger - value >= 100 - } - } - add = 30 - } - } - desc = traveler_xp_desc - } - } - if = { - limit = { - has_trait = lifestyle_physician - } - add = { - value = { - value = 20 - if = { - limit = { - has_trait_xp = { - trait = lifestyle_physician - value >= 50 - } - } - add = 30 - } - if = { - limit = { - has_trait_xp = { - trait = lifestyle_physician - value >= 100 - } - } - add = 30 - } - } - desc = physician_xp_desc - } - } - if = { - limit = { - has_trait = lifestyle_herbalist - } - add = { - value = { - value = 20 - if = { - limit = { - has_trait_xp = { - trait = lifestyle_herbalist - value >= 50 - } - } - add = 30 - } - if = { - limit = { - has_trait_xp = { - trait = lifestyle_herbalist - value >= 100 - } - } - add = 30 - } - } - desc = herbalist_xp_desc - } - } - if = { - limit = { - has_trait = loyal - } - add = { - value = 20 - desc = loyal_interesting_desc - } - } - if = { - limit = { - has_trait = disloyal - } - add = { - value = 20 - desc = disloyal_interesting_desc - } - } - if = { - limit = { - has_trait = faith_warrior - } - add = { - value = 20 - desc = faith_warrior_interesting_desc - } - } - if = { - limit = { - has_trait = blood_of_prophet - } - add = { - value = 30 - desc = blood_of_prophet_interesting_desc - } - } - if = { - limit = { - has_trait = varangian - } - add = { - value = { - value = 50 - if = { - limit = { - location = title:b_constantinople - } - add = 50 - } - } - desc = varangian_interesting_desc - } - } - if = { - limit = { - has_trait = lifestyle_poet - } - add = { - value = 25 - desc = poet_interesting_desc - } - } - if = { - limit = { - has_trait = peasant_leader - } - add = { - value = 50 - desc = peasant_leader_interesting_desc - } - } - if = { - limit = { - has_trait = populist_leader - } - add = { - value = 50 - desc = populist_leader_interesting_desc - } - } - if = { - limit = { - has_trait = berserker - } - add = { - value = 50 - desc = berserker_interesting_desc - } - } - if = { - limit = { - has_trait = born_in_the_purple - } - add = { - value = 25 - desc = born_in_the_purple_interesting_desc - } - } - if = { - limit = { - has_trait = scaly - } - add = { - value = 40 - desc = scaly_interesting_desc - } - } - if = { - limit = { - has_trait = albino - } - add = { - value = 60 - desc = albino_interesting_desc - } - } - if = { - limit = { - has_trait = dwarf - } - add = { - value = 40 - desc = dwarf_interesting_desc - } - } - if = { - limit = { - has_trait = giant - } - add = { - value = 40 - desc = giant_interesting_desc - } - } - if = { - limit = { - has_trait = devoted - } - add = { - value = 40 - desc = devoted_interesting_desc - } - } - if = { - limit = { - has_trait = blind - } - add = { - value = 40 - desc = blind_interesting_desc - } - } - if = { - limit = { - has_trait = pure_blooded - } - add = { - value = 20 - desc = pure_blooded_interesting_desc - } - } - if = { - limit = { - has_trait = crusader_king - } - add = { - value = 250 - desc = crusader_king_interesting_desc - } - } - if = { - limit = { - has_trait = disinherited - } - add = { - value = 100 - desc = disinherited_interesting_desc - } - } - if = { - limit = { - num_of_good_genetic_traits > 0 - num_of_bad_genetic_traits > 0 - } - add = { - value = 120 - desc = has_both_good_and_bad_genetics_desc - } - } - if = { - limit = { - num_of_good_genetic_traits > 0 - } - add = { - value = { - value = 15 - multiply = num_of_good_genetic_traits - } - desc = good_genetics_desc - } - } - if = { - limit = { - num_of_bad_genetic_traits > 0 - } - add = { - value = { - value = 10 - multiply = num_of_bad_genetic_traits - } - desc = bad_genetics_desc - } - } - if = { - limit = { - num_virtuous_traits >= 3 - } - add = { - value = { - value = 165 - } - desc = three_virtues_desc - } - } - if = { - limit = { - num_sinful_traits >= 3 - } - add = { - value = { - value = 165 - } - desc = three_sins_desc - } - } -} - -destiny_score_interesting_circumstances = { - if = { - limit = { - is_ruler = yes - is_diarch = yes - } - add = { - value = { - value = 100 - if = { - limit = { - liege = { - has_diarchy_active_parameter = unlock_diarch_revoke_title_interaction - } - } - add = 50 - } - if = { - limit = { - liege = { - has_diarchy_active_parameter = regency_cant_be_ended_above_this_point - } - } - add = 150 - } - } - desc = is_diarch_interesting_desc - } - } - if = { - limit = { - exists = capital_county - NAND = { - culture = capital_county.culture - faith = capital_county.faith - } - } - add = { - value = { - value = 75 - if = { - limit = { - faith = { - has_doctrine_parameter = unreformed - } - } - add = 50 - } - if = { - limit = { - is_independent_ruler = yes - } - add = 100 - } - } - desc = ruler_in_foreign_lands_interesting_desc - } - } - if = { - limit = { - is_landed = no - prowess >= 14 - martial >= 12 - num_virtuous_traits > 0 - num_sinful_traits <= 0 - } - add = { - value = { - value = 80 - if = { - limit = { - prowess >= 20 - } - add = 40 - } - if = { - limit = { - num_virtuous_traits > 1 - } - add = 60 - } - } - desc = valiant_knight_interesting_desc - } - } - if = { - limit = { - is_landed = no - OR = { - has_trait = bastard - has_trait = legitimized_bastard - } - prowess >= 12 - intrigue >= 10 - num_sinful_traits > 0 - } - add = { - value = { - value = 80 - if = { - limit = { - prowess >= 16 - } - add = 40 - } - if = { - limit = { - num_sinful_traits > 1 - } - add = 60 - } - } - desc = sinful_bastard_interesting_desc - } - } - if = { - limit = { - government_has_flag = government_is_landless_adventurer - } - add = { - value = { - value = 120 - } - desc = adventurer_interesting_desc - } - } - if = { - limit = { - is_independent_ruler = no - liege ?= { - OR = { - has_trait = crusader_king - any_parent = { - even_if_dead = yes - has_trait = crusader_king - } - } - } - } - add = { - value = { - value = 120 - } - desc = liege_crusader_king_liege_lineage_interesting_desc - } - } - if = { - limit = { - save_temporary_scope_as = this_char - any_held_county = { - any_county_province = { - barony = { - is_holy_site_of = scope:this_char.faith - } - } - } - } - add = { - value = { - value = 110 - } - desc = holy_site_steward_interesting_desc - } - } - if = { - limit = { - any_held_title = { - tier = tier_county - any_county_province = { - has_special_building = yes - } - } - } - add = { - value = { - every_held_title = { - limit = { - tier = tier_county - any_county_province = { - has_special_building = yes - } - } - every_county_province = { - limit = { - has_special_building = yes - } - add = 45 - } - } - } - desc = holds_special_buildings_interesting_desc - } - } - if = { - limit = { - save_temporary_scope_as = this_char - promoted_legend ?= { legend_owner = scope:this_char } - } - add = { - value = { - value = 105 - } - desc = has_a_legend_interesting_desc - } - } - if = { - limit = { - is_independent_ruler = no - exists = liege - has_weak_hook = liege - } - add = { - value = { - value = 75 - } - desc = weak_hook_liege_interesting_desc - } - } - if = { - limit = { - is_independent_ruler = no - exists = liege - has_strong_hook = liege - } - add = { - value = { - value = 150 - } - desc = strong_hook_liege_interesting_desc - } - } - if = { - limit = { - faith = faith:catholic - faith.religious_head ?= { - opinion = { - target = scope:predecessor - value >= 80 - } - } - } - add = { - value = { - value = 100 - } - desc = beloved_by_pope_interesting_desc - } - } - if = { - limit = { - faith.religious_head ?= this - } - add = { - value = { - value = 150 - } - desc = head_of_faith_interesting_desc - } - } - if = { - limit = { - is_independent_ruler = yes - current_military_strength >= max_military_strength - max_military_strength > liege.max_military_strength - } - add = { - value = { - value = 150 - } - desc = stronger_than_liege_interesting_desc - } - } - if = { - limit = { - is_independent_ruler = yes - highest_held_title_tier >= tier_kingdom - sub_realm_size <= 10 - } - add = { - value = { - value = 100 - } - desc = small_king_interesting_desc - } - } - if = { - limit = { - OR = { - can_execute_decision = convert_whole_realm_to_feudalism_decision - can_execute_decision = convert_whole_realm_to_feudalism_west_african_pagan_decision - } - } - add = { - value = { - value = 250 - } - desc = can_feudalize_interesting_desc - } - } - if = { - limit = { - primary_title.tier ?= tier_duchy - any_held_title = { - count >= 3 - tier = tier_duchy - } - } - add = { - value = { - value = 75 - } - desc = multiduke_interesting_desc - } - } - if = { - limit = { - is_ruler = yes - government_allows = legitimacy - legitimacy_level >= 5 - } - add = { - value = 95 - desc = legitimacy_interesting_desc - } - } - if = { - limit = { - ai_boldness >= 50 - sum_of_all_skills_value >= 50 - OR = { - AND = { - is_male = yes - faith = { has_doctrine = doctrine_gender_female_dominated } - } - AND = { - is_female = yes - faith = { has_doctrine = doctrine_gender_male_dominated } - } - } - } - add = { - value = 95 - desc = non_dominant_gender_ambitious_char_interesting_desc - } - } - if = { - limit = { - is_ruler = yes - OR = { - AND = { - is_male = yes - faith = { has_doctrine = doctrine_gender_female_dominated } - } - AND = { - is_female = yes - faith = { has_doctrine = doctrine_gender_male_dominated } - } - } - } - add = { - value = 55 - desc = non_dominant_gender_ruler_interesting_desc - } - } - if = { - limit = { - intrigue >= 18 - has_trait = education_intrigue - calc_true_if = { - amount >= 2 - has_trait = deceitful - has_trait = schemer - has_trait = vengeful - has_trait = arbitrary - has_trait = paranoid - } - } - add = { - value = 120 - desc = treacherous_schemer_interesting_desc - } - } - if = { - limit = { - diplomacy >= 18 - has_trait = education_diplomacy - calc_true_if = { - amount >= 2 - has_trait = diplomat - has_trait = honest - has_trait = gregarious - has_trait = generous - has_trait = compassionate - } - } - add = { - value = 120 - desc = kind_hearted_diplomat_interesting_desc - } - } - if = { - limit = { - NOT = { - faith = scope:predecessor.faith - } - } - add = { - value = 65 - desc = different_faith_interesting_desc - } - } - if = { - limit = { - stewardship >= 18 - has_trait = education_stewardship - calc_true_if = { - amount >= 2 - has_trait = greedy - has_trait = ambitious - has_trait = diligent - has_trait = stubborn - has_trait = avaricious - } - } - add = { - value = 120 - desc = greedy_steward_interesting_desc - } - } - if = { - limit = { - martial >= 18 - has_trait = education_martial - ai_boldness >= 0 - calc_true_if = { - amount >= 2 - has_trait = strategist - has_trait = brave - has_trait = ambitious - has_trait = wrathful - } - } - add = { - value = 120 - desc = brazen_commander_interesting_desc - } - } - if = { - limit = { - learning >= 18 - has_trait = education_learning - ai_zeal >= 1 - calc_true_if = { - amount >= 2 - has_trait = theologian - has_trait = zealous - has_trait = humble - has_trait = patient - has_trait = chaste - has_trait = content - } - } - add = { - value = 120 - desc = pious_theologian_interesting_desc - } - } - if = { - limit = { - intrigue >= 12 - ai_honor <= 0 - has_trait = lustful - age <= 45 - calc_true_if = { - amount >= 2 - attraction >= 25 - has_trait = beauty_good - has_trait = seducer - num_of_relation_lover >= 2 - is_deviant_trigger = yes - has_sexuality = bisexual - } - } - add = { - value = 120 - desc = salacious_seducer_interesting_desc - } - } - if = { - limit = { - any_killed_character = { count >= 10 } - } - add = { - value = 75 - desc = killed_a_lot_interesting_desc - } - } - if = { - limit = { - is_landed = yes - has_title = title:c_roma - } - add = { - value = 85 - desc = holds_rome_interesting_desc - } - } - if = { - limit = { - is_landed = yes - has_title = title:c_byzantion - } - add = { - value = 85 - desc = holds_byzantion_interesting_desc - } - } - if = { - limit = { - is_landed = yes - has_title = title:c_jerusalem - } - add = { - value = 85 - desc = holds_jerusalem_interesting_desc - } - } - if = { - limit = { - is_landed = yes - has_title = title:c_mecca - } - add = { - value = 85 - desc = holds_mecca_interesting_desc - } - } - if = { - limit = { - is_landed = yes - has_title = title:c_baghdad - } - add = { - value = 85 - desc = holds_baghdad_interesting_desc - } - } - if = { - limit = { - any_character_artifact = { - has_variable = historical_unique_artifact - } - } - add = { - value = { - every_character_artifact = { - limit = { - has_variable = historical_unique_artifact - } - add = 110 - } - } - desc = has_historical_artifacts_interesting_desc - } - } - if = { - limit = { - save_temporary_scope_as = scope_check - dynasty ?= { - any_dynasty_member = { - percent <= 0.1 - faith = scope:scope_check.faith - } - } - } - add = { - value = 150 - desc = underrepresented_faith_interesting_desc - } - } - if = { - limit = { - save_temporary_scope_as = scope_check - dynasty ?= { - any_dynasty_member = { - percent <= 0.1 - culture = scope:scope_check.culture - } - } - } - add = { - value = 105 - desc = underrepresented_culture_interesting_desc - } - } - if = { - limit = { - any_known_secret = { - count >= 2 - } - } - add = { - value = { - every_known_secret = { - add = 30 - } - } - desc = knows_many_secrets_interesting_desc - } - } - if = { - limit = { - any_secret = { - count >= 1 - } - } - add = { - value = { - every_secret = { - add = 30 - } - } - desc = has_secrets_interesting_desc - } - } - if = { - limit = { - is_ruler = no - gold >= 1000 - } - add = { - value = 60 - desc = extremely_wealthy_interesting_desc - } - } - if = { - limit = { - is_ruler = no - any_heir_title = { - count >= 1 - } - } - add = { - value = { - every_heir_title = { - limit = { - tier >= tier_duchy - } - add = -100 - } - every_heir_title = { - limit = { - tier = tier_county - } - add = -25 - } - } - desc = landless_heir_uninteresting_desc - } - } -} diff --git a/N3OW/common/scripted_effects/00_accolades_scripted_effects.txt b/N3OW/common/scripted_effects/00_accolades_scripted_effects.txt deleted file mode 100644 index a2c88fd7..00000000 --- a/N3OW/common/scripted_effects/00_accolades_scripted_effects.txt +++ /dev/null @@ -1,4141 +0,0 @@ -################################################## -# Accolade Effects - -accolades_development_growth_for_least_developed_county_effect = { - # First, should this apply at all? - if = { - limit = { - # Do you have a knight with this accolade at all? - any_active_accolade = { - OR = { - has_accolade_parameter = accolade_development_growth_on_tournament_completion_low - has_accolade_parameter = accolade_development_growth_on_tournament_completion_high - } - } - # Plus, pre-filter out landless rulers. - is_landed_or_landless_administrative = yes - } - # Now, find our least developed county. - ordered_held_title = { - title_tier = county - order_by = { - value = development_level - multiply = -1 - } - save_scope_as = least_developed_county - } - # Next, we'll need to apply a bonus to it. - ## Low boost. - if = { - limit = { - any_active_accolade = { - accolade_parameter = accolade_development_growth_on_tournament_completion_low - } - } - scope:least_developed_county = { change_development_progress_with_overflow = accolade_development_growth_on_tournament_completion_value } - } - ## High boost. - if = { - limit = { - any_active_accolade = { - accolade_parameter = accolade_development_growth_on_tournament_completion_high - } - } - scope:least_developed_county = { change_development_level = accolade_development_level_on_tournament_completion_value } - } - } -} - -accolades_contender_tournament_xp_gain_effect = { - custom_tooltip = accolade_tournament_xp_gain_contender_only.tt - hidden_effect = { - if = { - limit = { - NOT = { has_trait = tourney_participant } - } - add_trait = tourney_participant - } - } - # Low level bonus - if = { - limit = { - accolade = { - has_accolade_parameter = accolade_tournament_xp_gain_contender_only_low - } - } - - hidden_effect = { - random_list = { - 10 = { - show_chance = no - add_trait_xp = { - trait = tourney_participant - track = foot - value = accolade_contender_trait_xp_low_value - } - } - 10 = { - show_chance = no - add_trait_xp = { - trait = tourney_participant - track = horse - value = accolade_contender_trait_xp_low_value - } - } - 10 = { - show_chance = no - add_trait_xp = { - trait = tourney_participant - track = bow - value = accolade_contender_trait_xp_low_value - } - } - 10 = { - show_chance = no - add_trait_xp = { - trait = tourney_participant - track = wit - value = accolade_contender_trait_xp_low_value - } - } - } - } - } - # Mid level bonus - else_if = { - limit = { - accolade = { - has_accolade_parameter = accolade_tournament_xp_gain_contender_only - } - } - hidden_effect = { - random_list = { - 10 = { - add_trait_xp = { - trait = tourney_participant - track = foot - value = accolade_contender_trait_xp_medium_value - } - } - 10 = { - add_trait_xp = { - trait = tourney_participant - track = horse - value = accolade_contender_trait_xp_medium_value - } - } - 10 = { - add_trait_xp = { - trait = tourney_participant - track = bow - value = accolade_contender_trait_xp_medium_value - } - } - 10 = { - add_trait_xp = { - trait = tourney_participant - track = wit - value = accolade_contender_trait_xp_medium_value - } - } - } - } - } - # High level bonus - else_if = { - limit = { - accolade = { - has_accolade_parameter = accolade_tournament_xp_gain_contender_only_high - } - } - hidden_effect = { - random_list = { - 10 = { - add_trait_xp = { - trait = tourney_participant - track = foot - value = accolade_contender_trait_xp_high_value - } - } - 10 = { - add_trait_xp = { - trait = tourney_participant - track = horse - value = accolade_contender_trait_xp_high_value - } - } - 10 = { - add_trait_xp = { - trait = tourney_participant - track = bow - value = accolade_contender_trait_xp_high_value - } - } - 10 = { - add_trait_xp = { - trait = tourney_participant - track = wit - value = accolade_contender_trait_xp_high_value - } - } - } - } - } -} - -accolades_all_knights_liege_tournament_xp_gain_effect = { - custom_tooltip = accolade_tournament_xp_gain_all_knights.tt - hidden_effect = { - if = { - limit = { - NOT = { has_trait = tourney_participant } - } - add_trait = tourney_participant - } - } - # low bonus - if = { - limit = { - liege = { - any_active_accolade = { - accolade_parameter = accolade_tournament_xp_gain_all_knights - } - } - } - hidden_effect = { - random_list = { - 10 = { - modifier = { - add = 20 - has_trait_xp = { - trait = tourney_participant - track = foot - value = 30 - } - } - add_trait_xp = { - trait = tourney_participant - track = foot - value = accolade_all_knights_trait_xp_low_value - } - } - 10 = { - modifier = { - add = 20 - has_trait_xp = { - trait = tourney_participant - track = horse - value = 30 - } - } - add_trait_xp = { - trait = tourney_participant - track = horse - value = accolade_all_knights_trait_xp_low_value - } - } - 10 = { - modifier = { - add = 20 - has_trait_xp = { - trait = tourney_participant - track = bow - value = 30 - } - } - add_trait_xp = { - trait = tourney_participant - track = bow - value = accolade_all_knights_trait_xp_low_value - } - } - 10 = { - modifier = { - add = 20 - has_trait_xp = { - trait = tourney_participant - track = wit - value = 30 - } - } - add_trait_xp = { - trait = tourney_participant - track = wit - value = accolade_all_knights_trait_xp_low_value - } - } - } - } - } - # high bonus - else_if = { - limit = { - liege = { - any_active_accolade = { - accolade_parameter = accolade_tournament_xp_gain_all_knights_high - } - } - } - hidden_effect = { - random_list = { - 10 = { - modifier = { - add = 20 - has_trait_xp = { - trait = tourney_participant - track = foot - value = 30 - } - } - add_trait_xp = { - trait = tourney_participant - track = foot - value = accolade_all_knights_trait_xp_high_value - } - } - 10 = { - modifier = { - add = 20 - has_trait_xp = { - trait = tourney_participant - track = horse - value = 30 - } - } - add_trait_xp = { - trait = tourney_participant - track = horse - value = accolade_all_knights_trait_xp_high_value - } - } - 10 = { - modifier = { - add = 20 - has_trait_xp = { - trait = tourney_participant - track = bow - value = 30 - } - } - add_trait_xp = { - trait = tourney_participant - track = bow - value = accolade_all_knights_trait_xp_high_value - } - } - 10 = { - modifier = { - add = 20 - has_trait_xp = { - trait = tourney_participant - track = wit - value = 30 - } - } - add_trait_xp = { - trait = tourney_participant - track = wit - value = accolade_all_knights_trait_xp_high_value - } - } - } - } - } -} - -#GLORY GAIN FOR TOURS -accolades_activity_complete_tour_glory_effect = { - # Decent glory if you did a grand-ass tour - if = { - limit = { - scope:activity = { - any_attending_character = { - is_knight_of = scope:root_scope - is_acclaimed = yes - } - } - scope:activity = { - variable_list_size = { - name = tour_vassals_to_visit - value >= activity_tour_high_stop_value - } - } - } - scope:activity = { - add_activity_log_entry = { - key = liege_accolades_glory_reward_tour - tags = { completed } - score = 10 - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:root_scope - - every_attending_character = { - limit = { - is_knight_of = scope:root_scope - is_acclaimed = yes - } - accolade = { add_glory = medium_glory_gain } - } - } - } - } - # An ok amount for a sort of long tour - else_if = { - limit = { - scope:activity = { - any_attending_character = { - is_knight_of = scope:root_scope - is_acclaimed = yes - } - } - scope:activity = { - variable_list_size = { - name = tour_vassals_to_visit - value >= activity_tour_low_stop_value - } - } - } - scope:activity = { - add_activity_log_entry = { - key = liege_accolades_glory_reward_tour - tags = { completed } - score = 10 - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:root_scope - - every_attending_character = { - limit = { - is_knight_of = scope:root_scope - is_acclaimed = yes - } - accolade = { add_glory = minor_glory_gain } - } - } - } - } - # Otherwise, it's scraps for you. - else_if = { - limit = { - scope:activity = { - any_attending_character = { - is_knight_of = scope:root_scope - is_acclaimed = yes - } - } - } - scope:activity = { - add_activity_log_entry = { - key = liege_accolades_glory_reward_tour - tags = { completed } - score = 10 - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:root_scope - - every_attending_character = { - limit = { - is_knight_of = scope:root_scope - is_acclaimed = yes - } - accolade = { add_glory = minimal_glory_gain } - } - } - } - } -} - -#GLORY GAIN FOR HUNTS -accolades_activity_complete_hunt_glory_effect = { - save_scope_as = root_scope - # Glory management. - ## We want to toss out a little glory to knights who go hunting without their liege - if = { - limit = { - scope:root_scope = { - is_acclaimed = yes - #this acclaimed knight's liege is not present - exists = liege - scope:root_scope.location != liege.location - } - } - scope:root_scope = { - accolade = { - add_glory = { - value = 20 - multiply = hunt_prestige_animal_level_value - if = { - limit = { scope:activity.var:hunt_success = flag:no } - divide = 5 - } - } - } - } - } - ## We want to toss out a little glory when lieges' knights go hunting with them - else_if = { - limit = { - scope:activity = { - any_attending_character = { - is_knight_of = scope:root_scope - is_acclaimed = yes - } - } - } - scope:activity = { - every_attending_character = { - limit = { - is_knight_of = scope:root_scope - is_acclaimed = yes - } - accolade = { - add_glory = { - value = 20 - multiply = hunt_prestige_animal_level_value - if = { - limit = { scope:activity.var:hunt_success = flag:no } - divide = 5 - } - } - } - } - } - } -} - -#GLORY GAIN FOR WEDDINGS -accolades_activity_complete_wedding_glory_effect = { - # Much glory if you did a magnificent wedding - if = { - limit = { - scope:root_scope = { - is_acclaimed = yes - #this acclaimed knight's liege is not present - exists = liege - scope:root_scope.location != liege.location - } - scope:activity = { - # perfect options - has_activity_option = { - category = wedding_option_entertainment - option = wedding_entertainment_good - } - has_activity_option = { - category = wedding_option_food - option = wedding_food_good - } - has_activity_option = { - category = wedding_option_decoration - option = wedding_decoration_good - } - } - } - scope:activity = { - add_activity_log_entry = { - key = knight_accolade_glory_reward - tags = { completed } - score = 10 - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:root_scope - - #more glory gain if primary participant - if = { - limit = { - scope:root_scope = { - OR = { - this = scope:spouse_1 - this = scope:spouse_2 - } - } - } - scope:root_scope = { - accolade = { add_glory = massive_glory_gain } - } - } - else = { - scope:root_scope = { - accolade = { add_glory = minor_glory_gain } - } - } - } - } - } - # Much glory if you did a magnificent wedding - else_if = { - limit = { - scope:activity = { - any_attending_character = { - is_knight_of = scope:root_scope - is_acclaimed = yes - } - } - scope:activity = { - # perfect options - has_activity_option = { - category = wedding_option_entertainment - option = wedding_entertainment_good - } - has_activity_option = { - category = wedding_option_food - option = wedding_food_good - } - has_activity_option = { - category = wedding_option_decoration - option = wedding_decoration_good - } - } - } - scope:activity = { - add_activity_log_entry = { - key = liege_accolades_glory_reward - tags = { completed } - score = 10 - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:root_scope - - #more glory gain if you are primary participant - if = { - limit = { - OR = { - scope:root_scope = scope:host - scope:root_scope = scope:spouse_1 - scope:root_scope = scope:spouse_2 - } - } - every_attending_character = { - limit = { - is_knight_of = scope:root_scope - is_acclaimed = yes - } - if = { - limit = { - OR = { - this = scope:spouse_1 - this = scope:spouse_2 - } - } - accolade = { add_glory = massive_glory_gain } - } - else = { - accolade = { add_glory = medium_glory_gain } - } - } - } - # more glory for a primary participant knight - else = { - every_attending_character = { - limit = { - is_knight_of = scope:root_scope - is_acclaimed = yes - } - if = { - limit = { - OR = { - this = scope:spouse_1 - this = scope:spouse_2 - } - } - accolade = { add_glory = massive_glory_gain } - } - else = { - accolade = { add_glory = minor_glory_gain } - } - } - } - } - } - } - # Decent glory if acclaimed knights went to a nice wedding without liege - else_if = { - limit = { - scope:root_scope = { - is_acclaimed = yes - #this acclaimed knight's liege is not present - exists = liege - scope:root_scope.location != liege.location - } - scope:activity = { - OR = { - AND = { - # at least two tier threes - has_activity_option = { - category = wedding_option_entertainment - option = wedding_entertainment_good - } - has_activity_option = { - category = wedding_option_food - option = wedding_food_good - } - } - AND = { - has_activity_option = { - category = wedding_option_entertainment - option = wedding_entertainment_good - } - has_activity_option = { - category = wedding_option_decoration - option = wedding_decoration_good - } - } - AND = { - has_activity_option = { - category = wedding_option_decoration - option = wedding_decoration_good - } - has_activity_option = { - category = wedding_option_food - option = wedding_food_good - } - } - # a tier 3 and two tier 2s - AND = { - has_activity_option = { - category = wedding_option_entertainment - option = wedding_entertainment_good - } - has_activity_option = { - category = wedding_option_food - option = wedding_food_normal - } - has_activity_option = { - category = wedding_option_decoration - option = wedding_decoration_normal - } - } - AND = { - has_activity_option = { - category = wedding_option_food - option = wedding_food_good - } - has_activity_option = { - category = wedding_option_entertainment - option = wedding_entertainment_normal - } - has_activity_option = { - category = wedding_option_decoration - option = wedding_decoration_normal - } - } - AND = { - has_activity_option = { - category = wedding_option_decoration - option = wedding_decoration_good - } - has_activity_option = { - category = wedding_option_entertainment - option = wedding_entertainment_normal - } - has_activity_option = { - category = wedding_option_food - option = wedding_food_normal - } - } - } - } - } - scope:activity = { - add_activity_log_entry = { - key = knight_accolade_glory_reward - tags = { completed } - score = 10 - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:root_scope - - #more glory gain if primary participant - if = { - limit = { - scope:root_scope = { - OR = { - scope:root_scope = scope:spouse_1 - scope:root_scope = scope:spouse_2 - } - } - } - scope:root_scope = { - accolade = { add_glory = major_glory_gain } - } - } - else = { - scope:root_scope = { - accolade = { add_glory = minimal_glory_gain } - } - } - } - } - } - # Decent glory if you went to a nice wedding with acclaimed knights - else_if = { - limit = { - scope:activity = { - any_attending_character = { - is_knight_of = scope:root_scope - is_acclaimed = yes - } - } - scope:activity = { - OR = { - AND = { - # at least two tier threes - has_activity_option = { - category = wedding_option_entertainment - option = wedding_entertainment_good - } - has_activity_option = { - category = wedding_option_food - option = wedding_food_good - } - } - AND = { - has_activity_option = { - category = wedding_option_entertainment - option = wedding_entertainment_good - } - has_activity_option = { - category = wedding_option_decoration - option = wedding_decoration_good - } - } - AND = { - has_activity_option = { - category = wedding_option_decoration - option = wedding_decoration_good - } - has_activity_option = { - category = wedding_option_food - option = wedding_food_good - } - } - # a tier 3 and two tier 2s - AND = { - has_activity_option = { - category = wedding_option_entertainment - option = wedding_entertainment_good - } - has_activity_option = { - category = wedding_option_food - option = wedding_food_normal - } - has_activity_option = { - category = wedding_option_decoration - option = wedding_decoration_normal - } - } - AND = { - has_activity_option = { - category = wedding_option_food - option = wedding_food_good - } - has_activity_option = { - category = wedding_option_entertainment - option = wedding_entertainment_normal - } - has_activity_option = { - category = wedding_option_decoration - option = wedding_decoration_normal - } - } - AND = { - has_activity_option = { - category = wedding_option_decoration - option = wedding_decoration_good - } - has_activity_option = { - category = wedding_option_entertainment - option = wedding_entertainment_normal - } - has_activity_option = { - category = wedding_option_food - option = wedding_food_normal - } - } - } - } - } - scope:activity = { - add_activity_log_entry = { - key = liege_accolades_glory_reward - tags = { completed } - score = 10 - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:root_scope - - #more glory gain if you are primary participant - if = { - limit = { - OR = { - scope:root_scope = scope:host - scope:root_scope = scope:spouse_1 - scope:root_scope = scope:spouse_2 - } - } - every_attending_character = { - limit = { - is_knight_of = scope:root_scope - is_acclaimed = yes - } - if = { - limit = { - OR = { - this = scope:spouse_1 - this = scope:spouse_2 - } - } - accolade = { add_glory = major_glory_gain } - } - else = { - accolade = { add_glory = minor_glory_gain } - } - } - } - # more glory for a primary participant knight - else = { - every_attending_character = { - limit = { - is_knight_of = scope:root_scope - is_acclaimed = yes - } - if = { - limit = { - OR = { - this = scope:spouse_1 - this = scope:spouse_2 - } - } - accolade = { add_glory = major_glory_gain } - } - else = { - accolade = { add_glory = minimal_glory_gain } - } - } - } - } - } - } - # An ok amount for a sort of grand wedding, knights without attending liege - else_if = { - limit = { - scope:root_scope = { - is_acclaimed = yes - #this acclaimed knight's liege is not present - exists = liege - scope:root_scope.location != liege.location - } - scope:activity = { - # 1 tier 3 option - OR = { - has_activity_option = { - category = wedding_option_entertainment - option = wedding_entertainment_good - } - has_activity_option = { - category = wedding_option_food - option = wedding_food_good - } - has_activity_option = { - category = wedding_option_decoration - option = wedding_decoration_good - } - # 2 tier 2 options - AND = { - has_activity_option = { - category = wedding_option_entertainment - option = wedding_entertainment_normal - } - has_activity_option = { - category = wedding_option_food - option = wedding_food_normal - } - } - AND = { - has_activity_option = { - category = wedding_option_entertainment - option = wedding_entertainment_normal - } - has_activity_option = { - category = wedding_option_decoration - option = wedding_decoration_normal - } - } - AND = { - has_activity_option = { - category = wedding_option_decoration - option = wedding_decoration_normal - } - has_activity_option = { - category = wedding_option_food - option = wedding_food_normal - } - } - } - } - } - scope:activity = { - add_activity_log_entry = { - key = knight_accolade_glory_reward - tags = { completed } - score = 10 - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:root_scope - - #more glory gain if primary participant - if = { - limit = { - scope:root_scope = { - OR = { - this = scope:spouse_1 - this = scope:spouse_2 - } - } - } - scope:root_scope = { - accolade = { add_glory = medium_glory_gain } - } - } - else = { - scope:root_scope = { - accolade = { add_glory = sub_minimal_glory_gain } - } - } - } - } - } - # An ok amount for a sort of grand wedding, liege with attending knights - else_if = { - limit = { - scope:activity = { - any_attending_character = { - is_knight_of = scope:root_scope - is_acclaimed = yes - } - } - scope:activity = { - #this - OR = { - has_activity_option = { - category = wedding_option_entertainment - option = wedding_entertainment_good - } - has_activity_option = { - category = wedding_option_food - option = wedding_food_good - } - has_activity_option = { - category = wedding_option_decoration - option = wedding_decoration_good - } - # 2 tier 2 options - AND = { - has_activity_option = { - category = wedding_option_entertainment - option = wedding_entertainment_normal - } - has_activity_option = { - category = wedding_option_food - option = wedding_food_normal - } - } - AND = { - has_activity_option = { - category = wedding_option_entertainment - option = wedding_entertainment_normal - } - has_activity_option = { - category = wedding_option_decoration - option = wedding_decoration_normal - } - } - AND = { - has_activity_option = { - category = wedding_option_decoration - option = wedding_decoration_normal - } - has_activity_option = { - category = wedding_option_food - option = wedding_food_normal - } - } - } - } - } - scope:activity = { - add_activity_log_entry = { - key = liege_accolades_glory_reward - tags = { completed } - score = 10 - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:root_scope - - #more glory gain if primary participant - if = { - limit = { - OR = { - scope:root_scope = scope:host - scope:root_scope = scope:spouse_1 - scope:root_scope = scope:spouse_2 - } - } - every_attending_character = { - limit = { - is_knight_of = scope:root_scope - is_acclaimed = yes - } - if = { - limit = { - OR = { - this = scope:spouse_1 - this = scope:spouse_2 - } - } - accolade = { add_glory = medium_glory_gain } - } - else = { - accolade = { add_glory = minimal_glory_gain } - } - } - } - # more glory for a primary participant knight - else = { - every_attending_character = { - limit = { - is_knight_of = scope:root_scope - is_acclaimed = yes - } - if = { - limit = { - OR = { - this = scope:spouse_1 - this = scope:spouse_2 - } - } - accolade = { add_glory = medium_glory_gain } - } - else = { - accolade = { add_glory = sub_minimal_glory_gain } - } - } - } - } - } - } - # Otherwise, attending knights without liege only get glory as a spouse - else_if = { - limit = { - scope:root_scope = { - OR = { - this = scope:spouse_1 - this = scope:spouse_2 - } - is_acclaimed = yes - #this acclaimed knight's liege is not present - exists = liege - scope:root_scope.location != liege.location - } - } - scope:activity = { - add_activity_log_entry = { - key = knight_accolade_glory_reward - tags = { completed } - score = 10 - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:root_scope - - scope:root_scope = { - accolade = { add_glory = minor_glory_gain } - } - } - } - } - # attending knights of liege get scraps - else_if = { - limit = { - scope:activity = { - any_attending_character = { - is_knight_of = scope:root_scope - is_acclaimed = yes - } - } - } - scope:activity = { - add_activity_log_entry = { - key = liege_accolades_glory_reward - tags = { completed } - score = 10 - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:root_scope - - #more glory gain if primary participant - if = { - limit = { - OR = { - scope:root_scope = scope:host - scope:root_scope = scope:spouse_1 - scope:root_scope = scope:spouse_2 - } - } - every_attending_character = { - limit = { - is_knight_of = scope:root_scope - is_acclaimed = yes - } - if = { - limit = { - OR = { - this = scope:spouse_1 - this = scope:spouse_2 - } - } - accolade = { add_glory = minor_glory_gain } - } - else = { - accolade = { add_glory = sub_minimal_glory_gain } - } - } - } - # more glory for a primary participant knight - else = { - every_attending_character = { - limit = { - is_knight_of = scope:root_scope - is_acclaimed = yes - OR = { - this = scope:spouse_1 - this = scope:spouse_2 - } - } - accolade = { add_glory = minor_glory_gain } - } - } - } - } - } -} - -#GLORY GAIN FOR FEASTS -accolades_activity_complete_feast_glory_effect = { - if = { - limit = { - scope:activity.special_guest:honorary_guest_regular ?= { - is_acclaimed = yes - } - } - scope:activity.special_guest:honorary_guest_regular ?= { - save_scope_as = honorary_guest_knight - } - } - # Decent glory if the acclaimed knight attends a grand-ass feast without liege - if = { - limit = { - scope:root_scope = { - is_acclaimed = yes - #this acclaimed knight's liege is not present - exists = liege - scope:root_scope.location != liege.location - } - scope:activity = { - has_activity_option = { - category = feast_option_food - option = feast_food_good - } - has_activity_option = { - category = feast_option_courses - option = feast_courses_good - } - } - } - scope:activity = { - add_activity_log_entry = { - key = knight_accolade_glory_reward - tags = { completed } - score = 10 - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:root_scope - if = { - limit = { - #more glory gain only if honored guest - exists = scope:honorary_guest_knight - scope:root_scope = scope:honorary_guest_knight - } - scope:root_scope = { - accolade = { add_glory = major_glory_gain } - } - } - else = { - scope:root_scope = { - accolade = { add_glory = minimal_glory_gain } - } - } - - } - } - } - # Decent glory if the liege attends a grand-ass feast with acclaimed knights - else_if = { - limit = { - scope:activity = { - any_attending_character = { - is_knight_of = scope:root_scope - is_acclaimed = yes - } - } - scope:activity = { - has_activity_option = { - category = feast_option_food - option = feast_food_good - } - has_activity_option = { - category = feast_option_courses - option = feast_courses_good - } - } - } - scope:activity = { - add_activity_log_entry = { - key = liege_accolades_glory_reward - tags = { completed } - score = 10 - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:root_scope - - #more glory gain if host - if = { - limit = { - scope:root_scope = { - this = scope:host - } - } - every_attending_character = { - limit = { - is_knight_of = scope:root_scope - is_acclaimed = yes - } - if = { - limit = { - exists = scope:honorary_guest_knight - this = scope:honorary_guest_knight - } - accolade = { add_glory = major_glory_gain } - } - else = { - accolade = { add_glory = minor_glory_gain } - } - } - } - else = { - every_attending_character = { - limit = { - is_knight_of = scope:root_scope - is_acclaimed = yes - } - if = { - limit = { - exists = scope:honorary_guest_knight - this = scope:honorary_guest_knight - } - accolade = { add_glory = major_glory_gain } - } - else = { - accolade = { add_glory = minimal_glory_gain } - } - } - } - } - } - } - # An ok amount for a sort of grand feast, knight's liege not attending - else_if = { - limit = { - scope:root_scope = { - is_acclaimed = yes - #this acclaimed knight's liege is not present - exists = liege - scope:root_scope.location != liege.location - } - scope:activity = { - OR = { - has_activity_option = { - category = feast_option_food - option = feast_food_good - } - has_activity_option = { - category = feast_option_food - option = feast_food_normal - } - } - OR = { - has_activity_option = { - category = feast_option_courses - option = feast_courses_good - } - has_activity_option = { - category = feast_option_courses - option = feast_courses_normal - } - } - } - } - scope:activity = { - add_activity_log_entry = { - key = knight_accolade_glory_reward - tags = { completed } - score = 10 - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:root_scope - if = { - limit = { - #more glory gain only if honored guest - exists = scope:honorary_guest_knight - scope:root_scope = scope:honorary_guest_knight - } - scope:root_scope = { - accolade = { add_glory = medium_glory_gain } - } - } - else = { - scope:root_scope = { - accolade = { add_glory = sub_minimal_glory_gain } - } - } - } - } - } - # An ok amount for a sort of grand feast, for acclaimed knights of attending liege - else_if = { - limit = { - scope:activity = { - any_attending_character = { - is_knight_of = scope:root_scope - is_acclaimed = yes - } - } - scope:activity = { - OR = { - has_activity_option = { - category = feast_option_food - option = feast_food_good - } - has_activity_option = { - category = feast_option_food - option = feast_food_normal - } - } - OR = { - has_activity_option = { - category = feast_option_courses - option = feast_courses_good - } - has_activity_option = { - category = feast_option_courses - option = feast_courses_normal - } - } - } - } - scope:activity = { - add_activity_log_entry = { - key = liege_accolades_glory_reward - tags = { completed } - score = 10 - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:root_scope - - #more glory gain if host - if = { - limit = { - scope:root_scope = { - this = scope:host - } - } - every_attending_character = { - limit = { - is_knight_of = scope:root_scope - is_acclaimed = yes - } - if = { - limit = { - exists = scope:honorary_guest_knight - this = scope:honorary_guest_knight - } - accolade = { add_glory = medium_glory_gain } - } - else = { - accolade = { add_glory = minimal_glory_gain } - } - } - } - else = { - every_attending_character = { - limit = { - is_knight_of = scope:root_scope - is_acclaimed = yes - } - if = { - limit = { - exists = scope:honorary_guest_knight - this = scope:honorary_guest_knight - } - accolade = { add_glory = medium_glory_gain } - } - else = { - accolade = { add_glory = sub_minimal_glory_gain } - } - } - } - } - } - } - # Otherwise, it's scraps for attending knights without liege - else_if = { - limit = { - scope:root_scope = { - is_acclaimed = yes - #this acclaimed knight's liege is not present - exists = liege - scope:root_scope.location != liege.location - exists = scope:honorary_guest_knight - this = scope:honorary_guest_knight - } - } - scope:activity = { - add_activity_log_entry = { - key = knight_accolade_glory_reward - tags = { completed } - score = 10 - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:root_scope - - scope:root_scope = { - accolade = { add_glory = minor_glory_gain } - } - } - } - } - # Otherwise, it's scraps for attending knights of liege - else_if = { - limit = { - scope:activity = { - any_attending_character = { - is_knight_of = scope:root_scope - is_acclaimed = yes - } - } - } - scope:activity = { - add_activity_log_entry = { - key = liege_accolades_glory_reward - tags = { completed } - score = 10 - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:root_scope - - #more glory gain if host - if = { - limit = { - scope:root_scope = { - this = scope:host - } - } - every_attending_character = { - limit = { - is_knight_of = scope:root_scope - is_acclaimed = yes - } - if = { - limit = { - exists = scope:honorary_guest_knight - this = scope:honorary_guest_knight - } - accolade = { add_glory = minor_glory_gain } - } - else = { - accolade = { add_glory = sub_minimal_glory_gain } - } - } - } - else = { - scope:honorary_guest_knight ?= { - accolade = { add_glory = minor_glory_gain } - } - } - } - } - } -} - - -#Glory Gain from winning wars against THE BIG BAD -# little wars when the attacker wins -accolade_attacker_war_end_glory_gain_low_effect = { - if = { - limit = { - has_dlc_feature = accolades - } - if = { - limit = { - tier_difference = { - target = scope:defender - value <= -3 - } - } - every_active_accolade = { - custom = custom.attacker_every_active_accolade - add_glory = medium_glory_gain - } - } - else_if = { - limit = { - tier_difference = { - target = scope:defender - value = -2 - } - } - every_active_accolade = { - custom = custom.attacker_every_active_accolade - add_glory = minor_glory_gain - } - } - else_if = { - limit = { - tier_difference = { - target = scope:defender - value = -1 - } - } - every_active_accolade = { - custom = custom.attacker_every_active_accolade - add_glory = minimal_glory_gain - } - } - } -} - -# little wars when the defender wins -accolade_defender_war_end_glory_gain_low_effect = { - if = { - limit = { - has_dlc_feature = accolades - } - if = { - limit = { - tier_difference = { - target = scope:attacker - value <= -3 - } - } - every_active_accolade = { - custom = custom.defender_every_active_accolade - add_glory = medium_glory_gain - } - } - else_if = { - limit = { - tier_difference = { - target = scope:attacker - value = -2 - } - } - every_active_accolade = { - custom = custom.defender_every_active_accolade - add_glory = minor_glory_gain - } - } - else_if = { - limit = { - tier_difference = { - target = scope:attacker - value = -1 - } - } - every_active_accolade = { - custom = custom.defender_every_active_accolade - add_glory = minimal_glory_gain - } - } - } -} - -# duchy-type wars when the attacker wins -accolade_attacker_war_end_glory_gain_med_effect = { - if = { - limit = { - has_dlc_feature = accolades - } - if = { - limit = { - tier_difference = { - target = scope:defender - value <= -3 - } - } - every_active_accolade = { - custom = custom.attacker_every_active_accolade - add_glory = major_glory_gain - } - } - else_if = { - limit = { - tier_difference = { - target = scope:defender - value = -2 - } - } - every_active_accolade = { - custom = custom.attacker_every_active_accolade - add_glory = medium_glory_gain - } - } - else_if = { - limit = { - tier_difference = { - target = scope:defender - value = -1 - } - } - every_active_accolade = { - custom = custom.attacker_every_active_accolade - add_glory = minor_glory_gain - } - } - } -} - -# duchy-type wars when the defender wins -accolade_defender_war_end_glory_gain_med_effect = { - if = { - limit = { - has_dlc_feature = accolades - } - if = { - limit = { - tier_difference = { - target = scope:attacker - value <= -3 - } - } - every_active_accolade = { - custom = custom.defender_every_active_accolade - add_glory = major_glory_gain - } - } - else_if = { - limit = { - tier_difference = { - target = scope:attacker - value = -2 - } - } - every_active_accolade = { - custom = custom.defender_every_active_accolade - add_glory = medium_glory_gain - } - } - else_if = { - limit = { - tier_difference = { - target = scope:attacker - value = -1 - } - } - every_active_accolade = { - custom = custom.defender_every_active_accolade - add_glory = minor_glory_gain - } - } - } -} - -# KINGDOM-type wars when the attacker wins -accolade_attacker_war_end_glory_gain_high_effect = { - if = { - limit = { - has_dlc_feature = accolades - } - if = { - limit = { - tier_difference = { - target = scope:defender - value <= -3 - } - } - every_active_accolade = { - custom = custom.attacker_every_active_accolade - add_glory = massive_glory_gain - } - } - else_if = { - limit = { - tier_difference = { - target = scope:defender - value = -2 - } - } - every_active_accolade = { - custom = custom.attacker_every_active_accolade - add_glory = major_glory_gain - } - } - else_if = { - limit = { - tier_difference = { - target = scope:defender - value = -1 - } - } - every_active_accolade = { - custom = custom.attacker_every_active_accolade - add_glory = medium_glory_gain - } - } - } -} - -# KINGDOM-type wars when the defender wins -accolade_defender_war_end_glory_gain_high_effect = { - if = { - limit = { - has_dlc_feature = accolades - } - if = { - limit = { - tier_difference = { - target = scope:attacker - value <= -3 - } - } - every_active_accolade = { - custom = custom.defender_every_active_accolade - add_glory = massive_glory_gain - } - } - else_if = { - limit = { - tier_difference = { - target = scope:attacker - value = -2 - } - } - every_active_accolade = { - custom = custom.defender_every_active_accolade - add_glory = major_glory_gain - } - } - else_if = { - limit = { - tier_difference = { - target = scope:attacker - value = -1 - } - } - every_active_accolade = { - custom = custom.defender_every_active_accolade - add_glory = medium_glory_gain - } - } - } -} - -# EMPIRE-type wars when the attacker wins -accolade_attacker_war_end_glory_gain_very_high_effect = { - if = { - limit = { - has_dlc_feature = accolades - } - if = { - limit = { - tier_difference = { - target = scope:defender - value <= -3 - } - } - every_active_accolade = { - custom = custom.attacker_every_active_accolade - add_glory = monumental_glory_gain - } - } - else_if = { - limit = { - tier_difference = { - target = scope:defender - value = -2 - } - } - every_active_accolade = { - custom = custom.attacker_every_active_accolade - add_glory = massive_glory_gain - } - } - else_if = { - limit = { - tier_difference = { - target = scope:defender - value = -1 - } - } - every_active_accolade = { - custom = custom.attacker_every_active_accolade - add_glory = major_glory_gain - } - } - } -} - -# EMPIRE-type wars when the defender wins -accolade_defender_war_end_glory_gain_very_high_effect = { - if = { - limit = { - has_dlc_feature = accolades - } - if = { - limit = { - tier_difference = { - target = scope:attacker - value <= -3 - } - } - every_active_accolade = { - custom = custom.defender_every_active_accolade - add_glory = monumental_glory_gain - } - } - else_if = { - limit = { - tier_difference = { - target = scope:attacker - value = -2 - } - } - every_active_accolade = { - custom = custom.defender_every_active_accolade - add_glory = massive_glory_gain - } - } - else_if = { - limit = { - tier_difference = { - target = scope:attacker - value = -1 - } - } - every_active_accolade = { - custom = custom.defender_every_active_accolade - add_glory = major_glory_gain - } - } - } -} - -#Add glory with accolade checks MINIMAL GAIN -accolade_minimal_glory_gain_with_checks_effect = { - if = { - limit = { - is_acclaimed = yes - is_alive = yes - accolade = { - is_accolade_active = yes - } - } - accolade = { - add_glory = minimal_glory_gain - } - } -} -#Add glory with accolade checks MINOR GAIN -accolade_minor_glory_gain_with_checks_effect = { - if = { - limit = { - is_acclaimed = yes - is_alive = yes - accolade = { - is_accolade_active = yes - } - } - accolade = { - add_glory = minor_glory_gain - } - } -} -#Add glory with accolade checks MEDIUM GAIN -accolade_medium_glory_gain_with_checks_effect = { - if = { - limit = { - is_acclaimed = yes - is_alive = yes - accolade = { - is_accolade_active = yes - } - } - accolade = { - add_glory = medium_glory_gain - } - } -} -#Add glory with accolade checks MAJOR GAIN -accolade_major_glory_gain_with_checks_effect = { - if = { - limit = { - is_acclaimed = yes - is_alive = yes - accolade = { - is_accolade_active = yes - } - } - accolade = { - add_glory = major_glory_gain - } - } -} -#Add glory with accolade checks MASSIVE GAIN -accolade_massive_glory_gain_with_checks_effect = { - if = { - limit = { - is_acclaimed = yes - is_alive = yes - accolade = { - is_accolade_active = yes - } - } - accolade = { - add_glory = massive_glory_gain - } - } -} - -#Add glory with accolade checks MONUMENTAL GAIN -accolade_monumental_glory_gain_with_checks_effect = { - if = { - limit = { - is_acclaimed = yes - is_alive = yes - accolade = { - is_accolade_active = yes - } - } - accolade = { - add_glory = monumental_glory_gain - } - } -} - -#Add glory with accolade checks MINIMAL LOSS -accolade_minimal_glory_loss_with_checks_effect = { - if = { - limit = { - is_acclaimed = yes - is_alive = yes - accolade = { - is_accolade_active = yes - } - } - accolade = { - add_glory = minimal_glory_loss - } - } -} -#Add glory with accolade checks MINOR LOSS -accolade_minor_glory_loss_with_checks_effect = { - if = { - limit = { - is_acclaimed = yes - is_alive = yes - accolade = { - is_accolade_active = yes - } - } - accolade = { - add_glory = minor_glory_loss - } - } -} -#Add glory with accolade checks MEDIUM LOSS -accolade_medium_glory_loss_with_checks_effect = { - if = { - limit = { - is_acclaimed = yes - is_alive = yes - accolade = { - is_accolade_active = yes - } - } - accolade = { - add_glory = medium_glory_loss - } - } -} -#Add glory with accolade checks MAJOR LOSS -accolade_major_glory_loss_with_checks_effect = { - if = { - limit = { - is_acclaimed = yes - is_alive = yes - accolade = { - is_accolade_active = yes - } - } - accolade = { - add_glory = major_glory_loss - } - } -} -#Add glory with accolade checks MASSIVE LOSS -accolade_massive_glory_loss_with_checks_effect = { - if = { - limit = { - is_acclaimed = yes - is_alive = yes - accolade = { - is_accolade_active = yes - } - } - accolade = { - add_glory = massive_glory_loss - } - } -} - -#Add glory with accolade checks MONUMENTAL LOSS -accolade_monumental_glory_loss_with_checks_effect = { - if = { - limit = { - is_acclaimed = yes - is_alive = yes - accolade = { - is_accolade_active = yes - } - } - accolade = { - add_glory = monumental_glory_loss - } - } -} - -# FIND SUITABLE ACCOLADE SUCCESSOR INTERACTION -#this saves a random culture that's known for its knights and is familiar enough to the accolade_tournament_xp_gain_all_knights -save_general_accolade_successor_culture_effect = { - random_culture_global = { - limit = { - OR = { - has_cultural_pillar = ethos_stoic - has_cultural_pillar = ethos_bellicose - has_cultural_parameter = wanderers_gain_extra_combat_skills - has_cultural_parameter = high_prowess_ignores_knight_restrictions - has_cultural_parameter = prowess_from_martial_education - has_cultural_parameter = martial_education_more_valued - has_cultural_parameter = strong_traits_more_valued - } - trigger_if = { - limit = { - root = { - highest_held_title_tier >= tier_duchy - } - exists = root.capital_county - } - any_culture_county = { - OR = { - holder = { - this = root - } - holder.liege = { - this = root - } - holder.top_liege = { - this = root - } - empire = root.capital_county.empire - } - } - } - trigger_else = { - exists = root.capital_county - any_culture_county = { - OR = { - holder = { - this = root - } - holder.liege = { - this = root - } - holder.top_liege = { - this = root - } - kingdom = root.capital_county.kingdom - } - } - } - culture_number_of_counties > 0 - cultural_acceptance = { - target = root.culture - value >= 15 - } - } - save_scope_as = knight_culture - } -} - -#this one's just for the varangians -save_varangian_successor_culture_effect = { - if = { - limit = { - current_date < 1400 - root = { - has_title = title:e_byzantium - } - } - random_culture_global = { - limit = { - OR = { - has_cultural_parameter = unlock_maa_huscarls - has_cultural_parameter = unlock_maa_varangian_veterans - } - culture_number_of_counties > 0 - any_culture_duchy = { - NOT = { - this = title:d_iceland - } - } - NOT = { - this = culture:estonian - } - NAND = { - this = culture:anglo_saxon - current_date < 1067 - } - } - save_scope_as = varangian_culture - } - } -} - -#this one's just for the varangians -save_turkic_successor_culture_effect = { - if = { - limit = { - root = { - faith.religion = religion:islam_religion - capital_county.title_province ?= { - OR = { - geographical_region = world_middle_east - geographical_region = world_africa_north_east - geographical_region = world_asia_minor - geographical_region = world_europe_south_east - geographical_region = world_steppe - } - } - culture = { - NOT = { - culture_has_archer_cavalry_maa = yes - } - } - NOT = { has_trait = nomadic_philosophy } - highest_held_title_tier >= tier_kingdom - } - } - random_culture_global = { - limit = { - culture_has_archer_cavalry_maa = yes - has_cultural_pillar = heritage_turkic - culture_number_of_counties > 0 - any_culture_county = { - holder = { - in_diplomatic_range = root - } - } - } - weight = { - modifier = { - add = 100 - any_culture_county = { - empire = root.capital_county.empire - } - } - modifier = { - add = 50 - any_culture_county = { - kingdom = root.capital_county.kingdom - } - } - } - save_scope_as = turkic_culture - } - } -} - -#this saves appropriate cultures for specific accolade types, just need to check for the type along with its relevant cultural triggers -save_type_specific_successor_culture_effect = { - random_culture_global = { - limit = { - OR = { - # Marauder - AND = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:marauder_attribute - } - } - OR = { - has_cultural_pillar = ethos_bellicose - has_cultural_tradition = tradition_ruling_caste - has_cultural_tradition = tradition_eye_for_an_eye - } - } - # Idealist - AND = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:idealist_attribute - } - } - OR = { - has_cultural_pillar = ethos_egalitarian - has_cultural_tradition = tradition_charitable - has_cultural_tradition = tradition_loyal_soldiers - has_cultural_tradition = tradition_chivalry - } - } - # Charmer - AND = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:charmer_attribute - } - } - OR = { - has_cultural_pillar = ethos_courtly - has_cultural_tradition = tradition_welcoming - } - } - # Thug - AND = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:thug_attribute - } - } - OR = { - has_cultural_pillar = ethos_bellicose - has_cultural_tradition = tradition_battlefield_looters - has_cultural_tradition = tradition_ruling_caste - has_cultural_tradition = tradition_quarrelsome - } - } - # Disciplinarian - AND = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:disciplinarian_attribute - } - } - OR = { - has_cultural_pillar = ethos_stoic - has_cultural_pillar = ethos_bureaucratic - has_cultural_tradition = tradition_hard_working - has_cultural_tradition = tradition_staunch_traditionalists - has_cultural_tradition = tradition_formation_fighting - } - } - # Valiant - AND = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:valiant_attribute - } - } - OR = { - has_cultural_pillar = ethos_bellicose - has_cultural_tradition = tradition_talent_acquisition - has_cultural_tradition = tradition_only_the_strong - has_cultural_tradition = tradition_stand_and_fight - has_cultural_tradition = tradition_warrior_culture - has_cultural_tradition = tradition_fp1_performative_honour - has_cultural_tradition = tradition_fp1_the_right_to_prove - } - } - # Stalwart - AND = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:stalwart_attribute - } - } - OR = { - has_cultural_pillar = ethos_stoic - has_cultural_pillar = ethos_communal - has_cultural_tradition = tradition_stalwart_defenders - has_cultural_tradition = tradition_stand_and_fight - has_cultural_tradition = tradition_druzhina - has_cultural_tradition = tradition_hird - has_cultural_tradition = tradition_fp1_coastal_warriors - } - NOT = { - has_cultural_tradition = tradition_hit_and_run - } - } - # Scoundrel - AND = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:scoundrel_attribute - } - } - OR = { - has_cultural_pillar = ethos_bellicose - has_cultural_tradition = tradition_hit_and_run - has_cultural_tradition = tradition_quarrelsome - has_cultural_tradition = tradition_swords_for_hire - has_cultural_tradition = tradition_ep3_audacious_cadets - has_cultural_tradition = tradition_fp1_coastal_warriors - has_cultural_tradition = tradition_fp2_state_ransoming - has_cultural_tradition = tradition_practiced_pirates - } - NOT = { - has_cultural_tradition = tradition_hit_and_run - } - } - # Politicker - AND = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:politicker_attribute - } - } - OR = { - has_cultural_pillar = ethos_courtly - has_cultural_pillar = ethos_egalitarian - has_cultural_parameter = facilitate_alliance_acceptance - has_cultural_parameter = can_make_republican_vassals - has_cultural_parameter = learns_more_languages - has_cultural_parameter = diplomacy_education_better_outcomes - has_cultural_parameter = eunuch_trait_bonuses - } - NOT = { - has_cultural_parameter = ai_doesnt_marry_outside_culture - } - } - # Tactician - AND = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:tactician_attribute - } - } - OR = { - has_cultural_pillar = ethos_bellicose - has_cultural_pillar = ethos_bureaucratic - has_cultural_tradition = tradition_adaptive_skirmishing - has_cultural_tradition = tradition_formation_fighting - has_cultural_parameter = better_knights_from_decision - has_cultural_tradition = tradition_hit_and_run - } - } - # Reeve - AND = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:reeve_attribute - } - } - OR = { - has_cultural_pillar = ethos_bureaucratic - has_cultural_pillar = ethos_egalitarian - has_cultural_parameter = martial_education_worse_outcomes - has_cultural_parameter = poorly_educated_leaders_distrusted - has_cultural_parameter = just_trait_more_common - has_cultural_tradition = tradition_hard_working - } - } - # Manipulator - AND = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:manipulator_attribute - } - } - OR = { - has_cultural_pillar = ethos_courtly - has_cultural_pillar = ethos_communal - has_cultural_parameter = eunuch_trait_bonuses - has_cultural_parameter = rivalries_more_common - } - NOR = { - has_cultural_tradition = tradition_stand_and_fight - has_cultural_parameter = honest_trait_more_common - } - } - # Mentor - AND = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:mentor_attribute - } - } - OR = { - has_cultural_pillar = ethos_communal - has_cultural_pillar = ethos_spiritual - has_cultural_parameter = guardians_can_transfer_commander_traits - has_cultural_parameter = generous_trait_more_common - has_cultural_parameter = patient_trait_more_common - has_cultural_parameter = innovation_from_learning_traits - has_cultural_parameter = better_ward_education - } - NOT = { - has_cultural_parameter = minimum_prowess_for_knights - } - } - # Contender - AND = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:contender_attribute - } - } - OR = { - has_cultural_pillar = ethos_bellicose - has_cultural_pillar = ethos_stoic - has_cultural_parameter = high_prowess_ignores_knight_restrictions - has_cultural_parameter = prowess_from_martial_education - has_cultural_parameter = martial_education_more_valued - has_cultural_parameter = strong_traits_more_valued - has_cultural_parameter = better_knights_from_decision - has_cultural_parameter = minimum_prowess_for_knights - has_cultural_parameter = - has_access_to_trials_by_combat - } - } - # Archer - AND = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:archer_attribute - } - } - OR = { - 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_yoruba - has_cultural_pillar = heritage_baltic - has_cultural_pillar = heritage_balto_finnic - } - } - # Skirmisher - AND = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:skirmisher_attribute - } - } - OR = { - has_cultural_pillar = heritage_baltic - has_cultural_pillar = heritage_ugro_permian - has_cultural_pillar = heritage_balto_finnic - has_cultural_pillar = heritage_somalian - has_cultural_pillar = heritage_west_african - has_cultural_pillar = heritage_goidelic - has_cultural_pillar = heritage_brythonic - } - } - # Pike - AND = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:pike_attribute - } - } - OR = { - has_cultural_pillar = heritage_central_germanic - has_cultural_pillar = heritage_latin - } - } - # Outrider - AND = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:outrider_attribute - } - } - OR = { - has_cultural_tradition = tradition_ep3_indomitable_azatani - has_cultural_tradition = tradition_desert_ribat - has_cultural_tradition = tradition_chanson_de_geste - has_cultural_tradition = tradition_hussar - } - OR = { - has_cultural_pillar = heritage_iranian - has_cultural_pillar = heritage_turkic - has_cultural_pillar = heritage_mongolic - has_cultural_pillar = heritage_arabic - has_cultural_pillar = heritage_berber - has_cultural_pillar = heritage_iberian - has_cultural_pillar = heritage_indo_aryan - has_cultural_pillar = heritage_magyar - } - } - # Vanguard - AND = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:vanguard_attribute - } - } - OR = { - has_innovation = innovation_quilted_armor - has_cultural_tradition = tradition_fp1_coastal_warriors - has_cultural_tradition = tradition_hird - has_cultural_tradition = tradition_futuwaa - has_cultural_tradition = tradition_druzhina - has_cultural_tradition = tradition_khadga_puja - has_cultural_tradition = tradition_garuda_warriors - has_cultural_tradition = tradition_himalayan_settlers - has_cultural_tradition = tradition_mubarizuns - has_cultural_tradition = tradition_burman_royal_army - has_cultural_tradition = tradition_mountaineer_ruralism - has_innovation = innovation_sarawit - has_innovation = innovation_legionnaires - } - 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 - has_cultural_pillar = heritage_burman - has_cultural_pillar = heritage_qiangic - has_cultural_pillar = heritage_tibetan - } - } - # Lancer - AND = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:lancer_attribute - } - } - OR = { - has_innovation = innovation_arched_saddle - has_cultural_tradition = tradition_caucasian_wolves - has_cultural_tradition = tradition_roman_legacy - has_innovation = innovation_valets - has_cultural_tradition = tradition_ep3_audacious_cadets - has_cultural_tradition = tradition_ep3_imperial_tagmata - } - OR = { - has_cultural_pillar = heritage_iranian - has_cultural_pillar = heritage_turkic - has_cultural_pillar = heritage_mongolic - has_cultural_pillar = heritage_central_germanic - has_cultural_pillar = heritage_frankish - has_cultural_pillar = heritage_indo_aryan - has_cultural_pillar = heritage_byzantine - has_cultural_pillar = heritage_caucasian - } - } - # Besieger - AND = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:besieger_attribute - } - } - has_innovation = innovation_mangonel - OR = { - has_cultural_tradition = tradition_castle_keepers - has_cultural_tradition = tradition_hereditary_hierarchy - has_cultural_tradition = tradition_hard_working - has_cultural_tradition = tradition_swords_for_hire - has_cultural_tradition = tradition_ep3_audacious_cadets - has_cultural_tradition = tradition_malleable_invaders - has_cultural_tradition = tradition_metal_craftsmanship - } - } - # Crossbowman - AND = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:crossbowmen_attribute - } - } - OR = { - has_innovation = innovation_advanced_bowmaking - has_innovation = innovation_repeating_crossbow - } - OR = { - has_cultural_pillar = heritage_chinese - has_cultural_pillar = heritage_latin - has_cultural_tradition = tradition_swords_for_hire - } - } - # Camel Rider - AND = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:camelry_attribute - } - } - has_innovation = innovation_war_camels - OR = { - has_cultural_pillar = heritage_arabic - has_cultural_pillar = heritage_berber - has_cultural_tradition = tradition_desert_nomads - has_cultural_tradition = tradition_warriors_of_the_dry - } - } - # Elephant Rider - AND = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:elephantry_attribute - } - } - has_innovation = innovation_elephantry - OR = { - has_cultural_pillar = heritage_dravidian - has_cultural_pillar = heritage_indo_aryan - has_cultural_pillar = heritage_burman - } - } - # Horse Archer - AND = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:horse_archer_attribute - } - } - culture_has_archer_cavalry_maa = yes - OR = { - has_cultural_pillar = heritage_turkic - has_cultural_pillar = heritage_mongolic - has_cultural_pillar = heritage_burman - } - } - # Huntsmaster - AND = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:huntsmaster_attribute - } - } - OR = { - has_cultural_tradition = tradition_bush_hunting - has_cultural_tradition = tradition_hunters - has_cultural_tradition = tradition_sacred_hunts - has_cultural_tradition = tradition_forest_fighters - has_cultural_tradition = tradition_jungle_warriors - has_cultural_tradition = tradition_land_of_the_bow - has_cultural_tradition = tradition_bush_hunting - has_cultural_tradition = tradition_hunters - has_cultural_tradition = tradition_sacred_hunts - } - NOT = { - has_cultural_tradition = tradition_vegetarianism - } - } - # Blademaster - AND = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:blademaster_attribute - } - } - OR = { - has_cultural_tradition = tradition_druzhina - has_cultural_tradition = tradition_futuwaa - has_cultural_tradition = tradition_khadga_puja - has_cultural_tradition = tradition_talent_acquisition - has_cultural_tradition = tradition_swords_for_hire - has_cultural_tradition = tradition_warriors_by_merit - has_cultural_tradition = tradition_only_the_strong - has_cultural_tradition = tradition_martial_admiration - has_cultural_tradition = tradition_fp1_trials_by_combat - has_cultural_tradition = tradition_chanson_de_geste - has_cultural_tradition = tradition_fp1_performative_honour - has_cultural_tradition = tradition_chivalry - has_cultural_tradition = tradition_warrior_culture - has_cultural_tradition = tradition_fp1_the_right_to_prove - has_cultural_tradition = tradition_garuda_warriors - } - } - # Master of Revels - AND = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:master_of_revels_attribute - } - } - OR = { - has_cultural_tradition = tradition_esteemed_hospitality - has_cultural_tradition = tradition_wedding_ceremonies - has_cultural_tradition = tradition_welcoming - has_cultural_tradition = tradition_music_theory - has_cultural_tradition = tradition_festivities - has_cultural_tradition = tradition_culinary_art - } - } - } - trigger_if = { - limit = { - exists = root.capital_county - root = { - highest_held_title_tier >= tier_duchy - } - } - any_culture_county = { - OR = { - holder = { - this = root - } - holder.liege = { - this = root - } - holder.top_liege = { - this = root - } - empire = root.capital_county.empire - } - } - } - trigger_else = { - exists = root.capital_county - any_culture_county = { - OR = { - holder = { - this = root - } - holder.liege = { - this = root - } - holder.top_liege = { - this = root - } - kingdom = root.capital_county.kingdom - } - } - } - culture_number_of_counties > 0 - cultural_acceptance = { - target = root.culture - value >= 15 - } - } - save_scope_as = type_specific_culture - } -} - -accolade_character_creation_effect = { - #don't want AI using our performance intensive checks - if = { - limit = { - root = { - OR = { - is_ai = no - any_held_title = { this = title:e_byzantium } - } - } - } - #save a general knight-y culture that can randomly be used - save_general_accolade_successor_culture_effect = yes - #varangians if relevant - save_varangian_successor_culture_effect = yes - #turkic warriors if relevant - save_turkic_successor_culture_effect = yes - #save one specific to the accolade type - save_type_specific_successor_culture_effect = yes - } - #let's get creating - but needs to be the right type of knight - #Marauder - if = { - limit = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:marauder_attribute - } - } - } - create_character = { - location = root.capital_province - template = accolade_marauder_character - faith = root.faith - random_culture = { - root.culture = { - trigger = { always = yes } - } - root.location.culture = { - trigger = { exists = root.location.culture } - } - scope:knight_culture = { - trigger = { exists = scope:knight_culture } - } - scope:varangian_culture = { - trigger = { exists = scope:varangian_culture } - } - scope:turkic_culture = { - trigger = { exists = scope:turkic_culture } - } - scope:type_specific_culture = { - trigger = { exists = scope:type_specific_culture } - } - } - save_scope_as = chosen_knight - } - } - #Idealist - else_if = { - limit = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:idealist_attribute - } - } - } - create_character = { - location = root.capital_province - template = accolade_idealist_character - faith = root.faith - random_culture = { - root.culture = { - trigger = { always = yes } - } - root.location.culture = { - trigger = { exists = root.location.culture } - } - scope:knight_culture = { - trigger = { exists = scope:knight_culture } - } - scope:type_specific_culture = { - trigger = { exists = scope:type_specific_culture } - } - } - save_scope_as = chosen_knight - } - } - #Charmer - else_if = { - limit = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:charmer_attribute - } - } - } - create_character = { - location = root.capital_province - template = accolade_charmer_character - faith = root.faith - random_culture = { - root.culture = { - trigger = { always = yes } - } - root.location.culture = { - trigger = { exists = root.location.culture } - } - scope:knight_culture = { - trigger = { exists = scope:knight_culture } - } - scope:type_specific_culture = { - trigger = { exists = scope:type_specific_culture } - } - } - save_scope_as = chosen_knight - } - } - #Thug - else_if = { - limit = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:thug_attribute - } - } - } - create_character = { - location = root.capital_province - template = accolade_thug_character - faith = root.faith - random_culture = { - root.culture = { - trigger = { always = yes } - } - root.location.culture = { - trigger = { exists = root.location.culture } - } - scope:knight_culture = { - trigger = { exists = scope:knight_culture } - } - scope:varangian_culture = { - trigger = { exists = scope:varangian_culture } - } - scope:turkic_culture = { - trigger = { exists = scope:turkic_culture } - } - scope:type_specific_culture = { - trigger = { exists = scope:type_specific_culture } - } - } - save_scope_as = chosen_knight - } - } - #Disciplinarian - else_if = { - limit = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:disciplinarian_attribute - } - } - } - create_character = { - location = root.capital_province - template = accolade_disciplinarian_character - faith = root.faith - random_culture = { - root.culture = { - trigger = { always = yes } - } - root.location.culture = { - trigger = { exists = root.location.culture } - } - scope:knight_culture = { - trigger = { exists = scope:knight_culture } - } - scope:varangian_culture = { - trigger = { exists = scope:varangian_culture } - } - scope:turkic_culture = { - trigger = { exists = scope:turkic_culture } - } - scope:type_specific_culture = { - trigger = { exists = scope:type_specific_culture } - } - } - save_scope_as = chosen_knight - } - } - #Fanatic - else_if = { - limit = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:fanatic_attribute - } - } - } - create_character = { - location = root.capital_province - template = accolade_fanatic_character - faith = root.faith - random_culture = { - root.culture = { - trigger = { always = yes } - } - root.location.culture = { - trigger = { exists = root.location.culture } - } - } - save_scope_as = chosen_knight - } - } - #Valiant - else_if = { - limit = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:valiant_attribute - } - } - } - create_character = { - location = root.capital_province - template = accolade_valiant_character - faith = root.faith - random_culture = { - root.culture = { - trigger = { always = yes } - } - root.location.culture = { - trigger = { exists = root.location.culture } - } - scope:knight_culture = { - trigger = { exists = scope:knight_culture } - } - scope:varangian_culture = { - trigger = { exists = scope:varangian_culture } - } - scope:turkic_culture = { - trigger = { exists = scope:turkic_culture } - } - scope:type_specific_culture = { - trigger = { exists = scope:type_specific_culture } - } - } - save_scope_as = chosen_knight - } - } - #Stalwart - else_if = { - limit = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:stalwart_attribute - } - } - } - create_character = { - location = root.capital_province - template = accolade_stalwart_character - faith = root.faith - random_culture = { - root.culture = { - trigger = { always = yes } - } - root.location.culture = { - trigger = { exists = root.location.culture } - } - scope:knight_culture = { - trigger = { exists = scope:knight_culture } - } - scope:varangian_culture = { - trigger = { exists = scope:varangian_culture } - } - scope:turkic_culture = { - trigger = { exists = scope:turkic_culture } - } - scope:type_specific_culture = { - trigger = { exists = scope:type_specific_culture } - } - } - save_scope_as = chosen_knight - } - } - #Scoundrel - else_if = { - limit = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:scoundrel_attribute - } - } - } - create_character = { - location = root.capital_province - template = accolade_scoundrel_character - faith = root.faith - random_culture = { - root.culture = { - trigger = { always = yes } - } - root.location.culture = { - trigger = { exists = root.location.culture } - } - scope:knight_culture = { - trigger = { exists = scope:knight_culture } - } - scope:varangian_culture = { - trigger = { exists = scope:varangian_culture } - } - scope:turkic_culture = { - trigger = { exists = scope:turkic_culture } - } - scope:type_specific_culture = { - trigger = { exists = scope:type_specific_culture } - } - } - save_scope_as = chosen_knight - } - } - #Politicker - else_if = { - limit = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:politicker_attribute - } - } - } - create_character = { - location = root.capital_province - template = accolade_politicker_character - faith = root.faith - random_culture = { - root.culture = { - trigger = { always = yes } - } - root.location.culture = { - trigger = { exists = root.location.culture } - } - scope:knight_culture = { - trigger = { exists = scope:knight_culture } - } - scope:type_specific_culture = { - trigger = { exists = scope:type_specific_culture } - } - } - save_scope_as = chosen_knight - } - if = { - limit = { - scope:chosen_knight = { diplomacy < 15 } - } - scope:chosen_knight = { - add_diplomacy_skill = { - value = 15 - subtract = diplomacy - } - } - } - } - #Tactician - else_if = { - limit = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:tactician_attribute - } - } - } - create_character = { - location = root.capital_province - template = accolade_tactician_character - faith = root.faith - random_culture = { - root.culture = { - trigger = { always = yes } - } - root.location.culture = { - trigger = { exists = root.location.culture } - } - scope:knight_culture = { - trigger = { exists = scope:knight_culture } - } - scope:varangian_culture = { - trigger = { exists = scope:varangian_culture } - } - scope:turkic_culture = { - trigger = { exists = scope:turkic_culture } - } - scope:type_specific_culture = { - trigger = { exists = scope:type_specific_culture } - } - } - save_scope_as = chosen_knight - } - if = { - limit = { - scope:chosen_knight = { martial < 15 } - } - scope:chosen_knight = { - add_martial_skill = { - value = 15 - subtract = martial - } - } - } - } - #Reeve - else_if = { - limit = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:reeve_attribute - } - } - } - create_character = { - location = root.capital_province - template = accolade_reeve_character - faith = root.faith - random_culture = { - root.culture = { - trigger = { always = yes } - } - root.location.culture = { - trigger = { exists = root.location.culture } - } - scope:knight_culture = { - trigger = { exists = scope:knight_culture } - } - scope:turkic_culture = { - trigger = { exists = scope:turkic_culture } - } - scope:type_specific_culture = { - trigger = { exists = scope:type_specific_culture } - } - } - save_scope_as = chosen_knight - } - if = { - limit = { - scope:chosen_knight = { stewardship < 15 } - } - scope:chosen_knight = { - add_stewardship_skill = { - value = 15 - subtract = stewardship - } - } - } - } - #Manipulator - else_if = { - limit = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:manipulator_attribute - } - } - } - create_character = { - location = root.capital_province - template = accolade_manipulator_character - faith = root.faith - random_culture = { - root.culture = { - trigger = { always = yes } - } - root.location.culture = { - trigger = { exists = root.location.culture } - } - scope:knight_culture = { - trigger = { exists = scope:knight_culture } - } - scope:varangian_culture = { - trigger = { exists = scope:varangian_culture } - } - scope:turkic_culture = { - trigger = { exists = scope:turkic_culture } - } - scope:type_specific_culture = { - trigger = { exists = scope:type_specific_culture } - } - } - save_scope_as = chosen_knight - } - if = { - limit = { - scope:chosen_knight = { intrigue < 15 } - } - scope:chosen_knight = { - add_intrigue_skill = { - value = 15 - subtract = intrigue - } - } - } - } - #Mentor - else_if = { - limit = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:mentor_attribute - } - } - } - create_character = { - location = root.capital_province - template = accolade_mentor_character - faith = root.faith - random_culture = { - root.culture = { - trigger = { always = yes } - } - root.location.culture = { - trigger = { exists = root.location.culture } - } - scope:knight_culture = { - trigger = { exists = scope:knight_culture } - } - scope:type_specific_culture = { - trigger = { exists = scope:type_specific_culture } - } - } - save_scope_as = chosen_knight - } - if = { - limit = { - scope:chosen_knight = { learning < 15 } - } - scope:chosen_knight = { - add_learning_skill = { - value = 15 - subtract = learning - } - } - } - } - #Contender - else_if = { - limit = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:contender_attribute - } - } - } - create_character = { - location = root.capital_province - template = accolade_contender_character - faith = root.faith - random_culture = { - root.culture = { - trigger = { always = yes } - } - root.location.culture = { - trigger = { exists = root.location.culture } - } - scope:knight_culture = { - trigger = { exists = scope:knight_culture } - } - scope:varangian_culture = { - trigger = { exists = scope:varangian_culture } - } - scope:turkic_culture = { - trigger = { exists = scope:turkic_culture } - } - scope:type_specific_culture = { - trigger = { exists = scope:type_specific_culture } - } - } - save_scope_as = chosen_knight - } - if = { - limit = { - scope:chosen_knight = { prowess < 20 } - } - scope:chosen_knight = { - add_prowess_skill = { - value = 20 - subtract = prowess - } - } - } - } - #Archer - else_if = { - limit = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:archer_attribute - } - } - } - create_character = { - location = root.capital_province - template = accolade_archer_character - faith = root.faith - random_culture = { - root.culture = { - trigger = { always = yes } - } - root.location.culture = { - trigger = { exists = root.location.culture } - } - scope:knight_culture = { - trigger = { exists = scope:knight_culture } - } - scope:turkic_culture = { - trigger = { exists = scope:turkic_culture } - } - scope:type_specific_culture = { - trigger = { exists = scope:type_specific_culture } - } - } - save_scope_as = chosen_knight - } - } - #Skirmisher - else_if = { - limit = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:skirmisher_attribute - } - } - } - create_character = { - location = root.capital_province - template = accolade_skirmisher_character - faith = root.faith - random_culture = { - root.culture = { - trigger = { always = yes } - } - root.location.culture = { - trigger = { exists = root.location.culture } - } - scope:knight_culture = { - trigger = { exists = scope:knight_culture } - } - scope:type_specific_culture = { - trigger = { exists = scope:type_specific_culture } - } - } - save_scope_as = chosen_knight - } - } - #Pike - else_if = { - limit = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:pike_attribute - } - } - } - create_character = { - location = root.capital_province - template = accolade_pike_character - faith = root.faith - random_culture = { - root.culture = { - trigger = { always = yes } - } - root.location.culture = { - trigger = { exists = root.location.culture } - } - scope:knight_culture = { - trigger = { exists = scope:knight_culture } - } - scope:varangian_culture = { - trigger = { exists = scope:varangian_culture } - } - scope:type_specific_culture = { - trigger = { exists = scope:type_specific_culture } - } - } - save_scope_as = chosen_knight - } - } - #Outrider - else_if = { - limit = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:outrider_attribute - } - } - } - create_character = { - location = root.capital_province - template = accolade_outrider_character - faith = root.faith - random_culture = { - root.culture = { - trigger = { always = yes } - } - root.location.culture = { - trigger = { exists = root.location.culture } - } - scope:knight_culture = { - trigger = { exists = scope:knight_culture } - } - scope:turkic_culture = { - trigger = { exists = scope:turkic_culture } - } - scope:type_specific_culture = { - trigger = { exists = scope:type_specific_culture } - } - } - save_scope_as = chosen_knight - } - } - #Vanguard - else_if = { - limit = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:vanguard_attribute - } - } - } - create_character = { - location = root.capital_province - template = accolade_vanguard_character - faith = root.faith - random_culture = { - root.culture = { - trigger = { always = yes } - } - root.location.culture = { - trigger = { - exists = root.location.culture - root.location.culture = { - OR = { - has_innovation = innovation_quilted_armor - has_cultural_tradition = tradition_fp1_coastal_warriors - has_cultural_tradition = tradition_hird - has_cultural_tradition = tradition_futuwaa - has_cultural_tradition = tradition_druzhina - has_cultural_tradition = tradition_khadga_puja - has_cultural_tradition = tradition_garuda_warriors - has_cultural_tradition = tradition_himalayan_settlers - has_cultural_tradition = tradition_mubarizuns - has_cultural_tradition = tradition_burman_royal_army - has_cultural_tradition = tradition_mountaineer_ruralism - has_innovation = innovation_sarawit - has_innovation = innovation_legionnaires - } - } - } - } - scope:knight_culture = { - trigger = { - exists = scope:knight_culture - scope:knight_culture = { - OR = { - has_innovation = innovation_quilted_armor - has_cultural_tradition = tradition_fp1_coastal_warriors - has_cultural_tradition = tradition_hird - has_cultural_tradition = tradition_futuwaa - has_cultural_tradition = tradition_druzhina - has_cultural_tradition = tradition_khadga_puja - has_cultural_tradition = tradition_garuda_warriors - has_cultural_tradition = tradition_himalayan_settlers - has_cultural_tradition = tradition_mubarizuns - has_cultural_tradition = tradition_burman_royal_army - has_cultural_tradition = tradition_mountaineer_ruralism - has_innovation = innovation_sarawit - has_innovation = innovation_legionnaires - } - } - } - } - scope:varangian_culture = { - trigger = { - exists = scope:varangian_culture - scope:varangian_culture = { - OR = { - has_innovation = innovation_quilted_armor - has_cultural_tradition = tradition_fp1_coastal_warriors - has_cultural_tradition = tradition_hird - has_cultural_tradition = tradition_futuwaa - has_cultural_tradition = tradition_druzhina - has_cultural_tradition = tradition_khadga_puja - has_cultural_tradition = tradition_garuda_warriors - has_cultural_tradition = tradition_himalayan_settlers - has_cultural_tradition = tradition_mubarizuns - has_cultural_tradition = tradition_burman_royal_army - has_cultural_tradition = tradition_mountaineer_ruralism - has_innovation = innovation_sarawit - has_innovation = innovation_legionnaires - } - } - } - } - scope:type_specific_culture = { - trigger = { - exists = scope:type_specific_culture - scope:type_specific_culture = { - OR = { - has_innovation = innovation_quilted_armor - has_cultural_tradition = tradition_fp1_coastal_warriors - has_cultural_tradition = tradition_hird - has_cultural_tradition = tradition_futuwaa - has_cultural_tradition = tradition_druzhina - has_cultural_tradition = tradition_khadga_puja - has_cultural_tradition = tradition_garuda_warriors - has_cultural_tradition = tradition_himalayan_settlers - has_cultural_tradition = tradition_mubarizuns - has_cultural_tradition = tradition_burman_royal_army - has_cultural_tradition = tradition_mountaineer_ruralism - has_innovation = innovation_sarawit - has_innovation = innovation_legionnaires - } - } - } - } - } - save_scope_as = chosen_knight - } - } - #Lancer - else_if = { - limit = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:lancer_attribute - } - } - } - create_character = { - location = root.capital_province - template = accolade_lancer_character - faith = root.faith - random_culture = { - root.culture = { - trigger = { always = yes } - } - root.location.culture = { - trigger = { - exists = root.location.culture - root.location.culture = { - OR = { - has_innovation = innovation_arched_saddle - has_cultural_tradition = tradition_caucasian_wolves - has_cultural_tradition = tradition_ep3_audacious_cadets - has_cultural_tradition = tradition_roman_legacy - has_cultural_tradition = tradition_ep3_imperial_tagmata - has_innovation = innovation_valets - } - } - } - } - scope:knight_culture = { - trigger = { - exists = scope:knight_culture - scope:knight_culture = { - OR = { - has_innovation = innovation_arched_saddle - has_cultural_tradition = tradition_caucasian_wolves - has_cultural_tradition = tradition_ep3_audacious_cadets - has_cultural_tradition = tradition_roman_legacy - has_cultural_tradition = tradition_ep3_imperial_tagmata - has_innovation = innovation_valets - } - } - } - } - scope:turkic_culture = { - trigger = { - exists = scope:turkic_culture - scope:turkic_culture = { - OR = { - has_innovation = innovation_arched_saddle - has_cultural_tradition = tradition_caucasian_wolves - has_cultural_tradition = tradition_ep3_audacious_cadets - has_cultural_tradition = tradition_roman_legacy - has_cultural_tradition = tradition_ep3_imperial_tagmata - has_innovation = innovation_valets - } - } - } - } - scope:type_specific_culture = { - trigger = { - exists = scope:type_specific_culture - scope:type_specific_culture = { - OR = { - has_innovation = innovation_arched_saddle - has_cultural_tradition = tradition_caucasian_wolves - has_cultural_tradition = tradition_ep3_audacious_cadets - has_cultural_tradition = tradition_roman_legacy - has_cultural_tradition = tradition_ep3_imperial_tagmata - has_innovation = innovation_valets - } - } - } - } - } - save_scope_as = chosen_knight - } - } - #Besieger - else_if = { - limit = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:besieger_attribute - } - } - } - create_character = { - location = root.capital_province - template = accolade_besieger_character - faith = root.faith - random_culture = { - root.culture = { - trigger = { always = yes } - } - root.location.culture = { - trigger = { - exists = root.location.culture - root.location.culture = { has_innovation = innovation_mangonel } - } - } - scope:knight_culture = { - trigger = { - exists = scope:knight_culture - scope:knight_culture = { has_innovation = innovation_mangonel } - } - } - scope:varangian_culture = { - trigger = { - exists = scope:varangian_culture - scope:varangian_culture = { has_innovation = innovation_mangonel } - } - } - scope:turkic_culture = { - trigger = { - exists = scope:turkic_culture - scope:turkic_culture = { has_innovation = innovation_mangonel } - } - } - scope:type_specific_culture = { - trigger = { - exists = scope:type_specific_culture - scope:type_specific_culture = { has_innovation = innovation_mangonel } - } - } - } - save_scope_as = chosen_knight - } - } - #Crossbowman - else_if = { - limit = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:crossbowmen_attribute - } - } - } - create_character = { - location = root.capital_province - template = accolade_crossbowmen_character - faith = root.faith - random_culture = { - root.culture = { - trigger = { always = yes } - } - root.location.culture = { - trigger = { - exists = root.location.culture - root.location.culture = { - has_innovation = innovation_advanced_bowmaking - has_innovation = innovation_repeating_crossbow - } - } - } - scope:knight_culture = { - trigger = { - exists = scope:knight_culture - scope:knight_culture = { - OR = { - has_innovation = innovation_advanced_bowmaking - has_innovation = innovation_repeating_crossbow - } - } - } - } - scope:turkic_culture = { - trigger = { - exists = scope:turkic_culture - scope:turkic_culture = { - OR = { - has_innovation = innovation_advanced_bowmaking - has_innovation = innovation_repeating_crossbow - } - } - } - } - scope:type_specific_culture = { - trigger = { - exists = scope:type_specific_culture - scope:type_specific_culture = { - OR = { - has_innovation = innovation_advanced_bowmaking - has_innovation = innovation_repeating_crossbow - } - } - } - } - } - save_scope_as = chosen_knight - } - } - #Camel Rider - else_if = { - limit = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:camelry_attribute - } - } - } - create_character = { - location = root.capital_province - template = accolade_camelry_character - faith = root.faith - random_culture = { - root.culture = { - trigger = { always = yes } - } - root.location.culture = { - trigger = { - exists = root.location.culture - root.location.culture = { has_innovation = innovation_war_camels } - } - } - scope:knight_culture = { - trigger = { - exists = scope:knight_culture - scope:knight_culture = { has_innovation = innovation_war_camels } - } - } - scope:turkic_culture = { - trigger = { - exists = scope:turkic_culture - scope:turkic_culture = { has_innovation = innovation_war_camels } - } - } - scope:type_specific_culture = { - trigger = { - exists = scope:type_specific_culture - scope:type_specific_culture = { has_innovation = innovation_war_camels } - } - } - } - save_scope_as = chosen_knight - } - } - #Elephant Rider - else_if = { - limit = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:elephantry_attribute - } - } - } - create_character = { - location = root.capital_province - template = accolade_elephantry_character - faith = root.faith - random_culture = { - root.culture = { - trigger = { always = yes } - } - root.location.culture = { - trigger = { - exists = root.location.culture - root.location.culture = { has_innovation = innovation_elephantry } - } - } - scope:knight_culture = { - trigger = { - exists = scope:knight_culture - scope:knight_culture = { has_innovation = innovation_elephantry } - } - } - scope:type_specific_culture = { - trigger = { - exists = scope:type_specific_culture - scope:type_specific_culture = { has_innovation = innovation_elephantry } - } - } - } - save_scope_as = chosen_knight - } - } - #Horse Archer - else_if = { - limit = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:horse_archer_attribute - } - } - } - create_character = { - location = root.capital_province - template = accolade_horse_archer_character - faith = root.faith - random_culture = { - root.culture = { - trigger = { always = yes } - } - root.location.culture = { - trigger = { - exists = root.location.culture - root.location.culture = { culture_has_archer_cavalry_maa = yes } - } - } - scope:knight_culture = { - trigger = { - exists = scope:knight_culture - scope:knight_culture = { culture_has_archer_cavalry_maa = yes } - } - } - scope:turkic_culture = { - trigger = { - exists = scope:turkic_culture - scope:turkic_culture = { culture_has_archer_cavalry_maa = yes } - } - } - scope:type_specific_culture = { - trigger = { - exists = scope:type_specific_culture - scope:type_specific_culture = { culture_has_archer_cavalry_maa = yes } - } - } - } - save_scope_as = chosen_knight - } - } - #Huntsmaster - else_if = { - limit = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:huntsmaster_attribute - } - } - } - create_character = { - location = root.capital_province - template = accolade_huntsmaster_character - faith = root.faith - random_culture = { - root.culture = { - trigger = { always = yes } - } - root.location.culture = { - trigger = { - exists = root.location.culture - root.location.culture = { NOT = { has_cultural_tradition = tradition_vegetarianism } } - } - } - scope:knight_culture = { - trigger = { - exists = scope:knight_culture - scope:knight_culture = { NOT = { has_cultural_tradition = tradition_vegetarianism } } - } - } - scope:turkic_culture = { - trigger = { - exists = scope:turkic_culture - scope:turkic_culture = { NOT = { has_cultural_tradition = tradition_vegetarianism } } - } - } - scope:type_specific_culture = { - trigger = { - exists = scope:type_specific_culture - scope:type_specific_culture = { NOT = { has_cultural_tradition = tradition_vegetarianism } } - } - } - } - save_scope_as = chosen_knight - } - } - #Blademaster - else_if = { - limit = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:blademaster_attribute - } - } - } - create_character = { - location = root.capital_province - template = accolade_blademaster_character - faith = root.faith - random_culture = { - root.culture = { - trigger = { always = yes } - } - root.location.culture = { - trigger = { - exists = root.location.culture - } - } - scope:knight_culture = { - trigger = { - exists = scope:knight_culture - } - } - scope:varangian_culture = { - trigger = { - exists = scope:varangian_culture - } - } - scope:turkic_culture = { - trigger = { - exists = scope:turkic_culture - } - } - scope:type_specific_culture = { - trigger = { - exists = scope:type_specific_culture - } - } - } - save_scope_as = chosen_knight - } - } - #Reveler - else_if = { - limit = { - scope:accolade_in_need = { - primary_type = { - this = accolade_type:master_of_revels_attribute - } - } - } - create_character = { - location = root.capital_province - template = accolade_master_of_revels_character - faith = root.faith - random_culture = { - root.culture = { - trigger = { always = yes } - } - root.location.culture = { - trigger = { - exists = root.location.culture - } - } - scope:knight_culture = { - trigger = { - exists = scope:knight_culture - } - } - scope:type_specific_culture = { - trigger = { - exists = scope:type_specific_culture - } - } - } - save_scope_as = chosen_knight - } - } - if = { - limit = { - scope:chosen_knight ?= { prowess < 12 } - } - scope:chosen_knight = { - add_prowess_skill = { - value = 12 - subtract = prowess - } - } - } - if = { - limit = { - scope:chosen_knight ?= { has_trait = devoted } - } - scope:chosen_knight = { - remove_trait = devoted - } - } - if = { - limit = { - scope:chosen_knight ?= { has_trait = celibate } - } - scope:chosen_knight = { - remove_trait = celibate - } - } -} diff --git a/N3OW/common/scripted_effects/00_achievement_effects.txt b/N3OW/common/scripted_effects/00_achievement_effects.txt deleted file mode 100644 index 4601fbd6..00000000 --- a/N3OW/common/scripted_effects/00_achievement_effects.txt +++ /dev/null @@ -1,385 +0,0 @@ -# Adds $FLAG$ to the character if a player -add_achievement_flag_effect = { - if = { - limit = { - is_ai = no - } - add_character_flag = $FLAG$ - } -} - -# Adds $VALUE$ to the character $VARIABLE$ if a player, sets to zero first if not already a present variable -add_achievement_variable_effect = { - if = { - limit = { - is_ai = no - } - if = { - limit = { - NOT = { has_variable = $VARIABLE$ } - } - set_variable = { - name = $VARIABLE$ - value = 0 - } - } - change_variable = { - name = $VARIABLE$ - add = $VALUE$ - } - } -} - -# Sets $VALUE$ to the global variable named $VARIABLE$ if a player -add_achievement_global_variable_effect = { - if = { - limit = { - is_ai = no - } - set_global_variable = { - name = $VARIABLE$ - value = $VALUE$ - } - } -} - -# Adds $FLAG$ to list of unavailable achievements if a player -add_to_global_unavailable_achievements_list_effect = { - if = { - limit = { - is_ai = no - } - add_to_global_variable_list = { - name = unavailable_achievements - target = $FLAG$ - } - } -} - -fp2_had_friend_with_benefits = { # History's Best Friend - if = { - limit = { - is_ai = no - has_fp2_dlc_trigger = yes - has_relation_best_friend = scope:had_sex_with_effect_partner - AND = { # Implicit for readability - culture = { has_cultural_tradition = tradition_fp2_ritualised_friendship } - scope:had_sex_with_effect_partner.culture = { has_cultural_tradition = tradition_fp2_ritualised_friendship } - } - } - add_achievement_global_variable_effect = { # (Has additional check for consistency) - VARIABLE = fp2_historys_best_friends_achievement_unlocked - VALUE = yes - } - } -} - -fp2_holiday_in_iberia_check = { - if = { - limit = { exists = global_var:fp2_holiday_in_iberia_achievement_unlocked } - add_achievement_global_variable_effect = { - VARIABLE = fp2_holiday_in_iberia_achievement_unlocked - VALUE = yes - } - } -} - -ep2_im_in_my_elements_terrain_grabber_effect = { - # Grab various terrain types and add them to a list. - ## Plains - if = { - limit = { - location = { terrain = plains } - } - add_to_variable_list = { - name = ep2_im_in_my_elements_achievement_terrain_list - target = flag:plains - } - } - ## Sea - else_if = { - limit = { - location = { terrain = sea } - } - add_to_variable_list = { - name = ep2_im_in_my_elements_achievement_terrain_list - target = flag:sea - } - } - ## Coastal_sea - else_if = { - limit = { - location = { terrain = coastal_sea } - } - add_to_variable_list = { - name = ep2_im_in_my_elements_achievement_terrain_list - target = flag:coastal_sea - } - } - ## Farmlands - else_if = { - limit = { - location = { terrain = farmlands } - } - add_to_variable_list = { - name = ep2_im_in_my_elements_achievement_terrain_list - target = flag:farmlands - } - } - ## Hills - else_if = { - limit = { - location = { terrain = hills } - } - add_to_variable_list = { - name = ep2_im_in_my_elements_achievement_terrain_list - target = flag:hills - } - } - ## Mountains - else_if = { - limit = { - location = { terrain = mountains } - } - add_to_variable_list = { - name = ep2_im_in_my_elements_achievement_terrain_list - target = flag:mountains - } - } - ## Desert - else_if = { - limit = { - location = { terrain = desert } - } - add_to_variable_list = { - name = ep2_im_in_my_elements_achievement_terrain_list - target = flag:desert - } - } - ## Desert_mountains - else_if = { - limit = { - location = { terrain = desert_mountains } - } - add_to_variable_list = { - name = ep2_im_in_my_elements_achievement_terrain_list - target = flag:desert_mountains - } - } - ## Oasis - else_if = { - limit = { - location = { terrain = oasis } - } - add_to_variable_list = { - name = ep2_im_in_my_elements_achievement_terrain_list - target = flag:oasis - } - } - ## Jungle - else_if = { - limit = { - location = { terrain = jungle } - } - add_to_variable_list = { - name = ep2_im_in_my_elements_achievement_terrain_list - target = flag:jungle - } - } - ## Forest - else_if = { - limit = { - location = { terrain = forest } - } - add_to_variable_list = { - name = ep2_im_in_my_elements_achievement_terrain_list - target = flag:forest - } - } - ## Taiga - else_if = { - limit = { - location = { terrain = taiga } - } - add_to_variable_list = { - name = ep2_im_in_my_elements_achievement_terrain_list - target = flag:taiga - } - } - ## Wetlands - else_if = { - limit = { - location = { terrain = wetlands } - } - add_to_variable_list = { - name = ep2_im_in_my_elements_achievement_terrain_list - target = flag:wetlands - } - } - ## Steppe - else_if = { - limit = { - location = { terrain = steppe } - } - add_to_variable_list = { - name = ep2_im_in_my_elements_achievement_terrain_list - target = flag:steppe - } - } - ## Floodplains - else_if = { - limit = { - location = { terrain = floodplains } - } - add_to_variable_list = { - name = ep2_im_in_my_elements_achievement_terrain_list - target = flag:floodplains - } - } - ## Drylands - else_if = { - limit = { - location = { terrain = drylands } - } - add_to_variable_list = { - name = ep2_im_in_my_elements_achievement_terrain_list - target = flag:drylands - } - } - ## Terraced Hills - else_if = { - limit = { - location = { terrain = terraced_hills } - } - add_to_variable_list = { - name = ep2_im_in_my_elements_achievement_terrain_list - target = flag:terraced_hills - } - } - # Error suppression. - if = { - limit = { - always = no - is_target_in_variable_list = { - name = ep2_im_in_my_elements_achievement_terrain_list - target = flag:plains - } - is_target_in_variable_list = { - name = ep2_im_in_my_elements_achievement_terrain_list - target = flag:sea - } - is_target_in_variable_list = { - name = ep2_im_in_my_elements_achievement_terrain_list - target = flag:coastal_sea - } - is_target_in_variable_list = { - name = ep2_im_in_my_elements_achievement_terrain_list - target = flag:farmlands - } - is_target_in_variable_list = { - name = ep2_im_in_my_elements_achievement_terrain_list - target = flag:hills - } - is_target_in_variable_list = { - name = ep2_im_in_my_elements_achievement_terrain_list - target = flag:mountains - } - is_target_in_variable_list = { - name = ep2_im_in_my_elements_achievement_terrain_list - target = flag:desert - } - is_target_in_variable_list = { - name = ep2_im_in_my_elements_achievement_terrain_list - target = flag:desert_mountains - } - is_target_in_variable_list = { - name = ep2_im_in_my_elements_achievement_terrain_list - target = flag:oasis - } - is_target_in_variable_list = { - name = ep2_im_in_my_elements_achievement_terrain_list - target = flag:jungle - } - is_target_in_variable_list = { - name = ep2_im_in_my_elements_achievement_terrain_list - target = flag:forest - } - is_target_in_variable_list = { - name = ep2_im_in_my_elements_achievement_terrain_list - target = flag:taiga - } - is_target_in_variable_list = { - name = ep2_im_in_my_elements_achievement_terrain_list - target = flag:wetlands - } - is_target_in_variable_list = { - name = ep2_im_in_my_elements_achievement_terrain_list - target = flag:steppe - } - is_target_in_variable_list = { - name = ep2_im_in_my_elements_achievement_terrain_list - target = flag:floodplains - } - is_target_in_variable_list = { - name = ep2_im_in_my_elements_achievement_terrain_list - target = flag:drylands - } - is_target_in_variable_list = { - name = ep2_im_in_my_elements_achievement_terrain_list - target = flag:terraced_hills - } - } - } -} - -player_succeeded_at_a_thousand_and_one_nights_achievement_effect = { - scope:host = { - if = { - limit = { - exists = global_var:started_a_thousand_and_one_nights_achievement - is_ai = no - } - set_global_variable = { - name = finished_a_thousand_and_one_nights_achievement - value = yes - } - } - } -} - -process_tour_achievement_tallies_effect = { - scope:host = { - if = { - limit = { - exists = global_var:started_the_grandest_tour_achievement - is_ai = no - scope:stop_host_scope.highest_held_title_tier >= tier_kingdom - } - scope:activity = { - add_to_variable_list = { - name = the_grandest_tour_achievement_tally_list - target = scope:stop_host_scope - } - } - } - if = { - limit = { - exists = global_var:started_imperial_march_achievement - is_ai = no - scope:activity = { - has_activity_option = { - category = special_type - option = tour_type_intimidation - } - } - scope:stop_host_scope = { is_powerful_vassal = yes } - } - scope:activity = { - add_to_variable_list = { - name = imperial_march_achievement_list - target = scope:stop_host_scope - } - } - } - } -} diff --git a/N3OW/common/scripted_effects/00_activity_effects.txt b/N3OW/common/scripted_effects/00_activity_effects.txt deleted file mode 100644 index b86752b1..00000000 --- a/N3OW/common/scripted_effects/00_activity_effects.txt +++ /dev/null @@ -1,4589 +0,0 @@ -####################### -# ACTIVITY REWARDS -# by Chad Uhl -####################### -disburse_tournament_activity_rewards = { - # for the loc - save_scope_as = root_scope - - # Rewards based on amount of Contests - if = { - limit = { - scope:activity = { - num_phases > 5 - } - } - - # Host Rewards - # Prestige Gain - if = { - limit = { - culture = { has_cultural_era_or_later = culture_era_high_medieval } - } - add_prestige = 1800 - } - else = { - add_prestige = 1500 - } - dynasty = { add_dynasty_prestige = massive_dynasty_prestige_value } - - # Glory Hound Vassal Opinion - every_vassal_or_below = { - vassal_stance = glory_hound - limit = { - is_participant_in_activity = scope:activity - } - custom = every_participating_glory_hound_vassal - add_opinion = { - modifier = hosted_tournament_opinion - target = root - opinion = 25 - } - } - # Belligerent Vassal Opinion - every_vassal_or_below = { - limit = { - has_vassal_stance = belligerent - is_participant_in_activity = scope:activity - } - custom = every_participating_belligerent_vassal - add_opinion = { - modifier = hosted_tournament_opinion - target = root - opinion = 25 - } - } - } - else_if = { - limit = { - scope:activity = { - num_phases = 5 - } - } - # Host Rewards - # Prestige Gain - if = { - limit = { - culture = { has_cultural_era_or_later = culture_era_high_medieval } - } - add_prestige = 1500 - } - else = { - add_prestige = 1200 - } - dynasty = { add_dynasty_prestige = major_dynasty_prestige_value } - - # Glory Hound Vassal Opinion - every_vassal_or_below = { - vassal_stance = glory_hound - limit = { - is_participant_in_activity = scope:activity - } - custom = every_participating_glory_hound_vassal - add_opinion = { - modifier = hosted_tournament_opinion - target = root - opinion = 20 - } - } - # Belligerent Vassal Opinion - every_vassal_or_below = { - limit = { - has_vassal_stance = belligerent - is_participant_in_activity = scope:activity - } - custom = every_participating_belligerent_vassal - add_opinion = { - modifier = hosted_tournament_opinion - target = root - opinion = 20 - } - } - } - else_if = { - limit = { - scope:activity = { - num_phases = 4 - } - } - dynasty = { add_dynasty_prestige = medium_dynasty_prestige_value } - - # Host Rewards - # Prestige Gain - if = { - limit = { - culture = { has_cultural_era_or_later = culture_era_high_medieval } - } - add_prestige = 1200 - } - else = { - add_prestige = 1000 - } - - # Glory Hound Vassal Opinion - every_vassal_or_below = { - vassal_stance = glory_hound - limit = { - is_participant_in_activity = scope:activity - } - custom = every_participating_glory_hound_vassal - add_opinion = { - modifier = hosted_tournament_opinion - target = root - opinion = 15 - } - } - # Belligerent Vassal Opinion - every_vassal_or_below = { - limit = { - has_vassal_stance = belligerent - is_participant_in_activity = scope:activity - } - custom = every_participating_belligerent_vassal - add_opinion = { - modifier = hosted_tournament_opinion - target = root - opinion = 15 - } - } - } - else_if = { - limit = { - scope:activity = { - num_phases = 3 - } - } - - # Host Rewards - # Prestige Gain - if = { - limit = { - culture = { has_cultural_era_or_later = culture_era_high_medieval } - } - add_prestige = 1000 - } - else = { - add_prestige = 800 - } - - # Glory Hound Vassal Opinion - every_vassal_or_below = { - vassal_stance = glory_hound - limit = { - is_participant_in_activity = scope:activity - } - custom = every_participating_glory_hound_vassal - add_opinion = { - modifier = hosted_tournament_opinion - target = root - opinion = 10 - } - } - # Belligerent Vassal Opinion - every_vassal_or_below = { - limit = { - has_vassal_stance = belligerent - is_participant_in_activity = scope:activity - } - custom = every_participating_belligerent_vassal - add_opinion = { - modifier = hosted_tournament_opinion - target = root - opinion = 10 - } - } - } - else_if = { - limit = { - scope:activity = { - num_phases = 2 - OR = { - has_activity_option = { - category = tournament_option_accommodations - option = tournament_accommodations_good - } - has_activity_option = { - category = tournament_option_accommodations - option = tournament_accommodations_normal - } - } - } - } - - # Host Rewards - # Prestige Gain - if = { - limit = { - culture = { has_cultural_era_or_later = culture_era_high_medieval } - } - add_prestige = 800 - } - else = { - add_prestige = 600 - } - - # Glory Hound Vassal Opinion - every_vassal_or_below = { - vassal_stance = glory_hound - limit = { - is_participant_in_activity = scope:activity - } - custom = every_participating_glory_hound_vassal - add_opinion = { - modifier = hosted_tournament_opinion - target = root - opinion = 5 - } - } - # Belligerent Vassal Opinion - every_vassal_or_below = { - limit = { - has_vassal_stance = belligerent - is_participant_in_activity = scope:activity - } - custom = every_participating_belligerent_vassal - add_opinion = { - modifier = hosted_tournament_opinion - target = root - opinion = 5 - } - } - } - else = { # 2 phases, bad accommodation - # Host Rewards - # Prestige Gain - if = { - limit = { - culture = { has_cultural_era_or_later = culture_era_high_medieval } - } - add_prestige = 600 - } - else = { - add_prestige = 400 - } - } - # Add some bonuses from accolades. - accolades_development_growth_for_least_developed_county_effect = yes - - scope:activity = { - if = { - limit = { - scope:activity = { - num_phases > 2 - } - } - activity_location = { - add_province_modifier = { - modifier = tournament_men_at_arms_reward_modifier - years = 10 - } - } - } - ## Distribute glory to our _lucky winners_. - every_guest_subset = { - name = winner - limit = { - NOT = { scope:melee_winner ?= this } - accolade ?= { is_accolade_active = yes } - } - custom = tournament_accolade_winner_tt - accolade = { - # For a bit of nuance, we want glory to be relative to how big the Tourney is. A less magnificent tourney is less glorious to win, after all. - ## Great stonking gads of glory. - ## High glory. - if = { - limit = { - scope:activity = { - num_phases > 4 - } - } - add_glory = monumental_glory_gain - } - ## Moderate glory. - else_if = { - limit = { - scope:activity = { - num_phases > 3 - } - } - add_glory = massive_glory_gain - } - ## Low glory. - else_if = { - limit = { - scope:activity = { - num_phases > 2 - } - } - add_glory = major_glory_gain - } - ## Otherwise... well otherwise I don't even know how this qualified as *grand*. - else = { add_glory = medium_glory_gain } - } - } - ## Plus, some consolation glory for every participant. - every_guest_subset = { - name = qualified - limit = { - save_temporary_scope_as = new_list_member_temp - NOT = { - scope:activity = { - any_guest_subset = { - name = winner - this = scope:new_list_member_temp - } - } - } - accolade ?= { is_accolade_active = yes } - } - custom = tournament_accolade_qualified_tt - accolade = { add_glory = minor_glory_gain } - } - # accolade bonus xp for the Contender - every_attending_character = { - limit = { - is_acclaimed = yes - accolade = { - is_accolade_active = yes - OR = { - has_accolade_parameter = accolade_tournament_xp_gain_contender_only_low - has_accolade_parameter = accolade_tournament_xp_gain_contender_only - has_accolade_parameter = accolade_tournament_xp_gain_contender_only_high - } - } - } - save_scope_as = contender - accolades_contender_tournament_xp_gain_effect = yes - } - # accolade trait xp for all knights who hang with a Contender - every_attending_character = { - limit = { - # Does the knight have a comrade with this bonus? - exists = liege - is_knight = yes - liege = { - any_active_accolade = { - OR = { - has_accolade_parameter = accolade_tournament_xp_gain_all_knights - has_accolade_parameter = accolade_tournament_xp_gain_all_knights_high - } - } - } - # Can the knight get it? Or get it the self-training one? - NAND = { - is_acclaimed = yes - accolade = { - has_accolade_type = contender_attribute - } - } - } - custom = tournament_accolade_attendees_tt - accolades_all_knights_liege_tournament_xp_gain_effect = yes - } - } - - # If character had the reduce stress intent, give them stress loss - disburse_activity_stress_loss = yes -} - -disburse_tour_activity_rewards = { - # for the loc - save_scope_as = root_scope - - # Rewards based on Magnficence level - # Rewards based on Tour Type are handed out at the end of each stop - - # Success rewards (includes Magnificence points) - # Max 50 points: 25 Magnificence levels + 25 from events - #Level 5 - if = { - limit = { - var:tour_success_var >= 100 - } - custom_tooltip = level_5_reward_tt - scope:activity = { - add_activity_log_entry = { - key = level_5_reward_tt - tags = { good major completed } - show_in_conclusion = yes - character = scope:root_scope - - # Effects - root = { - add_character_modifier = { #10 years - modifier = mega_itinerant_liege_modifier - years = 20 - } - add_prestige = tour_level_5_prestige_reward - if = { - limit = { - OR = { - this.dynasty.dynast ?= this - is_ai = no - } - } - dynasty ?= { add_dynasty_prestige = major_dynasty_prestige_gain } - } - # Parochial Vassal Opinion - every_vassal_or_below = { - vassal_stance = parochial - limit = { - is_participant_in_activity = scope:activity - } - custom = every_participating_parochial_vassal - add_opinion = { - modifier = hosted_tour_opinion - target = root - opinion = 50 - } - } - } - # Increase Vassal Opinion - every_in_list = { - variable = tour_visited_vassals - custom = every_visited_vassal - limit = { - is_alive = yes - } - add_opinion = { - modifier = tour_visited_vassal_opinion - target = root - opinion = 30 - } - } - } - } - create_character_memory = { - type = legendary_tour - } - } - #Level 4 - else_if = { - limit = { - var:tour_success_var >= 80 - } - custom_tooltip = level_4_reward_tt - scope:activity = { - add_activity_log_entry = { - key = level_4_reward_tt - tags = { good major completed } - show_in_conclusion = yes - character = scope:root_scope - - # Effects - root = { - add_character_modifier = { #10 years - modifier = itinerant_liege_modifier - years = 20 - } - add_prestige = tour_level_4_prestige_reward - if = { - limit = { - OR = { - this.dynasty.dynast ?= this - is_ai = no - } - } - dynasty ?= { add_dynasty_prestige = major_dynasty_prestige_gain } - } - # Parochial Vassal Opinion - every_vassal_or_below = { - vassal_stance = parochial - limit = { - is_participant_in_activity = scope:activity - } - custom = every_participating_parochial_vassal - add_opinion = { - modifier = hosted_tour_opinion - target = root - opinion = 40 - } - } - } - - # Increase Vassal Opinion - every_in_list = { - variable = tour_visited_vassals - custom = every_visited_vassal - limit = { - is_alive = yes - } - add_opinion = { - modifier = tour_visited_vassal_opinion - target = root - opinion = 25 - } - } - } - } - create_character_memory = { - type = good_tour - } - } - #Level 3 - else_if = { - limit = { - var:tour_success_var >= 60 - } - custom_tooltip = level_3_reward_tt - - scope:activity = { - add_activity_log_entry = { - key = level_3_reward_tt - tags = { good major completed } - show_in_conclusion = yes - character = scope:root_scope - - # Effects - root = { - add_prestige = tour_level_3_prestige_reward - if = { - limit = { - OR = { - this.dynasty.dynast ?= this - is_ai = no - } - } - dynasty ?= { add_dynasty_prestige = medium_dynasty_prestige_gain } - } - # Parochial Vassal Opinion - every_vassal_or_below = { - vassal_stance = parochial - limit = { - is_participant_in_activity = scope:activity - } - custom = every_participating_parochial_vassal - add_opinion = { - modifier = hosted_tour_opinion - target = root - opinion = 35 - } - } - } - - # Increase Vassal Opinion - scope:activity = { - every_in_list = { - variable = tour_visited_vassals - custom = every_visited_vassal - limit = { - is_alive = yes - } - add_opinion = { - modifier = tour_visited_vassal_opinion - target = root - opinion = 20 - } - } - } - } - } - create_character_memory = { - type = good_tour - } - } - #Level 2 - else_if = { - limit = { - var:tour_success_var >= 40 - } - custom_tooltip = level_2_reward_tt - - scope:activity = { - add_activity_log_entry = { - key = level_2_reward_tt - tags = { good major completed } - show_in_conclusion = yes - character = scope:root_scope - - # Effects - root = { - add_prestige = tour_level_2_prestige_reward - if = { - limit = { - OR = { - this.dynasty.dynast ?= this - is_ai = no - } - } - dynasty ?= { add_dynasty_prestige = minor_dynasty_prestige_gain } - } - # Parochial Vassal Opinion - every_vassal_or_below = { - vassal_stance = parochial - limit = { - is_participant_in_activity = scope:activity - } - custom = every_participating_parochial_vassal - add_opinion = { - modifier = hosted_tour_opinion - target = root - opinion = 30 - } - } - } - } - } - create_character_memory = { - type = good_tour - } - } - #Level 1 - else_if = { - limit = { - var:tour_success_var >= 20 - } - custom_tooltip = level_1_reward_tt - - scope:activity = { - add_activity_log_entry = { - key = level_1_reward_tt - tags = { good major completed } - show_in_conclusion = yes - character = scope:root_scope - - # Effects - root = { - add_prestige = tour_level_1_prestige_reward - } - } - } - create_character_memory = { - type = underwhelming_tour - } - } - - # No reward - var < 20 - else = { - custom_tooltip = failed_to_get_reward_tt - - scope:activity = { - add_activity_log_entry = { - key = failed_to_get_reward_tt - tags = { good major completed } - show_in_conclusion = yes - character = scope:root_scope - - # Effects - root = { - add_prestige = 200 #pity prize - } - } - } - create_character_memory = { - type = underwhelming_tour - } - } - # If character had the reduce stress intent, give them stress loss - disburse_activity_stress_loss = yes - # Accolade - politicker attribute reward modifier - add_character_modifier = { - modifier = dutiful_realm_knights_modifier - years = 10 - } - - # Glory management. - ## We want to toss out a little glory to knights who go socialize and make themselves known - accolades_activity_complete_tour_glory_effect = yes - # LEGITIMACY GAIN FOR GRAND ACTIVITY PARTICIPATION - TOUR - grand_activity_participation_legitimacy_effect = yes -} - -disburse_witch_ritual_host_rewards_effect = { - scope:activity = { - add_activity_log_entry = { - key = host_witch_ritual - tags = { completed } - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:host - - scope:host = { - add_stress = major_stress_loss - } - } - } -} - -disburse_murder_wedding_host_rewards = { - # for the loc - save_scope_as = root_scope - if = { - limit = { - has_variable = murder_feast_liege_var - } - add_prestige_level = -3 - } - if = { - limit = { - has_variable = murder_feast_head_of_faith_var - } - add_piety_level = -3 - } - if = { - limit = { - culture = { #if this is a cultural thing, people don't really love it - has_cultural_tradition = tradition_wedding_ceremonies - } - } - add_prestige = major_prestige_loss - } - if = { - limit = { - faith = { #if this is a religious thing, people don't really love it - has_doctrine = tenet_ritual_celebrations - } - } - add_piety = major_piety_loss - } - if = { - limit = { has_variable = bloody_wedding_murder_family_var } #you've killed EVERYONE - if = { - limit = { - faith = { #if you can get excommunicated by kinslaying we do so - has_doctrine_parameter = excommunication_active - NOR = { - has_doctrine = doctrine_kinslaying_accepted - has_doctrine = doctrine_kinslaying_shunned - } - } - } - add_trait_force_tooltip = excommunicated - scope:activity = { - add_activity_log_entry = { - key = host_bloody_wedding_excommunication - tags = { completed } - show_in_conclusion = yes - character = scope:host - - scope:host = { - add_excommunication_actual_effect_5_years_version = yes - } - } - } - } - else = { - add_piety_level = -1 - } - scope:activity = { - add_activity_log_entry = { - key = host_bloody_wedding_family_kill - tags = { completed } - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:host - - scope:host = { - add_dread = monumental_dread_gain - add_legitimacy = major_legitimacy_loss - add_character_modifier = { - modifier = gwedding_hosted_murder_wedding_modifier - years = 15 - } - set_variable = just_widowed_var - } - } - } - } - else = { #Rewards for a "normal" feast - if = { #if you failed your attempt it doesn't look great - limit = { has_variable = bloody_murder_fail } - add_legitimacy = minor_legitimacy_loss - add_prestige = minor_prestige_loss - if = { - limit = { - scope:activity = { - has_activity_option = { - category = wedding_option_entertainment - option = wedding_entertainment_good - } - } - } - custom_tooltip = host_wedding_entertainment_good - scope:activity = { - add_activity_log_entry = { - key = host_wedding_entertainment_good - tags = { completed } - score = 100 - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:host - - scope:host = { - add_prestige = minor_prestige_gain - } - every_attending_character = { - limit = { - NOR = { - this = scope:host - this = scope:spouse_1 - } - } - custom = custom.every_activity_guest - add_prestige = minor_prestige_gain - } - } - } - } - else_if = { - limit = { - scope:activity = { - has_activity_option = { - category = wedding_option_entertainment - option = wedding_entertainment_normal - } - } - } - custom_tooltip = host_wedding_entertainment_normal - scope:activity = { - add_activity_log_entry = { - key = host_wedding_entertainment_normal - tags = { completed } - score = 100 - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:root_scope - - scope:host = { add_prestige = miniscule_prestige_gain } - } - } - } - - # Food - if = { - limit = { - scope:activity = { - has_activity_option = { - category = wedding_option_food - option = wedding_food_good - } - } - } - custom_tooltip = host_wedding_food_good - scope:activity = { - add_activity_log_entry = { - key = host_wedding_food_good - tags = { completed } - score = 100 - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:host - - every_attending_character = { - limit = { this != scope:host } - custom = custom.every_attending_character - add_opinion = { - target = scope:host - modifier = impressed_opinion - opinion = 10 - } - } - every_attending_character = { - limit = { - NOR = { - this = scope:host - this = scope:spouse_1 - } - } - custom = custom.every_activity_guest - # Guest opinion from host and spouses - if = { - limit = { - scope:host = { is_ai = yes } - } - custom_tooltip = came_to_my_wedding_opinion_host_high - hidden_effect = { - reverse_add_opinion = { - target = scope:host - modifier = came_to_my_wedding_opinion - opinion = 5 - } - } - } - if = { - limit = { - scope:spouse_1 = { is_ai = yes } - } - custom_tooltip = came_to_my_wedding_opinion_spouse_1_high - hidden_effect = { - reverse_add_opinion = { - target = scope:spouse_1 - modifier = came_to_my_wedding_opinion - opinion = 5 - } - } - } - } - } - } - } - else_if = { - limit = { - scope:activity = { - has_activity_option = { - category = wedding_option_food - option = wedding_food_normal - } - } - } - custom_tooltip = host_wedding_food_normal - scope:activity = { - add_activity_log_entry = { - key = host_wedding_food_normal - tags = { completed } - score = 100 - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:host - - every_attending_character = { - limit = { this != scope:host } - custom = custom.every_attending_character - add_opinion = { - target = scope:host - modifier = impressed_opinion - opinion = 5 - } - } - } - } - } - - # Decoration - if = { - limit = { - scope:activity = { - has_activity_option = { - category = wedding_option_decoration - option = wedding_decoration_good - } - } - } - custom_tooltip = host_wedding_decoration_good - scope:activity = { - add_activity_log_entry = { - key = host_wedding_decoration_good - tags = { completed } - score = 100 - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:host - - scope:host = { - every_vassal_or_below = { - vassal_stance = courtly - custom = every_courtly_vassal - add_opinion = { - modifier = hosted_wedding_opinion - target = root - opinion = 10 - } - } - } - } - } - } - else_if = { - limit = { - scope:activity = { - has_activity_option = { - category = wedding_option_decoration - option = wedding_decoration_normal - } - } - } - custom_tooltip = host_wedding_decoration_normal - scope:activity = { - add_activity_log_entry = { - key = host_wedding_decoration_normal - tags = { completed } - score = 100 - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:host - - root = { - every_vassal_or_below = { - vassal_stance = courtly - custom = every_courtly_vassal - add_opinion = { - modifier = hosted_wedding_opinion - target = root - opinion = 5 - } - } - } - } - } - } - } - else_if = { #if you've killed your target you get these - limit = { - NOT = { has_variable = bloody_murder_fail } - NOT = { has_variable = bloody_wedding_murder_family_var } - } - scope:activity = { - add_activity_log_entry = { - key = host_bloody_wedding_solo_kill - tags = { completed } - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:host - - scope:host = { - add_dread = massive_dread_gain - add_legitimacy = medium_legitimacy_loss - add_character_modifier = { - modifier = gwedding_hosted_murder_wedding_modifier - years = 10 - } - set_variable = just_widowed_var - } - } - } - } - # Regular wedding hosting rewards - smaller - if = { - limit = { - scope:activity = { - has_activity_option = { - category = wedding_option_entertainment - option = wedding_entertainment_good - } - } - } - custom_tooltip = host_wedding_entertainment_good - scope:activity = { - add_activity_log_entry = { - key = host_wedding_entertainment_good - tags = { completed } - score = 100 - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:host - - scope:host = { add_prestige = minor_prestige_gain } - every_attending_character = { - limit = { - NOR = { - this = scope:host - this = scope:spouse_1 - } - } - custom = custom.every_activity_guest - add_prestige = minor_prestige_gain - } - } - } - } - else_if = { - limit = { - scope:activity = { - has_activity_option = { - category = wedding_option_entertainment - option = wedding_entertainment_normal - } - } - } - custom_tooltip = host_wedding_entertainment_normal - scope:activity = { - add_activity_log_entry = { - key = host_wedding_entertainment_normal - tags = { completed } - score = 100 - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:root_scope - - scope:host = { add_prestige = miniscule_prestige_gain } - } - } - } - - # Food - if = { - limit = { - scope:activity = { - has_activity_option = { - category = wedding_option_food - option = wedding_food_good - } - } - } - custom_tooltip = host_wedding_food_good - scope:activity = { - add_activity_log_entry = { - key = host_wedding_food_good - tags = { completed } - score = 100 - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:host - - every_attending_character = { - limit = { this != scope:host } - custom = custom.every_attending_character - add_opinion = { - target = scope:host - modifier = impressed_opinion - opinion = 10 - } - } - every_attending_character = { - limit = { - NOR = { - this = scope:host - this = scope:spouse_1 - } - } - custom = custom.every_activity_guest - # Guest opinion from host and spouses - if = { - limit = { - scope:host = { is_ai = yes } - } - custom_tooltip = came_to_my_wedding_opinion_host_high - hidden_effect = { - reverse_add_opinion = { - target = scope:host - modifier = came_to_my_wedding_opinion - opinion = 5 - } - } - } - if = { - limit = { - scope:spouse_1 = { is_ai = yes } - } - custom_tooltip = came_to_my_wedding_opinion_spouse_1_high - hidden_effect = { - reverse_add_opinion = { - target = scope:spouse_1 - modifier = came_to_my_wedding_opinion - opinion = 5 - } - } - } - } - } - } - } - else_if = { - limit = { - scope:activity = { - has_activity_option = { - category = wedding_option_food - option = wedding_food_normal - } - } - } - custom_tooltip = host_wedding_food_normal - scope:activity = { - add_activity_log_entry = { - key = host_wedding_food_normal - tags = { completed } - score = 100 - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:host - - every_attending_character = { - limit = { this != scope:host } - custom = custom.every_attending_character - add_opinion = { - target = scope:host - modifier = impressed_opinion - opinion = 5 - } - } - } - } - } - - # Decoration - if = { - limit = { - scope:activity = { - has_activity_option = { - category = wedding_option_decoration - option = wedding_decoration_good - } - } - } - custom_tooltip = host_wedding_decoration_good - scope:activity = { - add_activity_log_entry = { - key = host_wedding_decoration_good - tags = { completed } - score = 100 - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:host - - scope:host = { - every_vassal_or_below = { - vassal_stance = courtly - custom = every_courtly_vassal - add_opinion = { - modifier = hosted_wedding_opinion - target = root - opinion = 10 - } - } - } - } - } - } - else_if = { - limit = { - scope:activity = { - has_activity_option = { - category = wedding_option_decoration - option = wedding_decoration_normal - } - } - } - custom_tooltip = host_wedding_decoration_normal - scope:activity = { - add_activity_log_entry = { - key = host_wedding_decoration_normal - tags = { completed } - score = 100 - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:host - - root = { - every_vassal_or_below = { - vassal_stance = courtly - custom = every_courtly_vassal - add_opinion = { - modifier = hosted_wedding_opinion - target = root - opinion = 5 - } - } - } - } - } - } - } - # # Vassal Opinion - every_vassal_or_below = { - limit = { - OR = { - has_trait = torturer - has_trait = sadistic - has_trait = vengeful - has_trait = callous - } - } - custom = every_cruel_vassal - add_opinion = { - modifier = respect_opinion - target = scope:host - opinion = 20 - } - } - every_vassal_or_below = { - limit = { - NOR = { - has_trait = torturer - has_trait = sadistic - has_trait = vengeful - has_trait = callous - } - } - custom = wedding_every_other_vassal - add_opinion = { - modifier = suspicion_opinion - target = scope:host - opinion = -25 - } - } - - # Accolade glory gain - accolades_activity_complete_wedding_glory_effect = yes -} - -disburse_wedding_activity_rewards = { - # for the loc - save_scope_as = root_scope - - scope:activity = { - ### Rewards based on Options - # Entertainment - if = { - limit = { - has_activity_option = { - category = wedding_option_entertainment - option = wedding_entertainment_good - } - } - add_activity_log_entry = { - key = host_wedding_entertainment_good - tags = { completed } - score = 100 - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:root_scope - - root = { add_prestige = 900 } - every_attending_character = { - limit = { - NOR = { - this = scope:host - this = scope:spouse_1 - this = scope:spouse_2 - } - } - custom = custom.every_activity_guest - add_prestige = major_prestige_gain - } - } - } - else_if = { - limit = { - has_activity_option = { - category = wedding_option_entertainment - option = wedding_entertainment_normal - } - } - add_activity_log_entry = { - key = host_wedding_entertainment_normal - tags = { completed } - score = 100 - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:root_scope - - root = { add_prestige = 600 } - every_attending_character = { - limit = { - NOR = { - this = scope:host - this = scope:spouse_1 - this = scope:spouse_2 - } - } - custom = custom.every_activity_guest - add_prestige = medium_prestige_gain - } - } - } - else_if = { - limit = { - has_activity_option = { - category = wedding_option_entertainment - option = wedding_entertainment_bad - } - } - add_activity_log_entry = { - key = host_wedding_entertainment_bad - tags = { completed } - score = 100 - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:root_scope - - root = { add_prestige = 300 } - every_attending_character = { - limit = { - NOR = { - this = scope:host - this = scope:spouse_1 - this = scope:spouse_2 - } - } - custom = custom.every_activity_guest - add_prestige = minor_prestige_gain - } - } - } - - # Food - if = { - limit = { - has_activity_option = { - category = wedding_option_food - option = wedding_food_good - } - } - add_activity_log_entry = { - key = host_wedding_food_good - tags = { completed } - score = 100 - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:root_scope - - every_attending_character = { - limit = { this != root } - custom = custom.every_activity_guest - add_opinion = { - target = root - modifier = impressed_opinion - opinion = 30 - } - } - every_attending_character = { - limit = { - NOR = { - this = scope:host - this = scope:spouse_1 - this = scope:spouse_2 - } - } - custom = custom.every_activity_guest - # Guest opinion from host and spouses - if = { - limit = { - scope:host = { is_ai = yes } - } - custom_tooltip = came_to_my_wedding_opinion_host_high - hidden_effect = { - reverse_add_opinion = { - target = scope:host - modifier = came_to_my_wedding_opinion - opinion = 15 - } - } - } - if = { - limit = { - scope:spouse_1 = { is_ai = yes } - } - custom_tooltip = came_to_my_wedding_opinion_spouse_1_high - hidden_effect = { - reverse_add_opinion = { - target = scope:spouse_1 - modifier = came_to_my_wedding_opinion - opinion = 15 - } - } - } - if = { - limit = { - scope:spouse_2 = { is_ai = yes } - } - custom_tooltip = came_to_my_wedding_opinion_spouse_2_high - hidden_effect = { - reverse_add_opinion = { - target = scope:spouse_2 - modifier = came_to_my_wedding_opinion - opinion = 15 - } - } - } - } - } - } - else_if = { - limit = { - has_activity_option = { - category = wedding_option_food - option = wedding_food_normal - } - } - add_activity_log_entry = { - key = host_wedding_food_normal - tags = { completed } - score = 100 - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:root_scope - - every_attending_character = { - limit = { this != root } - custom = custom.every_activity_guest - add_opinion = { - target = root - modifier = impressed_opinion - opinion = 20 - } - } - every_attending_character = { - limit = { - NOR = { - this = scope:host - this = scope:spouse_1 - this = scope:spouse_2 - } - } - custom = custom.every_activity_guest - # Opinion from host and spouses - if = { - limit = { - scope:host = { is_ai = yes } - } - custom_tooltip = came_to_my_wedding_opinion_host_medium - hidden_effect = { - reverse_add_opinion = { - target = scope:host - modifier = came_to_my_wedding_opinion - opinion = 10 - } - } - } - if = { - limit = { - scope:spouse_1 = { is_ai = yes } - } - custom_tooltip = came_to_my_wedding_opinion_spouse_1_medium - hidden_effect = { - reverse_add_opinion = { - target = scope:spouse_1 - modifier = came_to_my_wedding_opinion - opinion = 10 - } - } - } - if = { - limit = { - scope:spouse_2 = { is_ai = yes } - } - custom_tooltip = came_to_my_wedding_opinion_spouse_2_medium - hidden_effect = { - reverse_add_opinion = { - target = scope:spouse_2 - modifier = came_to_my_wedding_opinion - opinion = 10 - } - } - } - } - } - } - else_if = { - limit = { - has_activity_option = { - category = wedding_option_food - option = wedding_food_bad - } - } - add_activity_log_entry = { - key = host_wedding_food_bad - tags = { completed } - score = 100 - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:root_scope - - every_attending_character = { - limit = { this != root } - custom = custom.every_activity_guest - add_opinion = { - target = root - modifier = impressed_opinion - opinion = 5 - } - } - every_attending_character = { - limit = { - NOR = { - this = scope:host - this = scope:spouse_1 - this = scope:spouse_2 - } - } - custom = custom.every_activity_guest - # Opinion from host and spouses - if = { - limit = { - scope:host = { is_ai = yes } - } - custom_tooltip = came_to_my_wedding_opinion_host_low - hidden_effect = { - reverse_add_opinion = { - target = scope:host - modifier = came_to_my_wedding_opinion - opinion = 5 - } - } - } - if = { - limit = { - scope:spouse_1 = { is_ai = yes } - } - custom_tooltip = came_to_my_wedding_opinion_spouse_1_low - hidden_effect = { - reverse_add_opinion = { - target = scope:spouse_1 - modifier = came_to_my_wedding_opinion - opinion = 5 - } - } - } - if = { - limit = { - scope:spouse_2 = { is_ai = yes } - } - custom_tooltip = came_to_my_wedding_opinion_spouse_2_low - hidden_effect = { - reverse_add_opinion = { - target = scope:spouse_2 - modifier = came_to_my_wedding_opinion - opinion = 5 - } - } - } - } - } - } - - # Decoration - if = { - limit = { - has_activity_option = { - category = wedding_option_decoration - option = wedding_decoration_good - } - } - add_activity_log_entry = { - key = host_wedding_decoration_good - tags = { completed } - score = 100 - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:root_scope - - root = { - add_character_modifier = { - modifier = gwedding_magnificent_host_modifier - years = 20 - } - if = { - limit = { - any_vassal_or_below = { - vassal_stance = courtly - } - } - every_vassal_or_below = { - vassal_stance = courtly - custom = every_courtly_vassal - add_opinion = { - modifier = hosted_wedding_opinion - target = root - opinion = 30 - } - } - } - } - every_attending_character = { - limit = { - NOR = { - this = scope:host - this = scope:spouse_1 - this = scope:spouse_2 - } - } - custom = custom.every_activity_guest - add_character_modifier = { - modifier = wedding_of_the_century_modifier - years = 20 - } - if = { - limit = { - has_trait = lifestyle_reveler - } - add_trait_xp = { - trait = lifestyle_reveler - value = 10 - } - } - } - } - } - else_if = { - limit = { - has_activity_option = { - category = wedding_option_decoration - option = wedding_decoration_normal - } - } - add_activity_log_entry = { - key = host_wedding_decoration_normal - tags = { completed } - score = 100 - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:root_scope - - root = { - add_character_modifier = { - modifier = gwedding_gracious_host_modifier - years = 20 - } - if = { - limit = { - any_vassal_or_below = { - vassal_stance = courtly - } - } - every_vassal_or_below = { - vassal_stance = courtly - custom = every_courtly_vassal - add_opinion = { - modifier = hosted_wedding_opinion - target = root - opinion = 20 - } - } - } - } - every_attending_character = { - limit = { - NOR = { - this = scope:host - this = scope:spouse_1 - this = scope:spouse_2 - } - has_trait = lifestyle_reveler - } - custom = custom.every_activity_guest - add_trait_xp = { - trait = lifestyle_reveler - value = 5 - } - } - } - } - else_if = { - limit = { - has_activity_option = { - category = wedding_option_decoration - option = wedding_decoration_bad - } - } - add_activity_log_entry = { - key = host_wedding_decoration_bad - tags = { completed } - score = 100 - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:root_scope - - root = { - if = { - limit = { - has_trait = lifestyle_reveler - } - add_trait_xp = { - trait = lifestyle_reveler - value = 10 - } - } - else = { - add_trait = lifestyle_reveler - } - if = { - limit = { - any_vassal_or_below = { - vassal_stance = courtly - } - } - every_vassal_or_below = { - vassal_stance = courtly - custom = every_courtly_vassal - add_opinion = { - modifier = hosted_wedding_opinion - target = root - opinion = 5 - } - } - } - } - scope:activity = { - every_attending_character = { - limit = { - NOR = { - this = scope:host - this = scope:spouse_1 - this = scope:spouse_2 - } - has_trait = lifestyle_reveler - } - custom = custom.every_activity_guest - add_trait_xp = { - trait = lifestyle_reveler - value = 3 - } - } - } - } - } - } - - # Bonuses for location - if = { - limit = { - scope:wedding_venue = { - OR = { - has_building_or_higher = royal_garden_01 - has_building_or_higher = leisure_palace_01 - barony = { is_holy_site_of = scope:host.faith } - barony = { is_holy_site_of = scope:spouse_1.faith } - barony = { is_holy_site_of = scope:spouse_2.faith } - this = scope:host.capital_province - } - } - } - scope:activity = { - add_activity_log_entry = { - key = host_wedding_venue - tags = { completed } - score = 100 - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:root_scope - - if = { - limit = { - OR = { - scope:wedding_venue = { has_building_or_higher = royal_garden_03 } - scope:wedding_venue = { has_building_or_higher = leisure_palace_03 } - } - } - root = { - stress_impact = { - base = massive_stress_impact_loss - } - dynasty ?= { add_dynasty_prestige = minor_dynasty_prestige_gain } - } - } - else_if = { - limit = { - OR = { - scope:wedding_venue = { has_building_or_higher = royal_garden_02 } - scope:wedding_venue = { has_building_or_higher = leisure_palace_02 } - } - } - root = { - stress_impact = { - base = major_stress_impact_loss - } - dynasty ?= { add_dynasty_prestige = miniscule_dynasty_prestige_gain } - } - } - else_if = { - limit = { - OR = { - scope:wedding_venue = { has_building_or_higher = royal_garden_01 } - scope:wedding_venue = { has_building_or_higher = leisure_palace_01 } - } - } - root = { - stress_impact = { - base = medium_stress_impact_loss - } - dynasty ?= { add_dynasty_prestige = 10 } - } - } - if = { - limit = { - scope:wedding_venue = { - barony = { is_holy_site_of = scope:host.faith } - } - } - root = { - add_piety = major_piety_gain - } - } - if = { - limit = { - scope:wedding_venue = { - this = root.capital_province - } - } - # Replace marriage_effect.2001 - root = { - add_gold = minor_gold_value - } - } - if = { - limit = { - scope:wedding_venue.barony = { is_holy_site_of = scope:spouse_1.faith } - } - scope:spouse_1 = { add_piety = massive_piety_gain } - } - if = { - limit = { - scope:wedding_venue.barony = { is_holy_site_of = scope:spouse_2.faith } - } - scope:spouse_2 = { add_piety = massive_piety_gain } - } - } - } - } - - # If character had the reduce stress intent, give them stress loss - root = { disburse_activity_stress_loss = yes } - scope:activity = { - every_attending_character = { - limit = { - NOR = { - this = scope:host - this = scope:spouse_1 - this = scope:spouse_2 - } - } - custom = custom.every_activity_guest - disburse_activity_stress_loss = yes - } - } - - # Accolade glory gain - accolades_activity_complete_wedding_glory_effect = yes -} - -disburse_wedding_spouse_activity_rewards = { - # for the loc - save_scope_as = root_scope - if = { - limit = { - this = scope:spouse_1 - } - scope:spouse_2 = { save_scope_as = other_spouse } - } - else_if = { - limit = { - this = scope:spouse_2 - } - scope:spouse_1 = { save_scope_as = other_spouse } - } - - scope:activity = { - ### Rewards based on Options - # Entertainment - if = { - limit = { - has_activity_option = { - category = wedding_option_entertainment - option = wedding_entertainment_good - } - } - add_activity_log_entry = { - key = spouse_wedding_entertainment_good - tags = { completed } - score = 100 - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:root_scope - target = scope:other_spouse - - scope:root_scope = { add_prestige = 800 } - } - } - else_if = { - limit = { - has_activity_option = { - category = wedding_option_entertainment - option = wedding_entertainment_normal - } - } - add_activity_log_entry = { - key = spouse_wedding_entertainment_normal - tags = { completed } - score = 100 - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:root_scope - target = scope:other_spouse - - scope:root_scope = { add_prestige = 600 } - } - } - else_if = { - limit = { - has_activity_option = { - category = wedding_option_entertainment - option = wedding_entertainment_bad - } - } - add_activity_log_entry = { - key = spouse_wedding_entertainment_bad - tags = { completed } - score = 100 - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:root_scope - target = scope:other_spouse - - scope:root_scope = { add_prestige = 400 } - } - } - - # Food - if = { - limit = { - has_activity_option = { - category = wedding_option_food - option = wedding_food_good - } - } - add_activity_log_entry = { - key = spouse_wedding_food_good - tags = { completed } - score = 100 - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:root_scope - target = scope:other_spouse - - scope:activity = { - every_attending_character = { - limit = { - NOR = { - this = scope:root_scope - this = scope:host - this = scope:other_spouse - } - } - custom = custom.every_activity_guest - add_opinion = { - target = scope:root_scope - modifier = impressed_opinion - opinion = 25 - } - } - } - scope:root_scope = { - if = { - limit = { - has_trait = lifestyle_reveler - } - add_trait_xp = { - trait = lifestyle_reveler - value = 15 - } - } - } - } - } - else_if = { - limit = { - has_activity_option = { - category = wedding_option_food - option = wedding_food_normal - } - } - add_activity_log_entry = { - key = spouse_wedding_food_normal - tags = { completed } - score = 100 - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:root_scope - target = scope:other_spouse - - scope:activity = { - every_attending_character = { - limit = { - NOR = { - this = scope:root_scope - this = scope:host - this = scope:other_spouse - } - } - custom = custom.every_activity_guest - add_opinion = { - target = scope:root_scope - modifier = impressed_opinion - opinion = 15 - } - } - } - scope:root_scope = { - if = { - limit = { - has_trait = lifestyle_reveler - } - add_trait_xp = { - trait = lifestyle_reveler - value = 7 - } - } - } - } - } - else_if = { - limit = { - has_activity_option = { - category = wedding_option_food - option = wedding_food_bad - } - } - add_activity_log_entry = { - key = spouse_wedding_food_bad - tags = { completed } - score = 100 - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:root_scope - target = scope:other_spouse - - scope:activity = { - every_attending_character = { - limit = { - NOR = { - this = scope:root_scope - this = scope:host - this = scope:other_spouse - } - } - custom = custom.every_activity_guest - add_opinion = { - target = scope:root_scope - modifier = impressed_opinion - opinion = 5 - } - } - } - scope:root_scope = { - if = { - limit = { - has_trait = lifestyle_reveler - } - add_trait_xp = { - trait = lifestyle_reveler - value = 3 - } - } - } - } - } - - # Decoration - if = { - limit = { - has_activity_option = { - category = wedding_option_decoration - option = wedding_decoration_good - } - } - add_activity_log_entry = { - key = spouse_wedding_decoration_good - tags = { completed } - score = 100 - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:root_scope - target = scope:other_spouse - - scope:root_scope = { - add_character_modifier = { - modifier = gwedding_magnificent_wedding_modifier - years = 20 - } - dynasty ?= { - add_dynasty_prestige = medium_dynasty_prestige_gain - } - } - } - } - else_if = { - limit = { - has_activity_option = { - category = wedding_option_decoration - option = wedding_decoration_normal - } - } - add_activity_log_entry = { - key = spouse_wedding_decoration_normal - tags = { completed } - score = 100 - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:root_scope - target = scope:other_spouse - - scope:root_scope = { - add_character_modifier = { - modifier = gwedding_grandiose_wedding_modifier - years = 20 - } - dynasty ?= { - add_dynasty_prestige = minor_dynasty_prestige_gain - } - } - } - } - else_if = { - limit = { - has_activity_option = { - category = wedding_option_decoration - option = wedding_decoration_bad - } - } - add_activity_log_entry = { - key = spouse_wedding_decoration_bad - tags = { completed } - score = 100 - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:root_scope - target = scope:other_spouse - - scope:root_scope = { - add_character_modifier = { - modifier = gwedding_grand_wedding_modifier - years = 20 - } - dynasty ?= { - add_dynasty_prestige = miniscule_dynasty_prestige_gain - } - } - } - } - } - - # If character had the reduce stress intent, give them stress loss - disburse_activity_stress_loss = yes - - # LEGITIMACY GAIN FOR GRAND ACTIVITY PARTICIPATION - WEDDING - grand_activity_participation_legitimacy_effect = yes -} - -tooltip_disburse_wedding_host_activity_rewards = { - scope:activity = { - if = { - limit = { - has_activity_option = { - category = wedding_option_entertainment - option = wedding_entertainment_good - } - } - root = { add_prestige = 1200 } - } - else_if = { - limit = { - has_activity_option = { - category = wedding_option_entertainment - option = wedding_entertainment_normal - } - } - root = { add_prestige = 800 } - } - else_if = { - limit = { - has_activity_option = { - category = wedding_option_entertainment - option = wedding_entertainment_bad - } - } - root = { add_prestige = 400 } - } - if = { - limit = { - has_activity_option = { - category = wedding_option_food - option = wedding_food_good - } - } - every_attending_character = { - limit = { this != root } - custom = custom.every_activity_guest - add_opinion = { - target = root - modifier = impressed_opinion - opinion = 30 - } - } - } - else_if = { - limit = { - has_activity_option = { - category = wedding_option_food - option = wedding_food_normal - } - } - every_attending_character = { - limit = { this != root } - custom = custom.every_activity_guest - add_opinion = { - target = root - modifier = impressed_opinion - opinion = 20 - } - } - } - else_if = { - limit = { - has_activity_option = { - category = wedding_option_food - option = wedding_food_bad - } - } - every_attending_character = { - limit = { this != root } - custom = custom.every_activity_guest - add_opinion = { - target = root - modifier = impressed_opinion - opinion = 5 - } - } - } - if = { - limit = { - has_activity_option = { - category = wedding_option_decoration - option = wedding_decoration_good - } - } - root = { - add_character_modifier = { - modifier = gwedding_magnificent_host_modifier - years = 20 - } - if = { - limit = { - any_vassal_or_below = { - vassal_stance = courtly - } - } - every_vassal_or_below = { - vassal_stance = courtly - custom = every_courtly_vassal - add_opinion = { - modifier = hosted_wedding_opinion - target = root - opinion = 30 - } - } - } - } - } - else_if = { - limit = { - has_activity_option = { - category = wedding_option_decoration - option = wedding_decoration_normal - } - } - root = { - add_character_modifier = { - modifier = gwedding_gracious_host_modifier - years = 20 - } - if = { - limit = { - any_vassal_or_below = { - vassal_stance = courtly - } - } - every_vassal_or_below = { - vassal_stance = courtly - custom = every_courtly_vassal - add_opinion = { - modifier = hosted_wedding_opinion - target = root - opinion = 20 - } - } - } - } - } - else_if = { - limit = { - has_activity_option = { - category = wedding_option_decoration - option = wedding_decoration_bad - } - } - root = { - if = { - limit = { - has_trait = lifestyle_reveler - } - add_trait_xp = { - trait = lifestyle_reveler - value = 10 - } - } - else = { - add_trait = lifestyle_reveler - } - if = { - limit = { - any_vassal_or_below = { - vassal_stance = courtly - } - } - every_vassal_or_below = { - vassal_stance = courtly - custom = every_courtly_vassal - add_opinion = { - modifier = hosted_wedding_opinion - target = root - opinion = 5 - } - } - } - } - } - if = { - limit = { - OR = { - scope:wedding_venue = { has_building_or_higher = royal_garden_03 } - scope:wedding_venue = { has_building_or_higher = leisure_palace_03 } - } - } - root = { - stress_impact = { - base = massive_stress_impact_loss - } - dynasty ?= { add_dynasty_prestige = minor_dynasty_prestige_gain } - } - } - else_if = { - limit = { - OR = { - scope:wedding_venue = { has_building_or_higher = royal_garden_02 } - scope:wedding_venue = { has_building_or_higher = leisure_palace_02 } - } - } - root = { - stress_impact = { - base = major_stress_impact_loss - } - dynasty ?= { add_dynasty_prestige = miniscule_dynasty_prestige_gain } - } - } - else_if = { - limit = { - OR = { - scope:wedding_venue = { has_building_or_higher = royal_garden_01 } - scope:wedding_venue = { has_building_or_higher = leisure_palace_01 } - } - } - root = { - stress_impact = { - base = medium_stress_impact_loss - } - dynasty ?= { add_dynasty_prestige = 10 } - } - } - if = { - limit = { - scope:wedding_venue = { - barony = { is_holy_site_of = scope:host.faith } - } - } - root = { - add_piety = major_piety_gain - } - } - if = { - limit = { - scope:wedding_venue = { - this = root.capital_province - } - } - # Replace marriage_effect.2001 - root = { - add_gold = minor_gold_value - } - } - } - # If character had the reduce stress intent, give them stress loss - root = { disburse_activity_stress_loss = yes } - - # Accolade glory gain - accolades_activity_complete_wedding_glory_effect = yes - - # LEGITIMACY GAIN FOR GRAND ACTIVITY PARTICIPATION - WEDDING - grand_activity_participation_legitimacy_effect = yes -} - -tooltip_disburse_wedding_guest_activity_rewards = { - scope:activity = { - if = { - limit = { - has_activity_option = { - category = wedding_option_entertainment - option = wedding_entertainment_good - } - } - root = { add_prestige = major_prestige_gain } - } - else_if = { - limit = { - has_activity_option = { - category = wedding_option_entertainment - option = wedding_entertainment_normal - } - } - root = { add_prestige = medium_prestige_gain } - } - else_if = { - limit = { - has_activity_option = { - category = wedding_option_entertainment - option = wedding_entertainment_bad - } - } - root = { add_prestige = minor_prestige_gain } - } - if = { - limit = { - has_activity_option = { - category = wedding_option_food - option = wedding_food_good - } - } - if = { - limit = { - scope:host = { is_ai = yes } - } - custom_tooltip = came_to_my_wedding_opinion_host_high - } - if = { - limit = { - scope:spouse_1 = { is_ai = yes } - } - custom_tooltip = came_to_my_wedding_opinion_spouse_1_high - } - if = { - limit = { - scope:spouse_2 = { is_ai = yes } - } - custom_tooltip = came_to_my_wedding_opinion_spouse_2_high - } - } - else_if = { - limit = { - has_activity_option = { - category = wedding_option_food - option = wedding_food_normal - } - } - if = { - limit = { - scope:host = { is_ai = yes } - } - custom_tooltip = came_to_my_wedding_opinion_host_medium - } - if = { - limit = { - scope:spouse_1 = { is_ai = yes } - } - custom_tooltip = came_to_my_wedding_opinion_spouse_1_medium - } - if = { - limit = { - scope:spouse_2 = { is_ai = yes } - } - custom_tooltip = came_to_my_wedding_opinion_spouse_2_medium - } - } - else_if = { - limit = { - has_activity_option = { - category = wedding_option_food - option = wedding_food_bad - } - } - if = { - limit = { - scope:host = { is_ai = yes } - } - custom_tooltip = came_to_my_wedding_opinion_host_low - } - if = { - limit = { - scope:spouse_1 = { is_ai = yes } - } - custom_tooltip = came_to_my_wedding_opinion_spouse_1_low - } - if = { - limit = { - scope:spouse_2 = { is_ai = yes } - } - custom_tooltip = came_to_my_wedding_opinion_spouse_2_low - } - } - if = { - limit = { - has_activity_option = { - category = wedding_option_decoration - option = wedding_decoration_good - } - } - root = { - add_character_modifier = { - modifier = wedding_of_the_century_modifier - years = 20 - } - if = { - limit = { - has_trait = lifestyle_reveler - } - add_trait_xp = { - trait = lifestyle_reveler - value = 10 - } - } - } - } - else_if = { - limit = { - has_activity_option = { - category = wedding_option_decoration - option = wedding_decoration_normal - } - } - root = { - if = { - limit = { - has_trait = lifestyle_reveler - } - add_trait_xp = { - trait = lifestyle_reveler - value = 5 - } - } - } - } - else_if = { - limit = { - has_activity_option = { - category = wedding_option_decoration - option = wedding_decoration_bad - } - } - root = { - if = { - limit = { - has_trait = lifestyle_reveler - } - add_trait_xp = { - trait = lifestyle_reveler - value = 3 - } - } - } - } - } - disburse_activity_stress_loss = yes - - # Accolade glory gain - accolades_activity_complete_wedding_glory_effect = yes - - # LEGITIMACY GAIN FOR GRAND ACTIVITY PARTICIPATION - WEDDING - grand_activity_participation_legitimacy_effect = yes -} - -disburse_wedding_spouse_host_activity_rewards = { - # for the loc - save_scope_as = root_scope - if = { - limit = { - root = scope:spouse_1 - } - scope:spouse_2 = { save_scope_as = other_spouse } - } - else_if = { - limit = { - root = scope:spouse_2 - } - scope:spouse_1 = { save_scope_as = other_spouse } - } - - scope:activity = { - if = { - limit = { - has_activity_option = { - category = wedding_option_decoration - option = wedding_decoration_good - } - } - add_activity_log_entry = { - key = host_wedding_decoration_good - tags = { completed } - score = 100 - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:root_scope - target = scope:other_spouse - - scope:root_scope = { - add_character_modifier = { - modifier = gwedding_magnificent_wedding_modifier - years = 20 - } - } - } - } - else_if = { - limit = { - has_activity_option = { - category = wedding_option_decoration - option = wedding_decoration_normal - } - } - custom_tooltip = host_wedding_decoration_normal - add_activity_log_entry = { - key = host_wedding_decoration_normal - tags = { completed } - score = 100 - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:root_scope - target = scope:other_spouse - - scope:root_scope = { - add_character_modifier = { - modifier = gwedding_grandiose_wedding_modifier - years = 20 - } - } - } - } - else_if = { - limit = { - has_activity_option = { - category = wedding_option_decoration - option = wedding_decoration_bad - } - } - custom_tooltip = host_wedding_decoration_bad - add_activity_log_entry = { - key = host_wedding_decoration_bad - tags = { completed } - score = 100 - # this line below adds the entry to the Effects section of the conclusion UI - show_in_conclusion = yes - character = scope:root_scope - target = scope:other_spouse - - scope:root_scope = { - add_character_modifier = { - modifier = gwedding_grand_wedding_modifier - years = 20 - } - } - } - } - } - - # LEGITIMACY GAIN FOR GRAND ACTIVITY PARTICIPATION - WEDDING - grand_activity_participation_legitimacy_effect = yes -} - -disburse_hunt_activity_rewards = { - # for the loc - save_scope_as = root_scope - if = { # To show correct tooltips for guests - limit = { has_trait = lifestyle_hunter } - add_character_flag = { - flag = host_existing_hunter - weeks = 1 - } - } - hunt_individual_guest_awards_effect = yes - # Rewards based on Magnficence level - # Host Rewards - # Adventurer Provisions - if = { - limit = { - has_government = landless_adventurer_government - } - domicile = { - change_provisions = { - value = hunt_provisions_reward_value - } - } - } - # Nomads gain dread and prowess from dangerous animal kills - if = { - limit = { - government_has_flag = government_is_nomadic - scope:activity = { - var:hunt_success ?= flag:yes - NOT = { exists = var:animal_spared } - hunt_animal_type_dangerous_trigger = { VAR = var:animal_type } - } - } - add_dread = massive_dread_gain - add_prowess_skill = 1 - } - # Nomad Discount Modifier for Feasts - if = { - limit = { - government_has_flag = government_is_nomadic - scope:activity.var:hunt_success ?= flag:yes - NOT = { exists = scope:activity.var:animal_spared } - scope:activity = { - NOR = { - var:animal_type ?= flag:hare - var:animal_type ?= flag:fox - } - } - } - custom_tooltip = nomad_good_hunt_tt - add_character_modifier = { - modifier = mpo_si_slaughtered_animals - } - } - else_if = { - limit = { - government_has_flag = government_is_nomadic - scope:activity.var:hunt_success ?= flag:yes - NOT = { exists = scope:activity.var:animal_spared } - } - custom_tooltip = nomad_meager_hunt_tt - } - # Prestige/Piety Gain - if = { - limit = { - culture = { has_cultural_parameter = sacred_hunts } - } - add_prestige = hunt_prestige_with_piety_reward_value - add_piety = hunt_piety_reward_value - } - else = { add_prestige = hunt_prestige_reward_value } - # Triggered bonuses - if = { - limit = { has_character_flag = impressive_hunt } - every_vassal = { - add_opinion = { - modifier = hosted_hunt_opinion - target = scope:root_scope - opinion = 5 - } - } - remove_character_flag = impressive_hunt - } - if = { - limit = { has_character_flag = personal_hunt } - if = { - limit = { scope:activity.var:hunt_success ?= flag:yes } - scope:activity = { - random_attending_character = { - limit = { - NOR = { - has_trait = loyal - has_trait = disloyal - } - is_ai = yes - } - weight = { - base = 1 - opinion_modifier = { - opinion_target = root - } - } - add_trait = loyal - } - } - } - else = { - scope:activity = { - random_attending_character = { - limit = { - NOR = { - has_trait = loyal - has_trait = disloyal - } - is_ai = yes - } - weight = { - base = 1 - opinion_modifier = { - opinion_target = root - } - } - random = { - chance = 50 - add_trait = loyal - } - } - } - } - remove_character_flag = personal_hunt - } - if = { - limit = { has_character_flag = glorious_hunt } - if = { - limit = { scope:activity.var:hunt_success ?= flag:yes } - add_legitimacy_effect = { LEGITIMACY = minor_legitimacy_gain } - } - else = { - add_legitimacy_effect = { LEGITIMACY = miniscule_legitimacy_gain } - } - remove_character_flag = glorious_hunt - } - # Glory Hound Vassal Opinion - set_variable = { - name = attending_glory_hounds - value = scope:root_scope.number_of_participating_glory_hound_vassals - } - every_vassal = { - vassal_stance = glory_hound - limit = { - is_participant_in_activity = scope:activity - } - custom = every_participating_glory_hound_vassal - add_opinion = { - modifier = hosted_hunt_opinion - target = scope:root_scope - opinion = hunt_glory_hound_vassal_opinion_value - } - } - remove_variable = attending_glory_hounds - # Belligerent Vassal Opinion - set_variable = { - name = attending_belligerent - value = scope:root_scope.number_of_participating_belligerent_vassals - } - every_vassal_or_below = { - limit = { - has_vassal_stance = belligerent - is_participant_in_activity = scope:activity - } - custom = every_participating_belligerent_vassal - add_opinion = { - modifier = hosted_hunt_opinion - target = scope:root_scope - opinion = 15 - } - } - remove_variable = attending_belligerent - scope:activity = { - hidden_effect = { - if = { - limit = { - activity_host = { has_trait = lifestyle_hunter } - } - add_to_variable_list = { - name = trait_rewards - target = trait:lifestyle_hunter - } - } - } - # People happy when their nobles clear dangerous beasts - if = { - limit = { - var:hunt_success ?= flag:yes - NOT = { exists = var:animal_spared } - hunt_animal_type_predator_trigger = { VAR = var:animal_type } - activity_location.county.holder.top_liege ?= scope:host.top_liege # own nobles - } - activity_location.county = { - add_county_modifier = { - modifier = hunt_dangerous_beast_slain_modifier - years = 10 - } - } - } - show_as_tooltip = { - every_attending_character = { - limit = { - NOR = { - this = scope:host - this = root - } - is_adult = yes - trigger_if = { - limit = { - scope:activity = { - NOT = { - has_activity_option = { category = special_type option = hunt_type_falconry } - } - } - } - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:root_scope } - } - trigger_if = { - limit = { is_clergy = yes } - faith = { has_doctrine_parameter = clergy_can_fight } - } - } - custom = hunt_every_other_hunter_tt - add_prestige = hunt_prestige_guest_gain_value - if = { - limit = { - government_has_flag = government_is_nomadic - scope:activity = { - var:hunt_success ?= flag:yes - NOT = { exists = var:animal_spared } - hunt_animal_type_dangerous_trigger = { VAR = var:animal_type } - } - } - add_prowess_skill = 1 - } - } - } - } - - # Remove strife if relevant. - remove_strife_per_invited_powerful_vassal_effect = yes -} - -disburse_feast_activity_rewards = { - # for the loc - save_scope_as = root_scope - - # Rewards based on Activity Options - - # Number of courses - if = { - limit = { - scope:activity = { - has_activity_option = { - category = feast_option_courses - option = feast_courses_good - } - } - } - scope:activity = { - add_activity_log_entry = { - key = courses_good_reward_tt - tags = { completed } - character = scope:root_scope - show_in_conclusion = yes - score = 50 - - # Effects - root = { - # Host Rewards - - - #Max Food Option will make Courtly Vassals more happy than other guests. - #Court Amenities can increase this further. - - every_vassal_or_below = { - vassal_stance = courtly - limit = { - is_participant_in_activity = scope:activity - } - custom = every_courtly_vassal - add_opinion = { - modifier = hosted_feast_opinion - target = root - opinion = feast_opinion_max_food_value - } - } - # Vassal Opinion - scope:activity = { - every_attending_character = { - limit = { - this != root - trigger_if = { - limit = { - is_vassal_of = root - } - NOT = { has_vassal_stance = courtly } - } - } - custom = custom.every_attending_character_but_courtly - add_opinion = { - target = root - modifier = impressed_opinion - opinion = feast_opinion_max_food_value - } - } - } - } - } - } - } - else_if = { - limit = { - scope:activity = { - has_activity_option = { - category = feast_option_courses - option = feast_courses_normal - } - } - } - #With Middle Food Option - scope:activity = { - add_activity_log_entry = { - key = courses_normal_reward_tt - tags = { completed } - character = scope:root_scope - show_in_conclusion = yes - score = 50 - - # Effects - root = { - # Host Rewards - - #With Middle Food Option Courtly vassals have slightly higher opinion gain than others - #Very High Court Amenities can increase it slightly. - - # Courtly Vassal Opinion - every_vassal_or_below = { - vassal_stance = courtly - limit = { - is_participant_in_activity = scope:activity - } - custom = every_courtly_vassal - add_opinion = { - modifier = hosted_feast_opinion - target = root - opinion = feast_opinion_medium_food_value - } - } - # Vassal Opinion - scope:activity = { - every_attending_character = { - limit = { - this != root - trigger_if = { - limit = { - is_vassal_of = root - } - NOT = { has_vassal_stance = courtly } - } - } - custom = custom.every_attending_character_but_courtly - add_opinion = { - target = root - modifier = impressed_opinion - opinion = feast_opinion_medium_food_value - } - } - } - } - } - } - } - else = { - scope:activity = { - add_activity_log_entry = { - key = courses_bad_reward_tt - tags = { completed } - character = scope:root_scope - show_in_conclusion = yes - score = 50 - - # Effects - root = { - # Host Rewards - - #With Low food option the opinion gain with Courtly vassals is always lower than for normal guests. Even if you have very high court amenities (though they do mitigate it a bit). - every_vassal_or_below = { - vassal_stance = courtly - limit = { - is_participant_in_activity = scope:activity - } - custom = every_courtly_vassal - add_opinion = { - modifier = hosted_mediocre_feast_opinion - target = root - opinion = feast_opinion_mediocre_food_value - } - } - - # Vassal Opinion - scope:activity = { - #Other guests - every_attending_character = { - limit = { - this != root - trigger_if = { - limit = { - is_vassal_of = root - } - NOT = { has_vassal_stance = courtly } - } - } - custom = custom.every_attending_character_but_courtly - add_opinion = { - target = root - modifier = impressed_opinion - opinion = feast_opinion_mediocre_food_value - } - } - } - } - } - } - } - - # If you have an Estate, with the relevant upgrade, you get additional opinion - # This does create a duplicate opinion entry in the list of effects, but is easier for script maintenance - if = { - limit = { - scope:host = { - domicile ?= { - has_domicile_parameter = estate_improved_feast_opinion - domicile_location = scope:activity_location - } - } - } - scope:activity = { - add_activity_log_entry = { - key = feast_estate_reward_tt - tags = { completed } - character = scope:root_scope - show_in_conclusion = yes - score = 50 - - root = { - scope:activity = { - every_attending_character = { - limit = { - this != root - } - custom = custom.every_attending_character - add_opinion = { - target = root - modifier = impressed_opinion - opinion = 5 - } - } - } - } - } - } - } - - # Dish complexity - if = { - limit = { - scope:activity = { - has_activity_option = { - category = feast_option_food - option = feast_food_good - } - } - } - scope:activity = { - add_activity_log_entry = { - key = food_good_reward_tt - tags = { completed } - character = scope:root_scope - show_in_conclusion = yes - score = 50 - - # Effects - root = { - # Host Rewards - add_prestige = { - value = 225 - scope:host = { - if = { - limit = { - has_royal_court = yes - has_dlc_feature = royal_court - amenity_level = { target = court_food_quality value >= 5 } - } - multiply = 1.5 - } - multiply = court_brewmaster_multiplier - } - if = { - limit = { - culture = { - has_cultural_parameter = refined_feasts - } - } - add = major_prestige_gain - } - if = { - limit = { - any_character_struggle = { - involvement = involved - has_struggle_phase_parameter = struggle_prestige_from_feast - } - } - add = medium_prestige_gain - } - if = { - limit = { - confederation ?= { has_cohesion_level_parameter = any_member_increased_feast_rewards } - } - multiply = 1.1 - } - } - } - } - } - } - else_if = { - limit = { - scope:activity = { - has_activity_option = { - category = feast_option_food - option = feast_food_normal - } - } - } - scope:activity = { - add_activity_log_entry = { - key = food_normal_reward_tt - tags = { completed } - character = scope:root_scope - show_in_conclusion = yes - score = 50 - - # Effects - root = { - # Host Rewards - add_prestige = { - value = 115 - scope:host = { - if = { - limit = { - scope:host = { - has_royal_court = yes - has_dlc_feature = royal_court - amenity_level = { target = court_food_quality value >= 5 } - } - } - multiply = 2 - } - else_if = { - limit = { - scope:host = { - has_royal_court = yes - has_dlc_feature = royal_court - amenity_level = { target = court_food_quality value >= 3 } - } - } - multiply = 1.5 - } - multiply = court_brewmaster_multiplier - } - - - if = { - limit = { - culture = { - has_cultural_parameter = refined_feasts - } - } - add = major_prestige_gain - } - if = { - limit = { - any_character_struggle = { - involvement = involved - has_struggle_phase_parameter = struggle_prestige_from_feast - } - } - add = medium_prestige_gain - } - if = { - limit = { - confederation ?= { has_cohesion_level_parameter = any_member_increased_feast_rewards } - } - multiply = 1.1 - } - } - } - } - } - } - else = { - scope:activity = { - add_activity_log_entry = { - key = food_bad_reward_tt - tags = { completed } - character = scope:root_scope - show_in_conclusion = yes - score = 50 - - # Effects - root = { - # Host Rewards - add_prestige = { - value = 35 - scope:host = { - if = { - limit = { - scope:host = { - has_royal_court = yes - has_dlc_feature = royal_court - amenity_level = { target = court_food_quality value >= 5 } - } - } - multiply = 2 - } - else_if = { - limit = { - scope:host = { - has_royal_court = yes - has_dlc_feature = royal_court - amenity_level = { target = court_food_quality value >= 3 } - } - } - multiply = 1.5 - } - multiply = court_brewmaster_multiplier - } - - if = { - limit = { - culture = { - has_cultural_parameter = refined_feasts - } - } - add = major_prestige_gain - } - if = { - limit = { - any_character_struggle = { - involvement = involved - has_struggle_phase_parameter = struggle_prestige_from_feast - } - } - add = medium_prestige_gain - } - if = { - limit = { - confederation ?= { has_cohesion_level_parameter = any_member_increased_feast_rewards } - } - multiply = 1.1 - } - } - } - } - } - } - - # Estate Unlock: Wine Selection - if = { - limit = { - scope:activity = { - has_activity_option = { - category = feast_option_wine - option = feast_wine_extensive - } - } - } - scope:activity = { - add_activity_log_entry = { - key = wine_extensive_reward_tt - tags = { completed } - character = scope:root_scope - show_in_conclusion = yes - score = 50 - - # Effects - root = { - change_influence = { - value = 15 - - scope:activity = { - every_attending_character = { - limit = { - NOR = { - this = root - is_courtier_of = root # Guest shouldn't originate from you own court - } - } - add = 15 - } - } - scope:host = { multiply = court_brewmaster_multiplier } - if = { - limit = { - domicile ?= { has_domicile_parameter = estate_improved_wine_cellar_3 } - } - multiply = { - value = 1 - add = estate_improved_wine_cellar_3_value - } - } - else_if = { - limit = { - domicile ?= { has_domicile_parameter = estate_improved_wine_cellar_2 } - } - multiply = { - value = 1 - add = estate_improved_wine_cellar_2_value - } - } - else_if = { - limit = { - domicile ?= { has_domicile_parameter = estate_improved_wine_cellar_1 } - } - multiply = { - value = 1 - add = estate_improved_wine_cellar_1_value - } - } - } - } - } - } - } - else_if = { - limit = { - scope:activity = { - has_activity_option = { - category = feast_option_wine - option = feast_wine_normal - } - } - } - scope:activity = { - add_activity_log_entry = { - key = wine_normal_reward_tt - tags = { completed } - character = scope:root_scope - show_in_conclusion = yes - score = 50 - - # Effects - root = { - change_influence = { - value = 10 - - scope:activity = { - every_attending_character = { - limit = { - NOR = { - this = root - is_courtier_of = root # Guest shouldn't originate from you own court - } - } - add = 10 - } - } - scope:host = { multiply = court_brewmaster_multiplier } - if = { - limit = { - domicile ?= { has_domicile_parameter = estate_improved_wine_cellar_3 } - } - multiply = { - value = 1 - add = estate_improved_wine_cellar_3_value - } - } - else_if = { - limit = { - domicile ?= { has_domicile_parameter = estate_improved_wine_cellar_2 } - } - multiply = { - value = 1 - add = estate_improved_wine_cellar_2_value - } - } - else_if = { - limit = { - domicile ?= { has_domicile_parameter = estate_improved_wine_cellar_1 } - } - multiply = { - value = 1 - add = estate_improved_wine_cellar_1_value - } - } - } - } - } - } - } - else_if = { - limit = { - scope:activity = { - has_activity_option = { - category = feast_option_wine - option = feast_wine_limited - } - } - } - scope:activity = { - add_activity_log_entry = { - key = wine_limited_reward_tt - tags = { completed } - character = scope:root_scope - show_in_conclusion = yes - score = 50 - - # Effects - root = { - change_influence = { - value = 5 - - scope:activity = { - every_attending_character = { - limit = { - NOR = { - this = root - is_courtier_of = root # Guest shouldn't originate from you own court - } - } - add = 5 - } - } - scope:host = { multiply = court_brewmaster_multiplier } - if = { - limit = { - domicile ?= { has_domicile_parameter = estate_improved_wine_cellar_3 } - } - multiply = { - value = 1 - add = estate_improved_wine_cellar_3_value - } - } - else_if = { - limit = { - domicile ?= { has_domicile_parameter = estate_improved_wine_cellar_2 } - } - multiply = { - value = 1 - add = estate_improved_wine_cellar_2_value - } - } - else_if = { - limit = { - domicile ?= { has_domicile_parameter = estate_improved_wine_cellar_1 } - } - multiply = { - value = 1 - add = estate_improved_wine_cellar_1_value - } - } - } - } - } - } - } - - # We give you the regular rewards - hosted_successful_feast_new_effect = yes - # We give out the Reveler trait/xp - disburse_feast_reveler_rewards = yes - #Accolade glory gain - accolades_activity_complete_feast_glory_effect = yes - #Stress loss - if = { - limit = { - OR = { - has_trait = shy - has_trait = reclusive - } - } - custom_tooltip = host_feast_decision_desc_shy - } - else = { - if = { - limit = { - has_royal_court = yes - has_dlc_feature = royal_court - amenity_level = { target = court_food_quality value >= 5 } - } - stress_impact = { - base = exotic_feast_stress_loss_value - gluttonous = feast_stress_loss_value - gregarious = feast_stress_loss_value - lifestyle_reveler = feast_stress_loss_value - drunkard = feast_stress_loss_value - comfort_eater = feast_stress_loss_value - generous = feast_stress_loss_value - greedy = activity_stress_gain_impact - } - } - else_if = { - limit = { - has_royal_court = yes - has_dlc_feature = royal_court - amenity_level = { target = court_food_quality value >= 4 } - } - stress_impact = { - base = lavish_feast_stress_loss_value - gluttonous = feast_stress_loss_value - gregarious = feast_stress_loss_value - lifestyle_reveler = feast_stress_loss_value - drunkard = feast_stress_loss_value - comfort_eater = feast_stress_loss_value - generous = feast_stress_loss_value - greedy = activity_stress_gain_impact - } - } - else_if = { - limit = { - has_royal_court = yes - has_dlc_feature = royal_court - amenity_level = { target = court_food_quality value >= 3 } - } - stress_impact = { - base = medium_feast_stress_loss_value - gluttonous = feast_stress_loss_value - gregarious = feast_stress_loss_value - lifestyle_reveler = feast_stress_loss_value - drunkard = feast_stress_loss_value - comfort_eater = feast_stress_loss_value - generous = feast_stress_loss_value - greedy = activity_stress_gain_impact - } - } - else_if = { - limit = { - has_royal_court = yes - has_dlc_feature = royal_court - amenity_level = { target = court_food_quality value <= 1 } - } - stress_impact = { - base = meager_feast_stress_loss_value - gluttonous = feast_stress_loss_value - gregarious = feast_stress_loss_value - lifestyle_reveler = feast_stress_loss_value - drunkard = feast_stress_loss_value - comfort_eater = feast_stress_loss_value - generous = feast_stress_loss_value - greedy = activity_stress_gain_impact - } - } - else = { - stress_impact = { - base = feast_stress_loss_value - gluttonous = activity_stress_loss_impact - gregarious = activity_stress_loss_impact - lifestyle_reveler = feast_stress_loss_value - drunkard = activity_stress_loss_impact - comfort_eater = activity_stress_loss_impact - generous = activity_stress_loss_impact - greedy = activity_stress_gain_impact - } - } - } - - # Remove strife if relevant. - remove_strife_per_invited_powerful_vassal_effect = yes -} - -disburse_murder_feast_activity_rewards = { - if = { - limit = { - has_variable = murder_feast_liege_var - } - scope:activity = { - add_activity_log_entry = { - key = murder_feast_liege_kill_tt - tags = { completed } - character = scope:root_scope - show_in_conclusion = yes - score = 50 - - root = { - add_prestige_level = -2 - } - } - } - } - if = { - limit = { - has_variable = murder_feast_head_of_faith_var - } - scope:activity = { - add_activity_log_entry = { - key = murder_feast_hof_kill_tt - tags = { completed } - character = scope:root_scope - show_in_conclusion = yes - score = 50 - - root = { - add_piety_level = -2 - } - } - } - } - if = { - limit = { - faith = { #if this is a religious thing, people don't really love it - has_doctrine = tenet_ritual_celebrations - } - } - add_piety = medium_piety_loss - } - if = { - limit = { has_variable = murder_feast_entourage_murder_var } #you've killed EVERYONE - scope:activity = { - add_activity_log_entry = { - key = murder_feast_entourage_kill_tt - tags = { completed } - character = scope:root_scope - show_in_conclusion = yes - score = 50 - - root = { - add_dread = 35 - add_legitimacy = major_legitimacy_loss - add_character_modifier = { - modifier = murder_feast_great_murderer_modifier - years = 15 - } - } - } - # # Guest Opinion - every_attending_character = { - limit = { - NOR = { - has_trait = torturer - has_trait = sadistic - has_trait = vengeful - has_trait = callous - } - } - custom = feast_every_guest - add_opinion = { - modifier = suspicion_opinion - target = scope:host - opinion = -10 - } - } - } - } - else = { #Rewards for a "normal" feast - if = { #if you failed your attempt it doesn't look great - limit = { has_variable = murder_feast_murder_failure_var } - scope:activity = { - add_activity_log_entry = { - key = murder_feast_failed_tt - tags = { completed } - character = scope:root_scope - show_in_conclusion = yes - score = 50 - - root = { - add_prestige = minor_prestige_loss - add_legitimacy = minor_legitimacy_loss - } - } - } - } - else_if = { #if you've killed your target you get these - limit = { NOT = { has_variable = murder_feast_murder_failure_var } } - scope:activity = { - add_activity_log_entry = { - key = murder_feast_solo_kill_tt - tags = { completed } - character = scope:root_scope - show_in_conclusion = yes - score = 50 - - root = { - add_dread = 25 - add_legitimacy = medium_legitimacy_loss - add_character_modifier = { - modifier = murder_feast_murderer_modifier - years = 10 - } - } - } - # # Guest Opinion - every_attending_character = { - limit = { - NOR = { - has_trait = torturer - has_trait = sadistic - has_trait = vengeful - has_trait = callous - } - } - custom = feast_every_guest - add_opinion = { - modifier = suspicion_opinion - target = scope:host - opinion = -5 - } - } - } - } - # Rewards based on Activity Options - # Smaller than regular feasts for reasons apparent - - # Number of courses - if = { - limit = { - scope:activity = { - has_activity_option = { - category = feast_option_courses - option = feast_courses_good - } - } - } - custom_tooltip = courses_good_reward_tt - scope:activity = { - add_activity_log_entry = { - key = courses_good_reward_tt - tags = { completed } - character = scope:root_scope - show_in_conclusion = yes - score = 50 - - # Effects - root = { - # Host Rewards - - # Courtly Vassal Opinion - every_vassal_or_below = { - vassal_stance = courtly - limit = { - is_participant_in_activity = scope:activity - } - custom = every_courtly_vassal - add_opinion = { - modifier = hosted_feast_opinion - target = root - opinion = 15 - } - } - # Vassal Opinion - scope:activity = { - every_attending_character = { - limit = { this != root } - custom = custom.every_attending_character - add_opinion = { - target = root - modifier = impressed_opinion - opinion = 10 - } - } - } - } - } - } - } - else_if = { - limit = { - scope:activity = { - has_activity_option = { - category = feast_option_courses - option = feast_courses_normal - } - } - } - custom_tooltip = courses_normal_reward_tt - scope:activity = { - add_activity_log_entry = { - key = courses_normal_reward_tt - tags = { completed } - character = scope:root_scope - show_in_conclusion = yes - score = 50 - - # Effects - root = { - # Host Rewards - - # Courtly Vassal Opinion - every_vassal_or_below = { - vassal_stance = courtly - limit = { - is_participant_in_activity = scope:activity - } - custom = every_courtly_vassal - add_opinion = { - modifier = hosted_feast_opinion - target = root - opinion = 5 - } - } - # Vassal Opinion - scope:activity = { - every_attending_character = { - limit = { this != root } - custom = custom.every_attending_character - add_opinion = { - target = root - modifier = impressed_opinion - opinion = 5 - } - } - } - } - } - } - } - - # Dish complexity - if = { - limit = { - scope:activity = { - has_activity_option = { - category = feast_option_food - option = feast_food_good - } - } - } - custom_tooltip = food_good_reward_tt - scope:activity = { - add_activity_log_entry = { - key = food_good_reward_tt - tags = { completed } - character = scope:root_scope - show_in_conclusion = yes - score = 50 - - # Effects - root = { - # Host Rewards - add_prestige = 100 - } - } - } - } - else_if = { - limit = { - scope:activity = { - has_activity_option = { - category = feast_option_food - option = feast_food_normal - } - } - } - custom_tooltip = food_normal_reward_tt - scope:activity = { - add_activity_log_entry = { - key = food_normal_reward_tt - tags = { completed } - character = scope:root_scope - show_in_conclusion = yes - score = 50 - - # Effects - root = { - # Host Rewards - add_prestige = 50 - } - } - } - } - } - # Stress loss according to traits in the ending event - - #Accolade glory gain - accolades_activity_complete_feast_glory_effect = yes -} - -disburse_activity_stress_loss = { - stress_impact = { - base = medium_stress_impact_loss - shy = minor_stress_impact_gain - reclusive = minor_stress_impact_gain - } -} - -disburse_feast_reveler_rewards = { - if = { - limit = { - has_trait = lifestyle_reveler - scope:activity = { - has_activity_option = { - category = feast_option_courses - option = feast_courses_good - } - } - scope:activity = { - has_activity_option = { - category = feast_option_food - option = feast_food_good - } - } - } - add_trait_xp = { - trait = lifestyle_reveler - value = 15 - } - } - else_if = { - limit = { - has_trait = lifestyle_reveler - scope:activity = { - has_activity_option = { - category = feast_option_food - option = feast_food_good - } - } - } - add_trait_xp = { - trait = lifestyle_reveler - value = 10 - } - } - else_if = { - limit = { - has_trait = lifestyle_reveler - scope:activity = { - has_activity_option = { - category = feast_option_courses - option = feast_courses_good - } - } - } - add_trait_xp = { - trait = lifestyle_reveler - value = 10 - } - } - else_if = { - limit = { has_trait = lifestyle_reveler } - add_trait_xp = { - trait = lifestyle_reveler - value = 5 - } - } - else = { #progress towards reveler - custom_tooltip = { - text = progress_towards_reveler_tt - reveler_points_gain_effect = { - CHANGE = 1 - RANDOM_CHANGE = 1 - } - } - } - # LEGITIMACY GAIN FOR STANDARD ACTIVITY PARTICIPATION - FEAST - standard_activity_participation_legitimacy_effect = yes -} - - -########################## -# ACTIVITY WAR HANDLING -# by Chad Uhl -########################## - -# Called in the war_on_actions.txt file -# Used to send out the correct events if a character becomes involved in a war while attending an activity -activity_on_war_declared_events_effect = { - trigger_event = religious_decision.0200 # Stop mediation in its tracks - if = { - limit = { - this.involved_activity ?= { - is_activity_complete = no - } - } - this.involved_activity ?= { - save_scope_as = target_activity - activity_type = { save_scope_as = target_activity_type } - activity_host = { save_scope_as = target_activity_host } - } - if = { # Send one event if you're the host - limit = { - exists = this.involved_activity - this = this.involved_activity.activity_host - } - # This event fires follow-up events for the guests depending on the character's choice - trigger_event = activity_system.0300 - } - else_if = { # Send another if you're just a guest - limit = { - exists = this.involved_activity - NOT = { - any_war_enemy = { this = scope:target_activity_host } - } - } - trigger_event = activity_system.0310 - } - else_if = { # Just go home if you're at war with host - limit = { - exists = this.involved_activity - any_war_enemy = { this = scope:target_activity_host } - } - send_interface_toast = { - type = event_toast_effect_bad - left_icon = scope:target_activity_host - title = at_war_difficulty #"At war" - current_travel_plan = { - if = { - limit = { can_cancel = yes } - cancel_travel_plan = yes - } - } - } - - } - } -} - -####################### -# ACTIVITY SETUP -# by Filippa Gannholm Kirsten -####################### - -#Set this in the on_start of your activity (note - NOT the PHASE on_start, but your ACTIVITY on_start) -activity_setup_special_type_progression_effect = { - set_variable = { - name = activity_special_type_progression - value = 0 - } -} - -####################### -# ACTIVITY SPECIAL TYPE PROGRESSION -# by Filippa Gannholm Kirsten -####################### - -activity_special_type_progression_variable = { - if = { - limit = { exists = var:activity_special_type_progression } - change_variable = { - name = activity_special_type_progression - add = $NUM$ - } - } -} - -activity_special_type_progression_miniscule = { - if = { - limit = { exists = var:activity_special_type_progression } - change_variable = { - name = activity_special_type_progression - add = 1 - } - } -} - -activity_special_type_progression_tiny = { - if = { - limit = { exists = var:activity_special_type_progression } - change_variable = { - name = activity_special_type_progression - add = 3 - } - } -} - -activity_special_type_progression_medium = { - if = { - limit = { exists = var:activity_special_type_progression } - change_variable = { - name = activity_special_type_progression - add = 5 - } - } -} - -activity_special_type_progression_major = { - if = { - limit = { exists = var:activity_special_type_progression } - change_variable = { - name = activity_special_type_progression - add = 10 - } - } -} - -activity_special_type_progression_huge = { - if = { - limit = { exists = var:activity_special_type_progression } - change_variable = { - name = activity_special_type_progression - add = 20 - } - } -} - -activity_special_type_progression_massive = { - if = { - limit = { exists = var:activity_special_type_progression } - change_variable = { - name = activity_special_type_progression - add = 40 - } - } -} - -activity_special_type_progression_negative_tiny = { - if = { - limit = { exists = var:activity_special_type_progression } - change_variable = { - name = activity_special_type_progression - add = -3 - } - } -} - -activity_special_type_progression_negative = { - if = { - limit = { exists = var:activity_special_type_progression } - change_variable = { - name = activity_special_type_progression - add = -5 - } - } -} - -activity_special_type_progression_negative_major = { - if = { - limit = { exists = var:activity_special_type_progression } - change_variable = { - name = activity_special_type_progression - add = -10 - } - } -} - -activity_special_type_progression_negative_huge = { - if = { - limit = { exists = var:activity_special_type_progression } - change_variable = { - name = activity_special_type_progression - add = -25 - } - } -} - -####################### -# ACTIVITY ADD CHARACTER TO EVERYTHING -# by Arkadiusz Majewski -####################### - -add_to_court_and_entourage_effect = { - root = { - add_courtier = prev - } - if = { - limit = { exists = root.current_travel_plan } - root.current_travel_plan = { add_companion = prev } - } - if = { - limit = { exists = scope:activity } - add_to_activity = scope:activity - } -} - -add_to_court_and_entourage_only_effect = { - root = { - add_courtier = prev - } - hidden_effect = { - if = { - limit = { exists = root.current_travel_plan } - root.current_travel_plan = { add_companion = prev } - } - } -} - - - -#The following effects take the CHAR_TO_ADD and NEW_COURT_OWNER scopes, determining if the CHAR_TO_ADD is a pool character since the add_companion automatically adds pool characters as a courtier, whereas if CHAR_TO_ADD is not a pool character, it does not. -# "X joins your Court" -add_to_entourage_court_and_activity_effect = { - #If the character is a pool character - $NEW_COURT_OWNER$ = { - if = { - limit = { - #Pool characters get automatically added as courtiers - $CHAR_TO_ADD$ = { is_pool_character = yes } - } - show_as_tooltip = { add_courtier = $CHAR_TO_ADD$ } #This already happens with add_companion - hidden_effect = { # This must go above activity effect, or they will try and make their own travel plan! - if = { - limit = { $CHAR_TO_ADD$ = { NOT = { exists = current_travel_plan } } } - $NEW_COURT_OWNER$.current_travel_plan ?= { add_companion = $CHAR_TO_ADD$ } - } - } - if = { - limit = { exists = involved_activity } - $CHAR_TO_ADD$ = { add_to_activity = $NEW_COURT_OWNER$.involved_activity } - } - } - #If the character is NOT a pool character - else = { - if = { - limit = { - $CHAR_TO_ADD$ = { - NOT = { is_courtier_of = $NEW_COURT_OWNER$ } - } - } - add_courtier = $CHAR_TO_ADD$ - } - hidden_effect = { # This must go above activity effect, or they will try and make their own travel plan! - if = { - limit = { $CHAR_TO_ADD$ = { NOT = { exists = current_travel_plan } } } - $NEW_COURT_OWNER$.current_travel_plan ?= { add_companion = $CHAR_TO_ADD$ } - } - } - if = { - limit = { - exists = involved_activity - $CHAR_TO_ADD$ = { can_join_activity = $NEW_COURT_OWNER$.involved_activity } - } - $CHAR_TO_ADD$ = { add_to_activity = $NEW_COURT_OWNER$.involved_activity } - } - } - } -} - -# "You recruit X to your Court" -recruit_to_entourage_court_and_activity_effect = { - #If the character is a pool character - $NEW_COURT_OWNER$ = { - if = { - limit = { - #Pool characters get automatically added as courtiers - $CHAR_TO_ADD$ = { is_pool_character = yes } - } - show_as_tooltip = { add_courtier = $CHAR_TO_ADD$ } #This already happens with add_companion - hidden_effect = { # This must go above activity effect, or they will try and make their own travel plan! - if = { - limit = { $CHAR_TO_ADD$ = { NOT = { exists = current_travel_plan } } } - current_travel_plan ?= { add_companion = $CHAR_TO_ADD$ } - } - } - if = { - limit = { exists = involved_activity } - $CHAR_TO_ADD$ = { add_to_activity = $NEW_COURT_OWNER$.involved_activity } - } - } - #If the character is NOT a pool character - else = { - if = { - limit = { - $CHAR_TO_ADD$ = { - NOT = { is_courtier_of = $NEW_COURT_OWNER$ } - } - } - add_courtier = $CHAR_TO_ADD$ - } - hidden_effect = { # This must go above activity effect, or they will try and make their own travel plan! - if = { - limit = { $CHAR_TO_ADD$ = { NOT = { exists = current_travel_plan } } } - current_travel_plan ?= { add_companion = $CHAR_TO_ADD$ } - } - } - if = { - limit = { exists = involved_activity } - $CHAR_TO_ADD$ = { add_to_activity = $NEW_COURT_OWNER$.involved_activity } - } - } - } -} - -add_to_entourage_but_not_court_effect = { - #If the character is a pool character - $NEW_COURT_OWNER$ = { - if = { - limit = { - exists = capital_province - $CHAR_TO_ADD$ = { is_pool_character = yes } - } - current_travel_plan ?= { add_companion = $CHAR_TO_ADD$ } - $CHAR_TO_ADD$ = { - hidden_effect = { move_to_pool_at = $NEW_COURT_OWNER$.capital_province } - } - } - #If the character is NOT a pool character - else = { - if = { - limit = { $CHAR_TO_ADD$ = { NOT = { exists = current_travel_plan } } } - current_travel_plan ?= { add_companion = $CHAR_TO_ADD$ } - } - } - } -} - -add_to_entourage_and_activity_but_not_court_effect = { - #If the character is a pool character - $NEW_COURT_OWNER$ = { - if = { - limit = { - exists = capital_province - $CHAR_TO_ADD$ = { is_pool_character = yes } - } - hidden_effect = { # This must go above activity effect, or they will try and make their own travel plan! - if = { - limit = { $CHAR_TO_ADD$ = { NOT = { exists = current_travel_plan } } } - current_travel_plan ?= { add_companion = $CHAR_TO_ADD$ } - } - } - $CHAR_TO_ADD$ = { - hidden_effect = { move_to_pool_at = $NEW_COURT_OWNER$.capital_province } - if = { - limit = { exists = $NEW_COURT_OWNER$.involved_activity } - add_to_activity = $NEW_COURT_OWNER$.involved_activity - } - } - - } - #If the character is NOT a pool character - else = { - if = { # This must go above activity effect, or they will try and make their own travel plan! - limit = { $CHAR_TO_ADD$ = { NOT = { exists = current_travel_plan } } } - current_travel_plan ?= { add_companion = $CHAR_TO_ADD$ } - } - if = { - limit = { exists = $NEW_COURT_OWNER$.involved_activity } - $CHAR_TO_ADD$ = { add_to_activity = $NEW_COURT_OWNER$.involved_activity } - } - } - } -} - -host_has_taken_freebie_activity_effect = { - if = { - limit = { - this = scope:host - dynasty ?= { has_dynasty_perk = ep2_activities_legacy_5 } - this = house.house_head - } - set_variable = { - name = ep2_activities_legacy_5_had_freebie - value = yes - } - } -} - -invalidation_incapable_effect = { - if = { - limit = { - scope:host = { is_incapable = yes } - scope:activity = { NOT = { has_variable = invalidation_effect_set } } - } - scope:activity = { - set_variable = { name = invalidation_effect_set } - activity_type = { save_scope_as = activity_type } - } - scope:host = { - trigger_event = activity_system.0330 - } - every_attending_character = { - limit = { this != scope:host } - trigger_event = activity_system.0331 - } - } -} - -invalidation_unlanded_effect = { - if = { - limit = { - scope:host = { is_landed = no } - scope:activity = { NOT = { has_variable = invalidation_effect_set } } - } - scope:activity = { - set_variable = { name = invalidation_effect_set } - activity_type = { save_scope_as = activity_type } - } - every_attending_character = { - trigger_event = activity_system.0320 - } - } -} - -invalidation_host_death_effect = { - scope:activity = { - set_variable = { name = invalidation_effect_set } - activity_type = { save_scope_as = activity_type } - } - every_attending_character = { - limit = { is_alive = yes } - trigger_event = { - id = activity_system.0500 - days = 1 # So you don't get spammed - } - } -} - -invalidation_imprisoned_effect = { - if = { - limit = { - scope:host = { is_imprisoned = yes } - scope:activity = { NOT = { has_variable = invalidation_effect_set } } - } - scope:activity = { - set_variable = { name = invalidation_effect_set } - activity_type = { save_scope_as = activity_type } - } - scope:host = { trigger_event = activity_system.0550 } - every_attending_character = { trigger_event = activity_system.0551 } - } -} diff --git a/N3OW/common/scripted_effects/00_administrative_effects.txt b/N3OW/common/scripted_effects/00_administrative_effects.txt deleted file mode 100644 index 28c6b047..00000000 --- a/N3OW/common/scripted_effects/00_administrative_effects.txt +++ /dev/null @@ -1,522 +0,0 @@ - -change_to_administrative_hereditary_effect = { - scope:recipient = { - save_scope_as = petition_vassal - every_held_title = { - limit = { - tier = scope:petition_vassal.highest_held_title_tier - is_landless_type_title = no - is_noble_family_title = no - } - custom_tooltip = { - text = petition_liege_house_governorship_rights_tt - set_variable = { - name = petition_house_rights - value = scope:petition_vassal.house - years = 100 - } - } - } - } -} - -change_to_administrative_effect = { - save_scope_as = governor - top_liege = { save_scope_as = governor_liege } - # Set the correct government - if = { - limit = { - OR = { - NOT = { government_allows = administrative } - AND = { - government_allows = administrative - scope:governor_liege = { government_has_flag = government_is_japan_administrative } - NOT = { government_has_flag = government_is_japan_administrative } - } - AND = { - government_allows = administrative - scope:governor_liege = { government_has_flag = government_is_meritocratic } - NOT = { government_has_flag = government_is_meritocratic } - } - AND = { - government_allows = administrative - scope:governor_liege = { government_has_flag = government_is_celestial } - NOT = { government_has_flag = government_is_celestial } - } - AND = { - government_allows = administrative - scope:governor_liege = { government_has_flag = government_is_steppe_admin } - NOT = { government_has_flag = government_is_steppe_admin } - } - } - } - # Only case where Estate type is shared between Admin and non-Admin - if = { - limit = { - NAND = { - government_has_flag = government_is_japan_feudal - scope:governor_liege = { government_has_flag = government_is_japan_administrative } - } - } - save_scope_as = new_admin - } - # If we are greek, let's ensure we become administrative - if = { - limit = { - NOT = { exists = scope:has_selected_a_government } - top_liege = { - OR = { - culture = culture:greek - culture = { - any_parent_culture_or_above = { this = culture:greek } - } - } - } - } - save_scope_value_as = { - name = has_selected_a_government - value = flag:administrative - } - } - # Change government - # We first check if you have a selected government, then if you are independent, then what your liege has - if = { # Ritsuryo - limit = { - trigger_if = { - limit = { - exists = scope:has_selected_a_government - } - scope:has_selected_a_government = flag:japan_administrative - } - trigger_else_if = { - limit = { - top_liege = this - } - has_tgp_dlc_trigger = yes - tgp_can_become_japan_administrative_trigger = yes - } - trigger_else = { - scope:governor_liege = { government_has_flag = government_is_japan_administrative } - } - } - tgp_domicile_conversion_when_changing_government_type = { - NEW_DOMICILE_TYPE = japanese_manor - NEW_GOVERNMENT_TYPE = japan_administrative_government - } - change_government = japan_administrative_government - } - else_if = { # Celestial - limit = { - trigger_if = { - limit = { - exists = scope:has_selected_a_government - } - scope:has_selected_a_government = flag:celestial - } - trigger_else_if = { - limit = { - top_liege = this - } - has_tgp_dlc_trigger = yes - OR = { - tgp_can_become_celestial_trigger = yes - #This is Mongol breakup and they are hegemon - AND = { - exists = scope:great_yuan_ruler - this = scope:great_yuan_ruler - primary_title = title:h_china - } - } - } - trigger_else = { - scope:governor_liege = { government_has_flag = government_is_celestial } - } - } - capital_province = { - if = { - limit = { - OR = { - has_holding_type = tribal_holding - has_holding_type = herder_holding - has_holding_type = nomad_holding - } - } - set_holding_type = castle_holding - } - } - tgp_domicile_conversion_when_changing_government_type = { - NEW_DOMICILE_TYPE = east_asian_estate - NEW_GOVERNMENT_TYPE = celestial_government - } - change_government = celestial_government - } - else_if = { # Meritocratic Khanate - limit = { - trigger_if = { - limit = { - exists = scope:has_selected_a_government - } - # There's a separate decision to go from Nomad to Meritocratic Khanate, so you cannot pick it from here - always = no - } - trigger_else = { - scope:governor_liege = { government_has_flag = government_is_steppe_admin } - } - } - capital_province = { - if = { - limit = { - OR = { - has_holding_type = tribal_holding - has_holding_type = herder_holding - has_holding_type = nomad_holding - } - } - set_holding_type = castle_holding - } - } - tgp_domicile_conversion_when_changing_government_type = { - NEW_DOMICILE_TYPE = east_asian_estate - NEW_GOVERNMENT_TYPE = steppe_admin_government - } - change_government = steppe_admin_government - } - else_if = { # Meritocratic - limit = { - trigger_if = { - limit = { - exists = scope:has_selected_a_government - } - scope:has_selected_a_government = flag:meritocratic - } - trigger_else_if = { - limit = { - top_liege = this - } - has_tgp_dlc_trigger = yes - tgp_should_become_meritocratic_trigger = yes - } - trigger_else = { - scope:governor_liege = { government_has_flag = government_is_meritocratic } - } - } - capital_province = { - if = { - limit = { - OR = { - has_holding_type = tribal_holding - has_holding_type = herder_holding - has_holding_type = nomad_holding - } - } - set_holding_type = castle_holding - } - } - tgp_domicile_conversion_when_changing_government_type = { - NEW_DOMICILE_TYPE = east_asian_estate - NEW_GOVERNMENT_TYPE = meritocratic_government - } - change_government = meritocratic_government - } - else = { # Administrative - capital_province = { - if = { - limit = { - OR = { - has_holding_type = tribal_holding - has_holding_type = herder_holding - has_holding_type = nomad_holding - } - } - set_holding_type = castle_holding - } - } - add_character_flag = new_government_is_byz_admin - tgp_domicile_conversion_when_changing_government_type = { - NEW_DOMICILE_TYPE = estate - NEW_GOVERNMENT_TYPE = administrative_government - } - change_government = administrative_government - remove_character_flag = new_government_is_byz_admin - } - } - # Set up a noble family title - if = { - limit = { - primary_title.tier >= min_appointment_tier - liege = { - scope:governor_liege = this - government_allows = administrative - } - house.house_head = { - top_liege = scope:governor_liege - NOT = { - any_held_title = { is_noble_family_title = yes } - } - } - } - create_noble_family_effect = { GOVERNMENT_GIVER = top_liege } - } - # Add the governor trait if applicable - hidden_effect = { - if = { - limit = { - is_governor = yes - NOT = { has_trait = governor } - } - add_trait = governor - } - } - # Set up the domicile - if = { - limit = { - exists = scope:new_admin - exists = domicile - } - domicile ?= { - set_up_domicile_estate_effect = yes - } - } - if = { - limit = { - has_treasury = yes - } - add_treasury = { - value = gold - min = 100 - } - } -} - -change_to_administrative_interaction_effect = { - scope:actor = { - if = { - limit = { has_treasury = yes } - pay_short_term_treasury = { - target = scope:recipient - treasury = { - value = 50 - scope:recipient = { - if = { - limit = { highest_held_title_tier >= tier_kingdom } - multiply = 10 - } - else_if = { - limit = { highest_held_title_tier >= tier_duchy } - multiply = 6 - } - else_if = { - limit = { highest_held_title_tier >= tier_county } - multiply = 3 - } - } - if = { - limit = { scope:gold ?= yes } - add = scope:actor.medium_gold_value - } - if = { - limit = { - scope:actor = { has_realm_law_flag = admin_change_vassal_gov_cheaper } - } - multiply = 0.5 - } - } - } - } - else = { - pay_short_term_gold = { - target = scope:recipient - gold = { - value = 50 - scope:recipient = { - if = { - limit = { highest_held_title_tier >= tier_kingdom } - multiply = 10 - } - else_if = { - limit = { highest_held_title_tier >= tier_duchy } - multiply = 6 - } - else_if = { - limit = { highest_held_title_tier >= tier_county } - multiply = 3 - } - } - if = { - limit = { scope:gold ?= yes } - add = scope:actor.medium_gold_value - } - if = { - limit = { - scope:actor = { has_realm_law_flag = admin_change_vassal_gov_cheaper } - } - multiply = 0.5 - } - } - } - } - } - scope:recipient = { - change_to_administrative_effect = yes - - #And now we also convert all the administrative vassals below so they also match the actor's form of admin. - #For non admin sub-vassals the newly converted main vassal can still ask using the same interaction but we - hidden_effect = { - every_vassal_or_below = { - limit = { - government_allows = administrative - is_ai = yes #Humans get to be asked directly - } - change_to_administrative_effect = yes - } - } - } - if = { - limit = { - scope:hook = yes - scope:actor = { has_usable_hook = scope:recipient } - } - scope:actor = { use_hook = scope:recipient } - } - if = { - limit = { scope:hereditary = yes } - scope:recipient = { save_scope_as = petition_vassal } - change_to_administrative_hereditary_effect = yes - } - if = { - limit = { scope:influence = yes } - scope:actor = { - change_influence = { - value = massive_influence_loss - } - } - } -} - -set_up_domicile_estate_effect = { - if = { - limit = { is_domicile_type = estate } - # Intentionally one level lower than what you can get - if = { - limit = { - NOT = { has_domicile_building_or_higher = estate_main_02 } - owner.culture ?= { has_innovation = innovation_city_planning } - } - add_domicile_building = estate_main_02 - } - if = { - limit = { - has_domicile_building = estate_main_02 - NOT = { has_domicile_building_or_higher = estate_main_03 } - owner.culture ?= { has_innovation = innovation_manorialism } - } - add_domicile_building = estate_main_03 - } - hidden_effect = { - switch = { - trigger = has_domicile_building - estate_main_03 = { - while = { - count = 2 - add_random_internal_estate_building = yes - } - } - estate_main_02 = { - add_random_internal_estate_building = yes - } - } - } - fill_external_estate_building_effect = yes - } - else_if = { - limit = { is_domicile_type = japanese_manor } - # Intentionally one level lower than what you can get - if = { - limit = { - NOT = { has_domicile_building_or_higher = japanese_manor_main_02 } - owner.culture ?= { has_innovation = innovation_city_planning } - } - add_domicile_building = japanese_manor_main_02 - } - if = { - limit = { - has_domicile_building = japanese_manor_main_02 - NOT = { has_domicile_building_or_higher = japanese_manor_main_03 } - owner.culture ?= { has_innovation = innovation_manorialism } - } - add_domicile_building = japanese_manor_main_03 - } - hidden_effect = { - switch = { - trigger = has_domicile_building - japanese_manor_main_03 = { - while = { - count = 2 - add_random_internal_japanese_manor_building = yes - } - } - japanese_manor_main_02 = { - add_random_internal_japanese_manor_building = yes - } - } - } - fill_external_japanese_manor_building_effect = yes - } - else_if = { - limit = { is_domicile_type = east_asian_estate } - # Intentionally one level lower than what you can get - if = { - limit = { - NOT = { has_domicile_building_or_higher = east_asian_estate_main_02 } - owner.culture ?= { has_innovation = innovation_city_planning } - } - add_domicile_building = east_asian_estate_main_02 - } - if = { - limit = { - has_domicile_building = east_asian_estate_main_02 - NOT = { has_domicile_building_or_higher = east_asian_estate_main_03 } - owner.culture ?= { has_innovation = innovation_manorialism } - } - add_domicile_building = east_asian_estate_main_03 - } - hidden_effect = { - switch = { - trigger = has_domicile_building - east_asian_estate_main_03 = { - while = { - count = 2 - add_random_internal_east_asian_estate_building = yes - } - } - east_asian_estate_main_02 = { - add_random_internal_east_asian_estate_building = yes - } - } - } - fill_external_east_asian_estate_building_effect = yes - } -} - -noble_family_title_realm_setup_effect = { - save_scope_as = top_liege - every_noble_family = { - save_scope_as = nf_title - holder ?= { - save_scope_as = nf_holder - house ?= { - save_scope_as = nf_house - # Ensure holders of historical noble family titles are the default house heads - if = { - limit = { house_head != scope:nf_holder } - set_house_head = scope:nf_holder - } - } - } - scope:nf_title = { - set_color_from_title = scope:nf_holder.capital_county - # Ensure Noble Family CoA match House - set_coa = scope:nf_house - } - } -} diff --git a/N3OW/common/scripted_effects/00_adultery_effects.txt b/N3OW/common/scripted_effects/00_adultery_effects.txt deleted file mode 100644 index 29848f1a..00000000 --- a/N3OW/common/scripted_effects/00_adultery_effects.txt +++ /dev/null @@ -1,653 +0,0 @@ - -##################################################################### -# EFFECT LIST -##################################################################### -# !!! Remember to add all new effects with a short description here !!! - - - - -#### Extramaritial sex effects: applies adultery/fornicator traits, opionions and informs spouse. Needs SPOUSE_EVENT = yes/no -# extramarital_sex_attempt_exposure_consequences_with_target_effect - for failed sex attempts, spouse does not dislike target -# extramarital_sex_exposure_consequences_with_target_effect - standard one for exposure (note, you have to run this on both characters!) -# extramaritial_sex_exposure_consequences_with_had_recent_sex_var_effect - for sex without targets, based on had_recent_sex var (set in had_sex_with_unknown_effect) -# extramarital_sex_exposure_consequences_effect - "support" effect -# extramarital_sex_discovery_consequences_with_target_effect -# - standard one discovery (note, you have to run this on both characters!) - - -# mother_of_young_child_has_lover_variable_effect -# - when adultery has been discovered, this effect can set if paternity could be doubted - -# spy_on_mother_pregnancy_adultery_effect - -# expose_lover_secret_or_run_consequence_effect -# - Checks for the existence of a Lover Secret with a target, and which either exposes it, or runs the extramarital_sex_exposure_consequences_with_target_effect for both characters. Takes TARGET and EXPOSER - -##################################################################### -# EFFECTS -##################################################################### - - -####Extramaritial sex effects: -#To be used when a character is exposed/discovered as an adulterer/fornicator (for the consequences, not the exposure/discovery itself). Lover secret exposure, discovered seduce schemes, events. -# Exposure effects: These are used when the cheating has been made public (i.e. not for secret discovery without exposure) -# Discovery effects: These re used when the cheating is not public, but a partner has discovered the cheater -#The target version is for situations where it's known who the other character was and adds some opinion penalties and consequences for them as well. - -extramarital_sex_exposure_consequences_with_target_effect = { #Note: only adds stuff for one of the sex partners, it must be run twice! It is intentionally kept this way so you can apply it in two different places in an event chain etc. - save_temporary_scope_as = sex_character - - #Applies traits, piety level loss, unfaithfulness opinions - $TARGET$ = { save_scope_as = sex_partner } - if = { # Check to make absolutely sure it's extramarital - limit = { - NOT = { scope:sex_character = { is_consort_of = scope:sex_partner } } - } - if = { # Check to make sure your culture isn't A-okay with this - limit = { - NOT = { - culture = { has_cultural_parameter = adultery_always_accepted } - } - } - extramarital_sex_exposure_consequences_effect = { SPOUSE_EVENT = $SPOUSE_EVENT$ } - - #Slept with spouse opinions & potential rivalry - $TARGET$ = { - every_spouse = { - limit = { this != scope:sex_character } #Extra safety - save_scope_as = sex_partner_spouse - - hidden_effect = { - #Remove duplicate opinion from discovery - if = { - limit = { - has_opinion_modifier = { - target = scope:sex_character - modifier = slept_with_spouse_discovered_opinion - } - } - remove_opinion = { - target = scope:sex_character - modifier = slept_with_spouse_discovered_opinion - } - } - } - - if = { - limit = { accepts_adultery_without_penalty_trigger = no } - if = { #(only visible for directly relevant exposure) - limit = { - always = yes - } - add_opinion = { - target = scope:sex_character - modifier = slept_with_spouse_exposed_opinion - } - } - else = { - hidden_effect = { - add_opinion = { - target = scope:sex_character - modifier = slept_with_spouse_exposed_opinion - } - } - } - hidden_effect = { - #Rivalry - if = { - limit = { - is_ai = yes - scope:sex_character = { is_ai = yes } - ai_vengefulness >= medium_positive_ai_value - can_set_relation_nemesis_trigger = { CHARACTER = scope:sex_character } - } - set_relation_nemesis = { - reason = nemesis_extramarital_sex_exposure - copy_reason = rival - target = scope:sex_character - involved_character = scope:sex_partner - } - } - else = { - scope:sex_partner = { save_scope_as = relationship_reason_involved_character } - progress_towards_rival_effect = { CHARACTER = scope:sex_character OPINION = 0 REASON = rival_slept_with_spouse } - clear_saved_scope = relationship_reason_involved_character - } - # HOUSE RELATIONS - if = { - limit = { - exists = house - exists = scope:sex_character.house - } - house = { - change_house_relation_effect = { - HOUSE = scope:sex_character.house - VALUE = house_relation_damage_medium_value - REASON = cuckoldry - CHAR = scope:sex_character - TARGET_CHAR = root - TITLE = scope:dummy_gender - } - } - } - } - } - } - } - } - } -} - -extramaritial_sex_exposure_consequences_with_had_recent_sex_var_effect = { - if = { - limit = { exists = var:had_recent_sex } - - if = { - limit = { var:had_recent_sex = flag:male } - dummy_male = { save_scope_as = unknown_sex_partner } - } - else = { - dummy_female = { save_scope_as = unknown_sex_partner } - } - - extramarital_sex_exposure_consequences_effect = { SPOUSE_EVENT = $SPOUSE_EVENT$ } - } -} - -extramarital_sex_attempt_exposure_consequences_with_target_effect = { - #Applies traits, piety level loss, unfaithfulness opinions - $TARGET$ = { save_scope_as = sex_partner } - save_scope_value_as = { #For use desc in adultery.4001 - name = unsuccessful_sex_attempt - value = yes - } - extramarital_sex_exposure_consequences_effect = { SPOUSE_EVENT = $SPOUSE_EVENT$ } -} - - -extramarital_sex_exposure_consequences_effect = { - save_temporary_scope_as = sex_character - save_temporary_scope_value_as = { - name = spouse_event - value = $SPOUSE_EVENT$ - } - - #APPLY TRAITS & REMOVE PIETY LEVELS - add_adulterer_fornicator_trait_or_nothing_effect = yes - remove_piety_level_for_shunned_or_criminal_trait_effect = { TRAIT = adulterer } #Fornicator falls under same doctrine - if = { - limit = { - OR = { - AND = { - exists = scope:sex_partner - relation_with_character_is_sodomy_in_my_or_lieges_faith_trigger = { CHARACTER = scope:sex_partner } - } - AND = { - exists = scope:unknown_sex_partner - relation_with_character_is_sodomy_in_my_or_lieges_faith_trigger = { CHARACTER = scope:unknown_sex_partner } - } - } - } - add_trait = sodomite - remove_piety_level_for_shunned_or_criminal_trait_effect = { TRAIT = sodomite } - } - if = { - limit = { - exists = scope:sex_partner - relation_with_character_is_incestuous_in_my_or_lieges_faith_trigger = { CHARACTER = scope:sex_partner } - } - add_trait = incestuous - remove_piety_level_for_shunned_or_criminal_trait_effect = { TRAIT = incestuous } - } - #Family Feud - house_feud_lover_exposure_effect = yes - - #APPLY UNFAITHFUL OPINIONS TOWARDS SPOUSES AND LOVERS (only visible for directly relevant exposure) - if = { - limit = { - always = yes - } - every_relation = { - type = soulmate - limit = { - soulmate_relation_is_exclusive_trigger = yes - NOT = { #So we don't add it both at discovery and exposure - has_opinion_modifier = { - target = scope:sex_character - modifier = betrayed_our_promise - } - } - } - add_opinion = { - target = scope:sex_character - modifier = betrayed_our_promise - } - } - - every_spouse = { - if = { - limit = { accepts_adultery_without_penalty_trigger = no } - add_opinion = { - target = scope:sex_character - modifier = unfaithful_spouse_exposed_opinion - } - } - } - } - else = { - hidden_effect = { - every_relation = { - type = soulmate - limit = { - soulmate_relation_is_exclusive_trigger = yes - NOT = { #So we don't add it both at discovery and exposure - has_opinion_modifier = { - target = scope:sex_character - modifier = betrayed_our_promise - } - } - } - add_opinion = { - target = scope:sex_character - modifier = betrayed_our_promise - } - } - - every_spouse = { - if = { - limit = { accepts_adultery_without_penalty_trigger = no } - add_opinion = { - target = scope:sex_character - modifier = unfaithful_spouse_exposed_opinion - } - } - } - } - } - every_spouse = { - hidden_effect = { - #Remove duplicate opinion from discovery - if = { - limit = { - has_opinion_modifier = { - target = scope:sex_character - modifier = unfaithful_spouse_discovered_opinion - } - } - remove_opinion = { - target = scope:sex_character - modifier = unfaithful_spouse_discovered_opinion - } - } - } - - #NOTIFY SPOUSE (SHOULD ALWAYS BE "NO" IF EFFECT IS USED ON SECRET EXPOSURE) - if = { - limit = { - scope:spouse_event = yes - accepts_adultery_without_penalty_trigger = no - } - - scope:sex_character = { save_scope_as = adultery_spouse } - trigger_event = adultery.4001 - } - } -} - -extramarital_sex_discovery_consequences_with_target_effect = { - save_temporary_scope_as = sex_character - - # If the discoverer is my partner - if = { - limit = { - OR = { - is_consort_of = $DISCOVERER$ - has_relation_lover = $DISCOVERER$ - has_relation_soulmate = $DISCOVERER$ - } - } - - #Spouse and lover opinions - $DISCOVERER$ = { - if = { - limit = { - has_relation_soulmate = scope:sex_character - soulmate_relation_is_exclusive_trigger = yes - NOT = { $TARGET$ = $DISCOVERER$ } - } - add_opinion = { - target = scope:sex_character - modifier = betrayed_our_promise - } - } - - if = { - limit = { - is_consort_of = scope:sex_character - accepts_adultery_without_penalty_trigger = no - } - add_opinion = { - target = scope:sex_character - modifier = unfaithful_spouse_discovered_opinion - } - } - } - } - - # If the discoverer is my sex partner's spouse - if = { - limit = { - $TARGET$ = { - is_consort_of = $DISCOVERER$ - } - } - $DISCOVERER$ = { - if = { - limit = { accepts_adultery_without_penalty_trigger = no } - add_opinion = { - target = scope:sex_character - modifier = slept_with_spouse_discovered_opinion - } - } - } - } -} - - - -###misc - - -mother_of_young_child_has_lover_variable_effect = { - if = { - limit = { - $LOVER_1$ = { sex_opposite_of = $LOVER_2$ } - } - - #Who is the woman? - if = { - limit = { $LOVER_1$ = { is_female = yes } } - $LOVER_1$ = { save_temporary_scope_as = mother_check } - } - else = { - $LOVER_2$ = { save_temporary_scope_as = mother_check } - } - - #Is SPOUSE the woman's spouse, and do they have a young child together? - $SPOUSE$ = { - if = { - limit = { - is_spouse_of = scope:mother_check - any_child = { - is_child_of = scope:mother_check - NOR = { - has_trait = bastard - has_trait = legitimized_bastard - } - age <= 5 - } - } - set_variable = { - name = mother_of_young_child_has_lover - value = scope:mother_check - } - } - } - } -} - -spy_on_mother_pregnancy_adultery_effect = { - show_as_tooltip = { - if = { # Check whether root or Spymaster should spy - limit = { - exists = cp:councillor_spymaster - NOT = { cp:councillor_spymaster = scope:mother } - cp:councillor_spymaster.intrigue > intrigue - } - cp:councillor_spymaster = { - duel = { - skill = intrigue - target = scope:mother - - 6 = { - compare_modifier = { - value = scope:duel_value - multiplier = 0.5 - min = -5 - } - desc = adultery.1003.duel_success - root = { - custom_tooltip = adultery.1003.duel_success_tt - } - } - - 4 = { - compare_modifier = { - value = scope:duel_value - multiplier = -0.5 - min = -3 - } - desc = adultery.1003.duel_failure - root = { - reverse_add_opinion = { - target = scope:mother - modifier = spied_on_me_opinion - } - } - } - } - } - } - else = { - duel = { - skill = intrigue - target = scope:mother - - 6 = { - compare_modifier = { - value = scope:duel_value - multiplier = 0.5 - min = -5 - } - desc = adultery.1003.duel_success - custom_tooltip = adultery.1003.duel_success_tt - } - - 4 = { - compare_modifier = { - value = scope:duel_value - multiplier = -0.5 - min = -3 - } - desc = adultery.1003.duel_failure - reverse_add_opinion = { - target = scope:mother - modifier = spied_on_me_opinion - } - } - } - } - } - hidden_effect = { - scope:mother = { - if = { - limit = { - is_alive = yes - } - add_character_flag = { - flag = father_suspects_this_pregnancy - months = 8 - } - } - } - - if = { # Check whether root or Spymaster should spy - limit = { - exists = cp:councillor_spymaster - NOT = { cp:councillor_spymaster = scope:mother } - cp:councillor_spymaster.intrigue > intrigue - } - cp:councillor_spymaster = { - duel = { - skill = intrigue - target = scope:mother - - 6 = { - compare_modifier = { - value = scope:duel_value - multiplier = 0.5 - min = -5 - } - trigger = { - scope:mother.pregnancy_real_father != root - exists = scope:mother.pregnancy_assumed_father - } - root = { - debug_spouse_and_pregnancy_real_father_effect = yes - trigger_event = { - id = adultery.1004 - days = { 10 15 } - } - } - } - - 4 = { - compare_modifier = { - value = scope:duel_value - multiplier = -0.5 - min = -3 - } - root = { - trigger_event = { - id = adultery.1009 - days = { 10 15 } - } - } - } - } - } - } - else = { - duel = { - skill = intrigue - target = scope:mother - - 6 = { - compare_modifier = { - value = scope:duel_value - multiplier = 0.5 - min = -5 - } - trigger = { - scope:mother.pregnancy_real_father != root - } - debug_spouse_and_pregnancy_real_father_effect = yes - trigger_event = { - id = adultery.1004 - days = { 10 15 } - } - } - - 4 = { - compare_modifier = { - value = scope:duel_value - multiplier = -0.5 - min = -3 - } - compare_modifier = { - trigger = { - exists = cp:councillor_spymaster - cp:councillor_spymaster = scope:mother.pregnancy_real_father - } - target = cp:councillor_spymaster - value = intrigue - multiplier = 5 - } - trigger_event = { - id = adultery.1009 - days = { 10 15 } - } - } - } - } - } -} - - - -expose_lover_secret_or_run_consequence_effect = { - # TARGET = lover to be checked - # EXPOSER = secret_exposer in case of a Secret reveal - - # Look for a Lover Secret and save it if one exists - if = { - limit = { - $TARGET$ = { is_alive = yes} # Check whether the other party is still alive - any_secret = { - type = secret_lover - secret_target = $TARGET$ - } - } - random_secret = { - type = secret_lover - limit = { - secret_target = $TARGET$ - } - save_scope_as = lover_secret_to_expose - } - } - - # Expose the Secret if it exists - if = { - limit = { - exists = scope:lover_secret_to_expose - } - scope:lover_secret_to_expose = { - expose_secret = $EXPOSER$ - } - } - - # Otherwise run the expose effects - else = { - if = { - limit = { - is_spouse_of = $EXPOSER$ - } - extramarital_sex_exposure_consequences_with_target_effect = { - TARGET = $TARGET$ - SPOUSE_EVENT = no - } - } - else = { - extramarital_sex_exposure_consequences_with_target_effect = { - TARGET = $TARGET$ - SPOUSE_EVENT = yes - } - } - save_scope_as = this_character - if = { - limit = { $TARGET$ = { is_alive = yes } } # Check whether the other party is still alive - $TARGET$ = { - extramarital_sex_exposure_consequences_with_target_effect = { - TARGET = scope:this_character - SPOUSE_EVENT = yes - } - } - } - } -} - - -debug_spouse_and_pregnancy_real_father_effect = { - scope:mother.pregnancy_real_father = { save_scope_as = real_father } - scope:mother.pregnancy_assumed_father = { save_scope_as = assumed_father } - if = { - limit = { scope:real_father = scope:assumed_father } - debug_log = "Real Father and Assumed Father were the same!" - } - else = { - #debug_log = "Adultery discovered from spying on mother!" - #debug_log_scopes = yes - } -} diff --git a/N3OW/common/scripted_effects/00_adventure_effects.txt b/N3OW/common/scripted_effects/00_adventure_effects.txt deleted file mode 100644 index 9beac79d..00000000 --- a/N3OW/common/scripted_effects/00_adventure_effects.txt +++ /dev/null @@ -1,90 +0,0 @@ -##################################################################### -# EFFECT LIST -##################################################################### - -# Effects used in the Adventure Inspiration - -start_adventure_effect = { - - #To save the location so we can use it in the effect checking the distance - set_adventure_distance_variable_effect = { # Figure out how far it is there - ADVENTURER = $ADVENTURER$ - DESTINATION = $LOCATION$ - } - - $ADVENTURER$ = { - # Set a variable to check for availability - set_variable = gone_adventuring - - # Set up the event cycle - # To trigger the event that progresses the inspiration - trigger_event = { - id = fund_inspiration.0053 - days = 1 - } - # Fallback to make sure the inspiration is handled somehow if it goes on for too long - trigger_event = { - id = fund_inspiration.0054 - years = 10 - } - } -} - - -set_adventure_distance_variable_effect = { - # Requires ADVENTURER = character - # Requires DESTINATION = barony_title - $ADVENTURER$.location = { - save_temporary_scope_as = start_barony - } - # Calculate distance to the destination - # The value set indicates how long time it will take for the adventurer to come back - if = { - limit = { - scope:start_barony = { - squared_distance = { - target = $DESTINATION$ - value > long_adventure_max_length - } - } - } - set_variable = { - name = adventure_distance - value = very_long_adventure_var - } - } - else_if = { - limit = { - scope:start_barony = { - squared_distance = { - target = $DESTINATION$ - value > medium_adventure_max_length - } - } - } - set_variable = { - name = adventure_distance - value = long_adventure_var - } - } - else_if = { - limit = { - scope:start_barony = { - squared_distance = { - target = $DESTINATION$ - value > short_adventure_max_length - } - } - } - set_variable = { - name = adventure_distance - value = medium_adventure_var - } - } - else = { - set_variable = { - name = adventure_distance - value = short_adventure_var - } - } -} diff --git a/N3OW/common/scripted_effects/00_ai_budget_effects.txt b/N3OW/common/scripted_effects/00_ai_budget_effects.txt deleted file mode 100644 index 5fa97912..00000000 --- a/N3OW/common/scripted_effects/00_ai_budget_effects.txt +++ /dev/null @@ -1,730 +0,0 @@ -####################################### -# AI Tweaks # -# For a better challenge, a better AI # -####################################### -ai_budget_manipulation_effect = { - # Tweaks to the War Chest AI budget - sometimes the AI will be brave enough to boom - - if = { # Some special logic to make certain AI's save up gold to revoke titles in their desired domain - limit = { - is_ai = yes - is_at_war = no - is_playable_character = yes - OR = { - AND = { - has_treasury = no - gold >= 50 - gold < minimum_ai_gold_value_for_tyranny_wars - } - AND = { - has_treasury = yes - treasury >= 50 - treasury < minimum_ai_treasury_value_for_tyranny_wars - } - } - NOR = { - has_character_flag = ai_revoke_recheck_cooldown - government_has_flag = government_is_nomadic - } - primary_title.tier >= tier_duchy - years_from_game_start >= 3 - domain_size < domain_limit - has_realm_law_flag = title_revocation_allowed - OR = { # Tyranny tolerance is based on rationality - AND = { - ai_rationality < 0 - tyranny <= 15 # Don't go crazy with tyranny, just a bit is fine - } - AND = { - ai_rationality >= 0 - ai_rationality < 50 - tyranny <= 5 # Don't go crazy with tyranny, just a bit is fine - } - AND = { - ai_rationality >= 50 - tyranny <= 0 # Don't go crazy with tyranny, just a bit is fine - } - } - OR = { - primary_title.title_capital_county = { - holder != root - holder = { - current_military_strength < root.current_military_strength - is_vassal_or_below_of = root - NOR = { - vassal_contract_has_flag = vassal_contract_cannot_revoke_titles - has_relation_friend = root - has_relation_best_friend = root - has_relation_lover = root - has_relation_soulmate = root - is_child_of = root - is_grandchild_of = root - is_great_grandchild_of = root - } - } - } - AND = { - primary_title.tier >= tier_kingdom - exists = primary_title.title_capital_county.de_jure_liege.holder - primary_title.title_capital_county.de_jure_liege = { - holder != root - holder = { - current_military_strength < root.current_military_strength - is_vassal_or_below_of = root - NOR = { - vassal_contract_has_flag = vassal_contract_cannot_revoke_titles - has_relation_friend = root - has_relation_best_friend = root - has_relation_lover = root - has_relation_soulmate = root - is_child_of = root - is_grandchild_of = root - is_great_grandchild_of = root - } - } - } - } - any_sub_realm_county = { - holder != root - title_province = { has_holding_type = castle_holding } - this != root.primary_title.title_capital_county - duchy = root.primary_title.title_capital_county.duchy - holder = { - current_military_strength < root.current_military_strength - NOR = { - vassal_contract_has_flag = vassal_contract_cannot_revoke_titles - has_relation_friend = root - has_relation_best_friend = root - has_relation_lover = root - has_relation_soulmate = root - is_child_of = root - is_grandchild_of = root - is_great_grandchild_of = root - } - } - } - } - trigger_if = { - limit = { - domain_size > 3 - } - NOR = { - has_trait = generous - has_trait = just - } - } - NOT = { - primary_title = title:e_hre - } - } - if = { - limit = { - primary_title.title_capital_county = { - holder != root - holder = { - current_military_strength < root.current_military_strength - is_vassal_or_below_of = root - NOT = { vassal_contract_has_flag = vassal_contract_cannot_revoke_titles } - } - } - } - add_character_flag = { flag = ai_save_gold_for_revoke years = 6 } - } - else_if = { - limit = { - primary_title.title_capital_county = { - holder = root - title_province = { free_building_slots <= 0 } - } - } - add_character_flag = { flag = ai_save_gold_for_revoke years = 6 } - } - else = { - random_list = { - 50 = { - add_character_flag = { flag = ai_save_gold_for_revoke years = 6 } - } - 50 = { - add_character_flag = { flag = ai_revoke_recheck_cooldown years = 6 } - } - } - } - } - else_if = { - limit = { - is_ai = yes - is_playable_character = yes - primary_title.tier >= tier_duchy - years_from_game_start >= 3 - NOR = { - has_character_flag = ai_revoke_recheck_cooldown - has_character_flag = ai_save_gold_for_revoke - government_has_flag = government_is_nomadic - } - } - add_character_flag = { flag = ai_revoke_recheck_cooldown years = 6 } - } - - if = { # Conquerors are special; they don't care about states or eras - they just want to conquer, and put their resources towards just that. - limit = { - has_variable = conqueror - } - # For now they just buff the war chest, and nothing else - move_budget_gold = { gold = long_term_gold from = budget_long_term to = budget_war_chest } - move_budget_gold = { gold = short_term_gold from = budget_short_term to = budget_war_chest } - # Conquerors have no concern for the future; only here and now matters - move_budget_gold = { gold = long_term_gold from = budget_long_term to = budget_short_term } - if = { - limit = { - has_treasury = yes - } - # For now they just buff the war chest, and nothing else - move_budget_treasury = { treasury = long_term_treasury from = budget_long_term to = budget_war_chest } - move_budget_treasury = { treasury = short_term_treasury from = budget_short_term to = budget_war_chest } - # Conquerors have no concern for the future; only here and now matters - move_budget_treasury = { treasury = long_term_treasury from = budget_long_term to = budget_short_term } - } - } - else_if = { # Adventurers only need short term gold. - limit = { - is_ai = yes - has_government = landless_adventurer_government - } - move_budget_gold = { gold = long_term_gold from = budget_long_term to = budget_short_term } - move_budget_gold = { gold = war_chest_gold from = budget_war_chest to = budget_short_term } - } - else = { - if = { - limit = { - is_ai = yes - is_at_war = no # While at war, the War Chest should be preserved at all costs - is_playable_character = yes - OR = { - AND = { - has_treasury = no - gold > 0 - war_chest_gold >= 10 - } - AND = { - has_treasury = yes - treasury > 0 - war_chest_treasury >= 10 - } - } - NOR = { - has_character_flag = ai_save_gold_for_revoke - any_targeting_faction = { - NOT = { faction_is_type = peasant_faction } - faction_power >= halved_faction_power_threshold - } - } - trigger_if = { - limit = { - government_has_flag = government_is_tribal - } - prestige >= expensive_building_tier_1_cost - } - NAND = { # Iberian Struggle rulers that go for escalation should always go for a full war chest - any_character_struggle = { - phase_has_catalyst = catalyst_winning_large_conquest_war - } - has_character_flag = agenda_towards_escalation - } - } - - # Chance to make an AI boom its economy if they do not fall into an archetype - if = { - limit = { - ai_has_builder_or_pious_builder_personality = no - ai_has_warlike_personality = no - ai_has_cautious_personality = no - NOT = { - has_character_flag = ai_boom_cooldown - } - } - random = { - chance = { - value = primary_title.tier - if = { - limit = { - has_trait = diligent - } - add = 1 - } - if = { - limit = { - has_trait = architect - } - add = 4 - } - } - add_character_flag = { flag = ai_boom years = 15 } - add_character_flag = { flag = ai_boom_cooldown years = 30 } # To balance the AI out - } - } - - # Early Game, there are still building slots to fill - # At this point, the AI will boom more aggressively than normal - if = { - limit = { - OR = { - any_held_title = { - title_tier = county - title_province = { free_building_slots > 0 } - } - ai_should_focus_on_building_in_their_capital = yes - } - ai_has_warlike_personality = no # Warlike AI's go straight to the more restrictive second set of conditions - } - # Early Game - Capital Focus - # AI's want to fill up their Capital County's building slots, first level buildings have the highest RoI so it's stupid not to - # There's no guarantee that they will spend the gold on buildings for specifically their capital, but they are heavily incentivised to do so - # They may spend on buildings in secondary counties/baronies, or on MaA - if = { - limit = { - capital_county.title_province = { - free_building_slots > 0 - } - ai_has_warlike_personality = no - ai_has_cautious_personality = no - } - move_budget_gold = { gold = war_chest_gold from = budget_war_chest to = budget_short_term } - if = { - limit = { - has_treasury = yes - } - move_budget_treasury = { treasury = war_chest_treasury from = budget_war_chest to = budget_short_term } - } - } - else_if = { # Cautious AI's keep a half of their war chest as a buffer - limit = { - capital_county.title_province = { - free_building_slots > 0 - } - ai_has_cautious_personality = yes - OR = { - AND = { - has_treasury = no - war_chest_gold >= halved_ai_war_chest_gold_maximum - } - AND = { - has_treasury = yes - war_chest_treasury >= halved_ai_war_chest_treasury_maximum - } - } - } - move_budget_gold = { gold = excess_over_halved_ai_war_chest_gold from = budget_war_chest to = budget_short_term } - if = { - limit = { - has_treasury = yes - } - move_budget_treasury = { treasury = excess_over_halved_ai_war_chest_treasury from = budget_war_chest to = budget_short_term } - } - } - - # Early Game - Building up Secondary Counties - # The AI wants first-level buildings in all of its Counties - # This is when personalities will begin to manifest in a bigger way - # The else_if is intended, it's a continuation of the above logic - else_if = { # Economical boom AI's just go for it, hard - limit = { - ai_has_builder_or_pious_builder_personality = yes - } - move_budget_gold = { gold = war_chest_gold from = budget_war_chest to = budget_short_term } - if = { - limit = { - has_treasury = yes - } - move_budget_treasury = { treasury = war_chest_treasury from = budget_war_chest to = budget_short_term } - } - } - else_if = { # Cautious AI's will want a minimum war chest in absolute terms, based on tier - limit = { - OR = { - AND = { - has_treasury = no - war_chest_gold > cautious_ai_minimum_war_chest_gold - } - AND = { - has_treasury = yes - war_chest_treasury > cautious_ai_minimum_war_chest_treasury - } - } - ai_has_cautious_personality = yes - } - move_budget_gold = { gold = excess_over_cautious_ai_minimum_war_chest_gold from = budget_war_chest to = budget_short_term } - if = { - limit = { - has_treasury = yes - } - move_budget_treasury = { treasury = excess_over_cautious_ai_minimum_war_chest_treasury from = budget_war_chest to = budget_short_term } - } - } - # Warlike AI's have a few conditions - # If they have a full war chest and have been at peace for 3 years, they'll stuff half their war chest into short term - # This is a somewhat close representation of if they want to declare war - # But it's not a particularly aggressive cooldown, as we do want AI's to build up a minimum, even if they are warlike - else_if = { - limit = { - ai_has_warlike_personality = yes - OR = { - AND = { - has_treasury = no - war_chest_gold >= war_chest_gold_maximum - } - AND = { - has_treasury = yes - war_chest_treasury >= war_chest_treasury_maximum - } - } - days_of_continuous_peace >= 1825 # 5 years - } - move_budget_gold = { gold = excess_over_a_quarter_ai_war_chest_gold from = budget_war_chest to = budget_short_term } - if = { - limit = { - has_treasury = yes - } - move_budget_treasury = { treasury = excess_over_a_quarter_ai_war_chest_gold from = budget_war_chest to = budget_short_term } - } - } - # If no personality archetype is present, AI's with the ai_boom flag, appropriate traits, or decent boldness will boom - else_if = { - limit = { - OR = { - has_character_flag = ai_boom - ai_boldness >= 25 - has_trait = diligent - has_trait = architect - } - } - if = { # If you have enough war chest gold and short term gold to build a holding, and doing so would be smart, do it! - limit = { - domain_size < domain_limit - OR = { - AND = { - has_treasury = no - gold >= main_building_tier_1_cost - long_term_gold < main_building_tier_1_cost - } - AND = { - has_treasury = yes - treasury >= main_building_tier_1_cost - long_term_treasury < main_building_tier_1_cost - } - } - NOT = { - government_has_flag = government_is_tribal - } - culture = { # The requirements for Castles, temples, and Cities - has_innovation = innovation_motte - has_innovation = innovation_city_planning - } - any_held_title = { - title_tier = county - any_county_province = { - has_holding = no - barony_cannot_construct_holding = no - } - } - } - move_budget_gold = { gold = main_building_tier_1_cost from = budget_war_chest to = budget_long_term } - move_budget_gold = { gold = main_building_tier_1_cost from = budget_short_term to = budget_long_term } - if = { - limit = { - has_treasury = yes - } - move_budget_treasury = { treasury = main_building_tier_1_cost from = budget_war_chest to = budget_long_term } - move_budget_treasury = { treasury = main_building_tier_1_cost from = budget_short_term to = budget_long_term } - } - } - else = { - move_budget_gold = { gold = war_chest_gold from = budget_war_chest to = budget_short_term } - if = { - limit = { - has_treasury = yes - } - move_budget_treasury = { treasury = war_chest_treasury from = budget_war_chest to = budget_short_term } - } - } - } - } - - # Mid-Late game, there are no more building slots to fill - # Heavily personality based, with some quirks here and there - # The else_if is intended, it's a continuation of the above logic - else_if = { # Economical boom AI's will empty their entire treasury to boom - limit = { - ai_has_builder_or_pious_builder_personality = yes - } - if = { # If you have enough war chest gold and short term gold to build a holding, and doing so would be smart, do it! - limit = { - domain_size < domain_limit - OR = { - AND = { - has_treasury = no - gold >= main_building_tier_1_cost - long_term_gold < main_building_tier_1_cost - } - AND = { - has_treasury = yes - treasury >= main_building_tier_1_cost - long_term_treasury < main_building_tier_1_cost - } - } - NOT = { - government_has_flag = government_is_tribal - } - culture = { # The requirements for Castles, temples, and Cities - has_innovation = innovation_motte - has_innovation = innovation_city_planning - } - any_held_title = { - title_tier = county - any_county_province = { - has_holding = no - barony_cannot_construct_holding = no - } - } - } - move_budget_gold = { gold = main_building_tier_1_cost from = budget_war_chest to = budget_long_term } - move_budget_gold = { gold = main_building_tier_1_cost from = budget_short_term to = budget_long_term } - if = { - limit = { - has_treasury = yes - } - move_budget_treasury = { treasury = main_building_tier_1_cost from = budget_war_chest to = budget_long_term } - move_budget_treasury = { treasury = main_building_tier_1_cost from = budget_short_term to = budget_long_term } - } - } - else = { - move_budget_gold = { gold = war_chest_gold from = budget_war_chest to = budget_short_term } - if = { - limit = { - has_treasury = yes - } - move_budget_treasury = { treasury = war_chest_treasury from = budget_war_chest to = budget_short_term } - } - } - } - else_if = { # Cautious AI's will only boom if they feel really, really safe - limit = { - OR = { - AND = { - has_treasury = no - war_chest_gold > cautious_ai_minimum_war_chest_gold - } - AND = { - has_treasury = yes - war_chest_treasury > cautious_ai_minimum_war_chest_treasury - } - } - ai_has_cautious_personality = yes - current_military_strength >= max_military_strength - days_of_continuous_peace >= 1825 # 5 years - OR = { - any_ally = { - count >= 2 - } - dread >= 50 # Dread makes cautious characters feel safe - } - } - move_budget_gold = { gold = excess_over_cautious_ai_minimum_war_chest_gold from = budget_war_chest to = budget_short_term } - if = { - limit = { - has_treasury = yes - } - move_budget_treasury = { treasury = excess_over_cautious_ai_minimum_war_chest_treasury from = budget_war_chest to = budget_short_term } - } - } - else_if = { # Warlike AI's will invest half their war chest if it's full, and nothing is going on - limit = { - ai_has_warlike_personality = yes - OR = { - AND = { - has_treasury = no - war_chest_gold >= war_chest_gold_maximum - } - AND = { - has_treasury = yes - war_chest_treasury >= war_chest_treasury_maximum - } - } - NOT = { - government_has_flag = government_is_nomadic - } - capital_county.title_province = { - free_building_slots <= 0 - } - days_of_continuous_peace >= 2555 # 7 years - } - move_budget_gold = { gold = halved_ai_war_chest_gold from = budget_war_chest to = budget_short_term } - if = { - limit = { - has_treasury = yes - } - move_budget_treasury = { treasury = halved_ai_war_chest_treasury from = budget_war_chest to = budget_short_term } - } - } - else_if = { # Special logic for warlike AI's during the Iranian Intermezzo, they need to be more aggressive than usual - limit = { - has_trait = fp3_struggle_detractor - ai_has_warlike_personality = yes - OR = { - AND = { - has_treasury = no - war_chest_gold < war_chest_gold_maximum - } - AND = { - has_treasury = yes - war_chest_treasury < war_chest_treasury_maximum - } - } - days_of_continuous_peace < 2555 - } - move_budget_gold = { gold = short_term_gold from = budget_short_term to = budget_war_chest } - move_budget_gold = { gold = long_term_gold from = budget_long_term to = budget_war_chest } - if = { - limit = { - has_treasury = yes - } - move_budget_treasury = { treasury = short_term_treasury from = budget_short_term to = budget_war_chest } - move_budget_treasury = { treasury = long_term_treasury from = budget_long_term to = budget_war_chest } - } - } - else_if = { # Warlike AI's will invest their long term gold into their war chest if it's not full - limit = { - ai_has_warlike_personality = yes - OR = { - AND = { - has_treasury = no - war_chest_gold < war_chest_gold_maximum - long_term_gold >= 1 - } - AND = { - has_treasury = yes - war_chest_treasury < war_chest_treasury_maximum - long_term_treasury >= 1 - } - } - } - move_budget_gold = { gold = long_term_gold from = budget_long_term to = budget_war_chest } - if = { - limit = { - has_treasury = yes - } - move_budget_treasury = { treasury = long_term_treasury from = budget_long_term to = budget_war_chest } - } - } - - # For AI's with no particular personality, warlike, booming, or cautious, we have them boom through a flag system - # Bold AI's boom with all their war chest gold, non-bold with half - else_if = { - limit = { - has_character_flag = ai_boom - ai_boldness >= 25 - } - if = { # If you have enough war chest gold and short term gold to build a holding, and doing so would be smart, do it! - limit = { - domain_size < domain_limit - OR = { - AND = { - has_treasury = no - gold >= main_building_tier_1_cost - long_term_gold < main_building_tier_1_cost - } - AND = { - has_treasury = yes - treasury >= main_building_tier_1_cost - long_term_treasury < main_building_tier_1_cost - } - } - NOT = { - government_has_flag = government_is_tribal - } - culture = { # The requirements for Castles, temples, and Cities - has_innovation = innovation_motte - has_innovation = innovation_city_planning - } - any_held_title = { - title_tier = county - any_county_province = { - has_holding = no - barony_cannot_construct_holding = no - } - } - } - move_budget_gold = { gold = main_building_tier_1_cost from = budget_war_chest to = budget_long_term } - move_budget_gold = { gold = main_building_tier_1_cost from = budget_short_term to = budget_long_term } - if = { - limit = { - has_treasury = yes - } - move_budget_treasury = { treasury = main_building_tier_1_cost from = budget_war_chest to = budget_long_term } - move_budget_treasury = { treasury = main_building_tier_1_cost from = budget_short_term to = budget_long_term } - } - } - else = { - move_budget_gold = { gold = war_chest_gold from = budget_war_chest to = budget_short_term } - if = { - limit = { - has_treasury = yes - } - move_budget_gold = { gold = war_chest_treasury from = budget_war_chest to = budget_short_term } - } - } - } - else_if = { - limit = { - has_character_flag = ai_boom - OR = { - AND = { - has_treasury = no - war_chest_gold >= halved_ai_war_chest_gold_maximum - } - AND = { - has_treasury = yes - war_chest_treasury >= halved_ai_war_chest_treasury_maximum - } - } - } - move_budget_gold = { gold = excess_over_halved_ai_war_chest_gold from = budget_war_chest to = budget_short_term } - if = { - limit = { - has_treasury = yes - } - move_budget_treasury = { treasury = excess_over_halved_ai_war_chest_treasury from = budget_war_chest to = budget_short_term } - } - } - - if = { # Some special logic to catch the rare instances where a non-Tribe ends up with a tribal main holding - limit = { - NOT = { - government_has_flag = government_is_tribal - } - capital_province = { - has_holding_type = tribal_holding - } - OR = { - AND = { - has_treasury = no - long_term_gold < feudalize_holding_interaction_cost - } - AND = { - has_treasury = yes - long_term_treasury < feudalize_holding_interaction_cost - } - } - } - move_budget_gold = { gold = feudalize_holding_interaction_cost from = budget_war_chest to = budget_long_term } - move_budget_gold = { gold = feudalize_holding_interaction_cost from = budget_short_term to = budget_long_term } - if = { - limit = { - has_treasury = yes - } - move_budget_treasury = { treasury = feudalize_holding_interaction_cost from = budget_war_chest to = budget_long_term } - move_budget_treasury = { treasury = feudalize_holding_interaction_cost from = budget_short_term to = budget_long_term } - } - } - } - } -} diff --git a/N3OW/common/scripted_effects/00_ai_conqueror_effects.txt b/N3OW/common/scripted_effects/00_ai_conqueror_effects.txt deleted file mode 100644 index d5880ce5..00000000 --- a/N3OW/common/scripted_effects/00_ai_conqueror_effects.txt +++ /dev/null @@ -1,1275 +0,0 @@ -ai_conqueror_yearly_effect = { - if = { - limit = { - has_variable = conqueror - top_liege = this - } - save_scope_as = root_scope - - ###### BUDGETING - if = { - limit = { - is_at_war = no - years_from_game_start >= 5 - NOT = { - has_character_flag = conqueror_anti_pacing_flag - } - primary_title = { title_held_years >= 3 } # Do not go into buildup mode if there's a brother you need to destroy immediately! - OR = { - any_neighboring_and_across_water_top_liege_realm_owner = { - count = all - current_military_strength >= scope:root_scope.max_military_strength - NOR = { - is_allied_to = scope:root_scope - has_relation_friend = scope:root_scope - has_relation_lover = scope:root_scope - } - } - any_neighboring_and_across_water_top_liege_realm_owner = { - count >= 2 - current_military_strength >= scope:root_scope.max_military_strength - NOR = { - is_allied_to = scope:root_scope - has_relation_friend = scope:root_scope - has_relation_lover = scope:root_scope - } - } - any_vassal = { - joined_faction ?= { - faction_power >= faction_power_halfway_threshold - } - } - AND = { - NOT = { ai_should_get_conqueror_bonuses = yes } # They have a 75% discount - monthly_character_income_minus_expenses > half_monthly_character_income # Try to spend at least 50% of income on MaA! - } - } - } - add_character_flag = { # Conquerors should sometimes spend on MaA, if there are strong neighbours - flag = conqueror_pacing_flag - years = 3 - } - add_character_flag = { - flag = conqueror_anti_pacing_flag - years = 10 - } - } - if = { - limit = { - has_character_flag = conqueror_pacing_flag - } - move_budget_gold = { gold = long_term_gold from = budget_long_term to = budget_short_term } - move_budget_gold = { gold = war_chest_gold from = budget_war_chest to = budget_short_term } - if = { - limit = { - has_treasury = yes - } - move_budget_treasury = { treasury = long_term_treasury from = budget_long_term to = budget_short_term } - move_budget_treasury = { treasury = war_chest_treasury from = budget_war_chest to = budget_short_term } - } - } - else = { # Conquerors are special; they don't care about states or eras - they just want to conquer, and put their resources towards just that. - move_budget_gold = { gold = long_term_gold from = budget_long_term to = budget_war_chest } - move_budget_gold = { gold = short_term_gold from = budget_short_term to = budget_war_chest } - # Conquerors have no concern for the future; only here and now matters - move_budget_gold = { gold = long_term_gold from = budget_long_term to = budget_short_term } - if = { - limit = { - has_treasury = yes - } - move_budget_treasury = { treasury = long_term_treasury from = budget_long_term to = budget_war_chest } - move_budget_treasury = { treasury = short_term_treasury from = budget_short_term to = budget_war_chest } - # Conquerorstreasurye no treasuryern for the future; only here and now matters - move_budget_treasury = { treasury = long_term_treasury from = budget_long_term to = budget_short_term } - } - } - - ###### IMPORTANT DECISIONS - if = { - limit = { - can_execute_decision = mpo_become_greatest_of_khans_decision - } - execute_decision = mpo_become_greatest_of_khans_decision - } - if = { - limit = { - can_execute_decision = nomad_higher_tier_title_decision - } - execute_decision = nomad_higher_tier_title_decision - } - - ###### LIFESTYLES - if = { # Conquerors change lifestyle focus to suit their needs - limit = { - NOT = { has_character_flag = ai_focus_cd } # No cheating! - } - if = { - limit = { - is_at_war = no - war_chest_gold < war_chest_gold_maximum - NOT = { has_focus = stewardship_wealth_focus } - } - set_focus = stewardship_wealth_focus - add_character_flag = { - flag = ai_focus_cd - years = 5 - } - } - else_if = { # Prestige is important for CB's - limit = { - is_at_war = no - OR = { - AND = { - prestige_level < 4 - can_use_conquest_cbs_trigger = yes - } - prestige < 1000 - } - NOT = { has_focus = diplomacy_majesty_focus } - NOT = { has_trait = august } - } - set_focus = diplomacy_majesty_focus - add_character_flag = { - flag = ai_focus_cd - years = 5 - } - } - else_if = { # Certain conquerors will level up the skulduggery tree so they can murder important enemies to weaken them - limit = { - is_at_war = no - intrigue >= martial - intrigue >= 12 - NOT = { has_focus = intrigue_skulduggery_focus } - NOT = { has_trait = schemer } - } - set_focus = intrigue_skulduggery_focus - add_character_flag = { - flag = ai_focus_cd - years = 5 - } - } - else_if = { - limit = { - is_commanding_army = yes - NOT = { has_focus = martial_chivalry_focus } - } - set_focus = martial_chivalry_focus - add_character_flag = { - flag = ai_focus_cd - years = 5 - } - } - else_if = { - limit = { - NOT = { has_focus = martial_authority_focus } - any_held_title = { - title_tier = county - county_control < 100 - } - } - set_focus = martial_authority_focus - add_character_flag = { - flag = ai_focus_cd - years = 5 - } - } - else_if = { - limit = { - NOT = { has_focus = martial_strategy_focus } - } - set_focus = martial_strategy_focus - add_character_flag = { - flag = ai_focus_cd - years = 5 - } - } - } - - ##### SCHEMES - if = { # End murder schemes that are useless - limit = { - any_scheme = { - type = murder - is_scheme_exposed = yes - } - } - every_scheme = { - type = murder - limit = { - is_scheme_exposed = yes - } - end_scheme = yes - } - } - if = { # Murders - limit = { - NOT = { # Really honorable characters do not stoop this low, ever - ai_honor >= high_positive_ai_value - } - OR = { - NOT = { - any_scheme = { - OR = { - scheme_type = murder - scheme_type = abduct - scheme_type = claim_throne - scheme_type = fabricate_hook - } - } - } - AND = { - has_perk = twice_schemed_perk - any_scheme = { - count < 2 - OR = { - scheme_type = murder - scheme_type = abduct - scheme_type = claim_throne - scheme_type = fabricate_hook - } - } - } - } - } - every_neighboring_and_across_water_top_liege_realm_owner = { # Weaken strong neighbours - limit = { - save_temporary_scope_as = target_scope - scope:root_scope = { - current_military_strength >= scope:target_scope.current_military_strength - has_any_cb_on = scope:target_scope - } - NOR = { - is_allied_to = scope:root_scope - has_relation_friend = scope:root_scope - has_relation_lover = scope:root_scope - } - OR = { - AND = { # Children are usually weaker rulers - is_adult = yes - primary_heir ?= { - is_adult = no - } - } - AND = { # Split the realm - has_partition_succession_realm_law_trigger = yes - any_heir = { - count >= 2 - } - } - } - scope:root_scope = { - can_start_scheme = { - type = murder - target_character = scope:target_scope - } - } - } - add_to_list = targets - } - every_targeting_faction = { - faction_type = claimant_faction - limit = { - exists = special_character - save_temporary_scope_as = faction_in_question - scope:root_scope = { - can_start_scheme = { - type = murder - target_character = scope:faction_in_question.special_character - } - } - } - special_character = { - add_to_list = targets - } - } - every_relation = { - type = rival - add_to_list = targets - } - random_in_list = { - list = targets - save_scope_as = murder_target - } - if = { - limit = { - exists = scope:murder_target - } - start_scheme = { - type = murder - target_character = scope:murder_target - } - } - } - if = { # End hook schemes that are useless - limit = { - any_scheme = { - type = fabricate_hook - is_scheme_exposed = yes - } - } - every_scheme = { - type = fabricate_hook - limit = { - is_scheme_exposed = yes - } - end_scheme = yes - } - } - if = { # Fabricate Hook - limit = { - has_perk = truth_is_relative_perk - OR = { - NOT = { - any_scheme = { - OR = { - scheme_type = murder - scheme_type = abduct - scheme_type = claim_throne - scheme_type = fabricate_hook - } - } - } - AND = { - has_perk = twice_schemed_perk - any_scheme = { - count < 2 - OR = { - scheme_type = murder - scheme_type = abduct - scheme_type = claim_throne - scheme_type = fabricate_hook - } - } - } - } - } - every_courtier = { - limit = { - is_theocratic_lessee = yes - scope:root_scope = { - can_start_scheme = { - type = fabricate_hook - target_character = prev - } - } - } - add_to_list = hook_targets - } - every_vassal = { - limit = { - highest_held_title_tier >= tier_county - government_has_flag = government_is_feudal - vassal_contract_can_be_modified_trigger = yes - scope:root_scope = { - can_start_scheme = { - type = fabricate_hook - target_character = prev - } - } - } - add_to_list = hook_targets - } - if = { - limit = { - has_perk = golden_obligations_perk - } - every_vassal = { - limit = { - gold >= 200 - scope:root_scope = { - can_start_scheme = { - type = fabricate_hook - target_character = prev - } - } - } - add_to_list = hook_targets - } - every_neighboring_and_across_water_top_liege_realm_owner = { - limit = { - gold >= 100 - scope:root_scope = { - can_start_scheme = { - type = fabricate_hook - target_character = prev - } - } - } - add_to_list = hook_targets - } - } - random_in_list = { - list = hook_targets - weight = { - base = 1 - modifier = { - add = primary_title.tier - } - } - save_scope_as = hook_target - } - if = { - limit = { - exists = scope:hook_target - } - start_scheme = { - type = fabricate_hook - target_character = scope:hook_target - } - } - } - - if = { # Sway - limit = { - OR = { - NOT = { - any_scheme = { - OR = { - scheme_type = befriend - scheme_type = sway - scheme_type = seduce - scheme_type = courting - scheme_type = elope - scheme_type = learn_language - } - } - } - AND = { - OR = { - dynasty ?= { has_dynasty_perk = glory_legacy_5 } - AND = { - has_royal_court = yes - has_dlc_feature = royal_court - has_court_type = court_diplomatic - court_grandeur_current_level >= 10 - } - } - any_scheme = { - count < 2 - OR = { - scheme_type = befriend - scheme_type = sway - scheme_type = seduce - scheme_type = courting - scheme_type = elope - scheme_type = learn_language - } - } - } - AND = { - dynasty ?= { has_dynasty_perk = glory_legacy_5 } - has_royal_court = yes - has_dlc_feature = royal_court - has_court_type = court_diplomatic - court_grandeur_current_level >= 10 - any_scheme = { - count < 3 - OR = { - scheme_type = befriend - scheme_type = sway - scheme_type = seduce - scheme_type = courting - scheme_type = elope - scheme_type = learn_language - } - } - } - } - } - every_courtier = { - limit = { - OR = { - is_theocratic_lessee = yes - has_council_position = councillor_spymaster - } - opinion = { - target = scope:root_scope - value < 100 - } - scope:root_scope = { - can_start_scheme = { - type = sway - target_character = prev - } - } - } - add_to_list = sway_targets - } - every_vassal = { - limit = { - highest_held_title_tier >= tier_county - opinion = { - target = scope:root_scope - value < 100 - } - scope:root_scope = { - can_start_scheme = { - type = sway - target_character = prev - } - } - } - add_to_list = sway_targets - } - random_in_list = { - list = sway_targets - weight = { - base = 1 - modifier = { - add = 1000 - is_theocratic_lessee = yes - } - modifier = { - add = 1000 - opinion = { - target = scope:root_scope - value <= 0 - } - } - } - save_scope_as = sway_target - } - if = { - limit = { - exists = scope:sway_target - } - start_scheme = { - type = sway - target_character = scope:sway_target - } - } - } - - ###### WAR! Or, well... Coronation first - if = { - limit = { - highest_held_title_tier >= tier_kingdom - has_realm_law = uncrowned - can_host_activity = activity_coronation - } - ai_attempt_to_host_activity = activity_coronation - } - else_if = { - limit = { - is_at_war = no - war_chest_gold >= war_chest_gold_maximum - NOR = { - has_character_flag = conqueror_pacing_flag - any_owned_story = { story_type = story_greatest_of_khans } - any_owned_story = { story_type = story_mongol_invasion } - } - } - # Lots of nested ai_start_best_war here, priority as follows: Start high-impact CB war, start 3 wars against rulers with 30% or less strength, start 2 wars against rulers with less than 40%, or just start any good war - if = { # Kingdom+ Claims first - limit = { - any_claim = { - pressed = yes - tier >= tier_kingdom - } - } - ai_start_best_war = { - cb = { - claim_cb - } - is_valid = { - scope:target_title.tier >= tier_kingdom - scope:target_character = { - current_military_strength < root.current_military_strength - OR = { - gold < root.gold - current_military_strength <= root.fifty_percent_of_current_military_strength - } - } - } - on_failure = { - # Start one very high-impact war with a very good CB - ai_start_best_war = { - cb = { - major_religious_war - invasion_war - clan_invasion_war - directed_great_holy_war - tribal_subjugation_cb - de_jure_cb - de_jure_cb_nomadic - } - is_valid = { - } - on_failure = { - # Either go for one decent war, or three 'small' wars immediately - random_list = { - 50 = { - ai_start_best_war = { - cb = { - claim_cb - duchy_conquest_cb - religious_war - vassalization_cb - individual_duchy_de_jure_cb - sovereignty_cb - nomadic_conquest_duchy_cb - } - is_valid = { - trigger_if = { - limit = { - scope:casus_belli_type = casus_belli_type:claim_cb - } - scope:target_title.tier > tier_county - } - scope:target_character = { - current_military_strength < root.current_military_strength - OR = { - gold < root.gold - current_military_strength <= root.fifty_percent_of_current_military_strength - } - } - } - on_failure = { - ai_start_best_war = { - cb = { - claim_cb - county_conquest_cb - individual_county_de_jure_cb - minor_religious_war - county_struggle_cb - ducal_conquest_cb - nomadic_conquest_cb - } - is_valid = { - scope:target_character = { - current_military_strength <= root.a_third_of_current_military_strength - gold < root.gold - } - } - on_failure = { - ai_start_best_war = { - cb = { - claim_cb - county_conquest_cb - individual_county_de_jure_cb - minor_religious_war - county_struggle_cb - ducal_conquest_cb - nomadic_conquest_cb - } - is_valid = { - scope:target_character = { - current_military_strength < root.forty_percent_of_current_military_strength - gold < root.gold - } - } - on_failure = { - ai_start_best_war = { - cb = { - claim_cb - county_conquest_cb - individual_county_de_jure_cb - minor_religious_war - county_struggle_cb - ducal_conquest_cb - nomadic_conquest_cb - } - } - } - } - ai_start_best_war = { - cb = { - claim_cb - county_conquest_cb - individual_county_de_jure_cb - minor_religious_war - county_struggle_cb - ducal_conquest_cb - nomadic_conquest_cb - } - is_valid = { - scope:target_character = { - current_military_strength < root.forty_percent_of_current_military_strength - gold < root.gold - } - } - } - } - } - ai_start_best_war = { - cb = { - claim_cb - county_conquest_cb - individual_county_de_jure_cb - minor_religious_war - county_struggle_cb - ducal_conquest_cb - nomadic_conquest_cb - } - is_valid = { - scope:target_character = { - current_military_strength <= root.a_third_of_current_military_strength - gold < root.gold - } - } - } - ai_start_best_war = { - cb = { - claim_cb - county_conquest_cb - individual_county_de_jure_cb - minor_religious_war - county_struggle_cb - ducal_conquest_cb - nomadic_conquest_cb - } - is_valid = { - scope:target_character = { - current_military_strength <= root.a_third_of_current_military_strength - gold < root.gold - } - } - } - } - } - } - 50 = { - ai_start_best_war = { - cb = { - claim_cb - duchy_conquest_cb - religious_war - vassalization_cb - individual_duchy_de_jure_cb - tribal_subjugation_cb - de_jure_cb - de_jure_cb_nomadic - nomadic_conquest_duchy_cb - } - is_valid = { - scope:target_character = { - current_military_strength <= root.a_third_of_current_military_strength - gold < root.gold - } - } - on_failure = { - ai_start_best_war = { - cb = { - claim_cb - county_conquest_cb - vassalization_cb - individual_county_de_jure_cb - minor_religious_war - county_struggle_cb - ducal_conquest_cb - nomadic_conquest_duchy_cb - } - is_valid = { - scope:target_character = { - current_military_strength <= root.a_third_of_current_military_strength - gold < root.gold - } - } - on_failure = { - ai_start_best_war = { - cb = { - claim_cb - county_conquest_cb - individual_county_de_jure_cb - minor_religious_war - county_struggle_cb - ducal_conquest_cb - nomadic_conquest_cb - } - is_valid = { - scope:target_character = { - current_military_strength < root.forty_percent_of_current_military_strength - gold < root.gold - } - } - on_failure = { - ai_start_best_war = { - cb = { - claim_cb - county_conquest_cb - individual_county_de_jure_cb - minor_religious_war - county_struggle_cb - ducal_conquest_cb - nomadic_conquest_cb - } - } - } - } - ai_start_best_war = { - cb = { - claim_cb - county_conquest_cb - individual_county_de_jure_cb - minor_religious_war - county_struggle_cb - ducal_conquest_cb - nomadic_conquest_cb - } - is_valid = { - scope:target_character = { - current_military_strength < root.forty_percent_of_current_military_strength - gold < root.gold - } - } - } - } - } - ai_start_best_war = { - cb = { - claim_cb - county_conquest_cb - individual_county_de_jure_cb - minor_religious_war - county_struggle_cb - ducal_conquest_cb - nomadic_conquest_cb - } - is_valid = { - scope:target_character = { - current_military_strength <= root.a_third_of_current_military_strength - gold < root.gold - } - } - } - ai_start_best_war = { - cb = { - claim_cb - county_conquest_cb - individual_county_de_jure_cb - minor_religious_war - county_struggle_cb - ducal_conquest_cb - nomadic_conquest_cb - } - is_valid = { - scope:target_character = { - current_military_strength <= root.a_third_of_current_military_strength - gold < root.gold - } - } - } - } - } - ai_start_best_war = { - cb = { - claim_cb - duchy_conquest_cb - religious_war - vassalization_cb - individual_duchy_de_jure_cb - de_jure_cb - de_jure_cb_nomadic - nomadic_conquest_duchy_cb - } - is_valid = { - scope:target_character = { - current_military_strength <= root.a_third_of_current_military_strength - gold < root.gold - } - } - } - ai_start_best_war = { - cb = { - claim_cb - duchy_conquest_cb - religious_war - vassalization_cb - individual_duchy_de_jure_cb - de_jure_cb - de_jure_cb_nomadic - nomadic_conquest_duchy_cb - } - is_valid = { - scope:target_character = { - current_military_strength <= root.a_third_of_current_military_strength - gold < root.gold - } - } - } - } - } - } - } - } - } - } - else = { # Then everything else - # Start one very high-impact war with a very good CB - ai_start_best_war = { - cb = { - major_religious_war - invasion_war - clan_invasion_war - directed_great_holy_war - tribal_subjugation_cb - de_jure_cb - de_jure_cb_nomadic - } - is_valid = { - } - on_failure = { - # Either go for one decent war, or three 'small' wars immediately - random_list = { - 50 = { - ai_start_best_war = { - cb = { - claim_cb - duchy_conquest_cb - religious_war - vassalization_cb - individual_duchy_de_jure_cb - sovereignty_cb - nomadic_conquest_duchy_cb - } - is_valid = { - trigger_if = { - limit = { - scope:casus_belli_type = casus_belli_type:claim_cb - } - scope:target_title.tier > tier_county - } - scope:target_character = { - current_military_strength < root.current_military_strength - OR = { - gold < root.gold - current_military_strength <= root.fifty_percent_of_current_military_strength - } - } - } - on_failure = { - ai_start_best_war = { - cb = { - claim_cb - county_conquest_cb - individual_county_de_jure_cb - minor_religious_war - county_struggle_cb - ducal_conquest_cb - nomadic_conquest_cb - } - is_valid = { - scope:target_character = { - current_military_strength <= root.a_third_of_current_military_strength - gold < root.gold - } - } - on_failure = { - ai_start_best_war = { - cb = { - claim_cb - county_conquest_cb - individual_county_de_jure_cb - minor_religious_war - county_struggle_cb - ducal_conquest_cb - nomadic_conquest_cb - } - is_valid = { - scope:target_character = { - current_military_strength < root.forty_percent_of_current_military_strength - gold < root.gold - } - } - on_failure = { - ai_start_best_war = { - cb = { - claim_cb - county_conquest_cb - individual_county_de_jure_cb - minor_religious_war - county_struggle_cb - ducal_conquest_cb - nomadic_conquest_cb - } - } - } - } - ai_start_best_war = { - cb = { - claim_cb - county_conquest_cb - individual_county_de_jure_cb - minor_religious_war - county_struggle_cb - ducal_conquest_cb - nomadic_conquest_cb - } - is_valid = { - scope:target_character = { - current_military_strength < root.forty_percent_of_current_military_strength - gold < root.gold - } - } - } - } - } - ai_start_best_war = { - cb = { - claim_cb - county_conquest_cb - individual_county_de_jure_cb - minor_religious_war - county_struggle_cb - ducal_conquest_cb - nomadic_conquest_cb - } - is_valid = { - scope:target_character = { - current_military_strength <= root.a_third_of_current_military_strength - gold < root.gold - } - } - } - ai_start_best_war = { - cb = { - claim_cb - county_conquest_cb - individual_county_de_jure_cb - minor_religious_war - county_struggle_cb - ducal_conquest_cb - nomadic_conquest_cb - } - is_valid = { - scope:target_character = { - current_military_strength <= root.a_third_of_current_military_strength - gold < root.gold - } - } - } - } - } - } - 50 = { - ai_start_best_war = { - cb = { - claim_cb - duchy_conquest_cb - religious_war - vassalization_cb - individual_duchy_de_jure_cb - tribal_subjugation_cb - de_jure_cb - de_jure_cb_nomadic - nomadic_conquest_duchy_cb - } - is_valid = { - scope:target_character = { - current_military_strength <= root.a_third_of_current_military_strength - gold < root.gold - } - } - on_failure = { - ai_start_best_war = { - cb = { - claim_cb - county_conquest_cb - vassalization_cb - individual_county_de_jure_cb - minor_religious_war - county_struggle_cb - ducal_conquest_cb - nomadic_conquest_duchy_cb - } - is_valid = { - scope:target_character = { - current_military_strength <= root.a_third_of_current_military_strength - gold < root.gold - } - } - on_failure = { - ai_start_best_war = { - cb = { - claim_cb - county_conquest_cb - individual_county_de_jure_cb - minor_religious_war - county_struggle_cb - ducal_conquest_cb - nomadic_conquest_cb - } - is_valid = { - scope:target_character = { - current_military_strength < root.forty_percent_of_current_military_strength - gold < root.gold - } - } - on_failure = { - ai_start_best_war = { - cb = { - claim_cb - county_conquest_cb - individual_county_de_jure_cb - minor_religious_war - county_struggle_cb - ducal_conquest_cb - nomadic_conquest_cb - } - } - } - } - ai_start_best_war = { - cb = { - claim_cb - county_conquest_cb - individual_county_de_jure_cb - minor_religious_war - county_struggle_cb - ducal_conquest_cb - nomadic_conquest_cb - } - is_valid = { - scope:target_character = { - current_military_strength < root.forty_percent_of_current_military_strength - gold < root.gold - } - } - } - } - } - ai_start_best_war = { - cb = { - claim_cb - county_conquest_cb - individual_county_de_jure_cb - minor_religious_war - county_struggle_cb - ducal_conquest_cb - nomadic_conquest_cb - } - is_valid = { - scope:target_character = { - current_military_strength <= root.a_third_of_current_military_strength - gold < root.gold - } - } - } - ai_start_best_war = { - cb = { - claim_cb - county_conquest_cb - individual_county_de_jure_cb - minor_religious_war - county_struggle_cb - ducal_conquest_cb - nomadic_conquest_cb - } - is_valid = { - scope:target_character = { - current_military_strength <= root.a_third_of_current_military_strength - gold < root.gold - } - } - } - } - } - ai_start_best_war = { - cb = { - claim_cb - duchy_conquest_cb - religious_war - vassalization_cb - individual_duchy_de_jure_cb - de_jure_cb - de_jure_cb_nomadic - nomadic_conquest_duchy_cb - } - is_valid = { - scope:target_character = { - current_military_strength <= root.a_third_of_current_military_strength - gold < root.gold - } - } - } - ai_start_best_war = { - cb = { - claim_cb - duchy_conquest_cb - religious_war - vassalization_cb - individual_duchy_de_jure_cb - de_jure_cb - de_jure_cb_nomadic - nomadic_conquest_duchy_cb - } - is_valid = { - scope:target_character = { - current_military_strength <= root.a_third_of_current_military_strength - gold < root.gold - } - } - } - } - } - } - } - } - } - - - ###### Get claimants to join your court! - if = { - limit = { - is_ai = yes - highest_held_title_tier >= tier_duchy - is_at_war = no - war_chest_gold >= war_chest_gold_maximum - NOT = { - has_character_flag = conqueror_pacing_flag - } - ai_should_get_conqueror_bonuses = yes - } - random_character_to_title_neighboring_duchy = { - limit = { - holder ?= { - top_liege.current_military_strength < scope:root_scope.current_military_strength - } - any_claimant = { - is_ruler = no - is_physically_able_adult = yes - NOT = { - is_weak_claimant_due_to_gender_trigger = { FAITH = this.faith CHARACTER = this } - } - OR = { - is_pool_character = yes - liege ?= { - NOR = { - is_ai = no - is_parent_of = prev - is_grandparent_of = prev - is_great_grandparent_of = prev - this = scope:root_scope - } - } - } - } - } - random_claimant = { - limit = { - is_ruler = no - is_physically_able_adult = yes - NOT = { - is_weak_claimant_due_to_gender_trigger = { FAITH = this.faith CHARACTER = this } - } - OR = { - is_pool_character = yes - liege ?= { - NOR = { - is_ai = no - is_parent_of = prev - is_grandparent_of = prev - is_great_grandparent_of = prev - this = scope:root_scope - } - } - } - } - scope:root_scope = { - add_courtier = prev - } - } - } - } - } -} diff --git a/N3OW/common/scripted_effects/00_ai_value_effects.txt b/N3OW/common/scripted_effects/00_ai_value_effects.txt deleted file mode 100644 index 16faaae4..00000000 --- a/N3OW/common/scripted_effects/00_ai_value_effects.txt +++ /dev/null @@ -1,875 +0,0 @@ - -##################################################################### -# EFFECT LIST -##################################################################### -# !!! Remember to add all new effects with a short description here !!! - -#remove_adultery_variables_effect - -##################################################################### -# EFFECTS -##################################################################### - -#Saves a scope value with the "strongest" ai value (not exact values but based on the low/medium/high values in 00_ai_values.txt) -strongest_ai_value_effect = { - random_list = { - 1 = { #Positive boldness - trigger = { ai_boldness > 0 } - modifier = { - ai_boldness >= low_positive_boldness - factor = 100 - } - modifier = { - ai_boldness >= medium_positive_boldness - factor = 100 - } - modifier = { - ai_boldness >= high_positive_boldness - factor = 100 - } - set_variable = { - name = strongest_ai_value - value = flag:positive_boldness - } - } - 1 = { #Positive compassion - trigger = { ai_compassion > 0 } - modifier = { - ai_compassion >= low_positive_compassion - factor = 100 - } - modifier = { - ai_compassion >= medium_positive_compassion - factor = 100 - } - modifier = { - ai_compassion >= high_positive_compassion - factor = 100 - } - set_variable = { - name = strongest_ai_value - value = flag:positive_compassion - } - } - 1 = { #Positive greed - trigger = { ai_greed > 0 } - modifier = { - ai_greed >= low_positive_greed - factor = 100 - } - modifier = { - ai_greed >= medium_positive_greed - factor = 100 - } - modifier = { - ai_greed >= high_positive_greed - factor = 100 - } - set_variable = { - name = strongest_ai_value - value = flag:positive_greed - } - } - 1 = { #Positive energy - trigger = { ai_energy > 0 } - modifier = { - ai_energy >= low_positive_energy - factor = 100 - } - modifier = { - ai_energy >= medium_positive_energy - factor = 100 - } - modifier = { - ai_energy >= high_positive_energy - factor = 100 - } - set_variable = { - name = strongest_ai_value - value = flag:positive_energy - } - } - 1 = { #Positive honor - trigger = { ai_honor > 0 } - modifier = { - ai_honor >= low_positive_honor - factor = 100 - } - modifier = { - ai_honor >= medium_positive_honor - factor = 100 - } - modifier = { - ai_honor >= high_positive_honor - factor = 100 - } - set_variable = { - name = strongest_ai_value - value = flag:positive_honor - } - } - 1 = { #Positive rationality - trigger = { ai_rationality > 0 } - modifier = { - ai_rationality >= low_positive_rationality - factor = 100 - } - modifier = { - ai_rationality >= medium_positive_rationality - factor = 100 - } - modifier = { - ai_rationality >= high_positive_rationality - factor = 100 - } - set_variable = { - name = strongest_ai_value - value = flag:positive_rationality - } - } - 1 = { #Positive vengefulness - trigger = { ai_vengefulness > 0 } - modifier = { - ai_vengefulness >= low_positive_vengefulness - factor = 100 - } - modifier = { - ai_vengefulness >= medium_positive_vengefulness - factor = 100 - } - modifier = { - ai_vengefulness >= high_positive_vengefulness - factor = 100 - } - set_variable = { - name = strongest_ai_value - value = flag:positive_vengefulness - } - } - 1 = { #Positive zeal - trigger = { ai_zeal > 0 } - modifier = { - ai_zeal >= low_positive_zeal - factor = 100 - } - modifier = { - ai_zeal >= medium_positive_zeal - factor = 100 - } - modifier = { - ai_zeal >= high_positive_zeal - factor = 100 - } - set_variable = { - name = strongest_ai_value - value = flag:positive_zeal - } - } - 1 = { #negative boldness - trigger = { ai_boldness < 0 } - modifier = { - ai_boldness <= low_negative_boldness - factor = 100 - } - modifier = { - ai_boldness <= medium_negative_boldness - factor = 100 - } - modifier = { - ai_boldness <= high_negative_boldness - factor = 100 - } - set_variable = { - name = strongest_ai_value - value = flag:negative_boldness - } - } - 1 = { #negative compassion - trigger = { ai_compassion < 0 } - modifier = { - ai_compassion <= low_negative_compassion - factor = 100 - } - modifier = { - ai_compassion <= medium_negative_compassion - factor = 100 - } - modifier = { - ai_compassion <= high_negative_compassion - factor = 100 - } - set_variable = { - name = strongest_ai_value - value = flag:negative_compassion - } - } - 1 = { #negative greed - trigger = { ai_greed < 0 } - modifier = { - ai_greed <= low_negative_greed - factor = 100 - } - modifier = { - ai_greed <= medium_negative_greed - factor = 100 - } - modifier = { - ai_greed <= high_negative_greed - factor = 100 - } - set_variable = { - name = strongest_ai_value - value = flag:negative_greed - } - } - 1 = { #negative energy - trigger = { ai_energy < 0 } - modifier = { - ai_energy <= low_negative_energy - factor = 100 - } - modifier = { - ai_energy <= medium_negative_energy - factor = 100 - } - modifier = { - ai_energy <= high_negative_energy - factor = 100 - } - set_variable = { - name = strongest_ai_value - value = flag:negative_energy - } - } - 1 = { #negative honor - trigger = { ai_honor < 0 } - modifier = { - ai_honor <= low_negative_honor - factor = 100 - } - modifier = { - ai_honor <= medium_negative_honor - factor = 100 - } - modifier = { - ai_honor <= high_negative_honor - factor = 100 - } - set_variable = { - name = strongest_ai_value - value = flag:negative_honor - } - } - 1 = { #negative rationality - trigger = { ai_rationality < 0 } - modifier = { - ai_rationality <= low_negative_rationality - factor = 100 - } - modifier = { - ai_rationality <= medium_negative_rationality - factor = 100 - } - modifier = { - ai_rationality <= high_negative_rationality - factor = 100 - } - set_variable = { - name = strongest_ai_value - value = flag:negative_rationality - } - } - 1 = { #negative vengefulness - trigger = { ai_vengefulness < 0 } - modifier = { - ai_vengefulness <= low_negative_vengefulness - factor = 100 - } - modifier = { - ai_vengefulness <= medium_negative_vengefulness - factor = 100 - } - modifier = { - ai_vengefulness <= high_negative_vengefulness - factor = 100 - } - set_variable = { - name = strongest_ai_value - value = flag:negative_vengefulness - } - } - 1 = { #negative zeal - trigger = { ai_zeal < 0 } - modifier = { - ai_zeal <= low_negative_zeal - factor = 100 - } - modifier = { - ai_zeal <= medium_negative_zeal - factor = 100 - } - modifier = { - ai_zeal <= high_negative_zeal - factor = 100 - } - set_variable = { - name = strongest_ai_value - value = flag:negative_zeal - } - } - } -} - -ai_chance_to_become_conqueror_effect = { - save_scope_as = possible_conqueror - if = { - limit = { - NOT = { has_game_rule = no_conquerors_frequency } - ai_has_cautious_personality = no - top_liege = this - is_landed = yes - is_adult = yes - age <= 60 - NOT = { is_incapable = yes } - ai_boldness >= 0 - ai_greed >= 0 - gold >= 50 - is_at_war = no - highest_held_title_tier >= tier_duchy - domain_size >= 3 - NOR = { - any_ally = { - is_ai = no # Would be annoying as conquerors don't help their allies - } - mpo_has_gok_mongol_empire_trigger = yes - has_character_flag = used_to_be_conqueror - } - any_neighboring_and_across_water_top_liege_realm_owner = { - scope:possible_conqueror = { - has_any_cb_on = prev - current_military_strength >= prev.current_military_strength - } - } - NOT = { - any_owned_story = { - story_type = story_take_mandate_of_heaven - } - } - trigger_if = { - limit = { - OR = { - has_game_rule = strong_default_conquerors_frequency - has_game_rule = strong_few_conquerors_frequency - has_game_rule = strong_very_few_conquerors_frequency - has_game_rule = strong_many_conquerors_frequency - } - } - sub_realm_size >= 15 - domain_size >= 4 - current_military_strength >= 3000 - gold >= 500 - age <= 35 - } - OR = { - AND = { - is_ai = no - NOT = { has_game_rule = no_conquerors_bonuses } - } - AND = { - exists = global_var:active_conquerors - global_var:active_conquerors < 12 - } - } - } - random = { - chance = { - value = 0.25 - add = { - value = primary_title.tier - divide = 12 - } - if = { - limit = { - martial >= 10 - } - add = { - value = martial - divide = 5 - } - } - if = { - limit = { - intrigue >= 10 - } - add = { - value = intrigue - divide = 10 - } - } - if = { - limit = { - diplomacy >= 10 - } - add = { - value = diplomacy - divide = 10 - } - } - if = { - limit = { - has_trait = brave - } - add = 0.25 - } - if = { - limit = { - has_trait = ambitious - } - add = 0.5 - } - if = { - limit = { - has_trait = compassionate - } - add = -0.25 - } - if = { - limit = { - has_trait = shy - } - add = -0.25 - } - if = { - limit = { - has_trait = lazy - } - add = -0.25 - } - if = { - limit = { - has_trait = content - } - add = -1 - } - if = { - limit = { - has_trait = craven - } - add = -1 - } - if = { - limit = { - ai_has_warlike_personality = yes - } - add = 0.25 - } - if = { - limit = { - OR = { - government_has_flag = government_is_tribal - government_has_flag = government_is_clan - } - } - add = 1.5 - } - if = { - limit = { - government_has_flag = government_is_nomadic - } - add = 2 - } - if = { - limit = { - government_has_flag = government_is_nomadic - highest_held_title_tier >= tier_kingdom - domicile.herd >= 10000 - } - add = 2 - } - if = { - limit = { - gold >= massive_gold_value - } - add = 0.25 - } - if = { - limit = { - war_chest_gold >= war_chest_gold_maximum - } - add = 0.25 - } - if = { - limit = { - culture = { has_cultural_pillar = ethos_bellicose } - } - add = 0.25 - } - if = { - limit = { - prestige_level >= 3 - } - add = 0.25 - } - if = { - limit = { - faith = { has_doctrine = tenet_warmonger } - } - add = 0.25 - } - if = { - limit = { - culture = { has_cultural_parameter = reduced_cost_for_conversion_to_pacifist_faith } - } - add = -0.25 - } - if = { - limit = { - faith = { has_doctrine_parameter = pacifist_opinion_active } - } - add = -0.25 - } - if = { - limit = { - ai_has_economical_boom_personality = yes - } - add = -0.25 - } - if = { - limit = { - can_use_conquest_cbs_trigger = yes - } - add = 2 - } - if = { - limit = { - can_use_conquest_cbs_trigger = no - } - add = -0.5 - } - if = { - limit = { - can_use_conquest_cbs_trigger = yes - primary_title.tier >= tier_kingdom - prestige_level >= 2 - gold >= major_gold_value - } - add = 4 - } - if = { # Caliphs/caliph-holders should often become conquerors - limit = { - faith = { has_doctrine = doctrine_temporal_head } - OR = { - this = faith.religious_head - any_vassal_or_below = { - this = faith.religious_head - } - } - } - add = 5 - } - if = { - limit = { - primary_title = { has_title_law = princely_elective_succession_law } - } - add = -0.25 - } - if = { - limit = { - has_trait = education_martial_5 - } - add = 1 - } - if = { - limit = { - is_ai = yes - OR = { - has_character_modifier = bp2_destined_modifier - has_character_modifier = bp2_tool_of_fate_modifier - } - } - add = 2 - } - if = { - limit = { - is_ai = yes - OR = { - has_character_modifier = a_cultures_great_defender_modifier - has_character_modifier = inspired_defenders_modifier - has_character_modifier = uniter_and_conqueror_modifier - } - } - add = 2 - } - if = { - limit = { - is_ai = no - } - add = -2.5 - } - if = { - limit = { - is_ai = no - has_game_rule = hard_difficulty - } - add = -7.5 - } - else_if = { - limit = { - is_ai = no - has_game_rule = very_hard_difficulty - } - add = -50 - } - if = { - limit = { - is_ai = yes - AND = { - exists = global_var:active_conquerors - global_var:active_conquerors >= 3 - } - } - add = -1 - } - if = { - limit = { - is_ai = yes - AND = { - exists = global_var:active_conquerors - global_var:active_conquerors >= 5 - } - } - add = -3.5 - } - if = { - limit = { - is_ai = yes - AND = { - exists = global_var:active_conquerors - global_var:active_conquerors >= 7 - } - } - add = -2 - } - if = { - limit = { - is_ai = yes - AND = { - exists = global_var:active_conquerors - global_var:active_conquerors >= 10 - } - } - add = -2 - } - if = { - limit = { - is_ai = no - OR = { - has_character_modifier = bp2_destined_modifier - has_character_modifier = bp2_tool_of_fate_modifier - } - } - multiply = 5 - } - if = { - limit = { - is_ai = no - OR = { - has_character_modifier = a_cultures_great_defender_modifier - has_character_modifier = inspired_defenders_modifier - has_character_modifier = uniter_and_conqueror_modifier - } - } - multiply = 5 - } - if = { - limit = { - OR = { - has_game_rule = few_conquerors_frequency - has_game_rule = strong_few_conquerors_frequency - } - } - multiply = 0.5 - } - if = { - limit = { - OR = { - has_game_rule = very_few_conquerors_frequency - has_game_rule = strong_very_few_conquerors_frequency - } - } - multiply = 0.1 - } - if = { - limit = { - is_ai = yes - has_game_rule = strong_many_conquerors_frequency - } - add = 0.5 - } - if = { - limit = { - is_ai = yes - OR = { - has_game_rule = many_conquerors_frequency - has_game_rule = strong_many_conquerors_frequency - } - } - add = 0.5 - multiply = 2 - } - } - if = { - limit = { - is_ai = no - } - trigger_event = { - id = conqueror.0001 - days = 10 - } - } - else = { - trigger_event = conqueror.0001 - } - } - } -} - -ai_chance_to_become_mandala_godking_effect = { - save_scope_as = possible_godking - if = { - limit = { - top_overlord = this - is_landed = yes - age <= 50 - NOT = { is_incapable = yes } - is_ai = yes - is_at_war = no - trigger_if = { - limit = { exists = global_var:active_mandalas } - global_var:active_mandalas < 5 - } - any_neighboring_and_across_water_top_liege_realm_owner = { - OR = { - current_military_strength < scope:possible_godking.current_military_strength - any_tributary = { - in_diplomatic_range = scope:possible_godking - current_military_strength < scope:possible_godking.current_military_strength - } - } - } - #There aren't already 2 active Mandala Capitals in the dejure Kingdom - less_than_max_amount_of_mandala_capitals_trigger = yes - } - - random = { - chance = { - value = 50 - #If has Mandala Capital or Ruined Capital make into 100 - if = { - limit = { has_mandala_capital_trigger = yes } - add = 100 - } - add = primary_title.tier - if = { - limit = { martial >= 10 } - add = { - value = martial - divide = 5 - } - } - if = { - limit = { intrigue >= 10 } - add = { - value = intrigue - divide = 10 - } - } - if = { - limit = { diplomacy >= 10 } - add = { - value = diplomacy - divide = 10 - } - } - if = { - limit = { stewardship >= 10 } - add = { - value = stewardship - divide = 10 - } - } - if = { - limit = { learning >= 10 } - add = { - value = learning - divide = 10 - } - } - if = { - limit = { has_trait = zealous } - add = 1 - } - if = { - limit = { has_trait = pilgrim } - add = 1 - } - if = { - limit = { has_trait = brave } - add = 0.25 - } - if = { - limit = { has_trait = ambitious } - add = 0.5 - } - if = { - limit = { has_trait = compassionate } - add = -0.25 - } - if = { - limit = { has_trait = shy } - add = -0.25 - } - if = { - limit = { has_trait = lazy } - add = -0.25 - } - if = { - limit = { has_trait = content } - add = -1 - } - if = { - limit = { has_trait = craven } - add = -1 - } - if = { - limit = { has_trait = cynical } - add = -1 - } - if = { - limit = { gold >= massive_gold_value } - add = 1 - } - if = { - limit = { - house = { has_house_power_parameter = aspect_of_destruction } - war_chest_gold >= war_chest_gold_maximum - } - add = 1 - } - add = piety_level - if = { - limit = { - OR = { - has_trait = education_diplomacy_5 - has_trait = education_stewardship_5 - has_trait = education_intrigue_5 - has_trait = education_martial_5 - } - } - add = 1 - } - } - create_story = story_mandala - } - } -} diff --git a/N3OW/common/scripted_effects/00_alert_actions_effects.txt b/N3OW/common/scripted_effects/00_alert_actions_effects.txt deleted file mode 100644 index 6fcbfb72..00000000 --- a/N3OW/common/scripted_effects/00_alert_actions_effects.txt +++ /dev/null @@ -1,32 +0,0 @@ -try_create_lawfully_imprison = { - if = { - limit = { - is_imprisoned = no - root = { - has_imprisonment_reason = prev - } - } - try_create_important_action = { - important_action_type = action_can_lawfully_imprison - actor = root - recipient = this - } - } -} - -try_create_pardon = { - if = { - limit = { - target_is_liege_or_above = root - is_imprisoned = no - root = { - has_imprisonment_reason = prev - } - } - try_create_important_action = { - important_action_type = action_can_pardon - actor = root - recipient = this - } - } -} \ No newline at end of file diff --git a/N3OW/common/scripted_effects/00_almohad_invasion_effects.txt b/N3OW/common/scripted_effects/00_almohad_invasion_effects.txt deleted file mode 100644 index 362ba391..00000000 --- a/N3OW/common/scripted_effects/00_almohad_invasion_effects.txt +++ /dev/null @@ -1,376 +0,0 @@ -find_title_for_almohad_spawn_effect = { - if = { # The important thing is to not mess too much with players who can't resist - limit = { - title:c_tinmallal = { - holder = { is_ai = yes } - OR = { - NOT = { exists = duchy.holder } - duchy.holder = { is_ai = yes } - } - } - } - title:c_tinmallal = { - save_scope_as = almohad_county - } - } - else = { - title:k_maghreb = { - random_in_de_jure_hierarchy = { - continue = { tier > tier_county } - limit = { - tier = tier_county - holder = { is_ai = yes } # Let's not murder players - NOT = { this = title:c_marrakesh } - save_temporary_scope_as = potential_almohad_county - # If someone holds k_maghreb, put the Almohads in their realm - trigger_if = { - limit = { exists = title:k_maghreb.holder } - title:k_maghreb.holder = { - OR = { - this = scope:potential_almohad_county.holder - any_sub_realm_county = { - this = scope:potential_almohad_county - } - } - } - } - # Either this should be the holder's only title, or it should NOT be their capital - trigger_if = { - limit = { - holder = { - any_sub_realm_county = { count > 1 } - } - } - this != holder.capital_county - } - } - weight = { - base = 1 - # Prefer already Muslim counties - modifier = { - add = 5 - religion = religion:islam_religion - } - # Massively prefer to avoid a player-held Duchies if possible - modifier = { - factor = 0.01 - exists = duchy.holder - duchy.holder = { is_ai = no } - } - } - save_scope_as = almohad_county - } - } - } - - if = { # Discard stuff from here on out - limit = { NOT = { exists = scope:almohad_county } } - debug_log = "No Almohad title found, Almohad's won't spawn" - } - # Convert the County and warn relevant people - else = { - set_global_variable = { - name = spawned_almohads - value = yes - } - scope:almohad_county = { - set_county_faith = faith:masmudi - } - scope:almohad_county.holder = { - if = { - limit = { - is_ai = no - } - trigger_event = almohad.1001 - } - every_liege_or_above = { - limit = { is_ai = no } - trigger_event = almohad.1001 - } - } - trigger_event = { # Random amount of time to convert the province or otherwise prepare - id = almohad.0002 - days = { 400 1000 } - } - } -} - - -create_almohads_effect = { - create_character = { - template = ibn_tumart_character_template - name = Amghar_ibn_Tumert - location = scope:almohad_county.title_province - dynasty_house = house:house_tumert - save_scope_as = ibn_tumart - } - faith:masmudi = { - change_fervor = { - value = 50 - desc = fervor_gain_almohads - } - } - scope:ibn_tumart = { - create_story = { - type = story_almohad_invasion - save_scope_as = story - } - add_pressed_claim = title:k_maghreb - add_character_modifier = { - modifier = almohad_leader_modifier - } - add_character_flag = { - flag = immune_to_disease - years = 15 - } - } - scope:story = { - set_variable = { - name = ibn_tumart - value = scope:ibn_tumart - } - set_variable = { - name = almohad_county - value = scope:almohad_county - } - } - almohads_find_target_titles_effect = yes - - find_almohad_titles_and_assign_to_ibn_tumart_effect = yes - - create_character = { - template = abd_al_mumin_character_template - name = Abd_al_Mu_min - employer = scope:ibn_tumart - dynasty_house = house:house_almohad - save_scope_as = al_mumin - } - scope:al_mumin = { - add_pressed_claim = title:k_maghreb - add_character_modifier = { - modifier = almohad_leader_modifier - } - add_character_flag = { - flag = immune_to_disease - years = 15 - } - } - scope:story = { - set_variable = { - name = al_mumin - value = scope:al_mumin - } - } - - scope:almohad_county.holder = { - set_global_variable = { - name = almohads_waiting_for_player_responses - value = 0 - years = 1 # Clear out eventually, just in case - } - set_global_variable = { - name = almohads_player_responses_received - value = 0 - years = 1 # Clear out eventually, just in case - } - if = { - limit = { is_ai = no } - change_global_variable = { - name = almohads_waiting_for_player_responses - add = 1 - } - trigger_event = almohad.1002 - } - every_liege_or_above = { - limit = { is_ai = no } - change_global_variable = { - name = almohads_waiting_for_player_responses - add = 1 - } - trigger_event = almohad.1002 - } - if = { - limit = { - global_var:almohads_waiting_for_player_responses = 0 - } - remove_global_variable = almohads_waiting_for_player_responses - remove_global_variable = almohads_player_responses_received - almohads_go_to_war_effect = yes - } - else = { - trigger_event = { - id = almohad.0004 - days = 5 - } - } - } -} - -find_almohad_titles_and_assign_to_ibn_tumart_effect = { - - create_title_and_vassal_change = { - type = usurped - save_scope_as = change - add_claim_on_loss = no - } - scope:almohad_county = { - change_title_holder = { - holder = scope:ibn_tumart - change = scope:change - take_baronies = yes - } - } - resolve_title_and_vassal_change = scope:change - - create_title_and_vassal_change = { - type = created - save_scope_as = change - add_claim_on_loss = no - } - scope:ibn_tumart.faith.religious_head_title = { - change_title_holder = { - holder = scope:ibn_tumart - change = scope:change - } - } - resolve_title_and_vassal_change = scope:change -} - -almohads_go_to_war_effect = { - scope:ibn_tumart = { - almohads_become_independent_effect = yes - almohads_declare_war_for_target_title_effect = yes - spawn_first_almohad_troops_effect = yes - } -} - -almohads_become_independent_effect = { - hidden_effect = { - if = { - limit = { scope:ibn_tumart = { is_imprisoned = yes } } - scope:ibn_tumart = { release_from_prison = yes } - } - } - create_title_and_vassal_change = { - type = independency - save_scope_as = going_independent - add_claim_on_loss = no - } - scope:ibn_tumart = { - becomes_independent = { - change = scope:going_independent - } - } - - resolve_title_and_vassal_change = scope:going_independent -} - -almohads_find_target_titles_effect = { - if = { - limit = { exists = title:k_maghreb.holder } - title:k_maghreb = { - save_scope_as = maghreb_target_title - holder = { - save_scope_as = first_target - } - } - if = { - limit = { - NOT = { scope:almohad_county.holder.top_liege = title:k_maghreb.holder.top_liege } - scope:almohad_county.holder.top_liege = { - any_sub_realm_county = { - this != scope:almohad_county - kingdom = title:k_maghreb - } - } - } - scope:almohad_county.holder.top_liege = { - save_scope_as = second_target - } - } - } - else = { - ordered_independent_ruler = { - limit = { highest_held_title_tier > tier_county } - order_by = titles_held_in_k_maghreb - position = 0 - save_scope_as = first_target - } - } -} - - -almohads_declare_war_for_target_title_effect = { - save_scope_as = war_leader - if = { - limit = { exists = scope:first_target } - start_war = { - cb = claim_cb - target = scope:first_target - claimant = scope:war_leader - target_title = scope:maghreb_target_title - } - - if = { - limit = { - exists = scope:second_target - NOT = { exists = global_var:almohads_do_not_attack_second_target } - } - start_war = { - cb = claim_cb - target = scope:second_target - claimant = scope:war_leader - target_title = scope:maghreb_target_title - } - } - } - if = { - limit = { exists = global_var:almohads_do_not_attack_second_target } - remove_global_variable = almohads_do_not_attack_second_target - } - else = { - debug_log = "Failed to find a valid war target for the Almohads!" - } -} - - -spawn_first_almohad_troops_effect = { - spawn_army = { - uses_supply = yes - inheritable = no - name = first_almohad_event_troops - levies = { - value = 1000 - } - location = scope:ibn_tumart.capital_province - } -} - -spawn_second_almohad_troops_effect = { - if = { - limit = { - is_at_war = yes - } - ordered_war_enemy = { - order_by = max_military_strength - position = 0 - save_scope_as = powerful_war_enemy - } - spawn_army = { - uses_supply = yes - inheritable = no - name = second_almohad_event_troops - levies = { - if = { - limit = { exists = scope:powerful_war_enemy } - add = scope:powerful_war_enemy.max_military_strength - multiply = 2 - } - else = { - add = 3000 - } - } - location = capital_province - } - } -} diff --git a/N3OW/common/scripted_effects/00_animal_effects.txt b/N3OW/common/scripted_effects/00_animal_effects.txt deleted file mode 100644 index 0272a049..00000000 --- a/N3OW/common/scripted_effects/00_animal_effects.txt +++ /dev/null @@ -1,2339 +0,0 @@ -#Effects used in animal events - - -##################################################################### -# EFFECT LIST -##################################################################### -# !!! Remember to add all new effects here !!! -# - -# CAT -#start_cat_story_cycle_effect -#assign_name_options_cat_story_cycle_effect -#assign_cat_gender_effect -#assign_cat_fur_color_effect -#assign_cat_eye_color_effect -#remove_cat_story_modifiers_effect -#transfer_cat_story_cycle_to_effect - -#DOG -#start_dog_story_cycle_effect -#assign_name_options_dog_story_cycle_effect -#assign_dog_gender_effect -#assign_dog_fur_color_effect -#assign_dog_eye_color_effect -#dog_got_pregnant_effect -#remove_dog_story_modifiers_effect -#transfer_dog_story_cycle_to_effect - -#WARHORSE -#start_warhorse_story_cycle_effect -#assign_horse_gender_effect -#level_horse_modifier_effect -#remove_horse_story_modifiers_effect - -#EAGLE -#start_eagle_story_cycle_effect -#assign_eagle_gender_effect -#assign_name_options_eagle_story_cycle_effect - -###################################################################### -# EFFECTS -###################################################################### - -######## -# CAT -######## - -#Effect to start the story and show the right modifier -start_cat_story_cycle_effect = { - show_as_tooltip = { - add_character_modifier = { - modifier = cat_story_modifier - } - } - hidden_effect = { - create_story = story_cycle_pet_cat - } -} - -#Pick out name options to show -assign_name_options_cat_story_cycle_effect = { - random_list = { - 1 = { #A cat who prowled around Beaulieu Abbey in the 13th century - trigger = { NOT = { has_character_flag = name_mite } } - add_character_flag = name_mite - } - 1 = { - trigger = { NOT = { has_character_flag = name_paws } } - add_character_flag = name_paws - } - 1 = { - trigger = { NOT = { has_character_flag = name_mittens } } - add_character_flag = name_mittens - } - 10 = { - trigger = { - NOT = { has_character_flag = name_gray } - scope:story.var:cat_fur_color = flag:gray - } - add_character_flag = name_gray - } - 10 = { - trigger = { - NOT = { has_character_flag = name_flame } - scope:story.var:cat_fur_color = flag:orange - } - add_character_flag = name_flame - } - 10 = { - trigger = { - NOT = { has_character_flag = name_snow } - scope:story.var:cat_fur_color = flag:white - } - add_character_flag = name_snow - } - 10 = { - trigger = { - NOT = { has_character_flag = name_shadow } - scope:story.var:cat_fur_color = flag:black - } - add_character_flag = name_shadow - } - 10 = { - trigger = { - NOT = { has_character_flag = name_spooky } - scope:story.var:cat_fur_color = flag:black - } - add_character_flag = name_spooky - } - 10 = { #Short form of Gilbert - lots of domesticated cats had this name - trigger = { - NOT = { has_character_flag = name_gyb } - has_culture = culture:english - } - add_character_flag = name_gyb - } - 10 = { #From old Irish legal texts - trigger = { - NOT = { has_character_flag = name_meone } - culture = { has_cultural_pillar = heritage_goidelic } - } - add_character_flag = name_meone - } - 10 = { #From old Irish legal texts - trigger = { - NOT = { has_character_flag = name_cruibne } - culture = { has_cultural_pillar = heritage_goidelic } - } - add_character_flag = name_cruibne - } - } -} - -#Assign the gender of the cat -assign_cat_gender_effect = { - save_temporary_scope_value_as = { - name = gender - value = flag:$GENDER$ - } - if = { - limit = { scope:gender = flag:random } - hidden_effect = { - random_list = { - 50 = { - set_variable = { - name = cat_gender - value = flag:female - } - } - 50 = { - set_variable = { - name = cat_gender - value = flag:male - } - } - } - } - } - else_if = { - limit = { - OR = { - scope:gender = flag:male - scope:gender = flag:female - } - } - set_variable = { - name = cat_gender - value = flag:$GENDER$ - } - } -} - -#Assign the fur-color of the cat -assign_cat_fur_color_effect = { - save_temporary_scope_value_as = { - name = fur_color - value = flag:$COLOR$ - } - if = { - limit = { scope:fur_color = flag:random } - hidden_effect = { - random_list = { - 50 = { - set_variable = { - name = cat_fur_color - value = flag:brown - } - } - 50 = { - set_variable = { - name = cat_fur_color - value = flag:gray - } - } - 50 = { - set_variable = { - name = cat_fur_color - value = flag:orange - } - } - 50 = { - set_variable = { - name = cat_fur_color - value = flag:black - } - } - 50 = { - set_variable = { - name = cat_fur_color - value = flag:white - } - } - } - } - } - else_if = { - limit = { - OR = { - scope:fur_color = flag:brown - scope:fur_color = flag:gray - scope:fur_color = flag:orange - scope:fur_color = flag:black - scope:fur_color = flag:white - } - } - set_variable = { - name = cat_fur_color - value = flag:$COLOR$ - } - } -} - -#Assign the eye-color of the cat -assign_cat_eye_color_effect = { - save_temporary_scope_value_as = { - name = eye_color - value = flag:$COLOR$ - } - if = { - limit = { scope:eye_color = flag:random } - hidden_effect = { - random_list = { - 50 = { - set_variable = { - name = cat_eye_color - value = flag:blue - } - } - 50 = { - set_variable = { - name = cat_eye_color - value = flag:yellow - } - } - 50 = { - set_variable = { - name = cat_eye_color - value = flag:green - } - } - 50 = { - set_variable = { - name = cat_eye_color - value = flag:amber - } - } - 50 = { - set_variable = { - name = cat_eye_color - value = flag:copper - } - } - 50 = { - set_variable = { - name = cat_eye_color - value = flag:emerald - } - } - } - } - } - else_if = { - limit = { - OR = { - scope:eye_color = flag:blue - scope:eye_color = flag:yellow - scope:eye_color = flag:green - scope:eye_color = flag:amber - scope:eye_color = flag:copper - scope:eye_color = flag:emerald - } - } - set_variable = { - name = cat_eye_color - value = flag:$COLOR$ - } - } -} - -#Remove everything related to the story -remove_cat_story_modifiers_effect = { - if = { - limit = { - has_character_modifier = cat_story_modifier - } - remove_character_modifier = cat_story_modifier - } - if = { - limit = { - has_character_modifier = cat_story_allergy_modifier - } - remove_character_modifier = cat_story_allergy_modifier - } - if = { - limit = { - any_spouse = { - has_character_modifier = cat_story_allergy_modifier - } - } - random_spouse = { - limit = { - has_character_modifier = cat_story_allergy_modifier - } - remove_character_modifier = cat_story_allergy_modifier - } - } - if = { - limit = { - has_character_modifier = rat_hunting_cat_modifier - } - remove_character_modifier = rat_hunting_cat_modifier - } - if = { - limit = { - has_character_modifier = adventurous_pet_modifier - } - remove_character_modifier = adventurous_pet_modifier - } - if = { - limit = { - has_character_modifier = feral_pet_modifier - } - remove_character_modifier = feral_pet_modifier - } - if = { - limit = { - has_character_modifier = feast_well_fed_cat_modifier - } - remove_character_modifier = feast_well_fed_cat_modifier - } -} - -remove_cat_name_effect = { - remove_variable = story_cycle_cat_name - remove_variable = cat_city - remove_localized_text = story_cycle_cat_name -} - -#Effect to transfer the story to another character -transfer_cat_story_cycle_to_effect = { - remove_cat_story_modifiers_effect = yes - - save_scope_as = original_owner - - $CHARACTER$ = { - if = { - limit = { - scope:original_owner = { - has_variable = cat_city - } - } - set_variable = { - name = cat_city - value = scope:original_owner.var:cat_city - } - } - set_variable = { - name = story_cycle_cat_name - value = $STORY$.var:story_cycle_cat_name - } - if = { - limit = { - scope:original_owner = { is_alive = yes } - } - copy_localized_text = { - key = story_cycle_cat_name - target = scope:original_owner - } - } - add_character_modifier = { - modifier = cat_story_modifier - } - add_character_flag = had_cat_story - } - - remove_cat_name_effect = yes - - $STORY$ = { - make_story_owner = $CHARACTER$ - } -} - - -######## -# DOG -######## - -#Effect to start the story and show the right modifier -start_dog_story_cycle_effect = { - show_as_tooltip = { - add_character_modifier = { - modifier = dog_story_modifier - } - } - hidden_effect = { - create_story = story_cycle_pet_dog - } -} - -#Pick out name options to show -assign_name_options_dog_story_cycle_effect = { - random_list = { - 1 = { - trigger = { NOT = { has_character_flag = name_amiable } } - add_character_flag = name_amiable - } - 1 = { - trigger = { NOT = { has_character_flag = name_nosewise } } - add_character_flag = name_nosewise - } - 1 = { - trigger = { NOT = { has_character_flag = name_holdfast } } - add_character_flag = name_holdfast - } - 10 = { - trigger = { - NOT = { has_character_flag = name_gray } - scope:story.var:dog_fur_color = flag:gray - } - add_character_flag = name_gray - } - 10 = { - trigger = { - NOT = { has_character_flag = name_choplicker } - scope:story.var:dog_fur_color = flag:black - } - add_character_flag = name_choplicker - } - 10 = { - trigger = { - NOT = { has_character_flag = name_shadow } - scope:story.var:dog_fur_color = flag:black - } - add_character_flag = name_shadow - } - 10 = { - trigger = { - NOT = { has_character_flag = name_snow } - scope:story.var:dog_fur_color = flag:white - } - add_character_flag = name_snow - } - } -} - -#Assign the gender of the dog -assign_dog_gender_effect = { - save_temporary_scope_value_as = { - name = gender - value = flag:$GENDER$ - } - if = { - limit = { scope:gender = flag:random } - hidden_effect = { - random_list = { - 50 = { - set_variable = { - name = dog_gender - value = flag:female - } - } - 50 = { - set_variable = { - name = dog_gender - value = flag:male - } - } - } - } - } - else_if = { - limit = { - OR = { - scope:gender = flag:male - scope:gender = flag:female - } - } - set_variable = { - name = dog_gender - value = flag:$GENDER$ - } - } -} - -#Assign the fur-color of the dog -assign_dog_fur_color_effect = { - save_temporary_scope_value_as = { - name = fur_color - value = flag:$COLOR$ - } - if = { - limit = { scope:fur_color = flag:random } - hidden_effect = { - random_list = { - 50 = { - set_variable = { - name = dog_fur_color - value = flag:brown - } - } - 50 = { - set_variable = { - name = dog_fur_color - value = flag:gray - } - } - 50 = { - set_variable = { - name = dog_fur_color - value = flag:black - } - } - 50 = { - set_variable = { - name = dog_fur_color - value = flag:white - } - } - } - } - } - else_if = { - limit = { - OR = { - scope:fur_color = flag:brown - scope:fur_color = flag:gray - scope:fur_color = flag:black - scope:fur_color = flag:white - } - } - set_variable = { - name = dog_fur_color - value = flag:$COLOR$ - } - } -} - -#Assign the eye-color of the dog -assign_dog_eye_color_effect = { - save_temporary_scope_value_as = { - name = eye_color - value = flag:$COLOR$ - } - if = { - limit = { scope:eye_color = flag:random } - hidden_effect = { - random_list = { - 50 = { - set_variable = { - name = dog_eye_color - value = flag:blue - } - } - 50 = { - set_variable = { - name = dog_eye_color - value = flag:amber - } - } - 50 = { - set_variable = { - name = dog_eye_color - value = flag:gray - } - } - 50 = { - set_variable = { - name = dog_eye_color - value = flag:brown - } - } - } - } - } - else_if = { - limit = { - OR = { - scope:eye_color = flag:blue - scope:eye_color = flag:amber - scope:eye_color = flag:gray - scope:eye_color = flag:brown - } - } - set_variable = { - name = dog_eye_color - value = flag:$COLOR$ - } - } -} - -dog_got_pregnant_effect = { - custom_tooltip = dog_got_pregnant_tooltip - trigger_event = { - id = pet_animal.1190 - days = { 58 68 } - } -} - -#Remove everything related to the story -remove_dog_story_modifiers_effect = { - if = { - limit = { - has_character_modifier = dog_story_modifier - } - remove_character_modifier = dog_story_modifier - } - if = { - limit = { - has_character_modifier = dog_story_walking_modifier - } - remove_character_modifier = dog_story_walking_modifier - } - if = { - limit = { - has_character_modifier = rat_hunting_dog_modifier - } - remove_character_modifier = rat_hunting_dog_modifier - } - if = { - limit = { - has_character_modifier = adventurous_pet_modifier - } - remove_character_modifier = adventurous_pet_modifier - } - if = { - limit = { - has_character_modifier = feral_pet_modifier - } - remove_character_modifier = feral_pet_modifier - } - if = { - limit = { - has_character_modifier = dog_story_scenthound_modifier - } - remove_character_modifier = dog_story_scenthound_modifier - } - if = { - limit = { - has_character_modifier = dog_story_beasthound_modifier - } - remove_character_modifier = dog_story_beasthound_modifier - } - if = { - limit = { - has_character_modifier = feast_well_fed_dog_modifier - } - remove_character_modifier = feast_well_fed_dog_modifier - } -} - -remove_dog_name_effect = { - remove_variable = story_cycle_dog_name - remove_localized_text = story_cycle_dog_name -} - -#Effect to transfer the story to another character -transfer_dog_story_cycle_to_effect = { - remove_dog_story_modifiers_effect = yes - - save_temporary_scope_as = original_owner - - $CHARACTER$ = { - set_variable = { - name = story_cycle_dog_name - value = $STORY$.var:story_cycle_dog_name - } - if = { - limit = { - scope:original_owner = { is_alive = yes } - } - copy_localized_text = { - key = story_cycle_dog_name - target = scope:original_owner - } - } - add_character_modifier = { - modifier = dog_story_modifier - } - add_character_flag = had_dog_story - } - - remove_dog_name_effect = yes - - $STORY$ = { - make_story_owner = $CHARACTER$ - } -} - - -######## -# WARHORSE -######## - -#Effect to start the story and show the right modifier -start_warhorse_story_cycle_effect = { - show_as_tooltip = { - add_character_modifier = { - modifier = horse_story_modifier - } - } - hidden_effect = { - create_story = story_cycle_martial_lifestyle_warhorse - } -} - -assign_horse_gender_effect = { - save_temporary_scope_value_as = { - name = gender - value = flag:$GENDER$ - } - if = { - limit = { scope:gender = flag:random } - hidden_effect = { - random_list = { - 50 = { - set_variable = { - name = horse_gender - value = flag:female - } - } - 50 = { - set_variable = { - name = horse_gender - value = flag:male - } - } - } - } - } - else_if = { - limit = { - OR = { - scope:gender = flag:male - scope:gender = flag:female - } - } - set_variable = { - name = horse_gender - value = flag:$GENDER$ - } - } -} - -level_horse_modifier_effect = { - if = { - limit = { - OR = { #first generation horse modifier - has_character_modifier = horse_strength_modifier - has_character_modifier = horse_agility_modifier - has_character_modifier = horse_endurance_modifier - has_character_modifier = horse_fierceness_modifier - } - } - if = { - limit = { - scope:horse_skill_to_level = flag:strength - } - if = { - limit = { - has_character_modifier = horse_strength_modifier - } - remove_character_modifier = horse_strength_modifier - add_character_modifier = { - modifier = horse_strength_strength_modifier - } - } - else_if = { - limit = { - has_character_modifier = horse_agility_modifier - } - remove_character_modifier = horse_agility_modifier - add_character_modifier = { - modifier = horse_agility_strength_modifier - } - } - else_if = { - limit = { - has_character_modifier = horse_endurance_modifier - } - remove_character_modifier = horse_endurance_modifier - add_character_modifier = { - modifier = horse_endurance_strength_modifier - } - } - else_if = { - limit = { - has_character_modifier = horse_fierceness_modifier - } - remove_character_modifier = horse_fierceness_modifier - add_character_modifier = { - modifier = horse_fierceness_strength_modifier - } - } - } - else_if = { - limit = { - scope:horse_skill_to_level = flag:agility - } - if = { - limit = { - has_character_modifier = horse_strength_modifier - } - remove_character_modifier = horse_strength_modifier - add_character_modifier = { - modifier = horse_agility_strength_modifier - } - } - else_if = { - limit = { - has_character_modifier = horse_agility_modifier - } - remove_character_modifier = horse_agility_modifier - add_character_modifier = { - modifier = horse_agility_agility_modifier - } - } - else_if = { - limit = { - has_character_modifier = horse_endurance_modifier - } - remove_character_modifier = horse_endurance_modifier - add_character_modifier = { - modifier = horse_endurance_agility_modifier - } - } - else_if = { - limit = { - has_character_modifier = horse_fierceness_modifier - } - remove_character_modifier = horse_fierceness_modifier - add_character_modifier = { - modifier = horse_fierceness_agility_modifier - } - } - } - else_if = { - limit = { - scope:horse_skill_to_level = flag:endurance - } - if = { - limit = { - has_character_modifier = horse_strength_modifier - } - remove_character_modifier = horse_strength_modifier - add_character_modifier = { - modifier = horse_endurance_strength_modifier - } - } - else_if = { - limit = { - has_character_modifier = horse_agility_modifier - } - remove_character_modifier = horse_agility_modifier - add_character_modifier = { - modifier = horse_endurance_agility_modifier - } - } - else_if = { - limit = { - has_character_modifier = horse_endurance_modifier - } - remove_character_modifier = horse_endurance_modifier - add_character_modifier = { - modifier = horse_endurance_endurance_modifier - } - } - else_if = { - limit = { - has_character_modifier = horse_fierceness_modifier - } - remove_character_modifier = horse_fierceness_modifier - add_character_modifier = { - modifier = horse_fierceness_endurance_modifier - } - } - } - else_if = { - limit = { - scope:horse_skill_to_level = flag:fierceness - } - if = { - limit = { - has_character_modifier = horse_strength_modifier - } - remove_character_modifier = horse_strength_modifier - add_character_modifier = { - modifier = horse_fierceness_strength_modifier - } - } - else_if = { - limit = { - has_character_modifier = horse_agility_modifier - } - remove_character_modifier = horse_agility_modifier - add_character_modifier = { - modifier = horse_fierceness_agility_modifier - } - } - else_if = { - limit = { - has_character_modifier = horse_endurance_modifier - } - remove_character_modifier = horse_endurance_modifier - add_character_modifier = { - modifier = horse_fierceness_endurance_modifier - } - } - else_if = { - limit = { - has_character_modifier = horse_fierceness_modifier - } - remove_character_modifier = horse_fierceness_modifier - add_character_modifier = { - modifier = horse_fierceness_fierceness_modifier - } - } - } - set_variable = { - name = warhorse_modifier_level - value = 2 #In case we want to add more levels later - } - } - else_if = { - limit = { - has_character_modifier = horse_story_modifier - } - remove_character_modifier = horse_story_modifier - if = { - limit = { - scope:horse_skill_to_level = flag:strength - } - add_character_modifier = { - modifier = horse_strength_modifier - } - } - else_if = { - limit = { - scope:horse_skill_to_level = flag:agility - } - add_character_modifier = { - modifier = horse_agility_modifier - } - } - else_if = { - limit = { - scope:horse_skill_to_level = flag:endurance - } - add_character_modifier = { - modifier = horse_endurance_modifier - } - } - else_if = { - limit = { - scope:horse_skill_to_level = flag:fierceness - } - add_character_modifier = { - modifier = horse_fierceness_modifier - } - } - } -} - -remove_horse_story_modifiers_effect = { - if = { - limit = { - has_character_modifier = horse_story_modifier - } - remove_character_modifier = horse_story_modifier - } - if = { - limit = { - has_character_modifier = horse_strength_modifier - } - remove_character_modifier = horse_strength_modifier - } - if = { - limit = { - has_character_modifier = horse_agility_modifier - } - remove_character_modifier = horse_agility_modifier - } - if = { - limit = { - has_character_modifier = horse_endurance_modifier - } - remove_character_modifier = horse_endurance_modifier - } - if = { - limit = { - has_character_modifier = horse_fierceness_modifier - } - remove_character_modifier = horse_fierceness_modifier - } - if = { - limit = { - has_character_modifier = horse_strength_strength_modifier - } - remove_character_modifier = horse_strength_strength_modifier - } - if = { - limit = { - has_character_modifier = horse_agility_strength_modifier - } - remove_character_modifier = horse_agility_strength_modifier - } - if = { - limit = { - has_character_modifier = horse_agility_agility_modifier - } - remove_character_modifier = horse_agility_agility_modifier - } - if = { - limit = { - has_character_modifier = horse_endurance_strength_modifier - } - remove_character_modifier = horse_endurance_strength_modifier - } - if = { - limit = { - has_character_modifier = horse_endurance_agility_modifier - } - remove_character_modifier = horse_endurance_agility_modifier - } - if = { - limit = { - has_character_modifier = horse_endurance_endurance_modifier - } - remove_character_modifier = horse_endurance_endurance_modifier - } - if = { - limit = { - has_character_modifier = horse_fierceness_strength_modifier - } - remove_character_modifier = horse_fierceness_strength_modifier - } - if = { - limit = { - has_character_modifier = horse_fierceness_agility_modifier - } - remove_character_modifier = horse_fierceness_agility_modifier - } - if = { - limit = { - has_character_modifier = horse_fierceness_endurance_modifier - } - remove_character_modifier = horse_fierceness_endurance_modifier - } - if = { - limit = { - has_character_modifier = horse_fierceness_fierceness_modifier - } - remove_character_modifier = horse_fierceness_fierceness_modifier - } - if = { - limit = { - exists = var:warhorse_modifier_level - } - remove_variable = warhorse_modifier_level - } -} - - -### EAGLE -#Effect to start the story and show the right modifier -start_eagle_story_cycle_effect = { - if = { - limit = { - exists = scope:eagle_capture_method - } - if = { - limit = { - scope:eagle_capture_method = flag:standard - } - add_character_flag = eagle_capture_method_standard - } - else_if = { - limit = { - scope:eagle_capture_method = flag:lure - } - add_character_flag = eagle_capture_method_lure - } - else_if = { - limit = { - scope:eagle_capture_method = flag:stolen - } - add_character_flag = eagle_capture_method_stolen - } - else_if = { - limit = { - scope:eagle_capture_method = flag:gift - } - add_character_flag = eagle_capture_method_gift - } - else_if = { - limit = { - scope:eagle_capture_method = flag:market - } - add_character_flag = eagle_capture_method_market - } - } - else = { - add_character_flag = eagle_capture_method_none - } - add_character_modifier = { - modifier = eagle_story_modifier - } - hidden_effect = { - create_story = story_cycle_pet_eagle - } -} - -#Assign the gender of the eagle -assign_eagle_gender_effect = { - save_temporary_scope_value_as = { - name = gender - value = flag:$GENDER$ - } - if = { - limit = { scope:gender = flag:random } - hidden_effect = { - random_list = { - 80 = { # Female eagles are thought to be larger / fiercer - set_variable = { - name = eagle_gender - value = flag:female - } - } - 20 = { - set_variable = { - name = eagle_gender - value = flag:male - } - } - } - } - } - else_if = { - limit = { - OR = { - scope:gender = flag:male - scope:gender = flag:female - } - } - set_variable = { - name = eagle_gender - value = flag:$GENDER$ - } - } -} - -#Pick out name options to show -assign_name_options_eagle_story_cycle_effect = { - random_list = { - 10 = { - trigger = { - var:eagle_gender = flag:female - NOT = { any_in_list = { variable = story_cycle_eagle_names this = flag:lyra } } - } - add_to_variable_list = { name = story_cycle_eagle_names target = flag:lyra } - } - 10 = { - trigger = { - var:eagle_gender = flag:female - NOT = { any_in_list = { variable = story_cycle_eagle_names this = flag:astana } } - } - add_to_variable_list = { name = story_cycle_eagle_names target = flag:astana } - } - 10 = { - trigger = { - var:eagle_gender = flag:female - NOT = { any_in_list = { variable = story_cycle_eagle_names this = flag:jargal } } - } - add_to_variable_list = { name = story_cycle_eagle_names target = flag:jargal } - } - 10 = { - trigger = { - var:eagle_gender = flag:female - NOT = { any_in_list = { variable = story_cycle_eagle_names this = flag:khair } } - } - add_to_variable_list = { name = story_cycle_eagle_names target = flag:khair } - } - 10 = { - trigger = { - var:eagle_gender = flag:male - NOT = { any_in_list = { variable = story_cycle_eagle_names this = flag:anda } } - } - add_to_variable_list = { name = story_cycle_eagle_names target = flag:anda } - } - 10 = { - trigger = { - var:eagle_gender = flag:male - NOT = { any_in_list = { variable = story_cycle_eagle_names this = flag:timur } } - } - add_to_variable_list = { name = story_cycle_eagle_names target = flag:timur } - } - 10 = { - trigger = { - var:eagle_gender = flag:male - NOT = { any_in_list = { variable = story_cycle_eagle_names this = flag:torebek } } - } - add_to_variable_list = { name = story_cycle_eagle_names target = flag:torebek } - } - 10 = { - trigger = { - var:eagle_gender = flag:male - NOT = { any_in_list = { variable = story_cycle_eagle_names this = flag:elmek } } - } - add_to_variable_list = { name = story_cycle_eagle_names target = flag:elmek } - } - 10 = { - trigger = { - NOT = { any_in_list = { variable = story_cycle_eagle_names this = flag:khongor } } - } - add_to_variable_list = { name = story_cycle_eagle_names target = flag:khongor } - } - 10 = { - trigger = { - NOT = { any_in_list = { variable = story_cycle_eagle_names this = flag:chania } } - } - add_to_variable_list = { name = story_cycle_eagle_names target = flag:chania } - } - 10 = { - trigger = { - NOT = { any_in_list = { variable = story_cycle_eagle_names this = flag:qyliinshaq } } - } - add_to_variable_list = { name = story_cycle_eagle_names target = flag:qyliinshaq } - } - 10 = { - trigger = { - NOT = { any_in_list = { variable = story_cycle_eagle_names this = flag:janym } } - } - add_to_variable_list = { name = story_cycle_eagle_names target = flag:janym } - } - 10 = { - trigger = { - NOT = { any_in_list = { variable = story_cycle_eagle_names this = flag:syr } } - } - add_to_variable_list = { name = story_cycle_eagle_names target = flag:syr } - } - 10 = { - trigger = { - NOT = { any_in_list = { variable = story_cycle_eagle_names this = flag:halik } } - } - add_to_variable_list = { name = story_cycle_eagle_names target = flag:halik } - } - 10 = { - trigger = { - NOT = { any_in_list = { variable = story_cycle_eagle_names this = flag:zephyr } } - } - add_to_variable_list = { name = story_cycle_eagle_names target = flag:zephyr } - } - } -} - -#Remove everything related to the story -remove_eagle_story_modifiers_effect = { - if = { - limit = { - has_character_modifier = eagle_story_modifier - } - remove_character_modifier = eagle_story_modifier - } - if = { - limit = { - has_character_modifier = weak_eagle_modifier - } - remove_character_modifier = weak_eagle_modifier - } - if = { - limit = { - has_character_modifier = very_weak_eagle_modifier - } - remove_character_modifier = very_weak_eagle_modifier - } - if = { - limit = { - has_character_modifier = strong_eagle_modifier - } - remove_character_modifier = strong_eagle_modifier - } - if = { - limit = { - has_character_modifier = skilled_eagle_modifier - } - remove_character_modifier = skilled_eagle_modifier - } - remove_eagle_personality_trait_effect = yes - if = { - limit = { - has_variable = eagle_personality_level - } - remove_variable = eagle_personality_level - } - if = { - limit = { - has_variable = eagle_personality_trait_2 - } - remove_variable = eagle_personality_trait_2 - } - if = { - limit = { - has_character_flag = eagle_marked_for_death - } - remove_character_flag = eagle_marked_for_death - } - if = { - limit = { - has_character_flag = eagle_is_dying - } - remove_character_flag = eagle_is_dying - } - if = { - limit = { - has_character_flag = eagle_capture_method_standard - } - remove_character_flag = eagle_capture_method_standard - } - if = { - limit = { - has_character_flag = eagle_capture_method_lure - } - remove_character_flag = eagle_capture_method_lure - } - if = { - limit = { - has_character_flag = eagle_capture_method_gift - } - remove_character_flag = eagle_capture_method_gift - } - if = { - limit = { - has_character_flag = eagle_capture_method_none - } - remove_character_flag = eagle_capture_method_none - } - if = { - limit = { - has_character_flag = eagle_capture_method_market - } - remove_character_flag = eagle_capture_method_market - } - if = { - limit = { - has_character_flag = eagle_capture_method_stolen - } - remove_character_flag = eagle_capture_method_stolen - } - if = { - limit = { - has_character_flag = cant_sell_eagle - } - remove_character_flag = cant_sell_eagle - } -} - -change_eagle_personality_trait_effect = { - if = { - limit = { - has_eagle_personality_trait_trigger = yes - } - remove_eagle_personality_trait_effect = yes - } - set_random_eagle_personality_trait_effect = { ADD_MODIFIER = yes } -} - -remove_eagle_personality_trait_effect = { - if = { - limit = { - has_variable = eagle_personality_level - } - remove_variable = eagle_personality_level - } - remove_eagle_personality_modifier_effect = yes -} - -remove_eagle_personality_modifier_effect = { - if = { - limit = { - has_character_modifier = brave_eagle_story_modifier - } - remove_character_modifier = brave_eagle_story_modifier - } - if = { - limit = { - has_character_modifier = curious_eagle_story_modifier - } - remove_character_modifier = curious_eagle_story_modifier - } - if = { - limit = { - has_character_modifier = loyal_eagle_story_modifier - } - remove_character_modifier = loyal_eagle_story_modifier - } - if = { - limit = { - has_character_modifier = calm_eagle_story_modifier - } - remove_character_modifier = calm_eagle_story_modifier - } - if = { - limit = { - has_character_modifier = wise_eagle_story_modifier - } - remove_character_modifier = wise_eagle_story_modifier - } - if = { - limit = { - has_character_modifier = cunning_eagle_story_modifier - } - remove_character_modifier = cunning_eagle_story_modifier - } - if = { - limit = { - has_character_modifier = aggressive_eagle_story_modifier - } - remove_character_modifier = aggressive_eagle_story_modifier - } - if = { - limit = { - has_character_modifier = observant_eagle_story_modifier - } - remove_character_modifier = observant_eagle_story_modifier - } - if = { - limit = { - has_character_modifier = protective_eagle_story_modifier - } - remove_character_modifier = protective_eagle_story_modifier - } -} - -set_random_eagle_personality_trait_effect = { - if = { - limit = { - NOT = { has_variable = eagle_personality_level } - } - set_variable = { name = eagle_personality_level value = 1 } - } - if = { - limit = { - has_character_modifier = eagle_story_modifier - } - remove_character_modifier = eagle_story_modifier - } - random_list = { - 10 = { - set_variable = { name = eagle_personality_trait value = flag:brave } - } - 10 = { - set_variable = { name = eagle_personality_trait value = flag:curious } - } - 10 = { - set_variable = { name = eagle_personality_trait value = flag:loyal } - } - 10 = { - set_variable = { name = eagle_personality_trait value = flag:calm } - } - 10 = { - set_variable = { name = eagle_personality_trait value = flag:wise } - } - 10 = { - set_variable = { name = eagle_personality_trait value = flag:cunning } - } - } - if = { - limit = { - $ADD_MODIFIER$ = yes - } - add_eagle_personality_modifier_effect = yes - } -} - -set_eagle_personality_trait_effect = { - if = { - limit = { - NOT = { has_variable = eagle_personality_level } - } - set_variable = { name = eagle_personality_level value = 1 } - } - set_variable = { name = eagle_personality_trait value = flag:$TRAIT$ } - if = { - limit = { - $ADD_MODIFIER$ = yes - } - add_eagle_personality_modifier_effect = yes - } -} - -add_eagle_personality_modifier_effect = { - if = { - limit = { - has_character_modifier = eagle_story_modifier - } - remove_character_modifier = eagle_story_modifier - } - if = { - limit = { - has_variable = eagle_personality_trait - } - switch = { - trigger = var:eagle_personality_trait - flag:brave = { - add_character_modifier = brave_eagle_story_modifier - } - flag:curious = { - add_character_modifier = curious_eagle_story_modifier - } - flag:loyal = { - add_character_modifier = loyal_eagle_story_modifier - } - flag:calm = { - add_character_modifier = calm_eagle_story_modifier - } - flag:wise = { - add_character_modifier = wise_eagle_story_modifier - } - flag:cunning = { - add_character_modifier = cunning_eagle_story_modifier - } - } - } -} - -set_random_secondary_eagle_personality_trait_effect = { # Hunt modifiers - random_list = { - 10 = { # Increase sightings - set_variable = { name = eagle_personality_trait_2 value = flag:observant } - add_character_modifier = { modifier = observant_eagle_story_modifier } - } - 10 = { # Prevent injury - set_variable = { name = eagle_personality_trait_2 value = flag:protective } - add_character_modifier = { modifier = protective_eagle_story_modifier } - } - 10 = { # Increase success chance - set_variable = { name = eagle_personality_trait_2 value = flag:aggressive } - add_character_modifier = { modifier = aggressive_eagle_story_modifier } - } - } -} - -# Eagle getting weak :( -weaken_eagle_effect = { - if = { - limit = { - has_character_modifier = weak_eagle_modifier - } - remove_character_modifier = weak_eagle_modifier - add_character_modifier = very_weak_eagle_modifier - hidden_effect = { - random_list = { - 40 = { # 40% chance of death - add_character_flag = eagle_marked_for_death - trigger_event = { - id = pet_animal.3199 - days = { 120 720 } - } - } - 60 = { } - } - } - } - else_if = { - limit = { - has_character_modifier = very_weak_eagle_modifier - } - hidden_effect = { - add_character_flag = cant_sell_eagle - random_list = { - 70 = { # 70% chance of death - add_character_flag = eagle_marked_for_death - trigger_event = { - id = pet_animal.3199 - days = { 60 600 } - } - } - 30 = { } - } - } - } - else = { - add_character_modifier = weak_eagle_modifier - hidden_effect = { - random_list = { - 10 = { # 10% chance of death - add_character_flag = eagle_marked_for_death - trigger_event = { - id = pet_animal.3199 - days = { 180 720 } - } - } - 90 = { } - } - } - } -} - -unweaken_eagle_effect = { - if = { - limit = { - has_character_modifier = weak_eagle_modifier - } - remove_character_modifier = weak_eagle_modifier - } - if = { - limit = { - has_character_modifier = very_weak_eagle_modifier - } - remove_character_modifier = very_weak_eagle_modifier - if = { - limit = { - $FULL$ = no - } - add_character_modifier = weak_eagle_modifier - } - } - if = { - limit = { - has_character_flag = eagle_marked_for_death - } - remove_character_flag = eagle_marked_for_death - if = { # If you couldn't sell the eagle because it was very weak or something - limit = { - has_character_flag = cant_sell_eagle - } - remove_character_flag = cant_sell_eagle - } - } -} - -eagle_treatment_effect = { - $HEALER$ = { save_scope_as = healer } - random_list = { - 15 = { # Treatment is very successful - modifier = { - is_alive = yes - add = scope:healer.learning - } - modifier = { - flag:$BONUS$ = flag:court_physician - add = 5 - } - desc = pet_animal.3030.very_good - stress_impact = { - base = medium_stress_impact_loss - } - send_interface_toast = { - title = pet_animal.eagle_unweak_title - type = event_toast_effect_good - left_icon = root - right_icon = scope:healer - unweaken_eagle_effect = { FULL = yes } - add_character_modifier = { - modifier = strong_eagle_modifier - years = 3 - } - add_opinion = { - modifier = grateful_opinion - target = scope:healer - opinion = 25 - } - } - } - 30 = { # Treatment is successful - modifier = { - is_alive = yes - add = scope:healer.learning - } - modifier = { - flag:$BONUS$ = flag:court_physician - add = 10 - } - modifier = { - OR = { - flag:$BONUS$ = flag:courtier - flag:$BONUS$ = flag:hunter - } - add = 20 - } - desc = pet_animal.3030.good - stress_impact = { - base = minor_stress_impact_loss - } - send_interface_toast = { - title = pet_animal.eagle_unweak_title - type = event_toast_effect_good - left_icon = root - right_icon = scope:healer - unweaken_eagle_effect = { FULL = no } - add_opinion = { - modifier = grateful_opinion - target = scope:healer - opinion = 15 - } - } - } - 40 = { # Treatment is unsuccessful - modifier = { - flag:$BONUS$ = flag:court_physician - add = -15 - } - modifier = { - flag:$BONUS$ = flag:courtier - add = -7 - } - desc = pet_animal.3030.nothing - stress_impact = { - base = miniscule_stress_impact_gain - callous = miniscule_stress_impact_loss - } - send_interface_toast = { - title = pet_animal.3030.nothing - type = event_toast_effect_bad - left_icon = root - right_icon = scope:healer - add_opinion = { - modifier = disappointed_opinion - target = scope:healer - opinion = -15 - } - } - } - 20 = { # Makes it worse somehow - modifier = { - flag:$BONUS$ = flag:court_physician - add = -10 - } - modifier = { - flag:$BONUS$ = flag:courtier - add = -5 - } - desc = pet_animal.3030.bad - stress_impact = { - base = minor_stress_impact_gain - callous = minor_stress_impact_loss - } - send_interface_toast = { - title = pet_animal.eagle_unweak_title - type = event_toast_effect_bad - left_icon = root - right_icon = scope:healer - weaken_eagle_effect = yes - add_opinion = { - modifier = angry_opinion - target = scope:healer - opinion = -25 - } - } - } - } -} - -transfer_eagle_effect = { - $RECIPIENT$ = { save_scope_as = recipient } - $GIVER$ = { save_scope_as = giver } - if = { - limit = { - flag:$METHOD$ = flag:gift - } - scope:recipient = { save_scope_value_as = { name = eagle_capture_method value = flag:gift } } - } - else_if = { - limit = { - flag:$METHOD$ = flag:market - } - scope:recipient = { save_scope_value_as = { name = eagle_capture_method value = flag:market } } - } - else_if = { - limit = { - flag:$METHOD$ = flag:stolen - } - scope:recipient = { save_scope_value_as = { name = eagle_capture_method value = flag:stolen } } - } - - scope:giver = { - random_owned_story = { # Get the story - limit = { - story_type = story_cycle_pet_eagle - } - save_scope_as = story - } - # Transfer the eagle to the recipient - scope:recipient = { # Start the story and transfer the age - add_character_flag = { flag = cant_sell_eagle years = 1 } # Can't sell it for a while - set_variable = { # Set the name - name = story_cycle_eagle_name - value = scope:giver.var:story_cycle_eagle_name - } - set_variable = { # Set the gender - name = eagle_gender - value = scope:giver.var:eagle_gender - } - set_variable = { - name = eagle_age_variable - value = scope:giver.var:eagle_age_variable - } - start_eagle_story_cycle_effect = yes # Start the story - } - if = { # Get the eagle's personality traits - limit = { - has_eagle_personality_trait_trigger = yes - } - switch = { - trigger = var:eagle_personality_trait - flag:brave = { - scope:recipient = { set_variable = { name = eagle_personality_trait value = flag:brave } } - } - flag:curious = { - scope:recipient = { set_variable = { name = eagle_personality_trait value = flag:curious } } - } - flag:loyal = { - scope:recipient = { set_variable = { name = eagle_personality_trait value = flag:loyal } } - } - flag:calm = { - scope:recipient = { set_variable = { name = eagle_personality_trait value = flag:calm } } - } - flag:wise = { - scope:recipient = { set_variable = { name = eagle_personality_trait value = flag:wise } } - } - flag:cunning = { - scope:recipient = { set_variable = { name = eagle_personality_trait value = flag:cunning } } - } - } - if = { # Get the eagle's secondary personality trait - limit = { - has_secondary_eagle_personality_trait_trigger = yes - } - switch = { - trigger = var:eagle_personality_trait_2 - flag:observant = { - scope:recipient = { set_variable = { name = eagle_personality_trait_2 value = flag:observant } } - add_character_modifier = { modifier = observant_eagle_story_modifier } - } - flag:protective = { - scope:recipient = { set_variable = { name = eagle_personality_trait_2 value = flag:protective } } - add_character_modifier = { modifier = protective_eagle_story_modifier } - } - flag:aggressive = { - scope:recipient = { set_variable = { name = eagle_personality_trait_2 value = flag:aggressive } } - add_character_modifier = { modifier = aggressive_eagle_story_modifier } - } - } - } - scope:recipient = { # Get the eagle's personality level + add the modifier - set_variable = { - name = eagle_personality_level - value = scope:giver.var:eagle_personality_level - } - add_eagle_personality_modifier_effect = yes - } - } - # Get the eagle's sickness - if = { - limit = { - has_character_modifier = weak_eagle_modifier - } - scope:recipient = { add_character_modifier = { modifier = weak_eagle_modifier years = 1 } } - } - else_if = { - limit = { - has_character_modifier = very_weak_eagle_modifier - } - scope:recipient = { add_character_modifier = { modifier = very_weak_eagle_modifier years = 1 } } - } - else = { - limit = { - has_character_modifier = strong_eagle_modifier - } - scope:recipient = { add_character_modifier = { modifier = strong_eagle_modifier years = 1 } } - } - # Remove the eagle from the giver - show_as_tooltip = { - remove_eagle_story_modifiers_effect = yes - } - scope:story = { hidden_effect = { end_story = yes } } - } - -} - -sell_eagle_effect = { - $SELLER$ = { add_gold = $PRICE$ } - transfer_eagle_effect = { - RECIPIENT = $RECIPIENT$ - GIVER = $SELLER$ - METHOD = market - } -} - -get_eagle_training_method_effect = { - random_list = { - 10 = { - trigger = { - NOT = { - any_in_list = { variable = eagle_training_methods this = flag:martial } - has_character_flag = eagle_training_martial - } - } - add_to_variable_list = { name = eagle_training_methods target = flag:martial } - } - 10 = { - trigger = { - NOT = { - any_in_list = { variable = eagle_training_methods this = flag:diplomacy } - has_character_flag = eagle_training_diplomacy - } - } - add_to_variable_list = { name = eagle_training_methods target = flag:diplomacy } - } - 10 = { - trigger = { - NOT = { - any_in_list = { variable = eagle_training_methods this = flag:stewardship } - has_character_flag = eagle_training_stewardship - } - } - add_to_variable_list = { name = eagle_training_methods target = flag:stewardship } - } - 10 = { - trigger = { - NOT = { - any_in_list = { variable = eagle_training_methods this = flag:intrigue } - has_character_flag = eagle_training_intrigue - } - } - add_to_variable_list = { name = eagle_training_methods target = flag:intrigue } - } - 10 = { - trigger = { - NOT = { - any_in_list = { variable = eagle_training_methods this = flag:learning } - has_character_flag = eagle_training_learning - } - } - add_to_variable_list = { name = eagle_training_methods target = flag:learning } - } - } -} - -eagle_training_effect = { - duel = { - skill = $METHOD$ - value = decent_skill_rating - 50 = { - compare_modifier = { - value = scope:duel_value - multiplier = 3.5 - min = -49 - } - modifier = { always = yes add = { 15 25 } } - eagle_training_success_effect = { METHOD = $METHOD$ } - } - 30 = { - compare_modifier = { - value = scope:duel_value - multiplier = -3.5 - min = -49 - } - eagle_training_failure_effect = yes - } - } - add_character_flag = { - flag = eagle_training_$METHOD$ - years = 5 - } -} - -eagle_training_success_effect = { - add_prestige = medium_prestige_gain - random_list = { - desc = pet_animal.3040.training_good_desc - 20 = { # Change personality - show_chance = no - trigger = { - has_eagle_personality_trait_trigger = yes - } - set_variable = { - name = eagle_personality_trait_prev - value = var:eagle_personality_trait - } - desc = pet_animal.3040.personality_change - show_as_tooltip = { remove_eagle_personality_trait_effect = yes } - custom_tooltip = pet_animal.3040.personality_change_tooltip - hidden_effect = { - random_list = { - 10 = { - trigger = { NOT = { var:eagle_personality_trait_prev ?= flag:brave } } - modifier = { flag:$METHOD$ = flag:martial add = 10 } - send_interface_toast = { - title = pet_animal.3040.training_good_title - type = event_toast_effect_good - left_icon = root - remove_eagle_personality_trait_effect = yes - set_eagle_personality_trait_effect = { ADD_MODIFIER = yes TRAIT = brave } - show_as_tooltip = { add_character_modifier = brave_eagle_story_modifier } - } - } - 10 = { - trigger = { NOT = { var:eagle_personality_trait_prev ?= flag:curious } } - modifier = { flag:$METHOD$ = flag:learning add = 10 } - send_interface_toast = { - title = pet_animal.3040.training_good_title - type = event_toast_effect_good - left_icon = root - remove_eagle_personality_trait_effect = yes - set_eagle_personality_trait_effect = { ADD_MODIFIER = yes TRAIT = curious } - show_as_tooltip = { add_character_modifier = curious_eagle_story_modifier } - } - } - 10 = { - trigger = { NOT = { var:eagle_personality_trait_prev ?= flag:cunning } } - modifier = { flag:$METHOD$ = flag:intrigue add = 10 } - send_interface_toast = { - title = pet_animal.3040.training_good_title - type = event_toast_effect_good - left_icon = root - remove_eagle_personality_trait_effect = yes - set_eagle_personality_trait_effect = { ADD_MODIFIER = yes TRAIT = cunning } - show_as_tooltip = { add_character_modifier = cunning_eagle_story_modifier } - } - } - 10 = { - trigger = { NOT = { var:eagle_personality_trait_prev ?= flag:loyal } } - modifier = { flag:$METHOD$ = flag:diplomacy add = 10 } - send_interface_toast = { - title = pet_animal.3040.training_good_title - type = event_toast_effect_good - left_icon = root - remove_eagle_personality_trait_effect = yes - set_eagle_personality_trait_effect = { ADD_MODIFIER = yes TRAIT = loyal } - show_as_tooltip = { add_character_modifier = loyal_eagle_story_modifier } - } - } - 10 = { - trigger = { NOT = { var:eagle_personality_trait_prev ?= flag:wise } } - modifier = { flag:$METHOD$ = flag:stewardship add = 10 } - send_interface_toast = { - title = pet_animal.3040.training_good_title - type = event_toast_effect_good - left_icon = root - remove_eagle_personality_trait_effect = yes - set_eagle_personality_trait_effect = { ADD_MODIFIER = yes TRAIT = wise } - show_as_tooltip = { add_character_modifier = wise_eagle_story_modifier } - } - } - 10 = { - trigger = { NOT = { var:eagle_personality_trait_prev ?= flag:calm } } - send_interface_toast = { - title = pet_animal.3040.training_good_title - type = event_toast_effect_good - left_icon = root - remove_eagle_personality_trait_effect = yes - set_eagle_personality_trait_effect = { ADD_MODIFIER = yes TRAIT = calm } - show_as_tooltip = { add_character_modifier = calm_eagle_story_modifier } - } - } - } - } - remove_variable = eagle_personality_trait_prev - } - 30 = { # Give secondary - show_chance = no - desc = pet_animal.3040.personality - modifier = { flag:$METHOD$ = flag:none add = 10 } - trigger = { - has_eagle_personality_trait_trigger = yes - has_secondary_eagle_personality_trait_trigger = no - } - - random_list = { - 10 = { # Increase sightings - show_chance = no - desc = pet_animal.3040.personality_new_observant - modifier = { flag:$METHOD$ = flag:stewardship add = 10 } - modifier = { flag:$METHOD$ = flag:learning add = 10 } - custom_tooltip = pet_animal.3040.personality_bonus_learning - custom_tooltip = pet_animal.3040.personality_bonus_stewardship - set_variable = { name = eagle_personality_trait_2 value = flag:observant } - send_interface_toast = { - title = pet_animal.3040.training_good_title - type = event_toast_effect_good - left_icon = root - add_character_modifier = { modifier = observant_eagle_story_modifier } - } - } - 10 = { # Prevent injury - show_chance = no - desc = pet_animal.3040.personality_new_protective - modifier = { flag:$METHOD$ = flag:intrigue add = 10 } - modifier = { flag:$METHOD$ = flag:diplomacy add = 10 } - custom_tooltip = pet_animal.3040.personality_bonus_intrigue - custom_tooltip = pet_animal.3040.personality_bonus_diplomacy - set_variable = { name = eagle_personality_trait_2 value = flag:protective } - send_interface_toast = { - title = pet_animal.3040.training_good_title - type = event_toast_effect_good - left_icon = root - add_character_modifier = { modifier = protective_eagle_story_modifier } - } - } - 10 = { # Increase success chance - show_chance = no - desc = pet_animal.3040.personality_new_aggressive - modifier = { flag:$METHOD$ = flag:martial add = 10 } - custom_tooltip = pet_animal.3040.personality_bonus_martial - set_variable = { name = eagle_personality_trait_2 value = flag:aggressive } - send_interface_toast = { - title = pet_animal.3040.training_good_title - type = event_toast_effect_good - left_icon = root - add_character_modifier = { modifier = aggressive_eagle_story_modifier } - } - } - } - } - 30 = { # Level personality - show_chance = no - desc = pet_animal.3040.personality_level - trigger = { - has_eagle_personality_trait_trigger = yes - has_variable = eagle_personality_level - var:eagle_personality_level <= 2 - } - hidden_effect = { - remove_eagle_personality_trait_effect = yes - change_variable = { - name = eagle_personality_level - add = 1 - } - } - send_interface_toast = { - title = pet_animal.3040.training_good_title - type = event_toast_effect_good - left_icon = root - add_eagle_personality_modifier_effect = yes - } - } - 30 = { # Give personality - show_chance = no - desc = pet_animal.3040.personality - trigger = { - has_eagle_personality_trait_trigger = no - } - random_list = { - 10 = { - desc = pet_animal.3040.personality_new_brave - show_chance = no - modifier = { always = yes add = { 10 20 } } - modifier = { flag:$METHOD$ = flag:martial add = 10 } - custom_tooltip = pet_animal.3040.personality_bonus_martial - send_interface_toast = { - title = pet_animal.3040.training_good_title - type = event_toast_effect_good - left_icon = root - set_eagle_personality_trait_effect = { ADD_MODIFIER = yes TRAIT = brave } - show_as_tooltip = { add_character_modifier = brave_eagle_story_modifier } - } - } - 10 = { - desc = pet_animal.3040.personality_new_curious - show_chance = no - modifier = { always = yes add = { 10 20 } } - modifier = { flag:$METHOD$ = flag:learning add = 10 } - custom_tooltip = pet_animal.3040.personality_bonus_learning - send_interface_toast = { - title = pet_animal.3040.training_good_title - type = event_toast_effect_good - left_icon = root - set_eagle_personality_trait_effect = { ADD_MODIFIER = yes TRAIT = curious } - show_as_tooltip = { add_character_modifier = curious_eagle_story_modifier } - } - } - 10 = { - desc = pet_animal.3040.personality_new_cunning - show_chance = no - modifier = { always = yes add = { 10 20 } } - modifier = { flag:$METHOD$ = flag:intrigue add = 10 } - custom_tooltip = pet_animal.3040.personality_bonus_intrigue - send_interface_toast = { - title = pet_animal.3040.training_good_title - type = event_toast_effect_good - left_icon = root - set_eagle_personality_trait_effect = { ADD_MODIFIER = yes TRAIT = cunning } - show_as_tooltip = { add_character_modifier = cunning_eagle_story_modifier } - } - } - 10 = { - desc = pet_animal.3040.personality_new_loyal - show_chance = no - modifier = { always = yes add = { 10 20 } } - modifier = { flag:$METHOD$ = flag:diplomacy add = 10 } - custom_tooltip = pet_animal.3040.personality_bonus_diplomacy - send_interface_toast = { - title = pet_animal.3040.training_good_title - type = event_toast_effect_good - left_icon = root - set_eagle_personality_trait_effect = { ADD_MODIFIER = yes TRAIT = loyal } - show_as_tooltip = { add_character_modifier = loyal_eagle_story_modifier } - } - } - 10 = { - desc = pet_animal.3040.personality_new_wise - show_chance = no - modifier = { always = yes add = { 10 20 } } - modifier = { flag:$METHOD$ = flag:stewardship add = 10 } - custom_tooltip = pet_animal.3040.personality_bonus_stewardship - send_interface_toast = { - title = pet_animal.3040.training_good_title - type = event_toast_effect_good - left_icon = root - set_eagle_personality_trait_effect = { ADD_MODIFIER = yes TRAIT = wise } - show_as_tooltip = { add_character_modifier = wise_eagle_story_modifier } - } - } - 10 = { - desc = pet_animal.3040.personality_new_calm - show_chance = no - modifier = { always = yes add = { 15 20 } } - send_interface_toast = { - title = pet_animal.3040.training_good_title - type = event_toast_effect_good - left_icon = root - set_eagle_personality_trait_effect = { ADD_MODIFIER = yes TRAIT = calm } - show_as_tooltip = { add_character_modifier = calm_eagle_story_modifier } - } - } - } - } - 10 = { # Generic bonus - show_chance = no - desc = pet_animal.3040.training_good_generic - send_interface_toast = { - title = pet_animal.3040.training_good_title - type = event_toast_effect_good - left_icon = root - add_character_modifier = { - modifier = skilled_eagle_modifier - years = 2 - } - } - } - } -} - -eagle_training_failure_effect = { - random_list = { - desc = pet_animal.3040.training_bad_desc - 30 = { # Lose some skill - show_chance = no - desc = pet_animal.3040.training_bad - trigger = { - has_eagle_personality_trait_trigger = yes - var:eagle_personality_level >= 2 - } - send_interface_toast = { - title = pet_animal.3040.training_bad_title - type = event_toast_effect_bad - left_icon = root - custom_tooltip = pet_animal.3040.personality_less_effective - hidden_effect = { - remove_eagle_personality_trait_effect = yes - change_variable = { - name = eagle_personality_level - add = -1 - } - add_eagle_personality_modifier_effect = yes - } - } - } - 20 = { # Eagle is injured :( - show_chance = no - desc = pet_animal.3040.training_very_bad - modifier = { - add = -10 - has_character_modifier = skilled_eagle_modifier - } - modifier = { - add = 10 - has_character_modifier = weak_eagle_modifier - } - modifier = { - add = 20 - has_character_modifier = very_weak_eagle_modifier - } - modifier = { - add = 10 - has_trait = intellect_bad_1 - } - modifier = { - add = 20 - has_trait = intellect_bad_2 - } - modifier = { - add = 30 - has_trait = intellect_bad_3 - } - save_scope_value_as = { - name = eagle_injury_source - value = flag:training - } - show_as_tooltip = { - weaken_eagle_effect = yes - } - trigger_event = { - id = pet_animal.3030 - } - } - 40 = { # Nothing happens - show_chance = no - desc = pet_animal.3040.training_neutral - send_interface_toast = { - title = pet_animal.3040.training_bad_title - type = event_toast_effect_bad - left_icon = root - add_stress = miniscule_stress_impact_gain - add_prestige = minor_prestige_loss - } - } - } -} \ No newline at end of file diff --git a/N3OW/common/scripted_effects/00_antiquarian_artifact_improvement_effects.txt b/N3OW/common/scripted_effects/00_antiquarian_artifact_improvement_effects.txt deleted file mode 100644 index 38d9ac6d..00000000 --- a/N3OW/common/scripted_effects/00_antiquarian_artifact_improvement_effects.txt +++ /dev/null @@ -1,1001 +0,0 @@ - -antiquarian_improve_artifact_effect = { - if = { - limit = { - artifact_slot_type = primary_armament - } - primary_armament_improvement_effect = yes - } - else_if = { - limit = { - artifact_slot_type = armor - } - armor_improvement_effect = yes - } - else_if = { - limit = { - artifact_slot_type = regalia - } - regalia_improvement_effect = yes - } - else_if = { - limit = { - artifact_slot_type = helmet - } - helmet_improvement_effect = yes - } - else_if = { - limit = { - artifact_slot_type = throne - } - throne_improvement_effect = yes - } - else_if = { - limit = { - artifact_slot_type = wall_big - } - wall_big_improvement_effect = yes - } - else_if = { - limit = { - artifact_slot_type = wall_small - } - wall_small_improvement_effect = yes - } - else_if = { - limit = { - artifact_slot_type = sculpture - } - sculpture_improvement_effect = yes - } - else_if = { - limit = { - artifact_slot_type = book - } - book_improvement_effect = yes - } - else_if = { - limit = { - artifact_slot_type = pedestal - } - pedestal_improvement_effect = yes - } - else_if = { - limit = { - artifact_slot_type = miscellaneous - } - miscellaneous_improvement_effect = yes - } - else_if = { - limit = { - artifact_slot_type = journal - } - journal_improvement_effect = yes - } -} - -antiquarian_apply_modifier_to_artifact_effect = { - if = { - limit = { - scope:liege = { - has_character_flag = ach_intent_artifact_boost_flag - } - } - scope:artifact_target = { - add_artifact_modifier = $MODIFIER$ - } - } - else = { - scope:liege = { - send_interface_toast = { - type = event_artifact_good - left_icon = scope:antiquarian_from_task - right_icon = scope:artifact_target - title = antiquarian_improved_artifact_message - scope:artifact_target = { - add_artifact_modifier = $MODIFIER$ - } - } - } - } - -} - -primary_armament_improvement_effect = { - random_list = { - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_prowess_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_knight_effectiveness_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_glory_hound_levy_contribution_mult_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_enemy_hard_casualty_modifier_1_modifier } - } - 10 = { - trigger = { - scope:liege = { - OR = { - any_sub_realm_county = { - count >= 5 - title_province = { - terrain = plains - } - } - any_sub_realm_county = { - percent >= 0.3 - title_province = { - terrain = plains - } - } - } - } - } - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_plains_advantage_1_modifier } - } - 10 = { - trigger = { - scope:liege = { - OR = { - any_sub_realm_county = { - count >= 5 - title_province = { - terrain = farmlands - } - } - any_sub_realm_county = { - percent >= 0.3 - title_province = { - terrain = farmlands - } - } - } - } - } - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_farmlands_advantage_1_modifier } - } - 10 = { - trigger = { - scope:liege = { - OR = { - any_sub_realm_county = { - count >= 5 - title_province = { - terrain = hills - } - } - any_sub_realm_county = { - percent >= 0.3 - title_province = { - terrain = hills - } - } - } - } - } - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_hills_advantage_1_modifier } - } - 10 = { - trigger = { - scope:liege = { - OR = { - any_sub_realm_county = { - count >= 5 - title_province = { - terrain = mountains - } - } - any_sub_realm_county = { - percent >= 0.3 - title_province = { - terrain = mountains - } - } - } - } - } - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_mountains_advantage_1_modifier } - } - 10 = { - trigger = { - scope:liege = { - OR = { - any_sub_realm_county = { - count >= 5 - title_province = { - terrain = desert - } - } - any_sub_realm_county = { - percent >= 0.3 - title_province = { - terrain = desert - } - } - } - } - } - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_desert_advantage_1_modifier } - } - 10 = { - trigger = { - scope:liege = { - OR = { - any_sub_realm_county = { - count >= 5 - title_province = { - terrain = desert_mountains - } - } - any_sub_realm_county = { - percent >= 0.3 - title_province = { - terrain = desert_mountains - } - } - } - } - } - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_desert_mountains_advantage_1_modifier } - } - 10 = { - trigger = { - scope:liege = { - OR = { - any_sub_realm_county = { - count >= 5 - title_province = { - terrain = oasis - } - } - any_sub_realm_county = { - percent >= 0.3 - title_province = { - terrain = oasis - } - } - } - } - } - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_oasis_advantage_1_modifier } - } - 10 = { - trigger = { - scope:liege = { - OR = { - any_sub_realm_county = { - count >= 5 - title_province = { - terrain = jungle - } - } - any_sub_realm_county = { - percent >= 0.3 - title_province = { - terrain = jungle - } - } - } - } - } - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_jungle_advantage_1_modifier } - } - 10 = { - trigger = { - scope:liege = { - OR = { - any_sub_realm_county = { - count >= 5 - title_province = { - terrain = forest - } - } - any_sub_realm_county = { - percent >= 0.3 - title_province = { - terrain = forest - } - } - } - } - } - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_forest_advantage_1_modifier } - } - 10 = { - trigger = { - scope:liege = { - OR = { - any_sub_realm_county = { - count >= 5 - title_province = { - terrain = taiga - } - } - any_sub_realm_county = { - percent >= 0.3 - title_province = { - terrain = taiga - } - } - } - } - } - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_taiga_advantage_1_modifier } - } - 10 = { - trigger = { - scope:liege = { - OR = { - any_sub_realm_county = { - count >= 5 - title_province = { - terrain = wetlands - } - } - any_sub_realm_county = { - percent >= 0.3 - title_province = { - terrain = wetlands - } - } - } - } - } - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_wetlands_advantage_1_modifier } - } - 10 = { - trigger = { - scope:liege = { - OR = { - any_sub_realm_county = { - count >= 5 - title_province = { - terrain = steppe - } - } - any_sub_realm_county = { - percent >= 0.3 - title_province = { - terrain = steppe - } - } - } - } - } - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_steppe_advantage_1_modifier } - } - 10 = { - trigger = { - scope:liege = { - OR = { - any_sub_realm_county = { - count >= 5 - title_province = { - terrain = floodplains - } - } - any_sub_realm_county = { - percent >= 0.3 - title_province = { - terrain = floodplains - } - } - } - } - } - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_floodplains_advantage_1_modifier } - } - 10 = { - trigger = { - scope:liege = { - OR = { - any_sub_realm_county = { - count >= 5 - title_province = { - terrain = drylands - } - } - any_sub_realm_county = { - percent >= 0.3 - title_province = { - terrain = drylands - } - } - } - } - } - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_drylands_advantage_1_modifier } - } - } -} - -armor_improvement_effect = { - random_list = { - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_prowess_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_knight_effectiveness_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_controlled_province_advantage_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_glory_hound_levy_contribution_mult_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_hard_casualty_modifier_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_belligerent_levy_contribution_mult_1_modifier } - } - } -} - -regalia_improvement_effect = { - save_scope_as = root_scope - random_list = { - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_monthly_minor_prestige_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_monthly_piety_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_monthly_prestige_add_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_short_reign_duration_mult_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_monthly_tyranny_1_modifier } - } - 10 = { - trigger = { - scope:root_scope.top_overlord = { - NOT = { government_has_flag = no_powerful_vassals } - } - } - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_happy_powerful_vassal_tax_contribution_mult_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_courtly_tax_contribution_mult_1_modifier } - } - 2 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_courtly_vassal_opinion_1_modifier } - } - 2 = { - trigger = { - scope:root_scope.top_overlord = { - NOT = { government_has_flag = no_powerful_vassals } - } - } - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_powerful_vassal_opinion_1_modifier } - } - 2 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_parochial_vassal_opinion_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_parochial_tax_contribution_mult_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_belligerent_tax_contribution_mult_1_modifier } - } - 2 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_belligerent_vassal_opinion_1_modifier } - } - 2 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_courtier_and_guest_opinion_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_men_at_arms_maintenance_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_build_gold_cost_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_domain_tax_mult_1_modifier } - } - 2 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_zealot_vassal_opinion_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_zealot_tax_contribution_mult_1_modifier } - } - } -} - -helmet_improvement_effect = { - random_list = { - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_monthly_minor_prestige_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_monthly_piety_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_monthly_prestige_add_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_short_reign_duration_mult_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_monthly_tyranny_1_modifier } - } - 10 = { - trigger = { - scope:root_scope.top_overlord = { - NOT = { government_has_flag = no_powerful_vassals } - } - } - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_happy_powerful_vassal_tax_contribution_mult_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_belligerent_tax_contribution_mult_1_modifier } - } - 2 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_belligerent_vassal_opinion_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_courtly_tax_contribution_mult_1_modifier } - } - 2 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_courtly_vassal_opinion_1_modifier } - } - 2 = { - trigger = { - scope:root_scope.top_overlord = { - NOT = { government_has_flag = no_powerful_vassals } - } - } - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_powerful_vassal_opinion_1_modifier } - } - 2 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_parochial_vassal_opinion_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_parochial_tax_contribution_mult_1_modifier } - } - 2 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_courtier_and_guest_opinion_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_men_at_arms_maintenance_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_build_gold_cost_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_domain_tax_mult_1_modifier } - } - 2 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_zealot_vassal_opinion_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_zealot_tax_contribution_mult_1_modifier } - } - 10 = { - trigger = { scope:liege ?= { government_has_flag = government_is_nomadic } } - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_herd_gain_1_modifier } - } - 2 = { - trigger = { scope:liege ?= { government_has_flag = government_is_nomadic } } - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_herd_conversion_1_modifier } - } - } -} - -throne_improvement_effect = { - random_list = { - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_monthly_prestige_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_court_grandeur_baseline_add_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_monthly_piety_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_monthly_prestige_add_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_short_reign_duration_mult_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_monthly_tyranny_1_modifier } - } - 10 = { - trigger = { - scope:root_scope.top_overlord = { - NOT = { government_has_flag = no_powerful_vassals } - } - } - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_happy_powerful_vassal_tax_contribution_mult_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_courtly_tax_contribution_mult_1_modifier } - } - 2 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_courtly_vassal_opinion_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_glory_hound_tax_contribution_mult_1_modifier } - } - 2 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_glory_hound_vassal_opinion_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_belligerent_tax_contribution_mult_1_modifier } - } - 2 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_belligerent_vassal_opinion_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_mercenary_hire_cost_mult_1_modifier } - } - 2 = { - trigger = { - scope:root_scope.top_overlord = { - NOT = { government_has_flag = no_powerful_vassals } - } - } - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_powerful_vassal_opinion_1_modifier } - } - 2 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_parochial_vassal_opinion_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_parochial_tax_contribution_mult_1_modifier } - } - 2 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_courtier_and_guest_opinion_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_men_at_arms_maintenance_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_build_gold_cost_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_domain_tax_mult_1_modifier } - } - 2 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_zealot_vassal_opinion_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_zealot_tax_contribution_mult_1_modifier } - } - 10 = { - trigger = { scope:liege ?= { government_has_flag = government_is_nomadic } } - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_herd_gain_1_modifier } - } - 2 = { - trigger = { scope:liege ?= { government_has_flag = government_is_nomadic } } - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_herd_conversion_1_modifier } - } - } -} - -wall_big_improvement_effect = { - random_list = { - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_knight_effectiveness_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_monthly_prestige_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_court_grandeur_baseline_add_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_monthly_prestige_add_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_short_reign_duration_mult_1_modifier } - } - 10 = { - trigger = { - scope:root_scope.top_overlord = { - NOT = { government_has_flag = no_powerful_vassals } - } - } - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_happy_powerful_vassal_tax_contribution_mult_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_courtly_tax_contribution_mult_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_mercenary_hire_cost_mult_1_modifier } - } - 2 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_parochial_vassal_opinion_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_parochial_tax_contribution_mult_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_belligerent_tax_contribution_mult_1_modifier } - } - 2 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_belligerent_vassal_opinion_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_men_at_arms_maintenance_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_build_gold_cost_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_domain_tax_mult_1_modifier } - } - 2 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_zealot_vassal_opinion_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_zealot_tax_contribution_mult_1_modifier } - } - 10 = { - trigger = { - scope:liege ?= { NOT = { government_has_flag = government_is_nomadic } } - } - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_development_growth_1_modifier } - } - 10 = { - trigger = { - scope:liege ?= { government_has_flag = government_is_nomadic } - } - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_fertility_growth_1_modifier } - } - } -} - -wall_small_improvement_effect = { - random_list = { - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_monthly_minor_prestige_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_court_grandeur_baseline_add_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_monthly_prestige_add_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_glory_hound_tax_contribution_mult_1_modifier } - } - 2 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_glory_hound_vassal_opinion_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_belligerent_tax_contribution_mult_1_modifier } - } - 2 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_belligerent_vassal_opinion_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_men_at_arms_maintenance_1_modifier } - } - 10 = { - trigger = { scope:liege ?= { government_has_flag = government_is_nomadic } } - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_herd_gain_1_modifier } - } - 2 = { - trigger = { scope:liege ?= { government_has_flag = government_is_nomadic } } - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_herd_conversion_1_modifier } - } - } -} - -sculpture_improvement_effect = { - random_list = { - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_monthly_prestige_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_court_grandeur_baseline_add_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_monthly_piety_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_monthly_prestige_add_1_modifier } - } - 10 = { - trigger = { - scope:root_scope.top_overlord = { - NOT = { government_has_flag = no_powerful_vassals } - } - } - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_happy_powerful_vassal_tax_contribution_mult_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_courtly_tax_contribution_mult_1_modifier } - } - 2 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_courtly_vassal_opinion_1_modifier } - } - 10 = { - trigger = { - scope:liege = { NOT = { government_has_flag = government_is_nomadic } } - } - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_development_growth_1_modifier } - } - 10 = { - trigger = { - scope:liege = { government_has_flag = government_is_nomadic } - } - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_fertility_growth_1_modifier } - } - } -} - -book_improvement_effect = { - random_list = { - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_monthly_minor_prestige_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_vassal_limit_1_modifier } - } - 2 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_parochial_vassal_opinion_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_parochial_tax_contribution_mult_1_modifier } - } - 2 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_zealot_vassal_opinion_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_zealot_tax_contribution_mult_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_owned_scheme_secrecy_add_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_hostile_scheme_phase_duration_add_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_personal_scheme_phase_duration_add_1_modifier } - } - 10 = { - trigger = { - scope:liege = { NOT = { government_has_flag = government_is_nomadic } } - } - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_development_growth_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_learn_language_scheme_phase_duration_add_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_monthly_lifestyle_xp_minor_modifier } - } - 10 = { - trigger = { - scope:liege = { government_has_flag = government_is_nomadic } - } - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_fertility_growth_1_modifier } - } - } -} - -pedestal_improvement_effect = { - random_list = { - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_monthly_prestige_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_court_grandeur_baseline_add_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_monthly_prestige_add_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_courtly_tax_contribution_mult_1_modifier } - } - 2 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_courtly_vassal_opinion_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_build_gold_cost_1_modifier } - } - 2 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_zealot_vassal_opinion_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_zealot_tax_contribution_mult_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_belligerent_tax_contribution_mult_1_modifier } - } - 2 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_belligerent_vassal_opinion_1_modifier } - } - 10 = { - trigger = { - scope:liege = { NOT = { government_has_flag = government_is_nomadic } } - } - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_development_growth_1_modifier } - } - 10 = { - trigger = { - scope:liege = { government_has_flag = government_is_nomadic } - } - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_fertility_growth_1_modifier } - } - } -} - -miscellaneous_improvement_effect = { - random_list = { - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_monthly_minor_prestige_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_vassal_limit_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_owned_scheme_secrecy_add_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_hostile_scheme_phase_duration_add_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_personal_scheme_phase_duration_add_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_learn_language_scheme_phase_duration_add_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_monthly_lifestyle_xp_miniscule_modifier } - } - } -} - -journal_improvement_effect = { - random_list = { - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_monthly_minor_prestige_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_vassal_limit_1_modifier } - } - 2 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_parochial_vassal_opinion_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_parochial_tax_contribution_mult_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_owned_scheme_secrecy_add_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_hostile_scheme_phase_duration_add_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_personal_scheme_phase_duration_add_1_modifier } - } - 10 = { - trigger = { - scope:liege = { NOT = { government_has_flag = government_is_nomadic } } - } - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_development_growth_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_learn_language_scheme_phase_duration_add_1_modifier } - } - 10 = { - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_monthly_lifestyle_xp_minor_modifier } - } - 10 = { - trigger = { - scope:liege = { government_has_flag = government_is_nomadic } - } - antiquarian_apply_modifier_to_artifact_effect = { MODIFIER = artifact_fertility_growth_1_modifier } - } - } -} diff --git a/N3OW/common/scripted_effects/00_bastard_effects.txt b/N3OW/common/scripted_effects/00_bastard_effects.txt deleted file mode 100644 index b09390af..00000000 --- a/N3OW/common/scripted_effects/00_bastard_effects.txt +++ /dev/null @@ -1,1332 +0,0 @@ - -##################################################################### -# EFFECT LIST -##################################################################### -# !!! Remember to add all new effects with a short description here !!! - -#bastard_secret_check_effect -#bastard_real_father_suspicion_chance_effect -#remove_all_bastard_traits - Removes any and all relevant bastard traits, used primarily in the adoption interaction - -##################################################################### -# EFFECTS -##################################################################### - -#Sets the correct "parent house" for a known bastard -set_parent_house_effect = { - if = { - limit = { - age < bastard_legitimacy_change_cutoff_age - } - if = { - limit = { - should_mother_give_house_to_bastard_trigger = yes - } - set_house = mother.house - } - else_if = { - limit = { - exists = father - exists = father.house - } - set_house = father.house - } - else = { - set_to_lowborn = yes - } - } -} - -#Sets the correct bastard trait -add_bastard_trait_based_on_faith_effect = { - if = { - limit = { - faith = { - has_doctrine_parameter = bastards_none - } - } - add_trait_force_tooltip = wild_oat - } - else = { - add_trait_force_tooltip = bastard - scope:father ?= { - random_memory = { - limit = { - OR = { - has_memory_type = first_born - has_memory_type = twins_born - has_memory_type = child_born - } - any_memory_participant = { scope:child ?= this } - } - set_variable = bastard - } - } - scope:mother ?= { - random_memory = { - limit = { - OR = { - has_memory_type = first_born - has_memory_type = twins_born - has_memory_type = child_born - } - any_memory_participant = { scope:child ?= this } - } - set_variable = bastard - } - } - scope:real_father = { - scope:child = { - if = { - limit = { has_trait = twin } - random_sibling = { - limit = { is_twin_of = scope:child } - save_scope_as = child_2 - } - } - } - if = { - limit = { - NOR = { - any_child = { - even_if_dead = yes - this != scope:child - } - exists = scope:child_2 - } - } - create_character_memory = { - type = first_born - participants = { child = scope:child } - } - } - else = { - if = { - limit = { exists = scope:child_2 } - create_character_memory = { - type = twins_born - participants = { - child = scope:child - child_2 = scope:child_2 - } - } - } - else = { - create_character_memory = { - type = child_born - participants = { child = scope:child } - } - } - } - scope:new_memory = { set_variable = bastard } - } - } -} - - -#Sets correct bastard trait and parentage depending on age - - -#Replaces one bastard-type trait with another as faith changes -replace_bastard_trait_based_on_faith_effect = { - if = { - limit = { - has_trait = bastard - } - if = { - limit = { - faith = { - has_doctrine_parameter = bastards_none - } - } - remove_trait = bastard - add_trait_force_tooltip = wild_oat - } - else = { - add_trait_force_tooltip = bastard - } - } -} - - - -pregnancy_spouse_suspicion_chance_effect = { - hidden_effect = { #Scopes mother and real_father exist - save_scope_as = spouse - random_list = { - 0 = { #Father is suspicious - trigger = { - accepts_adultery_without_penalty_trigger = no - } - - #Base chance - modifier = { - add = husband_suspicion_base_value - always = yes - } - #Increased chance of suspicion if it actually is a bastard - modifier = { - add = 50 - scope:real_father != scope:spouse - } - #Increase significantly if the mother has a known lover - modifier = { - add = 150 - scope:mother = { - OR = { - any_secret = { # Trigger for secret relations - type = secret_lover - is_known_by = scope:spouse - trigger_if = { - limit = { - exists = secret_target - } - secret_target != scope:spouse - } - } - any_relation = { # Trigger for public relations - type = lover - this != scope:spouse # No suspicion chance if their lover is us! - NOT = { has_secret_relation_lover = scope:mother } # Not a secret relation (That's checked in the above step). - } - } - } - } - #Increased chance of suspicion if the child is a bastard and the mother is not very smart - modifier = { - add = 10 - scope:real_father != scope:spouse - scope:mother = { - has_trait_rank = { - trait = intellect_bad - rank > 0 - } - } - } - modifier = { - add = 15 - scope:real_father != scope:spouse - scope:mother = { - has_trait_rank = { - trait = intellect_bad - rank > 1 - } - } - } - modifier = { - add = 20 - scope:real_father != scope:spouse - scope:mother = { - has_trait_rank = { - trait = intellect_bad - rank > 2 - } - } - } - #Negative modifier if the mother is smart - modifier = { - add = -5 - scope:mother = { - has_trait_rank = { - trait = intellect_good - rank > 0 - } - } - } - modifier = { - add = -10 - scope:mother = { - has_trait_rank = { - trait = intellect_good - rank > 1 - } - } - - } - modifier = { - add = -15 - scope:mother = { - has_trait_rank = { - trait = intellect_good - rank > 2 - } - } - } - #Bonuses for high intelligence if it is a bastard - modifier = { - add = 30 - scope:real_father != scope:spouse - has_trait_rank = { - trait = intellect_good - rank > 0 - } - } - modifier = { - add = 30 - scope:real_father != scope:spouse - has_trait_rank = { - trait = intellect_good - rank > 1 - } - } - modifier = { - add = 30 - scope:real_father != scope:spouse - has_trait_rank = { - trait = intellect_good - rank > 2 - } - } - #Negative modifiers for high intelligence if it is NOT a bastard - modifier = { - add = -30 - scope:real_father = scope:spouse - has_trait_rank = { - trait = intellect_good - rank > 0 - } - } - modifier = { - add = -30 - scope:real_father = scope:spouse - has_trait_rank = { - trait = intellect_good - rank > 1 - } - } - modifier = { - add = -30 - scope:real_father = scope:spouse - has_trait_rank = { - trait = intellect_good - rank > 2 - } - } - #Increased chance if father is paranoid - modifier = { - add = 50 - has_trait = paranoid - } - #Very high chance if father is Celibate and not stupid - modifier = { - add = 1500 - has_trait = celibate - NOT = { - has_trait_rank = { - trait = intellect_bad - rank > 2 - } - } - } - modifier = { - scope:mother = { has_variable = borte_first_child_var } # You already know about this - factor = 0 - } - trigger_event = adultery.1001 - } - 100 = { #No suspicion. Regular notification message is good enough for this if it's not the first child - trigger = { - accepts_adultery_without_penalty_trigger = no - } - - #Base chance - modifier = { - add = { - value = 0 - subtract = husband_suspicion_base_value - } - always = yes - } - - if = { - limit = { - OR = { - any_child = { count < 1 } - AND = { - NOT = { any_child = { dynasty = scope:spouse.dynasty } } - scope:spouse = { matrilinear_marriage = no } - } - } - } - trigger_event = pregnancy.1002 - } - else = { - send_interface_toast = { - type = msg_known_pregnancy - left_icon = scope:mother - title = pregnancy_not_first_child_message_title - desc = pregnancy_not_first_child_message - show_as_tooltip = { - scope:mother = { add_trait_force_tooltip = pregnant } - } - } - } - } - } - } -} - - -bastard_real_father_suspicion_chance_effect = { - hidden_effect = { #Root will here refer to the mother with a pregnancy - save_scope_as = mother - - #Build a list of potential fathers - every_in_list = { - variable = potential_father_variable_list - limit = { - NOT = { is_consort_of = scope:mother } - } - add_to_list = potential_fathers - } - clear_variable_list = potential_father_variable_list #Remove list when unnecessary - every_relation = { - type = lover - limit = { - NOR = { - root = { is_consort_of = prev } - is_in_list = potential_fathers - } - } - add_to_list = potential_fathers - } - if = { - limit = { - scope:real_father = { - NOR = { - root = { is_consort_of = prev } - is_in_list = potential_fathers - } - } - } - scope:real_father = { - add_to_list = potential_fathers - } - } - - every_in_list = { - list = potential_fathers - random = { #Real father has a random chance of suspecting that they are - chance = real_father_suspicion_base_value - modifier = { - add = 10 - has_trait = shrewd - } - modifier = { - add = 10 - has_trait = intellect_good_1 - } - modifier = { - add = 20 - has_trait = intellect_good_2 - } - modifier = { - add = 30 - has_trait = intellect_good_3 - } - modifier = { - add = -30 - has_trait = dull - } - modifier = { - add = -10 - has_trait = intellect_bad_1 - } - modifier = { - add = -20 - has_trait = intellect_bad_2 - } - modifier = { - add = -10 - has_trait = intellect_bad_3 - } - modifier = { - add = 35 - is_married = no - is_concubine = no - } - modifier = { - add = { - value = intrigue - } - } - #Very low chance if the potential_father is in fact, a woman and not stupid - modifier = { - add = -1500 - is_female = yes - NOT = { - has_trait_rank = { - trait = intellect_bad - rank > 2 - } - } - } - if = { - limit = { - scope:mother = { - exists = var:event_triggered - } - } - trigger_event = { - id = pregnancy.3001 - days = { 5 20 } - } - } - - if = { - limit = { - NOT = { - scope:mother = { - exists = var:event_triggered - } - } - } - scope:mother = { - set_variable = { - name = event_triggered - value = yes - days = 365 - } - } - } - } - } - } -} - -bastard_pregnancy_mother_announcement_effect = { - hidden_effect = { - if = { - limit = { - NOT = { has_trait = pregnant } - } - add_trait_force_tooltip = pregnant - } - } - # Could build an event target list instead, and use it to fire a first_valid on_action where all the events have triggers inside them so that only one event will fire for any given character - - scope:mother = { - set_known_bastard_on_pregnancy = yes - add_character_flag = { - flag = pregnancy_real_father_of_bastard_is_known_flag - months = 9 - } - trigger_event = { - id = pregnancy.6001 - days = 3 - } - } - scope:real_father = { - trigger_event = { - id = pregnancy.6002 - days = 3 - } - } - if = { - limit = { - scope:mother = { is_married = yes } - } - scope:mother = { - every_spouse = { - if = { - limit = { accepts_adultery_without_penalty_trigger = yes } - trigger_event = { - id = pregnancy.6999 - days = 3 - } - } - else = { - trigger_event = { - id = pregnancy.6003 - days = 3 - } - } - } - } - - } - - - scope:mother = { - every_parent = { - limit = { - is_ai = no # No need to send pure notifications to AI - NOR = { - this = scope:mother - this = scope:real_father - } - trigger_if = { - limit = { exists = scope:father } - this != scope:father - } - accepts_adultery_without_penalty_trigger = no - } - add_to_list = mother_family_list - trigger_event = { - id = pregnancy.6004 - days = 3 - } - } - every_child = { - limit = { - is_ai = no # No need to send pure notifications to AI - NOR = { - this = scope:mother - this = scope:real_father - } - trigger_if = { - limit = { - exists = scope:father - } - this != scope:father - } - accepts_adultery_without_penalty_trigger = no - } - add_to_list = mother_family_list - trigger_event = { - id = pregnancy.6004 - days = 3 - } - } - every_sibling = { - limit = { - is_ai = no # No need to send pure notifications to AI - NOR = { - this = scope:mother - this = scope:real_father - } - trigger_if = { - limit = { - exists = scope:father - } - this != scope:father - } - accepts_adultery_without_penalty_trigger = no - } - add_to_list = mother_family_list - trigger_event = { - id = pregnancy.6004 - days = 3 - } - } - } - scope:real_father = { - if = { - limit = { exists = primary_partner } - primary_partner = { - if = { - limit = { - NOT = { is_in_list = mother_family_list } #To guard against incest triggering multiple events - is_ai = no # No need to send pure notifications to AI - NOR = { - this = scope:mother - this = scope:real_father - } - trigger_if = { - limit = { - exists = scope:father - } - this != scope:father - } - accepts_adultery_without_penalty_trigger = no - } - trigger_event = { - id = pregnancy.6005 - days = 3 - } - } - } - } - every_parent = { - limit = { - NOT = { is_in_list = mother_family_list } #To guard against incest triggering multiple events - is_ai = no # No need to send pure notifications to AI - NOR = { - this = scope:mother - this = scope:real_father - } - trigger_if = { - limit = { - exists = scope:father - } - this != scope:father - } - accepts_adultery_without_penalty_trigger = no - } - trigger_event = { - id = pregnancy.6006 - days = 3 - } - } - every_child = { - limit = { - NOT = { is_in_list = mother_family_list } #To guard against incest triggering multiple events - NOR = { - this = scope:mother - this = scope:real_father - } - trigger_if = { - limit = { - exists = scope:father - } - this != scope:father - } - accepts_adultery_without_penalty_trigger = no - } - trigger_event = { - id = pregnancy.6006 - days = 3 - } - } - every_sibling = { - limit = { - NOT = { is_in_list = mother_family_list } #To guard against incest triggering multiple events - NOR = { - this = scope:mother - this = scope:real_father - } - trigger_if = { - limit = { - exists = scope:father - } - this != scope:father - } - accepts_adultery_without_penalty_trigger = no - } - trigger_event = { - id = pregnancy.6006 - days = 3 - } - } - } -} - - -bastard_pregnancy_married_mother_announcement_effect = { - save_scope_as = secret_exposer - add_to_temporary_list = notified_of_bastardy - scope:mother.pregnancy_assumed_father = { - save_scope_as = father - } - scope:mother.pregnancy_real_father = { - save_scope_as = real_father - } - - scope:mother = { - add_character_flag = { - flag = pregnancy_real_father_of_bastard_is_known_flag - months = 8 - } - set_known_bastard_on_pregnancy = yes - - if = { - limit = { - NOT = { is_in_list = notified_of_bastardy } - } - trigger_event = { - id = secret_bastard.0010 - days = 1 - } - add_to_temporary_list = notified_of_bastardy - } - } - scope:father = { - if = { - limit = { - NOT = { is_in_list = notified_of_bastardy } - } - trigger_event = { - id = secret_bastard.0011 - days = 1 - } - add_to_temporary_list = notified_of_bastardy - } - } - scope:real_father = { - if = { - limit = { - NOT = { is_in_list = notified_of_bastardy } - } - trigger_event = { - id = secret_bastard.0013 - days = 1 - } - add_to_temporary_list = notified_of_bastardy - } - add_to_temporary_list = notified_of_bastardy - - if = { - limit = { - exists = primary_partner - } - primary_partner = { - if = { - limit = { - NOT = { is_in_list = notified_of_bastardy } - } - trigger_event = { - id = secret_bastard.0014 - days = 1 - } - add_to_temporary_list = notified_of_bastardy - } - } - } - } - scope:mother = { - every_close_or_extended_family_member = { - limit = { - NOT = { is_in_list = notified_of_bastardy } - - } - add_to_temporary_list = to_be_notified_of_bastardy - } - if = { - limit = { - is_playable_character = yes - liege ?= { NOT = { is_in_list = notified_of_bastardy } } - } - liege = { - add_to_temporary_list = to_be_notified_of_bastardy - } - } - } - scope:real_father = { - every_close_family_member = { - limit = { - NOT = { is_in_list = notified_of_bastardy } - - } - add_to_temporary_list = to_be_notified_of_bastardy - } - } - scope:father = { - every_close_family_member = { - limit = { - NOT = { is_in_list = notified_of_bastardy } - - } - add_to_temporary_list = to_be_notified_of_bastardy - } - } - - every_in_list = { - list = to_be_notified_of_bastardy - limit = { - NOT = { is_in_list = notified_of_bastardy } - } - trigger_event = { - id = secret_bastard.0012 - days = 1 - } - - add_to_temporary_list = notified_of_bastardy - } -} - -bastard_pregnancy_unmarried_mother_announcement_effect = { - - save_scope_as = secret_exposer - - scope:mother.pregnancy_real_father = { - save_scope_as = real_father - } - - scope:mother = { - set_known_bastard_on_pregnancy = yes - add_character_flag = { - flag = pregnancy_real_father_of_bastard_is_known_flag - months = 9 - } - - trigger_event = { - id = secret_bastard.1000 - days = 1 - } - add_to_temporary_list = notified_of_bastardy - } - scope:real_father = { - trigger_event = { - id = secret_bastard.1003 - days = 1 - } - add_to_temporary_list = notified_of_bastardy - - if = { - limit = { - is_married = yes - } - primary_spouse = { - trigger_event = { - id = secret_bastard.1004 - days = 1 - } - add_to_temporary_list = notified_of_bastardy - } - } - } - scope:mother = { - every_parent = { - limit = { - NOT = { is_in_list = notified_of_bastardy } - - } - trigger_event = { - id = secret_bastard.1001 - days = 1 - } - add_to_temporary_list = notified_of_bastardy - } - every_close_or_extended_family_member = { - limit = { - NOT = { is_in_list = notified_of_bastardy } - - } - add_to_temporary_list = to_be_notified_of_bastardy - } - if = { - limit = { - is_playable_character = yes - liege ?= { NOT = { is_in_list = notified_of_bastardy } } - } - liege = { - add_to_temporary_list = to_be_notified_of_bastardy - } - } - } - scope:real_father = { - every_close_or_extended_family_member = { - limit = { - NOT = { is_in_list = notified_of_bastardy } - - } - add_to_temporary_list = to_be_notified_of_bastardy - } - } - - every_in_list = { - list = to_be_notified_of_bastardy - limit = { - NOT = { is_in_list = notified_of_bastardy } - } - trigger_event = { - id = secret_bastard.1002 - days = 1 - } - add_to_temporary_list = notified_of_bastardy - } -} - - -#Selects the correct bastard pregnancy announcement to fire -bastardy_pregnancy_announcement_effect = { - custom_tooltip = bastardy_pregnancy_announcement_tooltip - if = { - limit = { - this = scope:mother - } - bastard_pregnancy_mother_announcement_effect = yes - } - else_if = { - limit = { - exists = scope:mother.pregnancy_assumed_father - } - bastard_pregnancy_married_mother_announcement_effect = yes - } - else = { - bastard_pregnancy_unmarried_mother_announcement_effect = yes - } - if = { - limit = { - is_ai = no - } - add_character_flag = { - flag = tutorial_reactive_advice_bastards - } - } -} - - - -#Effect run in the legitimize bastard interactions -legitimize_bastard_interaction_opinions_effect = { - hidden_effect = { - $LEGITIMIZER$ = { - save_scope_as = actor - } - if = { - limit = { - exists = $HOUSE_HEAD$ - } - $HOUSE_HEAD$ = { - save_scope_as = house_head - } - } - - if = { - limit = { - scope:actor = { - is_parent_of = $BASTARD$ - } - } - scope:actor = { - save_scope_as = parent - } - } - else = { - $BASTARD$ = { - random_parent = { - limit = { - house = scope:actor.house - is_playable_character = yes - } - alternative_limit = { - house = scope:actor.house - } - alternative_limit = { - always = yes - } - weight = { - base = 1 - compare_modifier = { - value = highest_held_title_tier - multiplier = 1000 - } - } - save_scope_as = parent - } - } - } - } - # Reveal secret if you are the father - if = { - limit = { - any_secret = { - type = secret_unmarried_illegitimate_child - secret_target = { - real_father = { - this = scope:actor - } - } - } - } - random_secret = { - type = secret_unmarried_illegitimate_child - limit = { - secret_target = { - real_father = { - this = root - } - } - } - expose_secret = scope:actor - } - } - - $BASTARD$ = { - hidden_effect = { remove_trait = bastard } - add_trait_force_tooltip = legitimized_bastard - add_opinion = { - target = scope:actor - modifier = legitimized_me_opinion - } - scope:actor = { - if = { - limit = { - is_parent_of = $BASTARD$ - } - $BASTARD$ = { - random_parent = { - limit = { this != scope:actor } - add_opinion = { - target = scope:actor - modifier = legitimized_my_child_opinion - } - } - } - every_spouse = { - limit = { - NOT = { is_parent_of = $BASTARD$ } - } - add_opinion = { - target = scope:actor - modifier = legitimized_a_bastard_opinion - } - } - if = { - limit = { - any_child = { - is_adult = yes - NOT = { this = $BASTARD$ } - NOR = { - has_trait = bastard - has_trait = legitimized_bastard - opinion = { - value >= 40 - target = $BASTARD$ - } - } - } - } - every_child = { - limit = { - is_adult = yes - NOT = { this = $BASTARD$ } - NOR = { - has_trait = bastard - has_trait = legitimized_bastard - opinion = { - value >= 40 - target = $BASTARD$ - } - } - } - custom = every_child_adult_non_bastard_dislike - add_opinion = { - target = scope:actor - modifier = legitimized_a_bastard_opinion - } - } - } - } - } - } - - hidden_effect = { - $BASTARD$ = { - trigger_event = bastard_interaction.0001 - - save_scope_as = legitimized_bastard - - if = { - limit = { - NOT = { exists = scope:newborn_legitimization } - } - every_parent = { - limit = { this != scope:actor } - trigger_event = bastard_interaction.0003 - } - } - } - - scope:actor = { - if = { - limit = { - NOT = { exists = scope:newborn_legitimization } - is_parent_of = $BASTARD$ - } - trigger_event = bastard_interaction.0002 - } - - if = { - limit = { - is_parent_of = $BASTARD$ - } - every_spouse = { - limit = { - NOT = { is_parent_of = $BASTARD$ } - this != scope:actor - } - $BASTARD$ = { save_scope_as = legitimized_bastard } - trigger_event = bastard_interaction.0004 - } - every_child = { - limit = { - is_adult = yes - NOT = { this = $BASTARD$ } - this != scope:actor - } - trigger_event = bastard_interaction.0005 - } - } - else = { - scope:parent ?= { - if = { - limit = { - NOT = { exists = scope:newborn_legitimization } - } - trigger_event = bastard_interaction.0006 - } - - every_spouse = { - limit = { - NOT = { is_parent_of = $BASTARD$ } - this != scope:actor - } - trigger_event = bastard_interaction.0007 - } - - every_child = { - limit = { - is_adult = yes - NOT = { this = $BASTARD$ } - this != scope:actor - } - trigger_event = bastard_interaction.0008 - } - } - } - } - } -} - - -bastard_real_father_discovery_on_birth_effect = { - hidden_effect = { - random_secret = { - limit = { - OR = { - secret_type = secret_unmarried_illegitimate_child - secret_type = secret_disputed_heritage - } - secret_target = scope:child - } - save_scope_as = secret - } - - scope:child.real_father = { - random = { - chance = real_father_suspicion_base_value - compare_modifier = { - value = intrigue - } - modifier = { - add = 25 - has_trait = intellect_good - } - modifier = { - add = -20 - has_trait = intellect_bad - } - - trigger_event = { - id = birth.1006 - days = 5 - } - } - } - } -} - - - -bastard_to_wild_oat_conversion_effect = { - if = { #If you're a bastard and your new faith says they don't exist! - limit = { - has_trait = bastard - faith = { has_doctrine_parameter = bastards_none } - trigger_if = { #If you have a highborn parent, then you have to have their dynasty and their faith has to say no to bastards as well! Otherwise we might mess up too many successions... - limit = { - any_parent = { - exists = dynasty - } - } - exists = root.dynasty - any_parent = { - dynasty = root.dynasty - faith = { has_doctrine_parameter = bastards_none } - } - } - } - remove_trait = bastard - add_trait = wild_oat - } -} - -bastard_to_wild_oat_conversion_interaction_effect = { - if = { #If you're a bastard and your new faith says they don't exist! - limit = { - has_trait = bastard - scope:actor.faith = { has_doctrine_parameter = bastards_none } - trigger_if = { #If you have a highborn parent, then you have to have their dynasty and their faith has to say no to bastards as well! Otherwise we might mess up too many successions... - limit = { - any_parent = { - exists = dynasty - } - } - exists = scope:recipient.dynasty - any_parent = { - dynasty = scope:recipient.dynasty - faith = { has_doctrine_parameter = bastards_none } - } - } - } - remove_trait = bastard - add_trait_force_tooltip = wild_oat - } -} - -bastard_to_wild_oat_conversion_assimilation_effect = { - if = { #If you're a bastard and your new faith says they don't exist! - limit = { - has_trait = bastard - scope:new_faith = { has_doctrine_parameter = bastards_none } - trigger_if = { #If you have a highborn parent, then you have to have their dynasty and their faith has to say no to bastards as well! Otherwise we might mess up too many successions... - limit = { - any_parent = { - exists = dynasty - } - } - exists = dynasty - any_parent = { - dynasty = prev.dynasty - faith = { has_doctrine_parameter = bastards_none } - } - } - } - remove_trait = bastard - add_trait_force_tooltip = wild_oat - } -} - -remove_inherited_descendent_traits_effect = { - if = { - limit = { - has_trait = sayyid - exists = scope:real_father - NOT = { - scope:real_father = { has_trait = sayyid } - } - } - remove_trait = sayyid - } - if = { - limit = { - has_trait = golden_lineage - exists = scope:real_father - NOT = { - scope:real_father = { has_trait = golden_lineage } - } - } - remove_trait = golden_lineage - } -} - - -#Removes all bastard traits -remove_all_bastard_traits = { - if = { - limit = { - has_trait = wild_oat - } - remove_trait = wild_oat - } - if = { - limit = { - has_trait = bastard - } - remove_trait = bastard - } - if = { - limit = { - has_trait = legitimized_bastard - } - remove_trait = legitimized_bastard - } - if = { - limit = { - has_trait = disputed_heritage - } - remove_trait = disputed_heritage - } -} diff --git a/N3OW/common/scripted_effects/00_board_game_effects.txt b/N3OW/common/scripted_effects/00_board_game_effects.txt deleted file mode 100644 index 7ab97412..00000000 --- a/N3OW/common/scripted_effects/00_board_game_effects.txt +++ /dev/null @@ -1,583 +0,0 @@ - -################################################## -# Effects related to Board Games -################################################## - -################################################## -# SETUP & CLEANUP EFFECTS - -configure_start_board_game_effect = { - # DOCUMENTATION - ## scope:bg_initiator - ### Who started the board game? This is who the output/invalidation events will fire for. - ## scope:bg_attacker - ### The hostile party - in the event of a tie, the match is decided against them. - ## scope:bg_defender - ### The defending party - in the event of a tie, the match is decided in their favour. - ## scope:bg_system = flag:XYZ - ### These control both the relevant skills, counters, & some flavour adjacent to the game. - ### chess - ### pachisi - ### hnefatafl - ### tabula - ### go - ### fidchell - ## scope:locale = flag:XYZ - ### These just trigger the event background of the same name. New ones can be added as needed, but should be added across all three events (round, victory, loss/board_games.0001, board_games.0031, board_games.0041), as we can't add a scripted list. - ### terrain_scope - ### wilderness_scope - ### battlefield - ### temple - ### council_chamber - ### courtyard - ### dungeon - ### docks - ### feast - ### gallows - ### garden - ### market - ### sitting_room - ### bedchamber - ### study - ### physicians_study - ### tavern - ### throne_room - ### army_camp - ### random_nice_day - #### Selects either garden or sitting_room, depending on season. - ## output event ID - ### Which event fires after the game's completion? - - # Sort parties. - $BG_INITIATOR$ = { save_scope_as = bg_initiator } - $BG_DEFENDER$ = { save_scope_as = bg_defender } - $BG_ATTACKER$ = { save_scope_as = bg_attacker } - # Make sure they're clean for setup. - hidden_effect = { remove_board_game_variables_effect = yes} - # Set them both to busy for the single combat. - scope:bg_defender = { - set_variable = { - name = engaged_in_board_game - value = yes - } - } - scope:bg_attacker = { - set_variable = { - name = engaged_in_board_game - value = yes - } - } - ## Sadly, we have no good justification for ripping your shirt off whilst playing board games. - # Set rules & system. - save_scope_value_as = { - name = bg_system - value = flag:$SYSTEM$ - } - ## Chess - ### In chess, our counter order is Martial -> Learning -> Intrigue. - if = { - limit = { scope:bg_system = flag:chess } - save_scope_value_as = { - name = bg_skill_a - value = flag:martial - } - save_scope_value_as = { - name = bg_skill_b - value = flag:learning - } - save_scope_value_as = { - name = bg_skill_c - value = flag:intrigue - } - } - ## Pachisi - ### For pachisi, our counter order is Diplomacy -> Intrigue -> Stewardship. - else_if = { - limit = { scope:bg_system = flag:pachisi } - save_scope_value_as = { - name = bg_skill_a - value = flag:diplomacy - } - save_scope_value_as = { - name = bg_skill_b - value = flag:intrigue - } - save_scope_value_as = { - name = bg_skill_c - value = flag:stewardship - } - } - ## Hnefatafl - ### For hnefatafl, our counter order is Intrigue -> Martial -> Prowess. - else_if = { - limit = { scope:bg_system = flag:hnefatafl } - save_scope_value_as = { - name = bg_skill_a - value = flag:intrigue - } - save_scope_value_as = { - name = bg_skill_b - value = flag:martial - } - save_scope_value_as = { - name = bg_skill_c - value = flag:prowess - } - } - ## Tabula - ### For tabula, our counter order is Intrigue -> Learning -> Stewardship. - else_if = { - limit = { scope:bg_system = flag:tabula } - save_scope_value_as = { - name = bg_skill_a - value = flag:intrigue - } - save_scope_value_as = { - name = bg_skill_b - value = flag:learning - } - save_scope_value_as = { - name = bg_skill_c - value = flag:stewardship - } - } - ## Go - ### For go, our counter order is Learning -> Martial -> Intrigue. - ### Additional game design credit: Alexander Windahl. - else_if = { - limit = { scope:bg_system = flag:go } - save_scope_value_as = { - name = bg_skill_a - value = flag:learning - } - save_scope_value_as = { - name = bg_skill_b - value = flag:martial - } - save_scope_value_as = { - name = bg_skill_c - value = flag:intrigue - } - } - ## Fidchell - ### For fidchell, our counter order is Learning -> Prowess -> Diplomacy. - else_if = { - limit = { scope:bg_system = flag:fidchell } - save_scope_value_as = { - name = bg_skill_a - value = flag:learning - } - save_scope_value_as = { - name = bg_skill_b - value = flag:prowess - } - save_scope_value_as = { - name = bg_skill_c - value = flag:diplomacy - } - } - # Note where the fight is taking place, if we're using a specific location. - save_scope_value_as = { - name = bg_locale - value = flag:$LOCALE$ - } - ## Grab _scope backgrounds appropriately.. - if = { - limit = { scope:bg_locale = flag:terrain_scope } - scope:bg_defender.location = { save_scope_as = background_terrain_scope } - } - else_if = { - limit = { scope:bg_locale = flag:wilderness_scope } - scope:bg_defender.location = { save_scope_as = background_wilderness_scope } - } - ## Sort any random_ backgrounds if necessary. - else_if = { - limit = { scope:bg_locale = flag:random_nice_day } - random_list = { - # Indoors. - 50 = { - trigger = { - exists = scope:bg_defender.location - is_nice_season_to_be_inside_trigger = { LOCATION = scope:bg_defender.location } - } - save_scope_value_as = { - name = bg_locale - value = flag:sitting_room - } - } - # Outdoors. - 50 = { - trigger = { - exists = scope:bg_defender.location - is_nice_season_to_be_outside_trigger = { LOCATION = scope:bg_defender.location } - } - save_scope_value_as = { - name = bg_locale - value = flag:garden - } - } - # Fallback: occasionally characters fall into a bloody void between space and time, I guess, and when they do we need to stop trying to calculate the weather for non-Euclidian space. - 50 = { - trigger = { - NOT = { exists = scope:bg_defender.location } - } - save_scope_value_as = { - name = bg_locale - # Because black holes are from space and space lives inside books. - value = flag:study - } - } - } - } - # Arrange aftermath. - save_scope_value_as = { - name = follow_up_event - value = event_id:$OUTPUT_EVENT$ - } - save_scope_value_as = { - name = invalidation_event - value = event_id:$INVALIDATION_EVENT$ - } - # Configure starting scopes'n'variables. - scope:bg_defender = { - # Set our current round. - set_variable = { - name = bg_current_round - value = 1 - } - # Set up our initial scores. - set_variable = { - name = bg_current_score - value = 0 - } - } - scope:bg_attacker = { - # Set up our initial scores. - set_variable = { - name = bg_current_score - value = 0 - } - } - # Finally, send the first event. - scope:bg_defender = { trigger_event = board_games.0001 } -} - -# Clean up all variables resulting from playing a board game. -remove_board_game_variables_effect = { - # Player-side variables. - remove_variable = bg_current_round - remove_variable = bg_current_score - remove_variable = bg_move_result - # If there are any wagering counties, clear the blockers on their being wagered. - if = { - limit = { exists = scope:bg_stake_land_recipient } - scope:bg_stake_land_recipient = { remove_variable = wagered_county } - } - if = { - limit = { exists = scope:bg_stake_land_actor } - scope:bg_stake_land_actor = { remove_variable = wagered_county } - } - # Remove any debug variables. - remove_variable = bg_gib_only_losing_locs - remove_variable = bg_gib_only_winning_locs - # Note, we don't remove var:engaged_in_board_game here, as we run this effect at the start of games for clean-up also. -} - -remove_engaged_in_board_game_variables_effect = { - scope:bg_attacker = { - if = { - # Restrict to live characters to prevent errors. - limit = { is_alive = yes } - remove_variable = engaged_in_board_game - } - } - scope:bg_defender = { - if = { - # Restrict to live characters to prevent errors. - limit = { is_alive = yes } - remove_variable = engaged_in_board_game - } - } -} - -# Clean all consequences of a single combat. -remove_board_game_info_effect = { - scope:bg_defender = { - # Only remove variables if they're alive, as otherwise we get errors. - if = { - limit = { is_alive = yes } - remove_board_game_variables_effect = yes - } - } - scope:bg_attacker = { - # Only remove variables if they're alive, as otherwise we get errors. - if = { - limit = { is_alive = yes } - remove_board_game_variables_effect = yes - } - } - remove_engaged_in_board_game_variables_effect = yes -} - -bg_fire_clean_up_and_invalidate_effect = { - remove_engaged_in_board_game_variables_effect = yes - # We try to wing this at scope:bg_defender... - if = { - limit = { - scope:bg_defender = { is_alive = yes } - } - scope:bg_defender = { - trigger_event = { saved_event_id = scope:invalidation_event } - } - } - # ... then scope:bg_attacker... - else_if = { - limit = { - scope:bg_attacker = { is_alive = yes } - } - scope:bg_attacker = { - trigger_event = { saved_event_id = scope:invalidation_event } - } - } - # ... then scope:bg_initiator... - else_if = { - limit = { - scope:bg_initiator = { is_alive = yes } - } - scope:bg_initiator = { - trigger_event = { saved_event_id = scope:invalidation_event } - } - } - # ... then we give up, as somehow *everyone* involved in the board game has died simultaneously. -} - -################################################## -# INTERACTION-SPECIFIC EFFECTS - -challenge_to_2p_chess_interaction_lock_in_actor_stake_land_effect = { - scope:actor = { - save_temporary_scope_as = ordering_char_temp - ordered_held_title = { - limit = { - bg_stake_land_valid_neighbouring_county_to_trade_trigger = { NEIGHBOUR = scope:recipient } - } - order_by = bg_stake_land_evaluate_appropriate_county_ordering_value - save_scope_as = bg_stake_land_actor - set_variable = wagered_county - } - } -} - -challenge_to_2p_chess_interaction_lock_in_game_type_effect = { - $GAME_TYPE_SETTER$ = { - # Landless characters use their location. - if = { - limit = { is_playable_character = no } - location = { - # Pachisi - favoured in the eastern parts of the map. - if = { - limit = { bg_game_type_region_pachisi_trigger = yes } - save_scope_value_as = { - name = bg_interaction_game_type - value = flag:pachisi - } - } - # Hnefatafl - favoured in the northern parts of the map. - else_if = { - limit = { bg_game_type_region_hnefatafl_trigger = yes } - save_scope_value_as = { - name = bg_interaction_game_type - value = flag:hnefatafl - } - } - # Tabula - favoured around the Med. - else_if = { - limit = { bg_game_type_region_tabula_trigger = yes } - save_scope_value_as = { - name = bg_interaction_game_type - value = flag:tabula - } - } - # Go - favoured around Tibet. - else_if = { - limit = { bg_game_type_region_go_trigger = yes } - save_scope_value_as = { - name = bg_interaction_game_type - value = flag:go - } - } - # Fidchell - favoured around the Celtic rim. - else_if = { - limit = { bg_game_type_region_fidchell_trigger = yes } - save_scope_value_as = { - name = bg_interaction_game_type - value = flag:fidchell - } - } - # Chess - fallback. - else = { - save_scope_value_as = { - name = bg_interaction_game_type - value = flag:chess - } - } - } - } - # Landed characters use their capital. - else = { - capital_province = { - # Pachisi - favoured in the eastern parts of the map. - if = { - limit = { bg_game_type_region_pachisi_trigger = yes } - save_scope_value_as = { - name = bg_interaction_game_type - value = flag:pachisi - } - } - # Hnefatafl - favoured in the northern parts of the map. - else_if = { - limit = { bg_game_type_region_hnefatafl_trigger = yes } - save_scope_value_as = { - name = bg_interaction_game_type - value = flag:hnefatafl - } - } - # Tabula - favoured around the Med. - else_if = { - limit = { bg_game_type_region_tabula_trigger = yes } - save_scope_value_as = { - name = bg_interaction_game_type - value = flag:tabula - } - } - # Go - favoured around Tibet. - else_if = { - limit = { bg_game_type_region_go_trigger = yes } - save_scope_value_as = { - name = bg_interaction_game_type - value = flag:go - } - } - # Fidchell - favoured around the Celtic rim. - else_if = { - limit = { bg_game_type_region_fidchell_trigger = yes } - save_scope_value_as = { - name = bg_interaction_game_type - value = flag:fidchell - } - } - # Chess - fallback. - else = { - save_scope_value_as = { - name = bg_interaction_game_type - value = flag:chess - } - } - } - } - } -} - -fp2_bg_stake_friendly_effect = { - $VICTOR$ = { - if = { - # Obscure opinion adds from players. - limit = { is_ai = yes } - add_opinion = { - target = $LOSER$ - modifier = pleased_opinion - opinion = 25 - } - } - add_stress = minor_stress_loss - } - $LOSER$ = { - if = { - # Obscure opinion adds from players. - limit = { is_ai = yes } - add_opinion = { - target = $VICTOR$ - modifier = pleased_opinion - opinion = 10 - } - } - add_stress = minor_stress_gain - } -} - -fp2_bg_stake_fame_effect = { - $VICTOR$ = { add_prestige = medium_prestige_gain } - $LOSER$ = { add_prestige = minor_prestige_loss } -} - -fp2_bg_stake_fortune_effect = { - # A nice, simple, transfer of funds. - $LOSER$ = { - pay_short_term_gold = { - target = $VICTOR$ - gold = scope:bg_stake_gold - } - } -} - -fp2_bg_stake_titles_effect = { - create_title_and_vassal_change = { - type = granted - save_scope_as = change - } - if = { - limit = { $VICTOR$ = scope:actor } - scope:bg_stake_land_recipient = { - change_title_holder = { - holder = scope:actor - change = scope:change - } - } - } - else_if = { - limit = { $VICTOR$ = scope:recipient } - scope:bg_stake_land_actor = { - change_title_holder = { - holder = scope:recipient - change = scope:change - } - } - } - resolve_title_and_vassal_change = scope:change -} - -################################################## -# RESULT EFFECTS - -perk_interaction_0122_apply_effects_effect = { - # Stakes. - ## Friendlies bet opinion & stress. - if = { - limit = { always = scope:chess_friendly } - fp2_bg_stake_friendly_effect = { - VICTOR = scope:bg_victor - LOSER = scope:bg_loser - } - } - ## Fame bets prestige. - if = { - limit = { always = scope:chess_prestige } - fp2_bg_stake_fame_effect = { - VICTOR = scope:bg_victor - LOSER = scope:bg_loser - } - } - ## Fortune bets gold. - if = { - limit = { always = scope:chess_gold } - fp2_bg_stake_fortune_effect = { - VICTOR = scope:bg_victor - LOSER = scope:bg_loser - } - } - ## Land bets... land. - if = { - limit = { always = scope:chess_land } - fp2_bg_stake_titles_effect = { VICTOR = scope:bg_victor } - } -} diff --git a/N3OW/common/scripted_effects/00_bookmark_effects.txt b/N3OW/common/scripted_effects/00_bookmark_effects.txt deleted file mode 100644 index 9acae130..00000000 --- a/N3OW/common/scripted_effects/00_bookmark_effects.txt +++ /dev/null @@ -1,27 +0,0 @@ -################ -# 867 NORTHMEN # -################ - -bookmark_867_northmen_aellas_capture_war_imprisonment_effect = { - if = { - limit = { - scope:defender_loser = { - this = character:163103 #Aella - is_ai = yes - } - NOR = { - is_target_in_global_variable_list = { - name = triggered_bookmark_events - target = flag:bookmark_867_northmen_aellas_capture - } - character:163103 = { is_imprisoned = yes } - } - } - scope:attacker_winner = { - imprison = { - target = scope:defender_loser - type = dungeon - } - } - } -} \ No newline at end of file diff --git a/N3OW/common/scripted_effects/00_bp1_artifact_creation_effects.txt b/N3OW/common/scripted_effects/00_bp1_artifact_creation_effects.txt deleted file mode 100644 index cb3d5e60..00000000 --- a/N3OW/common/scripted_effects/00_bp1_artifact_creation_effects.txt +++ /dev/null @@ -1,169 +0,0 @@ -add_tier_one_perfume_effect = { - random_list = { - pick = 1 - unique = yes - - 1 = { - add_artifact_modifier = artifact_monthly_minor_prestige_1_modifier - } - 1 = { - add_artifact_modifier = artifact_monthly_prestige_gain_per_happy_powerful_vassal_add_1_modifier - } - 1 = { - add_artifact_modifier = artifact_happy_powerful_vassal_tax_contribution_mult_1_modifier - } - 1 = { - add_artifact_modifier = artifact_courtier_and_guest_opinion_1_modifier - } - 1 = { - add_artifact_modifier = artifact_owned_personal_scheme_success_chance_add_1_modifier - } - } -} - -add_tier_two_perfume_effect = { - random_list = { - pick = 1 - unique = yes - - 1 = { - add_artifact_modifier = artifact_monthly_minor_prestige_2_modifier - } - 1 = { - add_artifact_modifier = artifact_monthly_prestige_gain_per_happy_powerful_vassal_add_2_modifier - } - 1 = { - add_artifact_modifier = artifact_courtier_and_guest_opinion_2_modifier - } - 1 = { - add_artifact_modifier = artifact_clergy_opinion_1_modifier - } - 1 = { - add_artifact_modifier = artifact_owned_personal_scheme_success_chance_add_2_modifier - } - } -} - -add_tier_three_perfume_effect = { - random_list = { - pick = 1 - unique = yes - - 1 = { - add_artifact_modifier = artifact_monthly_minor_prestige_3_modifier - } - 1 = { - add_artifact_modifier = artifact_dynasty_opinion_1_modifier - } - 1 = { - add_artifact_modifier = artifact_monthly_dynasty_prestige_1_modifier - } - 1 = { - add_artifact_modifier = artifact_monthly_prestige_gain_per_happy_powerful_vassal_add_3_modifier - } - 1 = { - add_artifact_modifier = artifact_courtier_and_guest_opinion_3_modifier - } - 1 = { - add_artifact_modifier = artifact_owned_personal_scheme_success_chance_add_3_modifier - } - 1 = { - add_artifact_modifier = artifact_seduce_scheme_phase_duration_add_1_modifier - } - 1 = { - add_artifact_modifier = artifact_courting_scheme_phase_duration_add_1_modifier - } - 1 = { - add_artifact_modifier = artifact_spouse_opinion_add_1_modifier - } - 1 = { - add_artifact_modifier = artifact_stress_gain_1_modifier - } - 1 = { - add_artifact_modifier = artifact_negate_health_penalty_add_1_modifier - } - } -} - -add_tier_four_perfume_effect = { - random_list = { - pick = 1 - unique = yes - - 1 = { - add_artifact_modifier = artifact_monthly_minor_prestige_4_modifier - } - 1 = { - add_artifact_modifier = artifact_dynasty_opinion_2_modifier - } - 1 = { - add_artifact_modifier = artifact_monthly_dynasty_prestige_2_modifier - } - 1 = { - add_artifact_modifier = artifact_monthly_prestige_gain_per_happy_powerful_vassal_add_4_modifier - } - 1 = { - add_artifact_modifier = artifact_courtier_and_guest_opinion_4_modifier - } - 1 = { - add_artifact_modifier = artifact_owned_personal_scheme_success_chance_add_4_modifier - } - 1 = { - add_artifact_modifier = artifact_seduce_scheme_phase_duration_add_2_modifier - } - 1 = { - add_artifact_modifier = artifact_courting_scheme_phase_duration_add_2_modifier - } - 1 = { - add_artifact_modifier = artifact_spouse_opinion_add_2_modifier - } - 1 = { - add_artifact_modifier = artifact_stress_gain_2_modifier - } - 1 = { - add_artifact_modifier = artifact_negate_health_penalty_add_2_modifier - } - } -} - -add_vetiver_effect = { - random_list = { - pick = 1 - unique = yes - - 1 = { - add_artifact_modifier = artifact_health_gain_2_modifier - } - 1 = { - add_artifact_modifier = artifact_health_gain_3_modifier - } - } -} - -add_camphor_effect = { - random_list = { - pick = 1 - unique = yes - - 1 = { - add_artifact_modifier = artifact_courtly_vassal_opinion_2_modifier - } - 1 = { - add_artifact_modifier = artifact_courtly_vassal_opinion_3_modifier - } - } -} - -add_ambergris_effect = { - random_list = { - pick = 1 - unique = yes - - 1 = { - add_artifact_modifier = artifact_monthly_dynasty_prestige_2_modifier - } - 1 = { - add_artifact_modifier = artifact_monthly_dynasty_prestige_3_modifier - } - } -} diff --git a/N3OW/common/scripted_effects/00_building_effects.txt b/N3OW/common/scripted_effects/00_building_effects.txt deleted file mode 100644 index b83464e9..00000000 --- a/N3OW/common/scripted_effects/00_building_effects.txt +++ /dev/null @@ -1,2978 +0,0 @@ -##################################################################### -# EFFECT LIST -##################################################################### -# !!! Remember to add all new effects with a short description here !!! - -#add_next_building_tier_effect -#add_random_building_effect -#add_random_building_variable_effect - -##################################################################### -# EFFECTS -##################################################################### - -# Builds or upgrades the specified building, e.g. outposts -add_next_building_tier_effect = { - if = { - limit = { - NOT = { has_building_or_higher = $BUILDING$_01 } - } - add_building = $BUILDING$_01 - } - else_if = { - limit = { has_building = $BUILDING$_01 } - add_building = $BUILDING$_02 - } - else_if = { - limit = { has_building = $BUILDING$_02 } - add_building = $BUILDING$_03 - } - else_if = { - limit = { has_building = $BUILDING$_03 } - add_building = $BUILDING$_04 - } - else_if = { - limit = { has_building = $BUILDING$_04 } - add_building = $BUILDING$_05 - } - else_if = { - limit = { has_building = $BUILDING$_05 } - add_building = $BUILDING$_06 - } - else_if = { - limit = { has_building = $BUILDING$_06 } - add_building = $BUILDING$_07 - } - else_if = { - limit = { has_building = $BUILDING$_07 } - add_building = $BUILDING$_08 - } -} - -#### Create Random Building - 2 Part Effect #### - -# creates a random building in a holding, limited by innovations and holding level, and weighted to cheapest/lowest level, excludes tribal holdings/buildings, only for use in castle/church/city baronies - -# ensure the event/script where this is used checks that a building can be built, based on innovations and holding level, as if noe can be built this effect will do absolutely nada - -# 1, sets variable based on fitness of possible buildings -add_random_building_variable_effect = { # Province scope - province_owner = { save_scope_as = build_owner } - province_owner = { save_scope_as = holder } #Since building requirements reference scope:holder. - random_list = { # Which building? - # Generic/Terrain - 10 = { # outposts : Cheap - trigger = { - add_random_building_trigger = { BUILDING = outposts } # Generic eligiblity - generic_recruitment_building_innovations_trigger = { BUILDING = outposts } - } - set_variable = { - name = random_building_variable - value = 0 - days = 365 - } - } - 10 = { # logging_camps : Cheap - trigger = { - add_random_building_trigger = { BUILDING = logging_camps } - generic_economic_building_innovation_trigger = { BUILDING = logging_camps } - } - set_variable = { - name = random_building_variable - value = 1 - days = 365 - } - } - 10 = { # peat_quarries : Cheap - trigger = { - add_random_building_trigger = { BUILDING = peat_quarries } - generic_economic_building_innovation_trigger = { BUILDING = peat_quarries } - } - set_variable = { - name = random_building_variable - value = 2 - days = 365 - } - } - 10 = { # hill_forts : Cheap - trigger = { - add_random_building_trigger = { BUILDING = hill_forts } - generic_fortification_building_innovations_trigger = { BUILDING = hill_forts } - } - set_variable = { - name = random_building_variable - value = 3 - days = 365 - } - } - 10 = { # plantations : Cheap - trigger = { - add_random_building_trigger = { BUILDING = plantations } - generic_economic_building_innovation_trigger = { BUILDING = plantations } - } - set_variable = { - name = random_building_variable - value = 4 - days = 365 - } - } - 10 = { # quarries : Cheap - trigger = { - add_random_building_trigger = { BUILDING = quarries } - generic_economic_building_innovation_trigger = { BUILDING = quarries } - } - set_variable = { - name = random_building_variable - value = 5 - days = 365 - } - } - 10 = { # hunting_grounds : Cheap - trigger = { - add_random_building_trigger = { BUILDING = hunting_grounds } - generic_economic_building_innovation_trigger = { BUILDING = hunting_grounds } - } - set_variable = { - name = random_building_variable - value = 6 - days = 365 - } - } - 10 = { # military_camps : Cheap - trigger = { - add_random_building_trigger = { BUILDING = military_camps } - generic_recruitment_building_innovations_trigger = { BUILDING = military_camps } - } - set_variable = { - name = random_building_variable - value = 7 - days = 365 - } - } - 10 = { # horse_pastures : Cheap - trigger = { - add_random_building_trigger = { BUILDING = horse_pastures } - generic_recruitment_building_innovations_trigger = { BUILDING = horse_pastures } - } - set_variable = { - name = random_building_variable - value = 8 - days = 365 - } - } - 10 = { # hillside_grazing : Cheap - trigger = { - add_random_building_trigger = { BUILDING = hillside_grazing } - generic_recruitment_building_innovations_trigger = { BUILDING = hillside_grazing } - } - set_variable = { - name = random_building_variable - value = 9 - days = 365 - } - } - 10 = { # warrior_lodges : Cheap - trigger = { - add_random_building_trigger = { BUILDING = warrior_lodges } - generic_recruitment_building_innovations_trigger = { BUILDING = warrior_lodges } - } - set_variable = { - name = random_building_variable - value = 10 - days = 365 - } - } - 2 = { # pastures : Normal - trigger = { - add_random_building_trigger = { BUILDING = pastures } - generic_economic_building_innovation_trigger = { BUILDING = pastures } - } - set_variable = { - name = random_building_variable - value = 11 - days = 365 - } - } - 2 = { # ramparts : Normal - trigger = { - add_random_building_trigger = { BUILDING = ramparts } - generic_fortification_building_innovations_trigger = { BUILDING = ramparts } - } - set_variable = { - name = random_building_variable - value = 12 - days = 365 - } - } - 2 = { # curtain_walls : Normal - trigger = { - add_random_building_trigger = { BUILDING = curtain_walls } - generic_fortification_building_innovations_trigger = { BUILDING = curtain_walls } - } - set_variable = { - name = random_building_variable - value = 13 - days = 365 - } - } - 2 = { # watchtowers : Normal - trigger = { - add_random_building_trigger = { BUILDING = watchtowers } - generic_fortification_building_innovations_trigger = { BUILDING = watchtowers } - } - set_variable = { - name = random_building_variable - value = 14 - days = 365 - } - } - 2 = { # cereal_fields : Normal - trigger = { - add_random_building_trigger = { BUILDING = cereal_fields } - generic_economic_building_innovation_trigger = { BUILDING = cereal_fields } - } - set_variable = { - name = random_building_variable - value = 15 - days = 365 - } - } - 2 = { # barracks : Normal - trigger = { - add_random_building_trigger = { BUILDING = barracks } - generic_recruitment_building_innovations_trigger = { BUILDING = barracks } - } - set_variable = { - name = random_building_variable - value = 16 - days = 365 - } - } - 2 = { # camel_farms : Normal - trigger = { - add_random_building_trigger = { BUILDING = camel_farms } - generic_recruitment_building_innovations_trigger = { BUILDING = camel_farms } - } - set_variable = { - name = random_building_variable - value = 17 - days = 365 - } - } - 2 = { # hill_farms : Normal - trigger = { - add_random_building_trigger = { BUILDING = hill_farms } - generic_economic_building_innovation_trigger = { BUILDING = hill_farms } - } - set_variable = { - name = random_building_variable - value = 18 - days = 365 - } - } - 2 = { # elephant_pens : Normal - trigger = { - add_random_building_trigger = { BUILDING = elephant_pens } - generic_economic_building_innovation_trigger = { BUILDING = elephant_pens } - } - set_variable = { - name = random_building_variable - value = 19 - days = 365 - } - } - 2 = { # common_tradeport : Normal - trigger = { - add_random_building_trigger = { BUILDING = common_tradeport } - # Innovation triggers - trigger_if = { - limit = { has_building_or_higher = common_tradeport_01 } - scope:build_owner.culture = { - OR = { - has_innovation = innovation_crop_rotation - has_cultural_parameter = next_level_trade_ports - } - } - } - trigger_if = { - limit = { has_building_or_higher = common_tradeport_02 } - building_requirement_castle_city_church = { LEVEL = 02 } - scope:build_owner.culture = { - OR = { - has_innovation = innovation_manorialism - AND = { - has_innovation = innovation_crop_rotation - has_cultural_parameter = next_level_trade_ports - } - } - } - } - trigger_if = { - limit = { has_building_or_higher = common_tradeport_04 } - building_requirement_castle_city_church = { LEVEL = 03 } - scope:build_owner.culture = { - OR = { - has_innovation = innovation_windmills - AND = { - has_innovation = innovation_manorialism - has_cultural_parameter = next_level_trade_ports - } - } - } - } - trigger_if = { - limit = { has_building_or_higher = common_tradeport_06 } - building_requirement_castle_city_church = { LEVEL = 04 } - scope:build_owner.culture = { - OR = { - has_innovation = innovation_cranes - AND = { - has_innovation = innovation_windmills - has_cultural_parameter = next_level_trade_ports - } - } - } - } - } - set_variable = { - name = random_building_variable - value = 20 - days = 365 - } - } - 2 = { # hospices : Normal - trigger = { - add_random_building_trigger = { BUILDING = hospices } - generic_economic_building_innovation_trigger = { BUILDING = hospices } - } - set_variable = { - name = random_building_variable - value = 21 - days = 365 - } - } - 2 = { # qanats : Normal - trigger = { - add_random_building_trigger = { BUILDING = qanats } - building_requirement_castle_city_church = { LEVEL = 01 } - trigger_if = { - limit = { - NOT = { - has_building_or_higher = qanats_01 - } - } - scope:build_owner.culture = { - has_cultural_parameter = unlocks_qanat_building - } - } - trigger_if = { - limit = { - has_building_or_higher = qanats_02 - } - building_requirement_castle_city_church = { LEVEL = 02 } - } - trigger_if = { - limit = { - has_building_or_higher = qanats_04 - } - building_requirement_castle_city_church = { LEVEL = 03 } - } - trigger_if = { - limit = { - has_building_or_higher = qanats_06 - } - building_requirement_castle_city_church = { LEVEL = 04 } - } - } - set_variable = { - name = random_building_variable - value = 22 - days = 365 - } - } - 2 = { # murex_farm : Normal - trigger = { - add_random_building_trigger = { BUILDING = murex_farm } - building_requirement_castle_city_church = { LEVEL = 01 } - county = { NOT = { has_county_modifier = backwater_county_modifier } } - trigger_if = { - limit = { - has_building_or_higher = murex_farm_02 - } - building_requirement_castle_city_church = { LEVEL = 02 } - } - trigger_if = { - limit = { - has_building_or_higher = murex_farm_04 - } - building_requirement_castle_city_church = { LEVEL = 03 } - } - trigger_if = { - limit = { - has_building_or_higher = murex_farm_06 - } - building_requirement_castle_city_church = { LEVEL = 03 } - } - } - set_variable = { - name = random_building_variable - value = 23 - days = 365 - } - } - 2 = { # wind_furnace : Normal - trigger = { - add_random_building_trigger = { BUILDING = wind_furnace } - building_requirement_castle_city_church = { LEVEL = 01 } - trigger_if = { - limit = { - has_building_or_higher = wind_furnace_01 - } - scope:build_owner.culture = { - has_innovation = innovation_barracks - } - } - trigger_if = { - limit = { - has_building_or_higher = wind_furnace_02 - } - building_requirement_castle_city_church = { LEVEL = 02 } - scope:build_owner.culture = { - has_innovation = innovation_burhs - } - } - trigger_if = { - limit = { - has_building_or_higher = wind_furnace_04 - } - building_requirement_castle_city_church = { LEVEL = 03 } - scope:build_owner.culture = { - has_innovation = innovation_castle_baileys - } - } - trigger_if = { - limit = { - has_building_or_higher = wind_furnace_05 - } - scope:build_owner.culture = { - has_innovation = innovation_royal_armory - } - } - trigger_if = { - limit = { - has_building_or_higher = wind_furnace_06 - } - building_requirement_castle_city_church = { LEVEL = 04 } - } - } - set_variable = { - name = random_building_variable - value = 24 - days = 365 - } - } - 2 = { # stables : Normal - trigger = { - add_random_building_trigger = { BUILDING = stables } - generic_recruitment_building_innovations_trigger = { BUILDING = stables } - } - set_variable = { - name = random_building_variable - value = 25 - days = 365 - } - } - 2 = { # smiths : Normal - trigger = { - add_random_building_trigger = { BUILDING = smiths } - generic_recruitment_building_innovations_trigger = { BUILDING = smiths } - } - set_variable = { - name = random_building_variable - value = 26 - days = 365 - } - } - 1 = { # orchards : Expensive - trigger = { - add_random_building_trigger = { BUILDING = orchards } - generic_economic_building_innovation_trigger = { BUILDING = orchards } - } - set_variable = { - name = random_building_variable - value = 27 - days = 365 - } - } - 1 = { # farm_estates : Expensive - trigger = { - add_random_building_trigger = { BUILDING = farm_estates } - generic_economic_building_innovation_trigger = { BUILDING = farm_estates } - } - set_variable = { - name = random_building_variable - value = 28 - days = 365 - } - } - 1 = { # regimental_grounds : Expensive - trigger = { - add_random_building_trigger = { BUILDING = regimental_grounds } - generic_recruitment_building_innovations_trigger = { BUILDING = regimental_grounds } - } - set_variable = { - name = random_building_variable - value = 29 - days = 365 - } - } - 1 = { # caravanserai : Expensive - trigger = { - is_county_capital = yes - building_caravanserai_requirement_terrain = yes - scope:build_owner.culture = { - has_innovation = innovation_guilds - } - building_requirement_castle_city_church = { LEVEL = 01 } - trigger_if = { # if all slots are full, this building type exists already - limit = { free_building_slots = 0 } - has_building_or_higher = caravanserai_01 - } - trigger_if = { - limit = { has_building_or_higher = caravanserai_01 } - NOT = { - has_lesser_building_trigger = { COMPARE = caravanserai } - } - } - # City level triggers - trigger_if = { - limit = { has_building_or_higher = caravanserai_02 } - building_requirement_castle_city_church = { LEVEL = 02 } - } - trigger_if = { - limit = { has_building_or_higher = caravanserai_04 } - building_requirement_castle_city_church = { LEVEL = 03 } - } - trigger_if = { - limit = { has_building_or_higher = caravanserai_05 } - scope:build_owner.culture = { has_innovation = innovation_cranes } - } - trigger_if = { - limit = { has_building_or_higher = caravanserai_06 } - building_requirement_castle_city_church = { LEVEL = 04 } - } - } - set_variable = { - name = random_building_variable - value = 30 - days = 365 - } - } - 1 = { # watermills : Expensive - trigger = { - is_county_capital = yes - building_watermills_requirement_terrain = yes - scope:build_owner.culture = { - has_innovation = innovation_windmills - } - building_requirement_castle_city_church = { LEVEL = 01 } - trigger_if = { # if all slots are full, this building type exists already - limit = { free_building_slots = 0 } - has_building_or_higher = watermills_01 - } - trigger_if = { - limit = { has_building_or_higher = watermills_01 } - NOT = { - has_lesser_building_trigger = { COMPARE = watermills } - } - } - # City level triggers - trigger_if = { - limit = { has_building_or_higher = watermills_02 } - building_requirement_castle_city_church = { LEVEL = 02 } - } - trigger_if = { - limit = { has_building_or_higher = watermills_04 } - building_requirement_castle_city_church = { LEVEL = 03 } - } - trigger_if = { - limit = { has_building_or_higher = watermills_05 } - scope:build_owner.culture = { has_innovation = innovation_cranes } - } - trigger_if = { - limit = { has_building_or_higher = watermills_06 } - building_requirement_castle_city_church = { LEVEL = 04 } - } - } - set_variable = { - name = random_building_variable - value = 31 - days = 365 - } - } - 1 = { # windmills : Expensive - trigger = { - is_county_capital = yes - building_windmills_requirement_terrain = yes - scope:build_owner.culture = { - has_innovation = innovation_windmills - } - building_requirement_castle_city_church = { LEVEL = 01 } - trigger_if = { # if all slots are full, this building type exists already - limit = { free_building_slots = 0 } - has_building_or_higher = windmills_01 - } - trigger_if = { - limit = { has_building_or_higher = windmills_01 } - NOT = { - has_lesser_building_trigger = { COMPARE = windmills } - } - } - # City level triggers - trigger_if = { - limit = { has_building_or_higher = windmills_02 } - building_requirement_castle_city_church = { LEVEL = 02 } - } - trigger_if = { - limit = { has_building_or_higher = windmills_04 } - building_requirement_castle_city_church = { LEVEL = 03 } - } - trigger_if = { - limit = { has_building_or_higher = windmills_05 } - scope:build_owner.culture = { has_innovation = innovation_cranes } - } - trigger_if = { - limit = { has_building_or_higher = windmills_06 } - building_requirement_castle_city_church = { LEVEL = 04 } - } - } - set_variable = { - name = random_building_variable - value = 32 - days = 365 - } - } - 1 = { # workshops : Expensive - trigger = { - add_random_building_trigger = { BUILDING = workshops } - building_requirement_castle_city_church = { LEVEL = 01 } - scope:build_owner.culture = { - has_innovation = innovation_advanced_bowmaking - } - trigger_if = { - limit = { - has_building_or_higher = workshops_02 - } - building_requirement_castle_city_church = { LEVEL = 02 } - } - trigger_if = { - limit = { - has_building_or_higher = workshops_04 - } - building_requirement_castle_city_church = { LEVEL = 03 } - } - trigger_if = { - limit = { - has_building_or_higher = workshops_05 - } - scope:build_owner.culture = { - has_innovation = innovation_royal_armory - } - } - trigger_if = { - limit = { - has_building_or_higher = workshops_06 - } - building_requirement_castle_city_church = { LEVEL = 04 } - } - } - set_variable = { - name = random_building_variable - value = 33 - days = 365 - } - } - # Holding Type Specific : Normal - 10 = { # monastic_schools : Normal - trigger = { - has_holding_type = church_holding - trigger_if = { # if all slots are full, this building type exists already - limit = { free_building_slots = 0 } - has_building_or_higher = monastic_schools_01 - } - trigger_if = { - limit = { has_building_or_higher = monastic_schools_01 } - NOT = { - has_lesser_building_trigger = { COMPARE = monastic_schools } - } - } - # Innovation triggers - trigger_if = { - limit = { has_building_or_higher = monastic_schools_01 } - scope:build_owner.culture = { has_innovation = innovation_city_planning } - } - trigger_if = { - limit = { has_building_or_higher = monastic_schools_02 } - building_requirement_castle_city_church = { LEVEL = 02 } - scope:build_owner.culture = { has_innovation = innovation_manorialism } - } - trigger_if = { - limit = { has_building_or_higher = monastic_schools_04 } - building_requirement_castle_city_church = { LEVEL = 03 } - scope:build_owner.culture = { has_innovation = innovation_windmills } - } - trigger_if = { - limit = { has_building_or_higher = monastic_schools_06 } - building_requirement_castle_city_church = { LEVEL = 04 } - scope:build_owner.culture = { has_innovation = innovation_cranes } - } - } - set_variable = { - name = random_building_variable - value = 34 - days = 365 - } - } - 10 = { # guild_halls : Normal - trigger = { - has_holding_type = city_holding - trigger_if = { # if all slots are full, this building type exists already - limit = { free_building_slots = 0 } - has_building_or_higher = guild_halls_01 - } - trigger_if = { - limit = { has_building_or_higher = guild_halls_01 } - NOT = { - has_lesser_building_trigger = { COMPARE = guild_halls } - } - } - # Innovation triggers - trigger_if = { - limit = { has_building_or_higher = guild_halls_01 } - scope:build_owner.culture = { - OR = { - has_innovation = innovation_crop_rotation - has_cultural_parameter = next_level_guild_halls - } - } - } - trigger_if = { - limit = { has_building_or_higher = guild_halls_02 } - OR = { - AND = { - building_requirement_castle_city_church = { LEVEL = 02 } - scope:build_owner.culture = { - has_innovation = innovation_manorialism - } - } - scope:build_owner.culture = { - has_cultural_parameter = next_level_guild_halls - has_innovation = innovation_crop_rotation - } - } - } - trigger_if = { - limit = { has_building_or_higher = guild_halls_04 } - OR = { - AND = { - building_requirement_castle_city_church = { LEVEL = 03 } - scope:build_owner.culture = { - has_innovation = innovation_guilds - } - } - AND = { - building_requirement_castle_city_church = { LEVEL = 02 } - scope:build_owner.culture = { - has_cultural_parameter = next_level_guild_halls - has_innovation = innovation_manorialism - } - } - } - } - trigger_if = { - limit = { has_building_or_higher = guild_halls_06 } - OR = { - AND = { - building_requirement_castle_city_church = { LEVEL = 04 } - scope:build_owner.culture = { - has_innovation = innovation_cranes - } - } - AND = { - building_requirement_castle_city_church = { LEVEL = 03 } - scope:build_owner.culture = { - has_cultural_parameter = next_level_guild_halls - has_innovation = innovation_guilds - } - } - } - } - } - set_variable = { - name = random_building_variable - value = 35 - days = 365 - } - } - 10 = { # scriptorium : Normal - trigger = { - has_holding_type = church_holding - scope:build_owner = { - has_dlc_feature = legends - } - trigger_if = { # if all slots are full, this building type exists already - limit = { free_building_slots = 0 } - has_building_or_higher = scriptorium_01 - } - trigger_if = { - limit = { has_building_or_higher = scriptorium_01 } - NOT = { - has_lesser_building_trigger = { COMPARE = scriptorium } - } - } - generic_economic_building_innovation_trigger = { BUILDING = scriptorium } - } - set_variable = { - name = random_building_variable - value = 36 - days = 365 - } - } - 10 = { # megalith : Normal - trigger = { - has_holding_type = church_holding - scope:build_owner.faith = { - has_doctrine_parameter = can_build_megaliths - } - trigger_if = { # if all slots are full, this building type exists already - limit = { free_building_slots = 0 } - has_building_or_higher = megalith_01 - } - trigger_if = { - limit = { has_building_or_higher = megalith_01 } - NOT = { - has_lesser_building_trigger = { COMPARE = megalith } - } - } - trigger_if = { - limit = { has_building_or_higher = megalith_02 } - scope:build_owner.culture = { - has_innovation = innovation_city_planning - } - } - trigger_if = { - limit = { has_building_or_higher = megalith_03 } - building_requirement_castle_city_church = { LEVEL = 02 } - } - } - set_variable = { - name = random_building_variable - value = 37 - days = 365 - } - } - 2 = { # waterworks : Normal - trigger = { - add_random_building_trigger = { BUILDING = waterworks } - building_requirement_castle_city_church = { LEVEL = 01 } - county = { NOT = { has_county_modifier = backwater_county_modifier } } - trigger_if = { - limit = { - has_building_or_higher = waterworks_02 - } - building_requirement_castle_city_church = { LEVEL = 02 } - } - trigger_if = { - limit = { - has_building_or_higher = waterworks_04 - } - building_requirement_castle_city_church = { LEVEL = 03 } - } - trigger_if = { - limit = { - has_building_or_higher = waterworks_06 - } - building_requirement_castle_city_church = { LEVEL = 03 } - } - } - set_variable = { - name = random_building_variable - value = 42 - days = 365 - } - } - 2 = { # paddy_fields : Normal - trigger = { - add_random_building_trigger = { BUILDING = paddy_fields } - generic_economic_building_innovation_trigger = { BUILDING = paddy_fields } - } - set_variable = { - name = random_building_variable - value = 43 - days = 365 - } - } - } -} - -# 2, builds based on variable -add_random_building_construct_effect = { # Province scope - if = { - limit = { has_variable = random_building_variable } - switch = { - trigger = var:random_building_variable - 0 = { - add_next_building_tier_effect = { BUILDING = outposts } - } - 1 = { - add_next_building_tier_effect = { BUILDING = logging_camps } - } - 2 = { - add_next_building_tier_effect = { BUILDING = peat_quarries } - } - 3 = { - add_next_building_tier_effect = { BUILDING = hill_forts } - } - 4 = { - add_next_building_tier_effect = { BUILDING = plantations } - } - 5 = { - add_next_building_tier_effect = { BUILDING = quarries } - } - 6 = { - add_next_building_tier_effect = { BUILDING = hunting_grounds } - } - 7 = { - add_next_building_tier_effect = { BUILDING = military_camps } - } - 8 = { - add_next_building_tier_effect = { BUILDING = horse_pastures } - } - 9 = { - add_next_building_tier_effect = { BUILDING = hillside_grazing } - } - 10 = { - add_next_building_tier_effect = { BUILDING = warrior_lodges } - } - 11 = { - add_next_building_tier_effect = { BUILDING = pastures } - } - 12 = { - add_next_building_tier_effect = { BUILDING = ramparts } - } - 13 = { - add_next_building_tier_effect = { BUILDING = curtain_walls } - } - 14 = { - add_next_building_tier_effect = { BUILDING = watchtowers } - } - 15 = { - add_next_building_tier_effect = { BUILDING = cereal_fields } - } - 16 = { - add_next_building_tier_effect = { BUILDING = barracks } - } - 17 = { - add_next_building_tier_effect = { BUILDING = camel_farms } - } - 18 = { - add_next_building_tier_effect = { BUILDING = hill_farms } - } - 19 = { - add_next_building_tier_effect = { BUILDING = elephant_pens } - } - 20 = { - add_next_building_tier_effect = { BUILDING = common_tradeport } - } - 21 = { - add_next_building_tier_effect = { BUILDING = hospices } - } - 22 = { - add_next_building_tier_effect = { BUILDING = qanats } - } - 23 = { - add_next_building_tier_effect = { BUILDING = murex_farm } - } - 24 = { - add_next_building_tier_effect = { BUILDING = wind_furnace } - } - 25 = { - add_next_building_tier_effect = { BUILDING = stables } - } - 26 = { - add_next_building_tier_effect = { BUILDING = smiths } - } - 27 = { - add_next_building_tier_effect = { BUILDING = orchards } - } - 28 = { - add_next_building_tier_effect = { BUILDING = farm_estates } - } - 29 = { - add_next_building_tier_effect = { BUILDING = regimental_grounds } - } - 30 = { - add_next_building_tier_effect = { BUILDING = caravanserai } - } - 31 = { - add_next_building_tier_effect = { BUILDING = windmills } - } - 32 = { - add_next_building_tier_effect = { BUILDING = watermills } - } - 33 = { - add_next_building_tier_effect = { BUILDING = workshops } - } - 34 = { - add_next_building_tier_effect = { BUILDING = monastic_schools } - } - 35 = { - add_next_building_tier_effect = { BUILDING = guild_halls } - } - 36 = { - add_next_building_tier_effect = { BUILDING = scriptorium } - } - 37 = { - add_next_building_tier_effect = { BUILDING = megalith } - } - 42 = { - add_next_building_tier_effect = { BUILDING = waterworks } - } - 43 = { - add_next_building_tier_effect = { BUILDING = paddy_fields } - } - } - remove_variable = random_building_variable - } -} - -# For stuff that has exactly _eight_ levels of upgrades. -destroy_or_downgrade_building_effect = { - if = { - limit = { has_building = $BUILDING$_08 } - remove_building = $BUILDING$_08 - hidden_effect = { add_building = $BUILDING$_07 } - } - else_if = { - limit = { has_building = $BUILDING$_07 } - remove_building = $BUILDING$_07 - hidden_effect = { add_building = $BUILDING$_06 } - } - else_if = { - limit = { has_building = $BUILDING$_06 } - remove_building = $BUILDING$_06 - hidden_effect = { add_building = $BUILDING$_05 } - } - else_if = { - limit = { has_building = $BUILDING$_05 } - remove_building = $BUILDING$_05 - hidden_effect = { add_building = $BUILDING$_04 } - } - else_if = { - limit = { has_building = $BUILDING$_04 } - remove_building = $BUILDING$_04 - hidden_effect = { add_building = $BUILDING$_03 } - } - else_if = { - limit = { has_building = $BUILDING$_03 } - remove_building = $BUILDING$_03 - hidden_effect = { add_building = $BUILDING$_02 } - } - else_if = { - limit = { has_building = $BUILDING$_02 } - remove_building = $BUILDING$_02 - hidden_effect = { add_building = $BUILDING$_01 } - } - else = { remove_building = $BUILDING$_01 } -} - -# For stuff that has exactly _three_ levels of upgrades. -destroy_or_downgrade_ducal_building_effect = { - if = { - limit = { has_building = $BUILDING$_03 } - remove_building = $BUILDING$_03 - hidden_effect = { add_building = $BUILDING$_02 } - } - else_if = { - limit = { has_building = $BUILDING$_02 } - remove_building = $BUILDING$_02 - hidden_effect = { add_building = $BUILDING$_01 } - } - else = { remove_building = $BUILDING$_01 } -} - -# For stuff that has exactly _two_ levels of upgrades. -destroy_or_downgrade_tribal_building_effect = { - if = { - limit = { has_building = $BUILDING$_02 } - remove_building = $BUILDING$_02 - hidden_effect = { add_building = $BUILDING$_01 } - } - else = { remove_building = $BUILDING$_01 } -} - -destroy_random_building_variable_effect = { # Province scope - save_scope_as = raid_province - if = { - limit = { has_variable = destroyed_building_variable } - remove_variable = destroyed_building_variable - } - random_list = { # Which building? - # Generic/Terrain - 10 = { # outposts : Cheap - trigger = { has_building_or_higher = outposts_01 } - set_variable = { - name = destroyed_building_variable - value = 0 - months = 1 - } - } - 10 = { # logging_camps : Cheap - trigger = { has_building_or_higher = logging_camps_01 } - set_variable = { - name = destroyed_building_variable - value = 1 - months = 1 - } - } - 10 = { # peat_quarries : Cheap - trigger = { has_building_or_higher = peat_quarries_01 } - set_variable = { - name = destroyed_building_variable - value = 2 - months = 1 - } - } - 10 = { # hill_forts : Cheap - trigger = { has_building_or_higher = hill_forts_01 } - set_variable = { - name = destroyed_building_variable - value = 3 - months = 1 - } - } - 10 = { # plantations : Cheap - trigger = { has_building_or_higher = plantations_01 } - set_variable = { - name = destroyed_building_variable - value = 4 - months = 1 - } - } - 10 = { # quarries : Cheap - trigger = { has_building_or_higher = quarries_01 } - set_variable = { - name = destroyed_building_variable - value = 5 - months = 1 - } - } - 10 = { # hunting_grounds : Cheap - trigger = { has_building_or_higher = hunting_grounds_01 } - set_variable = { - name = destroyed_building_variable - value = 6 - months = 1 - } - } - 10 = { # military_camps : Cheap - trigger = { has_building_or_higher = military_camps_01 } - set_variable = { - name = destroyed_building_variable - value = 7 - months = 1 - } - } - 10 = { # horse_pastures : Cheap - trigger = { has_building_or_higher = horse_pastures_01 } - set_variable = { - name = destroyed_building_variable - value = 8 - months = 1 - } - } - 10 = { # hillside_grazing : Cheap - trigger = { has_building_or_higher = hillside_grazing_01 } - set_variable = { - name = destroyed_building_variable - value = 9 - months = 1 - } - } - 10 = { # warrior_lodges : Cheap - trigger = { has_building_or_higher = warrior_lodges_01 } - set_variable = { - name = destroyed_building_variable - value = 10 - months = 1 - } - } - 2 = { # pastures : Normal - trigger = { has_building_or_higher = pastures_01 } - set_variable = { - name = destroyed_building_variable - value = 11 - months = 1 - } - } - 2 = { # ramparts : Normal - trigger = { has_building_or_higher = ramparts_01 } - set_variable = { - name = destroyed_building_variable - value = 12 - months = 1 - } - } - 2 = { # curtain_walls : Normal - trigger = { has_building_or_higher = curtain_walls_01 } - set_variable = { - name = destroyed_building_variable - value = 13 - months = 1 - } - } - 2 = { # watchtowers : Normal - trigger = { has_building_or_higher = watchtowers_01 } - set_variable = { - name = destroyed_building_variable - value = 14 - months = 1 - } - } - 2 = { # cereal_fields : Normal - trigger = { has_building_or_higher = cereal_fields_01 } - set_variable = { - name = destroyed_building_variable - value = 15 - months = 1 - } - } - 2 = { # barracks : Normal - trigger = { has_building_or_higher = barracks_01 } - set_variable = { - name = destroyed_building_variable - value = 16 - months = 1 - } - } - 2 = { # camel_farms : Normal - trigger = { has_building_or_higher = camel_farms_01 } - set_variable = { - name = destroyed_building_variable - value = 17 - months = 1 - } - } - 2 = { # hill_farms : Normal - trigger = { has_building_or_higher = hill_farms_01 } - set_variable = { - name = destroyed_building_variable - value = 18 - months = 1 - } - } - 2 = { # paddy_fields : Normal - trigger = { has_building_or_higher = hill_farms_01 } - set_variable = { - name = destroyed_building_variable - value = 43 - months = 1 - } - } - 2 = { # elephant_pens : Normal - trigger = { has_building_or_higher = elephant_pens_01 } - set_variable = { - name = destroyed_building_variable - value = 19 - months = 1 - } - } - 2 = { # common_tradeport : Normal - trigger = { has_building_or_higher = common_tradeport_01 } - set_variable = { - name = destroyed_building_variable - value = 20 - months = 1 - } - } - 2 = { # hospices : Normal - trigger = { has_building_or_higher = hospices_01 } - set_variable = { - name = destroyed_building_variable - value = 21 - months = 1 - } - } - 2 = { # qanats : Normal - trigger = { has_building_or_higher = qanats_01 } - set_variable = { - name = destroyed_building_variable - value = 22 - months = 1 - } - } - 2 = { # murex_farm : Normal - trigger = { has_building_or_higher = murex_farm_01 } - set_variable = { - name = destroyed_building_variable - value = 23 - months = 1 - } - } - 2 = { # waterworks : Normal - trigger = { has_building_or_higher = waterworks_01 } - set_variable = { - name = destroyed_building_variable - value = 42 - months = 1 - } - } - 2 = { # wind_furnace : Normal - trigger = { has_building_or_higher = wind_furnace_01 } - set_variable = { - name = destroyed_building_variable - value = 24 - months = 1 - } - } - 2 = { # stables : Normal - trigger = { has_building_or_higher = stables_01 } - set_variable = { - name = destroyed_building_variable - value = 25 - months = 1 - } - } - 2 = { # smiths : Normal - trigger = { has_building_or_higher = smiths_01 } - set_variable = { - name = destroyed_building_variable - value = 26 - months = 1 - } - } - 1 = { # orchards : Expensive - trigger = { has_building_or_higher = orchards_01 } - set_variable = { - name = destroyed_building_variable - value = 27 - months = 1 - } - } - 1 = { # farm_estates : Expensive - trigger = { has_building_or_higher = farm_estates_01 } - set_variable = { - name = destroyed_building_variable - value = 28 - months = 1 - } - } - 1 = { # regimental_grounds : Expensive - trigger = { has_building_or_higher = regimental_grounds_01 } - set_variable = { - name = destroyed_building_variable - value = 29 - months = 1 - } - } - 1 = { # caravanserai : Expensive - trigger = { has_building_or_higher = caravanserai_01 } - set_variable = { - name = destroyed_building_variable - value = 30 - months = 1 - } - } - 1 = { # watermills : Expensive - trigger = { has_building_or_higher = watermills_01 } - set_variable = { - name = destroyed_building_variable - value = 31 - months = 1 - } - } - 1 = { # windmills : Expensive - trigger = { has_building_or_higher = windmills_01 } - set_variable = { - name = destroyed_building_variable - value = 32 - months = 1 - } - } - 1 = { # workshops : Expensive - trigger = { has_building_or_higher = workshops_01 } - set_variable = { - name = destroyed_building_variable - value = 33 - months = 1 - } - } - # Holding Type Specific : Normal - 10 = { # monastic_schools : Normal - trigger = { has_building_or_higher = monastic_schools_01 } - set_variable = { - name = destroyed_building_variable - value = 21 - months = 1 - } - } - 10 = { # guild_halls : Normal - trigger = { has_building_or_higher = guild_halls_01 } - set_variable = { - name = destroyed_building_variable - value = 35 - months = 1 - } - } - 10 = { # scriptorium : Normal - trigger = { has_building_or_higher = scriptorium_01 } - set_variable = { - name = destroyed_building_variable - value = 36 - months = 1 - } - } - 10 = { # megalith : Normal - trigger = { has_building_or_higher = megalith_01 } - set_variable = { - name = destroyed_building_variable - value = 37 - months = 1 - } - } - 10 = { # Waterworks - trigger = { has_building_or_higher = waterworks_01 } - set_variable = { - name = destroyed_building_variable - value = 42 - months = 1 - } - } - 10 = { # Paddy Fields - trigger = { has_building_or_higher = paddy_fields_01 } - set_variable = { - name = destroyed_building_variable - value = 43 - months = 1 - } - } - # Tribal - 10 = { # Market Villages - trigger = { has_building_or_higher = market_villages_01 } - set_variable = { - name = destroyed_building_variable - value = 38 - months = 1 - } - } - 10 = { # Palisades - trigger = { has_building_or_higher = palisades_01 } - set_variable = { - name = destroyed_building_variable - value = 39 - months = 1 - } - } - 10 = { # War Camps - trigger = { has_building_or_higher = war_camps_01 } - set_variable = { - name = destroyed_building_variable - value = 40 - months = 1 - } - } - 10 = { # Longhouses - trigger = { has_building_or_higher = longhouses_01 } - set_variable = { - name = destroyed_building_variable - value = 41 - months = 1 - } - } - } -} - -destroy_random_building_effect = { - if = { - limit = { has_variable = destroyed_building_variable } - switch = { - trigger = var:destroyed_building_variable - 0 = { # outposts : Cheap - destroy_or_downgrade_building_effect = { BUILDING = outposts } - } - 1 = { # logging_camps : Cheap - destroy_or_downgrade_building_effect = { BUILDING = logging_camps } - } - 2 = { # peat_quarries : Cheap - destroy_or_downgrade_building_effect = { BUILDING = peat_quarries } - } - 3 = { # hill_forts : Cheap - destroy_or_downgrade_building_effect = { BUILDING = hill_forts } - } - 4 = { # plantations : Cheap - destroy_or_downgrade_building_effect = { BUILDING = plantations } - } - 5 = { # quarries : Cheap - destroy_or_downgrade_building_effect = { BUILDING = quarries } - } - 6 = { # hunting_grounds : Cheap - destroy_or_downgrade_building_effect = { BUILDING = hunting_grounds } - } - 7 = { # military_camps : Cheap - destroy_or_downgrade_building_effect = { BUILDING = military_camps } - } - 8 = { # horse_pastures : Cheap - destroy_or_downgrade_building_effect = { BUILDING = horse_pastures } - } - 9 = { # hillside_grazing : Cheap - destroy_or_downgrade_building_effect = { BUILDING = hillside_grazing } - } - 10 = { # warrior_lodges : Cheap - destroy_or_downgrade_building_effect = { BUILDING = warrior_lodges } - } - 11 = { # pastures : Normal - destroy_or_downgrade_building_effect = { BUILDING = pastures } - } - 12 = { # ramparts : Normal - destroy_or_downgrade_building_effect = { BUILDING = ramparts } - } - 13 = { # curtain_walls : Normal - destroy_or_downgrade_building_effect = { BUILDING = curtain_walls } - } - 14 = { # watchtowers : Normal - destroy_or_downgrade_building_effect = { BUILDING = watchtowers } - } - 15 = { # cereal_fields : Normal - destroy_or_downgrade_building_effect = { BUILDING = cereal_fields } - } - 16 = { # barracks : Normal - destroy_or_downgrade_building_effect = { BUILDING = barracks } - } - 17 = { # camel_farms : Normal - destroy_or_downgrade_building_effect = { BUILDING = camel_farms } - } - 18 = { # hill_farms : Normal - destroy_or_downgrade_building_effect = { BUILDING = hill_farms } - } - 19 = { # elephant_pens : Normal - destroy_or_downgrade_building_effect = { BUILDING = elephant_pens } - } - 20 = { # common_tradeport : Normal - destroy_or_downgrade_building_effect = { BUILDING = common_tradeport } - } - 21 = { # hospices : Normal - destroy_or_downgrade_building_effect = { BUILDING = hospices } - } - 22 = { # qanats : Normal - destroy_or_downgrade_building_effect = { BUILDING = qanats } - } - 23 = { # murex_farm : Normal - destroy_or_downgrade_building_effect = { BUILDING = murex_farm } - } - 24 = { # wind_furnace : Normal - destroy_or_downgrade_building_effect = { BUILDING = wind_furnace } - } - 25 = { # stables : Normal - destroy_or_downgrade_building_effect = { BUILDING = stables } - } - 26 = { # smiths : Normal - destroy_or_downgrade_building_effect = { BUILDING = smiths } - } - 27 = { # orchards : Expensive - destroy_or_downgrade_building_effect = { BUILDING = orchards } - } - 28 = { # farm_estates : Expensive - destroy_or_downgrade_building_effect = { BUILDING = farm_estates } - } - 29 = { # regimental_grounds : Expensive - destroy_or_downgrade_building_effect = { BUILDING = regimental_grounds } - } - 30 = { # caravanserai : Expensive - destroy_or_downgrade_building_effect = { BUILDING = caravanserai } - } - 31 = { # watermills : Expensive - destroy_or_downgrade_building_effect = { BUILDING = watermills } - } - 32 = { # windmills : Expensive - destroy_or_downgrade_building_effect = { BUILDING = windmills } - } - 33 = { # workshops : Expensive - destroy_or_downgrade_building_effect = { BUILDING = workshops } - } - # Holding Type Specific : Normal - 34 = { # monastic_schools : Normal - destroy_or_downgrade_building_effect = { BUILDING = monastic_schools } - } - 35 = { # guild_halls : Normal - destroy_or_downgrade_building_effect = { BUILDING = guild_halls } - } - 36 = { # scriptorium : Normal - destroy_or_downgrade_building_effect = { BUILDING = scriptorium } - } - 37 = { # megalith : Normal - destroy_or_downgrade_building_effect = { BUILDING = megalith } - } - 42 = { # waterworks : Normal - destroy_or_downgrade_building_effect = { BUILDING = waterworks } - } - 43 = { # paddy_fields : Normal - destroy_or_downgrade_building_effect = { BUILDING = paddy_fields } - } - # Tribal - 38 = { # megalith : Normal - destroy_or_downgrade_tribal_building_effect = { BUILDING = market_villages } - } - 39 = { # megalith : Normal - destroy_or_downgrade_tribal_building_effect = { BUILDING = palisades } - } - 40 = { # megalith : Normal - destroy_or_downgrade_tribal_building_effect = { BUILDING = war_camps } - } - 41 = { # megalith : Normal - destroy_or_downgrade_tribal_building_effect = { BUILDING = longhouses } - } - } - remove_variable = destroyed_building_variable - } -} - -destroy_or_downgrade_estate_building_2_effect = { - if = { - limit = { has_domicile_building = $BUILDING$_02 } - lower_domicile_building_no_refund = $BUILDING$_02 - } - else = { remove_domicile_building_no_refund = $BUILDING$_01 } -} - -destroy_or_downgrade_estate_building_3_effect = { - if = { - limit = { has_domicile_building = $BUILDING$_03 } - lower_domicile_building_no_refund = $BUILDING$_03 - } - else_if = { - limit = { has_domicile_building = $BUILDING$_02 } - lower_domicile_building_no_refund = $BUILDING$_02 - } - else = { remove_domicile_building_no_refund = $BUILDING$_01 } -} - -destroy_or_downgrade_estate_building_4_effect = { - if = { - limit = { has_domicile_building = $BUILDING$_04 } - lower_domicile_building_no_refund = $BUILDING$_04 - } - else_if = { - limit = { has_domicile_building = $BUILDING$_03 } - lower_domicile_building_no_refund = $BUILDING$_03 - } - else_if = { - limit = { has_domicile_building = $BUILDING$_02 } - lower_domicile_building_no_refund = $BUILDING$_02 - } - else = { remove_domicile_building_no_refund = $BUILDING$_01 } -} - -destroy_or_downgrade_estate_building_5_effect = { - if = { - limit = { has_domicile_building = $BUILDING$_05 } - lower_domicile_building_no_refund = $BUILDING$_05 - } - else_if = { - limit = { has_domicile_building = $BUILDING$_04 } - lower_domicile_building_no_refund = $BUILDING$_04 - } - else_if = { - limit = { has_domicile_building = $BUILDING$_03 } - lower_domicile_building_no_refund = $BUILDING$_03 - } - else_if = { - limit = { has_domicile_building = $BUILDING$_02 } - lower_domicile_building_no_refund = $BUILDING$_02 - } - else = { remove_domicile_building_no_refund = $BUILDING$_01 } -} - -destroy_or_downgrade_estate_building_6_effect = { - if = { - limit = { has_domicile_building = $BUILDING$_06 } - lower_domicile_building_no_refund = $BUILDING$_06 - } - if = { - limit = { has_domicile_building = $BUILDING$_05 } - lower_domicile_building_no_refund = $BUILDING$_05 - } - if = { - limit = { has_domicile_building = $BUILDING$_04 } - lower_domicile_building_no_refund = $BUILDING$_04 - } - if = { - limit = { has_domicile_building = $BUILDING$_03 } - lower_domicile_building_no_refund = $BUILDING$_03 - } - else_if = { - limit = { has_domicile_building = $BUILDING$_02 } - lower_domicile_building_no_refund = $BUILDING$_02 - } - else = { remove_domicile_building_no_refund = $BUILDING$_01 } -} - -destroy_or_downgrade_estate_building_2_4_replacement_effect = { - if = { - limit = { has_domicile_building = $BUILDING$_04 } - lower_domicile_building_no_refund = $BUILDING$_04 - } - else = { - lower_domicile_building_no_refund = $BUILDING$_03 - } -} - -destroy_or_downgrade_estate_building_2_6_replacement_effect = { - if = { - limit = { has_domicile_building = $BUILDING$_06 } - lower_domicile_building_no_refund = $BUILDING$_06 - } - else_if = { - limit = { has_domicile_building = $BUILDING$_05 } - lower_domicile_building_no_refund = $BUILDING$_05 - } - else_if = { - limit = { has_domicile_building = $BUILDING$_04 } - lower_domicile_building_no_refund = $BUILDING$_04 - } - else = { - lower_domicile_building_no_refund = $BUILDING$_03 - } -} - -destroy_or_downgrade_estate_building_3_6_replacement_effect = { - if = { - limit = { has_domicile_building = $BUILDING$_06 } - lower_domicile_building_no_refund = $BUILDING$_06 - } - else_if = { - limit = { has_domicile_building = $BUILDING$_05 } - lower_domicile_building_no_refund = $BUILDING$_05 - } - else = { - lower_domicile_building_no_refund = $BUILDING$_04 - } -} - -destroy_random_estate_building_variable_effect = { # Domicile scope - save_scope_as = raid_domicile - if = { - limit = { has_variable = destroyed_building_variable } - remove_variable = destroyed_building_variable - } - random_list = { # Which building? - # Generic/Terrain - 10 = { # barracks : Normal - trigger = { has_domicile_building_or_higher = barracks_01 } - set_variable = { - name = destroyed_building_variable - value = 0 - months = 1 - } - } - 10 = { # watchtower : Normal - trigger = { has_domicile_building_or_higher = watchtower_01 } - set_variable = { - name = destroyed_building_variable - value = 1 - months = 1 - } - } - 10 = { # guardhouse : Normal - trigger = { has_domicile_building_or_higher = guardhouse_01 } - set_variable = { - name = destroyed_building_variable - value = 2 - months = 1 - } - } - 10 = { # garden : Normal - trigger = { has_domicile_building_or_higher = garden_01 } - set_variable = { - name = destroyed_building_variable - value = 3 - months = 1 - } - } - 10 = { # stable : Normal - trigger = { has_domicile_building_or_higher = stable_01 } - set_variable = { - name = destroyed_building_variable - value = 4 - months = 1 - } - } - 10 = { # workshop : Normal - trigger = { has_domicile_building_or_higher = workshop_01 } - set_variable = { - name = destroyed_building_variable - value = 5 - months = 1 - } - } - 10 = { # storage : Normal - trigger = { has_domicile_building_or_higher = storage_01 } - set_variable = { - name = destroyed_building_variable - value = 6 - months = 1 - } - } - 10 = { # market : Normal - trigger = { has_domicile_building_or_higher = market_01 } - set_variable = { - name = destroyed_building_variable - value = 7 - months = 1 - } - } - 10 = { # grazing_land : Normal - trigger = { has_domicile_building_or_higher = grazing_land_01 } - set_variable = { - name = destroyed_building_variable - value = 8 - months = 1 - } - } - 10 = { # grain_field : Normal - trigger = { has_domicile_building_or_higher = grain_field_01 } - set_variable = { - name = destroyed_building_variable - value = 9 - months = 1 - } - } - 10 = { # living_quarters : Normal - trigger = { has_domicile_building_or_higher = living_quarters_01 } - set_variable = { - name = destroyed_building_variable - value = 10 - months = 1 - } - } - 10 = { # vineyard : Normal - trigger = { has_domicile_building_or_higher = vineyard_01 } - set_variable = { - name = destroyed_building_variable - value = 11 - months = 1 - } - } - 10 = { # olive : Normal - trigger = { has_domicile_building_or_higher = olive_01 } - set_variable = { - name = destroyed_building_variable - value = 12 - months = 1 - } - } - 10 = { # temple : Normal - trigger = { has_domicile_building_or_higher = temple_small_01 } - set_variable = { - name = destroyed_building_variable - value = 13 - months = 1 - } - } - 10 = { # grand_solar : Normal - trigger = { has_domicile_building_or_higher = grand_solar_01 } - set_variable = { - name = destroyed_building_variable - value = 14 - months = 1 - } - } - 10 = { # cabinet_of_curiosities : Normal - trigger = { has_domicile_building_or_higher = cabinet_of_curiosities_01 } - set_variable = { - name = destroyed_building_variable - value = 15 - months = 1 - } - } - 10 = { # reception_hall : Normal - trigger = { has_domicile_building_or_higher = reception_hall_01 } - set_variable = { - name = destroyed_building_variable - value = 16 - months = 1 - } - } - 10 = { # prison : Normal - trigger = { has_domicile_building_or_higher = prison_01 } - set_variable = { - name = destroyed_building_variable - value = 17 - months = 1 - } - } - 10 = { # courtyard : Normal - trigger = { has_domicile_building_or_higher = courtyard_01 } - set_variable = { - name = destroyed_building_variable - value = 18 - months = 1 - } - } - 10 = { # wine_cellar : Normal - trigger = { has_domicile_building_or_higher = wine_cellar_01 } - set_variable = { - name = destroyed_building_variable - value = 19 - months = 1 - } - } - 10 = { # guest_room : Normal - trigger = { has_domicile_building_or_higher = guest_room_01 } - set_variable = { - name = destroyed_building_variable - value = 20 - months = 1 - } - } - 10 = { # bath : Normal - trigger = { has_domicile_building_or_higher = bath_01 } - set_variable = { - name = destroyed_building_variable - value = 21 - months = 1 - } - } - 10 = { # library : Normal - trigger = { has_domicile_building_or_higher = library_01 } - set_variable = { - name = destroyed_building_variable - value = 22 - months = 1 - } - } - 10 = { # servants_quarters : Normal - trigger = { has_domicile_building_or_higher = servants_quarters_01 } - set_variable = { - name = destroyed_building_variable - value = 23 - months = 1 - } - } - 10 = { # office : Normal - trigger = { has_domicile_building_or_higher = office_01 } - set_variable = { - name = destroyed_building_variable - value = 24 - months = 1 - } - } - 10 = { # trophy_room : Normal - trigger = { has_domicile_building_or_higher = trophy_room_01 } - set_variable = { - name = destroyed_building_variable - value = 25 - months = 1 - } - } - 10 = { # silk : Normal - trigger = { has_domicile_building_or_higher = silk_01 } - set_variable = { - name = destroyed_building_variable - value = 26 - months = 1 - } - } - } -} - -destroy_random_estate_building_effect = { - if = { - limit = { has_variable = destroyed_building_variable } - switch = { - trigger = var:destroyed_building_variable - 0 = { # barracks : Cheap - destroy_or_downgrade_estate_building_6_effect = { BUILDING = barracks } - } - 1 = { # watchtower : Cheap - destroy_or_downgrade_estate_building_6_effect = { BUILDING = watchtower } - } - 2 = { # guardhouse : Cheap - destroy_or_downgrade_estate_building_4_effect = { BUILDING = guardhouse } - } - 3 = { # garden : Cheap - if = { - limit = { has_domicile_building_or_higher = garden_leisure_04 } - destroy_or_downgrade_estate_building_3_6_replacement_effect = { BUILDING = garden_leisure } - } - else_if = { - limit = { has_domicile_building_or_higher = garden_fruit_04 } - destroy_or_downgrade_estate_building_3_6_replacement_effect = { BUILDING = garden_fruit } - } - else = { - destroy_or_downgrade_estate_building_3_effect = { BUILDING = garden } - } - } - 4 = { # stable : Cheap - if = { - limit = { has_domicile_building_or_higher = stable_grand_04 } - destroy_or_downgrade_estate_building_3_6_replacement_effect = { BUILDING = stable_grand } - } - else_if = { - limit = { has_domicile_building_or_higher = stable_kennel_04 } - destroy_or_downgrade_estate_building_3_6_replacement_effect = { BUILDING = stable_kennel } - } - else_if = { - limit = { has_domicile_building_or_higher = stable_chariot_04 } - destroy_or_downgrade_estate_building_3_6_replacement_effect = { BUILDING = stable_chariot } - } - else = { - destroy_or_downgrade_estate_building_3_effect = { BUILDING = stable } - } - } - 5 = { # workshop : Cheap - if = { - limit = { has_domicile_building_or_higher = workshop_carpenter_03 } - destroy_or_downgrade_estate_building_2_6_replacement_effect = { BUILDING = workshop_carpenter } - } - else_if = { - limit = { has_domicile_building_or_higher = workshop_mason_03 } - destroy_or_downgrade_estate_building_2_6_replacement_effect = { BUILDING = workshop_mason } - } - else_if = { - limit = { has_domicile_building_or_higher = workshop_textile_03 } - destroy_or_downgrade_estate_building_2_6_replacement_effect = { BUILDING = workshop_textile } - } - else = { - destroy_or_downgrade_estate_building_2_effect = { BUILDING = workshop } - } - } - 6 = { # storage : Cheap - if = { - limit = { has_domicile_building_or_higher = storage_warehouse_03 } - destroy_or_downgrade_estate_building_2_4_replacement_effect = { BUILDING = storage_warehouse } - } - else_if = { - limit = { has_domicile_building_or_higher = storage_granary_03 } - destroy_or_downgrade_estate_building_2_4_replacement_effect = { BUILDING = storage_granary } - } - else = { - destroy_or_downgrade_estate_building_2_effect = { BUILDING = storage } - } - } - 7 = { # market : Cheap - destroy_or_downgrade_estate_building_6_effect = { BUILDING = market } - } - 8 = { # grazing_land : Cheap - if = { - limit = { has_domicile_building_or_higher = horse_pasture_04 } - destroy_or_downgrade_estate_building_3_6_replacement_effect = { BUILDING = horse_pasture } - } - else_if = { - limit = { has_domicile_building_or_higher = camel_pasture_04 } - destroy_or_downgrade_estate_building_3_6_replacement_effect = { BUILDING = camel_pasture } - } - else_if = { - limit = { has_domicile_building_or_higher = elephant_pasture_04 } - destroy_or_downgrade_estate_building_3_6_replacement_effect = { BUILDING = elephant_pasture } - } - else = { - destroy_or_downgrade_estate_building_6_effect = { BUILDING = grazing_land } - } - } - 9 = { # grain_field : Cheap - destroy_or_downgrade_estate_building_6_effect = { BUILDING = grain_field } - } - 10 = { # living_quarters : Cheap - destroy_or_downgrade_estate_building_4_effect = { BUILDING = living_quarters } - } - 11 = { # vineyard : Cheap - destroy_or_downgrade_estate_building_6_effect = { BUILDING = vineyard } - } - 12 = { # olive : Cheap - destroy_or_downgrade_estate_building_6_effect = { BUILDING = olive } - } - 13 = { # temple : Cheap - if = { - limit = { has_domicile_building_or_higher = temple_crypt_04 } - destroy_or_downgrade_estate_building_3_6_replacement_effect = { BUILDING = temple_crypt } - } - else_if = { - limit = { has_domicile_building_or_higher = temple_large_04 } - destroy_or_downgrade_estate_building_3_6_replacement_effect = { BUILDING = temple_large } - } - else_if = { - limit = { has_domicile_building_or_higher = temple_monastery_04 } - destroy_or_downgrade_estate_building_3_6_replacement_effect = { BUILDING = temple_monastery } - } - else = { - destroy_or_downgrade_estate_building_3_effect = { BUILDING = temple_small } - } - } - 14 = { # grand_solar : Cheap - destroy_or_downgrade_estate_building_4_effect = { BUILDING = grand_solar } - } - 15 = { # cabinet_of_curiosities : Cheap - destroy_or_downgrade_estate_building_3_effect = { BUILDING = cabinet_of_curiosities } - } - 16 = { # reception_hall : Cheap - destroy_or_downgrade_estate_building_5_effect = { BUILDING = reception_hall } - } - 17 = { # prison : Cheap - destroy_or_downgrade_estate_building_4_effect = { BUILDING = prison } - } - 18 = { # courtyard : Cheap - destroy_or_downgrade_estate_building_4_effect = { BUILDING = courtyard } - } - 19 = { # wine_cellar : Cheap - destroy_or_downgrade_estate_building_3_effect = { BUILDING = wine_cellar } - } - 20 = { # guest_room : Cheap - destroy_or_downgrade_estate_building_6_effect = { BUILDING = guest_room } - } - 21 = { # bath : Cheap - destroy_or_downgrade_estate_building_4_effect = { BUILDING = bath } - } - 22 = { # library : Cheap - if = { - limit = { has_domicile_building_or_higher = library_observatory_03 } - destroy_or_downgrade_estate_building_2_4_replacement_effect = { BUILDING = library_observatory } - } - else_if = { - limit = { has_domicile_building_or_higher = library_education_03 } - destroy_or_downgrade_estate_building_2_4_replacement_effect = { BUILDING = library_education } - } - else = { - destroy_or_downgrade_estate_building_2_effect = { BUILDING = library } - } - } - 23 = { # servants_quarters : Cheap - destroy_or_downgrade_estate_building_4_effect = { BUILDING = servants_quarters } - } - 24 = { # office : Cheap - destroy_or_downgrade_estate_building_4_effect = { BUILDING = office } - } - 25 = { # trophy_room : Cheap - destroy_or_downgrade_estate_building_4_effect = { BUILDING = trophy_room } - } - 26 = { # silk : Cheap - destroy_or_downgrade_estate_building_6_effect = { BUILDING = silk } - } - } - remove_variable = destroyed_building_variable - } -} - -# Destroy building effects for chinese estates - In domicile scope -destroy_random_east_asian_estate_building_variable_effect = { - save_scope_as = raid_domicile - if = { - limit = { has_variable = destroyed_building_variable } - remove_variable = destroyed_building_variable - } - random_list = { # Which building? - # Upgrades/internal buildings - 10 = { # living_quarters - trigger = { has_domicile_building_or_higher = east_asian_estate_living_quarters_01 } - set_variable = { - name = destroyed_building_variable - value = 1 - months = 1 - } - } - 10 = { # commander's study - trigger = { has_domicile_building_or_higher = east_asian_estate_commander_study_01 } - set_variable = { - name = destroyed_building_variable - value = 2 - months = 1 - } - } - 10 = { # office - trigger = { has_domicile_building_or_higher = east_asian_estate_office_01 } - set_variable = { - name = destroyed_building_variable - value = 3 - months = 1 - } - } - 10 = { # servants_quarters - trigger = { has_domicile_building_or_higher = east_asian_estate_servants_quarters_01 } - set_variable = { - name = destroyed_building_variable - value = 4 - months = 1 - } - } - 10 = { # library - trigger = { has_domicile_building_or_higher = east_asian_estate_library_01 } - set_variable = { - name = destroyed_building_variable - value = 5 - months = 1 - } - } - 10 = { # bath - trigger = { has_domicile_building_or_higher = east_asian_estate_bath_01 } - set_variable = { - name = destroyed_building_variable - value = 6 - months = 1 - } - } - 10 = { # guest_room - trigger = { has_domicile_building_or_higher = east_asian_estate_guest_room_01 } - set_variable = { - name = destroyed_building_variable - value = 7 - months = 1 - } - } - 10 = { # wine_cellar - trigger = { has_domicile_building_or_higher = east_asian_estate_wine_cellar_01 } - set_variable = { - name = destroyed_building_variable - value = 8 - months = 1 - } - } - 10 = { # courtyard - trigger = { has_domicile_building_or_higher = east_asian_estate_courtyard_01 } - set_variable = { - name = destroyed_building_variable - value = 9 - months = 1 - } - } - 10 = { # prison - trigger = { has_domicile_building_or_higher = east_asian_estate_prison_01 } - set_variable = { - name = destroyed_building_variable - value = 10 - months = 1 - } - } - 10 = { # reception_hall - trigger = { has_domicile_building_or_higher = east_asian_estate_reception_hall_01 } - set_variable = { - name = destroyed_building_variable - value = 11 - months = 1 - } - } - 10 = { # cabinet_of_curiosities - trigger = { has_domicile_building_or_higher = east_asian_estate_cabinet_of_curiosities_01 } - set_variable = { - name = destroyed_building_variable - value = 12 - months = 1 - } - } - # External buildings - 10 = { # ancestral shrine - trigger = { has_domicile_building_or_higher = east_asian_estate_ancestral_shrine_01 } - set_variable = { - name = destroyed_building_variable - value = 13 - months = 1 - } - } - 10 = { # pagoda - trigger = { has_domicile_building_or_higher = east_asian_estate_temple_01 } - set_variable = { - name = destroyed_building_variable - value = 14 - months = 1 - } - } - 10 = { # barracks - trigger = { has_domicile_building_or_higher = east_asian_estate_barracks_01 } - set_variable = { - name = destroyed_building_variable - value = 15 - months = 1 - } - } - 10 = { # watchtower - trigger = { has_domicile_building_or_higher = east_asian_estate_watchtower_01 } - set_variable = { - name = destroyed_building_variable - value = 16 - months = 1 - } - } - 10 = { # garden - trigger = { has_domicile_building_or_higher = east_asian_estate_garden_01 } - set_variable = { - name = destroyed_building_variable - value = 18 - months = 1 - } - } - 10 = { # stable - trigger = { has_domicile_building_or_higher = east_asian_estate_stable_01 } - set_variable = { - name = destroyed_building_variable - value = 19 - months = 1 - } - } - 10 = { # workshop - trigger = { has_domicile_building_or_higher = east_asian_estate_workshop_01 } - set_variable = { - name = destroyed_building_variable - value = 20 - months = 1 - } - } - 10 = { # storage - trigger = { has_domicile_building_or_higher = east_asian_estate_storage_01 } - set_variable = { - name = destroyed_building_variable - value = 21 - months = 1 - } - } - 10 = { # market - trigger = { has_domicile_building_or_higher = east_asian_estate_market_01 } - set_variable = { - name = destroyed_building_variable - value = 22 - months = 1 - } - } - 10 = { # grazing_land - trigger = { has_domicile_building_or_higher = east_asian_estate_grazing_land_01 } - set_variable = { - name = destroyed_building_variable - value = 23 - months = 1 - } - } - 10 = { # rice_field - trigger = { has_domicile_building_or_higher = east_asian_estate_rice_field_01 } - set_variable = { - name = destroyed_building_variable - value = 25 - months = 1 - } - } - 10 = { # tea plantation - trigger = { has_domicile_building_or_higher = east_asian_estate_tea_01 } - set_variable = { - name = destroyed_building_variable - value = 27 - months = 1 - } - } - 10 = { # physician's office - trigger = { has_domicile_building_or_higher = east_asian_estate_health_01 } - set_variable = { - name = destroyed_building_variable - value = 28 - months = 1 - } - } - 10 = { # silk - trigger = { has_domicile_building_or_higher = east_asian_estate_silk_01 } - set_variable = { - name = destroyed_building_variable - value = 29 - months = 1 - } - } - 10 = { # study - trigger = { has_domicile_building_or_higher = east_asian_estate_study_01 } - set_variable = { - name = destroyed_building_variable - value = 30 - months = 1 - } - } - 10 = { # minister's office - trigger = { has_domicile_building_or_higher = east_asian_estate_minister_office_01 } - set_variable = { - name = destroyed_building_variable - value = 31 - months = 1 - } - } - 10 = { # dynastic pavilion/movement leader building - trigger = { has_domicile_building_or_higher = east_asian_estate_movement_study_01 } - set_variable = { - name = destroyed_building_variable - value = 32 - months = 1 - } - } - 10 = { # archive - trigger = { has_domicile_building_or_higher = east_asian_estate_archive_01 } - set_variable = { - name = destroyed_building_variable - value = 33 - months = 1 - } - } - 10 = { # gate - trigger = { has_domicile_building_or_higher = east_asian_estate_gate_01 } - set_variable = { - name = destroyed_building_variable - value = 34 - months = 1 - } - } - 10 = { # taxation office - trigger = { has_domicile_building_or_higher = east_asian_estate_taxation_01 } - set_variable = { - name = destroyed_building_variable - value = 35 - months = 1 - } - } - 10 = { # yamen office - trigger = { has_domicile_building_or_higher = east_asian_peasant_quarters_01 } - set_variable = { - name = destroyed_building_variable - value = 36 - months = 1 - } - } - } -} - -destroy_random_east_asian_estate_building_effect = { - if = { - limit = { has_variable = destroyed_building_variable } - switch = { - trigger = var:destroyed_building_variable - 1 = { # living_quarters - destroy_or_downgrade_estate_building_4_effect = { BUILDING = east_asian_estate_living_quarters } - } - 2 = { # commander's study - destroy_or_downgrade_estate_building_4_effect = { BUILDING = east_asian_estate_commander_study } - } - 3 = { # office - destroy_or_downgrade_estate_building_4_effect = { BUILDING = east_asian_estate_office } - } - 4 = { # servants_quarters - destroy_or_downgrade_estate_building_4_effect = { BUILDING = east_asian_estate_servants_quarters } - } - 5 = { # library - if = { - limit = { has_domicile_building_or_higher = east_asian_estate_library_education_03 } - destroy_or_downgrade_estate_building_2_4_replacement_effect = { BUILDING = east_asian_estate_library_education } - } - else = { - destroy_or_downgrade_estate_building_2_effect = { BUILDING = east_asian_estate_library } - } - } - 6 = { # bath - destroy_or_downgrade_estate_building_4_effect = { BUILDING = east_asian_estate_bath } - } - 7 = { # guest_room - destroy_or_downgrade_estate_building_4_effect = { BUILDING = east_asian_estate_guest_room } - } - 8 = { # wine_cellar - destroy_or_downgrade_estate_building_3_effect = { BUILDING = east_asian_estate_wine_cellar } - } - 9 = { # courtyard - destroy_or_downgrade_estate_building_4_effect = { BUILDING = east_asian_estate_courtyard } - } - 10 = { # prison - destroy_or_downgrade_estate_building_4_effect = { BUILDING = east_asian_estate_prison } - } - 11 = { # reception_hall - destroy_or_downgrade_estate_building_5_effect = { BUILDING = east_asian_estate_reception_hall } - } - 12 = { # cabinet_of_curiosities - destroy_or_downgrade_estate_building_3_effect = { BUILDING = east_asian_estate_cabinet_of_curiosities } - } - 13 = { # ancestral shrine - destroy_or_downgrade_estate_building_6_effect = { BUILDING = east_asian_estate_ancestral_shrine } - } - 14 = { # pagoda - destroy_or_downgrade_estate_building_6_effect = { BUILDING = east_asian_estate_temple } - } - 15 = { # barracks - destroy_or_downgrade_estate_building_6_effect = { BUILDING = east_asian_estate_barracks } - } - 16 = { # watchtower - destroy_or_downgrade_estate_building_6_effect = { BUILDING = east_asian_estate_watchtower } - } - 18 = { # garden - if = { - limit = { has_domicile_building_or_higher = east_asian_estate_garden_leisure_04 } - destroy_or_downgrade_estate_building_3_6_replacement_effect = { BUILDING = east_asian_estate_garden_leisure } - } - else_if = { - limit = { has_domicile_building_or_higher = east_asian_estate_garden_fruit_04 } - destroy_or_downgrade_estate_building_3_6_replacement_effect = { BUILDING = east_asian_estate_garden_fruit } - } - else = { - destroy_or_downgrade_estate_building_3_effect = { BUILDING = east_asian_estate_garden } - } - } - 19 = { # stable - if = { - limit = { has_domicile_building_or_higher = east_asian_estate_stable_grand_04 } - destroy_or_downgrade_estate_building_3_6_replacement_effect = { BUILDING = east_asian_estate_stable_grand } - } - else_if = { - limit = { has_domicile_building_or_higher = east_asian_estate_stable_kennel_04 } - destroy_or_downgrade_estate_building_3_6_replacement_effect = { BUILDING = east_asian_estate_stable_kennel } - } - else = { - destroy_or_downgrade_estate_building_3_effect = { BUILDING = east_asian_estate_stable } - } - } - 20 = { # workshop - if = { - limit = { has_domicile_building_or_higher = east_asian_estate_workshop_carpenter_03 } - destroy_or_downgrade_estate_building_2_6_replacement_effect = { BUILDING = east_asian_estate_workshop_carpenter } - } - else_if = { - limit = { has_domicile_building_or_higher = east_asian_estate_workshop_mason_03 } - destroy_or_downgrade_estate_building_2_6_replacement_effect = { BUILDING = east_asian_estate_workshop_mason } - } - else_if = { - limit = { has_domicile_building_or_higher = east_asian_estate_workshop_textile_03 } - destroy_or_downgrade_estate_building_2_6_replacement_effect = { BUILDING = east_asian_estate_workshop_textile } - } - else = { - destroy_or_downgrade_estate_building_2_effect = { BUILDING = east_asian_estate_workshop } - } - } - 21 = { # storage - if = { - limit = { has_domicile_building_or_higher = east_asian_estate_storage_warehouse_03 } - destroy_or_downgrade_estate_building_2_6_replacement_effect = { BUILDING = east_asian_estate_storage_warehouse } - } - else_if = { - limit = { has_domicile_building_or_higher = east_asian_estate_storage_granary_03 } - destroy_or_downgrade_estate_building_2_6_replacement_effect = { BUILDING = east_asian_estate_storage_granary } - } - else = { - destroy_or_downgrade_estate_building_2_effect = { BUILDING = east_asian_estate_storage } - } - } - 22 = { # market - destroy_or_downgrade_estate_building_6_effect = { BUILDING = east_asian_estate_market } - } - 23 = { # grazing_land - if = { - limit = { has_domicile_building_or_higher = east_asian_estate_horse_pasture_04 } - destroy_or_downgrade_estate_building_3_6_replacement_effect = { BUILDING = east_asian_estate_horse_pasture } - } - else_if = { - limit = { has_domicile_building_or_higher = east_asian_estate_camel_pasture_04 } - destroy_or_downgrade_estate_building_3_6_replacement_effect = { BUILDING = east_asian_estate_camel_pasture } - } - else_if = { - limit = { has_domicile_building_or_higher = east_asian_estate_elephant_pasture_04 } - destroy_or_downgrade_estate_building_3_6_replacement_effect = { BUILDING = east_asian_estate_elephant_pasture } - } - else = { - destroy_or_downgrade_estate_building_6_effect = { BUILDING = east_asian_estate_grazing_land } - } - } - 25 = { # rice_field - destroy_or_downgrade_estate_building_6_effect = { BUILDING = east_asian_estate_rice_field } - } - 27 = { # tea - destroy_or_downgrade_estate_building_6_effect = { BUILDING = east_asian_estate_tea } - } - 28 = { # health - destroy_or_downgrade_estate_building_6_effect = { BUILDING = east_asian_estate_health } - } - 29 = { # silk - destroy_or_downgrade_estate_building_6_effect = { BUILDING = east_asian_estate_silk } - } - 30 = { # study - destroy_or_downgrade_estate_building_4_effect = { BUILDING = east_asian_estate_study } - } - 31 = { # minister's office - destroy_or_downgrade_estate_building_4_effect = { BUILDING = east_asian_estate_minister_office } - } - 32 = { # dynastic pavilion/movement leader building - destroy_or_downgrade_estate_building_4_effect = { BUILDING = east_asian_estate_movement_study } - } - 33 = { # archive - destroy_or_downgrade_estate_building_4_effect = { BUILDING = east_asian_estate_archive } - } - 34 = { # gate - destroy_or_downgrade_estate_building_6_effect = { BUILDING = east_asian_estate_gate } - } - 35 = { # tax office - destroy_or_downgrade_estate_building_4_effect = { BUILDING = east_asian_estate_taxation } - } - 36 = { # peasants quarters - destroy_or_downgrade_estate_building_4_effect = { BUILDING = east_asian_peasant_quarters } - } - } - remove_variable = destroyed_building_variable - } -} - -add_random_economic_building_effect = { - save_scope_as = building_scope - custom_tooltip = random_economic_building_tt - hidden_effect = { - random_list = { - 10 = { # Caravanserai - trigger = { - NOT = { has_building_or_higher = caravanserai_01 } - building_caravanserai_requirement_terrain = yes - building_requirement_castle_city_church = { LEVEL = 01 } - culture = { - has_innovation = innovation_guilds - } - } - add_building = caravanserai_01 - } - 10 = { # Watermills - trigger = { - NOT = { has_building_or_higher = watermills_01 } - building_watermills_requirement_terrain = yes - building_requirement_castle_city_church = { LEVEL = 01 } - culture = { - has_innovation = innovation_windmills - } - } - add_building = watermills_01 - } - 10 = { # Windmills - trigger = { - NOT = { has_building_or_higher = windmills_01 } - building_windmills_requirement_terrain = yes - building_requirement_castle_city_church = { LEVEL = 01 } - culture = { - has_innovation = innovation_windmills - } - } - add_building = windmills_01 - } - 10 = { # Trade Port - trigger = { - NOT = { has_building_or_higher = common_tradeport_01 } - building_common_tradeport_requirement_terrain = yes - OR = { - AND = { - culture = { - has_cultural_parameter = trade_ports_enabled_for_tribals - } - has_building_or_higher = tribe_01 - } - building_requirement_castle_city_church = { LEVEL = 01 } - } - } - add_building = common_tradeport_01 - } - 10 = { # Pastures - trigger = { - NOT = { has_building_or_higher = pastures_01 } - building_pastures_requirement_terrain = yes - building_requirement_castle_city_church = { LEVEL = 01 } - } - add_building = pastures_01 - } - 10 = { # Hunting Grounds - trigger = { - NOT = { has_building_or_higher = hunting_grounds_01 } - building_hunting_grounds_requirement_terrain = yes - building_requirement_castle_city_church = { LEVEL = 01 } - } - add_building = hunting_grounds_01 - } - 10 = { # Orchards - trigger = { - NOT = { has_building_or_higher = orchards_01 } - building_orchards_requirement_terrain = yes - building_requirement_castle_city_church = { LEVEL = 01 } - } - add_building = orchards_01 - } - 10 = { # Farm Estates - trigger = { - NOT = { has_building_or_higher = farm_estates_01 } - building_farm_estates_requirement_terrain = yes - building_requirement_castle_city_church = { LEVEL = 01 } - } - add_building = farm_estates_01 - } - 10 = { # Cereal Fields - trigger = { - NOT = { has_building_or_higher = cereal_fields_01 } - building_cereal_fields_requirement_terrain = yes - building_requirement_castle_city_church = { LEVEL = 01 } - } - add_building = cereal_fields_01 - } - 10 = { # Logging Camps - trigger = { - NOT = { has_building_or_higher = logging_camps_01 } - building_logging_camps_requirement_terrain = yes - building_requirement_castle_city_church = { LEVEL = 01 } - } - add_building = logging_camps_01 - } - 10 = { # Peat Quarries - trigger = { - NOT = { has_building_or_higher = peat_quarries_01 } - building_peat_quarries_requirement_terrain = yes - building_requirement_castle_city_church = { LEVEL = 01 } - } - add_building = peat_quarries_01 - } - 10 = { # Hill Farms - trigger = { - NOT = { has_building_or_higher = hill_farms_01 } - building_hill_farms_requirement_terrain = yes - building_requirement_castle_city_church = { LEVEL = 01 } - } - add_building = hill_farms_01 - } - 10 = { # Elephant Pens - trigger = { - NOT = { has_building_or_higher = elephant_pens_01 } - building_elephant_pens_requirement_terrain = yes - building_requirement_castle_city_church = { LEVEL = 01 } - } - add_building = elephant_pens_01 - } - 10 = { # Plantations - trigger = { - NOT = { has_building_or_higher = plantations_01 } - building_plantations_requirement_terrain = yes - building_requirement_castle_city_church = { LEVEL = 01 } - } - add_building = plantations_01 - } - 10 = { # Quarries - trigger = { - NOT = { has_building_or_higher = quarries_01 } - building_quarries_requirement_terrain = yes - building_requirement_castle_city_church = { LEVEL = 01 } - } - add_building = quarries_01 - } - 10 = { # Qanats - trigger = { - NOT = { has_building_or_higher = qanats_01 } - building_qanats_requirement_terrain = yes - building_requirement_castle_city_church = { LEVEL = 01 } - culture = { - has_cultural_parameter = unlocks_qanat_building - } - } - add_building = qanats_01 - } - 10 = { # Murex Farms - trigger = { - NOT = { has_building_or_higher = murex_farm_01 } - building_murex_farm_requirement_terrain = yes - building_requirement_castle_city_church = { LEVEL = 01 } - } - add_building = murex_farm_01 - } - 10 = { # Guild Halls - City Specific - trigger = { - NOT = { has_building_or_higher = guild_halls_01 } - has_building_or_higher = city_01 - } - add_building = guild_halls_01 - } - 10 = { # Monastic Schools - Temple Specific - trigger = { - NOT = { has_building_or_higher = monastic_schools_01 } - has_building_or_higher = temple_01 - } - add_building = monastic_schools_01 - } - } - } -} - -add_random_fortification_building_effect = { - save_scope_as = building_scope - custom_tooltip = random_fortification_building_tt - hidden_effect = { - random_list = { - 10 = { # Ramparts - trigger = { - NOT = { has_building_or_higher = ramparts_01 } - building_ramparts_requirement_terrain = yes - building_requirement_castle_city_church = { LEVEL = 01 } - } - add_building = ramparts_01 - } - 10 = { # Curtain Walls - trigger = { - NOT = { has_building_or_higher = curtain_walls_01 } - building_curtain_walls_requirement_terrain = yes - building_requirement_castle_city_church = { LEVEL = 01 } - } - add_building = curtain_walls_01 - } - 10 = { # Watchtowers - trigger = { - NOT = { has_building_or_higher = watchtowers_01 } - building_watchtowers_requirement_terrain = yes - building_requirement_castle_city_church = { LEVEL = 01 } - } - add_building = watchtowers_01 - } - 10 = { # Hill Forts - trigger = { - NOT = { has_building_or_higher = hill_forts_01 } - building_hill_forts_requirement_terrain = yes - building_requirement_castle_city_church = { LEVEL = 01 } - } - add_building = hill_forts_01 - } - } - } -} - -add_random_military_building_effect = { - save_scope_as = building_scope - custom_tooltip = random_military_building_tt - hidden_effect = { - random_list = { - 10 = { # Wind Furnace - trigger = { - NOT = { has_building_or_higher = wind_furnace_01 } - building_wind_furnace_requirement_terrain = yes - building_requirement_castle_city_church = { LEVEL = 01 } - } - add_building = wind_furnace_01 - } - 10 = { # Workshops - trigger = { - NOT = { has_building_or_higher = workshops_01 } - building_workshops_requirement_terrain = yes - building_requirement_castle_city_church = { LEVEL = 01 } - scope:building_scope.county.holder.culture = { - has_innovation = innovation_advanced_bowmaking - } - } - add_building = workshops_01 - } - 10 = { # Horse Pastures - trigger = { - NOT = { has_building_or_higher = windmills_01 } - building_horse_pastures_requirement_terrain = yes - } - add_building = windmills_01 - } - 10 = { # Hillside Grazing - trigger = { - NOT = { has_building_or_higher = hillside_grazing_01 } - building_hillside_grazing_requirement_terrain = yes - } - add_building = hillside_grazing_01 - } - 10 = { # Warrior Lodges - trigger = { - NOT = { has_building_or_higher = warrior_lodges_01 } - building_warrior_lodges_requirement_terrain = yes - } - add_building = warrior_lodges_01 - } - 10 = { # Military Camps - trigger = { - NOT = { has_building_or_higher = military_camps_01 } - building_military_camps_requirement_terrain = yes - building_requirement_castle_city_church = { LEVEL = 01 } - } - add_building = military_camps_01 - } - 10 = { # Regimental Grounds - trigger = { - NOT = { has_building_or_higher = regimental_grounds_01 } - building_regimental_grounds_requirement_terrain = yes - building_requirement_castle_city_church = { LEVEL = 01 } - } - add_building = regimental_grounds_01 - } - 10 = { # Outposts - trigger = { - NOT = { has_building_or_higher = outposts_01 } - building_outposts_requirement_terrain = yes - building_requirement_castle_city_church = { LEVEL = 01 } - } - add_building = outposts_01 - } - 10 = { # Barracks - trigger = { - NOT = { has_building_or_higher = barracks_01 } - building_barracks_requirement_terrain = yes - building_requirement_castle_city_church = { LEVEL = 01 } - } - add_building = barracks_01 - } - 10 = { # Camel Farms - trigger = { - NOT = { has_building_or_higher = camel_farms_01 } - building_camel_farms_requirement_terrain = yes - building_requirement_castle_city_church = { LEVEL = 01 } - } - add_building = camel_farms_01 - } - 10 = { # Stables - trigger = { - NOT = { has_building_or_higher = stables_01 } - building_stables_requirement_terrain = yes - building_requirement_castle_city_church = { LEVEL = 01 } - } - add_building = stables_01 - } - 10 = { # Smiths - trigger = { - NOT = { has_building_or_higher = smiths_01 } - building_smiths_requirement_terrain = yes - building_requirement_castle_city_church = { LEVEL = 01 } - } - add_building = smiths_01 - } - } - } -} - -destroy_or_downgrade_temple_effect = { - if = { - limit = { has_building = temple_04 } - remove_building = temple_04 - hidden_effect = { add_building = temple_03 } - } - else_if = { - limit = { has_building = temple_03 } - remove_building = temple_03 - hidden_effect = { add_building = temple_02 } - } - else_if = { - limit = { has_building = temple_02 } - remove_building = temple_02 - hidden_effect = { add_building = temple_01 } - } - else = { remove_building = temple_01 } -} - -add_next_temple_tier_effect = { - if = { - limit = { - NOT = { has_building_or_higher = temple_01 } - } - add_building = temple_01 - } - else_if = { - limit = { has_building = temple_01 } - add_building = temple_02 - } - else_if = { - limit = { has_building = temple_02 } - add_building = temple_03 - } - else_if = { - limit = { has_building = temple_03 } - add_building = temple_04 - } -} diff --git a/N3OW/common/scripted_effects/00_camp_officer_effects.txt b/N3OW/common/scripted_effects/00_camp_officer_effects.txt deleted file mode 100644 index 2298a87d..00000000 --- a/N3OW/common/scripted_effects/00_camp_officer_effects.txt +++ /dev/null @@ -1,434 +0,0 @@ - -################### -# Generic effects that are used for basic opinion gain etc. -################### - -#Basic effect for gaining a camp officer -basic_gained_camp_officer_effect = { - scope:liege = { - # Gain a bit of opinion for being appointed. - reverse_add_opinion = { - target = scope:employee - modifier = made_me_officer_opinion - } - # If they now like us sufficiently, then set up a potential friendship. - hidden_effect = { - if = { - limit = { - reverse_opinion = { - target = scope:employee - value >= 50 - } - can_set_relation_potential_friend_trigger = { CHARACTER = scope:employee } - } - set_relation_potential_friend = scope:employee - } - } - # Plus, some ripple consequences. - every_courtier = { - limit = { - this != scope:employee - } - # Friends'n'lovers. - if = { - limit = { - has_any_moderate_good_relationship_with_character_trigger = { CHARACTER = scope:employee } - } - add_opinion = { - target = scope:liege - modifier = made_friend_officer_opinion - } - } - # Foes... - if = { - limit = { - has_any_moderate_bad_relationship_with_character_trigger = { CHARACTER = scope:employee } - } - add_opinion = { - target = scope:liege - modifier = made_foe_officer_opinion - } - } - # ... and family who are not foes. - else_if = { - limit = { is_close_or_extended_family_of = scope:employee } - add_opinion = { - target = scope:liege - modifier = made_family_officer_opinion - } - } - } - } -} - -#Basic effect for losing a court position -basic_revoked_camp_officer_effect = { - scope:employee = { - add_opinion = { - modifier = revoked_camp_officer_opinion - target = scope:liege - } - } - # Lose whatever you might have gained. - scope:employee = { - remove_opinion = { - target = scope:liege - modifier = made_me_officer_opinion - } - } - scope:liege = { - # If they now dislike us sufficiently, then set up a potential rivalry. - hidden_effect = { - if = { - limit = { - reverse_opinion = { - target = scope:employee - value <= -50 - } - can_set_relation_potential_rival_trigger = { CHARACTER = scope:employee } - } - set_relation_potential_rival = scope:employee - } - } - # Plus, some ripple consequences. - every_courtier = { - limit = { - this != scope:employee - } - # Friends'n'lovers. - if = { - limit = { - has_any_moderate_good_relationship_with_character_trigger = { CHARACTER = scope:employee } - } - remove_opinion = { - target = scope:liege - modifier = made_friend_officer_opinion - } - } - # Foes... - if = { - limit = { - has_any_moderate_bad_relationship_with_character_trigger = { CHARACTER = scope:employee } - } - remove_opinion = { - target = scope:liege - modifier = made_foe_officer_opinion - } - } - # ... and family who are not foes. - else_if = { - limit = { is_close_or_extended_family_of = scope:employee } - remove_opinion = { - target = scope:liege - modifier = made_family_officer_opinion - } - } - } - } -} - -#Basic effect for a camp_officer invalidating -basic_invalidated_camp_officer_effect = {} - - -################ -# EFFECTS FOR SPECIFIC CAMP OFFICER -################ - -# SECOND -second_camp_officer_title_accepted_effect = { - basic_gained_camp_officer_effect = yes -} -second_camp_officer_title_revoked_effect = { - basic_revoked_camp_officer_effect = yes - scope:employee = { - if = { - limit = { var:loyalty_dependent_on_position ?= scope:liege } - scope:liege = { - remove_hook = { - target = scope:employee - type = loyalty_hook - } - } - } - if = { - limit = { has_character_modifier = ep3_laamp_flavour_ewan_2071_b_work_self_to_death_modifier } - remove_character_modifier = ep3_laamp_flavour_ewan_2071_b_work_self_to_death_modifier - } - } -} -second_camp_officer_title_invalidated_effect = { - basic_invalidated_camp_officer_effect = yes -} -# Quartermaster -quartermaster_camp_officer_title_accepted_effect = { - basic_gained_camp_officer_effect = yes -} -quartermaster_camp_officer_title_revoked_effect = { - basic_revoked_camp_officer_effect = yes -} -quartermaster_camp_officer_title_invalidated_effect = { - basic_invalidated_camp_officer_effect = yes -} -# Armorer -armorer_camp_officer_title_accepted_effect = { - basic_gained_camp_officer_effect = yes -} -armorer_camp_officer_title_revoked_effect = { - basic_revoked_camp_officer_effect = yes -} -armorer_camp_officer_title_invalidated_effect = { - basic_invalidated_camp_officer_effect = yes -} -# chief forager -chief_forager_camp_officer_title_accepted_effect = { - basic_gained_camp_officer_effect = yes -} -chief_forager_camp_officer_title_revoked_effect = { - basic_revoked_camp_officer_effect = yes -} -chief_forager_camp_officer_title_invalidated_effect = { - basic_invalidated_camp_officer_effect = yes -} -# master thief -master_thief_camp_officer_title_accepted_effect = { - basic_gained_camp_officer_effect = yes -} -master_thief_camp_officer_title_revoked_effect = { - basic_revoked_camp_officer_effect = yes -} -master_thief_camp_officer_title_invalidated_effect = { - basic_invalidated_camp_officer_effect = yes -} -# head porter -head_porter_camp_officer_title_accepted_effect = { - basic_gained_camp_officer_effect = yes -} -head_porter_camp_officer_title_revoked_effect = { - basic_revoked_camp_officer_effect = yes -} -head_porter_camp_officer_title_invalidated_effect = { - basic_invalidated_camp_officer_effect = yes -} -# head groom -head_groom_camp_officer_title_accepted_effect = { - basic_gained_camp_officer_effect = yes -} -head_groom_camp_officer_title_revoked_effect = { - basic_revoked_camp_officer_effect = yes -} -head_groom_camp_officer_title_invalidated_effect = { - basic_invalidated_camp_officer_effect = yes -} -# huntperson -huntperson_camp_officer_title_accepted_effect = { - basic_gained_camp_officer_effect = yes -} -huntperson_camp_officer_title_revoked_effect = { - basic_revoked_camp_officer_effect = yes -} -huntperson_camp_officer_title_invalidated_effect = { - basic_invalidated_camp_officer_effect = yes -} -# kennelperson -kennelperson_camp_officer_title_accepted_effect = { - basic_gained_camp_officer_effect = yes -} -kennelperson_camp_officer_title_revoked_effect = { - basic_revoked_camp_officer_effect = yes -} -kennelperson_camp_officer_title_invalidated_effect = { - basic_invalidated_camp_officer_effect = yes -} -# chief_engineer -chief_engineer_camp_officer_title_accepted_effect = { - basic_gained_camp_officer_effect = yes -} -chief_engineer_camp_officer_title_revoked_effect = { - basic_revoked_camp_officer_effect = yes -} -chief_engineer_camp_officer_title_invalidated_effect = { - basic_invalidated_camp_officer_effect = yes -} -# witness -witness_camp_officer_title_accepted_effect = { - basic_gained_camp_officer_effect = yes -} -witness_camp_officer_title_revoked_effect = { - basic_revoked_camp_officer_effect = yes -} -witness_camp_officer_title_invalidated_effect = { - basic_invalidated_camp_officer_effect = yes -} -# person_haggler -person_haggler_camp_officer_title_accepted_effect = { - basic_gained_camp_officer_effect = yes -} -person_haggler_camp_officer_title_revoked_effect = { - basic_revoked_camp_officer_effect = yes -} -person_haggler_camp_officer_title_invalidated_effect = { - basic_invalidated_camp_officer_effect = yes -} -# camp cook -camp_cook_camp_officer_title_accepted_effect = { - basic_gained_camp_officer_effect = yes -} -camp_cook_camp_officer_title_revoked_effect = { - basic_revoked_camp_officer_effect = yes -} -camp_cook_camp_officer_title_invalidated_effect = { - basic_invalidated_camp_officer_effect = yes -} -# master_bard -master_bard_camp_officer_title_accepted_effect = { - basic_gained_camp_officer_effect = yes -} -master_bard_camp_officer_title_revoked_effect = { - basic_revoked_camp_officer_effect = yes -} -master_bard_camp_officer_title_invalidated_effect = { - basic_invalidated_camp_officer_effect = yes -} -# stooge -stooge_camp_officer_title_accepted_effect = { - # No basic effect here — it applies default opinions that are flipped for a stooge. -} -stooge_camp_officer_title_revoked_effect = { - # No basic effect here — it applies default opinions that are flipped for a stooge. -} -stooge_camp_officer_title_invalidated_effect = { - basic_invalidated_camp_officer_effect = yes -} -# master_of_arms -master_of_arms_camp_officer_title_accepted_effect = { - basic_gained_camp_officer_effect = yes -} -master_of_arms_camp_officer_title_revoked_effect = { - basic_revoked_camp_officer_effect = yes -} -master_of_arms_camp_officer_title_invalidated_effect = { - basic_invalidated_camp_officer_effect = yes -} -# light_cav_captain -light_cavalry_captain_camp_officer_title_accepted_effect = { - basic_gained_camp_officer_effect = yes -} -light_cavalry_captain_camp_officer_title_revoked_effect = { - basic_revoked_camp_officer_effect = yes -} -light_cavalry_captain_camp_officer_title_invalidated_effect = { - basic_invalidated_camp_officer_effect = yes -} -# camelry_captain -camelry_captain_camp_officer_title_accepted_effect = { - basic_gained_camp_officer_effect = yes -} -camelry_captain_camp_officer_title_revoked_effect = { - basic_revoked_camp_officer_effect = yes -} -camelry_captain_camp_officer_title_invalidated_effect = { - basic_invalidated_camp_officer_effect = yes -} -# elephantry_captain -elephantry_captain_camp_officer_title_accepted_effect = { - basic_gained_camp_officer_effect = yes -} -elephantry_captain_camp_officer_title_revoked_effect = { - basic_revoked_camp_officer_effect = yes -} -elephantry_captain_camp_officer_title_invalidated_effect = { - basic_invalidated_camp_officer_effect = yes -} -# heavy_cavalry_captain -heavy_cavalry_captain_camp_officer_title_accepted_effect = { - basic_gained_camp_officer_effect = yes -} -heavy_cavalry_captain_camp_officer_title_revoked_effect = { - basic_revoked_camp_officer_effect = yes -} -heavy_cavalry_captain_camp_officer_title_invalidated_effect = { - basic_invalidated_camp_officer_effect = yes -} -# horse_archer_captain -horse_archer_captain_camp_officer_title_accepted_effect = { - basic_gained_camp_officer_effect = yes -} -horse_archer_captain_camp_officer_title_revoked_effect = { - basic_revoked_camp_officer_effect = yes -} -horse_archer_captain_camp_officer_title_invalidated_effect = { - basic_invalidated_camp_officer_effect = yes -} -# archer_captain -archer_captain_camp_officer_title_accepted_effect = { - basic_gained_camp_officer_effect = yes -} -archer_captain_camp_officer_title_revoked_effect = { - basic_revoked_camp_officer_effect = yes -} -archer_captain_camp_officer_title_invalidated_effect = { - basic_invalidated_camp_officer_effect = yes -} -# heavy_infantry_captain -heavy_infantry_captain_camp_officer_title_accepted_effect = { - basic_gained_camp_officer_effect = yes -} -heavy_infantry_captain_camp_officer_title_revoked_effect = { - basic_revoked_camp_officer_effect = yes -} -heavy_infantry_captain_camp_officer_title_invalidated_effect = { - basic_invalidated_camp_officer_effect = yes -} -# light_infantry_captain -light_infantry_captain_camp_officer_title_accepted_effect = { - basic_gained_camp_officer_effect = yes -} -light_infantry_captain_camp_officer_title_revoked_effect = { - basic_revoked_camp_officer_effect = yes -} -light_infantry_captain_camp_officer_title_invalidated_effect = { - basic_invalidated_camp_officer_effect = yes -} -# pike_captain -pike_captain_camp_officer_title_accepted_effect = { - basic_gained_camp_officer_effect = yes -} -pike_captain_camp_officer_title_revoked_effect = { - basic_revoked_camp_officer_effect = yes -} -pike_captain_camp_officer_title_invalidated_effect = { - basic_invalidated_camp_officer_effect = yes -} -# master_of_spoils_captain -master_of_spoils_camp_officer_title_accepted_effect = { - basic_gained_camp_officer_effect = yes -} -master_of_spoils_camp_officer_title_revoked_effect = { - basic_revoked_camp_officer_effect = yes -} -master_of_spoils_camp_officer_title_invalidated_effect = { - basic_invalidated_camp_officer_effect = yes -} - -# camp_priest -camp_priest_camp_officer_title_accepted_effect = { - basic_gained_camp_officer_effect = yes -} -camp_priest_camp_officer_title_revoked_effect = { - basic_revoked_camp_officer_effect = yes -} -camp_priest_camp_officer_title_invalidated_effect = { - basic_invalidated_camp_officer_effect = yes -} - -# laureate -laureate_camp_officer_title_accepted_effect = { - basic_gained_camp_officer_effect = yes -} -laureate_camp_officer_title_revoked_effect = { - basic_revoked_camp_officer_effect = yes -} -laureate_camp_officer_title_invalidated_effect = { - basic_invalidated_camp_officer_effect = yes -} diff --git a/N3OW/common/scripted_effects/00_casus_belli_effects.txt b/N3OW/common/scripted_effects/00_casus_belli_effects.txt deleted file mode 100644 index d640e595..00000000 --- a/N3OW/common/scripted_effects/00_casus_belli_effects.txt +++ /dev/null @@ -1,520 +0,0 @@ -#Effects relating to Casus Bellis. - -############################################################################################################################################################################################################# -# modify_participants_fame_values # -# by Sean Hughes # -# # -# Description: Makes the correct adjustments to prestige or piety for each participant in a war. # -# # -# Parameters: # -# WINNER: The character who won the war. # -# LOSER: The character who lost the war. # -# IS_RELIGIOUS_WAR: If yes we will modify Piety values instead of Prestige values. # -# FAME_BASE: The base value for calculating how much Prestige or Piety is gained/lost by each character, as below: # -# WINNER_FAME_SCALE: The winner will receive Prestige/Piety equal to FAME_BASE multiplied by this scale. # -# LOSER_FAME_SCALE: The winner will receive Prestige/Piety equal to FAME_BASE multiplied by this scale. **NOTE: This value should always be negative, otherwise the loser will gain piety/prestige!** # -# WINNER_ALLY_FAME_SCALE: Winner's allies will receive Prestige/Piety based on FAME_BASE, multiplied by this scale, then adjusted based on their War Contributuion. # -# LOSER_ALLY_FAME_SCALE: As above, but for the loser's side. ** NOTE: In the current design this should always be the same as WINNER_ALLY_FAME_SCALE, but I'm splitting it out in order to future-proof # -# this effect in case the design changes or modders want to alter how it works. ** # -# # -############################################################################################################################################################################################################# - -@maximum_prestige_winner = 1000 -@maximum_piety_winner = 1000 -@maximum_merit_winner = 1000 -@minimum_prestige_loser = -1000 -@minimum_piety_loser = -1000 - -@maximum_prestige_winner_ally = 1000 -@maximum_piety_winner_ally = 1000 -@maximum_merit_winner_ally = 1000 -@maximum_prestige_loser_ally = 1000 -@maximum_piety_loser_ally = 1000 - -modify_all_participants_fame_values = { - - # Give the winner the appropriate type & amount of 'fame' (prestige or piety). - if = { - # If the attacker is the winner, we only award fame *experience* instead of actual fame currency. - limit = { - $WINNER$ = scope:attacker - } - if = { - # Piety level progress for winning offensive religious wars. - limit = { - $IS_RELIGIOUS_WAR$ = yes - } - scope:attacker = { - add_piety_experience = { - value = $FAME_BASE$ - multiply = $WINNER_FAME_SCALE$ - max = @maximum_piety_winner - } - } - } - else = { - # Prestige level progress for winning all other offensive wars. - scope:attacker = { - add_prestige_experience = { - value = $FAME_BASE$ - multiply = $WINNER_FAME_SCALE$ - max = @maximum_prestige_winner - } - } - } - } - else = { - # If the defender is the winner, they get actual fame currency as a reward. - if = { - # Gain piety for winning defensive religious wars. - limit = { - $IS_RELIGIOUS_WAR$ = yes - } - scope:defender = { - add_piety = { - value = $FAME_BASE$ - multiply = $WINNER_FAME_SCALE$ - max = @maximum_piety_winner - } - } - } - else = { - # Gain prestige for winning all other defensive wars. - scope:defender = { - add_prestige = { - value = $FAME_BASE$ - multiply = $WINNER_FAME_SCALE$ - max = @maximum_prestige_winner - } - } - } - } - if = { - # Award Merit to the victorious attacker - limit = { - $WINNER$ = scope:attacker - } - scope:attacker = { - if = { - limit = { - government_allows = merit - } - change_merit = { - value = $FAME_BASE$ - multiply = $WINNER_FAME_SCALE$ - max = @maximum_merit_winner - } - } - } - } - else = { - # Award Merit to the victorious defender - scope:defender = { - if = { - limit = { - government_allows = merit - } - change_merit = { - value = $FAME_BASE$ - multiply = $WINNER_FAME_SCALE$ - max = @maximum_merit_winner - } - } - } - } - - # Award the appropriate type & amount of 'fame' to the allies of both primary participants. - modify_allies_of_participants_fame_values = { - WINNER = $WINNER$ - IS_RELIGIOUS_WAR = $IS_RELIGIOUS_WAR$ - FAME_BASE = $FAME_BASE$ - WINNER_ALLY_FAME_SCALE = $WINNER_ALLY_FAME_SCALE$ - LOSER_ALLY_FAME_SCALE = $LOSER_ALLY_FAME_SCALE$ - } - - # Take the appropriate type & amount of 'fame' away from the loser of the war. - if = { - # Religious wars cost Piety for the loser. - limit = { - $IS_RELIGIOUS_WAR$ = yes - } - - $LOSER$ = { - add_piety = { - value = $FAME_BASE$ - multiply = $LOSER_FAME_SCALE$ - min = @minimum_piety_loser - } - } - } - else = { - # All other war types cost Prestige from the loser. - $LOSER$ = { - add_prestige = { - value = $FAME_BASE$ - multiply = $LOSER_FAME_SCALE$ - min = @minimum_prestige_loser - } - } - } -} - -modify_all_participants_fame_values_crusading_claim = { - - # Give the winner the appropriate type & amount of 'fame' (prestige or piety). - if = { - # If the attacker is the winner, we only award fame *experience* instead of actual fame currency. - limit = { - $WINNER$ = scope:attacker - } - scope:attacker = { - add_prestige_experience = { - value = $FAME_BASE$ - multiply = $WINNER_FAME_SCALE$ - } - } - } - else = { - # Gain prestige for winning all other defensive wars. - scope:defender = { - add_prestige = { - value = $FAME_BASE$ - multiply = $WINNER_FAME_SCALE$ - } - } - } - - # Award the appropriate type & amount of 'fame' to the allies of both primary participants. - modify_allies_of_participants_fame_values_crusading_claim = { - WINNER = $WINNER$ - FAME_BASE = $FAME_BASE$ - WINNER_ALLY_FAME_SCALE = $WINNER_ALLY_FAME_SCALE$ - LOSER_ALLY_FAME_SCALE = $LOSER_ALLY_FAME_SCALE$ - } - - # All other war types cost Prestige from the loser. - $LOSER$ = { - add_prestige = { - value = $FAME_BASE$ - multiply = $LOSER_FAME_SCALE$ - } - } -} - -############################################################################################################################################################################################################# -# modify_allies_of_participants_fame_values # -# by Sean Hughes # -# # -# Description: Makes the correct adjustments to prestige or piety but ONLY for the allies in a war (e.g., not the primary attacker/defender). # -# Used as part of 'modify_participants_fame_values' but can also be used on it's own where desired, such as in a white peace where you don't want to give the primary participants any prestige/piety. # -# # -# Parameters: # -# WINNER: The character who won the war. # -# IS_RELIGIOUS_WAR: If yes we will modify Piety values instead of Prestige values. # -# FAME_BASE: The base value for calculating how much Prestige or Piety is gained/lost by each character, as below: # -# WINNER_ALLY_FAME_SCALE: Winner's allies will receive Prestige/Piety based on FAME_BASE, multiplied by this scale, then adjusted based on their War Contributuion. # -# LOSER_ALLY_FAME_SCALE: As above, but for the loser's side. ** NOTE: In the current design this should always be the same as WINNER_ALLY_FAME_SCALE, but I'm splitting it out in order to future-proof # -# this effect in case the design changes or modders want to alter how it works. ** # -# # -############################################################################################################################################################################################################# - -modify_allies_of_participants_fame_values = { - # Give the allies of both primary participants the appropriate type & amount of 'fame'. - - if = { - # Religious wars award Piety to participants. - limit = { - $IS_RELIGIOUS_WAR$ = yes - } - if = { - # Award Piety to the victorious attacker's allies. - limit = { - $WINNER$ = scope:attacker - } - add_from_contribution_attackers = { - piety = { - value = $FAME_BASE$ - multiply = $WINNER_ALLY_FAME_SCALE$ - max = @maximum_piety_winner_ally - } - opinion = { - modifier = contributed_in_war - } - } - # Award Piety to the defeated defender's allies. - add_from_contribution_defenders = { - piety = { - value = $FAME_BASE$ - multiply = $LOSER_ALLY_FAME_SCALE$ - max = @maximum_prestige_loser_ally - } - opinion = { - modifier = contributed_in_war - } - } - } - else = { - # Award Piety to the victorious defender's allies. - add_from_contribution_defenders = { - piety = { - value = $FAME_BASE$ - multiply = $WINNER_ALLY_FAME_SCALE$ - max = @maximum_piety_winner_ally - } - opinion = { - modifier = contributed_in_war - } - } - # Award Piety to the defeated attacker's allies. - add_from_contribution_attackers = { - piety = { - value = $FAME_BASE$ - multiply = $LOSER_ALLY_FAME_SCALE$ - max = @maximum_prestige_loser_ally - } - opinion = { - modifier = contributed_in_war - } - } - } - } - else = { - # All other war types award Prestige to participants. - if = { - # Award Prestige to the victorious attacker's allies. - limit = { - $WINNER$ = scope:attacker - } - add_from_contribution_attackers = { - prestige = { - value = $FAME_BASE$ - multiply = $WINNER_ALLY_FAME_SCALE$ - max = @maximum_prestige_winner_ally - } - opinion = { - modifier = contributed_in_war - } - } - # Award Prestige to the defeated defender's allies. - add_from_contribution_defenders = { - prestige = { - value = $FAME_BASE$ - multiply = $LOSER_ALLY_FAME_SCALE$ - max = @maximum_prestige_loser_ally - } - opinion = { - modifier = contributed_in_war - } - } - } - else = { - # Award Prestige to the victorious defender's allies. - add_from_contribution_defenders = { - prestige = { - value = $FAME_BASE$ - multiply = $WINNER_ALLY_FAME_SCALE$ - max = @maximum_prestige_winner_ally - } - opinion = { - modifier = contributed_in_war - } - } - # Award Prestige to the defeated attacker's allies. - add_from_contribution_attackers = { - prestige = { - value = $FAME_BASE$ - multiply = $LOSER_ALLY_FAME_SCALE$ - max = @maximum_prestige_loser_ally - } - opinion = { - modifier = contributed_in_war - } - } - } - } - # Award Merit to each participant of the winning side - if = { - # Award Merit to the victorious attacker's allies. - limit = { - $WINNER$ = scope:attacker - } - add_from_contribution_attackers = { - merit = { - value = $FAME_BASE$ - multiply = $WINNER_ALLY_FAME_SCALE$ - max = @maximum_merit_winner_ally - } - } - } - else = { - # Award Merit to the victorious defender's allies. - add_from_contribution_defenders = { - merit = { - value = $FAME_BASE$ - multiply = $LOSER_ALLY_FAME_SCALE$ - max = @maximum_merit_winner_ally - } - } - } -} - -modify_allies_of_participants_fame_both_values = { - # Give the allies of both primary participants the appropriate type & amount of 'fame'. - - if = { - # Award Piety to the victorious attacker's allies. - limit = { - $WINNER$ = scope:attacker - } - add_from_contribution_attackers = { - prestige = { - value = $PRESTIGE_FAME_BASE$ - multiply = $WINNER_ALLY_FAME_SCALE$ - max = @maximum_prestige_winner_ally - } - piety = { - value = $PIETY_FAME_BASE$ - multiply = $WINNER_ALLY_FAME_SCALE$ - max = @maximum_piety_winner_ally - } - opinion = { - modifier = contributed_in_war - } - } - # Award Piety to the defeated defender's allies. - add_from_contribution_defenders = { - prestige = { - value = $PRESTIGE_FAME_BASE$ - multiply = $LOSER_ALLY_FAME_SCALE$ - max = @maximum_prestige_loser_ally - } - piety = { - value = $PIETY_FAME_BASE$ - multiply = $LOSER_ALLY_FAME_SCALE$ - max = @maximum_piety_loser_ally - } - opinion = { - modifier = contributed_in_war - } - } - } - else = { - # Award Piety to the victorious defender's allies. - add_from_contribution_defenders = { - prestige = { - value = $PRESTIGE_FAME_BASE$ - multiply = $WINNER_ALLY_FAME_SCALE$ - max = @maximum_prestige_winner_ally - } - piety = { - value = $PIETY_FAME_BASE$ - multiply = $WINNER_ALLY_FAME_SCALE$ - max = @maximum_piety_winner_ally - } - opinion = { - modifier = contributed_in_war - } - } - # Award Piety to the defeated attacker's allies. - add_from_contribution_attackers = { - prestige = { - value = $PRESTIGE_FAME_BASE$ - multiply = $LOSER_ALLY_FAME_SCALE$ - max = @maximum_prestige_loser_ally - } - piety = { - value = $PIETY_FAME_BASE$ - multiply = $LOSER_ALLY_FAME_SCALE$ - max = @maximum_piety_loser_ally - } - opinion = { - modifier = contributed_in_war - } - } - } - -} - -modify_allies_of_participants_fame_values_crusading_claim = { - # Give the allies of both primary participants the appropriate type & amount of 'fame'. - - if = { - # Award Prestige to the victorious attacker's allies. - limit = { - $WINNER$ = scope:attacker - } - add_from_contribution_attackers = { - prestige = { - value = $FAME_BASE$ - multiply = $WINNER_ALLY_FAME_SCALE$ - } - opinion = { - modifier = contributed_in_war - } - } - # Award Prestige to the defeated defender's allies. - add_from_contribution_defenders = { - prestige = { - value = $FAME_BASE$ - multiply = $LOSER_ALLY_FAME_SCALE$ - } - opinion = { - modifier = contributed_in_war - } - } - } - else = { - # Award Prestige to the victorious defender's allies. - add_from_contribution_defenders = { - prestige = { - value = $FAME_BASE$ - multiply = $WINNER_ALLY_FAME_SCALE$ - } - opinion = { - modifier = contributed_in_war - } - } - # Award Prestige to the defeated attacker's allies. - add_from_contribution_attackers = { - prestige = { - value = $FAME_BASE$ - multiply = $LOSER_ALLY_FAME_SCALE$ - multiply = -1 - } - opinion = { - modifier = contributed_in_war - } - } - } -} - -add_hook_from_temp_de_jure_liege_to_attacker = { - # Assumes scope of title to be conquered. - # Assumes scope:attacker to be set for the character initiating the war. - # Assumes scope:temp_de_jure_liege to be set for the de jure liege that - # might gain a title from the war. - # Outcome: De jure liege of the contested title will owe a favor towards - # the attacker of the war if the de jure liege is in the vassal tree of the attacker. - if = { - limit = { - exists = scope:temp_de_jure_liege - scope:temp_de_jure_liege != scope:attacker - scope:temp_de_jure_liege = { target_is_liege_or_above = scope:attacker } - scope:temp_de_jure_liege = { - is_ai = yes - } - scope:attacker = { - can_add_hook = { - type = favor_hook - target = scope:temp_de_jure_liege - } - } - } - scope:attacker = { - add_hook = { - type = favor_hook - target = scope:temp_de_jure_liege - } - } - } -} diff --git a/N3OW/common/scripted_effects/00_childhood_effects.txt b/N3OW/common/scripted_effects/00_childhood_effects.txt deleted file mode 100644 index a088a1d1..00000000 --- a/N3OW/common/scripted_effects/00_childhood_effects.txt +++ /dev/null @@ -1,778 +0,0 @@ -#Scripted effects relating to childhood - -##################################################################### -# EFFECT LIST -##################################################################### -# !!! Remember to add all new effects with a short description here !!! - -#get_guardian_event_target_effect -#save_good_character_effect - #Save a relation scope for the child, use the arguments: - #RELATION = friend - #RELATION = crush - #RELATION = bully - #RELATION = victim - -###################################################################### -# EFFECTS -###################################################################### - - -#Get a child's Guardian, or alternatively a suitable stand-in, since the event relies on an adult being present -get_guardian_scope_effect = { - if = { - limit = { - any_relation = { - type = guardian - always = yes - } - } - random_relation = { - type = guardian - save_scope_as = guardian - } - } - if = { - limit = { - NOT = { exists = scope:guardian } - exists = court_owner.court_position:court_tutor_court_position - } - court_owner.court_position:court_tutor_court_position ?= { - save_scope_as = guardian - } - } - else_if = { - limit = { - NOT = { exists = scope:guardian } - exists = court_owner.court_position:court_guru_court_position - } - court_owner.court_position:court_guru_court_position ?= { - save_scope_as = guardian - } - } - if = { - limit = { - NOT = { exists = scope:guardian } - is_ruler = yes - any_parent = { - is_available_ai_adult = yes - is_in_the_same_court_as = root - } - } - random_parent = { - limit = { - is_available_ai_adult = yes - is_in_the_same_court_as = root - } - save_scope_as = guardian - } - } - if = { - limit = { - NOT = { exists = scope:guardian } - is_ruler = yes - any_courtier_or_guest = { - is_available_ai_adult = yes - } - } - random_courtier_or_guest = { - limit = { - is_available_ai_adult = yes - } - save_scope_as = guardian - } - } - if = { - limit = { - NOT = { exists = scope:guardian } - any_parent = { - is_ai = yes - is_available = yes - } - } - random_parent = { - limit = { - is_in_the_same_court_as = root - is_ai = yes - is_available = yes - } - alternative_limit = { - is_ai = yes - is_available = yes - } - save_scope_as = guardian - } - } - if = { - limit = { - NOT = { exists = scope:guardian } - any_sibling = { - is_available_ai_adult = yes - } - } - random_sibling = { - limit = { - is_available_ai_adult = yes - is_in_the_same_court_as = root - } - alternative_limit = { - is_available_ai_adult = yes - } - save_scope_as = guardian - } - } - if = { - limit = { - NOT = { exists = scope:guardian } - liege ?= { - any_courtier_or_guest = { - is_available_ai_adult = yes - } - } - } - liege = { - random_courtier_or_guest = { - limit = { - is_available_ai_adult = yes - } - save_scope_as = guardian - } - } - } - if = { - limit = { - NOT = { exists = scope:guardian } - liege ?= { - is_available_ai_adult = yes - } - } - liege = { - save_scope_as = guardian - } - } - if = { #Close to last resort - limit = { - NOT = { exists = scope:guardian } - any_ruler = { - is_ai = yes - culture = root.culture - faith = root.faith - is_available = yes - } - } - random_ruler = { - limit = { - is_ai = yes - culture = root.culture - faith = root.faith - is_available = yes - } - save_scope_as = guardian - } - } - if = { - limit = { - NOT = { exists = scope:guardian } - any_ruler = { - is_ai = yes - is_available = yes - OR = { - culture = root.culture - faith = root.faith - } - } - } - debug_log = "Resorted to last resort when finding guardian for child" - debug_log_scopes = yes - random_ruler = { - limit = { - is_ai = yes - is_available = yes - OR = { - culture = root.culture - faith = root.faith - } - } - save_scope_as = guardian - } - } - if = { - limit = { - NOT = { exists = scope:guardian } - any_ruler = { - is_ai = yes - is_available = yes - } - } - debug_log = "Resorted to absolute last resort when finding guardian for child" - debug_log_scopes = yes - random_ruler = { - limit = { - is_ai = yes - is_available = yes - } - save_scope_as = guardian - } - } -} - - -#Save a relation scope for the child, use the arguments: - #RELATION = - #SCOPE = -save_good_character_effect = { - #Make sure that this list prioritizes other child vassals/heirs when the child being bullied is a player or player heir. - save_temporary_scope_value_as = { - name = $SCOPE$_relation - value = yes - } - if = { - limit = { - NOT = { exists = scope:$RELATION$ } - is_playable_character = yes - } - every_vassal = { - if = { - limit = { - save_good_$RELATION$_character_trigger_check = yes - } - add_to_list = good_child_relation_character - } - every_child = { - limit = { - save_good_$RELATION$_character_trigger_check = yes - } - add_to_list = good_child_relation_character - } - every_warden_hostage = { - limit = { - save_good_$RELATION$_character_trigger_check = yes - } - add_to_list = good_child_relation_character - } - } - } - if = { - limit = { - is_playable_character = yes - NOT = { exists = scope:$RELATION$ } - } - every_courtier = { - limit = { - save_good_$RELATION$_character_trigger_check = yes - } - add_to_list = good_child_relation_character - } - } - if = { - limit = { - is_playable_character = yes - NOT = { exists = scope:$RELATION$ } - exists = liege - this != liege - } - liege = { - if = { - limit = { - save_good_$RELATION$_character_trigger_check = yes - } - add_to_list = good_child_relation_character - } - every_vassal = { - if = { - limit = { - save_good_$RELATION$_character_trigger_check = yes - } - add_to_list = good_child_relation_character - } - every_child = { - limit = { - save_good_$RELATION$_character_trigger_check = yes - } - add_to_list = good_child_relation_character - } - every_warden_hostage = { - limit = { - save_good_$RELATION$_character_trigger_check = yes - } - add_to_list = good_child_relation_character - } - } - every_child = { - limit = { - save_good_$RELATION$_character_trigger_check = yes - } - add_to_list = good_child_relation_character - } - every_warden_hostage = { - limit = { - save_good_$RELATION$_character_trigger_check = yes - } - add_to_list = good_child_relation_character - } - } - } - if = { - limit = { - is_playable_character = no - NOT = { exists = scope:$RELATION$ } - exists = liege - this != liege - } - liege = { - if = { - limit = { - save_good_$RELATION$_character_trigger_check = yes - } - add_to_list = good_child_relation_character - } - every_vassal = { - if = { - limit = { - save_good_$RELATION$_character_trigger_check = yes - } - add_to_list = good_child_relation_character - } - every_child = { - limit = { - save_good_$RELATION$_character_trigger_check = yes - } - add_to_list = good_child_relation_character - } - every_warden_hostage = { - limit = { - save_good_$RELATION$_character_trigger_check = yes - } - add_to_list = good_child_relation_character - } - } - every_child = { - limit = { - save_good_$RELATION$_character_trigger_check = yes - } - add_to_list = good_child_relation_character - } - every_warden_hostage = { - limit = { - save_good_$RELATION$_character_trigger_check = yes - } - add_to_list = good_child_relation_character - } - every_courtier_or_guest = { - limit = { - save_good_$RELATION$_character_trigger_check = yes - } - add_to_list = good_child_relation_character - } - } - } - - if = { - limit = { - NOT = { exists = scope:$RELATION$ } - exists = host - this != host - } - host = { - if = { - limit = { - save_good_$RELATION$_character_trigger_check = yes - } - add_to_list = good_child_relation_character - } - every_vassal = { - if = { - limit = { - save_good_$RELATION$_character_trigger_check = yes - } - add_to_list = good_child_relation_character - } - every_child = { - limit = { - save_good_$RELATION$_character_trigger_check = yes - } - add_to_list = good_child_relation_character - } - every_warden_hostage = { - limit = { - save_good_$RELATION$_character_trigger_check = yes - } - add_to_list = good_child_relation_character - } - } - every_child = { - limit = { - save_good_$RELATION$_character_trigger_check = yes - } - add_to_list = good_child_relation_character - } - every_warden_hostage = { - limit = { - save_good_$RELATION$_character_trigger_check = yes - } - add_to_list = good_child_relation_character - } - every_courtier_or_guest = { - limit = { - save_good_$RELATION$_character_trigger_check = yes - } - add_to_list = good_child_relation_character - } - } - } - - if = { - limit = { - NOT = { exists = scope:$RELATION$ } - } - #To actually pick the relation - random_in_list = { - list = good_child_relation_character - limit = { - is_vassal_of = root - } - alternative_limit = { - is_courtier_of = root - } - alternative_limit = { - exists = liege - is_primary_heir_of = liege - } - alternative_limit = { - exists = liege - is_heir_of = liege - } - alternative_limit = { - always = yes - } - weight = { - base = 1 - modifier = { - add = 2 - is_powerful_vassal_of = root - } - modifier = { - add = 1 - exists = root.liege - is_vassal_of = root.liege - } - modifier = { - add = 1 - exists = root.liege - any_parent = { - is_vassal_of = root.liege - } - } - modifier = { - add = 4 - age >= root.age_dif_child_down - age <= root.age_dif_child_up - } - modifier = { - add = -0.5 - exists = scope:crush_relation - root = { has_sexuality = none } - OR = { - AND = { - is_female = yes - root = { is_female = yes } - } - AND = { - is_male = yes - root = { is_male = yes } - } - } - } - } - save_scope_as = $SCOPE$ - } - } -} - -send_event_about_player_heir_childhood_personality_effect = { - every_heir_title = { - limit = { - holder ?= { - is_ai = no - player_heir ?= scope:personality_child - NOT = { is_in_list = childhood_personality_event } - } - is_title_created = yes #Since partition succession may result in uncreated titles having heirs but not holders. - } - holder = { - add_to_list = childhood_personality_event - } - } - - every_in_list = { - list = childhood_personality_event - trigger_event = child_personality.$ID$ - } -} - -add_suitable_same_realm_children_to_list = { - if = { - limit = { - OR = { - father ?= { - is_ai = no - } - mother ?= { - is_ai = no - } - host ?= { - is_ai = no - } - } - } - if = { - limit = { exists = location.county.holder.top_liege } - location.county.holder.top_liege = { - save_scope_as = top_liege_scope - } - } - else = { - save_scope_as = top_liege_scope - } - scope:top_liege_scope = { - if = { - limit = { - is_ai = yes - is_available_child = yes - this != root - age >= 6 - } - add_to_list = suitable_same_realm_children - } - if = { - limit = { - any_courtier_or_guest = { - is_ai = yes - is_available_child = yes - this != root - age >= 6 - } - } - every_courtier_or_guest = { - limit = { - is_ai = yes - is_available_child = yes - this != root - age >= 6 - } - add_to_list = suitable_same_realm_children - } - } - if = { - limit = { - any_warden_hostage = { - is_ai = yes - is_available_child = yes - this != root - age >= 6 - } - } - every_warden_hostage = { - limit = { - is_ai = yes - is_available_child = yes - this != root - age >= 6 - } - add_to_list = suitable_same_realm_children - } - } - if = { - limit = { - any_vassal_or_below = { - is_ai = yes - is_available_child = yes - this != root - age >= 6 - } - } - every_vassal_or_below = { - limit = { - is_ai = yes - is_available_child = yes - this != root - age >= 6 - } - add_to_list = suitable_same_realm_children - } - } - if = { - limit = { - any_vassal_or_below = { - any_courtier_or_guest = { - is_ai = yes - is_available_child = yes - this != root - age >= 6 - } - } - } - every_vassal_or_below = { - limit = { - any_courtier_or_guest = { - is_ai = yes - is_available_child = yes - this != root - age >= 6 - } - } - every_courtier_or_guest = { - limit = { - is_ai = yes - is_available_child = yes - this != root - age >= 6 - } - add_to_list = suitable_same_realm_children - } - } - } - if = { - limit = { - any_vassal_or_below = { - any_warden_hostage = { - is_ai = yes - is_available_child = yes - this != root - age >= 6 - } - } - } - every_vassal_or_below = { - limit = { - any_warden_hostage = { - is_ai = yes - is_available_child = yes - this != root - age >= 6 - } - } - every_warden_hostage = { - limit = { - is_ai = yes - is_available_child = yes - this != root - age >= 6 - } - add_to_list = suitable_same_realm_children - } - } - } - } - } - else = { - if = { - limit = { exists = location.county.holder } - location.county.holder = { - save_scope_as = top_liege_scope - } - } - else = { - save_scope_as = top_liege_scope - } - - scope:top_liege_scope = { - if = { - limit = { - is_ai = yes - is_available_child = yes - this != root - age >= 6 - } - add_to_list = suitable_same_realm_children - } - every_courtier = { - limit = { - is_ai = yes - is_available_child = yes - this != root - age >= 6 - } - add_to_list = suitable_same_realm_children - } - every_warden_hostage = { - limit = { - is_ai = yes - is_available_child = yes - this != root - age >= 6 - } - add_to_list = suitable_same_realm_children - } - } - } -} - -add_similar_age_same_court_children_to_list = { - location.county.holder = { - if = { - limit = { - is_ai = yes - save_good_crush_character_trigger_check = yes - } - add_to_list = similar_age_same_court_children - } - if = { - limit = { - any_courtier_or_guest = { - is_ai = yes - save_good_crush_character_trigger_check = yes - } - } - every_courtier_or_guest = { - limit = { - is_ai = yes - save_good_crush_character_trigger_check = yes - } - add_to_list = similar_age_same_court_children - } - } - if = { - limit = { - any_warden_hostage = { - is_ai = yes - save_good_crush_character_trigger_check = yes - } - } - every_warden_hostage = { - limit = { - is_ai = yes - save_good_crush_character_trigger_check = yes - } - add_to_list = similar_age_same_court_children - } - } - } -} - -guardian_or_court_tutor_trigger_event = { - if = { - limit = { - any_relation = { - type = guardian - } - } - random_relation = { - type = guardian - trigger_event = $EVENT$ - } - } - else_if = { - limit = { - exists = court_owner.court_position:court_guru_court_position - } - court_owner.court_position:court_guru_court_position = { - trigger_event = $EVENT$ - } - } - else = { - court_owner.court_position:court_tutor_court_position ?= { - trigger_event = $EVENT$ - } - } -} diff --git a/N3OW/common/scripted_effects/00_commander_effects.txt b/N3OW/common/scripted_effects/00_commander_effects.txt deleted file mode 100644 index 2688a5f9..00000000 --- a/N3OW/common/scripted_effects/00_commander_effects.txt +++ /dev/null @@ -1,801 +0,0 @@ -#Effects relating to commanders - -#get_valid_commander_list_effect: Creates a list of all valid commander characters called "valid_commanders" - -get_valid_commander_list_effect = { - every_vassal = { - limit = { - can_be_commander_now_trigger = { ARMY_OWNER = $ARMY_OWNER$ } - } - add_to_list = $LIST$ - } - every_courtier = { - limit = { - can_be_commander_now_trigger = { ARMY_OWNER = $ARMY_OWNER$ } - } - add_to_list = $LIST$ - } -} - -knight_increase_prowess_chance_effect = { - random_list = { - 60 = { - modifier = { - add = { - value = this.learning - multiply = -1 - multiply = 2 - } - } - modifier = { - factor = 0.5 - dynasty ?= { - has_dynasty_perk = warfare_legacy_3 - } - } - } - 30 = { - add_prowess_skill = 1 - } - 10 = { - blademaster_lifestyle_rank_up_effect = yes - modifier = { - add = 5 - has_education_martial_trigger = yes - } - modifier = { - add = 4 - has_trait = education_martial_prowess_1 - } - modifier = { - add = 8 - has_trait = education_martial_prowess_2 - } - modifier = { - add = 12 - has_trait = education_martial_prowess_3 - } - modifier = { - add = 16 - has_trait = education_martial_prowess_4 - } - modifier = { - add = 15 - has_trait = lifestyle_blademaster - } - modifier = { - add = 10 - has_trait = shrewd - } - modifier = { - add = 10 - has_trait = physique_good - } - modifier = { - add = 5 - has_trait = intellect_good_1 - } - modifier = { - add = 15 - has_trait = intellect_good_2 - } - modifier = { - add = 30 - has_trait = intellect_good_3 - } - modifier = { - factor = 3 - culture = { - has_cultural_parameter = blademaster_traits_more_common - } - } - modifier = { - factor = 0 - AND = { - has_trait = lifestyle_blademaster - has_trait_xp = { - trait = lifestyle_blademaster - value >= trait_third_level - } - } - } - } - } - - #This effect is used when the knight does something "good", so let's save them for the player to perhaps reward in the future - if = { - limit = { - liege ?= { is_ai = no } - NOT = { has_character_flag = was_the_target_of_event_court_5060 } - } - if = { - limit = { - exists = var:number_of_impressive_knight_things - } - change_variable = { - name = number_of_impressive_knight_things - add = 1 - } - } - else = { - set_variable = { - name = number_of_impressive_knight_things - value = 1 - } - } - - # Maintenance of the variable - if = { - limit = { - NOT = { has_character_flag = is_schedueled_for_court_5061_maintenance } - } - add_character_flag = { - flag = is_schedueled_for_court_5061_maintenance - years = 4 - } - trigger_event = { - id = court.5061 - years = 4 - } - } - liege = { - add_to_variable_list = { - name = impressive_knights - target = prev - } - } - } -} - -berserker_kill_version_randomization_effect = { - random_list = { - 10 = { - scope:combat_side = { - battle_event = { - key = "berserker_rage_killed_enemy_no_trait" - left_portrait = root - right_portrait = scope:enemy_knight - type = death - target_right = yes - } - } - scope:enemy_knight = { - death = { - death_reason = death_head_ripped_off - killer = root - } - } - } - 10 = { - scope:combat_side = { - battle_event = { - key = "berserker_rage_killed_enemy_no_trait_v2" - left_portrait = root - right_portrait = scope:enemy_knight - type = death - target_right = yes - } - } - scope:enemy_knight = { - death = { - death_reason = death_cloven_in_half - killer = root - } - } - } - 10 = { - scope:combat_side = { - battle_event = { - key = "berserker_rage_killed_enemy_no_trait_v3" - left_portrait = root - right_portrait = scope:enemy_knight - type = death - target_right = yes - } - } - scope:enemy_knight = { - death = { - death_reason = death_viciously_dismembered - killer = root - } - } - } - 10 = { - scope:combat_side = { - battle_event = { - key = "berserker_rage_killed_enemy_no_trait_v4" - left_portrait = root - right_portrait = scope:enemy_knight - type = death - target_right = yes - } - } - scope:enemy_knight = { - death = { - death_reason = death_ripped_apart_limb_by_limb - killer = root - } - } - } - 10 = { - scope:combat_side = { - battle_event = { - key = "berserker_rage_killed_enemy_no_trait_v5" - left_portrait = root - right_portrait = scope:enemy_knight - type = death - target_right = yes - } - } - scope:enemy_knight = { - death = { - death_reason = death_chopped_to_pieces - killer = root - } - } - } - 10 = { - scope:combat_side = { - battle_event = { - key = "berserker_rage_killed_enemy_no_trait_v6" - left_portrait = root - right_portrait = scope:enemy_knight - type = death - target_right = yes - } - } - scope:enemy_knight = { - death = { - death_reason = death_heart_ripped_out - killer = root - } - } - } - 1 = { - trigger = { - scope:enemy_knight = { - NOT = { - has_trait = brave - } - } - } - modifier = { - add = 99 - scope:enemy_knight = { - has_trait = craven - } - } - scope:combat_side = { - battle_event = { - key = "berserker_rage_killed_enemy_no_trait_v7" - left_portrait = root - right_portrait = scope:enemy_knight - type = death - target_right = yes - } - } - scope:enemy_knight = { - death = { - death_reason = death_fear - killer = root - } - } - } - 10 = { - scope:combat_side = { - battle_event = { - key = "berserker_rage_killed_enemy_no_trait_v8" - left_portrait = root - right_portrait = scope:enemy_knight - type = death - target_right = yes - } - } - scope:enemy_knight = { - death = { - death_reason = death_skull_cracked_open - killer = root - } - } - } - 10 = { - scope:combat_side = { - battle_event = { - key = "berserker_rage_killed_enemy_no_trait_v9" - left_portrait = root - right_portrait = scope:enemy_knight - type = death - target_right = yes - } - } - scope:enemy_knight = { - death = { - death_reason = death_strangled_with_own_intestines - killer = root - } - } - } - } -} - -shieldmaiden_kill_version_randomisation_effect = { - random_list = { - 10 = { - scope:combat_side = { - battle_event = { - key = "shieldmaiden_skill_killed_enemy_no_trait_v1" - left_portrait = root - right_portrait = scope:enemy_knight - type = death - target_right = yes - } - } - scope:enemy_knight = { - death = { - death_reason = death_decapitated - killer = root - } - } - } - 10 = { - scope:combat_side = { - battle_event = { - key = "shieldmaiden_skill_killed_enemy_no_trait_v2" - left_portrait = root - right_portrait = scope:enemy_knight - type = death - target_right = yes - } - } - scope:enemy_knight = { - death = { - death_reason = death_cloven_in_half - killer = root - } - } - } - 10 = { - scope:combat_side = { - battle_event = { - key = "shieldmaiden_skill_killed_enemy_no_trait_v3" - left_portrait = root - right_portrait = scope:enemy_knight - type = death - target_right = yes - } - } - scope:enemy_knight = { - death = { - death_reason = death_viciously_dismembered - killer = root - } - } - } - 10 = { - scope:combat_side = { - battle_event = { - key = "shieldmaiden_skill_killed_enemy_no_trait_v4" - left_portrait = root - right_portrait = scope:enemy_knight - type = death - target_right = yes - } - } - scope:enemy_knight = { - death = { - death_reason = death_piteously_cut_down - killer = root - } - } - } - 10 = { - scope:combat_side = { - battle_event = { - key = "shieldmaiden_skill_killed_enemy_no_trait_v5" - left_portrait = root - right_portrait = scope:enemy_knight - type = death - target_right = yes - } - } - scope:enemy_knight = { - death = { - death_reason = death_chopped_to_pieces - killer = root - } - } - } - } -} - -recruit_terrain_specialist_effect = { - if = { - limit = { - exists = root.capital_province - any_pool_character = { - is_adult = yes - province = root.capital_province - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } - martial >= medium_skill_rating - culture = root.culture - opinion = { # Just to make sure you don't pull in rivals or similar - value >= -30 - target = root - } - } - } - random_pool_character = { - province = root.capital_province - limit = { - is_adult = yes - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } - martial >= medium_skill_rating - culture = root.culture - opinion = { # Just to make sure you don't pull in rivals or similar - value >= -30 - target = root - } - } - if = { - limit = { - NOT = { - has_trait = $SPECIALIST_TRAIT$ - } - } - add_trait = $SPECIALIST_TRAIT$ - } - random = { - chance = 50 - wanderer_give_random_commander_trait_effect = yes - } - save_scope_as = new_commander - } - } - else = { - create_character = { - employer = root - template = $SPECIALIST_TEMPLATE_CHARACTER$ - faith = root.faith - culture = root.culture - gender_female_chance = { - if = { - limit = { root.culture = { has_cultural_parameter = martial_custom_male_only_combatant } } - add = 0 - } - else_if = { - limit = { root.culture = { has_cultural_parameter = martial_custom_female_only_combatant } } - add = 100 - } - else = { - add = 50 - } - } - save_scope_as = new_commander - } - } - if = { # Error suppression - limit = { - exists = scope:new_commander - } - scope:new_commander = { - add_character_flag = { - flag = blocked_from_leaving - years = 25 - } - } - if = { - limit = { - scope:new_commander = { - NOT = { - is_courtier_of = root - } - } - } - add_courtier = scope:new_commander - } - send_interface_toast = { - title = commander_recruited.t - left_icon = scope:new_commander - custom_tooltip = commander_recruited.desc - } - } -} - -recruit_three_nomadic_capital_characters_effect = { - save_scope_as = root_scope - create_character = { - employer = scope:root_scope - template = $NOMAD_TEMPLATE_CHARACTER$ - faith = domicile.domicile_faith - culture = domicile.domicile_culture - save_scope_as = new_commander - } - if = { # Error suppression - limit = { - exists = scope:new_commander - } - scope:new_commander = { - assign_random_nickname_effect = yes - add_character_flag = { - flag = blocked_from_leaving - years = 25 - } - } - if = { - limit = { - scope:new_commander = { - NOT = { - is_courtier_of = scope:root_scope - } - } - } - add_courtier = scope:new_commander - } - send_interface_message = { - title = nomad_character_recruited.t - left_icon = scope:new_commander - custom_tooltip = commander_recruited.desc - } - } - create_character = { - employer = scope:root_scope - template = $NOMAD_TEMPLATE_CHARACTER$ - faith = domicile.domicile_faith - culture = domicile.domicile_culture - save_scope_as = new_commander - } - if = { # Error suppression - limit = { - exists = scope:new_commander - } - scope:new_commander = { - assign_random_nickname_effect = yes - add_character_flag = { - flag = blocked_from_leaving - years = 25 - } - } - if = { - limit = { - scope:new_commander = { - NOT = { - is_courtier_of = scope:root_scope - } - } - } - add_courtier = scope:new_commander - } - send_interface_message = { - title = nomad_character_recruited.t - left_icon = scope:new_commander - custom_tooltip = commander_recruited.desc - } - } - create_character = { - employer = scope:root_scope - template = $NOMAD_TEMPLATE_CHARACTER$ - faith = domicile.domicile_faith - culture = domicile.domicile_culture - save_scope_as = new_commander - } - if = { # Error suppression - limit = { - exists = scope:new_commander - } - scope:new_commander = { - assign_random_nickname_effect = yes - add_character_flag = { - flag = blocked_from_leaving - years = 25 - } - } - if = { - limit = { - scope:new_commander = { - NOT = { - is_courtier_of = scope:root_scope - } - } - } - add_courtier = scope:new_commander - } - send_interface_message = { - title = nomad_character_recruited.t - left_icon = scope:new_commander - custom_tooltip = commander_recruited.desc - } - } -} - -commander_trait_lvling_ai_effect = { - save_scope_as = root_scope - random_list = { - 1 = { - trigger = { has_trait = logistician } - add_trait_xp = { - trait = logistician - value = { - value = 100 - subtract = "scope:root_scope.has_trait_xp(logistician)" - divide = 100 - } - } - } - 1 = { - trigger = { has_trait = military_engineer } - add_trait_xp = { - trait = military_engineer - value = { - value = 100 - subtract = "scope:root_scope.has_trait_xp(military_engineer)" - divide = 100 - } - } - } - 1 = { - trigger = { has_trait = aggressive_attacker } - add_trait_xp = { - trait = aggressive_attacker - value = { - value = 100 - subtract = "scope:root_scope.has_trait_xp(aggressive_attacker)" - divide = 100 - } - } - } - 1 = { - trigger = { has_trait = unyielding_defender } - add_trait_xp = { - trait = unyielding_defender - value = { - value = 100 - subtract = "scope:root_scope.has_trait_xp(unyielding_defender)" - divide = 100 - } - } - } - 1 = { - trigger = { has_trait = forder } - add_trait_xp = { - trait = forder - value = { - value = 100 - subtract = "scope:root_scope.has_trait_xp(forder)" - divide = 100 - } - } - } - 1 = { - trigger = { has_trait = flexible_leader } - add_trait_xp = { - trait = flexible_leader - value = { - value = 100 - subtract = "scope:root_scope.has_trait_xp(flexible_leader)" - divide = 100 - } - } - } - 1 = { - trigger = { has_trait = desert_warrior } - add_trait_xp = { - trait = desert_warrior - value = { - value = 100 - subtract = "scope:root_scope.has_trait_xp(desert_warrior)" - divide = 100 - } - } - } - 1 = { - trigger = { has_trait = jungle_stalker } - add_trait_xp = { - trait = jungle_stalker - value = { - value = 100 - subtract = "scope:root_scope.has_trait_xp(jungle_stalker)" - divide = 100 - } - } - } - 1 = { - trigger = { has_trait = reaver } - add_trait_xp = { - trait = reaver - value = { - value = 100 - subtract = "scope:root_scope.has_trait_xp(reaver)" - divide = 100 - } - } - } - 1 = { - trigger = { has_trait = reckless } - add_trait_xp = { - trait = reckless - value = { - value = 100 - subtract = "scope:root_scope.has_trait_xp(reckless)" - divide = 100 - } - } - } - 1 = { - trigger = { has_trait = holy_warrior } - add_trait_xp = { - trait = holy_warrior - value = { - value = 100 - subtract = "scope:root_scope.has_trait_xp(holy_warrior)" - divide = 100 - } - } - } - 1 = { - trigger = { has_trait = open_terrain_expert } - add_trait_xp = { - trait = open_terrain_expert - value = { - value = 100 - subtract = "scope:root_scope.has_trait_xp(open_terrain_expert)" - divide = 100 - } - } - } - 1 = { - trigger = { has_trait = rough_terrain_expert } - add_trait_xp = { - trait = rough_terrain_expert - value = { - value = 100 - subtract = "scope:root_scope.has_trait_xp(rough_terrain_expert)" - divide = 100 - } - } - } - 1 = { - trigger = { has_trait = forest_fighter } - add_trait_xp = { - trait = forest_fighter - value = { - value = 100 - subtract = "scope:root_scope.has_trait_xp(forest_fighter)" - divide = 100 - } - } - } - 1 = { - trigger = { has_trait = cautious_leader } - add_trait_xp = { - trait = cautious_leader - value = { - value = 100 - subtract = "scope:root_scope.has_trait_xp(cautious_leader)" - divide = 100 - } - } - } - 1 = { - trigger = { has_trait = organizer } - add_trait_xp = { - trait = organizer - value = { - value = 100 - subtract = "scope:root_scope.has_trait_xp(organizer)" - divide = 100 - } - } - } - 1 = { - trigger = { has_trait = winter_soldier } - add_trait_xp = { - trait = winter_soldier - value = { - value = 100 - subtract = "scope:root_scope.has_trait_xp(winter_soldier)" - divide = 100 - } - } - } - } -} diff --git a/N3OW/common/scripted_effects/00_compliment_effects.txt b/N3OW/common/scripted_effects/00_compliment_effects.txt deleted file mode 100644 index dac857cf..00000000 --- a/N3OW/common/scripted_effects/00_compliment_effects.txt +++ /dev/null @@ -1,689 +0,0 @@ -#Effects used in Lifestyle Focus events - - -##################################################################### -# EFFECT LIST -##################################################################### -# !!! Remember to add all new effects with a short description here !!! -# - - -##################### -# COMPLIMENT SYSTEM # -##################### -#This system evaluates whether a character would accept a certain type of compliment (types listed below) from another character. It will set a compliment_outcome varaible with a flag value of either good, neutral or bad which can be used to trigger follow up events. - -#randomize_available_compliment_effect - as there are more compliment types than option buttons, you can use this effect to randomize a number of flags to trigger options (12 types of compliments). -#randomize_good_available_compliment_effect - this one will do its best to pick a good compliment option, recommended to use this one for at least one of the randomized options so that the player has at least one option which is likely to be successful. Defaults to randomize_available_compliment_effect if nothing good can be found. -#randomize_available_ai_value_compliment_effect - as the one above, but only uses the ai value compliments (8 types), the "light" version. -#clear_available_compliments_effect - clears all available compliment flags. -#evaluate_compliment_effect - evaluates the outcome of the compliment with a random_list and sets a compliment_outcome variable. -#evaluate_compliment_with_type_variable_effect - the same as the one above but also saves a variable containing the type of comliment used. - -#COMPLIMENT TYPES -#compassionate (ai value) -#bold (ai value) -#honorable (ai value) -#rational (ai value) -#zealous (ai value) -#energetic (ai value) -#forgiving (ai value) -#beautiful -#strong -#extroverted -#dominant - -#If you don't want to specify the available compliments, you can use this to get a selection relative to your root.diplomacy skill and your target's preferences. -#Run the effect as many times as the amount of compliment options you need. -#More diplomatically skilled characters has a higher chance to receive options which have a high likelihood of success. -#If you want to block a certain compliment, you can add that flag yourself before randomizing and then removing it afterwards. -#Use in scope of compliment giver. -#Needs arguments COMPLIMENT_RECEIVER -randomize_available_compliment_effect = { - random_list = { - 1 = { - trigger = { NOT = { has_character_flag = available_compliment_compassionate } } - modifier = { - factor = 3 - root.diplomacy >= decent_skill_rating - $COMPLIMENT_RECEIVER$ = { ai_compassion >= low_positive_compassion } - } - modifier = { - factor = 2 - root.diplomacy < medium_skill_rating - $COMPLIMENT_RECEIVER$ = { ai_compassion < 0 } - } - add_character_flag = available_compliment_compassionate - } - 1 = { - trigger = { NOT = { has_character_flag = available_compliment_bold } } - modifier = { - factor = 3 - root.diplomacy >= decent_skill_rating - $COMPLIMENT_RECEIVER$ = { ai_boldness >= low_positive_boldness } - } - modifier = { - factor = 2 - root.diplomacy < medium_skill_rating - $COMPLIMENT_RECEIVER$ = { ai_boldness < 0 } - } - add_character_flag = available_compliment_bold - } - 1 = { - trigger = { NOT = { has_character_flag = available_compliment_honorable } } - modifier = { - factor = 3 - root.diplomacy >= decent_skill_rating - $COMPLIMENT_RECEIVER$ = { ai_honor >= low_positive_honor } - } - modifier = { - factor = 2 - root.diplomacy < medium_skill_rating - $COMPLIMENT_RECEIVER$ = { ai_honor < 0 } - } - add_character_flag = available_compliment_honorable - } - 1 = { - trigger = { NOT = { has_character_flag = available_compliment_greedy } } - modifier = { - factor = 3 - root.diplomacy >= decent_skill_rating - $COMPLIMENT_RECEIVER$ = { ai_greed >= low_positive_greed } - } - modifier = { - factor = 2 - root.diplomacy < medium_skill_rating - $COMPLIMENT_RECEIVER$ = { ai_greed < 0 } - } - add_character_flag = available_compliment_greedy - } - 1 = { - trigger = { NOT = { has_character_flag = available_compliment_rational } } - modifier = { - factor = 3 - root.diplomacy >= decent_skill_rating - $COMPLIMENT_RECEIVER$ = { ai_rationality >= low_positive_rationality } - } - modifier = { - factor = 2 - root.diplomacy < medium_skill_rating - $COMPLIMENT_RECEIVER$ = { ai_rationality < 0 } - } - add_character_flag = available_compliment_rational - } - 1 = { - trigger = { NOT = { has_character_flag = available_compliment_zealous } } - modifier = { - factor = 3 - root.diplomacy >= decent_skill_rating - $COMPLIMENT_RECEIVER$ = { ai_zeal >= low_positive_zeal } - } - modifier = { - factor = 2 - root.diplomacy < medium_skill_rating - $COMPLIMENT_RECEIVER$ = { ai_zeal < 0 } - } - add_character_flag = available_compliment_zealous - } - 1 = { - trigger = { NOT = { has_character_flag = available_compliment_energetic } } - modifier = { - factor = 3 - root.diplomacy >= decent_skill_rating - $COMPLIMENT_RECEIVER$ = { ai_energy >= low_positive_energy } - } - modifier = { - factor = 2 - root.diplomacy < medium_skill_rating - $COMPLIMENT_RECEIVER$ = { ai_energy < 0 } - } - add_character_flag = available_compliment_energetic - } - 1 = { - trigger = { NOT = { has_character_flag = available_compliment_forgiving } } - modifier = { - factor = 3 - root.diplomacy >= decent_skill_rating - $COMPLIMENT_RECEIVER$ = { ai_vengefulness <= low_negative_vengefulness } - } - modifier = { - factor = 2 - root.diplomacy < medium_skill_rating - $COMPLIMENT_RECEIVER$ = { ai_vengefulness > 0 } - } - add_character_flag = available_compliment_forgiving - } - 1 = { - trigger = { NOT = { has_character_flag = available_compliment_beautiful } } - modifier = { - factor = 3 - root.diplomacy >= decent_skill_rating - $COMPLIMENT_RECEIVER$ = { attraction >= 10 } - } - modifier = { - factor = 2 - root.diplomacy < medium_skill_rating - $COMPLIMENT_RECEIVER$ = { attraction < -10 } - } - add_character_flag = available_compliment_beautiful - } - 1 = { - trigger = { NOT = { has_character_flag = available_compliment_strong } } - modifier = { - factor = 3 - root.diplomacy >= decent_skill_rating - $COMPLIMENT_RECEIVER$ = { - OR = { - has_trait = strong - has_trait = physique_good_1 - has_trait = physique_good_2 - has_trait = physique_good_3 - } - } - } - modifier = { - factor = 2 - root.diplomacy < medium_skill_rating - $COMPLIMENT_RECEIVER$ = { - OR = { - has_trait = weak - has_trait = physique_bad_1 - has_trait = physique_bad_2 - has_trait = physique_bad_3 - } - } - } - add_character_flag = available_compliment_strong - } - 1 = { - trigger = { NOT = { has_character_flag = available_compliment_extroverted } } - modifier = { - factor = 3 - root.diplomacy >= decent_skill_rating - $COMPLIMENT_RECEIVER$ = { has_personality_extroverted_trigger = yes } - } - modifier = { - factor = 2 - root.diplomacy < medium_skill_rating - $COMPLIMENT_RECEIVER$ = { has_personality_introverted_trigger = yes } - } - add_character_flag = available_compliment_extroverted - } - 1 = { - trigger = { NOT = { has_character_flag = available_compliment_dominant } } - modifier = { - factor = 3 - root.diplomacy >= decent_skill_rating - $COMPLIMENT_RECEIVER$ = { has_personality_dominant_trigger = yes } - } - modifier = { - factor = 2 - root.diplomacy < medium_skill_rating - $COMPLIMENT_RECEIVER$ = { has_personality_submissive_trigger = yes } - } - add_character_flag = available_compliment_dominant - } - } -} - -#Randomizes an available compliment which is likely to work, needs argument COMPLIMENT_RECEIVER. -randomize_good_available_compliment_effect = { - random_list = { - 100 = { - trigger = { - $COMPLIMENT_RECEIVER$ = { ai_compassion >= low_positive_compassion } - NOT = { has_character_flag = available_compliment_compassionate } - } - add_character_flag = available_compliment_compassionate - } - 100 = { - trigger = { - $COMPLIMENT_RECEIVER$ = { ai_boldness >= low_positive_boldness } - NOT = { has_character_flag = available_compliment_bold } - } - add_character_flag = available_compliment_bold - } - 100 = { - trigger = { - $COMPLIMENT_RECEIVER$ = { ai_honor >= low_positive_honor } - NOT = { has_character_flag = available_compliment_honorable } - } - add_character_flag = available_compliment_honorable - } - 100 = { - trigger = { - $COMPLIMENT_RECEIVER$ = { ai_greed >= low_positive_greed } - NOT = { has_character_flag = available_compliment_greedy } - } - add_character_flag = available_compliment_greedy - } - 100 = { - trigger = { - $COMPLIMENT_RECEIVER$ = { ai_rationality >= low_positive_rationality } - NOT = { has_character_flag = available_compliment_rational } - } - add_character_flag = available_compliment_rational - } - 100 = { - trigger = { - $COMPLIMENT_RECEIVER$ = { ai_zeal >= low_positive_zeal } - NOT = { has_character_flag = available_compliment_zealous } - } - add_character_flag = available_compliment_zealous - } - 100 = { - trigger = { - $COMPLIMENT_RECEIVER$ = { ai_energy >= low_positive_energy } - NOT = { has_character_flag = available_compliment_energetic } - } - add_character_flag = available_compliment_energetic - } - 100 = { - trigger = { - $COMPLIMENT_RECEIVER$ = { ai_vengefulness <= low_negative_vengefulness } - NOT = { has_character_flag = available_compliment_forgiving } - } - add_character_flag = available_compliment_forgiving - } - 100 = { - trigger = { - $COMPLIMENT_RECEIVER$ = { attraction >= 10 } - NOT = { has_character_flag = available_compliment_beautiful } - } - add_character_flag = available_compliment_beautiful - } - 100 = { - trigger = { - $COMPLIMENT_RECEIVER$ = { - OR = { - has_trait = strong - has_trait = physique_good - } - } - NOT = { has_character_flag = available_compliment_strong } - } - add_character_flag = available_compliment_strong - } - 100 = { - trigger = { - $COMPLIMENT_RECEIVER$ = { has_personality_extroverted_trigger = yes } - NOT = { has_character_flag = available_compliment_extroverted } - } - add_character_flag = available_compliment_extroverted - } - 100 = { - trigger = { - $COMPLIMENT_RECEIVER$ = { has_personality_dominant_trigger = yes } - NOT = { has_character_flag = available_compliment_dominant } - } - add_character_flag = available_compliment_dominant - } - 1 = { #Fallback - randomize_available_compliment_effect = { COMPLIMENT_RECEIVER = $COMPLIMENT_RECEIVER$ } - } - } -} - -#Same as randomize_available_compliment_effect but it only uses the 8 ai value compliments. Required argument COMPLIMENT_RECEIVER (not tested) -randomize_available_ai_value_compliment_effect = { - add_character_flag = available_compliment_beautiful - add_character_flag = available_compliment_strong - add_character_flag = available_compliment_extroverted - add_character_flag = available_compliment_dominant - - randomize_available_compliment_effect = { COMPLIMENT_RECEIVER = $COMPLIMENT_RECEIVER$ } - - remove_character_flag = available_compliment_beautiful - remove_character_flag = available_compliment_strong - remove_character_flag = available_compliment_extroverted - remove_character_flag = available_compliment_dominant -} - -#Clears all the compliment flags after the event -clear_available_compliments_effect = { - remove_character_flag = available_compliment_compassionate - remove_character_flag = available_compliment_bold - remove_character_flag = available_compliment_honorable - remove_character_flag = available_compliment_greedy - remove_character_flag = available_compliment_rational - remove_character_flag = available_compliment_zealous - remove_character_flag = available_compliment_energetic - remove_character_flag = available_compliment_forgiving - remove_character_flag = available_compliment_beautiful - remove_character_flag = available_compliment_strong - remove_character_flag = available_compliment_extroverted - remove_character_flag = available_compliment_dominant -} - -#EVALUATION -#Use in scope of compliment receiver. -#2 types, regular evaluate_compliment_effect and evaluate_compliment_with_type_variable_effect which saves the variable containing the type (evaluated_compliment_type) -#Needs arguments COMPLIMENT_TYPE (see compliment type list above) and COMPLIMENT_GIVER (the name of the scope). - -evaluate_compliment_effect = { - - save_scope_value_as = { - name = evaluated_compliment_type - value = flag:$COMPLIMENT_TYPE$ - } - - if = { - limit = { exists = scope:evaluated_compliment_type } #Because there are error messages otherwise - - random_list = { - # BAD OUTCOME - 0 = { # Base chance of 0, since we don't ever want to randomly penalize the player due to bad luck even if they picked the right compliment. - modifier = { - add = 100 #Incorrect type of compliment significantly increases chances of being insulted. - OR = { - AND = { - scope:evaluated_compliment_type = flag:compassionate - ai_compassion < 0 - } - AND = { - scope:evaluated_compliment_type = flag:bold - ai_boldness < 0 - } - AND = { - scope:evaluated_compliment_type = flag:honorable - ai_honor < 0 - } - AND = { - scope:evaluated_compliment_type = flag:greedy - ai_greed < 0 - } - AND = { - scope:evaluated_compliment_type = flag:rational - ai_rationality < 0 - } - AND = { - scope:evaluated_compliment_type = flag:zealous - ai_zeal < 0 - } - AND = { - scope:evaluated_compliment_type = flag:energetic - ai_energy < 0 - } - AND = { - scope:evaluated_compliment_type = flag:forgiving - ai_vengefulness > 0 - } - AND = { - scope:evaluated_compliment_type = flag:beautiful - attraction < -10 - } - AND = { - scope:evaluated_compliment_type = flag:strong - OR = { - has_trait = weak - has_trait = physique_bad_1 - has_trait = physique_bad_2 - has_trait = physique_bad_3 - } - } - AND = { - scope:evaluated_compliment_type = flag:extroverted - has_personality_introverted_trigger = yes - } - AND = { - scope:evaluated_compliment_type = flag:dominant - has_personality_submissive_trigger = yes - } - } - } - modifier = { #Humble people struggle with compliments - factor = 1.5 - has_trait = humble - } - - save_scope_value_as = { - name = compliment_outcome - value = flag:bad - } - } - - 60 = { #NEUTRAL OUTCOME - modifier = { - factor = 1.3 - has_trait = arrogant - } - modifier = { - factor = 1.3 - has_trait = humble - } - - save_scope_value_as = { - name = compliment_outcome - value = flag:neutral - } - } - - 25 = { #GOOD OUTCOME - modifier = { #Great compliment (not step-based) - factor = 8 - OR = { - AND = { - scope:evaluated_compliment_type = flag:extroverted - has_personality_extroverted_trigger = yes - } - AND = { - scope:evaluated_compliment_type = flag:dominant - has_personality_dominant_trigger = yes - } - } - } - modifier = { #Great compliment (step-based) - factor = 2 #Adds up to 8 with the two modifiers below - OR = { - AND = { - scope:evaluated_compliment_type = flag:compassionate - ai_compassion >= high_positive_compassion - } - AND = { - scope:evaluated_compliment_type = flag:bold - ai_boldness >= high_positive_boldness - } - AND = { - scope:evaluated_compliment_type = flag:honorable - ai_honor >= high_positive_honor - } - AND = { - scope:evaluated_compliment_type = flag:greedy - ai_greed >= high_positive_greed - } - AND = { - scope:evaluated_compliment_type = flag:rational - ai_rationality >= high_positive_rationality - } - AND = { - scope:evaluated_compliment_type = flag:zealous - ai_zeal >= high_positive_zeal - } - AND = { - scope:evaluated_compliment_type = flag:energetic - ai_energy >= high_positive_energy - } - AND = { - scope:evaluated_compliment_type = flag:forgiving - ai_vengefulness <= high_negative_vengefulness - } - AND = { - scope:evaluated_compliment_type = flag:beautiful - attraction >= 30 - } - AND = { - scope:evaluated_compliment_type = flag:strong - has_trait = physique_good_3 - } - } - } - modifier = { #Good compliment (step-based) - factor = 2 #Adds up to 4 with the modifier below - OR = { - AND = { - scope:evaluated_compliment_type = flag:compassionate - ai_compassion >= medium_positive_compassion - } - AND = { - scope:evaluated_compliment_type = flag:bold - ai_boldness >= medium_positive_boldness - } - AND = { - scope:evaluated_compliment_type = flag:honorable - ai_honor >= medium_positive_honor - } - AND = { - scope:evaluated_compliment_type = flag:greedy - ai_greed >= medium_positive_greed - } - AND = { - scope:evaluated_compliment_type = flag:rational - ai_rationality >= medium_positive_rationality - } - AND = { - scope:evaluated_compliment_type = flag:zealous - ai_zeal >= medium_positive_zeal - } - AND = { - scope:evaluated_compliment_type = flag:energetic - ai_energy >= medium_positive_energy - } - AND = { - scope:evaluated_compliment_type = flag:forgiving - ai_vengefulness <= medium_negative_vengefulness - } - AND = { - scope:evaluated_compliment_type = flag:beautiful - attraction >= 20 - } - AND = { - scope:evaluated_compliment_type = flag:strong - OR = { - has_trait = physique_good_2 - has_trait = physique_good_3 - has_trait = strong - } - } - } - } - modifier = { #Good compliment (step-based) - factor = 4 - OR = { - AND = { - scope:evaluated_compliment_type = flag:compassionate - ai_compassion >= low_positive_compassion - } - AND = { - scope:evaluated_compliment_type = flag:bold - ai_boldness >= low_positive_boldness - } - AND = { - scope:evaluated_compliment_type = flag:honorable - ai_honor >= low_positive_honor - } - AND = { - scope:evaluated_compliment_type = flag:greedy - ai_greed >= low_positive_greed - } - AND = { - scope:evaluated_compliment_type = flag:rational - ai_rationality >= low_positive_rationality - } - AND = { - scope:evaluated_compliment_type = flag:zealous - ai_zeal >= low_positive_zeal - } - AND = { - scope:evaluated_compliment_type = flag:energetic - ai_energy >= low_positive_energy - } - AND = { - scope:evaluated_compliment_type = flag:forgiving - ai_vengefulness <= low_negative_vengefulness - } - AND = { - scope:evaluated_compliment_type = flag:beautiful - attraction >= 10 - } - AND = { - scope:evaluated_compliment_type = flag:strong - OR = { - has_trait = physique_good_1 - has_trait = physique_good_2 - has_trait = physique_good_3 - has_trait = strong - } - } - } - } - modifier = { #Arrogant people like compliments - factor = 1.5 - has_trait = arrogant - } - modifier = { #Diplomacy affects success chance - factor = { - value = $COMPLIMENT_GIVER$.diplomacy - subtract = diplomacy - multiply = 0.05 #I.e. 0.5 if 10 skill difference - add = 1 #To bring it to something like 1.5 - } - } - - save_scope_value_as = { - name = compliment_outcome - value = flag:good - } - } - } - } -} - -compliment_to_love_letter_effect = { - if = { - limit = { exists = scope:compliment_outcome } - - if = { - limit = { scope:compliment_outcome = flag:good } - set_variable = { - name = love_letter_quality - value = 4 - days = 150 - } - } - else_if = { - limit = { scope:compliment_outcome = flag:neutral } - set_variable = { - name = love_letter_quality - value = 2 - days = 150 - } - } - else_if = { - limit = { scope:compliment_outcome = flag:bad } - set_variable = { - name = love_letter_quality - value = 1 - days = 150 - } - } - - set_variable = { - name = love_letter_compliment_type - value = scope:evaluated_compliment_type - } - } -} - -compliment_to_love_letter_cleanup_effect = { - if = { - limit = { has_variable = love_letter_quality } - remove_variable = love_letter_quality - } - if = { - limit = { has_variable = love_letter_quality } - remove_variable = love_letter_compliment_type - } -} - - - diff --git a/N3OW/common/scripted_effects/00_councillor_effects.txt b/N3OW/common/scripted_effects/00_councillor_effects.txt deleted file mode 100644 index be75fe17..00000000 --- a/N3OW/common/scripted_effects/00_councillor_effects.txt +++ /dev/null @@ -1,1032 +0,0 @@ - -##################################################################### -# EFFECT LIST -##################################################################### -# !!! Remember to add all new effects with a short description here !!! - -#got_council_position_effect: gives the corresponding opinion to the liege -#fired_from_council_position_effect: gives the corresponding opinion to the liege - -##################################################################### -# COUNCIL EFFECTS -##################################################################### - -got_council_position_effect = { - save_scope_as = new_councillor - # Travel Leaders can't be councillors, but should appear in the councillor list - if = { - limit = { has_court_position = travel_leader_court_position } - liege = { - revoke_court_position = { - recipient = scope:new_councillor - court_position = travel_leader_court_position - } - } - } - #If there is a fired opinion remove it - if = { - limit = { - has_opinion_modifier = { - modifier = fired_from_council_opinion - target = liege - } - } - remove_opinion = { - modifier = fired_from_council_opinion - target = liege - } - } - # No longer angry for losing court position - this is *better*! - if = { - limit = { - has_opinion_modifier = { - modifier = revoked_court_position_opinion - target = liege - } - } - remove_opinion = { - modifier = revoked_court_position_opinion - target = liege - } - } - - add_character_flag = is_in_the_council -} - -fired_from_council_position_effect = { - - add_opinion = { - modifier = fired_from_council_opinion - target = liege - } - - # If we're a clan this affects unity - #add_clan_unity_interaction_effect = { - # CHARACTER = root.liege - # TARGET = this - # VALUE = miniscule_unity_loss - # DESC = clan_unity_fired_from_council.desc - # REVERSE_NON_HOUSE_TARGET = no - #} - - remove_character_flag = is_in_the_council -} - -##################################################################### -# SPOUSE COUNCILLOR EFFECTS -##################################################################### - -councillor_spouse_learning_2601_tutoring_effect = { - $STUDENT$ = { save_scope_as = tutoring_student } - scope:tutoring_student = { - random_list = { - 20 = { #Critical success - modifier = { - has_education_rank_trigger = { RANK = 3 OPERATOR = equals } - factor = 0.6 - } - modifier = { - has_education_rank_trigger = { RANK = 4 OPERATOR = equals } - factor = 0.6 - } - modifier = { - root = { spouse_learning_tier_3_trigger = yes } - factor = 1.5 - } - desc = councillor_spouse_learning_2601_tutoring_effect.critical_success - root = { - send_interface_toast = { - type = event_toast_effect_good - title = councillor_spouse_learning_2601_tutoring_effect.critical_success - left_icon = scope:tutoring_student - right_icon = scope:councillor - scope:tutoring_student = { - rank_up_education_effect = yes - } - } - add_character_flag = { - flag = had_councillor_spouse_learning_2601_event - days = 7300 - } - } - - hidden_effect = { - if = { - limit = { scope:councillor != scope:tutoring_student } #Since the effect can be used on yourself. - scope:tutoring_student = { - add_opinion = { - target = scope:councillor - modifier = grateful_opinion - opinion = 15 - } - } - } - scope:councillor = { - if = { - limit = { scope:tutoring_student = { has_trait = education_diplomacy } } - add_character_modifier = { - modifier = studying_diplomacy - years = 10 - } - } - else_if = { - limit = { scope:tutoring_student = { has_trait = education_martial } } - add_character_modifier = { - modifier = studying_martial - years = 10 - } - } - else_if = { - limit = { scope:tutoring_student = { has_trait = education_stewardship } } - add_character_modifier = { - modifier = studying_stewardship - years = 10 - } - } - else_if = { - limit = { scope:tutoring_student = { has_trait = education_intrigue } } - add_character_modifier = { - modifier = studying_intrigue - years = 10 - } - } - else_if = { - limit = { scope:tutoring_student = { has_trait = education_learning } } - add_character_modifier = { - modifier = studying_learning - years = 10 - } - } - random_list = { - 1 = { set_nickname_effect = { NICKNAME = nick_the_scholar } } - 1 = { set_nickname_effect = { NICKNAME = nick_the_wise } } - 10 = { } - } - } - } - } - 55 = { #Success - desc = councillor_spouse_learning_2601_tutoring_effect.success - root = { - send_interface_toast = { - type = event_toast_effect_good - title = councillor_spouse_learning_2601_tutoring_effect.success - left_icon = scope:tutoring_student - right_icon = scope:councillor - scope:tutoring_student = { - if = { - limit = { has_trait = education_diplomacy } - add_character_modifier = { - modifier = studying_diplomacy - years = 10 - } - } - else_if = { - limit = { has_trait = education_martial } - add_character_modifier = { - modifier = studying_martial - years = 10 - } - } - else_if = { - limit = { has_trait = education_stewardship } - add_character_modifier = { - modifier = studying_stewardship - years = 10 - } - } - else_if = { - limit = { has_trait = education_intrigue } - add_character_modifier = { - modifier = studying_intrigue - years = 10 - } - } - else_if = { - limit = { has_trait = education_learning } - add_character_modifier = { - modifier = studying_learning - years = 10 - } - } - add_character_flag = { - flag = had_councillor_spouse_learning_2601_event - days = 3650 - } - } - } - } - hidden_effect = { - if = { - limit = { - scope:tutoring_student != scope:councillor #Since the effect can be used on yourself. - } - scope:tutoring_student = { - add_opinion = { - target = scope:councillor - modifier = grateful_opinion - opinion = 10 - } - } - } - } - } - } - } -} - -councillor_spouse_learning_2603_scopes_for_portraits_support_effect = { - if = { - limit = { exists = scope:councillor_2 } - save_scope_as = councillor_3 - } - else_if = { - limit = { exists = scope:councillor_1 } - save_scope_as = councillor_2 - } - else = { - save_scope_as = councillor_1 - } -} - -councillor_spouse_learning_2603_scopes_for_portraits_effect = { - if = { - limit = { is_ai = no } - - #Saves the (up to) 3 chosen chancellors for portraits. Set up like this to make sure the options and portraits are in the same order. - if = { - limit = { exists = scope:chancellor } - scope:chancellor = { councillor_spouse_learning_2603_scopes_for_portraits_support_effect = yes } - } - if = { - limit = { exists = scope:marshal } - scope:marshal = { councillor_spouse_learning_2603_scopes_for_portraits_support_effect = yes } - } - if = { - limit = { exists = scope:steward } - scope:steward = { councillor_spouse_learning_2603_scopes_for_portraits_support_effect = yes } - } - if = { - limit = { exists = scope:spymaster } - scope:spymaster = { councillor_spouse_learning_2603_scopes_for_portraits_support_effect = yes } - } - if = { - limit = { exists = scope:court_chaplain } - scope:court_chaplain = { councillor_spouse_learning_2603_scopes_for_portraits_support_effect = yes } - } - } -} - -councillor_spouse_learning_2603_scope_save_effect = { - if = { - limit = { - any_normal_councillor = { - councillor_spouse_learning_2603_valid_councillor_trigger = yes - NOR = { - AND = { - exists = scope:chancellor - this = scope:chancellor - } - AND = { - exists = scope:marshal - this = scope:marshal - } - AND = { - exists = scope:steward - this = scope:steward - } - AND = { - exists = scope:spymaster - this = scope:spymaster - } - AND = { - exists = scope:court_chaplain - this = scope:court_chaplain - } - } - } - } - random_list = { - 1 = { - trigger = { - exists = cp:councillor_chancellor - cp:councillor_chancellor = { councillor_spouse_learning_2603_valid_councillor_trigger = yes } - NOT = { exists = scope:chancellor } - } - modifier = { - cp:councillor_chancellor = { diplomacy <= mediocre_skill_rating } - factor = 3 - } - cp:councillor_chancellor = { save_scope_as = chancellor } - } - 1 = { - trigger = { - exists = cp:councillor_marshal - cp:councillor_marshal = { councillor_spouse_learning_2603_valid_councillor_trigger = yes } - NOT = { exists = scope:marshal } - } - modifier = { - cp:councillor_marshal = { martial <= mediocre_skill_rating } - factor = 3 - } - cp:councillor_marshal = { save_scope_as = marshal } - } - 1 = { - trigger = { - exists = cp:councillor_steward - cp:councillor_steward = { councillor_spouse_learning_2603_valid_councillor_trigger = yes } - NOT = { exists = scope:steward } - } - modifier = { - cp:councillor_steward = { stewardship <= mediocre_skill_rating } - factor = 3 - } - cp:councillor_steward = { save_scope_as = steward } - } - 1 = { - trigger = { - exists = cp:councillor_spymaster - cp:councillor_spymaster = { councillor_spouse_learning_2603_valid_councillor_trigger = yes } - NOT = { exists = scope:spymaster } - } - modifier = { - cp:councillor_spymaster = { intrigue <= mediocre_skill_rating } - factor = 3 - } - cp:councillor_spymaster = { save_scope_as = spymaster } - } - 1 = { - trigger = { - exists = cp:councillor_court_chaplain - cp:councillor_court_chaplain = { councillor_spouse_learning_2603_valid_councillor_trigger = yes } - NOT = { exists = scope:court_chaplain } - } - modifier = { - cp:councillor_court_chaplain = { learning <= mediocre_skill_rating } - factor = 3 - } - cp:councillor_court_chaplain = { save_scope_as = court_chaplain } - } - } - } -} - -councillor_spouse_learning_2603_chosen_councillor_effect = { - if = { - limit = { - OR = { - has_trait = humble - has_trait = calm - has_trait = diligent - has_trait = trusting - has_trait = compassionate - has_trait = forgiving - has_trait = content - } - NOT = { - has_trait = arrogant - } - } - add_opinion = { - target = root - modifier = grateful_opinion - opinion = 15 - } - hidden_effect = { - add_opinion = { - target = scope:councillor - modifier = grateful_opinion - opinion = 15 - } - } - } - else = { - add_opinion = { - target = root - modifier = insult_opinion - opinion = -15 - } - } -} - -add_patronage_spouse_education_points_effect = { - if = { - limit = { - exists = host.cp:councillor_spouse - } - host.cp:councillor_spouse = { save_scope_as = councillor } - if = { - limit ={ - spouse_learning_tier_1_trigger = yes - has_education_focus_trigger = yes - trigger_if = { - limit = { - has_variable = patronage_spouse_tutor - } - var:patronage_spouse_tutor = scope:councillor - } - } - save_scope_as = patronage_student - random = { - chance = 7 - modifier = { - add = 7 #14% - host = { spouse_learning_tier_2_trigger = yes } - } - modifier = { - add = 7 #21% - host = { spouse_learning_tier_3_trigger = yes } - } - modifier = { - NOR = { - is_child_of = scope:councillor - reverse_opinion = { - target = scope:councillor - value >= 25 - } - } - add = -5 - } - modifier = { - reverse_opinion = { - target = scope:councillor - value >= 50 - } - add = 5 - } - modifier = { - NOT = { is_child_of = scope:councillor } - any_parent = { is_spouse_of = scope:councillor } - OR = { - has_trait = bastard - has_trait = legitimized_bastard - } - scope:councillor = { - NOR = { - ai_compassion >= high_positive_ai_value - opinion = { target = scope:patronage_student value >= 50 } - } - } - add = -20 - } - - if = { - limit = { - has_variable = patronage_spouse_tutor - has_variable = patronage_spouse_tutor_points - } - change_variable = { - name = patronage_spouse_tutor_points - add = 1 - } - } - else = { - set_variable = { - name = patronage_spouse_tutor - value = scope:councillor - days = 5475 - } - set_variable = { - name = patronage_spouse_tutor_points - value = 1 - days = 5475 - } - } - host = { - save_scope_as = host - if = { - limit = { - any_child = { this = scope:patronage_student } - } - send_interface_message = { - type = msg_spouse_patronage - title = add_patronage_spouse_education_points_effect.t - desc = add_patronage_spouse_education_points_child_effect.desc - left_icon = scope:patronage_student - right_icon = scope:councillor - } - } - else_if = { - limit = { - player_heir ?= { this = scope:patronage_student } - } - send_interface_message = { - type = msg_spouse_patronage - title = add_patronage_spouse_education_points_effect.t - desc = add_patronage_spouse_education_points_effect.desc - left_icon = scope:patronage_student - right_icon = scope:councillor - } - } - } - } - } - } -} - -results_of_patronage_spouse_education_points_effect = { - if = { - limit = { has_variable = patronage_spouse_tutor } - - var:patronage_spouse_tutor = { - save_scope_as = patronage_spouse_tutor - } - - #Checks their current level - if = { - limit = { education_points_equals_education_rank = { RANK = 1 } } - save_scope_value_as = { - name = education_rank_before_patronage - value = 1 - } - } - else_if = { - limit = { education_points_equals_education_rank = { RANK = 2 } } - save_scope_value_as = { - name = education_rank_before_patronage - value = 2 - } - } - else_if = { - limit = { education_points_equals_education_rank = { RANK = 3 } } - save_scope_value_as = { - name = education_rank_before_patronage - value = 3 - } - } - else_if = { - limit = { education_points_equals_education_rank = { RANK = 4 } } - save_scope_value_as = { - name = education_rank_before_patronage - value = 4 - } - } - #Adding the points to the current education - if = { - limit = { has_focus = education_diplomacy } - change_variable = { - name = education_diplomacy_variable - add = var:patronage_spouse_tutor_points - } - } - else_if = { - limit = { has_focus = education_martial } - change_variable = { - name = education_martial_variable - add = var:patronage_spouse_tutor_points - } - } - else_if = { - limit = { has_focus = education_stewardship } - change_variable = { - name = education_stewardship_variable - add = var:patronage_spouse_tutor_points - } - } - else_if = { - limit = { has_focus = education_intrigue } - change_variable = { - name = education_intrigue_variable - add = var:patronage_spouse_tutor_points - } - } - else_if = { - limit = { has_focus = education_learning } - change_variable = { - name = education_learning_variable - add = var:patronage_spouse_tutor_points - } - } - - #Checks their new level - if = { - limit = { education_points_equals_education_rank = { RANK = 1 } } - save_scope_value_as = { - name = education_rank_after_patronage - value = 1 - } - } - else_if = { - limit = { education_points_equals_education_rank = { RANK = 2 } } - save_scope_value_as = { - name = education_rank_after_patronage - value = 2 - } - } - else_if = { - limit = { education_points_equals_education_rank = { RANK = 3 } } - save_scope_value_as = { - name = education_rank_after_patronage - value = 3 - } - } - else_if = { - limit = { education_points_equals_education_rank = { RANK = 4 } } - save_scope_value_as = { - name = education_rank_after_patronage - value = 4 - } - } - - #Sets flag for result - if = { - limit = { - exists = scope:education_rank_before_patronage - exists = scope:education_rank_after_patronage - } - if = { - limit = { #+1 - OR = { - AND = { - scope:education_rank_before_patronage = 1 - scope:education_rank_after_patronage = 2 - } - AND = { - scope:education_rank_before_patronage = 2 - scope:education_rank_after_patronage = 3 - } - AND = { - scope:education_rank_before_patronage = 3 - scope:education_rank_after_patronage = 4 - } - } - } - save_scope_value_as = { - name = education_rank_patronage_bonus - value = flag:1 - } - } - else_if = { #+2 or more - limit = { scope:education_rank_after_patronage != scope:education_rank_before_patronage } - save_scope_value_as = { - name = education_rank_patronage_bonus - value = flag:2_or_more - } - } - } - - if = { - limit = { - exists = scope:education_rank_patronage_bonus - scope:education_rank_patronage_bonus = flag:1 - scope:education_rank_patronage_bonus = flag:2_or_more - } - } - - if = { - limit = { - has_variable = patronage_spouse_tutor_points - } - remove_variable = patronage_spouse_tutor_points - } - #Got to keep the tutor var for now, but it is automatically cleared with time - } -} - -block_firing_councillor_effect = { - set_variable = { - name = block_fire_councillor - value = $COURT_OWNER$ - years = council_position_locked_value - } -} - -block_hiring_councillor_effect = { - set_variable = { - name = block_hire_councillor - value = $COURT_OWNER$ - years = council_position_locked_value - } -} - -unblock_firing_councillor_effect = { - remove_variable = block_fire_councillor -} - -councillor_leaving_effect = { - if = { - limit = { - NOT = { is_councillor_of = scope:old_employer } - scope:old_employer = { government_allows = council } - } - scope:councillor = { - # Councillor leaving because of marriage - if = { - limit = { - is_playable_character = no - is_married = yes - primary_spouse = { is_playable_character = yes } - } - scope:old_employer = { - send_interface_message = { - type = msg_left_council_position - title = councillor_leaving_court_message_title - desc = councillor_leaving_court_marriage_notification - left_icon = scope:councillor - right_icon = scope:councillor.primary_spouse - } - } - } - # Councillor leaving because of title inheritance - else_if = { - limit = { - is_playable_character = yes - NOT = { is_vassal_of = scope:old_employer } - } - scope:old_employer = { - send_interface_message = { - type = msg_left_council_position - title = councillor_leaving_court_message_title - desc = councillor_leaving_court_landed_notification - left_icon = scope:councillor - right_icon = scope:councillor.primary_title - } - } - } - # Generic fallback - else = { - scope:old_employer = { - send_interface_message = { - type = msg_left_council_position - title = councillor_leaving_court_message_title - desc = councillor_leaving_court_generic_fallback_notification - left_icon = scope:councillor - } - } - } - } - } -} - -councillor_increase_relevant_skill_effect = { - switch = { - trigger = has_council_position - councillor_chancellor = { add_diplomacy_skill = 1 } - councillor_court_chaplain = { add_learning_skill = 1 } - councillor_marshal = { add_martial_skill = 1 } - councillor_steward = { add_stewardship_skill = 1 } - councillor_spymaster = { add_intrigue_skill = 1 } - councillor_kurultai_1 = { add_martial_skill = 1 } - councillor_kurultai_2 = { add_martial_skill = 1 } - councillor_kurultai_3 = { add_martial_skill = 1 } - councillor_kurultai_4 = { add_martial_skill = 1 } - } -} - -councillor_increase_relevant_skill_five_points_effect = { - switch = { - trigger = has_council_position - councillor_chancellor = { add_diplomacy_skill = 5 } - councillor_court_chaplain = { add_learning_skill = 5 } - councillor_marshal = { add_martial_skill = 5 } - councillor_steward = { add_stewardship_skill = 5 } - councillor_spymaster = { add_intrigue_skill = 5 } - councillor_kurultai_1 = { add_martial_skill = 5 } - councillor_kurultai_2 = { add_martial_skill = 5 } - councillor_kurultai_3 = { add_martial_skill = 5 } - councillor_kurultai_4 = { add_martial_skill = 5 } - } -} - -councillor_increase_relevant_skill_two_points_effect = { - switch = { - trigger = has_council_position - councillor_chancellor = { add_diplomacy_skill = 2 } - councillor_court_chaplain = { add_learning_skill = 2 } - councillor_marshal = { add_martial_skill = 2 } - councillor_steward = { add_stewardship_skill = 2 } - councillor_spymaster = { add_intrigue_skill = 2 } - councillor_kurultai_1 = { add_martial_skill = 2 } - councillor_kurultai_2 = { add_martial_skill = 2 } - councillor_kurultai_3 = { add_martial_skill = 2 } - councillor_kurultai_4 = { add_martial_skill = 2 } - } -} - -assign_appropriate_councillor_position_effect = { - if = { - limit = { - $CHARACTER$ = { highest_skill = diplomacy } - } - if = { - limit = { exists = cp:councillor_chancellor } - fire_councillor = cp:councillor_chancellor - } - assign_councillor_type = { - type = councillor_chancellor - target = $CHARACTER$ - } - } - else_if = { - limit = { - $CHARACTER$ = { highest_skill = intrigue } - } - if = { - limit = { exists = cp:councillor_spymaster } - fire_councillor = cp:councillor_spymaster - } - assign_councillor_type = { - type = councillor_spymaster - target = $CHARACTER$ - } - } - else_if = { - limit = { - $CHARACTER$ = { highest_skill = stewardship } - } - if = { - limit = { exists = cp:councillor_steward } - fire_councillor = cp:councillor_steward - } - assign_councillor_type = { - type = councillor_steward - target = $CHARACTER$ - } - } - else_if = { - limit = { - $CHARACTER$ = { highest_skill = martial } - } - if = { - limit = { exists = cp:councillor_marshal } - fire_councillor = cp:councillor_marshal - } - assign_councillor_type = { - type = councillor_marshal - target = $CHARACTER$ - } - } - else_if = { - limit = { - $CHARACTER$ = { highest_skill = learning } - faith = { - has_doctrine = doctrine_theocracy_temporal - } - } - if = { - limit = { exists = cp:councillor_court_chaplain } - fire_councillor = cp:councillor_court_chaplain - } - assign_councillor_type = { - type = councillor_court_chaplain - target = $CHARACTER$ - } - } - else = { - if = { - limit = { exists = cp:councillor_chancellor } - fire_councillor = cp:councillor_chancellor - } - assign_councillor_type = { # Fallback, mostly for faiths that don't allow Chaplain appointment - type = councillor_chancellor - target = $CHARACTER$ - } - } -} - -make_councillor_kurultai_effect = { - if = { - limit = { # bruh - is_kurultai_trigger = no - } - - if = { - limit = { - can_be_kurultai_trigger = { - COURT_OWNER = root.liege_or_court_owner - CP1 = councillor_kurultai_2 - CP2 = councillor_kurultai_3 - CP3 = councillor_kurultai_4 - } - } - assign_councillor_type = { - type = councillor_kurultai_1 - remove_existing_councillor = yes - target = root - } - } - else_if = { - limit = { - can_be_kurultai_trigger = { - COURT_OWNER = root.liege_or_court_owner - CP1 = councillor_kurultai_1 - CP2 = councillor_kurultai_3 - CP3 = councillor_kurultai_4 - } - } - assign_councillor_type = { - type = councillor_kurultai_2 - remove_existing_councillor = yes - target = root - } - } - else_if = { - limit = { - can_be_kurultai_trigger = { - COURT_OWNER = root.liege_or_court_owner - CP1 = councillor_kurultai_1 - CP2 = councillor_kurultai_2 - CP3 = councillor_kurultai_4 - } - } - assign_councillor_type = { - type = councillor_kurultai_3 - remove_existing_councillor = yes - target = root - } - } - else_if = { - limit = { - can_be_kurultai_trigger = { - COURT_OWNER = root.liege_or_court_owner - CP1 = councillor_kurultai_1 - CP2 = councillor_kurultai_2 - CP3 = councillor_kurultai_3 - } - } - assign_councillor_type = { - type = councillor_kurultai_4 - remove_existing_councillor = yes - target = root - } - } - } -} - -make_councillor_start_up_effect = { - save_scope_as = new_councillor - liege_or_court_owner = { - if = { - limit = { - NOT = { exists = cp:councillor_kurultai_1 } - scope:new_councillor = { - can_be_kurultai_trigger = { - COURT_OWNER = scope:new_councillor.liege_or_court_owner - CP1 = councillor_kurultai_2 - CP2 = councillor_kurultai_3 - CP3 = councillor_kurultai_4 - } - } - } - assign_councillor_type = { - type = councillor_kurultai_1 - remove_existing_councillor = yes - target = scope:new_councillor - } - } - else_if = { - limit = { - NOT = { exists = cp:councillor_kurultai_2 } - scope:new_councillor = { - can_be_kurultai_trigger = { - COURT_OWNER = scope:new_councillor.liege_or_court_owner - CP1 = councillor_kurultai_1 - CP2 = councillor_kurultai_3 - CP3 = councillor_kurultai_4 - } - } - } - assign_councillor_type = { - type = councillor_kurultai_2 - remove_existing_councillor = yes - target = scope:new_councillor - } - } - else_if = { - limit = { - NOT = { exists = cp:councillor_kurultai_3 } - scope:new_councillor = { - can_be_kurultai_trigger = { - COURT_OWNER = scope:new_councillor.liege_or_court_owner - CP1 = councillor_kurultai_1 - CP2 = councillor_kurultai_2 - CP3 = councillor_kurultai_4 - } - } - } - assign_councillor_type = { - type = councillor_kurultai_3 - remove_existing_councillor = yes - target = scope:new_councillor - } - } - else_if = { - limit = { - NOT = { exists = cp:councillor_kurultai_4 } - scope:new_councillor = { - can_be_kurultai_trigger = { - COURT_OWNER = scope:new_councillor.liege_or_court_owner - CP1 = councillor_kurultai_1 - CP2 = councillor_kurultai_2 - CP3 = councillor_kurultai_3 - } - } - } - assign_councillor_type = { - type = councillor_kurultai_4 - remove_existing_councillor = yes - target = scope:new_councillor - } - } - } -} diff --git a/N3OW/common/scripted_effects/00_county_corruption_effects.txt b/N3OW/common/scripted_effects/00_county_corruption_effects.txt deleted file mode 100644 index 03f59699..00000000 --- a/N3OW/common/scripted_effects/00_county_corruption_effects.txt +++ /dev/null @@ -1,2279 +0,0 @@ - -##################################################################### -# EFFECT LIST -##################################################################### - -# add_random_county_corruption_modifier_effect - Adds a random CC modifier the County does not already have -# remove_random_county_corruption_modifier_effect - Removes a random CC the County has - -##################################################################### -# EFFECTS -##################################################################### - - -add_inefficient_tax_collection_modifier_effect = { - save_scope_as = county - holder = { - send_interface_message = { - type = msg_county_corruption_bad - title = { - first_valid = { - triggered_desc = { - trigger = { exists = scope:deficit } - desc = gain_county_corruption.message.deficit - } - triggered_desc = { - trigger = { exists = scope:low_control } - desc = gain_county_corruption.message.low_control - } - desc = gain_county_corruption.message.county_corruption - } - } - left_icon = scope:county - scope:county = { - add_county_modifier = { - modifier = county_corruption_inefficient_tax_collection_modifier - years = 10 - } - } - } - } -} - -add_deserting_levies_modifier_effect = { - save_scope_as = county - holder = { - send_interface_message = { - type = msg_county_corruption_bad - title = { - first_valid = { - triggered_desc = { - trigger = { exists = scope:deficit } - desc = gain_county_corruption.message.deficit - } - triggered_desc = { - trigger = { exists = scope:low_control } - desc = gain_county_corruption.message.low_control - } - desc = gain_county_corruption.message.county_corruption - } - } - left_icon = scope:county - scope:county = { - add_county_modifier = { - modifier = county_corruption_deserting_levies_modifier - years = 10 - } - } - } - } -} - -add_smuggling_ring_modifier_effect = { - save_scope_as = county - holder = { - send_interface_message = { - type = msg_county_corruption_bad - title = { - first_valid = { - triggered_desc = { - trigger = { exists = scope:deficit } - desc = gain_county_corruption.message.deficit - } - triggered_desc = { - trigger = { exists = scope:low_control } - desc = gain_county_corruption.message.low_control - } - desc = gain_county_corruption.message.county_corruption - } - } - left_icon = scope:county - scope:county = { - add_county_modifier = { - modifier = county_corruption_smuggling_ring_modifier - years = 10 - } - } - } - } -} - -add_bandits_rampant_modifier_effect = { - save_scope_as = county - holder = { - send_interface_message = { - type = msg_county_corruption_bad - title = { - first_valid = { - triggered_desc = { - trigger = { exists = scope:deficit } - desc = gain_county_corruption.message.deficit - } - triggered_desc = { - trigger = { exists = scope:low_control } - desc = gain_county_corruption.message.low_control - } - desc = gain_county_corruption.message.county_corruption - } - } - left_icon = scope:county - scope:county = { - add_county_modifier = { - modifier = county_corruption_bandits_rampant_modifier - years = 10 - } - } - } - } -} - -add_inefficient_census_modifier_effect = { - save_scope_as = county - holder = { - send_interface_message = { - type = msg_county_corruption_bad - title = { - first_valid = { - triggered_desc = { - trigger = { exists = scope:deficit } - desc = gain_county_corruption.message.deficit - } - triggered_desc = { - trigger = { exists = scope:low_control } - desc = gain_county_corruption.message.low_control - } - desc = gain_county_corruption.message.county_corruption - } - } - left_icon = scope:county - scope:county = { - add_county_modifier = { - modifier = county_corruption_inefficient_census_modifier - years = 10 - } - } - } - } -} - -add_lack_of_sheriffs_modifier_effect = { - save_scope_as = county - holder = { - send_interface_message = { - type = msg_county_corruption_bad - title = { - first_valid = { - triggered_desc = { - trigger = { exists = scope:deficit } - desc = gain_county_corruption.message.deficit - } - triggered_desc = { - trigger = { exists = scope:low_control } - desc = gain_county_corruption.message.low_control - } - desc = gain_county_corruption.message.county_corruption - } - } - left_icon = scope:county - scope:county = { - add_county_modifier = { - modifier = county_corruption_lack_of_sheriffs_modifier - years = 10 - } - } - } - } -} - -add_lack_of_courts_modifier_effect = { - save_scope_as = county - holder = { - send_interface_message = { - type = msg_county_corruption_bad - title = { - first_valid = { - triggered_desc = { - trigger = { exists = scope:deficit } - desc = gain_county_corruption.message.deficit - } - triggered_desc = { - trigger = { exists = scope:low_control } - desc = gain_county_corruption.message.low_control - } - desc = gain_county_corruption.message.county_corruption - } - } - left_icon = scope:county - scope:county = { - add_county_modifier = { - modifier = county_corruption_lack_of_courts_modifier - years = 10 - } - } - } - } -} - -add_thieves_guild_modifier_effect = { - save_scope_as = county - holder = { - send_interface_message = { - type = msg_county_corruption_bad - title = { - first_valid = { - triggered_desc = { - trigger = { exists = scope:deficit } - desc = gain_county_corruption.message.deficit - } - triggered_desc = { - trigger = { exists = scope:low_control } - desc = gain_county_corruption.message.low_control - } - desc = gain_county_corruption.message.county_corruption - } - } - left_icon = scope:county - scope:county = { - add_county_modifier = { - modifier = county_corruption_thieves_guild_modifier - years = 10 - } - } - } - } -} - -add_unsafe_highways_modifier_effect = { - save_scope_as = county - holder = { - send_interface_message = { - type = msg_county_corruption_bad - title = { - first_valid = { - triggered_desc = { - trigger = { exists = scope:deficit } - desc = gain_county_corruption.message.deficit - } - triggered_desc = { - trigger = { exists = scope:low_control } - desc = gain_county_corruption.message.low_control - } - desc = gain_county_corruption.message.county_corruption - } - } - left_icon = scope:county - scope:county = { - add_county_modifier = { - modifier = county_corruption_unsafe_highways_modifier - years = 10 - } - } - } - } -} - -add_uncooperative_guilds_modifier_effect = { - save_scope_as = county - holder = { - send_interface_message = { - type = msg_county_corruption_bad - title = { - first_valid = { - triggered_desc = { - trigger = { exists = scope:deficit } - desc = gain_county_corruption.message.deficit - } - triggered_desc = { - trigger = { exists = scope:low_control } - desc = gain_county_corruption.message.low_control - } - desc = gain_county_corruption.message.county_corruption - } - } - left_icon = scope:county - scope:county = { - add_county_modifier = { - modifier = county_corruption_uncooperative_guilds_modifier - years = 10 - } - } - } - } -} - -add_lackluster_administration_modifier_effect = { - save_scope_as = county - holder = { - send_interface_message = { - type = msg_county_corruption_bad - title = { - first_valid = { - triggered_desc = { - trigger = { exists = scope:deficit } - desc = gain_county_corruption.message.deficit - } - desc = gain_county_corruption.message.county_corruption - } - } - left_icon = scope:county - scope:county = { - add_county_modifier = { - modifier = county_corruption_lackluster_administration_modifier - years = 10 - } - } - } - } -} - -add_roaming_bandits_modifier_effect = { - save_scope_as = county - holder = { - send_interface_message = { - type = msg_county_corruption_bad - title = { - first_valid = { - triggered_desc = { - trigger = { exists = scope:deficit } - desc = gain_county_corruption.message.deficit - } - desc = gain_county_corruption.message.county_corruption - } - } - left_icon = scope:county - scope:county = { - add_county_modifier = { - modifier = county_corruption_roaming_bandits_modifier - years = 10 - } - } - } - } -} - -add_wild_beast_attacks_modifier_effect = { - save_scope_as = county - holder = { - send_interface_message = { - type = msg_county_corruption_bad - title = { - first_valid = { - triggered_desc = { - trigger = { exists = scope:deficit } - desc = gain_county_corruption.message.deficit - } - desc = gain_county_corruption.message.county_corruption - } - } - left_icon = scope:county - scope:county = { - add_county_modifier = { - modifier = county_corruption_wild_beast_attacks_modifier - years = 10 - } - } - } - } -} - -add_upset_shepherds_modifier_effect = { - save_scope_as = county - holder = { - send_interface_message = { - type = msg_county_corruption_bad - title = { - first_valid = { - triggered_desc = { - trigger = { exists = scope:deficit } - desc = gain_county_corruption.message.deficit - } - desc = gain_county_corruption.message.county_corruption - } - } - left_icon = scope:county - scope:county = { - add_county_modifier = { - modifier = county_corruption_upset_shepherds_modifier - years = 10 - } - } - } - } -} - -add_rogue_warriors_modifier_effect = { - save_scope_as = county - holder = { - send_interface_message = { - type = msg_county_corruption_bad - title = { - first_valid = { - triggered_desc = { - trigger = { exists = scope:deficit } - desc = gain_county_corruption.message.deficit - } - desc = gain_county_corruption.message.county_corruption - } - } - left_icon = scope:county - scope:county = { - add_county_modifier = { - modifier = county_corruption_rogue_warriors_modifier - years = 10 - } - } - } - } -} - -add_unruly_nomads_modifier_effect = { - save_scope_as = county - holder = { - send_interface_message = { - type = msg_county_corruption_bad - title = { - first_valid = { - triggered_desc = { - trigger = { exists = scope:deficit } - desc = gain_county_corruption.message.deficit - } - desc = gain_county_corruption.message.county_corruption - } - } - left_icon = scope:county - scope:county = { - add_county_modifier = { - modifier = county_corruption_unruly_nomads_modifier - years = 10 - } - } - } - } -} - - -#Use this for random addition of County Corruption, APART from Low Control -add_random_county_corruption_modifier_effect = { - random_list = { - 100 = { - trigger = { - NOR = { - has_county_modifier = county_corruption_inefficient_tax_collection_modifier - title_province = { has_holding_type = nomad_holding } - title_province = { has_holding_type = herder_holding } - } - is_landless_type_title = no - } - add_inefficient_tax_collection_modifier_effect = yes - } - 100 = { - trigger = { - NOR = { - has_county_modifier = county_corruption_deserting_levies_modifier - title_province = { has_holding_type = nomad_holding } - title_province = { has_holding_type = herder_holding } - } - is_landless_type_title = no - } - add_deserting_levies_modifier_effect = yes - } - 100 = { - trigger = { - NOR = { - has_county_modifier = county_corruption_smuggling_ring_modifier - title_province = { has_holding_type = nomad_holding } - title_province = { has_holding_type = herder_holding } - } - is_landless_type_title = no - } - add_smuggling_ring_modifier_effect = yes - } - 100 = { - trigger = { - NOR = { - has_county_modifier = county_corruption_bandits_rampant_modifier - title_province = { has_holding_type = nomad_holding } - title_province = { has_holding_type = herder_holding } - } - is_landless_type_title = no - } - add_bandits_rampant_modifier_effect = yes - } - 100 = { - trigger = { - NOR = { - has_county_modifier = county_corruption_inefficient_census_modifier - title_province = { has_holding_type = nomad_holding } - title_province = { has_holding_type = herder_holding } - } - is_landless_type_title = no - } - add_inefficient_census_modifier_effect = yes - } - 100 = { - trigger = { - NOR = { - has_county_modifier = county_corruption_lack_of_sheriffs_modifier - title_province = { has_holding_type = nomad_holding } - title_province = { has_holding_type = herder_holding } - } - is_landless_type_title = no - } - add_lack_of_sheriffs_modifier_effect = yes - } - 100 = { - trigger = { - NOR = { - has_county_modifier = county_corruption_lack_of_courts_modifier - title_province = { has_holding_type = nomad_holding } - title_province = { has_holding_type = herder_holding } - } - is_landless_type_title = no - } - add_lack_of_courts_modifier_effect = yes - } - 100 = { - trigger = { - NOR = { - has_county_modifier = county_corruption_thieves_guild_modifier - title_province = { has_holding_type = nomad_holding } - title_province = { has_holding_type = herder_holding } - } - is_landless_type_title = no - } - add_thieves_guild_modifier_effect = yes - } - 100 = { - trigger = { - NOR = { - has_county_modifier = county_corruption_unsafe_highways_modifier - title_province = { has_holding_type = nomad_holding } - title_province = { has_holding_type = herder_holding } - } - is_landless_type_title = no - } - add_unsafe_highways_modifier_effect = yes - } - 100 = { - trigger = { - NOR = { - has_county_modifier = county_corruption_uncooperative_guilds_modifier - title_province = { has_holding_type = nomad_holding } - title_province = { has_holding_type = herder_holding } - } - is_landless_type_title = no - } - add_uncooperative_guilds_modifier_effect = yes - } - 100 = { - trigger = { - NOR = { - has_county_modifier = county_corruption_lackluster_administration_modifier - title_province = { has_holding_type = nomad_holding } - title_province = { has_holding_type = herder_holding } - } - is_landless_type_title = no - } - add_lackluster_administration_modifier_effect = yes - } - 100 = { - trigger = { - NOT = { - has_county_modifier = county_corruption_roaming_bandits_modifier - } - OR = { - title_province = { has_holding_type = nomad_holding } - title_province = { has_holding_type = herder_holding } - } - is_landless_type_title = no - } - add_roaming_bandits_modifier_effect = yes - } - 100 = { - trigger = { - NOT = { - has_county_modifier = county_corruption_wild_beast_attacks_modifier - } - OR = { - title_province = { has_holding_type = nomad_holding } - title_province = { has_holding_type = herder_holding } - } - is_landless_type_title = no - } - add_wild_beast_attacks_modifier_effect = yes - } - 100 = { - trigger = { - NOT = { - has_county_modifier = county_corruption_upset_shepherds_modifier - } - OR = { - title_province = { has_holding_type = nomad_holding } - title_province = { has_holding_type = herder_holding } - } - is_landless_type_title = no - } - add_upset_shepherds_modifier_effect = yes - } - 100 = { - trigger = { - NOT = { - has_county_modifier = county_corruption_rogue_warriors_modifier - } - OR = { - title_province = { has_holding_type = nomad_holding } - title_province = { has_holding_type = herder_holding } - } - is_landless_type_title = no - } - add_rogue_warriors_modifier_effect = yes - } - 100 = { - trigger = { - NOT = { - has_county_modifier = county_corruption_unruly_nomads_modifier - } - OR = { - title_province = { has_holding_type = nomad_holding } - title_province = { has_holding_type = herder_holding } - } - is_landless_type_title = no - } - add_unruly_nomads_modifier_effect = yes - } - } -} - - -#Notification includes reference about Low Control -add_random_county_corruption_low_control_effect = { - random_list = { - 100 = { - trigger = { - NOR = { - has_county_modifier = county_corruption_inefficient_tax_collection_modifier - title_province = { has_holding_type = nomad_holding } - title_province = { has_holding_type = herder_holding } - } - is_landless_type_title = no - } - save_scope_value_as = { - name = low_control - value = yes - } - add_inefficient_tax_collection_modifier_effect = yes - } - 100 = { - trigger = { - NOR = { - has_county_modifier = county_corruption_deserting_levies_modifier - title_province = { has_holding_type = nomad_holding } - title_province = { has_holding_type = herder_holding } - } - is_landless_type_title = no - } - save_scope_value_as = { - name = low_control - value = yes - } - add_deserting_levies_modifier_effect = yes - } - 100 = { - trigger = { - NOR = { - has_county_modifier = county_corruption_smuggling_ring_modifier - title_province = { has_holding_type = nomad_holding } - title_province = { has_holding_type = herder_holding } - } - is_landless_type_title = no - } - save_scope_value_as = { - name = low_control - value = yes - } - add_smuggling_ring_modifier_effect = yes - } - 100 = { - trigger = { - NOR = { - has_county_modifier = county_corruption_bandits_rampant_modifier - title_province = { has_holding_type = nomad_holding } - title_province = { has_holding_type = herder_holding } - } - is_landless_type_title = no - } - save_scope_value_as = { - name = low_control - value = yes - } - add_bandits_rampant_modifier_effect = yes - } - 100 = { - trigger = { - NOR = { - has_county_modifier = county_corruption_inefficient_census_modifier - title_province = { has_holding_type = nomad_holding } - title_province = { has_holding_type = herder_holding } - } - is_landless_type_title = no - } - save_scope_value_as = { - name = low_control - value = yes - } - add_inefficient_census_modifier_effect = yes - } - 100 = { - trigger = { - NOR = { - has_county_modifier = county_corruption_lack_of_sheriffs_modifier - title_province = { has_holding_type = nomad_holding } - title_province = { has_holding_type = herder_holding } - } - is_landless_type_title = no - } - save_scope_value_as = { - name = low_control - value = yes - } - add_lack_of_sheriffs_modifier_effect = yes - } - 100 = { - trigger = { - NOR = { - has_county_modifier = county_corruption_lack_of_courts_modifier - title_province = { has_holding_type = nomad_holding } - title_province = { has_holding_type = herder_holding } - } - is_landless_type_title = no - } - save_scope_value_as = { - name = low_control - value = yes - } - add_lack_of_sheriffs_modifier_effect = yes - } - 100 = { - trigger = { - NOR = { - has_county_modifier = county_corruption_thieves_guild_modifier - title_province = { has_holding_type = nomad_holding } - title_province = { has_holding_type = herder_holding } - } - is_landless_type_title = no - } - save_scope_value_as = { - name = low_control - value = yes - } - add_thieves_guild_modifier_effect = yes - } - 100 = { - trigger = { - NOR = { - has_county_modifier = county_corruption_unsafe_highways_modifier - title_province = { has_holding_type = nomad_holding } - title_province = { has_holding_type = herder_holding } - } - is_landless_type_title = no - } - save_scope_value_as = { - name = low_control - value = yes - } - add_unsafe_highways_modifier_effect = yes - } - 100 = { - trigger = { - NOR = { - has_county_modifier = county_corruption_uncooperative_guilds_modifier - title_province = { has_holding_type = nomad_holding } - title_province = { has_holding_type = herder_holding } - } - is_landless_type_title = no - } - save_scope_value_as = { - name = low_control - value = yes - } - add_uncooperative_guilds_modifier_effect = yes - } - 100 = { - trigger = { - NOT = { - has_county_modifier = county_corruption_roaming_bandits_modifier - } - OR = { - title_province = { has_holding_type = nomad_holding } - title_province = { has_holding_type = herder_holding } - } - is_landless_type_title = no - } - add_roaming_bandits_modifier_effect = yes - } - 100 = { - trigger = { - NOT = { - has_county_modifier = county_corruption_wild_beast_attacks_modifier - } - OR = { - title_province = { has_holding_type = nomad_holding } - title_province = { has_holding_type = herder_holding } - } - is_landless_type_title = no - } - add_wild_beast_attacks_modifier_effect = yes - } - 100 = { - trigger = { - NOT = { - has_county_modifier = county_corruption_upset_shepherds_modifier - } - OR = { - title_province = { has_holding_type = nomad_holding } - title_province = { has_holding_type = herder_holding } - } - is_landless_type_title = no - } - add_upset_shepherds_modifier_effect = yes - } - 100 = { - trigger = { - NOT = { - has_county_modifier = county_corruption_rogue_warriors_modifier - } - OR = { - title_province = { has_holding_type = nomad_holding } - title_province = { has_holding_type = herder_holding } - } - is_landless_type_title = no - } - add_rogue_warriors_modifier_effect = yes - } - 100 = { - trigger = { - NOT = { - has_county_modifier = county_corruption_unruly_nomads_modifier - } - OR = { - title_province = { has_holding_type = nomad_holding } - title_province = { has_holding_type = herder_holding } - } - is_landless_type_title = no - } - add_unruly_nomads_modifier_effect = yes - } - } -} - - -#Notification includes reference about Debt -add_random_county_corruption_in_debt_effect = { - random_list = { - 100 = { - trigger = { - NOR = { - has_county_modifier = county_corruption_inefficient_tax_collection_modifier - title_province = { has_holding_type = nomad_holding } - title_province = { has_holding_type = herder_holding } - } - is_landless_type_title = no - } - save_scope_value_as = { - name = deficit - value = yes - } - add_inefficient_tax_collection_modifier_effect = yes - } - 100 = { - trigger = { - NOR = { - has_county_modifier = county_corruption_deserting_levies_modifier - title_province = { has_holding_type = nomad_holding } - title_province = { has_holding_type = herder_holding } - } - is_landless_type_title = no - } - save_scope_value_as = { - name = deficit - value = yes - } - add_deserting_levies_modifier_effect = yes - } - 100 = { - trigger = { - NOR = { - has_county_modifier = county_corruption_smuggling_ring_modifier - title_province = { has_holding_type = nomad_holding } - title_province = { has_holding_type = herder_holding } - } - is_landless_type_title = no - } - save_scope_value_as = { - name = deficit - value = yes - } - add_smuggling_ring_modifier_effect = yes - } - 100 = { - trigger = { - NOR = { - has_county_modifier = county_corruption_bandits_rampant_modifier - title_province = { has_holding_type = nomad_holding } - title_province = { has_holding_type = herder_holding } - } - is_landless_type_title = no - } - save_scope_value_as = { - name = deficit - value = yes - } - add_bandits_rampant_modifier_effect = yes - } - 100 = { - trigger = { - NOR = { - has_county_modifier = county_corruption_inefficient_census_modifier - title_province = { has_holding_type = nomad_holding } - title_province = { has_holding_type = herder_holding } - } - is_landless_type_title = no - } - save_scope_value_as = { - name = deficit - value = yes - } - add_inefficient_census_modifier_effect = yes - } - 100 = { - trigger = { - NOR = { - has_county_modifier = county_corruption_lack_of_sheriffs_modifier - title_province = { has_holding_type = nomad_holding } - title_province = { has_holding_type = herder_holding } - } - is_landless_type_title = no - } - save_scope_value_as = { - name = deficit - value = yes - } - add_lack_of_sheriffs_modifier_effect = yes - } - 100 = { - trigger = { - NOR = { - has_county_modifier = county_corruption_lack_of_courts_modifier - title_province = { has_holding_type = nomad_holding } - title_province = { has_holding_type = herder_holding } - } - is_landless_type_title = no - } - save_scope_value_as = { - name = deficit - value = yes - } - add_lack_of_sheriffs_modifier_effect = yes - } - 100 = { - trigger = { - NOR = { - has_county_modifier = county_corruption_thieves_guild_modifier - title_province = { has_holding_type = nomad_holding } - title_province = { has_holding_type = herder_holding } - } - is_landless_type_title = no - } - save_scope_value_as = { - name = deficit - value = yes - } - add_thieves_guild_modifier_effect = yes - } - 100 = { - trigger = { - NOR = { - has_county_modifier = county_corruption_unsafe_highways_modifier - title_province = { has_holding_type = nomad_holding } - title_province = { has_holding_type = herder_holding } - } - is_landless_type_title = no - } - save_scope_value_as = { - name = deficit - value = yes - } - add_unsafe_highways_modifier_effect = yes - } - 100 = { - trigger = { - NOR = { - has_county_modifier = county_corruption_uncooperative_guilds_modifier - title_province = { has_holding_type = nomad_holding } - title_province = { has_holding_type = herder_holding } - } - is_landless_type_title = no - } - save_scope_value_as = { - name = deficit - value = yes - } - add_uncooperative_guilds_modifier_effect = yes - } - 500 = { - trigger = { - NOR = { - has_county_modifier = county_corruption_lackluster_administration_modifier - title_province = { has_holding_type = nomad_holding } - title_province = { has_holding_type = herder_holding } - } - is_landless_type_title = no - } - save_scope_value_as = { - name = deficit - value = yes - } - add_lackluster_administration_modifier_effect = yes - } - 100 = { - trigger = { - NOT = { - has_county_modifier = county_corruption_roaming_bandits_modifier - } - OR = { - title_province = { has_holding_type = nomad_holding } - title_province = { has_holding_type = herder_holding } - } - is_landless_type_title = no - } - save_scope_value_as = { - name = deficit - value = yes - } - add_roaming_bandits_modifier_effect = yes - } - 100 = { - trigger = { - NOT = { - has_county_modifier = county_corruption_wild_beast_attacks_modifier - } - OR = { - title_province = { has_holding_type = nomad_holding } - title_province = { has_holding_type = herder_holding } - } - is_landless_type_title = no - } - save_scope_value_as = { - name = deficit - value = yes - } - add_wild_beast_attacks_modifier_effect = yes - } - 100 = { - trigger = { - NOT = { - has_county_modifier = county_corruption_upset_shepherds_modifier - } - OR = { - title_province = { has_holding_type = nomad_holding } - title_province = { has_holding_type = herder_holding } - } - is_landless_type_title = no - } - save_scope_value_as = { - name = deficit - value = yes - } - add_upset_shepherds_modifier_effect = yes - } - 100 = { - trigger = { - NOT = { - has_county_modifier = county_corruption_rogue_warriors_modifier - } - OR = { - title_province = { has_holding_type = nomad_holding } - title_province = { has_holding_type = herder_holding } - } - is_landless_type_title = no - } - save_scope_value_as = { - name = deficit - value = yes - } - add_rogue_warriors_modifier_effect = yes - } - 100 = { - trigger = { - NOT = { - has_county_modifier = county_corruption_unruly_nomads_modifier - } - OR = { - title_province = { has_holding_type = nomad_holding } - title_province = { has_holding_type = herder_holding } - } - is_landless_type_title = no - } - save_scope_value_as = { - name = deficit - value = yes - } - add_unruly_nomads_modifier_effect = yes - } - } -} - -############# -# Removal of County Corruption -############# - -remove_inefficient_tax_collection_modifier_effect = { - save_scope_as = county - holder = { - if = { - limit = { - exists = scope:marshal_removal - } - send_interface_message = { - type = msg_county_corruption_good_increase_control - title = remove_county_corruption.message.marshal_removal - left_icon = scope:county - right_icon = scope:councillor - - scope:county = { - remove_county_modifier = county_corruption_inefficient_tax_collection_modifier - } - } - } - else = { - scope:county = { - remove_county_modifier = county_corruption_inefficient_tax_collection_modifier - } - } - } -} - -remove_deserting_levies_modifier_effect = { - save_scope_as = county - holder = { - if = { - limit = { - exists = scope:marshal_removal - } - send_interface_message = { - type = msg_county_corruption_good_increase_control - title = remove_county_corruption.message.marshal_removal - left_icon = scope:county - right_icon = scope:councillor - - scope:county = { - remove_county_modifier = county_corruption_deserting_levies_modifier - } - } - } - else = { - scope:county = { - remove_county_modifier = county_corruption_deserting_levies_modifier - } - } - } -} - -remove_smuggling_ring_modifier_effect = { - save_scope_as = county - holder = { - if = { - limit = { - exists = scope:marshal_removal - } - send_interface_message = { - type = msg_county_corruption_good_increase_control - title = remove_county_corruption.message.marshal_removal - left_icon = scope:county - right_icon = scope:councillor - - scope:county = { - remove_county_modifier = county_corruption_smuggling_ring_modifier - } - } - } - else = { - scope:county = { - remove_county_modifier = county_corruption_smuggling_ring_modifier - } - } - } -} - -remove_bandits_rampant_modifier_effect = { - save_scope_as = county - holder = { - if = { - limit = { - exists = scope:marshal_removal - } - send_interface_message = { - type = msg_county_corruption_good_increase_control - title = remove_county_corruption.message.marshal_removal - left_icon = scope:county - right_icon = scope:councillor - - scope:county = { - remove_county_modifier = county_corruption_bandits_rampant_modifier - } - } - } - else = { - scope:county = { - remove_county_modifier = county_corruption_bandits_rampant_modifier - } - } - } -} - -remove_inefficient_census_modifier_effect = { - save_scope_as = county - holder = { - if = { - limit = { - exists = scope:marshal_removal - } - send_interface_message = { - type = msg_county_corruption_good_increase_control - title = remove_county_corruption.message.marshal_removal - left_icon = scope:county - right_icon = scope:councillor - - scope:county = { - remove_county_modifier = county_corruption_inefficient_census_modifier - } - } - } - else = { - scope:county = { - remove_county_modifier = county_corruption_inefficient_census_modifier - } - } - } -} - -remove_lack_of_sheriffs_modifier_effect = { - save_scope_as = county - holder = { - if = { - limit = { - exists = scope:marshal_removal - } - send_interface_message = { - type = msg_county_corruption_good_increase_control - title = remove_county_corruption.message.marshal_removal - left_icon = scope:county - right_icon = scope:councillor - - scope:county = { - remove_county_modifier = county_corruption_lack_of_sheriffs_modifier - } - } - } - else = { - scope:county = { - remove_county_modifier = county_corruption_lack_of_sheriffs_modifier - } - } - } -} - -remove_lack_of_courts_modifier_effect = { - save_scope_as = county - holder = { - if = { - limit = { - exists = scope:marshal_removal - } - send_interface_message = { - type = msg_county_corruption_good_increase_control - title = remove_county_corruption.message.marshal_removal - left_icon = scope:county - right_icon = scope:councillor - - scope:county = { - remove_county_modifier = county_corruption_lack_of_courts_modifier - } - } - } - else = { - scope:county = { - remove_county_modifier = county_corruption_lack_of_courts_modifier - } - } - } -} - -remove_thieves_guild_modifier_effect = { - save_scope_as = county - holder = { - if = { - limit = { - exists = scope:marshal_removal - } - send_interface_message = { - type = msg_county_corruption_good_increase_control - title = remove_county_corruption.message.marshal_removal - left_icon = scope:county - right_icon = scope:councillor - - scope:county = { - remove_county_modifier = county_corruption_thieves_guild_modifier - } - } - } - else = { - scope:county = { - remove_county_modifier = county_corruption_thieves_guild_modifier - } - } - } -} - -remove_unsafe_highways_modifier_effect = { - save_scope_as = county - holder = { - if = { - limit = { - exists = scope:marshal_removal - } - send_interface_message = { - type = msg_county_corruption_good_increase_control - title = remove_county_corruption.message.marshal_removal - left_icon = scope:county - right_icon = scope:councillor - - scope:county = { - remove_county_modifier = county_corruption_unsafe_highways_modifier - } - } - } - else = { - scope:county = { - remove_county_modifier = county_corruption_unsafe_highways_modifier - } - } - } -} - -remove_uncooperative_guilds_modifier_effect = { - save_scope_as = county - holder = { - if = { - limit = { - exists = scope:marshal_removal - } - send_interface_message = { - type = msg_county_corruption_good_increase_control - title = remove_county_corruption.message.marshal_removal - left_icon = scope:county - right_icon = scope:councillor - - scope:county = { - remove_county_modifier = county_corruption_uncooperative_guilds_modifier - } - } - } - else = { - scope:county = { - remove_county_modifier = county_corruption_uncooperative_guilds_modifier - } - } - } -} - -remove_lackluster_administration_modifier_effect = { - save_scope_as = county - holder = { - if = { - limit = { - exists = scope:marshal_removal - } - send_interface_message = { - type = msg_county_corruption_good_increase_control - title = remove_county_corruption.message.marshal_removal - left_icon = scope:county - right_icon = scope:councillor - - scope:county = { - remove_county_modifier = county_corruption_lackluster_administration_modifier - } - } - } - else = { - scope:county = { - remove_county_modifier = county_corruption_lackluster_administration_modifier - } - } - } -} - -remove_roaming_bandits_modifier_effect = { - save_scope_as = county - holder = { - if = { - limit = { - exists = scope:marshal_removal - } - send_interface_message = { - type = msg_county_corruption_good_increase_control - title = remove_county_corruption.message.marshal_removal - left_icon = scope:county - right_icon = scope:councillor - - scope:county = { - remove_county_modifier = county_corruption_roaming_bandits_modifier - } - } - } - else = { - scope:county = { - remove_county_modifier = county_corruption_roaming_bandits_modifier - } - } - } -} - -remove_wild_beast_attacks_modifier_effect = { - save_scope_as = county - holder = { - if = { - limit = { - exists = scope:marshal_removal - } - send_interface_message = { - type = msg_county_corruption_good_increase_control - title = remove_county_corruption.message.marshal_removal - left_icon = scope:county - right_icon = scope:councillor - - scope:county = { - remove_county_modifier = county_corruption_wild_beast_attacks_modifier - } - } - } - else = { - scope:county = { - remove_county_modifier = county_corruption_wild_beast_attacks_modifier - } - } - } -} - -remove_upset_shepherds_modifier_effect = { - save_scope_as = county - holder = { - if = { - limit = { - exists = scope:marshal_removal - } - send_interface_message = { - type = msg_county_corruption_good_increase_control - title = remove_county_corruption.message.marshal_removal - left_icon = scope:county - right_icon = scope:councillor - - scope:county = { - remove_county_modifier = county_corruption_upset_shepherds_modifier - } - } - } - else = { - scope:county = { - remove_county_modifier = county_corruption_upset_shepherds_modifier - } - } - } -} - -remove_rogue_warriors_modifier_effect = { - save_scope_as = county - holder = { - if = { - limit = { - exists = scope:marshal_removal - } - send_interface_message = { - type = msg_county_corruption_good_increase_control - title = remove_county_corruption.message.marshal_removal - left_icon = scope:county - right_icon = scope:councillor - - scope:county = { - remove_county_modifier = county_corruption_rogue_warriors_modifier - } - } - } - else = { - scope:county = { - remove_county_modifier = county_corruption_rogue_warriors_modifier - } - } - } -} - -remove_unruly_nomads_modifier_effect = { - save_scope_as = county - holder = { - if = { - limit = { - exists = scope:marshal_removal - } - send_interface_message = { - type = msg_county_corruption_good_increase_control - title = remove_county_corruption.message.marshal_removal - left_icon = scope:county - right_icon = scope:councillor - - scope:county = { - remove_county_modifier = county_corruption_unruly_nomads_modifier - } - } - } - else = { - scope:county = { - remove_county_modifier = county_corruption_unruly_nomads_modifier - } - } - } -} - -remove_small_investment_in_revolt_modifier_effect = { - save_scope_as = county - holder = { - if = { - limit = { - exists = scope:marshal_removal - } - send_interface_message = { - type = msg_county_corruption_good_increase_control - title = remove_county_corruption.message.marshal_removal - left_icon = scope:county - right_icon = scope:councillor - - scope:county = { - remove_county_modifier = small_investment_in_revolt_modifier - } - } - } - else = { - scope:county = { - remove_county_modifier = small_investment_in_revolt_modifier - } - } - } -} - -remove_medium_investment_in_revolt_modifier_effect = { - save_scope_as = county - holder = { - if = { - limit = { - exists = scope:marshal_removal - } - send_interface_message = { - type = msg_county_corruption_good_increase_control - title = remove_county_corruption.message.marshal_removal - left_icon = scope:county - right_icon = scope:councillor - - scope:county = { - remove_county_modifier = medium_investment_in_revolt_modifier - } - } - } - else = { - scope:county = { - remove_county_modifier = medium_investment_in_revolt_modifier - } - } - } -} - -remove_high_investment_in_revolt_modifier_effect = { - save_scope_as = county - holder = { - if = { - limit = { - exists = scope:marshal_removal - } - send_interface_message = { - type = msg_county_corruption_good_increase_control - title = remove_county_corruption.message.marshal_removal - left_icon = scope:county - right_icon = scope:councillor - - scope:county = { - remove_county_modifier = high_investment_in_revolt_modifier - } - } - } - else = { - scope:county = { - remove_county_modifier = high_investment_in_revolt_modifier - } - } - } -} - -remove_random_county_corruption_modifier_effect = { - random_list = { - 100 = { - trigger = { - has_county_modifier = county_corruption_inefficient_tax_collection_modifier - } - remove_inefficient_tax_collection_modifier_effect = yes - } - 100 = { - trigger = { - has_county_modifier = county_corruption_deserting_levies_modifier - } - remove_deserting_levies_modifier_effect = yes - } - 100 = { - trigger = { - has_county_modifier = county_corruption_smuggling_ring_modifier - } - remove_smuggling_ring_modifier_effect = yes - } - 100 = { - trigger = { - has_county_modifier = county_corruption_bandits_rampant_modifier - } - remove_bandits_rampant_modifier_effect = yes - } - 100 = { - trigger = { - has_county_modifier = county_corruption_inefficient_census_modifier - } - remove_inefficient_census_modifier_effect = yes - } - 100 = { - trigger = { - has_county_modifier = county_corruption_lack_of_sheriffs_modifier - } - remove_lack_of_sheriffs_modifier_effect = yes - } - 100 = { - trigger = { - has_county_modifier = county_corruption_lack_of_courts_modifier - } - remove_lack_of_courts_modifier_effect = yes - } - 100 = { - trigger = { - has_county_modifier = county_corruption_thieves_guild_modifier - } - remove_thieves_guild_modifier_effect = yes - } - 100 = { - trigger = { - has_county_modifier = county_corruption_unsafe_highways_modifier - } - remove_unsafe_highways_modifier_effect = yes - } - 100 = { - trigger = { - has_county_modifier = county_corruption_uncooperative_guilds_modifier - } - remove_uncooperative_guilds_modifier_effect = yes - } - 100 = { - trigger = { - has_county_modifier = county_corruption_lackluster_administration_modifier - } - remove_lackluster_administration_modifier_effect = yes - } - 100 = { - trigger = { - has_county_modifier = county_corruption_roaming_bandits_modifier - } - remove_roaming_bandits_modifier_effect = yes - } - 100 = { - trigger = { - has_county_modifier = county_corruption_wild_beast_attacks_modifier - } - remove_wild_beast_attacks_modifier_effect = yes - } - 100 = { - trigger = { - has_county_modifier = county_corruption_upset_shepherds_modifier - } - remove_upset_shepherds_modifier_effect = yes - } - 100 = { - trigger = { - has_county_modifier = county_corruption_rogue_warriors_modifier - } - remove_rogue_warriors_modifier_effect = yes - } - 100 = { - trigger = { - has_county_modifier = county_corruption_unruly_nomads_modifier - } - remove_unruly_nomads_modifier_effect = yes - } - 100 = { - trigger = { - has_county_modifier = small_investment_in_revolt_modifier - } - remove_small_investment_in_revolt_modifier_effect = yes - } - 100 = { - trigger = { - has_county_modifier = medium_investment_in_revolt_modifier - } - remove_medium_investment_in_revolt_modifier_effect = yes - } - 100 = { - trigger = { - has_county_modifier = high_investment_in_revolt_modifier - } - remove_high_investment_in_revolt_modifier_effect = yes - } - } -} - -remove_every_county_corruption_modifier_effect = { - if = { - limit = { - has_county_modifier = county_corruption_inefficient_tax_collection_modifier - } - remove_inefficient_tax_collection_modifier_effect = yes - } - if = { - limit = { - has_county_modifier = county_corruption_deserting_levies_modifier - } - remove_deserting_levies_modifier_effect = yes - } - if = { - limit = { - has_county_modifier = county_corruption_smuggling_ring_modifier - } - remove_smuggling_ring_modifier_effect = yes - } - if = { - limit = { - has_county_modifier = county_corruption_bandits_rampant_modifier - } - remove_bandits_rampant_modifier_effect = yes - } - if = { - limit = { - has_county_modifier = county_corruption_inefficient_census_modifier - } - remove_inefficient_census_modifier_effect = yes - } - if = { - limit = { - has_county_modifier = county_corruption_lack_of_sheriffs_modifier - } - remove_lack_of_sheriffs_modifier_effect = yes - } - if = { - limit = { - has_county_modifier = county_corruption_lack_of_courts_modifier - } - remove_lack_of_courts_modifier_effect = yes - } - if = { - limit = { - has_county_modifier = county_corruption_thieves_guild_modifier - } - remove_thieves_guild_modifier_effect = yes - } - if = { - limit = { - has_county_modifier = county_corruption_unsafe_highways_modifier - } - remove_unsafe_highways_modifier_effect = yes - } - if = { - limit = { - has_county_modifier = county_corruption_uncooperative_guilds_modifier - } - remove_uncooperative_guilds_modifier_effect = yes - } - if = { - limit = { - has_county_modifier = county_corruption_lackluster_administration_modifier - } - remove_lackluster_administration_modifier_effect = yes - } - if = { - limit = { - has_county_modifier = county_corruption_roaming_bandits_modifier - } - remove_roaming_bandits_modifier_effect = yes - } - if = { - limit = { - has_county_modifier = county_corruption_wild_beast_attacks_modifier - } - remove_wild_beast_attacks_modifier_effect = yes - } - if = { - limit = { - has_county_modifier = county_corruption_upset_shepherds_modifier - } - remove_upset_shepherds_modifier_effect = yes - } - if = { - limit = { - has_county_modifier = county_corruption_rogue_warriors_modifier - } - remove_rogue_warriors_modifier_effect = yes - } - if = { - limit = { - has_county_modifier = county_corruption_unruly_nomads_modifier - } - remove_unruly_nomads_modifier_effect = yes - } - if = { - limit = { - has_county_modifier = small_investment_in_revolt_modifier - } - remove_small_investment_in_revolt_modifier_effect = yes - } - if = { - limit = { - has_county_modifier = medium_investment_in_revolt_modifier - } - remove_medium_investment_in_revolt_modifier_effect = yes - } - if = { - limit = { - has_county_modifier = high_investment_in_revolt_modifier - } - remove_high_investment_in_revolt_modifier_effect = yes - } -} - -marshal_remove_random_county_corruption_modifier_effect = { - random_list = { - 100 = { - trigger = { - has_county_modifier = county_corruption_inefficient_tax_collection_modifier - } - if = { - limit = { - scope:councillor = { - OR = { - scope:county.holder.cp:councillor_marshal ?= this - is_kurultai_trigger = yes - } - } - } - save_scope_value_as = { - name = marshal_removal - value = yes - } - } - hidden_effect = { - set_variable = { - name = county_corruption_recent_removal - years = 3 - } - } - remove_inefficient_tax_collection_modifier_effect = yes - } - 100 = { - trigger = { - has_county_modifier = county_corruption_deserting_levies_modifier - } - if = { - limit = { - scope:councillor = { - OR = { - scope:county.holder.cp:councillor_marshal ?= this - is_kurultai_trigger = yes - } - } - } - save_scope_value_as = { - name = marshal_removal - value = yes - } - } - hidden_effect = { - set_variable = { - name = county_corruption_recent_removal - years = 3 - } - } - remove_deserting_levies_modifier_effect = yes - } - 100 = { - trigger = { - has_county_modifier = county_corruption_smuggling_ring_modifier - } - if = { - limit = { - scope:councillor = { - OR = { - scope:county.holder.cp:councillor_marshal ?= this - is_kurultai_trigger = yes - } - } - } - save_scope_value_as = { - name = marshal_removal - value = yes - } - } - hidden_effect = { - set_variable = { - name = county_corruption_recent_removal - years = 3 - } - } - remove_smuggling_ring_modifier_effect = yes - } - 100 = { - trigger = { - has_county_modifier = county_corruption_bandits_rampant_modifier - } - if = { - limit = { - scope:councillor = { - OR = { - scope:county.holder.cp:councillor_marshal ?= this - is_kurultai_trigger = yes - } - } - } - save_scope_value_as = { - name = marshal_removal - value = yes - } - } - hidden_effect = { - set_variable = { - name = county_corruption_recent_removal - years = 3 - } - } - remove_bandits_rampant_modifier_effect = yes - } - 100 = { - trigger = { - has_county_modifier = county_corruption_inefficient_census_modifier - } - if = { - limit = { - scope:councillor = { - OR = { - scope:county.holder.cp:councillor_marshal ?= this - is_kurultai_trigger = yes - } - } - } - save_scope_value_as = { - name = marshal_removal - value = yes - } - } - hidden_effect = { - set_variable = { - name = county_corruption_recent_removal - years = 3 - } - } - remove_inefficient_census_modifier_effect = yes - } - 100 = { - trigger = { - has_county_modifier = county_corruption_lack_of_sheriffs_modifier - } - if = { - limit = { - scope:councillor = { - OR = { - scope:county.holder.cp:councillor_marshal ?= this - is_kurultai_trigger = yes - } - } - } - save_scope_value_as = { - name = marshal_removal - value = yes - } - } - hidden_effect = { - set_variable = { - name = county_corruption_recent_removal - years = 3 - } - } - remove_lack_of_sheriffs_modifier_effect = yes - } - 100 = { - trigger = { - has_county_modifier = county_corruption_lack_of_courts_modifier - } - if = { - limit = { - scope:councillor = { - OR = { - scope:county.holder.cp:councillor_marshal ?= this - is_kurultai_trigger = yes - } - } - } - save_scope_value_as = { - name = marshal_removal - value = yes - } - } - hidden_effect = { - set_variable = { - name = county_corruption_recent_removal - years = 3 - } - } - remove_lack_of_courts_modifier_effect = yes - } - 100 = { - trigger = { - has_county_modifier = county_corruption_thieves_guild_modifier - } - if = { - limit = { - scope:councillor = { - OR = { - scope:county.holder.cp:councillor_marshal ?= this - is_kurultai_trigger = yes - } - } - } - save_scope_value_as = { - name = marshal_removal - value = yes - } - } - hidden_effect = { - set_variable = { - name = county_corruption_recent_removal - years = 3 - } - } - remove_thieves_guild_modifier_effect = yes - } - 100 = { - trigger = { - has_county_modifier = county_corruption_unsafe_highways_modifier - } - if = { - limit = { - scope:councillor = { - OR = { - scope:county.holder.cp:councillor_marshal ?= this - is_kurultai_trigger = yes - } - } - } - save_scope_value_as = { - name = marshal_removal - value = yes - } - } - hidden_effect = { - set_variable = { - name = county_corruption_recent_removal - years = 3 - } - } - remove_unsafe_highways_modifier_effect = yes - } - 100 = { - trigger = { - has_county_modifier = county_corruption_uncooperative_guilds_modifier - } - if = { - limit = { - scope:councillor = { - OR = { - scope:county.holder.cp:councillor_marshal ?= this - is_kurultai_trigger = yes - } - } - } - save_scope_value_as = { - name = marshal_removal - value = yes - } - } - hidden_effect = { - set_variable = { - name = county_corruption_recent_removal - years = 3 - } - } - remove_uncooperative_guilds_modifier_effect = yes - } - 100 = { - trigger = { - has_county_modifier = county_corruption_lackluster_administration_modifier - } - if = { - limit = { - scope:councillor = { - OR = { - scope:county.holder.cp:councillor_marshal ?= this - is_kurultai_trigger = yes - } - } - } - save_scope_value_as = { - name = marshal_removal - value = yes - } - } - hidden_effect = { - set_variable = { - name = county_corruption_recent_removal - years = 3 - } - } - remove_lackluster_administration_modifier_effect = yes - } - 100 = { - trigger = { - has_county_modifier = county_corruption_roaming_bandits_modifier - } - if = { - limit = { - scope:councillor = { - OR = { - scope:county.holder.cp:councillor_marshal ?= this - is_kurultai_trigger = yes - } - } - } - save_scope_value_as = { - name = marshal_removal - value = yes - } - } - hidden_effect = { - set_variable = { - name = county_corruption_recent_removal - years = 3 - } - } - remove_roaming_bandits_modifier_effect = yes - } - 100 = { - trigger = { - has_county_modifier = county_corruption_wild_beast_attacks_modifier - } - if = { - limit = { - scope:councillor = { - OR = { - scope:county.holder.cp:councillor_marshal ?= this - is_kurultai_trigger = yes - } - } - } - save_scope_value_as = { - name = marshal_removal - value = yes - } - } - hidden_effect = { - set_variable = { - name = county_corruption_recent_removal - years = 3 - } - } - remove_wild_beast_attacks_modifier_effect = yes - } - 100 = { - trigger = { - has_county_modifier = county_corruption_upset_shepherds_modifier - } - if = { - limit = { - scope:councillor = { - OR = { - scope:county.holder.cp:councillor_marshal ?= this - is_kurultai_trigger = yes - } - } - } - save_scope_value_as = { - name = marshal_removal - value = yes - } - } - hidden_effect = { - set_variable = { - name = county_corruption_recent_removal - years = 3 - } - } - remove_upset_shepherds_modifier_effect = yes - } - 100 = { - trigger = { - has_county_modifier = county_corruption_rogue_warriors_modifier - } - if = { - limit = { - scope:councillor = { - OR = { - scope:county.holder.cp:councillor_marshal ?= this - is_kurultai_trigger = yes - } - } - } - save_scope_value_as = { - name = marshal_removal - value = yes - } - } - hidden_effect = { - set_variable = { - name = county_corruption_recent_removal - years = 3 - } - } - remove_rogue_warriors_modifier_effect = yes - } - 100 = { - trigger = { - has_county_modifier = county_corruption_unruly_nomads_modifier - } - if = { - limit = { - scope:councillor = { - OR = { - scope:county.holder.cp:councillor_marshal ?= this - is_kurultai_trigger = yes - } - } - } - save_scope_value_as = { - name = marshal_removal - value = yes - } - } - hidden_effect = { - set_variable = { - name = county_corruption_recent_removal - years = 3 - } - } - remove_unruly_nomads_modifier_effect = yes - } - } -} diff --git a/N3OW/common/scripted_effects/00_court_position_effects.txt b/N3OW/common/scripted_effects/00_court_position_effects.txt deleted file mode 100644 index 09ed8514..00000000 --- a/N3OW/common/scripted_effects/00_court_position_effects.txt +++ /dev/null @@ -1,3909 +0,0 @@ - -################### -# Generic effects that are used for basic opinion gain etc. -################### - -#Basic effect for gaining a court position -basic_gained_court_position_effect = { - scope:employee = { - if = { - limit = { - has_opinion_modifier = { - modifier = revoked_court_position_opinion - target = scope:liege - } - } - remove_opinion = { - modifier = revoked_court_position_opinion - target = scope:liege - } - } - if = { - limit = { - is_ruler = yes - has_vassal_stance = courtly - } - add_opinion = { - target = scope:liege - modifier = courtly_court_position_opinion - } - } - if = { - limit = { - scope:liege = { is_ai = no } - } - set_variable = { - name = court_8311_cooldown - years = 2 - } - } - - # Unity impact - #add_clan_unity_interaction_effect = { - # CHARACTER = scope:liege - # TARGET = this - # VALUE = 0 #minor_unity_gain - # DESC = clan_unity_assigned_to_court_position.desc - # REVERSE_NON_HOUSE_TARGET = yes - #} - } -} - -#Basic effect for losing a court position -basic_revoked_court_position_effect = { - scope:employee = { - if = { - limit = { - has_opinion_modifier = { - modifier = courtly_court_position_opinion - target = scope:liege - } - } - remove_opinion = { - modifier = courtly_court_position_opinion - target = scope:liege - } - } - if = { - limit = { - has_opinion_modifier = { - modifier = hired_me_opinion - target = scope:liege - } - } - remove_opinion = { - modifier = hired_me_opinion - target = scope:liege - } - } - if = { - limit = { - NOT = { has_character_flag = no_revoke_opinion_loss } - } - add_opinion = { - modifier = revoked_court_position_opinion - target = scope:liege - opinion = -30 - } - } - - # Unity impact - #add_clan_unity_interaction_effect = { - # CHARACTER = scope:liege - # TARGET = this - # VALUE = 0 #minor_unity_loss - # DESC = clan_unity_assigned_to_court_position.desc - # REVERSE_NON_HOUSE_TARGET = no - #} - } - employed_booner_invalidation_effect = { EMPLOYEE = scope:employee LIEGE = scope:liege } -} - -#Basic effect for a court position invalidating -basic_invalidated_court_position_effect = { - employed_booner_invalidation_effect = { EMPLOYEE = scope:employee LIEGE = scope:liege } -} - - -################ -# EFFECTS FOR SPECIFIC COURT POSITIONS -################ - -# COURT PHYSICIAN -court_physician_title_accepted_effect = { - basic_gained_court_position_effect = yes -} -court_physician_title_revoked_effect = { - basic_revoked_court_position_effect = yes -} -court_physician_title_invalidated_effect = { - basic_invalidated_court_position_effect = yes -} - -# COURT EUNUCH -chief_eunuch_title_accepted_effect = { - basic_gained_court_position_effect = yes -} -chief_eunuch_title_revoked_effect = { - basic_revoked_court_position_effect = yes -} -chief_eunuch_title_invalidated_effect = { - basic_invalidated_court_position_effect = yes -} - -# KEEPER OF SWANS -keeper_of_swans_title_accepted_effect = { - basic_gained_court_position_effect = yes -} -keeper_of_swans_title_revoked_effect = { - basic_revoked_court_position_effect = yes -} -keeper_of_swans_title_invalidated_effect = { - basic_invalidated_court_position_effect = yes -} - -# MASTER OF THE HORSE -master_of_horse_title_accepted_effect = { - basic_gained_court_position_effect = yes -} -master_of_horse_title_revoked_effect = { - basic_revoked_court_position_effect = yes -} -master_of_horse_title_invalidated_effect = { - basic_invalidated_court_position_effect = yes -} - -# COURT JESTER -court_jester_title_accepted_effect = { - -} -court_jester_title_revoked_effect = { - scope:employee = { - if = { #Only lowborn/unlanded are insulted if it's revoked - limit = { - OR = { - is_lowborn = yes - is_playable_character = no - } - } - add_opinion = { - modifier = insult_opinion - target = liege - opinion = -15 - } - } - } -} -court_jester_title_invalidated_effect = { - basic_invalidated_court_position_effect = yes -} - -# MASTER OF THE HUNT -master_of_hunt_title_accepted_effect = { - basic_gained_court_position_effect = yes -} -master_of_hunt_title_revoked_effect = { - basic_revoked_court_position_effect = yes -} -master_of_hunt_title_invalidated_effect = { - basic_invalidated_court_position_effect = yes -} - -# HIGH ALMONER -high_almoner_title_accepted_effect = { - basic_gained_court_position_effect = yes -} -high_almoner_title_revoked_effect = { - basic_revoked_court_position_effect = yes -} -high_almoner_title_invalidated_effect = { - basic_invalidated_court_position_effect = yes -} - -# CUPBEARER -cupbearer_title_accepted_effect = { - basic_gained_court_position_effect = yes -} -cupbearer_title_revoked_effect = { - basic_revoked_court_position_effect = yes -} -cupbearer_title_invalidated_effect = { - basic_invalidated_court_position_effect = yes -} - -# SENESCHAL -seneschal_title_accepted_effect = { - basic_gained_court_position_effect = yes -} -seneschal_title_revoked_effect = { - basic_revoked_court_position_effect = yes -} -seneschal_title_invalidated_effect = { - basic_invalidated_court_position_effect = yes -} - -# ANTIQUARIAN -antiquarian_title_accepted_effect = { - basic_gained_court_position_effect = yes -} -antiquarian_title_revoked_effect = { - basic_revoked_court_position_effect = yes -} -antiquarian_title_invalidated_effect = { - basic_invalidated_court_position_effect = yes -} - -# COURT TUTOR -court_tutor_title_accepted_effect = { - basic_gained_court_position_effect = yes -} -court_tutor_title_revoked_effect = { - basic_revoked_court_position_effect = yes -} -court_tutor_title_invalidated_effect = { - basic_invalidated_court_position_effect = yes -} - -# ROYAL ARCHITECT -royal_architect_title_accepted_effect = { - basic_gained_court_position_effect = yes -} -royal_architect_title_revoked_effect = { - basic_revoked_court_position_effect = yes -} -royal_architect_title_invalidated_effect = { - basic_invalidated_court_position_effect = yes -} - -# COURT POET -court_poet_title_accepted_effect = { - basic_gained_court_position_effect = yes -} -court_poet_title_revoked_effect = { - basic_revoked_court_position_effect = yes -} -court_poet_title_invalidated_effect = { - basic_invalidated_court_position_effect = yes -} - -# BODYGUARD -bodyguard_title_accepted_effect = { - basic_gained_court_position_effect = yes -} -bodyguard_title_revoked_effect = { - basic_revoked_court_position_effect = yes -} -bodyguard_title_invalidated_effect = { - basic_invalidated_court_position_effect = yes -} - -# CHAMPION -champion_title_accepted_effect = { - basic_gained_court_position_effect = yes -} -champion_title_revoked_effect = { - basic_revoked_court_position_effect = yes -} -champion_title_invalidated_effect = { - basic_invalidated_court_position_effect = yes -} - -# COURT MUSICIAN -court_musician_title_accepted_effect = { - basic_gained_court_position_effect = yes -} -court_musician_title_revoked_effect = { - basic_revoked_court_position_effect = yes -} -court_musician_title_invalidated_effect = { - basic_invalidated_court_position_effect = yes -} - -# FOOD TASTER -food_taster_title_accepted_effect = { - basic_gained_court_position_effect = yes -} -food_taster_title_revoked_effect = { - basic_revoked_court_position_effect = yes -} -food_taster_title_invalidated_effect = { - basic_invalidated_court_position_effect = yes -} - -# LADY-IN-WAITING -lady_in_waiting_title_accepted_effect = { - basic_gained_court_position_effect = yes -} -lady_in_waiting_title_revoked_effect = { - basic_revoked_court_position_effect = yes -} -lady_in_waiting_title_invalidated_effect = { - basic_invalidated_court_position_effect = yes -} - -# EXECUTIONER -executioner_title_accepted_effect = { - scope:liege = { - consume_imprisonment_reasons = scope:employee - } - scope:employee = { - if = { - limit = { is_imprisoned = yes } - release_from_prison = yes - } - } - basic_gained_court_position_effect = yes -} -executioner_title_revoked_effect = { - basic_revoked_court_position_effect = yes -} -executioner_title_invalidated_effect = { - basic_invalidated_court_position_effect = yes -} - -# GARUDA -garuda_title_accepted_effect = { - basic_gained_court_position_effect = yes -} -garuda_title_revoked_effect = { - basic_revoked_court_position_effect = yes -} -garuda_title_invalidated_effect = { - basic_invalidated_court_position_effect = yes -} - -# COURT GARDENER -court_gardener_title_accepted_effect = { - basic_gained_court_position_effect = yes -} -court_gardener_title_revoked_effect = { - basic_revoked_court_position_effect = yes -} -court_gardener_title_invalidated_effect = { - basic_invalidated_court_position_effect = yes -} - -# CARAVAN MASTER -court_travel_leader_title_accepted_effect = { - basic_gained_court_position_effect = yes -} -court_travel_leader_title_revoked_effect = { - basic_revoked_court_position_effect = yes -} -court_travel_leader_title_invalidated_effect = { - basic_invalidated_court_position_effect = yes -} - -# WET NURSE -wet_nurse_title_accepted_effect = { - basic_gained_court_position_effect = yes - scope:liege = { #set wet_nurse and nursed_child relation with liege's children, siblings, hostages and liege if they are not adult - every_courtier = { - limit = { - is_adult = no - is_playable_character = no - OR = { - is_child_of = scope:liege - is_sibling_of = scope:liege - is_hostage_of = scope:liege - } - NOT = { has_relation_wet_nurse = scope:employee } - } - set_relation_wet_nurse = scope:employee - } - if = { - limit = { - scope:liege = { is_adult = no } - NOT = { has_relation_wet_nurse = scope:employee } - } - set_relation_wet_nurse = scope:employee - } - } -} - -wet_nurse_title_revoked_effect = { - basic_revoked_court_position_effect = yes - #if any child has positive realtion with the fired nurse trigger an event about them complaining - if = { - limit = { - scope:employee = { - any_relation = { - type = nursed_child - is_alive = yes - age >= 3 - is_adult = no - OR = { - opinion = { - target = prev - value >= medium_positive_opinion - } - has_relation_friend = prev - has_relation_best_friend = prev - } - } - } - } - scope:employee = { - random_relation = { - type = nursed_child - limit = { - is_alive = yes - age >= 3 - OR = { - opinion = { - target = prev - value >= medium_positive_opinion - } - has_relation_friend = prev - has_relation_best_friend = prev - } - } - save_scope_as = nursed_child - } - save_scope_as = former_wet_nurse - } - scope:liege = { - trigger_event = { - id = bp2_yearly.7012 - days = { 5 10 } - } - } - } -} - -wet_nurse_title_invalidated_effect = { - basic_invalidated_court_position_effect = yes -} - -# AKOLOUTHOS -akolouthos_title_accepted_effect = { - basic_gained_court_position_effect = yes -} -akolouthos_title_revoked_effect = { - basic_revoked_court_position_effect = yes -} -akolouthos_title_invalidated_effect = { - basic_invalidated_court_position_effect = yes -} - -# COURT BREWMASTER -court_brewmaster_title_accepted_effect = { - basic_gained_court_position_effect = yes -} -court_brewmaster_title_revoked_effect = { - basic_revoked_court_position_effect = yes -} -court_brewmaster_title_invalidated_effect = { - basic_invalidated_court_position_effect = yes -} - -# GRAND PRECEPTOR - -grand_preceptor_title_accepted_effect = { - basic_gained_court_position_effect = yes -} -grand_preceptor_title_revoked_effect = { - basic_revoked_court_position_effect = yes -} -grand_preceptor_title_invalidated_effect = { - basic_invalidated_court_position_effect = yes -} - -# GRAND GUARDIAN - -grand_guardian_title_accepted_effect = { - basic_gained_court_position_effect = yes -} -grand_guardian_title_revoked_effect = { - basic_revoked_court_position_effect = yes -} -grand_guardian_title_invalidated_effect = { - basic_invalidated_court_position_effect = yes -} - -# GRAND MENTOR - -grand_mentor_title_accepted_effect = { - basic_gained_court_position_effect = yes -} -grand_mentor_title_revoked_effect = { - basic_revoked_court_position_effect = yes -} -grand_mentor_title_invalidated_effect = { - basic_invalidated_court_position_effect = yes -} - -# FIRE DRAGON ENGINEER - -fire_dragon_engineer_title_accepted_effect = { - basic_gained_court_position_effect = yes -} -fire_dragon_engineer_title_revoked_effect = { - basic_revoked_court_position_effect = yes -} -fire_dragon_engineer_title_invalidated_effect = { - basic_invalidated_court_position_effect = yes -} - -# KEEPER OF THE HAREM - -keeper_of_the_harem_title_accepted_effect = { - basic_gained_court_position_effect = yes -} -keeper_of_the_harem_title_revoked_effect = { - basic_revoked_court_position_effect = yes -} -keeper_of_the_harem_title_invalidated_effect = { - basic_invalidated_court_position_effect = yes -} - -court_position_old_holder_effect = { # Save existing holder if relevant - $EMPLOYER$ = { - if = { - limit = { employs_court_position = $POS$_court_position } - random_court_position_holder = { - type = $POS$_court_position - save_scope_as = old_holder - } - } - } -} - -camp_officer_old_holder_effect = { # Save existing holder if relevant - $EMPLOYER$ = { - if = { - limit = { employs_court_position = $POS$_camp_officer } - random_court_position_holder = { - type = $POS$_camp_officer - save_scope_as = old_holder - } - } - } -} - -court_position_grant_effect = { # Give position, and revoke old holder's if they exist - if = { #Bodyguards - we replace the worst one - limit = { - $EMPLOYER$ = { - any_court_position_holder = { - type = $POS$_court_position - count >= 2 - } - } - } - $EMPLOYER$ = { - ordered_court_position_holder = { - type = $POS$_court_position - order_by = { - value = aptitude:$POS$_court_position - multiply = -1 - } - save_scope_as = old_holder #Should be the one with worst aptitude - } - } - } - else_if = { - limit = { - $EMPLOYER$.court_position:$POS$_court_position ?= { has_court_position = $POS$_court_position } - } - $EMPLOYER$.court_position:$POS$_court_position = { save_scope_as = old_holder } - } - $CANDIDATE$ = { - save_scope_as = candidate - if = { - limit = { - NOR = { - is_vassal_of = $EMPLOYER$ - is_courtier_of = $EMPLOYER$ - employer = $EMPLOYER$ - } - } - hidden_effect = { set_employer = $EMPLOYER$ } - } - } - $EMPLOYER$ = { - if = { - limit = { - scope:old_holder ?= { has_court_position = bodyguard_court_position } - any_court_position_holder = { - type = bodyguard_court_position - has_court_position = bodyguard_court_position - count > 1 - } - } - send_interface_toast = { - title = move_and_grant_court_position_effect_tooltip - left_icon = $CANDIDATE$ - right_icon = scope:old_holder - replace_court_position = { - recipient = $CANDIDATE$ - holder = scope:old_holder - court_position = $POS$_court_position - } - } - } - else = { - send_interface_toast = { - title = move_and_grant_court_position_effect_tooltip - left_icon = $CANDIDATE$ - appoint_court_position = { - recipient = $CANDIDATE$ - court_position = $POS$_court_position - } - } - } - } - $CANDIDATE$ = { - $EMPLOYER$ = { - save_scope_as = liege - if = { - limit = { exists = scope:old_holder } - custom_tooltip = $POS$_old_holder_aptitude_tooltip - } - else = { custom_tooltip = $POS$_aptitude_tooltip } - } - } - #LAAMPs don't pay salaries - if = { - limit = { - $EMPLOYER$ = { is_landless_adventurer = no } - } - custom_tooltip = $POS$_salary_tooltip - } -} - -camp_officer_grant_effect = { # Give position, and revoke old holder's if they exist - if = { - limit = { - $EMPLOYER$.court_position:$POS$_camp_officer ?= { has_court_position = $POS$_camp_officer } - } - $EMPLOYER$.court_position:$POS$_camp_officer = { save_scope_as = old_holder } - } - $CANDIDATE$ = { - save_scope_as = candidate - if = { - limit = { - NOR = { - is_vassal_of = $EMPLOYER$ - is_courtier_of = $EMPLOYER$ - employer = $EMPLOYER$ - } - } - hidden_effect = { set_employer = $EMPLOYER$ } - } - } - $EMPLOYER$ = { - if = { - limit = { exists = scope:old_holder } - send_interface_toast = { - title = move_and_grant_court_position_effect_tooltip - left_icon = $CANDIDATE$ - right_icon = scope:old_holder - replace_court_position = { - recipient = $CANDIDATE$ - holder = scope:old_holder - court_position = $POS$_camp_officer - } - } - } - else = { - send_interface_toast = { - title = move_and_grant_court_position_effect_tooltip - left_icon = $CANDIDATE$ - appoint_court_position = { - recipient = $CANDIDATE$ - court_position = $POS$_camp_officer - } - } - } - } - $CANDIDATE$ = { - $EMPLOYER$ = { - save_scope_as = liege - if = { - limit = { exists = scope:old_holder } - custom_tooltip = $POS$_old_holder_aptitude_tooltip - } - else = { custom_tooltip = $POS$_aptitude_tooltip } - } - } - #LAAMPs don't pay salaries - if = { - limit = { - $EMPLOYER$ = { is_landless_adventurer = no } - } - custom_tooltip = $POS$_salary_tooltip - } -} - -court_position_generator_variable_effect = { - set_variable = { - name = $VAR$_court_position - value = flag:$POS$ - years = 1 - } - court_position_old_holder_effect = { POS = $POS$ EMPLOYER = $EMPLOYER$ } -} - -camp_officer_generator_variable_effect = { - set_variable = { - name = $VAR$_camp_officer - value = flag:$POS$ - years = 1 - } - camp_officer_old_holder_effect = { POS = $POS$ EMPLOYER = $EMPLOYER$ } -} - -# Sets variable of court position suitable to a character's skills -# Actual job is set with court_position_generator_assignment_effect after using this effect -# VAR - can be used to allow multiple event options: 'target', 'second', 'backup' -# EMPLOYER - should be the char hiring the position -# ROOT - should be the char taking the position -# Saves scope:old_holder as existing holder if they exist -# NOTE: candidates must be courtiers of the employer for this to work -court_position_generator_effect = { - save_scope_as = candidate - $EMPLOYER$ = { save_scope_as = liege } - # Randomly select a fitting role and save it to a variable - random_list = { - 2 = { # ARCHITECT - trigger = { - court_position_generator_pickable_trigger = { POS = royal_architect EMPLOYER = $EMPLOYER$ } - } - court_position_generator_shared_modifier = { - POS = royal_architect - EMPLOYER = $EMPLOYER$ - } - court_position_generator_variable_effect = { - VAR = $VAR$ - POS = royal_architect - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # SENESCHAL - trigger = { - court_position_generator_pickable_trigger = { POS = seneschal EMPLOYER = $EMPLOYER$ } - } - court_position_generator_shared_modifier = { - POS = seneschal - EMPLOYER = $EMPLOYER$ - } - court_position_generator_variable_effect = { - VAR = $VAR$ - POS = seneschal - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # TUTOR - trigger = { - court_position_generator_pickable_trigger = { POS = court_tutor EMPLOYER = $EMPLOYER$ } - } - court_position_generator_shared_modifier = { - POS = court_tutor - EMPLOYER = $EMPLOYER$ - } - court_position_generator_variable_effect = { - VAR = $VAR$ - POS = court_tutor - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # HIGH ALMONER - trigger = { - court_position_generator_pickable_trigger = { POS = high_almoner EMPLOYER = $EMPLOYER$ } - } - court_position_generator_shared_modifier = { - POS = high_almoner - EMPLOYER = $EMPLOYER$ - } - court_position_generator_variable_effect = { - VAR = $VAR$ - POS = high_almoner - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # COURT PHYSICIAN - trigger = { - court_position_generator_pickable_trigger = { POS = court_physician EMPLOYER = $EMPLOYER$ } - } - court_position_generator_shared_modifier = { - POS = court_physician - EMPLOYER = $EMPLOYER$ - } - court_position_generator_variable_effect = { - VAR = $VAR$ - POS = court_physician - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # ANTIQUARIAN - trigger = { - court_position_generator_pickable_trigger = { POS = antiquarian EMPLOYER = $EMPLOYER$ } - } - court_position_generator_shared_modifier = { - POS = antiquarian - EMPLOYER = $EMPLOYER$ - } - court_position_generator_variable_effect = { - VAR = $VAR$ - POS = antiquarian - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # HORSE MASTER - trigger = { - court_position_generator_pickable_trigger = { POS = master_of_horse EMPLOYER = $EMPLOYER$ } - } - court_position_generator_shared_modifier = { - POS = master_of_horse - EMPLOYER = $EMPLOYER$ - } - court_position_generator_variable_effect = { - VAR = $VAR$ - POS = master_of_horse - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # BODYGUARD - trigger = { - court_position_generator_pickable_trigger = { POS = bodyguard EMPLOYER = $EMPLOYER$ } - } - court_position_generator_shared_modifier = { - POS = bodyguard - EMPLOYER = $EMPLOYER$ - } - court_position_generator_variable_effect = { - VAR = $VAR$ - POS = bodyguard - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # HUNT MASTER - trigger = { - court_position_generator_pickable_trigger = { POS = master_of_hunt EMPLOYER = $EMPLOYER$ } - } - court_position_generator_shared_modifier = { - POS = master_of_hunt - EMPLOYER = $EMPLOYER$ - } - court_position_generator_variable_effect = { - VAR = $VAR$ - POS = master_of_hunt - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # CHAMPION - trigger = { - court_position_generator_pickable_trigger = { POS = champion EMPLOYER = $EMPLOYER$ } - } - court_position_generator_shared_modifier = { - POS = champion - EMPLOYER = $EMPLOYER$ - } - court_position_generator_variable_effect = { - VAR = $VAR$ - POS = champion - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # POET - trigger = { - court_position_generator_pickable_trigger = { POS = court_poet EMPLOYER = $EMPLOYER$ } - } - court_position_generator_shared_modifier = { - POS = court_poet - EMPLOYER = $EMPLOYER$ - } - court_position_generator_variable_effect = { - VAR = $VAR$ - POS = court_poet - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # MUSICIAN - trigger = { - court_position_generator_pickable_trigger = { POS = court_musician EMPLOYER = $EMPLOYER$ } - } - court_position_generator_shared_modifier = { - POS = court_musician - EMPLOYER = $EMPLOYER$ - } - court_position_generator_variable_effect = { - VAR = $VAR$ - POS = court_musician - EMPLOYER = $EMPLOYER$ - } - } - 1 = { # COURT JESTER - trigger = { - court_position_generator_pickable_trigger = { POS = court_jester EMPLOYER = $EMPLOYER$ } - } - court_position_generator_shared_modifier = { - POS = court_jester - EMPLOYER = $EMPLOYER$ - } - court_position_generator_variable_effect = { - VAR = $VAR$ - POS = court_jester - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # EXECUTIONER - trigger = { - court_position_generator_pickable_trigger = { POS = executioner EMPLOYER = $EMPLOYER$ } - } - court_position_generator_shared_modifier = { - POS = executioner - EMPLOYER = $EMPLOYER$ - } - court_position_generator_variable_effect = { - VAR = $VAR$ - POS = executioner - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # FOOD TASTER - trigger = { - court_position_generator_pickable_trigger = { POS = food_taster EMPLOYER = $EMPLOYER$ } - } - court_position_generator_shared_modifier = { - POS = food_taster - EMPLOYER = $EMPLOYER$ - } - court_position_generator_variable_effect = { - VAR = $VAR$ - POS = food_taster - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # CUPBEARER - trigger = { - court_position_generator_pickable_trigger = { POS = cupbearer EMPLOYER = $EMPLOYER$ } - } - court_position_generator_shared_modifier = { - POS = cupbearer - EMPLOYER = $EMPLOYER$ - } - court_position_generator_variable_effect = { - VAR = $VAR$ - POS = cupbearer - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # LADY-IN-WAITING - trigger = { - court_position_generator_pickable_trigger = { POS = lady_in_waiting EMPLOYER = $EMPLOYER$ } - } - court_position_generator_shared_modifier = { - POS = lady_in_waiting - EMPLOYER = $EMPLOYER$ - } - court_position_generator_variable_effect = { - VAR = $VAR$ - POS = lady_in_waiting - EMPLOYER = $EMPLOYER$ - } - } - 4 = { # EUNUCH - trigger = { - court_position_generator_pickable_trigger = { POS = chief_eunuch EMPLOYER = $EMPLOYER$ } - } - court_position_generator_shared_modifier = { - POS = chief_eunuch - EMPLOYER = $EMPLOYER$ - } - court_position_generator_variable_effect = { - VAR = $VAR$ - POS = chief_eunuch - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # GARDENER - trigger = { - court_position_generator_pickable_trigger = { POS = court_gardener EMPLOYER = $EMPLOYER$ } - } - court_position_generator_shared_modifier = { - POS = court_gardener - EMPLOYER = $EMPLOYER$ - } - court_position_generator_variable_effect = { - VAR = $VAR$ - POS = court_gardener - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # ARTIFICER - trigger = { - court_position_generator_pickable_trigger = { POS = court_artificer EMPLOYER = $EMPLOYER$ } - } - court_position_generator_shared_modifier = { - POS = court_artificer - EMPLOYER = $EMPLOYER$ - } - court_position_generator_variable_effect = { - VAR = $VAR$ - POS = court_artificer - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # CULTURAL EMISSARY - trigger = { - court_position_generator_pickable_trigger = { POS = cultural_emissary EMPLOYER = $EMPLOYER$ } - } - court_position_generator_shared_modifier = { - POS = cultural_emissary - EMPLOYER = $EMPLOYER$ - } - court_position_generator_variable_effect = { - VAR = $VAR$ - POS = cultural_emissary - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # CHIEF QADI - trigger = { - court_position_generator_pickable_trigger = { POS = chief_qadi EMPLOYER = $EMPLOYER$ } - } - court_position_generator_shared_modifier = { - POS = chief_qadi - EMPLOYER = $EMPLOYER$ - } - court_position_generator_variable_effect = { - VAR = $VAR$ - POS = chief_qadi - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # GARUDA - trigger = { - court_position_generator_pickable_trigger = { POS = garuda EMPLOYER = $EMPLOYER$ } - } - court_position_generator_shared_modifier = { - POS = garuda - EMPLOYER = $EMPLOYER$ - } - court_position_generator_variable_effect = { - VAR = $VAR$ - POS = garuda - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # KEEPER OF SWANS - trigger = { - court_position_generator_pickable_trigger = { POS = keeper_of_swans EMPLOYER = $EMPLOYER$ } - } - court_position_generator_shared_modifier = { - POS = keeper_of_swans - EMPLOYER = $EMPLOYER$ - } - court_position_generator_variable_effect = { - VAR = $VAR$ - POS = keeper_of_swans - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # CARAVAN MASTER - trigger = { - court_position_generator_pickable_trigger = { POS = travel_leader EMPLOYER = $EMPLOYER$ } - } - court_position_generator_shared_modifier = { - POS = travel_leader - EMPLOYER = $EMPLOYER$ - } - court_position_generator_variable_effect = { - VAR = $VAR$ - POS = travel_leader - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # WET NURSE - trigger = { - court_position_generator_pickable_trigger = { POS = wet_nurse EMPLOYER = $EMPLOYER$ } - } - modifier = { - add = 5 - has_trait = loyal - } - modifier = { - add = 10 - has_relation_friend = $EMPLOYER$ - } - modifier = { - add = 20 - has_relation_best_friend = $EMPLOYER$ - } - modifier = { - add = 30 - has_relation_lover = $EMPLOYER$ - } - modifier = { - add = 40 - has_relation_soulmate = $EMPLOYER$ - } - court_position_generator_shared_modifier = { - POS = wet_nurse - EMPLOYER = $EMPLOYER$ - } - court_position_generator_variable_effect = { - VAR = $VAR$ - POS = wet_nurse - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # CAVE HERMIT - trigger = { - court_position_generator_pickable_trigger = { POS = cave_hermit EMPLOYER = $EMPLOYER$ } - } - court_position_generator_shared_modifier = { - POS = cave_hermit - EMPLOYER = $EMPLOYER$ - } - court_position_generator_variable_effect = { - VAR = $VAR$ - POS = cave_hermit - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # MASTER ASSASSIN - trigger = { - court_position_generator_pickable_trigger = { POS = master_assassin EMPLOYER = $EMPLOYER$ } - } - court_position_generator_shared_modifier = { - POS = master_assassin - EMPLOYER = $EMPLOYER$ - } - court_position_generator_variable_effect = { - VAR = $VAR$ - POS = master_assassin - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # COURT SCHOLAR - trigger = { - court_position_generator_pickable_trigger = { POS = court_scholar EMPLOYER = $EMPLOYER$ } - } - court_position_generator_shared_modifier = { - POS = court_scholar - EMPLOYER = $EMPLOYER$ - } - court_position_generator_variable_effect = { - VAR = $VAR$ - POS = court_scholar - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # CHRONICLER - trigger = { - court_position_generator_pickable_trigger = { POS = chronicler EMPLOYER = $EMPLOYER$ } - } - court_position_generator_shared_modifier = { - POS = chronicler - EMPLOYER = $EMPLOYER$ - } - court_position_generator_variable_effect = { - VAR = $VAR$ - POS = chronicler - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # AKOLOUTHOS - trigger = { - court_position_generator_pickable_trigger = { POS = akolouthos EMPLOYER = $EMPLOYER$ } - } - court_position_generator_shared_modifier = { - POS = akolouthos - EMPLOYER = $EMPLOYER$ - } - court_position_generator_variable_effect = { - VAR = $VAR$ - POS = akolouthos - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # COURT ASTROLOGER - trigger = { - court_position_generator_pickable_trigger = { POS = court_astrologer EMPLOYER = $EMPLOYER$ } - } - court_position_generator_shared_modifier = { - POS = court_astrologer - EMPLOYER = $EMPLOYER$ - } - court_position_generator_variable_effect = { - VAR = $VAR$ - POS = court_astrologer - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # GRAND PRECEPTOR - trigger = { - court_position_generator_pickable_trigger = { POS = grand_preceptor EMPLOYER = $EMPLOYER$ } - } - court_position_generator_shared_modifier = { - POS = grand_preceptor - EMPLOYER = $EMPLOYER$ - } - court_position_generator_variable_effect = { - VAR = $VAR$ - POS = grand_preceptor - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # GRAND GUARDIAN - trigger = { - court_position_generator_pickable_trigger = { POS = grand_guardian EMPLOYER = $EMPLOYER$ } - } - court_position_generator_shared_modifier = { - POS = grand_guardian - EMPLOYER = $EMPLOYER$ - } - court_position_generator_variable_effect = { - VAR = $VAR$ - POS = grand_guardian - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # GRAND MENTOR - trigger = { - court_position_generator_pickable_trigger = { POS = grand_mentor EMPLOYER = $EMPLOYER$ } - } - court_position_generator_shared_modifier = { - POS = grand_mentor - EMPLOYER = $EMPLOYER$ - } - court_position_generator_variable_effect = { - VAR = $VAR$ - POS = grand_mentor - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # FIRE DRAGON ENGINEER - trigger = { - court_position_generator_pickable_trigger = { POS = fire_dragon_engineer EMPLOYER = $EMPLOYER$ } - } - court_position_generator_shared_modifier = { - POS = fire_dragon_engineer - EMPLOYER = $EMPLOYER$ - } - court_position_generator_variable_effect = { - VAR = $VAR$ - POS = fire_dragon_engineer - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # KEEPER OF THE HAREM - trigger = { - court_position_generator_pickable_trigger = { POS = keeper_of_the_harem EMPLOYER = $EMPLOYER$ } - } - court_position_generator_shared_modifier = { - POS = keeper_of_the_harem - EMPLOYER = $EMPLOYER$ - } - court_position_generator_variable_effect = { - VAR = $VAR$ - POS = keeper_of_the_harem - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # BOYAN - trigger = { - court_position_generator_pickable_trigger = { POS = boyan EMPLOYER = $EMPLOYER$ } - } - court_position_generator_shared_modifier = { - POS = boyan - EMPLOYER = $EMPLOYER$ - } - court_position_generator_variable_effect = { - VAR = $VAR$ - POS = boyan - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # SIEGE ENGINEER - trigger = { - court_position_generator_pickable_trigger = { POS = siege_engineer EMPLOYER = $EMPLOYER$ } - } - court_position_generator_shared_modifier = { - POS = siege_engineer - EMPLOYER = $EMPLOYER$ - } - court_position_generator_variable_effect = { - VAR = $VAR$ - POS = siege_engineer - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # YURTCHI - trigger = { - court_position_generator_pickable_trigger = { POS = yurtchi EMPLOYER = $EMPLOYER$ } - } - court_position_generator_shared_modifier = { - POS = yurtchi - EMPLOYER = $EMPLOYER$ - } - court_position_generator_variable_effect = { - VAR = $VAR$ - POS = yurtchi - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # CHERBI - trigger = { - court_position_generator_pickable_trigger = { POS = cherbi EMPLOYER = $EMPLOYER$ } - } - court_position_generator_shared_modifier = { - POS = cherbi - EMPLOYER = $EMPLOYER$ - } - court_position_generator_variable_effect = { - VAR = $VAR$ - POS = cherbi - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # YEKE JARQUCHI - trigger = { - court_position_generator_pickable_trigger = { POS = yeke_jarquchi EMPLOYER = $EMPLOYER$ } - } - court_position_generator_shared_modifier = { - POS = yeke_jarquchi - EMPLOYER = $EMPLOYER$ - } - court_position_generator_variable_effect = { - VAR = $VAR$ - POS = yeke_jarquchi - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # FOREIGN EMISSARY - trigger = { - court_position_generator_pickable_trigger = { POS = foreign_emissary EMPLOYER = $EMPLOYER$ } - } - court_position_generator_shared_modifier = { - POS = foreign_emissary - EMPLOYER = $EMPLOYER$ - } - court_position_generator_variable_effect = { - VAR = $VAR$ - POS = foreign_emissary - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # KEEPER OF THE HORSES - trigger = { - court_position_generator_pickable_trigger = { POS = keeper_of_the_horses EMPLOYER = $EMPLOYER$ } - } - court_position_generator_shared_modifier = { - POS = keeper_of_the_horses - EMPLOYER = $EMPLOYER$ - } - court_position_generator_variable_effect = { - VAR = $VAR$ - POS = keeper_of_the_horses - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # Court Guru - trigger = { - court_position_generator_pickable_trigger = { POS = court_guru EMPLOYER = $EMPLOYER$ } - } - court_position_generator_shared_modifier = { - POS = court_guru - EMPLOYER = $EMPLOYER$ - } - court_position_generator_variable_effect = { - VAR = $VAR$ - POS = court_guru - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # Court Brahmin - trigger = { - court_position_generator_pickable_trigger = { POS = court_brahmin EMPLOYER = $EMPLOYER$ } - } - court_position_generator_shared_modifier = { - POS = court_brahmin - EMPLOYER = $EMPLOYER$ - } - court_position_generator_variable_effect = { - VAR = $VAR$ - POS = court_brahmin - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # Khlon Glan - trigger = { - court_position_generator_pickable_trigger = { POS = khlon_glan EMPLOYER = $EMPLOYER$ } - } - court_position_generator_shared_modifier = { - POS = khlon_glan - EMPLOYER = $EMPLOYER$ - } - court_position_generator_variable_effect = { - VAR = $VAR$ - POS = khlon_glan - EMPLOYER = $EMPLOYER$ - } - } - } -} - -# Gives job of court position suitable to a character's skills -# Job is picked in court_position_generator_effect -# VAR - valid parameters: 'target', 'second', 'backup' -# EMPLOYER - should be the char hiring the position -# CANDIDATE - should be the char taking the position -court_position_generator_assignment_effect = { - switch = { - trigger = $CANDIDATE$.var:$VAR$_court_position - # Architect - flag:royal_architect = { - court_position_grant_effect = { POS = royal_architect CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # Seneschal - flag:seneschal = { - court_position_grant_effect = { POS = seneschal CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # Court Tutor - flag:court_tutor = { - court_position_grant_effect = { POS = court_tutor CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # High Almoner - flag:high_almoner = { - court_position_grant_effect = { POS = high_almoner CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # Physician - flag:court_physician = { - court_position_grant_effect = { POS = court_physician CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # Antiquarian - flag:antiquarian = { - court_position_grant_effect = { POS = antiquarian CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # Master of the Horse - flag:master_of_horse = { - court_position_grant_effect = { POS = master_of_horse CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # Bodyguard - flag:bodyguard = { - court_position_grant_effect = { POS = bodyguard CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # Champion - flag:champion = { - court_position_grant_effect = { POS = champion CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # Master of the Hunt - flag:master_of_hunt = { - court_position_grant_effect = { POS = master_of_hunt CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # Poet - flag:court_poet = { - court_position_grant_effect = { POS = court_poet CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # Musician - flag:court_musician = { - court_position_grant_effect = { POS = court_musician CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # Court Jester - flag:court_jester = { - court_position_grant_effect = { POS = court_jester CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # Executioner - flag:executioner = { - court_position_grant_effect = { POS = executioner CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # Food Taster - flag:food_taster = { - court_position_grant_effect = { POS = food_taster CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # Cupbearer - flag:cupbearer = { - court_position_grant_effect = { POS = cupbearer CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # Lady-in-waiting - flag:lady_in_waiting = { - court_position_grant_effect = { POS = lady_in_waiting CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # Eunuch - flag:chief_eunuch = { - court_position_grant_effect = { POS = chief_eunuch CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # Gardener - flag:court_gardener = { - court_position_grant_effect = { POS = court_gardener CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # Court Artificer - flag:court_artificer = { - court_position_grant_effect = { POS = court_artificer CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # Cultural Emissary - flag:cultural_emissary = { - court_position_grant_effect = { POS = cultural_emissary CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # Chief Qadi - flag:chief_qadi = { - court_position_grant_effect = { POS = chief_qadi CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # Garuda - flag:garuda = { - court_position_grant_effect = { POS = garuda CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # Keeper of the Swans - flag:keeper_of_swans = { - court_position_grant_effect = { POS = keeper_of_swans CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # Caravan Master - flag:travel_leader = { - court_position_grant_effect = { POS = travel_leader CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # Wet Nurse - flag:wet_nurse = { - court_position_grant_effect = { POS = wet_nurse CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # Cave Hermit - flag:cave_hermit = { - court_position_grant_effect = { POS = cave_hermit CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # Master Assassin - flag:master_assassin = { - court_position_grant_effect = { POS = master_assassin CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # Court Scholar - flag:court_scholar = { - court_position_grant_effect = { POS = court_scholar CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # Chronciler - flag:chronicler = { - court_position_grant_effect = { POS = chronicler CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # Akolouthos - flag:akolouthos = { - court_position_grant_effect = { POS = akolouthos CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # Court Astrologer - flag:court_astrologer = { - court_position_grant_effect = { POS = court_astrologer CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # Grand Preceptor - flag:grand_preceptor = { - court_position_grant_effect = { POS = grand_preceptor CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # Grand Guardian - flag:grand_guardian = { - court_position_grant_effect = { POS = grand_guardian CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # Grand Mentor - flag:grand_mentor = { - court_position_grant_effect = { POS = grand_mentor CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # Fire Dragon Engineer - flag:fire_dragon_engineer = { - court_position_grant_effect = { POS = fire_dragon_engineer CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # Keeper of the Harem - flag:keeper_of_the_harem = { - court_position_grant_effect = { POS = keeper_of_the_harem CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # Boyan - flag:boyan = { - court_position_grant_effect = { POS = boyan CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # Siege Engineer - flag:siege_engineer = { - court_position_grant_effect = { POS = siege_engineer CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # Yurtchi - flag:yurtchi = { - court_position_grant_effect = { POS = yurtchi CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # Cherbi - flag:cherbi = { - court_position_grant_effect = { POS = cherbi CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # Yeke Jarquchi - flag:yeke_jarquchi = { - court_position_grant_effect = { POS = yeke_jarquchi CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # Foreign Emissary - flag:foreign_emissary = { - court_position_grant_effect = { POS = foreign_emissary CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # Keeper of the Horses - flag:keeper_of_the_horses = { - court_position_grant_effect = { POS = keeper_of_the_horses CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # Court Guru - flag:court_guru = { - court_position_grant_effect = { POS = court_guru CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # Court Brahmin - flag:court_brahmin = { - court_position_grant_effect = { POS = court_brahmin CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # Khlon Glan - flag:khlon_glan = { - court_position_grant_effect = { POS = khlon_glan CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - } -} - -# Sets variable of court position suitable to a character's skills -# Actual job is set with camp_officer_generator_assignment_effect after using this effect -# VAR - can be used to allow multiple event options: 'target', 'second', 'backup' -# EMPLOYER - should be the char hiring the position -# ROOT - should be the char taking the position -# Saves scope:old_holder as existing holder if they exist -camp_officer_generator_effect = { - save_scope_as = candidate - $EMPLOYER$ = { save_scope_as = liege } - # Randomly select a fitting role and save it to a variable - random_list = { - 2 = { # second - trigger = { - camp_officer_generator_pickable_trigger = { POS = second EMPLOYER = $EMPLOYER$ } - } - camp_officer_generator_shared_modifier = { - POS = second - EMPLOYER = $EMPLOYER$ - } - camp_officer_generator_variable_effect = { - VAR = $VAR$ - POS = second - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # quartermaster - trigger = { - camp_officer_generator_pickable_trigger = { POS = quartermaster EMPLOYER = $EMPLOYER$ } - } - camp_officer_generator_shared_modifier = { - POS = quartermaster - EMPLOYER = $EMPLOYER$ - } - camp_officer_generator_variable_effect = { - VAR = $VAR$ - POS = quartermaster - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # armorer - trigger = { - camp_officer_generator_pickable_trigger = { POS = armorer EMPLOYER = $EMPLOYER$ } - } - camp_officer_generator_shared_modifier = { - POS = armorer - EMPLOYER = $EMPLOYER$ - } - camp_officer_generator_variable_effect = { - VAR = $VAR$ - POS = armorer - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # chief_forager - trigger = { - camp_officer_generator_pickable_trigger = { POS = chief_forager EMPLOYER = $EMPLOYER$ } - } - camp_officer_generator_shared_modifier = { - POS = chief_forager - EMPLOYER = $EMPLOYER$ - } - camp_officer_generator_variable_effect = { - VAR = $VAR$ - POS = chief_forager - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # master_thief - trigger = { - camp_officer_generator_pickable_trigger = { POS = master_thief EMPLOYER = $EMPLOYER$ } - } - camp_officer_generator_shared_modifier = { - POS = master_thief - EMPLOYER = $EMPLOYER$ - } - camp_officer_generator_variable_effect = { - VAR = $VAR$ - POS = master_thief - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # head_porter - trigger = { - camp_officer_generator_pickable_trigger = { POS = head_porter EMPLOYER = $EMPLOYER$ } - } - camp_officer_generator_shared_modifier = { - POS = head_porter - EMPLOYER = $EMPLOYER$ - } - camp_officer_generator_variable_effect = { - VAR = $VAR$ - POS = head_porter - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # head_groom - trigger = { - camp_officer_generator_pickable_trigger = { POS = head_groom EMPLOYER = $EMPLOYER$ } - } - camp_officer_generator_shared_modifier = { - POS = head_groom - EMPLOYER = $EMPLOYER$ - } - camp_officer_generator_variable_effect = { - VAR = $VAR$ - POS = head_groom - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # huntperson - trigger = { - camp_officer_generator_pickable_trigger = { POS = huntperson EMPLOYER = $EMPLOYER$ } - } - camp_officer_generator_shared_modifier = { - POS = huntperson - EMPLOYER = $EMPLOYER$ - } - camp_officer_generator_variable_effect = { - VAR = $VAR$ - POS = huntperson - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # kennelperson - trigger = { - camp_officer_generator_pickable_trigger = { POS = kennelperson EMPLOYER = $EMPLOYER$ } - } - camp_officer_generator_shared_modifier = { - POS = kennelperson - EMPLOYER = $EMPLOYER$ - } - camp_officer_generator_variable_effect = { - VAR = $VAR$ - POS = kennelperson - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # chief_engineer - trigger = { - camp_officer_generator_pickable_trigger = { POS = chief_engineer EMPLOYER = $EMPLOYER$ } - } - camp_officer_generator_shared_modifier = { - POS = chief_engineer - EMPLOYER = $EMPLOYER$ - } - camp_officer_generator_variable_effect = { - VAR = $VAR$ - POS = chief_engineer - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # witness - trigger = { - camp_officer_generator_pickable_trigger = { POS = witness EMPLOYER = $EMPLOYER$ } - } - camp_officer_generator_shared_modifier = { - POS = witness - EMPLOYER = $EMPLOYER$ - } - camp_officer_generator_variable_effect = { - VAR = $VAR$ - POS = witness - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # person_haggler - trigger = { - camp_officer_generator_pickable_trigger = { POS = person_haggler EMPLOYER = $EMPLOYER$ } - } - camp_officer_generator_shared_modifier = { - POS = person_haggler - EMPLOYER = $EMPLOYER$ - } - camp_officer_generator_variable_effect = { - VAR = $VAR$ - POS = person_haggler - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # camp_cook - trigger = { - camp_officer_generator_pickable_trigger = { POS = camp_cook EMPLOYER = $EMPLOYER$ } - } - camp_officer_generator_shared_modifier = { - POS = camp_cook - EMPLOYER = $EMPLOYER$ - } - camp_officer_generator_variable_effect = { - VAR = $VAR$ - POS = camp_cook - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # master_bard - trigger = { - camp_officer_generator_pickable_trigger = { POS = master_bard EMPLOYER = $EMPLOYER$ } - } - camp_officer_generator_shared_modifier = { - POS = master_bard - EMPLOYER = $EMPLOYER$ - } - camp_officer_generator_variable_effect = { - VAR = $VAR$ - POS = master_bard - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # stooge - trigger = { - camp_officer_generator_pickable_trigger = { POS = stooge EMPLOYER = $EMPLOYER$ } - } - camp_officer_generator_shared_modifier = { - POS = stooge - EMPLOYER = $EMPLOYER$ - } - camp_officer_generator_variable_effect = { - VAR = $VAR$ - POS = stooge - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # master_of_arms - trigger = { - camp_officer_generator_pickable_trigger = { POS = master_of_arms EMPLOYER = $EMPLOYER$ } - } - camp_officer_generator_shared_modifier = { - POS = master_of_arms - EMPLOYER = $EMPLOYER$ - } - camp_officer_generator_variable_effect = { - VAR = $VAR$ - POS = master_of_arms - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # light_cavalry_captain - trigger = { - camp_officer_generator_pickable_trigger = { POS = light_cavalry_captain EMPLOYER = $EMPLOYER$ } - } - camp_officer_generator_shared_modifier = { - POS = light_cavalry_captain - EMPLOYER = $EMPLOYER$ - } - camp_officer_generator_variable_effect = { - VAR = $VAR$ - POS = light_cavalry_captain - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # camelry_captain - trigger = { - camp_officer_generator_pickable_trigger = { POS = camelry_captain EMPLOYER = $EMPLOYER$ } - } - camp_officer_generator_shared_modifier = { - POS = camelry_captain - EMPLOYER = $EMPLOYER$ - } - camp_officer_generator_variable_effect = { - VAR = $VAR$ - POS = camelry_captain - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # elephantry_captain - trigger = { - camp_officer_generator_pickable_trigger = { POS = elephantry_captain EMPLOYER = $EMPLOYER$ } - } - camp_officer_generator_shared_modifier = { - POS = elephantry_captain - EMPLOYER = $EMPLOYER$ - } - camp_officer_generator_variable_effect = { - VAR = $VAR$ - POS = elephantry_captain - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # heavy_cavalry_captain - trigger = { - camp_officer_generator_pickable_trigger = { POS = heavy_cavalry_captain EMPLOYER = $EMPLOYER$ } - } - camp_officer_generator_shared_modifier = { - POS = heavy_cavalry_captain - EMPLOYER = $EMPLOYER$ - } - camp_officer_generator_variable_effect = { - VAR = $VAR$ - POS = heavy_cavalry_captain - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # horse_archer_captain - trigger = { - camp_officer_generator_pickable_trigger = { POS = horse_archer_captain EMPLOYER = $EMPLOYER$ } - } - camp_officer_generator_shared_modifier = { - POS = horse_archer_captain - EMPLOYER = $EMPLOYER$ - } - camp_officer_generator_variable_effect = { - VAR = $VAR$ - POS = horse_archer_captain - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # archer_captain - trigger = { - camp_officer_generator_pickable_trigger = { POS = archer_captain EMPLOYER = $EMPLOYER$ } - } - camp_officer_generator_shared_modifier = { - POS = archer_captain - EMPLOYER = $EMPLOYER$ - } - camp_officer_generator_variable_effect = { - VAR = $VAR$ - POS = archer_captain - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # heavy_infantry_captain - trigger = { - camp_officer_generator_pickable_trigger = { POS = heavy_infantry_captain EMPLOYER = $EMPLOYER$ } - } - camp_officer_generator_shared_modifier = { - POS = heavy_infantry_captain - EMPLOYER = $EMPLOYER$ - } - camp_officer_generator_variable_effect = { - VAR = $VAR$ - POS = heavy_infantry_captain - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # light_infantry_captain - trigger = { - camp_officer_generator_pickable_trigger = { POS = light_infantry_captain EMPLOYER = $EMPLOYER$ } - } - camp_officer_generator_shared_modifier = { - POS = light_infantry_captain - EMPLOYER = $EMPLOYER$ - } - camp_officer_generator_variable_effect = { - VAR = $VAR$ - POS = light_infantry_captain - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # pike_captain - trigger = { - camp_officer_generator_pickable_trigger = { POS = pike_captain EMPLOYER = $EMPLOYER$ } - } - camp_officer_generator_shared_modifier = { - POS = pike_captain - EMPLOYER = $EMPLOYER$ - } - camp_officer_generator_variable_effect = { - VAR = $VAR$ - POS = pike_captain - EMPLOYER = $EMPLOYER$ - } - } - 2 = { # master_of_spoils - trigger = { - camp_officer_generator_pickable_trigger = { POS = master_of_spoils EMPLOYER = $EMPLOYER$ } - } - camp_officer_generator_shared_modifier = { - POS = master_of_spoils - EMPLOYER = $EMPLOYER$ - } - camp_officer_generator_variable_effect = { - VAR = $VAR$ - POS = master_of_spoils - EMPLOYER = $EMPLOYER$ - } - } - } -} - -# Gives job of court position suitable to a character's skills -# Job is picked in camp_officer_generator_effect -# VAR - valid parameters: 'target', 'second', 'backup' -# EMPLOYER - should be the char hiring the position -# CANDIDATE - should be the char taking the position -camp_officer_generator_assignment_effect = { - switch = { - trigger = $CANDIDATE$.var:$VAR$_camp_officer - # second - flag:second = { - camp_officer_grant_effect = { POS = second CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # quartermaster - flag:quartermaster = { - camp_officer_grant_effect = { POS = quartermaster CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # armorer - flag:armorer = { - camp_officer_grant_effect = { POS = armorer CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # chief_forager - flag:chief_forager = { - camp_officer_grant_effect = { POS = chief_forager CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # master_thief - flag:master_thief = { - camp_officer_grant_effect = { POS = master_thief CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # head_porter - flag:head_porter = { - camp_officer_grant_effect = { POS = head_porter CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # head_groom - flag:head_groom = { - camp_officer_grant_effect = { POS = head_groom CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # huntperson - flag:huntperson = { - camp_officer_grant_effect = { POS = huntperson CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # kennelperson - flag:kennelperson = { - camp_officer_grant_effect = { POS = kennelperson CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # chief_engineer - flag:chief_engineer = { - camp_officer_grant_effect = { POS = chief_engineer CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # witness - flag:witness = { - camp_officer_grant_effect = { POS = witness CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # person_haggler - flag:person_haggler = { - camp_officer_grant_effect = { POS = person_haggler CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # camp_cook - flag:camp_cook = { - camp_officer_grant_effect = { POS = camp_cook CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # master_bard - flag:master_bard = { - camp_officer_grant_effect = { POS = master_bard CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # stooge - flag:stooge = { - camp_officer_grant_effect = { POS = stooge CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # master_of_arms - flag:master_of_arms = { - camp_officer_grant_effect = { POS = master_of_arms CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # light_cavalry_captain - flag:light_cavalry_captain = { - camp_officer_grant_effect = { POS = light_cavalry_captain CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # camelry_captain - flag:camelry_captain = { - camp_officer_grant_effect = { POS = camelry_captain CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # elephantry_captain - flag:elephantry_captain = { - camp_officer_grant_effect = { POS = elephantry_captain CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # heavy_cavalry_captain - flag:heavy_cavalry_captain = { - camp_officer_grant_effect = { POS = heavy_cavalry_captain CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # horse_archer_captain - flag:horse_archer_captain = { - camp_officer_grant_effect = { POS = horse_archer_captain CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # archer_captain - flag:archer_captain = { - camp_officer_grant_effect = { POS = archer_captain CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # heavy_infantry_captain - flag:heavy_infantry_captain = { - camp_officer_grant_effect = { POS = heavy_infantry_captain CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # light_infantry_captain - flag:light_infantry_captain = { - camp_officer_grant_effect = { POS = light_infantry_captain CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # pike_captain - flag:pike_captain = { - camp_officer_grant_effect = { POS = pike_captain CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - # master_of_spoils - flag:master_of_spoils = { - camp_officer_grant_effect = { POS = master_of_spoils CANDIDATE = $CANDIDATE$ EMPLOYER = $EMPLOYER$ } - } - } -} - -# Giving out generic court positions -decide_court_position_to_give_effect = { - $EMPLOYER$ = { - if = { - limit = { exists = $CANDIDATE$ } - if = { - limit = { - $CANDIDATE$ = { - OR = { - has_trait = education_learning - learning >= high_skill_rating - } - } - } - random_list = { - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CANDIDATE$ - COURT_POS = court_physician_court_position - } - } - $CANDIDATE$ = { add_character_flag = physician_flag } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CANDIDATE$ - COURT_POS = court_tutor_court_position - } - } - $CANDIDATE$ = { add_character_flag = tutor_flag } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CANDIDATE$ - COURT_POS = court_guru_court_position - } - } - $CANDIDATE$ = { add_character_flag = tutor_flag } # reusing same flag as tutor for simplicity later on - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CANDIDATE$ - COURT_POS = high_almoner_court_position - } - } - $CANDIDATE$ = { add_character_flag = almoner_flag } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CANDIDATE$ - COURT_POS = antiquarian_court_position - } - } - $CANDIDATE$ = { add_character_flag = antiquarian_flag } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CANDIDATE$ - COURT_POS = chief_qadi_court_position - } - } - $CANDIDATE$ = { add_character_flag = qadi_flag } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CANDIDATE$ - COURT_POS = fire_dragon_engineer_court_position - } - } - $CANDIDATE$ = { add_character_flag = fire_dragon_engineer_flag } - } - } - } - else_if = { - limit = { - $CANDIDATE$ = { - OR = { - has_trait = education_intrigue - intrigue >= high_skill_rating - } - } - } - random_list = { - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CANDIDATE$ - COURT_POS = food_taster_court_position - } - } - $CANDIDATE$ = { add_character_flag = taster_flag } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CANDIDATE$ - COURT_POS = executioner_court_position - } - } - $CANDIDATE$ = { add_character_flag = executioner_flag } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CANDIDATE$ - COURT_POS = court_tutor_court_position - } - } - $CANDIDATE$ = { add_character_flag = tutor_flag } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CANDIDATE$ - COURT_POS = court_guru_court_position - } - } - $CANDIDATE$ = { add_character_flag = tutor_flag } # reusing flag as tutor for simplicity later on - } - } - } - else_if = { - limit = { - $CANDIDATE$ = { - OR = { - has_trait = education_diplomacy - diplomacy >= high_skill_rating - } - } - } - random_list = { - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CANDIDATE$ - COURT_POS = cupbearer_court_position - } - } - $CANDIDATE$ = { add_character_flag = cupbearer_flag } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CANDIDATE$ - COURT_POS = lady_in_waiting_court_position - } - $CANDIDATE$ = { is_female = yes } - } - $CANDIDATE$ = { add_character_flag = lady_in_waiting_flag } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CANDIDATE$ - COURT_POS = court_tutor_court_position - } - } - $CANDIDATE$ = { add_character_flag = tutor_flag } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CANDIDATE$ - COURT_POS = court_guru_court_position - } - } - $CANDIDATE$ = { add_character_flag = tutor_flag } # reusing same flag as tutor for simplicity later on - } - 20 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CANDIDATE$ - COURT_POS = court_jester_court_position - } - } - $CANDIDATE$ = { add_character_flag = jester_flag } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CANDIDATE$ - COURT_POS = court_poet_court_position - } - } - $CANDIDATE$ = { add_character_flag = poet_flag } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CANDIDATE$ - COURT_POS = court_musician_court_position - } - } - $CANDIDATE$ = { add_character_flag = musician_flag } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CANDIDATE$ - COURT_POS = wet_nurse_court_position - } - $CANDIDATE$ = { is_female = yes } - } - $CANDIDATE$ = { add_character_flag = wet_nurse_flag } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CANDIDATE$ - COURT_POS = grand_preceptor_court_position - } - } - $CANDIDATE$ = { add_character_flag = grand_preceptor_flag } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CANDIDATE$ - COURT_POS = grand_guardian_court_position - } - } - $CANDIDATE$ = { add_character_flag = grand_guardian_flag } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CANDIDATE$ - COURT_POS = grand_mentor_court_position - } - } - $CANDIDATE$ = { add_character_flag = grand_mentor_flag } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CANDIDATE$ - COURT_POS = keeper_of_the_harem_court_position - } - } - $CANDIDATE$ = { add_character_flag = keeper_of_the_harem_flag } - } - } - } - else_if = { - limit = { - $CANDIDATE$ = { - OR = { - has_trait = education_stewardship - stewardship >= high_skill_rating - } - } - } - random_list = { - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CANDIDATE$ - COURT_POS = court_gardener_court_position - } - } - $CANDIDATE$ = { add_character_flag = gardener_flag } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CANDIDATE$ - COURT_POS = royal_architect_court_position - } - } - $CANDIDATE$ = { add_character_flag = architect_flag } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CANDIDATE$ - COURT_POS = court_tutor_court_position - } - } - $CANDIDATE$ = { add_character_flag = tutor_flag } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CANDIDATE$ - COURT_POS = court_guru_court_position - } - } - $CANDIDATE$ = { add_character_flag = tutor_flag } # reusing same flag as tutor for simplicity later on - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CANDIDATE$ - COURT_POS = keeper_of_swans_court_position - } - } - $CANDIDATE$ = { add_character_flag = swan_flag } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CANDIDATE$ - COURT_POS = seneschal_court_position - } - } - $CANDIDATE$ = { add_character_flag = seneschal_flag } - } - } - } - else_if = { - limit = { - $CANDIDATE$ = { - OR = { - has_trait = education_martial - martial >= high_skill_rating - } - } - } - random_list = { - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CANDIDATE$ - COURT_POS = master_of_horse_court_position - } - } - $CANDIDATE$ = { add_character_flag = horse_flag } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CANDIDATE$ - COURT_POS = garuda_court_position - } - } - $CANDIDATE$ = { add_character_flag = garuda_flag } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CANDIDATE$ - COURT_POS = court_tutor_court_position - } - } - $CANDIDATE$ = { add_character_flag = tutor_flag } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CANDIDATE$ - COURT_POS = court_guru_court_position - } - } - $CANDIDATE$ = { add_character_flag = tutor_flag } # reusing tutor flag for simplicity later on - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CANDIDATE$ - COURT_POS = master_of_hunt_court_position - } - } - $CANDIDATE$ = { add_character_flag = hunt_flag } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CANDIDATE$ - COURT_POS = bodyguard_court_position - } - } - $CANDIDATE$ = { add_character_flag = bodyguard_flag } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CANDIDATE$ - COURT_POS = champion_court_position - } - } - $CANDIDATE$ = { add_character_flag = champion_flag } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CANDIDATE$ - COURT_POS = akolouthos_court_position - } - } - $CANDIDATE$ = { add_character_flag = akolouthos_flag } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CANDIDATE$ - COURT_POS = court_astrologer_court_position - } - } - $CANDIDATE$ = { add_character_flag = court_astrologer_flag } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CANDIDATE$ - COURT_POS = boyan_court_position - } - } - $CANDIDATE$ = { add_character_flag = boyan_flag } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CANDIDATE$ - COURT_POS = siege_engineer_court_position - } - } - $CANDIDATE$ = { add_character_flag = siege_engineer_flag } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CANDIDATE$ - COURT_POS = yurtchi_court_position - } - } - $CANDIDATE$ = { add_character_flag = yurtchi_flag } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CANDIDATE$ - COURT_POS = yeke_jarquchi_court_position - } - } - $CANDIDATE$ = { add_character_flag = yeke_jarquchi_flag } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CANDIDATE$ - COURT_POS = foreign_emissary_court_position - } - } - $CANDIDATE$ = { add_character_flag = foreign_emissary_flag } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CANDIDATE$ - COURT_POS = keeper_of_the_horses_court_position - } - } - $CANDIDATE$ = { add_character_flag = keeper_of_the_horses_flag } - } - } - } - } - } -} - -### This effect does NOT care if you are already employing someone in that position -assign_appropriate_court_position_effect = { - if = { - limit = { - $CANDIDATE$ = { - OR = { - has_trait = education_learning - learning >= high_skill_rating - } - } - } - random_list = { - 10 = { - trigger = { - can_employ_court_position_type = court_physician_court_position - } - $CANDIDATE$ = { add_character_flag = physician_flag } - } - 10 = { - trigger = { - can_employ_court_position_type = high_almoner_court_position - } - $CANDIDATE$ = { add_character_flag = almoner_flag } - } - 10 = { - trigger = { - can_employ_court_position_type = antiquarian_court_position - } - $CANDIDATE$ = { add_character_flag = antiquarian_flag } - } - 10 = { - trigger = { - can_employ_court_position_type = chief_qadi_court_position - } - $CANDIDATE$ = { add_character_flag = qadi_flag } - } - 10 = { - trigger = { - can_employ_court_position_type = siege_engineer_court_position - } - $CANDIDATE$ = { add_character_flag = siege_engineer_flag } - } - } - } - else_if = { - limit = { - $CANDIDATE$ = { - OR = { - has_trait = education_intrigue - intrigue >= high_skill_rating - } - } - } - random_list = { - 10 = { - trigger = { - can_employ_court_position_type = food_taster_court_position - } - $CANDIDATE$ = { add_character_flag = taster_flag } - } - 10 = { - trigger = { - can_employ_court_position_type = executioner_court_position - } - $CANDIDATE$ = { add_character_flag = executioner_flag } - } - 10 = { - trigger = { - can_employ_court_position_type = court_astrologer_court_position - } - $CANDIDATE$ = { add_character_flag = court_astrologer_flag } - } - } - } - else_if = { - limit = { - $CANDIDATE$ = { - OR = { - has_trait = education_diplomacy - diplomacy >= high_skill_rating - } - } - } - random_list = { - 10 = { - trigger = { - can_employ_court_position_type = cupbearer_court_position - } - $CANDIDATE$ = { add_character_flag = cupbearer_flag } - } - 10 = { - trigger = { - can_employ_court_position_type = lady_in_waiting_court_position - $CANDIDATE$ = { is_female = yes } - } - $CANDIDATE$ = { add_character_flag = lady_in_waiting_flag } - } - 10 = { - trigger = { - can_employ_court_position_type = court_tutor_court_position - } - $CANDIDATE$ = { add_character_flag = tutor_flag } - } - 20 = { - trigger = { - can_employ_court_position_type = court_jester_court_position - } - $CANDIDATE$ = { add_character_flag = jester_flag } - } - 10 = { - trigger = { - can_employ_court_position_type = court_poet_court_position - } - $CANDIDATE$ = { add_character_flag = poet_flag } - } - 10 = { - trigger = { - can_employ_court_position_type = court_musician_court_position - } - $CANDIDATE$ = { add_character_flag = musician_flag } - } - 10 = { - trigger = { - can_employ_court_position_type = wet_nurse_court_position - $CANDIDATE$ = { is_female = yes } - } - $CANDIDATE$ = { add_character_flag = wet_nurse_flag } - } - 10 = { - trigger = { - can_employ_court_position_type = foreign_emissary_court_position - } - $CANDIDATE$ = { add_character_flag = foreign_emissary_flag } - } - } - } - else_if = { - limit = { - $CANDIDATE$ = { - OR = { - has_trait = education_stewardship - stewardship >= high_skill_rating - } - } - } - random_list = { - 10 = { - trigger = { - can_employ_court_position_type = travel_leader_court_position - } - $CANDIDATE$ = { add_character_flag = travel_leader_flag } - } - 10 = { - trigger = { - can_employ_court_position_type = court_gardener_court_position - } - $CANDIDATE$ = { add_character_flag = gardener_flag } - } - 10 = { - trigger = { - can_employ_court_position_type = royal_architect_court_position - } - $CANDIDATE$ = { add_character_flag = architect_flag } - } - 10 = { - trigger = { - can_employ_court_position_type = keeper_of_swans_court_position - } - $CANDIDATE$ = { add_character_flag = swan_flag } - } - 10 = { - trigger = { - can_employ_court_position_type = seneschal_court_position - } - $CANDIDATE$ = { add_character_flag = seneschal_flag } - } - 10 = { - trigger = { - can_employ_court_position_type = yurtchi_court_position - } - $CANDIDATE$ = { add_character_flag = yurtchi_flag } - } - } - } - else_if = { - limit = { - $CANDIDATE$ = { - OR = { - has_trait = education_martial - martial >= high_skill_rating - } - } - } - random_list = { - 10 = { - trigger = { - can_employ_court_position_type = master_of_horse_court_position - } - $CANDIDATE$ = { add_character_flag = horse_flag } - } - 10 = { - trigger = { - can_employ_court_position_type = garuda_court_position - } - $CANDIDATE$ = { add_character_flag = garuda_flag } - } - 10 = { - trigger = { - can_employ_court_position_type = master_of_hunt_court_position - } - $CANDIDATE$ = { add_character_flag = hunt_flag } - } - 10 = { - trigger = { - can_employ_court_position_type = bodyguard_court_position - } - $CANDIDATE$ = { add_character_flag = bodyguard_flag } - } - 10 = { - trigger = { - can_employ_court_position_type = champion_court_position - } - $CANDIDATE$ = { add_character_flag = champion_flag } - } - 10 = { - trigger = { - can_employ_court_position_type = akolouthos_court_position - } - $CANDIDATE$ = { add_character_flag = akolouthos_flag } - } - 10 = { - trigger = { - can_employ_court_position_type = boyan_court_position - } - $CANDIDATE$ = { add_character_flag = boyan_flag } - } - 10 = { - trigger = { - can_employ_court_position_type = yeke_jarquchi_court_position - } - $CANDIDATE$ = { add_character_flag = yeke_jarquchi_flag } - } - 10 = { - trigger = { - can_employ_court_position_type = keeper_of_the_horses_court_position - } - $CANDIDATE$ = { add_character_flag = keeper_of_the_horses_flag } - } - } - } -} - -distribute_determined_court_position_effect = { - $EMPLOYER$ = { - if = { - limit = { $CANDIDATE$ = { has_character_flag = physician_flag } } - appoint_court_position = { - recipient = $CANDIDATE$ - court_position = court_physician_court_position - } - } - else_if = { - limit = { - $CANDIDATE$ = { has_character_flag = tutor_flag } - NOT = { government_has_flag = government_is_mandala } - } - appoint_court_position = { - recipient = $CANDIDATE$ - court_position = court_tutor_court_position - } - } - else_if = { - limit = { - $CANDIDATE$ = { has_character_flag = tutor_flag } - government_has_flag = government_is_mandala - } - appoint_court_position = { - recipient = $CANDIDATE$ - court_position = court_guru_court_position - } - } - else_if = { - limit = { $CANDIDATE$ = { has_character_flag = almoner_flag } } - appoint_court_position = { - recipient = $CANDIDATE$ - court_position = high_almoner_court_position - } - } - else_if = { - limit = { $CANDIDATE$ = { has_character_flag = antiquarian_flag } } - appoint_court_position = { - recipient = $CANDIDATE$ - court_position = antiquarian_court_position - } - } - else_if = { - limit = { $CANDIDATE$ = { has_character_flag = qadi_flag } } - appoint_court_position = { - recipient = $CANDIDATE$ - court_position = chief_qadi_court_position - } - } - else_if = { - limit = { $CANDIDATE$ = { has_character_flag = taster_flag } } - appoint_court_position = { - recipient = $CANDIDATE$ - court_position = food_taster_court_position - } - } - else_if = { - limit = { $CANDIDATE$ = { has_character_flag = executioner_flag } } - appoint_court_position = { - recipient = $CANDIDATE$ - court_position = executioner_court_position - } - } - else_if = { - limit = { $CANDIDATE$ = { has_character_flag = cupbearer_flag } } - appoint_court_position = { - recipient = $CANDIDATE$ - court_position = cupbearer_court_position - } - } - else_if = { - limit = { $CANDIDATE$ = { has_character_flag = lady_in_waiting_flag } } - appoint_court_position = { - recipient = $CANDIDATE$ - court_position = lady_in_waiting_court_position - } - } - else_if = { - limit = { $CANDIDATE$ = { has_character_flag = jester_flag } } - appoint_court_position = { - recipient = $CANDIDATE$ - court_position = court_jester_court_position - } - } - else_if = { - limit = { $CANDIDATE$ = { has_character_flag = poet_flag } } - appoint_court_position = { - recipient = $CANDIDATE$ - court_position = court_poet_court_position - } - } - else_if = { - limit = { $CANDIDATE$ = { has_character_flag = musician_flag } } - appoint_court_position = { - recipient = $CANDIDATE$ - court_position = court_musician_court_position - } - } - else_if = { - limit = { $CANDIDATE$ = { has_character_flag = gardener_flag } } - appoint_court_position = { - recipient = $CANDIDATE$ - court_position = court_gardener_court_position - } - } - else_if = { - limit = { $CANDIDATE$ = { has_character_flag = architect_flag } } - appoint_court_position = { - recipient = $CANDIDATE$ - court_position = royal_architect_court_position - } - } - else_if = { - limit = { $CANDIDATE$ = { has_character_flag = swan_flag } } - appoint_court_position = { - recipient = $CANDIDATE$ - court_position = keeper_of_swans_court_position - } - } - else_if = { - limit = { $CANDIDATE$ = { has_character_flag = seneschal_flag } } - appoint_court_position = { - recipient = $CANDIDATE$ - court_position = seneschal_court_position - } - } - else_if = { - limit = { $CANDIDATE$ = { has_character_flag = horse_flag } } - appoint_court_position = { - recipient = $CANDIDATE$ - court_position = master_of_horse_court_position - } - } - else_if = { - limit = { $CANDIDATE$ = { has_character_flag = garuda_flag } } - appoint_court_position = { - recipient = $CANDIDATE$ - court_position = garuda_court_position - } - } - else_if = { - limit = { $CANDIDATE$ = { has_character_flag = hunt_flag } } - appoint_court_position = { - recipient = $CANDIDATE$ - court_position = master_of_hunt_court_position - } - } - else_if = { - limit = { $CANDIDATE$ = { has_character_flag = bodyguard_flag } } - appoint_court_position = { - recipient = $CANDIDATE$ - court_position = bodyguard_court_position - } - } - else_if = { - limit = { $CANDIDATE$ = { has_character_flag = champion_flag } } - appoint_court_position = { - recipient = $CANDIDATE$ - court_position = champion_court_position - } - } - else_if = { - limit = { $CANDIDATE$ = { has_character_flag = travel_leader_flag } } - appoint_court_position = { - recipient = $CANDIDATE$ - court_position = travel_leader_court_position - } - } - else_if = { - limit = { $CANDIDATE$ = { has_character_flag = wet_nurse_flag } } - appoint_court_position = { - recipient = $CANDIDATE$ - court_position = wet_nurse_court_position - } - } - else_if = { - limit = { $CANDIDATE$ = { has_character_flag = akolouthos_flag } } - appoint_court_position = { - recipient = $CANDIDATE$ - court_position = akolouthos_court_position - } - } - else_if = { - limit = { $CANDIDATE$ = { has_character_flag = court_astrologer_flag } } - appoint_court_position = { - recipient = $CANDIDATE$ - court_position = court_astrologer_court_position - } - } - else_if = { - limit = { $CANDIDATE$ = { has_character_flag = grand_preceptor_flag } } - appoint_court_position = { - recipient = $CANDIDATE$ - court_position = grand_preceptor_court_position - } - } - else_if = { - limit = { $CANDIDATE$ = { has_character_flag = grand_guardian_flag } } - appoint_court_position = { - recipient = $CANDIDATE$ - court_position = grand_guardian_court_position - } - } - else_if = { - limit = { $CANDIDATE$ = { has_character_flag = grand_mentor_flag } } - appoint_court_position = { - recipient = $CANDIDATE$ - court_position = grand_mentor_court_position - } - } - else_if = { - limit = { $CANDIDATE$ = { has_character_flag = fire_dragon_engineer_flag } } - appoint_court_position = { - recipient = $CANDIDATE$ - court_position = fire_dragon_engineer_court_position - } - } - else_if = { - limit = { $CANDIDATE$ = { has_character_flag = keeper_of_the_harem_flag } } - appoint_court_position = { - recipient = $CANDIDATE$ - court_position = keeper_of_the_harem_court_position - } - } - else_if = { - limit = { $CANDIDATE$ = { has_character_flag = boyan_flag } } - appoint_court_position = { - recipient = $CANDIDATE$ - court_position = boyan_court_position - } - } - else_if = { - limit = { $CANDIDATE$ = { has_character_flag = siege_engineer_flag } } - appoint_court_position = { - recipient = $CANDIDATE$ - court_position = siege_engineer_court_position - } - } - else_if = { - limit = { $CANDIDATE$ = { has_character_flag = yurtchi_flag } } - appoint_court_position = { - recipient = $CANDIDATE$ - court_position = yurtchi_court_position - } - } - else_if = { - limit = { $CANDIDATE$ = { has_character_flag = yeke_jarquchi_flag } } - appoint_court_position = { - recipient = $CANDIDATE$ - court_position = yeke_jarquchi_court_position - } - } - else_if = { - limit = { $CANDIDATE$ = { has_character_flag = foreign_emissary_flag } } - appoint_court_position = { - recipient = $CANDIDATE$ - court_position = foreign_emissary_court_position - } - } - else_if = { - limit = { $CANDIDATE$ = { has_character_flag = keeper_of_the_horses_flag } } - appoint_court_position = { - recipient = $CANDIDATE$ - court_position = keeper_of_the_horses_court_position - } - } - } -} - -give_relevant_valid_court_position = { - decide_court_position_to_give_effect = { - EMPLOYER = $EMPLOYER$ - CANDIDATE = $CANDIDATE$ - } - distribute_determined_court_position_effect = { - EMPLOYER = $EMPLOYER$ - CANDIDATE = $CANDIDATE$ - } -} - -### Court Tutor Task Effects ### -court_tutor_improve_others_skill_effect = { - send_interface_toast = { - type = event_royal_court_good_with_text - title = court_tutor_improve_others_title - desc = court_tutor_improve_others_notification_desc - left_icon = root - right_icon = scope:target_character - - scope:target_character = { add_$SKILL$_skill = 1 } - } -} - -court_tutor_improve_others_trait_effect = { - send_interface_toast = { - type = event_royal_court_good_with_text - title = court_tutor_improve_others_title - desc = court_tutor_improve_others_notification_desc - left_icon = root - right_icon = scope:target_character - - scope:target_character = { add_trait = $TRAIT$ } - } -} - -court_tutor_improve_others_trait_xp_effect = { - send_interface_toast = { - type = event_royal_court_good_with_text - title = court_tutor_improve_others_title - desc = court_tutor_improve_others_notification_desc - left_icon = root - right_icon = scope:target_character - - scope:target_character = { - add_trait_xp = { - trait = $TRAIT$ - value = 5 - } - } - } -} - -court_tutor_improve_others_trait_track_xp_effect = { - send_interface_toast = { - type = event_royal_court_good_with_text - title = court_tutor_improve_others_title - desc = court_tutor_improve_others_notification_desc - left_icon = root - right_icon = scope:target_character - - scope:target_character = { - add_trait_xp = { - trait = $TRAIT$ - track = $TRACK$ - value = 5 - } - } - } -} - -wet_nurse_instill_virtue_effect = { - scope:notification_character = { - send_interface_toast = { - type = event_royal_court_good_with_text - title = wet_nurse_instill_virtue - desc = wet_nurse_instill_virtue_notification_desc - left_icon = root - right_icon = scope:child_character - - scope:child_character = { - add_trait = $TRAIT$ - } - } - } -} - -# Need a 'notification_character' scope for it to work properly -instill_virtue_trait_effect = { - save_scope_as = child_character - # Find fitting trait - random_list = { - 1 = { # Lustful - trigger = { - wet_nurse_instill_virtue_trigger = { TRAIT = lustful } - NOT = { has_trait = chaste } - } - wet_nurse_instill_virtue_effect = { TRAIT = lustful } - } - 1 = { # Chaste - trigger = { - wet_nurse_instill_virtue_trigger = { TRAIT = chaste } - NOT = { has_trait = lustful } - } - wet_nurse_instill_virtue_effect = { TRAIT = chaste } - } - 1 = { # Gluttonous - trigger = { - wet_nurse_instill_virtue_trigger = { TRAIT = gluttonous } - NOT = { has_trait = temperate } - } - wet_nurse_instill_virtue_effect = { TRAIT = gluttonous } - } - 1 = { # Temperate - trigger = { - wet_nurse_instill_virtue_trigger = { TRAIT = temperate } - NOT = { has_trait = gluttonous } - } - wet_nurse_instill_virtue_effect = { TRAIT = temperate } - } - 1 = { # Greedy - trigger = { - wet_nurse_instill_virtue_trigger = { TRAIT = greedy } - NOT = { has_trait = generous } - } - wet_nurse_instill_virtue_effect = { TRAIT = greedy } - } - 1 = { # Generous - trigger = { - wet_nurse_instill_virtue_trigger = { TRAIT = generous } - NOT = { has_trait = greedy } - } - wet_nurse_instill_virtue_effect = { TRAIT = generous } - } - 1 = { # Lazy - trigger = { - wet_nurse_instill_virtue_trigger = { TRAIT = lazy } - NOT = { has_trait = diligent } - } - wet_nurse_instill_virtue_effect = { TRAIT = lazy } - } - 1 = { # Diligent - trigger = { - wet_nurse_instill_virtue_trigger = { TRAIT = diligent } - NOT = { has_trait = lazy } - } - wet_nurse_instill_virtue_effect = { TRAIT = diligent } - } - 1 = { # Wrathful - trigger = { - wet_nurse_instill_virtue_trigger = { TRAIT = wrathful } - NOT = { has_trait = calm } - } - wet_nurse_instill_virtue_effect = { TRAIT = wrathful } - } - 1 = { # Calm - trigger = { - wet_nurse_instill_virtue_trigger = { TRAIT = calm } - NOT = { has_trait = wrathful } - } - wet_nurse_instill_virtue_effect = { TRAIT = calm } - } - 1 = { # Patient - trigger = { - wet_nurse_instill_virtue_trigger = { TRAIT = patient } - NOT = { has_trait = impatient } - } - wet_nurse_instill_virtue_effect = { TRAIT = patient } - } - 1 = { # Impatient - trigger = { - wet_nurse_instill_virtue_trigger = { TRAIT = impatient } - NOT = { has_trait = patient } - } - wet_nurse_instill_virtue_effect = { TRAIT = impatient } - } - 1 = { # Arrogant - trigger = { - wet_nurse_instill_virtue_trigger = { TRAIT = arrogant } - NOT = { has_trait = humble } - } - wet_nurse_instill_virtue_effect = { TRAIT = arrogant } - } - 1 = { # Humble - trigger = { - wet_nurse_instill_virtue_trigger = { TRAIT = humble } - NOT = { has_trait = arrogant } - } - wet_nurse_instill_virtue_effect = { TRAIT = humble } - } - 1 = { # Deceitful - trigger = { - wet_nurse_instill_virtue_trigger = { TRAIT = deceitful } - NOT = { has_trait = honest } - } - wet_nurse_instill_virtue_effect = { TRAIT = deceitful } - } - 1 = { # Honest - trigger = { - wet_nurse_instill_virtue_trigger = { TRAIT = honest } - NOT = { has_trait = deceitful } - } - wet_nurse_instill_virtue_effect = { TRAIT = honest } - } - 1 = { # Craven - trigger = { - wet_nurse_instill_virtue_trigger = { TRAIT = craven } - NOT = { has_trait = brave } - } - wet_nurse_instill_virtue_effect = { TRAIT = craven } - } - 1 = { # Brave - trigger = { - wet_nurse_instill_virtue_trigger = { TRAIT = brave } - NOT = { has_trait = craven } - } - wet_nurse_instill_virtue_effect = { TRAIT = brave } - } - 1 = { # Shy - trigger = { - wet_nurse_instill_virtue_trigger = { TRAIT = shy } - NOT = { has_trait = gregarious } - } - wet_nurse_instill_virtue_effect = { TRAIT = shy } - } - 1 = { # Gregarious - trigger = { - wet_nurse_instill_virtue_trigger = { TRAIT = gregarious } - NOT = { has_trait = shy } - } - wet_nurse_instill_virtue_effect = { TRAIT = gregarious } - } - 1 = { # Ambitious - trigger = { - wet_nurse_instill_virtue_trigger = { TRAIT = ambitious } - NOT = { has_trait = content } - } - wet_nurse_instill_virtue_effect = { TRAIT = ambitious } - } - 1 = { # Content - trigger = { - wet_nurse_instill_virtue_trigger = { TRAIT = content } - NOT = { has_trait = ambitious } - } - wet_nurse_instill_virtue_effect = { TRAIT = content } - } - 1 = { # Arbitrary - trigger = { - wet_nurse_instill_virtue_trigger = { TRAIT = arbitrary } - NOT = { has_trait = just } - } - wet_nurse_instill_virtue_effect = { TRAIT = arbitrary } - } - 1 = { # Just - trigger = { - wet_nurse_instill_virtue_trigger = { TRAIT = just } - NOT = { has_trait = arbitrary } - } - wet_nurse_instill_virtue_effect = { TRAIT = just } - } - 1 = { # Cynical - trigger = { - wet_nurse_instill_virtue_trigger = { TRAIT = cynical } - NOT = { has_trait = zealous } - } - wet_nurse_instill_virtue_effect = { TRAIT = cynical } - } - 1 = { # Zealous - trigger = { - wet_nurse_instill_virtue_trigger = { TRAIT = zealous } - NOT = { has_trait = cynical } - } - wet_nurse_instill_virtue_effect = { TRAIT = zealous } - } - 1 = { # Paranoid - trigger = { - wet_nurse_instill_virtue_trigger = { TRAIT = paranoid } - NOT = { has_trait = trusting } - } - wet_nurse_instill_virtue_effect = { TRAIT = paranoid } - } - 1 = { # Trusting - trigger = { - wet_nurse_instill_virtue_trigger = { TRAIT = trusting } - NOT = { has_trait = paranoid } - } - wet_nurse_instill_virtue_effect = { TRAIT = trusting } - } - 1 = { # Compassionate - trigger = { - wet_nurse_instill_virtue_trigger = { TRAIT = compassionate } - NOR = { - has_trait = callous - has_trait = sadistic - } - } - wet_nurse_instill_virtue_effect = { TRAIT = compassionate } - } - 1 = { # Callous - trigger = { - wet_nurse_instill_virtue_trigger = { TRAIT = callous } - NOR = { - has_trait = compassionate - has_trait = sadistic - } - } - wet_nurse_instill_virtue_effect = { TRAIT = callous } - } - 1 = { # Sadistic - trigger = { - wet_nurse_instill_virtue_trigger = { TRAIT = sadistic } - NOR = { - has_trait = compassionate - has_trait = callous - } - } - wet_nurse_instill_virtue_effect = { TRAIT = sadistic } - } - 1 = { # Stubborn - trigger = { - wet_nurse_instill_virtue_trigger = { TRAIT = stubborn } - NOR = { - has_trait = fickle - has_trait = eccentric - } - } - wet_nurse_instill_virtue_effect = { TRAIT = stubborn } - } - 1 = { # Fickle - trigger = { - wet_nurse_instill_virtue_trigger = { TRAIT = fickle } - NOR = { - has_trait = stubborn - has_trait = eccentric - } - } - wet_nurse_instill_virtue_effect = { TRAIT = fickle } - } - 1 = { # Eccentric - trigger = { - wet_nurse_instill_virtue_trigger = { TRAIT = eccentric } - NOR = { - has_trait = stubborn - has_trait = fickle - } - } - wet_nurse_instill_virtue_effect = { TRAIT = eccentric } - } - 1 = { # Vengeful - trigger = { - wet_nurse_instill_virtue_trigger = { TRAIT = vengeful } - NOT = { has_trait = forgiving } - } - wet_nurse_instill_virtue_effect = { TRAIT = vengeful } - } - 1 = { # Forgiving - trigger = { - wet_nurse_instill_virtue_trigger = { TRAIT = forgiving } - NOT = { has_trait = vengeful } - } - wet_nurse_instill_virtue_effect = { TRAIT = forgiving } - } - } -} - -promote_relationships_remove_relation_effect = { - random_relation = { - type = $RELATION$ - save_scope_as = relation - } - remove_relation_bully = scope:relation -} - -court_position_vacated_event_effect = { - scope:liege = { - if = { - limit = { - is_ai = no - NOT = { has_player_court_position_automation_none = court_position_type:$COURT_POSITION_TYPE$ } - } - - court_position_type:$COURT_POSITION_TYPE$ = { - save_scope_as = court_position_type - } - ordered_court_position_candidate = { - court_position_type = scope:court_position_type - order_by = aptitude_score:$COURT_POSITION_TYPE$ - - # Previous holder might still be in the court/alive - lets not include them - limit = { NOT = { this = scope:employee } } - max = 2 - check_range_bounds = no - - if = { - limit = { NOT = { exists = scope:candidate_1 } } - save_scope_as = candidate_1 - } - else_if = { - limit = { NOT = { exists = scope:candidate_2 } } - save_scope_as = candidate_2 - } - } - - if = { - limit = { - OR = { - has_player_court_position_automation_assign_best = scope:court_position_type - has_player_court_position_automation_assign_best_or_event = scope:court_position_type - } - exists = scope:candidate_1 - } - - appoint_court_position = { - recipient = scope:candidate_1 - court_position = scope:court_position_type - } - } - else_if = { - limit = { - has_player_court_position_automation_assign_best = scope:court_position_type - } - # Do nothing, the player does not want an event - } - else_if = { - limit = { is_landless_adventurer = yes } - trigger_event = court_position_management_event.0002 - } - else = { - trigger_event = court_position_management_event.0001 - } - } - } -} - -court_astrologer_task_remove_seasonal_modifiers_effect = { - hidden_effect = { - remove_character_modifier = court_astrologer_abundant_grazing_modifier - remove_character_modifier = court_astrologer_warm_nights_modifier - remove_character_modifier = court_astrologer_sky_blessing_modifier - remove_character_modifier = court_astrologer_white_zud_modifier - remove_character_modifier = court_astrologer_cold_zud_modifier - remove_character_modifier = court_astrologer_severe_drought_modifier - remove_character_modifier = court_astrologer_havsarsan_zud_modifier - } -} - -court_astrologer_task_add_seasonal_modifiers_effect = { - hidden_effect = { - save_scope_as = current_character - capital_province.county = { - random_county_situation_sub_region = { - limit = { - OR = { - sub_region_current_phase = situation_steppe_abundant_grazing_season - sub_region_current_phase = situation_steppe_warm_nights_season - sub_region_current_phase = situation_steppe_sky_blessing_season - sub_region_current_phase = situation_steppe_white_zud_season - sub_region_current_phase = situation_steppe_cold_zud_season - sub_region_current_phase = situation_steppe_severe_drought_season - sub_region_current_phase = situation_steppe_havsarsan_zud_season - } - } - switch = { - trigger = sub_region_current_phase - situation_steppe_abundant_grazing_season = { - scope:current_character = { - add_character_modifier = court_astrologer_abundant_grazing_modifier - } - } - situation_steppe_warm_nights_season = { - scope:current_character = { - add_character_modifier = court_astrologer_warm_nights_modifier - } - } - situation_steppe_sky_blessing_season = { - scope:current_character = { - add_character_modifier = court_astrologer_sky_blessing_modifier - } - } - situation_steppe_white_zud_season = { - scope:current_character = { - add_character_modifier = court_astrologer_white_zud_modifier - } - } - situation_steppe_cold_zud_season = { - scope:current_character = { - add_character_modifier = court_astrologer_cold_zud_modifier - } - } - situation_steppe_severe_drought_season = { - scope:current_character = { - add_character_modifier = court_astrologer_severe_drought_modifier - } - } - situation_steppe_havsarsan_zud_season = { - scope:current_character = { - add_character_modifier = court_astrologer_havsarsan_zud_modifier - } - } - } - } - } - } -} - -# Revoke any court position effect -## Please note that free_revoke_cost flag needs to be set. -## Save employer of person revoked as liege. -## REVOKED_CHARACTER also needs to be filled out. - -revoke_specific_court_position_effect = { - $LIEGE$ = { - revoke_court_position = { - recipient = $REVOKED_CHARACTER$ - court_position = $POS$_court_position - } - remove_character_flag = free_revoke_cost - } -} - -## Find POS in revoke_specific_court_position_effect -fire_specific_court_position_effect = { - switch = { - trigger = has_court_position - court_physician_court_position = { - revoke_specific_court_position_effect = { - REVOKED_CHARACTER = $CHARACTER$ - LIEGE = $LIEGE$ - POS = court_physician - } - } - cultural_emissary_court_position = { - revoke_specific_court_position_effect = { - REVOKED_CHARACTER = $CHARACTER$ - LIEGE = $LIEGE$ - POS = cultural_emissary - } - } - keeper_of_swans_court_position = { - revoke_specific_court_position_effect = { - REVOKED_CHARACTER = $CHARACTER$ - LIEGE = $LIEGE$ - POS = keeper_of_swans - } - } - chief_qadi_court_position = { - revoke_specific_court_position_effect = { - REVOKED_CHARACTER = $CHARACTER$ - LIEGE = $LIEGE$ - POS = chief_qadi - } - } - garuda_court_position = { - revoke_specific_court_position_effect = { - REVOKED_CHARACTER = $CHARACTER$ - LIEGE = $LIEGE$ - POS = garuda - } - } - court_gardener_court_position = { - revoke_specific_court_position_effect = { - REVOKED_CHARACTER = $CHARACTER$ - LIEGE = $LIEGE$ - POS = court_gardener - } - } - lady_in_waiting_court_position = { - revoke_specific_court_position_effect = { - REVOKED_CHARACTER = $CHARACTER$ - LIEGE = $LIEGE$ - POS = lady_in_waiting - } - } - antiquarian_court_position = { - revoke_specific_court_position_effect = { - REVOKED_CHARACTER = $CHARACTER$ - LIEGE = $LIEGE$ - POS = antiquarian - } - } - travel_leader_court_position = { - revoke_specific_court_position_effect = { - REVOKED_CHARACTER = $CHARACTER$ - LIEGE = $LIEGE$ - POS = travel_leader - } - } - wet_nurse_court_position = { - revoke_specific_court_position_effect = { - REVOKED_CHARACTER = $CHARACTER$ - LIEGE = $LIEGE$ - POS = wet_nurse - } - } - court_tutor_court_position = { - revoke_specific_court_position_effect = { - REVOKED_CHARACTER = $CHARACTER$ - LIEGE = $LIEGE$ - POS = court_tutor - } - } - food_taster_court_position = { - revoke_specific_court_position_effect = { - REVOKED_CHARACTER = $CHARACTER$ - LIEGE = $LIEGE$ - POS = food_taster - } - } - master_of_horse_court_position = { - revoke_specific_court_position_effect = { - REVOKED_CHARACTER = $CHARACTER$ - LIEGE = $LIEGE$ - POS = master_of_horse - } - } - master_of_hunt_court_position = { - revoke_specific_court_position_effect = { - REVOKED_CHARACTER = $CHARACTER$ - LIEGE = $LIEGE$ - POS = master_of_hunt - } - } - royal_architect_court_position = { - revoke_specific_court_position_effect = { - REVOKED_CHARACTER = $CHARACTER$ - LIEGE = $LIEGE$ - POS = royal_architect - } - } - high_almoner_court_position = { - revoke_specific_court_position_effect = { - REVOKED_CHARACTER = $CHARACTER$ - LIEGE = $LIEGE$ - POS = high_almoner - } - } - seneschal_court_position = { - revoke_specific_court_position_effect = { - REVOKED_CHARACTER = $CHARACTER$ - LIEGE = $LIEGE$ - POS = seneschal - } - } - cupbearer_court_position = { - revoke_specific_court_position_effect = { - REVOKED_CHARACTER = $CHARACTER$ - LIEGE = $LIEGE$ - POS = cupbearer - } - } - chief_eunuch_court_position = { - revoke_specific_court_position_effect = { - REVOKED_CHARACTER = $CHARACTER$ - LIEGE = $LIEGE$ - POS = chief_eunuch - } - } - court_jester_court_position = { - revoke_specific_court_position_effect = { - REVOKED_CHARACTER = $CHARACTER$ - LIEGE = $LIEGE$ - POS = court_jester - } - } - court_poet_court_position = { - revoke_specific_court_position_effect = { - REVOKED_CHARACTER = $CHARACTER$ - LIEGE = $LIEGE$ - POS = court_poet - } - } - court_musician_court_position = { - revoke_specific_court_position_effect = { - REVOKED_CHARACTER = $CHARACTER$ - LIEGE = $LIEGE$ - POS = court_musician - } - } - bodyguard_court_position = { - revoke_specific_court_position_effect = { - REVOKED_CHARACTER = $CHARACTER$ - LIEGE = $LIEGE$ - POS = bodyguard - } - } - champion_court_position = { - revoke_specific_court_position_effect = { - REVOKED_CHARACTER = $CHARACTER$ - LIEGE = $LIEGE$ - POS = champion - } - } - executioner_court_position = { - revoke_specific_court_position_effect = { - REVOKED_CHARACTER = $CHARACTER$ - LIEGE = $LIEGE$ - POS = executioner - } - } - court_artificer_court_position = { - revoke_specific_court_position_effect = { - REVOKED_CHARACTER = $CHARACTER$ - LIEGE = $LIEGE$ - POS = court_artificer - } - } - master_assassin_court_position = { - revoke_specific_court_position_effect = { - REVOKED_CHARACTER = $CHARACTER$ - LIEGE = $LIEGE$ - POS = master_assassin - } - } - cave_hermit_court_position = { - revoke_specific_court_position_effect = { - REVOKED_CHARACTER = $CHARACTER$ - LIEGE = $LIEGE$ - POS = cave_hermit - } - } - chronicler_court_position = { - revoke_specific_court_position_effect = { - REVOKED_CHARACTER = $CHARACTER$ - LIEGE = $LIEGE$ - POS = chronicler - } - } - court_scholar_court_position = { - revoke_specific_court_position_effect = { - REVOKED_CHARACTER = $CHARACTER$ - LIEGE = $LIEGE$ - POS = court_scholar - } - } - charioteer_court_position = { - revoke_specific_court_position_effect = { - REVOKED_CHARACTER = $CHARACTER$ - LIEGE = $LIEGE$ - POS = charioteer - } - } - bookmaker_court_position = { - revoke_specific_court_position_effect = { - REVOKED_CHARACTER = $CHARACTER$ - LIEGE = $LIEGE$ - POS = bookmaker - } - } - akolouthos_court_position = { - revoke_specific_court_position_effect = { - REVOKED_CHARACTER = $CHARACTER$ - LIEGE = $LIEGE$ - POS = akolouthos - } - } - court_brewmaster_court_position = { - revoke_specific_court_position_effect = { - REVOKED_CHARACTER = $CHARACTER$ - LIEGE = $LIEGE$ - POS = court_brewmaster - } - } - grand_preceptor_court_position = { - revoke_specific_court_position_effect = { - REVOKED_CHARACTER = $CHARACTER$ - LIEGE = $LIEGE$ - POS = grand_preceptor - } - } - grand_mentor_court_position = { - revoke_specific_court_position_effect = { - REVOKED_CHARACTER = $CHARACTER$ - LIEGE = $LIEGE$ - POS = grand_mentor - } - } - grand_guardian_court_position = { - revoke_specific_court_position_effect = { - REVOKED_CHARACTER = $CHARACTER$ - LIEGE = $LIEGE$ - POS = grand_guardian - } - } - fire_dragon_engineer_court_position = { - revoke_specific_court_position_effect = { - REVOKED_CHARACTER = $CHARACTER$ - LIEGE = $LIEGE$ - POS = fire_dragon_engineer - } - } - keeper_of_the_harem_court_position = { - revoke_specific_court_position_effect = { - REVOKED_CHARACTER = $CHARACTER$ - LIEGE = $LIEGE$ - POS = keeper_of_the_harem - } - } - } -} diff --git a/N3OW/common/scripted_effects/00_courtier_guest_management_effects.txt b/N3OW/common/scripted_effects/00_courtier_guest_management_effects.txt deleted file mode 100644 index 159798c8..00000000 --- a/N3OW/common/scripted_effects/00_courtier_guest_management_effects.txt +++ /dev/null @@ -1,1590 +0,0 @@ -### -#fallback_move_to_pool_effect -#select_and_move_to_pool_effect - Use this to move courtiers/guests to pool - -select_fallback_pool_to_move_to_effect = { - if = { - limit = { - NOT = { exists = location } - } - random_duchy = { - limit = { - exists = title_capital_county - title_capital_county.culture = { - has_same_culture_heritage = scope:mover.culture - } - } - title_capital_county.holder.capital_province = { save_scope_as = destination } - } - if = { - limit = { - NOT = { exists = scope:destination } - } - random_duchy = { - limit = { - exists = title_capital_county - title_capital_county.faith = scope:mover.faith - } - title_capital_county.holder.capital_province = { save_scope_as = destination } - } - } - if = { - limit = { - NOT = { exists = scope:destination } - } - random_duchy = { - limit = { - exists = title_capital_county.holder.capital_province - } - title_capital_county.holder.capital_province = { save_scope_as = destination } - } - } - } - else = { - random_kingdom = { - limit = { - is_titular = no - title_capital_county.title_province ?= { - squared_distance = { - target = scope:mover.location value <= squared_distance_large - } - } - } - random_in_de_jure_hierarchy = { - limit = { - tier = tier_duchy - title_capital_county.holder.capital_province = { local_pool_is_full_trigger = no } - } - title_capital_county.holder.capital_province = { save_scope_as = destination } - } - } - if = { - limit = { - NOT = { exists = scope:destination } - exists = scope:mover.host.capital_province - } - scope:mover.host.capital_province = { save_scope_as = destination } - } - else_if = { - limit = { - NOT = { exists = scope:destination } - } - random_kingdom = { - limit = { - exists = title_capital_county - } - title_capital_county.holder.capital_province = { save_scope_as = destination } - } - } - } -} - - -fallback_move_to_pool_effect = { - save_temporary_scope_as = mover - if = { - limit = { exists = host } - set_variable = { - name = last_visited_ruler - value = this.host - days = 1825 - } - } - else = { #I.e. if we're in the pool - set_variable = { - name = last_visited_ruler - value = dummy_female #Because you must have a character value to compare it with another - days = 1825 - } - } - - select_fallback_pool_to_move_to_effect = yes - - every_traveling_family_member = { - limit = { - NOT = { is_in_pool_at = scope:destination } - } - move_to_pool_at = scope:destination - } -} - -select_pool_to_move_to_effect = { - ###CLAIMANT HANDLING### - random = { - chance = 20 - if = { - limit = { - any_claim = { tier <= tier_kingdom } - NOT = { - is_weak_claimant_due_to_gender_trigger = { FAITH = scope:mover.faith CHARACTER = scope:mover } - } - } - - every_traveling_family_member = { - add_to_temporary_list = claimant_family - } - - #Player if possible - random_player = { - limit = { - save_temporary_scope_as = player - scope:mover = { any_claim = { useful_courtier_or_guest_claim_trigger = { RULER = scope:player } } } - any_in_list = { - list = claimant_family - count = all - guest_allowed_to_arrive_trigger = { HOST = scope:player } - } - exists = capital_province - } - capital_province = { save_scope_as = destination } - } - - #Otherwise some independent ruler - if = { - limit = { NOT = { exists = scope:destination } } - random_independent_ruler = { - limit = { - save_temporary_scope_as = independent_ruler - scope:mover = { any_claim = { useful_courtier_or_guest_claim_trigger = { RULER = scope:independent_ruler } } } - any_in_list = { - list = claimant_family - count = all - guest_allowed_to_arrive_trigger = { HOST = scope:independent_ruler } - } - exists = capital_province - } - capital_province = { save_scope_as = destination } - } - } - } - } - - if = { - limit = { NOT = { exists = scope:destination } } - - ###PICK THE NEW LOCATION### - random_list = { - #Close or extended family - 25 = { - trigger = { any_close_or_extended_family_member = { is_visitable_relation_trigger = { CHARACTER = scope:mover } } } - random_close_or_extended_family_member = { - limit = { is_visitable_relation_trigger = { CHARACTER = scope:mover } } - capital_province = { save_scope_as = destination } - } - } - #Other dynasty members - 5 = { - trigger = { - dynasty ?= { - any_dynasty_member = { - is_visitable_relation_trigger = { CHARACTER = scope:mover } - NOT = { is_close_or_extended_family_of = scope:mover } - } - } - } - dynasty = { - random_dynasty_member = { - limit = { - is_visitable_relation_trigger = { CHARACTER = scope:mover } - NOT = { is_close_or_extended_family_of = scope:mover } - } - capital_province = { save_scope_as = destination } - } - } - } - #Lovers - 25 = { - trigger = { - any_relation = { - type = lover - is_visitable_relation_trigger = { CHARACTER = scope:mover } - } - } - random_relation = { - type = lover - limit = { any_close_or_extended_family_member = { is_visitable_relation_trigger = { CHARACTER = scope:mover } } } - capital_province = { save_scope_as = destination } - } - } - #Friends - 25 = { - trigger = { - any_relation = { - type = friend - is_visitable_relation_trigger = { CHARACTER = scope:mover } - } - } - random_relation = { - type = friend - limit = { is_visitable_relation_trigger = { CHARACTER = scope:mover } } - capital_province = { save_scope_as = destination } - } - } - #Secret Witch - 25 = { - trigger = { - any_secret = { - type = secret_witch - any_secret_knower = { - is_visitable_relation_trigger = { CHARACTER = scope:mover } - is_witch_trigger = yes - } - } - } - - random_secret = { - type = secret_witch - random_secret_knower = { - limit = { - is_visitable_relation_trigger = { CHARACTER = scope:mover } - is_witch_trigger = yes - } - capital_province = { save_scope_as = destination } - } - } - } - } - } - if = { - limit = { NOT = { exists = scope:destination } } - - random_list = { - #Within the realm (only for kingdoms/empires) - 15 = { - trigger = { - host.top_liege ?= { - highest_held_title_tier >= tier_kingdom - OR = { - is_visitable_relation_trigger = { CHARACTER = scope:mover } - any_vassal = { - highest_held_title_tier >= tier_county - is_visitable_relation_trigger = { CHARACTER = scope:mover } - } - } - } - } - host.top_liege = { - if = { - limit = { - is_visitable_relation_trigger = { CHARACTER = scope:mover } - } - add_to_temporary_list = same_realm_list - } - every_vassal = { - limit = { - highest_held_title_tier >= tier_county - is_visitable_relation_trigger = { CHARACTER = scope:mover } - } - add_to_temporary_list = same_realm_list - } - } - random_in_list = { - list = same_realm_list - limit = { - is_visitable_relation_trigger = { CHARACTER = scope:mover } - } - capital_province = { save_scope_as = destination } - } - } - #Neighboring realm (overseas) - 5 = { - trigger = { - host ?= { - any_neighboring_and_across_water_top_liege_realm_owner = { - OR = { - is_visitable_relation_trigger = { CHARACTER = scope:mover } - any_vassal = { - highest_held_title_tier >= tier_county - is_visitable_relation_trigger = { CHARACTER = scope:mover } - } - } - } - } - } - host = { - random_neighboring_and_across_water_top_liege_realm_owner = { - if = { - limit = { - is_visitable_relation_trigger = { CHARACTER = scope:mover } - } - add_to_temporary_list = other_realm_list - } - every_vassal_or_below = { - limit = { - highest_held_title_tier >= tier_county - is_visitable_relation_trigger = { CHARACTER = scope:mover } - } - add_to_temporary_list = other_realm_list - } - } - } - random_in_list = { - list = other_realm_list - limit = { - is_visitable_relation_trigger = { CHARACTER = scope:mover } - } - capital_province = { save_scope_as = destination } - } - } - #Neighboring realm (not overseas) - 15 = { - trigger = { - host ?= { - any_neighboring_top_liege_realm_owner = { - OR = { - is_visitable_relation_trigger = { CHARACTER = scope:mover } - any_vassal = { - highest_held_title_tier >= tier_county - is_visitable_relation_trigger = { CHARACTER = scope:mover } - } - } - } - } - } - host = { - random_neighboring_top_liege_realm_owner = { - if = { - limit = { - is_visitable_relation_trigger = { CHARACTER = scope:mover } - } - add_to_temporary_list = other_realm_list - } - every_vassal_or_below = { - limit = { - highest_held_title_tier >= tier_county - is_visitable_relation_trigger = { CHARACTER = scope:mover } - } - add_to_temporary_list = other_realm_list - } - } - } - random_in_list = { - list = other_realm_list - limit = { - is_visitable_relation_trigger = { CHARACTER = scope:mover } - } - capital_province = { save_scope_as = destination } - } - } - } - } - - if = { - limit = { - NOT = { exists = scope:destination } - } - - select_fallback_pool_to_move_to_effect = yes - } -} - -move_to_pool_effect = { - save_temporary_scope_as = mover - ###TOOLTIP FOR HOST### - show_as_tooltip = { - scope:mover = { move_to_pool = yes } - } - - ###MOVE OR FIND FALLBACK DESTINATION### - if = { - limit = { - exists = scope:destination - } - set_variable = { - name = last_visited_ruler - value = this.host - days = 3650 - } - every_traveling_family_member = { - limit = { - NOT = { is_in_pool_at = scope:destination } - is_ruler = no - trigger_if = { - limit = { - exists = scope:mover.host - is_child_of = scope:mover.host - is_adult = no - } - dynasty != scope:mover.host.dynasty - } - } - hidden_effect = { move_to_pool_at = scope:destination } - } - } -} - -select_and_move_to_pool_effect = { - save_temporary_scope_as = mover - - hidden_effect = { select_pool_to_move_to_effect = yes } - move_to_pool_effect = yes -} - -courtier_guest_pool_character_secret_giving_effect = { - random_list = { - # Deviant - 200 = { - trigger = { - NOR = { - has_trait = celibate - has_trait = chaste - any_secret = { type = secret_deviant } - has_trait = deviant - } - } - modifier = { - has_trait = lustful - add = 50 - } - - give_deviant_secret_or_trait_effect = yes - } - # Homosexual - 100 = { - trigger = { - is_male = yes - OR = { - has_sexuality = homosexual - has_sexuality = bisexual - } - NOT = { has_trait = celibate } - NOR = { - any_secret = { type = secret_homosexual } - has_trait = sodomite - } - } - modifier = { - has_trait = chaste - add = -50 - } - - give_homosexual_secret_or_nothing_effect = yes - } - # Cannibal - 100 = { - trigger = { - OR = { - has_trait = lunatic - has_trait = possessed - ai_compassion <= high_negative_ai_value - } - NOR = { - any_secret = { type = secret_cannibal } - has_trait = cannibal - } - } - ai_compassion_target_modifier = { VALUE = -50 } - - give_cannibal_secret_or_trait_effect = yes - } - # Non-believer - 500 = { - trigger = { - NOR = { - has_trait = zealous - any_secret = { type = secret_non_believer } - has_character_modifier = known_non_believer - } - } - ai_zeal_target_modifier = { VALUE = -50 } - give_non_believer_secret_effect = yes - } - # Witch - 100 = { - trigger = { - NOR = { - has_trait = zealous - any_secret = { type = secret_witch } - has_trait = witch - } - } - modifier = { - OR = { - has_trait = lifestyle_mystic - has_trait = lifestyle_herbalist - } - add = 50 - } - ai_greed_target_modifier = { VALUE = 50 } - } - } -} - -pool_character_development_effect = { - ###POSIBLE EFFECTS### - # Increase a low skill - # Get married - # Get a scripted relation - # Get a lifestyle trait - # Get a commander trait - # Get an interesting trait - # Get a secret - # Kill someone - # Learn a language - - save_temporary_scope_as = pool_character - - - random_list = { - # INCREASE A LOW SKILL - 100 = { - trigger = { diplomacy < medium_skill_rating } - add_diplomacy_skill = 1 - } - 100 = { - trigger = { martial < medium_skill_rating } - add_martial_skill = 1 - } - 100 = { - trigger = { stewardship < medium_skill_rating } - add_stewardship_skill = 1 - } - 100 = { - trigger = { intrigue < medium_skill_rating } - add_intrigue_skill = 1 - } - 100 = { - trigger = { learning < medium_skill_rating } - add_learning_skill = 1 - } - 100 = { - trigger = { prowess < medium_skill_rating } - add_prowess_skill = 1 - } - 400 = { - trigger = { - prowess > medium_skill_rating - NOT = { - has_trait = berserker - } - faith = { - has_doctrine = tenet_warmonger - } - OR = { - culture = { has_cultural_pillar = heritage_north_germanic } - religion = religion:germanic_religion - } - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:pool_character } - } - add_trait = berserker - } - 100 = { - trigger = { - diplomacy >= medium_skill_rating - NOT = { - has_trait = lifestyle_poet - } - OR = { - culture = { has_cultural_pillar = heritage_north_germanic } - religion = religion:germanic_religion - culture = { has_cultural_parameter = poet_trait_more_common } - } - } - add_trait = lifestyle_poet - } - - # GET MARRIED - 15 = { - trigger = { - age <= 40 - is_married = no - is_concubine = no - #The triggers below are here to avoid low fertility marriages (in most cases) - NOR = { - has_sexuality = asexual - has_trait = celibate - has_trait = chaste - } - fertility > low_fertility - OR = { - exists = mother - exists = father - } - can_marry_trigger = yes - } - - save_temporary_scope_as = template - - if = { - limit = { - exists = scope:pool_character.location - any_pool_character = { - province = scope:pool_character.location - allowed_to_marry_character_gender_trigger = { CHARACTER = scope:pool_character } - is_physically_able_adult = yes - age <= 40 - is_married = no - can_marry_trigger = yes - is_concubine = no - } - } - random_pool_character = { - province = scope:pool_character.location - limit = { - allowed_to_marry_character_gender_trigger = { CHARACTER = scope:pool_character } - is_physically_able_adult = yes - age <= 40 - is_married = no - can_marry_trigger = yes - is_concubine = no - } - save_temporary_scope_as = spouse - } - } - else = { - create_character = { - location = scope:template.location - gender_female_chance = scope:template.marriage_gender_adjusted_female_chance - template = mediocre_spouse - save_temporary_scope_as = spouse - } - } - - if = { - limit = { - is_female = yes - } - marry_matrilineal = scope:spouse - } - else = { - marry = scope:spouse - } - - scope:spouse = { - if = { - limit = { - exists = scope:template.host - } - visit_court_of = scope:template.host - } - } - } - - # GET A LIFESTYLE TRAIT - 50 = { - trigger = { - number_of_lifestyle_traits <= 2 - } - modifier = { - number_of_lifestyle_traits = 0 - factor = 2 - } - - random_list = { - 100 = { #REVELER - trigger = { - NAND = { - has_trait = lifestyle_reveler - has_trait_xp = { - trait = lifestyle_reveler - value >= 100 - } - } - NOR = { - has_trait = shy - has_trait = celibate - has_trait = temperate - has_trait = chaste - ai_greed < 0 - } - } - modifier = { - has_trait = lifestyle_reveler - factor = 5 - } - modifier = { - culture = { has_cultural_parameter = reveler_traits_more_common } - factor = 5 - } - if = { - limit = { - NOT = { has_trait = lifestyle_reveler } - } - add_trait = lifestyle_reveler - } - else = { - add_trait_xp = { - trait = lifestyle_reveler - value = 10 - } - } - } - 100 = { #BLADEMASTER - trigger = { - NAND = { - has_trait = lifestyle_blademaster - has_trait_xp = { - trait = lifestyle_blademaster - value >= 100 - } - } - prowess >= decent_skill_rating - } - modifier = { - has_trait = lifestyle_blademaster - factor = 5 - } - modifier = { - factor = 3 - culture = { - has_cultural_parameter = blademaster_traits_more_common - } - } - modifier = { - NOT = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:pool_character } } - factor = 0.1 - } - if = { - limit = { has_trait = lifestyle_blademaster } - add_trait_xp = { - trait = lifestyle_blademaster - value = 10 - } - } - else = { add_trait = lifestyle_blademaster } - } - 100 = { #HUNTER - trigger = { - NOT = { - hunt_lifestyle_track_greater_equal_trigger = { TRACK = hunter GREATER_EQUAL = 100 } - } - ai_boldness >= medium_positive_ai_value - ai_energy >= low_positive_ai_value - ai_compassion < high_positive_ai_value - } - modifier = { - has_trait = lifestyle_hunter - factor = 5 - } - modifier = { - culture = { - OR = { - has_cultural_parameter = hunting_traits_more_common - has_cultural_parameter = falconer_traits_more_common - } - } - factor = 5 - } - if = { - limit = { has_trait = lifestyle_hunter } - random_list = { - 10 = { - modifier = { - culture = { has_cultural_parameter = hunting_traits_more_common } - add = 20 - } - add_trait_xp = { - trait = lifestyle_hunter - track = hunter - value = 10 - } - } - 10 = { - modifier = { - culture = { has_cultural_parameter = falconer_traits_more_common } - add = 20 - } - add_trait_xp = { - trait = lifestyle_hunter - track = falconer - value = 10 - } - } - } - } - else = { add_trait = lifestyle_hunter } - } - 100 = { #PHYSICIAN - trigger = { - NAND = { - has_trait = lifestyle_physician - has_trait_xp = { - trait = lifestyle_physician - value >= 100 - } - } - learning >= decent_skill_rating - } - modifier = { - has_trait = lifestyle_physician - factor = 5 - } - modifier = { - culture = { has_cultural_tradition = tradition_medicinal_plants } - factor = 2 - } - if = { - limit = { has_trait = lifestyle_physician } - add_trait_xp = { - trait = lifestyle_physician - value = 10 - } - } - else = { add_trait = lifestyle_physician } - } - 100 = { #MYSTIC - trigger = { - NAND = { - has_trait = lifestyle_mystic - has_trait_xp = { - trait = lifestyle_mystic - value >= 100 - } - } - learning >= decent_skill_rating - } - modifier = { - has_trait = lifestyle_mystic - factor = 5 - } - modifier = { - ai_zeal > 0 - factor = 0.5 - } - modifier = { - is_witch_trigger = yes - factor = 3 - } - modifier = { - culture = { has_cultural_parameter = mystic_trait_more_common } - factor = 5 - } - if = { - limit = { has_trait = lifestyle_mystic } - add_trait_xp = { - trait = lifestyle_mystic - value = 10 - } - } - else = { add_trait = lifestyle_mystic } - } - 100 = { #HERBALIST - trigger = { - NOT = { has_trait = lifestyle_herbalist } - learning >= decent_skill_rating - } - modifier = { - ai_zeal > 0 - factor = 0.5 - } - modifier = { - is_witch_trigger = yes - factor = 3 - } - modifier = { - culture = { has_cultural_parameter = herbalist_traits_more_common } - factor = 5 - } - add_trait = lifestyle_herbalist - } - 50 = { #GARDENER - trigger = { - NOT = { has_trait = lifestyle_gardener } - stewardship >= decent_skill_rating - } - modifier = { - culture = { has_cultural_parameter = can_appoint_court_gardener } - factor = 5 - } - add_trait = lifestyle_gardener - } - } - } - - #GET A COMMANDER TRAIT - 100 = { - trigger = { - has_trait = education_martial - number_of_commander_traits < commander_trait_limit - } - - random_list = { - 1 = { - trigger = { NOT = { has_trait = logistician } } - add_trait = logistician - } - 1 = { - trigger = { NOT = { has_trait = military_engineer } } - add_trait = military_engineer - } - 1 = { - trigger = { NOT = { has_trait = aggressive_attacker } } - add_trait = aggressive_attacker - } - 1 = { - trigger = { NOT = { has_trait = unyielding_defender } } - add_trait = unyielding_defender - } - 1 = { - trigger = { NOT = { has_trait = forder } } - add_trait = forder - } - 1 = { - trigger = { NOT = { has_trait = holy_warrior } } - add_trait = holy_warrior - } - 1 = { - trigger = { NOT = { has_trait = reckless } } - add_trait = reckless - } - 1 = { - trigger = { NOT = { has_trait = cautious_leader } } - add_trait = cautious_leader - } - 1 = { - trigger = { NOT = { has_trait = rough_terrain_expert } } - add_trait = rough_terrain_expert - } - 1 = { - trigger = { NOT = { has_trait = open_terrain_expert } } - add_trait = open_terrain_expert - } - } - } - - # GET AN INTERESTING TRAIT - 20 = { - random_list = { - 1 = { - trigger = { NOT = { has_trait = lunatic } } - add_trait = lunatic_1 - } - 1 = { - trigger = { NOT = { has_trait = possessed } } - add_trait = possessed_1 - } - 1 = { - trigger = { NOT = { has_trait = scarred } } - add_trait = scarred - add_trait_xp = { - trait = scarred - value = { - integer_range = { - min = 5 - max = 25 - } - } - } - } - 1 = { - trigger = { NOT = { has_trait = lifestyle_poet } } - add_trait = lifestyle_poet - } - 1 = { - trigger = { - can_be_drunkard = yes - } - add_trait = drunkard - } - 1 = { - trigger = { #Does not use the can_be_rakish to reduce performance hit - NOR = { - has_trait = rakish - has_trait = celibate - has_trait = chaste - has_sexuality = asexual - } - } - add_trait = rakish - } - 1 = { #Does not use the can_be_flagellant to reduce performance hit - trigger = { NOT = { has_trait = flagellant } } - add_trait = flagellant - } - 1 = { #Does not use the can_be_contrite to reduce performance hit - trigger = { - NOR = { - has_trait = deceitful - has_trait = contrite - } - } - add_trait = contrite - } - 1 = { #Does not use the can_be_journaller to reduce performance hit - trigger = { NOT = { has_trait = journaller } } - add_trait = journaller - } - 1 = { - trigger = { - is_eunuch_trigger = no - is_male = yes - age >= 12 - } - add_trait = eunuch_1 - } - 1 = { - trigger = { - is_eunuch_trigger = no - is_male = yes - age < 12 - } - add_trait = beardless_eunuch - } - 1 = { - trigger = { NOT = { has_trait = blind } } - add_trait = blind - } - 1 = { - trigger = { - NOR = { - has_trait = intellect_bad - has_trait = dull - has_trait = shrewd - } - } - add_trait = shrewd - } - 1 = { - trigger = { - NOR = { - has_trait = weak - has_trait = physique_bad - has_trait = strong - } - } - add_trait = strong - } - 1 = { - trigger = { - NOT = { - has_trait = loyal - } - } - add_trait = loyal - } - 1 = { - trigger = { - NOT = { - has_trait = disloyal - } - } - add_trait = disloyal - } - } - } - - # GET LOYAL/DISLOYAL - 10 = { - trigger = { - culture = { - has_cultural_parameter = loyal_trait_more_common - } - NOT = { has_trait = loyal } - } - add_trait = loyal - } - 10 = { - trigger = { - culture = { - has_cultural_parameter = disloyal_trait_more_common - } - NOT = { has_trait = disloyal } - } - add_trait = disloyal - } - - # GET A SECRET - 30 = { - trigger = { - NOT = { any_secret = { always = yes } } - } - - courtier_guest_pool_character_secret_giving_effect = yes - } - - # Learn a language - 30 = { - trigger = { - exists = location.county.culture - learning >= 8 - num_of_known_languages < language_soft_cap - NOT = { - knows_language_of_culture = location.county.culture - } - } - learn_language_of_culture = location.county.culture - } - } #RANDOM_LIST ENDS HERE - - # Certain characters learn languages very often - random = { - chance = { - value = 70 - if = { - limit = { - has_trait = scholar - } - add = -50 - } - } - if = { - limit = { - culture = { - has_cultural_parameter = wanderers_learn_languages - } - num_of_known_languages < language_soft_cap - exists = location.county.culture - NOT = { - knows_language_of_culture = location.county.culture - } - } - learn_language_of_culture = location.county.culture - } - } - - random = { - chance = 20 - # Cultural Traditions - if = { # blademaster_traits_more_common - limit = { - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:pool_character } - culture = { - has_cultural_parameter = blademaster_traits_more_common - } - } - blademaster_lifestyle_rank_up_effect = yes - } - } - random = { - chance = 80 - if = { # wanderers_gain_extra_combat_skills - limit = { - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:pool_character } - culture = { - has_cultural_parameter = wanderers_gain_extra_combat_skills - } - } - random_list = { - 10 = { - blademaster_lifestyle_rank_up_effect = yes - } - 10 = { - wanderer_give_random_commander_trait_effect = yes - } - 20 = { - add_prowess_skill = 1 - } - 10 = { - add_prowess_skill = 2 - } - 20 = { - add_martial_skill = 1 - } - 10 = { - add_martial_skill = 2 - } - } - } - } - if = { # wanderers_gain_extra_economic_skills - limit = { - culture = { - has_cultural_parameter = wanderers_gain_extra_economic_skills - } - } - random_list = { - 20 = { - wanderer_give_random_economic_trait_effect = yes - } - 30 = { - add_stewardship_skill = 1 - } - 10 = { - add_stewardship_skill = 2 - } - 40 = { - add_gold = 50 - } - } - } - - - # Cultural Traditions - random = { - chance = 10 - if = { - limit = { - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:pool_character } - has_education_martial_trigger = yes - culture = { - has_cultural_parameter = winter_soldier_trait_more_common - } - NOT = { - has_trait = winter_soldier - } - } - add_trait = winter_soldier - } - } - random = { - chance = 10 - if = { - limit = { - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:pool_character } - has_education_martial_trigger = yes - culture = { - has_cultural_parameter = forest_fighter_trait_more_common - } - NOT = { - has_trait = forest_fighter - } - } - add_trait = forest_fighter - } - } - random = { - chance = 10 - if = { - limit = { - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:pool_character } - has_education_martial_trigger = yes - culture = { - has_cultural_parameter = rough_terrain_expert_trait_more_common - } - NOT = { - has_trait = rough_terrain_expert - } - } - add_trait = rough_terrain_expert - } - } - random = { - chance = 10 - if = { - limit = { - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:pool_character } - has_education_martial_trigger = yes - culture = { - has_cultural_parameter = desert_warrior_trait_more_common - } - NOT = { - has_trait = desert_warrior - } - } - add_trait = desert_warrior - } - } - random = { - chance = 10 - if = { - limit = { - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:pool_character } - has_education_martial_trigger = yes - culture = { - has_cultural_parameter = jungle_stalker_trait_more_common - } - NOT = { - has_trait = jungle_stalker - } - } - add_trait = jungle_stalker - } - } -} - -purge_excess_wanderer_riches_effect = { - # Spend any excess gold to avoid having ultra-rich characters floating around - save_scope_as = pool_character - while = { - limit = { - gold >= 1000 - NOT = { - any_player = { - dynasty ?= scope:pool_character.dynasty - } - } - is_ruler = no - } - random_list = { - 100 = { # Spend gold on getting a friend - trigger = { - ai_sociability > low_negative_ai_value - NOR = { - has_trait = shy - has_trait = reclusive - } - exists = scope:pool_character.location - any_pool_character = { - province = scope:pool_character.location - is_physically_able_adult = yes - this != scope:pool_character - NOT = { has_any_scripted_relation = scope:pool_character } - } - } - random_pool_character = { - province = scope:pool_character.location - limit = { - is_physically_able_adult = yes - this != scope:pool_character - NOT = { has_any_scripted_relation = scope:pool_character } - } - save_temporary_scope_as = new_friend - } - add_prestige = major_prestige_value - set_random_friendship_reason = { TARGET = scope:new_friend } - pay_short_term_gold = { - target = scope:new_friend - gold = 500 - } - } - - 150 = { # Spend gold on for religious purposes - trigger = { - ai_zeal >= medium_positive_ai_value - learning < 30 - } - add_learning_skill = 3 - add_piety = major_piety_value - remove_short_term_gold = 500 - } - - 200 = { # Spend gold on gaining prestige and training prowess! - trigger = { - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:pool_character } - prowess < 30 - } - knight_increase_prowess_chance_effect = yes - add_prestige = major_prestige_value - remove_short_term_gold = 500 - } - - 100 = { # Spend gold on gaining prestige and skill! - trigger = { - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:pool_character } - martial < 25 - } - add_martial_skill = 2 - add_prestige = major_prestige_value - remove_short_term_gold = 500 - } - - 100 = { # Spend gold on gaining prestige and skill! - trigger = { - intrigue < 25 - } - add_intrigue_skill = 3 - add_prestige = major_prestige_value - remove_short_term_gold = 500 - } - - 100 = { # Spend gold on gaining prestige and skill! - trigger = { - stewardship < 25 - } - add_stewardship_skill = 3 - add_prestige = major_prestige_value - remove_short_term_gold = 500 - } - - 100 = { # Spend gold on gaining prestige and skill! - trigger = { - diplomacy < 25 - } - add_diplomacy_skill = 3 - add_prestige = major_prestige_value - remove_short_term_gold = 500 - } - - 100 = { # Lavish wedding! - trigger = { - age <= 40 - is_married = no - is_concubine = no - #The triggers below are here to avoid low fertility marriages - OR = { - has_sexuality = heterosexual - has_sexuality = bisexual - allowed_to_marry_same_sex_trigger = yes - } - NOR = { - has_trait = celibate - has_trait = chaste - } - fertility > low_fertility - can_marry_trigger = yes - } - - save_temporary_scope_as = template - - if = { - limit = { - exists = scope:pool_character.location - any_pool_character = { - province = scope:pool_character.location - allowed_to_marry_character_gender_trigger = { CHARACTER = scope:pool_character } - is_physically_able_adult = yes - age <= 40 - is_married = no - can_marry_trigger = yes - is_concubine = no - is_attracted_to_gender_of = scope:pool_character - } - } - random_pool_character = { - province = scope:pool_character.location - limit = { - allowed_to_marry_character_gender_trigger = { CHARACTER = scope:pool_character } - is_physically_able_adult = yes - age <= 40 - is_married = no - can_marry_trigger = yes - is_concubine = no - is_attracted_to_gender_of = scope:pool_character - } - save_temporary_scope_as = spouse - } - } - else = { - create_character = { - location = scope:template.location - gender_female_chance = scope:template.marriage_gender_adjusted_female_chance - template = mediocre_spouse - save_temporary_scope_as = spouse - } - } - - - marry = scope:spouse - - scope:spouse = { - if = { - limit = { - exists = scope:template.host - } - visit_court_of = scope:template.host - } - } - remove_short_term_gold = 500 - } - 500 = { # Become an adventurer! - trigger = { - has_dlc_feature = roads_to_power - gold >= 500 - is_physically_able_adult = yes - exists = location.county - ai_can_valid_to_create_laamp_trigger = yes - } - create_landless_adventurer_title_effect = { - REASON = flag:voluntary - FLAVOR_CHAR = root - } - if = { - limit = { - NOT = { - exists = global_var:pool_adventurer_spawn - } - } - set_global_variable = { - name = pool_adventurer_spawn - value = 1 - } - } - else = { - change_global_variable = { - name = pool_adventurer_spawn - add = 1 - } - } - } - 500 = { # Just waste the gold on nonsense - add_prestige = minor_prestige_value - remove_short_term_gold = 500 - } - } - } -} - -wanderer_give_random_commander_trait_effect = { - random_list = { - 100 = { - trigger = { NOT = { has_trait = logistician } } - add_trait = logistician - } - 100 = { - trigger = { NOT = { has_trait = military_engineer } } - add_trait = military_engineer - } - 100 = { - trigger = { NOT = { has_trait = aggressive_attacker } } - add_trait = aggressive_attacker - } - 100 = { - trigger = { NOT = { has_trait = unyielding_defender } } - add_trait = unyielding_defender - } - 100 = { - trigger = { NOT = { has_trait = forder } } - add_trait = forder - } - 100 = { - trigger = { NOT = { has_trait = flexible_leader } } - add_trait = flexible_leader - } - 100 = { - trigger = { - NOT = { has_trait = desert_warrior } - location = { - terrain = desert - } - } - add_trait = desert_warrior - } - 100 = { - trigger = { - NOT = { has_trait = jungle_stalker } - location = { - terrain = jungle - } - } - add_trait = jungle_stalker - } - 100 = { - trigger = { - NOT = { has_trait = winter_soldier } - location = { - OR = { - terrain = taiga - geographical_region = world_tibet - geographical_region = world_europe_north - geographical_region = world_europe_east - geographical_region = world_steppe - } - } - } - add_trait = winter_soldier - } - 100 = { - trigger = { NOT = { has_trait = reaver } } - add_trait = reaver - } - 100 = { - trigger = { NOT = { has_trait = reckless } } - add_trait = reckless - } - 100 = { - trigger = { NOT = { has_trait = holy_warrior } } - add_trait = holy_warrior - } - } -} - -wanderer_give_random_economic_trait_effect = { - random_list = { - 100 = { - trigger = { NOT = { has_trait = architect } } - add_trait = architect - } - 100 = { - trigger = { NOT = { has_trait = administrator } } - add_trait = administrator - } - 100 = { - trigger = { NOT = { has_trait = avaricious } } - add_trait = avaricious - } - 100 = { - trigger = { NOT = { has_trait = lifestyle_gardener } } - add_trait = lifestyle_gardener - } - } -} diff --git a/N3OW/common/scripted_effects/00_culture_effects.txt b/N3OW/common/scripted_effects/00_culture_effects.txt deleted file mode 100644 index 55757554..00000000 --- a/N3OW/common/scripted_effects/00_culture_effects.txt +++ /dev/null @@ -1,1309 +0,0 @@ - -convert_county_and_holder_if_in_region_effect = { - if = { - # If this county is of the old culture and is in the designated region, flip it to the new culture. - limit = { - culture = $OLD_CULTURE$ - title_province = { - geographical_region = $REGION$ - } - } - set_county_culture = $NEW_CULTURE$ - - # If the holder is also of the old culture, and their capital is in the designated region, we flip them along with the county. - holder = { - if = { - limit = { - culture = $OLD_CULTURE$ - capital_province = { - geographical_region = $REGION$ - } - } - set_culture = $NEW_CULTURE$ - } - } - } -} - -merge_cultures_in_region_effect = { - hidden_effect = { - convert_county_and_holder_if_in_region_effect = { - OLD_CULTURE = $OLD_CULTURE_1$ - NEW_CULTURE = $NEW_CULTURE$ - REGION = $REGION$ - } - convert_county_and_holder_if_in_region_effect = { - OLD_CULTURE = $OLD_CULTURE_2$ - NEW_CULTURE = $NEW_CULTURE$ - REGION = $REGION$ - } - } -} - -convert_player_realm_from_old_culture_to_new_effect = { - # For localization - $OLD_CULTURE$ = { save_scope_as = old_culture } - $NEW_CULTURE$ = { save_scope_as = new_culture } - - custom_tooltip = global_culture.custom.change_culture - hidden_effect = { - # Compile a list of everyone who will flip to the new culture. - every_vassal_or_below = { - limit = { - culture = $OLD_CULTURE$ - } - add_to_list = characters_to_convert - every_courtier = { - limit = { - culture = $OLD_CULTURE$ - } - add_to_list = characters_to_convert - } - } - every_courtier = { - limit = { - culture = $OLD_CULTURE$ - } - add_to_list = characters_to_convert - } - - # Flip the player to the new culture. - set_culture = $NEW_CULTURE$ - add_character_flag = converted_culture_this_lifetime - - # Flip their courtiers/vassals with a custom description. - every_in_list = { - list = characters_to_convert - set_culture = $NEW_CULTURE$ - } - - # Then flip all their counties. - every_sub_realm_county = { - limit = { - culture = $OLD_CULTURE$ - } - set_county_culture = $NEW_CULTURE$ - } - } -} - -merge_cultures_in_player_realm_effect = { - $OLD_CULTURE_1$ = { save_scope_as = old_culture_1 } - $OLD_CULTURE_2$ = { save_scope_as = old_culture_2 } - $NEW_CULTURE$ = { save_scope_as = new_culture } - - custom_tooltip = global_culture.custom_merge_culture - - hidden_effect = { - convert_player_realm_from_old_culture_to_new_effect = { - OLD_CULTURE = scope:old_culture_1 - NEW_CULTURE = scope:new_culture - } - convert_player_realm_from_old_culture_to_new_effect = { - OLD_CULTURE = scope:old_culture_2 - NEW_CULTURE = scope:new_culture - } - } -} - -convert_family_culture_and_notify_vassals_effect = { - # Save the root character as a reference - save_scope_as = converting_character - # Save the old culture as a scope - $OLD_CULTURE$ = { - save_scope_as = old_culture - } - $NEW_CULTURE$ = { - save_scope_as = new_culture - } - $CONVERTER$ = { - save_scope_as = converter - } - # Convert root character and AI close family members - set_culture = scope:new_culture - if = { - limit = { - is_ai = yes - } - add_character_flag = converted_culture_this_lifetime_ai - } - else = { - add_character_flag = converted_culture_this_lifetime - } - - every_close_family_member = { - custom = every_close_family_member_sharing_your_culture - limit = { - OR = { - is_courtier_of = scope:converter - is_vassal_of = scope:converter - } - # Exclude previous generations - NOT = { is_parent_of = root } - NOT = { is_grandparent_of = root } - # Only non-ruler same-culture characters - is_ruler = no - has_culture = scope:old_culture - } - set_culture = scope:new_culture - add_to_temporary_list = notified_of_culture_change - } - every_consort = { - #custom = every_consort_sharing_your_culture - limit = { - is_ruler = no - has_culture = scope:old_culture - NOT = { is_in_list = notified_of_culture_change } - } - set_culture = scope:new_culture - add_to_temporary_list = notified_of_culture_change - } - every_consort = { - limit = { - is_ruler = yes - has_culture = scope:old_culture - NOT = { is_in_list = notified_of_culture_change } - } - custom_description = { - text = decide_on_local_culture_conversion - trigger_event = { - id = culture_conversion.0001 - days = 1 - } - } - } - - # Offer every same-culture vassal a chance to convert - every_vassal = { - custom = every_old_culture_vassal_holding_new_culture_land - limit = { - culture = scope:old_culture - NOT = { is_in_list = notified_of_culture_change } - } - custom_description = { - text = decide_on_local_culture_conversion - trigger_event = { - id = culture_conversion.0001 - days = 1 - } - } - add_to_temporary_list = notified_of_culture_change - } - - # Notifications - hidden_effect = { - every_player = { - limit = { - OR = { - is_consort_of = scope:converting_character - liege ?= scope:converting_character - AND = { - exists = scope:converting_character.liege - this = scope:converting_character.liege - } - } - NOT = { is_in_list = notified_of_culture_change } - } - send_interface_message = { - type = msg_culture_conversion - title = converted_culture_msg_title - custom_tooltip = converted_from_old_culture_to_new_culture_tt - right_icon = scope:converting_character - } - } - } -} - -norse_assimilate_local_traditions_effect = { - # Save the root character as a reference - save_scope_as = converting_character - # Save the old culture as a scope - $OLD_CULTURE$ = { - save_scope_as = old_culture - } - $NEW_CULTURE$ = { - save_scope_as = new_culture - } - $OLD_FAITH$ = { - save_scope_as = old_faith - } - $NEW_FAITH$ = { - save_scope_as = new_faith - } - $CONVERTER$ = { - save_scope_as = converter - } - add_character_modifier = { - modifier = embraced_local_traditions_modifier - } - if = { - limit = { - dynasty ?= { - NOT = { - has_dynasty_modifier = settled_norse_dynasty_modifier - } - } - } - dynasty = { - add_dynasty_modifier = { modifier = settled_norse_dynasty_modifier years = 80 } - } - } - # Convert root character and AI close family members - set_culture = scope:new_culture - if = { - limit = { - NOR = { - scope:old_faith = scope:new_faith - has_trait = zealous - } - } - hidden_effect = { - bastard_to_wild_oat_conversion_assimilation_effect = yes - } - set_character_faith = scope:new_faith - } - if = { - limit = { - is_ai = yes - } - add_character_flag = converted_culture_this_lifetime_ai - } - else = { - add_character_flag = converted_culture_this_lifetime - } - - every_close_family_member = { - custom = every_close_family_member_sharing_your_culture - limit = { - is_courtier_of = scope:converter - # Only non-ruler same-culture characters - has_culture = scope:old_culture - } - set_culture = scope:new_culture - if = { - limit = { - NOR = { - scope:old_faith = scope:new_faith - has_trait = zealous - } - } - hidden_effect = { - bastard_to_wild_oat_conversion_assimilation_effect = yes - } - set_character_faith = scope:new_faith - } - hidden_effect = { - add_character_modifier = { - modifier = embraced_local_traditions_modifier - } - } - add_to_temporary_list = notified_of_culture_change - } - every_consort = { - #custom = every_consort_sharing_your_culture - limit = { - is_ruler = no - has_culture = scope:old_culture - NOT = { is_in_list = notified_of_culture_change } - } - set_culture = scope:new_culture - if = { - limit = { - NOR = { - scope:old_faith = scope:new_faith - has_trait = zealous - } - } - hidden_effect = { - bastard_to_wild_oat_conversion_assimilation_effect = yes - } - set_character_faith = scope:new_faith - } - hidden_effect = { - add_character_modifier = { - modifier = embraced_local_traditions_modifier - } - } - add_to_temporary_list = notified_of_culture_change - } - - # All Norse vassals convert - every_vassal = { - custom = every_norse_vassal - limit = { - culture = scope:old_culture - NOT = { is_in_list = notified_of_culture_change } - } - add_character_modifier = { - modifier = embraced_local_traditions_modifier - } - hidden_effect = { - if = { - limit = { - dynasty ?= { - NOT = { - has_dynasty_modifier = settled_norse_dynasty_modifier - } - } - } - dynasty = { - add_dynasty_modifier = { modifier = settled_norse_dynasty_modifier years = 80 } - } - } - } - set_culture = scope:new_culture - if = { - limit = { - NOR = { - scope:old_faith = scope:new_faith - has_trait = zealous - } - } - hidden_effect = { - bastard_to_wild_oat_conversion_assimilation_effect = yes - } - set_character_faith = scope:new_faith - } - - hidden_effect = { - every_close_family_member = { - limit = { - is_courtier_of = scope:converter - # Only non-ruler same-culture characters - has_culture = scope:old_culture - } - set_culture = scope:new_culture - if = { - limit = { - NOR = { - scope:old_faith = scope:new_faith - has_trait = zealous - } - } - hidden_effect = { - bastard_to_wild_oat_conversion_assimilation_effect = yes - } - set_character_faith = scope:new_faith - } - hidden_effect = { - add_character_modifier = { - modifier = embraced_local_traditions_modifier - } - } - add_to_temporary_list = notified_of_culture_change - } - every_consort = { - limit = { - is_ruler = no - has_culture = scope:old_culture - NOT = { is_in_list = notified_of_culture_change } - } - set_culture = scope:new_culture - if = { - limit = { - NOR = { - scope:old_faith = scope:new_faith - has_trait = zealous - } - } - hidden_effect = { - bastard_to_wild_oat_conversion_assimilation_effect = yes - } - set_character_faith = scope:new_faith - } - hidden_effect = { - add_character_modifier = { - modifier = embraced_local_traditions_modifier - } - } - add_to_temporary_list = notified_of_culture_change - } - } - - add_to_temporary_list = notified_of_culture_change - } - - # Notifications - hidden_effect = { - every_player = { - limit = { - OR = { - is_consort_of = scope:converting_character - liege ?= scope:converting_character - AND = { - exists = scope:converting_character.liege - this = scope:converting_character.liege - } - } - NOT = { is_in_list = notified_of_culture_change } - } - send_interface_message = { - type = msg_culture_conversion - title = converted_culture_msg_title - custom_tooltip = converted_from_old_culture_to_new_culture_tt - right_icon = scope:converting_character - } - } - } -} - -expand_hybrid_culture_from_origin_point = { - every_title_to_title_neighboring_and_across_water_county = { - limit = { - holder.top_liege = $CONVERTEE$.top_liege - save_temporary_scope_as = county_check - $CULTURE$ = { - any_parent_culture = { - this = scope:county_check.culture - } - } - } - - random = { - chance = { - value = 30 - if = { - limit = { - $CULTURE$ = { - any_parent_culture = { - save_temporary_scope_as = first_parent - } - any_parent_culture = { - this != scope:first_parent - cultural_acceptance = { target = scope:first_parent value >= 45 } - } - } - } - add = 5 - } - if = { - limit = { - $CULTURE$ = { - any_parent_culture = { - save_temporary_scope_as = first_parent - } - any_parent_culture = { - this != scope:first_parent - cultural_acceptance = { target = scope:first_parent value >= 50 } - } - } - } - add = 5 - } - if = { - limit = { - $CULTURE$ = { - any_parent_culture = { - save_temporary_scope_as = first_parent - } - any_parent_culture = { - this != scope:first_parent - cultural_acceptance = { target = scope:first_parent value >= 55 } - } - } - } - add = 5 - } - if = { - limit = { - $CULTURE$ = { - any_parent_culture = { - save_temporary_scope_as = first_parent - } - any_parent_culture = { - this != scope:first_parent - cultural_acceptance = { target = scope:first_parent value >= 60 } - } - } - } - add = 5 - } - if = { - limit = { - $CULTURE$ = { - any_parent_culture = { - save_temporary_scope_as = first_parent - } - any_parent_culture = { - this != scope:first_parent - cultural_acceptance = { target = scope:first_parent value >= 65 } - } - } - } - add = 5 - } - if = { - limit = { - $CULTURE$ = { - any_parent_culture = { - save_temporary_scope_as = first_parent - } - any_parent_culture = { - this != scope:first_parent - cultural_acceptance = { target = scope:first_parent value >= 70 } - } - } - } - add = 5 - } - if = { - limit = { - $CULTURE$ = { - any_parent_culture = { - save_temporary_scope_as = first_parent - } - any_parent_culture = { - this != scope:first_parent - cultural_acceptance = { target = scope:first_parent value >= 75 } - } - } - } - add = 5 - } - if = { - limit = { - $CULTURE$ = { - any_parent_culture = { - save_temporary_scope_as = first_parent - } - any_parent_culture = { - this != scope:first_parent - cultural_acceptance = { target = scope:first_parent value >= 80 } - } - } - } - add = 5 - } - if = { - limit = { - $CULTURE$ = { - any_parent_culture = { - save_temporary_scope_as = first_parent - } - any_parent_culture = { - this != scope:first_parent - cultural_acceptance = { target = scope:first_parent value >= 85 } - } - } - } - add = 5 - } - if = { - limit = { - $CULTURE$ = { - any_parent_culture = { - save_temporary_scope_as = first_parent - } - any_parent_culture = { - this != scope:first_parent - cultural_acceptance = { target = scope:first_parent value >= 90 } - } - } - } - add = 5 - } - if = { - limit = { - $CULTURE$ = { - any_parent_culture = { - save_temporary_scope_as = first_parent - } - any_parent_culture = { - this != scope:first_parent - cultural_acceptance = { target = scope:first_parent value >= 95 } - } - } - } - add = 5 - } - if = { - limit = { - $CULTURE$ = { - any_parent_culture = { - save_temporary_scope_as = first_parent - } - any_parent_culture = { - this != scope:first_parent - cultural_acceptance = { target = scope:first_parent value >= 100 } - } - } - } - add = 5 - } - } - set_county_culture = $CULTURE$ - every_title_to_title_neighboring_and_across_water_county = { - limit = { - holder.top_liege = $CONVERTEE$.top_liege - save_temporary_scope_as = county_check - $CULTURE$ = { - any_parent_culture = { - this = scope:county_check.culture - } - } - } - random = { - chance = { - value = 30 - if = { - limit = { - $CULTURE$ = { - any_parent_culture = { - save_temporary_scope_as = first_parent - } - any_parent_culture = { - this != scope:first_parent - cultural_acceptance = { target = scope:first_parent value >= 45 } - } - } - } - add = 5 - } - if = { - limit = { - $CULTURE$ = { - any_parent_culture = { - save_temporary_scope_as = first_parent - } - any_parent_culture = { - this != scope:first_parent - cultural_acceptance = { target = scope:first_parent value >= 50 } - } - } - } - add = 5 - } - if = { - limit = { - $CULTURE$ = { - any_parent_culture = { - save_temporary_scope_as = first_parent - } - any_parent_culture = { - this != scope:first_parent - cultural_acceptance = { target = scope:first_parent value >= 55 } - } - } - } - add = 5 - } - if = { - limit = { - $CULTURE$ = { - any_parent_culture = { - save_temporary_scope_as = first_parent - } - any_parent_culture = { - this != scope:first_parent - cultural_acceptance = { target = scope:first_parent value >= 60 } - } - } - } - add = 5 - } - if = { - limit = { - $CULTURE$ = { - any_parent_culture = { - save_temporary_scope_as = first_parent - } - any_parent_culture = { - this != scope:first_parent - cultural_acceptance = { target = scope:first_parent value >= 65 } - } - } - } - add = 5 - } - if = { - limit = { - $CULTURE$ = { - any_parent_culture = { - save_temporary_scope_as = first_parent - } - any_parent_culture = { - this != scope:first_parent - cultural_acceptance = { target = scope:first_parent value >= 70 } - } - } - } - add = 5 - } - if = { - limit = { - $CULTURE$ = { - any_parent_culture = { - save_temporary_scope_as = first_parent - } - any_parent_culture = { - this != scope:first_parent - cultural_acceptance = { target = scope:first_parent value >= 75 } - } - } - } - add = 5 - } - if = { - limit = { - $CULTURE$ = { - any_parent_culture = { - save_temporary_scope_as = first_parent - } - any_parent_culture = { - this != scope:first_parent - cultural_acceptance = { target = scope:first_parent value >= 80 } - } - } - } - add = 5 - } - if = { - limit = { - $CULTURE$ = { - any_parent_culture = { - save_temporary_scope_as = first_parent - } - any_parent_culture = { - this != scope:first_parent - cultural_acceptance = { target = scope:first_parent value >= 85 } - } - } - } - add = 5 - } - if = { - limit = { - $CULTURE$ = { - any_parent_culture = { - save_temporary_scope_as = first_parent - } - any_parent_culture = { - this != scope:first_parent - cultural_acceptance = { target = scope:first_parent value >= 90 } - } - } - } - add = 5 - } - if = { - limit = { - $CULTURE$ = { - any_parent_culture = { - save_temporary_scope_as = first_parent - } - any_parent_culture = { - this != scope:first_parent - cultural_acceptance = { target = scope:first_parent value >= 95 } - } - } - } - add = 5 - } - if = { - limit = { - $CULTURE$ = { - any_parent_culture = { - save_temporary_scope_as = first_parent - } - any_parent_culture = { - this != scope:first_parent - cultural_acceptance = { target = scope:first_parent value >= 100 } - } - } - } - add = 5 - } - } - set_county_culture = $CULTURE$ - } - } - } - } -} - -new_culture_created_conversion_effect = { - - # Save the hybrid culture for use with ai_will_do down the line - if = { - limit = { - $CULTURE$ = { is_hybrid_culture = yes } - } - add_to_global_variable_list = { name = hybrid_cultures target = $CULTURE$ } - } - - # Convert Counties (if of same culture as recipient's old culture) - $CONVERTEE$ = { - if = { - limit = { - capital_county = { - save_temporary_scope_as = county_check - $CULTURE$ = { - any_parent_culture = { - this = scope:county_check.culture - } - } - } - } - capital_county = { - set_county_culture = $CULTURE$ - expand_hybrid_culture_from_origin_point = { - CONVERTEE = $CONVERTEE$ - CULTURE = $CULTURE$ - } - } - } - else_if = { - limit = { - any_held_title = { - title_tier = county - save_temporary_scope_as = county_check - $CULTURE$ = { - any_parent_culture = { - this = scope:county_check.culture - } - } - } - } - random_held_title = { - title_tier = county - limit = { - save_temporary_scope_as = county_check - $CULTURE$ = { - any_parent_culture = { - this = scope:county_check.culture - } - } - } - set_county_culture = $CULTURE$ - expand_hybrid_culture_from_origin_point = { - CONVERTEE = $CONVERTEE$ - CULTURE = $CULTURE$ - } - } - } - else_if = { - limit = { - any_sub_realm_county = { - save_temporary_scope_as = county_check - $CULTURE$ = { - any_parent_culture = { - this = scope:county_check.culture - } - } - } - } - random_sub_realm_county = { - limit = { - save_temporary_scope_as = county_check - $CULTURE$ = { - any_parent_culture = { - this = scope:county_check.culture - } - } - } - set_county_culture = $CULTURE$ - expand_hybrid_culture_from_origin_point = { - CONVERTEE = $CONVERTEE$ - CULTURE = $CULTURE$ - } - } - } - } - # Spouses convert - $CONVERTEE$ = { - every_spouse = { - limit = { - OR = { - is_courtier_of = $CONVERTER$ - is_courtier_of = $CONVERTEE$ - is_vassal_of = $CONVERTER$ - is_vassal_of = $CONVERTEE$ - } - save_temporary_scope_as = spouse_check - $CULTURE$ = { - any_parent_culture = { - this = scope:spouse_check.culture - } - } - } - if = { - limit = { - exists = domicile.domicile_culture - culture = domicile.domicile_culture - } - domicile = { set_domicile_culture = $CULTURE$ } - } - set_culture = $CULTURE$ - hidden_effect = { - add_character_flag = converted_culture_this_lifetime - } - } - } - # Family in recipient's court also convert - if = { - limit = { - $CONVERTEE$ = { - is_ruler = yes - any_close_or_extended_family_member = { - court_owner ?= $CONVERTEE$ - NOT = { culture = $CULTURE$ } - is_ai = yes - } - } - } - $CONVERTEE$ = { - every_close_or_extended_family_member = { - custom = all_family_members_at_court - limit = { - court_owner ?= $CONVERTEE$ - NOT = { culture = $CULTURE$ } - is_ai = yes - save_temporary_scope_as = family_check - $CULTURE$ = { - any_parent_culture = { - this = scope:family_check.culture - } - } - } - if = { - limit = { - exists = domicile.domicile_culture - culture = domicile.domicile_culture - } - domicile = { set_domicile_culture = $CULTURE$ } - } - set_culture = $CULTURE$ - hidden_effect = { - add_character_flag = converted_culture_this_lifetime - } - } - } - } - # Make sure relevant non-significant characters convert - $CONVERTEE$ = { - hidden_effect = { - every_courtier_or_guest = { - limit = { - NOT = { culture = $CULTURE$ } - is_ai = yes - has_no_particular_noble_roots_trigger = yes - save_temporary_scope_as = family_check - $CULTURE$ = { - any_parent_culture = { - this = scope:family_check.culture - } - } - } - if = { - limit = { - exists = domicile.domicile_culture - culture = domicile.domicile_culture - } - domicile = { set_domicile_culture = $CULTURE$ } - } - set_culture = $CULTURE$ - hidden_effect = { - add_character_flag = converted_culture_this_lifetime - } - } - if = { - limit = { - exists = $CONVERTEE$.capital_province - } - every_pool_character = { - province = $CONVERTEE$.capital_province - limit = { - NOT = { culture = $CULTURE$ } - is_ai = yes - has_no_particular_noble_roots_trigger = yes - save_temporary_scope_as = family_check - $CULTURE$ = { - any_parent_culture = { - this = scope:family_check.culture - } - } - } - if = { - limit = { - exists = domicile.domicile_culture - culture = domicile.domicile_culture - } - domicile = { set_domicile_culture = $CULTURE$ } - } - set_culture = $CULTURE$ - hidden_effect = { - add_character_flag = converted_culture_this_lifetime - } - } - } - } - } - $CONVERTEE$ = { # Clean up culture in the realm for subvassals with a liege of the wrong culture - hidden_effect = { - every_vassal_or_below = { - limit = { - is_playable_character = yes - save_temporary_scope_as = vassal_check - $CULTURE$ = { - any_parent_culture = { - this = scope:vassal_check.culture - } - } - NOT = { - $CULTURE$ = { - any_parent_culture = { - this = scope:vassal_check.liege.culture - } - } - } - } - save_scope_as = vassal_converting - new_culture_created_vassal_conversion_effect = { - CONVERTEE = scope:vassal_converting - CONVERTER = $CONVERTER$ - CULTURE = $CULTURE$ - } - } - #every_sub_realm_county = { - # limit = { - # save_temporary_scope_as = county_check - # $CULTURE$ = { - # any_parent_culture = { - # this = scope:county_check.culture - # } - # } - # NOT = { - # $CULTURE$ = { - # any_parent_culture = { - # this = scope:county_check.holder.culture - # } - # } - # } - # } - # set_county_culture = $CULTURE$ - #} - } - } - $CONVERTEE$ = { - if = { - limit = { - exists = domicile.domicile_culture - culture = domicile.domicile_culture - } - domicile = { set_domicile_culture = $CULTURE$ } - } - set_culture = $CULTURE$ - hidden_effect = { - add_character_flag = converted_culture_this_lifetime - } - } -} - -new_culture_created_vassal_conversion_effect = { - - # Save the hybrid culture for use with ai_will_do down the line - if = { - limit = { - $CULTURE$ = { is_hybrid_culture = yes } - NOT = { - any_in_global_list = { - variable = hybrid_cultures - this = $CULTURE$ - } - } - } - add_to_global_variable_list = { name = hybrid_cultures target = $CULTURE$ } - } - - # Convert Counties (if of same culture as recipient's old culture) - $CONVERTEE$ = { - #every_held_title = { - # title_tier = county - # limit = { - # save_temporary_scope_as = county_check - # $CULTURE$ = { - # any_parent_culture = { - # this = scope:county_check.culture - # } - # } - # } - # set_county_culture = $CULTURE$ - #} - } - # Spouses convert - $CONVERTEE$ = { - every_spouse = { - limit = { - OR = { - is_courtier_of = $CONVERTER$ - is_courtier_of = $CONVERTEE$ - is_vassal_of = $CONVERTER$ - is_vassal_of = $CONVERTEE$ - } - save_temporary_scope_as = spouse_check - $CULTURE$ = { - any_parent_culture = { - this = scope:spouse_check.culture - } - } - } - if = { - limit = { - exists = domicile.domicile_culture - culture = domicile.domicile_culture - } - domicile = { set_domicile_culture = $CULTURE$ } - } - set_culture = $CULTURE$ - hidden_effect = { - add_character_flag = converted_culture_this_lifetime - } - } - } - # Family in recipient's court also convert - if = { - limit = { - $CONVERTEE$ = { - is_ruler = yes - any_close_or_extended_family_member = { - court_owner ?= $CONVERTEE$ - NOT = { culture = $CULTURE$ } - is_ai = yes - } - } - } - $CONVERTEE$ = { - every_close_or_extended_family_member = { - custom = all_family_members_at_court - limit = { - court_owner ?= $CONVERTEE$ - NOT = { culture = $CULTURE$ } - is_ai = yes - save_temporary_scope_as = family_check - $CULTURE$ = { - any_parent_culture = { - this = scope:family_check.culture - } - } - } - if = { - limit = { - exists = domicile.domicile_culture - culture = domicile.domicile_culture - } - domicile = { set_domicile_culture = $CULTURE$ } - } - set_culture = $CULTURE$ - hidden_effect = { - add_character_flag = converted_culture_this_lifetime - } - } - } - } - - # Make sure relevant non-significant characters convert - $CONVERTEE$ = { - hidden_effect = { - every_courtier_or_guest = { - limit = { - NOT = { culture = $CULTURE$ } - is_ai = yes - has_no_particular_noble_roots_trigger = yes - save_temporary_scope_as = family_check - $CULTURE$ = { - any_parent_culture = { - this = scope:family_check.culture - } - } - } - if = { - limit = { - exists = domicile.domicile_culture - culture = domicile.domicile_culture - } - domicile = { set_domicile_culture = $CULTURE$ } - } - set_culture = $CULTURE$ - hidden_effect = { - add_character_flag = converted_culture_this_lifetime - } - } - if = { - limit = { - exists = $CONVERTEE$.capital_province - } - every_pool_character = { - province = $CONVERTEE$.capital_province - limit = { - NOT = { culture = $CULTURE$ } - is_ai = yes - has_no_particular_noble_roots_trigger = yes - save_temporary_scope_as = family_check - $CULTURE$ = { - any_parent_culture = { - this = scope:family_check.culture - } - } - } - if = { - limit = { - exists = domicile.domicile_culture - culture = domicile.domicile_culture - } - domicile = { set_domicile_culture = $CULTURE$ } - } - set_culture = $CULTURE$ - hidden_effect = { - add_character_flag = converted_culture_this_lifetime - } - } - } - } - } - $CONVERTEE$ = { - if = { - limit = { - exists = domicile.domicile_culture - culture = domicile.domicile_culture - } - domicile = { set_domicile_culture = $CULTURE$ } - } - set_culture = $CULTURE$ - hidden_effect = { - add_character_flag = converted_culture_this_lifetime - } - } - - $CONVERTEE$ = { - every_vassal = { - limit = { - is_playable_character = yes - is_ai = yes - save_temporary_scope_as = vassal_check - $CULTURE$ = { - any_parent_culture = { - this = scope:vassal_check.culture - } - } - } - - run_interaction = { - interaction = request_culture_conversion_interaction - actor = $CONVERTEE$ - recipient = this - execute_threshold = accept - } - } - } -} - -inspired_by_tradition_effect = { - save_scope_as = tradition_scope - custom_tooltip = inspire_by_culture_tt - $CHARACTER$ = { - add_to_variable_list = { - name = culture_tradition_reduction - target = prev - } - } -} diff --git a/N3OW/common/scripted_effects/00_custom_loc_effects.txt b/N3OW/common/scripted_effects/00_custom_loc_effects.txt deleted file mode 100644 index 9346f5e1..00000000 --- a/N3OW/common/scripted_effects/00_custom_loc_effects.txt +++ /dev/null @@ -1,122 +0,0 @@ -#Custom Loc scripted effects -# all date calculations are done in DAYS -# to be run in the root character scope -get_period_of_time_word_setup_effect = { - set_variable = { - name = start_date - value = $START_DATE$ - } - set_variable = { - name = current_date - value = current_date - } - set_variable = { - name = period_of_time - value = { - value = var:current_date - subtract = var:start_date - } - } -} - -# To be called in the after block of the event where this is used so the variables get cleaned up -clean_up_period_of_time_word_effect = { - remove_variable = start_date - remove_variable = current_date - remove_variable = period_of_time -} - -set_raunchy_compliment_noun_effect = { - random_list = { - #Vixen - 10 = { - trigger = { is_female = yes } - set_variable = { - name = raunchy_compliment_noun - value = flag:vixen - days = 5 - } - } - #Minx - 10 = { - trigger = { is_female = yes } - set_variable = { - name = raunchy_compliment_noun - value = flag:minx - days = 5 - } - } - #Temptress - 10 = { - trigger = { is_female = yes } - set_variable = { - name = raunchy_compliment_noun - value = flag:temptress - days = 5 - } - } - #Siren - 10 = { - trigger = { is_female = yes } - set_variable = { - name = raunchy_compliment_noun - value = flag:siren - days = 5 - } - } - #Enchantress - 10 = { - trigger = { is_female = yes } - set_variable = { - name = raunchy_compliment_noun - value = flag:enchantress - days = 5 - } - } - #Lion - 10 = { - trigger = { is_male = yes } - set_variable = { - name = raunchy_compliment_noun - value = flag:lion - days = 5 - } - } - #Stallion - 10 = { - trigger = { is_male = yes } - set_variable = { - name = raunchy_compliment_noun - value = flag:stallion - days = 5 - } - } - #Stag - 10 = { - trigger = { is_male = yes } - set_variable = { - name = raunchy_compliment_noun - value = flag:stag - days = 5 - } - } - #Beast - 10 = { - trigger = { is_male = yes } - set_variable = { - name = raunchy_compliment_noun - value = flag:beast - days = 5 - } - } - #Stud - 10 = { - trigger = { is_male = yes } - set_variable = { - name = raunchy_compliment_noun - value = flag:stud - days = 5 - } - } - } -} \ No newline at end of file diff --git a/N3OW/common/scripted_effects/00_death_management_effects.txt b/N3OW/common/scripted_effects/00_death_management_effects.txt deleted file mode 100644 index 6efa7732..00000000 --- a/N3OW/common/scripted_effects/00_death_management_effects.txt +++ /dev/null @@ -1,119 +0,0 @@ -add_death_event_blocker_effect = { - set_variable = { - name = block_death_event_from - value = $DEAD$ - days = 3 - } - #If we get timed variables in list: -# add_to_variable_list = { -# name = block_death_event_from -# target = $DEAD$ -# days = 3 -# } -} - -silent_disappearance_effect = { - hidden_effect = { - if = { - limit = { is_alive = yes } - - death = { - death_reason = death_disappearance - } - } - } -} - -silent_disappearance_ai_effect = { - hidden_effect = { - if = { - limit = { - is_alive = yes - root = { is_ai = yes } - } - - death = { - death_reason = death_disappearance - } - } - } -} - -silent_disappearance_ai_if_created_effect = { - hidden_effect = { - if = { - limit = { - is_alive = yes - root = { is_ai = yes } - has_character_flag = created - } - - death = { - death_reason = death_disappearance - } - } - } -} - -silent_disappear_ai_if_not_hired = { - hidden_effect = { - if = { - limit = { - is_alive = yes - root = { is_ai = yes } - employer != root - } - - death = { - death_reason = death_disappearance - } - } - else_if = { - limit = { - is_alive = yes - employer != root - } - move_to_pool = yes - } - } -} - -silent_disappear_ai_if_not_hired_with_flag = { - hidden_effect = { - if = { - limit = { - is_alive = yes - root = { is_ai = yes } - employer != root - has_character_flag = created - } - - death = { - death_reason = death_disappearance - } - } - else_if = { - limit = { - is_alive = yes - employer != root - has_character_flag = created - } - move_to_pool = yes - } - } -} - -save_died_in_battle_variables_effect = { - set_variable = { - name = battle_death_enemy - value = $ENEMY$ - } - set_variable = { - name = battle_death_leader - value = $LEADER$ - } - set_variable = { - name = battle_death_location - value = $LOCATION$ - } -} diff --git a/N3OW/common/scripted_effects/00_debug_and_shortcut_effects.txt b/N3OW/common/scripted_effects/00_debug_and_shortcut_effects.txt deleted file mode 100644 index 3016cc75..00000000 --- a/N3OW/common/scripted_effects/00_debug_and_shortcut_effects.txt +++ /dev/null @@ -1,72 +0,0 @@ -################################################## -# Shortcuts -################################################## - -# Easily set-or-add to a variable. -increment_variable_effect = { - if = { - limit = { - NOT = { exists = var:$VAR$ } - } - set_variable = { - name = $VAR$ - value = $VAL$ - } - } - else = { - change_variable = { - name = $VAR$ - add = $VAL$ - } - } -} - -increment_variable_remove_at_zero_effect = { - if = { - limit = { exists = var:$VAR$ } - change_variable = { - name = $VAR$ - add = $VALUE$ - } - if = { - limit = { var:$VAR$ <= 0 } - remove_variable = $VAR$ - } - } -} - -# Easily set-or-add to a _global_ variable - generally only for use in logging. -increment_global_variable_effect = { - if = { - limit = { - NOT = { exists = global_var:$VAR$ } - } - set_global_variable = { - name = $VAR$ - value = $VAL$ - } - } - else = { - change_global_variable = { - name = $VAR$ - add = $VAL$ - } - } -} - -################################################## -# Debug -################################################## - -log_debug_variable_for_persian_struggle_effect = { - if = { - limit = { - gather_debug_variables_for_persian_struggle_trigger = yes - is_struggle_type = persian_struggle - } - increment_global_variable_effect = { - VAR = sp_$VAR$ - VAL = 1 - } - } -} diff --git a/N3OW/common/scripted_effects/00_decisions_effects.txt b/N3OW/common/scripted_effects/00_decisions_effects.txt deleted file mode 100644 index 87fb7242..00000000 --- a/N3OW/common/scripted_effects/00_decisions_effects.txt +++ /dev/null @@ -1,3444 +0,0 @@ -reclaim_britannia_decision_effect = { - every_sub_realm_county = { - limit = { - NOR = { - culture = { has_cultural_pillar = heritage_goidelic } - culture = { has_cultural_pillar = heritage_brythonic } - } - title_province = { geographical_region = world_europe_west_britannia } - } - custom = british_isles.0001.custom - add_county_modifier = { - modifier = reclaim_britannia_culture_modifier - days = 3650 - } - } - capital_county = { - set_county_culture = root.culture - } - if = { - limit = { - culture = { has_cultural_pillar = heritage_goidelic } - } - give_nickname = nick_the_tuatha_de_danann - } - else = { - give_nickname = nick_pendragon - } -} - -restore_the_danelaw_effect = { - hidden_effect = { #Should shift all dejure of all Empires owned at the time. - title:k_england = { - every_in_de_jure_hierarchy = { - limit = { tier = tier_duchy } - set_de_jure_liege_title = title:k_danelaw - } - } - title:k_danelaw = { - set_de_jure_liege_title = title:k_england.de_jure_liege - } - } - give_nickname = nick_the_dane - create_title_and_vassal_change = { - type = created - save_scope_as = change - add_claim_on_loss = no - } - title:k_danelaw = { - change_title_holder = { - holder = root - change = scope:change - } - } - resolve_title_and_vassal_change = scope:change - title:k_danelaw = { - add_title_law = scandinavian_elective_succession_law - } - - if = { - limit = { - NOT = { highest_held_title_tier = tier_empire } - NOT = { has_primary_title = title:k_danelaw } - } - set_primary_title_to = title:k_danelaw - } - - #Destroy england - destroy_title = title:k_england -} - -create_holy_order_effect = { - hidden_effect = { - if = { # set up currencies for the HO leader, has to be saved as scope:leader - limit = { - exists = scope:leader - } - scope:leader = { - add_gold = 100 #So that they have some money to lend out - add_piety_level = 2 - add_gold = holy_order_starting_gold - every_courtier = { - add_trait = order_member - } - } - - # send messages - send_interface_toast = { - type = holy_order_founded_message - desc = i_created_holy_order_message - left_icon = scope:leader - right_icon = scope:new_holy_order.title - } - } - # send messages to relevant characters that HO got created - save_scope_as = holy_order_creator - every_player = { - limit = { - faith = scope:holy_order_creator.faith - this != scope:holy_order_creator - } - send_interface_message = { - type = holy_order_founded_message - desc = someone_created_holy_order_message - left_icon = scope:holy_order_creator - right_icon = scope:new_holy_order.title - } - } - every_neighboring_top_liege_realm_owner = { - limit = { - faith != scope:holy_order_creator.faith - } - send_interface_message = { - type = enemy_holy_order_founded_message - desc = other_faith_neighbor_created_holy_order_message - left_icon = scope:holy_order_creator - right_icon = scope:new_holy_order.title - } - } - # get the achievements for creating a HO - add_achievement_flag_effect = { FLAG = achievement_non_nobis_domine_flag } - if = { - limit = { exists = global_var:started_give_a_dog_a_bone_achievement } - add_achievement_global_variable_effect = { - VARIABLE = holy_order_give_a_dog_a_bone_achievement - VALUE = yes - } - } - } - # gain opinion with your HoF, if you have one and it's not you - if = { - limit = { - exists = faith.religious_head - faith.religious_head != root - } - faith.religious_head = { - add_opinion = { - target = root - modifier = founded_holy_order_opinion - } - } - } - # get a nice modifier - if = { - limit = { - NOT = { has_character_modifier = founded_holy_order_modifier } - } - add_character_modifier = { - modifier = founded_holy_order_modifier - years = 5 - } - } - # and boost the fervor - faith = { - change_fervor = { - value = 10 - desc = fervor_gain_holy_order_founded - } - } -} - -embrace_english_culture_effect = { - # Scopes saves for localization - root = { - save_scope_as = embracer - } - - # Prestige Bonus - add_prestige = medium_prestige_gain - - #Convert your, and your whole family's, culture - set_culture = culture:english - if = { - limit = { any_spouse = { is_playable_character = no } } - every_spouse = { - limit = { - is_playable_character = no - OR = { - culture = culture:norman - culture = culture:french - } - } - set_culture = culture:english - } - } - if = { - limit = { - any_close_family_member = { - is_playable_character = no - NOT = { is_spouse_of = root } - } - } - every_close_family_member = { - limit = { - is_playable_character = no - NOT = { is_spouse_of = root } - } - custom = all_unlanded_family_members - set_culture = culture:english - } - } - if = { - limit = { - any_child = { - NOT = { is_spouse_of = root } - } - } - every_child = { - limit = { - NOT = { is_spouse_of = root } - } - custom = all_children_custom - set_culture = culture:english - } - } - - #Convert appropriate vassals, and their family - if = { - limit = { - any_vassal_or_below = { - is_ai = yes - OR = { - culture = culture:norman - culture = culture:french - } - primary_title = { - OR = { - de_jure_liege = title:k_england - de_jure_liege.de_jure_liege = title:k_england - de_jure_liege.de_jure_liege.de_jure_liege = title:k_england - } - } - } - } - every_vassal_or_below = { - custom = embrace_english_culture_vassals_custom - limit = { - is_ai = yes - OR = { - culture = culture:norman - culture = culture:french - } - primary_title = { - OR = { - de_jure_liege = title:k_england - de_jure_liege.de_jure_liege = title:k_england - de_jure_liege.de_jure_liege.de_jure_liege = title:k_england - } - } - } - set_culture = culture:english - hidden_effect = { - if = { - limit = { any_spouse = { is_playable_character = no } } - every_spouse = { - limit = { - is_playable_character = no - OR = { - culture = culture:norman - culture = culture:french - } - } - set_culture = culture:english - } - } - if = { - limit = { - any_close_family_member = { - is_playable_character = no - NOT = { is_spouse_of = prev } - } - } - every_close_family_member = { - limit = { - is_playable_character = no - NOT = { is_spouse_of = prev } - } - custom = all_unlanded_family_members - set_culture = culture:english - } - } - if = { - limit = { - any_child = { - NOT = { is_spouse_of = prev } - } - } - every_child = { - limit = { - NOT = { is_spouse_of = prev } - } - custom = all_children_custom - set_culture = culture:english - } - } - if = { - limit = { - any_vassal_or_below = { - is_ai = yes - OR = { - culture = culture:norman - culture = culture:french - } - primary_title = { - OR = { - de_jure_liege = title:k_england - de_jure_liege.de_jure_liege = title:k_england - de_jure_liege.de_jure_liege.de_jure_liege = title:k_england - } - } - } - } - every_vassal_or_below = { - custom = embrace_english_culture_vassals_custom - limit = { - is_ai = yes - OR = { - culture = culture:norman - culture = culture:french - } - primary_title = { - OR = { - de_jure_liege = title:k_england - de_jure_liege.de_jure_liege = title:k_england - de_jure_liege.de_jure_liege.de_jure_liege = title:k_england - } - } - } - set_culture = culture:english - hidden_effect = { - if = { - limit = { any_spouse = { is_playable_character = no } } - every_spouse = { - limit = { - is_playable_character = no - OR = { - culture = culture:norman - culture = culture:french - } - } - set_culture = culture:english - } - } - if = { - limit = { - any_close_family_member = { - is_playable_character = no - NOT = { is_spouse_of = prev } - } - } - every_close_family_member = { - limit = { - is_playable_character = no - NOT = { is_spouse_of = prev } - } - custom = all_unlanded_family_members - set_culture = culture:english - } - } - if = { - limit = { - any_child = { - NOT = { is_spouse_of = prev } - } - } - every_child = { - limit = { - NOT = { is_spouse_of = prev } - } - custom = all_children_custom - set_culture = culture:english - } - } - } - } - } - } - } - } - - #Flip Counties - every_county_in_region = { - region = custom_england - custom = embrace_english_culture_counties_custom - limit = { - target_is_de_facto_liege_or_above = root.primary_title - } - random = { - chance = 40 - set_county_culture = culture:english - } - } - - culture:english = { - custom_tooltip = decision_embrace_english_culture_get_innovations - hidden_effect = { - reset_culture_creation_date = yes - get_all_innovations_from = culture:norman - get_all_innovations_from = culture:anglo_saxon - } - } - - remove_global_variable = harrying_of_the_north - every_player = { - limit = { - capital_province = { - geographical_region = world_europe_west_britannia - } - } - trigger_event = ep3_story_cycle_harrying.0004 - } - global_var:harrying_of_the_north = { end_story = yes } -} - -form_portugal_decision_effects = { - #Create the title and set proper de jure - hidden_effect = { - title:d_porto = { - save_scope_as = title_d_porto - set_de_jure_liege_title = title:k_portugal - } - title:d_coimbra = { - save_scope_as = title_d_coimbra - set_de_jure_liege_title = title:k_portugal - } - title:d_beja = { - save_scope_as = title_d_beja - set_de_jure_liege_title = title:k_portugal - } - title:d_algarve = { - save_scope_as = title_d_algarve - set_de_jure_liege_title = title:k_portugal - } - title:k_portugal = { - save_scope_as = title_k_portugal - } - } - custom_tooltip = form_portugal_decision_effects_de_jure_tt - - create_title_and_vassal_change = { - type = created - save_scope_as = title_change - add_claim_on_loss = no - } - title:k_portugal = { - change_title_holder = { - holder = root - change = scope:title_change - } - save_scope_as = title_k_portugal - } - resolve_title_and_vassal_change = scope:title_change - - if = { - limit = { - NOR = { - primary_title = { this = title:k_portugal } - highest_held_title_tier = tier_empire - } - } - set_primary_title_to = title:k_portugal - } - - hidden_effect = { - if = { - limit = { has_global_variable = fp2_struggle_compromise_ending } - title:k_portugal = { fp2_struggle_compromise_create_new_empire_effect = yes } - } - } - - #Covert self & court to portuguese culture - if = { - limit = { NOT = { has_culture = culture:portuguese } } - - every_courtier = { - limit = { has_same_culture_as = scope:portugal_former } - add_to_list = convert_list - } - #transfer over innovations from previous culture. - culture:portuguese = { - hidden_effect = { reset_culture_creation_date = yes } - get_all_innovations_from = scope:portugal_former.culture - } - set_culture = culture:portuguese - - every_in_list = { - list = convert_list - custom = portguese_convert_list #This says "every subject in the realm" even though vassals and their courts only covert later, through event - set_culture = culture:portuguese - } - } - - # Convert Iberian counties to Portugese culture - every_sub_realm_county = { - limit = { - tier = tier_county - culture = { has_cultural_pillar = heritage_iberian } - OR = { - de_jure_liege = title:d_porto - de_jure_liege = title:d_coimbra - de_jure_liege = title:d_beja - de_jure_liege = title:d_algarve - } - } - custom = portugese_convert_iberian_counties - set_county_culture = culture:portuguese - } - every_sub_realm_county = { - limit = { - tier = tier_county - NOT = { culture = { has_cultural_pillar = heritage_iberian } } - OR = { - de_jure_liege = title:d_porto - de_jure_liege = title:d_coimbra - de_jure_liege = title:d_beja - de_jure_liege = title:d_algarve - } - } - custom = portugese_convert_non_iberian_counties - random = { - chance = 50 - set_county_culture = culture:portuguese - } - } - - #Innovations - culture:portuguese = { - add_random_innovation = culture_group_military - add_random_innovation = culture_group_civic - } - - #Prestige - add_prestige = massive_prestige_gain -} - - -declare_canarias_decision_effects = { - #Create the title and set proper de jure - title:d_canarias = { - save_scope_as = d_canarias - set_de_jure_liege_title = title:k_canarias - } - title:k_canarias = { - save_scope_as = title_k_canarias - } - - create_title_and_vassal_change = { - type = created - save_scope_as = title_change - add_claim_on_loss = no - } - title:k_canarias = { - change_title_holder = { - holder = root - change = scope:title_change - } - save_scope_as = title_k_canarias - } - resolve_title_and_vassal_change = scope:title_change - - if = { - limit = { - NOR = { - primary_title = { this = title:k_canarias } - highest_held_title_tier = tier_empire - } - } - set_primary_title_to = title:k_canarias - } - - #Prestige - add_prestige = massive_prestige_gain -} - - - -unite_the_spanish_thrones_decision_effects = { - #Prestige - add_prestige = massive_prestige_gain - - #Laws - if = { - limit = { has_realm_law = crown_authority_0 } - add_realm_law_skip_effects = crown_authority_2 - } - else_if = { - limit = { - OR = { - has_realm_law = crown_authority_1 - has_realm_law = crown_authority_2 - } - } - add_realm_law_skip_effects = crown_authority_3 - } - - # Coat of Arms - if = { - limit = { scope:spain_uniter.primary_title = title:k_castille } - primary_title = { set_coa = k_castille_leon } - } - else_if = { - limit = { scope:spain_uniter.primary_title = title:k_leon } - primary_title = { set_coa = k_leon_castille } - } - - #Handle other Kingdom titles - title:k_castille = { add_to_list = spanish_kingdoms } - title:k_leon = { add_to_list = spanish_kingdoms } - title:k_spanish_galicia = { add_to_list = spanish_kingdoms } - title:k_portugal = { add_to_list = spanish_kingdoms } - title:k_aragon = { add_to_list = spanish_kingdoms } - title:k_navarra = { add_to_list = spanish_kingdoms } - title:k_andalusia = { add_to_list = spanish_kingdoms } - title:k_badajoz = { add_to_list = spanish_kingdoms } - title:k_valencia = { add_to_list = spanish_kingdoms } - title:k_toledo = { add_to_list = spanish_kingdoms } - - custom_tooltip = unite_the_spanish_thrones_decision_titles_tt - hidden_effect = { - every_in_list = { - list = spanish_kingdoms - limit = { - this != scope:spain_uniter.primary_title - scope:spain_uniter = { completely_controls = prev } - } - - #De jure shift all held spanish titles into your primary title - every_in_de_jure_hierarchy = { - limit = { tier = tier_duchy } - set_de_jure_liege_title = scope:spain_uniter.primary_title - } - - #Destroys them all! - scope:spain_uniter = { destroy_title = prev } - } - } -} - -unite_africa_decision_effects = { - #Prestige - add_prestige = massive_prestige_gain - - #Religion bonuses - if = { - limit = { - faith = { - OR = { - religion_tag = islam_religion - religion_tag = west_african_roog_religion - religion_tag = west_african_religion - religion_tag = west_african_bori_religion - this = faith:coptic - - } - } - } - add_piety = massive_piety_gain - faith = { - change_fervor = { - value = medium_fervor_gain - desc = fervor_gain_united_africa - } - } - - if = { - limit = { - any_vassal_or_below = { - faith != scope:africa_uniter.faith - is_ai = yes - capital_province ?= { geographical_region = world_africa } - } - } - every_vassal_or_below = { - custom = every_non_root_faith_vassal_africa - limit = { - faith != scope:africa_uniter.faith - is_ai = yes - capital_province ?= { geographical_region = world_africa } - } - random = { - chance = 33 - set_character_faith = scope:africa_uniter.faith - } - } - } - - if = { - limit = { - any_realm_province = { - faith != scope:africa_uniter.faith - geographical_region = world_africa - } - } - every_realm_province = { - limit = { - faith != scope:africa_uniter.faith - geographical_region = world_africa - } - county = { add_to_list = every_realm_county } - } - - every_in_list = { - list = every_realm_county - custom = every_non_root_faith_county_africa - random = { - chance = 33 - custom_tooltip = every_non_africa_uniter_faith_convert - hidden_effect = { set_county_faith = scope:africa_uniter.faith } - } - } - } - } -} - -avenge_the_battle_of_tours_decision_effects = { - - give_nickname = nick_the_avenger - add_character_modifier = { - modifier = avenger_of_the_martyrs - } - - add_prestige = massive_prestige_gain - - #Religious bonuses - add_piety = massive_piety_gain - faith = { - change_fervor = { - value = medium_fervor_gain - desc = fervor_gain_avenged_battle_of_tours - } - } - - add_achievement_flag_effect = { FLAG = achievement_al_andalus_flag } - - if = { - limit = { - any_vassal_or_below = { - faith != scope:avenger.faith - is_ai = yes - capital_province ?= { geographical_region = world_europe_west } - } - } - every_vassal_or_below = { - custom = every_non_root_faith_vassal_west_europe - limit = { - faith != scope:avenger.faith - is_ai = yes - capital_province ?= { geographical_region = world_europe_west } - } - random = { - chance = 33 - set_character_faith = scope:avenger.faith - } - } - } - - if = { - limit = { - any_realm_province = { - faith != scope:avenger.faith - geographical_region = world_europe_west - } - } - every_realm_province = { - limit = { - faith != scope:avenger.faith - geographical_region = world_europe_west - } - county = { - add_to_list = every_realm_county - } - } - - every_in_list = { - list = every_realm_county - custom = every_non_root_faith_county_west_europe - random = { - chance = 33 - custom_tooltip = every_non_avenger_faith_convert - hidden_effect = { set_county_faith = scope:avenger.faith } - } - } - } - - #Christian penalty - if = { - limit = { exists = scope:frankish_christian_faith } - scope:frankish_christian_faith = { - change_fervor = { - value = medium_fervor_loss - desc = fervor_loss_avenged_battle_of_tours - } - } - } - - # Rattach south of France to the e_hispania - title:e_france = { - every_in_de_jure_hierarchy = { - limit = { - tier = tier_kingdom - any_in_de_jure_hierarchy = { - tier = tier_county - title_province = { geographical_region = custom_south_francia } - } - } - set_de_jure_liege_title = title:e_spain - } - } -} - -unite_the_western_slavs_decision_effects = { - #Prestige - add_prestige = massive_prestige_gain - - #Innovations - culture = { - add_random_innovation = culture_group_military - add_random_innovation = culture_group_civic - } - - #Laws - if = { - limit = { has_realm_law = crown_authority_0 } - add_realm_law_skip_effects = crown_authority_2 - } - else_if = { - limit = { - OR = { - has_realm_law = crown_authority_1 - has_realm_law = crown_authority_2 - } - } - add_realm_law_skip_effects = crown_authority_3 - } - - #Handle de jure drift & destructions of other kingdom titles - title:k_poland = { add_to_list = west_slavic_kingdoms } - title:k_pomerania = { add_to_list = west_slavic_kingdoms } - title:k_bohemia = { add_to_list = west_slavic_kingdoms } - title:k_sorbia = { add_to_list = west_slavic_kingdoms } - title:k_moravia = { add_to_list = west_slavic_kingdoms } - - if = { - limit = { highest_held_title_tier = tier_kingdom } - custom_tooltip = unite_the_western_slavs_decision_titles_tt - } - custom_tooltip = unite_the_western_slavs_decision_titles_empire_tt - # If Saxony has been created, shift everything back into Polabia - if = { - limit = { - is_target_in_global_variable_list = { - name = unavailable_unique_decisions - target = flag:flag_formed_saxony - } - } - title:k_saxony = { - every_in_de_jure_hierarchy = { - limit = { tier = tier_duchy } - set_de_jure_liege_title = title:k_sorbia - } - } - } - hidden_effect = { - scope:western_slav_uniter = { - #If king-tier, give them the West-Slavia title - if = { - limit = { highest_held_title_tier = tier_kingdom } - create_title_and_vassal_change = { - type = created - save_scope_as = title_change - add_claim_on_loss = no - } - title:e_west_slavia = { - change_title_holder = { - holder = scope:western_slav_uniter - change = scope:title_change - } - } - resolve_title_and_vassal_change = scope:title_change - } - # Drift kingdoms to empire - every_in_list = { - list = west_slavic_kingdoms - set_de_jure_liege_title = scope:western_slav_uniter.primary_title - } - } - } -} - -unite_the_southern_slavs_decision_effects = { - #Prestige - add_prestige = massive_prestige_gain - - #Innovations - culture = { - add_random_innovation = culture_group_military - add_random_innovation = culture_group_civic - } - - #Handle de jure drift & destructions of other kingdom titles - title:k_croatia = { add_to_list = south_slavic_kingdoms } - title:k_serbia = { add_to_list = south_slavic_kingdoms } - title:k_bulgaria = { add_to_list = south_slavic_kingdoms } - title:k_dacia = { add_to_list = south_slavic_kingdoms } - title:k_moldavia = { add_to_list = south_slavic_kingdoms } - - custom_tooltip = unite_the_southern_slavs_decision_titles_tt - hidden_effect = { - every_in_list = { - list = south_slavic_kingdoms - limit = { - this != scope:southern_slav_uniter.primary_title - scope:southern_slav_uniter = { completely_controls = prev } - } - - #De jure shift all held west slavic titles into your primary title - every_in_de_jure_hierarchy = { - limit = { tier = tier_duchy } - set_de_jure_liege_title = scope:southern_slav_uniter.primary_title - } - - #Destroys them all! - scope:southern_slav_uniter = { destroy_title = prev } - } - } -} - -unite_the_slavs_decision_effects = { - #Prestige - add_prestige = massive_prestige_gain - - #Innovations - custom_tooltip = unite_the_slavs_decision_effects_innovations_tt - hidden_effect = { - #Add all Slavic cultures in the realm in a list - every_vassal_or_below = { - limit = { - OR = { - culture = { has_cultural_pillar = heritage_west_slavic } - culture = { has_cultural_pillar = heritage_east_slavic } - culture = { has_cultural_pillar = heritage_south_slavic } - } - save_temporary_scope_as = slavic_vassal - NOT = { - any_in_list = { - list = slavic_cultures - this = scope:slavic_vassal.culture - } - } - } - culture = { - add_to_list = slavic_cultures - } - } - #Add innovations from 3 random cultures - every_in_list = { - list = slavic_cultures - save_scope_as = culture_getting_innovations - - set_while_counter_variable_effect = yes - while = { - limit = { var:while_counter < 3 } - random_in_list = { - limit = { scope:culture_getting_innovations = { can_get_innovation_from = prev } } - list = slavic_cultures - scope:culture_getting_innovations = { get_random_innovation_from = prev } - } - increase_while_counter_variable_effect = yes - } - remove_while_counter_variable_effect = yes - } - } - - #Create the title and make it primary - create_title_and_vassal_change = { - type = created - save_scope_as = title_change - add_claim_on_loss = no - } - title:e_slavia = { - change_title_holder = { - holder = root - change = scope:title_change - } - } - resolve_title_and_vassal_change = scope:title_change - - set_primary_title_to = title:e_slavia - title:e_slavia = { save_scope_as = slavia } #For localisation - - #Destroy the other three empires if I have them - if = { - limit = { has_title = title:e_russia } - destroy_title = title:e_russia - } - if = { - limit = { has_title = title:e_wendish_empire } - destroy_title = title:e_wendish_empire - } - if = { - limit = { has_title = title:e_carpathia } - destroy_title = title:e_carpathia - } - - ###Handle de jure drift and empire destruction### - - #First: add all the kingdoms - title:k_poland = { add_to_list = slavic_kingdoms } - title:k_pomerania = { add_to_list = slavic_kingdoms } - title:k_bohemia = { add_to_list = slavic_kingdoms } - title:k_moravia = { add_to_list = slavic_kingdoms } - title:k_croatia = { add_to_list = slavic_kingdoms } - title:k_serbia = { add_to_list = slavic_kingdoms } - title:k_bulgaria = { add_to_list = slavic_kingdoms } - title:k_dacia = { add_to_list = slavic_kingdoms } - title:k_moldavia = { add_to_list = slavic_kingdoms } - title:k_white_rus = { add_to_list = slavic_kingdoms } - title:k_galicia-volhynia = { add_to_list = slavic_kingdoms } - title:k_ruthenia = { add_to_list = slavic_kingdoms } - title:k_novgorod = { add_to_list = slavic_kingdoms } - title:k_opolye = { add_to_list = slavic_kingdoms } - title:k_hungary = { add_to_list = slavic_kingdoms } - - # Inform players of the de jure drift - title:e_slavia = { custom_tooltip = unite_the_slavs_decision_titles_tt } #Scope change for tooltip formatting. - - if = { - limit = { has_dlc_feature = legends } - create_legend_seed = { - type = legitimizing - quality = illustrious - chronicle = new_title - properties = { - title = title:e_slavia - founder = root - } - } - } - # Actually do the de jure drift - hidden_effect = { - every_in_list = { - list = slavic_kingdoms - - set_de_jure_liege_title = scope:slav_uniter.primary_title - } - } -} - -unite_india_decision_effect = { - #Create the title and make it primary - create_title_and_vassal_change = { - type = created - save_scope_as = title_change - add_claim_on_loss = no - } - title:h_india = { - change_title_holder = { - holder = root - change = scope:title_change - } - } - resolve_title_and_vassal_change = scope:title_change - set_primary_title_to = title:h_india - - title:e_rajastan = { set_de_jure_liege_title = title:h_india } - title:e_deccan = { set_de_jure_liege_title = title:h_india } - title:e_bengal = { set_de_jure_liege_title = title:h_india } - - hidden_effect = { - if = { - limit = { has_title = title:e_rajastan } - destroy_title = title:e_rajastan - } - if = { - limit = { has_title = title:e_deccan } - destroy_title = title:e_deccan - } - if = { - limit = { has_title = title:e_bengal } - destroy_title = title:e_bengal - } - } -} - -become_saoshyant_decision_effect = { - set_nickname_effect = { NICKNAME = nick_the_saoshyant } - add_trait = saoshyant - custom_tooltip = become_saoshyant_decision_decendant_trait_tooltip - dynasty = { - add_dynasty_modifier = { - modifier = resurging_saoshyant - years = 25 - } - } - if = { - limit = { - any_held_title = { - title_tier = county - faith != root.faith - } - } - every_held_title = { - custom = all_held_counties - title_tier = county - limit = { - faith != root.faith - } - random = { - chance = 35 - set_county_faith = root.faith - } - } - } - faith = { - change_fervor = { - value = 15 - desc = fervor_gain_saoshyant - } - } -} - -build_grand_church_decision_effect = { - #faith = { activate_holy_site = segrada_familia } - if = { - limit = { - prestige_level < 5 - } - add_prestige_level = 1 - } -} - -accept_cannibalism_decision_effect = { - custom_tooltip = faith_accept_cannibalism - root.faith = { - set_variable = { - name = accepted_cannibalism - value = yes - } - } - root = { - if = { - limit = { - any_spouse = { - is_cannibal_trigger = no - is_ai = yes - } - } - every_spouse = { - limit = { - is_cannibal_trigger = no - is_ai = yes - } - add_trait = cannibal - } - } - if = { - limit = { - any_close_family_member = { - is_cannibal_trigger = no - is_playable_character = no - is_ai = yes - } - } - every_close_family_member = { - limit = { - is_cannibal_trigger = no - is_playable_character = no - is_ai = yes - } - custom = all_my_family_members - add_trait = cannibal - } - } - if = { - limit = { - any_vassal = { - is_cannibal_trigger = no - is_ai = yes - dread_modified_ai_boldness = { #all vassals that are intimidated - dreaded_character = root - value <= -50 - } - } - } - every_vassal = { - limit = { - is_cannibal_trigger = no - is_ai = yes - dread_modified_ai_boldness = { - dreaded_character = root - value <= -50 - } - } - custom = all_my_intimidated_vassals - add_trait = cannibal - } - } - } - give_nickname = nick_the_devourer -} - -found_university_decision_event_effect = { - if = { - limit = { - OR = { - has_bad_nickname = yes - has_any_nickname = no - } - } - give_nickname = nick_the_scholar - } - - hidden_effect = { - #Event that gives you highly skilled courtier - trigger_event = { - id = major_decisions.2011 - days = { 50 365 } - } - } -} - -found_university_decision_effect = { - found_university_decision_event_effect = yes - - if = { - limit = { - NOT = { has_variable = university } - } - show_as_tooltip = { - every_held_title = { - custom = decision_found_university_custom - title_tier = barony - title_capital_county.title_province = { - add_special_building_slot = generic_university - } - } - } - } -} - -lunatic_building_decision_effect = { - capital_province = { - set_variable = { #To unlock the building - name = variable_greenhouse - value = yes - } - add_special_building_slot = special_greenhouse_01 - add_special_building = special_greenhouse_01 - #add_province_modifier = extra_building_slot - #add_building = special_greenhouse_01 - } - - give_nickname = nick_the_glass -} - -found_witch_coven_decision_effects = { - save_scope_as = founder - custom_tooltip = found_witch_coven_decision_effects.children.tt - custom_tooltip = found_witch_coven_decision_effects.convert.tt - custom_tooltip = found_witch_coven_decision_effects.grand_rite.tt - house = { - add_house_modifier = { - modifier = witch_coven - } - } - # Check for the Volva achievement. - if = { - limit = { - # DLC check. - has_fp1_dlc_trigger = yes - fp1_achievement_religious_norse_trigger = yes - } - add_achievement_flag_effect = { FLAG = volva_achievement_flag } - } -} - -convert_whole_realm_to_feudalism_effect = { - #TOOLTIP INFO - #PLAYER EFFECTS - - hidden_effect = { - ## Spawn holdings in tribal counties - - every_sub_realm_county = { # Spawn temples in your holy sites - limit = { - any_county_province = { - has_holding_type = tribal_holding - } - NOT = { - any_county_province = { - has_holding_type = church_holding - } - } - any_county_province = { - has_holding = no - barony = { - is_holy_site_of = root.faith - } - } - } - random_county_province = { - limit = { - has_holding = no - barony_cannot_construct_holding = no - barony = { - is_holy_site_of = root.faith - } - } - set_holding_type = church_holding - } - } - - every_sub_realm_county = { # Spawn a City - limit = { - any_county_province = { - has_holding_type = tribal_holding - } - any_county_province = { - has_holding = no - } - NOT = { - any_county_province = { - has_holding_type = city_holding - } - } - } - random_county_province = { - limit = { - has_holding = no - OR = { - terrain = floodplains - terrain = oasis - terrain = farmlands - terrain = terraced_hills - } - is_coastal = yes - has_special_building_slot = no - barony_cannot_construct_holding = no - } - alternative_limit = { - has_holding = no - OR = { - terrain = floodplains - terrain = oasis - terrain = farmlands - terrain = terraced_hills - } - has_special_building_slot = no - barony_cannot_construct_holding = no - } - alternative_limit = { - has_holding = no - OR = { - terrain = floodplains - terrain = oasis - terrain = farmlands - terrain = terraced_hills - } - barony_cannot_construct_holding = no - } - alternative_limit = { - has_holding = no - barony_cannot_construct_holding = no - } - random = { - chance = 60 - modifier = { - add = county.development_level - } - modifier = { - add = 50 - this.county = root.capital_county - } - modifier = { - add = 20 - OR = { - terrain = floodplains - terrain = oasis - terrain = farmlands - terrain = terraced_hills - } - } - set_holding_type = city_holding - } - } - } - - every_sub_realm_county = { # Spawn a Temple - limit = { - any_county_province = { - has_holding_type = tribal_holding - } - any_county_province = { - has_holding = no - } - NOT = { - any_county_province = { - has_holding_type = church_holding - } - } - } - random_county_province = { - limit = { - has_holding = no - OR = { - terrain = floodplains - terrain = oasis - terrain = farmlands - terrain = terraced_hills - } - is_coastal = yes - has_special_building_slot = no - barony_cannot_construct_holding = no - } - alternative_limit = { - has_holding = no - OR = { - terrain = floodplains - terrain = oasis - terrain = farmlands - terrain = terraced_hills - } - has_special_building_slot = no - barony_cannot_construct_holding = no - } - alternative_limit = { - has_holding = no - OR = { - terrain = floodplains - terrain = oasis - terrain = farmlands - terrain = terraced_hills - } - barony_cannot_construct_holding = no - } - alternative_limit = { - has_holding = no - barony_cannot_construct_holding = no - } - random = { - chance = 50 - modifier = { - add = county.development_level - } - modifier = { - add = 50 - this.county = root.capital_county - } - modifier = { - add = 20 - OR = { - terrain = floodplains - terrain = oasis - terrain = farmlands - terrain = terraced_hills - } - } - set_holding_type = church_holding - } - } - } - - ##Sort out new buildings for liege and all vassals - every_realm_province = { - limit = { - has_holding_type = tribal_holding - NOT = { is_in_list = feudal_conversion } - } - add_to_list = feudal_conversion - } - every_vassal_or_below = { - every_realm_province = { - limit = { - has_holding_type = tribal_holding - NOT = { is_in_list = feudal_conversion } - } - add_to_list = feudal_conversion - - } - } - every_in_list = { - list = feudal_conversion - set_variable = { - name = tribal_to_feudal_building_level - value = combined_building_level - days = 1 - } - set_holding_type = castle_holding - while = { - limit = { - var:tribal_to_feudal_building_level > 1 - } - generate_building = yes - change_variable = { - name = tribal_to_feudal_building_level - subtract = 1 - } - } - remove_variable = tribal_to_feudal_building_level - remove_from_list = feudal_conversion - } - } - - ##Liege has Soryo? Convert to Soryo! - if = { - limit = { - has_tgp_dlc_trigger = yes - top_liege != this - liege = { government_has_flag = government_is_japan_feudal } - } - change_government = japan_feudal_government - if = { - limit = { - is_house_head = yes - } - save_scope_as = new_head - house = { - set_house_name = japanese_dynasty_name - save_scope_as = new_house - } - create_noble_family_effect = { GOVERNMENT_GIVER = this } - scope:new_title = { - #set_title_name_dynamic = japanese_noble_family_name - set_coa = scope:new_house - } - } - } - ##Liege has clan? Convert to clan! - else_if = { - limit = { - top_liege != this - OR = { - liege = { government_has_flag = government_is_clan } - AND = { - liege = { government_has_flag = government_is_tribal } - religion = religion:islam_religion - } - } - } - change_government = clan_government - } - ##Liege has feudal? Convert to feudal! - else_if = { - limit = { - top_liege != this - OR = { - liege = { government_has_flag = government_is_feudal } - AND = { - liege = { government_has_flag = government_is_tribal } - NOT = { religion = religion:islam_religion } - } - } - } - change_government = feudal_government - } - ##You're an independent Japanese Heritage Character? Convert to Soryo! - else_if = { - limit = { - has_tgp_dlc_trigger = yes - top_liege = this - culture = { has_cultural_pillar = heritage_japonic } - } - change_government = japan_feudal_government - if = { - limit = { - is_house_head = yes - } - save_scope_as = new_head - house = { - set_house_name = japanese_dynasty_name - save_scope_as = new_house - } - create_noble_family_effect = { GOVERNMENT_GIVER = this } - scope:new_title = { - #set_title_name_dynamic = japanese_noble_family_name - set_coa = scope:new_house - } - } - } - ##You're an independent Muslim? Convert to clan! - else_if = { - limit = { - top_liege = this - faith = { religion_tag = islam_religion } - } - change_government = clan_government - } - ##You're an independent anything else? Convert to feudal! - else = { change_government = feudal_government } - if = { - limit = { - government_has_flag = government_is_tribal - } - ##General - custom_tooltip = all_holding_will_change - ##Liege has clan? Convert to clan! - if = { - limit = { - top_liege != this - liege = { government_has_flag = government_is_clan } - } - custom_tooltip = clan_liege_vassals_will_convert - } - #Liege has feudal? Convert to feudal! - if = { - limit = { - top_liege != this - liege = { government_has_flag = government_is_feudal } - } - custom_tooltip = feudal_liege_vassals_will_convert - } - ##If I am Islamic, we will become clan. - if = { - limit = { - top_liege = this - faith = { religion_tag = islam_religion } - } - custom_tooltip = islamic_vassals_will_convert - } - ##If I am not Islamic, we will become feudal. - else_if = { - limit = { top_liege = this } - custom_tooltip = other_vassals_will_convert - } - } - - hidden_effect = { - #Nuke tribal authorities. - if = { - limit = { has_realm_law = tribal_authority_0 } - remove_realm_law = tribal_authority_0 - } - if = { - limit = { has_realm_law = tribal_authority_1 } - remove_realm_law = tribal_authority_1 - } - if = { - limit = { has_realm_law = tribal_authority_2 } - remove_realm_law = tribal_authority_2 - } - if = { - limit = { has_realm_law = tribal_authority_3 } - remove_realm_law = tribal_authority_3 - } - #Start off crown authorities. - if = { - limit = { - NOT = { has_realm_law = crown_authority_0 } - } - add_realm_law_skip_effects = crown_authority_0 - } - - #Also convert every vassal. - #Liege has taken soryo, so become soryo. - if = { - limit = { - government_has_flag = government_is_japan_feudal - } - every_vassal_or_below = { - limit = { government_has_flag = government_is_tribal } - change_government = japan_feudal_government - if = { - limit = { - is_house_head = yes - } - save_scope_as = new_head - house = { - set_house_name = japanese_dynasty_name - save_scope_as = new_house - } - create_noble_family_effect = { GOVERNMENT_GIVER = this } - scope:new_title = { - #set_title_name_dynamic = japanese_noble_family_name - set_coa = scope:new_house - } - } - #Nuke tribal authorities. - if = { - limit = { has_realm_law = tribal_authority_0 } - remove_realm_law = tribal_authority_0 - } - if = { - limit = { has_realm_law = tribal_authority_1 } - remove_realm_law = tribal_authority_1 - } - if = { - limit = { has_realm_law = tribal_authority_2 } - remove_realm_law = tribal_authority_2 - } - if = { - limit = { has_realm_law = tribal_authority_3 } - remove_realm_law = tribal_authority_3 - } - if = { - limit = { - NOT = { has_realm_law = japanese_bureaucracy_0 } - } - add_realm_law_skip_effects = japanese_bureaucracy_0 - } - } - } - #Liege has taken clan, so become clan. - else_if = { - limit = { - government_has_flag = government_is_clan - } - every_vassal_or_below = { - limit = { government_has_flag = government_is_tribal } - change_government = clan_government - #Nuke tribal authorities. - if = { - limit = { has_realm_law = tribal_authority_0 } - remove_realm_law = tribal_authority_0 - } - if = { - limit = { has_realm_law = tribal_authority_1 } - remove_realm_law = tribal_authority_1 - } - if = { - limit = { has_realm_law = tribal_authority_2 } - remove_realm_law = tribal_authority_2 - } - if = { - limit = { has_realm_law = tribal_authority_3 } - remove_realm_law = tribal_authority_3 - } - if = { - limit = { - NOT = { has_realm_law = crown_authority_0 } - } - add_realm_law_skip_effects = crown_authority_0 - } - } - } - #Liege is not clan, become feudal. - else = { - every_vassal_or_below = { - limit = { government_has_flag = government_is_tribal } - change_government = feudal_government - #Nuke tribal authorities. - if = { - limit = { has_realm_law = tribal_authority_0 } - remove_realm_law = tribal_authority_0 - } - if = { - limit = { has_realm_law = tribal_authority_1 } - remove_realm_law = tribal_authority_1 - } - if = { - limit = { has_realm_law = tribal_authority_2 } - remove_realm_law = tribal_authority_2 - } - if = { - limit = { has_realm_law = tribal_authority_3 } - remove_realm_law = tribal_authority_3 - } - if = { - limit = { - NOT = { has_realm_law = crown_authority_0 } - } - add_realm_law_skip_effects = crown_authority_0 - } - } - } - } -} - -################################################## -# Add Special Succession Effects - -special_succession_witengamot_effect = { - if = { - limit = { highest_held_title_tier = tier_empire } - every_held_title = { - title_tier = empire - limit = { - NOR = { - has_title_law_flag = advanced_succession_law - has_title_law_flag = elective_succession_law - } - } - add_title_law = saxon_elective_succession_law - } - every_vassal = { - limit = { special_succession_witengamot_trigger = yes } - add_opinion = { - modifier = implemented_traditional_succession_law_opinion - years = 20 - target = root - } - custom = major_decisions.3100.tt_opinion_witengamot - } - } - else = { - every_held_title = { - title_tier = kingdom - limit = { - NOR = { - has_title_law_flag = advanced_succession_law - has_title_law_flag = elective_succession_law - } - } - add_title_law = saxon_elective_succession_law - } - every_vassal = { - limit = { special_succession_witengamot_trigger = yes } - add_opinion = { - modifier = implemented_traditional_succession_law_opinion - years = 20 - target = root - } - custom = major_decisions.3100.tt_opinion_witengamot - } - } -} - -special_succession_thing_effect = { - if = { - limit = { highest_held_title_tier = tier_empire } - every_held_title = { - title_tier = empire - limit = { - NOR = { - has_title_law_flag = advanced_succession_law - has_title_law_flag = elective_succession_law - } - } - add_title_law = scandinavian_elective_succession_law - } - every_vassal = { - limit = { special_succession_thing_trigger = yes } - add_opinion = { - modifier = implemented_traditional_succession_law_opinion - years = 20 - target = root - } - custom = major_decisions.3100.tt_opinion_thing - } - } - else = { - every_held_title = { - title_tier = kingdom - limit = { - NOR = { - has_title_law_flag = advanced_succession_law - has_title_law_flag = elective_succession_law - } - } - add_title_law = scandinavian_elective_succession_law - } - every_vassal = { - limit = { special_succession_thing_trigger = yes } - add_opinion = { - modifier = implemented_traditional_succession_law_opinion - years = 20 - target = root - } - custom = major_decisions.3100.tt_opinion_thing - } - } -} - -special_succession_tanistry_effect = { - if = { - limit = { highest_held_title_tier = tier_empire } - every_held_title = { - title_tier = empire - limit = { - NOR = { - has_title_law_flag = advanced_succession_law - has_title_law_flag = elective_succession_law - } - } - add_title_law = gaelic_elective_succession_law - } - every_vassal = { - limit = { special_succession_tanistry_trigger = yes } - add_opinion = { - modifier = implemented_traditional_succession_law_opinion - years = 20 - target = root - } - custom = major_decisions.3100.tt_opinion_tanistry - } - } - else = { - every_held_title = { - title_tier = kingdom - limit = { - NOR = { - has_title_law_flag = advanced_succession_law - has_title_law_flag = elective_succession_law - } - } - add_title_law = gaelic_elective_succession_law - } - every_vassal = { - limit = { special_succession_tanistry_trigger = yes } - add_opinion = { - modifier = implemented_traditional_succession_law_opinion - years = 20 - target = root - } - custom = major_decisions.3100.tt_opinion_tanistry - } - } -} - -special_succession_jirga_effect = { - if = { - limit = { highest_held_title_tier = tier_empire } - every_held_title = { - title_tier = empire - limit = { - NOR = { - has_title_law_flag = advanced_succession_law - has_title_law_flag = elective_succession_law - } - } - add_title_law = tribal_elective_succession_law - } - every_vassal = { - limit = { special_succession_jirga_trigger = yes } - add_opinion = { - modifier = implemented_traditional_succession_law_opinion - years = 20 - target = root - } - custom = major_decisions.3100.tt_opinion_thing - } - } - else = { - every_held_title = { - title_tier = kingdom - limit = { - NOR = { - has_title_law_flag = advanced_succession_law - has_title_law_flag = elective_succession_law - } - } - add_title_law = tribal_elective_succession_law - } - every_vassal = { - limit = { special_succession_jirga_trigger = yes } - add_opinion = { - modifier = implemented_traditional_succession_law_opinion - years = 20 - target = root - } - custom = major_decisions.3100.tt_opinion_jirga - } - } -} - -################################################## -# Launch Hungarian Migration Effects - -launch_hungarian_migration_scripted_effect = { - $INVADER$ = { - #If Hungary already exists, just tell us it's getting a name change. - if = { - limit = { - title:k_hungary = { is_title_created = yes } - } - custom_tooltip = launch_hungarian_migration_scripted_effect.tt.pannonia_renamed - title:k_hungary = { set_title_name = k_hungary } - } - #Otherwise, if Hungary doesn't exist, create & acquire it _whilst_ giving it a name change. - else_if = { - limit = { - title:k_hungary = { is_title_created = no } - } - custom_tooltip = launch_hungarian_migration_scripted_effect.tt.pannonia_renamed_and_usurped - hidden_effect = { - create_title_and_vassal_change = { - type = created - save_scope_as = change - add_claim_on_loss = no - } - title:k_hungary = { - change_title_holder = { - holder = $INVADER$ - change = scope:change - } - } - resolve_title_and_vassal_change = scope:change - title:k_hungary = { set_title_name = k_hungary } - } - } - - #If $INVADER$ has both k_hungary & any other kingdom-tier title, destroy the excess titles. - custom_tooltip = launch_hungarian_migration_scripted_effect.tt.destroy_other_kingdoms - hidden_effect = { - if = { - limit = { - has_title = title:k_hungary - any_held_title = { - title_tier >= kingdom - count >= 2 - } - } - every_held_title = { - title_tier >= kingdom - limit = { - NOT = { this = title:k_hungary } - } - save_temporary_scope_as = excess_kingdom - $INVADER$ = { destroy_title = scope:excess_kingdom } - } - } - } - - #Replace all Avar territories within Pannonia with Mogyer, excepting Keve & Krasso. - custom_tooltip = launch_hungarian_migration_scripted_effect.tt.mogyers_move_to_pannonia - hidden_effect = { - every_sub_realm_county = { - limit = { - title_capital_county.title_province = { geographical_region = custom_hungary } - culture = culture:avar - NOR = { - this = title:c_keve - this = title:c_krasso - holder = { - AND = { - is_ai = no - has_culture = prev.culture - } - } - } - } - set_county_culture = culture:mogyer - #Switch 'em to $INVADER$'s faith if unreformed & $INVADER$ is any Magyar pagan. - if = { - limit = { - $INVADER$.faith.religion = religion:magyar_religion - faith = { has_doctrine_parameter = unreformed } - } - set_county_faith = $INVADER$.faith - } - } - } - - #Replace all Mogyer territories outside of the Pannonian Basin - custom_tooltip = launch_hungarian_migration_scripted_effect.tt.mogyers_outside_pannonia - hidden_effect = { - every_sub_realm_county = { - limit = { - NOT = { - title_capital_county.title_province = { geographical_region = custom_hungary } - } - culture = culture:mogyer - } - set_county_culture = culture:pecheneg - } - #Switch 'em to Tengri if Magyar pagan. - every_sub_realm_county = { - limit = { - NOT = { - title_capital_county.title_province = { geographical_region = custom_hungary } - } - culture = culture:pecheneg - religion = religion:magyar_religion - } - set_county_faith = faith:tengri_pagan - } - } - - #All territory outside Pannonia is given to new holders and/or made independent. - custom_tooltip = launch_hungarian_migration_scripted_effect.tt.territory_outside_pannonia.non_mogyer_vassals - custom_tooltip = launch_hungarian_migration_scripted_effect.tt.territory_outside_pannonia.mogyer_vassals - custom_tooltip = launch_hungarian_migration_scripted_effect.tt.territory_outside_pannonia.former_territories - hidden_effect = { - #All direct vassal non-Mogyers are given their independence, unless they hold land within Pannonia. - every_vassal = { - limit = { - NOT = { culture = culture:mogyer } - highest_held_title_tier >= tier_county - any_held_title = { - count = all - NOT = { - title_capital_county.title_province = { geographical_region = custom_hungary } - } - } - } - create_title_and_vassal_change = { - type = independency - save_scope_as = change - add_claim_on_loss = no - } - becomes_independent = { change = scope:change } - resolve_title_and_vassal_change = scope:change - } - #... And catch the stragglers. Has to be a separate effect block, or we'll ruin the de facto structure. - every_vassal_or_below = { - limit = { - NOT = { culture = culture:mogyer } - highest_held_title_tier >= tier_county - any_held_title = { - count = all - NOT = { - title_capital_county.title_province = { geographical_region = custom_hungary } - } - } - } - create_title_and_vassal_change = { - type = independency - save_scope_as = change - add_claim_on_loss = no - } - becomes_independent = { change = scope:change } - resolve_title_and_vassal_change = scope:change - } - #Reserve a duchy, preferring the capital, for $INVADER$. - if = { - limit = { title:k_hungary.title_capital_county.duchy.holder = $INVADER$ } - title:k_hungary.title_capital_county.duchy = { save_scope_as = reserved_title } - } - #... Of course, if we can't have the capital for some reason, grab any random duchy in Pannonia. - else = { - random_held_title = { - title_tier = duchy - #Filter out Syrmia, because Syrmia sucks. - limit = { - title_capital_county.title_province = { geographical_region = custom_hungary } - NOT = { this = title:d_syrmia } - } - #But if we have no other choice, Syrmia is better than no duchy. - alternative_limit = { - title_capital_county.title_province = { geographical_region = custom_hungary } - tier = tier_duchy - } - #If we have no possible duchy, make sure to reserve at least *one* county within Pannonia. - alternative_limit = { - title_capital_county.title_province = { geographical_region = custom_hungary } - } - save_scope_as = reserved_title - } - } - #Find all Mogyer vassals outside of Pannonia. - every_vassal_or_below = { - limit = { - culture = culture:mogyer - highest_held_title_tier >= tier_county - } - add_to_list = mogyer_vassals_list - } - #Find all Pannonian titles held by $INVADER$ that aren't reserved. - every_held_title = { - limit = { - title_capital_county.title_province = { geographical_region = custom_hungary } - #Technically we could use any_this_title_or_de_jure_above for the following two checks, but it was being problematic and this does the same thing (just more cumbersomely). - OR = { - tier = tier_county - tier = tier_duchy - } - this != scope:reserved_title - } - add_to_list = spare_pannonian_titles_list - } - #Attempt to give out Pannonian holdings to the vassals who are about to lose land, prioritising players by tier, then NPCs by tier. - ##Now, process duchy title assignment. - every_in_list = { - list = mogyer_vassals_list - #Players first. - limit = { - is_ai = no - launch_hungarian_migration_ducal_processing_trigger = yes - } - #NPCs after that. - alternative_limit = { - is_ai = yes - launch_hungarian_migration_ducal_processing_trigger = yes - } - #Grab the appropriate vassal. - save_temporary_scope_as = receiving_vassal - #If $INVADER$ has a suitable spare ducal title, hand it over. - if = { - limit = { - any_in_list = { - list = spare_pannonian_titles_list - tier = tier_duchy - holder = $INVADER$ - } - } - #Save the suitable title. - random_in_list = { - list = spare_pannonian_titles_list - limit = { - tier = tier_duchy - holder = $INVADER$ - } - every_in_de_jure_hierarchy = { - limit = { - holder = $INVADER$ - tier >= tier_county - } - add_to_list = multiple_donated_titles - } - } - #Hand it to the receiving vassal. - create_title_and_vassal_change = { - type = granted - save_scope_as = change - add_claim_on_loss = no - } - every_in_list = { - list = multiple_donated_titles - save_temporary_scope_as = donated_title - scope:donated_title = { - change_title_holder = { - holder = scope:receiving_vassal - change = scope:change - } - } - remove_from_list = multiple_donated_titles - } - resolve_title_and_vassal_change = scope:change - } - } - ##Finally, process county title assignment. - ###First, attempt to pair de facto sub-vassals to their lieges. - every_in_list = { - list = mogyer_vassals_list - #Players first. - limit = { - is_ai = no - launch_hungarian_migration_count_processing_trigger = yes - } - #NPCs after that. - alternative_limit = { - is_ai = yes - launch_hungarian_migration_count_processing_trigger = yes - } - #Grab the appropriate vassal. - save_temporary_scope_as = receiving_vassal - #If $INVADER$ has a suitable spare county title, hand it over. - if = { - #Try to pair vassals with their lieges first. - limit = { - #Direct vassals shouldn't bother to try pairing. - NOT = { liege = $INVADER$ } - any_in_list = { - list = spare_pannonian_titles_list - launch_hungarian_migration_sub_vassal_liege_pairing_trigger = yes - } - } - #Save the suitable title. - random_in_list = { - list = spare_pannonian_titles_list - limit = { - #Direct vassals shouldn't bother to try pairing. - NOT = { scope:receiving_vassal.liege = $INVADER$ } - #Run the stock trigger. - launch_hungarian_migration_sub_vassal_liege_pairing_trigger = yes - #Don't give away the new liege's primary title's capital county. - this != holder.primary_title.title_capital_county - } - save_temporary_scope_as = donated_title - } - #Hand it to the receiving vassal. - create_title_and_vassal_change = { - type = granted - save_scope_as = change - add_claim_on_loss = no - } - scope:donated_title = { - change_title_holder = { - holder = scope:receiving_vassal - change = scope:change - } - } - resolve_title_and_vassal_change = scope:change - } - } - ###Then, filter through any remaining direct vassals. - every_in_list = { - list = mogyer_vassals_list - #Players first. - limit = { - is_ai = no - launch_hungarian_migration_count_processing_trigger = yes - } - #NPCs after that. - alternative_limit = { - is_ai = yes - launch_hungarian_migration_count_processing_trigger = yes - } - #Grab the appropriate vassal. - save_temporary_scope_as = receiving_vassal - #If $INVADER$ has a suitable spare county title, hand it over. - if = { - #Otherwise, grab any spare valid title that $INVADER$ has lying around. - limit = { - any_in_list = { - list = spare_pannonian_titles_list - launch_hungarian_migration_direct_vassal_requirements_trigger = { INVADER = $INVADER$ } - } - } - #Save the suitable title. - random_in_list = { - list = spare_pannonian_titles_list - limit = { - launch_hungarian_migration_direct_vassal_requirements_trigger = { INVADER = $INVADER$ } - } - save_temporary_scope_as = donated_title - } - #Hand it to the receiving vassal. - create_title_and_vassal_change = { - type = granted - save_scope_as = change - add_claim_on_loss = no - } - scope:donated_title = { - change_title_holder = { - holder = scope:receiving_vassal - change = scope:change - } - } - resolve_title_and_vassal_change = scope:change - } - } - ##Clean-up: any landless characters should move to $INVADER$'s court. - every_in_list = { - list = mogyer_vassals_list - limit = { is_ruler = no} - save_temporary_scope_as = landless_mogyer_vassal - $INVADER$ = { add_courtier = scope:landless_mogyer_vassal } - } - #Sum all remaining territory outside of Pannonia & give that territory to created local characters. - ##Start by trying to group duchies. - every_sub_realm_title = { - #First we try to make duchy power blocks. - if = { - #Grab duchies outside of Pannonia. - limit = { - NOT = { - title_capital_county.title_province = { geographical_region = custom_hungary } - } - tier = tier_duchy - } - save_temporary_scope_as = seceding_duchy - #Now grab the duchy & any sub-realm counties beneath it outside of Pannonia, and filter them to a list for processing. - scope:seceding_duchy = { - every_in_de_jure_hierarchy = { - limit = { - tier >= tier_county - OR = { - holder = $INVADER$ - holder = { - any_liege_or_above = { this = $INVADER$ } - } - } - } - add_to_temporary_list = seceding_duchy_list - } - } - #Create a local peasant warlord for the duchy & counties. - create_character = { - location = scope:seceding_duchy.title_capital_county.title_province - template = post_migration_local_warlord_template - save_scope_as = local_warlord - } - #Assign the seceding titles to the new peasant warlord. - create_title_and_vassal_change = { - type = usurped - save_scope_as = change - add_claim_on_loss = no - } - every_in_list = { - list = seceding_duchy_list - limit = { - NAND = { - tier = tier_county - title_province = { geographical_region = custom_hungary } - } - } - change_title_holder = { - holder = scope:local_warlord - change = scope:change - take_baronies = yes - } - remove_from_list = seceding_duchy_list - } - resolve_title_and_vassal_change = scope:change - #And give the warlord their independence. - create_title_and_vassal_change = { - type = independency - save_scope_as = change - add_claim_on_loss = no - } - scope:local_warlord = { - becomes_independent = { change = scope:change } - } - resolve_title_and_vassal_change = scope:change - #If any vassals within Pannonia have gotten mixed up, shunt them back to $INVADER$, and try to find a suitable duke. - ##Start off by assembling a suitable list of affected vassals (should only ever be the one, but you never know). - scope:local_warlord = { - every_vassal = { - limit = { - #We're only interested in counts... - highest_held_title_tier = tier_county - #... Within Panonnia. - any_held_title = { launch_hungarian_migration_county_is_within_custom_hungary_trigger = yes } - } - add_to_list = vassals_to_shunt - } - } - ##Sort through the list, see who should be the new liege of the misplaced vassals. - every_in_list = { - list = vassals_to_shunt - #First off, check if there's a valid duke to hand 'em over to. - if = { - limit = { - any_held_title = { - launch_hungarian_migration_misplaced_count_suitable_liege_trigger = { INVADER = $INVADER$ } - } - } - #If there is, we make a note of them for liege determination. - random_held_title = { - limit = { - launch_hungarian_migration_misplaced_count_suitable_liege_trigger = { INVADER = $INVADER$ } - } - duchy.holder = { save_scope_as = appropriate_liege } - } - } - #Otherwise, we just grab $INVADER$ as a solid fallback. - else = { - $INVADER$ = { save_scope_as = appropriate_liege } - } - #Reassign the errant vassal back to their rightful Pannonian realm. - create_title_and_vassal_change = { - type = conquest - save_scope_as = change - add_claim_on_loss = no - } - change_liege = { - liege = scope:appropriate_liege - change = scope:change - } - resolve_title_and_vassal_change = scope:change - } - } - } - ##... Then we catch the straggler counties. - every_sub_realm_title = { - #First we try to make duchy power blocks. - if = { - #Grab duchies outside of Pannonia. - limit = { - NOT = { - title_capital_county.title_province = { geographical_region = custom_hungary } - } - tier = tier_county - } - save_temporary_scope_as = seceding_county - #Create a local peasant warlord for the county. - create_character = { - location = scope:seceding_county.title_province - template = post_migration_minor_warlord_template - save_scope_as = minor_warlord - } - #Assign the seceding title to the new peasant warlord. - create_title_and_vassal_change = { - type = usurped - save_scope_as = change - add_claim_on_loss = no - } - scope:seceding_county = { - change_title_holder = { - holder = scope:minor_warlord - change = scope:change - take_baronies = yes - } - } - resolve_title_and_vassal_change = scope:change - #And give the warlord their independence. - create_title_and_vassal_change = { - type = independency - save_scope_as = change - add_claim_on_loss = no - } - scope:minor_warlord = { - becomes_independent = { change = scope:change } - } - resolve_title_and_vassal_change = scope:change - } - } - } - } -} - -tribal_transfer_liege_title_effect = { - create_title_and_vassal_change = { - type = usurped - save_scope_as = change - add_claim_on_loss = no - } - scope:title_being_fought_over = { - change_title_holder = { - holder = scope:challenger - change = scope:change - } - } - resolve_title_and_vassal_change = scope:change - if = { - limit = { - root = scope:challenger - } - scope:liege_to_challenge = { - add_opinion = { - target = scope:challenger - modifier = usurped_title - } - } - } - else = { - hidden_effect = { - scope:liege_to_challenge = { - add_opinion = { - target = scope:challenger - modifier = usurped_title - } - } - } - } -} - -tribal_challenger_lost_effect = { - if = { - limit = { - root = scope:liege_to_challenge - } - scope:liege_to_challenge = { - add_prestige = medium_prestige_gain - } - } - else = { - hidden_effect = { - scope:liege_to_challenge = { - add_prestige = medium_prestige_gain - } - } - } - add_prestige_level = -1 - if = { - limit = { - root = scope:challenger - } - scope:liege_to_challenge = { - add_opinion = { - target = scope:challenger - modifier = tried_to_usurped_title - } - } - } - else = { - hidden_effect = { - scope:liege_to_challenge = { - add_opinion = { - target = scope:challenger - modifier = tried_to_usurped_title - } - } - } - } -} - -################################################## -# Negotiate the Danelaw Effects - -negotiate_the_danelaw_accept_effect = { - # Mark the partition as being active. - custom_tooltip = negotiate_the_danelaw_accept_effect.partition_active.tt - set_global_variable = { - name = partition_active_danelaw - value = title:k_england - } - # Kingdoms for all! - ## Scope:ntd_brit receives k_england. - scope:ntd_brit = { - create_title_and_vassal_change = { - type = created - save_scope_as = change - } - title:k_england = { - change_title_holder = { - holder = scope:ntd_brit - change = scope:change - } - } - resolve_title_and_vassal_change = scope:change - title:k_england = { add_title_law = saxon_elective_succession_law } - } - ## Whilst scope:ntd_nord receives k_danelaw. - scope:ntd_nord = { - create_title_and_vassal_change = { - type = created - save_scope_as = change - } - title:k_danelaw = { - change_title_holder = { - holder = scope:ntd_nord - change = scope:change - } - } - resolve_title_and_vassal_change = scope:change - title:k_danelaw = { - add_title_law = scandinavian_elective_succession_law - # And make sure it follows appropriate de jures. - hidden_effect = { set_de_jure_liege_title = title:k_england.de_jure_liege } - } - } - # Give k_danelaw various de jures. - ## Firstly, any duchy that it has at least one county in which isn't scope:ntd_brit's capital duchy. - custom_tooltip = negotiate_the_danelaw_accept_effect.de_jure_holdings_recognised.tt - hidden_effect = { - scope:ntd_nord = { - every_sub_realm_county = { - limit = { - kingdom = title:k_england - duchy != scope:ntd_brit.capital_county.duchy - } - duchy = { set_de_jure_liege_title = title:k_danelaw } - } - } - } - ## Then, any independent duchy held by a Scandi-side ruler (again exempting scope:ntd_brit's capital, just in case). - custom_tooltip = negotiate_the_danelaw_accept_effect.independent_holdings_recognised.tt - hidden_effect = { - every_county_in_region = { - region = world_europe_west_britannia - limit = { - kingdom = title:k_england - exists = duchy.holder - duchy.holder = { negotiate_the_danelaw_norse_side_trigger = yes } - duchy != scope:ntd_brit.capital_county.duchy - } - duchy = { set_de_jure_liege_title = title:k_danelaw } - } - } - # Set up a ceasefire & some opinion gain between the two rulers. - scope:ntd_brit = { - add_truce_both_ways = { - character = scope:ntd_nord - years = 25 - name = TRUCE_SIGNED_PARTITION - } - add_opinion = { - target = scope:ntd_nord - modifier = respect_opinion - opinion = 50 - } - reverse_add_opinion = { - target = scope:ntd_nord - modifier = respect_opinion - opinion = 50 - } - } - # Independent rulers on both sides are extremely unimpressed with this divvying. - ## First, grab everyone applicable. - title:k_england = { - every_in_de_jure_hierarchy = { - limit = { - holder ?= { - top_liege = this - NOR = { - this = scope:ntd_actor - this = scope:ntd_recipient - } - } - } - holder = { add_to_list = riled_danelaw_independents_list } - } - } - ## Then, apply opinion & hidden rivalry effects. - every_in_list = { - list = riled_danelaw_independents_list - custom = negotiate_the_danelaw_accept_effect.riled_independents_list - add_opinion = { - target = scope:ntd_brit - modifier = weak_opinion - opinion = -40 - } - add_opinion = { - target = scope:ntd_nord - modifier = weak_opinion - opinion = -40 - } - # We hide the rivalry stuff, both to make it seem less unappealing, and to encourage valid-feeling drama without deliberately signalling it. - hidden_effect = { - if = { - limit = { - can_set_relation_potential_rival_trigger = { CHARACTER = scope:ntd_brit } - } - set_relation_potential_rival = scope:ntd_brit - } - if = { - limit = { - can_set_relation_potential_rival_trigger = { CHARACTER = scope:ntd_nord } - } - set_relation_potential_rival = scope:ntd_nord - } - } - } -} - -negotiate_the_danelaw_reject_effect = { - scope:ntd_actor = { - # If possible, scope:ntd_actor & scope:ntd_recipient immediately become nemeses. - if = { - limit = { - can_set_relation_nemesis_trigger = { CHARACTER = scope:ntd_recipient } - } - set_relation_nemesis = { - reason = nemesis_danelaw_rejection - copy_reason = rival - target = scope:ntd_recipient - } - } - else = { - add_opinion = { - target = scope:ntd_recipient - modifier = humiliated_opinion - opinion = -75 - } - } - # Scope:ntd_actor loses a huge amount of prestige. - add_prestige = massive_prestige_loss - # Scope:ntd_actor gets a derrogatory nickname. - give_nickname = nick_the_weak - } -} - -negotiate_the_danelaw_each_way_effect = { - random_list = { - # The offer is accepted. - 100 = { - show_chance = no - desc = negotiate_the_danelaw_each_way_effect.accepted - negotiate_the_danelaw_accept_effect = yes - } - # The offier is rejected. - 100 = { - show_chance = no - desc = negotiate_the_danelaw_each-way_effect.rejected - negotiate_the_danelaw_reject_effect = yes - } - } -} - -resolve_danelaw_partition_effect = { - # Drift all k_danelaw cores into England. - custom_tooltip = resolve_danelaw_partition_effect.adjust_de_jures.tt - hidden_effect = { - title:k_danelaw = { - every_in_de_jure_hierarchy = { - limit = { tier = tier_duchy } - set_de_jure_liege_title = title:k_england - } - } - } - # If k_danelaw is victorious, take care of various bits'n'pieces. - if = { - limit = { scope:partition_winner = title:k_danelaw } - # If appropriate, create k_england. - if = { - limit = { - NOT = { exists = title:k_england.holder } - } - create_title_and_vassal_change = { - type = created - save_scope_as = title_change - } - title:k_england = { - change_title_holder = { - holder = scope:victor - change = scope:title_change - } - } - resolve_title_and_vassal_change = scope:title_change - } - # Else usurp k_england. - else_if = { - limit = { - NOT = { title:k_england.holder = scope:victor } - } - create_title_and_vassal_change = { - type = usurped - save_scope_as = title_change - add_claim_on_loss = yes - } - title:k_england = { - change_title_holder = { - holder = scope:victor - change = scope:title_change - } - } - resolve_title_and_vassal_change = scope:title_change - } - # Sundry cosmetic changes. - title:k_england = { - if = { # Only do Scandinavian things for Scandinavians - limit = { - holder.culture = { has_cultural_pillar = heritage_north_germanic } - } - # Set k_england's CoA to k_danelaw's. - custom_tooltip = resolve_danelaw_partition_effect.coa_changed.tt - title:k_england = { set_coa = title:k_danelaw } - # Give k_england the appropriate succession law. - add_title_law = scandinavian_elective_succession_law - } - # Use k_danelaw's title history, as they won the cold war. - copy_title_history = title:k_danelaw - # And make York the de jure capital. - set_capital_county = title:c_north_riding - } - # Remove k_danelaw. - destroy_title = title:k_danelaw - # All claims on k_danelaw become claims on k_england. - title:k_danelaw = { - every_claimant = { - custom = resolve_danelaw_partition_effect.all_claimants - remove_claim = title:k_danelaw - add_unpressed_claim = title:k_england - } - } - # Finally, mark that this has happened for HKotNS purposes. - set_global_variable = { - name = danelaw_became_england - value = yes - } - } - # If k_england is victorious, we also have a few little things to do. - if = { - limit = { scope:partition_winner = title:k_england } - # If it still exists, destroy k_danelaw. - if = { - limit = { exists = title:k_danelaw.holder } - destroy_title = title:k_danelaw - } - # All claims on k_danelaw are removed. - title:k_danelaw = { - every_claimant = { - custom = resolve_danelaw_partition_effect.all_claimants - remove_claim = title:k_danelaw - } - } - } -} - -formalise_the_daneland_effect = { - # To start with, remove the partition variable (so that we don't calculate partition resolution whilst taking the alternate route). - remove_global_variable = partition_active_danelaw - # Clarify the status of the partition for the player. - custom_tooltip = formalise_the_daneland_effect.partition_status.tt - # Sort the title swap. - ## First, flip everything in k_danelaw to k_daneland. - custom_tooltip = formalise_the_daneland_effect.adjust_de_jures.tt - hidden_effect = { - title:k_danelaw = { - every_in_de_jure_hierarchy = { - limit = { tier = tier_duchy } - set_de_jure_liege_title = title:k_daneland - } - } - # Add k_daneland to whatever empire k_danelaw is part of. - title:k_daneland = { set_de_jure_liege_title = title:k_danelaw.de_jure_liege } - } - ## Then, swap the two titles out. - ### Give k_daneland to scope:founder. - create_title_and_vassal_change = { - type = created - save_scope_as = title_change - } - title:k_daneland = { - change_title_holder = { - holder = scope:founder - change = scope:title_change - } - } - resolve_title_and_vassal_change = scope:title_change - ### Do some assorted aesthetic prep-work on k_daneland. - hidden_effect = { - title:k_daneland = { - # Give them k_danelaw's CoA. - set_coa = title:k_danelaw - # & title history. - copy_title_history = title:k_danelaw - } - } - ### Destroy k_danelaw. - destroy_title = title:k_danelaw - # All claims on k_danelaw become claims on k_daneland - title:k_danelaw = { - every_claimant = { - custom = formalise_the_daneland_effect.all_claimants - remove_claim = title:k_danelaw - add_unpressed_claim = title:k_daneland - } - } - # Step a rivalry with scope:england. - scope:founder = { - progress_towards_rival_effect = { - CHARACTER = scope:england - OPINION = -75 - REASON = rival_daneland - } - } -} - -################################################## -# Found Cadet House Effects -found_cadet_house_decision_effect = { - $CHARACTER$ = { - save_scope_as = new_head - save_scope_as = new_house_head # don't ask - hidden_effect = { - house.house_head = { - save_scope_as = former_house_head - } - house = { - save_scope_as = former_house - } - add_achievement_flag_effect = { FLAG = achievement_a_house_of_my_own_flag } - - #Cultural variation for Cadet Branch Naming: - - if = { # Prefixed Primary Title - (PREFIX) (TITLE) - limit = { - is_landed = yes - highest_held_title_tier <= tier_duchy - OR = { - culture = { has_cultural_pillar = heritage_frankish } - top_liege = { - has_title = title:k_france - culture = { has_cultural_pillar = heritage_frankish } - } - } - } - create_cadet_branch = { - prefix = dynnp_de - name = cadet_name_style_primary_title - save_scope_as = new_house - } - } - else_if = { # Barony Dynasty - (BARONY) (DYNASTY) - limit = { - is_landed = yes - culture = { - OR = { - # India - has_cultural_pillar = heritage_indo_aryan - has_cultural_pillar = heritage_dravidian - # Vietnam - has_cultural_pillar = heritage_viet - has_name_list = name_list_vietnamese - # Khmer - has_name_list = name_list_khmer - # Mon - has_name_list = name_list_mon - # Cham - has_name_list = name_list_cham - # Tai - has_name_list = name_list_tai - # China - has_cultural_pillar = heritage_chinese - has_name_list = name_list_han - # Korea - has_cultural_pillar = heritage_korean - has_name_list = name_list_korean - # Buyeo - has_cultural_pillar = heritage_buyeo - has_name_list = name_list_balhae - } - } - NOT = { faith.religion = religion:islam_religion } - } - create_cadet_branch = { - name = cadet_name_style_barony_dynasty - save_scope_as = new_house - } - scope:new_house = { generate_coa = yes } # Avoid western style cadet CoA - } - else_if = { # County Dynasty - (COUNTY) (DYNASTY) - limit = { - is_landed = yes - culture = { - OR = { - # Malaysia - has_name_list = name_list_malay - } - } - } - create_cadet_branch = { - name = cadet_name_style_county_dynasty - save_scope_as = new_house - } - scope:new_house = { generate_coa = yes } # Avoid western style cadet CoA - } - else_if = { # Japanese - (PLACE) - limit = { - exists = var:new_japanese_house_name - culture = { - # Japan - OR = { - has_cultural_pillar = heritage_japonic - has_name_list = name_list_yamato - } - } - } - create_cadet_branch = { - name = { - first_valid = { - triggered_desc = { - trigger = { scope:new_head.var:new_japanese_house_name ?= flag:japanese_house_random_barony } - desc = japanese_house_random_barony - } - triggered_desc = { - trigger = { scope:new_head.var:new_japanese_house_name ?= flag:japanese_house_primary_county } - desc = japanese_house_primary_county - } - triggered_desc = { - trigger = { scope:new_head.var:new_japanese_house_name ?= flag:japanese_house_domicile_barony } - desc = japanese_house_domicile_barony - } - triggered_desc = { - trigger = { scope:new_head.var:new_japanese_house_name ?= flag:japanese_house_domicile_county } - desc = japanese_house_domicile_county - } - triggered_desc = { - trigger = { scope:new_head.var:new_japanese_house_name ?= flag:japanese_house_first_name } - desc = japanese_house_first_name - } - triggered_desc = { - trigger = { scope:new_head.var:new_japanese_house_name ?= flag:custom } - desc = japanese_house_name_custom - } - triggered_desc = { - trigger = { exists = scope:new_head.var:new_japanese_house_name } - desc = japanese_house_name_flag - } - desc = japanese_house_name_fallback - } - } - save_scope_as = new_house - } - scope:new_house = { generate_coa = yes } # Avoid western style cadet CoA - } - else = { #Standard Name Generation - create_cadet_branch = { save_scope_as = new_house } - } - } - - add_prestige = $PRESTIGE$ - - hidden_effect_new_object = { - save_scope_as = new_head - every_player = { - limit = { - exists = house - scope:new_house ?= house - NOT = { this = $CHARACTER$ } - } - send_interface_toast = { - type = msg_created_new_house - title = created_cadet_branch_toast_new_house_desc - left_icon = scope:new_head - desc = created_cadet_branch_toast_new_house_other_tt - } - } - send_interface_toast = { - type = msg_created_new_house - title = created_cadet_branch_toast_new_house_desc - left_icon = scope:new_head - right_icon = scope:former_house_head - desc = created_cadet_branch_toast_new_house_other_tt - } - } - - random_artifact = { - limit = { - var:banner_dynasty ?= $CHARACTER$.dynasty - artifact_owner = { - NOT = { this = $CHARACTER$ } - in_diplomatic_range = $CHARACTER$ - } - NOT = { - any_artifact_house_claimant = { - scope:new_house ?= this - } - } - } - save_scope_as = new_branch_dynasty_banner - scope:new_house ?= { - add_house_artifact_claim = scope:new_branch_dynasty_banner - } - } - - # Struggle Catalysts - if = { - limit = { - $CHARACTER$ = { - exists = house.house_head - any_character_struggle = { - involvement = involved - phase_has_catalyst = catalyst_cadet_branch_created - } - } - } - every_character_struggle = { - involvement = involved - activate_struggle_catalyst = { - catalyst = catalyst_cadet_branch_created - character = $CHARACTER$ - } - log_debug_variable_for_persian_struggle_effect = { VAR = unrest_catalyst_cadet_branch_created } - } - } - - every_child = { - limit = { - has_trait = bastard - is_lowborn = no - dynasty = scope:new_head.dynasty - NOT = { house = scope:new_house } - } - set_house = scope:new_house - } - - # If eligible, create a cadet branch for admin type governments - if = { - limit = { - government_allows = noble_families - OR = { - highest_held_title_tier >= main_administrative_tier - AND = { - government_has_flag = government_has_county_tier_noble_families - highest_held_title_tier >= tier_county - } - } - } - create_noble_family_effect = { GOVERNMENT_GIVER = this } - change_influence = major_influence_gain - } - } -} - -learn_language_linguist_effect = { - hidden_effect = { add_courtier = $LINGUIST$ } - $LINGUIST$ = { save_scope_as = selected_linguist } - custom_tooltip = ep1_decision.0201.tt.aptitude - send_interface_toast = { - title = learn_court_language_toast_title - left_icon = root - right_icon = $LINGUIST$ - court_position_grant_effect = { - EMPLOYER = root - POS = court_tutor - CANDIDATE = $LINGUIST$ - } - if = { - limit = { - NOT = { knows_language_of_culture = $LINGUIST$.culture } - } - start_scheme = { - type = learn_language - target_character = $LINGUIST$ - } - } - } -} - -linguist_bonus_culture_effect = { - if = { - limit = { exists = scope:$CULTURE$ } - if = { - limit = { - any_culture_global = { - exists = culture_head - has_same_culture_heritage = scope:$CULTURE$ - NOR = { - has_same_culture_language = scope:$CULTURE$ - has_same_culture_language = root.culture - AND = { - exists = scope:target_court_language.culture - has_same_culture_language = scope:target_court_language.culture - } - AND = { - exists = scope:ling_cul_1_bonus - THIS = scope:ling_cul_1_bonus - } - AND = { - exists = scope:ling_cul_2_bonus - THIS = scope:ling_cul_2_bonus - } - AND = { - exists = scope:ling_cul_3_bonus - THIS = scope:ling_cul_3_bonus - } - } - } - } - random_culture_global = { # Find a culture that speaks this language natively - limit = { - exists = culture_head - has_same_culture_heritage = scope:$CULTURE$ - NOR = { - has_same_culture_language = scope:$CULTURE$ - has_same_culture_language = root.culture - AND = { - exists = scope:target_court_language.culture - has_same_culture_language = scope:target_court_language.culture - } - AND = { - exists = scope:ling_cul_1_bonus - THIS = scope:ling_cul_1_bonus - } - AND = { - exists = scope:ling_cul_2_bonus - THIS = scope:ling_cul_2_bonus - } - AND = { - exists = scope:ling_cul_3_bonus - THIS = scope:ling_cul_3_bonus - } - } - } - save_scope_as = $CULTURE$_bonus - } - } - else = { - random_kingdom = { - limit = { - exists = holder - NOR = { - holder = root - AND = { - exists = scope:target_court_language - holder = scope:target_court_language - } - } - holder = { - in_diplomatic_range = root - culture = { - NOR = { - has_same_culture_language = scope:$CULTURE$ - has_same_culture_language = root.culture - AND = { - exists = scope:target_court_language - has_same_culture_language = scope:target_court_language.culture - } - AND = { - exists = scope:ling_cul_1_bonus - this = scope:ling_cul_1_bonus - } - AND = { - exists = scope:ling_cul_2_bonus - this = scope:ling_cul_2_bonus - } - AND = { - exists = scope:ling_cul_3_bonus - this = scope:ling_cul_3_bonus - } - } - } - } - } - holder.culture = { save_scope_as = $CULTURE$_bonus } - } - } - } -} - -linguist_random_realm_effect = { - # Save random culture realm to fetch faith - if = { - limit = { - any_independent_ruler = { culture = scope:$CULTURE$ } - } - ordered_independent_ruler = { - limit = { culture = scope:$CULTURE$ } - order_by = primary_title.tier - save_scope_as = $CULTURE$_ruler - } - } - # Save fallback to fetch faith - else = { - scope:target_court_language = { save_scope_as = $CULTURE$_ruler } - } -} - -isolate_family_decision_effect = { - show_as_tooltip = { - every_close_family_member = { - custom = every_close_family_member_at_court - limit = { - is_courtier_of = root - } - add_character_modifier = { - modifier = isolating_modifier - years = 5 - } - } - add_character_modifier = { - modifier = isolating_modifier - years = 5 - } - } - custom_tooltip = travelling_will_break_isolation_tt - hidden_effect = { - every_close_family_member = { - custom = every_close_family_member_at_court - limit = { - is_courtier_of = root - } - root = { - add_to_variable_list = { - name = isolating_relatives - target = prev - } - } - add_character_flag = { - flag = blocked_from_leaving - years = 5 - } - add_character_modifier = { - modifier = isolating_modifier - years = 5 - } - } - every_consort = { - limit = { - is_courtier_of = root - } - root = { - add_to_variable_list = { - name = isolating_relatives - target = prev - } - } - add_character_flag = { - flag = blocked_from_leaving - years = 5 - } - add_character_modifier = { - modifier = isolating_modifier - years = 5 - } - } - add_character_modifier = { - modifier = isolating_modifier - years = 5 - } - set_variable = { - name = isolating_cooldown_var - years = 1 - } - add_character_flag = { # Prevent the AI from constantly coming in and out of isolation - flag = ai_unisolate_cooldown - years = 1 - } - } - stress_impact = { - brave = minor_stress_impact_gain - gregarious = minor_stress_impact_gain - } -} - -unisolate_family_decision_effect = { - show_as_tooltip = { - every_close_family_member = { - custom = every_close_family_member_at_court - limit = { - is_courtier_of = root - } - remove_character_modifier = isolating_modifier - } - } - hidden_effect = { - every_in_list = { - variable = isolating_relatives - limit = { is_alive = yes } - remove_character_modifier = isolating_modifier - remove_character_flag = blocked_from_leaving - } - clear_variable_list = isolating_relatives - } - remove_character_modifier = isolating_modifier - stress_impact = { - paranoid = minor_stress_impact_gain - shy = minor_stress_impact_gain - } -} - - -#Whippy whippy -flagellation_decision_effect = { - #Get both rewards - if = { - limit = { - has_trait = flagellant - faith = { has_doctrine_parameter = self_mutilation_active } - } - add_stress = major_stress_loss - add_piety = medium_piety_value - } - #Only Piety - else_if = { - limit = { - faith = { has_doctrine_parameter = self_mutilation_active } - } - add_piety = medium_piety_value - } - #Only Stress-loss - else = { add_stress = major_stress_loss } - - #Be kind to the AI - if = { - limit = { is_ai = yes } - random_list = { - 75 = { - #No increase - } - 25 = { - increase_wounds_effect = { REASON = whipping } - } - } - } - else = { - increase_wounds_effect = { REASON = whipping } - } - - #Not already flagellant? - if = { - limit = { - NOT = { has_trait = flagellant } - } - random = { - chance = 20 - add_trait = flagellant - add_stress = major_stress_loss - } - } - -} diff --git a/N3OW/common/scripted_effects/00_diarchy_scripted_effects.txt b/N3OW/common/scripted_effects/00_diarchy_scripted_effects.txt deleted file mode 100644 index 9e8b23d6..00000000 --- a/N3OW/common/scripted_effects/00_diarchy_scripted_effects.txt +++ /dev/null @@ -1,2577 +0,0 @@ -############# -# Diarchy Scripted Effects -############# - -################################################## -# Debug Effects - -log_diarch_send_interaction_as_variable_effect = { - if = { - limit = { always = no } - # Did a landless diarch send this? - if = { - limit = { - scope:actor = { is_ruler = no } - } - if = { - limit = { - NOT = { exists = global_var:landless_diarch_tried_$INTERACTION$ } - } - set_global_variable = { - name = landless_diarch_tried_$INTERACTION$ - value = 1 - } - } - else = { - change_global_variable = { - name = landless_diarch_tried_$INTERACTION$ - add = 1 - } - } - } - } -} - -# These two effects exist to allow quantitative tracking of how many characters in the world are actually using diarch interactions & in what numbers mid-game — left in case Design needs to do more frequency checking & doesn't want to re-script everything. -diarch_interaction_set_or_update_global_variable_effect = { - if = { - limit = { always = no } - if = { - limit = { - NOT = { exists = global_var:$VARIABLE$ } - } - set_global_variable = { - name = $VARIABLE$ - value = 1 - } - } - else = { - change_global_variable = { - name = $VARIABLE$ - add = 1 - } - } - } -} -diarch_interaction_add_to_global_list_effect = { - if = { - limit = { always = no } - add_to_global_variable_list = { - name = $VARIABLE_LIST$ - target = this - } - } -} - -################################################## -# Historical Effects - -remove_generated_diarch_consequences_effect = { - $NEW_DIARCH$ = { - remove_opinion = { - target = $LIEGE$ - modifier = designated_me_regent_opinion - } - } - $LIEGE$ = { - every_diarchy_succession_character = { - remove_opinion = { - target = $LIEGE$ - modifier = passed_me_over_for_regent_opinion - } - } - every_vassal = { - vassal_stance = courtly - remove_opinion = { - target = $LIEGE$ - modifier = designated_bad_regent_opinion - } - } - } -} - -################################################## -# Decision Effects - -ai_diarch_check_to_see_if_should_launch_coup_effect = { - scope:actor = { - if = { - limit = { - # Robots only, please. - is_ai = yes - # Check that this is the diarch. - is_diarch_of_target = scope:recipient - # Plus a few checks for scope:recipient. - scope:recipient = { - # Then, we look to see if we've hit that magic number. - has_diarchy_active_parameter = regents_can_try_to_overthrow_present_lieges - # Finally, make sure that scope:recipient doesn't have a sensibility cooldown on 'em. - NOT = { has_character_flag = immune_ai_coups } - } - # Only disloyal diarchs will even consider this. It's really not for casuals. - diarch_loyalty <= diarch_loyalty_visibly_disloyal_threshold - } - # Right, lets try for some treason, then! - trigger_event = diarchy.9031 - } - } -} - -diarch_finalise_conspirators_for_overthrow_list_effect = { - # The list we know we have. - every_in_list = { - variable = coup_pv_supporters_list - limit = { - diarch_coup_valid_conspiracy_culmination_vassals_trigger = { LIEGE = prev.liege } - } - add_to_list = coup_pv_supporters_final_list - } - # & the lists we only might have. - ## Hooks. - if = { - limit = { has_variable_list = coup_promise_list_weak_hook } - every_in_list = { - variable = coup_promise_list_weak_hook - limit = { - diarch_coup_valid_conspiracy_culmination_vassals_trigger = { LIEGE = prev.liege } - } - add_to_list = coup_promise_list_weak_hook_final - } - } - ## Strong hooks. - if = { - limit = { has_variable_list = coup_promise_list_strong_hook } - every_in_list = { - variable = coup_promise_list_strong_hook - limit = { - diarch_coup_valid_conspiracy_culmination_vassals_trigger = { LIEGE = prev.liege } - } - add_to_list = coup_promise_list_strong_hook_final - } - } - ## Gold. - if = { - limit = { has_variable_list = coup_promise_list_gold } - every_in_list = { - variable = coup_promise_list_gold - limit = { - diarch_coup_valid_conspiracy_culmination_vassals_trigger = { LIEGE = prev.liege } - } - add_to_list = coup_promise_list_gold_final - } - } - ## Big gold. - if = { - limit = { has_variable_list = coup_promise_list_big_gold } - every_in_list = { - variable = coup_promise_list_big_gold - limit = { - diarch_coup_valid_conspiracy_culmination_vassals_trigger = { LIEGE = prev.liege } - } - add_to_list = coup_promise_list_big_gold_final - } - } -} - -diarch_clean_up_conspiracy_variables_effect = { - if = { - limit = { is_alive = yes } - remove_variable = coup_pv_supporters_list - remove_variable = coup_promise_list_weak_hook - remove_variable = coup_promise_list_strong_hook - remove_variable = coup_promise_list_gold - remove_variable = coup_promise_list_big_gold - } -} - -diarch_coup_preamble_effects_effect = { - # Note that we don't want a list when it comes to the coup event. - save_scope_value_as = { - name = disable_display_rightful_imprisonment_tooltip - value = yes - } - # If there's an alliance, it's pretty decisively broken. - if = { - limit = { is_allied_to = scope:liege } - break_alliance_due_to_attack_effect = { TARGET = scope:liege } - } - # And don't forget stress! - stress_impact = { - base = major_stress_impact_gain - disloyal = medium_stress_impact_loss - ambitious = minor_stress_impact_loss - arrogant = minor_stress_impact_loss - callous = miniscule_stress_impact_loss - arbitrary = miniscule_stress_impact_loss - just = minor_stress_impact_gain - humble = medium_stress_impact_gain - content = medium_stress_impact_gain - loyal = major_stress_impact_gain - } - # Register that the AI shouldn't try to coup liege again for a *while*. - scope:liege = { - add_character_flag = { - flag = immune_ai_coups - years = 50 - } - } -} - -################################################## -# Activities - -remove_strife_per_invited_powerful_vassal_effect = { - scope:activity = { - if = { - limit = { - # Does scope:host have any strife to take care of? - scope:host = { - exists = liege - strife_opinion >= 1 - } - any_attending_character = { - this != scope:host - is_powerful_vassal_of = scope:host.liege - } - } - # Save a variable for the loc key so that we don't need to parse a million scopes _into_ the key. - ## We do it this way because the custom_tooltip otherwise gets real finnicky about having - scope:host = { - set_variable = { - name = strife_loss_total - value = { - value = scope:activity.diarch_reduced_strife_for_inviting_powerful_covassals_value - # Invert it for UX purposes. - multiply = -1 - } - } - } - custom_tooltip = remove_strife_per_invited_powerful_vassal_effect.tt - ## Don't forget to remove the variable! - # Now, change the actual strife. - hidden_effect = { - scope:host = { change_strife_opinion = scope:activity.diarch_reduced_strife_for_inviting_powerful_covassals_value } - } - } - } -} - -################################################## -# Character Interactions - -diarch_changed_own_contract_effect = { - if = { - limit = { always = scope:diarch } - scope:recipient = { - custom_tooltip = liege_modify_vassal_contract_interaction.tt.diarch_powers_used - # Co-rulers lose a fair bit less & can change multiple times. - if = { - limit = { - diarch ?= scope:actor - has_diarchy_active_parameter = diarchy_is_co_rulership - } - add_opinion = { - target = scope:actor - modifier = abused_position_of_trust_opinion - opinion = -10 - } - } - # Everyone else loses much more. - else = { - add_to_variable_list = { - name = diarch_contract_rights_used_list - target = scope:actor - } - add_opinion = { - target = scope:actor - modifier = abused_position_of_trust_opinion - opinion = -40 - } - } - } - } -} - -diarch_revoke_title_interaction_intermediary_fail_opinions_effect = { - # Scope:actor dislikes scope:intermediary. - scope:actor = { - if = { - limit = { is_ai = yes } - add_opinion = { - target = scope:intermediary - modifier = disappointed_opinion - opinion = -20 - } - } - } - # Scope:recipient has mixed feelings. - scope:recipient = { - # Specifically, they're now happy with scope:intermediary... - if = { - limit = { is_ai = yes } - add_opinion = { - target = scope:intermediary - modifier = protected_me_opinion - opinion = 20 - } - # ... but upset with scope:actor. - add_opinion = { - target = scope:actor - modifier = revoked_title - } - } - } -} - -diarch_retract_vassal_interaction_intermediary_fail_opinions_effect = { - # Scope:actor dislikes scope:intermediary. - scope:actor = { - if = { - limit = { is_ai = yes } - add_opinion = { - target = scope:intermediary - modifier = disappointed_opinion - opinion = -20 - } - } - } - # Scope:recipient has mixed feelings. - scope:recipient = { - # Specifically, they're now happy with scope:intermediary... - if = { - limit = { is_ai = yes } - add_opinion = { - target = scope:intermediary - modifier = protected_me_opinion - opinion = 20 - } - # ... but upset with scope:actor. - add_opinion = { - target = scope:actor - modifier = retracted_vassal - } - } - } -} - -diarch_imprison_interaction_intermediary_fail_opinions_effect = { - # Scope:actor dislikes scope:intermediary. - scope:actor = { - if = { - limit = { is_ai = yes } - add_opinion = { - target = scope:intermediary - modifier = disappointed_opinion - opinion = -20 - } - } - } - # Scope:recipient has mixed feelings. - scope:recipient = { - # Specifically, they're now happy with scope:intermediary... - if = { - limit = { is_ai = yes } - add_opinion = { - target = scope:intermediary - modifier = protected_me_opinion - opinion = 20 - } - # ... but upset with scope:actor. - add_opinion = { - target = scope:actor - modifier = imprisoned_me_past - } - } - } -} - -diarch_legal_meddling_interaction_success_effect = { - scope:actor = { - # Nab the claim. - add_unpressed_claim = scope:target - # We nest this so that scope:recipient doesn't have to see their own opinion effects. - if = { - limit = { - this != scope:recipient - } - # Add some opinion loss. - ## Counties are worrying. - if = { - limit = { scope:target.tier = tier_county } - reverse_add_opinion = { - target = scope:recipient - modifier = annoyed_opinion - opinion = -20 - } - change_strife_opinion = minor_strife_gain - } - ## Duchies are troublesome. - else_if = { - limit = { scope:target.tier = tier_duchy } - reverse_add_opinion = { - target = scope:recipient - modifier = angry_opinion - opinion = -40 - } - change_strife_opinion = medium_strife_gain - } - ## Kingdoms are hateful. - else_if = { - limit = { scope:target.tier = tier_kingdom } - reverse_add_opinion = { - target = scope:recipient - modifier = hate_opinion - opinion = -60 - } - change_strife_opinion = major_strife_gain - } - } - } - # Object explorer logging. - scope:actor = { - diarch_interaction_set_or_update_global_variable_effect = { VARIABLE = di_track_legmed_success } - diarch_interaction_add_to_global_list_effect = { VARIABLE_LIST = di_track_legmed_success_actor_list } - } - scope:recipient = { - diarch_interaction_add_to_global_list_effect = { VARIABLE_LIST = di_track_legmed_success_recipient_list } - } -} - -diarch_legal_meddling_interaction_fail_effect = { - scope:actor = { - # Gain some stress. - add_stress = minor_stress_gain - # We nest this so that scope:recipient doesn't have to see their own opinion effects. - if = { - limit = { - this != scope:recipient - } - # Add some opinion loss. - ## Counties are worrying. - if = { - limit = { scope:target.tier = tier_county } - reverse_add_opinion = { - target = scope:recipient - modifier = respect_opinion - opinion = -10 - } - } - ## Duchies are troublesome. - else_if = { - limit = { scope:target.tier = tier_duchy } - reverse_add_opinion = { - target = scope:recipient - modifier = annoyed_opinion - opinion = -20 - } - } - ## Kingdoms are hateful. - else_if = { - limit = { scope:target.tier = tier_kingdom } - reverse_add_opinion = { - target = scope:recipient - modifier = angry_opinion - opinion = -30 - } - } - } - } - # Object explorer logging. - scope:actor = { - diarch_interaction_set_or_update_global_variable_effect = { VARIABLE = di_track_legmed_failure } - diarch_interaction_add_to_global_list_effect = { VARIABLE_LIST = di_track_legmed_failure_actor_list } - } - scope:recipient = { - diarch_interaction_add_to_global_list_effect = { VARIABLE_LIST = di_track_legmed_failure_recipient_list } - } -} - -diarch_legal_meddling_interaction_apply_success_effect = { - # Notify other parties. - hidden_effect = { - # Inform the liege. - scope:actor.liege = { - send_interface_message = { - type = msg_diarch_acting_effect - title = diarch_using_powers.t - right_icon = scope:recipient - left_icon = scope:actor - show_as_tooltip = { diarch_legal_meddling_interaction_success_effect = yes } - } - } - # Inform scope:recipient. - scope:recipient = { - send_interface_toast = { - type = event_toast_effect_bad - title = diarch_legal_meddling_interaction.tt.success - left_icon = scope:actor - show_as_tooltip = { diarch_legal_meddling_interaction_success_effect = yes } - } - } - } - # Finally, fire off the actual effect. - send_interface_toast = { - type = event_toast_effect_good - title = diarch_legal_meddling_interaction.tt.success - left_icon = scope:recipient - # Prestige costs. - ## Point out the lack of cost. - if = { - limit = { scope:diarch_legal_meddling_interaction_duel_learning = yes } - custom_tooltip = diarch_interaction_pay_prestige_none - } - ## Point out the discount. - else_if = { - limit = { scope:diarch_legal_meddling_interaction_pay_prestige_partial = yes } - add_prestige = legal_meddling_interaction_title_discounted_cost_value - } - ## Soz mate, yerr payin' full price. - else = { add_prestige = legal_meddling_interaction_title_cost_value } - # Gib claim & opinion loss. - diarch_legal_meddling_interaction_success_effect = yes - } -} - -diarch_legal_meddling_interaction_apply_fail_effect = { - # Notify other parties. - hidden_effect = { - # Inform scope:secondary_recipient. - scope:secondary_recipient = { - send_interface_message = { - type = msg_diarch_acting_text_and_effect - title = diarch_using_powers.t - desc = diarch_legal_meddling_interaction.tt.failure.liege - right_icon = scope:recipient - left_icon = scope:actor - show_as_tooltip = { diarch_legal_meddling_interaction_fail_effect = yes } - } - } - # Inform scope:recipient. - scope:recipient = { - send_interface_toast = { - type = event_toast_effect_good - title = diarch_legal_meddling_interaction.tt.failure - left_icon = scope:actor - show_as_tooltip = { diarch_legal_meddling_interaction_fail_effect = yes } - } - } - } - # Finally, fire off the actual effect. - send_interface_toast = { - type = event_toast_effect_bad - title = diarch_legal_meddling_interaction.tt.failure - left_icon = scope:recipient - diarch_legal_meddling_interaction_fail_effect = yes - } -} - -diarch_syphon_treasury_interaction_syphon_development_growth_effect = { - # First, configure the development growth loss to be divided. - save_scope_value_as = { - name = county_attribute_loss - value = $LOSS$ - } - if = { - limit = { scope:county_attribute_loss = massive_development_progress_loss } - custom_tooltip = diarch_syphon_treasury_interaction_syphon_development_growth_massive_tt - } - else_if = { - limit = { scope:county_attribute_loss = major_development_progress_loss } - custom_tooltip = diarch_syphon_treasury_interaction_syphon_development_growth_major_tt - } - else_if = { - limit = { scope:county_attribute_loss = medium_development_progress_loss } - custom_tooltip = diarch_syphon_treasury_interaction_syphon_development_growth_medium_tt - } - else = { custom_tooltip = diarch_syphon_treasury_interaction_syphon_development_growth_minor_tt } - # Now, execute our general effects. - hidden_effect = { - while = { - count = syphon_treasury_recipient_county_tally - random_held_county = { - limit = { - NOT = { - save_temporary_scope_as = current_county - any_in_list = { - list = syphon_treasury_affected_counties - this = scope:current_county - } - } - } - change_development_progress = syphon_treasury_county_attribute_loss_fraction - add_to_list = syphon_treasury_affected_counties - } - } - } -} - -diarch_syphon_treasury_interaction_syphon_control_effect = { - # First, configure the control loss to be divided. - save_scope_value_as = { - name = county_attribute_loss - value = $LOSS$ - } - # Now, execute our general effects. - while = { - count = syphon_treasury_recipient_county_tally - random_held_county = { - limit = { - NOT = { - save_temporary_scope_as = current_county - any_in_list = { - list = syphon_treasury_affected_counties - this = scope:current_county - } - } - } - change_county_control = syphon_treasury_county_attribute_loss_fraction - add_to_list = syphon_treasury_affected_counties - } - } -} - -diarch_syphon_treasury_interaction_caught_embezzling_effect = { - scope:actor = { - # Variable results depending on embezzlement level. - ## Very high. - if = { - limit = { always = scope:diarch_syphon_treasury_sum_huge } - # Apply strife. - change_strife_opinion = monumental_strife_gain - # Negative opinion. - scope:recipient = { - # Greedy characters will not forgive this slight if they can help it. - if = { - limit = { - has_trait = greedy - can_set_relation_nemesis_trigger = { CHARACTER = scope:actor } - } - set_relation_nemesis = { - target = scope:actor - reason = rival_tried_to_embezzle - } - } - # Forgiving characters lose a little less. - else_if = { - limit = { has_trait = forgiving } - add_opinion = { - target = scope:actor - modifier = disappointed_opinion - opinion = -10 - } - } - # Otherwise, folks do be mad. - else = { - add_opinion = { - target = scope:actor - modifier = trust_opinion - opinion = -45 - } - } - } - } - ## High. - else_if = { - limit = { always = scope:diarch_syphon_treasury_sum_large } - # Apply strife. - change_strife_opinion = massive_strife_gain - # Negative opinion. - scope:recipient = { - # Greedy characters will not forgive this slight if they can help it. - if = { - limit = { - has_trait = greedy - can_set_relation_rival_trigger = { CHARACTER = scope:actor } - } - set_relation_rival = { - target = scope:actor - reason = rival_tried_to_embezzle - } - } - # Forgiving characters lose a little less. - else_if = { - limit = { has_trait = forgiving } - add_opinion = { - target = scope:actor - modifier = disappointed_opinion - opinion = -5 - } - } - # Otherwise, folks are still somewhat mad. - else = { - add_opinion = { - target = scope:actor - modifier = trust_opinion - opinion = -20 - } - } - } - } - ## Medium. - else_if = { - limit = { always = scope:diarch_syphon_treasury_sum_medium } - # Apply strife. - change_strife_opinion = major_strife_gain - # Negative opinion. - ## Covered by embezzlement. - ## Greedy characters do still have a bit more room for hate. - scope:recipient = { - if = { - limit = { - scope:recipient = { has_trait = greedy } - } - progress_towards_rival_effect = { - REASON = rival_tried_to_embezzle - CHARACTER = scope:actor - OPINION = 0 - } - } - } - } - ## Low. - else_if = { - limit = { always = scope:diarch_syphon_treasury_sum_small } - # Apply strife. - change_strife_opinion = medium_strife_gain - # Negative opinion. - ## Covered by embezzlement. - ## Greedy characters do still have a bit more room for hate. - scope:recipient = { - if = { - limit = { - scope:recipient = { has_trait = greedy } - } - progress_towards_rival_effect = { - REASON = rival_tried_to_embezzle - CHARACTER = scope:actor - OPINION = 0 - } - } - } - } - # Crime opinion. - reverse_add_opinion = { - target = scope:recipient - modifier = embezzled_opinion - } - } -} - -diarch_shift_privileges_interaction_success_apply_modifiers_vague_effect = { - scope:recipient = { - # We obfuscate at this stage for neater UX. - custom_tooltip = diarch_shift_privileges_interaction.tt.success.random_negative_effect - } -} - -diarch_shift_privileges_interaction_success_apply_modifiers_actual_effect = { - # Add a randomised negative modifier. - random_list = { - # Target cash. - 100 = { - ordered_held_title = { - title_tier = county - limit = { - diarch_shift_privileges_valid_target_title_trigger = yes - } - order_by = { - value = title_province.monthly_income - # Weight down the capital to be the last selected, if we can. - if = { - limit = { this = scope:recipient.capital_county } - add = -1000 - } - } - add_county_modifier = { - modifier = shift_privileges_monopolies_sold_modifier - years = shift_privileges_modifier_duration_value - } - change_county_control = medium_county_control_loss - } - } - # Target levies. - 100 = { - ordered_held_title = { - title_tier = county - limit = { - diarch_shift_privileges_valid_target_title_trigger = yes - } - order_by = { - value = building_levies - # Weight down the capital to be the last selected, if we can. - if = { - limit = { this = scope:recipient.capital_county } - add = -1000 - } - } - add_county_modifier = { - modifier = shift_privileges_scutage_exemptions_modifier - years = shift_privileges_modifier_duration_value - } - change_county_control = medium_county_control_loss - } - } - # Target development growth. - 100 = { - ordered_held_title = { - title_tier = county - limit = { - diarch_shift_privileges_valid_target_title_trigger = yes - } - order_by = { - value = development_rate - # Weight down the capital to be the last selected, if we can. - if = { - limit = { this = scope:recipient.capital_county } - add = -1000 - } - } - add_county_modifier = { - modifier = shift_privileges_conflicting_deeds_modifier - years = shift_privileges_modifier_duration_value - } - change_county_control = medium_county_control_loss - } - } - } - # Object explorer logging. - scope:actor = { - diarch_interaction_set_or_update_global_variable_effect = { VARIABLE = di_track_shiftpriv_success } - diarch_interaction_add_to_global_list_effect = { VARIABLE_LIST = di_track_shiftpriv_success_actor_list } - } - scope:recipient = { - diarch_interaction_add_to_global_list_effect = { VARIABLE_LIST = di_track_shiftpriv_success_recipient_list } - } -} - -diarch_shift_privileges_interaction_success_apply_opinion_effect = { - scope:actor = { - # Plus opinion loss. - reverse_add_opinion = { - target = scope:recipient - modifier = hate_opinion - opinion = -30 - } - # And some strife. - change_strife_opinion = minor_strife_gain - } -} - -diarch_shift_privileges_interaction_success_apply_other_effect = { - scope:actor = { - # Now we dole out some cash. - add_gold = major_gold_value - } -} - -diarch_shift_privileges_interaction_fail_effect = { - scope:actor = { - # Gain some stress, proportional to the size of the realm you're harassing. - ## Counties are a bit of stress. - if = { - limit = { scope:recipient.highest_held_title_tier >= tier_county } - add_stress = minor_stress_gain - } - ## Duchies are troublesome. - else_if = { - limit = { scope:recipient.highest_held_title_tier >= tier_duchy } - add_stress = medium_stress_gain - } - ## Kingdoms are a big deal. - else_if = { - limit = { scope:recipient.highest_held_title_tier >= tier_kingdom } - add_stress = major_stress_gain - } - # We nest this so that scope:recipient doesn't have to see their own opinion effects. - if = { - limit = { - this != scope:recipient - } - # Add some opinion loss. - reverse_add_opinion = { - target = scope:recipient - modifier = angry_opinion - opinion = -20 - } - } - } - # Object explorer logging. - scope:actor = { - diarch_interaction_set_or_update_global_variable_effect = { VARIABLE = di_track_shiftpriv_failure } - diarch_interaction_add_to_global_list_effect = { VARIABLE_LIST = di_track_shiftpriv_failure_actor_list } - } - scope:recipient = { - diarch_interaction_add_to_global_list_effect = { VARIABLE_LIST = di_track_shiftpriv_failure_recipient_list } - } -} - -diarch_shift_privileges_interaction_apply_success_effect = { - # Notify other parties. - hidden_effect = { - # Inform the liege. - scope:actor.liege = { - send_interface_message = { - type = msg_diarch_acting_effect - title = diarch_using_powers.t - right_icon = scope:recipient - left_icon = scope:actor - show_as_tooltip = { - diarch_shift_privileges_interaction_success_apply_modifiers_vague_effect = yes - diarch_shift_privileges_interaction_success_apply_other_effect = yes - } - } - } - # Inform scope:recipient. - scope:recipient = { - send_interface_toast = { - title = diarch_shift_privileges_interaction.tt.success - left_icon = scope:actor - # We apply the actual modifier here, so that scope:recipient can see it. - diarch_shift_privileges_interaction_success_apply_modifiers_actual_effect = yes - show_as_tooltip = { diarch_shift_privileges_interaction_success_apply_other_effect = yes } - } - } - } - # Finally, fire off the actual effect. - send_interface_toast = { - title = diarch_shift_privileges_interaction.tt.success - left_icon = scope:recipient - # Gib actual gold here. - diarch_shift_privileges_interaction_success_apply_other_effect = yes - # Plus talk about a county modifier. - diarch_shift_privileges_interaction_success_apply_modifiers_vague_effect = yes - } - # Finally, apply opinion loss. - diarch_shift_privileges_interaction_success_apply_opinion_effect = yes -} - -diarch_shift_privileges_interaction_apply_fail_effect = { - # Notify other parties. - hidden_effect = { - # Inform scope:secondary_recipient. - scope:secondary_recipient = { - send_interface_message = { - type = msg_diarch_acting_text_and_effect - title = diarch_using_powers.t - desc = diarch_shift_privileges_interaction.tt.failure.liege - right_icon = scope:recipient - left_icon = scope:actor - show_as_tooltip = { diarch_shift_privileges_interaction_fail_effect = yes } - } - } - # Inform scope:recipient. - scope:recipient = { - send_interface_toast = { - title = diarch_shift_privileges_interaction.tt.failure - left_icon = scope:actor - show_as_tooltip = { diarch_shift_privileges_interaction_fail_effect = yes } - } - } - } - # Finally, fire off the actual effect. - send_interface_toast = { - title = diarch_shift_privileges_interaction.tt.failure - left_icon = scope:recipient - diarch_shift_privileges_interaction_fail_effect = yes - } -} - -diarch_swing_scales_guts_effect = { - # Influence. - switch = { - trigger = yes - scope:swing_influence = { - show_as_tooltip = { - change_influence = { - value = swing_scales_influence_cost_value - # LEGITIMACY OF RULER AFFECTS COSTS FOR REGENTS - multiply = legitimacy_regent_swing_scale_multipler_value - multiply = -1 - round = yes - } - } - } - # Movement Power. - scope:swing_movement_power = { - custom_tooltip = { - text = swing_scales_decrease_movement_power - if = { - limit = { - exists = var:movement_power_decreased_diarchy - } - set_variable = { - name = movement_power_decreased_diarchy - value = { - value = var:movement_power_decreased_diarchy - add = { - value = movement_power_decreased_diarchy_value - multiply = legitimacy_regent_swing_scale_multipler_value - } - } - } - } - else = { - set_variable = { - name = movement_power_decreased_diarchy - value = { - value = movement_power_decreased_diarchy_value - multiply = legitimacy_regent_swing_scale_multipler_value - } - } - } - #force the update of variables to immediately show changes - update_character_movement_power_effect = yes - top_participant_group:dynastic_cycle ?= { - update_movement_power_effect = yes - } - } - } - # Prestige. - scope:swing_prestige = { - show_as_tooltip = { - add_prestige = { - value = swing_scales_prestige_cost_value - # LEGITIMACY OF RULER AFFECTS COSTS FOR REGENTS - multiply = legitimacy_regent_swing_scale_multipler_value - multiply = -1 - round = yes - } - } - } - # Piety. - scope:swing_piety = { - show_as_tooltip = { - add_piety = { - value = swing_scales_piety_cost_value - # LEGITIMACY OF RULER AFFECTS COSTS FOR REGENTS - multiply = legitimacy_regent_swing_scale_multipler_value - multiply = -1 - round = yes - } - } - } - # Cash. - scope:swing_gold = { - save_scope_value_as = { - name = swing_gold_value - value = { - value = swing_scales_cash_cost_value - # LEGITIMACY OF RULER AFFECTS COSTS FOR REGENTS - multiply = legitimacy_regent_swing_scale_multipler_value - round = yes - } - } - show_as_tooltip = { - pay_short_term_gold = { - target = scope:recipient - gold = scope:swing_gold_value - } - } - # Scope:actor actually loses their gold when paying the admission price for the interaction, so we silently give scope:recipient gold from nowhere instead. - hidden_effect = { - scope:recipient = { add_gold = scope:swing_gold_value } - } - } - # Hook. - scope:swing_hook = { - use_hook = scope:recipient - } - # HoF. - scope:swing_hof = { - show_as_tooltip = { - add_piety = { - value = swing_scales_piety_cost_value - multiply = -1 - } - pay_short_term_gold = { - target = scope:actor.faith.religious_head - gold = swing_scales_cash_cost_value - } - } - # The HoF doesn't need *another* source of cash unless they're fairly minor, so we only actually pay this if they're already very low on cash. - hidden_effect = { - scope:actor.faith.religious_head = { - if = { - limit = { gold <= 1000 } - add_gold = scope:actor.swing_scales_cash_cost_value - } - } - } - } - } - if = { - limit = { - scope:actor = { is_diarch_of_target = scope:recipient } - OR = { - scope:swing_influence = yes - scope:swing_prestige = yes - scope:swing_piety = yes - scope:swing_gold = yes - } - } - if = { - limit = { scope:recipient.legitimacy_level <= 2 } - custom_tooltip = legitimacy_swing_scales_cheaper_tt - } - else = { custom_tooltip = legitimacy_swing_scales_dearer_tt } - } -} - -overthrow_regent_scheme_interaction_actor_stress_effect = { - # Loyal stress. - ## Gain stress if current diarch is loyal. - if = { - limit = { - scope:recipient = { diarch_loyalty >= diarch_loyalty_visibly_loyal_threshold } - } - stress_impact = { - honest = medium_stress_impact_gain - compassionate = major_stress_impact_gain - just = major_stress_impact_gain - loyal = major_stress_impact_gain - } - if = { - limit = { has_trait = loyal } - custom_tooltip = overthrow_regent_scheme_interaction_actor_stress_effect.tt.loyal.remove_loyal - } - } - ## Lose stress if current diarch is disloyal. - else_if = { - limit = { - scope:recipient = { diarch_loyalty <= diarch_loyalty_visibly_disloyal_threshold } - } - stress_impact = { - loyal = major_stress_impact_loss - honest = medium_stress_impact_loss - compassionate = major_stress_impact_loss - just = major_stress_impact_loss - } - if = { - limit = { has_trait = loyal } - custom_tooltip = overthrow_regent_scheme_interaction_actor_stress_effect.tt.loyal.remove_disloyal - } - } - # Disloyal stress. - ## Disloyals don't care if they unseat another disloyal character enough to stress about it, even if they're a bit less likely to do it. - ## Lose stress if current diarch is loyal. - else_if = { - limit = { - scope:recipient = { diarch_loyalty >= diarch_loyalty_visibly_loyal_threshold } - } - stress_impact = { - disloyal = major_stress_impact_loss - honest = medium_stress_impact_loss - compassionate = major_stress_impact_loss - just = major_stress_impact_loss - } - if = { - limit = { has_trait = disloyal } - custom_tooltip = overthrow_regent_scheme_interaction_actor_stress_effect.tt.disloyal.remove_loyal - } - } - # Else, standard. - else = { - stress_impact = { - honest = medium_stress_impact_gain - compassionate = major_stress_impact_gain - just = major_stress_impact_gain - } - } -} - -invalidate_diarch_grand_wedding_effect = { - # Invalidate grand weddings - diarch = { - if = { - limit = { - # scope:diarch is currently an active Diarch - exists = liege - is_diarch = yes - liege = { - diarch = scope:diarch - has_active_diarchy = yes - } - # scope:diarch was promised a Grand Wedding - has_variable = promised_grand_wedding_by - } - betrothed = { save_scope_as = betrothed } - # Save scopes of spouses, and organizers from variables - scope:diarch = { - add_to_list = informee - var:promised_grand_wedding_by ?= { - add_to_list = informee - var:promised_grand_wedding_to ?= { add_to_list = informee } - } - } - scope:betrothed = { - add_to_list = informee - var:promised_grand_wedding_by ?= { - add_to_list = informee - var:promised_grand_wedding_to ?= { add_to_list = informee } - } - } - # Clean up variables and inform relevant characters of invalidation - every_in_list = { - list = informee - if = { - limit = { exists = var:promised_grand_wedding_marriage_countdown } - remove_variable = promised_grand_wedding_marriage_countdown - } - if = { - limit = { exists = var:promised_grand_wedding_by } - remove_variable = promised_grand_wedding_by - } - if = { - limit = { exists = var:promised_grand_wedding_to } - remove_variable = promised_grand_wedding_to - } - send_interface_message = { - type = msg_betrothal_invalidated - title = grand_wedding_cancelled_by_regency_title - left_icon = scope:diarch - right_icon = scope:betrothed - desc = grand_wedding_cancelled_by_regency_desc - } - } - } - } -} - -sort_vizier_candidates_to_list_effect = { - scope:actor = { - every_courtier = { - limit = { is_valid_basic_candidate_for_vizier_trigger = yes } - add_to_list = characters_pre_filter - } - every_vassal = { - limit = { - is_valid_basic_candidate_for_vizier_trigger = yes - highest_held_title_tier <= tier_barony - } - add_to_list = characters_pre_filter - } - } - hidden_effect = { - while = { - count = 6 - ordered_in_list = { - list = characters_pre_filter - order_by = diarchy_vizier_succession_score_value - limit = { - NOT = { is_in_list = characters } - } - add_to_list = characters - } - } - } -} - -mulct_vizier_for_cash_effect = { - $VIZIER$ = { - # How much cash are we getting? - ## Miniscule - if = { - limit = { scope:mulct_vizier_interaction_minimal = yes } - if = { - limit = { - NOT = { exists = scope:free_mulct } - } - update_diarchy_swing_with_perspective_effect = { - SWING = vizier_mulct_swing_gain_miniscule_value - LIEGE = $VIZIER$.liege - } - } - hidden_effect = { add_short_term_gold = liege.minor_gold_value } - pay_short_term_gold = { - target = $VIZIER$.liege - gold = liege.minor_gold_value - } - } - ## Minor - else_if = { - limit = { scope:mulct_vizier_interaction_minor = yes } - if = { - limit = { - NOT = { exists = scope:free_mulct } - } - update_diarchy_swing_with_perspective_effect = { - SWING = vizier_mulct_swing_gain_minor_value - LIEGE = $VIZIER$.liege - } - } - hidden_effect = { add_short_term_gold = liege.medium_gold_value } - pay_short_term_gold = { - target = $VIZIER$.liege - gold = liege.medium_gold_value - } - } - ## Medium - else_if = { - limit = { scope:mulct_vizier_interaction_medium = yes } - if = { - limit = { - NOT = { exists = scope:free_mulct } - } - update_diarchy_swing_with_perspective_effect = { - SWING = vizier_mulct_swing_gain_medium_value - LIEGE = $VIZIER$.liege - } - } - hidden_effect = { add_short_term_gold = liege.major_gold_value } - pay_short_term_gold = { - target = $VIZIER$.liege - gold = liege.major_gold_value - } - } - ## Major - else_if = { - limit = { scope:mulct_vizier_interaction_major = yes } - if = { - limit = { - NOT = { exists = scope:free_mulct } - } - update_diarchy_swing_with_perspective_effect = { - SWING = vizier_mulct_swing_gain_major_value - LIEGE = $VIZIER$.liege - } - } - hidden_effect = { add_short_term_gold = liege.massive_gold_value } - pay_short_term_gold = { - target = $VIZIER$.liege - gold = liege.massive_gold_value - } - } - ## Massive - else_if = { - limit = { scope:mulct_vizier_interaction_massive = yes } - if = { - limit = { - NOT = { exists = scope:free_mulct } - } - update_diarchy_swing_with_perspective_effect = { - SWING = vizier_mulct_swing_gain_massive_value - LIEGE = $VIZIER$.liege - } - } - hidden_effect = { add_short_term_gold = liege.monumental_gold_value } - pay_short_term_gold = { - target = $VIZIER$.liege - gold = liege.monumental_gold_value - } - } - # Now we pawn everything they have at the relevant level. - ## T1 - if = { - limit = { - NOT = { exists = scope:free_mulct } - scope:mulct_vizier_interaction_minor = yes - } - custom_tooltip = mulct_vizier_interaction.vizier_loses_extravagance_t1_modifiers - hidden_effect = { - remove_character_modifier = vizier_extravagance_t1_treasure_modifier - remove_character_modifier = vizier_extravagance_t1_activities_modifier - remove_character_modifier = vizier_extravagance_t1_property_modifier - remove_character_modifier = vizier_extravagance_t1_charity_modifier - } - } - ## T2 - else_if = { - limit = { - NOT = { exists = scope:free_mulct } - scope:mulct_vizier_interaction_medium = yes - } - custom_tooltip = mulct_vizier_interaction.vizier_loses_extravagance_t2_modifiers - hidden_effect = { - remove_character_modifier = vizier_extravagance_t2_treasure_modifier - remove_character_modifier = vizier_extravagance_t2_activities_modifier - remove_character_modifier = vizier_extravagance_t2_property_modifier - remove_character_modifier = vizier_extravagance_t2_charity_modifier - } - } - ## T3 - else_if = { - limit = { - NOT = { exists = scope:free_mulct } - scope:mulct_vizier_interaction_major = yes - } - custom_tooltip = mulct_vizier_interaction.vizier_loses_extravagance_t3_modifiers - hidden_effect = { - remove_character_modifier = vizier_extravagance_t3_treasure_modifier - remove_character_modifier = vizier_extravagance_t3_activities_modifier - remove_character_modifier = vizier_extravagance_t3_property_modifier - remove_character_modifier = vizier_extravagance_t3_charity_modifier - } - } - ## T4 - else_if = { - limit = { - NOT = { exists = scope:free_mulct } - scope:mulct_vizier_interaction_massive = yes - } - custom_tooltip = mulct_vizier_interaction.vizier_loses_extravagance_t4_modifiers - # But first: do we need to flag an achievement? - if = { - limit = { - liege = { is_ai = no } - has_character_modifier = vizier_extravagance_t4_treasure_modifier - has_character_modifier = vizier_extravagance_t4_activities_modifier - has_character_modifier = vizier_extravagance_t4_property_modifier - has_character_modifier = vizier_extravagance_t4_charity_modifier - } - liege = { add_character_flag = fp3_mulct_them_dry_achievement_flag } - } - hidden_effect = { - remove_character_modifier = vizier_extravagance_t4_treasure_modifier - remove_character_modifier = vizier_extravagance_t4_activities_modifier - remove_character_modifier = vizier_extravagance_t4_property_modifier - remove_character_modifier = vizier_extravagance_t4_charity_modifier - } - } - } -} - -mulct_vizier_for_cash_opinion_reaction_effect = { - # Greedy viziers hate this. - if = { - limit = { has_trait = greedy } - save_scope_value_as = { - name = opinion_val - value = { - value = -15 - multiply = $MULT$ - } - } - add_opinion = { - modifier = goldlust_opinion - target = scope:actor - opinion = scope:opinion_val - } - } - # Generous & most profligate viziers are sorta _eh_ about it. - else_if = { - limit = { - OR = { - has_trait = generous - has_trait = profligate - } - } - save_scope_value_as = { - name = opinion_val - value = { - value = -5 - multiply = $MULT$ - } - } - add_opinion = { - modifier = resigned_opinion - target = scope:actor - opinion = scope:opinion_val - } - } - # Loyal viziers consider it their duty & forgiving viziers accept it. - else_if = { - limit = { - OR = { - has_trait = loyal - has_trait = forgiving - } - } - save_scope_value_as = { - name = opinion_val - value = { - value = -7 - multiply = $MULT$ - } - } - add_opinion = { - modifier = resigned_opinion - target = scope:actor - opinion = scope:opinion_val - } - } - # Disloyal viziers think your duty can go stuff itself & vengeful viziers are irate. - else_if = { - limit = { - OR = { - has_trait = disloyal - has_trait = vengeful - } - } - save_scope_value_as = { - name = opinion_val - value = { - value = -12 - multiply = $MULT$ - } - } - add_opinion = { - modifier = took_my_coin_opinion - target = scope:actor - opinion = scope:opinion_val - } - } - # Everyone else is annoyed. - else = { - save_scope_value_as = { - name = opinion_val - value = { - value = -10 - multiply = $MULT$ - } - } - add_opinion = { - modifier = took_my_coin_opinion - target = scope:actor - opinion = scope:opinion_val - } - } -} - -diarch_request_imperial_expedition_accepted_effect = { - # Explain what's up. - custom_tooltip = diarch_request_imperial_expedition_interaction.tt.access_to_cb - custom_tooltip = diarch_request_imperial_expedition_interaction.tt.governors_as_allies - custom_tooltip = diarch_request_imperial_expedition_interaction.tt.target_behaviour_explanation - custom_tooltip = diarch_request_imperial_expedition_interaction.tt.post_war - # Give us our charge so we can actually use the CB. - set_variable = { - name = imperial_expedition_charged - value = yes - } - # If you used a hook, calc some extra stuff. - if = { - limit = { - scope:hook = yes - has_usable_hook = scope:recipient - } - # Use the hook up. - use_hook = scope:recipient - # Plus scope:recipient is concerned. - reverse_add_opinion = { - target = scope:recipient - modifier = suspicion_opinion - opinion = -20 - } - } - # Otherwise you didn't, so you should be happy. - else_if = { - limit = { - scope:recipient = { is_ai = yes } - } - reverse_add_opinion = { - target = scope:recipient - modifier = trust_opinion - opinion = 20 - } - } -} - -diarch_request_imperial_expedition_rejected_effect = { - scope:recipient = { - # We have to put up the same amount of influence they do to veto them. - if = { - limit = { - # Prevent weird +0 influence tooltip. - scope:hook = no - } - change_influence = { - if = { - limit = { scope:influence_major = yes } - add = request_imperial_expedition_influence_stake_major_value - } - else_if = { - limit = { scope:influence_medium = yes } - add = request_imperial_expedition_influence_stake_medium_value - } - else_if = { - limit = { scope:influence_minor = yes } - add = request_imperial_expedition_influence_stake_minor_value - } - multiply = -1 - } - } - # Plus they get annoyed with us. - add_opinion = { - target = scope:actor - modifier = angry_opinion - opinion = -40 - } - } -} - -diarch_promoted_as_administrative_candidate_get_best_tooltip_effect = { - if = { - limit = { - scope:actor.top_liege = { has_diarchy_active_parameter = diarch_more_efficient_administrative_emperor_promotion_candidate_massive } - } - custom_tooltip = diarch_more_efficient_administrative_emperor_promotion_candidate_massive.tt.interaction_explanation - } - else_if = { - limit = { - scope:actor.top_liege = { has_diarchy_active_parameter = diarch_more_efficient_administrative_emperor_promotion_candidate_major } - } - custom_tooltip = diarch_more_efficient_administrative_emperor_promotion_candidate_major.tt.interaction_explanation - } - else_if = { - limit = { - scope:actor.top_liege = { has_diarchy_active_parameter = diarch_more_efficient_administrative_emperor_promotion_candidate_medium } - } - custom_tooltip = diarch_more_efficient_administrative_emperor_promotion_candidate_medium.tt.interaction_explanation - } - else_if = { - limit = { - scope:actor.top_liege = { has_diarchy_active_parameter = diarch_more_efficient_administrative_emperor_promotion_candidate_mild } - } - custom_tooltip = diarch_more_efficient_administrative_emperor_promotion_candidate_mild.tt.interaction_explanation - } -} - -maiming_destroy_diarchy_effect = { - if = { - limit = { exists = scope:destroy_diarchy } - # Liege maims co-emperor. - if = { - limit = { scope:actor.diarch = scope:recipient } - scope:actor = { - clear_designated_heir = yes - end_diarchy = yes - } - every_player = { - limit = { - NOR = { - this = scope:actor - this = scope:recipient - } - top_liege = scope:actor.top_liege - } - trigger_event = diarchy.8022 - } - } - # Co-emperor maims liege. - else = { - # We do this in two batches so that we don't produce an error when the emperor is usurped by their old co-emperor. - ## First the empire. - create_title_and_vassal_change = { - type = usurped - save_scope_as = change - } - scope:recipient = { - every_held_title = { - limit = { - OR = { - this = scope:recipient.capital_county - this = scope:recipient.capital_county.duchy - AND = { - tier = tier_county - this.duchy = scope:recipient.capital_county.duchy - } - tier >= scope:recipient.highest_held_title_tier - } - } - change_title_holder = { - holder = scope:actor - change = scope:change - } - } - every_vassal = { - custom = custom.recipient_every_vassal - change_liege = { - LIEGE = scope:actor - CHANGE = scope:change - } - } - } - resolve_title_and_vassal_change = scope:change - ## Then the former emperor. - create_title_and_vassal_change = { - type = usurped - save_scope_as = change2 - } - scope:recipient = { - change_liege = { - LIEGE = scope:actor - CHANGE = scope:change2 - } - } - resolve_title_and_vassal_change = scope:change2 - # Plus, end the diarchy. - hidden_effect = { - scope:recipient = { end_diarchy = yes } - } - every_player = { - limit = { - NOR = { - this = scope:actor - this = scope:recipient - } - top_liege = scope:actor.top_liege - } - trigger_event = diarchy.8023 - } - } - } -} - -diarch_demand_despotate_interaction_accepted_effect = { - create_title_and_vassal_change = { - type = granted - save_scope_as = change - } - scope:target = { - # First, we try to give them lands we hold. - every_in_de_jure_hierarchy = { - limit = { - holder = scope:recipient - tier >= tier_county - } - change_title_holder = { - holder = scope:actor - change = scope:change - } - } - # If they're not now landed, try to give them a random county — we do this so that we can keep them administrative. - if = { - limit = { - scope:actor = { is_landed = no } - } - scope:target = { - ordered_de_jure_county = { - limit = { - holder = { - is_ai = yes - any_liege_or_above = { this = scope:recipient } - } - } - limit = { - holder = { - any_liege_or_above = { this = scope:recipient } - } - } - order_by = development_level - change_title_holder = { - holder = scope:actor - change = scope:change - } - } - } - } - # If we haven't managed that, pick a random county not owned by a player and give them that. - change_title_holder = { - holder = scope:actor - change = scope:change - } - every_dejure_vassal_title_holder = { - limit = { - liege = scope:recipient - NOR = { - this = scope:actor - this = scope:recipient - } - } - custom = custom.every_target_de_jure_vassal - change_liege = { - liege = scope:actor - change = scope:change - } - } - } - resolve_title_and_vassal_change = scope:change - if = { - limit = { - NOT = { - scope:actor = { is_vassal_of = scope:recipient } - } - } - hidden_effect = { - create_title_and_vassal_change = { - type = swear_fealty - save_scope_as = change - } - scope:actor = { - change_liege = { - liege = scope:recipient - change = scope:change - } - } - resolve_title_and_vassal_change = scope:change - } - } - # If you used a hook, calc some extra stuff. - if = { - limit = { - scope:hook = yes - has_usable_hook = scope:recipient - } - # Use the hook up. - use_hook = scope:recipient - # Plus scope:recipient is concerned. - reverse_add_opinion = { - target = scope:recipient - modifier = frustrated_opinion - opinion = -40 - } - } - # Otherwise you didn't, so you should be happy. - else_if = { - limit = { is_ai = yes } - add_opinion = { - target = scope:recipient - modifier = grateful_opinion - opinion = 40 - } - } -} - -diarch_demand_despotate_interaction_rejected_effect = { - scope:recipient = { - # We have to put up the same amount of influence they do to veto them. - if = { - limit = { - # Prevent weird +0 influence tooltip. - scope:hook = no - } - change_influence = { - if = { - limit = { scope:influence_major = yes } - add = diarch_demand_despotate_interaction_stake_to_raise_major_value - } - else_if = { - limit = { scope:influence_medium = yes } - add = diarch_demand_despotate_interaction_stake_to_raise_medium_value - } - else_if = { - limit = { scope:influence_minor = yes } - add = diarch_demand_despotate_interaction_stake_to_raise_minor_value - } - } - custom_tooltip = diarch_demand_despotate_interaction.tt.double_stake - } - # Plus they get annoyed with us. - add_opinion = { - target = scope:actor - modifier = angry_opinion - opinion = -40 - } - } -} - -scapegoat_counterpart_interaction_process_results_effect = { - if = { - limit = { scope:diplomacy_small = yes } - scope:actor = { - save_scope_value_as = { - name = multiplied_diff - value = { - value = diplomacy - subtract = scope:recipient.diplomacy - multiply = 20 - max = 400 - } - } - change_influence = scope:multiplied_diff - $REALM_OPINION_ACTOR$ = { - value = scope:multiplied_diff - divide = 40 - min = 3 - } - } - scope:recipient = { - $REALM_OPINION_RECIPIENT$ = { - value = scope:multiplied_diff - divide = 30 - min = 5 - } - } - } - else_if = { - limit = { scope:diplomacy_large = yes } - scope:actor = { - save_scope_value_as = { - name = multiplied_diff - value = { - value = diplomacy - subtract = scope:recipient.diplomacy - multiply = 40 - max = 800 - } - } - change_influence = scope:multiplied_diff - $REALM_OPINION_ACTOR$ = { - value = scope:multiplied_diff - divide = 40 - min = 5 - } - } - scope:recipient = { - $REALM_OPINION_RECIPIENT$ = { - value = scope:multiplied_diff - divide = 30 - min = 10 - } - } - } - else_if = { - limit = { scope:intrigue_small = yes } - scope:actor = { - save_scope_value_as = { - name = multiplied_diff - value = { - value = intrigue - subtract = scope:recipient.intrigue - multiply = 20 - max = 400 - } - } - change_influence = scope:multiplied_diff - $REALM_OPINION_ACTOR$ = { - value = scope:multiplied_diff - divide = 40 - min = 3 - } - } - scope:recipient = { - $REALM_OPINION_RECIPIENT$ = { - value = scope:multiplied_diff - divide = 30 - min = 5 - } - } - } - else_if = { - limit = { scope:intrigue_large = yes } - scope:actor = { - save_scope_value_as = { - name = multiplied_diff - value = { - value = intrigue - subtract = scope:recipient.intrigue - multiply = 40 - max = 800 - } - } - change_influence = scope:multiplied_diff - $REALM_OPINION_ACTOR$ = { - value = scope:multiplied_diff - divide = 40 - min = 5 - } - } - scope:recipient = { - $REALM_OPINION_RECIPIENT$ = { - value = scope:multiplied_diff - divide = 30 - min = 10 - } - } - } -} - -################################################## -# Events - -# Fire a tooltip saying what effect this'll have on regent opinion. -## We don't need to use this _every_where, as otherwise it'd have to supplant the opinion effect entirely, but it's cool to use it in any specific regency events where flat opinion might be a nicer gain than usual. -raise_diarch_opinion_with_loyalty_update_effect = { - # Check the current opinion. - diarch = { - save_opinion_value_as = { - name = diarch_old_opinion - target = prev - } - } - # Plus, save $OPINION_AMOUNT$ so that we can use it in subsequent script values. - save_scope_value_as = { - name = opinion_amount - value = $OPINION_AMOUNT$ - } - # Process the loyalty update tooltip. - diarch = { - # Self-interested. - ## Hates you too much to be able to tell. - if = { - limit = { - diarch_loyalty <= diarch_loyalty_visibly_disloyal_threshold - scope:diarch_old_opinion <= -100 - scope:opinion_amount >= 1 - } - liege = { custom_tooltip = raise_diarch_opinion_with_loyalty_update_effect.tt.self_interested.overflow_edgecase } - } - ### Since save_opinion_value_as doesn't account for overspill past -100, and as we've got some special conditions that make the move from -100 to -99 very dramatic under certain circumstances, we need to have this vague option to cover up systemic inaccuracies. - ## Self-interested remains static. - else_if = { - limit = { - diarch_loyalty <= diarch_loyalty_visibly_disloyal_threshold - raise_diarch_opinion_with_loyalty_update_value <= diarch_loyalty_visibly_disloyal_threshold - } - liege = { custom_tooltip = raise_diarch_opinion_with_loyalty_update_effect.tt.self_interested.remains_static } - } - ## Self-interested to selfless. - else_if = { - limit = { - diarch_loyalty <= diarch_loyalty_visibly_disloyal_threshold - raise_diarch_opinion_with_loyalty_update_value >= diarch_loyalty_visibly_loyal_threshold - } - liege = { custom_tooltip = raise_diarch_opinion_with_loyalty_update_effect.tt.self_interested.to_selfless } - } - ## Self-interested to situational. - else_if = { - limit = { diarch_loyalty <= diarch_loyalty_visibly_disloyal_threshold } - liege = { custom_tooltip = raise_diarch_opinion_with_loyalty_update_effect.tt.self_interested.to_situational } - } - # Situational. - ## Situational to selfless. - else_if = { - limit = { - diarch_has_situational_loyalty_trigger = yes - raise_diarch_opinion_with_loyalty_update_value >= diarch_loyalty_visibly_loyal_threshold - } - liege = { custom_tooltip = raise_diarch_opinion_with_loyalty_update_effect.tt.situational.to_selfless } - } - ## Situational to self-interested. - else_if = { - limit = { - diarch_has_situational_loyalty_trigger = yes - raise_diarch_opinion_with_loyalty_update_value <= diarch_loyalty_visibly_disloyal_threshold - } - liege = { custom_tooltip = raise_diarch_opinion_with_loyalty_update_effect.tt.situational.to_self_interested } - } - ## Situational remains static. - else_if = { - limit = { diarch_has_situational_loyalty_trigger = yes } - liege = { custom_tooltip = raise_diarch_opinion_with_loyalty_update_effect.tt.situational.remains_static } - } - # Selfless. - ## Is too loyal to be able to tell. - else_if = { - limit = { - diarch_loyalty >= diarch_loyalty_visibly_loyal_threshold - scope:diarch_old_opinion >= 100 - scope:opinion_amount <= -1 - } - liege = { custom_tooltip = raise_diarch_opinion_with_loyalty_update_effect.tt.selfless.overflow_edgecase } - } - ### As above, we need this vague option to account for overspill. - ## Selfless remains static. - else_if = { - limit = { - diarch_loyalty >= diarch_loyalty_visibly_loyal_threshold - raise_diarch_opinion_with_loyalty_update_value >= diarch_loyalty_visibly_loyal_threshold - } - liege = { custom_tooltip = raise_diarch_opinion_with_loyalty_update_effect.tt.selfless.remains_static } - } - ## Selfless to self-interested. - else_if = { - limit = { - diarch_loyalty >= diarch_loyalty_visibly_loyal_threshold - raise_diarch_opinion_with_loyalty_update_value <= diarch_loyalty_visibly_disloyal_threshold - } - liege = { custom_tooltip = raise_diarch_opinion_with_loyalty_update_effect.tt.selfless.to_self_interested } - } - ## Selfless to situational. - else_if = { - limit = { diarch_loyalty >= diarch_loyalty_visibly_loyal_threshold } - liege = { custom_tooltip = raise_diarch_opinion_with_loyalty_update_effect.tt.selfless.to_situational } - } - } - # Now, add the new opinion. - reverse_add_opinion = { - target = diarch - modifier = $OPINION_TYPE$ - opinion = scope:opinion_amount - } -} - -# Diarchy swing can be good or bad for you depending on whether you're the liege, the diarch, or neutral, so we need different tooltips accordingly. -## Please note: for technical reasons this'll break if you don't use the pre-set script values or update it to include whatever new value you want to use. -update_diarchy_swing_with_perspective_effect = { - $LIEGE$ = { - # Sort the effect. - hidden_effect = { change_diarchy_swing = $SWING$ } - # Grab $LIEGE$'s scope for loc. - ## We save a weirdy scope name so we don't accidentally overwrite common scopes. - save_scope_as = liege_loc - } - # Right, now flick out the correct tooltips. - ## We can't easily access a number that doesn't yet exist as a variable within a custom tooltip, so this is gon' get _real_ gross and I'm sorry you have to watch it happen. - ## We also don't contain this in the above $LIEGE$ block because otherwise unusual (but valid) uses of the effect cause asserts. - ## Is the diarch gaining? - if = { - limit = { $SWING$ >= 1 } - ## Miniscule swing. - if = { - limit = { $SWING$ = miniscule_sop_swing_diarch_gain } - # For the liege. - if = { - limit = { this = $LIEGE$ } - $LIEGE$ = { custom_tooltip = update_diarchy_swing_with_perspective_effect.liege_perspective.miniscule_sop_swing_diarch_gain.tt } - } - # For the diarch. - else_if = { - limit = { this = $LIEGE$.diarch } - $LIEGE$ = { custom_tooltip = update_diarchy_swing_with_perspective_effect.diarch_perspective.miniscule_sop_swing_diarch_gain.tt } - } - # For everyone else. - else = { - $LIEGE$ = { custom_tooltip = update_diarchy_swing_with_perspective_effect.neutral_perspective.miniscule_sop_swing_diarch_gain.tt } - } - } - ## Minor swing. - else_if = { - limit = { $SWING$ = minor_sop_swing_diarch_gain } - # For the liege. - if = { - limit = { this = $LIEGE$ } - $LIEGE$ = { custom_tooltip = update_diarchy_swing_with_perspective_effect.liege_perspective.minor_sop_swing_diarch_gain.tt } - } - # For the diarch. - else_if = { - limit = { this = $LIEGE$.diarch } - $LIEGE$ = { custom_tooltip = update_diarchy_swing_with_perspective_effect.diarch_perspective.minor_sop_swing_diarch_gain.tt } - } - # For everyone else. - else = { - $LIEGE$ = { custom_tooltip = update_diarchy_swing_with_perspective_effect.neutral_perspective.minor_sop_swing_diarch_gain.tt } - } - } - ## Medium swing. - else_if = { - limit = { $SWING$ = medium_sop_swing_diarch_gain } - # For the liege. - if = { - limit = { this = $LIEGE$ } - $LIEGE$ = { custom_tooltip = update_diarchy_swing_with_perspective_effect.liege_perspective.medium_sop_swing_diarch_gain.tt } - } - # For the diarch. - else_if = { - limit = { this = $LIEGE$.diarch } - $LIEGE$ = { custom_tooltip = update_diarchy_swing_with_perspective_effect.diarch_perspective.medium_sop_swing_diarch_gain.tt } - } - # For everyone else. - else = { - $LIEGE$ = { custom_tooltip = update_diarchy_swing_with_perspective_effect.neutral_perspective.medium_sop_swing_diarch_gain.tt } - } - } - ## Major swing. - else_if = { - limit = { $SWING$ = major_sop_swing_diarch_gain } - # For the liege. - if = { - limit = { this = $LIEGE$ } - $LIEGE$ = { custom_tooltip = update_diarchy_swing_with_perspective_effect.liege_perspective.major_sop_swing_diarch_gain.tt } - } - # For the diarch. - else_if = { - limit = { this = $LIEGE$.diarch } - $LIEGE$ = { custom_tooltip = update_diarchy_swing_with_perspective_effect.diarch_perspective.major_sop_swing_diarch_gain.tt } - } - # For everyone else. - else = { - $LIEGE$ = { custom_tooltip = update_diarchy_swing_with_perspective_effect.neutral_perspective.major_sop_swing_diarch_gain.tt } - } - } - ## Massive swing. - else_if = { - limit = { $SWING$ = massive_sop_swing_diarch_gain } - # For the liege. - if = { - limit = { this = $LIEGE$ } - $LIEGE$ = { custom_tooltip = update_diarchy_swing_with_perspective_effect.liege_perspective.massive_sop_swing_diarch_gain.tt } - } - # For the diarch. - else_if = { - limit = { this = $LIEGE$.diarch } - $LIEGE$ = { custom_tooltip = update_diarchy_swing_with_perspective_effect.diarch_perspective.massive_sop_swing_diarch_gain.tt } - } - # For everyone else. - else = { - $LIEGE$ = { custom_tooltip = update_diarchy_swing_with_perspective_effect.neutral_perspective.massive_sop_swing_diarch_gain.tt } - } - } - ## Monumental swing. - else_if = { - limit = { $SWING$ = monumental_sop_swing_diarch_gain } - # For the liege. - if = { - limit = { this = $LIEGE$ } - $LIEGE$ = { custom_tooltip = update_diarchy_swing_with_perspective_effect.liege_perspective.monumental_sop_swing_diarch_gain.tt } - } - # For the diarch. - else_if = { - limit = { this = $LIEGE$.diarch } - $LIEGE$ = { custom_tooltip = update_diarchy_swing_with_perspective_effect.diarch_perspective.monumental_sop_swing_diarch_gain.tt } - } - # For everyone else. - else = { - $LIEGE$ = { custom_tooltip = update_diarchy_swing_with_perspective_effect.neutral_perspective.monumental_sop_swing_diarch_gain.tt } - } - } - } - ## Is the liege gaining? - else_if = { - limit = { $SWING$ <= -1 } - ## Miniscule swing. - if = { - limit = { $SWING$ = miniscule_sop_swing_liege_gain } - # For the liege. - if = { - limit = { this = $LIEGE$ } - $LIEGE$ = { custom_tooltip = update_diarchy_swing_with_perspective_effect.liege_perspective.miniscule_sop_swing_liege_gain.tt } - } - # For the diarch. - else_if = { - limit = { this = $LIEGE$.diarch } - $LIEGE$ = { custom_tooltip = update_diarchy_swing_with_perspective_effect.diarch_perspective.miniscule_sop_swing_liege_gain.tt } - } - # For everyone else. - else = { - $LIEGE$ = { custom_tooltip = update_diarchy_swing_with_perspective_effect.neutral_perspective.miniscule_sop_swing_liege_gain.tt } - } - } - ## Minor swing. - else_if = { - limit = { $SWING$ = minor_sop_swing_liege_gain } - # For the liege. - if = { - limit = { this = $LIEGE$ } - $LIEGE$ = { custom_tooltip = update_diarchy_swing_with_perspective_effect.liege_perspective.minor_sop_swing_liege_gain.tt } - } - # For the diarch. - else_if = { - limit = { this = $LIEGE$.diarch } - $LIEGE$ = { custom_tooltip = update_diarchy_swing_with_perspective_effect.diarch_perspective.minor_sop_swing_liege_gain.tt } - } - # For everyone else. - else = { - $LIEGE$ = { custom_tooltip = update_diarchy_swing_with_perspective_effect.neutral_perspective.minor_sop_swing_liege_gain.tt } - } - } - ## Medium swing. - else_if = { - limit = { $SWING$ = medium_sop_swing_liege_gain } - # For the liege. - if = { - limit = { this = $LIEGE$ } - $LIEGE$ = { custom_tooltip = update_diarchy_swing_with_perspective_effect.liege_perspective.medium_sop_swing_liege_gain.tt } - } - # For the diarch. - else_if = { - limit = { this = $LIEGE$.diarch } - $LIEGE$ = { custom_tooltip = update_diarchy_swing_with_perspective_effect.diarch_perspective.medium_sop_swing_liege_gain.tt } - } - # For everyone else. - else = { - $LIEGE$ = { custom_tooltip = update_diarchy_swing_with_perspective_effect.neutral_perspective.medium_sop_swing_liege_gain.tt } - } - } - ## Major swing. - else_if = { - limit = { $SWING$ = major_sop_swing_liege_gain } - # For the liege. - if = { - limit = { this = $LIEGE$ } - $LIEGE$ = { custom_tooltip = update_diarchy_swing_with_perspective_effect.liege_perspective.major_sop_swing_liege_gain.tt } - } - # For the diarch. - else_if = { - limit = { this = $LIEGE$.diarch } - $LIEGE$ = { custom_tooltip = update_diarchy_swing_with_perspective_effect.diarch_perspective.major_sop_swing_liege_gain.tt } - } - # For everyone else. - else = { - $LIEGE$ = { custom_tooltip = update_diarchy_swing_with_perspective_effect.neutral_perspective.major_sop_swing_liege_gain.tt } - } - } - ## Massive swing. - else_if = { - limit = { $SWING$ = massive_sop_swing_liege_gain } - # For the liege. - if = { - limit = { this = $LIEGE$ } - $LIEGE$ = { custom_tooltip = update_diarchy_swing_with_perspective_effect.liege_perspective.massive_sop_swing_liege_gain.tt } - } - # For the diarch. - else_if = { - limit = { this = $LIEGE$.diarch } - $LIEGE$ = { custom_tooltip = update_diarchy_swing_with_perspective_effect.diarch_perspective.massive_sop_swing_liege_gain.tt } - } - # For everyone else. - else = { - $LIEGE$ = { custom_tooltip = update_diarchy_swing_with_perspective_effect.neutral_perspective.massive_sop_swing_liege_gain.tt } - } - } - ## Monumental swing. - else_if = { - limit = { $SWING$ = monumental_sop_swing_liege_gain } - # For the liege. - if = { - limit = { this = $LIEGE$ } - $LIEGE$ = { custom_tooltip = update_diarchy_swing_with_perspective_effect.liege_perspective.monumental_sop_swing_liege_gain.tt } - } - # For the diarch. - else_if = { - limit = { this = $LIEGE$.diarch } - $LIEGE$ = { custom_tooltip = update_diarchy_swing_with_perspective_effect.diarch_perspective.monumental_sop_swing_liege_gain.tt } - } - # For everyone else. - else = { - $LIEGE$ = { custom_tooltip = update_diarchy_swing_with_perspective_effect.neutral_perspective.monumental_sop_swing_liege_gain.tt } - } - } - } - ## No gain not accounted for: you should never be swinging by 0. -} - -################################################## -# Primeministerships - -vizierate_remove_extravagance_modifiers_effect = { - remove_character_modifier = vizier_extravagance_t1_treasure_modifier - remove_character_modifier = vizier_extravagance_t1_activities_modifier - remove_character_modifier = vizier_extravagance_t1_property_modifier - remove_character_modifier = vizier_extravagance_t1_charity_modifier - remove_character_modifier = vizier_extravagance_t2_treasure_modifier - remove_character_modifier = vizier_extravagance_t2_activities_modifier - remove_character_modifier = vizier_extravagance_t2_property_modifier - remove_character_modifier = vizier_extravagance_t2_charity_modifier - remove_character_modifier = vizier_extravagance_t3_treasure_modifier - remove_character_modifier = vizier_extravagance_t3_activities_modifier - remove_character_modifier = vizier_extravagance_t3_property_modifier - remove_character_modifier = vizier_extravagance_t3_charity_modifier - remove_character_modifier = vizier_extravagance_t4_treasure_modifier - remove_character_modifier = vizier_extravagance_t4_activities_modifier - remove_character_modifier = vizier_extravagance_t4_property_modifier - remove_character_modifier = vizier_extravagance_t4_charity_modifier -} - -################################################## -# Co-Rulerships - -sort_junior_emperor_candidates_to_list_effect = { - scope:actor = { - every_close_or_extended_family_member = { - limit = { valid_junior_emperor_candidate_trigger = { LIEGE = scope:actor } } - add_to_list = characters - } - } -} - -sort_co_emperor_candidates_to_list_effect = { - scope:actor = { - every_close_or_extended_family_member = { - limit = { - valid_co_emperor_candidate_trigger = { LIEGE = scope:actor } - } - add_to_list = characters - } - every_vassal = { - limit = { - valid_co_emperor_candidate_trigger = { LIEGE = scope:actor } - } - add_to_list = characters - } - } -} - -sort_co_monarch_candidates_to_list_effect = { - scope:actor = { - every_child = { - limit = { - valid_co_monarch_candidate_trigger = { LIEGE = scope:actor } - } - add_to_list = characters - } - } -} - -grateful_for_appointment_as_co_emperor_effect = { - if = { - limit = { exists = scope:ai_recipient } - scope:ai_recipient = { - set_variable = { - name = co_emp_appointer - value = scope:actor - } - add_opinion = { - target = scope:actor - modifier = made_co_ruler_opinion - opinion = 50 - } - } - } - else = { - scope:secondary_recipient ?= { - set_variable = { - name = co_emp_appointer - value = scope:actor - } - add_opinion = { - target = scope:actor - modifier = made_co_ruler_opinion - opinion = 50 - } - } - } -} - -diarch_overwrites_old_designated_heir_apply_opinions_effect = { - scope:old_heir ?= { - # Humble or content characters accept this for what it is. - if = { - limit = { - OR = { - AND = { - has_trait = humble - # ... cancelled out by... - NOT = { has_trait = ambitious } - } - AND = { - has_trait = content - # ... cancelled out by... - NOT = { has_trait = arrogant } - } - } - } - # Annoyance with you. - add_opinion = { - target = $LIEGE$ - modifier = disappointed_opinion - opinion = -20 - } - # Annoyance with the new co-ruler. - ## Vs. player. - if = { - limit = { - # Rationale for this heinous crime at the top of this block. - NOT = { exists = scope:ai_recipient } - } - add_opinion = { - target = $CO_RULER$ - modifier = insult_opinion - opinion = -30 - } - } - ## Vs. AI. - else = { - add_opinion = { - target = scope:ai_recipient - modifier = insult_opinion - opinion = -30 - } - } - } - # Everyone else is outraged. - else = { - # Annoyance with you. - add_opinion = { - target = $LIEGE$ - modifier = betrayal_opinion - opinion = -50 - } - # Annoyance with the new co-ruler. - ## Vs. player. - if = { - limit = { - # Rationale for this heinous crime at the top of this block. - NOT = { exists = scope:ai_recipient } - } - add_opinion = { - target = $CO_RULER$ - modifier = hate_opinion - opinion = -75 - } - } - ## Vs. AI. - else = { - add_opinion = { - target = scope:ai_recipient - modifier = hate_opinion - opinion = -75 - } - } - } - } -} - -designated_diarch_overwridden_by_co_ruler_effect = { - $LIEGE$.designated_diarch ?= { - if = { - limit = { - NOT = { this = $CO_RULER$ } - } - # Humble or content characters accept this for what it is. - if = { - limit = { - OR = { - AND = { - has_trait = humble - # ... cancelled out by... - NOT = { has_trait = ambitious } - } - AND = { - has_trait = content - # ... cancelled out by... - NOT = { has_trait = arrogant } - } - } - } - # Annoyance with you. - add_opinion = { - target = $LIEGE$ - modifier = disappointed_opinion - opinion = -10 - } - # Annoyance with the new co-ruler. - ## Vs. player. - if = { - limit = { - # Rationale for this heinous crime at the top of this block. - NOT = { exists = scope:ai_recipient } - } - add_opinion = { - target = $CO_RULER$ - modifier = insult_opinion - opinion = -15 - } - } - ## Vs. AI. - else = { - add_opinion = { - target = scope:ai_recipient - modifier = insult_opinion - opinion = -15 - } - } - } - # Everyone else is outraged. - else = { - # Annoyance with you. - add_opinion = { - target = $LIEGE$ - modifier = appointed_co_ruler_over_designated_regent_opinion - opinion = -30 - } - # Annoyance with the new co-ruler. - ## Vs. player. - if = { - limit = { - # Rationale for this heinous crime at the top of this block. - NOT = { exists = scope:ai_recipient } - } - add_opinion = { - target = $CO_RULER$ - modifier = appointed_co_ruler_over_designated_regent_opinion - opinion = -50 - } - } - ## Vs. AI. - else = { - add_opinion = { - target = scope:ai_recipient - modifier = appointed_co_ruler_over_designated_regent_opinion - opinion = -50 - } - } - } - } - } -} diff --git a/N3OW/common/scripted_effects/00_diplomacy_lifestyle_effects.txt b/N3OW/common/scripted_effects/00_diplomacy_lifestyle_effects.txt deleted file mode 100644 index e490b396..00000000 --- a/N3OW/common/scripted_effects/00_diplomacy_lifestyle_effects.txt +++ /dev/null @@ -1,471 +0,0 @@ -#Effects used in Statecraft Lifestyle Focus events - - -##################################################################### -# EFFECT LIST -##################################################################### -# !!! Remember to add all new effects with a short description here !!! -# -# A Flaw of Character: -# diplomacy_family_0008_appropriate_lesson_effect Used to evaluate if the lesson the player picked was suitable for their heir. -# -# The Power of Words: Outcome for complimenting somebody -# diplomacy_majesty_0004_outcome_effect -# -# Manipulating a Vassal: -# diplomacy_generic_0012_good_outcome_effect Successful Manipulation, gain Hook and Opinion -# diplomacy_generic_0012_bad_outcome_effect Failed Manipulation, lose Opinion -# diplomacy_generic_0012_terrible_outcome_effect Failed Manipulation, lose Hook and Prestige -# diplomacy_generic_0012_tooltip_effect Tooltip-Only Summary of Possible Outcomes -# -# Court Visit -# diplomacy_foreign_special_1010_court_visit_outcome_preview_effect Non-executing effect used to show the player a preview of possible event outcomes in a tooltip. -# diplomacy_foreign_special_1010_court_visit_outcome_great_effect The best possible outcome from this event chain -# diplomacy_foreign_special_1010_court_visit_outcome_good_effect The standard outcome from this event chain -# diplomacy_foreign_special_1010_court_visit_outcome_bad_effect The worst possible outcome from this event chain -# diplomacy_foreign_special_1010_clean_up_court_visit_effect Clears all flags and variables after the event chain has concluded. -# diplomacy_foreign_special_1010_court_visit_interesting_relation_okay_effect One of several effects for what your visitor does to your courtier behind closed doors. This one is neutral. -# diplomacy_foreign_special_1010_court_visit_interesting_relation_befriend_effect One of several effects for what your visitor does to your courtier behind closed doors. This one they become friends. -# diplomacy_foreign_special_1010_court_visit_interesting_relation_manipulate_effect One of several effects for what your visitor does to your courtier behind closed doors. This one they turn them against you. -# diplomacy_foreign_special_1010_court_visit_interesting_relation_seduce_effect One of several effects for what your visitor does to your courtier behind closed doors. This one they seduce them. -# diplomacy_foreign_special_1010_court_visit_join_seduction_successfully_effect If your visitor tried to seduce your courtier, and you're spying on them, you have the chance of joining in! -# diplomacy_foreign_special_1010_court_visit_interesting_relation_outcome_effect Finalized the closed door relationship effect. - - -diplomacy_majesty_0004_outcome_effect = { - random_list = { - 1 = { - desc = diplomacy_majesty.0004.success.tt - show_chance = no - - show_as_tooltip = { - add_diplomacy_lifestyle_xp = medium_lifestyle_xp - reverse_add_opinion = { - target = scope:compliment_receiver - modifier = kindness_opinion - opinion = 25 - } - } - } - 1 = { - desc = diplomacy_majesty.0004.neutral.tt - show_chance = no - show_as_tooltip = { - add_diplomacy_lifestyle_xp = minor_lifestyle_xp - } - } - 1 = { - desc = diplomacy_majesty.0004.failure.tt - show_chance = no - - show_as_tooltip = { - reverse_add_opinion = { - target = scope:compliment_receiver - modifier = cruelty_opinion - opinion = -25 - } - } - } - } - - hidden_effect = { - if = { - limit = { - exists = scope:compliment_outcome - scope:compliment_outcome = flag:good - } - trigger_event = { id = diplomacy_majesty.0005 days = 7 } - } - - else_if = { - limit = { - exists = scope:compliment_outcome - scope:compliment_outcome = flag:neutral - } - send_interface_toast = { - left_icon = scope:compliment_receiver - title = diplomacy_majesty.0004.neutral_outcome.desc - - add_diplomacy_lifestyle_xp = minor_lifestyle_xp - } - } - - else_if = { - limit = { - exists = scope:compliment_outcome - scope:compliment_outcome = flag:bad - } - trigger_event = { id = diplomacy_majesty.0006 days = 7 } - } - } -} - - - -# Court Visit Effects - -diplomacy_foreign_special_1010_court_visit_outcome_preview_effect = { - show_as_tooltip = { - $CHARACTER$ = { - random_list = { - 1 = { - show_chance = no - desc = diplomacy_foreign_special.1017.great - - root = { - reverse_add_opinion = { - target = $CHARACTER$ - modifier = friendliness_opinion - opinion = 30 - } - if = { - limit = { $CHARACTER$ = scope:target_list_member_a } - custom_tooltip = diplomacy_foreign_special.1017.friends_a - } - else_if = { - limit = { $CHARACTER$ = scope:target_list_member_b } - custom_tooltip = diplomacy_foreign_special.1017.friends_b - } - else = { - custom_tooltip = diplomacy_foreign_special.1017.friends_c - } - add_diplomacy_lifestyle_perk_points = 1 - } - } - 1 = { - show_chance = no - desc = diplomacy_foreign_special.1017.good - - root = { - diplomacy_foreign_special_1010_court_visit_outcome_good_effect = { CHARACTER = $CHARACTER$ } - } - } - 1 = { - show_chance = no - desc = diplomacy_foreign_special.1017.bad - - root = { - diplomacy_foreign_special_1010_court_visit_outcome_bad_effect = { CHARACTER = $CHARACTER$ } - } - } - } - } - } - -} - -diplomacy_foreign_special_1010_court_visit_outcome_great_effect = { - reverse_add_opinion = { - target = $CHARACTER$ - modifier = friendliness_opinion - opinion = 30 - } - hidden_effect = { - add_opinion = { - target = $CHARACTER$ - modifier = friendliness_opinion - opinion = 30 - } - } - progress_towards_friend_effect = { - CHARACTER = $CHARACTER$ - OPINION = 0 - REASON = friend_court_visit - } - add_diplomacy_lifestyle_perk_points = 1 -} - -diplomacy_foreign_special_1010_court_visit_outcome_good_effect = { - reverse_add_opinion = { - target = $CHARACTER$ - modifier = respect_opinion - opinion = 15 - } - hidden_effect = { - add_opinion = { - target = $CHARACTER$ - modifier = friendliness_opinion - opinion = 15 - } - } - add_diplomacy_lifestyle_perk_points = 1 -} - -diplomacy_foreign_special_1010_court_visit_outcome_bad_effect = { - reverse_add_opinion = { - target = $CHARACTER$ - modifier = disappointed_opinion - opinion = -15 - } -} - - -diplomacy_foreign_special_1010_clean_up_court_visit_effect = { - remove_variable = court_visit_points - remove_variable = no_of_court_visit_events - remove_character_flag = is_in_diplomacy_foreign_special_event - remove_character_flag = court_visit_hunt_or_dance - remove_character_flag = court_visit_dance_or_holy_place - remove_character_flag = private_dinner - remove_character_flag = compliment - remove_character_flag = in_success_event - remove_character_flag = in_failure_event -} - -diplomacy_foreign_special_1010_court_visit_interesting_relation_okay_effect = { - scope:foreign_guest = { - add_opinion = { - target = scope:interesting_relation - modifier = friendliness_opinion - opinion = 15 - } - reverse_add_opinion = { - target = scope:interesting_relation - modifier = friendliness_opinion - opinion = 15 - } - } -} - -diplomacy_foreign_special_1010_court_visit_interesting_relation_befriend_effect = { - scope:interesting_relation = { - set_relation_friend = { reason = friend_court_visit target = scope:foreign_guest } - } - scope:foreign_guest = { - hidden_effect = { - add_opinion = { - target = scope:interesting_relation - modifier = friendliness_opinion - opinion = 30 - } - reverse_add_opinion = { - target = scope:interesting_relation - modifier = friendliness_opinion - opinion = 30 - } - } - } -} - -diplomacy_foreign_special_1010_court_visit_interesting_relation_manipulate_effect = { - scope:foreign_guest = { - if = { - limit = { - can_add_hook = { - target = scope:interesting_relation - type = manipulation_hook - } - } - add_hook = { - target = scope:interesting_relation - type = manipulation_hook - } - } - } - scope:interesting_relation = { - add_opinion = { - target = scope:foreign_guest - modifier = trust_opinion - opinion = 30 - } - add_opinion = { - target = scope:host_ruler - modifier = suspicion_opinion - opinion = -20 - } - hidden_effect = { if = { limit = { NOT = { has_relation_potential_rival = scope:host_ruler } } set_relation_potential_rival = scope:host_ruler } } - } -} - -diplomacy_foreign_special_1010_court_visit_interesting_relation_seduce_effect = { - scope:foreign_guest = { - set_relation_lover = { reason = lover_court_visit_seduction target = scope:interesting_relation involved_character = root } - - hidden_effect = { - intercourse_with_character_effect = { INTERCOURSE_CHARACTER = scope:interesting_relation } - add_opinion = { - target = scope:interesting_relation - modifier = romance_opinion - opinion = 30 - } - reverse_add_opinion = { - target = scope:interesting_relation - modifier = romance_opinion - opinion = 30 - } - } - } -} - -diplomacy_foreign_special_1010_court_visit_join_seduction_successfully_effect = { - $CHARACTER$ = { - if = { - limit = { - matching_gender_and_sexuality_trigger = { - CHARACTER_1 = $CHARACTER$ - CHARACTER_2 = root - } - NOR = { - has_relation_lover = root - is_consort_of = root - } - } - set_relation_lover = { reason = lover_court_visit_seduction target = root } - } - add_opinion = { - target = root - modifier = pleased_opinion - opinion = 30 - } - hidden_effect = { - reverse_add_opinion = { - target = $CHARACTER$ - modifier = pleased_opinion - opinion = 30 - } - } - } -} - -diplomacy_foreign_special_1010_court_visit_interesting_relation_outcome_effect = { - if = { - limit = { scope:private_dinner_outcome = flag:okay } - diplomacy_foreign_special_1010_court_visit_interesting_relation_okay_effect = yes - } - else_if = { - limit = { scope:private_dinner_outcome = flag:befriend } - diplomacy_foreign_special_1010_court_visit_interesting_relation_befriend_effect = yes - } - else_if = { - limit = { scope:private_dinner_outcome = flag:manipulate } - diplomacy_foreign_special_1010_court_visit_interesting_relation_manipulate_effect = yes - } - else_if = { - limit = { scope:private_dinner_outcome = flag:seduce } - diplomacy_foreign_special_1010_court_visit_interesting_relation_seduce_effect = yes - } -} - -diplomacy_foreign_1150_successful_county_switch_effect = { - # Give your county/vassal to the neighbor - if = { - limit = { - scope:county.holder = scope:neighbor - } - create_title_and_vassal_change = { - type = returned - save_scope_as = change - add_claim_on_loss = no - } - scope:county = { - change_title_holder = { - holder = scope:ruler - change = scope:change - } - } - resolve_title_and_vassal_change = scope:change - } - else_if = { - limit = { - scope:ruler_vassal = { - highest_held_title_tier = tier_county - } - } - create_title_and_vassal_change = { - type = returned - save_scope_as = change - add_claim_on_loss = no - } - scope:ruler_vassal = { - change_liege = { - liege = scope:ruler - change = scope:change - } - } - resolve_title_and_vassal_change = scope:change - } - else = { - create_title_and_vassal_change = { - type = returned - save_scope_as = change - add_claim_on_loss = no - } - scope:county = { - change_title_holder = { - holder = scope:ruler - change = scope:change - } - } - } - # The neighbor gives his county/vassal to you. - if = { - limit = { - scope:neighbor_county.holder = scope:ruler - } - create_title_and_vassal_change = { - type = returned - save_scope_as = change - add_claim_on_loss = no - } - scope:neighbor_county = { - change_title_holder = { - holder = scope:neighbor - change = scope:change - } - } - resolve_title_and_vassal_change = scope:change - } - else = { - create_title_and_vassal_change = { - type = returned - save_scope_as = change - add_claim_on_loss = no - } - scope:neighbor_vassal = { - change_liege = { - liege = scope:neighbor - change = scope:change - } - } - resolve_title_and_vassal_change = scope:change - } - # Add xp - scope:ruler = { add_diplomacy_lifestyle_xp = major_lifestyle_experience } - # Add positive opinion - scope:neighbor = { - add_opinion = { - modifier = respect_opinion - target = scope:ruler - opinion = low_positive_opinion - } - } -} - -diplomacy_foreign_1150_failed_county_switch_effect = { - # Add xp - scope:ruler = { add_diplomacy_lifestyle_xp = miniscule_lifestyle_experience } - # Add negative opinion (both neighbor and possible vassal) - scope:neighbor = { - add_opinion = { - modifier = respect_opinion - target = scope:ruler - opinion = low_negative_opinion - } - } - if = { - limit = { - exists = scope:neighbor_vassal - } - scope:neighbor_vassal = { - add_opinion = { - modifier = respect_opinion - target = scope:ruler - opinion = medium_negative_opinion - } - } - } - # Reduce control in your county (...sell-out) - scope:neighbor_county = { - change_county_control = major_county_control_loss - } -} diff --git a/N3OW/common/scripted_effects/00_diplomacy_perk_effects.txt b/N3OW/common/scripted_effects/00_diplomacy_perk_effects.txt deleted file mode 100644 index 31308af5..00000000 --- a/N3OW/common/scripted_effects/00_diplomacy_perk_effects.txt +++ /dev/null @@ -1,980 +0,0 @@ - -### Effects for handling Diplomacy Lifestyle Perks - -# sound_foundations_skill_gain_effect: Randomly gain a skill point because of your child -# sound_foundations_random_removal_effect: Removes a random one of the modifiers added by Sound Foundations - -sound_foundations_skill_gain_effect = { - if = { - limit = { - NOT = { has_variable = current_sound_foundations_value } - } - set_variable = { - name = current_sound_foundations_value # Number of applied modifiers - value = 0 - } - } - every_child = { - add_to_temporary_list = current_amount_of_children - } - - if = { - limit = { - exists = var:current_sound_foundations_value - save_temporary_scope_as = affected_parent - var:current_sound_foundations_value < sound_foundations_max - any_in_list = { - list = current_amount_of_children - count > scope:affected_parent.var:current_sound_foundations_value - } - } - if = { - limit = { government_has_flag = government_is_mandala } - random_list = { - 1 = { - add_character_modifier = { - modifier = mandala_sound_foundations_martial_gain - } - } - 1 = { - add_character_modifier = { - modifier = mandala_sound_foundations_diplomacy_gain - } - } - 1 = { - add_character_modifier = { - modifier = mandala_sound_foundations_intrigue_gain - } - } - 1 = { - add_character_modifier = { - modifier = mandala_sound_foundations_stewardship_gain - } - } - 1 = { - add_character_modifier = { - modifier = mandala_sound_foundations_learning_gain - } - } - } - change_variable = { - name = current_sound_foundations_value - add = 1 - } - } - else = { - random_list = { - 1 = { - add_character_modifier = { - modifier = sound_foundations_martial_gain - } - } - 1 = { - add_character_modifier = { - modifier = sound_foundations_diplomacy_gain - } - } - 1 = { - add_character_modifier = { - modifier = sound_foundations_intrigue_gain - } - } - 1 = { - add_character_modifier = { - modifier = sound_foundations_stewardship_gain - } - } - 1 = { - add_character_modifier = { - modifier = sound_foundations_learning_gain - } - } - } - change_variable = { - name = current_sound_foundations_value - add = 1 - } - } - - } -} - -sound_foundations_random_removal_effect = { - if = { - limit = { - has_perk = sound_foundations_perk - } - every_child = { - add_to_temporary_list = current_amount_of_children - } - - if = { - limit = { - exists = var:current_sound_foundations_value - save_temporary_scope_as = affected_parent - var:current_sound_foundations_value <= sound_foundations_max - var:current_sound_foundations_value > 0 - any_in_list = { - list = current_amount_of_children - count > scope:affected_parent.var:current_sound_foundations_value - NOT = { has_character_flag = about_to_die_but_not_dead_yet_flag } # Applied from on action death; called before imminent death - } - } - - random_list = { - 1 = { - trigger = { - has_character_modifier = sound_foundations_martial_gain - } - remove_character_modifier = sound_foundations_martial_gain - } - 1 = { - trigger = { - has_character_modifier = sound_foundations_diplomacy_gain - } - remove_character_modifier = sound_foundations_diplomacy_gain - } - 1 = { - trigger = { - has_character_modifier = sound_foundations_intrigue_gain - } - remove_character_modifier = sound_foundations_intrigue_gain - } - 1 = { - trigger = { - has_character_modifier = sound_foundations_stewardship_gain - } - remove_character_modifier = sound_foundations_stewardship_gain - } - 1 = { - trigger = { - has_character_modifier = sound_foundations_learning_gain - } - remove_character_modifier = sound_foundations_learning_gain - } - } - - change_variable = { - name = current_sound_foundations_value - subtract = 1 - } - } - } -} - - - -groomed_to_rule_random_skills_effect = { - save_scope_as = child - if = { - limit = { - trigger_if = { - limit = { age <= childhood_education_start_age } - has_trait = rowdy # Default trait for martial ed - } - trigger_else_if = { - limit = { age < adulthood_start_age } - has_focus = education_martial - } - trigger_else = { - has_trait = education_martial - } - } - save_temporary_scope_value_as = { - name = skill_to_increase - value = flag:martial - } - } - else_if = { - limit = { - trigger_if = { - limit = { age <= childhood_education_start_age } - has_trait = charming # Default trait for intrigue ed - } - trigger_else_if = { - limit = { age < adulthood_start_age } - has_focus = education_intrigue - } - trigger_else = { - has_trait = education_intrigue - } - } - save_temporary_scope_value_as = { - name = skill_to_increase - value = flag:intrigue - } - } - else_if = { - limit = { - trigger_if = { - limit = { age <= childhood_education_start_age } - has_trait = curious # Default trait for diplomacy ed - } - trigger_else_if = { - limit = { age < adulthood_start_age } - has_focus = education_diplomacy - } - trigger_else = { - has_trait = education_diplomacy - } - } - save_temporary_scope_value_as = { - name = skill_to_increase - value = flag:diplomacy - } - } - else_if = { - limit = { - trigger_if = { - limit = { age <= childhood_education_start_age } - has_trait = bossy # Default trait for stewardship ed - } - trigger_else_if = { - limit = { age < adulthood_start_age } - has_focus = education_stewardship - } - trigger_else = { - has_trait = education_stewardship - } - } - save_temporary_scope_value_as = { - name = skill_to_increase - value = flag:stewardship - } - } - else_if = { - limit = { - trigger_if = { - limit = { age <= childhood_education_start_age } - has_trait = pensive # Default trait for learning ed - } - trigger_else_if = { - limit = { age < adulthood_start_age } - has_focus = education_learning - } - trigger_else = { - has_trait = education_learning - } - } - save_temporary_scope_value_as = { - name = skill_to_increase - value = flag:learning - } - } - else = { # Fallback in case something goes wrong - random_list = { - 1 = { - save_temporary_scope_value_as = { - name = skill_to_increase - value = flag:martial - } - } - 1 = { - save_temporary_scope_value_as = { - name = skill_to_increase - value = flag:diplomacy - } - } - 1 = { - save_temporary_scope_value_as = { - name = skill_to_increase - value = flag:intrigue - } - } - 1 = { - save_temporary_scope_value_as = { - name = skill_to_increase - value = flag:stewardship - } - } - 1 = { - save_temporary_scope_value_as = { - name = skill_to_increase - value = flag:learning - } - } - } - } - if = { - limit = { - scope:skill_to_increase = flag:martial - } - random_list = { - 1 = { - send_interface_message = { - type = event_martial_good - title = groomed_to_rule_msg_title - left_icon = scope:parent - - add_martial_skill = 1 - } - scope:parent = { - send_interface_message = { - type = event_martial_good - title = groomed_to_rule_msg_title - left_icon = scope:child - - show_as_tooltip = { - scope:child = { - add_martial_skill = 1 - } - } - } - } - } - 1 = { - send_interface_message = { - type = event_martial_good - title = groomed_to_rule_msg_title - left_icon = scope:parent - - add_martial_skill = 2 - } - scope:parent = { - send_interface_message = { - type = event_martial_good - title = groomed_to_rule_msg_title - left_icon = scope:child - - show_as_tooltip = { - scope:child = { - add_martial_skill = 2 - } - } - } - } - } - 1 = { - send_interface_message = { - type = event_martial_good - title = groomed_to_rule_msg_title - left_icon = scope:parent - - add_martial_skill = 3 - } - scope:parent = { - send_interface_message = { - type = event_martial_good - title = groomed_to_rule_msg_title - left_icon = scope:child - - show_as_tooltip = { - scope:child = { - add_martial_skill = 3 - } - } - } - } - } - } - } - else_if = { - limit = { - scope:skill_to_increase = flag:intrigue - } - random_list = { - 1 = { - send_interface_message = { - type = event_intrigue_good - title = groomed_to_rule_msg_title - left_icon = scope:parent - - add_intrigue_skill = 1 - } - scope:parent = { - send_interface_message = { - type = event_intrigue_good - title = groomed_to_rule_msg_title - left_icon = scope:child - - show_as_tooltip = { - scope:child = { - add_intrigue_skill = 1 - } - } - } - } - } - 1 = { - send_interface_message = { - type = event_intrigue_good - title = groomed_to_rule_msg_title - left_icon = scope:parent - - add_intrigue_skill = 2 - } - scope:parent = { - send_interface_message = { - type = event_intrigue_good - title = groomed_to_rule_msg_title - left_icon = scope:child - - show_as_tooltip = { - scope:child = { - add_intrigue_skill = 2 - } - } - } - } - } - 1 = { - send_interface_message = { - type = event_intrigue_good - title = groomed_to_rule_msg_title - left_icon = scope:parent - - add_intrigue_skill = 3 - } - scope:parent = { - send_interface_message = { - type = event_intrigue_good - title = groomed_to_rule_msg_title - left_icon = scope:child - - show_as_tooltip = { - scope:child = { - add_intrigue_skill = 3 - } - } - } - } - } - } - } - else_if = { - limit = { - scope:skill_to_increase = flag:diplomacy - } - random_list = { - 1 = { - send_interface_message = { - type = event_diplomacy_good - title = groomed_to_rule_msg_title - left_icon = scope:parent - - add_diplomacy_skill = 1 - } - scope:parent = { - send_interface_message = { - type = event_diplomacy_good - title = groomed_to_rule_msg_title - left_icon = scope:child - - show_as_tooltip = { - scope:child = { - add_diplomacy_skill = 1 - } - } - } - } - } - 1 = { - send_interface_message = { - type = event_diplomacy_good - title = groomed_to_rule_msg_title - left_icon = scope:parent - - add_diplomacy_skill = 2 - } - scope:parent = { - send_interface_message = { - type = event_diplomacy_good - title = groomed_to_rule_msg_title - left_icon = scope:child - - show_as_tooltip = { - scope:child = { - add_diplomacy_skill = 2 - } - } - } - } - } - 1 = { - send_interface_message = { - type = event_diplomacy_good - title = groomed_to_rule_msg_title - left_icon = scope:parent - - add_diplomacy_skill = 3 - } - scope:parent = { - send_interface_message = { - type = event_diplomacy_good - title = groomed_to_rule_msg_title - left_icon = scope:child - - show_as_tooltip = { - scope:child = { - add_diplomacy_skill = 3 - } - } - } - } - } - } - } - else_if = { - limit = { - scope:skill_to_increase = flag:stewardship - } - random_list = { - 1 = { - send_interface_message = { - type = event_stewardship_good - title = groomed_to_rule_msg_title - left_icon = scope:parent - - add_stewardship_skill = 1 - } - scope:parent = { - send_interface_message = { - type = event_stewardship_good - title = groomed_to_rule_msg_title - left_icon = scope:child - - show_as_tooltip = { - scope:child = { - add_stewardship_skill = 1 - } - } - } - } - } - 1 = { - send_interface_message = { - type = event_stewardship_good - title = groomed_to_rule_msg_title - left_icon = scope:parent - - add_stewardship_skill = 2 - } - scope:parent = { - send_interface_message = { - type = event_stewardship_good - title = groomed_to_rule_msg_title - left_icon = scope:child - - show_as_tooltip = { - scope:child = { - add_stewardship_skill = 2 - } - } - } - } - } - 1 = { - send_interface_message = { - type = event_stewardship_good - title = groomed_to_rule_msg_title - left_icon = scope:parent - - add_stewardship_skill = 3 - } - scope:parent = { - send_interface_message = { - type = event_stewardship_good - title = groomed_to_rule_msg_title - left_icon = scope:child - - show_as_tooltip = { - scope:child = { - add_stewardship_skill = 3 - } - } - } - } - } - } - } - else_if = { - limit = { - scope:skill_to_increase = flag:learning - } - random_list = { - 1 = { - send_interface_message = { - type = event_learning_good - title = groomed_to_rule_msg_title - left_icon = scope:parent - - add_learning_skill = 1 - } - scope:parent = { - send_interface_message = { - type = event_learning_good - title = groomed_to_rule_msg_title - left_icon = scope:child - - show_as_tooltip = { - scope:child = { - add_learning_skill = 1 - } - } - } - } - } - 1 = { - send_interface_message = { - type = event_learning_good - title = groomed_to_rule_msg_title - left_icon = scope:parent - - add_learning_skill = 2 - } - scope:parent = { - send_interface_message = { - type = event_learning_good - title = groomed_to_rule_msg_title - left_icon = scope:child - - show_as_tooltip = { - scope:child = { - add_learning_skill = 2 - } - } - } - } - } - 1 = { - send_interface_message = { - type = event_learning_good - title = groomed_to_rule_msg_title - left_icon = scope:parent - - add_learning_skill = 3 - } - scope:parent = { - send_interface_message = { - type = event_learning_good - title = groomed_to_rule_msg_title - left_icon = scope:child - - show_as_tooltip = { - scope:child = { - add_learning_skill = 3 - } - } - } - } - } - } - } -} - -childhood_groomed_to_rule_skill_gain_effect = { - every_parent = { - limit = { - is_alive = yes - has_perk = groomed_to_rule_perk - } - save_scope_as = parent - root = { - groomed_to_rule_random_skills_effect = yes - } - } -} - - -save_commission_epic_loc_variables = { - story_owner = { - set_variable = { - name = composition_type - value = scope:story.var:composition_type - } - set_variable = { - name = composition_detail - value = scope:story.var:composition_detail - } - if = { - limit = { - exists = scope:story.var:composer - } - set_variable = { - name = composer_exists - value = yes - } - scope:story.var:composer = { - save_scope_as = composer - } - } - } -} - -clear_commission_epic_loc_variables = { - remove_variable = composition_type - remove_variable = composition_detail - remove_variable = composer_exists -} - -update_embassies_effect = { - if = { - limit = { - has_perk = embassies_perk - is_landless_adventurer = no - } - remove_all_character_modifier_instances = embassies_perk_modifier - - set_variable = { - name = current_embassies_perk_value - value = 0 - } - set_variable = { - name = previous_current_embassies_perk_value - value = 0 - } - - if = { - limit = { - exists = var:previous_current_embassies_perk_value - exists = var:current_embassies_perk_value - } - - every_ally = { - prev = { - change_variable = { - name = previous_current_embassies_perk_value - add = 1 - } - if = { - limit = { - exists = var:current_embassies_perk_value - var:current_embassies_perk_value < embassies_max - } - change_variable = { - name = current_embassies_perk_value - add = 1 - } - add_character_modifier = { - modifier = embassies_perk_modifier - } - } - } - } - - # For players that were over the cap before the change so that they don't feel like they've "lost progress" - save_temporary_scope_as = variable_check - if = { - limit = { - var:current_embassies_perk_value < scope:variable_check.var:previous_current_embassies_perk_value - } - set_variable = { - name = current_embassies_perk_value - value = var:previous_current_embassies_perk_value - } - } - } - } -} - -try_remove_perk_alliance_opinion_effect = { - if = { - limit = { - has_opinion_modifier = { - modifier = perk_negotiated_alliance_opinion - target = $TARGET$ - } - } - remove_opinion = { - modifier = perk_negotiated_alliance_opinion - target = $TARGET$ - } - } -} - -# friendly_counsel_skill_gain_effect: Randomly gain a skill point because of your friend -# friendly_counsel_random_removal_effect: Removes a random one of the modifiers added by Friendly Counsel -friendly_counsel_skill_gain_effect = { - if = { - limit = { - has_perk = friendly_counsel_perk - } - if = { - limit = { - NOT = { has_variable = current_friendly_counsel_perk_value } - } - set_variable = { - name = current_friendly_counsel_perk_value - value = 0 - } - } - - every_relation = { - type = friend - add_to_temporary_list = friendly_counsel_friends - } - every_relation = { - type = best_friend - add_to_temporary_list = friendly_counsel_friends - } - every_relation = { - type = blood_brother - add_to_temporary_list = friendly_counsel_friends - } - - if = { - limit = { - exists = var:current_friendly_counsel_perk_value - save_temporary_scope_as = affected_friend - OR = { - var:current_friendly_counsel_perk_value < friendly_counsel_max - AND = { # If you have a Blood Brother you get one extra skill - government_has_flag = government_is_nomadic - var:current_friendly_counsel_perk_value < 6 - any_in_list = { - list = friendly_counsel_friends - has_relation_blood_brother = root - } - } - } - any_in_list = { - list = friendly_counsel_friends - count > scope:affected_friend.var:current_friendly_counsel_perk_value - } - } - random_list = { - 1 = { - add_character_modifier = { - modifier = friendly_counsel_martial_gain - } - } - 1 = { - add_character_modifier = { - modifier = friendly_counsel_diplomacy_gain - } - } - 1 = { - add_character_modifier = { - modifier = friendly_counsel_intrigue_gain - } - } - 1 = { - add_character_modifier = { - modifier = friendly_counsel_stewardship_gain - } - } - 1 = { - add_character_modifier = { - modifier = friendly_counsel_learning_gain - } - } - } - change_variable = { - name = current_friendly_counsel_perk_value - add = 1 - } - } - } -} - -friendly_counsel_random_removal_effect = { - if = { - limit = { - has_perk = friendly_counsel_perk - } - - every_relation = { - type = friend - add_to_temporary_list = friendly_counsel_friends - } - every_relation = { - type = best_friend - add_to_temporary_list = friendly_counsel_friends - } - - if = { - limit = { - exists = var:current_friendly_counsel_perk_value - save_temporary_scope_as = affected_friend - var:current_friendly_counsel_perk_value <= friendly_counsel_max - var:current_friendly_counsel_perk_value > 0 - any_in_list = { - list = friendly_counsel_friends - count > scope:affected_friend.var:current_friendly_counsel_perk_value - NOT = { has_character_flag = about_to_die_but_not_dead_yet_flag } - } - } - random_list = { - 1 = { - trigger = { - has_character_modifier = friendly_counsel_martial_gain - } - remove_character_modifier = friendly_counsel_martial_gain - } - 1 = { - trigger = { - has_character_modifier = friendly_counsel_diplomacy_gain - } - remove_character_modifier = friendly_counsel_diplomacy_gain - } - 1 = { - trigger = { - has_character_modifier = friendly_counsel_intrigue_gain - } - remove_character_modifier = friendly_counsel_intrigue_gain - } - 1 = { - trigger = { - has_character_modifier = friendly_counsel_stewardship_gain - } - remove_character_modifier = friendly_counsel_stewardship_gain - } - 1 = { - trigger = { - has_character_modifier = friendly_counsel_learning_gain - } - remove_character_modifier = friendly_counsel_learning_gain - } - } - - change_variable = { - name = current_friendly_counsel_perk_value - subtract = 1 - } - } - } -} - -update_confidants_effect = { - if = { - limit = { - has_perk = confidants_perk - } - remove_all_character_modifier_instances = confidants_perk_modifier - save_temporary_scope_as = confidant_scope - - set_variable = { - name = current_confidants_perk_value - value = 0 - } - - if = { - limit = { - exists = var:current_confidants_perk_value - } - every_relation = { - type = friend - add_to_temporary_list = confidant_friend_list - } - every_in_list = { - list = confidant_friend_list - scope:confidant_scope = { - if = { - limit = { - exists = var:current_confidants_perk_value - var:current_confidants_perk_value < confidants_max - } - change_variable = { - name = current_confidants_perk_value - add = 1 - } - add_character_modifier = { - modifier = confidants_perk_modifier - } - } - } - } - remove_variable = current_confidants_perk_value - } - } -} diff --git a/N3OW/common/scripted_effects/00_dummy_gender_effects.txt b/N3OW/common/scripted_effects/00_dummy_gender_effects.txt deleted file mode 100644 index b23e92f9..00000000 --- a/N3OW/common/scripted_effects/00_dummy_gender_effects.txt +++ /dev/null @@ -1,472 +0,0 @@ -#Effects used in Lifestyle Focus events - - -##################################################################### -# EFFECT LIST -##################################################################### -# random_dummy_gender_effect - saves event target dummy_gender as female or female (50/50 chance) -# random_dummy_gender_soldier_effect - saves a random soldier gender as event target dummy_gender -# dummy_opposite_gender_effect - saves the dummy character of the opposite sex compared to TARGET - -random_dummy_gender_effect = { - hidden_effect = { - random_list = { - 1 = { dummy_female = { save_scope_as = dummy_gender } } - 1 = { dummy_male = { save_scope_as = dummy_gender } } - } - } -} - -romance_target_gender_effect = { - hidden_effect = { - if = { - limit = { NOT = { has_sexuality = asexual } } - random_list = { - 50 = { - trigger = { is_attracted_to_women = yes } - dummy_female = { save_scope_as = $SCOPE_NAME$ } - } - 50 = { - trigger = { is_attracted_to_men = yes } - dummy_male = { save_scope_as = $SCOPE_NAME$ } - } - } - } - else = { - #If this effect is used for content not blocked for asexual characters, we assume this effect is used to find out what gender society expects us to prefer. - save_temporary_scope_as = asexual_char - - #If homosexuality seems to be accepted, there is a change of same gender attraction target - if = { - limit = { - NOR = { - trait_is_shunned_or_criminal_in_faith_trigger = { - FAITH = scope:asexual_char.faith - TRAIT = sodomite - GENDER_CHARACTER = dummy_female - } - trait_is_shunned_or_criminal_in_faith_trigger = { - FAITH = scope:asexual_char.faith - TRAIT = sodomite - GENDER_CHARACTER = dummy_male - } - } - } - random_list = { - 10 = { - modifier = { - is_female = yes - add = 80 - } - dummy_male = { save_scope_as = $SCOPE_NAME$ } - } - 10 = { - modifier = { - is_male = yes - add = 80 - } - dummy_female = { save_scope_as = $SCOPE_NAME$ } - } - } - } - #If homosexuality isn't accepted, we 100% go with opposite sex - else = { - if = { - limit = { is_female = yes } - dummy_male = { save_scope_as = $SCOPE_NAME$ } - } - else = { - dummy_female = { save_scope_as = $SCOPE_NAME$ } - } - } - } - } -} - -random_dummy_gender_soldier_effect = { - save_temporary_scope_as = root_character - hidden_effect = { - random_list = { - 1 = { - trigger = { - dummy_female = { - can_be_combatant_based_on_gender_trigger = { - ARMY_OWNER = scope:root_character - } - } - } - dummy_female = { save_scope_as = $SCOPE_NAME$ } - } - 1 = { - trigger = { - dummy_male = { - can_be_combatant_based_on_gender_trigger = { - ARMY_OWNER = scope:root_character - } - } - } - dummy_male = { save_scope_as = $SCOPE_NAME$ } - } - } - } -} - -random_dummy_gender_non_combatant_effect = { - save_temporary_scope_as = root_character - hidden_effect = { - random_list = { - 1 = { - trigger = { - dummy_female = { - NOT = { - can_be_combatant_based_on_gender_trigger = { - ARMY_OWNER = scope:root_character - } - } - } - } - dummy_female = { save_scope_as = $SCOPE_NAME$ } - } - 1 = { - trigger = { - dummy_male = { - NOT = { - can_be_combatant_based_on_gender_trigger = { - ARMY_OWNER = scope:root_character - } - } - } - } - dummy_male = { save_scope_as = $SCOPE_NAME$ } - } - } - } -} - -random_dummy_gender_spy_effect = { - hidden_effect = { - random_list = { - 1 = { dummy_female = { save_scope_as = dummy_gender } } - 1 = { dummy_male = { save_scope_as = dummy_gender } } - } - } -} - -random_dummy_gender_musician_effect = { - hidden_effect = { - random_list = { - 1 = { dummy_female = { save_scope_as = dummy_musician_gender } } - 1 = { dummy_male = { save_scope_as = dummy_musician_gender } } - } - } -} - -random_dummy_gender_servant_effect = { - hidden_effect = { - random_list = { - 1 = { dummy_female = { save_scope_as = dummy_servant_gender } } - 1 = { dummy_male = { save_scope_as = dummy_servant_gender } } - } - } -} - -random_dummy_gender_assassin_effect = { - hidden_effect = { - random_list = { - 50 = { - modifier = { - add = 50 - exists = scope:owner - scope:owner.faith = { has_doctrine = doctrine_gender_female_dominated } - } - dummy_female = { save_scope_as = dummy_assassin_gender } - } - 50 = { - modifier = { - add = 50 - exists = scope:owner - scope:owner.faith = { has_doctrine = doctrine_gender_male_dominated } - } - dummy_male = { save_scope_as = dummy_assassin_gender } - } - } - } -} - -random_dummy_gender_scholar_effect = { - hidden_effect = { - random_list = { - 1 = { dummy_female = { save_scope_as = dummy_scholar_gender } } - 25 = { dummy_male = { save_scope_as = dummy_scholar_gender } } - } - } -} - -random_dummy_gender_mystic_effect = { - hidden_effect = { - random_list = { - 4 = { dummy_female = { save_scope_as = dummy_mystic_gender } } - 1 = { dummy_male = { save_scope_as = dummy_mystic_gender } } - } - } -} - -random_dummy_gender_physician_effect = { - hidden_effect = { - random_list = { - 1 = { dummy_female = { save_scope_as = dummy_physician_gender } } - 1 = { dummy_male = { save_scope_as = dummy_physician_gender } } - } - } -} - -random_dummy_gender_chancellor_effect = { - hidden_effect = { - random_list = { - 1 = { dummy_female = { save_scope_as = dummy_gender } } - 1 = { dummy_male = { save_scope_as = dummy_gender } } - } - } -} - - -random_dummy_gender_marshal_effect = { - hidden_effect = { - random_list = { - 1 = { dummy_female = { save_scope_as = dummy_gender } } - 1 = { dummy_male = { save_scope_as = dummy_gender } } - } - } -} - - -random_dummy_gender_steward_effect = { - hidden_effect = { - random_list = { - 1 = { dummy_female = { save_scope_as = dummy_gender } } - 1 = { dummy_male = { save_scope_as = dummy_gender } } - } - } -} - - -random_dummy_gender_spymaster_effect = { - hidden_effect = { - random_list = { - 1 = { dummy_female = { save_scope_as = dummy_gender } } - 1 = { dummy_male = { save_scope_as = dummy_gender } } - } - } -} - - -random_dummy_gender_landholder_effect = { - hidden_effect = { - random_list = { - ################################## - # Female Chance (adds up to 50%) # - ################################## - - 25 = { # Female Landowners Common (50-50) - trigger = { - OR = { - has_realm_law = equal_law - has_realm_law = female_preference_law - has_realm_law = female_only_law - - # These cultures historically granted equal property rights to women. - culture = { - OR = { - has_cultural_pillar = heritage_north_germanic - has_cultural_parameter = gender_equal_inheritance - } - } - } - } - dummy_female = { save_scope_as = dummy_gender } - } - - 15 = { # Female Landowners Uncommon (33-67) - trigger = { - OR = { - has_realm_law = male_preference_law - has_realm_law = equal_law - has_realm_law = female_preference_law - has_realm_law = female_only_law - - # These religions historically granted more property rights to women. - faith = { - religion_tag = islam_religion # Based on the Early Islamic Reforms. - religion_tag = hinduism_religion # Based on the Dharmasatras. - religion_tag = judaism_religion # Based on Mosaic Law. - } - - # These cultures historically granted more property rights to women. - has_culture = culture:english - has_culture = culture:norman - culture = { has_cultural_pillar = heritage_north_germanic } # Scandanavian women often managed households and had full property rights. - culture = { has_cultural_pillar = heritage_iberian } # Granted by the Liber Judiciorum ca 642/642. Includes Basque. - culture = { has_cultural_pillar = heritage_indo_aryan } # Based on the Dharmasatras. - - } - } - dummy_female = { save_scope_as = dummy_gender } - } - - 10 = { # Female Landowners Rare (17-83) - trigger = { - OR = { - # These cultures historically prevented women from owning/inheriting land. - NOT = { - culture = { has_cultural_pillar = heritage_goidelic } # Patriarchical society which made women subordinate to men. - culture = { has_cultural_pillar = heritage_east_slavic } # Patriarchical society which made women subordinate to men. - culture = { has_cultural_pillar = heritage_south_slavic } - culture = { has_cultural_pillar = heritage_byzantine } # Based on Roman Law - culture = { has_cultural_pillar = heritage_latin } # Based on Roman Law - } - # But if their legal system changes to allow it, women should gain full ownership/inheritance rights. - has_realm_law = equal_law - has_realm_law = female_preference_law - has_realm_law = female_only_law - } - } - dummy_female = { save_scope_as = dummy_gender } - } - - - ################################ - # Male Chance (adds up to 50%) # - ################################ - - 25 = { # Male Landowners Common (50-50) - trigger = { - OR = { - has_realm_law = equal_law - has_realm_law = male_preference_law - has_realm_law = male_only_law - } - } - dummy_male = { save_scope_as = dummy_gender } - } - - 15 = { # Male Landowners Uncommon (33-67) - trigger = { - OR = { - has_realm_law = female_preference_law - has_realm_law = equal_law - has_realm_law = male_preference_law - has_realm_law = male_only_law - } - } - dummy_male = { save_scope_as = dummy_gender } - } - - 10 = { # Male Landowners Rare (17-83) - trigger = { - - } - dummy_male = { save_scope_as = dummy_gender } - } - } - } -} - - - - -random_dummy_gender_clergy_effect = { - hidden_effect = { - random_list = { - 50 = { - trigger = { - faith = { - NOR = { - has_doctrine = doctrine_clerical_gender_male_only - AND = { - has_doctrine = doctrine_clerical_gender_either - has_doctrine = doctrine_gender_male_dominated - } - } - } - } - dummy_female = { save_scope_as = dummy_clergy_gender } - } - 50 = { - trigger = { - faith = { - NOR = { - has_doctrine = doctrine_clerical_gender_female_only - AND = { - has_doctrine = doctrine_clerical_gender_either - has_doctrine = doctrine_gender_female_dominated - } - } - } - } - dummy_male = { save_scope_as = dummy_clergy_gender } - } - } - } -} - -dummy_opposite_gender_effect = { - if = { - limit = { $TARGET$ = { is_female = yes } } - dummy_male = { save_scope_as = dummy_opposite_gender } - } - else = { - dummy_female = { save_scope_as = dummy_opposite_gender } - } -} - -dummy_attracted_gender_effect = { - if = { - limit = { - $TARGET$ = { - is_attracted_to_men = yes - is_attracted_to_women = yes - } - } - dummy_male = { save_scope_as = dummy_attracted_gender } - } - else_if = { - limit = { $TARGET$ = { is_attracted_to_men = yes } } - dummy_male = { save_scope_as = dummy_attracted_gender } - } - else = { - dummy_female = { save_scope_as = dummy_attracted_gender } - } -} - -random_dummy_gender_peasant_effect = { - hidden_effect = { - random_list = { - 50 = { - modifier = { # 3 times as likely if faith is male dominated - add = 150 - faith = { - has_doctrine_parameter = male_dominated_law - } - } - modifier = { - add = 50 - has_realm_law = male_preference_law - } - dummy_male = { save_scope_as = dummy_peasant_gender } - } - 50 = { - modifier = { # 3 times as likely if faith is female dominated - add = 150 - faith = { - has_doctrine_parameter = female_dominated_law - } - } - modifier = { - add = 50 - has_realm_law = female_preference_law - } - dummy_female = { save_scope_as = dummy_peasant_gender } - } - } - } -} \ No newline at end of file diff --git a/N3OW/common/scripted_effects/00_education_effects.txt b/N3OW/common/scripted_effects/00_education_effects.txt deleted file mode 100644 index 85c5a964..00000000 --- a/N3OW/common/scripted_effects/00_education_effects.txt +++ /dev/null @@ -1,3468 +0,0 @@ -#Scripted effects relating to education - -##################################################################### -# EFFECT LIST -##################################################################### -# !!! Remember to add all new effects with a short description here !!! - -#education_point_acquisition_effect - Rolls a random chance for assigning education points based on a number of factors. Run in a pulse event every half year of childhood. - -#education_point_acquisition_additional_points_effect - Effect to award more education points through one-offs like events etc. - -#education_complete_notification_effect - Identifies characters for the "Education Completed" notification events and sends the events. - -#save_childhood_trait_as_variable_effect - Saves childhood trait as a variable flag - -#assign_commander_trait_effect - To assign a commander trait to a child with a martial education - -#wrap_up_education_effect - Additional effects run to wrap up education - -#rank_up_education_effect - Increases your education by 1 rank unless it's at 4 (or you don't have any) - -###################################################################### -# EFFECTS -###################################################################### - - -#Education point acquisition - -education_point_acquisition_effect = { - if = { - limit = { has_focus = education_diplomacy } - education_point_acquisition_support_effect = { SKILL = diplomacy } - } - else_if = { - limit = { has_focus = education_martial } - education_point_acquisition_support_effect = { SKILL = martial } - } - else_if = { - limit = { has_focus = education_stewardship } - education_point_acquisition_support_effect = { SKILL = stewardship } - } - else_if = { - limit = { has_focus = education_intrigue } - education_point_acquisition_support_effect = { SKILL = intrigue } - } - else_if = { - limit = { has_focus = education_learning } - education_point_acquisition_support_effect = { SKILL = learning } - } -} - -#Effect to award more education points through one-offs like events etc -#Takes argument LEVEL low/mid -education_point_acquisition_additional_points_effect = { - save_temporary_scope_value_as = { - name = point_level - value = flag:$LEVEL$ - } - #Mid - if = { - limit = { scope:point_level = flag:mid } - if = { - limit = { has_focus = education_diplomacy } - #Set variables if they don't exist - if = { - limit = { - NOT = { has_variable = education_diplomacy_variable } - } - set_variable = { - name = education_diplomacy_variable - value = 0 - } - } - #Award more points - change_variable = { - name = education_diplomacy_variable - add = 6 - } - } - else_if = { - limit = { has_focus = education_martial } - #Set variables if they don't exist - if = { - limit = { - NOT = { has_variable = education_martial_variable } - } - set_variable = { - name = education_martial_variable - value = 0 - } - } - #Award more points - change_variable = { - name = education_martial_variable - add = 6 - } - } - else_if = { - limit = { has_focus = education_stewardship } - #Set variables if they don't exist - if = { - limit = { - NOT = { has_variable = education_stewardship_variable } - } - set_variable = { - name = education_stewardship_variable - value = 0 - } - } - #Award more points - change_variable = { - name = education_stewardship_variable - add = 6 - } - } - else_if = { - limit = { has_focus = education_intrigue } - #Set variables if they don't exist - if = { - limit = { - NOT = { has_variable = education_intrigue_variable } - } - set_variable = { - name = education_intrigue_variable - value = 0 - } - } - #Award more points - change_variable = { - name = education_intrigue_variable - add = 6 - } - } - else_if = { - limit = { has_focus = education_learning } - #Set variables if they don't exist - if = { - limit = { - NOT = { has_variable = education_learning_variable } - } - set_variable = { - name = education_learning_variable - value = 0 - } - } - #Award more points - change_variable = { - name = education_learning_variable - add = 6 - } - } - } - #Low - else_if = { - limit = { scope:point_level = flag:low } - if = { - limit = { has_focus = education_diplomacy } - #Set variables if they don't exist - if = { - limit = { - NOT = { has_variable = education_diplomacy_variable } - } - set_variable = { - name = education_diplomacy_variable - value = 0 - } - } - #Award more points - change_variable = { - name = education_diplomacy_variable - add = 4 - } - } - else_if = { - limit = { has_focus = education_martial } - #Set variables if they don't exist - if = { - limit = { - NOT = { has_variable = education_martial_variable } - } - set_variable = { - name = education_martial_variable - value = 0 - } - } - #Award more points - change_variable = { - name = education_martial_variable - add = 4 - } - } - else_if = { - limit = { has_focus = education_stewardship } - #Set variables if they don't exist - if = { - limit = { - NOT = { has_variable = education_stewardship_variable } - } - set_variable = { - name = education_stewardship_variable - value = 0 - } - } - #Award more points - change_variable = { - name = education_stewardship_variable - add = 4 - } - } - else_if = { - limit = { has_focus = education_intrigue } - #Set variables if they don't exist - if = { - limit = { - NOT = { has_variable = education_intrigue_variable } - } - set_variable = { - name = education_intrigue_variable - value = 0 - } - } - #Award more points - change_variable = { - name = education_intrigue_variable - add = 4 - } - } - else_if = { - limit = { has_focus = education_learning } - #Set variables if they don't exist - if = { - limit = { - NOT = { has_variable = education_learning_variable } - } - set_variable = { - name = education_learning_variable - value = 0 - } - } - #Award more points - change_variable = { - name = education_learning_variable - add = 4 - } - } - } -} - -education_point_acquisition_support_effect = { - #Save educator - if = { - limit = { - any_relation = { - type = guardian - always = yes - } - } - random_relation = { - type = guardian - save_scope_as = educator - } - } - else_if = { - limit = { - court_owner ?= { employs_court_position = court_tutor_court_position } - } - court_owner = { - random_court_position_holder = { - type = court_tutor_court_position - save_scope_as = educator - } - } - } - else_if = { - limit = { - court_owner ?= { employs_court_position = court_guru_court_position } - } - court_owner = { - random_court_position_holder = { - type = court_guru_court_position - save_scope_as = educator - } - } - } - - #Set variables if they don't exist - if = { - limit = { - NOT = { has_variable = education_$SKILL$_variable } - } - set_variable = { - name = education_$SKILL$_variable - value = 0 - } - } - - #Randomize success or failure - random_list = { - #Success - 60 = { - #Child intelligence - modifier = { - has_trait = intellect_good_3 - add = 20 - } - modifier = { - has_trait = intellect_good_2 - add = 15 - } - modifier = { - OR = { - has_trait = intellect_good_1 - has_trait = shrewd - } - add = 10 - } - #Educator intelligence & skill - modifier = { - exists = scope:educator - add = { - scope:educator = { - #Intelligence - if = { - limit = { has_trait = intellect_good_3 } - value = 15 - } - else_if = { - limit = { has_trait = intellect_good_2 } - value = 10 - } - else_if = { - limit = { - OR = { - has_trait = intellect_good_1 - has_trait = shrewd - } - } - value = 5 - } - #Specific skill - add = { - value = $SKILL$ - multiply = educator_skill_modifier_factor - } - #Learning skill - add = { - value = learning - multiply = educator_learning_skill_modifier_factor - } - #Storyteller tradition - if = { - limit = { culture = { has_cultural_parameter = better_ward_education } } - value = 10 - } - } - } - } - - #Affinity - modifier = { - has_$SKILL$_education_affinity_childhood_trait_trigger = yes - add = matching_childhood_trait_modifier_value - } - - #Disaffinity - modifier = { - has_$SKILL$_education_disaffinity_childhood_trait_trigger = yes - add = mismatching_childhood_trait_modifier_value - } - - modifier = { - scope:educator.house ?= { has_house_power_parameter = service_house_improved_educator_outcome_chance } - add = 5 - } - - change_variable = { - name = education_$SKILL$_variable - add = 2 - } - } - #Failure - 40 = { - #Child intelligence - modifier = { - OR = { - has_trait = intellect_bad_3 - has_trait = inbred - } - add = 20 - } - modifier = { - has_trait = intellect_bad_2 - add = 15 - } - modifier = { - OR = { - has_trait = intellect_bad_1 - has_trait = dull - } - add = 10 - } - - #Educator intelligence & skill - modifier = { - exists = scope:educator - add = { - value = 0 - scope:educator = { - #Intelligence - if = { - limit = { has_trait = intellect_bad_3 } - value = 15 - } - else_if = { - limit = { has_trait = intellect_bad_2 } - value = 10 - } - else_if = { - limit = { - OR = { - has_trait = intellect_bad_1 - has_trait = dull - } - } - value = 5 - } - } - } - } - modifier = { - add = 20 - NOT = { - exists = scope:educator - } - } - } - } -} - -education_point_add_general_effect = { - switch = { - trigger = has_focus - education_diplomacy = { - education_point_add_point_effect = { SKILL = diplomacy VALUE = $VALUE$ } - } - education_martial = { - education_point_add_point_effect = { SKILL = martial VALUE = $VALUE$ } - } - education_stewardship = { - education_point_add_point_effect = { SKILL = stewardship VALUE = $VALUE$ } - } - education_intrigue = { - education_point_add_point_effect = { SKILL = intrigue VALUE = $VALUE$ } - } - education_learning = { - education_point_add_point_effect = { SKILL = learning VALUE = $VALUE$ } - } - } -} - -education_point_add_point_effect = { - #Set variables if they don't exist - if = { - limit = { - NOT = { has_variable = education_$SKILL$_variable } - } - set_variable = { - name = education_$SKILL$_variable - value = 0 - } - } - # Change variable - change_variable = { - name = education_$SKILL$_variable - add = $VALUE$ - } -} - -#Effect to identify characters for the "Education Completed" notification events -education_complete_notification_effect = { - save_scope_as = educated_child - if = { - limit = { - any_relation = { type = guardian } - } - random_relation = { - type = guardian - if = { - limit = { this = { is_parent_of = root } } - save_scope_as = parent_guardian - trigger_event = coming_of_age.1001 - } - else = { - save_scope_as = guardian - if = { - limit = { - scope:educated_child = { - any_parent = { is_alive = no } - any_parent = { is_alive = yes } - } - } - random_parent = { - limit = { is_alive = yes } - save_scope_as = living_parent - } - random_parent = { - limit = { is_alive = no } - save_scope_as = dead_parent - } - trigger_event = coming_of_age.1003 #Event for non-parent guardian when one parent of the child is dead - } - else_if = { - limit = { - scope:educated_child = { - any_parent = { - is_alive = yes - count = 2 - } - } - } - scope:educated_child.father = { save_scope_as = father } - scope:educated_child.mother = { save_scope_as = mother } - trigger_event = coming_of_age.1004 #Event for non-parent guardian when both parents are alive - } - else_if = { - limit = { - OR = { - NOT = { exists = scope:educated_child.father } - NOT = { exists = scope:educated_child.mother } - } - } - if = { - limit = { - exists = scope:educated_child.father - } - scope:educated_child.father = { - save_scope_as = parent - } - } - if = { - limit = { - exists = scope:educated_child.mother - } - scope:educated_child.mother = { - save_scope_as = parent - } - } - if = { - limit = { - NOT = { exists = scope:parent } - } - trigger_event = coming_of_age.1005 - } - else = { - trigger_event = coming_of_age.1003 - } - } - else = { - scope:educated_child.father = { save_scope_as = father } - scope:educated_child.mother = { save_scope_as = mother } - trigger_event = coming_of_age.1005 #Event for non-parent guardian when both parents are dead - } - } - hidden_effect = { # Hidden to avoid duplicate effect messages - #Relationship back-up clean-up - remove_guardian_effect = { - GUARDIAN = this - WARD = scope:educated_child - RETURN_WARD = no - HIDE_OPINION = no - } - } - } - } - every_parent = { - limit = { - OR = { - NOT = { exists = scope:parent_guardian } - AND = { - exists = scope:parent_guardian - this != scope:parent_guardian - } - } - } - trigger_event = coming_of_age.1002 - } - # Inform non-parent dynasty member players they are in the court of - if = { - limit = { is_lowborn = no } - every_player = { - limit = { - scope:educated_child.dynasty ?= dynasty - NOR = { - is_parent_of = scope:educated_child - scope:parent_guardian ?= this - } - OR = { - scope:educated_child.liege ?= this - scope:educated_child.employer ?= this - scope:educated_child.court_owner ?= this - } - } - save_scope_as = relative - send_interface_message = { - type = msg_dynasty_child_of_age - title = msg_dynasty_child_of_age_title - desc = msg_dynasty_child_of_age_desc - left_icon = scope:educated_child - scope:educated_child = { display_correct_education_trait_gain_tooltip_effect = yes } - } - } - } - liege ?= { - if = { - limit = { - is_ai = no - is_employer_of = scope:educated_child - NOR = { - scope:educated_child.dynasty ?= dynasty - is_parent_of = scope:educated_child - scope:parent_guardian ?= this - } - } - save_scope_as = relative - send_interface_message = { - type = msg_courtier_child_of_age - title = msg_courtier_child_of_age_title - desc = msg_dynasty_child_of_age_desc - left_icon = scope:educated_child - scope:educated_child = { display_correct_education_trait_gain_tooltip_effect = yes } - } - } - } -} - -#To extract and save event_targets to use in coming_of_age notification event -save_event_targets_from_childhood_effect = { - if = { - limit = { - any_relation = { type = friend always = yes } - } - random_relation = { - type = friend - save_scope_as = friend - } - } - if = { - limit = { - exists = var:had_childhood_crush_variable - } - var:had_childhood_crush_variable = { - save_scope_as = crush - } - } - if = { - limit = { - exists = var:had_childhood_bully_variable - } - var:had_childhood_bully_variable = { - save_scope_as = bully - } - } - if = { - limit = { - exists = var:had_childhood_victim_variable - } - var:had_childhood_victim_variable = { - save_scope_as = victim - } - } -} - -#To assign a commander trait (based on culture, faith, etc.) to a child with a martial education -assign_commander_trait_effect = { - random_list = { - 100 = { - trigger = { NOT = { has_trait = logistician } } - add_trait = logistician - } - 100 = { - trigger = { NOT = { has_trait = military_engineer } } - add_trait = military_engineer - } - 100 = { - trigger = { NOT = { has_trait = aggressive_attacker } } - add_trait = aggressive_attacker - } - 100 = { - trigger = { NOT = { has_trait = unyielding_defender } } - add_trait = unyielding_defender - } - 100 = { - trigger = { NOT = { has_trait = forder } } - add_trait = forder - } - 100 = { - trigger = { NOT = { has_trait = flexible_leader } } - add_trait = flexible_leader - } - 100 = { - trigger = { - NOT = { has_trait = desert_warrior } - OR = { - any_directly_owned_province = { - terrain = desert - } - AND = { - exists = scope:educator - scope:educator = { - any_directly_owned_province = { - terrain = desert - } - } - } - AND = { - NOT = { exists = scope:educator } - liege ?= { - any_directly_owned_province = { - terrain = desert - } - } - } - } - } - modifier = { - culture = { - has_cultural_parameter = desert_warrior_trait_more_common - } - factor = 2 - } - add_trait = desert_warrior - } - 100 = { - trigger = { - NOT = { has_trait = jungle_stalker } - OR = { - any_directly_owned_province = { - terrain = jungle - } - AND = { - exists = scope:educator - scope:educator = { - any_directly_owned_province = { - terrain = jungle - } - } - } - AND = { - NOT = { exists = scope:educator } - liege ?= { - any_directly_owned_province = { - terrain = jungle - } - } - } - } - } - modifier = { - culture = { - has_cultural_parameter = jungle_stalker_trait_more_common - } - factor = 2 - } - add_trait = jungle_stalker - } - 100 = { - trigger = { - NOT = { has_trait = winter_soldier } - OR = { - any_directly_owned_province = { - OR = { - terrain = taiga - geographical_region = world_tibet - geographical_region = world_europe_north - geographical_region = world_europe_east - geographical_region = world_steppe - } - } - AND = { - exists = scope:educator - scope:educator = { - any_directly_owned_province = { - OR = { - terrain = taiga - geographical_region = world_tibet - geographical_region = world_europe_north - geographical_region = world_europe_east - geographical_region = world_steppe - } - } - } - } - AND = { - NOT = { exists = scope:educator } - liege ?= { - any_directly_owned_province = { - OR = { - terrain = taiga - geographical_region = world_tibet - geographical_region = world_europe_north - geographical_region = world_europe_east - geographical_region = world_steppe - } - } - } - } - } - } - modifier = { - culture = { - has_cultural_parameter = winter_soldier_trait_more_common - } - factor = 2 - } - add_trait = winter_soldier - } - 100 = { - trigger = { NOT = { has_trait = reaver } } - add_trait = reaver - } - 100 = { - trigger = { NOT = { has_trait = reckless } } - add_trait = reckless - } - 100 = { - trigger = { NOT = { has_trait = holy_warrior } } - add_trait = holy_warrior - } - 100 = { - trigger = { - culture = { - has_cultural_parameter = forest_fighter_trait_more_common - } - NOT = { has_trait = forest_fighter } - OR = { - any_directly_owned_province = { - OR = { - terrain = forest - terrain = taiga - } - } - AND = { - exists = scope:educator - scope:educator = { - any_directly_owned_province = { - OR = { - terrain = forest - terrain = taiga - } - } - } - } - AND = { - NOT = { exists = scope:educator } - liege ?= { - any_directly_owned_province = { - OR = { - terrain = forest - terrain = taiga - } - } - } - } - } - } - modifier = { - culture = { - has_cultural_parameter = forest_fighter_trait_more_common - } - factor = 2 - } - add_trait = forest_fighter - } - 100 = { - trigger = { - culture = { - has_cultural_parameter = rough_terrain_expert_trait_more_common - } - NOT = { has_trait = rough_terrain_expert } - OR = { - any_directly_owned_province = { - OR = { - terrain = mountains - terrain = hills - terrain = wetlands - } - } - AND = { - exists = scope:educator - scope:educator = { - any_directly_owned_province = { - OR = { - terrain = mountains - terrain = hills - terrain = wetlands - } - } - } - } - AND = { - NOT = { exists = scope:educator } - liege ?= { - any_directly_owned_province = { - OR = { - terrain = mountains - terrain = hills - terrain = wetlands - } - } - } - } - } - } - modifier = { - culture = { - has_cultural_parameter = rough_terrain_expert_trait_more_common - } - factor = 2 - } - add_trait = rough_terrain_expert - } - } -} - - - -custom_tooltip_learning_coming_of_age_effect = { - if = { - limit = { - has_trait = education_learning_1 - } - custom_tooltip = coming_of_age.0001.tt.1 - } - else_if = { - limit = { - has_trait = education_learning_2 - } - custom_tooltip = coming_of_age.0001.tt.2 - } - else_if = { - limit = { - has_trait = education_learning_3 - } - custom_tooltip = coming_of_age.0001.tt.3 - } - else_if = { - limit = { - has_trait = education_learning_4 - } - custom_tooltip = coming_of_age.0001.tt.4 - } - if = { - limit = { - exists = scope:crush - } - custom_tooltip = coming_of_age.0001.tt.5 - } - if = { - limit = { - exists = scope:victim - } - custom_tooltip = coming_of_age.0001.tt.7 - } - if = { - limit = { - exists = scope:bully - } - custom_tooltip = coming_of_age.0001.tt.9 - } -} - -custom_tooltip_stewardship_coming_of_age_effect = { - if = { - limit = { - has_trait = education_stewardship_1 - } - custom_tooltip = coming_of_age.0001.tt.1 - } - else_if = { - limit = { - has_trait = education_stewardship_2 - } - custom_tooltip = coming_of_age.0001.tt.2 - } - else_if = { - limit = { - has_trait = education_stewardship_3 - } - custom_tooltip = coming_of_age.0001.tt.3 - } - else_if = { - limit = { - has_trait = education_stewardship_4 - } - custom_tooltip = coming_of_age.0001.tt.4 - } - if = { - limit = { - exists = scope:crush - } - custom_tooltip = coming_of_age.0001.tt.5 - } - if = { - limit = { - exists = scope:victim - } - custom_tooltip = coming_of_age.0001.tt.7 - } - if = { - limit = { - exists = scope:bully - } - custom_tooltip = coming_of_age.0001.tt.9 - } -} - -custom_tooltip_martial_coming_of_age_effect = { - if = { - limit = { - has_trait = education_martial_1 - } - custom_tooltip = coming_of_age.0001.tt.1 - } - else_if = { - limit = { - has_trait = education_martial_2 - } - custom_tooltip = coming_of_age.0001.tt.2 - } - else_if = { - limit = { - has_trait = education_martial_3 - } - custom_tooltip = coming_of_age.0001.tt.3 - } - else_if = { - limit = { - has_trait = education_martial_4 - } - custom_tooltip = coming_of_age.0001.tt.4 - } - if = { - limit = { - exists = scope:crush - } - custom_tooltip = coming_of_age.0001.tt.5 - } - if = { - limit = { - exists = scope:victim - } - custom_tooltip = coming_of_age.0001.tt.7 - } - if = { - limit = { - exists = scope:bully - } - custom_tooltip = coming_of_age.0001.tt.9 - } -} - -custom_tooltip_intrigue_coming_of_age_effect = { - if = { - limit = { - has_trait = education_intrigue_1 - } - custom_tooltip = coming_of_age.0001.tt.1 - } - else_if = { - limit = { - has_trait = education_intrigue_2 - } - custom_tooltip = coming_of_age.0001.tt.2 - } - else_if = { - limit = { - has_trait = education_intrigue_3 - } - custom_tooltip = coming_of_age.0001.tt.3 - } - else_if = { - limit = { - has_trait = education_intrigue_4 - } - custom_tooltip = coming_of_age.0001.tt.4 - } - if = { - limit = { - exists = scope:crush - } - custom_tooltip = coming_of_age.0001.tt.5 - } - if = { - limit = { - exists = scope:victim - } - custom_tooltip = coming_of_age.0001.tt.7 - } - if = { - limit = { - exists = scope:bully - } - custom_tooltip = coming_of_age.0001.tt.9 - } -} - -custom_tooltip_diplomacy_coming_of_age_effect = { - if = { - limit = { - has_trait = education_diplomacy_1 - } - custom_tooltip = coming_of_age.0001.tt.1 - } - else_if = { - limit = { - has_trait = education_diplomacy_2 - } - custom_tooltip = coming_of_age.0001.tt.2 - } - else_if = { - limit = { - has_trait = education_diplomacy_3 - } - custom_tooltip = coming_of_age.0001.tt.3 - } - else_if = { - limit = { - has_trait = education_diplomacy_4 - } - custom_tooltip = coming_of_age.0001.tt.4 - } - if = { - limit = { - exists = scope:crush - } - custom_tooltip = coming_of_age.0001.tt.5 - } - if = { - limit = { - exists = scope:victim - } - custom_tooltip = coming_of_age.0001.tt.7 - } - if = { - limit = { - exists = scope:bully - } - custom_tooltip = coming_of_age.0001.tt.9 - } -} - - -remove_variables_and_trait_coming_of_age_effect = { - if = { - limit = { - exists = var:had_childhood_crush_variable - } - remove_variable = had_childhood_crush_variable - } - if = { - limit = { - exists = var:unrequited_crush - } - remove_variable = unrequited_crush - } - if = { - limit = { - exists = var:had_childhood_victim_variable - } - remove_variable = had_childhood_victim_variable - } - if = { - limit = { - exists = var:had_childhood_bully_variable - } - remove_variable = had_childhood_bully_variable - } - if = { - limit = { has_trait = curious } - remove_trait = curious - } - if = { - limit = { has_trait = rowdy } - remove_trait = rowdy - } - if = { - limit = { has_trait = bossy } - remove_trait = bossy - } - if = { - limit = { has_trait = charming } - remove_trait = charming - } - if = { - limit = { has_trait = pensive } - remove_trait = pensive - } - if = { - limit = { - has_character_flag = bully_destroyed_toy - } - remove_character_flag = bully_destroyed_toy - } - if = { - limit = { - has_character_flag = natural_education_progression - } - remove_character_flag = natural_education_progression - } - if = { - limit = { - has_variable = education_point_gain_variable - } - remove_variable = education_point_gain_variable - } - if = { - limit = { - has_variable = childhood_trait_type - } - remove_variable = childhood_trait_type - } - if = { - limit = { - exists = var:education_diplomacy_variable - } - remove_variable = education_diplomacy_variable - } - if = { - limit = { - exists = var:education_martial_variable - } - remove_variable = education_martial_variable - } - if = { - limit = { - exists = var:education_stewardship_variable - } - remove_variable = education_stewardship_variable - } - if = { - limit = { - exists = var:education_intrigue_variable - } - remove_variable = education_intrigue_variable - } - if = { - limit = { - exists = var:education_learning_variable - } - remove_variable = education_learning_variable - } -} - -remove_childhoood_traits_effect = { - if = { - limit = { has_trait = curious } - remove_trait = curious - } - if = { - limit = { has_trait = rowdy } - remove_trait = rowdy - } - if = { - limit = { has_trait = bossy } - remove_trait = bossy - } - if = { - limit = { has_trait = charming } - remove_trait = charming - } - if = { - limit = { has_trait = pensive } - remove_trait = pensive - } -} - -#Save childhood trait as a variable flag -save_childhood_trait_as_variable_effect = { - if = { - limit = { has_trait = rowdy } - set_variable = { - name = childhood_trait_type - value = flag:rowdy - } - } - else_if = { - limit = { has_trait = curious } - set_variable = { - name = childhood_trait_type - value = flag:curious - } - } - else_if = { - limit = { has_trait = bossy } - set_variable = { - name = childhood_trait_type - value = flag:bossy - } - } - else_if = { - limit = { has_trait = charming } - set_variable = { - name = childhood_trait_type - value = flag:charming - } - } - else_if = { - limit = { has_trait = pensive } - set_variable = { - name = childhood_trait_type - value = flag:pensive - } - } -} - - -#Display correct trait tooltip -display_correct_education_trait_gain_tooltip_effect = { - if = { - limit = { has_trait = education_diplomacy_1 } - show_as_tooltip = { - add_trait_force_tooltip = education_diplomacy_1 - } - } - if = { - limit = { has_trait = education_diplomacy_2 } - show_as_tooltip = { - add_trait_force_tooltip = education_diplomacy_2 - } - } - if = { - limit = { has_trait = education_diplomacy_3 } - show_as_tooltip = { - add_trait_force_tooltip = education_diplomacy_3 - } - } - if = { - limit = { has_trait = education_diplomacy_4 } - show_as_tooltip = { - add_trait_force_tooltip = education_diplomacy_4 - } - } - if = { - limit = { has_trait = education_diplomacy_5 } - show_as_tooltip = { - add_trait_force_tooltip = education_diplomacy_5 - } - } - if = { - limit = { has_trait = education_martial_1 } - show_as_tooltip = { - add_trait_force_tooltip = education_martial_1 - } - } - if = { - limit = { has_trait = education_martial_2 } - show_as_tooltip = { - add_trait_force_tooltip = education_martial_2 - } - } - if = { - limit = { has_trait = education_martial_3 } - show_as_tooltip = { - add_trait_force_tooltip = education_martial_3 - } - } - if = { - limit = { has_trait = education_martial_4 } - show_as_tooltip = { - add_trait_force_tooltip = education_martial_4 - } - } - if = { - limit = { has_trait = education_martial_5 } - show_as_tooltip = { - add_trait_force_tooltip = education_martial_5 - } - } - if = { - limit = { has_trait = education_stewardship_1 } - show_as_tooltip = { - add_trait_force_tooltip = education_stewardship_1 - } - } - if = { - limit = { has_trait = education_stewardship_2 } - show_as_tooltip = { - add_trait_force_tooltip = education_stewardship_2 - } - } - if = { - limit = { has_trait = education_stewardship_3 } - show_as_tooltip = { - add_trait_force_tooltip = education_stewardship_3 - } - } - if = { - limit = { has_trait = education_stewardship_4 } - show_as_tooltip = { - add_trait_force_tooltip = education_stewardship_4 - } - } - if = { - limit = { has_trait = education_stewardship_5 } - show_as_tooltip = { - add_trait_force_tooltip = education_stewardship_5 - } - } - if = { - limit = { has_trait = education_intrigue_1 } - show_as_tooltip = { - add_trait_force_tooltip = education_intrigue_1 - } - } - if = { - limit = { has_trait = education_intrigue_2 } - show_as_tooltip = { - add_trait_force_tooltip = education_intrigue_2 - } - } - if = { - limit = { has_trait = education_intrigue_3 } - show_as_tooltip = { - add_trait_force_tooltip = education_intrigue_3 - } - } - if = { - limit = { has_trait = education_intrigue_4 } - show_as_tooltip = { - add_trait_force_tooltip = education_intrigue_4 - } - } - if = { - limit = { has_trait = education_intrigue_5 } - show_as_tooltip = { - add_trait_force_tooltip = education_intrigue_5 - } - } - if = { - limit = { has_trait = education_learning_1 } - show_as_tooltip = { - add_trait_force_tooltip = education_learning_1 - } - } - if = { - limit = { has_trait = education_learning_2 } - show_as_tooltip = { - add_trait_force_tooltip = education_learning_2 - } - } - if = { - limit = { has_trait = education_learning_3 } - show_as_tooltip = { - add_trait_force_tooltip = education_learning_3 - } - } - if = { - limit = { has_trait = education_learning_4 } - show_as_tooltip = { - add_trait_force_tooltip = education_learning_4 - } - } - if = { - limit = { has_trait = education_learning_5 } - show_as_tooltip = { - add_trait_force_tooltip = education_learning_5 - } - } - if = { # Knighthood innovation - limit = { has_trait = education_martial_prowess_1 } - show_as_tooltip = { - add_trait_force_tooltip = education_martial_prowess_1 - } - } - if = { - limit = { has_trait = education_martial_prowess_2 } - show_as_tooltip = { - add_trait_force_tooltip = education_martial_prowess_2 - } - } - if = { - limit = { has_trait = education_martial_prowess_3 } - show_as_tooltip = { - add_trait_force_tooltip = education_martial_prowess_3 - } - } - if = { - limit = { has_trait = education_martial_prowess_4 } - show_as_tooltip = { - add_trait_force_tooltip = education_martial_prowess_4 - } - } - if = { # Esotericism Tenet - limit = { has_trait = lifestyle_mystic } - show_as_tooltip = { - add_trait_force_tooltip = lifestyle_mystic - } - } - if = { - limit = { - has_trait = logistician - } - show_as_tooltip = { - add_trait_force_tooltip = logistician - } - } - if = { - limit = { - has_trait = military_engineer - } - show_as_tooltip = { - add_trait_force_tooltip = military_engineer - } - } - if = { - limit = { - has_trait = aggressive_attacker - } - show_as_tooltip = { - add_trait_force_tooltip = aggressive_attacker - } - } - if = { - limit = { - has_trait = unyielding_defender - } - show_as_tooltip = { - add_trait_force_tooltip = unyielding_defender - } - } - if = { - limit = { - has_trait = forder - } - show_as_tooltip = { - add_trait_force_tooltip = forder - } - } - if = { - limit = { - has_trait = flexible_leader - } - show_as_tooltip = { - add_trait_force_tooltip = flexible_leader - } - } - if = { - limit = { - has_trait = desert_warrior - } - show_as_tooltip = { - add_trait_force_tooltip = desert_warrior - } - } - if = { - limit = { - has_trait = jungle_stalker - } - show_as_tooltip = { - add_trait_force_tooltip = jungle_stalker - } - } - if = { - limit = { - has_trait = winter_soldier - } - show_as_tooltip = { - add_trait_force_tooltip = winter_soldier - } - } - if = { - limit = { - has_trait = reaver - } - show_as_tooltip = { - add_trait_force_tooltip = reaver - } - } - if = { - limit = { - has_trait = reckless - } - show_as_tooltip = { - add_trait_force_tooltip = reckless - } - } - if = { - limit = { - has_trait = holy_warrior - } - show_as_tooltip = { - add_trait_force_tooltip = holy_warrior - } - } - if = { - limit = { - has_trait = rough_terrain_expert - } - show_as_tooltip = { - add_trait_force_tooltip = rough_terrain_expert - } - } - if = { - limit = { has_trait = organizer } - show_as_tooltip = { add_trait_force_tooltip = organizer } - } - if = { - limit = { has_trait = forest_fighter } - show_as_tooltip = { add_trait_force_tooltip = forest_fighter } - } - if = { - limit = { has_trait = cautious_leader } - show_as_tooltip = { add_trait_force_tooltip = cautious_leader } - } - if = { - limit = { has_trait = open_terrain_expert } - show_as_tooltip = { add_trait_force_tooltip = open_terrain_expert } - } - if = { - limit = { has_trait = education_republican_knowledge_1 } - show_as_tooltip = { add_trait_force_tooltip = education_republican_knowledge_1 } - } - if = { - limit = { has_trait = education_republican_knowledge_2 } - show_as_tooltip = { add_trait_force_tooltip = education_republican_knowledge_2 } - } - if = { - limit = { has_trait = education_republican_knowledge_3 } - show_as_tooltip = { add_trait_force_tooltip = education_republican_knowledge_3 } - } - if = { - limit = { has_trait = education_republican_knowledge_4 } - show_as_tooltip = { add_trait_force_tooltip = education_republican_knowledge_4 } - } -} - - -#To run every time a guardian/ward relationship is set -guardian_add_opinion_effect = { - $GUARDIAN$ = { - if = { - limit = { - NOT = { this = $WARD_LIEGE$ } - $WARD_LIEGE$ = { is_alive = yes } - is_ai = yes - } - - #For educator - if = { - limit = { - $WARD_LIEGE$ = { player_heir = $WARD$ } - liege ?= $WARD_LIEGE$ - is_ruler = yes - has_vassal_stance = parochial - } - add_opinion = { - target = $WARD_LIEGE$ - modifier = guardian_of_heir_parochial_opinion - } - } - else_if = { - limit = { $WARD_LIEGE$ = { player_heir = $WARD$ } } - add_opinion = { - target = $WARD_LIEGE$ - modifier = guardian_of_heir_opinion - } - } - else_if = { - limit = { - $WARD_LIEGE$ = { is_close_family_of = $WARD$ } - liege ?= $WARD_LIEGE$ - is_ruler = yes - has_vassal_stance = parochial - } - add_opinion = { - target = $WARD_LIEGE$ - modifier = guardian_of_relative_parochial_opinion - } - } - else_if = { - limit = { $WARD_LIEGE$ = { is_close_family_of = $WARD$ } } - add_opinion = { - target = $WARD_LIEGE$ - modifier = guardian_of_relative_opinion - } - } - - #For educator liege, if educator is courtier - if = { - limit = { - liege ?= { - is_ai = yes - is_alive = yes - } - is_ruler = no - NOT = { liege = $WARD_LIEGE$ } - } - liege = { - if = { - limit = { - $WARD_LIEGE$ = { player_heir = $WARD$ } - liege ?= $WARD_LIEGE$ - is_ruler = yes - has_vassal_stance = parochial - } - add_opinion = { - target = $WARD_LIEGE$ - modifier = guardian_of_heir_parochial_opinion - } - } - else_if = { - limit = { $WARD_LIEGE$ = { player_heir = $WARD$ } } - add_opinion = { - target = $WARD_LIEGE$ - modifier = guardian_of_heir_opinion - } - } - else_if = { - limit = { - $WARD_LIEGE$ = { is_close_family_of = $WARD$ } - liege ?= $WARD_LIEGE$ - is_ruler = yes - has_vassal_stance = parochial - } - add_opinion = { - target = $WARD_LIEGE$ - modifier = guardian_of_relative_parochial_opinion - } - } - else_if = { - limit = { $WARD_LIEGE$ = { is_close_family_of = $WARD$ } } - add_opinion = { - target = $WARD_LIEGE$ - modifier = guardian_of_relative_opinion - } - } - save_scope_as = guardian_liege - $WARD$ = { - set_variable = { - name = guardian_liege - value = scope:guardian_liege - } - } - } - } - } - } -} - -#To run every time a guardian/ward relationship is ended (should be in all decisions/event options etc. where the relation is removed, but is also run through the on_remove_relation_guardian on_action just in case) -guardian_remove_opinion_effect = { - if = { - limit = { - exists = $GUARDIAN$ - exists = $WARD$ - exists = $WARD_LIEGE$ - } - $GUARDIAN$ = { - if = { - limit = { - has_opinion_modifier = { - modifier = guardian_of_heir_opinion - target = $WARD_LIEGE$ - } - } - remove_opinion = { - modifier = guardian_of_heir_opinion - target = $WARD_LIEGE$ - } - } - else_if = { - limit = { - has_opinion_modifier = { - modifier = guardian_of_relative_opinion - target = $WARD_LIEGE$ - } - NOT = { # They're not still guardian of a relative - any_relation = { - type = ward - is_close_family_of = $WARD_LIEGE$ - } - } - } - remove_opinion = { - modifier = guardian_of_relative_opinion - target = $WARD_LIEGE$ - } - } - if = { - limit = { - has_opinion_modifier = { - modifier = guardian_of_heir_parochial_opinion - target = $WARD_LIEGE$ - } - } - remove_opinion = { - modifier = guardian_of_heir_parochial_opinion - target = $WARD_LIEGE$ - } - } - else_if = { - limit = { - has_opinion_modifier = { - modifier = guardian_of_relative_parochial_opinion - target = $WARD_LIEGE$ - } - NOT = { # They're not still guardian of a relative - any_relation = { - type = ward - is_close_family_of = $WARD_LIEGE$ - } - } - } - remove_opinion = { - modifier = guardian_of_relative_parochial_opinion - target = $WARD_LIEGE$ - } - } - } - $WARD$ = { - if = { - limit = { - exists = var:guardian_liege - var:guardian_liege = { is_alive = yes } - } - var:guardian_liege = { - if = { - limit = { - has_opinion_modifier = { - modifier = guardian_of_heir_opinion - target = $WARD_LIEGE$ - } - } - remove_opinion = { - modifier = guardian_of_heir_opinion - target = $WARD_LIEGE$ - } - } - else_if = { - limit = { - has_opinion_modifier = { - modifier = guardian_of_relative_opinion - target = $WARD_LIEGE$ - } - NOT = { # They're not still guardian of a relative - any_relation = { - type = ward - is_close_family_of = $WARD_LIEGE$ - } - } - } - remove_opinion = { - modifier = guardian_of_relative_opinion - target = $WARD_LIEGE$ - } - } - if = { - limit = { - has_opinion_modifier = { - modifier = guardian_of_heir_parochial_opinion - target = $WARD_LIEGE$ - } - } - remove_opinion = { - modifier = guardian_of_heir_parochial_opinion - target = $WARD_LIEGE$ - } - } - else_if = { - limit = { - has_opinion_modifier = { - modifier = guardian_of_relative_parochial_opinion - target = $WARD_LIEGE$ - } - NOT = { # They're not still guardian of a relative - any_relation = { - type = ward - is_close_family_of = $WARD_LIEGE$ - } - } - } - remove_opinion = { - modifier = guardian_of_relative_parochial_opinion - target = $WARD_LIEGE$ - } - } - } - remove_variable = guardian_liege - } - } - #if = { - # limit = { - # exists = liege - # liege = $WARD_LIEGE$ - # has_vassal_stance = parochial - # } - # add_opinion = { - # target = $WARD_LIEGE$ - # modifier = insult_opinion - # opinion = -30 - # } - #} - } -} - -#Additional effects run to wrap up education -wrap_up_education_effect = { - #no educator memory creation - if = { - limit = { - NOT = { exists = scope:educator } - exists = root.court_owner.capital_province - } - create_character_memory = { - type = childhood_education_no_guardian - } - scope:new_memory = { - save_scope_as = education_memory - set_variable = { - name = education_realm - value = root.court_owner.primary_title - } - if = { - limit = { - root.court_owner = { is_landed = no } - } - set_variable = { - name = education_landless - value = yes - } - } - set_variable = { - name = education_location - value = root.court_owner.capital_province - } - set_variable = { - name = education_location_culture - value = root.court_owner.capital_province.culture - } - set_variable = { - name = education_host_faith - value = root.court_owner.faith - } - set_variable = { - name = education_host_culture - value = root.court_owner.culture - } - } - } - #has educator memory creation - else_if = { - limit = { - exists = root.court_owner.capital_province - } - create_character_memory = { - type = childhood_education_guardian - participants = { - guardian = scope:educator - } - } - scope:new_memory = { - save_scope_as = education_memory - set_variable = { - name = education_realm - value = root.court_owner.primary_title - } - set_variable = { - name = education_location - value = root.court_owner.capital_province - } - set_variable = { - name = education_location_culture - value = root.court_owner.capital_province.culture - } - set_variable = { - name = education_host_faith - value = root.court_owner.faith - } - set_variable = { - name = education_host_culture - value = root.court_owner.culture - } - } - } - - if = { - limit = { exists = scope:educator } - scope:educator = { - create_character_memory = { - type = ward_education_completed - participants = { - ward = root - } - } - } - remove_guardian_effect = { - GUARDIAN = scope:educator - WARD = root - RETURN_WARD = yes - HIDE_OPINION = no - } - if = { - limit = { - exists = root.house - exists = scope:educator.house - } - root.house = { - change_house_relation_effect = { - HOUSE = scope:educator.house - VALUE = house_relation_improve_minor_value - REASON = educated - CHAR = root - TARGET_CHAR = scope:educator - TITLE = scope:dummy_gender - } - } - } - } - else = { return_ward_travel_effect = yes } -} - -return_guardian_travel_effect = { - if = { - limit = { - is_foreign_court_guest = yes - NOR = { - host = liege - is_playable_character = yes - any_relation = { #They're not at another ward's court - type = ward - is_playable_character = yes - this = $GUARDIAN$.host - } - } - } - show_as_tooltip = { return_to_court = yes } - location ?= { save_scope_as = starting_location } - set_variable = { - name = ward_educated - value = $WARD$ - years = 3 - } - set_variable = { - name = ward_educated_realm - value = host.primary_title - years = 3 - } - # Actually return guardian last - hidden_effect = { - set_location = scope:starting_location - start_travel_plan = { - destination = liege.capital_province - on_start_on_action = on_guardian_depart_for_home - on_travel_planner_cancel_on_action = on_guardian_depart_travel_planner_exit - on_arrival_on_action = on_guardian_arrive_at_home - on_arrival_destinations = last - return_trip = no # One way - } - } - } -} - -return_ward_travel_effect = { - if = { - limit = { - is_foreign_court_guest = yes - exists = liege - host != liege - } - show_as_tooltip = { return_to_court = yes } - location ?= { save_scope_as = starting_location } - if = { - limit = { exists = scope:educator } - set_variable = { - name = guardian_educated - value = scope:educator - years = 3 - } - set_variable = { - name = guardian_educated_realm - value = host.primary_title - years = 3 - } - } - # Actually return guardian last - hidden_effect = { - set_location = scope:starting_location - start_travel_plan = { - destination = liege.capital_province - on_start_on_action = on_ward_depart_for_home - on_travel_planner_cancel_on_action = on_ward_depart_travel_planner_exit - on_arrival_on_action = on_ward_arrive_at_home - on_arrival_destinations = last - return_trip = no # One way - } - } - } -} - -rank_up_education_effect = { - if = { - limit = { has_education_rank_4_trigger = no } - if = { - limit = { has_trait = education_diplomacy } - change_trait_rank = { - trait = education_diplomacy - rank = 1 - } - } - else_if = { - limit = { has_trait = education_martial } - change_trait_rank = { - trait = education_martial - rank = 1 - } - } - else_if = { - limit = { has_trait = education_stewardship } - change_trait_rank = { - trait = education_stewardship - rank = 1 - } - } - else_if = { - limit = { has_trait = education_intrigue } - change_trait_rank = { - trait = education_intrigue - rank = 1 - } - } - else_if = { - limit = { has_trait = education_learning } - change_trait_rank = { - trait = education_learning - rank = 1 - } - } - } -} - -results_of_university_education_points_effect = { - if = { - limit = { - has_character_flag = studying_at_university - } - #Adding the points to the current education - if = { - limit = { has_focus = education_diplomacy } - random_list = { - 60 = { - change_variable = { - name = education_diplomacy_variable - add = 2 - } - } - 40 = { - change_variable = { - name = education_diplomacy_variable - add = 3 - } - } - } - } - else_if = { - limit = { has_focus = education_martial } - random_list = { - 60 = { - change_variable = { - name = education_martial_variable - add = 2 - } - } - 40 = { - change_variable = { - name = education_martial_variable - add = 3 - } - } - } - } - else_if = { - limit = { has_focus = education_stewardship } - random_list = { - 60 = { - change_variable = { - name = education_stewardship_variable - add = 2 - } - } - 40 = { - change_variable = { - name = education_stewardship_variable - add = 3 - } - } - } - } - else_if = { - limit = { has_focus = education_intrigue } - random_list = { - 60 = { - change_variable = { - name = education_intrigue_variable - add = 2 - } - } - 40 = { - change_variable = { - name = education_intrigue_variable - add = 3 - } - } - } - } - else_if = { - limit = { has_focus = education_learning } - random_list = { - 60 = { - change_variable = { - name = education_learning_variable - add = 2 - } - } - 40 = { - change_variable = { - name = education_learning_variable - add = 3 - } - } - } - } - remove_character_flag = studying_at_university - add_character_flag = studied_at_university - - if = { - limit = { - NOT = { - has_trait = drunkard - } - } - hidden_effect = { - random = { - chance = 2 - add_trait = drunkard - } - } - } - if = { - limit = { - NOT = { has_character_flag = studying_confucian_education } - } - #Adding the points to the current education - if = { - limit = { has_trait = confucian_education } - add_trait_xp = { - trait = confucian_education - value = { - value = 20 - add = { - value = "scope:educator.has_trait_xp(confucian_education)" - multiply = 0.25 - } - if = { - limit = { - has_religion = religion:confucianism_religion - } - add = 20 - } - round = yes - } - } - } - else = { - add_trait = confucian_education - add_trait_xp = { - trait = confucian_education - value = { - value = 20 - add = { - value = "scope:educator.has_trait_xp(confucian_education)" - multiply = 0.1 - } - if = { - limit = { - has_religion = religion:confucianism_religion - } - add = 10 - } - round = yes - } - } - } - } - } -} -#Ward learned from a Confucian scholar -results_of_confucian_education_effect = { - if = { - limit = { - has_character_flag = studying_confucian_education - } - #Adding the points to the current education - if = { - limit = { has_trait = confucian_education } - add_trait_xp = { - trait = confucian_education - value = { - value = 0 - if = { - limit = { - exists = scope:educator - } - add = { - value = "scope:educator.has_trait_xp(confucian_education)" - multiply = 0.25 - } - } - if = { - limit = { - has_religion = religion:confucianism_religion - } - add = 20 - } - if = { - limit = { - has_character_flag = studied_at_university - } - add = 20 - } - } - } - } - else = { - add_trait = confucian_education - add_trait_xp = { - trait = confucian_education - value = { - value = 0 - if = { - limit = { - exists = scope:educator - } - add = { - value = "scope:educator.has_trait_xp(confucian_education)" - multiply = 0.1 - } - } - if = { - limit = { - has_religion = religion:confucianism_religion - } - add = 10 - } - if = { - limit = { - has_character_flag = studied_at_university - } - add = 20 - } - round = yes - } - } - } - if = { - limit = { - exists = scope:educator - } - save_scope_as = educated_child - random = { - chance = 10 - set_elder_relation_effect = { - ELDER = scope:educator - DISCIPLE = scope:educated_child - MERIT = minor_merit_gain - } - } - } - remove_character_flag = studying_confucian_education - add_character_flag = studied_confucian_education - } -} - -dynasty_legacy_education_boost_effect = { - if = { - limit = { - has_dynasty = yes - dynasty = { has_dynasty_perk = kin_legacy_2 } - } - - if = { - limit = { has_focus = education_diplomacy } - random_list = { - 60 = { - change_variable = { - name = education_diplomacy_variable - add = 2 - } - } - 40 = { - change_variable = { - name = education_diplomacy_variable - add = 3 - } - } - } - } - else_if = { - limit = { has_focus = education_martial } - random_list = { - 60 = { - change_variable = { - name = education_martial_variable - add = 2 - } - } - 40 = { - change_variable = { - name = education_martial_variable - add = 3 - } - } - } - } - else_if = { - limit = { has_focus = education_stewardship } - random_list = { - 60 = { - change_variable = { - name = education_stewardship_variable - add = 2 - } - } - 40 = { - change_variable = { - name = education_stewardship_variable - add = 3 - } - } - } - } - else_if = { - limit = { has_focus = education_intrigue } - random_list = { - 60 = { - change_variable = { - name = education_intrigue_variable - add = 2 - } - } - 40 = { - change_variable = { - name = education_intrigue_variable - add = 3 - } - } - } - } - else_if = { - limit = { has_focus = education_learning } - random_list = { - 60 = { - change_variable = { - name = education_learning_variable - add = 2 - } - } - 40 = { - change_variable = { - name = education_learning_variable - add = 3 - } - } - } - } - } -} - -cultural_traditions_education_boost_effect = { - # FP3 Beacon of Learning - if = { - limit = { - any_relation = { - type = guardian - culture = { has_cultural_parameter = guardian_education_better_outcomes } - } - } - if = { - limit = { exists = var:education_diplomacy_variable } - change_variable = { - name = education_diplomacy_variable - add = { - value = var:education_diplomacy_variable - divide = 4 - round = yes - max = 3 # This effect shouldn't be better than a good court tutor - } - } - } - else_if = { - limit = { exists = var:education_martial_variable } - change_variable = { - name = education_martial_variable - add = { - value = var:education_martial_variable - divide = 4 - round = yes - max = 3 - } - } - } - else_if = { - limit = { exists = var:education_intrigue_variable } - change_variable = { - name = education_intrigue_variable - add = { - value = var:education_intrigue_variable - divide = 4 - round = yes - max = 3 - } - } - } - else_if = { - limit = { exists = var:education_stewardship_variable } - change_variable = { - name = education_stewardship_variable - add = { - value = var:education_stewardship_variable - divide = 4 - round = yes - max = 3 - } - } - } - else_if = { - limit = { exists = var:education_learning_variable } - change_variable = { - name = education_learning_variable - add = { - value = var:education_learning_variable - divide = 4 - round = yes - max = 3 - } - } - } - } - if = { - limit = { - culture = { - has_cultural_parameter = diplomacy_education_better_outcomes - } - has_focus = education_diplomacy - } - - random_list = { - 60 = { - change_variable = { - name = education_diplomacy_variable - add = 1 - } - } - 40 = { - change_variable = { - name = education_diplomacy_variable - add = 0 - } - } - } - } - if = { - limit = { - culture = { - has_cultural_parameter = martial_education_worse_outcomes - } - has_focus = education_martial - exists = var:education_martial_variable - var:education_martial_variable > 0 - } - - change_variable = { - name = education_martial_variable - add = -1 - } - } -} - -court_tutor_education_boost_effect = { - if = { - limit = { - court_owner ?= { - OR = { - AND = { - employs_court_position = court_tutor_court_position - any_court_position_holder = { - type = court_tutor_court_position - } - } - AND = { - employs_court_position = court_guru_court_position - any_court_position_holder = { - type = court_guru_court_position - } - } - } - } - } - # Let's save the court tutor or guru with the highest aptitude - # we can use the court tutor aptitude checks for Gurus because they are nearly identical for what matters in these calculations - court_owner = { - if = { - limit = { - employs_court_position = court_tutor_court_position - } - random_court_position_holder = { - type = court_tutor_court_position - limit = { - var:booner_target ?= root - } - alternative_limit = { aptitude:court_tutor_court_position >= 4 } - alternative_limit = { aptitude:court_tutor_court_position >= 3 } - alternative_limit = { aptitude:court_tutor_court_position >= 2 } - alternative_limit = { aptitude:court_tutor_court_position >= 1 } - alternative_limit = { always = yes } - save_scope_as = court_tutor - } - } - else = { - random_court_position_holder = { - type = court_guru_court_position - limit = { - var:booner_target ?= root - } - alternative_limit = { aptitude:court_guru_court_position >= 4 } - alternative_limit = { aptitude:court_guru_court_position >= 3 } - alternative_limit = { aptitude:court_guru_court_position >= 2 } - alternative_limit = { aptitude:court_guru_court_position >= 1 } - alternative_limit = { always = yes } - save_scope_as = court_tutor - } - } - } - - if = { - limit = { has_focus = education_diplomacy } - random_list = { - 10 = { # Small chance for a GREAT boost - trigger = { - OR = { - scope:court_tutor.aptitude:court_tutor_court_position = 4 - scope:court_tutor.var:booner_target ?= root - } - } - change_variable = { - name = education_diplomacy_variable - add = 4 - } - } - 40 = { - modifier = { - add = 20 - scope:court_tutor.aptitude:court_tutor_court_position = 4 - } - modifier = { - add = 10 - scope:court_tutor.aptitude:court_tutor_court_position = 3 - } - modifier = { - add = 10 - scope:court_tutor.var:booner_target ?= root - } - change_variable = { - name = education_diplomacy_variable - add = 3 - } - } - 50 = { - modifier = { - add = 10 - scope:court_tutor.aptitude:court_tutor_court_position = 2 - } - modifier = { - add = 20 - scope:court_tutor.aptitude:court_tutor_court_position = 1 - } - change_variable = { - name = education_diplomacy_variable - add = 2 - } - } - } - } - else_if = { - limit = { has_focus = education_martial } - random_list = { - 10 = { # Small chance for a GREAT boost - trigger = { - scope:court_tutor.aptitude:court_tutor_court_position = 4 - scope:court_tutor.var:booner_target ?= root - } - change_variable = { - name = education_martial_variable - add = 4 - } - } - 40 = { - modifier = { - add = 20 - scope:court_tutor.aptitude:court_tutor_court_position = 4 - } - modifier = { - add = 10 - scope:court_tutor.aptitude:court_tutor_court_position = 3 - } - modifier = { - add = 10 - scope:court_tutor.var:booner_target ?= root - } - change_variable = { - name = education_martial_variable - add = 3 - } - } - 50 = { - modifier = { - add = 10 - scope:court_tutor.aptitude:court_tutor_court_position = 2 - } - modifier = { - add = 20 - scope:court_tutor.aptitude:court_tutor_court_position = 1 - } - change_variable = { - name = education_martial_variable - add = 2 - } - } - } - } - else_if = { - limit = { has_focus = education_stewardship } - random_list = { - 10 = { # Small chance for a GREAT boost - trigger = { - scope:court_tutor.aptitude:court_tutor_court_position = 4 - scope:court_tutor.var:booner_target ?= root - scope:court_tutor = { has_trait = confucian_education } - } - change_variable = { - name = education_stewardship_variable - add = 4 - } - } - 40 = { - modifier = { - add = 20 - scope:court_tutor = { has_trait = confucian_education } - } - modifier = { - add = 20 - scope:court_tutor.aptitude:court_tutor_court_position = 4 - } - modifier = { - add = 10 - scope:court_tutor.aptitude:court_tutor_court_position = 3 - } - modifier = { - add = 10 - scope:court_tutor.var:booner_target ?= root - } - change_variable = { - name = education_stewardship_variable - add = 3 - } - } - 50 = { - trigger = { - NOT = { - scope:court_tutor = { has_trait = confucian_education } - } - } - modifier = { - add = 10 - scope:court_tutor.aptitude:court_tutor_court_position = 2 - } - modifier = { - add = 20 - scope:court_tutor.aptitude:court_tutor_court_position = 1 - } - change_variable = { - name = education_stewardship_variable - add = 2 - } - } - } - } - else_if = { - limit = { has_focus = education_intrigue } - random_list = { - 10 = { # Small chance for a GREAT boost - trigger = { - scope:court_tutor.aptitude:court_tutor_court_position = 4 - scope:court_tutor.var:booner_target ?= root - } - change_variable = { - name = education_intrigue_variable - add = 4 - } - } - 40 = { - modifier = { - add = 20 - scope:court_tutor.aptitude:court_tutor_court_position = 4 - } - modifier = { - add = 10 - scope:court_tutor.aptitude:court_tutor_court_position = 3 - } - modifier = { - add = 10 - scope:court_tutor.var:booner_target ?= root - } - change_variable = { - name = education_intrigue_variable - add = 3 - } - } - 50 = { - modifier = { - add = 10 - scope:court_tutor.aptitude:court_tutor_court_position = 2 - } - modifier = { - add = 20 - scope:court_tutor.aptitude:court_tutor_court_position = 1 - } - change_variable = { - name = education_intrigue_variable - add = 2 - } - } - } - } - else_if = { - limit = { has_focus = education_learning } - random_list = { - 10 = { # Small chance for a GREAT boost - trigger = { - scope:court_tutor.aptitude:court_tutor_court_position = 4 - scope:court_tutor.var:booner_target ?= root - scope:court_tutor = { has_trait = confucian_education } - } - change_variable = { - name = education_learning_variable - add = 4 - } - } - 40 = { - modifier = { - add = 20 - scope:court_tutor = { has_trait = confucian_education } - } - modifier = { - add = 20 - scope:court_tutor.aptitude:court_tutor_court_position = 4 - } - modifier = { - add = 10 - scope:court_tutor.aptitude:court_tutor_court_position = 3 - } - modifier = { - add = 10 - scope:court_tutor.var:booner_target ?= root - } - change_variable = { - name = education_learning_variable - add = 3 - } - } - 50 = { - trigger = { - NOT = { - scope:court_tutor = { has_trait = confucian_education } - } - } - modifier = { - add = 10 - scope:court_tutor.aptitude:court_tutor_court_position = 2 - } - modifier = { - add = 20 - scope:court_tutor.aptitude:court_tutor_court_position = 1 - } - change_variable = { - name = education_learning_variable - add = 2 - } - } - } - } - } -} - -huntperson_camp_officer_education_boost_effect = { - if = { - limit = { - court_owner ?= { - employs_court_position = huntperson_camp_officer - any_court_position_holder = { - type = huntperson_camp_officer - } - } - } - #Let's save the huntperson with the highest aptitude - court_owner = { - random_court_position_holder = { - type = huntperson_camp_officer - limit = { aptitude:huntperson_camp_officer >= 5 } - alternative_limit = { aptitude:huntperson_camp_officer >= 4 } - alternative_limit = { aptitude:huntperson_camp_officer >= 3 } - alternative_limit = { aptitude:huntperson_camp_officer >= 2 } - alternative_limit = { always = yes } - save_scope_as = huntperson - } - } - if = { - limit = { has_focus = education_martial } - random_list = { - 10 = { # Small chance for a GREAT boost - trigger = { - scope:huntperson.aptitude:huntperson_camp_officer = 5 - } - change_variable = { - name = education_martial_variable - add = 4 - } - } - 40 = { - modifier = { - add = 20 - scope:huntperson.aptitude:huntperson_camp_officer = 5 - } - modifier = { - add = 10 - scope:huntperson.aptitude:huntperson_camp_officer = 4 - } - change_variable = { - name = education_martial_variable - add = 3 - } - } - 50 = { - modifier = { - add = 10 - scope:huntperson.aptitude:huntperson_camp_officer = 2 - } - modifier = { - add = 20 - scope:huntperson.aptitude:huntperson_camp_officer = 1 - } - change_variable = { - name = education_martial_variable - add = 2 - } - } - } - } - } -} - -post_education_bonuses_effect = { - if = { - limit = { - exists = scope:educator - character_has_commander_trait_scope_does_not = scope:educator - scope:educator = { - culture = { - has_cultural_parameter = guardians_can_transfer_commander_traits - } - } - } - culture_randomize_commander_trait_effect = yes - } -} - -culture_randomize_commander_trait_effect = { - random_list = { - 100 = { - trigger = { - NOT = { has_trait = rough_terrain_expert } - scope:educator = { - has_trait = rough_terrain_expert - } - } - add_trait = rough_terrain_expert - } - 100 = { - trigger = { - NOT = { has_trait = logistician } - scope:educator = { - has_trait = logistician - } - } - add_trait = logistician - } - 100 = { - trigger = { - NOT = { has_trait = military_engineer } - scope:educator = { - has_trait = military_engineer - } - } - add_trait = military_engineer - } - 100 = { - trigger = { - NOT = { has_trait = aggressive_attacker } - scope:educator = { - has_trait = aggressive_attacker - } - } - add_trait = aggressive_attacker - } - 100 = { - trigger = { - NOT = { has_trait = unyielding_defender } - scope:educator = { - has_trait = unyielding_defender - } - } - add_trait = unyielding_defender - } - 100 = { - trigger = { - NOT = { has_trait = forder } - scope:educator = { - has_trait = forder - } - } - add_trait = forder - } - 100 = { - trigger = { - NOT = { has_trait = flexible_leader } - scope:educator = { - has_trait = flexible_leader - } - } - add_trait = flexible_leader - } - 100 = { - trigger = { - NOT = { has_trait = desert_warrior } - scope:educator = { - has_trait = desert_warrior - } - } - add_trait = desert_warrior - } - 100 = { - trigger = { - NOT = { has_trait = jungle_stalker } - scope:educator = { - has_trait = jungle_stalker - } - } - add_trait = jungle_stalker - } - 100 = { - trigger = { - NOT = { has_trait = winter_soldier } - scope:educator = { - has_trait = winter_soldier - } - } - add_trait = winter_soldier - } - 100 = { - trigger = { - NOT = { has_trait = reaver } - scope:educator = { - has_trait = reaver - } - } - add_trait = reaver - } - 100 = { - trigger = { - NOT = { has_trait = reckless } - scope:educator = { - has_trait = reckless - } - } - add_trait = reckless - } - 100 = { - trigger = { - NOT = { has_trait = holy_warrior } - scope:educator = { - has_trait = holy_warrior - } - } - add_trait = holy_warrior - } - 100 = { - trigger = { - NOT = { has_trait = organizer } - scope:educator = { - has_trait = organizer - } - } - add_trait = organizer - } - 100 = { - trigger = { - NOT = { has_trait = forest_fighter } - scope:educator = { - has_trait = forest_fighter - } - } - add_trait = forest_fighter - } - 100 = { - trigger = { - NOT = { has_trait = cautious_leader } - scope:educator = { - has_trait = cautious_leader - } - } - add_trait = cautious_leader - } - 100 = { - trigger = { - NOT = { has_trait = open_terrain_expert } - scope:educator = { - has_trait = open_terrain_expert - } - } - add_trait = open_terrain_expert - } - } -} - - -dynasty_perk_secondary_education_trait_effect = { - if = { - limit = { - OR = { - dynasty ?= { has_dynasty_perk = fp2_urbanism_legacy_2 } - AND = { - exists = scope:educator - scope:educator = { - dynasty ?= { has_dynasty_perk = fp2_urbanism_legacy_2 } - } - } - } - } - - # Assign a trait, chance based on the development of the location - set_variable = { - name = chance_for_extra_trait - value = location.county.development_level - } - - random_list = { - # Success - 0 = { - modifier = { - exists = var:chance_for_extra_trait - add = var:chance_for_extra_trait - } - - # Select trait now - random_list = { - # Level 1: from 50% to 0% - 50 = { - modifier = { - add = { - value = var:chance_for_extra_trait - multiply = -0.5 - } - } - add_trait = education_republican_knowledge_1 - } - - # Level 2: from 35% to 50% - 35 = { - modifier = { - add = { - value = var:chance_for_extra_trait - multiply = 0.05 - } - } - add_trait = education_republican_knowledge_2 - } - - # Level 3: from 15% to 30% - 15 = { - modifier = { - add = { - value = var:chance_for_extra_trait - multiply = 0.5 - } - } - add_trait = education_republican_knowledge_3 - } - - # Level 4: from 0 to 20% chance - 0 = { - modifier = { - add = { - value = var:chance_for_extra_trait - multiply = 0.5 - } - } - add_trait = education_republican_knowledge_4 - } - } - } - - # Failing - There will be a: - # 84% chance at development 5 - # 66% chance at development 10 - # 50% chance at development 15 - # 0% chance once development level 30 is reached - 30 = { - modifier = { - exists = var:chance_for_extra_trait - add = { - value = var:chance_for_extra_trait - multiply = -1 - } - } - #nothing happens - } - } - # remove the variable now that it has been used - remove_variable = chance_for_extra_trait - } -} - -ward_depart_effect = { - scope:guardian = { add_to_list = toast_list } - scope:ward = { add_to_list = toast_list } - scope:guardian_liege = { add_to_list = toast_list } - scope:ward_liege = { add_to_list = toast_list } - # Set variables - scope:ward = { - set_variable = { - name = character_making_education_request - value = scope:actor - years = 10 - } - # Remove existing guardian if relevant - if = { - limit = { - exists = scope:offer_guardianship_interaction - any_relation = { type = guardian } - } - random_relation = { - type = guardian - save_scope_as = guardian_to_remove - } - remove_guardian_effect = { - GUARDIAN = scope:guardian_to_remove - WARD = scope:ward - RETURN_WARD = no - HIDE_OPINION = no - } - } - remove_character_flag = under_offer_as_ward_flag - } - if = { # No travel necessary - limit = { - OR = { - scope:ward = scope:guardian.host - scope:guardian = scope:ward.host - scope:ward.host = scope:guardian.host - #allow landed ruler to landed ruler education - AND = { - scope:ward = { - is_landed_or_landless_administrative = yes - } - scope:guardian = { - is_landed_or_landless_administrative = yes - } - } - } - } - hidden_effect = { #to prevent doubling of "becomes guardian of x" effect in the interaction confirmation window - if = { - limit = { - NOT = { - scope:guardian = { has_relation_ward = scope:ward } - } - } - scope:guardian = { set_relation_ward = scope:ward } - } - } - #Opinions - guardian_add_opinion_effect = { - GUARDIAN = scope:guardian - WARD_LIEGE = scope:ward_liege - WARD = scope:ward - } - # Convert culture setup - scope:ward = { - if = { - limit = { has_character_flag = convert_culture } - scope:guardian = { - add_relation_flag = { - relation = ward - target = scope:ward - flag = convert_culture - } - } - remove_character_flag = convert_culture - } - # Convert faith setup - if = { - limit = { has_character_flag = convert_faith } - scope:guardian = { - add_relation_flag = { - relation = ward - target = scope:ward - flag = convert_faith - } - } - remove_character_flag = convert_faith - } - } - } - else = { - if = { # Guardian heads to landed Ward - limit = { - scope:ward = { is_playable_character = yes } - } - scope:guardian = { - set_variable = { - name = guardian_travelling_to_ward - years = 2 - value = scope:ward - } - start_travel_plan = { - destination = scope:ward.capital_province - on_start_on_action = on_guardian_depart_for_ward - on_travel_planner_cancel_on_action = on_guardian_depart_travel_planner_exit - on_arrival_on_action = on_guardian_arrive_at_ward - on_arrival_destinations = last - return_trip = no # One way - } - } - hidden_effect = { - every_in_list = { - list = toast_list - send_interface_toast = { - title = guardian_departs_title - left_icon = scope:guardian - right_icon = scope:ward - custom_tooltip = guardian_departs_tt - } - } - } - custom_tooltip = guardian_leaves_for_ward_tt - scope:ward = { - set_variable = { - name = ward_waiting_for_guardian - years = 2 - value = scope:guardian - } - } - } - else = { - scope:ward = { - if = { - limit = { # Ward heads to landed Guardian - is_playable_character = no - scope:guardian = { is_playable_character = yes } - scope:guardian != host - } - scope:guardian.capital_province = { save_scope_as = destination_province } - } - else_if = { # Ward heads to Guardian's host - limit = { exists = scope:guardian.host.capital_province } - scope:guardian.host.capital_province = { save_scope_as = destination_province } - } - else = { - scope:guardian.location = { save_scope_as = destination_province } - } - set_variable = { - name = ward_travelling_to_guardian - years = 2 - value = scope:guardian - } - start_travel_plan = { - destination = scope:destination_province - on_start_on_action = on_ward_depart_for_guardian - on_travel_planner_cancel_on_action = on_ward_depart_travel_planner_exit - on_arrival_on_action = on_ward_arrive_at_guardian - on_arrival_destinations = last - return_trip = no # One way - } - } - hidden_effect = { - every_in_list = { - list = toast_list - send_interface_toast = { - title = ward_departs_title - left_icon = scope:ward - right_icon = scope:guardian - custom_tooltip = ward_departs_tt - } - } - } - custom_tooltip = ward_leaves_for_guardian_tt - scope:guardian = { - set_variable = { - name = guardian_waiting_for_ward - years = 2 - value = scope:ward - } - } - } - } -} - -remove_guardian_effect = { - $GUARDIAN$ = { - remove_relation_ward = $WARD$ - return_guardian_travel_effect = { - GUARDIAN = $GUARDIAN$ - WARD = $WARD$ - } - } - if = { - limit = { always = $RETURN_WARD$ } - $WARD$ = { return_ward_travel_effect = yes } - } - if = { - limit = { always = $HIDE_OPINION$ } - hidden_effect = { - guardian_remove_opinion_effect = { - GUARDIAN = $GUARDIAN$ - WARD = $WARD$ - WARD_LIEGE = $WARD$.liege - } - } - } - else = { - guardian_remove_opinion_effect = { - GUARDIAN = $GUARDIAN$ - WARD = $WARD$ - WARD_LIEGE = $WARD$.liege - } - } -} - -knight_teacher_effect = { - if = { - limit = { - scope:educator = { has_character_modifier = knight_teacher_modifier } - } - change_variable = { - name = education_martial_variable - add = { integer_range = { min = 1 max = 3 } } - } - } -} diff --git a/N3OW/common/scripted_effects/00_ep1_artifact_creation_effects.txt b/N3OW/common/scripted_effects/00_ep1_artifact_creation_effects.txt deleted file mode 100644 index b5225462..00000000 --- a/N3OW/common/scripted_effects/00_ep1_artifact_creation_effects.txt +++ /dev/null @@ -1,15818 +0,0 @@ - -################################################# -# # -# ASSORTED BASIC EFFECTS # -# # -################################################# - -get_artifact_quality_effect = { - if = { - limit = { - NOT = { exists = scope:quality } - } - # Some random variance is added so artifact quality isn't completely deterministic - if = { - limit = { - NOR = { - exists = scope:inspiration_owner - exists = scope:random_quality_bonus - } - } - random_list = { - 20 = { - save_scope_value_as = { - name = random_quality_bonus - value = 4 - } - } - 20 = { - save_scope_value_as = { - name = random_quality_bonus - value = 8 - } - } - 20 = { - save_scope_value_as = { - name = random_quality_bonus - value = 12 - } - } - 20 = { - save_scope_value_as = { - name = random_quality_bonus - value = 16 - } - } - 20 = { - save_scope_value_as = { - name = random_quality_bonus - value = 20 - } - } - } - } - else_if = { - limit = { - NOT = { exists = scope:random_inspired_skill_quality_bonus } - } - random_list = { - 20 = { - save_scope_value_as = { - name = random_inspired_skill_quality_bonus - value = 0.5 - } - } - 20 = { - save_scope_value_as = { - name = random_inspired_skill_quality_bonus - value = 1 - } - } - 20 = { - save_scope_value_as = { - name = random_inspired_skill_quality_bonus - value = 2 - } - } - 20 = { - save_scope_value_as = { - name = random_inspired_skill_quality_bonus - value = 2.5 - } - } - 20 = { - save_scope_value_as = { - name = random_inspired_skill_quality_bonus - value = 3 - } - } - } - save_scope_value_as = { - name = random_quality_bonus - value = 0 - } - } - - # Calculate the final quality of the artifact - save_scope_value_as = { - name = quality - value = { - value = scope:random_quality_bonus - - # Cultural tradition for piety level boosting artifacts - if = { - limit = { - court_owner.culture ?= { - has_cultural_parameter = piety_level_affect_artifact_quality - } - } - add = { - value = court_owner.piety_level - multiply = 5 - } - } - - # Bonus Quality from the Court Owner's Amenities - if = { - limit = { - court_owner ?= { - has_royal_court = yes - has_dlc_feature = royal_court - amenity_level = { target = court_lodging_standards value > low_amenity_level } - } - } - if = { - limit = { court_owner = { amenity_level = { target = court_lodging_standards value >= max_amenity_level } } } - add = 10 - } - else_if = { - limit = { court_owner = { amenity_level = { target = court_lodging_standards value >= very_high_amenity_level } } } - add = 8 - } - else_if = { - limit = { court_owner = { amenity_level = { target = court_lodging_standards value >= high_amenity_level } } } - add = 6 - } - else_if = { - limit = { court_owner = { amenity_level = { target = court_lodging_standards value >= medium_amenity_level } } } - add = 4 - } - else = { - add = 2 - } - } - - # Bonus quality from Inspiration Owner - if = { - limit = { exists = scope:inspiration_owner } - scope:inspiration_owner = { - # Bonus quality from high skills, depending on inspiration type. - add = { - if = { - limit = { ep1_character_had_or_has_inspiration_type_trigger = { TYPE = armor } } - value = armor_inspiration_average_skill_value - } - else_if = { - limit = { ep1_character_had_or_has_inspiration_type_trigger = { TYPE = weapon } } - value = weapon_inspiration_average_skill_value - } - else_if = { - limit = { ep1_character_had_or_has_inspiration_type_trigger = { TYPE = adventure } } - value = adventure_inspiration_average_skill_value - } - else_if = { - limit = { ep1_character_had_or_has_inspiration_type_trigger = { TYPE = smith } } - value = smith_inspiration_average_skill_value - } - else_if = { - limit = { ep1_character_had_or_has_inspiration_type_trigger = { TYPE = book } } - value = book_inspiration_average_skill_value - } - else_if = { - limit = { ep1_character_had_or_has_inspiration_type_trigger = { TYPE = weaver } } - value = weaver_inspiration_average_skill_value - } - else_if = { - limit = { ep1_character_had_or_has_inspiration_type_trigger = { TYPE = artisan } } - value = artisan_inspiration_average_skill_value - } - else_if = { - limit = { ep1_character_had_or_has_inspiration_type_trigger = { TYPE = alchemy } } - value = alchemy_inspiration_average_skill_value - } - multiply = { - value = quality_bonus_per_skill_level_value - add = scope:random_inspired_skill_quality_bonus # Replaces the random_quality_bonus when an artifact is created by a character so that skill matters more - } - } - # Adventurer Bonuses - if = { - limit = { - OR = { - ep1_character_had_or_has_inspiration_type_trigger = { TYPE = weapon } - ep1_character_had_or_has_inspiration_type_trigger = { TYPE = smith } - ep1_character_had_or_has_inspiration_type_trigger = { TYPE = armor } - } - court_owner ?= { - has_government = landless_adventurer_government - has_perk = divided_attention_perk - } - } - add = 40 - } - if = { - limit = { - ep1_character_had_or_has_inspiration_type_trigger = { TYPE = book } - court_owner ?= { - has_government = landless_adventurer_government - has_perk = divided_attention_perk - } - } - add = 80 - } - # Bonus quality from Cultural Traditions - if = { - limit = { - ep1_character_had_or_has_inspiration_type_trigger = { TYPE = weapon } - culture = { has_cultural_parameter = improved_weapon_inspiration } - } - add = 20 - } - if = { - limit = { - ep1_character_had_or_has_inspiration_type_trigger = { TYPE = artisan } - culture = { has_cultural_parameter = improved_artisan_inspiration } - } - add = 20 - } - if = { - limit = { - ep1_character_had_or_has_inspiration_type_trigger = { TYPE = weaver } - culture = { has_cultural_parameter = improved_weaver_inspiration } - } - add = 20 - } - - # Bonus quality from event outcomes involving the Inspiration Owner - if = { - limit = { exists = var:artifact_quality } - add = { - value = var:artifact_quality - multiply = 3 - } - } - - # Bonus quality from the Mind Without Mind tenet - if = { - limit = { - faith = { has_doctrine_parameter = better_artifacts } - } - add = 10 - } - - # Reduction on quality for 'local artisans', who should produce lower quality artifacts - if = { - limit = { - has_character_flag = local_artisan - } - add = -10 - } - # Other inspiration owners get a small bonus in quality to help distinguish them from 'local artisans' - else = { - add = 20 - } - } - - # Bonuses from Buildings - if = { #Smiths line - limit = { - court_owner ?= { - any_directly_owned_province = { - has_building_or_higher = smiths_05 - } - } - } - court_owner = { - every_directly_owned_province = { - limit = { - has_building_or_higher = smiths_05 - } - add = 2 - } - every_directly_owned_province = { - limit = { - has_building_or_higher = smiths_06 - } - add = 2 - } - every_directly_owned_province = { - limit = { - has_building_or_higher = smiths_07 - } - add = 2 - } - every_directly_owned_province = { - limit = { - has_building_or_higher = smiths_08 - } - add = 2 - } - } - } - if = { #blacksmiths duchy building - limit = { - court_owner ?= { - any_directly_owned_province = { - has_building_or_higher = blacksmiths_01 - } - } - } - court_owner = { - every_directly_owned_province = { - limit = { - has_building_or_higher = blacksmiths_01 - } - add = 4 - } - every_directly_owned_province = { - limit = { - has_building_or_higher = blacksmiths_02 - } - add = 8 - } - every_directly_owned_province = { - limit = { - has_building_or_higher = blacksmiths_03 - } - add = 12 - } - } - } - if = { #caravanserai line - limit = { - court_owner ?= { - any_directly_owned_province = { - has_building_or_higher = caravanserai_04 - } - } - } - court_owner = { - every_directly_owned_province = { - limit = { - has_building_or_higher = caravanserai_04 - } - add = 2 - } - every_directly_owned_province = { - limit = { - has_building_or_higher = caravanserai_05 - } - add = 2 - } - every_directly_owned_province = { - limit = { - has_building_or_higher = caravanserai_06 - } - add = 2 - } - every_directly_owned_province = { - limit = { - has_building_or_higher = caravanserai_07 - } - add = 2 - } - every_directly_owned_province = { - limit = { - has_building_or_higher = caravanserai_08 - } - add = 2 - } - } - } - if = { #Wind Furnaces line - limit = { - court_owner ?= { - any_directly_owned_province = { - has_building_or_higher = wind_furnace_04 - } - } - OR = { - ep1_character_had_or_has_inspiration_type_trigger = { TYPE = armor } - ep1_character_had_or_has_inspiration_type_trigger = { TYPE = weapon } - } - } - court_owner = { - every_directly_owned_province = { - limit = { - has_building_or_higher = wind_furnace_04 - } - add = 6 - } - every_directly_owned_province = { - limit = { - has_building_or_higher = wind_furnace_05 - } - add = 4 - } - every_directly_owned_province = { - limit = { - has_building_or_higher = wind_furnace_06 - } - add = 4 - } - every_directly_owned_province = { - limit = { - has_building_or_higher = wind_furnace_07 - } - add = 4 - } - every_directly_owned_province = { - limit = { - has_building_or_higher = wind_furnace_08 - } - add = 4 - } - } - } - if = { # Universities boost Book Inspirations - limit = { - court_owner ?= { - any_directly_owned_province = { - has_university_building_trigger = yes - } - } - ep1_character_had_or_has_inspiration_type_trigger = { TYPE = book } - } - add = 20 - } - if = { # Special Mines boost things significantly - limit = { - court_owner ?= { - any_directly_owned_province = { - has_any_special_mine_trigger = yes - } - } - OR = { - ep1_character_had_or_has_inspiration_type_trigger = { TYPE = armor } - ep1_character_had_or_has_inspiration_type_trigger = { TYPE = weapon } - ep1_character_had_or_has_inspiration_type_trigger = { TYPE = smith } - ep1_character_had_or_has_inspiration_type_trigger = { TYPE = artisan } - } - } - add = 20 - } - - # Bonus from Estates - if = { - limit = { - court_owner ?= { - domicile ?= { - has_domicile_parameter = estate_improved_inspirations_2 - } - } - } - add = 10 - } - else_if = { - limit = { - court_owner ?= { - domicile ?= { - has_domicile_parameter = estate_improved_inspirations_1 - } - } - } - add = 5 - } - } - - #If it is worth bringing home from an adventure it is not common. - if = { - limit = { - exists = scope:adventurer - } - add = 20 - } - - - # Family Epic base quality - if = { - limit = { - exists = scope:owner - scope:owner = { has_variable = commission_epic_quality } - } - add = scope:owner.var:commission_epic_quality - } - # Old Ledger should not be too fancy (stewardship_wealth.1061) - if = { - limit = { - exists = scope:low_quality - } - max = 20 - } - - # Exotic Arms event - if = { - limit = { exists = scope:exotic_blade_quality } - if = { - limit = { scope:exotic_blade_quality = no } - max = 20 - } - else = { max = 60 } - } - - if = { - limit = { - exists = scope:owner - scope:owner = { has_character_modifier = mpo_artifact_material_modifier } - } - add = 20 - } - - # Encouraging Words BP4 event - if = { - limit = { exists = scope:encouraging_words_quality_boost } - add = 100 - } - - # Can't have negative quality - min = 1 - } - } - } -} - -get_artifact_wealth_effect = { - if = { - limit = { - NOT = { exists = scope:wealth } - } - save_scope_value_as = { - name = wealth - value = { - if = { - # If our artifact already has a quality, set base wealth equal to 1/4th quality value. - limit = { exists = scope:quality } - add = scope:quality - multiply = 0.25 - round = yes - - } - else = { - add = 10 # Otherwise, set base wealth value to 10. - } - - if = { - limit = { - exists = scope:owner - scope:owner.highest_held_title_tier >= 0 - } - add = { - # Add 10 wealth per character tier (up to a max of 50 wealth for emperors) - value = scope:owner.highest_held_title_tier - multiply = 10 - } - - # Add up to 25 wealth, scaling with capital's development - if = { - limit = { - exists = scope:owner.capital_county - } - scope:owner.capital_county = { - add = { - value = development_level - multiply = 0.25 - } - } - } - - # Tribal rulers get a final 50% penalty of all wealth modifiers for crafted artifacts. - if = { - limit = { scope:owner = { government_has_flag = government_is_tribal } } - multiply = 0.50 - } - } - - if = { - limit = { - exists = scope:inspiration_owner - } - scope:inspiration_owner = { - # Bonuses from Buildings - if = { - limit = { - court_owner ?= { - any_directly_owned_province = { - has_building_or_higher = smiths_05 - } - } - } - court_owner = { - every_directly_owned_province = { - limit = { - has_building_or_higher = smiths_05 - } - add = 2 - } - every_directly_owned_province = { - limit = { - has_building_or_higher = smiths_06 - } - add = 2 - } - every_directly_owned_province = { - limit = { - has_building_or_higher = smiths_07 - } - add = 2 - } - every_directly_owned_province = { - limit = { - has_building_or_higher = smiths_08 - } - add = 2 - } - every_directly_owned_province = { - limit = { - has_building_or_higher = blacksmiths_01 - } - add = 4 - } - every_directly_owned_province = { - limit = { - has_building_or_higher = blacksmiths_02 - } - add = 8 - } - every_directly_owned_province = { - limit = { - has_building_or_higher = blacksmiths_03 - } - add = 12 - } - } - } - if = { # Special Mines boost things significantly - limit = { - court_owner ?= { - any_directly_owned_province = { - has_any_special_mine_trigger = yes - } - } - OR = { - ep1_character_had_or_has_inspiration_type_trigger = { TYPE = armor } - ep1_character_had_or_has_inspiration_type_trigger = { TYPE = weapon } - ep1_character_had_or_has_inspiration_type_trigger = { TYPE = smith } - ep1_character_had_or_has_inspiration_type_trigger = { TYPE = artisan } - } - } - add = 20 - } - if = { # Universities boost Book Inspirations - limit = { - court_owner ?= { - any_directly_owned_province = { - has_university_building_trigger = yes - } - } - ep1_character_had_or_has_inspiration_type_trigger = { TYPE = book } - } - add = 20 - } - } - } - - #If it is worth bringing home from an adventure it is not common. - if = { - limit = { - exists = scope:adventurer - } - add = 20 - } - - # Lower wealth for 'local artisans', who should produce lower-quality artifacts. - if = { - limit = { - exists = scope:inspiration_owner - scope:inspiration_owner = { - has_character_flag = local_artisan - } - } - add = -20 - } - # Cultural tradition for piety level boosting artifacts - if = { - limit = { - court_owner.culture ?= { - has_cultural_parameter = piety_level_affect_artifact_quality - } - } - add = { - value = court_owner.piety_level - multiply = 5 - } - } - # Lacquered Armor - if = { - limit = { - scope:inspiration_owner.inspiration ?= { - has_inspiration_type = armor_inspiration - inspiration_sponsor.culture ?= { has_cultural_parameter = higher_quality_armor_artifacts_parameter } - } - } - add = 20 - } - # Old Ledger should not be too fancy (stewardship_wealth.1061) - if = { - limit = { - exists = scope:low_quality - } - max = 20 - } - - # Exotic Arms event - if = { - limit = { exists = scope:exotic_blade_quality } - if = { - limit = { scope:exotic_blade_quality = no } - max = 20 - } - else = { max = 60 } - } - min = 1 #Can't have negative Wealth - } - } - } -} - -#Effect used to influence the artifact's quality -change_artifact_quality_effect = { - save_scope_as = artifact_quality_scope - inspiration = { save_scope_as = inspiration } - if = { - limit = { - inspiration = { has_inspiration_type = research_inspiration } - } - if = { - limit = { - $AMOUNT$ > 3 - } - custom_tooltip = fp3_scholarship_research_success_gain_effect - } - else_if = { - limit = { - $AMOUNT$ < -3 - } - custom_tooltip = fp3_scholarship_research_success_loss_effect - } - else_if = { - limit = { - $AMOUNT$ > 0 - } - custom_tooltip = fp3_scholarship_research_success_slight_gain_effect - } - else_if = { - limit = { - $AMOUNT$ < 0 - } - custom_tooltip = fp3_scholarship_research_success_slight_loss_effect - } - scope:inspiration_owner = { - change_variable = { - name = research_success_chance - add = $AMOUNT$ - } - } - } - else = { - if = { - limit = { - $AMOUNT$ > 3 - } - custom_tooltip = change_artifact_quality_effect_gain - } - else_if = { - limit = { - $AMOUNT$ > 0 - } - custom_tooltip = change_artifact_quality_effect_slight_gain - } - else_if = { - limit = { - $AMOUNT$ > -3 - } - custom_tooltip = change_artifact_quality_effect_slight_loss - } - else_if = { - limit = { - $AMOUNT$ <= -3 - } - custom_tooltip = change_artifact_quality_effect_loss - } - hidden_effect = { - if = { - limit = { - NOT = { - exists = var:artifact_quality - } - } - set_variable = { - name = artifact_quality - value = $AMOUNT$ - } - } - else = { - change_variable = { - name = artifact_quality - add = $AMOUNT$ - } - } - } - } -} - -# Effect run to generate all required 'sub-features' for any existing features on an artifact. -get_artifact_feature_references_effect = { - if = { - limit = { - artifact_needs_pattern_trigger = yes - } - set_artifact_feature_group = decoration_pattern - } - if = { - limit = { - artifact_needs_material_inlay_trigger = yes - } - set_artifact_feature_group = decoration_material_inlay - } - if = { - limit = { - artifact_needs_material_wire_trigger = yes - } - set_artifact_feature_group = decoration_material_wire - } - if = { - limit = { - artifact_needs_material_cloth_trigger = yes - } - set_artifact_feature_group = generic_material_cloth - } - if = { - limit = { - artifact_needs_material_gem_trigger = yes - } - set_artifact_feature_group = decoration_material_gem - } - if = { - limit = { - artifact_needs_material_hsb_trigger = yes - } - set_artifact_feature_group = decoration_material_inlay_HSB - } - if = { - limit = { - artifact_needs_material_wood_trigger = yes - } - set_artifact_feature_group = generic_material_wood - } - if = { - limit = { - has_artifact_feature = decoration_pattern_local_animal - } - scope:owner = { - select_local_animal_effect = { TYPE = any } # Save scope to limit possible animals: any/big/small/dangerous/harmless/prowling - } - } - if = { - limit = { - has_artifact_feature = icon_decoration_pattern_saint - } - set_artifact_feature_group = icon_decoration - scope:owner = { - select_random_saint_effect = yes - } - } -} - - -# A pared-down list of cloth with most purely decorative cloths removed. Used for cordage and structurally-important constructions. -get_cloth_type_sturdy_effect = { - - if = { - limit = { - NOT = { exists = scope:$SCOPE_NAME$ } - } - random_list = { - # Wool - # - Found literally everywhere - 30 = { # Simple wool fabric, can vary wildly in quality and appearance depending on the yarn used to wave it as well as the weaver's skill. - trigger = { artifact_value_trigger = { VALUE = scope:wealth MIN = 0 MAX = 70 } } - save_scope_value_as = { name = $SCOPE_NAME$ value = flag:wool } - } - 10 = { # Wool from the very first shearing of a sheep. Soft, elastic, and slippery, used in high-grade textiles. - trigger = { artifact_value_trigger = { VALUE = scope:wealth MIN = 70 MAX = 999 } } - save_scope_value_as = { name = $SCOPE_NAME$ value = flag:lambswool } - } - - # Silk - # - Found pretty much everywhere but subsaharan Africa. - 30 = { # Plain silk weave. Average quality, but carries some statue and value simply due to its material. - trigger = { - artifact_value_trigger = { VALUE = scope:wealth MIN = 30 MAX = 999 } - NOT = { artifact_region_trigger = { CHARACTER = scope:owner REGION = material_cloth_no_silk } } - } - save_scope_value_as = { name = $SCOPE_NAME$ value = flag:silk } - } - - # Linen - # - Modern Germany was a major producer of linen, which was exported throughout all of Europe (but not really beyond that) - 40 = { # Plain weave flax fibers. Consistently average in quality and price, saw widespread use throughout the medieval era. - trigger = { - artifact_value_trigger = { VALUE = scope:wealth MIN = 0 MAX = 999 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_cloth_linen } - } - save_scope_value_as = { name = $SCOPE_NAME$ value = flag:linen } - } - 30 = { # Twill cotton-linen blend. As it a mixed fabric, practicing Jews are forbidden to wear it. - trigger = { - artifact_value_trigger = { VALUE = scope:wealth MIN = 40 MAX = 999 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_cloth_cotton } - NOT = { scope:owner.religion = religion:judaism_religion } - } - save_scope_value_as = { name = $SCOPE_NAME$ value = flag:fustian } - } - - # Cotton - # - Cotton has been grown in Egypt since ancient times, spread to Etheopia early on and then in the late medieval period to Europe and India. - 50 = { # Plain weave cotton - trigger = { - artifact_value_trigger = { VALUE = scope:wealth MIN = 0 MAX = 999 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_cloth_cotton } - } - save_scope_value_as = { name = $SCOPE_NAME$ value = flag:cotton } - } - } - } -} - -# A pared-down list of cloth containing only high-quality decorative threads. Used mostly for embroidery. -get_cloth_type_decorative_thread_effect = { - if = { - limit = { - NOT = { exists = scope:$SCOPE_NAME$ } - } - random_list = { - # Wool - # - Found literally everywhere - 10 = { # Wool from the very first shearing of a sheep. Soft, elastic, and slippery, used in high-grade textiles. - trigger = { artifact_value_trigger = { VALUE = scope:wealth MIN = 0 MAX = 999 } } - save_scope_value_as = { name = $SCOPE_NAME$ value = flag:lambswool } - } - - # Silk - # - Found pretty much everywhere but subsaharan Africa. - 30 = { # Plain silk weave. Average quality, but carries some statue and value simply due to its material. - trigger = { - artifact_value_trigger = { VALUE = scope:wealth MIN = 0 MAX = 70 } - NOT = { artifact_region_trigger = { CHARACTER = scope:owner REGION = material_cloth_no_silk } } - } - save_scope_value_as = { name = $SCOPE_NAME$ value = flag:silk } - } - 30 = { # Cloth woven from silk wrapped in silver. Similar to the cloth-of-gold below, but less expensive. - trigger = { - artifact_value_trigger = { VALUE = scope:wealth MIN = 40 MAX = 90 } - NOT = { artifact_region_trigger = { CHARACTER = scope:owner REGION = material_cloth_no_silk } } - } - save_scope_value_as = { name = $SCOPE_NAME$ value = flag:cloth_of_silver } - } - 50 = { # Cloth woven from silk wrapped in gold. In addition to being expensive, it was almost always outlawed for any non-royalty or non-clergy to wear. - trigger = { - artifact_value_trigger = { VALUE = scope:wealth MIN = 70 MAX = 999 } - NOT = { artifact_region_trigger = { CHARACTER = scope:owner REGION = material_cloth_no_silk } } - } - save_scope_value_as = { name = $SCOPE_NAME$ value = flag:cloth_of_gold } - } - - # Linen - # - Modern Germany was a major producer of linen, which was exported throughout all of Europe (but not really beyond that) - 50 = { # Plain weave flax fibers. Consistently average in quality and price, saw widespread use throughout the medieval era. - trigger = { - artifact_value_trigger = { VALUE = scope:wealth MIN = 0 MAX = 60 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_cloth_linen } - } - save_scope_value_as = { name = $SCOPE_NAME$ value = flag:linen } - } - - # Cotton - # - Cotton has been grown in Egypt since ancient times, spread to Etheopia early on and then in the late medieval period to Europe and India. - 50 = { # Plain weave cotton - trigger = { - artifact_value_trigger = { VALUE = scope:wealth MIN = 0 MAX = 60 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = world_europe_west_britannia } - } - save_scope_value_as = { name = $SCOPE_NAME$ value = flag:cotton } - } - } - } -} - -# HSB = Horn, Shell, Bone. Picks a semi-random material suitable for carving, inlay or other decorations. -# Basically animal-based materials that have a wide array of applications. -get_hsb_type_effect = { - if = { - limit = { - NOT = { exists = scope:$SCOPE_NAME$ } - } - random_list = { - # Common. All regions should have access to at least one of these. - 20 = { # Camel Bone - trigger = { - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_hsb_camel_bone } - } - save_scope_value_as = { name = $SCOPE_NAME$ value = flag:hsb_camel_bone } - } - 20 = { # Deer Antler - trigger = { - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_hsb_deer_antler } - } - save_scope_value_as = { name = $SCOPE_NAME$ value = flag:hsb_deer_antler } - } - 20 = { # Boar Tusk - trigger = { - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_hsb_boar_tusk } - } - save_scope_value_as = { name = $SCOPE_NAME$ value = flag:hsb_boar_tusk } - } - 20 = { # Seashell - trigger = { - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_hsb_seashell } - } - save_scope_value_as = { name = $SCOPE_NAME$ value = flag:hsb_seashell } - } - - # Rare, Expensive, or Region-Specifc. Not all regions will have access to these. - 80 = { # Tortoiseshell - trigger = { - AND = { - artifact_value_trigger = { VALUE = scope:wealth MIN = 50 MAX = 999 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_hsb_tortoiseshell } - } - } - save_scope_value_as = { name = $SCOPE_NAME$ value = flag:hsb_tortoiseshell } - } - 80 = { # Mother of Pearl - trigger = { - AND = { - artifact_value_trigger = { VALUE = scope:wealth MIN = 50 MAX = 999 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_hsb_mother_of_pearl } - } - } - save_scope_value_as = { name = $SCOPE_NAME$ value = flag:hsb_mother_of_pearl } - } - 80 = { # Ivory (Native) - trigger = { - AND = { - artifact_value_trigger = { VALUE = scope:wealth MIN = 50 MAX = 999 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_hsb_ivory_native } - } - } - save_scope_value_as = { name = $SCOPE_NAME$ value = flag:hsb_ivory } - } - 40 = { # Ivory (Imported) - trigger = { - AND = { - artifact_value_trigger = { VALUE = scope:wealth MIN = 80 MAX = 999 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_hsb_ivory_imported } - } - } - save_scope_value_as = { name = $SCOPE_NAME$ value = flag:hsb_ivory } - } - } - } -} - -add_scaled_artifact_modifier_prowess_effect = { - if = { - limit = { - rarity = common - } - random_list = { - 20 = { - # Base is 1 prowess - } - 15 = { - add_artifact_modifier = artifact_prowess_1_modifier - if = { # Daggers get less Prowess - limit = { exists = scope:weapon_type scope:weapon_type = flag:artifact_weapon_type_dagger } - add_artifact_modifier = artifact_prowess_1_negative_modifier - } - } - 5 = { - add_artifact_modifier = artifact_prowess_2_modifier - if = { # Daggers get less Prowess - limit = { exists = scope:weapon_type scope:weapon_type = flag:artifact_weapon_type_dagger } - add_artifact_modifier = artifact_prowess_1_negative_modifier - } - } - } - } - else_if = { - limit = { - rarity = masterwork - } - random_list = { - 20 = { - add_artifact_modifier = artifact_prowess_3_modifier - if = { # Daggers get less Prowess - limit = { exists = scope:weapon_type scope:weapon_type = flag:artifact_weapon_type_dagger } - add_artifact_modifier = artifact_prowess_1_negative_modifier - } - } - 15 = { - add_artifact_modifier = artifact_prowess_4_modifier - if = { # Daggers get less Prowess - limit = { exists = scope:weapon_type scope:weapon_type = flag:artifact_weapon_type_dagger } - add_artifact_modifier = artifact_prowess_1_negative_modifier - } - } - 5 = { - add_artifact_modifier = artifact_prowess_5_modifier - if = { # Daggers get less Prowess - limit = { exists = scope:weapon_type scope:weapon_type = flag:artifact_weapon_type_dagger } - add_artifact_modifier = artifact_prowess_1_negative_modifier - } - } - } - } - else_if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_prowess_6_modifier - if = { # Daggers get less Prowess - limit = { exists = scope:weapon_type scope:weapon_type = flag:artifact_weapon_type_dagger } - add_artifact_modifier = artifact_prowess_2_negative_modifier - } - } - 15 = { - add_artifact_modifier = artifact_prowess_7_modifier - if = { # Daggers get less Prowess - limit = { exists = scope:weapon_type scope:weapon_type = flag:artifact_weapon_type_dagger } - add_artifact_modifier = artifact_prowess_2_negative_modifier - } - } - 5 = { - add_artifact_modifier = artifact_prowess_8_modifier - if = { # Daggers get less Prowess - limit = { exists = scope:weapon_type scope:weapon_type = flag:artifact_weapon_type_dagger } - add_artifact_modifier = artifact_prowess_2_negative_modifier - } - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_prowess_9_modifier - if = { # Daggers get less Prowess - limit = { exists = scope:weapon_type scope:weapon_type = flag:artifact_weapon_type_dagger } - add_artifact_modifier = artifact_prowess_2_negative_modifier - } - } - 15 = { - add_artifact_modifier = artifact_prowess_10_modifier - if = { # Daggers get less Prowess - limit = { exists = scope:weapon_type scope:weapon_type = flag:artifact_weapon_type_dagger } - add_artifact_modifier = artifact_prowess_2_negative_modifier - } - } - 5 = { - add_artifact_modifier = artifact_prowess_11_modifier - if = { # Daggers get less Prowess - limit = { exists = scope:weapon_type scope:weapon_type = flag:artifact_weapon_type_dagger } - add_artifact_modifier = artifact_prowess_2_negative_modifier - } - } - } - } -} - -add_scaled_artifact_modifier_combat_effect = { - random_list = { - # Knight Limit - 20 = { - trigger = { - OR = { - rarity = famed - rarity = illustrious - } - } - modifier = { - exists = scope:inspiration_owner - scope:inspiration_owner = { has_variable = chosen_knights_mod } - add = 160 - } - if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_knight_limit_1_modifier - } - else_if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_knight_limit_2_modifier - } - } - - # Knight Effectiveness - 20 = { - modifier = { - exists = scope:inspiration_owner - scope:inspiration_owner = { has_variable = chosen_knights_mod } - add = 160 - } - if = { - limit = { - rarity = common - } - random_list = { - 20 = { - add_artifact_modifier = artifact_knight_effectiveness_1_modifier - } - 15 = { - add_artifact_modifier = artifact_knight_effectiveness_2_modifier - } - 5 = { - add_artifact_modifier = artifact_knight_effectiveness_3_modifier - } - } - } - else_if = { - limit = { - rarity = masterwork - } - random_list = { - 20 = { - add_artifact_modifier = artifact_knight_effectiveness_4_modifier - } - 15 = { - add_artifact_modifier = artifact_knight_effectiveness_5_modifier - } - 5 = { - add_artifact_modifier = artifact_knight_effectiveness_6_modifier - } - } - } - else_if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_knight_effectiveness_7_modifier - } - 15 = { - add_artifact_modifier = artifact_knight_effectiveness_8_modifier - } - 5 = { - add_artifact_modifier = artifact_knight_effectiveness_9_modifier - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_knight_effectiveness_10_modifier - } - 15 = { - add_artifact_modifier = artifact_knight_effectiveness_11_modifier - } - 5 = { - add_artifact_modifier = artifact_knight_effectiveness_12_modifier - } - } - } - - modifier = { # More likely if you have any "knightly" cultural traditions - factor = 1.5 - scope:owner = { - OR = { - culture = { has_cultural_tradition = tradition_chivalry } - culture = { has_cultural_tradition = tradition_martial_admiration } - culture = { has_cultural_tradition = tradition_futuwaa } - culture = { has_cultural_tradition = tradition_druzhina } - culture = { has_cultural_tradition = tradition_chanson_de_geste } - } - } - } - } - - # negate_prowess_penalty_add - 20 = { - trigger = { - artifact_slot_type = armor - } - if = { - limit = { - rarity = common - } - random_list = { - 20 = { - add_artifact_modifier = artifact_negate_prowess_penalty_add_1_modifier - } - 15 = { - add_artifact_modifier = artifact_negate_prowess_penalty_add_2_modifier - } - } - } - else_if = { - limit = { - rarity = masterwork - } - random_list = { - 20 = { - add_artifact_modifier = artifact_negate_prowess_penalty_add_3_modifier - } - 15 = { - add_artifact_modifier = artifact_negate_prowess_penalty_add_4_modifier - } - } - } - else_if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_negate_prowess_penalty_add_5_modifier - } - 15 = { - add_artifact_modifier = artifact_negate_prowess_penalty_add_6_modifier - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_negate_prowess_penalty_add_7_modifier - } - 15 = { - add_artifact_modifier = artifact_negate_prowess_penalty_add_8_modifier - } - } - } - } - - # Controlled Province Advantage - 20 = { - trigger = { - artifact_slot_type = armor - } - if = { - limit = { - rarity = common - } - random_list = { - 20 = { - add_artifact_modifier = artifact_controlled_province_advantage_1_modifier - } - 15 = { - add_artifact_modifier = artifact_controlled_province_advantage_2_modifier - } - } - } - else_if = { - limit = { - rarity = masterwork - } - random_list = { - 20 = { - add_artifact_modifier = artifact_controlled_province_advantage_3_modifier - } - 15 = { - add_artifact_modifier = artifact_controlled_province_advantage_4_modifier - } - } - } - else_if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_controlled_province_advantage_5_modifier - } - 15 = { - add_artifact_modifier = artifact_controlled_province_advantage_6_modifier - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_controlled_province_advantage_7_modifier - } - 15 = { - add_artifact_modifier = artifact_controlled_province_advantage_8_modifier - } - } - } - } - - # Tolerance Advantage — exclusive to weapons with religious decorations - 40 = { - trigger = { artifact_has_religious_decorations_trigger = yes } - if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_tolerance_advantage_mod_1_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_tolerance_advantage_mod_2_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_tolerance_advantage_mod_3_modifier - } - else_if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_tolerance_advantage_mod_4_modifier - } - } - - # Levy Reinforcement Rate Same Faith — exclusive to weapons with religious decorations - 40 = { - trigger = { artifact_has_religious_decorations_trigger = yes } - if = { - limit = { - rarity = common - } - random_list = { - 20 = { - add_artifact_modifier = artifact_levy_reinforcement_rate_same_faith_1_modifier - } - 15 = { - add_artifact_modifier = artifact_levy_reinforcement_rate_same_faith_2_modifier - } - 5 = { - add_artifact_modifier = artifact_levy_reinforcement_rate_same_faith_3_modifier - } - } - } - else_if = { - limit = { - rarity = masterwork - } - random_list = { - 20 = { - add_artifact_modifier = artifact_levy_reinforcement_rate_same_faith_4_modifier - } - 15 = { - add_artifact_modifier = artifact_levy_reinforcement_rate_same_faith_5_modifier - } - 5 = { - add_artifact_modifier = artifact_levy_reinforcement_rate_same_faith_6_modifier - } - } - } - else_if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_levy_reinforcement_rate_same_faith_7_modifier - } - 15 = { - add_artifact_modifier = artifact_levy_reinforcement_rate_same_faith_8_modifier - } - 5 = { - add_artifact_modifier = artifact_levy_reinforcement_rate_same_faith_9_modifier - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_levy_reinforcement_rate_same_faith_10_modifier - } - 15 = { - add_artifact_modifier = artifact_levy_reinforcement_rate_same_faith_11_modifier - } - 5 = { - add_artifact_modifier = artifact_levy_reinforcement_rate_same_faith_12_modifier - } - } - } - } - - # zealot_levy_contribution_mult — exclusive to weapons with religious decorations - 40 = { - trigger = { artifact_has_religious_decorations_trigger = yes } - if = { - limit = { rarity = common } - add_artifact_modifier = artifact_zealot_levy_contribution_mult_1_modifier - } - else_if = { - limit = { rarity = masterwork } - add_artifact_modifier = artifact_zealot_levy_contribution_mult_2_modifier - } - else_if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_zealot_levy_contribution_mult_3_modifier - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_zealot_levy_contribution_mult_4_modifier - } - } - - # glory_hound_levy_contribution_mult - 20 = { - if = { - limit = { rarity = common } - add_artifact_modifier = artifact_glory_hound_levy_contribution_mult_1_modifier - } - else_if = { - limit = { rarity = masterwork } - add_artifact_modifier = artifact_glory_hound_levy_contribution_mult_2_modifier - } - else_if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_glory_hound_levy_contribution_mult_3_modifier - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_glory_hound_levy_contribution_mult_4_modifier - } - } - - # belligerent_levy_contribution_mult - 20 = { - if = { - limit = { rarity = common } - add_artifact_modifier = artifact_belligerent_levy_contribution_mult_1_modifier - } - else_if = { - limit = { rarity = masterwork } - add_artifact_modifier = artifact_belligerent_levy_contribution_mult_2_modifier - } - else_if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_belligerent_levy_contribution_mult_3_modifier - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_belligerent_levy_contribution_mult_4_modifier - } - } - - # Raid Speed - exclusive to cultures that can raid - 40 = { - trigger = { - artifact_slot_type = primary_armament - scope:owner = { - can_raid_trigger = yes - } - } - modifier = { - exists = scope:inspiration_owner - scope:inspiration_owner = { has_variable = chosen_raid_mod } - add = 120 - } - if = { - limit = { - rarity = common - } - random_list = { - 20 = { - add_artifact_modifier = artifact_raid_speed_1_modifier - } - 15 = { - add_artifact_modifier = artifact_raid_speed_2_modifier - } - 5 = { - add_artifact_modifier = artifact_raid_speed_3_modifier - } - } - } - else_if = { - limit = { - rarity = masterwork - } - random_list = { - 20 = { - add_artifact_modifier = artifact_raid_speed_4_modifier - } - 15 = { - add_artifact_modifier = artifact_raid_speed_5_modifier - } - 5 = { - add_artifact_modifier = artifact_raid_speed_6_modifier - } - } - } - else_if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_raid_speed_7_modifier - } - 15 = { - add_artifact_modifier = artifact_raid_speed_8_modifier - } - 5 = { - add_artifact_modifier = artifact_raid_speed_9_modifier - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_raid_speed_10_modifier - } - 15 = { - add_artifact_modifier = artifact_raid_speed_11_modifier - } - 5 = { - add_artifact_modifier = artifact_raid_speed_12_modifier - } - } - } - } - - # enemy_hard_casualty_modifier - 20 = { - trigger = { - artifact_slot_type = primary_armament - } - modifier = { - exists = scope:inspiration_owner - scope:inspiration_owner = { has_variable = chosen_casualties_mod } - add = 160 - } - if = { - limit = { - rarity = common - } - random_list = { - 20 = { - add_artifact_modifier = artifact_enemy_hard_casualty_modifier_1_modifier - } - 15 = { - add_artifact_modifier = artifact_enemy_hard_casualty_modifier_2_modifier - } - 5 = { - add_artifact_modifier = artifact_enemy_hard_casualty_modifier_3_modifier - } - } - } - else_if = { - limit = { - rarity = masterwork - } - random_list = { - 20 = { - add_artifact_modifier = artifact_enemy_hard_casualty_modifier_4_modifier - } - 15 = { - add_artifact_modifier = artifact_enemy_hard_casualty_modifier_5_modifier - } - 5 = { - add_artifact_modifier = artifact_enemy_hard_casualty_modifier_6_modifier - } - } - } - else_if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_enemy_hard_casualty_modifier_7_modifier - } - 15 = { - add_artifact_modifier = artifact_enemy_hard_casualty_modifier_8_modifier - } - 5 = { - add_artifact_modifier = artifact_enemy_hard_casualty_modifier_9_modifier - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_enemy_hard_casualty_modifier_10_modifier - } - 15 = { - add_artifact_modifier = artifact_enemy_hard_casualty_modifier_11_modifier - } - 5 = { - add_artifact_modifier = artifact_enemy_hard_casualty_modifier_12_modifier - } - } - } - } - - # hard_casualty_modifier - 20 = { - trigger = { - artifact_slot_type = armor - } - modifier = { - exists = scope:inspiration_owner - scope:inspiration_owner = { has_variable = chosen_casualties_mod } - add = 160 - } - if = { - limit = { - rarity = common - } - random_list = { - 20 = { - add_artifact_modifier = artifact_hard_casualty_modifier_1_modifier - } - 15 = { - add_artifact_modifier = artifact_hard_casualty_modifier_2_modifier - } - 5 = { - add_artifact_modifier = artifact_hard_casualty_modifier_3_modifier - } - } - } - else_if = { - limit = { - rarity = masterwork - } - random_list = { - 20 = { - add_artifact_modifier = artifact_hard_casualty_modifier_4_modifier - } - 15 = { - add_artifact_modifier = artifact_hard_casualty_modifier_5_modifier - } - 5 = { - add_artifact_modifier = artifact_hard_casualty_modifier_6_modifier - } - } - } - else_if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_hard_casualty_modifier_7_modifier - } - 15 = { - add_artifact_modifier = artifact_hard_casualty_modifier_8_modifier - } - 5 = { - add_artifact_modifier = artifact_hard_casualty_modifier_9_modifier - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_hard_casualty_modifier_10_modifier - } - 15 = { - add_artifact_modifier = artifact_hard_casualty_modifier_11_modifier - } - 5 = { - add_artifact_modifier = artifact_hard_casualty_modifier_12_modifier - } - } - } - } - - # terrain_advantage - 20 = { - trigger = { - artifact_slot_type = primary_armament - scope:owner = { - OR = { - any_sub_realm_county = { - count >= 5 - title_province = { - OR = { - terrain = plains - terrain = farmlands - terrain = hills - terrain = mountains - terrain = desert - terrain = desert_mountains - terrain = oasis - terrain = jungle - terrain = forest - terrain = taiga - terrain = wetlands - terrain = steppe - terrain = floodplains - terrain = drylands - } - } - } - any_sub_realm_county = { - percent >= 0.3 - title_province = { - OR = { - terrain = plains - terrain = farmlands - terrain = hills - terrain = mountains - terrain = desert - terrain = desert_mountains - terrain = oasis - terrain = jungle - terrain = forest - terrain = taiga - terrain = wetlands - terrain = steppe - terrain = floodplains - terrain = drylands - } - } - } - } - } - } - modifier = { - exists = scope:inspiration_owner - scope:inspiration_owner = { has_variable = chosen_terrain_mod } - add = 160 - } - random_list = { - 10 = { # plains_advantage - trigger = { - scope:owner = { - OR = { - any_sub_realm_county = { - count >= 5 - title_province = { - terrain = plains - } - } - any_sub_realm_county = { - percent >= 0.3 - title_province = { - terrain = plains - } - } - } - } - } - if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_plains_advantage_1_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_plains_advantage_2_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_plains_advantage_3_modifier - } - else_if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_plains_advantage_4_modifier - } - } - 10 = { # farmlands_advantage - trigger = { - scope:owner = { - OR = { - any_sub_realm_county = { - count >= 5 - title_province = { - terrain = farmlands - } - } - any_sub_realm_county = { - percent >= 0.3 - title_province = { - terrain = farmlands - } - } - } - } - } - if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_farmlands_advantage_1_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_farmlands_advantage_2_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_farmlands_advantage_3_modifier - } - else_if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_farmlands_advantage_4_modifier - } - } - 10 = { # hills_advantage - trigger = { - scope:owner = { - OR = { - any_sub_realm_county = { - count >= 5 - title_province = { - terrain = hills - } - } - any_sub_realm_county = { - percent >= 0.3 - title_province = { - terrain = hills - } - } - } - } - } - if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_hills_advantage_1_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_hills_advantage_2_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_hills_advantage_3_modifier - } - else_if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_hills_advantage_4_modifier - } - } - 10 = { # mountains_advantage - trigger = { - scope:owner = { - OR = { - any_sub_realm_county = { - count >= 5 - title_province = { - terrain = mountains - } - } - any_sub_realm_county = { - percent >= 0.3 - title_province = { - terrain = mountains - } - } - } - } - } - if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_mountains_advantage_1_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_mountains_advantage_2_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_mountains_advantage_3_modifier - } - else_if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_mountains_advantage_4_modifier - } - } - 10 = { # desert_advantage - trigger = { - scope:owner = { - OR = { - any_sub_realm_county = { - count >= 5 - title_province = { - terrain = desert - } - } - any_sub_realm_county = { - percent >= 0.3 - title_province = { - terrain = desert - } - } - } - } - } - if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_desert_advantage_1_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_desert_advantage_2_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_desert_advantage_3_modifier - } - else_if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_desert_advantage_4_modifier - } - } - 10 = { # desert_mountains_advantage - trigger = { - scope:owner = { - OR = { - any_sub_realm_county = { - count >= 5 - title_province = { - terrain = desert_mountains - } - } - any_sub_realm_county = { - percent >= 0.3 - title_province = { - terrain = desert_mountains - } - } - } - } - } - if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_desert_mountains_advantage_1_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_desert_mountains_advantage_2_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_desert_mountains_advantage_3_modifier - } - else_if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_desert_mountains_advantage_4_modifier - } - } - 10 = { # oasis_advantage - trigger = { - scope:owner = { - OR = { - any_sub_realm_county = { - count >= 5 - title_province = { - terrain = oasis - } - } - any_sub_realm_county = { - percent >= 0.3 - title_province = { - terrain = oasis - } - } - } - } - } - if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_oasis_advantage_1_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_oasis_advantage_2_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_oasis_advantage_3_modifier - } - else_if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_oasis_advantage_4_modifier - } - } - 10 = { # jungle_advantage - trigger = { - scope:owner = { - OR = { - any_sub_realm_county = { - count >= 5 - title_province = { - terrain = jungle - } - } - any_sub_realm_county = { - percent >= 0.3 - title_province = { - terrain = jungle - } - } - } - } - } - if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_jungle_advantage_1_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_jungle_advantage_2_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_jungle_advantage_3_modifier - } - else_if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_jungle_advantage_4_modifier - } - } - 10 = { # forest_advantage - trigger = { - scope:owner = { - OR = { - any_sub_realm_county = { - count >= 5 - title_province = { - terrain = forest - } - } - any_sub_realm_county = { - percent >= 0.3 - title_province = { - terrain = forest - } - } - } - } - } - if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_forest_advantage_1_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_forest_advantage_2_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_forest_advantage_3_modifier - } - else_if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_forest_advantage_4_modifier - } - } - 10 = { # taiga_advantage - trigger = { - scope:owner = { - OR = { - any_sub_realm_county = { - count >= 5 - title_province = { - terrain = taiga - } - } - any_sub_realm_county = { - percent >= 0.3 - title_province = { - terrain = taiga - } - } - } - } - } - if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_taiga_advantage_1_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_taiga_advantage_2_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_taiga_advantage_3_modifier - } - else_if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_taiga_advantage_4_modifier - } - } - 10 = { # wetlands_advantage - trigger = { - scope:owner = { - OR = { - any_sub_realm_county = { - count >= 5 - title_province = { - terrain = wetlands - } - } - any_sub_realm_county = { - percent >= 0.3 - title_province = { - terrain = wetlands - } - } - } - } - } - if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_wetlands_advantage_1_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_wetlands_advantage_2_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_wetlands_advantage_3_modifier - } - else_if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_wetlands_advantage_4_modifier - } - } - 10 = { # steppe_advantage - trigger = { - scope:owner = { - OR = { - any_sub_realm_county = { - count >= 5 - title_province = { - terrain = steppe - } - } - any_sub_realm_county = { - percent >= 0.3 - title_province = { - terrain = steppe - } - } - } - } - } - if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_steppe_advantage_1_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_steppe_advantage_2_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_steppe_advantage_3_modifier - } - else_if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_steppe_advantage_4_modifier - } - } - 10 = { # floodplains_advantage - trigger = { - scope:owner = { - OR = { - any_sub_realm_county = { - count >= 5 - title_province = { - terrain = floodplains - } - } - any_sub_realm_county = { - percent >= 0.3 - title_province = { - terrain = floodplains - } - } - } - } - } - if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_floodplains_advantage_1_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_floodplains_advantage_2_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_floodplains_advantage_3_modifier - } - else_if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_floodplains_advantage_4_modifier - } - } - 10 = { # drylands_advantage - trigger = { - scope:owner = { - OR = { - any_sub_realm_county = { - count >= 5 - title_province = { - terrain = drylands - } - } - any_sub_realm_county = { - percent >= 0.3 - title_province = { - terrain = drylands - } - } - } - } - } - if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_drylands_advantage_1_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_drylands_advantage_2_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_drylands_advantage_3_modifier - } - else_if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_drylands_advantage_4_modifier - } - } - } - } - - # pursue_efficiency - 20 = { - trigger = { - artifact_slot_type = primary_armament - OR = { - rarity = famed - rarity = illustrious - } - } - if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_pursue_efficiency_1_modifier - } - 15 = { - add_artifact_modifier = artifact_pursue_efficiency_2_modifier - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_pursue_efficiency_3_modifier - } - 15 = { - add_artifact_modifier = artifact_pursue_efficiency_4_modifier - } - } - } - } - - # retreat_losses - 20 = { - trigger = { - artifact_slot_type = armor - OR = { - rarity = famed - rarity = illustrious - } - } - if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_retreat_losses_1_modifier - } - 15 = { - add_artifact_modifier = artifact_retreat_losses_2_modifier - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_retreat_losses_3_modifier - } - 15 = { - add_artifact_modifier = artifact_retreat_losses_4_modifier - } - } - } - } - } -} - -add_2_scaled_artifact_modifier_combat_effect = { - random_list = { - pick = 2 - unique = yes - # Knight Limit - 20 = { - trigger = { - OR = { - rarity = famed - rarity = illustrious - } - } - modifier = { - exists = scope:inspiration_owner - scope:inspiration_owner = { has_variable = chosen_knights_mod } - add = 160 - } - if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_knight_limit_1_modifier - } - else_if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_knight_limit_2_modifier - } - } - - # Knight Effectiveness - 20 = { - modifier = { - exists = scope:inspiration_owner - scope:inspiration_owner = { has_variable = chosen_knights_mod } - add = 160 - } - if = { - limit = { - rarity = common - } - random_list = { - 20 = { - add_artifact_modifier = artifact_knight_effectiveness_1_modifier - } - 15 = { - add_artifact_modifier = artifact_knight_effectiveness_2_modifier - } - 5 = { - add_artifact_modifier = artifact_knight_effectiveness_3_modifier - } - } - } - else_if = { - limit = { - rarity = masterwork - } - random_list = { - 20 = { - add_artifact_modifier = artifact_knight_effectiveness_4_modifier - } - 15 = { - add_artifact_modifier = artifact_knight_effectiveness_5_modifier - } - 5 = { - add_artifact_modifier = artifact_knight_effectiveness_6_modifier - } - } - } - else_if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_knight_effectiveness_7_modifier - } - 15 = { - add_artifact_modifier = artifact_knight_effectiveness_8_modifier - } - 5 = { - add_artifact_modifier = artifact_knight_effectiveness_9_modifier - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_knight_effectiveness_10_modifier - } - 15 = { - add_artifact_modifier = artifact_knight_effectiveness_11_modifier - } - 5 = { - add_artifact_modifier = artifact_knight_effectiveness_12_modifier - } - } - } - - modifier = { # More likely if you have any "knightly" cultural traditions - factor = 1.5 - scope:owner = { - OR = { - culture = { has_cultural_tradition = tradition_chivalry } - culture = { has_cultural_tradition = tradition_martial_admiration } - culture = { has_cultural_tradition = tradition_futuwaa } - culture = { has_cultural_tradition = tradition_druzhina } - culture = { has_cultural_tradition = tradition_chanson_de_geste } - } - } - } - } - - # negate_prowess_penalty_add - 20 = { - trigger = { - artifact_slot_type = armor - } - if = { - limit = { - rarity = common - } - random_list = { - 20 = { - add_artifact_modifier = artifact_negate_prowess_penalty_add_1_modifier - } - 15 = { - add_artifact_modifier = artifact_negate_prowess_penalty_add_2_modifier - } - } - } - else_if = { - limit = { - rarity = masterwork - } - random_list = { - 20 = { - add_artifact_modifier = artifact_negate_prowess_penalty_add_3_modifier - } - 15 = { - add_artifact_modifier = artifact_negate_prowess_penalty_add_4_modifier - } - } - } - else_if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_negate_prowess_penalty_add_5_modifier - } - 15 = { - add_artifact_modifier = artifact_negate_prowess_penalty_add_6_modifier - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_negate_prowess_penalty_add_7_modifier - } - 15 = { - add_artifact_modifier = artifact_negate_prowess_penalty_add_8_modifier - } - } - } - } - - # Controlled Province Advantage - 20 = { - trigger = { - artifact_slot_type = armor - } - if = { - limit = { - rarity = common - } - random_list = { - 20 = { - add_artifact_modifier = artifact_controlled_province_advantage_1_modifier - } - 15 = { - add_artifact_modifier = artifact_controlled_province_advantage_2_modifier - } - } - } - else_if = { - limit = { - rarity = masterwork - } - random_list = { - 20 = { - add_artifact_modifier = artifact_controlled_province_advantage_3_modifier - } - 15 = { - add_artifact_modifier = artifact_controlled_province_advantage_4_modifier - } - } - } - else_if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_controlled_province_advantage_5_modifier - } - 15 = { - add_artifact_modifier = artifact_controlled_province_advantage_6_modifier - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_controlled_province_advantage_7_modifier - } - 15 = { - add_artifact_modifier = artifact_controlled_province_advantage_8_modifier - } - } - } - } - - # Tolerance Advantage — exclusive to weapons with religious decorations - 40 = { - trigger = { artifact_has_religious_decorations_trigger = yes } - if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_tolerance_advantage_mod_1_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_tolerance_advantage_mod_2_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_tolerance_advantage_mod_3_modifier - } - else_if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_tolerance_advantage_mod_4_modifier - } - } - - # Levy Reinforcement Rate Same Faith — exclusive to weapons with religious decorations - 40 = { - trigger = { artifact_has_religious_decorations_trigger = yes } - if = { - limit = { - rarity = common - } - random_list = { - 20 = { - add_artifact_modifier = artifact_levy_reinforcement_rate_same_faith_1_modifier - } - 15 = { - add_artifact_modifier = artifact_levy_reinforcement_rate_same_faith_2_modifier - } - 5 = { - add_artifact_modifier = artifact_levy_reinforcement_rate_same_faith_3_modifier - } - } - } - else_if = { - limit = { - rarity = masterwork - } - random_list = { - 20 = { - add_artifact_modifier = artifact_levy_reinforcement_rate_same_faith_4_modifier - } - 15 = { - add_artifact_modifier = artifact_levy_reinforcement_rate_same_faith_5_modifier - } - 5 = { - add_artifact_modifier = artifact_levy_reinforcement_rate_same_faith_6_modifier - } - } - } - else_if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_levy_reinforcement_rate_same_faith_7_modifier - } - 15 = { - add_artifact_modifier = artifact_levy_reinforcement_rate_same_faith_8_modifier - } - 5 = { - add_artifact_modifier = artifact_levy_reinforcement_rate_same_faith_9_modifier - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_levy_reinforcement_rate_same_faith_10_modifier - } - 15 = { - add_artifact_modifier = artifact_levy_reinforcement_rate_same_faith_11_modifier - } - 5 = { - add_artifact_modifier = artifact_levy_reinforcement_rate_same_faith_12_modifier - } - } - } - } - - # Raid Speed - exclusive to cultures that can raid - 40 = { - trigger = { - artifact_slot_type = primary_armament - scope:owner = { - can_raid_trigger = yes - } - } - modifier = { - exists = scope:inspiration_owner - scope:inspiration_owner = { has_variable = chosen_raid_mod } - add = 120 - } - if = { - limit = { - rarity = common - } - random_list = { - 20 = { - add_artifact_modifier = artifact_raid_speed_1_modifier - } - 15 = { - add_artifact_modifier = artifact_raid_speed_2_modifier - } - 5 = { - add_artifact_modifier = artifact_raid_speed_3_modifier - } - } - } - else_if = { - limit = { - rarity = masterwork - } - random_list = { - 20 = { - add_artifact_modifier = artifact_raid_speed_4_modifier - } - 15 = { - add_artifact_modifier = artifact_raid_speed_5_modifier - } - 5 = { - add_artifact_modifier = artifact_raid_speed_6_modifier - } - } - } - else_if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_raid_speed_7_modifier - } - 15 = { - add_artifact_modifier = artifact_raid_speed_8_modifier - } - 5 = { - add_artifact_modifier = artifact_raid_speed_9_modifier - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_raid_speed_10_modifier - } - 15 = { - add_artifact_modifier = artifact_raid_speed_11_modifier - } - 5 = { - add_artifact_modifier = artifact_raid_speed_12_modifier - } - } - } - } - - # enemy_hard_casualty_modifier - 20 = { - trigger = { - artifact_slot_type = primary_armament - } - if = { - limit = { - rarity = common - } - random_list = { - 20 = { - add_artifact_modifier = artifact_enemy_hard_casualty_modifier_1_modifier - } - 15 = { - add_artifact_modifier = artifact_enemy_hard_casualty_modifier_2_modifier - } - 5 = { - add_artifact_modifier = artifact_enemy_hard_casualty_modifier_3_modifier - } - } - } - else_if = { - limit = { - rarity = masterwork - } - random_list = { - 20 = { - add_artifact_modifier = artifact_enemy_hard_casualty_modifier_4_modifier - } - 15 = { - add_artifact_modifier = artifact_enemy_hard_casualty_modifier_5_modifier - } - 5 = { - add_artifact_modifier = artifact_enemy_hard_casualty_modifier_6_modifier - } - } - } - else_if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_enemy_hard_casualty_modifier_7_modifier - } - 15 = { - add_artifact_modifier = artifact_enemy_hard_casualty_modifier_8_modifier - } - 5 = { - add_artifact_modifier = artifact_enemy_hard_casualty_modifier_9_modifier - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_enemy_hard_casualty_modifier_10_modifier - } - 15 = { - add_artifact_modifier = artifact_enemy_hard_casualty_modifier_11_modifier - } - 5 = { - add_artifact_modifier = artifact_enemy_hard_casualty_modifier_12_modifier - } - } - } - } - - # hard_casualty_modifier - 20 = { - trigger = { - artifact_slot_type = armor - } - if = { - limit = { - rarity = common - } - random_list = { - 20 = { - add_artifact_modifier = artifact_hard_casualty_modifier_1_modifier - } - 15 = { - add_artifact_modifier = artifact_hard_casualty_modifier_2_modifier - } - 5 = { - add_artifact_modifier = artifact_hard_casualty_modifier_3_modifier - } - } - } - else_if = { - limit = { - rarity = masterwork - } - random_list = { - 20 = { - add_artifact_modifier = artifact_hard_casualty_modifier_4_modifier - } - 15 = { - add_artifact_modifier = artifact_hard_casualty_modifier_5_modifier - } - 5 = { - add_artifact_modifier = artifact_hard_casualty_modifier_6_modifier - } - } - } - else_if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_hard_casualty_modifier_7_modifier - } - 15 = { - add_artifact_modifier = artifact_hard_casualty_modifier_8_modifier - } - 5 = { - add_artifact_modifier = artifact_hard_casualty_modifier_9_modifier - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_hard_casualty_modifier_10_modifier - } - 15 = { - add_artifact_modifier = artifact_hard_casualty_modifier_11_modifier - } - 5 = { - add_artifact_modifier = artifact_hard_casualty_modifier_12_modifier - } - } - } - } - - # terrain_advantage - 20 = { - trigger = { - artifact_slot_type = primary_armament - scope:owner = { - OR = { - any_sub_realm_county = { - count >= 5 - title_province = { - OR = { - terrain = plains - terrain = farmlands - terrain = hills - terrain = mountains - terrain = desert - terrain = desert_mountains - terrain = oasis - terrain = jungle - terrain = forest - terrain = taiga - terrain = wetlands - terrain = steppe - terrain = floodplains - terrain = drylands - } - } - } - any_sub_realm_county = { - percent >= 0.3 - title_province = { - OR = { - terrain = plains - terrain = farmlands - terrain = hills - terrain = mountains - terrain = desert - terrain = desert_mountains - terrain = oasis - terrain = jungle - terrain = forest - terrain = taiga - terrain = wetlands - terrain = steppe - terrain = floodplains - terrain = drylands - } - } - } - } - } - } - random_list = { - 10 = { # plains_advantage - trigger = { - scope:owner = { - OR = { - any_sub_realm_county = { - count >= 5 - title_province = { - terrain = plains - } - } - any_sub_realm_county = { - percent >= 0.3 - title_province = { - terrain = plains - } - } - } - } - } - if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_plains_advantage_1_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_plains_advantage_2_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_plains_advantage_3_modifier - } - else_if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_plains_advantage_4_modifier - } - } - 10 = { # farmlands_advantage - trigger = { - scope:owner = { - OR = { - any_sub_realm_county = { - count >= 5 - title_province = { - terrain = farmlands - } - } - any_sub_realm_county = { - percent >= 0.3 - title_province = { - terrain = farmlands - } - } - } - } - } - if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_farmlands_advantage_1_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_farmlands_advantage_2_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_farmlands_advantage_3_modifier - } - else_if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_farmlands_advantage_4_modifier - } - } - 10 = { # hills_advantage - trigger = { - scope:owner = { - OR = { - any_sub_realm_county = { - count >= 5 - title_province = { - terrain = hills - } - } - any_sub_realm_county = { - percent >= 0.3 - title_province = { - terrain = hills - } - } - } - } - } - if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_hills_advantage_1_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_hills_advantage_2_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_hills_advantage_3_modifier - } - else_if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_hills_advantage_4_modifier - } - } - 10 = { # mountains_advantage - trigger = { - scope:owner = { - OR = { - any_sub_realm_county = { - count >= 5 - title_province = { - terrain = mountains - } - } - any_sub_realm_county = { - percent >= 0.3 - title_province = { - terrain = mountains - } - } - } - } - } - if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_mountains_advantage_1_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_mountains_advantage_2_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_mountains_advantage_3_modifier - } - else_if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_mountains_advantage_4_modifier - } - } - 10 = { # desert_advantage - trigger = { - scope:owner = { - OR = { - any_sub_realm_county = { - count >= 5 - title_province = { - terrain = desert - } - } - any_sub_realm_county = { - percent >= 0.3 - title_province = { - terrain = desert - } - } - } - } - } - if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_desert_advantage_1_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_desert_advantage_2_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_desert_advantage_3_modifier - } - else_if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_desert_advantage_4_modifier - } - } - 10 = { # desert_mountains_advantage - trigger = { - scope:owner = { - OR = { - any_sub_realm_county = { - count >= 5 - title_province = { - terrain = desert_mountains - } - } - any_sub_realm_county = { - percent >= 0.3 - title_province = { - terrain = desert_mountains - } - } - } - } - } - if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_desert_mountains_advantage_1_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_desert_mountains_advantage_2_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_desert_mountains_advantage_3_modifier - } - else_if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_desert_mountains_advantage_4_modifier - } - } - 10 = { # oasis_advantage - trigger = { - scope:owner = { - OR = { - any_sub_realm_county = { - count >= 5 - title_province = { - terrain = oasis - } - } - any_sub_realm_county = { - percent >= 0.3 - title_province = { - terrain = oasis - } - } - } - } - } - if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_oasis_advantage_1_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_oasis_advantage_2_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_oasis_advantage_3_modifier - } - else_if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_oasis_advantage_4_modifier - } - } - 10 = { # jungle_advantage - trigger = { - scope:owner = { - OR = { - any_sub_realm_county = { - count >= 5 - title_province = { - terrain = jungle - } - } - any_sub_realm_county = { - percent >= 0.3 - title_province = { - terrain = jungle - } - } - } - } - } - if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_jungle_advantage_1_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_jungle_advantage_2_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_jungle_advantage_3_modifier - } - else_if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_jungle_advantage_4_modifier - } - } - 10 = { # forest_advantage - trigger = { - scope:owner = { - OR = { - any_sub_realm_county = { - count >= 5 - title_province = { - terrain = forest - } - } - any_sub_realm_county = { - percent >= 0.3 - title_province = { - terrain = forest - } - } - } - } - } - if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_forest_advantage_1_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_forest_advantage_2_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_forest_advantage_3_modifier - } - else_if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_forest_advantage_4_modifier - } - } - 10 = { # taiga_advantage - trigger = { - scope:owner = { - OR = { - any_sub_realm_county = { - count >= 5 - title_province = { - terrain = taiga - } - } - any_sub_realm_county = { - percent >= 0.3 - title_province = { - terrain = taiga - } - } - } - } - } - if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_taiga_advantage_1_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_taiga_advantage_2_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_taiga_advantage_3_modifier - } - else_if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_taiga_advantage_4_modifier - } - } - 10 = { # wetlands_advantage - trigger = { - scope:owner = { - OR = { - any_sub_realm_county = { - count >= 5 - title_province = { - terrain = wetlands - } - } - any_sub_realm_county = { - percent >= 0.3 - title_province = { - terrain = wetlands - } - } - } - } - } - if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_wetlands_advantage_1_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_wetlands_advantage_2_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_wetlands_advantage_3_modifier - } - else_if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_wetlands_advantage_4_modifier - } - } - 10 = { # steppe_advantage - trigger = { - scope:owner = { - OR = { - any_sub_realm_county = { - count >= 5 - title_province = { - terrain = steppe - } - } - any_sub_realm_county = { - percent >= 0.3 - title_province = { - terrain = steppe - } - } - } - } - } - if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_steppe_advantage_1_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_steppe_advantage_2_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_steppe_advantage_3_modifier - } - else_if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_steppe_advantage_4_modifier - } - } - 10 = { # floodplains_advantage - trigger = { - scope:owner = { - OR = { - any_sub_realm_county = { - count >= 5 - title_province = { - terrain = floodplains - } - } - any_sub_realm_county = { - percent >= 0.3 - title_province = { - terrain = floodplains - } - } - } - } - } - if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_floodplains_advantage_1_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_floodplains_advantage_2_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_floodplains_advantage_3_modifier - } - else_if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_floodplains_advantage_4_modifier - } - } - 10 = { # drylands_advantage - trigger = { - scope:owner = { - OR = { - any_sub_realm_county = { - count >= 5 - title_province = { - terrain = drylands - } - } - any_sub_realm_county = { - percent >= 0.3 - title_province = { - terrain = drylands - } - } - } - } - } - if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_drylands_advantage_1_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_drylands_advantage_2_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_drylands_advantage_3_modifier - } - else_if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_drylands_advantage_4_modifier - } - } - } - } - - # pursue_efficiency - 20 = { - trigger = { - artifact_slot_type = primary_armament - OR = { - rarity = famed - rarity = illustrious - } - } - if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_pursue_efficiency_1_modifier - } - 15 = { - add_artifact_modifier = artifact_pursue_efficiency_2_modifier - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_pursue_efficiency_3_modifier - } - 15 = { - add_artifact_modifier = artifact_pursue_efficiency_4_modifier - } - } - } - } - - # retreat_losses - 20 = { - trigger = { - artifact_slot_type = armor - OR = { - rarity = famed - rarity = illustrious - } - } - if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_retreat_losses_1_modifier - } - 15 = { - add_artifact_modifier = artifact_retreat_losses_2_modifier - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_retreat_losses_3_modifier - } - 15 = { - add_artifact_modifier = artifact_retreat_losses_4_modifier - } - } - } - } - } -} - -add_scaled_artifact_modifier_prestige_effect = { - if = { - limit = { - rarity = common - } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_prestige_1_modifier - } - 15 = { - add_artifact_modifier = artifact_monthly_prestige_2_modifier - } - } - } - else_if = { - limit = { - rarity = masterwork - } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_prestige_3_modifier - } - 15 = { - add_artifact_modifier = artifact_monthly_prestige_4_modifier - } - } - } - else_if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_prestige_5_modifier - } - 15 = { - add_artifact_modifier = artifact_monthly_prestige_6_modifier - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_prestige_7_modifier - } - 15 = { - add_artifact_modifier = artifact_monthly_prestige_8_modifier - } - } - } -} - -add_scaled_artifact_modifier_minor_prestige_effect = { - if = { - limit = { - rarity = common - } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_minor_prestige_1_modifier - } - 15 = { - add_artifact_modifier = artifact_monthly_minor_prestige_2_modifier - } - } - } - else_if = { - limit = { - rarity = masterwork - } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_minor_prestige_3_modifier - } - 15 = { - add_artifact_modifier = artifact_monthly_minor_prestige_4_modifier - } - } - } - else_if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_minor_prestige_5_modifier - } - 15 = { - add_artifact_modifier = artifact_monthly_minor_prestige_6_modifier - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_minor_prestige_7_modifier - } - 15 = { - add_artifact_modifier = artifact_monthly_minor_prestige_8_modifier - } - } - } -} - -add_scaled_artifact_modifier_grandeur_big_effect = { - if = { - limit = { rarity = illustrious } - random_list = { - 20 = { - add_artifact_modifier = artifact_court_grandeur_baseline_add_5_modifier - } - 10 = { - add_artifact_modifier = artifact_court_grandeur_baseline_add_6_modifier - } - } - } - else_if = { - limit = { rarity = famed } - random_list = { - 20 = { - add_artifact_modifier = artifact_court_grandeur_baseline_add_3_modifier - } - 10 = { - add_artifact_modifier = artifact_court_grandeur_baseline_add_4_modifier - } - } - } - else_if = { - limit = { rarity = masterwork } - random_list = { - 20 = { - add_artifact_modifier = artifact_court_grandeur_baseline_add_2_modifier - } - 10 = { - add_artifact_modifier = artifact_court_grandeur_baseline_add_3_modifier - } - } - } - else = { - random_list = { - 20 = { - add_artifact_modifier = artifact_court_grandeur_baseline_add_1_modifier - } - 10 = { - add_artifact_modifier = artifact_court_grandeur_baseline_add_2_modifier - } - } - } -} - -add_scaled_artifact_modifier_grandeur_small_effect = { - if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_court_grandeur_baseline_add_4_modifier - } - else_if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_court_grandeur_baseline_add_3_modifier - } - else_if = { - limit = { rarity = masterwork } - add_artifact_modifier = artifact_court_grandeur_baseline_add_2_modifier - } - else = { - random_list = { - 10 = { - add_artifact_modifier = artifact_court_grandeur_baseline_add_1_modifier - } - 10 = {} - } - } -} - -add_scaled_artifact_modifier_piety_effect = { - if = { - limit = { - rarity = common - } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_piety_1_modifier - } - 15 = { - add_artifact_modifier = artifact_monthly_piety_2_modifier - } - } - } - else_if = { - limit = { - rarity = masterwork - } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_piety_3_modifier - } - 15 = { - add_artifact_modifier = artifact_monthly_piety_4_modifier - } - } - } - else_if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_piety_5_modifier - } - 15 = { - add_artifact_modifier = artifact_monthly_piety_6_modifier - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_piety_7_modifier - } - 15 = { - add_artifact_modifier = artifact_monthly_piety_8_modifier - } - } - } -} - -add_scaled_artifact_modifier_dynasty_prestige_effect = { - if = { - limit = { - rarity = common - } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_prestige_add_1_modifier - } - 15 = { - add_artifact_modifier = artifact_monthly_prestige_add_2_modifier - } - } - } - else_if = { - limit = { - rarity = masterwork - } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_prestige_add_3_modifier - } - 15 = { - add_artifact_modifier = artifact_monthly_prestige_add_4_modifier - } - } - } - else_if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_prestige_add_5_modifier - } - 15 = { - add_artifact_modifier = artifact_monthly_prestige_add_6_modifier - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_prestige_add_7_modifier - } - 15 = { - add_artifact_modifier = artifact_monthly_prestige_add_8_modifier - } - } - } -} - -add_scaled_artifact_modifier_merit_gain_effect = { - if = { - limit = { - rarity = common - } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_merit_mult_1_modifier - } - 15 = { - add_artifact_modifier = artifact_monthly_merit_mult_2_modifier - } - } - } - else_if = { - limit = { - rarity = masterwork - } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_merit_mult_3_modifier - } - 15 = { - add_artifact_modifier = artifact_monthly_merit_mult_4_modifier - } - } - } - else_if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_merit_mult_5_modifier - } - 15 = { - add_artifact_modifier = artifact_monthly_merit_mult_6_modifier - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_merit_mult_7_modifier - } - 15 = { - add_artifact_modifier = artifact_monthly_merit_mult_8_modifier - } - } - } -} - -add_scaled_artifact_modifier_study_confucian_classics_scheme_phase_duration_add_effect = { - if = { - limit = { rarity = common } - add_artifact_modifier = artifact_study_confucian_classics_scheme_phase_duration_add_1_modifier - } - else_if = { - limit = { rarity = masterwork } - add_artifact_modifier = artifact_study_confucian_classics_scheme_phase_duration_add_2_modifier - } - else_if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_study_confucian_classics_scheme_phase_duration_add_3_modifier - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_study_confucian_classics_scheme_phase_duration_add_4_modifier - } -} - -add_scaled_artifact_modifier_majesty_effect = { - random_list = { - #pick = 2 - #unique = yes - - # Short Reign Duration - 20 = { - modifier = { - exists = scope:inspiration_owner - scope:inspiration_owner = { has_variable = chosen_reign_mod } - add = 160 - } - if = { - limit = { - rarity = common - } - random_list = { - 20 = { - add_artifact_modifier = artifact_short_reign_duration_mult_1_modifier - } - 10 = { - add_artifact_modifier = artifact_short_reign_duration_mult_2_modifier - } - } - } - else_if = { - limit = { - rarity = masterwork - } - random_list = { - 20 = { - add_artifact_modifier = artifact_short_reign_duration_mult_3_modifier - } - 10 = { - add_artifact_modifier = artifact_short_reign_duration_mult_4_modifier - } - } - } - else_if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_short_reign_duration_mult_5_modifier - } - 10 = { - add_artifact_modifier = artifact_short_reign_duration_mult_6_modifier - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_short_reign_duration_mult_7_modifier - } - 10 = { - add_artifact_modifier = artifact_short_reign_duration_mult_8_modifier - } - } - } - } - - # Dynasty Opinion - 20 = { - modifier = { - exists = scope:inspiration_owner - scope:inspiration_owner = { has_variable = chosen_dynasty_mod } - add = 160 - } - if = { - limit = { rarity = common } - random_list = { - 20 = { - add_artifact_modifier = artifact_dynasty_opinion_1_modifier - } - 10 = { - add_artifact_modifier = artifact_dynasty_opinion_2_modifier - } - } - } - else_if = { - limit = { rarity = masterwork } - random_list = { - 20 = { - add_artifact_modifier = artifact_dynasty_opinion_3_modifier - } - 10 = { - add_artifact_modifier = artifact_dynasty_opinion_4_modifier - } - } - } - else_if = { - limit = { rarity = famed } - random_list = { - 20 = { - add_artifact_modifier = artifact_dynasty_opinion_5_modifier - } - 10 = { - add_artifact_modifier = artifact_dynasty_opinion_6_modifier - } - } - } - else_if = { - limit = { rarity = illustrious } - random_list = { - 20 = { - add_artifact_modifier = artifact_dynasty_opinion_7_modifier - } - 10 = { - add_artifact_modifier = artifact_dynasty_opinion_8_modifier - } - } - } - } - - # Dynasty Prestige - 20 = { - modifier = { - exists = scope:inspiration_owner - scope:inspiration_owner = { has_variable = chosen_dynasty_mod } - add = 160 - } - if = { - limit = { rarity = common } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_prestige_add_1_modifier - } - 10 = { - add_artifact_modifier = artifact_monthly_prestige_add_2_modifier - } - } - } - else_if = { - limit = { rarity = masterwork } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_prestige_add_3_modifier - } - 10 = { - add_artifact_modifier = artifact_monthly_prestige_add_4_modifier - } - } - } - else_if = { - limit = { rarity = famed } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_prestige_add_5_modifier - } - 10 = { - add_artifact_modifier = artifact_monthly_prestige_add_6_modifier - } - } - } - else_if = { - limit = { rarity = illustrious } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_prestige_add_7_modifier - } - 10 = { - add_artifact_modifier = artifact_monthly_prestige_add_8_modifier - } - } - } - } - - # Dynasty Prestige Mult - 20 = { - trigger = { - OR = { - rarity = famed - rarity = illustrious - } - } - if = { - limit = { rarity = famed } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_dynasty_prestige_1_modifier - } - 10 = { - add_artifact_modifier = artifact_monthly_dynasty_prestige_2_modifier - } - } - } - else_if = { - limit = { rarity = illustrious } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_dynasty_prestige_3_modifier - } - 10 = { - add_artifact_modifier = artifact_monthly_dynasty_prestige_4_modifier - } - } - } - } - - # Extra Prestige Gain - 20 = { - modifier = { - exists = scope:inspiration_owner - scope:inspiration_owner = { has_variable = chosen_dread_mod } - add = 160 - } - random_list = { - 50 = { # Prestige per Dread - modifier = { - exists = scope:inspiration_owner - scope:inspiration_owner = { dread < 1 } - factor = 0 - } - modifier = { - exists = scope:inspiration_owner - scope:inspiration_owner = { has_variable = chosen_dread_mod } - add = 160 - } - if = { - limit = { rarity = common } - add_artifact_modifier = artifact_monthly_prestige_gain_per_dread_add_1_modifier - } - else_if = { - limit = { rarity = masterwork } - add_artifact_modifier = artifact_monthly_prestige_gain_per_dread_add_2_modifier - } - else_if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_monthly_prestige_gain_per_dread_add_3_modifier - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_monthly_prestige_gain_per_dread_add_4_modifier - } - } - 50 = { # Prestige per Knight - if = { - limit = { rarity = common } - add_artifact_modifier = artifact_monthly_prestige_gain_per_knight_add_1_modifier - } - else_if = { - limit = { rarity = masterwork } - add_artifact_modifier = artifact_monthly_prestige_gain_per_knight_add_2_modifier - } - else_if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_monthly_prestige_gain_per_knight_add_3_modifier - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_monthly_prestige_gain_per_knight_add_4_modifier - } - } - 50 = { # Prestige per Powerful Vassal - if = { - limit = { rarity = common } - add_artifact_modifier = artifact_monthly_prestige_gain_per_happy_powerful_vassal_add_1_modifier - } - else_if = { - limit = { rarity = masterwork } - add_artifact_modifier = artifact_monthly_prestige_gain_per_happy_powerful_vassal_add_2_modifier - } - else_if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_monthly_prestige_gain_per_happy_powerful_vassal_add_3_modifier - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_monthly_prestige_gain_per_happy_powerful_vassal_add_4_modifier - } - } - } - } - - # Tyranny Decay - 20 = { - modifier = { - exists = scope:inspiration_owner - scope:inspiration_owner = { has_variable = chosen_dread_mod } - add = 160 - } - if = { - limit = { rarity = common } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_tyranny_1_modifier - } - 10 = { - add_artifact_modifier = artifact_monthly_tyranny_2_modifier - } - } - } - else_if = { - limit = { rarity = masterwork } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_tyranny_3_modifier - } - 10 = { - add_artifact_modifier = artifact_monthly_tyranny_4_modifier - } - } - } - else_if = { - limit = { rarity = famed } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_tyranny_5_modifier - } - 10 = { - add_artifact_modifier = artifact_monthly_tyranny_6_modifier - } - } - } - else_if = { - limit = { rarity = illustrious } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_tyranny_7_modifier - } - 10 = { - add_artifact_modifier = artifact_monthly_tyranny_8_modifier - } - } - } - } - - # happy_powerful_vassal_tax_contribution_mult - 20 = { - if = { - limit = { rarity = common } - random_list = { - 20 = { - add_artifact_modifier = artifact_happy_powerful_vassal_tax_contribution_mult_1_modifier - } - 10 = { - add_artifact_modifier = artifact_happy_powerful_vassal_tax_contribution_mult_2_modifier - } - } - } - else_if = { - limit = { rarity = masterwork } - random_list = { - 20 = { - add_artifact_modifier = artifact_happy_powerful_vassal_tax_contribution_mult_3_modifier - } - 10 = { - add_artifact_modifier = artifact_happy_powerful_vassal_tax_contribution_mult_4_modifier - } - } - } - else_if = { - limit = { rarity = famed } - random_list = { - 20 = { - add_artifact_modifier = artifact_happy_powerful_vassal_tax_contribution_mult_5_modifier - } - 10 = { - add_artifact_modifier = artifact_happy_powerful_vassal_tax_contribution_mult_6_modifier - } - } - } - else_if = { - limit = { rarity = illustrious } - random_list = { - 20 = { - add_artifact_modifier = artifact_happy_powerful_vassal_tax_contribution_mult_7_modifier - } - 10 = { - add_artifact_modifier = artifact_happy_powerful_vassal_tax_contribution_mult_8_modifier - } - } - } - } - - # courtly_tax_contribution_mult - 20 = { - if = { - limit = { rarity = common } - add_artifact_modifier = artifact_courtly_tax_contribution_mult_1_modifier - } - else_if = { - limit = { rarity = masterwork } - add_artifact_modifier = artifact_courtly_tax_contribution_mult_2_modifier - } - else_if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_courtly_tax_contribution_mult_3_modifier - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_courtly_tax_contribution_mult_4_modifier - } - } - - # glory_hound_tax_contribution_mult - 20 = { - if = { - limit = { rarity = common } - add_artifact_modifier = artifact_glory_hound_tax_contribution_mult_1_modifier - } - else_if = { - limit = { rarity = masterwork } - add_artifact_modifier = artifact_glory_hound_tax_contribution_mult_2_modifier - } - else_if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_glory_hound_tax_contribution_mult_3_modifier - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_glory_hound_tax_contribution_mult_4_modifier - } - } - - # mercenary_hire_cost_mult - 20 = { - trigger = { - OR = { - rarity = famed - rarity = illustrious - } - } - if = { - limit = { rarity = famed } - random_list = { - 20 = { - add_artifact_modifier = artifact_mercenary_hire_cost_mult_1_modifier - } - 10 = { - add_artifact_modifier = artifact_mercenary_hire_cost_mult_2_modifier - } - } - } - else_if = { - limit = { rarity = illustrious } - random_list = { - 20 = { - add_artifact_modifier = artifact_mercenary_hire_cost_mult_3_modifier - } - 10 = { - add_artifact_modifier = artifact_mercenary_hire_cost_mult_4_modifier - } - } - } - } - - # courtly_opinion - 20 = { - if = { - limit = { rarity = common } - add_artifact_modifier = artifact_courtly_vassal_opinion_1_modifier - } - else_if = { - limit = { rarity = masterwork } - add_artifact_modifier = artifact_courtly_vassal_opinion_2_modifier - } - else_if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_courtly_vassal_opinion_3_modifier - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_courtly_vassal_opinion_4_modifier - } - } - - # glory_hound_opinion - 20 = { - if = { - limit = { rarity = common } - add_artifact_modifier = artifact_glory_hound_vassal_opinion_1_modifier - } - else_if = { - limit = { rarity = masterwork } - add_artifact_modifier = artifact_glory_hound_vassal_opinion_2_modifier - } - else_if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_glory_hound_vassal_opinion_3_modifier - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_glory_hound_vassal_opinion_4_modifier - } - } - - # vassal_tax_contribution_mult - 20 = { - trigger = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_vassal_tax_contribution_mult_2_modifier - } - 10 = { - add_artifact_modifier = artifact_vassal_tax_contribution_mult_4_modifier - } - } - } - - # general_opinion - 20 = { - trigger = { - rarity = illustrious - } - add_artifact_modifier = artifact_general_opinion_1_modifier - } - - # Diplomacy per Prestige Level - 20 = { - trigger = { - artifact_slot_type = throne - OR = { - rarity = famed - rarity = illustrious - } - } - add_artifact_modifier = artifact_diplomacy_per_prestige_level_modifier - } - } -} - -add_2_scaled_artifact_modifier_majesty_effect = { - random_list = { - pick = 2 - unique = yes - - # Short Reign Duration - 20 = { - modifier = { - exists = scope:inspiration_owner - scope:inspiration_owner = { has_variable = chosen_reign_mod } - add = 160 - } - if = { - limit = { - rarity = common - } - random_list = { - 20 = { - add_artifact_modifier = artifact_short_reign_duration_mult_1_modifier - } - 10 = { - add_artifact_modifier = artifact_short_reign_duration_mult_2_modifier - } - } - } - else_if = { - limit = { - rarity = masterwork - } - random_list = { - 20 = { - add_artifact_modifier = artifact_short_reign_duration_mult_3_modifier - } - 10 = { - add_artifact_modifier = artifact_short_reign_duration_mult_4_modifier - } - } - } - else_if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_short_reign_duration_mult_5_modifier - } - 10 = { - add_artifact_modifier = artifact_short_reign_duration_mult_6_modifier - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_short_reign_duration_mult_7_modifier - } - 10 = { - add_artifact_modifier = artifact_short_reign_duration_mult_8_modifier - } - } - } - } - - # Dynasty Opinion - 20 = { - modifier = { - exists = scope:inspiration_owner - scope:inspiration_owner = { has_variable = chosen_dynasty_mod } - add = 160 - } - if = { - limit = { rarity = common } - random_list = { - 20 = { - add_artifact_modifier = artifact_dynasty_opinion_1_modifier - } - 10 = { - add_artifact_modifier = artifact_dynasty_opinion_2_modifier - } - } - } - else_if = { - limit = { rarity = masterwork } - random_list = { - 20 = { - add_artifact_modifier = artifact_dynasty_opinion_3_modifier - } - 10 = { - add_artifact_modifier = artifact_dynasty_opinion_4_modifier - } - } - } - else_if = { - limit = { rarity = famed } - random_list = { - 20 = { - add_artifact_modifier = artifact_dynasty_opinion_5_modifier - } - 10 = { - add_artifact_modifier = artifact_dynasty_opinion_6_modifier - } - } - } - else_if = { - limit = { rarity = illustrious } - random_list = { - 20 = { - add_artifact_modifier = artifact_dynasty_opinion_7_modifier - } - 10 = { - add_artifact_modifier = artifact_dynasty_opinion_8_modifier - } - } - } - } - - # Dynasty Prestige - 20 = { - modifier = { - exists = scope:inspiration_owner - scope:inspiration_owner = { has_variable = chosen_dynasty_mod } - add = 160 - } - if = { - limit = { rarity = common } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_prestige_add_1_modifier - } - 10 = { - add_artifact_modifier = artifact_monthly_prestige_add_2_modifier - } - } - } - else_if = { - limit = { rarity = masterwork } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_prestige_add_3_modifier - } - 10 = { - add_artifact_modifier = artifact_monthly_prestige_add_4_modifier - } - } - } - else_if = { - limit = { rarity = famed } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_prestige_add_5_modifier - } - 10 = { - add_artifact_modifier = artifact_monthly_prestige_add_6_modifier - } - } - } - else_if = { - limit = { rarity = illustrious } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_prestige_add_7_modifier - } - 10 = { - add_artifact_modifier = artifact_monthly_prestige_add_8_modifier - } - } - } - } - - # Dynasty Prestige Mult - 20 = { - trigger = { - OR = { - rarity = famed - rarity = illustrious - } - } - if = { - limit = { rarity = famed } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_dynasty_prestige_1_modifier - } - 10 = { - add_artifact_modifier = artifact_monthly_dynasty_prestige_2_modifier - } - } - } - else_if = { - limit = { rarity = illustrious } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_dynasty_prestige_3_modifier - } - 10 = { - add_artifact_modifier = artifact_monthly_dynasty_prestige_4_modifier - } - } - } - } - - # Extra Prestige Gain - 20 = { - random_list = { - 50 = { # Prestige per Dread - modifier = { - exists = scope:inspiration_owner - scope:inspiration_owner = { has_variable = chosen_dread_mod } - add = 160 - } - if = { - limit = { rarity = common } - add_artifact_modifier = artifact_monthly_prestige_gain_per_dread_add_1_modifier - } - else_if = { - limit = { rarity = masterwork } - add_artifact_modifier = artifact_monthly_prestige_gain_per_dread_add_2_modifier - } - else_if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_monthly_prestige_gain_per_dread_add_3_modifier - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_monthly_prestige_gain_per_dread_add_4_modifier - } - } - 50 = { # Prestige per Knight - if = { - limit = { rarity = common } - add_artifact_modifier = artifact_monthly_prestige_gain_per_knight_add_1_modifier - } - else_if = { - limit = { rarity = masterwork } - add_artifact_modifier = artifact_monthly_prestige_gain_per_knight_add_2_modifier - } - else_if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_monthly_prestige_gain_per_knight_add_3_modifier - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_monthly_prestige_gain_per_knight_add_4_modifier - } - } - 50 = { # Prestige per Powerful Vassal - if = { - limit = { rarity = common } - add_artifact_modifier = artifact_monthly_prestige_gain_per_happy_powerful_vassal_add_1_modifier - } - else_if = { - limit = { rarity = masterwork } - add_artifact_modifier = artifact_monthly_prestige_gain_per_happy_powerful_vassal_add_2_modifier - } - else_if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_monthly_prestige_gain_per_happy_powerful_vassal_add_3_modifier - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_monthly_prestige_gain_per_happy_powerful_vassal_add_4_modifier - } - } - } - } - - # Tyranny Decay - 20 = { - modifier = { - exists = scope:inspiration_owner - scope:inspiration_owner = { has_variable = chosen_dread_mod } - add = 160 - } - if = { - limit = { rarity = common } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_tyranny_1_modifier - } - 10 = { - add_artifact_modifier = artifact_monthly_tyranny_2_modifier - } - } - } - else_if = { - limit = { rarity = masterwork } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_tyranny_3_modifier - } - 10 = { - add_artifact_modifier = artifact_monthly_tyranny_4_modifier - } - } - } - else_if = { - limit = { rarity = famed } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_tyranny_5_modifier - } - 10 = { - add_artifact_modifier = artifact_monthly_tyranny_6_modifier - } - } - } - else_if = { - limit = { rarity = illustrious } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_tyranny_7_modifier - } - 10 = { - add_artifact_modifier = artifact_monthly_tyranny_8_modifier - } - } - } - } - - # happy_powerful_vassal_tax_contribution_mult - 20 = { - if = { - limit = { rarity = common } - random_list = { - 20 = { - add_artifact_modifier = artifact_happy_powerful_vassal_tax_contribution_mult_1_modifier - } - 10 = { - add_artifact_modifier = artifact_happy_powerful_vassal_tax_contribution_mult_2_modifier - } - } - } - else_if = { - limit = { rarity = masterwork } - random_list = { - 20 = { - add_artifact_modifier = artifact_happy_powerful_vassal_tax_contribution_mult_3_modifier - } - 10 = { - add_artifact_modifier = artifact_happy_powerful_vassal_tax_contribution_mult_4_modifier - } - } - } - else_if = { - limit = { rarity = famed } - random_list = { - 20 = { - add_artifact_modifier = artifact_happy_powerful_vassal_tax_contribution_mult_5_modifier - } - 10 = { - add_artifact_modifier = artifact_happy_powerful_vassal_tax_contribution_mult_6_modifier - } - } - } - else_if = { - limit = { rarity = illustrious } - random_list = { - 20 = { - add_artifact_modifier = artifact_happy_powerful_vassal_tax_contribution_mult_7_modifier - } - 10 = { - add_artifact_modifier = artifact_happy_powerful_vassal_tax_contribution_mult_8_modifier - } - } - } - } - - # courtly_tax_contribution_mult - 20 = { - if = { - limit = { rarity = common } - add_artifact_modifier = artifact_courtly_tax_contribution_mult_1_modifier - } - else_if = { - limit = { rarity = masterwork } - add_artifact_modifier = artifact_courtly_tax_contribution_mult_2_modifier - } - else_if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_courtly_tax_contribution_mult_3_modifier - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_courtly_tax_contribution_mult_4_modifier - } - } - - # glory_hound_tax_contribution_mult - 20 = { - if = { - limit = { rarity = common } - add_artifact_modifier = artifact_glory_hound_tax_contribution_mult_1_modifier - } - else_if = { - limit = { rarity = masterwork } - add_artifact_modifier = artifact_glory_hound_tax_contribution_mult_2_modifier - } - else_if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_glory_hound_tax_contribution_mult_3_modifier - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_glory_hound_tax_contribution_mult_4_modifier - } - } - - # mercenary_hire_cost_mult - 20 = { - trigger = { - OR = { - rarity = famed - rarity = illustrious - } - } - if = { - limit = { rarity = famed } - random_list = { - 20 = { - add_artifact_modifier = artifact_mercenary_hire_cost_mult_1_modifier - } - 10 = { - add_artifact_modifier = artifact_mercenary_hire_cost_mult_2_modifier - } - } - } - else_if = { - limit = { rarity = illustrious } - random_list = { - 20 = { - add_artifact_modifier = artifact_mercenary_hire_cost_mult_3_modifier - } - 10 = { - add_artifact_modifier = artifact_mercenary_hire_cost_mult_4_modifier - } - } - } - } - - # courtly_opinion - 20 = { - if = { - limit = { rarity = common } - add_artifact_modifier = artifact_courtly_vassal_opinion_1_modifier - } - else_if = { - limit = { rarity = masterwork } - add_artifact_modifier = artifact_courtly_vassal_opinion_2_modifier - } - else_if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_courtly_vassal_opinion_3_modifier - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_courtly_vassal_opinion_4_modifier - } - } - - # glory_hound_opinion - 20 = { - if = { - limit = { rarity = common } - add_artifact_modifier = artifact_glory_hound_vassal_opinion_1_modifier - } - else_if = { - limit = { rarity = masterwork } - add_artifact_modifier = artifact_glory_hound_vassal_opinion_2_modifier - } - else_if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_glory_hound_vassal_opinion_3_modifier - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_glory_hound_vassal_opinion_4_modifier - } - } - - # vassal_tax_contribution_mult - 20 = { - trigger = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_vassal_tax_contribution_mult_2_modifier - } - 10 = { - add_artifact_modifier = artifact_vassal_tax_contribution_mult_4_modifier - } - } - } - - # general_opinion - 20 = { - trigger = { - rarity = illustrious - } - add_artifact_modifier = artifact_general_opinion_1_modifier - } - - # Diplomacy per Prestige Level - 20 = { - trigger = { - OR = { - rarity = famed - rarity = illustrious - } - } - add_artifact_modifier = artifact_diplomacy_per_prestige_level_modifier - } - } -} - -add_scaled_artifact_modifier_rulership_effect = { - random_list = { - # Vassal Limit - 20 = { - modifier = { - exists = scope:inspiration_owner - scope:inspiration_owner = { has_variable = chosen_vassals_mod } - add = 160 - } - if = { - limit = { rarity = common } - random_list = { - 20 = { - add_artifact_modifier = artifact_vassal_limit_1_modifier - } - 10 = { - add_artifact_modifier = artifact_vassal_limit_2_modifier - } - } - } - else_if = { - limit = { rarity = masterwork } - random_list = { - 20 = { - add_artifact_modifier = artifact_vassal_limit_3_modifier - } - 10 = { - add_artifact_modifier = artifact_vassal_limit_4_modifier - } - } - } - else_if = { - limit = { rarity = famed } - random_list = { - 20 = { - add_artifact_modifier = artifact_vassal_limit_5_modifier - } - 10 = { - add_artifact_modifier = artifact_vassal_limit_6_modifier - } - } - } - else_if = { - limit = { rarity = illustrious } - random_list = { - 20 = { - add_artifact_modifier = artifact_vassal_limit_7_modifier - } - 10 = { - add_artifact_modifier = artifact_vassal_limit_8_modifier - } - } - } - } - - # Powerful Vassal Opinion - 20 = { - trigger = { - scope:inspiration_owner ?= { - NOT = { government_has_flag = no_powerful_vassals } - } - } - modifier = { - exists = scope:inspiration_owner - scope:inspiration_owner = { has_variable = chosen_vassals_mod } - add = 160 - } - if = { - limit = { rarity = common } - random_list = { - 20 = { - add_artifact_modifier = artifact_powerful_vassal_opinion_1_modifier - } - 10 = { - add_artifact_modifier = artifact_powerful_vassal_opinion_2_modifier - } - } - } - else_if = { - limit = { rarity = masterwork } - random_list = { - 20 = { - add_artifact_modifier = artifact_powerful_vassal_opinion_3_modifier - } - 10 = { - add_artifact_modifier = artifact_powerful_vassal_opinion_4_modifier - } - } - } - else_if = { - limit = { rarity = famed } - random_list = { - 20 = { - add_artifact_modifier = artifact_powerful_vassal_opinion_5_modifier - } - 10 = { - add_artifact_modifier = artifact_powerful_vassal_opinion_6_modifier - } - } - } - else_if = { - limit = { rarity = illustrious } - random_list = { - 20 = { - add_artifact_modifier = artifact_powerful_vassal_opinion_7_modifier - } - 10 = { - add_artifact_modifier = artifact_powerful_vassal_opinion_8_modifier - } - } - } - } - - # courtly_opinion - 20 = { - modifier = { - exists = scope:inspiration_owner - scope:inspiration_owner = { has_variable = chosen_vassals_mod } - add = 160 - } - if = { - limit = { rarity = common } - add_artifact_modifier = artifact_courtly_vassal_opinion_1_modifier - } - else_if = { - limit = { rarity = masterwork } - add_artifact_modifier = artifact_courtly_vassal_opinion_2_modifier - } - else_if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_courtly_vassal_opinion_3_modifier - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_courtly_vassal_opinion_4_modifier - } - } - - # parochial_opinion - 20 = { - modifier = { - exists = scope:inspiration_owner - scope:inspiration_owner = { has_variable = chosen_vassals_mod } - add = 160 - } - if = { - limit = { rarity = common } - add_artifact_modifier = artifact_parochial_vassal_opinion_1_modifier - } - else_if = { - limit = { rarity = masterwork } - add_artifact_modifier = artifact_parochial_vassal_opinion_2_modifier - } - else_if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_parochial_vassal_opinion_3_modifier - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_parochial_vassal_opinion_4_modifier - } - } - - # belligerent_opinion - 20 = { - if = { - limit = { rarity = common } - add_artifact_modifier = artifact_belligerent_vassal_opinion_1_modifier - } - else_if = { - limit = { rarity = masterwork } - add_artifact_modifier = artifact_belligerent_vassal_opinion_2_modifier - } - else_if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_belligerent_vassal_opinion_3_modifier - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_belligerent_vassal_opinion_4_modifier - } - } - - # Independent Ruler Opinion - 20 = { - modifier = { - exists = scope:inspiration_owner - scope:inspiration_owner = { has_variable = chosen_ind_ruler_mod } - add = 160 - } - if = { - limit = { rarity = common } - random_list = { - 20 = { - add_artifact_modifier = artifact_independent_ruler_opinion_1_modifier - } - 10 = { - add_artifact_modifier = artifact_independent_ruler_opinion_2_modifier - } - } - } - else_if = { - limit = { rarity = masterwork } - random_list = { - 20 = { - add_artifact_modifier = artifact_independent_ruler_opinion_3_modifier - } - 10 = { - add_artifact_modifier = artifact_independent_ruler_opinion_4_modifier - } - } - } - else_if = { - limit = { rarity = famed } - random_list = { - 20 = { - add_artifact_modifier = artifact_independent_ruler_opinion_5_modifier - } - 10 = { - add_artifact_modifier = artifact_independent_ruler_opinion_6_modifier - } - } - } - else_if = { - limit = { rarity = illustrious } - random_list = { - 20 = { - add_artifact_modifier = artifact_independent_ruler_opinion_7_modifier - } - 10 = { - add_artifact_modifier = artifact_independent_ruler_opinion_8_modifier - } - } - } - } - - # Courtier and Guest Opinion - 20 = { - modifier = { - exists = scope:inspiration_owner - scope:inspiration_owner = { has_variable = chosen_court_op_mod } - add = 160 - } - if = { - limit = { rarity = common } - random_list = { - 20 = { - add_artifact_modifier = artifact_courtier_and_guest_opinion_1_modifier - } - 10 = { - add_artifact_modifier = artifact_courtier_and_guest_opinion_2_modifier - } - } - } - else_if = { - limit = { rarity = masterwork } - random_list = { - 20 = { - add_artifact_modifier = artifact_courtier_and_guest_opinion_3_modifier - } - 10 = { - add_artifact_modifier = artifact_courtier_and_guest_opinion_4_modifier - } - } - } - else_if = { - limit = { rarity = famed } - random_list = { - 20 = { - add_artifact_modifier = artifact_courtier_and_guest_opinion_5_modifier - } - 10 = { - add_artifact_modifier = artifact_courtier_and_guest_opinion_6_modifier - } - } - } - else_if = { - limit = { rarity = illustrious } - random_list = { - 20 = { - add_artifact_modifier = artifact_courtier_and_guest_opinion_7_modifier - } - 10 = { - add_artifact_modifier = artifact_courtier_and_guest_opinion_8_modifier - } - } - } - } - - # men_at_arms_maintenance - 20 = { - if = { - limit = { rarity = common } - random_list = { - 20 = { - add_artifact_modifier = artifact_men_at_arms_maintenance_1_modifier - } - 10 = { - add_artifact_modifier = artifact_men_at_arms_maintenance_2_modifier - } - } - } - else_if = { - limit = { rarity = masterwork } - random_list = { - 20 = { - add_artifact_modifier = artifact_men_at_arms_maintenance_3_modifier - } - 10 = { - add_artifact_modifier = artifact_men_at_arms_maintenance_4_modifier - } - } - } - else_if = { - limit = { rarity = famed } - random_list = { - 20 = { - add_artifact_modifier = artifact_men_at_arms_maintenance_5_modifier - } - 10 = { - add_artifact_modifier = artifact_men_at_arms_maintenance_6_modifier - } - } - } - else_if = { - limit = { rarity = illustrious } - random_list = { - 20 = { - add_artifact_modifier = artifact_men_at_arms_maintenance_7_modifier - } - 10 = { - add_artifact_modifier = artifact_men_at_arms_maintenance_8_modifier - } - } - } - } - - # build_gold_cost - 20 = { - if = { - limit = { rarity = common } - add_artifact_modifier = artifact_build_gold_cost_1_modifier - } - else_if = { - limit = { rarity = masterwork } - add_artifact_modifier = artifact_build_gold_cost_2_modifier - } - else_if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_build_gold_cost_3_modifier - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_build_gold_cost_4_modifier - } - } - - # domain_tax_mult - 20 = { - trigger = { - OR = { - rarity = famed - rarity = illustrious - } - } - if = { - limit = { rarity = famed } - random_list = { - 20 = { - add_artifact_modifier = artifact_domain_tax_mult_1_modifier - } - 10 = { - add_artifact_modifier = artifact_domain_tax_mult_2_modifier - } - } - } - else_if = { - limit = { rarity = illustrious } - random_list = { - 20 = { - add_artifact_modifier = artifact_domain_tax_mult_3_modifier - } - 10 = { - add_artifact_modifier = artifact_domain_tax_mult_4_modifier - } - } - } - } - - # parochial_tax_contribution_mult - 20 = { - if = { - limit = { rarity = common } - add_artifact_modifier = artifact_parochial_tax_contribution_mult_1_modifier - } - else_if = { - limit = { rarity = masterwork } - add_artifact_modifier = artifact_parochial_tax_contribution_mult_2_modifier - } - else_if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_parochial_tax_contribution_mult_3_modifier - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_parochial_tax_contribution_mult_4_modifier - } - } - - # belligerent_tax_contribution_mult - 20 = { - if = { - limit = { rarity = common } - add_artifact_modifier = artifact_belligerent_tax_contribution_mult_1_modifier - } - else_if = { - limit = { rarity = masterwork } - add_artifact_modifier = artifact_belligerent_tax_contribution_mult_2_modifier - } - else_if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_belligerent_tax_contribution_mult_3_modifier - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_belligerent_tax_contribution_mult_4_modifier - } - } - - # Stewardship per Stress Level - 20 = { - trigger = { - artifact_slot_type = helmet - OR = { - rarity = famed - rarity = illustrious - } - } - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_stewardship_per_stress_level_2_modifier - } - else = { - add_artifact_modifier = artifact_stewardship_per_stress_level_1_modifier - } - } - - # herd_gain_mult - 20 = { - trigger = { - scope:liege ?= { government_has_flag = government_is_nomadic } - } - if = { - limit = { rarity = common } - random_list = { - 20 = { - add_artifact_modifier = artifact_herd_gain_1_modifier - } - 10 = { - add_artifact_modifier = artifact_herd_gain_2_modifier - } - } - } - else_if = { - limit = { rarity = masterwork } - random_list = { - 20 = { - add_artifact_modifier = artifact_herd_gain_3_modifier - } - 10 = { - add_artifact_modifier = artifact_herd_gain_4_modifier - } - } - } - else_if = { - limit = { rarity = famed } - random_list = { - 20 = { - add_artifact_modifier = artifact_herd_gain_5_modifier - } - 10 = { - add_artifact_modifier = artifact_herd_gain_6_modifier - } - } - } - else_if = { - limit = { rarity = illustrious } - random_list = { - 20 = { - add_artifact_modifier = artifact_herd_gain_7_modifier - } - 10 = { - add_artifact_modifier = artifact_herd_gain_8_modifier - } - } - } - } - - # herd_conversion - 20 = { - trigger = { - scope:liege ?= { government_has_flag = government_is_nomadic } - } - if = { - limit = { rarity = common } - random_list = { - 20 = { - add_artifact_modifier = artifact_herd_conversion_1_modifier - } - 10 = { - add_artifact_modifier = artifact_herd_conversion_2_modifier - } - } - } - else_if = { - limit = { rarity = masterwork } - random_list = { - 20 = { - add_artifact_modifier = artifact_herd_conversion_3_modifier - } - 10 = { - add_artifact_modifier = artifact_herd_conversion_4_modifier - } - } - } - else_if = { - limit = { rarity = famed } - random_list = { - 20 = { - add_artifact_modifier = artifact_herd_conversion_5_modifier - } - 10 = { - add_artifact_modifier = artifact_herd_conversion_6_modifier - } - } - } - else_if = { - limit = { rarity = illustrious } - random_list = { - 20 = { - add_artifact_modifier = artifact_herd_conversion_7_modifier - } - 10 = { - add_artifact_modifier = artifact_herd_conversion_8_modifier - } - } - } - } - - # Domain Limit - #20 = { - #trigger = { - #rarity = illustrious - #} - #add_artifact_modifier = artifact_domain_limit_1_modifier - #} - } -} - -add_2_scaled_artifact_modifier_rulership_effect = { - random_list = { - pick = 2 - unique = yes - # Vassal Limit - 20 = { - modifier = { - exists = scope:inspiration_owner - scope:inspiration_owner = { has_variable = chosen_vassals_mod } - add = 160 - } - if = { - limit = { rarity = common } - random_list = { - 20 = { - add_artifact_modifier = artifact_vassal_limit_1_modifier - } - 10 = { - add_artifact_modifier = artifact_vassal_limit_2_modifier - } - } - } - else_if = { - limit = { rarity = masterwork } - random_list = { - 20 = { - add_artifact_modifier = artifact_vassal_limit_3_modifier - } - 10 = { - add_artifact_modifier = artifact_vassal_limit_4_modifier - } - } - } - else_if = { - limit = { rarity = famed } - random_list = { - 20 = { - add_artifact_modifier = artifact_vassal_limit_5_modifier - } - 10 = { - add_artifact_modifier = artifact_vassal_limit_6_modifier - } - } - } - else_if = { - limit = { rarity = illustrious } - random_list = { - 20 = { - add_artifact_modifier = artifact_vassal_limit_7_modifier - } - 10 = { - add_artifact_modifier = artifact_vassal_limit_8_modifier - } - } - } - } - - # Powerful Vassal Opinion - 20 = { - modifier = { - exists = scope:inspiration_owner - scope:inspiration_owner = { has_variable = chosen_vassals_mod } - add = 160 - } - if = { - limit = { rarity = common } - random_list = { - 20 = { - add_artifact_modifier = artifact_powerful_vassal_opinion_1_modifier - } - 10 = { - add_artifact_modifier = artifact_powerful_vassal_opinion_2_modifier - } - } - } - else_if = { - limit = { rarity = masterwork } - random_list = { - 20 = { - add_artifact_modifier = artifact_powerful_vassal_opinion_3_modifier - } - 10 = { - add_artifact_modifier = artifact_powerful_vassal_opinion_4_modifier - } - } - } - else_if = { - limit = { rarity = famed } - random_list = { - 20 = { - add_artifact_modifier = artifact_powerful_vassal_opinion_5_modifier - } - 10 = { - add_artifact_modifier = artifact_powerful_vassal_opinion_6_modifier - } - } - } - else_if = { - limit = { rarity = illustrious } - random_list = { - 20 = { - add_artifact_modifier = artifact_powerful_vassal_opinion_7_modifier - } - 10 = { - add_artifact_modifier = artifact_powerful_vassal_opinion_8_modifier - } - } - } - } - - # courtly_opinion - 20 = { - modifier = { - exists = scope:inspiration_owner - scope:inspiration_owner = { has_variable = chosen_vassals_mod } - add = 160 - } - if = { - limit = { rarity = common } - add_artifact_modifier = artifact_courtly_vassal_opinion_1_modifier - } - else_if = { - limit = { rarity = masterwork } - add_artifact_modifier = artifact_courtly_vassal_opinion_2_modifier - } - else_if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_courtly_vassal_opinion_3_modifier - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_courtly_vassal_opinion_4_modifier - } - } - - # parochial_opinion - 20 = { - modifier = { - exists = scope:inspiration_owner - scope:inspiration_owner = { has_variable = chosen_vassals_mod } - add = 160 - } - if = { - limit = { rarity = common } - add_artifact_modifier = artifact_parochial_vassal_opinion_1_modifier - } - else_if = { - limit = { rarity = masterwork } - add_artifact_modifier = artifact_parochial_vassal_opinion_2_modifier - } - else_if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_parochial_vassal_opinion_3_modifier - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_parochial_vassal_opinion_4_modifier - } - } - - # belligerent_opinion - 20 = { - if = { - limit = { rarity = common } - add_artifact_modifier = artifact_belligerent_vassal_opinion_1_modifier - } - else_if = { - limit = { rarity = masterwork } - add_artifact_modifier = artifact_belligerent_vassal_opinion_2_modifier - } - else_if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_belligerent_vassal_opinion_3_modifier - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_belligerent_vassal_opinion_4_modifier - } - } - - # Independent Ruler Opinion - 20 = { - modifier = { - exists = scope:inspiration_owner - scope:inspiration_owner = { has_variable = chosen_ind_ruler_mod } - add = 160 - } - if = { - limit = { rarity = common } - random_list = { - 20 = { - add_artifact_modifier = artifact_independent_ruler_opinion_1_modifier - } - 10 = { - add_artifact_modifier = artifact_independent_ruler_opinion_2_modifier - } - } - } - else_if = { - limit = { rarity = masterwork } - random_list = { - 20 = { - add_artifact_modifier = artifact_independent_ruler_opinion_3_modifier - } - 10 = { - add_artifact_modifier = artifact_independent_ruler_opinion_4_modifier - } - } - } - else_if = { - limit = { rarity = famed } - random_list = { - 20 = { - add_artifact_modifier = artifact_independent_ruler_opinion_5_modifier - } - 10 = { - add_artifact_modifier = artifact_independent_ruler_opinion_6_modifier - } - } - } - else_if = { - limit = { rarity = illustrious } - random_list = { - 20 = { - add_artifact_modifier = artifact_independent_ruler_opinion_7_modifier - } - 10 = { - add_artifact_modifier = artifact_independent_ruler_opinion_8_modifier - } - } - } - } - - # Courtier and Guest Opinion - 20 = { - modifier = { - exists = scope:inspiration_owner - scope:inspiration_owner = { has_variable = chosen_court_op_mod } - add = 160 - } - if = { - limit = { rarity = common } - random_list = { - 20 = { - add_artifact_modifier = artifact_courtier_and_guest_opinion_1_modifier - } - 10 = { - add_artifact_modifier = artifact_courtier_and_guest_opinion_2_modifier - } - } - } - else_if = { - limit = { rarity = masterwork } - random_list = { - 20 = { - add_artifact_modifier = artifact_courtier_and_guest_opinion_3_modifier - } - 10 = { - add_artifact_modifier = artifact_courtier_and_guest_opinion_4_modifier - } - } - } - else_if = { - limit = { rarity = famed } - random_list = { - 20 = { - add_artifact_modifier = artifact_courtier_and_guest_opinion_5_modifier - } - 10 = { - add_artifact_modifier = artifact_courtier_and_guest_opinion_6_modifier - } - } - } - else_if = { - limit = { rarity = illustrious } - random_list = { - 20 = { - add_artifact_modifier = artifact_courtier_and_guest_opinion_7_modifier - } - 10 = { - add_artifact_modifier = artifact_courtier_and_guest_opinion_8_modifier - } - } - } - } - - # men_at_arms_maintenance - 20 = { - if = { - limit = { rarity = common } - random_list = { - 20 = { - add_artifact_modifier = artifact_men_at_arms_maintenance_1_modifier - } - 10 = { - add_artifact_modifier = artifact_men_at_arms_maintenance_2_modifier - } - } - } - else_if = { - limit = { rarity = masterwork } - random_list = { - 20 = { - add_artifact_modifier = artifact_men_at_arms_maintenance_3_modifier - } - 10 = { - add_artifact_modifier = artifact_men_at_arms_maintenance_4_modifier - } - } - } - else_if = { - limit = { rarity = famed } - random_list = { - 20 = { - add_artifact_modifier = artifact_men_at_arms_maintenance_5_modifier - } - 10 = { - add_artifact_modifier = artifact_men_at_arms_maintenance_6_modifier - } - } - } - else_if = { - limit = { rarity = illustrious } - random_list = { - 20 = { - add_artifact_modifier = artifact_men_at_arms_maintenance_7_modifier - } - 10 = { - add_artifact_modifier = artifact_men_at_arms_maintenance_8_modifier - } - } - } - } - - # build_gold_cost - 20 = { - if = { - limit = { rarity = common } - add_artifact_modifier = artifact_build_gold_cost_1_modifier - } - else_if = { - limit = { rarity = masterwork } - add_artifact_modifier = artifact_build_gold_cost_2_modifier - } - else_if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_build_gold_cost_3_modifier - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_build_gold_cost_4_modifier - } - } - - # domain_tax_mult - 20 = { - trigger = { - OR = { - rarity = famed - rarity = illustrious - } - } - if = { - limit = { rarity = famed } - random_list = { - 20 = { - add_artifact_modifier = artifact_domain_tax_mult_1_modifier - } - 10 = { - add_artifact_modifier = artifact_domain_tax_mult_2_modifier - } - } - } - else_if = { - limit = { rarity = illustrious } - random_list = { - 20 = { - add_artifact_modifier = artifact_domain_tax_mult_3_modifier - } - 10 = { - add_artifact_modifier = artifact_domain_tax_mult_4_modifier - } - } - } - } - - # parochial_tax_contribution_mult - 20 = { - if = { - limit = { rarity = common } - add_artifact_modifier = artifact_parochial_tax_contribution_mult_1_modifier - } - else_if = { - limit = { rarity = masterwork } - add_artifact_modifier = artifact_parochial_tax_contribution_mult_2_modifier - } - else_if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_parochial_tax_contribution_mult_3_modifier - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_parochial_tax_contribution_mult_4_modifier - } - } - - # belligerent_tax_contribution_mult - 20 = { - if = { - limit = { rarity = common } - add_artifact_modifier = artifact_belligerent_tax_contribution_mult_1_modifier - } - else_if = { - limit = { rarity = masterwork } - add_artifact_modifier = artifact_belligerent_tax_contribution_mult_2_modifier - } - else_if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_belligerent_tax_contribution_mult_3_modifier - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_belligerent_tax_contribution_mult_4_modifier - } - } - - # Stewardship per Stress Level - 20 = { - trigger = { - NOT = { rarity = common } - } - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_stewardship_per_stress_level_2_modifier - } - else = { - add_artifact_modifier = artifact_stewardship_per_stress_level_1_modifier - } - } - - # herd_gain_mult - 20 = { - trigger = { - scope:liege ?= { government_has_flag = government_is_nomadic } - } - if = { - limit = { rarity = common } - random_list = { - 20 = { - add_artifact_modifier = artifact_herd_gain_1_modifier - } - 10 = { - add_artifact_modifier = artifact_herd_gain_2_modifier - } - } - } - else_if = { - limit = { rarity = masterwork } - random_list = { - 20 = { - add_artifact_modifier = artifact_herd_gain_3_modifier - } - 10 = { - add_artifact_modifier = artifact_herd_gain_4_modifier - } - } - } - else_if = { - limit = { rarity = famed } - random_list = { - 20 = { - add_artifact_modifier = artifact_herd_gain_5_modifier - } - 10 = { - add_artifact_modifier = artifact_herd_gain_6_modifier - } - } - } - else_if = { - limit = { rarity = illustrious } - random_list = { - 20 = { - add_artifact_modifier = artifact_herd_gain_7_modifier - } - 10 = { - add_artifact_modifier = artifact_herd_gain_8_modifier - } - } - } - } - - # herd_conversion - 20 = { - trigger = { - scope:liege ?= { government_has_flag = government_is_nomadic } - } - if = { - limit = { rarity = common } - random_list = { - 20 = { - add_artifact_modifier = artifact_herd_conversion_1_modifier - } - 10 = { - add_artifact_modifier = artifact_herd_conversion_2_modifier - } - } - } - else_if = { - limit = { rarity = masterwork } - random_list = { - 20 = { - add_artifact_modifier = artifact_herd_conversion_3_modifier - } - 10 = { - add_artifact_modifier = artifact_herd_conversion_4_modifier - } - } - } - else_if = { - limit = { rarity = famed } - random_list = { - 20 = { - add_artifact_modifier = artifact_herd_conversion_5_modifier - } - 10 = { - add_artifact_modifier = artifact_herd_conversion_6_modifier - } - } - } - else_if = { - limit = { rarity = illustrious } - random_list = { - 20 = { - add_artifact_modifier = artifact_herd_conversion_7_modifier - } - 10 = { - add_artifact_modifier = artifact_herd_conversion_8_modifier - } - } - } - } - - # Domain Limit - #20 = { - #trigger = { - #rarity = illustrious - #} - #add_artifact_modifier = artifact_domain_limit_1_modifier - #} - } -} - -add_scaled_artifact_modifier_devotion_effect = { - random_list = { - # monthly_piety - 20 = { - if = { - limit = { - rarity = common - } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_piety_1_modifier - } - 15 = { - add_artifact_modifier = artifact_monthly_piety_2_modifier - } - } - } - else_if = { - limit = { - rarity = masterwork - } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_piety_3_modifier - } - 15 = { - add_artifact_modifier = artifact_monthly_piety_4_modifier - } - } - } - else_if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_piety_5_modifier - } - 15 = { - add_artifact_modifier = artifact_monthly_piety_6_modifier - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_piety_7_modifier - } - 15 = { - add_artifact_modifier = artifact_monthly_piety_8_modifier - } - } - } - } - # monthly_piety_gain_mult - 20 = { - if = { - limit = { - rarity = common - } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_piety_gain_mult_1_modifier - } - 15 = { - add_artifact_modifier = artifact_monthly_piety_gain_mult_2_modifier - } - 5 = { - add_artifact_modifier = artifact_monthly_piety_gain_mult_3_modifier - } - } - } - else_if = { - limit = { - rarity = masterwork - } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_piety_gain_mult_4_modifier - } - 15 = { - add_artifact_modifier = artifact_monthly_piety_gain_mult_5_modifier - } - 5 = { - add_artifact_modifier = artifact_monthly_piety_gain_mult_6_modifier - } - } - } - else_if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_piety_gain_mult_7_modifier - } - 15 = { - add_artifact_modifier = artifact_monthly_piety_gain_mult_8_modifier - } - 5 = { - add_artifact_modifier = artifact_monthly_piety_gain_mult_9_modifier - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_piety_gain_mult_10_modifier - } - 15 = { - add_artifact_modifier = artifact_monthly_piety_gain_mult_11_modifier - } - 5 = { - add_artifact_modifier = artifact_monthly_piety_gain_mult_12_modifier - } - } - } - } - # same_faith_opinion - 20 = { - trigger = { - rarity = illustrious - } - if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_same_faith_opinion_1_modifier - } - 10 = { - add_artifact_modifier = artifact_same_faith_opinion_2_modifier - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_same_faith_opinion_3_modifier - } - 10 = { - add_artifact_modifier = artifact_same_faith_opinion_4_modifier - } - } - } - } - # zealot_opinion - 20 = { - if = { - limit = { rarity = common } - add_artifact_modifier = artifact_zealot_vassal_opinion_1_modifier - } - else_if = { - limit = { rarity = masterwork } - add_artifact_modifier = artifact_zealot_vassal_opinion_2_modifier - } - else_if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_zealot_vassal_opinion_3_modifier - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_zealot_vassal_opinion_4_modifier - } - } - # clergy_opinion - 20 = { - trigger = { - scope:owner.faith = { - NOT = { - has_doctrine = doctrine_theocracy_lay_clergy - } - } - } - if = { - limit = { - rarity = common - } - random_list = { - 20 = { - add_artifact_modifier = artifact_clergy_opinion_1_modifier - } - 15 = { - add_artifact_modifier = artifact_clergy_opinion_2_modifier - } - 5 = { - add_artifact_modifier = artifact_clergy_opinion_3_modifier - } - } - } - else_if = { - limit = { - rarity = masterwork - } - random_list = { - 20 = { - add_artifact_modifier = artifact_clergy_opinion_4_modifier - } - 15 = { - add_artifact_modifier = artifact_clergy_opinion_5_modifier - } - 5 = { - add_artifact_modifier = artifact_clergy_opinion_6_modifier - } - } - } - else_if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_clergy_opinion_7_modifier - } - 15 = { - add_artifact_modifier = artifact_clergy_opinion_8_modifier - } - 5 = { - add_artifact_modifier = artifact_clergy_opinion_9_modifier - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_clergy_opinion_10_modifier - } - 15 = { - add_artifact_modifier = artifact_clergy_opinion_11_modifier - } - 5 = { - add_artifact_modifier = artifact_clergy_opinion_12_modifier - } - } - } - } - # church_holding_build_gold_cost - 20 = { - if = { - limit = { - rarity = common - } - random_list = { - 20 = { - add_artifact_modifier = artifact_church_holding_build_gold_cost_1_modifier - } - 15 = { - add_artifact_modifier = artifact_church_holding_build_gold_cost_2_modifier - } - 5 = { - add_artifact_modifier = artifact_church_holding_build_gold_cost_3_modifier - } - } - } - else_if = { - limit = { - rarity = masterwork - } - random_list = { - 20 = { - add_artifact_modifier = artifact_church_holding_build_gold_cost_4_modifier - } - 15 = { - add_artifact_modifier = artifact_church_holding_build_gold_cost_5_modifier - } - 5 = { - add_artifact_modifier = artifact_church_holding_build_gold_cost_6_modifier - } - } - } - else_if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_church_holding_build_gold_cost_7_modifier - } - 15 = { - add_artifact_modifier = artifact_church_holding_build_gold_cost_8_modifier - } - 5 = { - add_artifact_modifier = artifact_church_holding_build_gold_cost_9_modifier - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_church_holding_build_gold_cost_10_modifier - } - 15 = { - add_artifact_modifier = artifact_church_holding_build_gold_cost_11_modifier - } - 5 = { - add_artifact_modifier = artifact_church_holding_build_gold_cost_12_modifier - } - } - } - } - # different_faith_opinion - 20 = { - trigger = { - scope:owner.faith = { - has_doctrine = doctrine_pluralism_pluralistic - } - } - if = { - limit = { - rarity = common - } - random_list = { - 20 = { - add_artifact_modifier = artifact_different_faith_opinion_1_modifier - } - 15 = { - add_artifact_modifier = artifact_different_faith_opinion_2_modifier - } - 5 = { - add_artifact_modifier = artifact_different_faith_opinion_3_modifier - } - } - } - else_if = { - limit = { - rarity = masterwork - } - random_list = { - 20 = { - add_artifact_modifier = artifact_different_faith_opinion_4_modifier - } - 15 = { - add_artifact_modifier = artifact_different_faith_opinion_5_modifier - } - 5 = { - add_artifact_modifier = artifact_different_faith_opinion_6_modifier - } - } - } - else_if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_different_faith_opinion_7_modifier - } - 15 = { - add_artifact_modifier = artifact_different_faith_opinion_8_modifier - } - 5 = { - add_artifact_modifier = artifact_different_faith_opinion_9_modifier - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_different_faith_opinion_10_modifier - } - 15 = { - add_artifact_modifier = artifact_different_faith_opinion_11_modifier - } - 5 = { - add_artifact_modifier = artifact_different_faith_opinion_12_modifier - } - } - } - } - # monthly_piety_from_buildings_mult - 20 = { - trigger = { - scope:owner.faith = { - has_doctrine = doctrine_theocracy_lay_clergy - } - } - if = { - limit = { - rarity = common - } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_piety_from_buildings_mult_1_modifier - } - 15 = { - add_artifact_modifier = artifact_monthly_piety_from_buildings_mult_2_modifier - } - 5 = { - add_artifact_modifier = artifact_monthly_piety_from_buildings_mult_3_modifier - } - } - } - else_if = { - limit = { - rarity = masterwork - } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_piety_from_buildings_mult_4_modifier - } - 15 = { - add_artifact_modifier = artifact_monthly_piety_from_buildings_mult_5_modifier - } - 5 = { - add_artifact_modifier = artifact_monthly_piety_from_buildings_mult_6_modifier - } - } - } - else_if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_piety_from_buildings_mult_7_modifier - } - 15 = { - add_artifact_modifier = artifact_monthly_piety_from_buildings_mult_8_modifier - } - 5 = { - add_artifact_modifier = artifact_monthly_piety_from_buildings_mult_9_modifier - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_piety_from_buildings_mult_10_modifier - } - 15 = { - add_artifact_modifier = artifact_monthly_piety_from_buildings_mult_11_modifier - } - 5 = { - add_artifact_modifier = artifact_monthly_piety_from_buildings_mult_12_modifier - } - } - } - } - # domain_tax_same_faith_mult - 20 = { - trigger = { - OR = { - rarity = famed - rarity = illustrious - } - } - if = { - limit = { rarity = famed } - random_list = { - 20 = { - add_artifact_modifier = artifact_domain_tax_same_faith_mult_1_modifier - } - 10 = { - add_artifact_modifier = artifact_domain_tax_same_faith_mult_2_modifier - } - } - } - else_if = { - limit = { rarity = illustrious } - random_list = { - 20 = { - add_artifact_modifier = artifact_domain_tax_same_faith_mult_3_modifier - } - 10 = { - add_artifact_modifier = artifact_domain_tax_same_faith_mult_4_modifier - } - } - } - } - # monthly_piety_gain_per_happy_powerful_vassal_add - 20 = { - trigger = { - scope:owner = { - faith = { - has_doctrine = doctrine_pluralism_pluralistic - } - } - OR = { - rarity = famed - rarity = illustrious - } - } - if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_monthly_piety_gain_per_happy_powerful_vassal_add_1_modifier - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_monthly_piety_gain_per_happy_powerful_vassal_add_2_modifier - } - } - # monthly_piety_gain_per_happy_powerful_vassal_add - 20 = { - trigger = { - scope:owner = { - faith = { - has_doctrine = doctrine_pluralism_pluralistic - } - } - OR = { - rarity = famed - rarity = illustrious - } - } - if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_monthly_piety_gain_per_happy_powerful_vassal_add_1_modifier - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_monthly_piety_gain_per_happy_powerful_vassal_add_2_modifier - } - } - # monthly_piety_gain_per_knight_add - 20 = { - trigger = { - scope:owner = { - faith = { - NOR = { - has_doctrine = doctrine_pluralism_pluralistic - has_doctrine_parameter = pacifist_opinion_active - } - } - } - OR = { - rarity = famed - rarity = illustrious - } - } - if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_monthly_piety_gain_per_knight_add_1_modifier - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_monthly_piety_gain_per_knight_add_2_modifier - } - } - # zealot_tax_contribution_mult - 20 = { - if = { - limit = { rarity = common } - add_artifact_modifier = artifact_zealot_tax_contribution_mult_1_modifier - } - else_if = { - limit = { rarity = masterwork } - add_artifact_modifier = artifact_zealot_tax_contribution_mult_2_modifier - } - else_if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_zealot_tax_contribution_mult_3_modifier - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_zealot_tax_contribution_mult_4_modifier - } - } - # learning_per_piety_level - 20 = { - trigger = { - rarity = illustrious - } - add_artifact_modifier = artifact_learning_per_piety_level_modifier - } - } -} - -add_2_scaled_artifact_modifier_devotion_effect = { - random_list = { - pick = 2 - unique = yes - # monthly_piety - 20 = { - if = { - limit = { - rarity = common - } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_piety_1_modifier - } - 15 = { - add_artifact_modifier = artifact_monthly_piety_2_modifier - } - } - } - else_if = { - limit = { - rarity = masterwork - } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_piety_3_modifier - } - 15 = { - add_artifact_modifier = artifact_monthly_piety_4_modifier - } - } - } - else_if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_piety_5_modifier - } - 15 = { - add_artifact_modifier = artifact_monthly_piety_6_modifier - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_piety_7_modifier - } - 15 = { - add_artifact_modifier = artifact_monthly_piety_8_modifier - } - } - } - } - # monthly_piety_gain_mult - 20 = { - if = { - limit = { - rarity = common - } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_piety_gain_mult_1_modifier - } - 15 = { - add_artifact_modifier = artifact_monthly_piety_gain_mult_2_modifier - } - 5 = { - add_artifact_modifier = artifact_monthly_piety_gain_mult_3_modifier - } - } - } - else_if = { - limit = { - rarity = masterwork - } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_piety_gain_mult_4_modifier - } - 15 = { - add_artifact_modifier = artifact_monthly_piety_gain_mult_5_modifier - } - 5 = { - add_artifact_modifier = artifact_monthly_piety_gain_mult_6_modifier - } - } - } - else_if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_piety_gain_mult_7_modifier - } - 15 = { - add_artifact_modifier = artifact_monthly_piety_gain_mult_8_modifier - } - 5 = { - add_artifact_modifier = artifact_monthly_piety_gain_mult_9_modifier - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_piety_gain_mult_10_modifier - } - 15 = { - add_artifact_modifier = artifact_monthly_piety_gain_mult_11_modifier - } - 5 = { - add_artifact_modifier = artifact_monthly_piety_gain_mult_12_modifier - } - } - } - } - # same_faith_opinion - 20 = { - trigger = { - rarity = illustrious - } - if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_same_faith_opinion_1_modifier - } - 10 = { - add_artifact_modifier = artifact_same_faith_opinion_2_modifier - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_same_faith_opinion_3_modifier - } - 10 = { - add_artifact_modifier = artifact_same_faith_opinion_4_modifier - } - } - } - } - # zealot_opinion - 20 = { - if = { - limit = { rarity = common } - add_artifact_modifier = artifact_zealot_vassal_opinion_1_modifier - } - else_if = { - limit = { rarity = masterwork } - add_artifact_modifier = artifact_zealot_vassal_opinion_2_modifier - } - else_if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_zealot_vassal_opinion_3_modifier - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_zealot_vassal_opinion_4_modifier - } - } - # clergy_opinion - 20 = { - trigger = { - scope:owner.faith = { - NOT = { - has_doctrine = doctrine_theocracy_lay_clergy - } - } - } - if = { - limit = { - rarity = common - } - random_list = { - 20 = { - add_artifact_modifier = artifact_clergy_opinion_1_modifier - } - 15 = { - add_artifact_modifier = artifact_clergy_opinion_2_modifier - } - 5 = { - add_artifact_modifier = artifact_clergy_opinion_3_modifier - } - } - } - else_if = { - limit = { - rarity = masterwork - } - random_list = { - 20 = { - add_artifact_modifier = artifact_clergy_opinion_4_modifier - } - 15 = { - add_artifact_modifier = artifact_clergy_opinion_5_modifier - } - 5 = { - add_artifact_modifier = artifact_clergy_opinion_6_modifier - } - } - } - else_if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_clergy_opinion_7_modifier - } - 15 = { - add_artifact_modifier = artifact_clergy_opinion_8_modifier - } - 5 = { - add_artifact_modifier = artifact_clergy_opinion_9_modifier - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_clergy_opinion_10_modifier - } - 15 = { - add_artifact_modifier = artifact_clergy_opinion_11_modifier - } - 5 = { - add_artifact_modifier = artifact_clergy_opinion_12_modifier - } - } - } - } - # church_holding_build_gold_cost - 20 = { - if = { - limit = { - rarity = common - } - random_list = { - 20 = { - add_artifact_modifier = artifact_church_holding_build_gold_cost_1_modifier - } - 15 = { - add_artifact_modifier = artifact_church_holding_build_gold_cost_2_modifier - } - 5 = { - add_artifact_modifier = artifact_church_holding_build_gold_cost_3_modifier - } - } - } - else_if = { - limit = { - rarity = masterwork - } - random_list = { - 20 = { - add_artifact_modifier = artifact_church_holding_build_gold_cost_4_modifier - } - 15 = { - add_artifact_modifier = artifact_church_holding_build_gold_cost_5_modifier - } - 5 = { - add_artifact_modifier = artifact_church_holding_build_gold_cost_6_modifier - } - } - } - else_if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_church_holding_build_gold_cost_7_modifier - } - 15 = { - add_artifact_modifier = artifact_church_holding_build_gold_cost_8_modifier - } - 5 = { - add_artifact_modifier = artifact_church_holding_build_gold_cost_9_modifier - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_church_holding_build_gold_cost_10_modifier - } - 15 = { - add_artifact_modifier = artifact_church_holding_build_gold_cost_11_modifier - } - 5 = { - add_artifact_modifier = artifact_church_holding_build_gold_cost_12_modifier - } - } - } - } - # different_faith_opinion - 20 = { - trigger = { - scope:owner.faith = { - has_doctrine = doctrine_pluralism_pluralistic - } - } - if = { - limit = { - rarity = common - } - random_list = { - 20 = { - add_artifact_modifier = artifact_different_faith_opinion_1_modifier - } - 15 = { - add_artifact_modifier = artifact_different_faith_opinion_2_modifier - } - 5 = { - add_artifact_modifier = artifact_different_faith_opinion_3_modifier - } - } - } - else_if = { - limit = { - rarity = masterwork - } - random_list = { - 20 = { - add_artifact_modifier = artifact_different_faith_opinion_4_modifier - } - 15 = { - add_artifact_modifier = artifact_different_faith_opinion_5_modifier - } - 5 = { - add_artifact_modifier = artifact_different_faith_opinion_6_modifier - } - } - } - else_if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_different_faith_opinion_7_modifier - } - 15 = { - add_artifact_modifier = artifact_different_faith_opinion_8_modifier - } - 5 = { - add_artifact_modifier = artifact_different_faith_opinion_9_modifier - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_different_faith_opinion_10_modifier - } - 15 = { - add_artifact_modifier = artifact_different_faith_opinion_11_modifier - } - 5 = { - add_artifact_modifier = artifact_different_faith_opinion_12_modifier - } - } - } - } - # monthly_piety_from_buildings_mult - 20 = { - trigger = { - scope:owner.faith = { - has_doctrine = doctrine_theocracy_lay_clergy - } - } - if = { - limit = { - rarity = common - } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_piety_from_buildings_mult_1_modifier - } - 15 = { - add_artifact_modifier = artifact_monthly_piety_from_buildings_mult_2_modifier - } - 5 = { - add_artifact_modifier = artifact_monthly_piety_from_buildings_mult_3_modifier - } - } - } - else_if = { - limit = { - rarity = masterwork - } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_piety_from_buildings_mult_4_modifier - } - 15 = { - add_artifact_modifier = artifact_monthly_piety_from_buildings_mult_5_modifier - } - 5 = { - add_artifact_modifier = artifact_monthly_piety_from_buildings_mult_6_modifier - } - } - } - else_if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_piety_from_buildings_mult_7_modifier - } - 15 = { - add_artifact_modifier = artifact_monthly_piety_from_buildings_mult_8_modifier - } - 5 = { - add_artifact_modifier = artifact_monthly_piety_from_buildings_mult_9_modifier - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_monthly_piety_from_buildings_mult_10_modifier - } - 15 = { - add_artifact_modifier = artifact_monthly_piety_from_buildings_mult_11_modifier - } - 5 = { - add_artifact_modifier = artifact_monthly_piety_from_buildings_mult_12_modifier - } - } - } - } - # domain_tax_same_faith_mult - 20 = { - trigger = { - OR = { - rarity = famed - rarity = illustrious - } - } - if = { - limit = { rarity = famed } - random_list = { - 20 = { - add_artifact_modifier = artifact_domain_tax_same_faith_mult_1_modifier - } - 10 = { - add_artifact_modifier = artifact_domain_tax_same_faith_mult_2_modifier - } - } - } - else_if = { - limit = { rarity = illustrious } - random_list = { - 20 = { - add_artifact_modifier = artifact_domain_tax_same_faith_mult_3_modifier - } - 10 = { - add_artifact_modifier = artifact_domain_tax_same_faith_mult_4_modifier - } - } - } - } - # monthly_piety_gain_per_happy_powerful_vassal_add - 20 = { - trigger = { - scope:owner = { - faith = { - has_doctrine = doctrine_pluralism_pluralistic - } - } - OR = { - rarity = famed - rarity = illustrious - } - } - if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_monthly_piety_gain_per_happy_powerful_vassal_add_1_modifier - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_monthly_piety_gain_per_happy_powerful_vassal_add_2_modifier - } - } - # monthly_piety_gain_per_happy_powerful_vassal_add - 20 = { - trigger = { - scope:owner = { - faith = { - has_doctrine = doctrine_pluralism_pluralistic - } - } - OR = { - rarity = famed - rarity = illustrious - } - } - if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_monthly_piety_gain_per_happy_powerful_vassal_add_1_modifier - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_monthly_piety_gain_per_happy_powerful_vassal_add_2_modifier - } - } - # monthly_piety_gain_per_knight_add - 20 = { - trigger = { - scope:owner = { - faith = { - NOR = { - has_doctrine = doctrine_pluralism_pluralistic - has_doctrine_parameter = pacifist_opinion_active - } - } - } - OR = { - rarity = famed - rarity = illustrious - } - } - if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_monthly_piety_gain_per_knight_add_1_modifier - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_monthly_piety_gain_per_knight_add_2_modifier - } - } - # zealot_tax_contribution_mult - 20 = { - if = { - limit = { rarity = common } - add_artifact_modifier = artifact_zealot_tax_contribution_mult_1_modifier - } - else_if = { - limit = { rarity = masterwork } - add_artifact_modifier = artifact_zealot_tax_contribution_mult_2_modifier - } - else_if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_zealot_tax_contribution_mult_3_modifier - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_zealot_tax_contribution_mult_4_modifier - } - } - # learning_per_piety_level - 20 = { - trigger = { - rarity = illustrious - } - add_artifact_modifier = artifact_learning_per_piety_level_modifier - } - } -} - -add_scaled_artifact_modifier_intrigue_effect = { - random_list = { - - # owned_hostile_scheme_success_chance_add - 20 = { - if = { - limit = { - rarity = common - } - random_list = { - 20 = { - add_artifact_modifier = artifact_owned_hostile_scheme_success_chance_add_1_modifier - } - 15 = { - add_artifact_modifier = artifact_owned_hostile_scheme_success_chance_add_2_modifier - } - 5 = { - add_artifact_modifier = artifact_owned_hostile_scheme_success_chance_add_3_modifier - } - } - } - else_if = { - limit = { - rarity = masterwork - } - random_list = { - 20 = { - add_artifact_modifier = artifact_owned_hostile_scheme_success_chance_add_4_modifier - } - 15 = { - add_artifact_modifier = artifact_owned_hostile_scheme_success_chance_add_5_modifier - } - 5 = { - add_artifact_modifier = artifact_owned_hostile_scheme_success_chance_add_6_modifier - } - } - } - else_if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_owned_hostile_scheme_success_chance_add_7_modifier - } - 15 = { - add_artifact_modifier = artifact_owned_hostile_scheme_success_chance_add_8_modifier - } - 5 = { - add_artifact_modifier = artifact_owned_hostile_scheme_success_chance_add_9_modifier - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_owned_hostile_scheme_success_chance_add_10_modifier - } - 15 = { - add_artifact_modifier = artifact_owned_hostile_scheme_success_chance_add_11_modifier - } - 5 = { - add_artifact_modifier = artifact_owned_hostile_scheme_success_chance_add_12_modifier - } - } - } - } - # owned_personal_scheme_success_chance_add - 20 = { - if = { - limit = { - rarity = common - } - random_list = { - 20 = { - add_artifact_modifier = artifact_owned_personal_scheme_success_chance_add_1_modifier - } - 15 = { - add_artifact_modifier = artifact_owned_personal_scheme_success_chance_add_2_modifier - } - 5 = { - add_artifact_modifier = artifact_owned_personal_scheme_success_chance_add_3_modifier - } - } - } - else_if = { - limit = { - rarity = masterwork - } - random_list = { - 20 = { - add_artifact_modifier = artifact_owned_personal_scheme_success_chance_add_4_modifier - } - 15 = { - add_artifact_modifier = artifact_owned_personal_scheme_success_chance_add_5_modifier - } - 5 = { - add_artifact_modifier = artifact_owned_personal_scheme_success_chance_add_6_modifier - } - } - } - else_if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_owned_personal_scheme_success_chance_add_7_modifier - } - 15 = { - add_artifact_modifier = artifact_owned_personal_scheme_success_chance_add_8_modifier - } - 5 = { - add_artifact_modifier = artifact_owned_personal_scheme_success_chance_add_9_modifier - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_owned_personal_scheme_success_chance_add_10_modifier - } - 15 = { - add_artifact_modifier = artifact_owned_personal_scheme_success_chance_add_11_modifier - } - 5 = { - add_artifact_modifier = artifact_owned_personal_scheme_success_chance_add_12_modifier - } - } - } - } - # owned_scheme_secrecy_add - 20 = { - if = { - limit = { - rarity = common - } - random_list = { - 20 = { - add_artifact_modifier = artifact_owned_scheme_secrecy_add_1_modifier - } - 15 = { - add_artifact_modifier = artifact_owned_scheme_secrecy_add_2_modifier - } - 5 = { - add_artifact_modifier = artifact_owned_scheme_secrecy_add_3_modifier - } - } - } - else_if = { - limit = { - rarity = masterwork - } - random_list = { - 20 = { - add_artifact_modifier = artifact_owned_scheme_secrecy_add_4_modifier - } - 15 = { - add_artifact_modifier = artifact_owned_scheme_secrecy_add_5_modifier - } - 5 = { - add_artifact_modifier = artifact_owned_scheme_secrecy_add_6_modifier - } - } - } - else_if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_owned_scheme_secrecy_add_7_modifier - } - 15 = { - add_artifact_modifier = artifact_owned_scheme_secrecy_add_8_modifier - } - 5 = { - add_artifact_modifier = artifact_owned_scheme_secrecy_add_9_modifier - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_owned_scheme_secrecy_add_10_modifier - } - 15 = { - add_artifact_modifier = artifact_owned_scheme_secrecy_add_11_modifier - } - 5 = { - add_artifact_modifier = artifact_owned_scheme_secrecy_add_12_modifier - } - } - } - } - # hostile_scheme_phase_duration_add - 20 = { - if = { - limit = { - rarity = common - } - random_list = { - 20 = { - add_artifact_modifier = artifact_hostile_scheme_phase_duration_add_1_modifier - } - 15 = { - add_artifact_modifier = artifact_hostile_scheme_phase_duration_add_2_modifier - } - 5 = { - add_artifact_modifier = artifact_hostile_scheme_phase_duration_add_3_modifier - } - } - } - else_if = { - limit = { - rarity = masterwork - } - random_list = { - 20 = { - add_artifact_modifier = artifact_hostile_scheme_phase_duration_add_4_modifier - } - 15 = { - add_artifact_modifier = artifact_hostile_scheme_phase_duration_add_5_modifier - } - 5 = { - add_artifact_modifier = artifact_hostile_scheme_phase_duration_add_6_modifier - } - } - } - else_if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_hostile_scheme_phase_duration_add_7_modifier - } - 15 = { - add_artifact_modifier = artifact_hostile_scheme_phase_duration_add_8_modifier - } - 5 = { - add_artifact_modifier = artifact_hostile_scheme_phase_duration_add_9_modifier - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_hostile_scheme_phase_duration_add_10_modifier - } - 15 = { - add_artifact_modifier = artifact_hostile_scheme_phase_duration_add_11_modifier - } - 5 = { - add_artifact_modifier = artifact_hostile_scheme_phase_duration_add_12_modifier - } - } - } - } - # personal_scheme_phase_duration_add - 20 = { - if = { - limit = { - rarity = common - } - random_list = { - 20 = { - add_artifact_modifier = artifact_personal_scheme_phase_duration_add_1_modifier - } - 15 = { - add_artifact_modifier = artifact_personal_scheme_phase_duration_add_2_modifier - } - 5 = { - add_artifact_modifier = artifact_personal_scheme_phase_duration_add_3_modifier - } - } - } - else_if = { - limit = { - rarity = masterwork - } - random_list = { - 20 = { - add_artifact_modifier = artifact_personal_scheme_phase_duration_add_4_modifier - } - 15 = { - add_artifact_modifier = artifact_personal_scheme_phase_duration_add_5_modifier - } - 5 = { - add_artifact_modifier = artifact_personal_scheme_phase_duration_add_6_modifier - } - } - } - else_if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_personal_scheme_phase_duration_add_7_modifier - } - 15 = { - add_artifact_modifier = artifact_personal_scheme_phase_duration_add_8_modifier - } - 5 = { - add_artifact_modifier = artifact_personal_scheme_phase_duration_add_9_modifier - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_personal_scheme_phase_duration_add_10_modifier - } - 15 = { - add_artifact_modifier = artifact_personal_scheme_phase_duration_add_11_modifier - } - 5 = { - add_artifact_modifier = artifact_personal_scheme_phase_duration_add_12_modifier - } - } - } - } - - # intrigue_per_stress_level - 20 = { - trigger = { - OR = { - rarity = famed - rarity = illustrious - } - } - if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_intrigue_per_stress_level_1_modifier - } - else_if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_intrigue_per_stress_level_2_modifier - } - } - } -} - -add_2_scaled_artifact_modifier_intrigue_effect = { - random_list = { - pick = 2 - unique = yes - # owned_hostile_scheme_success_chance_add - 20 = { - if = { - limit = { - rarity = common - } - random_list = { - 20 = { - add_artifact_modifier = artifact_owned_hostile_scheme_success_chance_add_1_modifier - } - 15 = { - add_artifact_modifier = artifact_owned_hostile_scheme_success_chance_add_2_modifier - } - 5 = { - add_artifact_modifier = artifact_owned_hostile_scheme_success_chance_add_3_modifier - } - } - } - else_if = { - limit = { - rarity = masterwork - } - random_list = { - 20 = { - add_artifact_modifier = artifact_owned_hostile_scheme_success_chance_add_4_modifier - } - 15 = { - add_artifact_modifier = artifact_owned_hostile_scheme_success_chance_add_5_modifier - } - 5 = { - add_artifact_modifier = artifact_owned_hostile_scheme_success_chance_add_6_modifier - } - } - } - else_if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_owned_hostile_scheme_success_chance_add_7_modifier - } - 15 = { - add_artifact_modifier = artifact_owned_hostile_scheme_success_chance_add_8_modifier - } - 5 = { - add_artifact_modifier = artifact_owned_hostile_scheme_success_chance_add_9_modifier - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_owned_hostile_scheme_success_chance_add_10_modifier - } - 15 = { - add_artifact_modifier = artifact_owned_hostile_scheme_success_chance_add_11_modifier - } - 5 = { - add_artifact_modifier = artifact_owned_hostile_scheme_success_chance_add_12_modifier - } - } - } - } - # owned_personal_scheme_success_chance_add - 20 = { - if = { - limit = { - rarity = common - } - random_list = { - 20 = { - add_artifact_modifier = artifact_owned_personal_scheme_success_chance_add_1_modifier - } - 15 = { - add_artifact_modifier = artifact_owned_personal_scheme_success_chance_add_2_modifier - } - 5 = { - add_artifact_modifier = artifact_owned_personal_scheme_success_chance_add_3_modifier - } - } - } - else_if = { - limit = { - rarity = masterwork - } - random_list = { - 20 = { - add_artifact_modifier = artifact_owned_personal_scheme_success_chance_add_4_modifier - } - 15 = { - add_artifact_modifier = artifact_owned_personal_scheme_success_chance_add_5_modifier - } - 5 = { - add_artifact_modifier = artifact_owned_personal_scheme_success_chance_add_6_modifier - } - } - } - else_if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_owned_personal_scheme_success_chance_add_7_modifier - } - 15 = { - add_artifact_modifier = artifact_owned_personal_scheme_success_chance_add_8_modifier - } - 5 = { - add_artifact_modifier = artifact_owned_personal_scheme_success_chance_add_9_modifier - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_owned_personal_scheme_success_chance_add_10_modifier - } - 15 = { - add_artifact_modifier = artifact_owned_personal_scheme_success_chance_add_11_modifier - } - 5 = { - add_artifact_modifier = artifact_owned_personal_scheme_success_chance_add_12_modifier - } - } - } - } - # owned_scheme_secrecy_add - 20 = { - if = { - limit = { - rarity = common - } - random_list = { - 20 = { - add_artifact_modifier = artifact_owned_scheme_secrecy_add_1_modifier - } - 15 = { - add_artifact_modifier = artifact_owned_scheme_secrecy_add_2_modifier - } - 5 = { - add_artifact_modifier = artifact_owned_scheme_secrecy_add_3_modifier - } - } - } - else_if = { - limit = { - rarity = masterwork - } - random_list = { - 20 = { - add_artifact_modifier = artifact_owned_scheme_secrecy_add_4_modifier - } - 15 = { - add_artifact_modifier = artifact_owned_scheme_secrecy_add_5_modifier - } - 5 = { - add_artifact_modifier = artifact_owned_scheme_secrecy_add_6_modifier - } - } - } - else_if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_owned_scheme_secrecy_add_7_modifier - } - 15 = { - add_artifact_modifier = artifact_owned_scheme_secrecy_add_8_modifier - } - 5 = { - add_artifact_modifier = artifact_owned_scheme_secrecy_add_9_modifier - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_owned_scheme_secrecy_add_10_modifier - } - 15 = { - add_artifact_modifier = artifact_owned_scheme_secrecy_add_11_modifier - } - 5 = { - add_artifact_modifier = artifact_owned_scheme_secrecy_add_12_modifier - } - } - } - } - # hostile_scheme_phase_duration_add - 20 = { - if = { - limit = { - rarity = common - } - random_list = { - 20 = { - add_artifact_modifier = artifact_hostile_scheme_phase_duration_add_1_modifier - } - 15 = { - add_artifact_modifier = artifact_hostile_scheme_phase_duration_add_2_modifier - } - 5 = { - add_artifact_modifier = artifact_hostile_scheme_phase_duration_add_3_modifier - } - } - } - else_if = { - limit = { - rarity = masterwork - } - random_list = { - 20 = { - add_artifact_modifier = artifact_hostile_scheme_phase_duration_add_4_modifier - } - 15 = { - add_artifact_modifier = artifact_hostile_scheme_phase_duration_add_5_modifier - } - 5 = { - add_artifact_modifier = artifact_hostile_scheme_phase_duration_add_6_modifier - } - } - } - else_if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_hostile_scheme_phase_duration_add_7_modifier - } - 15 = { - add_artifact_modifier = artifact_hostile_scheme_phase_duration_add_8_modifier - } - 5 = { - add_artifact_modifier = artifact_hostile_scheme_phase_duration_add_9_modifier - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_hostile_scheme_phase_duration_add_10_modifier - } - 15 = { - add_artifact_modifier = artifact_hostile_scheme_phase_duration_add_11_modifier - } - 5 = { - add_artifact_modifier = artifact_hostile_scheme_phase_duration_add_12_modifier - } - } - } - } - # personal_scheme_phase_duration_add - 20 = { - if = { - limit = { - rarity = common - } - random_list = { - 20 = { - add_artifact_modifier = artifact_personal_scheme_phase_duration_add_1_modifier - } - 15 = { - add_artifact_modifier = artifact_personal_scheme_phase_duration_add_2_modifier - } - 5 = { - add_artifact_modifier = artifact_personal_scheme_phase_duration_add_3_modifier - } - } - } - else_if = { - limit = { - rarity = masterwork - } - random_list = { - 20 = { - add_artifact_modifier = artifact_personal_scheme_phase_duration_add_4_modifier - } - 15 = { - add_artifact_modifier = artifact_personal_scheme_phase_duration_add_5_modifier - } - 5 = { - add_artifact_modifier = artifact_personal_scheme_phase_duration_add_6_modifier - } - } - } - else_if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_personal_scheme_phase_duration_add_7_modifier - } - 15 = { - add_artifact_modifier = artifact_personal_scheme_phase_duration_add_8_modifier - } - 5 = { - add_artifact_modifier = artifact_personal_scheme_phase_duration_add_9_modifier - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_personal_scheme_phase_duration_add_10_modifier - } - 15 = { - add_artifact_modifier = artifact_personal_scheme_phase_duration_add_11_modifier - } - 5 = { - add_artifact_modifier = artifact_personal_scheme_phase_duration_add_12_modifier - } - } - } - } - - # intrigue_per_stress_level - 20 = { - trigger = { - OR = { - rarity = famed - rarity = illustrious - } - } - if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_intrigue_per_stress_level_1_modifier - } - else_if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_intrigue_per_stress_level_2_modifier - } - } - } -} - -add_scaled_artifact_modifier_attractiveness_effect = { - random_list = { - # attraction_opinion - 20 = { - modifier = { - exists = scope:inspiration_owner - scope:inspiration_owner = { has_variable = chosen_attraction_mod } - add = 160 - } - if = { - limit = { rarity = common } - add_artifact_modifier = artifact_attraction_opinion_1_modifier - } - else_if = { - limit = { rarity = masterwork } - add_artifact_modifier = artifact_attraction_opinion_2_modifier - } - else_if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_attraction_opinion_3_modifier - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_attraction_opinion_4_modifier - } - } - # fertility - 20 = { - if = { - limit = { rarity = common } - add_artifact_modifier = artifact_fertility_gain_1_modifier - } - else_if = { - limit = { rarity = masterwork } - add_artifact_modifier = artifact_fertility_gain_2_modifier - } - else_if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_fertility_gain_3_modifier - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_fertility_gain_4_modifier - } - } - # courting_scheme_phase_duration_add - 15 = { - trigger = { - scope:owner = { - diplomacy >= intrigue - } - } - if = { - limit = { rarity = common } - add_artifact_modifier = artifact_courting_scheme_phase_duration_add_1_modifier - } - else_if = { - limit = { rarity = masterwork } - add_artifact_modifier = artifact_courting_scheme_phase_duration_add_2_modifier - } - else_if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_courting_scheme_phase_duration_add_3_modifier - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_courting_scheme_phase_duration_add_4_modifier - } - } - # befriend_scheme_phase_duration_add - 5 = { - trigger = { - scope:owner = { intrigue <= low_skill_rating } - } - if = { - limit = { rarity = common } - add_artifact_modifier = artifact_befriend_scheme_phase_duration_add_1_modifier - } - else_if = { - limit = { rarity = masterwork } - add_artifact_modifier = artifact_befriend_scheme_phase_duration_add_2_modifier - } - else_if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_befriend_scheme_phase_duration_add_3_modifier - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_befriend_scheme_phase_duration_add_4_modifier - } - } - # seduce_scheme_phase_duration_add - 20 = { - trigger = { - scope:owner = { - intrigue >= diplomacy - } - } - if = { - limit = { rarity = common } - add_artifact_modifier = artifact_seduce_scheme_phase_duration_add_1_modifier - } - else_if = { - limit = { rarity = masterwork } - add_artifact_modifier = artifact_seduce_scheme_phase_duration_add_2_modifier - } - else_if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_seduce_scheme_phase_duration_add_3_modifier - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_seduce_scheme_phase_duration_add_4_modifier - } - } - # spouse_opinion - 20 = { - trigger = { - scope:owner = { - is_married = yes - } - } - if = { - limit = { rarity = common } - add_artifact_modifier = artifact_spouse_opinion_add_1_modifier - } - else_if = { - limit = { rarity = masterwork } - add_artifact_modifier = artifact_spouse_opinion_add_2_modifier - } - else_if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_spouse_opinion_add_3_modifier - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_spouse_opinion_add_4_modifier - } - } - } -} - -add_scaled_artifact_modifier_scholarship_effect = { - random_list = { - # development_growth - 20 = { - trigger = { - artifact_owner ?= { NOT = { government_has_flag = government_is_nomadic } } - } - if = { - limit = { - rarity = common - } - random_list = { - 20 = { - add_artifact_modifier = artifact_development_growth_1_modifier - } - 15 = { - add_artifact_modifier = artifact_development_growth_2_modifier - } - 5 = { - add_artifact_modifier = artifact_development_growth_3_modifier - } - } - } - else_if = { - limit = { - rarity = masterwork - } - random_list = { - 20 = { - add_artifact_modifier = artifact_development_growth_4_modifier - } - 15 = { - add_artifact_modifier = artifact_development_growth_5_modifier - } - 5 = { - add_artifact_modifier = artifact_development_growth_6_modifier - } - } - } - else_if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_development_growth_7_modifier - } - 15 = { - add_artifact_modifier = artifact_development_growth_8_modifier - } - 5 = { - add_artifact_modifier = artifact_development_growth_9_modifier - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_development_growth_10_modifier - } - 15 = { - add_artifact_modifier = artifact_development_growth_11_modifier - } - 5 = { - add_artifact_modifier = artifact_development_growth_12_modifier - } - } - } - } - # fertility_growth - 20 = { - trigger = { - artifact_owner ?= { government_has_flag = government_is_nomadic } - } - if = { - limit = { - rarity = common - } - random_list = { - 20 = { - add_artifact_modifier = artifact_fertility_growth_1_modifier - } - 15 = { - add_artifact_modifier = artifact_fertility_growth_2_modifier - } - 5 = { - add_artifact_modifier = artifact_fertility_growth_3_modifier - } - } - } - else_if = { - limit = { - rarity = masterwork - } - random_list = { - 20 = { - add_artifact_modifier = artifact_fertility_growth_4_modifier - } - 15 = { - add_artifact_modifier = artifact_fertility_growth_5_modifier - } - 5 = { - add_artifact_modifier = artifact_fertility_growth_6_modifier - } - } - } - else_if = { - limit = { - rarity = famed - } - random_list = { - 20 = { - add_artifact_modifier = artifact_fertility_growth_7_modifier - } - 15 = { - add_artifact_modifier = artifact_fertility_growth_8_modifier - } - 5 = { - add_artifact_modifier = artifact_fertility_growth_9_modifier - } - } - } - else_if = { - limit = { - rarity = illustrious - } - random_list = { - 20 = { - add_artifact_modifier = artifact_fertility_growth_10_modifier - } - 15 = { - add_artifact_modifier = artifact_fertility_growth_11_modifier - } - 5 = { - add_artifact_modifier = artifact_fertility_growth_12_modifier - } - } - } - } - # learn_language_scheme_phase_duration_add - 20 = { - if = { - limit = { rarity = common } - add_artifact_modifier = artifact_learn_language_scheme_phase_duration_add_1_modifier - } - else_if = { - limit = { rarity = masterwork } - add_artifact_modifier = artifact_learn_language_scheme_phase_duration_add_2_modifier - } - else_if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_learn_language_scheme_phase_duration_add_3_modifier - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_learn_language_scheme_phase_duration_add_4_modifier - } - } - - # Learning per Prestige Level - 20 = { - trigger = { - OR = { - rarity = famed - rarity = illustrious - } - } - add_artifact_modifier = artifact_learning_per_prestige_level_modifier - } - } -} - -add_scaled_artifact_kris_benefit_effect = { - if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_kris_1_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_kris_2_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_kris_3_modifier - } - else_if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_kris_4_modifier - } -} - -add_scaled_artifact_modifier_learning_lifestyle_xp_effect = { - if = { - limit = { rarity = common } - random_list = { - 20 = { add_artifact_modifier = artifact_monthly_learning_lifestyle_xp_1_modifier } - 5 = { add_artifact_modifier = artifact_monthly_learning_lifestyle_xp_2_modifier } - } - } - else_if = { - limit = { rarity = masterwork } - random_list = { - 20 = { add_artifact_modifier = artifact_monthly_learning_lifestyle_xp_2_modifier } - 5 = { add_artifact_modifier = artifact_monthly_learning_lifestyle_xp_3_modifier } - } - } - else_if = { - limit = { rarity = famed } - random_list = { - 20 = { add_artifact_modifier = artifact_monthly_learning_lifestyle_xp_3_modifier } - 5 = { add_artifact_modifier = artifact_monthly_learning_lifestyle_xp_4_modifier } - } - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_monthly_learning_lifestyle_xp_4_modifier - } -} - -# EP2 - -add_scaled_artifact_modifier_archers_screen_add_effect = { - if = { - limit = { rarity = common } - random_list = { - 20 = { add_artifact_modifier = artifact_archers_screen_add_1_modifier } - 5 = { add_artifact_modifier = artifact_archers_screen_add_2_modifier } - } - } - else_if = { - limit = { rarity = masterwork } - random_list = { - 20 = { add_artifact_modifier = artifact_archers_screen_add_2_modifier } - 5 = { add_artifact_modifier = artifact_archers_screen_add_3_modifier } - } - } - else_if = { - limit = { rarity = famed } - random_list = { - 20 = { add_artifact_modifier = artifact_archers_screen_add_3_modifier } - 5 = { add_artifact_modifier = artifact_archers_screen_add_4_modifier } - } - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_archers_screen_add_4_modifier - } -} - -add_scaled_artifact_modifier_archers_toughness_mult_effect = { - if = { - limit = { rarity = common } - random_list = { - 20 = { add_artifact_modifier = artifact_archers_toughness_mult_1_modifier } - 5 = { add_artifact_modifier = artifact_archers_toughness_mult_2_modifier } - } - } - else_if = { - limit = { rarity = masterwork } - random_list = { - 20 = { add_artifact_modifier = artifact_archers_toughness_mult_2_modifier } - 5 = { add_artifact_modifier = artifact_archers_toughness_mult_3_modifier } - } - } - else_if = { - limit = { rarity = famed } - random_list = { - 20 = { add_artifact_modifier = artifact_archers_toughness_mult_3_modifier } - 5 = { add_artifact_modifier = artifact_archers_toughness_mult_4_modifier } - } - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_archers_toughness_mult_4_modifier - } -} - -add_scaled_artifact_modifier_archer_cavalry_screen_add_effect = { - if = { - limit = { rarity = common } - random_list = { - 20 = { add_artifact_modifier = artifact_archer_cavalry_screen_add_1_modifier } - 5 = { add_artifact_modifier = artifact_archer_cavalry_screen_add_2_modifier } - } - } - else_if = { - limit = { rarity = masterwork } - random_list = { - 20 = { add_artifact_modifier = artifact_archer_cavalry_screen_add_2_modifier } - 5 = { add_artifact_modifier = artifact_archer_cavalry_screen_add_3_modifier } - } - } - else_if = { - limit = { rarity = famed } - random_list = { - 20 = { add_artifact_modifier = artifact_archer_cavalry_screen_add_3_modifier } - 5 = { add_artifact_modifier = artifact_archer_cavalry_screen_add_4_modifier } - } - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_archer_cavalry_screen_add_4_modifier - } -} - -add_scaled_artifact_modifier_archer_cavalry_damage_add_effect = { - if = { - limit = { rarity = common } - random_list = { - 20 = { add_artifact_modifier = artifact_archer_cavalry_damage_add_1_modifier } - 5 = { add_artifact_modifier = artifact_archer_cavalry_damage_add_2_modifier } - } - } - else_if = { - limit = { rarity = masterwork } - random_list = { - 20 = { add_artifact_modifier = artifact_archer_cavalry_damage_add_2_modifier } - 5 = { add_artifact_modifier = artifact_archer_cavalry_damage_add_3_modifier } - } - } - else_if = { - limit = { rarity = famed } - random_list = { - 20 = { add_artifact_modifier = artifact_archer_cavalry_damage_add_3_modifier } - 5 = { add_artifact_modifier = artifact_archer_cavalry_damage_add_4_modifier } - } - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_archer_cavalry_damage_add_4_modifier - } -} - -add_scaled_artifact_modifier_stress_gain_effect = { - switch = { - trigger = rarity - common = { add_artifact_modifier = artifact_stress_gain_1_modifier } - masterwork = { add_artifact_modifier = artifact_stress_gain_2_modifier } - famed = { add_artifact_modifier = artifact_stress_gain_3_modifier } - illustrious = { add_artifact_modifier = artifact_stress_gain_4_modifier } - } -} - -#EP3 - -add_scaled_artifact_modifier_terrain_advantage_effect = { - #Plains - if = { - limit = { - artifact_owner.location ?= { terrain = plains } - } - if = { - limit = { rarity = common } - random_list = { - 20 = { add_artifact_modifier = artifact_plains_advantage_1_modifier } - 5 = { add_artifact_modifier = artifact_plains_advantage_2_modifier } - } - } - else_if = { - limit = { rarity = masterwork } - random_list = { - 20 = { add_artifact_modifier = artifact_plains_advantage_2_modifier } - 5 = { add_artifact_modifier = artifact_plains_advantage_3_modifier } - } - } - else_if = { - limit = { rarity = famed } - random_list = { - 20 = { add_artifact_modifier = artifact_plains_advantage_3_modifier } - 5 = { add_artifact_modifier = artifact_plains_advantage_4_modifier } - } - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_plains_advantage_4_modifier - } - } - #Farmlands - if = { - limit = { - artifact_owner.location ?= { terrain = farmlands } - } - if = { - limit = { rarity = common } - random_list = { - 20 = { add_artifact_modifier = artifact_farmlands_advantage_1_modifier } - 5 = { add_artifact_modifier = artifact_farmlands_advantage_2_modifier } - } - } - else_if = { - limit = { rarity = masterwork } - random_list = { - 20 = { add_artifact_modifier = artifact_farmlands_advantage_2_modifier } - 5 = { add_artifact_modifier = artifact_farmlands_advantage_3_modifier } - } - } - else_if = { - limit = { rarity = famed } - random_list = { - 20 = { add_artifact_modifier = artifact_farmlands_advantage_3_modifier } - 5 = { add_artifact_modifier = artifact_farmlands_advantage_4_modifier } - } - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_farmlands_advantage_4_modifier - } - } - #Hills - if = { - limit = { - artifact_owner.location ?= { terrain = hills } - } - if = { - limit = { rarity = common } - random_list = { - 20 = { add_artifact_modifier = artifact_hills_advantage_1_modifier } - 5 = { add_artifact_modifier = artifact_hills_advantage_2_modifier } - } - } - else_if = { - limit = { rarity = masterwork } - random_list = { - 20 = { add_artifact_modifier = artifact_hills_advantage_2_modifier } - 5 = { add_artifact_modifier = artifact_hills_advantage_3_modifier } - } - } - else_if = { - limit = { rarity = famed } - random_list = { - 20 = { add_artifact_modifier = artifact_hills_advantage_3_modifier } - 5 = { add_artifact_modifier = artifact_hills_advantage_4_modifier } - } - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_hills_advantage_4_modifier - } - } - #Mountains - if = { - limit = { - artifact_owner.location ?= { terrain = mountains } - } - if = { - limit = { rarity = common } - random_list = { - 20 = { add_artifact_modifier = artifact_mountains_advantage_1_modifier } - 5 = { add_artifact_modifier = artifact_mountains_advantage_2_modifier } - } - } - else_if = { - limit = { rarity = masterwork } - random_list = { - 20 = { add_artifact_modifier = artifact_mountains_advantage_2_modifier } - 5 = { add_artifact_modifier = artifact_mountains_advantage_3_modifier } - } - } - else_if = { - limit = { rarity = famed } - random_list = { - 20 = { add_artifact_modifier = artifact_mountains_advantage_3_modifier } - 5 = { add_artifact_modifier = artifact_mountains_advantage_4_modifier } - } - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_mountains_advantage_4_modifier - } - } - #Desert - if = { - limit = { - artifact_owner.location ?= { terrain = desert } - } - if = { - limit = { rarity = common } - random_list = { - 20 = { add_artifact_modifier = artifact_desert_advantage_1_modifier } - 5 = { add_artifact_modifier = artifact_desert_advantage_2_modifier } - } - } - else_if = { - limit = { rarity = masterwork } - random_list = { - 20 = { add_artifact_modifier = artifact_desert_advantage_2_modifier } - 5 = { add_artifact_modifier = artifact_desert_advantage_3_modifier } - } - } - else_if = { - limit = { rarity = famed } - random_list = { - 20 = { add_artifact_modifier = artifact_desert_advantage_3_modifier } - 5 = { add_artifact_modifier = artifact_desert_advantage_4_modifier } - } - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_desert_advantage_4_modifier - } - } - #Desert Mountains - if = { - limit = { - artifact_owner.location ?= { terrain = desert_mountains } - } - if = { - limit = { rarity = common } - random_list = { - 20 = { add_artifact_modifier = artifact_desert_mountains_advantage_1_modifier } - 5 = { add_artifact_modifier = artifact_desert_mountains_advantage_2_modifier } - } - } - else_if = { - limit = { rarity = masterwork } - random_list = { - 20 = { add_artifact_modifier = artifact_desert_mountains_advantage_2_modifier } - 5 = { add_artifact_modifier = artifact_desert_mountains_advantage_3_modifier } - } - } - else_if = { - limit = { rarity = famed } - random_list = { - 20 = { add_artifact_modifier = artifact_desert_mountains_advantage_3_modifier } - 5 = { add_artifact_modifier = artifact_desert_mountains_advantage_4_modifier } - } - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_desert_mountains_advantage_4_modifier - } - } - #Oasis - if = { - limit = { - artifact_owner.location ?= { terrain = oasis } - } - if = { - limit = { rarity = common } - random_list = { - 20 = { add_artifact_modifier = artifact_oasis_advantage_1_modifier } - 5 = { add_artifact_modifier = artifact_oasis_advantage_2_modifier } - } - } - else_if = { - limit = { rarity = masterwork } - random_list = { - 20 = { add_artifact_modifier = artifact_oasis_advantage_2_modifier } - 5 = { add_artifact_modifier = artifact_oasis_advantage_3_modifier } - } - } - else_if = { - limit = { rarity = famed } - random_list = { - 20 = { add_artifact_modifier = artifact_oasis_advantage_3_modifier } - 5 = { add_artifact_modifier = artifact_oasis_advantage_4_modifier } - } - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_oasis_advantage_4_modifier - } - } - #Jungle - if = { - limit = { - artifact_owner.location ?= { terrain = jungle } - } - if = { - limit = { rarity = common } - random_list = { - 20 = { add_artifact_modifier = artifact_jungle_advantage_1_modifier } - 5 = { add_artifact_modifier = artifact_jungle_advantage_2_modifier } - } - } - else_if = { - limit = { rarity = masterwork } - random_list = { - 20 = { add_artifact_modifier = artifact_jungle_advantage_2_modifier } - 5 = { add_artifact_modifier = artifact_jungle_advantage_3_modifier } - } - } - else_if = { - limit = { rarity = famed } - random_list = { - 20 = { add_artifact_modifier = artifact_jungle_advantage_3_modifier } - 5 = { add_artifact_modifier = artifact_jungle_advantage_4_modifier } - } - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_jungle_advantage_4_modifier - } - } - #Forest - if = { - limit = { - artifact_owner.location ?= { terrain = forest } - } - if = { - limit = { rarity = common } - random_list = { - 20 = { add_artifact_modifier = artifact_forest_advantage_1_modifier } - 5 = { add_artifact_modifier = artifact_forest_advantage_2_modifier } - } - } - else_if = { - limit = { rarity = masterwork } - random_list = { - 20 = { add_artifact_modifier = artifact_forest_advantage_2_modifier } - 5 = { add_artifact_modifier = artifact_forest_advantage_3_modifier } - } - } - else_if = { - limit = { rarity = famed } - random_list = { - 20 = { add_artifact_modifier = artifact_forest_advantage_3_modifier } - 5 = { add_artifact_modifier = artifact_forest_advantage_4_modifier } - } - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_forest_advantage_4_modifier - } - } - #Taiga - if = { - limit = { - artifact_owner.location ?= { terrain = taiga } - } - if = { - limit = { rarity = common } - random_list = { - 20 = { add_artifact_modifier = artifact_taiga_advantage_1_modifier } - 5 = { add_artifact_modifier = artifact_taiga_advantage_2_modifier } - } - } - else_if = { - limit = { rarity = masterwork } - random_list = { - 20 = { add_artifact_modifier = artifact_taiga_advantage_2_modifier } - 5 = { add_artifact_modifier = artifact_taiga_advantage_3_modifier } - } - } - else_if = { - limit = { rarity = famed } - random_list = { - 20 = { add_artifact_modifier = artifact_taiga_advantage_3_modifier } - 5 = { add_artifact_modifier = artifact_taiga_advantage_4_modifier } - } - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_taiga_advantage_4_modifier - } - } - #Wetlands - if = { - limit = { - artifact_owner.location ?= { terrain = wetlands } - } - if = { - limit = { rarity = common } - random_list = { - 20 = { add_artifact_modifier = artifact_wetlands_advantage_1_modifier } - 5 = { add_artifact_modifier = artifact_wetlands_advantage_2_modifier } - } - } - else_if = { - limit = { rarity = masterwork } - random_list = { - 20 = { add_artifact_modifier = artifact_wetlands_advantage_2_modifier } - 5 = { add_artifact_modifier = artifact_wetlands_advantage_3_modifier } - } - } - else_if = { - limit = { rarity = famed } - random_list = { - 20 = { add_artifact_modifier = artifact_wetlands_advantage_3_modifier } - 5 = { add_artifact_modifier = artifact_wetlands_advantage_4_modifier } - } - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_wetlands_advantage_4_modifier - } - } - #Steppe - if = { - limit = { - artifact_owner.location ?= { terrain = steppe } - } - if = { - limit = { rarity = common } - random_list = { - 20 = { add_artifact_modifier = artifact_steppe_advantage_1_modifier } - 5 = { add_artifact_modifier = artifact_steppe_advantage_2_modifier } - } - } - else_if = { - limit = { rarity = masterwork } - random_list = { - 20 = { add_artifact_modifier = artifact_steppe_advantage_2_modifier } - 5 = { add_artifact_modifier = artifact_steppe_advantage_3_modifier } - } - } - else_if = { - limit = { rarity = famed } - random_list = { - 20 = { add_artifact_modifier = artifact_steppe_advantage_3_modifier } - 5 = { add_artifact_modifier = artifact_steppe_advantage_4_modifier } - } - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_steppe_advantage_4_modifier - } - } - #Floodplains - if = { - limit = { - artifact_owner.location ?= { terrain = floodplains } - } - if = { - limit = { rarity = common } - random_list = { - 20 = { add_artifact_modifier = artifact_floodplains_advantage_1_modifier } - 5 = { add_artifact_modifier = artifact_floodplains_advantage_2_modifier } - } - } - else_if = { - limit = { rarity = masterwork } - random_list = { - 20 = { add_artifact_modifier = artifact_floodplains_advantage_2_modifier } - 5 = { add_artifact_modifier = artifact_floodplains_advantage_3_modifier } - } - } - else_if = { - limit = { rarity = famed } - random_list = { - 20 = { add_artifact_modifier = artifact_floodplains_advantage_3_modifier } - 5 = { add_artifact_modifier = artifact_floodplains_advantage_4_modifier } - } - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_floodplains_advantage_4_modifier - } - } - #Drylands - if = { - limit = { - artifact_owner.location ?= { terrain = drylands } - } - if = { - limit = { rarity = common } - random_list = { - 20 = { add_artifact_modifier = artifact_drylands_advantage_1_modifier } - 5 = { add_artifact_modifier = artifact_drylands_advantage_2_modifier } - } - } - else_if = { - limit = { rarity = masterwork } - random_list = { - 20 = { add_artifact_modifier = artifact_drylands_advantage_2_modifier } - 5 = { add_artifact_modifier = artifact_drylands_advantage_3_modifier } - } - } - else_if = { - limit = { rarity = famed } - random_list = { - 20 = { add_artifact_modifier = artifact_drylands_advantage_3_modifier } - 5 = { add_artifact_modifier = artifact_drylands_advantage_4_modifier } - } - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_drylands_advantage_4_modifier - } - } -} - -add_scaled_artifact_modifier_hire_mercenary_effect = { - if = { - limit = { rarity = common } - random_list = { - 20 = { add_artifact_modifier = artifact_mercenary_hire_cost_mult_1_modifier } - 5 = { add_artifact_modifier = artifact_mercenary_hire_cost_mult_2_modifier } - } - } - else_if = { - limit = { rarity = masterwork } - random_list = { - 20 = { add_artifact_modifier = artifact_mercenary_hire_cost_mult_2_modifier } - 5 = { add_artifact_modifier = artifact_mercenary_hire_cost_mult_3_modifier } - } - } - else_if = { - limit = { rarity = famed } - random_list = { - 20 = { add_artifact_modifier = artifact_mercenary_hire_cost_mult_3_modifier } - 5 = { add_artifact_modifier = artifact_mercenary_hire_cost_mult_4_modifier } - } - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_mercenary_hire_cost_mult_4_modifier - } -} - -add_scaled_artifact_modifier_negate_prowess_penalty_effect = { - if = { - limit = { rarity = common } - random_list = { - 20 = { add_artifact_modifier = artifact_negate_prowess_penalty_add_1_modifier } - 15 = { add_artifact_modifier = artifact_negate_prowess_penalty_add_2_modifier } - 5 = { add_artifact_modifier = artifact_negate_prowess_penalty_add_3_modifier } - } - } - else_if = { - limit = { rarity = masterwork } - random_list = { - 20 = { add_artifact_modifier = artifact_negate_prowess_penalty_add_3_modifier } - 15 = { add_artifact_modifier = artifact_negate_prowess_penalty_add_4_modifier } - 5 = { add_artifact_modifier = artifact_negate_prowess_penalty_add_5_modifier } - } - } - else_if = { - limit = { rarity = famed } - random_list = { - 20 = { add_artifact_modifier = artifact_negate_prowess_penalty_add_5_modifier } - 15 = { add_artifact_modifier = artifact_negate_prowess_penalty_add_6_modifier } - 5 = { add_artifact_modifier = artifact_negate_prowess_penalty_add_7_modifier } - } - } - else_if = { - limit = { rarity = illustrious } - random_list = { - 20 = { add_artifact_modifier = artifact_negate_prowess_penalty_add_7_modifier } - 15 = { add_artifact_modifier = artifact_negate_prowess_penalty_add_8_modifier } - } - } -} - -add_scaled_artifact_modifier_scheme_resistance_effect = { - if = { - limit = { rarity = common } - random_list = { - 0 = { - #No modifier - } - 5 = { add_artifact_modifier = artifact_scheme_resistance_add_1_modifier } - } - } - else_if = { - limit = { rarity = masterwork } - random_list = { - 20 = { add_artifact_modifier = artifact_scheme_resistance_add_1_modifier } - 5 = { add_artifact_modifier = artifact_scheme_resistance_add_2_modifier } - } - } - else_if = { - limit = { rarity = famed } - random_list = { - 20 = { add_artifact_modifier = artifact_scheme_resistance_add_2_modifier } - 5 = { add_artifact_modifier = artifact_scheme_resistance_add_3_modifier } - } - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_scheme_resistance_add_3_modifier - } -} - -################################################# -# # -# WEAPON CREATION AND DECORATION # -# # -################################################# - -get_sword_decoration_effect = { - random_list = { - 40 = { - trigger = { ep1_extravagant_artifact_decorations_trigger = yes } - set_artifact_feature_group = blade_decoration - set_artifact_feature_group = hilt_decoration - } - 30 = { - trigger = { ep1_advanced_artifact_decorations_trigger = yes } - set_artifact_feature_group = blade_decoration - } - 20 = { - trigger = { ep1_simple_artifact_decorations_trigger = yes } - set_artifact_feature_group = hilt_decoration - } - 10 = { - trigger = { ep1_no_artifact_decorations_trigger = yes } - modifier = { - add = 30 - AND = { - exists = scope:inspiration_owner - scope:inspiration_owner = { ai_greed <= -40 } - } - } - # No decoration - } - } -} - -get_dagger_decoration_effect = { - get_sword_decoration_effect = yes # Currently identical, but we may wish to diverge these later. -} - -# Axes, Hammers, Spears, and Maces -get_axe_decoration_effect = { - random_list = { - 40 = { - trigger = { ep1_extravagant_artifact_decorations_trigger = yes } - set_artifact_feature_group = head_decoration - set_artifact_feature_group = shaft_decoration - } - 20 = { - trigger = { ep1_advanced_artifact_decorations_trigger = yes } - set_artifact_feature_group = head_decoration - } - 40 = { - trigger = { ep1_simple_artifact_decorations_trigger = yes } - set_artifact_feature_group = shaft_decoration - } - 10 = { - trigger = { ep1_no_artifact_decorations_trigger = yes } - modifier = { - add = 30 - AND = { - exists = scope:inspiration_owner - scope:inspiration_owner = { ai_greed <= -40 } - } - } - # No decoration - } - - } -} - -get_hammer_decoration_effect = { - random_list = { - 40 = { - trigger = { ep1_extravagant_artifact_decorations_trigger = yes } - set_artifact_feature_group = head_decoration - set_artifact_feature_group = shaft_decoration - } - 20 = { - trigger = { ep1_advanced_artifact_decorations_trigger = yes } - set_artifact_feature_group = head_decoration - } - 40 = { - trigger = { ep1_simple_artifact_decorations_trigger = yes } - set_artifact_feature_group = shaft_decoration - } - 10 = { - trigger = { ep1_no_artifact_decorations_trigger = yes } - modifier = { - add = 30 - AND = { - exists = scope:inspiration_owner - scope:inspiration_owner = { ai_greed <= -40 } - } - } - # No decoration - } - } -} - -get_spear_decoration_effect = { - random_list = { - 40 = { - trigger = { ep1_extravagant_artifact_decorations_trigger = yes } - set_artifact_feature_group = head_decoration - set_artifact_feature_group = shaft_decoration - } - 20 = { - trigger = { ep1_advanced_artifact_decorations_trigger = yes } - set_artifact_feature_group = head_decoration - } - 40 = { - trigger = { ep1_simple_artifact_decorations_trigger = yes } - set_artifact_feature_group = shaft_decoration - } - 10 = { - trigger = { ep1_no_artifact_decorations_trigger = yes } - modifier = { - add = 30 - AND = { - exists = scope:inspiration_owner - scope:inspiration_owner = { ai_greed <= -40 } - } - } - # No decoration - } - - } -} - -get_mace_decoration_effect = { - random_list = { - 40 = { - trigger = { ep1_extravagant_artifact_decorations_trigger = yes } - set_artifact_feature_group = head_decoration - set_artifact_feature_group = metal_handle_decoration - } - 20 = { - trigger = { ep1_advanced_artifact_decorations_trigger = yes } - set_artifact_feature_group = head_decoration - } - 20 = { - trigger = { ep1_simple_artifact_decorations_trigger = yes } - set_artifact_feature_group = metal_handle_decoration - } - 30 = { - trigger = { ep1_no_artifact_decorations_trigger = yes } - modifier = { - add = 40 - AND = { - exists = scope:inspiration_owner - scope:inspiration_owner = { ai_greed <= -40 } - } - } - # No decoration - } - - } -} - -# If the type of weapon hasn't been decided yet we set it here -set_weapon_artifact_type_effect = { - save_temporary_scope_value_as = { - name = allow_no_type_option - value = $NO_TYPE$ - } - # Historically many of these types of weapon were used in some combination, but to give a clearer portrayal to the player we have to simplify it a bit - hidden_effect = { - $BASE_SCOPE$ = { - #The type has been decided in events, when the character got inspired, or now. Let's save it! (might still leave it up to the sponsor if allow_no_type_option = yes!) - if = { - limit = { - NOT = { exists = var:artifact_weapon_type } - } - random_list = { #What weapon do they want to forge? - 10 = { - set_variable = { - name = artifact_weapon_type - value = flag:artifact_weapon_type_axe - } - } - 10 = { - set_variable = { - name = artifact_weapon_type - value = flag:artifact_weapon_type_dagger - } - } - 10 = { - set_variable = { - name = artifact_weapon_type - value = flag:artifact_weapon_type_hammer - } - } - 10 = { - set_variable = { - name = artifact_weapon_type - value = flag:artifact_weapon_type_mace - } - } - 10 = { - set_variable = { - name = artifact_weapon_type - value = flag:artifact_weapon_type_spear - } - } - 10 = { - set_variable = { - name = artifact_weapon_type - value = flag:artifact_weapon_type_sword - } - } - 50 = { #They don't care and you can decide! - trigger = { - scope:allow_no_type_option = yes - } - modifier = { - add = 30 - has_personality_submissive_trigger = yes - } - modifier = { - add = 9890 # ~1% chance of being predetermined if comissioning from a local artisan. - has_character_flag = local_artisan - } - ai_value_modifier = { - ai_boldness = -0.25 - ai_energy = -0.25 - } - # Don't set on creation so that the player has more input on what gets forged in inspiration start events, like fund_inspiration.0015 - } - } - } - } - } -} - -create_artifact_weapon_effect = { - # Get the character the artifact is being made for. - # If scope:adventurer exists this will result in the history entry reading that the weapon was discovered instead of made. - $OWNER$ = { save_scope_as = owner } - $CREATOR$ = { save_scope_as = smith } - save_temporary_scope_value_as = { - name = weapon_type_is_set - value = $SET_WEAPON_TYPE$ - } - if = { #Any existing dummy character gets turned into the smith - limit = { - exists = scope:dummy_gender - scope:smith = scope:dummy_gender - } - clear_saved_scope = smith - clear_saved_scope = dummy_gender - } - - hidden_effect_new_object = { - if = { - limit = { - scope:weapon_type_is_set = flag:no - } - if = { - limit = { - exists = scope:smith - } - set_weapon_artifact_type_effect = { - BASE_SCOPE = scope:smith - NO_TYPE = no - } - scope:smith = { - var:artifact_weapon_type = { save_scope_as = weapon_type } - remove_variable = artifact_weapon_type - } - } - else = { - set_weapon_artifact_type_effect = { - BASE_SCOPE = scope:owner - NO_TYPE = no - } - scope:owner = { - var:artifact_weapon_type = { save_scope_as = weapon_type } - remove_variable = artifact_weapon_type - } - } - } - else = { - scope:weapon_type_is_set = { save_scope_as = weapon_type } - } - # Get artifact quality and wealth. - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - - # Get the type of weapon to forge. Defaults to sword if an invalid type is provided. - if = { - limit = { scope:weapon_type = flag:artifact_weapon_type_axe } - if = { - limit = { exists = scope:adventurer } - create_artifact = { - name = artifact_axe_name - description = placeholder # Will be re-generated once decorations are added in the post-creation effects. - visuals = axe - type = axe - modifier = artifact_prowess_1_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - history = { - location = scope:location - actor = scope:adventurer - recipient = root - type = discovered - } - } - } - else_if = { - limit = { exists = scope:smith } - create_artifact = { - name = artifact_axe_name - creator = scope:smith - description = placeholder # Will be re-generated once decorations are added in the post-creation effects. - visuals = axe - type = axe - modifier = artifact_prowess_1_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - } - } - else_if = { - limit = { - scope:host ?= $OWNER$ - scope:activity ?= { has_activity_type = activity_tournament } - } - tournament_contest_weapon_prize_effect = { VISUALS = axe TYPE = axe } - } - else = { - create_artifact = { - name = artifact_axe_name - description = placeholder # Will be re-generated once decorations are added in the post-creation effects. - visuals = axe - type = axe - modifier = artifact_prowess_1_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - history = { type = created_before_history } - } - } - scope:newly_created_artifact = { - get_axe_decoration_effect = yes - get_artifact_feature_references_effect = yes - set_artifact_description = artifact_axe_description - } - } - else_if = { - limit = { scope:weapon_type = flag:artifact_weapon_type_hammer } - if = { - limit = { exists = scope:adventurer } - create_artifact = { - name = artifact_hammer_name - description = placeholder # Will be re-generated once decorations are added in the post-creation effects. - visuals = hammer - type = hammer - modifier = artifact_prowess_1_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - history = { - location = scope:location - actor = scope:adventurer - recipient = root - type = discovered - } - } - } - else_if = { - limit = { exists = scope:smith } - create_artifact = { - name = artifact_hammer_name - creator = scope:smith - description = placeholder # Will be re-generated once decorations are added in the post-creation effects. - visuals = hammer - type = hammer - modifier = artifact_prowess_1_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - } - } - else_if = { - limit = { - scope:host ?= $OWNER$ - scope:activity ?= { has_activity_type = activity_tournament } - } - tournament_contest_weapon_prize_effect = { VISUALS = hammer TYPE = hammer } - } - else = { - create_artifact = { - name = artifact_hammer_name - description = placeholder # Will be re-generated once decorations are added in the post-creation effects. - visuals = hammer - type = hammer - modifier = artifact_prowess_1_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - history = { type = created_before_history } - } - } - scope:newly_created_artifact = { - get_hammer_decoration_effect = yes - get_artifact_feature_references_effect = yes - set_artifact_description = artifact_hammer_description - } - } - else_if = { - limit = { scope:weapon_type = flag:artifact_weapon_type_spear } - if = { - limit = { exists = scope:adventurer } - create_artifact = { - name = artifact_spear_name - description = placeholder # Will be re-generated once decorations are added in the post-creation effects. - visuals = spear - type = spear - modifier = artifact_prowess_1_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - history = { - location = scope:location - actor = scope:adventurer - recipient = root - type = discovered - } - } - } - else_if = { - limit = { exists = scope:smith } - create_artifact = { - name = artifact_spear_name - creator = scope:smith - description = placeholder # Will be re-generated once decorations are added in the post-creation effects. - visuals = spear - type = spear - modifier = artifact_prowess_1_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - } - } - else_if = { - limit = { - scope:host ?= $OWNER$ - scope:activity ?= { has_activity_type = activity_tournament } - } - tournament_contest_weapon_prize_effect = { VISUALS = spear TYPE = spear } - } - else = { - create_artifact = { - name = artifact_spear_name - description = placeholder # Will be re-generated once decorations are added in the post-creation effects. - visuals = spear - type = spear - modifier = artifact_prowess_1_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - history = { type = created_before_history } - } - } - scope:newly_created_artifact = { - get_spear_decoration_effect = yes - get_artifact_feature_references_effect = yes - set_artifact_description = artifact_spear_description - } - } - else_if = { - limit = { scope:weapon_type = flag:artifact_weapon_type_mace } - if = { - limit = { exists = scope:adventurer } - create_artifact = { - name = artifact_mace_name - description = placeholder # Will be re-generated once decorations are added in the post-creation effects. - visuals = mace - type = mace - modifier = artifact_prowess_1_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - history = { - location = scope:location - actor = scope:adventurer - recipient = root - type = discovered - } - } - } - else_if = { - limit = { exists = scope:smith } - create_artifact = { - name = artifact_mace_name - creator = scope:smith - description = placeholder # Will be re-generated once decorations are added in the post-creation effects. - visuals = mace - type = mace - modifier = artifact_prowess_1_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - } - } - else_if = { - limit = { - scope:host ?= $OWNER$ - scope:activity ?= { has_activity_type = activity_tournament } - } - tournament_contest_weapon_prize_effect = { VISUALS = mace TYPE = mace } - } - else = { - create_artifact = { - name = artifact_mace_name - description = placeholder # Will be re-generated once decorations are added in the post-creation effects. - visuals = mace - type = mace - modifier = artifact_prowess_1_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - } - } - scope:newly_created_artifact = { - get_mace_decoration_effect = yes - get_artifact_feature_references_effect = yes - set_artifact_description = artifact_mace_description - } - } - else_if = { - limit = { - scope:weapon_type = flag:artifact_weapon_type_dagger - scope:smith ?= { has_variable = inspiration_for_kris_dagger } - } - create_artifact = { - name = artifact_dagger_name - creator = scope:smith - description = placeholder # Will be re-generated once decorations are added in the post-creation effects. - visuals = dagger_kris - type = dagger - modifier = artifact_prowess_1_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - } - scope:newly_created_artifact = { - get_dagger_decoration_effect = yes - get_artifact_feature_references_effect = yes - set_artifact_name = artifact_kris_name - set_artifact_description = artifact_kris_description - add_scaled_artifact_kris_benefit_effect = yes - set_variable = { - name = is_kris - value = yes - } - } - scope:smith = { remove_variable = inspiration_for_kris_dagger } - } - else_if = { - limit = { scope:weapon_type = flag:artifact_weapon_type_dagger } - if = { - limit = { exists = scope:adventurer } - create_artifact = { - name = artifact_dagger_name - description = placeholder # Will be re-generated once decorations are added in the post-creation effects. - visuals = dagger - type = dagger - modifier = artifact_prowess_1_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - history = { - location = scope:location - actor = scope:adventurer - recipient = root - type = discovered - } - } - } - else_if = { - limit = { exists = scope:smith } - create_artifact = { - name = artifact_dagger_name - creator = scope:smith - description = placeholder # Will be re-generated once decorations are added in the post-creation effects. - visuals = dagger - type = dagger - modifier = artifact_prowess_1_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - } - } - else_if = { - limit = { - scope:host ?= $OWNER$ - scope:activity ?= { has_activity_type = activity_tournament } - } - tournament_contest_weapon_prize_effect = { VISUALS = dagger TYPE = dagger } - } - else = { - create_artifact = { - name = artifact_dagger_name - description = placeholder # Will be re-generated once decorations are added in the post-creation effects. - visuals = dagger - type = dagger - modifier = artifact_prowess_1_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - history = { type = created_before_history } - } - } - scope:newly_created_artifact = { - get_dagger_decoration_effect = yes - get_artifact_feature_references_effect = yes - set_artifact_description = artifact_dagger_description - } - } - else = { - if = { - limit = { exists = scope:adventurer } - create_artifact = { - name = artifact_sword_name - description = placeholder # Will be re-generated once decorations are added in the post-creation effects. - visuals = sword - type = sword - modifier = artifact_prowess_1_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - history = { - location = scope:location - actor = scope:adventurer - recipient = root - type = discovered - } - } - } - else_if = { - limit = { - exists = scope:bowyer - } - create_artifact = { - name = artifact_sword_name - creator = scope:bowyer - description = placeholder # Will be re-generated once decorations are added in the post-creation effects. - visuals = sword - type = sword - modifier = artifact_prowess_1_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - } - } - else_if = { - limit = { - scope:host ?= $OWNER$ - scope:activity ?= { has_activity_type = activity_tournament } - NOT = { $OWNER$ = { has_character_flag = event_4500_happening } } - } - random_list = { - 1 = { - tournament_contest_weapon_prize_effect = { VISUALS = longsword TYPE = sword } - } - 1 = { - tournament_contest_weapon_prize_effect = { VISUALS = sword TYPE = sword } - } - } - } - else = { - random_list = { - 3 = { - trigger = { - has_fp3_dlc_trigger = yes - scope:smith ?= { artifact_should_use_gfx_type_trigger = { TYPE = iranian_building } } - } - create_artifact = { - name = artifact_sassanian_replica_sword_name - description = placeholder # Will be re-generated once decorations are added in the post-creation effects. - visuals = sassanian_sword - type = sword - modifier = artifact_prowess_1_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - history = { type = created_before_history } - } - scope:newly_created_artifact = { set_variable = replica_sassanian_sword } - } - 1 = { - trigger = { sword_could_be_longsword_trigger = yes } - create_artifact = { - name = artifact_longsword_name - description = placeholder # Will be re-generated once decorations are added in the post-creation effects. - visuals = longsword - type = sword - modifier = artifact_prowess_1_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - history = { type = created_before_history } - } - } - 1 = { - create_artifact = { - name = artifact_sword_name - description = placeholder # Will be re-generated once decorations are added in the post-creation effects. - visuals = sword - type = sword - modifier = artifact_prowess_1_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - history = { type = created_before_history } - } - } - } - } - if = { - limit = { scope:newly_created_artifact = { has_variable = replica_sassanian_sword } } - if = { - limit = { - scope:newly_created_artifact = { - OR = { - rarity = famed - rarity = illustrious - } - } - } - scope:newly_created_artifact = { set_artifact_description = famed_replica_sassanian_sword_description } - } - else_if = { - limit = { scope:newly_created_artifact = { rarity = masterwork } } - scope:newly_created_artifact = { set_artifact_description = masterwork_replica_sassanian_sword_description } - } - else = { - scope:newly_created_artifact = { set_artifact_description = common_replica_sassanian_sword_description } - } - } - - else = { - scope:newly_created_artifact = { - get_sword_decoration_effect = yes - get_artifact_feature_references_effect = yes - set_artifact_description = artifact_sword_description - } - } - } - - scope:newly_created_artifact = { - # Prowess from weapon rarity - add_scaled_artifact_modifier_prowess_effect = yes - - if = { - limit = { - OR = { - rarity = famed - rarity = illustrious - } - OR = { - has_artifact_feature_group = blade_decoration - has_artifact_feature_group = hilt_decoration - has_artifact_feature_group = shaft_decoration - has_artifact_feature_group = head_decoration - scope:weapon_type = flag:artifact_weapon_type_dagger - } - } - if = { - limit = { scope:weapon_type = flag:artifact_weapon_type_dagger } - add_2_scaled_artifact_modifier_intrigue_effect = yes - } - else = { - add_2_scaled_artifact_modifier_combat_effect = yes - } - } - else_if = { - limit = { - OR = { - rarity = common - rarity = masterwork - } - OR = { - has_artifact_feature_group = blade_decoration - has_artifact_feature_group = hilt_decoration - has_artifact_feature_group = shaft_decoration - has_artifact_feature_group = head_decoration - scope:weapon_type = flag:artifact_weapon_type_dagger - } - } - if = { - limit = { scope:weapon_type = flag:artifact_weapon_type_dagger } - add_scaled_artifact_modifier_intrigue_effect = yes - } - else = { - add_scaled_artifact_modifier_combat_effect = yes - } - } - else_if = { - limit = { - OR = { - rarity = famed - rarity = illustrious - } - # No decorations - } - if = { - limit = { scope:weapon_type = flag:artifact_weapon_type_dagger } - add_scaled_artifact_modifier_intrigue_effect = yes - add_artifact_modifier = artifact_prowess_no_decorations_high_tier_modifier - } - else = { - add_scaled_artifact_modifier_combat_effect = yes - add_artifact_modifier = artifact_prowess_no_decorations_high_tier_modifier - } - } - else_if = { - limit = { - rarity = masterwork - # No decorations - } - if = { - limit = { scope:weapon_type = flag:artifact_weapon_type_dagger } - add_scaled_artifact_modifier_intrigue_effect = yes - add_artifact_modifier = artifact_prowess_no_decorations_modifier - } - else = { - add_artifact_modifier = artifact_prowess_no_decorations_medium_tier_modifier - } - } - else = { - add_artifact_modifier = artifact_prowess_no_decorations_modifier - } - - # Save the quality and wealth of this artifact in case we need to reference it later. - set_variable = { - name = quality - value = scope:quality - } - set_variable = { - name = wealth - value = scope:wealth - } - } - } -} - -################################################# -# # -# WEARABLE CREATION AND DECORATION # -# # -################################################# - -# Armor - -# If the type of armor hasn't been decided yet we set it here -set_armor_artifact_type_effect = { - save_temporary_scope_value_as = { - name = allow_no_type_option - value = $NO_TYPE$ - } - # Historically many of these types of armor were used in some combination, but to give a clearer portrayal to the player we have to simplify it a bit - hidden_effect = { - $BASE_SCOPE$ = { - #The type has been decided in events, when the character got inspired, or now. Let's save it! (might still leave it up to the sponsor if allow_no_type_option = yes!) - if = { - limit = { - NOT = { exists = var:artifact_armor_type } - } - random_list = { #What do they want to forge? - 50 = { #Fairly common everywhere - artifact_armor_type_mail_modifier = yes - set_variable = { - name = artifact_armor_type - value = flag:armor_type_mail - } - } - 1 = { #Expensive - artifact_armor_type_plate_modifier = yes - set_variable = { - name = artifact_armor_type - value = flag:armor_type_plate - } - modifier = { - factor = 0 - culture = { - NOT = { has_innovation = innovation_plate_armor } - } - } - } - 50 = { #Fairly common everywhere - artifact_armor_type_scale_modifier = yes - set_variable = { - name = artifact_armor_type - value = flag:armor_type_scale - } - } - 5 = { #Expensive - artifact_armor_type_lamellar_modifier = yes - set_variable = { - name = artifact_armor_type - value = flag:armor_type_lamellar - } - } - 5 = { - artifact_armor_type_laminar_modifier = yes - set_variable = { - name = artifact_armor_type - value = flag:armor_type_laminar - } - } - 0 = { - artifact_armor_type_brigandine_modifier = yes - set_variable = { - name = artifact_armor_type - value = flag:armor_type_brigandine - } - } - 50 = { #They don't care and you can decide! - trigger = { - scope:allow_no_type_option = yes - } - modifier = { - add = 30 - has_personality_submissive_trigger = yes - } - modifier = { - add = 9916 # ~1% chance of being predetermined if comissioning from a local artisan. - has_character_flag = local_artisan - } - ai_value_modifier = { - ai_boldness = -0.25 - ai_energy = -0.25 - } - } - } - } - } - } -} - -# Create the armor -# -OWNER is always needed -# -CREATOR needs a scope, if you want no smith specified you can use "random_dummy_gender_effect = yes" before the armor creation effect and then scope:dummy_gender for CREATOR -# -SET_ARMOR_TYPE has to be a flag, and has to be one of the armor types used in set_armor_artifact_type_effect and ArtifactArmorFullName custom loc key. Use "flag:no" for a random type. -# If scope:adventurer exists this will result in the history entry reading that the weapon was discovered instead of made. -# -# Example: -# create_artifact_armor_effect = { -# OWNER = root -# CREATOR = scope:dummy_gender -# SET_ARMOR_TYPE = flag:armor_type_lamellar -# } -# This will give you lamellar armor with no known smith. -create_artifact_armor_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - $CREATOR$ = { save_scope_as = smith } - save_temporary_scope_value_as = { - name = armor_type_is_set - value = $SET_ARMOR_TYPE$ - } - if = { - limit = { - exists = scope:dummy_gender - scope:smith = scope:dummy_gender - } - clear_saved_scope = smith - clear_saved_scope = dummy_gender - } - - hidden_effect_new_object = { - if = { - limit = { - scope:armor_type_is_set = flag:no - } - if = { - limit = { - exists = scope:smith - } - set_armor_artifact_type_effect = { - BASE_SCOPE = scope:smith - NO_TYPE = no - } - scope:smith = { - var:artifact_armor_type = { save_scope_as = armor_type } - remove_variable = artifact_armor_type - } - } - else = { - set_armor_artifact_type_effect = { - BASE_SCOPE = scope:owner - NO_TYPE = no - } - scope:owner = { - var:artifact_armor_type = { save_scope_as = armor_type } - remove_variable = artifact_armor_type - } - } - } - else = { - scope:armor_type_is_set = { save_scope_as = armor_type } - } - # Get artifact quality and wealth - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - - if = { - limit = { scope:armor_type = flag:armor_type_plate } - if = { - limit = { - exists = scope:adventurer - } - create_artifact = { - name = placeholder - description = placeholder # Will be re-generated once decorations are added in the post-creation effects. - type = armor_plate - visuals = armor - modifier = artifact_prowess_1_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - history = { - location = scope:location - actor = scope:adventurer - recipient = root - type = discovered - } - } - } - else_if = { - limit = { exists = scope:smith } - create_artifact = { - name = placeholder - creator = scope:smith - description = placeholder # Will be re-generated once decorations are added in the post-creation effects. - type = armor_plate - visuals = armor - wealth = scope:wealth - quality = scope:quality - modifier = artifact_prowess_1_modifier - save_scope_as = newly_created_artifact - } - } - else_if = { - limit = { - exists = scope:host - exists = scope:activity - } - tournament_contest_armor_prize_effect = { TYPE = plate } - } - else = { - create_artifact = { - name = placeholder - description = placeholder # Will be re-generated once decorations are added in the post-creation effects. - type = armor_plate - visuals = armor - wealth = scope:wealth - quality = scope:quality - modifier = artifact_prowess_1_modifier - save_scope_as = newly_created_artifact - history = { type = created_before_history } - } - } - } - else_if = { - limit = { scope:armor_type = flag:armor_type_scale } - if = { - limit = { exists = scope:adventurer } - create_artifact = { - name = placeholder - description = placeholder # Will be re-generated once decorations are added in the post-creation effects. - type = armor_scale - visuals = armor - modifier = artifact_prowess_1_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - history = { - location = scope:location - actor = scope:adventurer - recipient = root - type = discovered - } - } - } - else_if = { - limit = { exists = scope:smith } - create_artifact = { - name = placeholder - creator = scope:smith - description = placeholder # Will be re-generated once decorations are added in the post-creation effects. - type = armor_scale - wealth = scope:wealth - quality = scope:quality - visuals = armor - modifier = artifact_prowess_1_modifier - save_scope_as = newly_created_artifact - } - } - else_if = { - limit = { - exists = scope:host - exists = scope:activity - } - tournament_contest_armor_prize_effect = { TYPE = scale } - } - else = { - create_artifact = { - name = placeholder - description = placeholder # Will be re-generated once decorations are added in the post-creation effects. - type = armor_scale - wealth = scope:wealth - quality = scope:quality - visuals = armor - modifier = artifact_prowess_1_modifier - save_scope_as = newly_created_artifact - history = { type = created_before_history } - } - } - } - else_if = { - limit = { scope:armor_type = flag:armor_type_lamellar } - if = { - limit = { exists = scope:adventurer } - create_artifact = { - name = placeholder - description = placeholder # Will be re-generated once decorations are added in the post-creation effects. - type = armor_lamellar - visuals = armor - modifier = artifact_prowess_1_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - history = { - location = scope:location - actor = scope:adventurer - recipient = root - type = discovered - } - } - } - else_if = { - limit = { exists = scope:smith } - create_artifact = { - name = placeholder - creator = scope:smith - description = placeholder # Will be re-generated once decorations are added in the post-creation effects. - type = armor_lamellar - visuals = armor - modifier = artifact_prowess_1_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - } - } - else_if = { - limit = { - exists = scope:host - exists = scope:activity - } - tournament_contest_armor_prize_effect = { TYPE = lamellar } - } - else = { - create_artifact = { - name = placeholder - description = placeholder # Will be re-generated once decorations are added in the post-creation effects. - type = armor_lamellar - visuals = armor - modifier = artifact_prowess_1_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - history = { type = created_before_history } - } - } - } - else_if = { - limit = { scope:armor_type = flag:armor_type_laminar } - if = { - limit = { exists = scope:adventurer } - create_artifact = { - name = placeholder - description = placeholder # Will be re-generated once decorations are added in the post-creation effects. - type = armor_laminar - visuals = armor - modifier = artifact_prowess_1_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - history = { - location = scope:location - actor = scope:adventurer - recipient = root - type = discovered - } - } - } - else_if = { - limit = { exists = scope:smith } - create_artifact = { - name = placeholder - creator = scope:smith - description = placeholder # Will be re-generated once decorations are added in the post-creation effects. - type = armor_laminar - visuals = armor - modifier = artifact_prowess_1_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - } - } - else_if = { - limit = { - exists = scope:host - exists = scope:activity - } - tournament_contest_armor_prize_effect = { TYPE = laminar } - } - else = { - create_artifact = { - name = placeholder - description = placeholder # Will be re-generated once decorations are added in the post-creation effects. - type = armor_laminar - visuals = armor - modifier = artifact_prowess_1_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - history = { type = created_before_history } - } - } - } - else_if = { - limit = { scope:armor_type = flag:armor_type_brigandine } - if = { - limit = { exists = scope:adventurer } - create_artifact = { - name = placeholder - description = placeholder # Will be re-generated once decorations are added in the post-creation effects. - type = armor_brigandine - visuals = armor - modifier = artifact_prowess_1_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - history = { - location = scope:location - actor = scope:adventurer - recipient = root - type = discovered - } - } - } - else_if = { - limit = { exists = scope:smith } - create_artifact = { - name = placeholder - creator = scope:smith - description = placeholder # Will be re-generated once decorations are added in the post-creation effects. - type = armor_brigandine - visuals = armor - wealth = scope:wealth - quality = scope:quality - modifier = artifact_prowess_1_modifier - save_scope_as = newly_created_artifact - } - } - else_if = { - limit = { - exists = scope:host - exists = scope:activity - } - tournament_contest_armor_prize_effect = { TYPE = brigandine } - } - else = { - create_artifact = { - name = placeholder - description = placeholder # Will be re-generated once decorations are added in the post-creation effects. - type = armor_brigandine - visuals = armor - wealth = scope:wealth - quality = scope:quality - modifier = artifact_prowess_1_modifier - save_scope_as = newly_created_artifact - history = { type = created_before_history } - } - } - } - else = { - # Defaults to mail as a common, ubiquitous type of armor. - if = { - limit = { exists = scope:adventurer } - create_artifact = { - name = placeholder - description = placeholder # Will be re-generated once decorations are added in the post-creation effects. - type = armor_mail - visuals = armor - wealth = scope:wealth - quality = scope:quality - modifier = artifact_prowess_1_modifier - save_scope_as = newly_created_artifact - history = { - location = scope:location - actor = scope:adventurer - recipient = root - type = discovered - } - } - } - else_if = { - limit = { exists = scope:smith } - create_artifact = { - name = placeholder - creator = scope:smith - description = placeholder # Will be re-generated once decorations are added in the post-creation effects. - type = armor_mail - visuals = armor - wealth = scope:wealth - quality = scope:quality - modifier = artifact_prowess_1_modifier - save_scope_as = newly_created_artifact - } - } - else_if = { - limit = { - exists = scope:host - exists = scope:activity - } - tournament_contest_armor_prize_effect = { TYPE = mail } - } - else = { - create_artifact = { - name = placeholder - description = placeholder # Will be re-generated once decorations are added in the post-creation effects. - type = armor_mail - visuals = armor - wealth = scope:wealth - quality = scope:quality - modifier = artifact_prowess_1_modifier - save_scope_as = newly_created_artifact - history = { type = created_before_history } - } - } - } - scope:newly_created_artifact = { - set_artifact_feature_group = armor_decoration - set_artifact_feature_group = armor_property - get_artifact_feature_references_effect = yes - set_artifact_name = artifact_armor_name - set_artifact_description = artifact_armor_description - } - - - # Let's add the modifiers! - scope:newly_created_artifact = { - # Rarity determines prowess bonus - add_scaled_artifact_modifier_prowess_effect = yes - # Rarity determines combat bonus - add_scaled_artifact_modifier_combat_effect = yes - - if = { # Chain mail gets a higher prowess due to the lack of decoration - limit = { artifact_type = armor_mail } - add_artifact_modifier = artifact_prowess_no_decorations_modifier - } - else_if = { # Fashion gets an attraction boost - limit = { - OR = { - artifact_type = armor_brigandine - artifact_type = armor_plate - } - } - add_artifact_modifier = artifact_attraction_opinion_1_modifier - } - else = { # For all other armor-types you get some prestige - add_artifact_modifier = artifact_placeholder_modifier - } - - if = { # Gold gives more prestige - limit = { - OR = { - has_artifact_feature = armor_decoration_gold_plating - has_artifact_feature = armor_material_gold - } - } - add_artifact_modifier = artifact_monthly_prestige_2_modifier - } - - set_variable = { - name = quality - value = scope:quality - } - set_variable = { - name = wealth - value = scope:wealth - } - } - } -} - -create_artifact_regalia_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - $SMITH$ = { save_scope_as = goldsmith } - # Get artifact quality and wealth - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - - - # Create the artifact - if = { - limit = { - exists = scope:adventurer - } - create_artifact = { - name = artifact_regalia_name - description = artifact_regalia_description - visuals = regalia - type = regalia - template = regalia_template - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - history = { - location = scope:location - actor = scope:adventurer - recipient = root - type = given - } - } - } - else = { - create_artifact = { - name = artifact_regalia_name - description = artifact_regalia_description - creator = scope:goldsmith - visuals = regalia - type = regalia - template = regalia_template - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - } - } - - hidden_effect_new_object = { - scope:newly_created_artifact = { - # Prestige modifier is scaled based on the Wealth of the artifact (opulence). - add_scaled_artifact_modifier_minor_prestige_effect = yes - - # If we're using the cross-bearing orb (explicit religious symbol), trade some prestige for piety. - if = { - limit = { - has_artifact_feature = regalia_accessory_orb - } - add_artifact_modifier = artifact_monthly_prestige_penalty_modifier - if = { - limit = { # Give a tiny bit more piety for high rarity artifacts. - OR = { - rarity = famed - rarity = illustrious - } - } - add_artifact_modifier = artifact_monthly_piety_5_modifier - } - else = { - add_artifact_modifier = artifact_monthly_piety_2_modifier - } - } - - # Add a Majesty-related modifier based on the Quality of the artifact. - if = { - limit = { # Add a second Majesty-related modifier for high rarity artifacts. - OR = { - rarity = famed - rarity = illustrious - } - } - add_2_scaled_artifact_modifier_majesty_effect = yes - } - else = { - add_scaled_artifact_modifier_majesty_effect = yes - } - - add_scaled_artifact_modifier_attractiveness_effect = yes - - set_variable = { - name = quality - value = scope:quality - } - set_variable = { - name = wealth - value = scope:wealth - } - } - } -} - -create_artifact_imperial_seal_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - $SMITH$ = { save_scope_as = scribe } - # Get artifact quality and wealth - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - - # Create the artifact - if = { - limit = { scope:owner = { has_royal_court = yes } } - if = { - limit = { - exists = scope:adventurer - } - create_artifact = { - name = artifact_seal_of_investiture - description = seal_of_investiture.desc - creator = scope:scribe - visuals = imperial_seal - type = seal_of_investiture_court - wealth = scope:wealth - quality = scope:quality - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - history = { - location = scope:location - actor = scope:adventurer - recipient = root - type = given - } - } - } - else = { - create_artifact = { - name = artifact_seal_of_investiture - description = seal_of_investiture.desc - creator = scope:scribe - visuals = imperial_seal - type = seal_of_investiture_court - wealth = scope:wealth - quality = scope:quality - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - } - } - } - else = { - if = { - limit = { - exists = scope:adventurer - } - create_artifact = { - name = artifact_seal_of_investiture - description = seal_of_investiture.desc - creator = scope:scribe - visuals = imperial_seal - type = seal_of_investiture - wealth = scope:wealth - quality = scope:quality - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - history = { - location = scope:location - actor = scope:adventurer - recipient = root - type = given - } - } - } - else = { - create_artifact = { - name = artifact_seal_of_investiture - description = seal_of_investiture.desc - creator = scope:scribe - visuals = imperial_seal - type = seal_of_investiture - wealth = scope:wealth - quality = scope:quality - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - } - } - } - - hidden_effect_new_object = { - scope:newly_created_artifact = { - # Prestige modifier is scaled based on the Wealth of the artifact (opulence). - add_scaled_artifact_modifier_prestige_effect = yes - - # Add a rulership-related modifier based on the Quality of the artifact. - if = { - limit = { # Chance to add a second rulership-related modifier for high rarity artifacts. - OR = { - rarity = famed - rarity = illustrious - } - } - random_list = { - 50 = { - add_2_scaled_artifact_modifier_rulership_effect = yes - } - 50 = { - add_scaled_artifact_modifier_rulership_effect = yes - } - } - } - else = { - add_scaled_artifact_modifier_rulership_effect = yes - } - - # Add a majesty-related modifier based on the Quality of the artifact. - if = { - limit = { # Chance to add a second majesty-related modifier for high rarity artifacts. - OR = { - rarity = famed - rarity = illustrious - } - } - random_list = { - 50 = { - add_2_scaled_artifact_modifier_majesty_effect = yes - } - 50 = { - add_scaled_artifact_modifier_majesty_effect = yes - } - } - } - else = { - add_scaled_artifact_modifier_majesty_effect = yes - } - - set_variable = { - name = quality - value = scope:quality - } - set_variable = { - name = wealth - value = scope:wealth - } - } - } -} - -create_artifact_dynastic_imperial_seal_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - $SMITH$ = { save_scope_as = seal_maker } - # Get artifact quality and wealth - get_artifact_wealth_effect = yes - get_artifact_quality_effect = yes - - # Create the artifact - create_artifact = { - name = dynastic_imperial_seal.name - description = dynastic_imperial_seal.desc - creator = scope:seal_maker - visuals = special_seal - type = seal_of_investiture_court - wealth = scope:wealth - quality = scope:quality - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - } - - hidden_effect_new_object = { - scope:newly_created_artifact = { - # Prestige modifier is scaled based on the Wealth of the artifact (opulence). - add_scaled_artifact_modifier_prestige_effect = yes - - # Add a rulership-related modifier based on the Quality of the artifact. - if = { - limit = { # Chance to add a second rulership-related modifier for high rarity artifacts. - OR = { - rarity = famed - rarity = illustrious - } - } - random_list = { - 50 = { - add_2_scaled_artifact_modifier_rulership_effect = yes - } - 50 = { - add_scaled_artifact_modifier_rulership_effect = yes - } - } - } - else = { - add_scaled_artifact_modifier_rulership_effect = yes - } - - # Add a majesty-related modifier based on the Quality of the artifact. - if = { - limit = { # Chance to add a second majesty-related modifier for high rarity artifacts. - OR = { - rarity = famed - rarity = illustrious - } - } - random_list = { - 50 = { - add_2_scaled_artifact_modifier_majesty_effect = yes - } - 50 = { - add_scaled_artifact_modifier_majesty_effect = yes - } - } - } - else = { - add_scaled_artifact_modifier_majesty_effect = yes - } - - set_variable = { - name = quality - value = scope:quality - } - set_variable = { - name = wealth - value = scope:wealth - } - } - } -} - -create_artifact_icon_effect = { - $OWNER$ = { save_scope_as = owner } - $CREATOR$ = { save_scope_as = creator } - - hidden_effect_new_object = { - # Get artifact quality, wealth, materials, and decorations - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - - random_list = { - 50 = { - trigger = { scope:owner = { has_royal_court = yes } } - create_artifact = { - name = artifact_icon_name - creator = scope:creator - description = placeholder # Will be updated in the post-creation effects - visuals = icon_court_large - type = wall_icon_court_large - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - } - } - 50 = { - trigger = { scope:owner = { has_royal_court = yes } } - create_artifact = { - name = artifact_icon_name - creator = scope:creator - description = placeholder # Will be updated in the post-creation effects - visuals = icon_court_small - type = wall_icon_court_small - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - } - } - 50 = { - trigger = { scope:owner = { has_royal_court = no } } - create_artifact = { - name = artifact_icon_name - creator = scope:creator - description = placeholder # Will be updated in the post-creation effects - visuals = trinket_icon - type = miscellaneous_when_not_court - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - } - } - } - - scope:newly_created_artifact = { - # Get decoration type and update description - get_artifact_feature_references_effect = yes - set_artifact_name = artifact_icon_name - set_artifact_description = artifact_icon_description - - # Crowns with high rarity get more modifiers - if = { - limit = { - rarity = illustrious - } - add_2_scaled_artifact_modifier_rulership_effect = yes - add_scaled_artifact_modifier_devotion_effect = yes - add_scaled_artifact_modifier_piety_effect = yes - } - else_if = { - limit = { - rarity = famed - } - add_2_scaled_artifact_modifier_rulership_effect = yes - add_scaled_artifact_modifier_devotion_effect = yes - add_scaled_artifact_modifier_piety_effect = yes - } - else_if = { - limit= { - rarity = masterwork - } - add_scaled_artifact_modifier_piety_effect = yes - add_scaled_artifact_modifier_rulership_effect = yes - } - else_if = { - limit= { - rarity = common - } - add_scaled_artifact_modifier_piety_effect = yes - add_scaled_artifact_modifier_rulership_effect = yes - } - - set_variable = { - name = quality - value = scope:quality - } - set_variable = { - name = wealth - value = scope:wealth - } - } - } -} - -create_artifact_crown_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - $SMITH$ = { save_scope_as = goldsmith } - - hidden_effect_new_object = { - # Get artifact quality, wealth, materials, and decorations - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - - # Create the artifact - if = { - limit = { exists = scope:adventurer } - create_artifact = { - name = artifact_crown_name - description = placeholder # Will be updated in the post-creation effects - template = crown_wearable_template - visuals = crown - type = helmet - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - history = { - location = ROOT.capital_province - actor = scope:adventurer - recipient = scope:owner - type = given - } - } - } - else = { - create_artifact = { - name = artifact_crown_name - creator = scope:goldsmith - description = placeholder # Will be updated in the post-creation effects - template = crown_wearable_template - visuals = crown - type = helmet - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - } - } - - scope:newly_created_artifact = { - # Get gem type if necessary and update description - get_artifact_feature_references_effect = yes - set_artifact_description = artifact_crown_description - - # Crowns with high rarity get more modifiers - if = { - limit = { - rarity = illustrious - } - add_2_scaled_artifact_modifier_rulership_effect = yes - add_scaled_artifact_modifier_majesty_effect = yes - add_scaled_artifact_modifier_minor_prestige_effect = yes - } - else_if = { - limit = { - rarity = famed - } - add_2_scaled_artifact_modifier_rulership_effect = yes - add_scaled_artifact_modifier_majesty_effect = yes - add_scaled_artifact_modifier_minor_prestige_effect = yes - } - else_if = { - limit= { - rarity = masterwork - } - add_scaled_artifact_modifier_minor_prestige_effect = yes - add_scaled_artifact_modifier_rulership_effect = yes - } - else_if = { - limit= { - rarity = common - } - add_scaled_artifact_modifier_minor_prestige_effect = yes - add_scaled_artifact_modifier_rulership_effect = yes - } - - set_variable = { - name = quality - value = scope:quality - } - set_variable = { - name = wealth - value = scope:wealth - } - } - } -} - -create_artifact_brooch_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - $SMITH$ = { save_scope_as = goldsmith } - - hidden_effect_new_object = { - # Get artifact quality, wealth, materials, and decorations - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - if = { #Any existing dummy character gets turned into the goldsmith - limit = { - exists = scope:dummy_gender - scope:goldsmith = scope:dummy_gender - } - clear_saved_scope = goldsmith - clear_saved_scope = dummy_gender - } - # Create the artifact - if = { - limit = { exists = scope:adventurer } - create_artifact = { - name = artifact_brooch_name - description = placeholder - visuals = brooch - type = brooch - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - history = { - location = scope:location - actor = scope:adventurer - recipient = root - type = discovered - } - } - } - else_if = { - limit = { - scope:host ?= $OWNER$ - scope:activity ?= { has_activity_type = activity_tournament } - } - create_artifact = { - name = artifact_brooch_name - creator = scope:host - description = placeholder # Will be updated in the post-creation effects after decorations are assigned. - visuals = brooch - type = brooch - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - history = { - type = prize_created - recipient = scope:host - } - save_scope_as = newly_created_artifact - } - } - else_if = { - limit = { - exists = scope:goldsmith - exists = scope:owner - scope:goldsmith = scope:owner - } - create_artifact = { - name = artifact_brooch_name - description = placeholder # Will be updated in the post-creation effects after decorations are assigned. - visuals = brooch - type = brooch - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - history = { - type = created - actor = scope:goldsmith - recipient = scope:goldsmith - location = scope:goldsmith.location - } - save_scope_as = newly_created_artifact - } - } - else_if = { - limit = { exists = scope:goldsmith } - create_artifact = { - name = artifact_brooch_name - creator = scope:goldsmith - description = placeholder # Will be updated in the post-creation effects after decorations are assigned. - visuals = brooch - type = brooch - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - } - } - else = { - create_artifact = { - name = artifact_brooch_name - description = placeholder # Will be updated in the post-creation effects after decorations are assigned. - visuals = brooch - type = brooch - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - history = { type = created_before_history } - } - } - - scope:newly_created_artifact = { - # Finish generating decorations and update description - if = { - limit = { - OR = { - has_artifact_feature = brooch_decoration_adornment - has_artifact_feature = brooch_decoration_centerpiece_and_adornment - } - } - set_artifact_feature_group = brooch_adornment - } - if = { - limit = { - OR = { - has_artifact_feature = brooch_decoration_centerpiece - has_artifact_feature = brooch_decoration_centerpiece_and_adornment - } - } - set_artifact_feature_group = brooch_centerpiece - } - get_artifact_feature_references_effect = yes - set_artifact_description = artifact_brooch_description - - # Add artifact modifiers - add_scaled_artifact_modifier_minor_prestige_effect = yes - add_scaled_artifact_modifier_attractiveness_effect = yes - if = { - limit = { - OR = { - rarity = famed - rarity = illustrious - } - } - add_scaled_artifact_modifier_rulership_effect = yes - } - - set_variable = { - name = quality - value = scope:quality - } - set_variable = { - name = wealth - value = scope:wealth - } - } - } -} - -create_artifact_brooch_pedestal_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - $SMITH$ = { save_scope_as = goldsmith } - if = { #Any existing dummy character gets turned into the goldsmith - limit = { - exists = scope:dummy_gender - scope:goldsmith = scope:dummy_gender - } - clear_saved_scope = goldsmith - clear_saved_scope = dummy_gender - } - hidden_effect_new_object = { - # Get artifact quality, wealth, materials, and decorations - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - - # Create the artifact - if = { - limit = { - scope:host ?= $OWNER$ - scope:activity ?= { has_activity_type = activity_tournament } - } - create_artifact = { - name = artifact_brooch_name - creator = scope:host - description = placeholder # Will be updated in the post-creation effects after decorations are assigned. - visuals = brooch_pedestal - type = brooch_pedestal - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - history = { - type = prize_created - recipient = scope:host - } - save_scope_as = newly_created_artifact - } - } - else_if = { - limit = { exists = scope:goldsmith } - create_artifact = { - name = artifact_brooch_name - creator = scope:goldsmith - description = placeholder # Will be updated in the post-creation effects after decorations are assigned. - visuals = brooch_pedestal - type = brooch_pedestal - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - } - } - else = { - create_artifact = { - name = artifact_brooch_name - description = placeholder # Will be updated in the post-creation effects after decorations are assigned. - visuals = brooch_pedestal - type = brooch_pedestal - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - history = { type = created_before_history } - } - } - - scope:newly_created_artifact = { - # Finish generating decorations and update description - if = { - limit = { - OR = { - has_artifact_feature = brooch_decoration_adornment - has_artifact_feature = brooch_decoration_centerpiece_and_adornment - } - } - set_artifact_feature_group = brooch_adornment - } - if = { - limit = { - OR = { - has_artifact_feature = brooch_decoration_centerpiece - has_artifact_feature = brooch_decoration_centerpiece_and_adornment - } - } - set_artifact_feature_group = brooch_centerpiece - } - get_artifact_feature_references_effect = yes - set_artifact_description = artifact_brooch_description - - # Add artifact modifiers - add_scaled_artifact_modifier_minor_prestige_effect = yes - add_scaled_artifact_modifier_attractiveness_effect = yes - if = { - limit = { - OR = { - rarity = famed - rarity = illustrious - } - } - add_scaled_artifact_modifier_rulership_effect = yes - } - - set_variable = { - name = quality - value = scope:quality - } - set_variable = { - name = wealth - value = scope:wealth - } - } - } -} - -################################################# -# # -# OBJECTS AND TRINKETS # -# # -################################################# - -create_artifact_necklace_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - $SMITH$ = { save_scope_as = goldsmith } - if = { #Any existing dummy character gets turned into the goldsmith - limit = { - exists = scope:dummy_gender - scope:goldsmith = scope:dummy_gender - } - clear_saved_scope = goldsmith - clear_saved_scope = dummy_gender - } - hidden_effect_new_object = { - # Get artifact quality and wealth - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - # Create the artifact - if = { - limit = { exists = scope:adventurer } - create_artifact = { - name = artifact_necklace_name - description = placeholder #properly set later - visuals = necklace - type = necklace - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - history = { - location = scope:location - actor = scope:adventurer - recipient = root - type = discovered - } - } - } - else_if = { - limit = { - scope:host ?= $OWNER$ - scope:activity ?= { has_activity_type = activity_tournament } - } - create_artifact = { - name = artifact_brooch_name - creator = scope:host - description = placeholder # Will be updated in the post-creation effects after decorations are assigned. - visuals = necklace - type = necklace - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - history = { - type = prize_created - recipient = scope:host - } - save_scope_as = newly_created_artifact - } - } - else_if = { - limit = { - exists = scope:goldsmith - exists = scope:owner - scope:goldsmith = scope:owner - } - create_artifact = { - name = artifact_necklace_name - description = placeholder #properly set later - visuals = necklace - type = necklace - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - history = { - type = created - actor = scope:goldsmith - recipient = scope:goldsmith - location = scope:goldsmith.location - } - save_scope_as = newly_created_artifact - } - } - else_if = { - limit = { exists = scope:goldsmith } - create_artifact = { - name = artifact_necklace_name - creator = scope:goldsmith - description = placeholder #properly set later - visuals = necklace - type = necklace - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - } - } - else = { - create_artifact = { - name = artifact_necklace_name - description = placeholder #properly set later - visuals = necklace - type = necklace - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - history = { type = created_before_history } - } - } - scope:newly_created_artifact = { - #Loc - get_artifact_feature_references_effect = yes - set_artifact_description = artifact_necklace_description - remove_artifact_modifier = artifact_placeholder_modifier - add_scaled_artifact_modifier_minor_prestige_effect = yes - add_scaled_artifact_modifier_attractiveness_effect = yes - if = { - limit = { - OR = { - rarity = famed - rarity = illustrious - } - } - add_scaled_artifact_modifier_majesty_effect = yes - } - set_variable = { - name = quality - value = scope:quality - } - set_variable = { - name = wealth - value = scope:wealth - } - } - } -} - -create_artifact_necklace_pedestal_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - $SMITH$ = { save_scope_as = goldsmith } - if = { #Any existing dummy character gets turned into the goldsmith - limit = { - exists = scope:dummy_gender - scope:goldsmith = scope:dummy_gender - } - clear_saved_scope = goldsmith - clear_saved_scope = dummy_gender - } - hidden_effect_new_object = { - # Get artifact quality and wealth - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - # Create the artifact - if = { - limit = { exists = scope:adventurer } - create_artifact = { - name = artifact_necklace_name - creator = scope:goldsmith - description = placeholder #properly set later - visuals = necklace_pedestal - type = necklace_pedestal - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - history = { - location = scope:location - actor = scope:adventurer - recipient = root - type = given - } - } - } - else_if = { - limit = { - scope:host ?= $OWNER$ - scope:activity ?= { has_activity_type = activity_tournament } - } - create_artifact = { - name = artifact_brooch_name - creator = scope:host - description = placeholder # Will be updated in the post-creation effects after decorations are assigned. - visuals = brooch - type = brooch - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - history = { - type = prize_created - recipient = scope:host - } - save_scope_as = newly_created_artifact - } - } - else_if = { - limit = { exists = scope:goldsmith } - create_artifact = { - name = artifact_necklace_name - creator = scope:goldsmith - description = placeholder #properly set later - visuals = necklace_pedestal - type = necklace_pedestal - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - } - } - else = { - create_artifact = { - name = artifact_necklace_name - description = placeholder #properly set later - visuals = necklace_pedestal - type = necklace_pedestal - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - history = { type = created_before_history } - } - } - scope:newly_created_artifact = { - #Loc - get_artifact_feature_references_effect = yes - set_artifact_description = artifact_necklace_description - remove_artifact_modifier = artifact_placeholder_modifier - add_scaled_artifact_modifier_minor_prestige_effect = yes - add_scaled_artifact_modifier_attractiveness_effect = yes - if = { - limit = { - OR = { - rarity = famed - rarity = illustrious - } - } - add_scaled_artifact_modifier_majesty_effect = yes - } - set_variable = { - name = quality - value = scope:quality - } - set_variable = { - name = wealth - value = scope:wealth - } - } - } -} - -# What flower have we ruthlessly picked and pressed? -get_pressed_flower_species_effect = { - if = { #The hide hasn't been set yet, so we set it here (also works as backup) - limit = { - NOT = { exists = scope:flower_species } - } - random_list = { - 40 = { - # they're everywhere - save_scope_value_as = { - name = flower_species - value = flag:flower_type_aster - } - } - 20 = { - # they're everywhere - save_scope_value_as = { - name = flower_species - value = flag:flower_type_rose - } - } - 10 = { - # they're everywhere, but rare - save_scope_value_as = { - name = flower_species - value = flag:flower_type_orchid - } - } - 10 = { - # Europe or Asia - modifier = { - factor = 0 - $LOCATION$ = { - NOR = { - geographical_region = world_europe_south - geographical_region = world_africa_north - geographical_region = world_asia_minor - geographical_region = world_middle_east - geographical_region = world_steppe - } - } - } - save_scope_value_as = { - name = flower_species - value = flag:flower_type_poppy - } - } - 10 = { - # Asia - modifier = { - factor = 0 - $LOCATION$ = { - NOR = { - geographical_region = world_asia_minor - geographical_region = world_middle_east - geographical_region = world_steppe_west - } - } - } - save_scope_value_as = { - name = flower_species - value = flag:flower_type_tulip - } - } - 10 = { - # Mediterranean sea + arid Asia - modifier = { - factor = 0 - $LOCATION$ = { - NOR = { - geographical_region = world_europe_south - geographical_region = world_africa_north - geographical_region = world_asia_minor - geographical_region = world_middle_east - geographical_region = world_steppe - } - } - } - save_scope_value_as = { - name = flower_species - value = flag:flower_type_crocus - } - } - 10 = { - # Europe, North Africa + parts of Asia - modifier = { - factor = 0 - $LOCATION$ = { - NOR = { - geographical_region = world_europe - geographical_region = world_africa_north - geographical_region = world_asia_minor - geographical_region = world_middle_east - geographical_region = world_steppe - } - } - } - save_scope_value_as = { - name = flower_species - value = flag:flower_type_narcissus - } - } - 10 = { - # Africa + parts of Asia - modifier = { - factor = 0 - $LOCATION$ = { - NOR = { - geographical_region = world_india - geographical_region = world_middle_east - geographical_region = world_africa_west - geographical_region = world_africa_east - } - } - } - save_scope_value_as = { - name = flower_species - value = flag:flower_type_hibiscus - } - } - 10 = { - # parts of Africa + India - modifier = { - factor = 0 - $LOCATION$ = { - NOR = { - geographical_region = world_india - geographical_region = world_africa_west - geographical_region = world_africa_east - } - } - } - save_scope_value_as = { - name = flower_species - value = flag:flower_type_gardenia - } - } - 10 = { - # parts of Asia - modifier = { - factor = 0 - $LOCATION$ = { - NOR = { - geographical_region = world_steppe_east - geographical_region = world_steppe_tarim - geographical_region = world_himalaya - geographical_region = world_india - } - } - } - save_scope_value_as = { - name = flower_species - value = flag:flower_type_lotus - } - } - 10 = { - # parts of Asia - modifier = { - factor = 0 - $LOCATION$ = { - NOR = { - geographical_region = world_steppe_east - geographical_region = world_steppe_tarim - geographical_region = world_himalaya - geographical_region = world_india - } - } - } - save_scope_value_as = { - name = flower_species - value = flag:flower_type_chrysanthemum - } - } - 10 = { - # parts of Asia - modifier = { - factor = 0 - $LOCATION$ = { - NOR = { - geographical_region = world_india - geographical_region = world_middle_east - geographical_region = world_asia_minor - geographical_region = world_steppe_west - } - } - } - save_scope_value_as = { - name = flower_species - value = flag:flower_type_jasmine - } - } - 10 = { - # Europe, Africa, and parts of Asia - modifier = { - factor = 0 - $LOCATION$ = { - NOR = { - geographical_region = world_europe - geographical_region = world_middle_east - geographical_region = world_asia_minor - geographical_region = world_steppe - geographical_region = world_africa - } - } - } - save_scope_value_as = { - name = flower_species - value = flag:flower_type_delphinium - } - } - 10 = { - # Europe and Asia - modifier = { - factor = 0 - $LOCATION$ = { - NOR = { - geographical_region = world_europe - geographical_region = world_middle_east - geographical_region = world_asia_minor - geographical_region = world_steppe_west - } - } - } - save_scope_value_as = { - name = flower_species - value = flag:flower_type_violet - } - } - 10 = { - # Europe and Asia - modifier = { - factor = 0 - $LOCATION$ = { - NOR = { - geographical_region = world_europe - geographical_region = world_middle_east - geographical_region = world_asia_minor - geographical_region = world_steppe_west - } - } - } - save_scope_value_as = { - name = flower_species - value = flag:flower_type_peony - } - } - 10 = { - # Europe and Asia - modifier = { - factor = 0 - $LOCATION$ = { - NOR = { - geographical_region = world_europe - geographical_region = world_middle_east - geographical_region = world_asia_minor - geographical_region = world_steppe - } - } - } - save_scope_value_as = { - name = flower_species - value = flag:flower_type_lavender - } - } - 10 = { - # Europe and Asia - modifier = { - factor = 0 - $LOCATION$ = { - NOR = { - geographical_region = world_europe - geographical_region = world_middle_east - geographical_region = world_asia_minor - geographical_region = world_steppe - geographical_region = world_india - } - } - } - save_scope_value_as = { - name = flower_species - value = flag:flower_type_lily - } - } - 10 = { - # Europe and parts of Asia - modifier = { - factor = 0 - $LOCATION$ = { - NOR = { - geographical_region = world_europe - geographical_region = world_middle_east - geographical_region = world_asia_minor - geographical_region = world_steppe - } - } - } - save_scope_value_as = { - name = flower_species - value = flag:flower_type_geranium - } - } - 10 = { - # Europe and parts of Asia - modifier = { - factor = 0 - $LOCATION$ = { - NOR = { - geographical_region = world_europe - geographical_region = world_middle_east - geographical_region = world_asia_minor - geographical_region = world_steppe - } - } - } - save_scope_value_as = { - name = flower_species - value = flag:flower_type_iris - } - } - 10 = { - # Europe and parts of Asia - modifier = { - factor = 0 - $LOCATION$ = { - NOR = { - geographical_region = world_europe - geographical_region = world_middle_east - geographical_region = world_asia_minor - geographical_region = world_steppe_west - geographical_region = world_africa_north - } - } - } - save_scope_value_as = { - name = flower_species - value = flag:flower_type_foxglove - } - } - 10 = { - # Southern Europe and Northen Africa - modifier = { - factor = 0 - $LOCATION$ = { - NOR = { - geographical_region = world_europe_south - geographical_region = world_africa_north - } - } - } - save_scope_value_as = { - name = flower_species - value = flag:flower_type_carnation - } - } - 10 = { - # Southern Europe and Northen Africa - modifier = { - factor = 0 - $LOCATION$ = { - NOR = { - geographical_region = world_europe_south - geographical_region = world_africa_north - } - } - } - save_scope_value_as = { - name = flower_species - value = flag:flower_type_snapdragon - } - } - } - } -} - -create_artifact_pressed_flower_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - scope:owner = { save_scope_as = creator } - hidden_effect = { - # Get artifact quality and wealth - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - - #Get flower - get_animal_hunt_location_effect = yes #not hunting, but need the location in a similar way - } - - # Create the artifact - scope:owner = { - if = { - limit = { - exists = scope:flower_picker - } - hidden_effect = { - get_pressed_flower_species_effect = { LOCATION = scope:flower_picker.location } - } - # Create the artifact - create_artifact = { - name = artifact_pressed_flower_name - description = placeholder #properly set later - creator = scope:flower_picker - visuals = flowers - type = miscellaneous - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - } - } - else = { - hidden_effect = { - get_pressed_flower_species_effect = { LOCATION = scope:owner.location } - } - # Create the artifact - create_artifact = { - name = artifact_pressed_flower_name - description = placeholder #properly set later - creator = scope:owner - visuals = flowers - type = miscellaneous - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - } - } - } - - - - - hidden_effect_new_object = { - scope:newly_created_artifact = { - #Loc - get_artifact_feature_references_effect = yes - set_artifact_description = artifact_pressed_flower_description - remove_artifact_modifier = artifact_placeholder_modifier - add_scaled_artifact_modifier_minor_prestige_effect = yes - - # If the average wealth/quality of the artifact is above 75, add 2nd tier fertility bonus - - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_fertility_gain_4_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_fertility_gain_3_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_fertility_gain_2_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_fertility_gain_1_modifier - } - - set_variable = { - name = quality - value = scope:quality - } - set_variable = { - name = wealth - value = scope:wealth - } - set_variable = { - name = flower_species - value = scope:flower_species - } - } - } -} - -# Currently just armillary spheres, but can be added to in future. -roll_scientific_apparatus_effect = { - random_list = { - 100 = { - trigger = { - eligible_for_scientific_apparatus_armillary_sphere_trigger = { CHARACTER = $CHARACTER$ } - } - save_scope_value_as = { - name = artefact_scientific_apparatus_type - value = flag:artisan_type_scientific_apparatus - } - } - } -} - -#### HOW TO generate_trinket_effect #### -#Use this template to make the generate_trinket_effect work -# generate_trinket_effect = { -# TRINKET_RECEIVER = scope:your_receiving_character -# TRINKET_GIVER = scope:your_giving_character -# GRAB_ALL_TRINKETS = yes/no -# HISTORY_TYPE = given_unknown/given/discovered_for/stolen_unknown/stolen/created_unknown/created/inherited_unknown/inherited/reforged/conquest/taken_in_siege -# } -#==================================== -#TRINKET_RECEIVER/TRINKET_GIVER - if you don't have a giver and/or receiver, set the same character as both -#GRAB_ALL_TRINKETS - if you are not discerned with what trinkets you generate, put this as a "yes". Otherwise put it as a "no" and set your own flags. -#If you _are_ discerning and you want to choose which trinkets you want to be able to generate: -# > Set an add_character_flag = { flag = used_in_stewardship_general.2001 } on your TRINKET_RECEIVER-character -# > Refer to this flag in the trigger of the trinket below -# > Remember to remove_character_flag = used_in_stewardship_general.2001 in your after = { ... } -#HISTORY_TYPE - pick one that fits the interaction in which you get the trinket -#==================================== -generate_trinket_effect = { - $TRINKET_RECEIVER$ = { save_scope_as = trinket_receiver } - $TRINKET_GIVER$ = { save_scope_as = trinket_giver } - scope:trinket_receiver = { - set_variable = { - name = grab_all_trinkets - value = flag:$GRAB_ALL_TRINKETS$ - } - } - random_list = { - #BAD - ##Bad 01 - ###Gilded Rat's Tail - 80 = { - #TRIGGERS - trigger = { - scope:trinket_receiver = { - OR = { - ##If we are flagged to grab all trinkets - var:grab_all_trinkets ?= flag:yes - ##stewardship_general.2001 - ###Let's not get trash if we outwitted the merchant - AND = { - has_character_flag = used_in_stewardship_general.2001 - NOT = { has_character_flag = free_outcome_stewardship_general.2001 } - } - ##^^Add more/other trigger flags above^^## - } - } - } - #MODIFIERS - ##stewardship_general.2001 - ###We didn't choose the CHEAP option - modifier = { - scope:trinket_receiver = { - OR = { - has_character_flag = expensive_option_stewardship_general.2001 - has_character_flag = helpful_option_stewardship_general.2001 - } - } - add = -25 - } - ###We have extremely high stewardship skill - modifier = { - scope:trinket_receiver = { has_character_flag = has_extremely_high_stewardship_skill_stewardship_general.2001 } - add = -25 - } - ##^^Add more/other modifier flags above^^## - #DO NOT edit this part## - create_artifact = { - name = gilded_rats_tail - description = gilded_rats_tail.desc - type = miscellaneous - visuals = ring - modifier = artifact_monthly_prestige_penalty_modifier - modifier = artifact_child_opinion_1_modifier - save_scope_as = new_trinket - wealth = 5 - quality = 5 - max_durability = 10 - generate_history = no - } - scope:new_trinket = { - flag_as_trash_artifact = yes - #The AI probably shouldn't want this bad trinket - flag_as_unwanted_artifact = yes - } - } - ##Bad 02 - ###Quail's Eggshell 'Gem' - 80 = { - #TRIGGERS - trigger = { - scope:trinket_receiver = { - OR = { - ##If we are flagged to grab all trinkets - var:grab_all_trinkets ?= flag:yes - ##stewardship_general.2001 - ###Let's not get trash if we outwitted the merchant - AND = { - has_character_flag = used_in_stewardship_general.2001 - NOT = { has_character_flag = free_outcome_stewardship_general.2001 } - } - has_character_flag = used_in_mpo_events_ariana_0070 - ##^^Add more/other trigger flags above^^## - } - } - } - #MODIFIERS - ##stewardship_general.2001 - ###We didn't choose the CHEAP option - modifier = { - scope:trinket_receiver = { - OR = { - has_character_flag = expensive_option_stewardship_general.2001 - has_character_flag = helpful_option_stewardship_general.2001 - } - } - add = -25 - } - ###We have extremely high stewardship skill - modifier = { - scope:trinket_receiver = { has_character_flag = has_extremely_high_stewardship_skill_stewardship_general.2001 } - add = -25 - } - ##^^Add more/other modifier flags above^^## - #DO NOT edit this part## - create_artifact = { - name = quail_eggshell_gem - description = quail_eggshell_gem.desc - type = miscellaneous - visuals = diamond - modifier = artifact_monthly_prestige_penalty_modifier - modifier = artifact_fertility_gain_1_modifier - save_scope_as = new_trinket - wealth = 5 - quality = 5 - max_durability = 10 - generate_history = no - } - scope:new_trinket = { - flag_as_trash_artifact = yes - #The AI probably shouldn't want this bad trinket - flag_as_unwanted_artifact = yes - } - } - ##Bad 03 - ###Sanctified 'Stained' Glass Shard - 80 = { - #TRIGGERS - trigger = { - scope:trinket_receiver = { - OR = { - ##If we are flagged to grab all trinkets - var:grab_all_trinkets ?= flag:yes - ##stewardship_general.2001 - ###Let's not get trash if we outwitted the merchant - AND = { - has_character_flag = used_in_stewardship_general.2001 - NOT = { has_character_flag = free_outcome_stewardship_general.2001 } - } - ##^^Add more/other trigger flags above^^## - } - } - } - #MODIFIERS - ##stewardship_general.2001 - ###We didn't choose the CHEAP option - modifier = { - scope:trinket_receiver = { - OR = { - has_character_flag = expensive_option_stewardship_general.2001 - has_character_flag = helpful_option_stewardship_general.2001 - } - } - add = -25 - } - ###We have extremely high stewardship skill - modifier = { - scope:trinket_receiver = { has_character_flag = has_extremely_high_stewardship_skill_stewardship_general.2001 } - add = -25 - } - ##^^Add more/other modifier flags above^^## - #DO NOT edit this part## - create_artifact = { - name = stained_glass_shard - description = stained_glass_shard.desc - type = miscellaneous - visuals = pocket_pouch - modifier = desecrated_artifact_modifier - modifier = artifact_dread_gain_mult_1_modifier - save_scope_as = new_trinket - wealth = 5 - quality = 5 - max_durability = 10 - generate_history = no - } - scope:new_trinket = { - flag_as_trash_artifact = yes - #The AI probably shouldn't want this bad trinket - flag_as_unwanted_artifact = yes - } - } - ##Bad 04 - ###Xylospongium - 80 = { - #TRIGGERS - trigger = { - scope:trinket_receiver = { - OR = { - ##If we are flagged to grab all trinkets - var:grab_all_trinkets ?= flag:yes - ##stewardship_general.2001 - ###Let's not get trash if we outwitted the merchant - AND = { - has_character_flag = used_in_stewardship_general.2001 - NOT = { has_character_flag = free_outcome_stewardship_general.2001 } - } - ##^^Add more/other trigger flags above^^## - } - } - } - #MODIFIERS - ##stewardship_general.2001 - ###We didn't choose the CHEAP option - modifier = { - scope:trinket_receiver = { - OR = { - has_character_flag = expensive_option_stewardship_general.2001 - has_character_flag = helpful_option_stewardship_general.2001 - } - } - add = -25 - } - ###We have extremely high stewardship skill - modifier = { - scope:trinket_receiver = { has_character_flag = has_extremely_high_stewardship_skill_stewardship_general.2001 } - add = -25 - } - ##^^Add more/other modifier flags above^^## - #DO NOT edit this part## - create_artifact = { - name = xylospongium - description = xylospongium.desc - type = miscellaneous - visuals = pocket_basic_case - modifier = artifact_health_penalty_1_modifier - modifier = artifact_child_opinion_2_modifier - save_scope_as = new_trinket - wealth = 5 - quality = 5 - max_durability = 10 - generate_history = no - } - scope:new_trinket = { - flag_as_trash_artifact = yes - #The AI probably shouldn't want this bad trinket - flag_as_unwanted_artifact = yes - } - } - #COMMON - ##Common 01 - ###St David's Morsel - 45 = { - #TRIGGERS - trigger = { - scope:trinket_receiver = { - OR = { - ##If we are flagged to grab all trinkets - var:grab_all_trinkets ?= flag:yes - ##stewardship_general.2001 - has_character_flag = used_in_stewardship_general.2001 - ##bp1_yearly.1021 - has_character_flag = 1021_token - - ##^^Add more/other trigger flags above^^## - } - } - } - #MODIFIERS - ##stewardship_general.2001 - ###More likely if we have our chaplain to help and chose the helpful option - modifier = { - scope:trinket_receiver = { - has_character_flag = helpful_option_stewardship_general.2001 - has_character_flag = has_helpful_chaplain_stewardship_general.2001 - } - add = 20 - } - ###Less likely if we already have a morsel - modifier = { - scope:trinket_receiver = { - any_character_artifact = { has_variable = st_davids_morsel_trinket } - } - add = -40 - } - ##^^Add more/other trigger flags above^^## - #DO NOT edit this part## - create_artifact = { - name = st_davids_morsel - description = st_davids_morsel.desc - type = miscellaneous - visuals = pocket_fancy_case - modifier = artifact_clergy_opinion_1_modifier - modifier = artifact_zealot_vassal_opinion_2_modifier - save_scope_as = new_trinket - wealth = 15 - quality = 15 - max_durability = 30 - generate_history = no - } - scope:new_trinket = { - set_variable = st_davids_morsel_trinket - flag_as_trash_artifact = yes - } - } - ##Common 02 - ###Platypus Figurine - 35 = { - #TRIGGERS - trigger = { - scope:trinket_receiver = { - ##If we don't already have a platypus figurine in our inventory - NOT = { - any_character_artifact = { has_variable = platypus_trinket } - } - OR = { - ##If we are flagged to grab all trinkets - var:grab_all_trinkets ?= flag:yes - ##stewardship_general.2001 - has_character_flag = used_in_stewardship_general.2001 - - ##^^Add more/other trigger flags above^^## - } - } - } - #MODIFIERS - ##^^Add more/other modifier flags above^^## - #DO NOT edit this part## - create_artifact = { - name = platypus_figurine - description = platypus_figurine.desc - type = miscellaneous - visuals = pocket_figurine - modifier = artifact_stress_gain_2_modifier - modifier = artifact_scheme_resistance_add_2_modifier - save_scope_as = new_trinket - wealth = 25 - quality = 25 - max_durability = 30 - history = { - type = created_before_history - } - } - scope:new_trinket = { - set_variable = platypus_trinket - } - } - ##Common 03 - ###Terracotta Toy Fowl - 55 = { - #TRIGGERS - trigger = { - scope:trinket_receiver = { - OR = { - ##If we are flagged to grab all trinkets - var:grab_all_trinkets ?= flag:yes - ##stewardship_general.2001 - has_character_flag = used_in_stewardship_general.2001 - ##bp1_yearly.1021 - has_character_flag = 1021_token - - ##Add more/other trigger flags below - } - } - } - #MODIFIERS - ##stewardship_general.2001 - ###Less likely if we have our steward to help and chose the helpful option - modifier = { - scope:trinket_receiver = { - has_character_flag = helpful_option_stewardship_general.2001 - has_character_flag = has_helpful_steward_stewardship_general.2001 - } - add = -25 - } - ###Less likely if we already have a Terracotta Toy Fowl - modifier = { - scope:trinket_receiver = { - any_character_artifact = { has_variable = terracotta_toy_fowl_trinket } - } - add = -50 - } - ##^^Add more/other modifier flags above^^## - #DO NOT edit this part## - create_artifact = { - name = terracotta_toy_fowl - description = terracotta_toy_fowl.desc - type = miscellaneous - visuals = pocket_figurine - modifier = artifact_monthly_prestige_1_modifier - modifier = artifact_learning_1_modifier - save_scope_as = new_trinket - wealth = 15 - quality = 15 - max_durability = 30 - generate_history = no - } - scope:new_trinket = { - set_variable = terracotta_toy_fowl_trinket - flag_as_trash_artifact = yes - } - } - ##Common 04 - ###Potsherd - 65 = { - #TRIGGERS - trigger = { - scope:trinket_receiver = { - OR = { - ##If we are flagged to grab all trinkets - var:grab_all_trinkets ?= flag:yes - ##stewardship_general.2001 - has_character_flag = used_in_stewardship_general.2001 - ##bp1_yearly.1021 - has_character_flag = 1021_token - - ##Add more/other trigger flags below - } - } - } - #MODIFIERS - ##stewardship_general.2001 - ###More likely if we have our chaplain to help and chose the helpful option - modifier = { - scope:trinket_receiver = { - has_character_flag = helpful_option_stewardship_general.2001 - has_character_flag = has_helpful_chaplain_stewardship_general.2001 - } - add = 20 - } - ###Less likely if we already have a Potsherd - modifier = { - scope:trinket_receiver = { - any_character_artifact = { has_variable = potsherd_trinket } - } - add = -60 - } - ##^^Add more/other modifier flags above^^## - #DO NOT edit this part## - faith = { - random_holy_site = { save_scope_as = trinket_holy_site } - } - create_artifact = { - name = stewardship_general.2001.artifact.potsherd_holy - description = stewardship_general.2001.artifact.potsherd_holy.desc - type = miscellaneous - visuals = rock - modifier = artifact_clergy_opinion_1_modifier - modifier = artifact_zealot_vassal_opinion_2_modifier - save_scope_as = new_trinket - wealth = 15 - quality = 15 - max_durability = 30 - generate_history = no - } - scope:new_trinket = { - set_variable = potsherd_trinket - flag_as_trash_artifact = yes - } - } - ##Common 05 - ###Small Bell Beaker - 45 = { - #TRIGGERS - trigger = { - scope:trinket_receiver = { - OR = { - ##If we are flagged to grab all trinkets - var:grab_all_trinkets ?= flag:yes - ##stewardship_general.2001 - has_character_flag = used_in_stewardship_general.2001 - ##bp1_yearly.1021 - has_character_flag = 1021_token - has_character_flag = used_in_mpo_events_ariana_0070 - ##^^Add more/other trigger flags above^^## - } - } - } - #MODIFIERS - ##stewardship_general.2001 - ###Less likely if we have extremely high stewardship or took the helpful councillor option - modifier = { - scope:trinket_receiver = { - OR = { - has_character_flag = helpful_option_stewardship_general.2001 - has_character_flag = has_extremely_high_stewardship_skill_stewardship_general.2001 - } - } - add = -25 - } - ###Less likely if we already have a Small Bell Beaker - modifier = { - scope:trinket_receiver = { - any_character_artifact = { has_variable = small_bell_beaker_trinket } - } - add = -40 - } - ##^^Add more/other modifier flags above^^## - #DO NOT edit this part## - create_artifact = { - name = small_bell_beaker - description = small_bell_beaker.desc - type = miscellaneous - visuals = pocket_goblet - modifier = artifact_monthly_prestige_1_modifier - modifier = artifact_learning_1_modifier - save_scope_as = new_trinket - wealth = 15 - quality = 15 - max_durability = 30 - generate_history = no - } - scope:new_trinket = { - set_variable = small_bell_beaker_trinket - flag_as_trash_artifact = yes - } - } - ##Common 06 - ###Serpentine Budai - 45 = { - #TRIGGERS - trigger = { - scope:trinket_receiver = { - OR = { - ##If we are flagged to grab all trinkets - var:grab_all_trinkets ?= flag:yes - ##stewardship_general.2001 - has_character_flag = used_in_stewardship_general.2001 - ##bp1_yearly.1021 - has_character_flag = 1021_token - - ##^^Add more/other trigger flags above^^## - } - } - } - #MODIFIERS - ##stewardship_general.2001 - ###Less likely if we have extremely high stewardship or took the helpful councillor option - modifier = { - scope:trinket_receiver = { - OR = { - has_character_flag = helpful_option_stewardship_general.2001 - has_character_flag = has_extremely_high_stewardship_skill_stewardship_general.2001 - } - } - add = -25 - } - ###Less likely if we already have a Serpentine Budai - modifier = { - scope:trinket_receiver = { - any_character_artifact = { has_variable = serpentine_budai_trinket } - } - add = -40 - } - ##^^Add more/other modifier flags above^^## - #DO NOT edit this part## - create_artifact = { - name = serpentine_budai - description = serpentine_budai.desc - type = miscellaneous - visuals = pocket_figurine - modifier = artifact_stress_gain_1_modifier - modifier = artifact_different_faith_opinion_4_modifier - save_scope_as = new_trinket - wealth = 15 - quality = 15 - max_durability = 30 - generate_history = no - } - scope:new_trinket = { - set_variable = serpentine_budai_trinket - flag_as_trash_artifact = yes - } - } - #UNCOMMON - ##Uncommon 01 - ###'s Horn - 40 = { - #TRIGGERS - trigger = { - scope:trinket_receiver = { - OR = { - ##If we are flagged to grab all trinkets - var:grab_all_trinkets ?= flag:yes - ##stewardship_general.2001 - has_character_flag = used_in_stewardship_general.2001 - ##feast_default.1016 - has_character_flag = used_in_feast_default.1016 - ##bp1_yearly.1021 - has_character_flag = 1021_token - - ##^^Add more/other trigger flags above^^## - } - } - } - #MODIFIERS - ##stewardship_general.2001 - ###More likely if we have our steward to help and chose the helpful option - modifier = { - scope:trinket_receiver = { - has_character_flag = helpful_option_stewardship_general.2001 - has_character_flag = has_helpful_steward_stewardship_general.2001 - } - add = 30 - } - ###Less likely if we already have a Mythical Horn - modifier = { - scope:trinket_receiver = { - any_character_artifact = { has_variable = mythical_horn_trinket } - } - add = -35 - } - ##^^Add more/other modifier flags above^^## - #DO NOT edit this part## - set_up_horned_mythical_creature_effect = yes - create_artifact = { - name = mythical_creature_horn - description = mythical_creature_horn.desc - type = miscellaneous - visuals = pocket_tusk - modifier = artifact_fertility_gain_2_modifier - modifier = artifact_spouse_opinion_add_2_modifier - save_scope_as = new_trinket - wealth = 45 - quality = 45 - max_durability = 60 - generate_history = no - } - scope:new_trinket = { - set_variable = mythical_horn_trinket - } - } - ##Uncommon 02 - ### Figurine - 40 = { - #TRIGGERS - trigger = { - scope:trinket_receiver = { - OR = { - ##If we are flagged to grab all trinkets - var:grab_all_trinkets ?= flag:yes - ##stewardship_general.2001 - has_character_flag = used_in_stewardship_general.2001 - ##feast_default.1016 - has_character_flag = used_in_feast_default.1016 - ##bp1_yearly.1021 - has_character_flag = 1021_token - - ##^^Add more/other trigger flags above^^## - } - } - } - #MODIFIERS - ###Less likely if we already have a Mythical Figurine - modifier = { - scope:trinket_receiver = { - any_character_artifact = { has_variable = mythical_creature_figurine_trinket } - } - add = -35 - } - ##^^Add more/other modifier flags above^^## - #DO NOT edit this part## - set_up_trinket_adjective_effect = yes - set_up_regional_mythical_creature_effect = yes - create_artifact = { - name = mythical_creature_figurine - description = mythical_creature_figurine.desc - type = miscellaneous - visuals = pocket_figurine - modifier = artifact_monthly_learning_lifestyle_xp_1_modifier - modifier = artifact_learning_1_modifier - modifier = artifact_health_gain_1_modifier - save_scope_as = new_trinket - wealth = 45 - quality = 45 - max_durability = 60 - generate_history = no - } - scope:new_trinket = { - set_variable = mythical_creature_figurine_trinket - } - } - ##Uncommon 03 - ###St David's Taper - 30 = { - #TRIGGERS - trigger = { - scope:trinket_receiver = { - ##If we don't already have a St David's Taper in our inventory - NOT = { - any_character_artifact = { has_variable = st_davids_taper_trinket } - } - OR = { - ##If we are flagged to grab all trinkets - var:grab_all_trinkets ?= flag:yes - ##stewardship_general.2001 - AND = { - ###Only if we have our chaplain to help and chose the helpful option - has_character_flag = has_helpful_chaplain_stewardship_general.2001 - has_character_flag = helpful_option_stewardship_general.2001 - } - ##feast_default.1016 - has_character_flag = used_in_feast_default.1016 - - ##^^Add more/other trigger flags above^^## - } - } - } - #MODIFIERS - ##^^Add more/other modifier flags above^^## - #DO NOT edit this part## - create_artifact = { - name = st_davids_taper - description = st_davids_taper.desc - type = miscellaneous - visuals = pocket_basic_case - modifier = artifact_monthly_piety_1_modifier - modifier = artifact_health_gain_1_modifier - modifier = artifact_zealot_vassal_opinion_2_modifier - save_scope_as = new_trinket - wealth = 45 - quality = 45 - max_durability = 60 - generate_history = no - } - scope:new_trinket = { - set_variable = st_davids_taper_trinket - } - } - ##Uncommon 04 - ###Marble Stick of J'Ira - 30 = { - #TRIGGERS - trigger = { - scope:trinket_receiver = { - ##If we don't already have a Jira poking stick in our inventory - NOT = { - any_character_artifact = { has_variable = jira_stick_trinket } - } - OR = { - ##If we are flagged to grab all trinkets - var:grab_all_trinkets ?= flag:yes - ##stewardship_general.2001 - has_character_flag = used_in_stewardship_general.2001 - ##feast_default.1016 - has_character_flag = used_in_feast_default.1016 - ##bp1_yearly.1021 - has_character_flag = 1021_token - - ##^^Add more/other trigger flags above^^## - } - } - } - #MODIFIERS - modifier = { - scope:trinket_receiver = { has_character_flag = less_than_decent_learning_stewardship_general.2001 } - add = 30 - } - ##^^Add more/other modifier flags above^^## - #DO NOT edit this part## - create_artifact = { - name = jira_stick - description = jira_stick.desc - type = miscellaneous - visuals = regalia - template = regalia_template - modifier = artifact_monthly_learning_lifestyle_xp_1_modifier - modifier = artifact_learning_1_modifier - modifier = artifact_prowess_2_modifier - save_scope_as = new_trinket - wealth = 45 - quality = 45 - max_durability = 60 - generate_history = no - } - scope:new_trinket = { - set_variable = jira_stick_trinket - } - } - ##Uncommon 05 - ###Lucky Coin - 40 = { - #TRIGGERS - trigger = { - scope:trinket_receiver = { - OR = { - ##If we are flagged to grab all trinkets - var:grab_all_trinkets ?= flag:yes - ##stewardship_general.2001 - has_character_flag = used_in_stewardship_general.2001 - ##feast_default.1016 - has_character_flag = used_in_feast_default.1016 - ##bp1_yearly.1021 - has_character_flag = 1021_token - has_character_flag = used_in_mpo_events_ariana_0070 - ##^^Add more/other trigger flags above^^## - } - } - } - #MODIFIERS - ##stewardship_general.2001 - ###More likely if we have extremely high stewardship or took the expensive option - modifier = { - scope:trinket_receiver = { - OR = { - has_character_flag = expensive_option_stewardship_general.2001 - has_character_flag = has_extremely_high_stewardship_skill_stewardship_general.2001 - } - } - add = 25 - } - ###More likely if we have our steward to help and chose the helpful option - modifier = { - scope:trinket_receiver = { - has_character_flag = helpful_option_stewardship_general.2001 - has_character_flag = has_helpful_steward_stewardship_general.2001 - } - add = 30 - } - ###Less likely if we already have a lucky coin - modifier = { - scope:trinket_receiver = { - any_character_artifact = { has_variable = lucky_coin_trinket } - } - add = -35 - } - ##^^Add more/other modifier flags above^^## - #DO NOT edit this part## - create_artifact = { - name = lucky_coin - description = lucky_coin.desc - type = miscellaneous - visuals = medallion - modifier = artifact_monthly_stewardship_lifestyle_xp_1_modifier - modifier = artifact_domain_tax_mult_2_modifier - modifier = artifact_stewardship_per_stress_level_1_modifier - save_scope_as = new_trinket - wealth = 45 - quality = 45 - max_durability = 60 - generate_history = no - } - scope:new_trinket = { - set_variable = lucky_coin_trinket - } - } - ##Uncommon 06 - ###Lavender Jade Pendant - 40 = { - #TRIGGERS - trigger = { - scope:trinket_receiver = { - ##If we don't already have a Lavender Jade Pendant in our inventory - NOT = { - any_character_artifact = { has_variable = lavender_jade_pendant_trinket } - } - OR = { - ##If we are flagged to grab all trinkets - var:grab_all_trinkets ?= flag:yes - ##stewardship_general.2001 - has_character_flag = used_in_stewardship_general.2001 - ##feast_default.1016 - has_character_flag = used_in_feast_default.1016 - ##bp1_yearly.1021 - has_character_flag = 1021_token - has_character_flag = used_in_mpo_events_ariana_0070 - ##^^Add more/other trigger flags above^^## - } - } - } - #MODIFIERS - ##^^Add more/other modifier flags above^^## - #DO NOT edit this part## - create_artifact = { - name = lavender_jade_pendant - description = lavender_jade_pendant.desc - type = miscellaneous - visuals = necklace - modifier = artifact_monthly_piety_2_modifier - modifier = artifact_monthly_piety_from_buildings_mult_3_modifier - save_scope_as = new_trinket - wealth = 45 - quality = 45 - max_durability = 60 - generate_history = no - } - scope:new_trinket = { - set_variable = lavender_jade_pendant_trinket - } - } - #RARE - 1/35 with no modifiers - ##Rare 01 - ###Old Signet Ring - 20 = { - #TRIGGERS - trigger = { - scope:trinket_receiver = { - ##If we don't already have the Ring of Sekhmet in our inventory - NOT = { - any_character_artifact = { has_variable = sekhmet_ring_trinket } - } - OR = { - ##If we are flagged to grab all trinkets - var:grab_all_trinkets ?= flag:yes - ##stewardship_general.2001 - ###If we have extremely high stewardship skill - has_character_flag = has_extremely_high_stewardship_skill_stewardship_general.2001 - ##feast_default.1016 - has_character_flag = used_in_feast_default.1016 - ##bp1_yearly.1021 - has_character_flag = 1021_token - has_character_flag = used_in_mpo_events_ariana_0070 - ##^^Add more/other trigger flags above^^## - } - } - } - #MODIFIERS - ##stewardship_general.2001 - ###Less likely if we took the cheap option - modifier = { - scope:trinket_receiver = { has_character_flag = cheap_option_stewardship_general.2001 } - add = -25 - } - ##^^Add more/other modifier flags above^^## - #DO NOT edit this part## - create_artifact = { - name = sekhmet_ring - description = sekhmet_ring.desc - type = miscellaneous - visuals = ring - modifier = artifact_monthly_prestige_2_modifier - modifier = artifact_monthly_stewardship_lifestyle_xp_1_modifier - modifier = artifact_stewardship_1_modifier - modifier = artifact_monthly_dynasty_prestige_3_modifier - save_scope_as = new_trinket - wealth = 65 - quality = 65 - history = { - type = created_before_history - } - } - scope:new_trinket = { - set_variable = sekhmet_ring_trinket - } - } - ##Rare 02 - ###Ancient Scarab Brooch - 20 = { - #TRIGGERS - trigger = { - scope:trinket_receiver = { - ##If we don't already have the Ancient Scarab Brooch in our inventory - NOT = { - any_character_artifact = { has_variable = ancient_scarab_brooch_trinket } - } - OR = { - ##If we are flagged to grab all trinkets - var:grab_all_trinkets ?= flag:yes - ##stewardship_general.2001 - ###If we have extremely high stewardship skill, took the expensive option or had a helpful councillor - has_character_flag = has_extremely_high_stewardship_skill_stewardship_general.2001 - has_character_flag = expensive_option_stewardship_general.2001 - AND = { - has_character_flag = has_helpful_chaplain_stewardship_general.2001 - has_character_flag = helpful_option_stewardship_general.2001 - } - ##feast_default.1016 - has_character_flag = used_in_feast_default.1016 - ##bp1_yearly.1021 - has_character_flag = 1021_token - - ##^^Add more/other trigger flags above^^## - } - } - } - #MODIFIERS - ##^^Add more/other modifier flags above^^## - #DO NOT edit this part## - create_artifact = { - name = scarab_brooch - description = scarab_brooch.desc - type = miscellaneous - visuals = brooch - modifier = artifact_health_gain_2_modifier - modifier = artifact_fertility_gain_2_modifier - modifier = artifact_negate_health_penalty_add_2_modifier - modifier = artifact_prowess_3_modifier - save_scope_as = new_trinket - wealth = 65 - quality = 65 - history = { - type = created_before_history - } - } - scope:new_trinket = { - set_variable = ancient_scarab_brooch_trinket - } - } - } - if = { - limit = { exists = scope:new_trinket } - #Set up history - scope:new_trinket = { - #Check what our history is - save_scope_value_as = { - name = artifact_history - value = flag:$HISTORY_TYPE$ - } - ##Given to scope:trinket_receiver - if = { - limit = { - exists = scope:artifact_history - scope:artifact_history = flag:given_unknown - } - add_artifact_history = { - type = given - actor = scope:trinket_receiver #Having the receiver in both generates the CoA on the right-hand side of the entry - recipient = scope:trinket_receiver - } - } - ##Given to scope:trinket_receiver (scope:trinket_giver is the left-hand portrait) - else_if = { - limit = { - exists = scope:artifact_history - scope:artifact_history = flag:given - } - add_artifact_history = { - type = given - actor = scope:trinket_giver - recipient = scope:trinket_receiver - } - } - ##Discovered by scope:trinket_giver for scope:trinket_receiver at scope:trinket_giver.location - else_if = { - limit = { - exists = scope:artifact_history - scope:artifact_history = flag:discovered - } - add_artifact_history = { - type = discovered - actor = scope:trinket_giver - recipient = scope:trinket_receiver - location = scope:trinket_giver.location - } - } - ##Stolen by scope:trinket_receiver (scope:trinket_receiver's Coat of Arms is the right-hand portrait) - else_if = { - limit = { - exists = scope:artifact_history - scope:artifact_history = flag:stolen_unknown - } - add_artifact_history = { - type = stolen - actor = scope:trinket_receiver - recipient = scope:trinket_receiver - } - } - ##Stolen by scope:trinket_receiver (scope:trinket_giver is the right-hand portrait) - else_if = { - limit = { - exists = scope:artifact_history - scope:artifact_history = flag:stolen - } - add_artifact_history = { - type = stolen - actor = scope:trinket_giver - recipient = scope:trinket_receiver - } - } - ##Created by an unknown benefactor for scope:trinket_receiver at scope:trinket_receiver.location - else_if = { - limit = { - exists = scope:artifact_history - scope:artifact_history = flag:created_unknown - } - add_artifact_history = { - type = created - recipient = scope:trinket_receiver - location = scope:trinket_receiver.location - } - } - ##Created by scope:trinket_giver for scope:trinket_receiver at scope:trinket_receiver.location - else_if = { - limit = { - exists = scope:artifact_history - scope:artifact_history = flag:created - } - add_artifact_history = { - type = created - actor = scope:trinket_giver - recipient = scope:trinket_receiver - location = scope:trinket_receiver.location - } - } - ##Inherited by scope:trinket_receiver - else_if = { - limit = { - exists = scope:artifact_history - scope:artifact_history = flag:inherited_unknown - } - add_artifact_history = { - type = inherited - actor = scope:trinket_receiver - recipient = scope:trinket_receiver - } - } - #Inherited by scope:trinket_receiver - else_if = { - limit = { - exists = scope:artifact_history - scope:artifact_history = flag:inherited - } - add_artifact_history = { - type = inherited - actor = scope:trinket_giver - recipient = scope:trinket_receiver - } - } - ##Reforged by scope:trinket_receiver in scope:trinket_receiver.location - else_if = { - limit = { - exists = scope:artifact_history - scope:artifact_history = flag:reforged - } - add_artifact_history = { - type = reforged - recipient = scope:trinket_receiver - location = scope:trinket_receiver.location - } - } - ##Conquered by scope:trinket_receiver in a war against scope:trinket_giver - else_if = { - limit = { - exists = scope:artifact_history - scope:artifact_history = flag:conquest - } - add_artifact_history = { - type = conquest - actor = scope:trinket_giver - recipient = scope:trinket_receiver - } - } - ##Conquered by scope:trinket_receiver after the siege of scope:trinket_giver.location - else_if = { - limit = { - exists = scope:artifact_history - scope:artifact_history = flag:taken_in_siege - } - add_artifact_history = { - type = taken_in_siege - actor = scope:trinket_giver - recipient = scope:trinket_receiver - location = scope:trinket_giver.location - } - } - } - } - #Clean up the grab all flag, in case it was used - scope:trinket_receiver = { - if = { - limit = { exists = var:grab_all_trinkets } - remove_variable = grab_all_trinkets - } - } - #Clean up trinket variables - if = { - limit = { exists = var:horned_mythical_creature } - remove_variable = horned_mythical_creature - } - if = { - limit = { exists = var:regional_mythical_creature_trinket } - remove_variable = regional_mythical_creature_trinket - } - if = { - limit = { exists = var:trinket_adjective_followup } - remove_variable = trinket_adjective_followup - } -} - - -# EP2 -# If the type of weapon hasn't been decided yet we set it here -set_bow_artifact_type_effect = { - save_temporary_scope_value_as = { - name = allow_no_type_option - value = $NO_TYPE$ - } - # Historically many of these types of weapon were used in some combination, but to give a clearer portrayal to the player we have to simplify it a bit - hidden_effect = { - $BASE_SCOPE$ = { - #The type has been decided in events, when the character got inspired, or now. Let's save it! (might still leave it up to the sponsor if allow_no_type_option = yes!) - if = { - limit = { - NOT = { exists = var:artifact_bow_type } - } - random_list = { #What weapon do they want to forge? - 25 = { - trigger = { - culture = { has_cultural_tradition = tradition_longbow_competitions } - } - set_variable = { - name = artifact_bow_type - value = flag:artifact_bow_type_longbow - } - } - 10 = { - trigger = { - culture = { has_innovation = innovation_advanced_bowmaking } - } - set_variable = { - name = artifact_bow_type - value = flag:artifact_bow_type_crossbow - } - } - 5 = { - set_variable = { - name = artifact_bow_type - value = flag:artifact_bow_type_bow - } - } - 25 = { - trigger = { - culture = { is_composite_bow_culture_trigger = yes } - } - set_variable = { - name = artifact_bow_type - value = flag:artifact_bow_type_composite - } - } - 50 = { #They don't care and you can decide! - trigger = { scope:allow_no_type_option = yes } - modifier = { - add = 30 - has_personality_submissive_trigger = yes - } - modifier = { - add = 9890 # ~1% chance of being predetermined if comissioning from a local artisan. - has_character_flag = local_artisan - } - ai_value_modifier = { - ai_boldness = -0.25 - ai_energy = -0.25 - } - # Don't set on creation so that the player has more input on what gets forged in inspiration start events, like fund_inspiration.0015 - } - } - } - } - } -} - -create_artifact_bow_effect = { - # Get the character the artifact is being made for. - # If scope:adventurer exists this will result in the history entry reading that the weapon was discovered instead of made. - $OWNER$ = { save_scope_as = owner } - $CREATOR$ = { save_scope_as = bowyer } - save_temporary_scope_value_as = { - name = bow_type_is_set - value = $SET_BOW_TYPE$ - } - if = { #Any existing dummy character gets turned into the bowyer - limit = { - exists = scope:dummy_gender - scope:bowyer = scope:dummy_gender - } - clear_saved_scope = bowyer - clear_saved_scope = dummy_gender - } - hidden_effect_new_object = { - if = { - limit = { scope:bow_type_is_set = flag:no } - if = { - limit = { exists = scope:bowyer } - set_bow_artifact_type_effect = { - BASE_SCOPE = scope:bowyer - NO_TYPE = no - } - scope:bowyer = { - var:artifact_bow_type = { save_scope_as = bow_type } - remove_variable = artifact_bow_type - } - } - else = { - set_bow_artifact_type_effect = { - BASE_SCOPE = scope:owner - NO_TYPE = no - } - scope:owner = { - var:artifact_bow_type = { save_scope_as = bow_type } - remove_variable = artifact_bow_type - } - } - } - else = { - scope:bow_type_is_set = { save_scope_as = bow_type } - } - # Get artifact quality and wealth. - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - - # Get the type of weapon to forge. Defaults to bow if an invalid type is provided. - if = { # Longbow - limit = { scope:bow_type = flag:artifact_bow_type_longbow } - if = { - limit = { exists = scope:adventurer } - create_artifact = { - name = artifact_longbow_name - description = placeholder # Will be re-generated once decorations are added in the post-creation effects. - visuals = longbow - type = longbow - modifier = artifact_prowess_1_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - history = { - location = scope:location - actor = scope:adventurer - recipient = root - type = discovered - } - } - } - else_if = { - limit = { - scope:host ?= $OWNER$ - scope:activity ?= { has_activity_type = activity_tournament } - } - tournament_contest_bow_prize_effect = { TYPE = longbow } - } - else_if = { - limit = { exists = scope:bowyer } - create_artifact = { - name = artifact_longbow_name - creator = scope:bowyer - description = placeholder # Will be re-generated once decorations are added in the post-creation effects. - visuals = longbow - type = longbow - modifier = artifact_prowess_1_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - } - } - else = { - create_artifact = { - name = artifact_longbow_name - description = placeholder # Will be re-generated once decorations are added in the post-creation effects. - visuals = longbow - type = longbow - modifier = artifact_prowess_1_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - history = { type = created_before_history } - } - } - scope:newly_created_artifact = { - get_artifact_feature_references_effect = yes - set_artifact_description = artifact_longbow_description - } - } - else_if = { # Composite - limit = { scope:bow_type = flag:artifact_bow_type_composite } - if = { - limit = { exists = scope:adventurer } - create_artifact = { - name = artifact_composite_name - description = placeholder # Will be re-generated once decorations are added in the post-creation effects. - visuals = composite - type = composite - modifier = artifact_prowess_1_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - history = { - location = scope:location - actor = scope:adventurer - recipient = root - type = discovered - } - } - } - else_if = { - limit = { - scope:host ?= $OWNER$ - scope:activity ?= { has_activity_type = activity_tournament } - } - tournament_contest_bow_prize_effect = { TYPE = composite } - } - else_if = { - limit = { exists = scope:bowyer } - create_artifact = { - name = artifact_composite_name - creator = scope:bowyer - description = placeholder # Will be re-generated once decorations are added in the post-creation effects. - visuals = composite - type = composite - modifier = artifact_prowess_1_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - } - } - else = { - create_artifact = { - name = artifact_composite_name - description = placeholder # Will be re-generated once decorations are added in the post-creation effects. - visuals = composite - type = composite - modifier = artifact_prowess_1_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - history = { type = created_before_history } - } - } - scope:newly_created_artifact = { - get_artifact_feature_references_effect = yes - set_artifact_description = artifact_composite_description - } - } - else_if = { # Crossbow - limit = { scope:bow_type = flag:artifact_bow_type_crossbow } - if = { - limit = { exists = scope:adventurer } - create_artifact = { - name = artifact_crossbow_name - description = placeholder # Will be re-generated once decorations are added in the post-creation effects. - visuals = crossbow - type = crossbow - modifier = artifact_prowess_1_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - history = { - location = scope:location - actor = scope:adventurer - recipient = root - type = discovered - } - } - } - else_if = { - limit = { - scope:host ?= $OWNER$ - scope:activity ?= { has_activity_type = activity_tournament } - } - tournament_contest_bow_prize_effect = { TYPE = crossbow } - } - else_if = { - limit = { exists = scope:bowyer } - create_artifact = { - name = artifact_crossbow_name - creator = scope:bowyer - description = placeholder # Will be re-generated once decorations are added in the post-creation effects. - visuals = crossbow - type = crossbow - modifier = artifact_prowess_1_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - } - } - else = { - create_artifact = { - name = artifact_crossbow_name - description = placeholder # Will be re-generated once decorations are added in the post-creation effects. - visuals = crossbow - type = crossbow - modifier = artifact_prowess_1_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - history = { type = created_before_history } - } - } - scope:newly_created_artifact = { - get_artifact_feature_references_effect = yes - set_artifact_description = artifact_crossbow_description - } - } - else_if = { # Standard - limit = { scope:bow_type = flag:artifact_bow_type_bow } - if = { - limit = { exists = scope:adventurer } - create_artifact = { - name = artifact_bow_name - description = placeholder # Will be re-generated once decorations are added in the post-creation effects. - visuals = bow - type = bow - modifier = artifact_prowess_1_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - history = { - location = scope:location - actor = scope:adventurer - recipient = root - type = discovered - } - } - } - else_if = { - limit = { - scope:host ?= $OWNER$ - scope:activity ?= { has_activity_type = activity_tournament } - } - tournament_contest_bow_prize_effect = { TYPE = bow } - } - else_if = { - limit = { exists = scope:smith } - create_artifact = { - name = artifact_bow_name - creator = scope:smith - description = placeholder # Will be re-generated once decorations are added in the post-creation effects. - visuals = bow - type = bow - modifier = artifact_prowess_1_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - } - } - else = { - create_artifact = { - name = artifact_bow_name - description = placeholder # Will be re-generated once decorations are added in the post-creation effects. - visuals = bow - type = bow - modifier = artifact_prowess_1_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - history = { type = created_before_history } - } - } - scope:newly_created_artifact = { - get_artifact_feature_references_effect = yes - set_artifact_description = artifact_bow_description - } - } - scope:newly_created_artifact = { - # Prowess from weapon rarity - add_scaled_artifact_modifier_prowess_effect = yes - add_scaled_artifact_modifier_trait_track_hunter_xp_gain_mult_effect = yes - if = { - limit = { - OR = { - rarity = famed - rarity = illustrious - } - } - if = { - limit = { scope:bow_type = flag:artifact_bow_type_composite } - add_scaled_artifact_modifier_archer_cavalry_screen_add_effect = yes - } - else_if = { - limit = { scope:bow_type = flag:artifact_bow_type_longbow } - add_scaled_artifact_modifier_archers_screen_add_effect = yes - } - else = { add_2_scaled_artifact_modifier_combat_effect = yes } - } - else_if = { - limit = { - OR = { - rarity = common - rarity = masterwork - } - } - if = { - limit = { scope:bow_type = flag:artifact_bow_type_composite } - add_scaled_artifact_modifier_archer_cavalry_screen_add_effect = yes - } - else_if = { - limit = { scope:bow_type = flag:artifact_bow_type_longbow } - add_scaled_artifact_modifier_archers_screen_add_effect = yes - } - else = { add_2_scaled_artifact_modifier_combat_effect = yes } - } - else_if = { - limit = { - OR = { - rarity = famed - rarity = illustrious - } - # No decorations - } - if = { - limit = { scope:bow_type = flag:artifact_bow_type_composite } - add_scaled_artifact_modifier_archer_cavalry_screen_add_effect = yes - } - else_if = { - limit = { scope:bow_type = flag:artifact_bow_type_longbow } - add_scaled_artifact_modifier_archers_screen_add_effect = yes - } - else = { add_2_scaled_artifact_modifier_combat_effect = yes } - } - else_if = { - limit = { - rarity = masterwork - # No decorations - } - if = { - limit = { scope:bow_type = flag:artifact_bow_type_composite } - add_scaled_artifact_modifier_archer_cavalry_screen_add_effect = yes - } - else_if = { - limit = { scope:bow_type = flag:artifact_bow_type_longbow } - add_scaled_artifact_modifier_archers_screen_add_effect = yes - } - else = { add_2_scaled_artifact_modifier_combat_effect = yes } - } - else = { add_artifact_modifier = artifact_prowess_no_decorations_modifier } - # Save the quality and wealth of this artifact in case we need to reference it later. - set_variable = { - name = quality - value = scope:quality - } - set_variable = { - name = wealth - value = scope:wealth - } - } - } -} - -create_artifact_ring_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - $SMITH$ = { save_scope_as = goldsmith } - if = { #Any existing dummy character gets turned into the goldsmith - limit = { - exists = scope:dummy_gender - scope:goldsmith = scope:dummy_gender - } - clear_saved_scope = goldsmith - clear_saved_scope = dummy_gender - } - hidden_effect_new_object = { - # Get artifact quality, wealth, materials, and decorations - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - - # Create the artifact - if = { - limit = { exists = scope:adventurer } - create_artifact = { - name = artifact_ring_name - description = placeholder - visuals = ring - type = ring - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - history = { - location = scope:location - actor = scope:adventurer - recipient = root - type = discovered - } - } - } - else_if = { - limit = { - scope:host ?= $OWNER$ - scope:activity ?= { has_activity_type = activity_tournament } - } - create_artifact = { - name = artifact_ring_name - creator = scope:host - description = placeholder # Will be updated in the post-creation effects after decorations are assigned. - visuals = ring - type = ring - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - history = { - type = prize_created - recipient = scope:host - } - } - } - else_if = { - limit = { - exists = scope:goldsmith - exists = scope:owner - scope:goldsmith = scope:owner - } - create_artifact = { - name = artifact_ring_name - description = placeholder # Will be updated in the post-creation effects after decorations are assigned. - visuals = ring - type = ring - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - history = { - type = created - actor = scope:goldsmith - recipient = scope:goldsmith - location = scope:goldsmith.location - } - save_scope_as = newly_created_artifact - } - } - else_if = { - limit = { exists = scope:norman_noble } - create_artifact = { - name = artifact_ring_name - creator = scope:host - description = placeholder # Will be updated in the post-creation effects after decorations are assigned. - visuals = ring - type = ring - modifier = artifact_placeholder_modifier - wealth = 120 - quality = 120 - save_scope_as = newly_created_artifact - } - } - else_if = { - limit = { exists = scope:goldsmith } - create_artifact = { - name = artifact_ring_name - creator = scope:goldsmith - description = placeholder # Will be updated in the post-creation effects after decorations are assigned. - visuals = ring - type = ring - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - } - } - else = { - create_artifact = { - name = artifact_ring_name - description = placeholder # Will be updated in the post-creation effects after decorations are assigned. - visuals = ring - type = ring - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - history = { type = created_before_history } - } - } - scope:newly_created_artifact = { - # Finish generating decorations and update description - if = { - limit = { - OR = { - has_artifact_feature = ring_decoration_adornment - has_artifact_feature = ring_decoration_centerpiece_and_adornment - } - } - set_artifact_feature_group = ring_adornment - } - if = { - limit = { - OR = { - has_artifact_feature = ring_decoration_centerpiece - has_artifact_feature = ring_decoration_centerpiece_and_adornment - } - } - set_artifact_feature_group = ring_centerpiece - } - get_artifact_feature_references_effect = yes - set_artifact_description = artifact_ring_description - - # Add artifact modifiers - add_scaled_artifact_modifier_minor_prestige_effect = yes - if = { - limit = { - OR = { - has_artifact_feature = ring_adornment_motto - has_artifact_feature = ring_centerpiece_signet - } - } - add_scaled_artifact_modifier_majesty_effect = yes - } - else = { add_scaled_artifact_modifier_attractiveness_effect = yes } - if = { - limit = { - OR = { - rarity = famed - rarity = illustrious - } - } - add_scaled_artifact_modifier_rulership_effect = yes - } - set_variable = { - name = quality - value = scope:quality - } - set_variable = { - name = wealth - value = scope:wealth - } - } - } -} - -create_artifact_bowl_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - $SMITH$ = { save_scope_as = goldsmith } - if = { #Any existing dummy character gets turned into the goldsmith - limit = { - exists = scope:dummy_gender - scope:goldsmith = scope:dummy_gender - } - clear_saved_scope = goldsmith - clear_saved_scope = dummy_gender - } - hidden_effect_new_object = { - # Get artifact quality, wealth, materials, and decorations - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - - # Create the artifact - if = { - limit = { exists = scope:adventurer } - create_artifact = { - name = artifact_bowl_name - description = placeholder - visuals = bowl - type = bowl - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - history = { - location = scope:location - actor = scope:adventurer - recipient = root - type = discovered - } - } - } - else_if = { - limit = { - scope:host ?= $OWNER$ - scope:activity ?= { has_activity_type = activity_tournament } - } - create_artifact = { - name = artifact_bowl_name - creator = scope:host - description = placeholder # Will be updated in the post-creation effects after decorations are assigned. - visuals = bowl - type = bowl - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - history = { - type = prize_created - recipient = scope:host - } - save_scope_as = newly_created_artifact - } - } - else_if = { - limit = { exists = scope:goldsmith } - create_artifact = { - name = artifact_bowl_name - creator = scope:goldsmith - description = placeholder # Will be updated in the post-creation effects after decorations are assigned. - visuals = bowl - type = bowl - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - } - } - else = { - create_artifact = { - name = artifact_bowl_name - description = placeholder # Will be updated in the post-creation effects after decorations are assigned. - visuals = bowl - type = bowl - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - history = { type = created_before_history } - } - } - - scope:newly_created_artifact = { - # Finish generating decorations and update description - get_artifact_feature_references_effect = yes - set_artifact_description = artifact_bowl_description - # Add artifact modifiers - add_scaled_artifact_modifier_minor_prestige_effect = yes - add_scaled_artifact_modifier_grandeur_small_effect = yes - if = { - limit = { - OR = { - rarity = famed - rarity = illustrious - } - } - add_scaled_artifact_modifier_rulership_effect = yes - } - set_variable = { - name = quality - value = scope:quality - } - set_variable = { - name = wealth - value = scope:wealth - } - } - } -} - -create_artifact_plate_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - $SMITH$ = { save_scope_as = goldsmith } - if = { #Any existing dummy character gets turned into the goldsmith - limit = { - exists = scope:dummy_gender - scope:goldsmith = scope:dummy_gender - } - clear_saved_scope = goldsmith - clear_saved_scope = dummy_gender - } - hidden_effect_new_object = { - # Get artifact quality, wealth, materials, and decorations - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - - # Create the artifact - if = { - limit = { exists = scope:adventurer } - create_artifact = { - name = artifact_plate_name - description = placeholder - visuals = plate - type = plate - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - history = { - location = scope:location - actor = scope:adventurer - recipient = root - type = discovered - } - } - } - else_if = { - limit = { - scope:host ?= $OWNER$ - scope:activity ?= { has_activity_type = activity_tournament } - } - create_artifact = { - name = artifact_plate_name - creator = scope:host - description = placeholder # Will be updated in the post-creation effects after decorations are assigned. - visuals = plate - type = plate - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - history = { - type = prize_created - recipient = scope:host - } - save_scope_as = newly_created_artifact - } - } - else_if = { - trigger = { exists = scope:goldsmith } - create_artifact = { - name = artifact_plate_name - creator = scope:goldsmith - description = placeholder # Will be updated in the post-creation effects after decorations are assigned. - visuals = plate - type = plate - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - } - } - else = { - create_artifact = { - name = artifact_plate_name - description = placeholder # Will be updated in the post-creation effects after decorations are assigned. - visuals = plate - type = plate - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - history = { type = created_before_history } - } - } - scope:newly_created_artifact = { - # Finish generating decorations and update description - get_artifact_feature_references_effect = yes - set_artifact_description = artifact_plate_description - # Add artifact modifiers - add_scaled_artifact_modifier_minor_prestige_effect = yes - add_scaled_artifact_modifier_grandeur_small_effect = yes - if = { - limit = { - OR = { - rarity = famed - rarity = illustrious - } - } - add_scaled_artifact_modifier_rulership_effect = yes - } - set_variable = { - name = quality - value = scope:quality - } - set_variable = { - name = wealth - value = scope:wealth - } - } - } -} - -create_artifact_urn_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - $POTTER$ = { save_scope_as = potter } - if = { #Any existing dummy character gets turned into the potter - limit = { - exists = scope:dummy_gender - scope:potter = scope:dummy_gender - } - clear_saved_scope = potter - clear_saved_scope = dummy_gender - } - hidden_effect_new_object = { - # Get artifact quality, wealth, materials, and decorations - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - - # Create the artifact - if = { - limit = { exists = scope:adventurer } - create_artifact = { - name = artifact_urn_name - description = placeholder - visuals = urn - type = urn - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - history = { - location = scope:location - actor = scope:adventurer - recipient = root - type = discovered - } - } - } - else_if = { - limit = { - scope:host ?= $OWNER$ - scope:activity ?= { has_activity_type = activity_tournament } - } - create_artifact = { - name = artifact_urn_name - creator = scope:host - description = placeholder # Will be updated in the post-creation effects after decorations are assigned. - visuals = urn - type = urn - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - history = { - type = prize_created - recipient = scope:host - } - save_scope_as = newly_created_artifact - } - } - else_if = { - limit = { exists = scope:potter } - create_artifact = { - name = artifact_urn_name - creator = scope:potter - description = placeholder # Will be updated in the post-creation effects after decorations are assigned. - visuals = urn - type = urn - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - } - } - else = { - create_artifact = { - name = artifact_urn_name - description = placeholder # Will be updated in the post-creation effects after decorations are assigned. - visuals = urn - type = urn - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - history = { type = created_before_history } - } - } - scope:newly_created_artifact = { - # Finish generating decorations and update description - get_artifact_feature_references_effect = yes - set_artifact_description = artifact_urn_description - # Add artifact modifiers - add_scaled_artifact_modifier_grandeur_small_effect = yes - add_scaled_artifact_modifier_minor_prestige_effect = yes - if = { - limit = { - OR = { - rarity = famed - rarity = illustrious - } - } - add_scaled_artifact_modifier_majesty_effect = yes - } - set_variable = { - name = quality - value = scope:quality - } - set_variable = { - name = wealth - value = scope:wealth - } - } - } -} - -hunt_animal_artifact_modifier_selection_effect = { - if = { - limit = { - OR = { - rarity = masterwork - rarity = famed - rarity = illustrious - } - } - if = { - limit = { - scope:owner.var:animal_type ?= flag:hare - } - add_scaled_artifact_modifier_attractiveness_effect = yes - if = { - limit = { - rarity = illustrious - } - add_scaled_artifact_modifier_intrigue_effect = yes - } - } - else_if = { - limit = { - OR = { - scope:owner.var:animal_type ?= flag:roe - scope:owner.var:animal_type ?= flag:reindeer - scope:owner.var:animal_type ?= flag:stag - scope:owner.var:animal_type ?= flag:antelope - scope:owner.var:animal_type ?= flag:saiga - scope:owner.var:animal_type ?= flag:hart - scope:owner.var:animal_type ?= flag:elk - scope:owner.var:animal_type ?= flag:horse - } - } - add_scaled_artifact_modifier_majesty_effect = yes - if = { - limit = { - rarity = illustrious - } - add_scaled_artifact_modifier_minor_prestige_effect = yes - } - } - else_if = { - limit = { - OR = { - scope:owner.var:animal_type ?= flag:aurochs - scope:owner.var:animal_type ?= flag:bison - scope:owner.var:animal_type ?= flag:boar - } - } - add_scaled_artifact_modifier_rulership_effect = yes - if = { - limit = { - rarity = illustrious - } - add_scaled_artifact_modifier_majesty_effect = yes - } - } - else_if = { - limit = { - OR = { - scope:owner.var:animal_type ?= flag:bear - scope:owner.var:animal_type ?= flag:leopard - scope:owner.var:animal_type ?= flag:lion - scope:owner.var:animal_type ?= flag:tiger - scope:owner.var:animal_type ?= flag:wolf - scope:owner.var:animal_type ?= flag:lynx - scope:owner.var:animal_type ?= flag:wolf - scope:owner.var:animal_type ?= flag:dog - } - } - add_scaled_artifact_modifier_combat_effect = yes - if = { - limit = { - rarity = illustrious - } - add_scaled_artifact_modifier_majesty_effect = yes - } - } - else_if = { - limit = { - OR = { - scope:owner.var:animal_type ?= flag:hyena - scope:owner.var:animal_type ?= flag:unicorn - scope:owner.var:animal_type ?= flag:fox - scope:owner.var:animal_type ?= flag:dragon - scope:owner.var:animal_type ?= flag:cat - } - } - add_scaled_artifact_modifier_intrigue_effect = yes - if = { - limit = { - rarity = illustrious - } - add_scaled_artifact_modifier_scholarship_effect = yes - } - } - else = { - add_scaled_artifact_modifier_majesty_effect = yes - if = { - limit = { - rarity = illustrious - } - add_scaled_artifact_modifier_rulership_effect = yes - } - } - } -} - -generate_health_trinket_effect = { - #Get artifact quality and wealth - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - #Generate the trinket - hidden_effect_new_object = { - random_list = { - 25 = { - create_artifact = { - name = medicine_jar - description = medicine_jar_desc - type = miscellaneous - visuals = glazed_jar - modifier = artifact_epidemic_resistance_3_modifier - save_scope_as = newly_created_health_artifact - wealth = scope:wealth - quality = scope:quality - } - scope:newly_created_health_artifact = { set_variable = health_jar } - } - 25 = { - create_artifact = { - name = lapidary_tourmaline - description = lapidary_tourmaline.desc - type = miscellaneous - visuals = diamond - modifier = artifact_negate_health_penalty_add_2_modifier - save_scope_as = newly_created_health_artifact - wealth = scope:wealth - quality = scope:quality - generate_history = no - } - scope:newly_created_health_artifact = { set_variable = health_jewel } - } - 25 = { - create_artifact = { - name = scented_herb_pouch - description = scented_herb_pouch.desc - type = miscellaneous - visuals = pocket_pouch - modifier = artifact_health_gain_2_modifier - save_scope_as = newly_created_health_artifact - wealth = scope:wealth - quality = scope:quality - } - scope:newly_created_health_artifact = { set_variable = health_pouch } - } - 25 = { - set_up_horned_mythical_creature_effect = yes - create_artifact = { - name = mythical_creature_horn - description = mythical_creature_horn.desc - type = miscellaneous - visuals = pocket_tusk - modifier = artifact_fertility_gain_2_modifier - save_scope_as = newly_created_health_artifact - wealth = scope:wealth - quality = scope:quality - generate_history = no - } - scope:newly_created_health_artifact = { set_variable = health_horn } - remove_variable ?= horned_mythical_creature - } - } - #Tweak the trinket modifiers, depending on rarity - scope:newly_created_health_artifact = { - if = { #Famed - limit = { - OR = { - rarity = illustrious #Bit of a cop-out, but I only need up to Famed atm - rarity = famed - } - } - clear_artifact_modifiers = yes - switch = { - trigger = has_variable - health_jar = { - set_artifact_name = aged_medicine_jar - add_artifact_modifier = artifact_epidemic_resistance_7_modifier - add_artifact_modifier = artifact_negate_health_penalty_add_2_modifier - } - health_jewel = { - random_list = { - 75 = { - set_artifact_name = lapidary_sapphire - set_artifact_description = lapidary_sapphire.desc - } - 25 = { - modifier = { - root.location = { geographical_region = world_india } - factor = 2 - } - set_artifact_name = lapidary_ruby - set_artifact_description = lapidary_ruby.desc - } - } - add_artifact_modifier = artifact_negate_health_penalty_add_3_modifier - add_artifact_modifier = artifact_fertility_gain_2_modifier - } - health_pouch = { - set_artifact_name = pomander - set_artifact_description = pomander.desc - add_artifact_modifier = artifact_health_gain_4_modifier - add_artifact_modifier = artifact_epidemic_resistance_5_modifier - } - health_horn = { - add_artifact_modifier = artifact_fertility_gain_4_modifier - add_artifact_modifier = artifact_health_gain_2_modifier - } - } - } - else_if = { #Masterwork - limit = { rarity = masterwork } - clear_artifact_modifiers = yes - switch = { - trigger = has_variable - health_jar = { - set_artifact_name = potent_medicine_jar - add_artifact_modifier = artifact_epidemic_resistance_5_modifier - add_artifact_modifier = artifact_negate_health_penalty_add_1_modifier - } - health_jewel = { - random_list = { - 50 = { - set_artifact_name = lapidary_jasper - set_artifact_description = lapidary_jasper.desc - } - 50 = { - set_artifact_name = lapidary_garnet - set_artifact_description = lapidary_garnet.desc - } - } - add_artifact_modifier = artifact_negate_health_penalty_add_2_modifier - add_artifact_modifier = artifact_fertility_gain_1_modifier - } - health_pouch = { - add_artifact_modifier = artifact_health_gain_3_modifier - add_artifact_modifier = artifact_epidemic_resistance_3_modifier - } - health_horn = { - add_artifact_modifier = artifact_fertility_gain_3_modifier - add_artifact_modifier = artifact_health_gain_1_modifier - } - } - } - #Mix up the gems a bit - else_if = { - limit = { - rarity = common - has_variable = health_jewel - } - random_list = { - 50 = { - set_artifact_name = lapidary_turquoise - set_artifact_description = lapidary_turquoise.desc - } - 50 = { - set_artifact_name = lapidary_tigerseye - set_artifact_description = lapidary_tigerseye.desc - } - 50 = { - #Keep Tourmaline - } - } - } - } - } -} - -generate_historical_artifact_based_on_location_effect = { - random_list = { - 2 = { #Ark of the covenant - trigger = { - NOT = { - any_artifact = { has_variable = ark_of_the_covenant } - } - $LOCATION$ ?= { - OR = { - geographical_region = world_middle_east - geographical_region = world_africa_north_east - geographical_region = world_africa_east - } - } - } - create_artifact_sculpture_ark_of_covenant_effect = { OWNER = root } - } - 2 = { #Babr E Bayan - trigger = { - NOT = { - any_artifact = { has_variable = babr_e_bayan } - } - $LOCATION$ ?= { - OR = { - geographical_region = world_middle_east_persia - #geographical_region = world_steppe - culture = { has_cultural_pillar = heritage_iranian } - } - } - } - create_artifact_sculpture_babr_e_bayan_effect = { OWNER = root } - } - 10 = { #Crown of Justinian - trigger = { - NOT = { - any_artifact = { has_variable = crown_of_justinian } - } - $LOCATION$ ?= { - OR = { - geographical_region = custom_eastern_roman_empire - culture = { has_cultural_pillar = heritage_byzantine } - } - } - } - create_artifact_pedestal_justinian_effect = { OWNER = root } - } - 10 = { #Cup of Jamshid - trigger = { - NOT = { - any_artifact = { has_variable = cup_jamshid } - } - $LOCATION$ ?= { - OR = { - geographical_region = world_middle_east_persia - culture = { has_cultural_pillar = heritage_iranian } - } - } - } - create_artifact_pedestal_cup_jamshid_effect = { OWNER = root } - } - 10 = { #Harp of David - trigger = { - NOT = { - any_artifact = { has_variable = david_harp } - } - $LOCATION$ ?= { - OR = { - geographical_region = world_middle_east_jerusalem - culture = { has_cultural_pillar = heritage_israelite } - faith.religion = religion:judaism_religion - } - } - } - create_artifact_pedestal_david_harp_effect = { OWNER = root } - } - 10 = { #Iron Crown - Recreate if lost - trigger = { - NOT = { - any_artifact = { has_variable = iron_crown } - } - $LOCATION$ ?= { - OR = { - geographical_region = custom_northern_italy - culture = { has_cultural_pillar = heritage_latin } - } - } - } - create_artifact_pedestal_crown_iron_effect = { OWNER = root } - } - 10 = { #Kaviani Banner - trigger = { - NOT = { - any_artifact = { has_variable = banner_kaviani } - } - $LOCATION$ ?= { - OR = { - geographical_region = world_middle_east_persia - #geographical_region = world_steppe - culture = { has_cultural_pillar = heritage_iranian } - } - } - } - create_artifact_wall_banner_kaviani_effect = { OWNER = root } - } - 10 = { #Edessa Banner - trigger = { - NOT = { - any_artifact = { has_variable = banner_edessa } - } - $LOCATION$ ?= { - OR = { - geographical_region = world_middle_east - geographical_region = world_asia_minor - } - } - } - create_artifact_wall_banner_edessa_effect = { OWNER = root } - } - 10 = { #El Cid's Sword - trigger = { - current_year >= 1097 - NOT = { - any_artifact = { has_variable = sword_cid } - } - $LOCATION$ ?= { - OR = { - geographical_region = world_middle_east - geographical_region = world_asia_minor - } - } - } - create_artifact_wall_cid_sword_effect = { OWNER = root } - } - 10 = { #Muhammad's Sword - trigger = { - any_artifact = { - count < 9 - has_variable = sword_of_muhammad - } - $LOCATION$ ?= { - OR = { - geographical_region = world_middle_east - geographical_region = world_asia_minor - geographical_region = world_africa_north_east - religion = religion:islam_religion - } - } - } - create_artifact_wall_muhammad_sword_effect = { OWNER = root } - } - 10 = { #Attila's Sword - trigger = { - NOT = { - any_artifact = { has_variable = sword_attila } - } - $LOCATION$ ?= { - OR = { - geographical_region = custom_south_slavia - geographical_region = custom_carpathia - geographical_region = ghw_region_crimea - geographical_region = custom_bavaria - } - } - } - create_artifact_wall_sword_attila_effect = { OWNER = root } - } - 10 = { #Throne of Scone - trigger = { - NOT = { - any_artifact = { has_variable = throne_scone } - } - $LOCATION$ ?= { geographical_region = world_europe_west_britannia } - } - create_artifact_throne_scone_effect = { OWNER = root } - } - 10 = { #Throne of Solomon - trigger = { - NOT = { - any_artifact = { has_variable = throne_of_solomon } - } - $LOCATION$ ?= { - OR = { - geographical_region = world_middle_east_jerusalem - culture = { has_cultural_pillar = heritage_israelite } - faith.religion = religion:judaism_religion - } - } - } - create_artifact_throne_solomon_effect = { OWNER = root } - } - 10 = { #Throne of Charlemagne - Recreate if lost - trigger = { - NOT = { - any_artifact = { has_variable = charlamagne_throne } - } - $LOCATION$ ?= { - OR = { - geographical_region = custom_carolingian_francia - geographical_region = custom_carolingian_germany - geographical_region = custom_lotharingia - geographical_region = custom_northern_italy - } - } - } - create_artifact_throne_charlemagne_effect = { OWNER = root } - } - 15 = { #Excalibur - trigger = { - any_artifact = { - count < 6 - has_variable = excalibur - } - $LOCATION$ ?= { - geographical_region = world_europe_west_britannia - } - } - create_artifact_excalibur_effect = { OWNER = root } - } - 10 = { #Head of St Edmund - trigger = { - NOT = { - any_artifact = { - has_variable = edmund_head - } - } - $LOCATION$ ?= { - OR = { - geographical_region = world_europe_west_britannia - geographical_region = world_europe_north - } - } - } - create_artifact_edmund_head_effect = { OWNER = root } - } - 10 = { #Dhammapada - trigger = { - any_artifact = { - count < 10 - has_variable = dhammapada - } - $LOCATION$ ?= { - OR = { - geographical_region = world_india - geographical_region = world_tibet - geographical_region = ghw_region_afghanistan - geographical_region = world_asia_china - geographical_region = world_asia_japan - geographical_region = world_asia_korea - geographical_region = world_asia_southeast - religion = religion:buddhism_religion - } - } - } - create_artifact_dhammapada_effect = { OWNER = root } - } - 10 = { #Sutta Pitaka - trigger = { - any_artifact = { - count < 10 - has_variable = vinaya_pitaka - } - $LOCATION$ ?= { - OR = { - geographical_region = world_india - geographical_region = world_tibet - geographical_region = ghw_region_afghanistan - geographical_region = world_asia_china - geographical_region = world_asia_japan - geographical_region = world_asia_korea - geographical_region = world_asia_southeast - religion = religion:buddhism_religion - } - } - } - create_artifact_sutta_pitaka_effect = { OWNER = root } - } - 10 = { #Vinaya Pitaka - trigger = { - any_artifact = { - count < 10 - has_variable = sutta_pitaka - } - $LOCATION$ ?= { - OR = { - geographical_region = world_india - geographical_region = world_tibet - geographical_region = ghw_region_afghanistan - geographical_region = world_asia_china - geographical_region = world_asia_japan - geographical_region = world_asia_korea - geographical_region = world_asia_southeast - religion = religion:buddhism_religion - } - } - } - create_artifact_vinaya_pitaka_effect = { OWNER = root } - } - 10 = { #Abhidhamma - trigger = { - any_artifact = { - count < 10 - has_variable = abhidhamma - } - $LOCATION$ ?= { - OR = { - geographical_region = world_india - geographical_region = world_tibet - geographical_region = ghw_region_afghanistan - geographical_region = world_asia_china - geographical_region = world_asia_japan - geographical_region = world_asia_korea - geographical_region = world_asia_southeast - religion = religion:buddhism_religion - } - } - } - create_artifact_abhidhamma_pitaka_effect = { OWNER = root } - } - 15 = { #Jewelled Danda - trigger = { - any_artifact = { - count < 10 - has_variable = danda - } - $LOCATION$ ?= { - OR = { - geographical_region = world_india - geographical_region = world_tibet - geographical_region = ghw_region_afghanistan - geographical_region = world_asia_china - geographical_region = world_asia_southeast - } - } - } - create_artifact_jewelled_danda_effect = { OWNER = ROOT } - } - 5 = { #Mountain of Light - trigger = { - any_artifact = { - count < 1 - has_variable = koh_i_noor - } - $LOCATION$ ?= { - OR = { - geographical_region = world_india - geographical_region = world_tibet - geographical_region = ghw_region_afghanistan - } - } - } - create_artifact_pedestal_koh_i_noor_effect = { OWNER = ROOT } - } - 10 = { #Makarakundala - trigger = { - any_artifact = { - count < 10 - has_variable = makarakundala - } - $LOCATION$ ?= { - OR = { - geographical_region = world_india - geographical_region = world_tibet - geographical_region = ghw_region_afghanistan - } - } - } - create_artifact_makarakundala_effect = { OWNER = ROOT } - } - 10 = { #Great Diamond - trigger = { - any_artifact = { - count < 1 - has_variable = great_diamond - } - $LOCATION$ ?= { - OR = { - geographical_region = world_india - geographical_region = world_tibet - geographical_region = ghw_region_afghanistan - } - } - } - create_artifact_pedestal_great_diamond_effect = { OWNER = ROOT } - } - 10 = { #Al Taj - trigger = { - any_artifact = { - count < 1 - has_variable = al_taj - } - $LOCATION$ ?= { - OR = { - geographical_region = world_middle_east - geographical_region = world_africa_north_east - } - } - } - create_artifact_al_taj_crown_effect = { OWNER = ROOT } - } - 10 = { #al-Sayf al-Khass - trigger = { - any_artifact = { - count < 1 - has_variable = al_sayf_al_khass - } - $LOCATION$ ?= { - OR = { - geographical_region = world_middle_east - geographical_region = world_africa_north_east - } - } - } - create_artifact_al_sayf_al_khass_effect = { OWNER = ROOT } - } - 10 = { #Qadib al-Mulk - trigger = { - any_artifact = { - count < 1 - has_variable = qadib_al_mulk - } - $LOCATION$ ?= { - OR = { - geographical_region = world_middle_east - geographical_region = world_africa_north_east - } - } - } - create_artifact_qadib_al_mulk_effect = { OWNER = ROOT } - } - 10 = { #Al Dawat - trigger = { - any_artifact = { - count < 1 - has_variable = al_dawat - } - $LOCATION$ ?= { - OR = { - geographical_region = world_middle_east - geographical_region = world_africa_north_east - } - } - } - create_artifact_al_dawat_effect = { OWNER = ROOT } - } - 10 = { #Al Hafir - trigger = { - any_artifact = { - count < 1 - has_variable = al_hafir - } - $LOCATION$ ?= { - OR = { - geographical_region = world_middle_east - geographical_region = world_africa_north_east - } - } - } - create_artifact_al_hafir_effect = { OWNER = ROOT } - } - 2 = { #Banner of thankfulness - trigger = { - any_artifact = { - count < 2 - has_variable = banner_thankfulness - } - $LOCATION$ ?= { - OR = { - geographical_region = world_middle_east - geographical_region = world_africa_north_east - } - } - } - create_artifact_wall_banner_thankfulness_effect = { OWNER = ROOT } - } - 5 = { #Al Jabal - trigger = { - any_artifact = { - count < 1 - has_variable = al_jabal - } - $LOCATION$ ?= { - OR = { - geographical_region = world_middle_east - geographical_region = world_middle_east_persia - } - } - } - create_artifact_pedestal_al_jabal_effect = { OWNER = ROOT } - } - 5 = { #Al Yatima - trigger = { - any_artifact = { - count < 1 - has_variable = al_yatima - } - $LOCATION$ ?= { - OR = { - geographical_region = world_middle_east - geographical_region = world_africa_north_east - } - } - } - create_artifact_pedestal_al_yatima_effect = { OWNER = ROOT } - } - 10 = { #Dagger of Rostam - trigger = { - any_artifact = { - count < 1 - has_variable = dagger_of_rostam - } - $LOCATION$ ?= { - OR = { - geographical_region = world_asia_minor - geographical_region = world_middle_east - geographical_region = world_middle_east_persia - } - } - } - create_artifact_dagger_of_rostam_effect = { OWNER = ROOT } - } - 10 = { #Ascalon - trigger = { - any_artifact = { - count < 1 - has_variable = ascalon - } - $LOCATION$ ?= { - OR = { - geographical_region = world_asia_minor - geographical_region = world_middle_east - geographical_region = world_middle_east_persia - } - } - } - create_artifact_ascalon_effect = { OWNER = ROOT } - } - 10 = { #Shamshir-e Zomorrodnegar - trigger = { - any_artifact = { - count < 1 - has_variable = zomorrodnegar - } - $LOCATION$ ?= { - OR = { - geographical_region = world_asia_minor - geographical_region = world_middle_east - geographical_region = world_middle_east_persia - } - } - } - create_artifact_zomorrodnegar_effect = { OWNER = ROOT } - } - 15 = { #Muhammads epistles - trigger = { - any_artifact = { - count < 12 - has_variable = muhammads_epistles - } - $LOCATION$ ?= { - OR = { - geographical_region = world_asia_minor - geographical_region = world_middle_east - geographical_region = world_middle_east_persia - } - } - } - create_artifact_muhammads_epistles_effect = { OWNER = ROOT } - } - 10 = { #Kave's Apron - trigger = { - any_artifact = { - count < 1 - has_variable = kaves_apron - } - $LOCATION$ ?= { - OR = { - geographical_region = world_asia_minor - geographical_region = world_middle_east - geographical_region = world_middle_east_persia - } - } - } - create_artifact_kaves_apron_effect = { OWNER = ROOT } - } - 2 = { #Armor of Alexander the Great - trigger = { - any_artifact = { - count < 1 - has_variable = arms_of_alex - } - $LOCATION$ ?= { - OR = { - geographical_region = world_india - geographical_region = world_asia_minor - geographical_region = world_middle_east - geographical_region = world_middle_east_persia - } - } - } - create_artifact_arms_of_alexander_effect = { OWNER = ROOT } - } - 10 = { #Olifant - trigger = { - any_artifact = { - count < 1 - has_variable = olifant - } - $LOCATION$ ?= { - OR = { - geographical_region = world_europe_west - geographical_region = world_europe_south - } - } - } - create_artifact_olifant_effect = { OWNER = ROOT } - } - 10 = { #Angelicas Ring - trigger = { - any_artifact = { - count < 1 - has_variable = angelica_ring - } - $LOCATION$ ?= { - OR = { - geographical_region = world_europe_west - geographical_region = world_europe_south - } - } - } - create_artifact_angelicas_ring_effect = { OWNER = ROOT } - } - 10 = { #Colada - trigger = { - any_artifact = { - count < 1 - has_variable = colada - } - $LOCATION$ ?= { - OR = { - geographical_region = world_europe_west - geographical_region = world_europe_south - } - } - } - create_colada_effect = { OWNER = ROOT } - } - 10 = { #Curtana - trigger = { - any_artifact = { - count < 1 - has_variable = curtana - } - $LOCATION$ ?= { - OR = { - geographical_region = world_europe_west - geographical_region = world_europe_south - } - } - } - create_artifact_curtana_effect = { OWNER = ROOT } - } - 10 = { #Durendal - trigger = { - any_artifact = { - count < 1 - has_variable = durendal - } - $LOCATION$ ?= { - OR = { - geographical_region = world_europe_west - geographical_region = world_europe_south - } - } - } - create_artifact_durendal_effect = { OWNER = ROOT } - } - 10 = { #Joyeuse - trigger = { - any_artifact = { - count < 1 - has_variable = joyeuse - } - $LOCATION$ ?= { - OR = { - geographical_region = world_europe_west - geographical_region = world_europe_south - } - } - } - create_artifact_joyeuse_effect = { OWNER = ROOT } - } - 10 = { #Aram - trigger = { - any_artifact = { - count < 1 - has_variable = aram - } - $LOCATION$ ?= { geographical_region = world_steppe } - } - create_artifact_aram_effect = { OWNER = ROOT } - } - 10 = { #Mmaagha Kamalu - trigger = { - any_artifact = { - count < 1 - has_variable = mmaagha_kamalu - } - $LOCATION$ ?= { geographical_region = world_africa_west } - } - create_artifact_sword_mmaagha_kamalu_effect = { OWNER = ROOT } - } - 15 = { #Ikenga - trigger = { - any_artifact = { - count < 15 - has_variable = ikenga - } - $LOCATION$ ?= { geographical_region = world_africa_west } - } - create_artifact_pedestal_ikenga_effect = { OWNER = ROOT } - } - 15 = { #Ibeji - trigger = { - any_artifact = { - count < 15 - has_variable = ibeji - } - $LOCATION$ ?= { geographical_region = world_africa_west } - } - create_artifact_ibeji_effect = { OWNER = ROOT } - } - 10 = { #Nagelring - trigger = { - any_artifact = { - count < 1 - has_variable = nagelring - } - $LOCATION$ ?= { geographical_region = world_europe_west_germania } - } - create_artifact_nagelring_effect = { OWNER = ROOT } - } - 10 = { #szczerbiec - trigger = { - current_date > 1080.1.1 - any_artifact = { - count < 1 - has_variable = szczerbiec - } - $LOCATION$ ?= { geographical_region = world_europe_east } - } - create_artifact_szczerbiec_effect = { OWNER = ROOT } - } - 10 = { #Kladenets - trigger = { - any_artifact = { - count < 1 - has_variable = kladenets - } - $LOCATION$ ?= { geographical_region = world_europe_east } - } - create_artifact_kladenets_effect = { OWNER = ROOT } - } - 10 = { #Legbiter - trigger = { - current_date > 1120.1.1 - any_artifact = { - count < 1 - has_variable = legbiter - } - $LOCATION$ ?= { geographical_region = world_europe_north } - } - create_artifact_legbiter_effect = { OWNER = ROOT } - } - 10 = { #Quern-Biter - trigger = { - current_date > 920.1.1 - any_artifact = { - count < 1 - has_variable = quernbiter - } - $LOCATION$ ?= { geographical_region = world_europe_north } - } - create_artifact_quernbiter_effect = { OWNER = ROOT } - } - 15 = { #Navaratna - trigger = { - $LOCATION$ ?= { geographical_region = world_india } - any_artifact = { - count < 3 - has_variable = navaratna - } - } - create_artifact_navaratna_effect = { OWNER = ROOT } - } - 10 = { #Dragvandil - trigger = { - current_date > 920.1.1 - any_artifact = { - count < 1 - has_variable = dragvandil - } - $LOCATION$ ?= { geographical_region = world_europe_north } - } - create_artifact_dragvandil_effect = { OWNER = ROOT } - } - 5 = { #Ruyi - trigger = { - any_artifact = { - count < 15 - has_variable = ruyi - } - $LOCATION$ ?= { - OR = { - geographical_region = world_india - geographical_region = world_burma - geographical_region = world_tibet - geographical_region = world_asia_china - geographical_region = world_asia_japan - geographical_region = world_asia_korea - geographical_region = world_asia_southeast - } - } - } - create_artifact_ruyi_effect = { OWNER = ROOT } - } - 5 = { #Turquoise Throne - trigger = { - any_artifact = { - count < 1 - has_variable = turquoise_throne - } - $LOCATION$ ?= { - OR = { - geographical_region = world_india - geographical_region = world_burma - geographical_region = world_middle_east_persia - } - } - } - create_artifact_turquoise_throne_effect = { OWNER = ROOT } - } - 5 = { #Peacock Throne - trigger = { - any_artifact = { - count < 1 - has_variable = peacock_throne - } - $LOCATION$ ?= { - OR = { - geographical_region = world_india - geographical_region = world_burma - geographical_region = world_middle_east_persia - } - } - } - create_artifact_peacock_throne_effect = { OWNER = ROOT } - } - 5 = { #Mantle of the Prophet - trigger = { - any_artifact = { - count < 1 - has_variable = mantle_of_prophet - } - $LOCATION$ ?= { - OR = { - geographical_region = world_middle_east - geographical_region = world_middle_east_persia - } - } - } - create_artifact_mantle_of_the_prophet_effect = { OWNER = ROOT } - } - 5 = { #Spear of the Prophet - trigger = { - any_artifact = { - count < 1 - has_variable = spear_of_the_prophet - } - $LOCATION$ ?= { - OR = { - geographical_region = world_middle_east - geographical_region = world_middle_east_persia - } - } - } - create_artifact_spear_of_the_prophet_effect = { OWNER = ROOT } - } - 10 = { #FP3 Sassanian Sword - trigger = { - any_artifact = { - count < 15 - has_variable = sassanian_sword - } - $LOCATION$ ?= { - OR = { - geographical_region = world_middle_east - geographical_region = world_middle_east_persia - } - } - } - create_artifact_illustrious_sassanian_sword_effect = { OWNER = ROOT } - } - 2 = { #Narwhal Horn - trigger = { - $LOCATION$ ?= { geographical_region = world_europe_north } - } - create_artifact_wall_narwhal_horn_effect = { - OWNER = scope:owner - HUNTER = scope:inspiration_owner - } - } - 1 = { #Fallback Relic - create_artifact_pedestal_branch_relic_general_effect = { - OWNER = root - RELIGION = $LOCATION$.religion - } - } - } -} - -select_random_saint_effect = { - save_scope_as = owner - random_list = { - 1 = { - trigger = { - OR = { - faith = faith:catholic - faith = faith:orthodox - faith = faith:nestorian - } - } - set_variable = { - name = saint - value = flag:brigid - days = 5 - } - } - - 1 = { - trigger = { - OR = { - faith = faith:catholic - faith = faith:orthodox - faith = faith:nestorian - } - } - set_variable = { - name = saint - value = flag:matthew - days = 5 - } - } - - 1 = { - trigger = { - OR = { - faith = faith:catholic - faith = faith:orthodox - faith = faith:nestorian - } - } - set_variable = { - name = saint - value = flag:joseph - days = 5 - } - } - - 1 = { - trigger = { - OR = { - faith = faith:catholic - faith = faith:orthodox - faith = faith:nestorian - } - } - set_variable = { - name = saint - value = flag:catherine - days = 5 - } - } - - 1 = { - trigger = { - OR = { - faith = faith:catholic - faith = faith:orthodox - faith = faith:nestorian - } - } - set_variable = { - name = saint - value = flag:george - days = 5 - } - } - - 1 = { - trigger = { - OR = { - faith = faith:catholic - faith = faith:orthodox - faith = faith:nestorian - } - } - set_variable = { - name = saint - value = flag:nicholas - days = 5 - } - } - - 1 = { - trigger = { - OR = { - faith = faith:coptic - faith = faith:armenian_apostolic - } - } - set_variable = { - name = saint - value = flag:marina - days = 5 - } - } - - 1 = { - trigger = { - OR = { - faith = faith:coptic - faith = faith:armenian_apostolic - } - } - set_variable = { - name = saint - value = flag:matthew - days = 5 - } - } - - 1 = { - trigger = { - OR = { - faith = faith:coptic - faith = faith:armenian_apostolic - } - } - set_variable = { - name = saint - value = flag:joseph - days = 5 - } - } - - 1 = { - trigger = { - OR = { - faith = faith:coptic - faith = faith:armenian_apostolic - } - } - set_variable = { - name = saint - value = flag:mark - days = 5 - } - } - - 1 = { - trigger = { - OR = { - faith = faith:coptic - faith = faith:armenian_apostolic - } - } - set_variable = { - name = saint - value = flag:maurice - days = 5 - } - } - } - #fallback - if = { - limit = { NOT = { exists = var:saint } } - set_variable = { - name = saint - value = flag:fallback - days = 5 - } - } -} - -add_scaled_artifact_modifier_trait_track_hunter_xp_gain_mult_effect = { - if = { - limit = { rarity = common } - random_list = { - 20 = { add_artifact_modifier = artifact_trait_track_hunter_xp_gain_mult_1_modifier } - 5 = { add_artifact_modifier = artifact_trait_track_hunter_xp_gain_mult_2_modifier } - } - } - else_if = { - limit = { rarity = masterwork } - random_list = { - 20 = { add_artifact_modifier = artifact_trait_track_hunter_xp_gain_mult_2_modifier } - 5 = { add_artifact_modifier = artifact_trait_track_hunter_xp_gain_mult_3_modifier } - } - } - else_if = { - limit = { rarity = famed } - random_list = { - 20 = { add_artifact_modifier = artifact_trait_track_hunter_xp_gain_mult_3_modifier } - 5 = { add_artifact_modifier = artifact_trait_track_hunter_xp_gain_mult_4_modifier } - } - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_trait_track_hunter_xp_gain_mult_4_modifier - } -} diff --git a/N3OW/common/scripted_effects/00_ep1_artifact_effects.txt b/N3OW/common/scripted_effects/00_ep1_artifact_effects.txt deleted file mode 100644 index e73c1643..00000000 --- a/N3OW/common/scripted_effects/00_ep1_artifact_effects.txt +++ /dev/null @@ -1,660 +0,0 @@ -steal_artifact_in_siege_effect = { - # Save scopes for localization - $LOCATION$ = { save_scope_as = SAISE_location } - $ATTACKER$ = { save_scope_as = SAISE_attacker } - $DEFENDER$ = { save_scope_as = SAISE_defender } - $ARTIFACT$ = { save_scope_as = this_artifact } - - scope:this_artifact = { - # Suppress generic notifications, as we will send custom ones - set_variable = { - name = suppress_artifact_notifications - value = yes - days = 1 - } - if = { - limit = { - NOT = { has_variable = stolen_artifact } - } - set_variable = { - name = stolen_artifact - value = 1 - } - } - else = { - change_variable = { - name = stolen_artifact - add = 1 - } - } - - # Transfer the artifact to its new owner - if = { - limit = { - has_variable = ai_to_ai_destroy_in_sieges - scope:SAISE_attacker = { - is_ai = yes - } - scope:SAISE_defender = { - is_ai = yes - } - } - destroy_artifact = this - } - else = { - set_owner = { - target = scope:SAISE_attacker - history = { - location = scope:SAISE_location - actor = scope:SAISE_defender - recipient = scope:SAISE_attacker - type = taken_in_siege - } - } - scope:SAISE_defender = { add_personal_artifact_claim = scope:this_artifact } - if = { - limit = { - scope:SAISE_attacker = { - has_ep3_dlc_trigger = yes - is_roman_emperor_trigger = yes - culture = { has_cultural_parameter = holds_triumphs } - } - } - scope:SAISE_attacker = { - set_variable = { - name = byz_valid_for_trophy - value = scope:this_artifact - years = 9 - } - } - } - - # Send notifications to the relevant parties - scope:SAISE_defender = { - send_interface_toast = { - type = msg_artifact_lost - title = artifact_lost_toast - left_icon = scope:this_artifact - right_icon = scope:SAISE_attacker - if = { - limit = { $IS_RAID$ = yes } - custom_tooltip = artifact_lost_in_raid - } - else = { - custom_tooltip = artifact_lost_in_siege - } - } - } - scope:SAISE_attacker = { - send_interface_toast = { - type = msg_artifact_gained - right_icon = scope:this_artifact - } - if = { - limit = { - NOT = { any_claimed_artifact = { this = scope:this_artifact } } - } - scope:this_artifact = { - set_variable = { - name = last_person_to_steal - value = scope:SAISE_attacker - } - } - } - } - } - } -} - -steal_artifact_in_event_effect = { - if = { - limit = { exists = $VICTIM$.capital_province } - set_local_variable = { - name = location - value = $VICTIM$.capital_province - } - } - else_if = { - limit = { exists = $VICTIM$.location } - set_local_variable = { - name = location - value = $VICTIM$.location - } - } - - $ARTIFACT$ = { - save_scope_as = artifact_to_steal - hidden_effect = { - if = { - limit = { - exists = local_var:location - } - set_owner = { - target = $THIEF$ - history = { - type = stolen - actor = $VICTIM$ #stolen from - recipient = $THIEF$ #stealer - location = local_var:location - } - } - } - else = { #If no location exists it is "conquered" - set_owner = { - target = $THIEF$ - history = { - type = conquest - actor = $THIEF$ #stealer - recipient = $VICTIM$ #stolen from - } - } - } - if = { - limit = { - NOT = { has_variable = stolen_artifact } - } - set_variable = { - name = stolen_artifact - value = 1 - } - } - else = { - change_variable = { - name = stolen_artifact - add = 1 - } - } - } - } - $VICTIM$ = { - add_personal_artifact_claim = scope:artifact_to_steal - } -} - -damage_artifact_in_battle_effect = { - # Save scopes for localization - $OWNER$ = { - save_scope_as = DAIBE_owner - } - $OPPONENT$ = { save_scope_as = DAIBE_opponent } - $LOCATION$ = { save_scope_as = DAIBE_location } - $ARTIFACT$ = { - save_scope_as = DAIBE_artifact - - # Suppress generic notifications, as we will send custom ones - set_variable = { - name = suppress_artifact_notifications - value = yes - days = 1 - } - - set_variable = { - name = DAIBE_damage - value = $DURABILITY_LOSS$ - days = 1 - } - - # Damage the artifact by the specified amount - add_durability = { - value = 0 - subtract = var:DAIBE_damage - } - } - - # Transformed into an if / else as I found the following note somewhere else: - # NOTE: We must not run ANY script after we destroy an artifact, or we will cause errors - if = { - # If the artifact has no durability left, destroy it now. - limit = { scope:DAIBE_artifact.artifact_durability <= 0 } - destroy_artifact = scope:DAIBE_artifact - } - # Send notifications to the relevant party IF the artifact was not destroyed - else = { - $OWNER$ = { - # Send the toast - send_interface_toast = { - title = artifact_damaged_toast - left_icon = scope:DAIBE_artifact - right_icon = scope:DAIBE_opponent - if = { - limit = { - $IS_DUEL$ = yes - } - custom_tooltip = artifact_damaged_in_duel - } - else = { - custom_tooltip = artifact_damaged_in_siege - } - } - } - } -} - -flag_as_trash_artifact = { - set_variable = { - name = ai_to_ai_destroy_in_sieges - value = yes - } -} - -flag_as_unwanted_artifact = { - set_variable = { - name = unwanted_artifact - value = yes - } -} - -flag_as_cursed_artifact = { - set_variable = { - name = cursed_artifact - value = yes - } -} - -#For use with trinket looks / call this effect (set_up_trinket_adjective_effect = yes) in the line before creating the trinket -#Use this in the trinket's name/description in the loc-file [ROOT.Char.Custom('TrinketLookAdjective')] /and/ [ROOT.Char.Custom('TrinketLookAdverbFollowup')] -#Remember to clear the var:trinket_adjective_followup in your after = { ... } -set_up_trinket_adjective_effect = { - random_list = { - 50 = { - set_variable = { - name = trinket_adjective_followup - value = flag:adorned - } - } - 50 = { - set_variable = { - name = trinket_adjective_followup - value = flag:decorated - } - } - 50 = { - set_variable = { - name = trinket_adjective_followup - value = flag:embellished - } - } - 50 = { - set_variable = { - name = trinket_adjective_followup - value = flag:ornamented - } - } - - } -} - -# Grant claims on familial banners -grant_banner_house_claim_effect = { - save_scope_as = familial_banner - hidden_effect = { - if = { # Dynasty banner not owned or claimed by all child house's already - limit = { - exists = var:banner_dynasty - var:banner_dynasty = { - any_dynasty_member = { - this = house.house_head - house = { artifact_house_not_owns_or_claims_trigger = yes } # House not owns or claims already - } - } - } - var:banner_dynasty = { - every_dynasty_member = { - limit = { - this = house.house_head - house = { artifact_house_not_owns_or_claims_trigger = yes } # House not owns or claims already - } - house = { add_house_artifact_claim = scope:familial_banner } - } - } - } - else_if = { # House banner not owned or claimed by creating house already - limit = { - exists = var:banner_house - var:banner_house = { artifact_house_not_owns_or_claims_trigger = yes } # House not owns or claims already - } - var:banner_house = { add_house_artifact_claim = scope:familial_banner } - } - } -} - -#Determine what type of artifact a court artifact is, for defacement -determine_artifact_damage_type_effect = { - $ARTIFACT$ = { save_scope_as = artifact_to_determine } - scope:artifact_to_determine = { - random_list = { - 10 = { - trigger = { - OR = { - artifact_type = chest - artifact_type = box - artifact_type = cabinet - artifact_type = pedestal - artifact_type = tapestry - artifact_type = animal_hide - artifact_type = animal_hide_big - artifact_type = wall_big - artifact_type = wall_shield - artifact_type = throne - artifact_type = throne_special - artifact_type = book - } - } - set_variable = artifact_burned - } - 10 = { - trigger = { - OR = { - artifact_type = sculpture - artifact_type = box - artifact_type = goblet - artifact_type = pedestal - artifact_type = book - artifact_type = elixir - artifact_type = panacea - artifact_type = philosophers_stone - } - } - set_variable = artifact_knocked_over - } - 10 = { - trigger = { - OR = { - artifact_type = sculpture - artifact_type = chest - artifact_type = box - artifact_type = cabinet - artifact_type = goblet - artifact_type = pedestal - artifact_type = tapestry #cloth - artifact_type = animal_skull - artifact_type = animal_hide - artifact_type = animal_hide_big - artifact_type = wall_big #shields, banners - artifact_type = wall_small #animal trophy - artifact_type = wall_shield - artifact_type = wall_shield_special #kite shields - artifact_type = throne - artifact_type = throne_special - artifact_type = book - artifact_type = elixir - artifact_type = panacea - artifact_type = philosophers_stone #box - } - } - set_variable = artifact_smeared_food - } - 10 = { - trigger = { - OR = { - artifact_type = chest - artifact_type = box - artifact_type = cabinet - artifact_type = pedestal - artifact_type = tapestry - artifact_type = animal_hide - artifact_type = animal_hide_big - artifact_type = wall_big - artifact_type = wall_small - artifact_type = throne - artifact_type = throne_special - artifact_type = book - } - } - set_variable = artifact_spilled_drink - } - 10 = { - trigger = { - OR = { - artifact_type = tapestry - artifact_type = animal_hide - artifact_type = animal_hide_big - artifact_type = book - } - } - set_variable = artifact_tear - } - 10 = { - trigger = { - OR = { - artifact_type = tapestry - artifact_type = animal_skull - artifact_type = animal_hide - artifact_type = animal_hide_big - artifact_type = wall_big - artifact_type = wall_small - artifact_type = wall_shield - artifact_type = wall_shield_special - } - } - set_variable = artifact_tear_down - } - 10 = { - trigger = { - OR = { - artifact_type = chest - artifact_type = box - artifact_type = pedestal - artifact_type = tapestry - artifact_type = animal_hide - artifact_type = animal_hide_big - artifact_type = wall_big - artifact_type = wall_small - artifact_type = wall_shield - artifact_type = wall_shield_special - artifact_type = throne - artifact_type = throne_special - artifact_type = book - } - } - set_variable = artifact_threw_up - } - 10 = { - trigger = { - OR = { - artifact_type = sculpture - artifact_type = chest - artifact_type = box - artifact_type = cabinet - artifact_type = goblet - artifact_type = pedestal - artifact_type = tapestry #cloth - artifact_type = animal_skull - artifact_type = animal_hide - artifact_type = animal_hide_big - artifact_type = wall_big #shields, banners - artifact_type = wall_small #animal trophy - artifact_type = wall_shield - artifact_type = wall_shield_special #kite shields - artifact_type = throne - artifact_type = throne_special - artifact_type = book - artifact_type = elixir - artifact_type = panacea - artifact_type = philosophers_stone #box - } - } - set_variable = artifact_unspeakable - } - 10 = { - trigger = { - NOR = { - artifact_type = sculpture - artifact_type = chest - artifact_type = box - artifact_type = cabinet - artifact_type = goblet - artifact_type = pedestal - artifact_type = tapestry #cloth - artifact_type = animal_skull - artifact_type = animal_hide - artifact_type = animal_hide_big - artifact_type = wall_big #shields, banners - artifact_type = wall_small #animal trophy - artifact_type = wall_shield - artifact_type = wall_shield_special #kite shields - artifact_type = throne - artifact_type = throne_special - artifact_type = book - artifact_type = elixir - artifact_type = panacea - artifact_type = philosophers_stone #box - } - } - set_variable = artifact_damage_fallback - } - } - } -} - -# Destroy Artifact effect -# DESTROYER = Character destroying the artifact -# ARTIFACT = The artifact to destroy -destroy_artifact_aniconist_effect = { - $ARTIFACT$ = { - save_temporary_scope_as = artifact - } - - $DESTROYER$ = { - if = { - limit = { - OR = { - $DESTROYER$.faith = { has_doctrine_parameter = destroying_artifacts_is_pious } - $PIETY_BY_DEFAULT$ = yes - } - } - give_destroyed_artifact_piety = yes - } - if = { - limit = { - $GIVE_GOLD$ = yes - } - add_gold = { - if = { - limit = { - scope:artifact = { rarity = illustrious } - } - add = { - value = 25 - } - } - else_if = { - limit = { - scope:artifact = { rarity = famed } - } - add = { - value = 15 - } - } - else_if = { - limit = { - scope:artifact = { rarity = masterwork } - } - add = { - value = 8 - } - } - else = { - add = { - value = 4 - } - } - - # Boost the value up to something meaningful - multiply = { - value = 10 - } - - # multiply by durability percentage - multiply = { - add = scope:artifact.artifact_durability - divide = scope:artifact.artifact_max_durability - divide = 2 - add = 0.5 - } - - #Nerf it to bits for LAAMPs - if = { - limit = { - $DESTROYER$ = { has_government = landless_adventurer_government } - } - multiply = { - value = 0.1 - round = yes - } - } - if = { - limit = { - exists = scope:artifact.var:ai_to_ai_destroy_in_sieges # Trash artifact - } - max = { - value = $DESTROYER$.tiny_gold_value - multiply = 0.5 - } - } - - min = 1 - } - } - destroy_owned_artifact = scope:artifact - } -} - -give_destroyed_artifact_piety = { - add_piety = { - # Base value - value = 5 - # Add the artifact's quality - if = { - limit = { exists = scope:artifact.var:quality } - add = scope:artifact.var:quality - } - # If none can be found, add its wealth - else_if = { - limit = { exists = scope:artifact.var:wealth } - add = scope:artifact.var:wealth - } - # Artifact has no quality or wealth (typical for court artifacts), add something based on rarity - else_if = { - limit = { - scope:artifact = { rarity = illustrious } - } - add = { - value = 20 - } - } - else_if = { - limit = { - scope:artifact = { rarity = famed } - } - add = { - value = 12 - } - } - else_if = { - limit = { - scope:artifact = { rarity = masterwork } - } - add = { - value = 8 - } - } - else = { - add = { - value = 4 - } - } - # Boost the value up to something meaningful - multiply = 20 - # Relics are way cooler to burn, double the final value - if = { - limit = { - scope:artifact = { exists = var:relic } - } - multiply = { - value = 2 - desc = aniconist_destroying_relic - } - } - } -} diff --git a/N3OW/common/scripted_effects/00_ep1_court_type_effects.txt b/N3OW/common/scripted_effects/00_ep1_court_type_effects.txt deleted file mode 100644 index f72df84d..00000000 --- a/N3OW/common/scripted_effects/00_ep1_court_type_effects.txt +++ /dev/null @@ -1,254 +0,0 @@ - -# EFFECTS RELATONG TO THE DIFFERENT COURT TYPES - -#court_trait_handle_multiple_scopes_effect -#court_trait_save_scopes_and_send_interface_message_effect -#assign_court_type_traits_to_courtiers_effect - - -# Effect to save down the multiple scopes needed to send interface messages about courtiers gaining/leveling court type traits -court_trait_handle_multiple_scopes_effect = { - #Save down two scopes for the gathered message - random_courtier = { - limit = { - ep1_courtier_valid_for_court_trait_$TRAIT_LEVEL$_trigger = { TYPE = $COURT_TYPE$ } - is_of_major_interest_to_root_trigger = yes - } - alternative_limit = { - ep1_courtier_valid_for_court_trait_$TRAIT_LEVEL$_trigger = { TYPE = $COURT_TYPE$ } - is_of_minor_interest_to_root_trigger = yes - } - alternative_limit = { - ep1_courtier_valid_for_court_trait_$TRAIT_LEVEL$_trigger = { TYPE = $COURT_TYPE$ } - } - save_scope_as = courtier_1 - } - random_courtier = { - limit = { - ep1_courtier_valid_for_court_trait_$TRAIT_LEVEL$_trigger = { TYPE = $COURT_TYPE$ } - is_of_major_interest_to_root_trigger = yes - this != scope:courtier_1 - } - alternative_limit = { - ep1_courtier_valid_for_court_trait_$TRAIT_LEVEL$_trigger = { TYPE = $COURT_TYPE$ } - is_of_minor_interest_to_root_trigger = yes - this != scope:courtier_1 - } - alternative_limit = { - ep1_courtier_valid_for_court_trait_$TRAIT_LEVEL$_trigger = { TYPE = $COURT_TYPE$ } - this != scope:courtier_1 - } - save_scope_as = courtier_2 - } - set_variable = { - name = num_other_relevant_courtiers - value = 1 - } - every_courtier = { - limit = { - ep1_courtier_valid_for_court_trait_$TRAIT_LEVEL$_trigger = { TYPE = $COURT_TYPE$ } - } - change_trait_rank = { - trait = $COURT_TYPE$_court - rank = 1 - } - root = { - change_variable = { - name = num_other_relevant_courtiers - add = 1 - } - } - } -} - -# Effect to send interface messages about courtiers gaining/leveling court specific traits -court_trait_save_scopes_and_send_interface_message_effect = { - # Second trait level at CG level 8 - if = { - limit = { - any_courtier = { - ep1_courtier_valid_for_court_trait_2_trigger = { TYPE = $COURT_TYPE$ } - } - } - # If it's more than two we send a gathered message - if = { - limit = { - any_courtier = { - ep1_courtier_valid_for_court_trait_2_trigger = { TYPE = $COURT_TYPE$ } - count > 2 - } - } - court_trait_handle_multiple_scopes_effect = { - COURT_TYPE = $COURT_TYPE$ - TRAIT_LEVEL = 2 - } - send_interface_message = { - type = msg_courtiers_gain_court_traits - title = multiple_courtiers_gained_court_type_trait_title - left_icon = scope:courtier_1 - right_icon = scope:courtier_2 - custom_tooltip = multiple_courtiers_gained_$COURT_TYPE$_2_trait_desc - } - remove_variable = num_other_relevant_courtiers - } - # Else we send one message per courtier - else = { - every_courtier = { - limit = { - ep1_courtier_valid_for_court_trait_2_trigger = { TYPE = $COURT_TYPE$ } - } - save_scope_as = courtier - root = { - send_interface_message = { - type = msg_courtiers_gain_court_traits - title = courtier_gained_court_type_trait_title - right_icon = scope:courtier - scope:courtier = { - change_trait_rank = { - trait = $COURT_TYPE$_court - rank = 1 - } - } - } - } - } - } - } - # First trait level at CG level 5 - if = { - limit = { - any_courtier = { - ep1_courtier_valid_for_court_trait_1_trigger = { TYPE = $COURT_TYPE$ } - } - } - # If it's more than two we send a gathered message - if = { - limit = { - any_courtier = { - ep1_courtier_valid_for_court_trait_1_trigger = { TYPE = $COURT_TYPE$ } - count > 2 - } - } - court_trait_handle_multiple_scopes_effect = { - COURT_TYPE = $COURT_TYPE$ - TRAIT_LEVEL = 1 - } - send_interface_message = { - type = msg_courtiers_gain_court_traits - title = multiple_courtiers_gained_court_type_trait_title - left_icon = scope:courtier_1 - right_icon = scope:courtier_2 - custom_tooltip = multiple_courtiers_gained_$COURT_TYPE$_1_trait_desc - } - } - # Else we send one message per courtier - else = { - every_courtier = { - limit = { - ep1_courtier_valid_for_court_trait_1_trigger = { TYPE = $COURT_TYPE$ } - } - save_scope_as = courtier - root = { - send_interface_message = { - type = msg_courtiers_gain_court_traits - title = courtier_gained_court_type_trait_title - right_icon = scope:courtier - scope:courtier = { - change_trait_rank = { - trait = $COURT_TYPE$_court - rank = 1 - } - } - #custom_tooltip = courtier_gained_$COURT_TYPE$_1_trait_desc - } - } - } - } - } -} - -# Main effect for handling courtiers gaining/leveling court type traits -assign_court_type_traits_to_courtiers_effect = { - save_scope_value_as = { - name = cgv_value - value = root.court_grandeur_current_level - } - # Diplomatic Court - if = { - limit = { - has_court_type = court_diplomatic - any_courtier = { - days_since_joined_court >= days_to_gain_court_type_trait - OR = { #Either they have no trait, or they have one we can level - ep1_courtier_valid_for_court_trait_1_trigger = { TYPE = diplomatic } - ep1_courtier_valid_for_court_trait_2_trigger = { TYPE = diplomatic } - } - } - } - court_trait_save_scopes_and_send_interface_message_effect = { COURT_TYPE = diplomatic } - } - # Warlike Court - if = { - limit = { - OR = { - has_court_type = court_warlike - has_court_type = court_tribal - has_court_type = court_nomadic - } - any_courtier = { - days_since_joined_court >= days_to_gain_court_type_trait - OR = { #Either they have no trait, or they have one we can level - ep1_courtier_valid_for_court_trait_1_trigger = { TYPE = warlike } - ep1_courtier_valid_for_court_trait_2_trigger = { TYPE = warlike } - } - } - } - court_trait_save_scopes_and_send_interface_message_effect = { COURT_TYPE = warlike } - } - - # Administrative Court - if = { - limit = { - has_court_type = court_administrative - any_courtier = { - days_since_joined_court >= days_to_gain_court_type_trait - OR = { #Either they have no trait, or they have one we can level - ep1_courtier_valid_for_court_trait_1_trigger = { TYPE = administrative } - ep1_courtier_valid_for_court_trait_2_trigger = { TYPE = administrative } - } - } - } - court_trait_save_scopes_and_send_interface_message_effect = { COURT_TYPE = administrative } - } - - # Intrigue Court - if = { - limit = { - has_court_type = court_intrigue - any_courtier = { - days_since_joined_court >= days_to_gain_court_type_trait - OR = { #Either they have no trait, or they have one we can level - ep1_courtier_valid_for_court_trait_1_trigger = { TYPE = intrigue } - ep1_courtier_valid_for_court_trait_2_trigger = { TYPE = intrigue } - } - } - } - court_trait_save_scopes_and_send_interface_message_effect = { COURT_TYPE = intrigue } - } - - # Scholarly Court - if = { - limit = { - has_court_type = court_scholarly - any_courtier = { - days_since_joined_court >= days_to_gain_court_type_trait - OR = { #Either they have no trait, or they have one we can level - ep1_courtier_valid_for_court_trait_1_trigger = { TYPE = scholarly } - ep1_courtier_valid_for_court_trait_2_trigger = { TYPE = scholarly } - } - } - } - court_trait_save_scopes_and_send_interface_message_effect = { COURT_TYPE = scholarly } - } -} - diff --git a/N3OW/common/scripted_effects/00_ep1_hold_court_effects.txt b/N3OW/common/scripted_effects/00_ep1_hold_court_effects.txt deleted file mode 100644 index 1e2ae945..00000000 --- a/N3OW/common/scripted_effects/00_ep1_hold_court_effects.txt +++ /dev/null @@ -1,1671 +0,0 @@ - -# EFFECTS RELATING TO HOLD COURT - -clear_court_event_participation = { - if ={ - limit = { - is_alive = yes - has_character_flag = in_court_event - } - remove_character_flag = in_court_event - } -} - -apply_hold_court_grace_effect = { - if = { - limit = { - has_dlc_feature = royal_court - has_royal_court = yes - - #Character fulfills the pre-reqs - is_playable_character = yes - highest_held_title_tier >= tier_kingdom - OR = { - government_has_flag = government_is_feudal - government_has_flag = government_is_clan - } - is_available_adult = yes - court_grandeur_current_level >= 1 - } - if = { - limit = { has_variable = last_hold_court_date } - remove_variable = last_hold_court_date - } - set_variable = { - name = last_hold_court_date - value = current_year - } - } -} - -# hire scope as position -employ_character_as_position_in_current_scope_court_effect = { - save_scope_as = current_scope - if = { - limit = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = $POSITION$_court_position - } - } - #If character isn't already in your court, but a wandering guest, you recruit them - if = { - limit = { - $CHARACTER$ = { is_pool_guest = yes } - } - add_courtier = $CHARACTER$ - } - court_position_grant_effect = { - EMPLOYER = scope:current_scope - POS = $POSITION$ - CANDIDATE = $CHARACTER$ - } - } -} - -# hire scope as position but for laamps -employ_character_as_position_in_current_scope_camp_effect = { - save_scope_as = current_scope - if = { - limit = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = $POSITION$_camp_officer - } - } - #If character isn't already in your court, but a wandering guest, you recruit them - if = { - limit = { - $CHARACTER$ = { is_pool_guest = yes } - } - add_courtier = $CHARACTER$ - } - camp_officer_grant_effect = { - EMPLOYER = scope:current_scope - POS = $POSITION$ - CANDIDATE = $CHARACTER$ - } - } -} - -# Hire scope in any available position. You must have checked that one exists first!, for example by using can_be_employed_in_any_court_position_trigger! -employ_character_as_any_free_position_effect = { - save_scope_as = hiring_character - hidden_effect = { - random_list = { - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = court_physician_court_position - } - } - court_position_grant_effect = { - EMPLOYER = scope:hiring_character - POS = court_physician - CANDIDATE = $CHARACTER$ - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = master_of_horse_court_position - } - } - court_position_grant_effect = { - EMPLOYER = scope:hiring_character - POS = master_of_horse - CANDIDATE = $CHARACTER$ - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = master_of_hunt_court_position - } - } - court_position_grant_effect = { - EMPLOYER = scope:hiring_character - POS = master_of_hunt - CANDIDATE = $CHARACTER$ - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = keeper_of_swans_court_position - } - } - court_position_grant_effect = { - EMPLOYER = scope:hiring_character - POS = keeper_of_swans - CANDIDATE = $CHARACTER$ - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = travel_leader_court_position - } - } - court_position_grant_effect = { - EMPLOYER = scope:hiring_character - POS = travel_leader - CANDIDATE = $CHARACTER$ - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = court_jester_court_position - } - } - court_position_grant_effect = { - EMPLOYER = scope:hiring_character - POS = court_jester - CANDIDATE = $CHARACTER$ - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = high_almoner_court_position - } - } - court_position_grant_effect = { - EMPLOYER = scope:hiring_character - POS = high_almoner - CANDIDATE = $CHARACTER$ - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = seneschal_court_position - } - } - court_position_grant_effect = { - EMPLOYER = scope:hiring_character - POS = seneschal - CANDIDATE = $CHARACTER$ - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = court_tutor_court_position - } - } - court_position_grant_effect = { - EMPLOYER = scope:hiring_character - POS = court_tutor - CANDIDATE = $CHARACTER$ - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = court_guru_court_position - } - } - court_position_grant_effect = { - EMPLOYER = scope:hiring_character - POS = court_guru - CANDIDATE = $CHARACTER$ - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = cupbearer_court_position - } - } - court_position_grant_effect = { - EMPLOYER = scope:hiring_character - POS = cupbearer - CANDIDATE = $CHARACTER$ - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = chief_eunuch_court_position - } - } - court_position_grant_effect = { - EMPLOYER = scope:hiring_character - POS = chief_eunuch - CANDIDATE = $CHARACTER$ - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = antiquarian_court_position - } - } - court_position_grant_effect = { - EMPLOYER = scope:hiring_character - POS = antiquarian - CANDIDATE = $CHARACTER$ - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = royal_architect_court_position - } - } - court_position_grant_effect = { - EMPLOYER = scope:hiring_character - POS = royal_architect - CANDIDATE = $CHARACTER$ - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = lady_in_waiting_court_position - } - } - court_position_grant_effect = { - EMPLOYER = scope:hiring_character - POS = lady_in_waiting - CANDIDATE = $CHARACTER$ - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = court_poet_court_position - } - } - court_position_grant_effect = { - EMPLOYER = scope:hiring_character - POS = court_poet - CANDIDATE = $CHARACTER$ - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = court_musician_court_position - } - } - court_position_grant_effect = { - EMPLOYER = scope:hiring_character - POS = court_musician - CANDIDATE = $CHARACTER$ - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = bodyguard_court_position - } - } - court_position_grant_effect = { - EMPLOYER = scope:hiring_character - POS = bodyguard - CANDIDATE = $CHARACTER$ - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = champion_court_position - } - } - court_position_grant_effect = { - EMPLOYER = scope:hiring_character - POS = champion - CANDIDATE = $CHARACTER$ - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = food_taster_court_position - } - } - court_position_grant_effect = { - EMPLOYER = scope:hiring_character - POS = food_taster - CANDIDATE = $CHARACTER$ - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = executioner_court_position - } - } - court_position_grant_effect = { - EMPLOYER = scope:hiring_character - POS = executioner - CANDIDATE = $CHARACTER$ - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = garuda_court_position - } - } - court_position_grant_effect = { - EMPLOYER = scope:hiring_character - POS = garuda - CANDIDATE = $CHARACTER$ - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = akolouthos_court_position - } - } - court_position_grant_effect = { - EMPLOYER = scope:hiring_character - POS = akolouthos - CANDIDATE = $CHARACTER$ - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = court_astrologer_court_position - } - } - court_position_grant_effect = { - EMPLOYER = scope:hiring_character - POS = court_astrologer - CANDIDATE = $CHARACTER$ - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = grand_preceptor_court_position - } - } - court_position_grant_effect = { - EMPLOYER = scope:hiring_character - POS = grand_preceptor - CANDIDATE = $CHARACTER$ - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = grand_guardian_court_position - } - } - court_position_grant_effect = { - EMPLOYER = scope:hiring_character - POS = grand_guardian - CANDIDATE = $CHARACTER$ - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = fire_dragon_engineer_court_position - } - } - court_position_grant_effect = { - EMPLOYER = scope:hiring_character - POS = fire_dragon_engineer - CANDIDATE = $CHARACTER$ - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = grand_mentor_court_position - } - } - court_position_grant_effect = { - EMPLOYER = scope:hiring_character - POS = grand_mentor - CANDIDATE = $CHARACTER$ - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = keeper_of_the_harem_court_position - } - } - court_position_grant_effect = { - EMPLOYER = scope:hiring_character - POS = keeper_of_the_harem - CANDIDATE = $CHARACTER$ - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = boyan_court_position - } - } - court_position_grant_effect = { - EMPLOYER = scope:hiring_character - POS = boyan - CANDIDATE = $CHARACTER$ - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = siege_engineer_court_position - } - } - court_position_grant_effect = { - EMPLOYER = scope:hiring_character - POS = siege_engineer - CANDIDATE = $CHARACTER$ - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = yurtchi_court_position - } - } - court_position_grant_effect = { - EMPLOYER = scope:hiring_character - POS = yurtchi - CANDIDATE = $CHARACTER$ - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = cherbi_court_position - } - } - court_position_grant_effect = { - EMPLOYER = scope:hiring_character - POS = cherbi - CANDIDATE = $CHARACTER$ - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = yeke_jarquchi_court_position - } - } - court_position_grant_effect = { - EMPLOYER = scope:hiring_character - POS = yeke_jarquchi - CANDIDATE = $CHARACTER$ - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = foreign_emissary_court_position - } - } - court_position_grant_effect = { - EMPLOYER = scope:hiring_character - POS = foreign_emissary - CANDIDATE = $CHARACTER$ - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = keeper_of_the_horses_court_position - } - } - court_position_grant_effect = { - EMPLOYER = scope:hiring_character - POS = keeper_of_the_horses - CANDIDATE = $CHARACTER$ - } - } - } - } -} - -# Mark a random court position to hire a person in. Use this in the immediate and then employ_character_as_marked_court_position_effect in the option to give proper tooltips about what position you're filling. -mark_court_position_for_employment_effect = { - hidden_effect = { - random_list = { - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = court_physician_court_position - } - } - save_scope_value_as = { - name = court_position_to_fill - value = flag:court_physician_court_position - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = master_of_horse_court_position - } - } - save_scope_value_as = { - name = court_position_to_fill - value = flag:master_of_horse_court_position - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = master_of_hunt_court_position - } - } - save_scope_value_as = { - name = court_position_to_fill - value = flag:master_of_hunt_court_position - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = keeper_of_swans_court_position - } - } - save_scope_value_as = { - name = court_position_to_fill - value = flag:keeper_of_swans_court_position - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = travel_leader_court_position - } - } - save_scope_value_as = { - name = court_position_to_fill - value = flag:travel_leader_court_position - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = court_jester_court_position - } - } - save_scope_value_as = { - name = court_position_to_fill - value = flag:court_jester_court_position - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = high_almoner_court_position - } - } - save_scope_value_as = { - name = court_position_to_fill - value = flag:high_almoner_court_position - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = seneschal_court_position - } - } - save_scope_value_as = { - name = court_position_to_fill - value = flag:seneschal_court_position - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = court_tutor_court_position - } - } - save_scope_value_as = { - name = court_position_to_fill - value = flag:court_tutor_court_position - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = court_guru_court_position - } - } - save_scope_value_as = { - name = court_position_to_fill - value = flag:court_guru_court_position - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = cupbearer_court_position - } - } - save_scope_value_as = { - name = court_position_to_fill - value = flag:cupbearer_court_position - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = chief_eunuch_court_position - } - } - save_scope_value_as = { - name = court_position_to_fill - value = flag:chief_eunuch_court_position - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = antiquarian_court_position - } - } - save_scope_value_as = { - name = court_position_to_fill - value = flag:antiquarian_court_position - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = royal_architect_court_position - } - } - save_scope_value_as = { - name = court_position_to_fill - value = flag:royal_architect_court_position - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = lady_in_waiting_court_position - } - } - save_scope_value_as = { - name = court_position_to_fill - value = flag:lady_in_waiting_court_position - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = court_poet_court_position - } - } - save_scope_value_as = { - name = court_position_to_fill - value = flag:court_poet_court_position - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = court_musician_court_position - } - } - save_scope_value_as = { - name = court_position_to_fill - value = flag:court_musician_court_position - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = bodyguard_court_position - } - } - save_scope_value_as = { - name = court_position_to_fill - value = flag:bodyguard_court_position - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = champion_court_position - } - } - save_scope_value_as = { - name = court_position_to_fill - value = flag:champion_court_position - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = food_taster_court_position - } - } - save_scope_value_as = { - name = court_position_to_fill - value = flag:food_taster_court_position - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = executioner_court_position - } - } - save_scope_value_as = { - name = court_position_to_fill - value = flag:executioner_court_position - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = garuda_court_position - } - } - save_scope_value_as = { - name = court_position_to_fill - value = flag:garuda_court_position - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = akolouthos_court_position - } - } - save_scope_value_as = { - name = court_position_to_fill - value = flag:akolouthos_court_position - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = court_astrologer_court_position - } - } - save_scope_value_as = { - name = court_position_to_fill - value = flag:court_astrologer_court_position - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = grand_preceptor_court_position - } - } - save_scope_value_as = { - name = court_position_to_fill - value = flag:grand_preceptor_court_position - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = grand_guardian_court_position - } - } - save_scope_value_as = { - name = court_position_to_fill - value = flag:grand_guardian_court_position - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = grand_mentor_court_position - } - } - save_scope_value_as = { - name = court_position_to_fill - value = flag:grand_mentor_court_position - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = fire_dragon_engineer_court_position - } - } - save_scope_value_as = { - name = court_position_to_fill - value = flag:fire_dragon_engineer_court_position - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = keeper_of_the_harem_court_position - } - } - save_scope_value_as = { - name = court_position_to_fill - value = flag:keeper_of_the_harem_court_position - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = boyan_court_position - } - } - save_scope_value_as = { - name = court_position_to_fill - value = flag:boyan_court_position - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = siege_engineer_court_position - } - } - save_scope_value_as = { - name = court_position_to_fill - value = flag:siege_engineer_court_position - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = yurtchi_court_position - } - } - save_scope_value_as = { - name = court_position_to_fill - value = flag:yurtchi_court_position - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = cherbi_court_position - } - } - save_scope_value_as = { - name = court_position_to_fill - value = flag:cherbi_court_position - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = yeke_jarquchi_court_position - } - } - save_scope_value_as = { - name = court_position_to_fill - value = flag:yeke_jarquchi_court_position - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = foreign_emissary_court_position - } - } - save_scope_value_as = { - name = court_position_to_fill - value = flag:foreign_emissary_court_position - } - } - 10 = { - trigger = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = keeper_of_the_horses_court_position - } - } - save_scope_value_as = { - name = court_position_to_fill - value = flag:keeper_of_the_horses_court_position - } - } - } - } -} - -# To be used after mark_court_position_for_employment_effect to fill the position marked in that effect. -employ_character_as_marked_court_position_effect = { - if = { - limit = { - $POSITION$ = flag:court_physician_court_position - #Making sure they still can be employed in the position - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = court_physician_court_position - } - } - appoint_court_position = { - recipient = $CHARACTER$ - court_position = court_physician_court_position - } - } - else_if = { - limit = { - $POSITION$ = flag:master_of_horse_court_position - #Making sure they still can be employed in the position - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = master_of_horse_court_position - } - } - appoint_court_position = { - recipient = $CHARACTER$ - court_position = master_of_horse_court_position - } - } - else_if = { - limit = { - $POSITION$ = flag:master_of_hunt_court_position - #Making sure they still can be employed in the position - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = master_of_hunt_court_position - } - } - appoint_court_position = { - recipient = $CHARACTER$ - court_position = master_of_hunt_court_position - } - } - else_if = { - limit = { - $POSITION$ = flag:keeper_of_swans_court_position - #Making sure they still can be employed in the position - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = keeper_of_swans_court_position - } - } - appoint_court_position = { - recipient = $CHARACTER$ - court_position = keeper_of_swans_court_position - } - } - else_if = { - limit = { - $POSITION$ = flag:travel_leader_court_position - #Making sure they still can be employed in the position - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = travel_leader_court_position - } - } - appoint_court_position = { - recipient = $CHARACTER$ - court_position = travel_leader_court_position - } - } - else_if = { - limit = { - $POSITION$ = flag:court_jester_court_position - #Making sure they still can be employed in the position - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = court_jester_court_position - } - } - appoint_court_position = { - recipient = $CHARACTER$ - court_position = court_jester_court_position - } - } - else_if = { - limit = { - $POSITION$ = flag:high_almoner_court_position - #Making sure they still can be employed in the position - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = high_almoner_court_position - } - } - appoint_court_position = { - recipient = $CHARACTER$ - court_position = high_almoner_court_position - } - } - else_if = { - limit = { - $POSITION$ = flag:seneschal_court_position - #Making sure they still can be employed in the position - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = seneschal_court_position - } - } - appoint_court_position = { - recipient = $CHARACTER$ - court_position = seneschal_court_position - } - } - else_if = { - limit = { - $POSITION$ = flag:court_tutor_court_position - #Making sure they still can be employed in the position - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = court_tutor_court_position - } - } - appoint_court_position = { - recipient = $CHARACTER$ - court_position = court_tutor_court_position - } - } - else_if = { - limit = { - $POSITION$ = flag:court_guru_court_position - #Making sure they still can be employed in the position - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = court_guru_court_position - } - } - appoint_court_position = { - recipient = $CHARACTER$ - court_position = court_guru_court_position - } - } - else_if = { - limit = { - $POSITION$ = flag:cupbearer_court_position - #Making sure they still can be employed in the position - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = cupbearer_court_position - } - } - appoint_court_position = { - recipient = $CHARACTER$ - court_position = cupbearer_court_position - } - } - else_if = { - limit = { - $POSITION$ = flag:chief_eunuch_court_position - #Making sure they still can be employed in the position - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = chief_eunuch_court_position - } - } - appoint_court_position = { - recipient = $CHARACTER$ - court_position = chief_eunuch_court_position - } - } - else_if = { - limit = { - $POSITION$ = flag:antiquarian_court_position - #Making sure they still can be employed in the position - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = antiquarian_court_position - } - } - appoint_court_position = { - recipient = $CHARACTER$ - court_position = antiquarian_court_position - } - } - else_if = { - limit = { - $POSITION$ = flag:royal_architect_court_position - #Making sure they still can be employed in the position - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = royal_architect_court_position - } - } - appoint_court_position = { - recipient = $CHARACTER$ - court_position = royal_architect_court_position - } - } - else_if = { - limit = { - $POSITION$ = flag:lady_in_waiting_court_position - #Making sure they still can be employed in the position - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = lady_in_waiting_court_position - } - } - appoint_court_position = { - recipient = $CHARACTER$ - court_position = lady_in_waiting_court_position - } - } - else_if = { - limit = { - $POSITION$ = flag:court_poet_court_position - #Making sure they still can be employed in the position - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = court_poet_court_position - } - } - appoint_court_position = { - recipient = $CHARACTER$ - court_position = court_poet_court_position - } - } - else_if = { - limit = { - $POSITION$ = flag:court_musician_court_position - #Making sure they still can be employed in the position - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = court_musician_court_position - } - } - appoint_court_position = { - recipient = $CHARACTER$ - court_position = court_musician_court_position - } - } - else_if = { - limit = { - $POSITION$ = flag:bodyguard_court_position - #Making sure they still can be employed in the position - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = bodyguard_court_position - } - } - appoint_court_position = { - recipient = $CHARACTER$ - court_position = bodyguard_court_position - } - } - else_if = { - limit = { - $POSITION$ = flag:champion_court_position - #Making sure they still can be employed in the position - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = champion_court_position - } - } - appoint_court_position = { - recipient = $CHARACTER$ - court_position = champion_court_position - } - } - else_if = { - limit = { - $POSITION$ = flag:food_taster_court_position - #Making sure they still can be employed in the position - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = food_taster_court_position - } - } - appoint_court_position = { - recipient = $CHARACTER$ - court_position = food_taster_court_position - } - } - else_if = { - limit = { - $POSITION$ = flag:executioner_court_position - #Making sure they still can be employed in the position - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = executioner_court_position - } - } - appoint_court_position = { - recipient = $CHARACTER$ - court_position = executioner_court_position - } - } - else_if = { - limit = { - $POSITION$ = flag:garuda_court_position - #Making sure they still can be employed in the position - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = garuda_court_position - } - } - appoint_court_position = { - recipient = $CHARACTER$ - court_position = garuda_court_position - } - } - else_if = { - limit = { - $POSITION$ = flag:akolouthos_court_position - #Making sure they still can be employed in the position - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = akolouthos_court_position - } - } - appoint_court_position = { - recipient = $CHARACTER$ - court_position = akolouthos_court_position - } - } - else_if = { - limit = { - $POSITION$ = flag:court_astrologer_court_position - #Making sure they still can be employed in the position - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = court_astrologer_court_position - } - } - appoint_court_position = { - recipient = $CHARACTER$ - court_position = court_astrologer_court_position - } - } - else_if = { - limit = { - $POSITION$ = flag:grand_preceptor_court_position - #Making sure they still can be employed in the position - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = grand_preceptor_court_position - } - } - appoint_court_position = { - recipient = $CHARACTER$ - court_position = grand_preceptor_court_position - } - } - else_if = { - limit = { - $POSITION$ = flag:grand_guardian_court_position - #Making sure they still can be employed in the position - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = grand_guardian_court_position - } - } - appoint_court_position = { - recipient = $CHARACTER$ - court_position = grand_guardian_court_position - } - } - else_if = { - limit = { - $POSITION$ = flag:grand_mentor_court_position - #Making sure they still can be employed in the position - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = grand_mentor_court_position - } - } - appoint_court_position = { - recipient = $CHARACTER$ - court_position = grand_mentor_court_position - } - } - else_if = { - limit = { - $POSITION$ = flag:fire_dragon_engineer_court_position - #Making sure they still can be employed in the position - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = fire_dragon_engineer_court_position - } - } - appoint_court_position = { - recipient = $CHARACTER$ - court_position = fire_dragon_engineer_court_position - } - } - else_if = { - limit = { - $POSITION$ = flag:keeper_of_the_harem_court_position - #Making sure they still can be employed in the position - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = keeper_of_the_harem_court_position - } - } - appoint_court_position = { - recipient = $CHARACTER$ - court_position = keeper_of_the_harem_court_position - } - } - else_if = { - limit = { - $POSITION$ = flag:boyan_court_position - #Making sure they still can be employed in the position - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = boyan_court_position - } - } - appoint_court_position = { - recipient = $CHARACTER$ - court_position = boyan_court_position - } - } - else_if = { - limit = { - $POSITION$ = flag:siege_engineer_court_position - #Making sure they still can be employed in the position - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = siege_engineer_court_position - } - } - appoint_court_position = { - recipient = $CHARACTER$ - court_position = siege_engineer_court_position - } - } - else_if = { - limit = { - $POSITION$ = flag:yurtchi_court_position - #Making sure they still can be employed in the position - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = yurtchi_court_position - } - } - appoint_court_position = { - recipient = $CHARACTER$ - court_position = yurtchi_court_position - } - } - else_if = { - limit = { - $POSITION$ = flag:cherbi_court_position - #Making sure they still can be employed in the position - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = cherbi_court_position - } - } - appoint_court_position = { - recipient = $CHARACTER$ - court_position = cherbi_court_position - } - } - else_if = { - limit = { - $POSITION$ = flag:yeke_jarquchi_court_position - #Making sure they still can be employed in the position - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = yeke_jarquchi_court_position - } - } - appoint_court_position = { - recipient = $CHARACTER$ - court_position = yeke_jarquchi_court_position - } - } - else_if = { - limit = { - $POSITION$ = flag:foreign_emissary_court_position - #Making sure they still can be employed in the position - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = foreign_emissary_court_position - } - } - appoint_court_position = { - recipient = $CHARACTER$ - court_position = foreign_emissary_court_position - } - } - else_if = { - limit = { - $POSITION$ = flag:keeper_of_the_horses_court_position - #Making sure they still can be employed in the position - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = keeper_of_the_horses_court_position - } - } - appoint_court_position = { - recipient = $CHARACTER$ - court_position = keeper_of_the_horses_court_position - } - } - - #If character isn't already in your court, but a wandering guest, you recruit them - if = { - limit = { - $CHARACTER$ = { is_pool_guest = yes } - } - add_courtier = $CHARACTER$ - } -} - -replace_existing_position_with_character_in_current_scope_court_effect = { - if = { - limit = { - can_appoint_char_to_court_position = { - CHAR = $CHARACTER$ - COURT_POS = $POSITION$ - } - } - - if = { - limit = { - any_courtier = { - has_court_position = $POSITION$ - } - } - random_courtier = { - limit = { - has_court_position = $POSITION$ - } - replace_court_position = { - recipient = $CHARACTER$ - holder = PREV - court_position = $POSITION$ - } - } - } - else = { - appoint_court_position = { - recipient = $CHARACTER$ - court_position = $POSITION$ - } - } - } -} - -hold_court_queue_next_event_effect = { - # Sort the widget for next time. - change_variable = { - name = petitioner_current_progress - add = 1 - } - # Update the widget. - save_scope_value_as = { - name = event_chain_progress - value = var:petitioner_current_progress - } - # Trigger the next event along. - if = { - limit = { var:num_petitioners >= 1 } - # Reduce the tracking variable by one. - change_variable = { - name = num_petitioners - add = -1 - } - # Then, trigger an event. - trigger_event = { on_action = hold_court_event_selection } - } - # Or else remove the empty variable. - else = { remove_variable = num_petitioners } -} - -hold_court_queue_post_event_effect = { - # Sort the ending counter. - ## If there's no ending counter, create one. - if = { - limit = { - NOT = { has_variable = petitioners_dealt_with_count } - } - set_variable = { - name = petitioners_dealt_with_count - value = 1 - } - } - ## Else if there is a counter below the total petitioner tally, increment it. - else_if = { - limit = { var:petitioners_dealt_with_count < initial_petitioners_value } - change_variable = { - name = petitioners_dealt_with_count - add = 1 - } - } - ## If appropriate, run the end stuff. - if = { - limit = { - exists = var:petitioners_dealt_with_count - var:petitioners_dealt_with_count >= initial_petitioners_value - } - # Remove the counter. - remove_variable = petitioners_dealt_with_count - # Launch into cleanup. - trigger_event = hold_court.0021 - } -} - -# Adds a character flag that is used for all court events so they don't steal characters from each other -court_event_character_flag_effect = { - add_character_flag = { - flag = in_court_event - days = 180 - } -} - -# Petition Liege Variable Cleanup -petition_liege_variable_cleanup_effect = { - if = { - limit = { has_variable = petition_liege_scope } - remove_variable = petition_liege_scope - } - if = { - limit = { has_variable = petition_type } - remove_variable = petition_type - } - if = { - limit = { has_character_flag = petition_liege_character_flag } - remove_character_flag = petition_liege_character_flag - } - if = { - limit = { has_variable_list = available_petitions } - clear_variable_list = available_petitions - } - if = { - limit = { has_variable_list = petitions_to_show } - clear_variable_list = petitions_to_show - } -} - -petition_ceremonial_liege_variable_cleanup_effect = { - if = { - limit = { has_variable = petition_ceremonial_liege_scope } - remove_variable = petition_ceremonial_liege_scope - } - if = { - limit = { has_variable = petition_type } - remove_variable = petition_type - } - if = { - limit = { has_character_flag = petition_ceremonial_liege_character_flag } - remove_character_flag = petition_ceremonial_liege_character_flag - } - if = { - limit = { has_variable_list = available_petitions } - clear_variable_list = available_petitions - } - if = { - limit = { has_variable_list = petitions_to_show } - clear_variable_list = petitions_to_show - } -} diff --git a/N3OW/common/scripted_effects/00_ep1_inspiration_effects.txt b/N3OW/common/scripted_effects/00_ep1_inspiration_effects.txt deleted file mode 100644 index 0b9c5d1a..00000000 --- a/N3OW/common/scripted_effects/00_ep1_inspiration_effects.txt +++ /dev/null @@ -1,3354 +0,0 @@ - -fund_inspiration_effect = { - scope:recipient = { - if = { - limit = { - NOT = { is_courtier_of = scope:actor } - } - if = { - limit = { - any_traveling_family_member = { - can_any_traveling_family_members_travel_trigger = yes - } - } - every_traveling_family_member = { - custom = fund_inspiration_interaction_reqruit_family_tooltip - limit = { - can_any_traveling_family_members_travel_trigger = yes - } - scope:actor = { - add_courtier = prev - } - } - } - scope:actor = { - add_courtier = scope:recipient - } - } - add_opinion = { - target = scope:actor - modifier = grateful_opinion - opinion = 40 - } - } - scope:actor = { - sponsor_inspiration = scope:recipient.inspiration - } - if = { - limit = { - scope:actor = { - is_ai = no - } - NOT = { - exists = global_var:ep1_07_achievement_inspiration_count_tracker - } - } - set_global_variable = { - name = ep1_07_achievement_inspiration_count_tracker - value = 1 - } - } - else_if = { - limit = { - scope:actor = { - is_ai = no - } - exists = global_var:ep1_07_achievement_inspiration_count_tracker - } - change_global_variable = { - name = ep1_07_achievement_inspiration_count_tracker - add = 1 - } - } -} - -grant_inspiration_reward_effect = { - add_gold = { - value = root.inspiration_gold_invested - multiply = 0.25 - } - add_prestige_level = 1 - add_prestige = { - value = root.inspiration_gold_invested - multiply = 0.75 - } -} - -set_alchemy_inspiration_type_effect = { - save_temporary_scope_value_as = { - name = allow_no_type_option - value = $NO_TYPE$ - } - hidden_effect = { - $BASE_SCOPE$ = { - #The type has been decided in events, when the character got inspired, or now. Let's save it! (might still leave it up to the sponsor if allow_no_type_option = yes!) - if = { - limit = { - NOT = { exists = var:artifact_alchemy_type } - } - random_list = { #What do they want to do? - 5 = { #Elixirs - modifier = { - add = 5 - has_trait = arrogant - } - set_variable = { - name = artifact_alchemy_type - value = flag:alchemy_type_elixirs - } - } - 10 = { #Metals - set_variable = { - name = artifact_alchemy_type - value = flag:alchemy_type_metals - } - } - 10 = { #Panacea: a cure-all for all disease - modifier = { - add = 10 - has_trait = lifestyle_physician - } - set_variable = { - name = artifact_alchemy_type - value = flag:alchemy_type_panacea - } - } - 5 = { #Immortality - modifier = { - add = 5 - has_trait = arrogant - } - set_variable = { - name = artifact_alchemy_type - value = flag:alchemy_type_immortality - } - } - 50 = { #They don't care and you can decide! - trigger = { - scope:allow_no_type_option = yes - } - modifier = { - add = 30 - has_personality_submissive_trigger = yes - } - ai_value_modifier = { - ai_boldness = -0.25 - ai_energy = -0.25 - } - } - } - } - } - } -} - - -################ -# Adventurer Inspiration effects -################ -# The Adventurer Inspiration is a bit special since it can result in many different types of artifacts, so we handle the generation here - -# Where is the adventurer going? -set_adventure_location_effect = { - save_temporary_scope_value_as = { - name = allow_no_destination_option - value = $NO_DESTINATION$ - } - hidden_effect = { #If they haven't specified where they're going we decide it here (might still leave it up to the sponsor if allow_no_destination_option = yes!) - $BASE_SCOPE$ = { - if = { - limit = { - NOT = { exists = var:adventure_destination } - } - random_list = { - 10 = { - # Africa - trigger = { - trigger_if = { - limit = { exists = location } - location = { - NOT = { geographical_region = world_africa } - } - adventurer_potential_destination_distance_check = { - REGION = world_africa - } - } - } - set_variable = { - name = adventure_destination - value = flag:africa - } - } - 10 = { - # West Africa - trigger = { - trigger_if = { - limit = { exists = location } - adventurer_potential_destination_distance_check = { - REGION = world_africa_west - } - } - } - set_variable = { - name = adventure_destination - value = flag:africa_west - } - } - 10 = { - # North Africa - trigger = { - trigger_if = { - limit = { exists = location } - adventurer_potential_destination_distance_check = { - REGION = world_africa_north - } - } - } - set_variable = { - name = adventure_destination - value = flag:africa_north - } - } - 10 = { - # East Africa - trigger = { - trigger_if = { - limit = { exists = location } - adventurer_potential_destination_distance_check = { - REGION = world_africa_east - } - } - } - set_variable = { - name = adventure_destination - value = flag:africa_east - } - } - 10 = { - # Europe - trigger = { - trigger_if = { - limit = { exists = location } - location = { - NOT = { geographical_region = world_europe } - } - adventurer_potential_destination_distance_check = { - REGION = world_europe - } - } - } - set_variable = { - name = adventure_destination - value = flag:europe - } - } - 5 = { - # North Europe - trigger = { - trigger_if = { - limit = { exists = location } - adventurer_potential_destination_distance_check = { - REGION = world_europe_north - } - } - } - set_variable = { - name = adventure_destination - value = flag:europe_north - } - } - 10 = { - # South Europe - trigger = { - trigger_if = { - limit = { exists = location } - adventurer_potential_destination_distance_check = { - REGION = world_europe_south - } - } - } - set_variable = { - name = adventure_destination - value = flag:europe_south - } - } - 10 = { - # West Europe - trigger = { - trigger_if = { - limit = { exists = location } - adventurer_potential_destination_distance_check = { - REGION = world_europe_west - } - } - } - set_variable = { - name = adventure_destination - value = flag:europe_west - } - } - 10 = { - # East Europe - trigger = { - trigger_if = { - limit = { exists = location } - adventurer_potential_destination_distance_check = { - REGION = world_europe_east - } - } - } - set_variable = { - name = adventure_destination - value = flag:europe_east - } - } - 10 = { - # Middle East - trigger = { - trigger_if = { - limit = { exists = location } - location = { - NOT = { geographical_region = world_middle_east } - } - adventurer_potential_destination_distance_check = { - REGION = world_middle_east - } - } - } - set_variable = { - name = adventure_destination - value = flag:middle_east - } - } - 10 = { - # Middle East - Jerusalem - trigger = { - trigger_if = { - limit = { exists = location } - adventurer_potential_destination_distance_check = { - REGION = world_middle_east_jerusalem - } - } - } - set_variable = { - name = adventure_destination - value = flag:middle_east_jerusalem - } - } - 10 = { - # Middle East - Arabia - trigger = { - trigger_if = { - limit = { exists = location } - adventurer_potential_destination_distance_check = { - REGION = world_middle_east_arabia - } - } - } - set_variable = { - name = adventure_destination - value = flag:middle_east_arabia - } - } - 10 = { - # Middle East - Persia - trigger = { - trigger_if = { - limit = { exists = location } - adventurer_potential_destination_distance_check = { - REGION = world_middle_east_persia - } - } - } - set_variable = { - name = adventure_destination - value = flag:middle_east_persia - } - } - 10 = { - # India - trigger = { - trigger_if = { - limit = { exists = location } - location = { - NOT = { geographical_region = world_india } - } - adventurer_potential_destination_distance_check = { - REGION = world_india - } - } - } - set_variable = { - name = adventure_destination - value = flag:india - } - } - 10 = { - # India - Deccan - trigger = { - trigger_if = { - limit = { exists = location } - adventurer_potential_destination_distance_check = { - REGION = world_india_deccan - } - } - } - set_variable = { - name = adventure_destination - value = flag:india_deccan - } - } - 10 = { - # India - Bengal - trigger = { - trigger_if = { - limit = { exists = location } - adventurer_potential_destination_distance_check = { - REGION = world_india_bengal - } - } - } - set_variable = { - name = adventure_destination - value = flag:india_bengal - } - } - 10 = { - # India - Rajastan - trigger = { - trigger_if = { - limit = { exists = location } - adventurer_potential_destination_distance_check = { - REGION = world_india_rajastan - } - } - } - set_variable = { - name = adventure_destination - value = flag:india_rajastan - } - } - 5 = { - # The Steppe - trigger = { - trigger_if = { - limit = { exists = location } - location = { - NOT = { geographical_region = world_steppe } - } - adventurer_potential_destination_distance_check = { - REGION = world_steppe - } - } - } - set_variable = { - name = adventure_destination - value = flag:steppe - } - } - 5 = { - # The Steppe - West - trigger = { - trigger_if = { - limit = { exists = location } - adventurer_potential_destination_distance_check = { - REGION = world_steppe_west - } - } - } - set_variable = { - name = adventure_destination - value = flag:steppe_west - } - } - 5 = { - # The Steppe - East - trigger = { - trigger_if = { - limit = { exists = location } - adventurer_potential_destination_distance_check = { - REGION = world_steppe_east - } - } - } - set_variable = { - name = adventure_destination - value = flag:steppe_east - } - } - 5 = { - # The Steppe - Tarim - trigger = { - trigger_if = { - limit = { exists = location } - adventurer_potential_destination_distance_check = { - REGION = world_steppe_tarim - } - } - } - set_variable = { - name = adventure_destination - value = flag:steppe_tarim - } - } - 10 = { - # Asia - Minor - trigger = { - trigger_if = { - limit = { exists = location } - adventurer_potential_destination_distance_check = { - REGION = world_asia_minor - } - } - } - set_variable = { - name = adventure_destination - value = flag:asia_minor - } - } - 10 = { - # Burma - trigger = { - trigger_if = { - limit = { exists = location } - adventurer_potential_destination_distance_check = { - REGION = world_burma - } - } - } - set_variable = { - name = adventure_destination - value = flag:burma - } - } - 10 = { - # Tibet - trigger = { - trigger_if = { - limit = { exists = location } - adventurer_potential_destination_distance_check = { - REGION = world_tibet - } - } - } - set_variable = { - name = adventure_destination - value = flag:tibet - } - } - 10 = { - # East Asia - trigger = { - trigger_if = { - limit = { exists = location } - location = { - NOT = { geographical_region = world_europe } - } - adventurer_potential_destination_distance_check = { - REGION = world_asia_east - } - } - } - set_variable = { - name = adventure_destination - value = flag:east_asia - } - } - 5 = { - # East Asia - China - trigger = { - trigger_if = { - limit = { exists = location } - adventurer_potential_destination_distance_check = { - REGION = world_asia_china - } - } - } - set_variable = { - name = adventure_destination - value = flag:china - } - } - 5 = { - # East Asia - Korea - trigger = { - trigger_if = { - limit = { exists = location } - adventurer_potential_destination_distance_check = { - REGION = world_asia_korea - } - } - } - set_variable = { - name = adventure_destination - value = flag:korea - } - } - 5 = { - # East Asia - Japan - trigger = { - trigger_if = { - limit = { exists = location } - adventurer_potential_destination_distance_check = { - REGION = world_asia_japan - } - } - } - set_variable = { - name = adventure_destination - value = flag:japan - } - } - 5 = { - # Southeast Asia - Maritime and Landed - trigger = { - trigger_if = { - limit = { exists = location } - adventurer_potential_destination_distance_check = { - REGION = world_asia_southeast - } - } - } - set_variable = { - name = adventure_destination - value = flag:southeast_asia - } - } - 85 = { #Very skilled adventurers are often going to let you decide! - trigger = { - scope:allow_no_destination_option = yes - } - modifier = { - add = 40 - has_personality_submissive_trigger = yes - } - ai_value_modifier = { - ai_boldness = -0.25 - ai_energy = -0.25 - } - } - } - } - } - } -} - -get_adventure_inspiration_start_location = { - $ADVENTURER$ = { save_scope_as = adventurer } - scope:adventurer = { - if = { - limit = { exists = var:adventure_destination } - switch = { - trigger = var:adventure_destination - flag:africa = { # Africa - random_county_in_region = { - region = world_africa - title_province = { save_scope_as = location } - } - } - flag:africa_west = { # West Africa - random_county_in_region = { - region = world_africa_west - title_province = { save_scope_as = location } - } - } - flag:africa_north = { # North Africa - random_county_in_region = { - region = world_africa_north - title_province = { save_scope_as = location } - } - } - flag:africa_east = { # East Africa - random_county_in_region = { - region = world_africa_east - title_province = { save_scope_as = location } - } - } - flag:europe = { # Europe - random_county_in_region = { - region = world_europe - title_province = { save_scope_as = location } - } - } - flag:europe_north = { # North Europe - random_county_in_region = { - region = world_europe_north - title_province = { save_scope_as = location } - } - } - flag:europe_south = { # South Europe - random_county_in_region = { - region = world_europe_south - title_province = { save_scope_as = location } - } - } - flag:europe_west = { # West Europe - random_county_in_region = { - region = world_europe_west - title_province = { save_scope_as = location } - } - } - flag:europe_east = { # East Europe - random_county_in_region = { - region = world_europe_east - title_province = { save_scope_as = location } - } - } - flag:middle_east = { # Middle East - random_county_in_region = { - region = world_middle_east - title_province = { save_scope_as = location } - } - } - flag:middle_east_jerusalem = { # Middle East - Jerusalem - random_county_in_region = { - region = world_middle_east_jerusalem - title_province = { save_scope_as = location } - } - } - flag:middle_east_arabia = { # Middle East - Arabia - random_county_in_region = { - region = world_middle_east_arabia - title_province = { save_scope_as = location } - } - } - flag:middle_east_persia = { # Middle East - Persia - random_county_in_region = { - region = world_middle_east_persia - title_province = { save_scope_as = location } - } - } - flag:india = { # India - random_county_in_region = { - region = world_india - title_province = { save_scope_as = location } - } - } - flag:india_deccan = { # India - Deccan - random_county_in_region = { - region = world_india_deccan - title_province = { save_scope_as = location } - } - } - flag:india_bengal = { # India - Bengal - random_county_in_region = { - region = world_india_bengal - title_province = { save_scope_as = location } - } - } - flag:india_rajastan = { # India - Rajastan - random_county_in_region = { - region = world_india_rajastan - title_province = { save_scope_as = location } - } - } - flag:steppe = { # The Steppe - random_county_in_region = { - region = world_steppe - title_province = { save_scope_as = location } - } - } - flag:steppe_west = { # The Steppe - West - random_county_in_region = { - region = world_steppe_west - title_province = { save_scope_as = location } - } - } - flag:steppe_east = { # The Steppe - East - random_county_in_region = { - region = world_steppe_east - title_province = { save_scope_as = location } - } - } - flag:steppe_tarim = { # The Steppe - Tarim - random_county_in_region = { - region = world_steppe_tarim - title_province = { save_scope_as = location } - } - } - flag:asia_minor = { # Asia - Minor - random_county_in_region = { - region = world_asia_minor - title_province = { save_scope_as = location } - } - } - flag:burma = { # Burma - random_county_in_region = { - region = world_burma - title_province = { save_scope_as = location } - } - } - flag:tibet = { # Tibet - random_county_in_region = { - region = world_tibet - title_province = { save_scope_as = location } - } - } - flag:china = { #China - random_county_in_region = { - region = world_asia_china - title_province = { save_scope_as = location } - } - } - flag:korea = { #Korea - random_county_in_region = { - region = world_asia_korea - title_province = { save_scope_as = location } - } - } - flag:japan = { #Japan - random_county_in_region = { - region = world_asia_japan - title_province = { save_scope_as = location } - } - } - flag:southeast_asia = { #Southeast Asia - random_county_in_region = { - region = world_asia_southeast - title_province = { save_scope_as = location } - } - } - } - } - } -} - -inspiration_adventure_create_artifact_effect = { - $OWNER$ = { save_scope_as = owner } #Will always exist! - $CREATOR$ = { save_scope_as = adventurer } #Will always exist in an adventure inspiration! - - #If you've somehow managed to not set a destination by now we generate one here - if = { - limit = { - NOT = { exists = scope:adventurer.var:adventure_destination } - } - set_adventure_location_effect = { - BASE_SCOPE = scope:adventurer - NO_DESTINATION = no - } - get_adventure_inspiration_start_location = { ADVENTURER = scope:adventurer } - } - else = { - #To save the location and make sure materials can access it - scope:adventurer.location = { save_scope_as = location } # To save the location scope based on the destination - } - - #Creating the artifact based on the previous choice and outcome - scope:adventurer = { - hidden_effect = { - if = { - limit = { exists = scope:location } - scope:location = { add_to_list = artifact_material_sources } #Used for artifact creation - } - create_character = { - location = root.location - template = local_artisan_template - culture = scope:location.culture - faith = scope:location.faith - gender = scope:adventurer - dynasty = none - save_scope_as = artifact_origin #Fictional maker of artifact - } - - random_list = { - 25 = { - trigger = { #Epic Artifact - trigger_if = { - limit = { exists = var:adventure_type } - OR = { - var:adventure_type = flag:epic_quest - var:adventure_type = flag:free_reign - } - } - } - modifier = { - scope:adventurer.adventure_inspiration_average_skill_value <= low_inspiration_skill - add = -10 - } - modifier = { - scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill - add = 25 - } - root = { - random_list = { - 10 = { #Chance of Relic - modifier = { - scope:adventurer.adventure_inspiration_average_skill_value >= medium_inspiration_skill - add = -5 #More likely to find something better. - } - modifier = { - scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill - add = -4 #High inspiration skill adventurers will only find relics if there is nothing else to find. - } - random_list = { #This is a list inside an item in the other list because we need _one_ chance for relic and the relic types must be able to have overlapping triggers. - 100 = { #Christian - trigger = { - scope:location ?= { - OR = { - faith.religion = religion:christianity_religion - geographical_region = world_europe - geographical_region = world_middle_east_jerusalem - } - } - } - modifier = { - NOT = { scope:location.religion = religion:christianity_religion } - add = -75 - } - random_list = { - 75 = { - create_artifact_pedestal_christian_relic_effect_hist = { - OWNER = root - } - } - 10 = { - create_artifact_pedestal_crucifix_effect = { OWNER = root } - } - 10 = { - create_artifact_pedestal_cross_effect = { OWNER = root } - } - } - } - 100 = { #Islamic - trigger = { - scope:location ?= { - OR = { - religion = religion:islam_religion - geographical_region = world_africa_north - geographical_region = world_middle_east - } - } - } - modifier = { - NOT = { scope:location.religion = religion:islam_religion } - add = -75 - } - create_artifact_pedestal_islamic_relic_effect_hist = { OWNER = root } - } - 100 = { #Buddhist - trigger = { - scope:location ?= { - OR = { - religion = religion:buddhism_religion - geographical_region = world_india - geographical_region = world_tibet - geographical_region = world_burma - geographical_region = world_himalaya - geographical_region = world_asia_china - geographical_region = world_asia_japan - geographical_region = world_asia_korea - geographical_region = world_asia_southeast - } - } - } - modifier = { - NOT = { scope:location.religion = religion:buddhism_religion } - add = -75 - } - random_list = { - 50 = { - create_artifact_pedestal_buddhism_relic_effect_hist = { OWNER = root } - } - 10 = { - trigger = { - any_artifact = { - count < 3 - has_variable = cintamani_buddhist - } - } - create_artifact_cintamani_buddhist_effect = { OWNER = root } - } - 10 = { - trigger = { - any_artifact = { - count < 1 - has_variable = staff_kakusandha - } - } - create_artifact_staff_kakusandha_effect = { OWNER = root } - } - 10 = { - trigger = { - any_artifact = { - count < 1 - has_variable = konagamana - } - } - create_artifact_konagamana_effect = { OWNER = root } - } - 10 = { - trigger = { - any_artifact = { - count < 1 - has_variable = kassapa - } - } - create_artifact_robe_kassapa_effect = { OWNER = root } - } - } - } - 85 = { #Jainist - trigger = { - scope:location ?= { - OR = { - religion = religion:jainism_religion - geographical_region = world_india - geographical_region = world_tibet - geographical_region = world_burma - geographical_region = world_himalaya - } - } - } - modifier = { - NOT = { scope:location.religion = religion:jainism_religion } - add = -75 - } - create_artifact_siddhachakra_effect = { OWNER = root } - } - 100 = { #Zoroastrian - trigger = { - scope:location ?= { - OR = { - religion = religion:zoroastrianism_religion - geographical_region = world_middle_east_persia - } - } - } - modifier = { - NOT = { scope:location.religion = religion:zoroastrianism_religion } - add = -75 - } - random_list = { - 50 = { - create_artifact_pedestal_branch_relic_zoroastr_effect = { - OWNER = root - } - } - 50 = { - create_artifact_afarganyu_effect = { - OWNER = root - } - } - } - } - 100 = { #Germanic - trigger = { - scope:location ?= { - OR = { - religion = religion:germanic_religion - geographical_region = world_europe_north - } - } - } - modifier = { - NOT = { scope:location.religion = religion:germanic_religion } - add = -75 - } - create_artifact_pedestal_branch_relic_germanic_effect = { - OWNER = root - } - } - 100 = { #Roog - trigger = { - scope:location ?= { - OR = { - religion = religion:west_african_roog_religion - geographical_region = world_africa_west - } - } - } - modifier = { - NOT = { scope:location.religion = religion:west_african_roog_religion } - add = -75 - } - create_artifact_pedestal_branch_relic_boog_effect = { - OWNER = root - } - } - 100 = { #Slavic - trigger = { - scope:location ?= { - OR = { - religion = religion:slavic_religion - geographical_region = world_europe_east - geographical_region = world_europe_south_east - } - } - } - modifier = { - NOT = { scope:location.religion = religion:slavic_religion } - add = -75 - } - create_artifact_pedestal_branch_relic_slavic_effect = { - OWNER = root - } - } - 100 = { #Hinduism - trigger = { - scope:location ?= { - OR = { - religion = religion:hinduism_religion - geographical_region = world_india - geographical_region = world_himalaya - geographical_region = world_asia_southeast - } - } - } - modifier = { - NOT = { scope:location.religion = religion:hinduism_religion } - add = -75 - } - random_list = { - 10 = { - trigger = { - any_artifact = { - count < 8 - has_variable = aruval - } - scope:location ?= { - OR = { - geographical_region = world_india - geographical_region = world_tibet - geographical_region = ghw_region_afghanistan - religion = religion:hinduism_religion - } - } - } - create_artifact_aruval_effect = { OWNER = root } - } - 10 = { - trigger = { - any_artifact = { - count < 12 - has_variable = conch - } - scope:location ?= { - OR = { - geographical_region = world_india - geographical_region = world_tibet - geographical_region = world_asia_southeast - religion = religion:hinduism_religion - } - } - } - create_artifact_pedestal_shankha_conch_effect = { OWNER = root } - } - 10 = { #Ancient Khanda - trigger = { - any_artifact = { - count < 8 - has_variable = khanda - } - scope:location ?= { - OR = { - geographical_region = world_india - geographical_region = world_tibet - geographical_region = ghw_region_afghanistan - religion = religion:hinduism_religion - } - } - } - create_artifact_khanda_effect = { OWNER = root } - } - 10 = { #Cintamani stone - trigger = { - any_artifact = { - count < 5 - has_variable = cintamani_hindu - } - scope:location ?= { - OR = { - geographical_region = world_india - geographical_region = world_tibet - geographical_region = ghw_region_afghanistan - religion = religion:hinduism_religion - } - } - } - create_artifact_cintamani_hindu_effect = { OWNER = root } - } - 25 = { - create_artifact_pedestal_branch_relic_hinduism_effect = { OWNER = root } - } - } - } - 100 = { #Judaism - trigger = { - scope:location ?= { - OR = { - religion = religion:judaism_religion - geographical_region = world_europe - geographical_region = world_middle_east - } - } - } - modifier = { - NOT = { scope:location.religion = religion:judaism_religion } - add = -75 - } - create_artifact_pedestal_reliquary_judaism_effect = { - OWNER = root - } - } - 100 = { #Finno-Ugric - trigger = { - scope:location ?= { - OR = { - religion = religion:finno_ugric_religion - geographical_region = world_europe_north - } - } - } - modifier = { - NOT = { scope:location.religion = religion:finno_ugric_religion } - add = -75 - } - random_list = { - 90 = { - create_artifact_sledovik_effect = { - OWNER = root - } - } - 10 = { - trigger = { - any_artifact = { - count < 3 - has_variable = kantele - } - } - create_artifact_kantele_effect = { - OWNER = root - } - } - } - } - 1 = { #Fallback Relic - create_artifact_pedestal_branch_relic_general_effect = { - OWNER = root - RELIGION = scope:location.religion - } - } - } - } - 2 = { #Ark of the covenant - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > high_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - NOT = { - any_artifact = { - has_variable = ark_of_the_covenant - } - } - scope:location ?= { - OR = { - geographical_region = world_middle_east - geographical_region = world_africa_north_east - geographical_region = world_africa_east - } - } - } - create_artifact_sculpture_ark_of_covenant_effect = { OWNER = root } - } - 2 = { #Babr E Bayan - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > high_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - NOT = { - any_artifact = { - has_variable = babr_e_bayan - } - } - scope:location ?= { - OR = { - geographical_region = world_middle_east_persia - #geographical_region = world_steppe - culture = { has_cultural_pillar = heritage_iranian } - } - } - } - create_artifact_sculpture_babr_e_bayan_effect = { OWNER = root } - } - 10 = { - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > high_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - NOT = { - any_artifact = { - has_variable = crown_of_justinian - } - } - scope:location ?= { - OR = { - geographical_region = custom_eastern_roman_empire - culture = { has_cultural_pillar = heritage_byzantine } - } - } - } - create_artifact_pedestal_justinian_effect = { OWNER = root } - } - 10 = { #Cup of Jamshid - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > high_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - NOT = { - any_artifact = { - has_variable = cup_jamshid - } - } - scope:location ?= { - OR = { - geographical_region = world_middle_east_persia - #geographical_region = world_steppe - culture = { has_cultural_pillar = heritage_iranian } - } - } - } - create_artifact_pedestal_cup_jamshid_effect = { OWNER = root } - } - 10 = { - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > high_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - NOT = { - any_artifact = { - has_variable = david_harp - } - } - scope:location ?= { - OR = { - geographical_region = world_middle_east_jerusalem - culture = { has_cultural_pillar = heritage_israelite } - faith.religion = religion:judaism_religion - } - } - } - create_artifact_pedestal_david_harp_effect = { OWNER = root } - } - 10 = { #Recreate if lost - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > high_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - NOT = { - any_artifact = { - has_variable = iron_crown - } - } - scope:location ?= { - OR = { - geographical_region = custom_northern_italy - culture = { has_cultural_pillar = heritage_latin } - } - } - } - create_artifact_pedestal_crown_iron_effect = { OWNER = root } - } - 10 = { - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > high_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - NOT = { - any_artifact = { - has_variable = banner_kaviani - } - } - scope:location ?= { - OR = { - geographical_region = world_middle_east_persia - #geographical_region = world_steppe - culture = { has_cultural_pillar = heritage_iranian } - } - } - } - create_artifact_wall_banner_kaviani_effect = { OWNER = root } - } - 10 = { - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > high_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - NOT = { - any_artifact = { - has_variable = banner_edessa - } - } - scope:location ?= { - OR = { - geographical_region = world_middle_east - geographical_region = world_asia_minor - } - } - } - create_artifact_wall_banner_edessa_effect = { OWNER = root } - } - 10 = { - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= medium_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > medium_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - current_year >= 1097 - character:107590 ?= { is_alive = no } #El Cid is not around - NOT = { - any_artifact = { - has_variable = sword_cid - } - } - scope:location ?= { - OR = { - geographical_region = world_middle_east - geographical_region = world_asia_minor - } - } - } - create_artifact_wall_cid_sword_effect = { OWNER = root } - } - 10 = { - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= medium_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > medium_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - any_artifact = { - count < 4 - has_variable = sword_of_goujian - } - scope:location ?= { - geographical_region = world_asia_east - } - } - create_artifact_sword_goujian_effect = { OWNER = root } - } - 10 = { - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= medium_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > medium_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - any_artifact = { - count < 9 - has_variable = sword_of_muhammad - } - scope:location ?= { - OR = { - geographical_region = world_middle_east - geographical_region = world_asia_minor - geographical_region = world_africa_north_east - religion = religion:islam_religion - } - } - } - create_artifact_wall_muhammad_sword_effect = { OWNER = root } - } - 10 = { - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > high_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - NOT = { - any_artifact = { - has_variable = sword_attila - } - } - scope:location ?= { - OR = { - geographical_region = custom_south_slavia - geographical_region = custom_carpathia - geographical_region = ghw_region_crimea - geographical_region = custom_bavaria - } - } - } - create_artifact_wall_sword_attila_effect = { OWNER = root } - } - 10 = { - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > high_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - NOT = { - any_artifact = { - has_variable = throne_scone - } - } - scope:location ?= { - geographical_region = world_europe_west_britannia - } - } - create_artifact_throne_scone_effect = { OWNER = root } - } - 10 = { - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > high_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - NOT = { - any_artifact = { - has_variable = throne_of_solomon - } - } - scope:location ?= { - OR = { - geographical_region = world_middle_east_jerusalem - culture = { has_cultural_pillar = heritage_israelite } - faith.religion = religion:judaism_religion - } - } - } - create_artifact_throne_solomon_effect = { OWNER = root } - } - 10 = { #Recreate if lost - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > high_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - NOT = { - any_artifact = { - has_variable = charlamagne_throne - } - } - scope:location ?= { - OR = { - geographical_region = custom_carolingian_francia - geographical_region = custom_carolingian_germany - geographical_region = custom_lotharingia - geographical_region = custom_northern_italy - } - } - } - create_artifact_throne_charlemagne_effect = { OWNER = root } - } - 15 = { #Excalibur - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= medium_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > medium_adventurer_epic_quality_level #Cumulative event choices - } - } - add = -10 #If the adventurer is of medium or above skill they will avoid mass produced swords. - } - trigger = { - any_artifact = { - count < 6 - has_variable = excalibur - } - scope:location ?= { - geographical_region = world_europe_west_britannia - } - } - create_artifact_excalibur_effect = { OWNER = root } - } - 10 = { #Head of St Edmund - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > high_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - NOT = { - any_artifact = { - has_variable = edmund_head - } - } - scope:location ?= { - OR = { - geographical_region = world_europe_west_britannia - geographical_region = world_europe_north - } - } - } - create_artifact_edmund_head_effect = { OWNER = root } - } - 10 = { #Dhammapada - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= medium_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > medium_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - any_artifact = { - count < 10 - has_variable = dhammapada - } - scope:location ?= { - OR = { - geographical_region = world_india - geographical_region = world_tibet - geographical_region = ghw_region_afghanistan - religion = religion:buddhism_religion - geographical_region = world_asia_china - geographical_region = world_asia_japan - geographical_region = world_asia_korea - geographical_region = world_asia_southeast - } - } - } - create_artifact_dhammapada_effect = { OWNER = root } - } - 10 = { #Sutta Pitaka - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= medium_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > medium_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - any_artifact = { - count < 10 - has_variable = vinaya_pitaka - } - scope:location ?= { - OR = { - geographical_region = world_india - geographical_region = world_tibet - geographical_region = ghw_region_afghanistan - religion = religion:buddhism_religion - geographical_region = world_asia_china - geographical_region = world_asia_japan - geographical_region = world_asia_korea - geographical_region = world_asia_southeast - } - } - } - create_artifact_sutta_pitaka_effect = { OWNER = root } - } - 10 = { #Vinaya Pitaka - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= medium_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > medium_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - any_artifact = { - count < 10 - has_variable = sutta_pitaka - } - scope:location ?= { - OR = { - geographical_region = world_india - geographical_region = world_tibet - geographical_region = ghw_region_afghanistan - religion = religion:buddhism_religion - geographical_region = world_asia_china - geographical_region = world_asia_japan - geographical_region = world_asia_korea - geographical_region = world_asia_southeast - } - } - } - create_artifact_vinaya_pitaka_effect = { OWNER = root } - } - 10 = { #Abhidhamma - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= medium_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > medium_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - any_artifact = { - count < 10 - has_variable = abhidhamma - } - scope:location ?= { - OR = { - geographical_region = world_india - geographical_region = world_tibet - geographical_region = ghw_region_afghanistan - religion = religion:buddhism_religion - geographical_region = world_asia_china - geographical_region = world_asia_japan - geographical_region = world_asia_korea - geographical_region = world_asia_southeast - } - } - } - create_artifact_abhidhamma_pitaka_effect = { OWNER = root } - } - 15 = { #Jewelled Danda - trigger = { - any_artifact = { - count < 10 - has_variable = danda - } - scope:location ?= { - OR = { - geographical_region = world_india - geographical_region = world_tibet - geographical_region = ghw_region_afghanistan - } - } - } - create_artifact_jewelled_danda_effect = { OWNER = ROOT } - } - 5 = { #Mountain of Light - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > high_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - any_artifact = { - count < 1 - has_variable = koh_i_noor - } - scope:location ?= { - OR = { - geographical_region = world_india - geographical_region = world_tibet - geographical_region = ghw_region_afghanistan - } - } - } - create_artifact_pedestal_koh_i_noor_effect = { OWNER = ROOT } - } - 10 = { #Makarakundala - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= medium_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > medium_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - any_artifact = { - count < 10 - has_variable = makarakundala - } - scope:location ?= { - OR = { - geographical_region = world_india - geographical_region = world_tibet - geographical_region = ghw_region_afghanistan - } - } - } - create_artifact_makarakundala_effect = { OWNER = ROOT } - } - 10 = { #Great Diamond - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= medium_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > medium_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - any_artifact = { - count < 1 - has_variable = great_diamond - } - scope:location ?= { - OR = { - geographical_region = world_india - geographical_region = world_tibet - geographical_region = ghw_region_afghanistan - } - } - } - create_artifact_pedestal_great_diamond_effect = { OWNER = ROOT } - } - 10 = { #Al Taj - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > high_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - any_artifact = { - count < 1 - has_variable = al_taj - } - scope:location ?= { - OR = { - geographical_region = world_middle_east - geographical_region = world_africa_north_east - } - } - } - create_artifact_al_taj_crown_effect = { OWNER = ROOT } - } - 10 = { #al-Sayf al-Khass - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > high_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - any_artifact = { - count < 1 - has_variable = al_sayf_al_khass - } - scope:location ?= { - OR = { - geographical_region = world_middle_east - geographical_region = world_africa_north_east - } - } - } - create_artifact_al_sayf_al_khass_effect = { OWNER = ROOT } - } - 10 = { #Qadib al-Mulk - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > high_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - any_artifact = { - count < 1 - has_variable = qadib_al_mulk - } - scope:location ?= { - OR = { - geographical_region = world_middle_east - geographical_region = world_africa_north_east - } - } - } - create_artifact_qadib_al_mulk_effect = { OWNER = ROOT } - } - 10 = { #Al Dawat - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > high_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - any_artifact = { - count < 1 - has_variable = al_dawat - } - scope:location ?= { - OR = { - geographical_region = world_middle_east - geographical_region = world_africa_north_east - } - } - } - create_artifact_al_dawat_effect = { OWNER = ROOT } - } - 10 = { #Al Hafir - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > high_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - any_artifact = { - count < 1 - has_variable = al_hafir - } - scope:location ?= { - OR = { - geographical_region = world_middle_east - geographical_region = world_africa_north_east - } - } - } - create_artifact_al_hafir_effect = { OWNER = ROOT } - } - 2 = { #Banner of thankfulness - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > high_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - any_artifact = { - count < 2 - has_variable = banner_thankfulness - } - scope:location ?= { - OR = { - geographical_region = world_middle_east - geographical_region = world_africa_north_east - } - } - } - create_artifact_wall_banner_thankfulness_effect = { OWNER = ROOT } - } - 5 = { #Al Jabal - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > high_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - any_artifact = { - count < 1 - has_variable = al_jabal - } - scope:location ?= { - OR = { - geographical_region = world_middle_east - geographical_region = world_middle_east_persia - } - } - } - create_artifact_pedestal_al_jabal_effect = { OWNER = ROOT } - } - 5 = { #Al Yatima - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > high_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - any_artifact = { - count < 1 - has_variable = al_yatima - } - scope:location ?= { - OR = { - geographical_region = world_middle_east - geographical_region = world_africa_north_east - } - } - } - create_artifact_pedestal_al_yatima_effect = { OWNER = ROOT } - } - 10 = { #Dagger of Rostam - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > high_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - any_artifact = { - count < 1 - has_variable = dagger_of_rostam - } - scope:location ?= { - OR = { - geographical_region = world_asia_minor - geographical_region = world_middle_east - geographical_region = world_middle_east_persia - } - } - } - create_artifact_dagger_of_rostam_effect = { OWNER = ROOT } - } - 10 = { #Ascalon - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > high_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - any_artifact = { - count < 1 - has_variable = ascalon - } - scope:location ?= { - OR = { - geographical_region = world_asia_minor - geographical_region = world_middle_east - geographical_region = world_middle_east_persia - } - } - } - create_artifact_ascalon_effect = { OWNER = ROOT } - } - 10 = { #Shamshir-e Zomorrodnegar - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > high_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - any_artifact = { - count < 1 - has_variable = zomorrodnegar - } - scope:location ?= { - OR = { - geographical_region = world_asia_minor - geographical_region = world_middle_east - geographical_region = world_middle_east_persia - } - } - } - create_artifact_zomorrodnegar_effect = { OWNER = ROOT } - } - 15 = { #Muhammads epistles - trigger = { - any_artifact = { - count < 12 - has_variable = muhammads_epistles - } - scope:location ?= { - OR = { - geographical_region = world_asia_minor - geographical_region = world_middle_east - geographical_region = world_middle_east_persia - } - } - } - create_artifact_muhammads_epistles_effect = { OWNER = ROOT } - } - 10 = { #Kave's Apron - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > high_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - any_artifact = { - count < 1 - has_variable = kaves_apron - } - scope:location ?= { - OR = { - geographical_region = world_asia_minor - geographical_region = world_middle_east - geographical_region = world_middle_east_persia - } - } - } - create_artifact_kaves_apron_effect = { OWNER = ROOT } - } - 2 = { #Armor of Alexander the Great - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > high_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - any_artifact = { - count < 1 - has_variable = arms_of_alex - } - scope:location ?= { - OR = { - geographical_region = world_india - geographical_region = world_asia_minor - geographical_region = world_middle_east - geographical_region = world_middle_east_persia - } - } - } - create_artifact_arms_of_alexander_effect = { OWNER = ROOT } - } - 10 = { #Olifant - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= medium_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > medium_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - any_artifact = { - count < 1 - has_variable = olifant - } - scope:location ?= { - OR = { - geographical_region = world_europe_west - geographical_region = world_europe_south - } - } - } - create_artifact_olifant_effect = { OWNER = ROOT } - } - 10 = { #Angelicas Ring - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= medium_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > medium_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - any_artifact = { - count < 1 - has_variable = angelica_ring - } - scope:location ?= { - OR = { - geographical_region = world_europe_west - geographical_region = world_europe_south - } - } - } - create_artifact_angelicas_ring_effect = { OWNER = ROOT } - } - 10 = { #Colada - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= medium_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > medium_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - any_artifact = { - count < 1 - has_variable = colada - } - scope:location ?= { - OR = { - geographical_region = world_europe_west - geographical_region = world_europe_south - } - } - } - create_colada_effect = { OWNER = ROOT } - } - 10 = { #Curtana - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > high_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - any_artifact = { - count < 1 - has_variable = curtana - } - scope:location ?= { - OR = { - geographical_region = world_europe_west - geographical_region = world_europe_south - } - } - } - create_artifact_curtana_effect = { OWNER = ROOT } - } - 10 = { #Durendal - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= medium_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > medium_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - any_artifact = { - count < 1 - has_variable = durendal - } - scope:location ?= { - OR = { - geographical_region = world_europe_west - geographical_region = world_europe_south - } - } - } - create_artifact_durendal_effect = { OWNER = ROOT } - } - 10 = { #Joyeuse - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > high_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - any_artifact = { - count < 1 - has_variable = joyeuse - } - scope:location ?= { - OR = { - geographical_region = world_europe_west - geographical_region = world_europe_south - } - } - } - create_artifact_joyeuse_effect = { OWNER = ROOT } - } - 10 = { #Aram - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= medium_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > medium_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - any_artifact = { - count < 1 - has_variable = aram - } - scope:location ?= { - geographical_region = world_steppe - } - } - create_artifact_aram_effect = { OWNER = ROOT } - } - 10 = { #Mmaagha Kamalu - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= medium_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > medium_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - any_artifact = { - count < 1 - has_variable = mmaagha_kamalu - } - scope:location ?= { - geographical_region = world_africa_west - } - } - create_artifact_sword_mmaagha_kamalu_effect = { OWNER = ROOT } - } - 15 = { #Ikenga - trigger = { - any_artifact = { - count < 15 - has_variable = ikenga - } - scope:location ?= { - geographical_region = world_africa_west - } - } - create_artifact_pedestal_ikenga_effect = { OWNER = ROOT } - } - 10 = { #Bronze head - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= medium_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > medium_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - any_artifact = { - count < 5 - has_variable = bronze_head - } - scope:location ?= { - geographical_region = world_africa_west - } - } - create_artifact_bronze_head_effect = { OWNER = ROOT } - } - 15 = { #Ibeji - trigger = { - any_artifact = { - count < 15 - has_variable = ibeji - } - scope:location ?= { - geographical_region = world_africa_west - } - } - create_artifact_ibeji_effect = { OWNER = ROOT } - } - 10 = { #Rock Crystal Carving - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= medium_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > medium_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - any_artifact = { - count < 3 - has_variable = crystal_carving - } - scope:location ?= { - OR = { - geographical_region = world_middle_east - geographical_region = world_middle_east_persia - } - } - } - create_artifact_crystal_carving_effect = { OWNER = ROOT } - } - 10 = { #Nagelring - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= medium_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > medium_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - any_artifact = { - count < 1 - has_variable = nagelring - } - scope:location ?= { - geographical_region = world_europe_west_germania - } - } - create_artifact_nagelring_effect = { OWNER = ROOT } - } - 10 = { #szczerbiec - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > high_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - current_date > 1080.1.1 - any_artifact = { - count < 1 - has_variable = szczerbiec - } - scope:location ?= { - geographical_region = world_europe_east - } - } - create_artifact_szczerbiec_effect = { OWNER = ROOT } - } - 10 = { #Kladenets - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= medium_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > medium_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - any_artifact = { - count < 1 - has_variable = kladenets - } - scope:location ?= { - geographical_region = world_europe_east - } - } - create_artifact_kladenets_effect = { OWNER = ROOT } - } - 10 = { #Legbiter - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > high_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - current_date > 1120.1.1 - any_artifact = { - count < 1 - has_variable = legbiter - } - scope:location ?= { - geographical_region = world_europe_north - } - } - create_artifact_legbiter_effect = { OWNER = ROOT } - } - 10 = { #Quern-Biter - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > high_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - current_date > 920.1.1 - any_artifact = { - count < 1 - has_variable = quernbiter - } - scope:location ?= { - geographical_region = world_europe_north - } - } - create_artifact_quernbiter_effect = { OWNER = ROOT } - } - 15 = { #Navaratna - trigger = { - scope:location ?= { - geographical_region = world_india - } - any_artifact = { - count < 3 - has_variable = navaratna - } - } - create_artifact_navaratna_effect = { OWNER = ROOT } - } - 10 = { #Dragvandil - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > high_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - current_date > 920.1.1 - any_artifact = { - count < 1 - has_variable = dragvandil - } - scope:location ?= { - geographical_region = world_europe_north - } - } - create_artifact_dragvandil_effect = { OWNER = ROOT } - } - 2 = { #Chinese Caligraphy - trigger = { - any_artifact = { - count < 15 - has_variable = chinese_caligraphy - } - scope:location ?= { - OR = { - geographical_region = world_india - geographical_region = world_burma - geographical_region = world_tibet - geographical_region = world_asia_china - geographical_region = world_asia_japan - geographical_region = world_asia_korea - geographical_region = world_asia_southeast - } - } - } - create_artifact_chinese_caligraphy_effect = { OWNER = ROOT } - } - 5 = { #Ruyi - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= medium_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > medium_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - any_artifact = { - count < 15 - has_variable = ruyi - } - scope:location ?= { - OR = { - geographical_region = world_india - geographical_region = world_burma - geographical_region = world_tibet - geographical_region = world_asia_china - geographical_region = world_asia_japan - geographical_region = world_asia_korea - geographical_region = world_asia_southeast - } - } - } - create_artifact_ruyi_effect = { OWNER = ROOT } - } - 5 = { #Turquoise Throne - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > high_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - any_artifact = { - count < 1 - has_variable = turquoise_throne - } - scope:location ?= { - OR = { - geographical_region = world_india - geographical_region = world_burma - geographical_region = world_middle_east_persia - } - } - } - create_artifact_turquoise_throne_effect = { OWNER = ROOT } - } - 5 = { #Peacock Throne - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > high_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - any_artifact = { - count < 1 - has_variable = peacock_throne - } - scope:location ?= { - OR = { - geographical_region = world_india - geographical_region = world_burma - geographical_region = world_middle_east_persia - } - } - } - create_artifact_peacock_throne_effect = { OWNER = ROOT } - } - 5 = { #Mantle of the Prophet - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > high_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - any_artifact = { - count < 1 - has_variable = mantle_of_prophet - } - scope:location ?= { - OR = { - geographical_region = world_middle_east - geographical_region = world_middle_east_persia - } - } - } - create_artifact_mantle_of_the_prophet_effect = { OWNER = ROOT } - } - 5 = { #Spear of the Prophet - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > high_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - any_artifact = { - count < 1 - has_variable = spear_of_the_prophet - } - scope:location ?= { - OR = { - geographical_region = world_middle_east - geographical_region = world_middle_east_persia - } - } - } - create_artifact_spear_of_the_prophet_effect = { OWNER = ROOT } - } - 10 = { #FP3 Sassanian Sword - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > high_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - any_artifact = { - count < 15 - has_variable = sassanian_sword - } - scope:location ?= { - OR = { - geographical_region = world_middle_east - geographical_region = world_middle_east_persia - } - } - } - create_artifact_illustrious_sassanian_sword_effect = { OWNER = ROOT } - } - 2 = { # - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > high_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { #Narwhal Horn - scope:location ?= { - geographical_region = world_europe_north - } - } - create_artifact_wall_narwhal_horn_effect = { - OWNER = scope:owner - HUNTER = scope:inspiration_owner - } - } - 10 = { #Constantine statue - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > high_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - any_artifact = { - count < 3 - has_variable = statue_constantine - } - scope:location ?= { - OR = { - geographical_region = world_europe_south_italy #Rome - geographical_region = world_asia_minor #Constantinople - } - } - } - create_artifact_statue_constantine_effect = { OWNER = root } - } - 5 = { - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > high_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - has_tgp_dlc_trigger = yes - any_artifact = { - count < 1 - has_variable = heirloom_seal - } - scope:location ?= { - geographical_region = world_asia_china - } - } - create_artifact_heirloom_seal_effect = { OWNER = root } - } - 10 = { - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > high_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - has_tgp_dlc_trigger = yes - any_artifact = { - count < 1 - has_variable = chinese_armillary_sphere - } - scope:location ?= { - geographical_region = world_asia_china - } - } - create_artifact_chinese_armillary_sphere_effect = { OWNER = root } - } - 10 = { - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > high_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - has_tgp_dlc_trigger = yes - any_artifact = { - count < 1 - has_variable = eight_fold_chest - } - scope:location ?= { - geographical_region = world_asia_china - } - } - create_artifact_eight_fold_chest_effect = { - OWNER = root - } - } - 10 = { - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > high_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - has_tgp_dlc_trigger = yes - current_date > 1150.1.1 #Needs to be long past creation date for this to make sense - any_artifact = { - count < 1 - has_variable = military_classics - } - scope:location ?= { - geographical_region = world_asia_china - } - } - create_artifact_military_classics_effect = { - OWNER = root - } - } - 10 = { - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > high_adventurer_epic_quality_level #Cumulative event choices - } - } - add = 5 - } - trigger = { - has_tgp_dlc_trigger = yes - any_artifact = { - count < 1 - has_variable = baekje_incense_burner - } - scope:location ?= { - geographical_region = world_asia_korea - } - } - create_artifact_pedestal_baekje_incense_burner_effect = { OWNER = root } - } - } - } - } - - 10 = { - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= medium_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > medium_adventurer_epic_quality_level #Cumulative event choices - } - } - add = -5 - } - trigger = { #A Weapon - trigger_if = { - limit = { exists = var:adventure_type } - OR = { - var:adventure_type = flag:epic_quest - var:adventure_type = flag:free_reign - } - } - } - scope:owner = { - create_artifact_weapon_effect = { - OWNER = scope:artifact_origin - CREATOR = scope:artifact_origin - SET_WEAPON_TYPE = flag:no - } - } - save_scope_value_as = { #We save the type here for tooltips in fund_inspiration.1051 - name = weapon_artifact - value = yes - } - } - - 5 = { - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= medium_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > medium_adventurer_epic_quality_level #Cumulative event choices - } - } - add = -2 - } - trigger = { #An armor - trigger_if = { - limit = { exists = var:adventure_type } - OR = { - var:adventure_type = flag:epic_quest - var:adventure_type = flag:free_reign - } - } - } - scope:owner = { - create_artifact_armor_effect = { - OWNER = scope:artifact_origin - CREATOR = scope:artifact_origin - SET_ARMOR_TYPE = flag:no - } - } - save_scope_value_as = { #We save the type here for tooltips in fund_inspiration.1051 - name = armor_artifact - value = yes - } - } - 5 = { - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= medium_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > medium_adventurer_epic_quality_level #Cumulative event choices - } - } - add = -2 - } - trigger = { # Necklace - trigger_if = { - limit = { exists = var:adventure_type } - OR = { - var:adventure_type = flag:trinket - var:adventure_type = flag:free_reign - } - } - } - scope:owner = { - create_artifact_necklace_effect = { - OWNER = scope:artifact_origin - SMITH = scope:artifact_origin - } - } - scope:newly_created_artifact = { save_scope_as = necklace } - save_scope_value_as = { #We save the type here for tooltips in fund_inspiration.1051 - name = necklace_artifact - value = yes - } - } - - 5 = { - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= medium_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > medium_adventurer_epic_quality_level #Cumulative event choices - } - } - add = -2 - } - trigger = { - trigger_if = { - limit = { exists = var:adventure_type } - OR = { - var:adventure_type = flag:trinket - var:adventure_type = flag:free_reign - var:adventure_type = flag:epic_quest - } - } - } - scope:owner = { - create_artifact_regalia_effect = { - OWNER = scope:artifact_origin - SMITH = scope:artifact_origin - } - } - scope:owner = { - save_scope_value_as = { #We save the type here for tooltips in fund_inspiration.1051 - name = regalia_artifact - value = yes - } - } - } - - 10 = { - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > high_adventurer_epic_quality_level #Cumulative event choices - } - } - add = -5 - } - trigger = { #Skull - trigger_if = { - limit = { exists = var:adventure_type } - OR = { - var:adventure_type = flag:skull_or_hide - var:adventure_type = flag:free_reign - } - } - } - scope:owner = { - create_artifact_wall_skull_effect = { - OWNER = scope:owner - HUNTER = scope:adventurer - LEGENDARY = no - ANIMAL = flag:none - } - } - save_scope_value_as = { #We save the type here for tooltips in fund_inspiration.1051 - name = skull - value = yes - } - } - 30 = { - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > high_adventurer_epic_quality_level #Cumulative event choices - } - } - add = -5 - } - trigger = { #Hide - big - trigger_if = { - limit = { exists = var:adventure_type } - OR = { - var:adventure_type = flag:skull_or_hide - var:adventure_type = flag:free_reign - } - } - } - scope:owner = { - create_artifact_animal_hide_effect = { - OWNER = scope:owner - HUNTER = scope:adventurer - LEGENDARY = no - ANIMAL = flag:none - } - } - } - 10 = { - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= high_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > high_adventurer_epic_quality_level #Cumulative event choices - } - } - add = -5 - } - trigger = { #Trinket, box small - trigger_if = { - limit = { exists = var:adventure_type } - OR = { - var:adventure_type = flag:trinket - var:adventure_type = flag:free_reign - } - } - } - scope:owner = { - create_artifact_box_small_effect = { - OWNER = scope:owner - CARPENTER = scope:inspiration_owner - } - } - save_scope_value_as = { #We save the type here for tooltips in fund_inspiration.1051 - name = box - value = yes - } - } - 10 = { - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= medium_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > medium_adventurer_epic_quality_level #Cumulative event choices - } - } - add = -5 - } - trigger = { #Trinket, goblet - trigger_if = { - limit = { exists = var:adventure_type } - OR = { - var:adventure_type = flag:trinket - var:adventure_type = flag:free_reign - } - } - } - scope:owner = { - create_artifact_goblet_effect = { - OWNER = scope:owner - SMITH = scope:inspiration_owner - } - } - save_scope_value_as = { #We save the type here for tooltips in fund_inspiration.1051 - name = goblet - value = yes - } - } - 10 = { - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= medium_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > medium_adventurer_epic_quality_level #Cumulative event choices - } - } - add = -2 - } - trigger = { #Tapestry - trigger_if = { - limit = { exists = var:adventure_type } - OR = { - var:adventure_type = flag:tapestry_or_fabric - var:adventure_type = flag:free_reign - } - } - } - scope:owner = { - create_artifact_tapestry_effect = { - OWNER = scope:owner - WEAVER = scope:inspiration_owner - } - } - save_scope_value_as = { #We save the type here for tooltips in fund_inspiration.1051 - name = tapestry - value = yes - } - } - 10 = { - modifier = { - OR = { - scope:adventurer.adventure_inspiration_average_skill_value >= medium_inspiration_skill - AND = { - exists = scope:inspiration_owner.var:artifact_quality - scope:inspiration_owner.var:artifact_quality > medium_adventurer_epic_quality_level #Cumulative event choices - } - } - add = -2 - } - trigger = { #Persian Drinking Vessel (goblet) - has_fp3_dlc_trigger = yes - trigger_if = { - limit = { exists = var:adventure_type } - OR = { - var:adventure_type = flag:trinket - var:adventure_type = flag:free_reign - } - } - scope:location = { geographical_region = world_middle_east_persia } - } - scope:owner = { - create_artifact_persian_drinking_vessel_effect = { - OWNER = scope:owner - SMITH = scope:inspiration_owner - } - } - save_scope_value_as = { #We save the type here for tooltips in fund_inspiration.1051 - name = goblet - value = yes - } - } - } - if = { - limit = { - exists = scope:epic - NOT = { exists = scope:task_contract_taker } - } - scope:epic = { - add_artifact_history = { - location = root.capital_province - actor = scope:adventurer - recipient = root - type = given - } - } - } - else_if = { - limit = { - exists = scope:newly_created_artifact - NOT = { exists = scope:task_contract_taker } - } - scope:newly_created_artifact = { - add_artifact_history = { - location = root.capital_province - actor = scope:adventurer - recipient = root - type = given - } - } - } - } - } -} diff --git a/N3OW/common/scripted_effects/00_ep1_inspiration_effects_sean.txt b/N3OW/common/scripted_effects/00_ep1_inspiration_effects_sean.txt deleted file mode 100644 index bd6fc5a0..00000000 --- a/N3OW/common/scripted_effects/00_ep1_inspiration_effects_sean.txt +++ /dev/null @@ -1,955 +0,0 @@ -################################################# -# EFFECT LIST # -################################################# -# -# Inspiration Generation Effects -# grant_inspiration_to_character_effect - Creates a new Inspiration and gives it to the scope character. Type of inspiration is weighted based on character skills and personality. -# grant_new_inspiration_in_character_realm_effect - Selects a random Pool character from the scope character's realm, then runs the above effect on them. Afterwards, move to visit the scope character's court. -# grant_new_inspiration_in_region_effect - Selects a random Royal Court in a given $GEOLOGICAL_REGION$. The Court's owner then has the above effect run on them. -# grant_new_inspiration_in_world_effect - Selects a random geological region in the world. The selected region then has the above effect run on it. -# -# Inspired Character Movement Effects -# inspired_character_travel_to_court_effect - Moves $INSPIRED_CHARACTER$ to the court of $NEW_HOST$. -# inspired_character_seek_out_new_royal_court_effect - Forces the scope character to look for a new, different Royal Court to visit as a guest. If one is found, uses the above effect to move there. - -################################################# -# Inspiration Generation Effects # -################################################# - -grant_inspiration_to_character_effect = { - $CHARACTER$ = { - if = { - limit = { NOT = { exists = inspiration } } - # More likely to get an certain Inspiration type if we will produce higher quality Artifacts of that type. - random_list = { - 10 = { - compare_modifier = { - value = weapon_inspiration_average_skill_value - multiplier = 6 - } - modifier = { #Some cultures are more likely to pick this vocation than others - add = 5 - culture = { - has_cultural_tradition = tradition_metal_craftsmanship - } - } - create_inspiration = weapon_inspiration - } - 10 = { # =Slightly increased weight due to a low number of Armorers appearing in the world. - compare_modifier = { - value = armor_inspiration_average_skill_value - multiplier = 7.2 # A character with an average of 20 in relevant skills will receive a +120 bonus - } - modifier = { #Some cultures are more likely to pick this vocation than others - add = 5 - culture = { - has_cultural_tradition = tradition_frugal_armorsmiths - } - } - create_inspiration = armor_inspiration - } - 10 = { #Adventurers will on average produce better quality items, handle with care. - compare_modifier = { - value = adventure_inspiration_average_skill_value - multiplier = 9 - } - modifier = { - add = 5 - culture = { #Some cultures are more likely to pick this vocation than others - OR = { - has_cultural_parameter = more_likely_to_leave_court #Swords for Hire & Caravaneers - has_cultural_tradition = tradition_chivalry - } - } - } - create_inspiration = adventure_inspiration - } - 12 = { # Significantly increased weight due to the wide variety of artifact types this inspiration can produce (regalia, crown, trinket). - compare_modifier = { - value = smith_inspiration_average_skill_value - multiplier = 15 - } - modifier = { #Some cultures are more likely to pick this vocation than others - add = 10 - culture = { - OR = { - has_cultural_tradition = tradition_metal_craftsmanship - has_cultural_tradition = tradition_ancient_miners - } - } - } - create_inspiration = smith_inspiration - } - 10 = { - compare_modifier = { - value = book_inspiration_average_skill_value - multiplier = 6 - } - modifier = { - has_court_position = court_poet_court_position - add = 15 - } - modifier = { - culture = { #Some cultures are more likely to pick this vocation than others - OR = { - has_cultural_tradition = tradition_language_scholars - has_cultural_tradition = tradition_philosopher_culture - has_cultural_tradition = tradition_legalistic - } - } - add = 5 - } - create_inspiration = book_inspiration - } - 11 = { # Increased weight due to a low number of Weavers appearing in the world (probably a lack of high-diplomacy courtiers). - compare_modifier = { - value = weaver_inspiration_average_skill_value - multiplier = 8.4 - } - modifier = { - culture = { #Some cultures are more likely to pick this vocation than others - has_cultural_parameter = improved_weaver_inspiration - } - add = 10 - } - create_inspiration = weaver_inspiration - } - 14 = { # Moderately increased weight due to the variety of artifact types this inspiration can produce (throne, sculpture). - compare_modifier = { - value = artisan_inspiration_average_skill_value - multiplier = 12 - } - modifier = { - has_court_position = court_poet_court_position - add = 5 - } - modifier = { - culture = { #Some cultures are more likely to pick this vocation than others - has_cultural_parameter = improved_artisan_inspiration - } - add = 15 - } - create_inspiration = artisan_inspiration - } - 1 = { - modifier = { - add = 30 - has_trait = lifestyle_mystic - } - modifier = { #Alchemy arrived to Europe in the 13th century, but existed basically everywhere else before that - add = -20 - culture_has_european_heritage_pillar_trigger = yes - } - compare_modifier = { - value = learning - multiplier = 2 - } - create_inspiration = alchemy_inspiration - } - 5 = { - compare_modifier = { - value = weapon_inspiration_average_skill_value - multiplier = 6 - } - modifier = { #Some cultures are more likely to pick this vocation than others - add = 5 - culture = { - has_cultural_tradition = tradition_longbow_competitions - } - } - create_inspiration = bow_inspiration - } - } - } - } -} - -grant_stewardship_inspiration_to_character_effect = { - $CHARACTER$ = { - if = { - limit = { NOT = { exists = inspiration } } - # More likely to get an certain Inspiration type if we will produce higher quality Artifacts of that type. - random_list = { - 12 = { # Significantly increased weight due to the wide variety of artifact types this inspiration can produce (regalia, crown, trinket). - compare_modifier = { - value = smith_inspiration_average_skill_value - multiplier = 15 - } - modifier = { #Some cultures are more likely to pick this vocation than others - add = 10 - culture = { - OR = { - has_cultural_tradition = tradition_metal_craftsmanship - has_cultural_tradition = tradition_ancient_miners - } - } - } - create_inspiration = smith_inspiration - } - 14 = { # Moderately increased weight due to the variety of artifact types this inspiration can produce (throne, sculpture). - compare_modifier = { - value = artisan_inspiration_average_skill_value - multiplier = 12 - } - modifier = { - has_court_position = court_poet_court_position - add = 5 - } - modifier = { - culture = { #Some cultures are more likely to pick this vocation than others - has_cultural_parameter = improved_artisan_inspiration - } - add = 15 - } - create_inspiration = artisan_inspiration - } - } - } - } -} - -grant_learning_inspiration_to_character_effect = { - $CHARACTER$ = { - if = { - limit = { NOT = { exists = inspiration } } - # More likely to get an certain Inspiration type if we will produce higher quality Artifacts of that type. - random_list = { - 10 = { - compare_modifier = { - value = book_inspiration_average_skill_value - multiplier = 6 - } - modifier = { - has_court_position = court_poet_court_position - add = 15 - } - modifier = { - culture = { #Some cultures are more likely to pick this vocation than others - OR = { - has_cultural_tradition = tradition_language_scholars - has_cultural_tradition = tradition_philosopher_culture - has_cultural_tradition = tradition_legalistic - } - } - add = 5 - } - modifier = { - factor = 0.5 - liege ?= { - any_equipped_character_artifact = { - count >= 2 - artifact_slot_type = book - } - } - } - create_inspiration = book_inspiration - } - 10 = { # Increased weight due to a low number of Weavers appearing in the world (probably a lack of high-diplomacy courtiers). - trigger = { - diplomacy >= 10 - } - compare_modifier = { - value = weaver_inspiration_average_skill_value - multiplier = 8.4 - } - modifier = { - culture = { #Some cultures are more likely to pick this vocation than others - has_cultural_parameter = improved_weaver_inspiration - } - add = 10 - } - modifier = { - factor = 0.1 - liege ?= { - any_equipped_character_artifact = { - count >= 3 - artifact_slot_type = wall_big - } - } - } - create_inspiration = weaver_inspiration - } - 1 = { - modifier = { - add = 30 - has_trait = lifestyle_mystic - } - compare_modifier = { - value = learning - multiplier = 2 - } - modifier = { #Alchemy arrived to Europe in the 13th century, but existed basically everywhere else before that - factor = 0.1 - culture_has_european_heritage_pillar_trigger = yes - current_year < 1300 - } - create_inspiration = alchemy_inspiration - } - } - } - } -} - -grant_martial_inspiration_to_character_effect = { - $CHARACTER$ = { - if = { - limit = { NOT = { exists = inspiration } } - # More likely to get an certain Inspiration type if we will produce higher quality Artifacts of that type. - random_list = { - 1 = { #Adventurers will on average produce better quality items, handle with care. - compare_modifier = { - value = adventure_inspiration_average_skill_value - multiplier = 9 - } - modifier = { - add = 5 - culture = { #Some cultures are more likely to pick this vocation than others - OR = { - has_cultural_parameter = more_likely_to_leave_court #Swords for Hire & Caravaneers - has_cultural_tradition = tradition_chivalry - } - } - } - create_inspiration = adventure_inspiration - } - 10 = { - compare_modifier = { - value = weapon_inspiration_average_skill_value - multiplier = 6 - } - modifier = { #Some cultures are more likely to pick this vocation than others - add = 5 - culture = { - has_cultural_tradition = tradition_metal_craftsmanship - } - } - modifier = { - factor = 0.1 - liege ?= { - any_equipped_character_artifact = { - artifact_slot_type = primary_armament - } - } - } - create_inspiration = weapon_inspiration - } - 10 = { # =Slightly increased weight due to a low number of Armorers appearing in the world. - compare_modifier = { - value = armor_inspiration_average_skill_value - multiplier = 7.2 # A character with an average of 20 in relevant skills will receive a +120 bonus - } - modifier = { #Some cultures are more likely to pick this vocation than others - add = 5 - culture = { - has_cultural_tradition = tradition_frugal_armorsmiths - } - } - modifier = { - factor = 0.1 - liege ?= { - any_equipped_character_artifact = { - artifact_slot_type = armor - } - } - } - create_inspiration = armor_inspiration - } - 5 = { - compare_modifier = { - value = weapon_inspiration_average_skill_value - multiplier = 6 - } - modifier = { #Some cultures are more likely to pick this vocation than others - add = 5 - culture = { - has_cultural_tradition = tradition_longbow_competitions - } - } - create_inspiration = bow_inspiration - } - } - } - } -} - -grant_inspiration_to_character_no_court_artifacts_effect = { - save_scope_as = court_owner - $CHARACTER$ = { - if = { - limit = { NOT = { exists = inspiration } } - # More likely to get an certain Inspiration type if we will produce higher quality Artifacts of that type. - random_list = { - 10 = { - compare_modifier = { - value = weapon_inspiration_average_skill_value - multiplier = { - value = 5 - #Lower the military inspirations for Advancement Movement - if = { - limit = { - scope:court_owner = { - top_participant_group:dynastic_cycle ?= { - participant_group_type = advancement_movement - } - } - } - multiply = 0 - } - } - } - modifier = { #Some cultures are more likely to pick this vocation than others - add = 5 - culture = { - has_cultural_tradition = tradition_metal_craftsmanship - } - } - create_inspiration = weapon_inspiration - } - 10 = { - compare_modifier = { - value = armor_inspiration_average_skill_value - multiplier = { - value = 5 - #Lower the military inspirations for Advancement Movement - if = { - limit = { - scope:court_owner = { - top_participant_group:dynastic_cycle ?= { - participant_group_type = advancement_movement - } - } - } - multiply = 0 - } - } - } - modifier = { #Some cultures are more likely to pick this vocation than others - add = 5 - culture = { - has_cultural_tradition = tradition_frugal_armorsmiths - } - } - create_inspiration = armor_inspiration - } - 5 = { - compare_modifier = { - value = smith_inspiration_average_skill_value - multiplier = 5 - } - modifier = { #Some cultures are more likely to pick this vocation than others - add = 10 - culture = { - OR = { - has_cultural_tradition = tradition_metal_craftsmanship - has_cultural_tradition = tradition_ancient_miners - } - } - } - create_inspiration = smith_inspiration - } - 5 = { - compare_modifier = { - value = book_inspiration_average_skill_value - multiplier = 5 - } - modifier = { - has_court_position = court_poet_court_position - add = 15 - } - modifier = { - culture = { #Some cultures are more likely to pick this vocation than others - OR = { - has_cultural_tradition = tradition_language_scholars - has_cultural_tradition = tradition_philosopher_culture - has_cultural_tradition = tradition_legalistic - } - } - add = 5 - } - create_inspiration = book_inspiration - } - 1 = { - modifier = { - add = 30 - has_trait = lifestyle_mystic - } - modifier = { #Alchemy arrived to Europe in the 13th century, but existed basically everywhere else before that - add = -20 - culture_has_european_heritage_pillar_trigger = yes - } - compare_modifier = { - value = learning - multiplier = 2 - } - create_inspiration = alchemy_inspiration - } - 5 = { - compare_modifier = { - value = weapon_inspiration_average_skill_value - multiplier = { - value = 6 - #Lower the military inspirations for Advancement Movement - if = { - limit = { - scope:court_owner = { - top_participant_group:dynastic_cycle ?= { - participant_group_type = advancement_movement - } - } - } - multiply = 0 - } - } - } - modifier = { #Some cultures are more likely to pick this vocation than others - add = 5 - culture = { - has_cultural_tradition = tradition_longbow_competitions - } - } - create_inspiration = bow_inspiration - } - } - } - } -} - -grant_new_inspiration_in_character_realm_effect = { - save_scope_as = royal_court_owner - every_sub_realm_barony = { - title_province = { - every_pool_character = { - province = this - limit = { - ep1_is_valid_character_for_inspiration_trigger = yes - } - add_to_list = potential_inspired_people - } - } - } - - random_in_list = { - list = potential_inspired_people - weight = { - base = 1 - - modifier = { #Poets are more likely to become inspired - add = 40 - has_trait = lifestyle_poet - } - - # More learned characters have a greater pool to draw from for their inspirations. - compare_modifier = { - value = learning - multiplier = 5 - } - - # Older characters are more likely to be inspired from their life's experience. - compare_modifier = { - value = age - } - - # We don't want character dropping dead from old age, injuries, or disease right after they begin work on a project! - compare_modifier = { - value = health - multiplier = 20 - } - - # 'Ambitious' characters are more likely to get an inspiration/seek patronage - ai_value_modifier = { - ai_greed = 0.25 - ai_boldness = 0.25 - ai_sociability = 0.10 - ai_rationality = 0.10 - } - } - save_scope_as = inspired_person - } - - # If we were unable to find a valid pool character, create one. - if = { - limit = { - NOT = { exists = scope:inspired_person } - } - create_character = { - template = inspired_template - location = scope:royal_court_owner.capital_province - faith = scope:royal_court_owner.faith - culture = scope:royal_court_owner.culture - gender_female_chance = 50 - save_scope_as = inspired_person - } - } - # Clear the list in case this effect gets re-used in the same scope. - every_in_list = { - list = potential_inspired_people - remove_from_list = potential_inspired_people - } - - scope:inspired_person = { - grant_inspiration_to_character_effect = { CHARACTER = this } - # Travel to the new host's court. - inspired_character_travel_to_court_effect = { - INSPIRED_CHARACTER = scope:inspired_person - NEW_HOST = scope:royal_court_owner - } - } - -} - -grant_new_inspiration_in_region_effect = { - random_character_with_royal_court = { - limit = { - capital_province ?= { - geographical_region = $GEOGRAPHICAL_REGION$ - } - save_temporary_scope_as = tmp_royal_court_owner # Used in 'inspiration_kingdom_modifier' to calculate draw towards this specific court in the region. - } - - weight = { - base = 1 - inspiration_royal_court_grandeur_attraction_modifier = yes - inspiration_royal_court_oversaturation_penalty_modifier = yes - } - - grant_new_inspiration_in_character_realm_effect = yes - } -} - -grant_new_inspiration_in_world_effect = { - # When generating new inspired characters, the following criteria are taken into account: - # - The specified region *must* be the home of at least 1 royal court to be eligible. - # - Increased chance for regions which have multiple royal courts. - # - Increased chance for regions which have incredibly prestigious royal courts. - # - Greatly reduced chance for regions which already have multiple inspired people wandering around within them. - - random_list = { - # Europe - 1 = { - trigger = { any_character_with_royal_court = { exists = capital_province capital_province = { geographical_region = world_europe_west } } } - inspiration_region_court_grandeur_attraction_modifier = { GEOGRAPHICAL_REGION = world_europe_west } - inspiration_region_oversaturation_penalty_modifier = { GEOGRAPHICAL_REGION = world_europe_west } - grant_new_inspiration_in_region_effect = { GEOGRAPHICAL_REGION = world_europe_west } - } - 1 = { - trigger = { any_character_with_royal_court = { exists = capital_province capital_province = { geographical_region = world_europe_north } } } - inspiration_region_court_grandeur_attraction_modifier = { GEOGRAPHICAL_REGION = world_europe_north } - inspiration_region_oversaturation_penalty_modifier = { GEOGRAPHICAL_REGION = world_europe_north } - grant_new_inspiration_in_region_effect = { GEOGRAPHICAL_REGION = world_europe_north } - } - 1 = { - trigger = { any_character_with_royal_court = { exists = capital_province capital_province = { geographical_region = world_europe_south } } } - inspiration_region_court_grandeur_attraction_modifier = { GEOGRAPHICAL_REGION = world_europe_south } - inspiration_region_oversaturation_penalty_modifier = { GEOGRAPHICAL_REGION = world_europe_south } - grant_new_inspiration_in_region_effect = { GEOGRAPHICAL_REGION = world_europe_south } - } - 1 = { - trigger = { any_character_with_royal_court = { exists = capital_province capital_province = { geographical_region = world_europe_east } } } - inspiration_region_court_grandeur_attraction_modifier = { GEOGRAPHICAL_REGION = world_europe_east } - inspiration_region_oversaturation_penalty_modifier = { GEOGRAPHICAL_REGION = world_europe_east } - grant_new_inspiration_in_region_effect = { GEOGRAPHICAL_REGION = world_europe_east } - } - # Middle East/Asia Minor - 1 = { - trigger = { any_character_with_royal_court = { exists = capital_province capital_province = { geographical_region = world_asia_minor } } } - inspiration_region_court_grandeur_attraction_modifier = { GEOGRAPHICAL_REGION = world_asia_minor } - inspiration_region_oversaturation_penalty_modifier = { GEOGRAPHICAL_REGION = world_asia_minor } - grant_new_inspiration_in_region_effect = { GEOGRAPHICAL_REGION = world_asia_minor } - } - 1 = { - trigger = { any_character_with_royal_court = { exists = capital_province capital_province = { geographical_region = world_middle_east_jerusalem } } } - inspiration_region_court_grandeur_attraction_modifier = { GEOGRAPHICAL_REGION = world_middle_east_jerusalem } - inspiration_region_oversaturation_penalty_modifier = { GEOGRAPHICAL_REGION = world_middle_east_jerusalem } - grant_new_inspiration_in_region_effect = { GEOGRAPHICAL_REGION = world_middle_east_jerusalem } - } - 1 = { - trigger = { any_character_with_royal_court = { exists = capital_province capital_province = { geographical_region = world_middle_east_arabia } } } - inspiration_region_court_grandeur_attraction_modifier = { GEOGRAPHICAL_REGION = world_middle_east_arabia } - inspiration_region_oversaturation_penalty_modifier = { GEOGRAPHICAL_REGION = world_middle_east_arabia } - grant_new_inspiration_in_region_effect = { GEOGRAPHICAL_REGION = world_middle_east_arabia } - } - 1 = { - trigger = { any_character_with_royal_court = { exists = capital_province capital_province = { geographical_region = world_middle_east_persia } } } - inspiration_region_court_grandeur_attraction_modifier = { GEOGRAPHICAL_REGION = world_middle_east_persia } - inspiration_region_oversaturation_penalty_modifier = { GEOGRAPHICAL_REGION = world_middle_east_persia } - grant_new_inspiration_in_region_effect = { GEOGRAPHICAL_REGION = world_middle_east_persia } - } - - # India - 1 = { - trigger = { any_character_with_royal_court = { exists = capital_province capital_province = { geographical_region = world_india_deccan } } } - inspiration_region_court_grandeur_attraction_modifier = { GEOGRAPHICAL_REGION = world_india_deccan } - inspiration_region_oversaturation_penalty_modifier = { GEOGRAPHICAL_REGION = world_india_deccan } - grant_new_inspiration_in_region_effect = { GEOGRAPHICAL_REGION = world_india_deccan } - } - 1 = { - trigger = { any_character_with_royal_court = { exists = capital_province capital_province = { geographical_region = world_india_bengal } } } - inspiration_region_court_grandeur_attraction_modifier = { GEOGRAPHICAL_REGION = world_india_bengal } - inspiration_region_oversaturation_penalty_modifier = { GEOGRAPHICAL_REGION = world_india_bengal } - grant_new_inspiration_in_region_effect = { GEOGRAPHICAL_REGION = world_india_bengal } - } - 1 = { - trigger = { any_character_with_royal_court = { exists = capital_province capital_province = { geographical_region = world_india_rajastan } } } - inspiration_region_court_grandeur_attraction_modifier = { GEOGRAPHICAL_REGION = world_india_rajastan } - inspiration_region_oversaturation_penalty_modifier = { GEOGRAPHICAL_REGION = world_india_rajastan } - grant_new_inspiration_in_region_effect = { GEOGRAPHICAL_REGION = world_india_rajastan } - } - - # Africa - 1 = { - trigger = { any_character_with_royal_court = { exists = capital_province capital_province = { geographical_region = world_africa_north } } } - inspiration_region_court_grandeur_attraction_modifier = { GEOGRAPHICAL_REGION = world_africa_north } - inspiration_region_oversaturation_penalty_modifier = { GEOGRAPHICAL_REGION = world_africa_north } - grant_new_inspiration_in_region_effect = { GEOGRAPHICAL_REGION = world_africa_north } - } - 1 = { - trigger = { any_character_with_royal_court = { exists = capital_province capital_province = { geographical_region = world_africa_west } } } - inspiration_region_court_grandeur_attraction_modifier = { GEOGRAPHICAL_REGION = world_africa_west } - inspiration_region_oversaturation_penalty_modifier = { GEOGRAPHICAL_REGION = world_africa_west } - grant_new_inspiration_in_region_effect = { GEOGRAPHICAL_REGION = world_africa_west } - } - 1 = { - trigger = { any_character_with_royal_court = { exists = capital_province capital_province = { geographical_region = world_africa_east } } } - inspiration_region_court_grandeur_attraction_modifier = { GEOGRAPHICAL_REGION = world_africa_east } - inspiration_region_oversaturation_penalty_modifier = { GEOGRAPHICAL_REGION = world_africa_east } - grant_new_inspiration_in_region_effect = { GEOGRAPHICAL_REGION = world_africa_east } - } - - # Steppe - 1 = { - trigger = { any_character_with_royal_court = { exists = capital_province capital_province = { geographical_region = world_steppe } } } - inspiration_region_court_grandeur_attraction_modifier = { GEOGRAPHICAL_REGION = world_steppe } - inspiration_region_oversaturation_penalty_modifier = { GEOGRAPHICAL_REGION = world_steppe } - grant_new_inspiration_in_region_effect = { GEOGRAPHICAL_REGION = world_steppe } - } - - # Tibet - 1 = { - trigger = { any_character_with_royal_court = { exists = capital_province capital_province = { geographical_region = world_tibet } } } - inspiration_region_court_grandeur_attraction_modifier = { GEOGRAPHICAL_REGION = world_tibet } - inspiration_region_oversaturation_penalty_modifier = { GEOGRAPHICAL_REGION = world_tibet } - grant_new_inspiration_in_region_effect = { GEOGRAPHICAL_REGION = world_tibet } - } - - # Burma - 1 = { - trigger = { any_character_with_royal_court = { exists = capital_province capital_province = { geographical_region = world_burma } } } - inspiration_region_court_grandeur_attraction_modifier = { GEOGRAPHICAL_REGION = world_burma } - inspiration_region_oversaturation_penalty_modifier = { GEOGRAPHICAL_REGION = world_burma } - grant_new_inspiration_in_region_effect = { GEOGRAPHICAL_REGION = world_burma } - } - - # China - 1 = { - trigger = { any_character_with_royal_court = { exists = capital_province capital_province = { geographical_region = world_asia_china } } } - inspiration_region_court_grandeur_attraction_modifier = { GEOGRAPHICAL_REGION = world_asia_china } - inspiration_region_oversaturation_penalty_modifier = { GEOGRAPHICAL_REGION = world_asia_china } - grant_new_inspiration_in_region_effect = { GEOGRAPHICAL_REGION = world_asia_china } - } - - # Japan - 1 = { - trigger = { any_character_with_royal_court = { exists = capital_province capital_province = { geographical_region = world_asia_japan } } } - inspiration_region_court_grandeur_attraction_modifier = { GEOGRAPHICAL_REGION = world_asia_japan } - inspiration_region_oversaturation_penalty_modifier = { GEOGRAPHICAL_REGION = world_asia_japan } - grant_new_inspiration_in_region_effect = { GEOGRAPHICAL_REGION = world_asia_japan } - } - - # Korea - 1 = { - trigger = { any_character_with_royal_court = { exists = capital_province capital_province = { geographical_region = world_asia_korea } } } - inspiration_region_court_grandeur_attraction_modifier = { GEOGRAPHICAL_REGION = world_asia_korea } - inspiration_region_oversaturation_penalty_modifier = { GEOGRAPHICAL_REGION = world_asia_korea } - grant_new_inspiration_in_region_effect = { GEOGRAPHICAL_REGION = world_asia_korea } - } - # Southeast Asia - 1 = { - trigger = { any_character_with_royal_court = { exists = capital_province capital_province = { geographical_region = world_asia_southeast } } } - inspiration_region_court_grandeur_attraction_modifier = { GEOGRAPHICAL_REGION = world_asia_southeast } - inspiration_region_oversaturation_penalty_modifier = { GEOGRAPHICAL_REGION = world_asia_southeast } - grant_new_inspiration_in_region_effect = { GEOGRAPHICAL_REGION = world_asia_southeast } - } - } -} - -################################################# -# Inspired Character Movement Effects # -################################################# - -inspired_character_travel_to_court_effect = { - $INSPIRED_CHARACTER$ = { - save_scope_as = ttc_inspired_character - inspiration = { save_scope_as = ttc_inspiration } - #Save our current host (so we don't return to their court too quickly!). - if = { - limit = { exists = host } - set_variable = { - name = last_visited_ruler - value = this.host - days = 1825 - } - } - # If no current host, save as dummy character so we at least have something to compare to. - else = { - set_variable = { - name = last_visited_ruler - value = dummy_female - days = 1825 - } - } - - visit_court_of = $NEW_HOST$ - add_character_flag = { - flag = inspired_character_recent_arrival - months = inspired_character_recent_arrival_duration_value - } - } -} - -inspired_character_seek_out_new_royal_court_effect = { - save_scope_as = inspired_character - - # Look to see if there is a nearby court we can visit that might fund our inspiration. - random_character_with_royal_court = { - limit = { - # Do not travel outside of diplomatic range in a single 'jump' - in_diplomatic_range = scope:inspired_character - - # Do not visit the ruler we had just left, unless at least 5 years have passed. - trigger_if = { - limit = { scope:inspired_character = { has_variable = last_visited_ruler } } - scope:inspired_character.var:last_visited_ruler != this - } - - # Only visit rulers who do not consider our faith to be hostile, if possible. - faith = { - faith_hostility_level = { - target = scope:inspired_character.faith - value <= faith_hostile_level - } - } - exists = capital_province - save_temporary_scope_as = tmp_royal_court_owner # Used in 'inspiration_kingdom_modifier' to calculate draw towards this specific court in the region. - } - alternative_limit = { - in_diplomatic_range = scope:inspired_character - trigger_if = { - limit = { scope:inspired_character = { has_variable = last_visited_ruler } } - scope:inspired_character.var:last_visited_ruler != this - } - # Failing that, if possible do not visit rulers who consider our faith to be outright evil. - faith = { - faith_hostility_level = { - target = scope:inspired_character.faith - value <= faith_evil_level - } - } - exists = capital_province - save_temporary_scope_as = tmp_royal_court_owner - } - alternative_limit = { - # Failing that, we can visit anyone else in range. - in_diplomatic_range = scope:inspired_character - trigger_if = { - limit = { scope:inspired_character = { has_variable = last_visited_ruler } } - scope:inspired_character.var:last_visited_ruler != this - } - exists = capital_province - save_temporary_scope_as = tmp_royal_court_owner - } - - weight = { - base = 10 - inspiration_royal_court_grandeur_attraction_modifier = yes - - # Prefer visiting royal courts which are physically closer to us - modifier = { - factor = 0.9 # Total 90.0% weight - capital_province = { - squared_distance = { - target = scope:inspired_character.location - value >= squared_distance_small #150 map-pixels. Roughly one Wales away (top to bottom). - } - } - } - modifier = { - factor = 0.8 # Total 72.0% weight - capital_province = { - squared_distance = { - target = scope:inspired_character.location - value >= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). - } - } - } - modifier = { - factor = 0.6 # Total 43.2% weight - capital_province = { - squared_distance = { - target = scope:inspired_character.location - value >= squared_distance_large #650 map-pixels. Roughly one France away (top to bottom). - } - } - } - modifier = { - factor = 0.3 # Total 12.9% weight - capital_province = { - squared_distance = { - target = scope:inspired_character.location - value >= squared_distance_huge #850 map-pixels. Roughly one Holy Roman Empire away (left to right). - } - } - } - - # Down-prioritize courts with a lot of inspired people already - modifier = { - factor = 0.9 - any_courtier_or_guest = { - count >= 2 - exists = inspiration - } - } - modifier = { - factor = 0.8 - any_courtier_or_guest = { - count >= 3 - exists = inspiration - } - } - modifier = { - factor = 0.7 - any_courtier_or_guest = { - count >= 4 - exists = inspiration - } - } - modifier = { - factor = 0.6 - any_courtier_or_guest = { - count >= 5 - exists = inspiration - } - } - modifier = { - factor = 0.001 - any_courtier_or_guest = { - count >= 6 - exists = inspiration - } - } - } - save_scope_as = new_host - } - - # If we have successfully located a new host... - if = { - limit = { - exists = scope:new_host - } - - # ...travel to the new host's court. - inspired_character_travel_to_court_effect = { - INSPIRED_CHARACTER = scope:inspired_character - NEW_HOST = scope:new_host - } - } -} diff --git a/N3OW/common/scripted_effects/00_ep3_decision_effects.txt b/N3OW/common/scripted_effects/00_ep3_decision_effects.txt deleted file mode 100644 index 3d6743c2..00000000 --- a/N3OW/common/scripted_effects/00_ep3_decision_effects.txt +++ /dev/null @@ -1,618 +0,0 @@ -# This effect requires you to input which convert to convert to with GOVERNMENT_TO_ADOPT -# If you want it to be dynamic, simply use "flag:dynamic" -# Otherwise, set the government you want to adopt -convert_to_administrative_from_feudalism_effect = { - save_scope_as = administrative_liege - - switch = { - trigger = $GOVERNMENT_TO_ADOPT$ - flag:dynamic = { # If we want the selection to be dynamic, save and clear the scope to prevent errors - save_scope_value_as = { - name = has_selected_a_government - value = flag:dynamic - } - clear_saved_scope = has_selected_a_government - } - flag:administrative = { # administrative_government / Administrative - save_scope_value_as = { - name = has_selected_a_government - value = flag:administrative - } - } - flag:celestial = { # celestial_government / Celestial - save_scope_value_as = { - name = has_selected_a_government - value = flag:celestial - } - } - flag:meritocratic = { # meritocratic_government / Meritocratic - save_scope_value_as = { - name = has_selected_a_government - value = flag:meritocratic - } - } - flag:japan_administrative = { # japan_administrative_government / Ritsuryo - save_scope_value_as = { - name = has_selected_a_government - value = flag:japan_administrative - } - } - } - - change_to_administrative_effect = yes - - #Direct Vassals who fulfill the ep3_vassal_will_become_admin criteria are converted. Vassals above 25 opinion always accept - #Vassals are converted as a hierarchy. If a king is converted we convert all who are valid below that king (so his dukes, their counts, and their barons) are all converted. - #If a vassal does not convert (because of not accepting or because they are outside of the de jure empire, etc) then the vassals below them are _not_ converted either. - - #Human vassals are given a choice to convert or not in the ping event, even if powerful or having very good relation. - - hidden_effect = { - save_scope_as = actor - every_powerful_vassal = { #All valid powerful vassals auto convert - their support was required to take the decision. - limit = { - ep3_vassal_will_become_admin = yes - is_ai = yes - } - save_scope_as = recipient - change_to_administrative_effect = yes - every_vassal = { #Everyone below also converts - limit = { - ep3_vassal_will_become_admin = yes #We still don't want mayors and bishops - is_ai = yes - } - save_scope_as = recipient - change_to_administrative_effect = yes - every_vassal = { #Everyone below also converts (could be Counts, could be Barons) - limit = { - ep3_vassal_will_become_admin = yes #We still don't want mayors and bishops - is_ai = yes - } - save_scope_as = recipient - change_to_administrative_effect = yes - every_vassal = { #Everyone below also converts could be Barons) - limit = { - ep3_vassal_will_become_admin = yes #We still don't want mayors and bishops - is_ai = yes - } - save_scope_as = recipient - change_to_administrative_effect = yes - } - } - } - } - every_vassal = { - limit = { - ep3_vassal_will_become_admin = yes - trigger_if = { #Dukes and above can say no - limit = { - primary_title.tier >= tier_duchy - is_ai = yes - } - opinion = { - target = scope:administrative_liege - value > 25 - } - } - } - save_scope_as = recipient - change_to_administrative_effect = yes - every_vassal = { #Everyone below also converts (could be Counts, could be Dukes) - limit = { - ep3_vassal_will_become_admin = yes #We still don't want mayors and bishops - is_ai = yes - } - save_scope_as = recipient - change_to_administrative_effect = yes - every_vassal = { #Everyone below also converts (Could be Counts, could be Barons) - limit = { - ep3_vassal_will_become_admin = yes #We still don't want mayors and bishops - is_ai = yes - } - save_scope_as = recipient - change_to_administrative_effect = yes - every_vassal = { #Everyone below also converts (could be Barons) - limit = { - ep3_vassal_will_become_admin = yes #We still don't want mayors and bishops - is_ai = yes - } - save_scope_as = recipient - change_to_administrative_effect = yes - } - } - } - } - every_vassal = { - limit = { - ep3_vassal_will_become_admin = yes - trigger_if = { #Dukes and above can say no - limit = { - primary_title.tier >= tier_duchy - is_ai = yes - } - opinion = { - target = scope:administrative_liege - value > 0 - } - } - } - random_list = { - 10 = { } #10% of the vassals that like us less than 25 but more than 0 still convert. - 90 = { - save_scope_as = recipient - change_to_administrative_effect = yes - every_vassal = { #Everyone below also converts (could be Counts, could be Dukes) - limit = { - ep3_vassal_will_become_admin = yes #We still don't want mayors and bishops - is_ai = yes - } - save_scope_as = recipient - change_to_administrative_effect = yes - every_vassal = { #Everyone below also converts (Could be Counts, could be Barons) - limit = { - ep3_vassal_will_become_admin = yes #We still don't want mayors and bishops - is_ai = yes - } - save_scope_as = recipient - change_to_administrative_effect = yes - every_vassal = { #Everyone below also converts (could be Barons) - limit = { - ep3_vassal_will_become_admin = yes #We still don't want mayors and bishops - is_ai = yes - } - save_scope_as = recipient - change_to_administrative_effect = yes - } - } - } - } - } - } - every_vassal = { - limit = { - highest_held_title_tier >= tier_duchy - house.house_head ?= this - government_has_flag = government_is_administrative - NOT = { - any_held_title = { is_noble_family_title = yes } - } - } - create_noble_family_effect = { GOVERNMENT_GIVER = this } - } - } - - if = { - limit = { - NOT = { - has_character_flag = latin_emp_force_admin_flag - } - top_liege = this - } - add_character_modifier = { - modifier = first_admin_emperor - } - } - - change_influence = admin_convert_influence_value - - custom_description_no_bullet = { - text = vassals_can_become_administrative - } - custom_tooltip = powerful_vassals_become_administrative - custom_tooltip = vassals_become_administrative - custom_tooltip = vassals_who_may_switch_to_administrative -} - -convert_to_administrative_from_feudalism_game_start_effect = { - if = { - limit = { has_dlc_feature = roads_to_power } - # Because we run this twice, since folks can change in the lobby. - if = { - limit = { - NOT = { government_has_flag = government_is_administrative } - } - change_government = administrative_government - create_noble_family_effect = { GOVERNMENT_GIVER = this } - add_to_list = estatified_list - } - - every_vassal_or_below = { - limit = { - highest_held_title_tier >= tier_county - OR = { - government_has_flag = government_is_feudal - government_has_flag = government_is_clan - government_has_flag = government_is_tribal - } - NOR = { - faith.religious_head ?= this - liege = { - faith.religious_head ?= this - top_liege != this - } - AND = { - exists = scope:ignore_culture - culture = scope:ignore_culture - } - } - } - change_to_administrative_effect = yes - } - } -} - -apply_historic_administrative_game_rule_effect = { - # We'll be doing some excessive triggers below in a bid to lightly future-proof + error-spam mods less, don't worry about it. - ## We also do player-specific realms separately — we need to know what their realm is so we do it after the lobby exclusively. - # Egypt. - if = { - limit = { - NOT = { has_game_rule = historicity_extra_admin_egypt_gameplay_not_administrative } - exists = title:k_egypt - } - if = { - limit = { has_game_rule = historicity_extra_admin_egypt_historic_always } - title:k_egypt.holder ?= { convert_to_administrative_from_feudalism_game_start_effect = yes } - } - } - # Arabia. - if = { - limit = { - NOT = { has_game_rule = historicity_extra_admin_arabia_gameplay_not_administrative } - exists = title:e_arabia - } - if = { - limit = { has_game_rule = historicity_extra_admin_arabia_historic_867 } - # Give the Armenians a fighting chance. - culture:armenian = { save_scope_as = ignore_culture } - title:e_arabia.holder ?= { convert_to_administrative_from_feudalism_game_start_effect = yes } - } - } - # Ghana. - if = { - limit = { - NOT = { has_game_rule = historicity_extra_admin_ghana_gameplay_not_administrative } - exists = title:k_ghana - } - if = { - limit = { has_game_rule = historicity_extra_admin_ghana_historic_always } - title:k_ghana.holder ?= { convert_to_administrative_from_feudalism_game_start_effect = yes } - } - } - # Kabulistan/the Ghaznivids. - if = { - limit = { - NOT = { has_game_rule = historicity_extra_admin_kabulistan_gameplay_not_administrative } - exists = title:k_kabulistan - } - if = { - limit = { has_game_rule = historicity_extra_admin_kabulistan_historic_always } - title:k_kabulistan.holder ?= { convert_to_administrative_from_feudalism_game_start_effect = yes } - } - } - # Persia. - if = { - limit = { - NOT = { has_game_rule = historicity_extra_admin_persia_gameplay_not_administrative } - exists = title:e_persia - exists = title:k_persia - } - if = { - limit = { - game_start_date = 1178.10.1 - has_game_rule = historicity_extra_admin_persia_historic_1178 - } - title:k_persia.holder ?= { convert_to_administrative_from_feudalism_game_start_effect = yes } - } - else_if = { - limit = { has_game_rule = historicity_extra_admin_persia_alt_historic_always } - # Independent k_persia. - if = { - limit = { - title:k_persia.holder ?= { top_liege = this } - } - title:k_persia.holder ?= { convert_to_administrative_from_feudalism_game_start_effect = yes } - } - # Else, the empire. - else = { - title:e_persia.holder ?= { convert_to_administrative_from_feudalism_game_start_effect = yes } - } - } - } - # Maghreb. - if = { - limit = { - NOT = { has_game_rule = historicity_extra_admin_maghreb_gameplay_not_administrative } - exists = title:k_maghreb - } - if = { - limit = { - game_start_date >= 1066.9.15 - has_game_rule = historicity_extra_admin_maghreb_historic_post_1066 - } - title:k_maghreb.holder ?= { convert_to_administrative_from_feudalism_game_start_effect = yes } - } - else_if = { - limit = { has_game_rule = historicity_extra_admin_maghreb_alt_historic_always } - title:k_maghreb.holder ?= { convert_to_administrative_from_feudalism_game_start_effect = yes } - } - } - # Tamilakam/the Cholas. - if = { - limit = { - NOT = { has_game_rule = historicity_extra_admin_tamilakam_gameplay_not_administrative } - exists = title:k_tamilakam - } - if = { - limit = { - game_start_date = 1066.9.15 - has_game_rule = historicity_extra_admin_tamilakam_historic_1066 - } - title:k_tamilakam.holder ?= { convert_to_administrative_from_feudalism_game_start_effect = yes } - } - else_if = { - limit = { has_game_rule = historicity_extra_admin_tamilakam_alt_historic_always } - title:k_tamilakam.holder ?= { convert_to_administrative_from_feudalism_game_start_effect = yes } - } - } - # The Carolingians. - if = { - limit = { - NOT = { has_game_rule = historicity_extra_admin_carolingians_gameplay_not_administrative } - game_start_date = 867.1.1 - exists = title:k_france - exists = title:k_lotharingia - exists = title:k_east_francia - exists = title:k_italy - } - if = { - limit = { has_game_rule = historicity_extra_admin_carolingians_alt_historic_all_administrative } - title:k_france.holder ?= { convert_to_administrative_from_feudalism_game_start_effect = yes } - title:k_lotharingia.holder ?= { convert_to_administrative_from_feudalism_game_start_effect = yes } - title:k_east_francia.holder ?= { convert_to_administrative_from_feudalism_game_start_effect = yes } - title:k_italy.holder ?= { convert_to_administrative_from_feudalism_game_start_effect = yes } - } - if = { - limit = { has_game_rule = historicity_extra_admin_carolingians_alt_historic_west_francia_administrative } - title:k_france.holder ?= { convert_to_administrative_from_feudalism_game_start_effect = yes } - } - if = { - limit = { has_game_rule = historicity_extra_admin_carolingians_alt_historic_lotharingia_administrative } - title:k_lotharingia.holder ?= { convert_to_administrative_from_feudalism_game_start_effect = yes } - } - if = { - limit = { has_game_rule = historicity_extra_admin_carolingians_alt_historic_east_francia_administrative } - title:k_east_francia.holder ?= { convert_to_administrative_from_feudalism_game_start_effect = yes } - } - if = { - limit = { has_game_rule = historicity_extra_admin_carolingians_alt_historic_italy_administrative } - title:k_italy.holder ?= { convert_to_administrative_from_feudalism_game_start_effect = yes } - } - } -} - -convert_to_feudalism_from_administrative_effect = { - #Gain some gold for selling off your estates - if = { - limit = { - any_vassal = { - any_held_title = { is_noble_family_title = yes } - exists = domicile - } - } - custom_tooltip = estates_get_bought - every_vassal = { - limit = { - any_held_title = { is_noble_family_title = yes } - exists = domicile - } - hidden_effect = { - add_gold = { - value = { - value = major_gold_value - switch = { - trigger = domicile.num_domicile_buildings - 7 = { multiply = 7 } - 6 = { multiply = 6 } - 5 = { multiply = 5 } - 4 = { multiply = 4 } - 3 = { multiply = 3 } - 2 = { multiply = 2 } - } - } - } - } - } - } - - #Then change government - if = { - limit = { ep3_is_clan_inclined_trigger = yes } - change_government = clan_government - - #Duchies automatically transfer, need to poke the kingdoms - if = { - limit = { - any_vassal = { - primary_title.tier >= tier_kingdom - NOR = { - government_has_flag = government_is_clan - government_has_flag = government_is_theocracy - } - } - } - custom_tooltip = kings_become_clan - every_vassal = { - limit = { - primary_title.tier >= tier_kingdom - NOR = { - government_has_flag = government_is_clan - government_has_flag = government_is_theocracy - } - } - hidden_effect = { change_government = clan_government } - } - } - } - else = { - change_government = feudal_government - - #Duchies automatically transfer, need to poke the kingdoms - if = { - limit = { - any_vassal = { - primary_title.tier >= tier_kingdom - NOR = { - government_has_flag = government_is_feudal - government_has_flag = government_is_theocracy - } - } - } - custom_tooltip = kings_become_feudal - every_vassal = { - limit = { - primary_title.tier >= tier_kingdom - NOR = { - government_has_flag = government_is_feudal - government_has_flag = government_is_theocracy - } - } - hidden_effect = { change_government = feudal_government } - } - } - } - - #Governors become Dukes tooltip - if = { - limit = { - any_vassal = { - primary_title.tier = tier_duchy - NOT = { government_has_flag = government_is_clan } - } - } - custom_tooltip = governors_become_dukes - } -} - -humiliate_stooge_counter_effect = { - if = { - limit = { - NOT = { has_variable = humiliated_stooge_counter_var } - } - set_variable = { - name = humiliated_stooge_counter_var - value = 1 - } - } - else = { - change_variable = { - name = humiliated_stooge_counter_var - add = 1 - } - } -} - -humiliate_stooge_reward_effect = { - hidden_effect = { - scope:stooge ?= { - add_opinion = { - target = root - opinion = -25 - modifier = humiliated_opinion - } - } - if = { - limit = { - scope:stooge.var:humiliated_stooge_counter_var ?= 1 - } - # First time, it's fine - send_interface_toast = { - type = event_toast_effect_good - title = humiliate_the_stooge_decision_tt - left_icon = root - right_icon = scope:stooge - add_stress = major_stress_impact_loss - add_dread = minor_dread_gain - add_character_modifier = { - modifier = stooge_humiliated_modifier - years = 2 - } - } - } - else_if = { - limit = { - scope:stooge.var:humiliated_stooge_counter_var ?= 2 - } - send_interface_toast = { - type = event_toast_effect_good - title = humiliate_the_stooge_decision_2_tt - left_icon = root - right_icon = scope:stooge - add_stress = medium_stress_impact_loss - add_dread = medium_dread_gain - add_character_modifier = { - modifier = stooge_humiliated_modifier - years = 2 - } - } - } - else_if = { - limit = { - scope:stooge.var:humiliated_stooge_counter_var ?= 3 - } - # Third time, crying - send_interface_toast = { - type = event_toast_effect_good - title = humiliate_the_stooge_decision_3_tt - left_icon = root - right_icon = scope:stooge - add_stress = minor_stress_impact_loss - add_dread = major_dread_gain - add_character_modifier = { - modifier = stooge_humiliated_modifier - years = 2 - } - } - } - else_if = { - limit = { - scope:stooge.var:humiliated_stooge_counter_var ?= 4 - } - # Fourth time, it's over - send_interface_toast = { - type = event_toast_effect_neutral - title = humiliate_the_stooge_decision_4_tt - left_icon = root - right_icon = scope:stooge - add_dread = major_dread_gain - add_character_modifier = { - modifier = stooge_humiliated_fourth_time_modifier - years = 2 - } - remove_courtier_or_guest = scope:stooge - scope:stooge = { # They won't join your court - set_variable = { - name = non_recruitable_var - value = root - } - } - } - } - } -} - -admin_confirmation_vassal_reward_guts_effect = { - dynasty ?= { add_dynasty_prestige = minor_dynasty_prestige_gain } - if = { - limit = { - scope:confirmation_liege = { is_ai = yes } - } - reverse_add_opinion = { - target = scope:confirmation_liege - modifier = respect_opinion - opinion = 20 - } - } - add_prestige = major_prestige_gain - change_influence = major_influence_gain -} diff --git a/N3OW/common/scripted_effects/00_experience_effects.txt b/N3OW/common/scripted_effects/00_experience_effects.txt deleted file mode 100644 index bb10b2df..00000000 --- a/N3OW/common/scripted_effects/00_experience_effects.txt +++ /dev/null @@ -1,66 +0,0 @@ -gain_trait_or_experience_effect = { - if = { - limit = { has_trait = $TRAIT$ } - add_trait_xp = { - trait = $TRAIT$ - value = $AMOUNT$ - } - } - else = { - add_trait = $TRAIT$ - } -} - -gain_appropriate_lifestyle_medium_xp_effect = { - if = { - limit = { has_any_lifestyle_focus_trigger = yes } - switch = { - trigger = has_lifestyle - diplomacy_lifestyle = { - add_diplomacy_lifestyle_xp = medium_lifestyle_xp - } - martial_lifestyle = { - add_martial_lifestyle_xp = medium_lifestyle_xp - } - stewardship_lifestyle = { - add_stewardship_lifestyle_xp = medium_lifestyle_xp - } - intrigue_lifestyle = { - add_intrigue_lifestyle_xp = medium_lifestyle_xp - } - learning_lifestyle = { - add_learning_lifestyle_xp = medium_lifestyle_xp - } - } - } - else = { # Fallback - add_diplomacy_lifestyle_xp = medium_lifestyle_xp - } -} - -gain_appropriate_lifestyle_major_xp_effect = { - if = { - limit = { has_any_lifestyle_focus_trigger = yes } - switch = { - trigger = has_lifestyle - diplomacy_lifestyle = { - add_diplomacy_lifestyle_xp = major_lifestyle_xp - } - martial_lifestyle = { - add_martial_lifestyle_xp = major_lifestyle_xp - } - stewardship_lifestyle = { - add_stewardship_lifestyle_xp = major_lifestyle_xp - } - intrigue_lifestyle = { - add_intrigue_lifestyle_xp = major_lifestyle_xp - } - learning_lifestyle = { - add_learning_lifestyle_xp = major_lifestyle_xp - } - } - } - else = { # Fallback - add_diplomacy_lifestyle_xp = major_lifestyle_xp - } -} \ No newline at end of file diff --git a/N3OW/common/scripted_effects/00_faction_effects.txt b/N3OW/common/scripted_effects/00_faction_effects.txt deleted file mode 100644 index ceeb9e25..00000000 --- a/N3OW/common/scripted_effects/00_faction_effects.txt +++ /dev/null @@ -1,2328 +0,0 @@ - - -##################################################################### -# EFFECT LIST -##################################################################### - -# join_faction_with_leave_blocker_effect - make a character join a faction, and prevent them from leaving -# leave_faction_with_cooldown_effect - makes a character leave a FACTION and not rejoin another faction for YEARS years -# get_popular_revolt_target_effect - looks for a valid title for a popular revolt to target (may not be the title the revolt gets if successful, just determines the 'region' the revolt is supposed to occur within), -# successful_popular_revolt_outcome_effect - handles all of the title changes necessary for a successful popular revolt to break away as an independent realm. -# get_popular_revolt_title_name - Script logic to check what the new name of dynamically-created peasant titles should be (e.g., Kingdom of Isma'ili Arabia). - -join_faction_with_leave_blocker_effect = { - join_faction = $FACTION$ - hidden_effect = { - save_temporary_scope_value_as = { - name = join_faction_with_leave_blocker_effect_number - value = flag:$YEARS$ - } - add_character_flag = { - flag = leaving_faction_block - years = $YEARS$ - } - } - if = { - limit = { this = root } - custom_tooltip = join_faction_with_leave_blocker_effect_first.tt - } - else = { - custom_tooltip = join_faction_with_leave_blocker_effect_third.tt - } - - #and to prevent angry error messages :D:D:D:D - if = { - limit = { - scope:join_faction_with_leave_blocker_effect_number = flag:1 - } - } -} - -add_faction_cooldown_effect = { - if = { - limit = { is_landless_adventurer = no } - custom_description = { - text = faction_cooldown_effect - value = $YEARS$ - add_character_flag = { - flag = joining_faction_block - years = $YEARS$ - } - } - } -} - -leave_faction_with_cooldown_effect = { - leave_faction = $FACTION$ - add_faction_cooldown_effect = { YEARS = $YEARS$ } -} - -imprisonment_retribution_start_faction_war_if_valid = { - scope:recipient = { - custom_tooltip = FACTION_IMPRISONMENT_RETALIATION_WARNING - } - hidden_effect = { - if = { - limit = { - faction_power > faction_power_threshold - NOT = { faction_is_type = populist_faction } - } - - if = { - limit = { - faction_is_type = claimant_faction - } - special_title = { - save_scope_as = target_title - } - faction_start_war = { - title = scope:target_title - } - } - else = { - faction_start_war = {} - } - every_faction_member = { - trigger_event = faction_demand.9001 - } - } - } -} - -# Get the most appropriate 'target title' we can for a popular revolt (determines the de jure area the war will target, not final titles granted). -get_popular_revolt_target_effect = { - $FACTION$ = { - save_scope_as = faction - faction_target = { - save_scope_as = faction_target - } - - # First check if there are any valid kingdoms to target. - if = { - limit = { - # Only large revolts in large realms are eligible to target an entire kingdom. - any_faction_county_member = { - count >= 11 - } - scope:faction_target.primary_title.tier >= tier_kingdom - } - every_faction_county_member = { - kingdom = { - if = { - # Do not target titles held by rulers outside of our realm. - limit = { - NOT = { exists = holder } - holder.top_liege = scope:faction_target - } - } - add_to_list = tmp_potential_kingdoms - } - } - - # Out of the valid kingdoms (if any), pick the 'best' one - ordered_in_list = { - list = tmp_potential_kingdoms - - order_by = { - # First look at the total number of rebels within the kingdom's de jure territory. - value = 0 - add = { - value = 0 - every_in_de_jure_hierarchy = { - limit = { - tier = tier_county - any_title_joined_faction = { - this = $FACTION$ - } - } - add = total_county_levies - } - } - - if = { - limit = { - exists = holder - } - if = { - # Prefer targeting titles held by the faction target... - limit = { - holder != scope:faction_target - } - multiply = 0.5 - } - else_if = { - #...but not the target's primary title (we don't want to usurp them if we can help it!) - limit = { - this = scope:faction_target.primary_title - } - multiply = 0.5 - } - } - - } - save_scope_as = tmp_target_title - } - } - - # If we were ineligible for kingdom-tier or failed to find a valid one, look for duchies. - if = { - limit = { - NOT = { exists = scope:tmp_target_title} - - # Mid-sized or larger revolts in medium realms are eligible for duchy titles. - any_faction_county_member = { - count >= 5 - } - faction_target.primary_title.tier >= tier_duchy - } - every_faction_county_member = { - duchy = { - if = { - # Do not target titles held by rulers outside of our realm. - limit = { - NOT = { exists = holder } - holder.top_liege = scope:faction_target - } - } - add_to_list = tmp_potential_duchies - } - } - - # Out of the valid duchies (if any), pick the 'best' one - ordered_in_list = { - list = tmp_potential_duchies - - order_by = { - value = 0 - # First look at the total number of rebels within the duchy's de jure territory. - add = { - value = 0 - every_in_de_jure_hierarchy = { - limit = { - tier = tier_county - any_title_joined_faction = { - this = $FACTION$ - } - } - add = total_county_levies - } - } - - if = { - limit = { - exists = holder - } - if = { - # Prefer targeting titles held by the faction target... - limit = { - holder != scope:faction_target - } - multiply = 0.5 - } - else_if = { - #...but not the target's primary title (we don't want to usurp them if we can help it!) - limit = { - this = scope:faction_target.primary_title - } - multiply = 0.5 - } - } - } - save_scope_as = tmp_target_title - } - } - - # If we still don't have a target title, pick the largest county. - if = { - limit = { - NOT = { exists = scope:tmp_target_title} - } - ordered_faction_county_member = { - order_by = total_county_levies - - save_scope_as = tmp_target_title - } - } - - # Re-save our temporary scope as the 'official' target scope, then clear all temporary scopes. - if = { - limit = { - exists = scope:tmp_target_title - } - scope:tmp_target_title = { - save_scope_as = target_title - } - set_special_title = scope:target_title - clear_saved_scope = tmp_target_title - } - every_in_list = { - list = tmp_potential_kingdoms - remove_from_list = tmp_potential_kingdoms - } - every_in_list = { - list = tmp_potential_duchies - remove_from_list = tmp_potential_duchies - } - } -} - -add_adjacent_valid_counties_to_list = { - every_neighboring_county = { - limit = { - faith = $FAITH$ - holder = { - is_ai = yes # Without this, successful Populist Revolts can lead to suprise Game Overs for players without any warning. - top_liege = $TOP_LIEGE$ - } - NOT = { is_in_list = $LIST$ } - } - add_to_list = $LIST$ - } -} - -split_noncontiguous_counties_from_revolt_effect = { - # Start off by making a list of all disconnected Counties - every_connected_county = { - invert = yes - max_naval_distance = 2000 - add_to_list = disconnected_counties - } - - # Then release contiguous disconnected areas. - every_in_list = { - list = disconnected_counties - - if = { - limit = { - holder.top_liege = $FACTION_LEADER$ - } - save_scope_as = county_of_origin - - create_character = { - location = scope:county_of_origin.title_province - culture = scope:county_of_origin.culture - faith = scope:county_of_origin.faith - gender_female_chance = 50 - age = 32 - save_scope_as = new_county_holder - } - - create_title_and_vassal_change = { - type = independency - save_scope_as = exclave_change - add_claim_on_loss = no - } - every_in_list = { - list = disconnected_counties - limit = { - holder.top_liege = $FACTION_LEADER$ - is_connected_to = { target = scope:county_of_origin } - } - change_title_holder = { - holder = scope:new_county_holder - change = scope:exclave_change - } - } - scope:new_county_holder = { - becomes_independent = { - change = scope:exclave_change - } - } - resolve_title_and_vassal_change = scope:exclave_change - - scope:new_county_holder = { - if = { # Just in case they need to create a duchy - limit = { - gold < 500 - } - add_gold = 500 - } - } - } - } -} - -# Shared effect between the Popular Faction's demand event and victory outcome. -# -# Parameters: -# $FACTION_LEADER$ -# $TARGET_TITLE$ -# $SOURCE_GOVERNMENT$ -# -successful_popular_revolt_outcome_effect = { - # Save scopes for later usage. - $FACTION_LEADER$ = { - joined_faction = { - save_scope_as = popular_faction - every_faction_member = { - add_to_list = faction_members - } - faction_target = { - save_scope_as = faction_target - } - } - } - - if = { # Populists factions in an admin realm should aim to change state faith, if they are of the capital culture - limit = { - $SOURCE_GOVERNMENT$ = { government_allows = state_faith } - $FACTION_LEADER$.culture = scope:faction_target.capital_county.culture - $FACTION_LEADER$.faith != scope:faction_target.primary_title.state_faith - } - - $SOURCE_GOVERNMENT$.primary_title = { - # Change the state faith - set_state_faith = $FACTION_LEADER$.faith - - # Try grabbing someone from the line of succession who practices the State Faith - if = { - limit = { - any_title_heir = { - faith = $FACTION_LEADER$.faith - } - } - ordered_title_heir = { - order_by = "appointment_candidate_score(prev)" - limit = { - faith = $FACTION_LEADER$.faith - } - save_scope_as = new_ruler - } - } - # Otherwise, make the peasant leader the new emperor - else = { $FACTION_LEADER$ = { save_scope_as = new_ruler } } - - # Actually make the switch - create_title_and_vassal_change = { - type = conquest_populist - save_scope_as = change - } - # Transfer all titles to heir of primary title if only one governorship is held - hidden_effect = { - $SOURCE_GOVERNMENT$ = { - every_held_title = { - title_tier >= county - limit = { - is_landless_type_title = no - is_noble_family_title = no - } - change_title_holder_include_vassals = { - holder = scope:new_ruler - change = scope:change - take_baronies = no - } - } - } - } - resolve_title_and_vassal_change = scope:change - } - } - else_if = { # Populists factions of the state faith in an admin realm where the emperor is of a heretical faith simply take the empire - limit = { - $SOURCE_GOVERNMENT$ = { government_allows = state_faith } - $FACTION_LEADER$.faith = scope:faction_target.primary_title.state_faith - $FACTION_LEADER$.faith != scope:faction_target.faith - } - - $SOURCE_GOVERNMENT$.primary_title = { - - $FACTION_LEADER$ = { save_scope_as = new_ruler } - - # Actually make the switch - create_title_and_vassal_change = { - type = conquest_populist - save_scope_as = change - } - # Transfer all titles to heir of primary title if only one governorship is held - hidden_effect = { - $SOURCE_GOVERNMENT$ = { - every_held_title = { - title_tier >= county - limit = { - is_landless_type_title = no - is_noble_family_title = no - } - change_title_holder_include_vassals = { - holder = scope:new_ruler - change = scope:change - take_baronies = no - } - } - } - } - resolve_title_and_vassal_change = scope:change - } - } - else = { # Otherwise we run the normal script - - # Compile a list of all counties belonging to the faction. - scope:popular_faction = { - every_faction_county_member = { - add_to_list = siezed_counties - } - } - # Additionally, if we're at war (and not just pressing demands)... - if = { - limit = { - $FACTION_LEADER$ = { - is_at_war_with = scope:faction_target - } - } - # Add all occupied counties of the correct culture/faith. - scope:faction_target = { - every_sub_realm_county = { - limit = { - county_controller = $FACTION_LEADER$ - faith = $FACTION_LEADER$.faith - } - add_to_list = siezed_counties - } - } - - # And add any war members that aren't already in the faction. - $FACTION_LEADER$ = { - every_character_war = { - limit = { - is_defender = scope:faction_target - } - every_war_attacker = { - limit = { - NOT = { is_in_list = faction_members } - } - add_to_list = faction_members - } - } - } - } - - # Select a 'capital' county for the faction leader. - scope:popular_faction = { - ordered_faction_county_member = { - order_by = { - value = total_county_levies - - multiply = { - value = 1 - - # Up to 50% bonus points for counties of the correct culture/faith. - if = { - limit = { culture = $FACTION_LEADER$.culture } - add = 0.25 - } - if = { - limit = { faith = $FACTION_LEADER$.faith } - add = 0.25 - } - - # Additional 50% bonus points for counties located in the de jure area of the liege title we want to sieze. - if = { - limit = { - target_is_de_jure_liege_or_above = $TARGET_TITLE$ - } - add = 0.50 - } - - # Remove 75% for counties owned by a player. - if = { - limit = { - holder = { is_ai = no } - } - subtract = 0.75 - } - } - } - - #remove_from_list = siezed_counties - save_scope_as = capital_county - } - } - - # CHANGE ZERO: Give the leader a county to stop landless characters from screwing up the hierarchy. - hidden_effect = { - create_title_and_vassal_change = { - type = conquest_populist - save_scope_as = change_zero - add_claim_on_loss = yes - } - scope:capital_county = { - change_title_holder = { - holder = $FACTION_LEADER$ - change = scope:change_zero - take_baronies = no - } - } - resolve_title_and_vassal_change = scope:change_zero - } - - # Let's add in any additional counties belonging to other participants, which isn't part of the faction already, so that we can assign a kingdom/duchy tier title properly. - # (We'll remove these again further down.) - if = { - limit = { - any_in_list = { - list = faction_members - NOT = { this = $FACTION_LEADER$ } - } - } - every_in_list = { - list = faction_members - limit = { - NOT = { this = $FACTION_LEADER$ } - } - every_sub_realm_county = { - limit = { - NOT = { is_in_list = siezed_counties } - } - add_to_list = siezed_counties - } - } - } - # CHANGE ONE: Give the leader an appropriately-ranked title. - create_title_and_vassal_change = { - type = conquest_populist - save_scope_as = change_one - add_claim_on_loss = yes - } - if = { - # Check if we can give them a kingdom. - limit = { - OR = { - any_in_list = { # If the realm is large enough to make a duchy unfeasible. - list = siezed_counties - count >= 20 - } - any_in_list = { # If there is a kingdom title available for creation/usurpation. - list = siezed_counties - kingdom = { - any_de_jure_county = { - percent >= 0.5 - is_in_list = siezed_counties - } - OR = { - NOT = { exists = holder } - trigger_if = { - limit = { exists = holder } - holder.top_liege = scope:faction_target - - # Don't usurp the primary title from independent rulers if they don't have an equal-tier title to replace it with. - trigger_if = { - limit = { - this = holder.primary_title - holder = holder.top_liege - } - holder = { - any_held_title = { - title_tier = kingdom - count >= 2 - } - } - } - - # Don't usurp the primary title from vassal players if they don't have an equal-tier title to replace it with - trigger_if = { - limit = { - holder = { is_ai = no } - holder != holder.top_liege - } - holder = { - any_held_title = { - title_tier = kingdom - count >= 2 - } - } - } - } - } - # Special block to stop populist factions from creating Germany if the HRE is still alive and kicking. - NAND = { - this = title:k_east_francia - exists = title:e_hre.holder - } - } - } - } - } - - # Check if we can create or usurp a De Jure Kingdom from the map - every_in_list = { - list = siezed_counties - kingdom = { - if = { - limit = { - any_de_jure_county = { - percent >= 0.5 - is_in_list = siezed_counties - } - OR = { - NOT = { exists = holder } - trigger_if = { - limit = { exists = holder } - holder.top_liege = scope:faction_target - - # Don't usurp the primary title from independent rulers if they don't have an equal-tier title to replace it with. - trigger_if = { - limit = { - this = holder.primary_title - holder = holder.top_liege - } - holder = { - any_held_title = { - title_tier = kingdom - count >= 2 - } - } - } - - # Don't usurp the primary title from vassal players if they don't have an equal-tier title to replace it with - trigger_if = { - limit = { - holder = { is_ai = no } - holder != holder.top_liege - } - holder = { - any_held_title = { - title_tier = kingdom - count >= 2 - } - } - } - } - } - # Special block to stop populist factions from creating Germany if the HRE is still alive and kicking. - NAND = { - this = title:k_east_francia - exists = title:e_hre.holder - } - } - add_to_list = potential_kingdoms - } - } - } - - # If we found one or more valid De Jure Kingdoms, pick the best one for us to take. - if = { - limit = { - any_in_list = { - list = potential_kingdoms - count >= 1 - NAND = { - this = title:k_east_francia - exists = title:e_hre.holder - } - } - } - ordered_in_list = { - list = potential_kingdoms - limit = { - NAND = { - this = title:k_east_francia - exists = title:e_hre.holder - } - } - - order_by = { - value = 1 - every_in_list = { - list = siezed_counties - limit = { kingdom = prev } - add = 1 - } - } - - change_title_holder = { - holder = $FACTION_LEADER$ - change = scope:change_one - } - } - } - # Otherwise, create a new titular Kingdom title. - else = { - create_popular_revolt_title_effect = { - FACTION = scope:popular_faction - FACTION_LEADER = $FACTION_LEADER$ - TIER = kingdom - } - scope:new_title = { - change_title_holder = { - holder = $FACTION_LEADER$ - change = scope:change_one - } - } - } - } - else_if = { - # Check if we can give them a duchy. - limit = { - OR = { - any_in_list = { # If the realm is large enough to make a county as the highest tier unfeasible. - list = siezed_counties - count >= 8 - } - any_in_list = { # If there is a duchy title available for creation/usurpation. - list = siezed_counties - duchy = { - any_de_jure_county = { - percent >= 0.5 - is_in_list = siezed_counties - } - OR = { - NOT = { exists = holder } - trigger_if = { - limit = { exists = holder } - holder.top_liege = scope:faction_target - - # Don't usurp the primary title from independent rulers if they don't have an equal-tier title to replace it with. - trigger_if = { - limit = { - this = holder.primary_title - holder = holder.top_liege - } - holder = { - any_held_title = { - title_tier = duchy - count >= 2 - } - } - } - - # Don't usurp the primary title from vassal players if they don't have an equal-tier title to replace it with - trigger_if = { - limit = { - holder = { is_ai = no } - holder != holder.top_liege - } - holder = { - any_held_title = { - title_tier = duchy - count >= 2 - } - } - } - } - } - } - } - } - } - - # Check if we can create or usurp a De Jure Duchy from the map - every_in_list = { - list = siezed_counties - duchy = { - if = { - limit = { - any_de_jure_county = { - percent >= 0.4 - is_in_list = siezed_counties - } - OR = { - NOT = { exists = holder } - trigger_if = { - limit = { exists = holder } - holder.top_liege = scope:faction_target - - # Don't usurp the primary title from independent rulers if they don't have an equal-tier title to replace it with. - trigger_if = { - limit = { - this = holder.primary_title - holder = holder.top_liege - } - holder = { - any_held_title = { - title_tier = duchy - count >= 2 - } - } - } - - # Don't usurp the primary title from vassal players if they don't have an equal-tier title to replace it with - trigger_if = { - limit = { - holder = { is_ai = no } - holder != holder.top_liege - } - holder = { - any_held_title = { - title_tier = duchy - count >= 2 - } - } - } - } - } - } - add_to_list = potential_duchies - } - } - } - - # If we found one or more valid De Jure Duchies, pick the best one for us to take. - if = { - limit = { - any_in_list = { - list = potential_duchies - count >= 1 - } - } - ordered_in_list = { - list = potential_duchies - - order_by = { - value = 1 - every_in_list = { - list = siezed_counties - limit = { duchy = prev } - add = 1 - } - } - - change_title_holder = { - holder = $FACTION_LEADER$ - change = scope:change_one - } - } - } - # Otherwise, create a new titular Duchy title. - else = { - create_popular_revolt_title_effect = { - FACTION = scope:popular_faction - FACTION_LEADER = $FACTION_LEADER$ - TIER = duchy - } - scope:new_title = { - change_title_holder = { - holder = $FACTION_LEADER$ - change = scope:change_one - } - } - } - } - - # If the new realm is too small, or is unable to take/create a higher tier title, the populist leader only gets the county titles themselves. - resolve_title_and_vassal_change = scope:change_one - - # If the title we gave our leader is a new dynamic title, generate a CoA for it. - if = { - limit = { - exists = scope:new_title - } - scope:new_title = { - set_capital_county = scope:capital_county - generate_coa = yes - } - } - - # CHANGE TWO: Transfer the siezed counties to the leader. - create_title_and_vassal_change = { - type = conquest_populist - save_scope_as = change_two - add_claim_on_loss = yes - } - if = { # But remove counties from any faction/war member first. - limit = { - any_in_list = { - list = faction_members - NOT = { this = $FACTION_LEADER$ } - } - } - every_in_list = { - list = faction_members - limit = { - NOT = { this = $FACTION_LEADER$ } - } - every_sub_realm_county = { - remove_from_list = siezed_counties - } - } - } - every_in_list = { - list = siezed_counties - - change_title_holder = { - holder = $FACTION_LEADER$ - change = scope:change_two - take_baronies = no - } - } - resolve_title_and_vassal_change = scope:change_two - - # CHANGE THREE: Split the leader off into an independent realm. Then make all faction members vassals of the populist leader. - create_title_and_vassal_change = { - type = conquest_populist - save_scope_as = change_three - add_claim_on_loss = yes - } - every_in_list = { - list = faction_members - - # Lower-ranked vassals switch lieges to the faction leader. - if = { - limit = { - this.primary_title.tier < $FACTION_LEADER$.primary_title.tier - this.primary_title.tier >= tier_county - NOT = { this = $FACTION_LEADER$ } - is_landless_adventurer = no - } - change_liege = { - liege = $FACTION_LEADER$ - change = scope:change_three - } - } - # Same or higher-ranked vassal get independence. - else_if = { - limit = { - NOT = { this = $FACTION_LEADER$ } - is_landless_adventurer = no - } - hidden_effect = { - becomes_independent = { - change = scope:change_three - } - send_interface_toast = { - type = event_toast_effect_good - title = POPULIST_FACTION_INDEPENDENCE_TITLE - custom_tooltip = POPULIST_FACTION_INDEPENDENCE_DESC - left_icon = $FACTION_LEADER$ - right_icon = scope:faction_target - } - } - } - } - - resolve_title_and_vassal_change = scope:change_three - - # Sub-change: if any counties have been offended by HumSac'ing, since they're revolting, and tempers have hit fever pitch, remove their county opinion malus. - $FACTION_LEADER$ = { fp1_remove_humsac_offended_counties_effect = yes } - - # CHANGE FOUR: If there are any disconnected counties, split them off via exclave independence rules. - # However. We don't do this if there is a player in the faction, since it can remove land from the player, or in worst case, make the player game over. - if = { - limit = { - NOT = { - any_in_list = { - list = faction_members - is_ai = no - } - } - } - scope:capital_county = { - split_noncontiguous_counties_from_revolt_effect = { - FACTION_LEADER = $FACTION_LEADER$ - } - } - } - - # If the faction still exists, dissolve it (it's no longer relevant). - hidden_effect = { - if = { - limit = { - exists = scope:popular_faction - } - scope:popular_faction = { - destroy_faction = yes - } - } - } - - # Set up government type correctly. - hidden_effect = { - $FACTION_LEADER$ = { - #If sourced from tribal, make tribal. - if = { - limit = { - $SOURCE_GOVERNMENT$ = { government_has_flag = government_is_tribal } - } - change_government = tribal_government - add_realm_law = tribal_authority_0 - if = { limit = { has_realm_law = crown_authority_0 } remove_realm_law = crown_authority_0 } - if = { limit = { has_realm_law = crown_authority_1 } remove_realm_law = crown_authority_1 } - if = { limit = { has_realm_law = crown_authority_2 } remove_realm_law = crown_authority_2 } - if = { limit = { has_realm_law = crown_authority_3 } remove_realm_law = crown_authority_3 } - } - } - } - - # Give the leader some gold if they don't have any - We do this at the very end to make sure the gold is applied correctly. - hidden_effect = { - if = { - limit = { - $FACTION_LEADER$ = { - gold < 10 - } - } - every_in_list = { # Scale the amount on the number of counties taken. - list = siezed_counties - $FACTION_LEADER$ = { - add_gold = 50 - } - } - } - } - } -} - -create_popular_revolt_title_effect = { - $FACTION$ = { - ordered_faction_county_member = { - limit = { - faith = $FACTION_LEADER$.faith - culture = $FACTION_LEADER$.culture - } - alternative_limit = { - always = yes - } - - order_by = total_county_levies - - save_scope_as = base_county - } - $FACTION_LEADER$.culture = { save_scope_as = founder_culture } - create_dynamic_title = { - tier = $TIER$ - name = FACTION_POPULIST_CREATED_TITLE_NAME - } - scope:new_title = { - set_variable = { - name = faction - value = $FACTION$ - } - set_color_from_title = scope:base_county - } - } -} - -successful_nomadic_revolt_outcome_effect = { - hidden_effect = { - # Save scopes for later usage. - $FACTION_LEADER$ = { - add_character_flag = successful_nomad_revolt_leader - joined_faction = { - save_scope_as = nomadic_faction - every_faction_member = { - add_to_list = faction_members - } - faction_target = { - save_scope_as = faction_target - } - } - if = { - limit = { - has_variable = peasant_title - exists = this.var:peasant_title.holder - } - destroy_title = this.var:peasant_title - } - } - # Compile a list of all duchies and counties belonging to the faction. - scope:nomadic_faction = { - every_faction_county_member = { - add_to_list = siezed_counties - duchy = { - every_de_jure_county = { # Seize entire duchies - limit = { - holder.top_liege = scope:faction_target - NOT = { is_in_list = siezed_counties } - } - add_to_list = siezed_counties - } - if = { - limit = { - NOT = { is_in_list = siezed_duchies } - } - add_to_list = siezed_duchies - } - } - } - } - - # Select a 'capital' county for the faction leader. - scope:nomadic_faction = { - ordered_in_list = { - list = siezed_counties - order_by = { - value = 0 - if = { - limit = { - uses_county_fertility = yes - } - add = county_fertility - } - else = { - add = development_level - } - - multiply = { - value = 1 - if = { - limit = { culture = $FACTION_LEADER$.culture } - add = 200 - } - if = { - limit = { faith = $FACTION_LEADER$.faith } - add = 50 - } - } - } - save_scope_as = capital_county - } - } - - # Give the leader the counties they should have and make them a nomad. - $FACTION_LEADER$ = { - add_to_list = independent_nomads - change_government = nomad_government - } - create_title_and_vassal_change = { - type = conquest_populist - save_scope_as = change - add_claim_on_loss = yes - } - scope:capital_county = { - change_title_holder = { - holder = $FACTION_LEADER$ - change = scope:change - take_baronies = no - } - add_to_list = divided_titles - duchy = { - every_de_jure_county = { # Seize entire duchies - limit = { - is_in_list = siezed_counties - NOT = { is_in_list = divided_titles } - } - change_title_holder = { - holder = $FACTION_LEADER$ - change = scope:change - take_baronies = no - } - add_to_list = divided_titles - } - if = { - limit = { - OR = { - NOT = { exists = holder } - trigger_if = { - limit = { exists = holder } - holder.top_liege = scope:faction_target - } - } - NOT = { is_in_list = divided_titles } - } - change_title_holder = { - holder = $FACTION_LEADER$ - change = scope:change - } - add_to_list = divided_titles - } - } - } - resolve_title_and_vassal_change = scope:change - - while = { - limit = { - any_in_list = { - list = siezed_counties - NOT = { - is_in_list = divided_titles - } - } - } - random_in_list = { - list = siezed_counties - limit = { - NOT = { - is_in_list = divided_titles - } - } - save_scope_as = handout_county - hidden_effect = { - create_character = { - location = scope:handout_county.title_province - template = nomadic_faction_leader_template - faith = scope:handout_county.faith - culture = scope:handout_county.culture - dynasty = generate - gender_female_chance = { - if = { - limit = { scope:handout_county.faith = { has_doctrine = doctrine_gender_male_dominated } } - add = 0 - } - else_if = { - limit = { scope:handout_county.faith = { has_doctrine = doctrine_gender_female_dominated } } - add = 100 - } - else = { - add = 50 - } - } - save_scope_as = new_nomad - } - scope:new_nomad = { - add_to_list = independent_nomads - } - } - create_title_and_vassal_change = { - type = conquest_populist - save_scope_as = change - add_claim_on_loss = yes - } - scope:handout_county = { - change_title_holder = { - holder = scope:new_nomad - change = scope:change - take_baronies = no - } - add_to_list = divided_titles - duchy = { - every_de_jure_county = { # Seize entire duchies - limit = { - is_in_list = siezed_counties - NOT = { is_in_list = divided_titles } - } - change_title_holder = { - holder = scope:new_nomad - change = scope:change - take_baronies = no - } - add_to_list = divided_titles - } - if = { - limit = { - OR = { - NOT = { exists = holder } - trigger_if = { - limit = { exists = holder } - holder.top_liege = scope:faction_target - } - } - NOT = { is_in_list = divided_titles } - } - change_title_holder = { - holder = scope:new_nomad - change = scope:change - } - add_to_list = divided_titles - } - } - } - resolve_title_and_vassal_change = scope:change - } - } - - # Make sure everyone is independent - create_title_and_vassal_change = { - type = conquest_populist - save_scope_as = change - add_claim_on_loss = yes - } - every_in_list = { - list = independent_nomads - limit = { - is_independent_ruler = no - } - hidden_effect = { - becomes_independent = { - change = scope:change - } - } - } - resolve_title_and_vassal_change = scope:change - - # Set them up for success - every_in_list = { - list = independent_nomads - - hidden_effect = { - save_temporary_scope_as = nomad_becoming_independent - every_held_title = { - limit = { - tier = tier_county - } - if = { - limit = { - title_province = { - has_holding_type = herder_holding - } - } - title_province = { - set_holding_type = nomad_holding - } - } - add_county_modifier = { - modifier = county_increased_opinion_modifier - years = 25 - } - if = { - limit = { - has_county_modifier = peasant_war_lost_county_modifier - } - remove_county_modifier = peasant_war_lost_county_modifier - } - } - if = { - limit = { - gold < 50 - } - add_gold = 150 - } - if = { - limit = { - is_ruler = yes - NOT = { - government_has_flag = government_is_nomadic - } - } - change_government = nomad_government - } - if = { - limit = { - NOT = { - any_held_title = { - is_nomad_title = yes - } - } - } - save_scope_as = holder - create_nomad_title = { - name = nomad_title_name - holder = scope:holder - government = nomad_government - save_scope_as = new_nomad_title - } - } - if = { - limit = { - NOT = { has_realm_law = nomadic_authority_1 } - } - add_realm_law_skip_effects = nomadic_authority_1 - } - if = { - limit = { - highest_held_title_tier >= tier_duchy - NOT = { has_realm_law = nomadic_authority_2 } - } - if = { - limit = { - has_realm_law = nomadic_authority_1 - } - remove_realm_law = nomadic_authority_1 - add_realm_law_skip_effects = nomadic_authority_2 - } - } - if = { limit = { has_realm_law = crown_authority_0 } remove_realm_law = crown_authority_0 } - if = { limit = { has_realm_law = crown_authority_1 } remove_realm_law = crown_authority_1 } - if = { limit = { has_realm_law = crown_authority_2 } remove_realm_law = crown_authority_2 } - if = { limit = { has_realm_law = crown_authority_3 } remove_realm_law = crown_authority_3 } - domicile ?= { - change_herd = { - value = scope:nomad_becoming_independent.capital_county.county_fertility - min = 20 - multiply = 150 - } - } - } - } - - # If the faction still exists, dissolve it (it's no longer relevant). - hidden_effect = { - if = { - limit = { - exists = scope:nomadic_faction - } - scope:nomadic_faction = { - destroy_faction = yes - } - } - } - } - show_as_tooltip = { - $FACTION_LEADER$ = { - save_scope_as = tooltip_leader - custom_tooltip = nomads_take_everything_tt - } - create_title_and_vassal_change = { - type = conquest_populist - save_scope_as = change - add_claim_on_loss = yes - } - every_in_list = { - list = siezed_duchies - change_title_holder = { - holder = $FACTION_LEADER$ - change = scope:change - take_baronies = no - } - } - every_in_list = { - list = siezed_counties - change_title_holder = { - holder = $FACTION_LEADER$ - change = scope:change - take_baronies = no - } - } - resolve_title_and_vassal_change = scope:change - } -} - -spawn_popular_revolt_troops = { - # Spawn Levies - spawn_army = { - levies = { - value = 0 - joined_faction = { - every_faction_county_member = { - limit = { - duchy = scope:local_center_of_rebellion.duchy - } - add = county_levies_to_raise - } - } - } - location = scope:local_center_of_rebellion - war = root.faction_war - name = populist_faction_event_troops - } - - # Spawn MAAs - An appropriate amount of troops dependent on the terrain type they spawn in - if = { - limit = { - scope:local_center_of_rebellion = { - OR = { - terrain = forest - terrain = taiga - terrain = jungle - terrain = plains - terrain = drylands - terrain = oasis - terrain = desert - terrain = wetlands - terrain = steppe - } - } - } - spawn_army = { - men_at_arms = { - type = light_footmen - stacks = { - value = 0 - joined_faction = { - every_faction_county_member = { - limit = { - duchy = scope:local_center_of_rebellion.duchy - } - add = county_maa_to_raise - } - } - } - } - location = scope:local_center_of_rebellion - war = root.faction_war - name = populist_faction_event_troops - } - } - else_if = { - limit = { - scope:local_center_of_rebellion = { - OR = { - terrain = mountains - terrain = desert_mountains - } - } - } - spawn_army = { - men_at_arms = { - type = pikemen_unit - stacks = { - value = 0 - joined_faction = { - every_faction_county_member = { - limit = { - duchy = scope:local_center_of_rebellion.duchy - } - add = county_maa_to_raise - } - } - } - } - location = scope:local_center_of_rebellion - war = root.faction_war - name = populist_faction_event_troops - } - } - else_if = { - limit = { - scope:local_center_of_rebellion = { - OR = { - terrain = hills - terrain = farmlands - terrain = floodplains - } - } - } - spawn_army = { - men_at_arms = { - type = bowmen - stacks = { - value = 0 - joined_faction = { - every_faction_county_member = { - limit = { - duchy = scope:local_center_of_rebellion.duchy - } - add = county_maa_to_raise - } - } - } - } - location = scope:local_center_of_rebellion - war = root.faction_war - name = populist_faction_event_troops - } - } - - # Spawn Siege Weapons depending on discovered innovations - if = { - limit = { - culture = { has_innovation = innovation_gunpowder } - } - spawn_army = { - men_at_arms = { - type = bombard - stacks = 1 - } - location = scope:local_center_of_rebellion - war = root.faction_war - name = populist_faction_event_troops - } - } - else_if = { - limit = { - culture = { has_innovation = innovation_trebuchet } - } - spawn_army = { - men_at_arms = { - type = trebuchet - stacks = 1 - } - location = scope:local_center_of_rebellion - war = root.faction_war - name = populist_faction_event_troops - } - - } - else_if = { - limit = { - culture = { has_innovation = innovation_mangonel } - } - spawn_army = { - men_at_arms = { - type = mangonel - stacks = 1 - } - location = scope:local_center_of_rebellion - war = root.faction_war - name = populist_faction_event_troops - } - } - else_if = { - limit = { - culture = { has_innovation = innovation_catapult } - } - spawn_army = { - men_at_arms = { - type = onager - stacks = 1 - } - location = scope:local_center_of_rebellion - war = root.faction_war - name = populist_faction_event_troops - } - } - - if = { - limit = { has_variable = ep3_governor_yearly_8150_ignored } - root.faction_leader = { - spawn_army = { - name = ep3_governor_yearly_8150_troop_name - men_at_arms = { - type = light_footmen - stacks = 2 - } - war = root.faction_war - location = scope:local_center_of_rebellion - origin = scope:local_center_of_rebellion - inheritable = no - } - } - remove_variable = ep3_governor_yearly_8150_ignored - } -} - -spawn_nomadic_revolt_troops = { - # Spawn Horde Riders - spawn_army = { - men_at_arms = { - type = nomadic_riders - men = { - value = 0 - joined_faction = { - every_faction_county_member = { - limit = { - duchy = scope:local_center_of_rebellion.duchy - } - add = county_horde_riders_to_raise - } - } - } - } - location = scope:local_center_of_rebellion - war = root.faction_war - name = nomadic_faction_event_troops - } - - spawn_army = { - men_at_arms = { - type = steppe_raiders - men = { - value = 0 - joined_faction = { - every_faction_county_member = { - limit = { - duchy = scope:local_center_of_rebellion.duchy - } - add = { - value = county_horde_riders_to_raise - divide = 2 - } - } - } - } - } - location = scope:local_center_of_rebellion - war = root.faction_war - name = nomadic_faction_event_troops - } - - spawn_army = { - men_at_arms = { - type = horse_archers - men = { - value = 0 - joined_faction = { - every_faction_county_member = { - limit = { - duchy = scope:local_center_of_rebellion.duchy - } - add = { - value = county_horde_riders_to_raise - divide = 2 - } - } - } - } - } - location = scope:local_center_of_rebellion - war = root.faction_war - name = nomadic_faction_event_troops - } - - # Spawn Siege Weapons depending on discovered innovations - if = { - limit = { - culture = { has_innovation = innovation_gunpowder } - } - spawn_army = { - men_at_arms = { - type = bombard - stacks = 1 - } - location = scope:local_center_of_rebellion - war = root.faction_war - name = populist_faction_event_troops - } - } - else_if = { - limit = { - culture = { has_innovation = innovation_trebuchet } - } - spawn_army = { - men_at_arms = { - type = trebuchet - stacks = 1 - } - location = scope:local_center_of_rebellion - war = root.faction_war - name = populist_faction_event_troops - } - - } - else_if = { - limit = { - culture = { has_innovation = innovation_mangonel } - } - spawn_army = { - men_at_arms = { - type = mangonel - stacks = 1 - } - location = scope:local_center_of_rebellion - war = root.faction_war - name = populist_faction_event_troops - } - } - else_if = { - limit = { - culture = { has_innovation = innovation_catapult } - } - spawn_army = { - men_at_arms = { - type = onager - stacks = 1 - } - location = scope:local_center_of_rebellion - war = root.faction_war - name = populist_faction_event_troops - } - } - else = { - spawn_army = { - men_at_arms = { - type = torch_bearers - stacks = 5 - } - location = scope:local_center_of_rebellion - war = root.faction_war - name = populist_faction_event_troops - } - } -} - -peasant_faction_demands_enforced = { - # escalate if in the Cycle - if = { - limit = { - NOT = { exists = scope:defender } - } - save_scope_as = defender - } - if = { - limit = { - scope:defender != scope:defender.top_liege - #only in Dynastic Cycle - scope:defender.top_liege.top_participant_group:dynastic_cycle ?= { - participant_group_type = hegemon_ruler - } - } - scope:defender.top_liege = { - set_variable = { - name = peasant_war_escalates - days = 365 - } - } - $FACTION$ = { - faction_leader = { - save_scope_as = attacker - add_character_flag = peasant_revolt_do_not_kill - set_variable = { - name = peasant_war_escalates - days = 365 - } - add_trait_xp = { - trait = peasant_leader - value = 20 - } - } - every_faction_county_member = { - add_to_list = faction_counties - add_county_modifier = { - modifier = peasant_war_lost_county_modifier - years = 10 - } - } - destroy_faction = yes - } - if = { - limit = { - NOT = { exists = scope:attacker } - } - scope:peasant_leader = { - save_scope_as = attacker - } - } - if = { - limit = { - scope:defender.top_liege = { - any_targeting_faction = { - faction_type = escalated_peasant_faction - save_temporary_scope_as = escalated_faction - } - } - } - scope:defender.top_liege = { - send_interface_message = { - type = msg_faction_grows - left_icon = scope:attacker - right_icon = scope:defender - every_in_list = { - list = faction_counties - title_join_faction = scope:escalated_faction - } - scope:attacker = { - join_faction_skip_check = scope:escalated_faction - } - } - } - } - else = { - scope:attacker = { - create_faction = { - type = escalated_peasant_faction - target = scope:defender.top_liege - } - } - scope:defender.top_liege = { - random_targeting_faction = { - faction_type = escalated_peasant_faction - save_scope_as = escalated_faction - set_special_character = scope:attacker - } - } - custom_tooltip = { - text = county_and_leader_join_faction_against_top_liege - if = { - limit = { - exists = scope:escalated_faction - } - every_in_list = { - list = faction_counties - limit = { - title_is_a_faction_member = no - } - title_join_faction = scope:escalated_faction - } - scope:attacker = { - set_variable = { - name = rebel_leader_peasants - value = scope:escalated_faction - } - join_faction_skip_check = scope:escalated_faction - primary_title = { - set_title_name_dynamic = peasant_leader_title_name - } - } - } - } - } - } - # otherwise finish the faction as usual - else = { - $FACTION$ = { - every_faction_county_member = { - custom = peasant_faction_every_county - change_county_control = peasant_war_victory_county_control_loss - add_county_modifier = { - modifier = peasant_war_lost_county_modifier - years = 10 - } - } - hidden_effect = { - clean_revolt_county_modifiers_from_faction_members_effect = yes - destroy_faction = yes - } - } - } -} - -invalidate_claimant_factions_on_death_effect = { - every_in_list = { - variable = claimant_factions - if = { - limit = { - exists = faction_war - } - faction_war = { - clear_claimant = yes - set_casus_belli = depose_war - } - faction_remove_war = yes # else the war gets invalidated when we destroy the faction - } - destroy_faction = yes - } - clear_variable_list = claimant_factions -} - -invalidate_ceremonial_claimant_factions_on_death_effect = { - every_in_list = { - variable = ceremonial_claimant_factions - if = { - limit = { - exists = faction_war - } - faction_war = { - clear_claimant = yes - set_casus_belli = depose_war - } - faction_remove_war = yes # else the war gets invalidated when we destroy the faction - } - destroy_faction = yes - } - clear_variable_list = ceremonial_claimant_factions -} - -setup_nomadic_leader_effect = { - save_scope_as = faction - - random_faction_county_member = { - save_scope_as = peasant_county - } - - # Create a leader for the nomadic faction. - create_character = { - location = scope:peasant_county.title_province - template = nomadic_faction_leader_template - faith = scope:peasant_county.faith - culture = scope:peasant_county.culture - gender_female_chance = { - if = { - limit = { scope:peasant_county.faith = { has_doctrine = doctrine_gender_male_dominated } } - add = 0 - } - else_if = { - limit = { scope:peasant_county.faith = { has_doctrine = doctrine_gender_female_dominated } } - add = 100 - } - else = { - add = 50 - } - } - save_scope_as = peasant_leader - } - scope:peasant_leader = { - add_character_flag = peasant_faction_random_peasant - } - - # Create a new title for the peasant. - create_dynamic_title = { - tier = duchy - name = FACTION_NOMADIC_REVOLT_TITLE_NAME - } - create_title_and_vassal_change = { - type = created - save_scope_as = change - add_claim_on_loss = no - } - scope:new_title = { - set_capital_county = scope:peasant_county - set_landless_title = yes - set_destroy_on_succession = yes - set_delete_on_destroy = yes - set_no_automatic_claims = yes - set_definitive_form = yes - set_can_be_named_after_dynasty = no - change_title_holder = { - holder = scope:peasant_leader - change = scope:change - } - set_variable = { - name = faction - value = scope:faction - } - } - resolve_title_and_vassal_change = scope:change - scope:peasant_leader = { - set_variable = { - name = peasant_title - value = scope:new_title - } - if = { - limit = { - is_ruler = yes - NOT = { - government_has_flag = government_is_nomadic - } - } - change_government = nomad_government - } - } - scope:new_title = { generate_coa = factions } - - # Set the peasant leader as the head of the faction. - scope:peasant_leader = { - set_variable = { - name = rebel_leader_peasants - value = scope:faction - } - join_faction_skip_check = scope:faction - } - set_special_character = scope:peasant_leader -} - -setup_populist_leader_effect = { - save_scope_as = faction - - random_faction_county_member = { - save_scope_as = peasant_county - } - - # Runs the scripted effect to find the best title to target for the rebellion. - get_popular_revolt_target_effect = { FACTION = this } - - # Find or create a leader for the populist faction. - scope:target_title = { - # Look to see if there are any displaced characters who are legitimate claimants to the target title that the populists might support. - random_claimant = { - limit = { - # Checks the 'is_character_valid' and 'can_character_join' triggers above, plus the faction hard/soft blocks in 00_rules.txt - can_join_faction = scope:faction - can_join_or_create_faction_against = scope:faction.faction_target - - # Must share a faith & culture with the revolting county. - faith = scope:peasant_county.faith - culture = scope:peasant_county.culture - - # Must be allowed to rule in their faith. - trigger_if = { - limit = { - faith = { has_doctrine = doctrine_gender_male_dominated } - } - is_male = yes - } - trigger_else_if = { - limit = { - faith = { has_doctrine = doctrine_gender_female_dominated } - } - is_female = yes - } - trigger_else = { - always = yes - } - - # Must not already be a landed ruler, or set to inheirit a landed title. - AND = { - is_ruler = no - is_playable_character = no - NOT = { - any_heir_title = { - exists = this - } - } - } - } - - save_scope_as = peasant_leader - add_character_flag = peasant_faction_claimant_without_title - add_trait = populist_leader - } - } - if = { - limit = { - NOT = { exists = scope:peasant_leader } - exists = special_character - } - special_character = { - save_scope_as = peasant_leader - } - } - # If we can't find any, then generate a new character to be the populist leader of the revolt. - else = { - create_character = { - location = scope:peasant_county.title_province - template = populist_faction_leader_template - faith = scope:peasant_county.faith - culture = scope:peasant_county.culture - gender_female_chance = { - if = { - limit = { scope:peasant_county.faith = { has_doctrine = doctrine_gender_male_dominated } } - add = 0 - } - else_if = { - limit = { scope:peasant_county.faith = { has_doctrine = doctrine_gender_female_dominated } } - add = 100 - } - else = { - add = 50 - } - } - trait = populist_leader - save_scope_as = peasant_leader - } - scope:peasant_leader = { - add_character_flag = peasant_faction_random_peasant - } - } - if = { - limit = { - NOT = { exists = scope:peasant_leader.primary_title } - } - # Create a new title for the peasant. - create_dynamic_title = { - tier = duchy - name = FACTION_POPULIST_REVOLT_TITLE_NAME - } - create_title_and_vassal_change = { - type = created - save_scope_as = change - add_claim_on_loss = no - } - scope:new_title = { - set_capital_county = scope:peasant_county - set_landless_title = yes - set_destroy_on_succession = yes - set_delete_on_destroy = yes - set_no_automatic_claims = yes - set_definitive_form = yes - set_can_be_named_after_dynasty = no - set_can_use_nomadic_naming = no - change_title_holder = { - holder = scope:peasant_leader - change = scope:change - } - set_variable = { - name = faction - value = scope:faction - } - } - resolve_title_and_vassal_change = scope:change - scope:peasant_leader = { - set_variable = { - name = peasant_title - value = scope:new_title - } - } - scope:new_title = { generate_coa = factions } - - # Set the peasant leader as the head of the faction. - scope:peasant_leader = { - set_variable = { - name = rebel_leader_peasants - value = scope:faction - } - join_faction_skip_check = scope:faction - } - set_special_character = scope:peasant_leader - } -} - -setup_peasant_leader_effect = { - save_scope_as = faction - # Does a peasant capital county already exist? - if = { - limit = { - NOT = { exists = scope:peasant_county } - } - random_faction_county_member = { save_scope_as = peasant_county } - } - # Does a peasant leader already exist? - if = { - limit = { - NOT = { exists = scope:peasant_leader } - } - create_character = { - location = scope:peasant_county.title_province - template = peasant_faction_leader_template - faith = scope:peasant_county.faith - culture = scope:peasant_county.culture - gender_female_chance = { - if = { - limit = { scope:peasant_county.faith = { has_doctrine = doctrine_gender_male_dominated } } - add = 0 - } - else_if = { - limit = { scope:peasant_county.faith = { has_doctrine = doctrine_gender_female_dominated } } - add = 100 - } - else = { - add = 50 - } - } - save_scope_as = peasant_leader - } - } - scope:peasant_leader = { - add_character_flag = peasant_faction_random_peasant - } - - - create_dynamic_title = { - tier = duchy - name = FACTION_PEASANT_TITLE_NAME - } - create_title_and_vassal_change = { - type = created - save_scope_as = change - add_claim_on_loss = no - } - - scope:new_title = { - set_capital_county = scope:peasant_county - set_landless_title = yes - set_destroy_on_succession = yes - set_delete_on_destroy = yes - set_no_automatic_claims = yes - set_definitive_form = yes - set_can_be_named_after_dynasty = no - set_can_use_nomadic_naming = no - change_title_holder = { - holder = scope:peasant_leader - change = scope:change - } - - set_variable = { - name = faction - value = scope:faction - } - - # avoid unused variable error. This variable is referenced in code - var:faction = {} - } - resolve_title_and_vassal_change = scope:change - scope:peasant_leader = { - set_variable = { - name = peasant_title - value = scope:new_title - } - } - scope:new_title = { generate_coa = factions } - - scope:peasant_leader = { - set_variable = { - name = rebel_leader_peasants - value = scope:faction - } - join_faction_skip_check = scope:faction - add_trait_xp = { - trait = peasant_leader - value = peasant_leader_xp_value - } - } - - set_special_character = scope:peasant_leader -} - -faction_spawn_member_county_armies_effect = { - every_faction_county_member = { - custom = peasant_faction_every_county - hidden_effect = { - save_scope_as = county - title_province = { - save_scope_as = county_location - } - } - - # Reduce county control in faction member counties - change_county_control = peasant_war_starts_county_control_loss - - # Spawn an army in each faction member county - custom_tooltip = peasant_faction_spawn_county_levies - hidden_effect = { - $ARMY_OWNER$ = { - spawn_army = { - levies = scope:county.county_levies_to_raise - location = scope:county_location - war = $FACTION$.faction_war - name = $PEASANT_ARMY_NAME$ - } - } - } - } -} diff --git a/N3OW/common/scripted_effects/00_feast_scripted_effects.txt b/N3OW/common/scripted_effects/00_feast_scripted_effects.txt deleted file mode 100644 index 439bdecf..00000000 --- a/N3OW/common/scripted_effects/00_feast_scripted_effects.txt +++ /dev/null @@ -1,247 +0,0 @@ - -#Effects used in Feasts - -#feast_end_guest_effect - Effect run for all guests when they leave feasts - -feast_fire_correct_default_event_effect = { - if = { - limit = { - this = scope:activity.activity_host - } - trigger_event = { - on_action = feast_default_host_event_selection - days = { min_feast_event_spacing max_feast_event_spacing } - } - } - else = { - trigger_event = { - on_action = feast_default_event_selection - days = { min_feast_event_spacing max_feast_event_spacing } - } - } -} - -feast_end_guest_effect = { - # Only called on the end of a *successful* feast. Feasts which are interrupted due to death, imprisonment, etc., don't get this, so put critical clean-up stuff in the activity itself. - reveler_lifestyle_rank_up_check_effect = yes - stress_impact = { - base = medium_stress_loss - gluttonous = medium_stress_impact_loss - gregarious = medium_stress_impact_loss - shy = medium_stress_impact_gain - } -} - -add_hosted_feast_modifier_towards_character = { - if = { - limit = { - $CHARACTER$ = { - employs_court_position = court_musician_court_position - any_court_position_holder = { - type = court_musician_court_position - is_physically_able = yes - } - } - } - if = { - limit = { # Increase the bonus slightly if musician's culture has Musicical Theorists - $CHARACTER$ = { - any_court_position_holder = { - type = court_musician_court_position - culture = { has_cultural_parameter = characters_are_better_court_musicians } - } - } - } - add_opinion = { - target = $CHARACTER$ - modifier = feast_hosted_successful_feast_with_music - opinion = 35 - } - } - else = { - add_opinion = { - target = $CHARACTER$ - modifier = feast_hosted_successful_feast_with_music - } - } - } - else = { - add_opinion = { - target = $CHARACTER$ - modifier = feast_hosted_successful_feast - } - } -} -# Deprecated. -hosted_successful_feast_effect = { - if = { - limit = { - culture = { - has_cultural_parameter = renown_from_feasts - } - exists = dynasty - } - dynasty = { - add_dynasty_prestige = minor_dynasty_prestige_value - } - } - scope:activity = { - every_attending_character = { - limit = { this != root } - custom = every_guest_scope_tt - add_hosted_feast_modifier_towards_character = { CHARACTER = root } - } - } - reveler_lifestyle_rank_up_check_effect = yes - hidden_effect = { - if = { - limit = { exists = scope:spouse } - add_opinion = { #Your opinion of your Spouse increases, considering they did most of the work - target = scope:spouse - modifier = feast_spouse_hosted_successful_feast_opinion - } - } - } -} - -hosted_successful_feast_new_effect = { - # Renown gain from Tradition. - if = { - limit = { - culture = { has_cultural_parameter = renown_from_feasts } - } - dynasty ?= { add_dynasty_prestige = minor_dynasty_prestige_value } - } - # Piety gain from Tenets. - if = { - limit = { - faith = { - OR = { - has_doctrine_parameter = piety_from_feasts_active - AND = { - has_doctrine_parameter = summer_festivals_active - # Only during 'summer' (May 1st through July 31st). - current_month >= 5 - current_month <= 7 - } - } - } - } - add_piety = { - value = 0 - - if = { - limit = { - faith = { has_doctrine_parameter = summer_festivals_active } - # Only during 'summer' (May 1st through July 31st). - current_month >= 5 - current_month <= 7 - } - add = major_piety_value - } - if = { - limit = { - faith = { has_doctrine = tenet_ritual_celebrations } - } - add = medium_piety_value - } - if = { - limit = { - faith = { has_doctrine = tenet_hedonistic } - } - add = medium_piety_value - } - if = { - limit = { - has_royal_court = yes - has_dlc_feature = royal_court - amenity_level = { target = court_food_quality value >= 5 } - } - multiply = 2.5 - } - else_if = { - limit = { - has_royal_court = yes - has_dlc_feature = royal_court - amenity_level = { target = court_food_quality value >= 4 } - } - multiply = 2 - } - else_if = { - limit = { - has_royal_court = yes - has_dlc_feature = royal_court - amenity_level = { target = court_food_quality value >= 3 } - } - multiply = 1.5 - } - else_if = { - limit = { - has_royal_court = yes - has_dlc_feature = royal_court - amenity_level = { target = court_food_quality value >= 2 } - } - multiply = 1 - } - else_if = { - limit = { - has_royal_court = yes - has_dlc_feature = royal_court - amenity_level = { target = court_food_quality value <= 1 } - } - multiply = 0.5 - } - - # Always give some piety, even if you completely cheaped out. - min = medium_piety_value - } - } - # County development - scope:activity_location.county = { - add_county_modifier = { - modifier = feast_recent_fest_modifier - years = 5 - } - } - # Opinion with spouse (various other opinions handled elsewhere). - hidden_effect = { - if = { - limit = { exists = scope:spouse } - add_opinion = { #Your opinion of your Spouse increases, considering they did most of the work - target = scope:spouse - modifier = feast_spouse_hosted_successful_feast_opinion - } - } - } - - # tgp_ceremonial_liege_events.0020 - if = { - limit = { - var:tgp_ceremonial_liege_events_0020_discount ?= flag:feast - } - tgp_one_up_activity_effect = yes - } -} - -hosted_successful_feast_interrupted_effect = { - add_prestige = medium_prestige_gain - scope:activity = { - every_attending_character = { - limit = { - this != scope:host - } - custom = every_guest_scope_tt - add_hosted_feast_modifier_towards_character = { CHARACTER = scope:host } - } - } - reveler_lifestyle_rank_up_check_effect = yes - hidden_effect = { - if = { - limit = { exists = scope:spouse } - add_opinion = { #Your opinion of your Spouse increases, considering they did most of the work - target = scope:spouse - modifier = feast_spouse_hosted_successful_feast_opinion - } - } - } -} diff --git a/N3OW/common/scripted_effects/00_flavorization_effects.txt b/N3OW/common/scripted_effects/00_flavorization_effects.txt deleted file mode 100644 index c76c21f7..00000000 --- a/N3OW/common/scripted_effects/00_flavorization_effects.txt +++ /dev/null @@ -1,250 +0,0 @@ -additional_flavor_check_effect = { - if = { - limit = { - is_alive = yes - } - if = { # March / Margrave - limit = { - OR = { - AND = { - vassal_contract_has_flag = has_march_contract - highest_held_title_tier = tier_duchy - } - primary_title ?= { - has_variable = margrave_flag - } - } - } - add_character_flag = margrave_flag - } - else_if = { - limit = { - has_character_flag = margrave_flag - } - remove_character_flag = margrave_flag - } - if = { - limit = { - primary_title ?= title:e_hindustan - } - add_character_flag = e_hindustan - } - else_if = { - limit = { - has_character_flag = e_hindustan - } - remove_character_flag = e_hindustan - } - if = { # Palatinate (Duchy Tier) - limit = { - OR = { - AND = { - vassal_contract_has_flag = has_palatinate_contract - highest_held_title_tier = tier_duchy - } - primary_title ?= { - has_variable = duchy_palatinate_flag - } - } - } - add_character_flag = duchy_palatinate_flag - } - else_if = { - limit = { - has_character_flag = duchy_palatinate_flag - } - remove_character_flag = duchy_palatinate_flag - } - if = { # Palatinate (County Tier) - limit = { - OR = { - AND = { - vassal_contract_has_flag = has_palatinate_contract - highest_held_title_tier = tier_county - } - primary_title ?= { - has_variable = county_palatinate_flag - } - } - } - add_character_flag = county_palatinate_flag - } - else_if = { - limit = { - has_character_flag = county_palatinate_flag - } - remove_character_flag = county_palatinate_flag - } - if = { # Castellan / Burgrave - limit = { - OR = { - AND = { - vassal_contract_has_flag = has_castellan_contract - highest_held_title_tier = tier_county - } - primary_title ?= { - has_variable = castellan_flag - } - } - } - add_character_flag = castellan_flag - } - else_if = { - limit = { - has_character_flag = castellan_flag - } - remove_character_flag = castellan_flag - } - if = { # Tenno - limit = { - primary_title ?= { has_variable = ceremonial_liege_flag } - } - add_character_flag = ceremonial_liege_flag - } - else_if = { - limit = { - has_character_flag = ceremonial_liege_flag - } - remove_character_flag = ceremonial_liege_flag - } - } -} - -additional_flavor_check_death_effect = { - if = { - limit = { - OR = { - has_character_flag = margrave_flag - vassal_contract_has_flag = has_march_contract - } - highest_held_title_tier = tier_duchy - } - primary_title ?= { - set_variable = { - name = margrave_flag - days = 1 - } - } - } - else_if = { - limit = { - OR = { - has_character_flag = duchy_palatinate_flag - vassal_contract_has_flag = has_palatinate_contract - } - highest_held_title_tier = tier_duchy - } - primary_title ?= { - set_variable = { - name = duchy_palatinate_flag - days = 1 - } - } - } - else_if = { - limit = { - OR = { - has_character_flag = county_palatinate_flag - vassal_contract_has_flag = has_palatinate_contract - } - highest_held_title_tier = tier_county - } - primary_title ?= { - set_variable = { - name = county_palatinate_flag - days = 1 - } - } - } - else_if = { - limit = { - OR = { - has_character_flag = castellan_flag - vassal_contract_has_flag = has_castellan_contract - } - highest_held_title_tier = tier_county - } - primary_title ?= { - set_variable = { - name = castellan_flag - days = 1 - } - } - } - else_if = { - limit = { - has_character_flag = ceremonial_liege_flag - highest_held_title_tier = tier_kingdom - } - primary_title ?= { - set_variable = { - name = ceremonial_liege_flag - days = 1 - } - } - } -} - -hre_margraves_effect = { - if = { - limit = { - game_start_date = 1066.9.15 - } - title:e_hre.holder = { - every_vassal = { - limit = { - primary_title = { - OR = { - this = title:d_steyermark - this = title:d_osterreich - this = title:d_lausitz - this = title:d_meissen - this = title:d_nordgau - } - } - } - primary_title = { - set_variable = { - name = historical_margrave - days = 1 - } - } - vassal_contract_set_obligation_level = { - type = special_contract - level = 2 - } - additional_flavor_check_effect = yes - } - } - } - else_if = { - limit = { - game_start_date = 1178.10.1 - } - title:e_hre.holder = { - every_vassal = { - limit = { - primary_title = { - OR = { - this = title:d_steyermark - this = title:d_lausitz - this = title:d_ostmark - this = title:d_meissen - } - } - } - primary_title = { - set_variable = { - name = historical_margrave - days = 1 - } - } - vassal_contract_set_obligation_level = { - type = special_contract - level = 2 - } - additional_flavor_check_effect = yes - } - } - } -} diff --git a/N3OW/common/scripted_effects/00_funeral_scripted_effects.txt b/N3OW/common/scripted_effects/00_funeral_scripted_effects.txt deleted file mode 100644 index d96d6fd2..00000000 --- a/N3OW/common/scripted_effects/00_funeral_scripted_effects.txt +++ /dev/null @@ -1,86 +0,0 @@ -#Effects used in Funerals - -#funeral_add_funeral_targets_to_list - Effect fills target list with available funeral target characters - -funeral_add_funeral_targets_to_list = { - clear_variable_list = $LIST_NAME$ - save_scope_as = list_scope - - primary_title ?= { - every_past_holder = { - limit = { - body_is_available = yes - } - scope:list_scope = { - add_to_variable_list = { - name = $LIST_NAME$ - target = prev - } - } - } - } - every_close_or_extended_family_member = { - even_if_dead = yes - limit = { - body_is_available = yes - } - scope:list_scope = { - add_to_variable_list = { - name = $LIST_NAME$ - target = prev - } - } - } - every_spouse = { - even_if_dead = yes - limit = { - body_is_available = yes - } - scope:list_scope = { - add_to_variable_list = { - name = $LIST_NAME$ - target = prev - } - } - } - every_memory = { - limit = { - OR = { - has_memory_type = friend_died - has_memory_type = lover_died - has_memory_type = soulmate_died - } - trigger_if = { - limit = { exists = memory_participant:dead_relation } - memory_participant:dead_relation = { body_is_available = yes } - } - trigger_else = { always = no } - } - memory_participant:dead_relation = { - scope:list_scope = { - add_to_variable_list = { - name = $LIST_NAME$ - target = prev - } - } - } - } - - - # ACH dead officiator - - if = { - limit = { - var:dead_officiator_funeral ?= { - body_is_available = yes - } - } - scope:list_scope = { - add_to_variable_list = { - name = $LIST_NAME$ - target = var:dead_officiator_funeral - } - } - } - -} diff --git a/N3OW/common/scripted_effects/00_game_rule_effects.txt b/N3OW/common/scripted_effects/00_game_rule_effects.txt deleted file mode 100644 index 43e4d03e..00000000 --- a/N3OW/common/scripted_effects/00_game_rule_effects.txt +++ /dev/null @@ -1,3198 +0,0 @@ -###################### -# GENERATED FAMILIES # -###################### - -game_rule_create_spouse_and_children = { - $CHARACTER$ = { - #If not married, create spouse - if = { - limit = { - is_married = no - } - create_character = { - location = $LOCATION$.location - culture = $CHARACTER$.culture - faith = $CHARACTER$.faith - gender_female_chance = $CHARACTER$.marriage_gender_adjusted_female_chance - age = $CHARACTER$.age - save_scope_as = spouse - } - - if = { - limit = { is_male = yes } - marry = scope:spouse - } - else = { - marry_matrilineal = scope:spouse - } - if = { - limit = { - has_trait = nomadic_philosophy - } - scope:spouse = { - add_trait = nomadic_philosophy - } - } - if = { - limit = { - NOT = { exists = scope:spouse.employer } - $LOCATION$ = { is_ruler = yes } - } - $LOCATION$ = { add_courtier = scope:spouse } - } - } - else = { - primary_spouse = { save_scope_as = spouse } - } - - if = { - limit = { is_male = yes } - save_scope_as = father - scope:spouse = { - if = { - limit = { - is_female = yes - } - save_scope_as = mother - } - } - } - else = { - save_scope_as = mother - scope:spouse = { - if = { - limit = { - is_male = yes - } - save_scope_as = father - } - } - } - - #Create child 1 (mother age 17+) - if = { - limit = { - exists = scope:mother - scope:mother.age >= 17 - } - if = { #Do we have a father saved? - limit = { - exists = scope:father - } - create_character = { - location = $LOCATION$.location - culture = $CHARACTER$.culture - faith = $CHARACTER$.faith - gender_female_chance = { - if = { - limit = { - is_ruler = yes - $CHARACTER$ = { has_realm_law = male_only_law } - } - value = 0 - } - else_if = { - limit = { - is_ruler = yes - $CHARACTER$ = { has_realm_law = female_only_law } - } - value = 100 - } - else = { - value = 50 - } - } - age = { - value = scope:mother.age - subtract = 17 - } - father = scope:father - mother = scope:mother - dynasty = inherit - save_scope_as = child_1 - } - } - else = { #If we don't have a father we generate a child without - create_character = { - location = $LOCATION$.location - culture = $CHARACTER$.culture - faith = $CHARACTER$.faith - gender_female_chance = { - if = { - limit = { - is_ruler = yes - $CHARACTER$ = { has_realm_law = male_only_law } - } - value = 0 - } - else_if = { - limit = { - is_ruler = yes - $CHARACTER$ = { has_realm_law = female_only_law } - } - value = 100 - } - else = { - value = 50 - } - } - age = { - value = scope:mother.age - subtract = 17 - } - mother = scope:mother - dynasty = inherit - save_scope_as = child_1 - } - } - } - #Create child 1 (no mother) - else_if = { - limit = { - NOT = { exists = scope:mother } - } - create_character = { - location = $LOCATION$.location - culture = $CHARACTER$.culture - faith = $CHARACTER$.faith - gender_female_chance = { - if = { - limit = { - is_ruler = yes - $CHARACTER$ = { has_realm_law = male_only_law } - } - value = 0 - } - else_if = { - limit = { - is_ruler = yes - $CHARACTER$ = { has_realm_law = female_only_law } - } - value = 100 - } - else = { - value = 50 - } - } - age = { - value = scope:mother.age - subtract = 17 - } - father = scope:father - dynasty = inherit - save_scope_as = child_1 - } - } - - #Create child 2 (mother age 25+) - if = { - limit = { - exists = scope:mother - scope:mother.age >= 25 - } - - if = { #Do we have a father saved? - limit = { - exists = scope:father - } - create_character = { - location = $LOCATION$.location - culture = $CHARACTER$.culture - faith = $CHARACTER$.faith - gender_female_chance = { - value = 50 - } - age = { - value = scope:mother.age - subtract = 25 - } - father = scope:father - mother = scope:mother - dynasty = inherit - save_scope_as = child_2 - } - } - else = { #If we don't have a father we generate a child without - create_character = { - location = $LOCATION$.location - culture = $CHARACTER$.culture - faith = $CHARACTER$.faith - gender_female_chance = { - value = 50 - } - age = { - value = scope:mother.age - subtract = 25 - } - mother = scope:mother - dynasty = inherit - save_scope_as = child_2 - } - } - } - - #Create child 3 (mother age 33+) - if = { - limit = { - exists = scope:mother - scope:mother.age >= 33 - } - - if = { #Do we have a father saved? - limit = { - exists = scope:father - } - create_character = { - location = $LOCATION$.location - culture = $CHARACTER$.culture - faith = $CHARACTER$.faith - gender_female_chance = { - value = 50 - } - age = { - value = scope:mother.age - subtract = 33 - } - father = scope:father - mother = scope:mother - dynasty = inherit - save_scope_as = child_3 - } - } - else = { #If we don't have a father we generate a child without - create_character = { - location = $LOCATION$.location - culture = $CHARACTER$.culture - faith = $CHARACTER$.faith - gender_female_chance = { - value = 50 - } - age = { - value = scope:mother.age - subtract = 33 - } - mother = scope:mother - dynasty = inherit - save_scope_as = child_3 - } - } - } - - if = { - limit = { - exists = scope:child_1 - NOT = { exists = scope:child_1.employer } - $LOCATION$ = { is_ruler = yes } - } - $LOCATION$ = { add_courtier = scope:child_1 } - } - if = { - limit = { - exists = scope:child_2 - NOT = { exists = scope:child_2.employer } - $LOCATION$ = { is_ruler = yes } - } - $LOCATION$ = { add_courtier = scope:child_2 } - } - if = { - limit = { - exists = scope:child_3 - NOT = { exists = scope:child_3.employer } - $LOCATION$ = { is_ruler = yes } - } - $LOCATION$ = { add_courtier = scope:child_3 } - } - if = { - limit = { - has_trait = nomadic_philosophy - } - scope:child_1 ?= { - if = { - limit = { - NOT = { has_trait = nomadic_philosophy } - } - add_trait = nomadic_philosophy - } - } - scope:child_2 ?= { - if = { - limit = { - NOT = { has_trait = nomadic_philosophy } - } - add_trait = nomadic_philosophy - } - } - scope:child_3 ?= { - if = { - limit = { - NOT = { has_trait = nomadic_philosophy } - } - add_trait = nomadic_philosophy - } - } - } - } -} - - -################### -# GENDER EQUALITY # -################### - -#Full equality -game_rule_full_gender_equality_effect = { - every_religion_global = { - every_faith = { - ## DOCTRINE_GENDER - if = { - limit = { has_doctrine = doctrine_gender_male_dominated } - remove_doctrine = doctrine_gender_male_dominated - } - else_if = { - limit = { has_doctrine = doctrine_gender_female_dominated } - remove_doctrine = doctrine_gender_female_dominated - } - - if = { - limit = { NOT = { has_doctrine = doctrine_gender_equal } } - add_doctrine = doctrine_gender_equal - } - - ## DOCTRINE_CLERICAL_GENDER - if = { - limit = { has_doctrine = doctrine_clerical_gender_male_only } - remove_doctrine = doctrine_clerical_gender_male_only - } - else_if = { - limit = { has_doctrine = doctrine_clerical_gender_female_only } - remove_doctrine = doctrine_clerical_gender_female_only - } - - if = { - limit = { NOT = { has_doctrine = doctrine_clerical_gender_either } } - add_doctrine = doctrine_clerical_gender_either - } - - - ## DOCTRINE_ADULTERY_MEN & DOCTRINE_ADULTERY_WOMEN - #Makes the adultery doctrine same for both genders (picks lesser version) - - #Any of them accepted? Both should be accepted - if = { - limit = { - OR = { - has_doctrine = doctrine_adultery_men_accepted - has_doctrine = doctrine_adultery_women_accepted - } - } - - #Is male wrong? - if = { - limit = { NOT = { has_doctrine = doctrine_adultery_men_accepted } } - - if = { - limit = { has_doctrine = doctrine_adultery_men_crime } - remove_doctrine = doctrine_adultery_men_crime - } - else_if = { - limit = { has_doctrine = doctrine_adultery_men_shunned } - remove_doctrine = doctrine_adultery_men_shunned - } - add_doctrine = doctrine_adultery_men_accepted - } - - #Is female wrong? - if = { - limit = { NOT = { has_doctrine = doctrine_adultery_women_accepted } } - - if = { - limit = { has_doctrine = doctrine_adultery_women_crime } - remove_doctrine = doctrine_adultery_women_crime - } - else_if = { - limit = { has_doctrine = doctrine_adultery_women_shunned } - remove_doctrine = doctrine_adultery_women_shunned - } - add_doctrine = doctrine_adultery_women_accepted - } - } - ##Any of them shunned? Both should be shunned - else_if = { - limit = { - OR = { - has_doctrine = doctrine_adultery_men_shunned - has_doctrine = doctrine_adultery_women_shunned - } - } - - #Is male wrong? - if = { - limit = { NOT = { has_doctrine = doctrine_adultery_men_shunned } } - remove_doctrine = doctrine_adultery_men_crime - add_doctrine = doctrine_adultery_men_shunned - } - - #Is female wrong? - if = { - limit = { NOT = { has_doctrine = doctrine_adultery_women_shunned } } - remove_doctrine = doctrine_adultery_women_crime - add_doctrine = doctrine_adultery_women_shunned - } - } - ##Else: they're both criminal, nothing to do here - } - } - - ## REALM LAW - every_ruler = { - if = { - limit = { - OR = { - has_realm_law = male_preference_law - has_realm_law = female_preference_law - has_realm_law = female_only_law - has_realm_law = male_only_law - } - } - add_realm_law = equal_law - } - } - - ## CULTURES - MARTIAL CUSTOM - every_culture_global = { - if = { - limit = { - OR = { - has_cultural_pillar = martial_custom_male_only - has_cultural_pillar = martial_custom_female_only - } - } - set_culture_pillar = martial_custom_equal - } - } - - #Specific titles' law -} - - - -game_rule_inversed_gender_equality_effect = { - every_religion_global = { - every_faith = { - - ## DOCTRINE_GENDER - if = { - limit = { has_doctrine = doctrine_gender_male_dominated } - remove_doctrine = doctrine_gender_male_dominated - add_doctrine = doctrine_gender_female_dominated - } - else_if = { - limit = { has_doctrine = doctrine_gender_female_dominated } - remove_doctrine = doctrine_gender_female_dominated - add_doctrine = doctrine_gender_male_dominated - } - #Else: equal, do nothing - - ## DOCTRINE_CLERICAL_GENDER - if = { - limit = { has_doctrine = doctrine_clerical_gender_male_only } - remove_doctrine = doctrine_clerical_gender_male_only - add_doctrine = doctrine_clerical_gender_female_only - } - else_if = { - limit = { has_doctrine = doctrine_clerical_gender_female_only } - remove_doctrine = doctrine_clerical_gender_female_only - add_doctrine = doctrine_clerical_gender_male_only - } - #Else: either, do nothing - - ## DOCTRINE_ADULTERY_MEN & DOCTRINE_ADULTERY_WOMEN - # Men and women swap doctrine - if = { - limit = { - NOR = { - AND = { - has_doctrine = doctrine_adultery_women_accepted - has_doctrine = doctrine_adultery_men_accepted - } - AND = { - has_doctrine = doctrine_adultery_women_shunned - has_doctrine = doctrine_adultery_men_shunned - } - AND = { - has_doctrine = doctrine_adultery_women_crime - has_doctrine = doctrine_adultery_men_crime - } - } - } - # Save women's doctrine - if = { - limit = { has_doctrine = doctrine_adultery_women_accepted } - save_scope_value_as = { - name = doctrine_adultery_women - value = flag:doctrine_adultery_women_accepted - } - } - else_if = { - limit = { has_doctrine = doctrine_adultery_women_shunned } - save_scope_value_as = { - name = doctrine_adultery_women - value = flag:doctrine_adultery_women_shunned - } - } - else_if = { - limit = { has_doctrine = doctrine_adultery_women_crime } - save_scope_value_as = { - name = doctrine_adultery_women - value = flag:doctrine_adultery_women_crime - } - } - - # Give women mens' doctrine - if = { - limit = { has_doctrine = doctrine_adultery_men_accepted } - if = { - limit = { has_doctrine = doctrine_adultery_women_shunned } - remove_doctrine = doctrine_adultery_women_shunned - } - else_if = { - limit = { has_doctrine = doctrine_adultery_women_crime } - remove_doctrine = doctrine_adultery_women_crime - } - add_doctrine = doctrine_adultery_women_accepted - } - else_if = { - limit = { has_doctrine = doctrine_adultery_men_shunned } - if = { - limit = { has_doctrine = doctrine_adultery_women_accepted } - remove_doctrine = doctrine_adultery_women_accepted - } - else_if = { - limit = { has_doctrine = doctrine_adultery_women_crime } - remove_doctrine = doctrine_adultery_women_crime - } - add_doctrine = doctrine_adultery_women_shunned - } - else_if = { - limit = { has_doctrine = doctrine_adultery_men_crime } - if = { - limit = { has_doctrine = doctrine_adultery_women_accepted } - remove_doctrine = doctrine_adultery_women_accepted - } - else_if = { - limit = { has_doctrine = doctrine_adultery_women_shunned } - remove_doctrine = doctrine_adultery_women_shunned - } - add_doctrine = doctrine_adultery_women_crime - } - - # Give men women' doctrine - if = { - limit = { scope:doctrine_adultery_women = flag:doctrine_adultery_women_accepted } - if = { - limit = { has_doctrine = doctrine_adultery_men_shunned } - remove_doctrine = doctrine_adultery_men_shunned - } - else_if = { - limit = { has_doctrine = doctrine_adultery_men_crime } - remove_doctrine = doctrine_adultery_men_crime - } - add_doctrine = doctrine_adultery_men_accepted - } - else_if = { - limit = { scope:doctrine_adultery_women = flag:doctrine_adultery_women_shunned } - if = { - limit = { has_doctrine = doctrine_adultery_men_accepted } - remove_doctrine = doctrine_adultery_men_accepted - } - else_if = { - limit = { has_doctrine = doctrine_adultery_men_crime } - remove_doctrine = doctrine_adultery_men_crime - } - add_doctrine = doctrine_adultery_men_shunned - } - else_if = { - limit = { scope:doctrine_adultery_women = flag:doctrine_adultery_women_crime } - if = { - limit = { has_doctrine = doctrine_adultery_men_accepted } - remove_doctrine = doctrine_adultery_men_accepted - } - else_if = { - limit = { has_doctrine = doctrine_adultery_men_shunned } - remove_doctrine = doctrine_adultery_men_shunned - } - add_doctrine = doctrine_adultery_men_crime - } - } - } - } - - ## REALM LAW - every_ruler = { - # Take care of any titles with their own title laws. - every_held_title = { - limit = { can_title_have_law_general_trigger = yes } - # Invert male-only. - if = { - limit = { has_title_law = male_only_law } - remove_title_law = male_only_law - add_title_law = female_only_law - } - # Invert female-only. - else_if = { - limit = { has_title_law = female_only_law } - remove_title_law = female_only_law - add_title_law = male_only_law - } - } - # Now realm law. - if = { - limit = { has_realm_law = male_only_law } - add_realm_law = female_only_law - if = { - limit = { - highest_held_title_tier >= tier_county - is_male = yes - is_ai = yes - any_heir = { is_female = yes } - } - depose = yes - } - } - else_if = { - limit = { has_realm_law = male_preference_law } - add_realm_law = female_preference_law - if = { - limit = { - highest_held_title_tier >= tier_county - is_male = yes - is_ai = yes - any_heir = { is_female = yes } - } - depose = yes - } - } - else_if = { - limit = { has_realm_law = female_preference_law } - add_realm_law = male_preference_law - if = { - limit = { - highest_held_title_tier >= tier_county - is_female = yes - is_ai = yes - any_heir = { is_male = yes } - } - depose = yes - } - } - else_if = { - limit = { has_realm_law = female_only_law } - add_realm_law = male_only_law - if = { - limit = { - highest_held_title_tier >= tier_county - is_female = yes - is_ai = yes - any_heir = { is_male = yes } - } - depose = yes - } - } - #Else: equal, nothing changes - } - - # We handle religious titles here because title law overlaps with faith law in weird ways otherwise. - ## Take care of first-generation HoFs. - every_religion_global = { - every_faith = { - if = { - limit = { - has_doctrine = doctrine_clerical_gender_male_only - religious_head ?= { is_female = yes } - } - religious_head = { depose = yes } - } - else_if = { - limit = { - has_doctrine = doctrine_clerical_gender_female_only - religious_head ?= { is_male = yes } - } - religious_head = { depose = yes } - } - } - } - - ## CULTURES - MARTIAL CUSTOM - every_culture_global = { - if = { - limit = { has_cultural_pillar = martial_custom_male_only } - set_culture_pillar = martial_custom_female_only - } - else_if = { - limit = { has_cultural_pillar = martial_custom_female_only } - set_culture_pillar = martial_custom_male_only - } - } -} - -game_rule_accepted_same_sex_relations_effect = { - every_religion_global = { - every_faith = { - if = { - limit = { has_doctrine = doctrine_homosexuality_crime } - remove_doctrine = doctrine_homosexuality_crime - } - else_if = { - limit = { has_doctrine = doctrine_homosexuality_shunned } - remove_doctrine = doctrine_homosexuality_shunned - } - - if = { - limit = { NOT = { has_doctrine = doctrine_homosexuality_accepted } } - add_doctrine = doctrine_homosexuality_accepted - } - #Else: equal, do nothing - } - } -} - -game_rule_lenient_gender_equality_effect = { - ## REALM LAW - every_ruler = { - # Take care of any titles with their own title laws. - every_held_title = { - limit = { can_title_have_law_general_trigger = yes } - # Make male only -> male preference. - if = { - limit = { has_title_law = male_only_law } - remove_title_law = male_only_law - add_title_law = male_preference_law - } - } - # Now realm law. - if = { - limit = { has_realm_law = male_only_law } - add_realm_law = male_preference_law - } - } -} - -########################## -# RANDOM RULER PLACEMENT # -########################## - -game_rule_random_ruler_placement_shuffle_list_effect = { - random_in_list = { - list = $LIST_NAME$ - save_scope_as = previous_ruler - remove_from_list = $LIST_NAME$ - } #First ruler will get stuff and not give away anything, lucky them - - while = { - limit = { - any_in_list = { - list = $LIST_NAME$ - NOT = { has_character_flag = already_swapped } - } - } - random_in_list = { - limit = { NOT = { has_character_flag = already_swapped } } - list = $LIST_NAME$ - - #Create change - create_title_and_vassal_change = { - type = conquest - save_scope_as = change - add_claim_on_loss = no - } - every_held_title = { - title_tier >= county - change_title_holder_include_vassals = { - holder = scope:previous_ruler - change = scope:change - } - } - resolve_title_and_vassal_change = scope:change - - #Convert if needed - if = { - limit = { has_game_rule = random_ruler_placement_on_conversion } - set_character_faith_with_conversion = scope:previous_ruler.faith - } - - #Saved to take titles next + blocked from being stolen from again - save_scope_as = previous_ruler - add_character_flag = { - flag = already_swapped - days = 3 - } - } - } -} - -game_rule_random_ruler_placement_effect = { - every_ruler = { - limit = { - save_temporary_scope_as = ruler_for_list - NOR = { - is_ai = no - any_liege_or_above = { - is_ai = no - dynasty = scope:ruler_for_list.dynasty - } - } - } - - if = { - limit = { highest_held_title_tier = tier_barony } - add_to_list = random_placement_barons - } - else_if = { - limit = { highest_held_title_tier = tier_county } - add_to_list = random_placement_counts - } - else_if = { - limit = { highest_held_title_tier = tier_duchy } - add_to_list = random_placement_dukes - } - else = { - add_to_list = random_placement_emperors_kings - } - } - - - ### BARONS SHUFFLE ### - game_rule_random_ruler_placement_shuffle_list_effect = { LIST_NAME = random_placement_barons } - - ### COUNTS SHUFFLE ### - game_rule_random_ruler_placement_shuffle_list_effect = { LIST_NAME = random_placement_counts } - - ### DUKES SHUFFLE ### - game_rule_random_ruler_placement_shuffle_list_effect = { LIST_NAME = random_placement_dukes } - - ### EMPERORS AND KINGS SHUFFLE ### - game_rule_random_ruler_placement_shuffle_list_effect = { LIST_NAME = random_placement_emperors_kings } - - ### MAKE EXCLAVES INDEPENDENT ### - every_ruler = { - limit = { - top_liege != this - save_temporary_scope_as = exclave_check - NOT = { - any_held_title = { - title_tier = county - any_neighboring_county = { - holder = { - NOR = { - this = scope:exclave_check - target_is_liege_or_above = scope:exclave_check - } - top_liege = scope:exclave_check.top_liege - } - } - } - } - } - - create_title_and_vassal_change = { - type = independency - save_scope_as = change - add_claim_on_loss = no - } - becomes_independent = { - change = scope:change - } - - resolve_title_and_vassal_change = scope:change - } -} - -#################### -# FAITH ACCEPTANCE # -#################### - -game_rule_randomize_faith_randomization_effect = { - if = { - limit = { - trigger_if = { - limit = { top_liege != this } - faith != liege.faith #We don't want to override faiths which "trickled down" via conversion effect - } - trigger_else = { - always = yes - } - } - - - - #Randomize faith - random_in_list = { - list = faiths_list - save_temporary_scope_as = randomized_faith - } - - #Covert all courtiers, guests, pool characters of same faith - if = { - limit = { - exists = capital_province - } - save_temporary_scope_as = this_ruler - every_pool_character = { - province = scope:this_ruler.capital_province - limit = { faith = scope:this_ruler.faith } - set_character_faith = scope:randomized_faith - } - } - every_courtier_or_guest = { - limit = { faith = prev.faith } - set_character_faith = scope:randomized_faith - } - - #Change faith with conversion for chance of trickling down to vassals - set_character_faith_with_conversion = scope:randomized_faith - - #Convert every held county - every_held_title = { - title_tier = county - set_county_faith = scope:randomized_faith - } - } -} - -game_rule_randomize_faith_effect = { - #Build faith list - every_religion_global = { - every_faith = { - add_to_list = faiths_list - } - } - - #Save all rulers in tiered lists - every_ruler = { - if = { - limit = { highest_held_title_tier = tier_barony } - add_to_list = random_faith_barony_list - } - else_if = { - limit = { highest_held_title_tier = tier_county } - add_to_list = random_faith_county_list - } - else_if = { - limit = { highest_held_title_tier = tier_duchy } - add_to_list = random_faith_duchy_list - } - else_if = { - limit = { highest_held_title_tier = tier_kingdom } - add_to_list = random_faith_kingdom_list - } - else_if = { - limit = { highest_held_title_tier = tier_empire } - add_to_list = random_faith_empire_list - } - } - - #Apply random faiths top-down (for conversion trickle down) - every_in_list = { - list = random_faith_empire_list - game_rule_randomize_faith_randomization_effect = yes - } - every_in_list = { - list = random_faith_kingdom_list - game_rule_randomize_faith_randomization_effect = yes - } - every_in_list = { - list = random_faith_duchy_list - game_rule_randomize_faith_randomization_effect = yes - } - every_in_list = { - list = random_faith_county_list - game_rule_randomize_faith_randomization_effect = yes - } - every_in_list = { - list = random_faith_barony_list - set_character_faith = scope:liege.faith - } -} - -#################### -# FAITH ACCEPTANCE # -#################### - -game_rule_faith_acceptance_effect = { - every_religion_global = { - every_faith = { - #Set to pluralist, not because it matters but because it looks good - if = { - limit = { has_doctrine = doctrine_pluralism_fundamentalist } - remove_doctrine = doctrine_pluralism_fundamentalist - add_doctrine = doctrine_pluralism_pluralistic - } - else_if = { - limit = { has_doctrine = doctrine_pluralism_righteous } - remove_doctrine = doctrine_pluralism_righteous - add_doctrine = doctrine_pluralism_pluralistic - } - - #Add special doctrine - add_doctrine = special_doctrine_full_tolerance - } - } -} - - -########################## -# SEXUALITY DISTRIBUTION # -########################## - -game_rule_sexuality_distribution_reroll_effect = { - if = { - limit = { age >= 10 } - random_list = { - 0 = { - modifier = { add = heterosexuality_chance } - set_sexuality = heterosexual - } - 0 = { - modifier = { add = bisexuality_chance } - set_sexuality = bisexual - } - 0 = { - modifier = { add = homosexuality_chance } - set_sexuality = homosexual - } - 0 = { - modifier = { add = asexuality_chance } - set_sexuality = asexual - } - } - } -} - -game_rule_sexuality_distribution_effect = { - every_ruler = { - game_rule_sexuality_distribution_reroll_effect = yes - - every_courtier_or_guest = { - game_rule_sexuality_distribution_reroll_effect = yes - } - - every_held_title = { - title_tier = county - title_province = { save_scope_as = pool_province } - every_pool_character = { - limit = { NOT = { is_in_list = pool_characters } } - province = scope:pool_province - add_to_list = pool_characters - } - } - } - - every_in_list = { - list = pool_characters - game_rule_sexuality_distribution_reroll_effect = yes - } - - # Sets the values for future generated characters - set_generated_homosexuality_chance = homosexuality_chance - set_generated_bisexuality_chance = bisexuality_chance - set_generated_asexuality_chance = asexuality_chance -} - -child_sexuality_distribution_effect = { - every_ruler = { - if = { - limit = { - is_adult = no - age >= 10 - } - game_rule_sexuality_distribution_reroll_effect = yes - } - - every_courtier_or_guest = { - if = { - limit = { - is_adult = no - age >= 10 - } - game_rule_sexuality_distribution_reroll_effect = yes - } - } - - every_held_title = { - title_tier = county - title_province = { save_scope_as = pool_province } - every_pool_character = { - limit = { NOT = { is_in_list = pool_characters } } - province = scope:pool_province - add_to_list = pool_characters - } - } - } - - every_in_list = { - list = pool_characters - if = { - limit = { - is_adult = no - age >= 10 - } - game_rule_sexuality_distribution_reroll_effect = yes - } - } -} - - -######################## -# EXCLAVE INDEPENDENCE # -######################## - -game_rule_exclave_independence_effect = { - if = { # Limited, AI only - limit = { - has_game_rule = ai_limited_exclave_independence - is_ai = yes - NOT = { - any_vassal_or_below = { - is_ai = no - } - } - } - - remove_character_flag = delayed_cleanse - - root.capital_province.county = { - every_connected_county = { # Start off by making a list of all disconnected Counties - invert = yes - max_naval_distance = 2000 - allow_one_county_land_gap = yes - add_to_list = disconnected_counties - } - } - - every_in_list = { - list = disconnected_counties - - limit = { - any_connected_county = { - NOT = { is_in_list = disconnected_counties } - max_naval_distance = 2000 - } - } - add_to_list = cull_naval_connection_counties - } - - while = { - limit = { - any_in_list = { - list = cull_naval_connection_counties - } - } - random_in_list = { - list = cull_naval_connection_counties - - save_scope_as = cull_origin_county - - every_connected_county = { - remove_from_list = cull_naval_connection_counties - remove_from_list = disconnected_counties - } - remove_from_list = cull_naval_connection_counties - remove_from_list = disconnected_counties - } - } - - every_in_list = { - list = disconnected_counties - - limit = { - target_is_de_jure_liege_or_above = root.primary_title - } - add_to_list = cull_de_jure_connection_counties - } - - while = { - limit = { - any_in_list = { - list = cull_de_jure_connection_counties - } - } - random_in_list = { - list = cull_de_jure_connection_counties - - save_scope_as = cull_origin_county - - every_connected_county = { - remove_from_list = cull_de_jure_connection_counties - remove_from_list = disconnected_counties - } - remove_from_list = cull_de_jure_connection_counties - remove_from_list = disconnected_counties - } - } - - every_in_list = { # Release Kings first - list = disconnected_counties - - limit = { - holder.primary_title.tier = tier_kingdom - NOR = { - holder = root - holder = { - any_sub_realm_title = { - tier = tier_county - NOT = { is_in_list = disconnected_counties } - } - } - } - } - holder = { - create_title_and_vassal_change = { - type = independency - save_scope_as = change - add_claim_on_loss = yes - } - becomes_independent = { - change = scope:change - } - resolve_title_and_vassal_change = scope:change - } - } - - every_in_list = { # Release Dukes second - list = disconnected_counties - - limit = { - holder.primary_title.tier = tier_duchy - NOR = { - holder = root - holder = { - any_sub_realm_title = { - tier = tier_county - NOT = { is_in_list = disconnected_counties } - } - } - } - } - holder = { - create_title_and_vassal_change = { - type = independency - save_scope_as = change - add_claim_on_loss = yes - } - becomes_independent = { - change = scope:change - } - resolve_title_and_vassal_change = scope:change - } - } - - every_in_list = { # Release Counts last - list = disconnected_counties - - limit = { - holder.primary_title.tier = tier_county - NOR = { - holder = root - holder = { - any_sub_realm_title = { - tier = tier_county - NOT = { is_in_list = disconnected_counties } - } - } - } - } - holder = { - create_title_and_vassal_change = { - type = independency - save_scope_as = change - add_claim_on_loss = yes - } - becomes_independent = { - change = scope:change - } - resolve_title_and_vassal_change = scope:change - } - } - - every_in_list = { # Finally, release contiguous areas under someone from the pool - list = disconnected_counties - - limit = { - OR = { - holder.top_liege = root - holder = root - } - } - - save_scope_as = county_of_origin - - every_pool_character = { - province = scope:county_of_origin.title_province - limit = { - is_available_adult = yes - } - add_to_list = potential_holders - } - - every_pool_character = { - province = scope:county_of_origin.holder.capital_province - limit = { - is_available_adult = yes - } - add_to_list = potential_holders - } - - if = { - limit = { - NOT = { - any_in_list = { - list = potential_holders - is_available_adult = yes - } - } - } - create_character = { - location = scope:county_of_origin.title_province - culture = scope:county_of_origin.culture - faith = scope:county_of_origin.faith - gender_female_chance = 50 - age = 32 - save_scope_as = backup_character - } - scope:backup_character = { - add_to_list = potential_holders - } - } - - random_in_list = { - list = potential_holders - limit = { - is_available_adult = yes - has_claim_on = scope:county_of_origin - faith = { - has_dominant_ruling_gender = prev - } - } - alternative_limit = { - is_available_adult = yes - culture = scope:county_of_origin.culture - faith = scope:county_of_origin.faith - faith = { - has_dominant_ruling_gender = prev - } - } - alternative_limit = { - is_available_adult = yes - culture = scope:county_of_origin.culture - faith = { - has_dominant_ruling_gender = prev - } - } - alternative_limit = { - is_available_adult = yes - faith = scope:county_of_origin.faith - faith = { - has_dominant_ruling_gender = prev - } - } - alternative_limit = { - is_available_adult = yes - faith = { - has_dominant_ruling_gender = prev - } - } - alternative_limit = { - is_available_adult = yes - has_claim_on = scope:county_of_origin - } - alternative_limit = { - is_available_adult = yes - culture = scope:county_of_origin.culture - faith = scope:county_of_origin.faith - } - alternative_limit = { - is_available_adult = yes - culture = scope:county_of_origin.culture - } - alternative_limit = { - is_available_adult = yes - faith = scope:county_of_origin.faith - } - alternative_limit = { - is_available_adult = yes - } - - save_scope_as = new_county_holder - add_character_flag = { - flag = domicile_culture_and_faith_check - days = 1 - } - #get_title = scope:county_of_origin - - create_title_and_vassal_change = { - type = independency - save_scope_as = change - add_claim_on_loss = yes - } - every_in_list = { - list = disconnected_counties - limit = { - OR = { - holder.top_liege = root - holder = root - } - is_connected_to = { - target = scope:county_of_origin - } - NOT ={ - is_connected_to = { - target = root.capital_province.county - } - } - } - change_title_holder = { - holder = scope:new_county_holder - change = scope:change - } - #scope:new_county_holder = { get_title = prev } - } - becomes_independent = { - change = scope:change - } - resolve_title_and_vassal_change = scope:change - - # This system should not generate strange-culture nomads - if = { - limit = { - government_has_flag = government_is_nomadic - domicile.domicile_culture != scope:new_county_holder.capital_county.culture - } - domicile = { - set_domicile_culture = scope:new_county_holder.capital_county.culture - } - } - if = { - limit = { - government_has_flag = government_is_nomadic - domicile.domicile_faith != scope:new_county_holder.capital_county.faith - } - domicile = { - set_domicile_faith = scope:new_county_holder.capital_county.faith - } - } - if = { # Just in case they need to create a duchy - limit = { - gold < 500 - } - add_gold = 500 - } - } - } - } - else_if = { # Significant, AI Only - limit = { - has_game_rule = ai_significant_exclave_independence - is_ai = yes - NOT = { - any_vassal_or_below = { - is_ai = no - } - } - } - - remove_character_flag = delayed_cleanse - - root.capital_province.county = { - every_connected_county = { # Start off by making a list of all disconnected Counties - invert = yes - max_naval_distance = 2000 - add_to_list = disconnected_counties - } - } - - every_in_list = { - list = disconnected_counties - - limit = { - target_is_de_jure_liege_or_above = root.primary_title - } - add_to_list = cull_de_jure_connection_counties - } - - while = { - limit = { - any_in_list = { - list = cull_de_jure_connection_counties - } - } - random_in_list = { - list = cull_de_jure_connection_counties - - save_scope_as = cull_origin_county - - every_connected_county = { - remove_from_list = cull_de_jure_connection_counties - remove_from_list = disconnected_counties - } - remove_from_list = cull_de_jure_connection_counties - remove_from_list = disconnected_counties - } - } - - every_in_list = { - list = disconnected_counties - - limit = { - any_connected_county = { - NOT = { is_in_list = disconnected_counties } - max_naval_distance = 2000 - } - } - add_to_list = cull_naval_connection_counties - } - - while = { - limit = { - any_in_list = { - list = cull_naval_connection_counties - } - } - random_in_list = { - list = cull_naval_connection_counties - - save_scope_as = cull_origin_county - - every_connected_county = { - remove_from_list = cull_naval_connection_counties - remove_from_list = disconnected_counties - } - remove_from_list = cull_naval_connection_counties - remove_from_list = disconnected_counties - } - } - - every_in_list = { # Release Kings first - list = disconnected_counties - - limit = { - holder.primary_title.tier = tier_kingdom - NOR = { - holder = root - holder = { - any_sub_realm_title = { - tier = tier_county - NOT = { is_in_list = disconnected_counties } - } - } - } - } - holder = { - create_title_and_vassal_change = { - type = independency - save_scope_as = change - add_claim_on_loss = yes - } - becomes_independent = { - change = scope:change - } - resolve_title_and_vassal_change = scope:change - } - } - - every_in_list = { # Release Dukes second - list = disconnected_counties - - limit = { - holder.primary_title.tier = tier_duchy - NOR = { - holder = root - holder = { - any_sub_realm_title = { - tier = tier_county - NOT = { is_in_list = disconnected_counties } - } - } - } - } - holder = { - create_title_and_vassal_change = { - type = independency - save_scope_as = change - add_claim_on_loss = yes - } - becomes_independent = { - change = scope:change - } - resolve_title_and_vassal_change = scope:change - } - } - - every_in_list = { # Release Counts last - list = disconnected_counties - - limit = { - holder.primary_title.tier = tier_county - NOR = { - holder = root - holder = { - any_sub_realm_title = { - tier = tier_county - NOT = { is_in_list = disconnected_counties } - } - } - } - } - holder = { - create_title_and_vassal_change = { - type = independency - save_scope_as = change - add_claim_on_loss = yes - } - becomes_independent = { - change = scope:change - } - resolve_title_and_vassal_change = scope:change - } - } - - every_in_list = { # Finally, release contiguous areas under someone from the pool - list = disconnected_counties - - limit = { - OR = { - holder.top_liege = root - holder = root - } - } - - save_scope_as = county_of_origin - - every_pool_character = { - province = scope:county_of_origin.title_province - limit = { - is_available_adult = yes - } - add_to_list = potential_holders - } - - every_pool_character = { - province = scope:county_of_origin.holder.capital_province - limit = { - is_available_adult = yes - } - add_to_list = potential_holders - } - - if = { - limit = { - NOT = { - any_in_list = { - list = potential_holders - is_available_adult = yes - } - } - } - create_character = { - location = scope:county_of_origin.title_province - culture = scope:county_of_origin.culture - faith = scope:county_of_origin.faith - gender_female_chance = 50 - age = 32 - save_scope_as = backup_character - } - scope:backup_character = { - add_to_list = potential_holders - } - } - - random_in_list = { - list = potential_holders - limit = { - is_available_adult = yes - has_claim_on = scope:county_of_origin - faith = { - has_dominant_ruling_gender = prev - } - } - alternative_limit = { - is_available_adult = yes - culture = scope:county_of_origin.culture - faith = scope:county_of_origin.faith - faith = { - has_dominant_ruling_gender = prev - } - } - alternative_limit = { - is_available_adult = yes - culture = scope:county_of_origin.culture - faith = { - has_dominant_ruling_gender = prev - } - } - alternative_limit = { - is_available_adult = yes - faith = scope:county_of_origin.faith - faith = { - has_dominant_ruling_gender = prev - } - } - alternative_limit = { - is_available_adult = yes - faith = { - has_dominant_ruling_gender = prev - } - } - alternative_limit = { - is_available_adult = yes - has_claim_on = scope:county_of_origin - } - alternative_limit = { - is_available_adult = yes - culture = scope:county_of_origin.culture - faith = scope:county_of_origin.faith - } - alternative_limit = { - is_available_adult = yes - culture = scope:county_of_origin.culture - } - alternative_limit = { - is_available_adult = yes - faith = scope:county_of_origin.faith - } - alternative_limit = { - is_available_adult = yes - } - - save_scope_as = new_county_holder - add_character_flag = { - flag = domicile_culture_and_faith_check - days = 1 - } - #get_title = scope:county_of_origin - - create_title_and_vassal_change = { - type = independency - save_scope_as = change - add_claim_on_loss = yes - } - every_in_list = { - list = disconnected_counties - limit = { - OR = { - holder.top_liege = root - holder = root - } - is_connected_to = { - target = scope:county_of_origin - } - NOT ={ - is_connected_to = { - target = root.capital_province.county - } - } - } - change_title_holder = { - holder = scope:new_county_holder - change = scope:change - } - #scope:new_county_holder = { get_title = prev } - } - becomes_independent = { - change = scope:change - } - resolve_title_and_vassal_change = scope:change - # This system should not generate strange-culture nomads - if = { - limit = { - government_has_flag = government_is_nomadic - domicile.domicile_culture != scope:new_county_holder.capital_county.culture - } - domicile = { - set_domicile_culture = scope:new_county_holder.capital_county.culture - } - } - if = { - limit = { - government_has_flag = government_is_nomadic - domicile.domicile_faith != scope:new_county_holder.capital_county.faith - } - domicile = { - set_domicile_faith = scope:new_county_holder.capital_county.faith - } - } - if = { # Just in case they need to create a duchy - limit = { - gold < 500 - } - add_gold = 500 - } - } - } - } - else_if = { # Total, AI only - limit = { - has_game_rule = ai_total_exclave_independence - is_ai = yes - NOT = { - any_vassal_or_below = { - is_ai = no - } - } - } - - remove_character_flag = delayed_cleanse - - root.capital_province.county = { - every_connected_county = { # Start off by making a list of all disconnected Counties - invert = yes - max_naval_distance = 2000 - add_to_list = disconnected_counties - } - } - - every_in_list = { - list = disconnected_counties - - limit = { - any_connected_county = { - NOT = { is_in_list = disconnected_counties } - max_naval_distance = 2000 - } - } - add_to_list = cull_naval_connection_counties - } - - while = { - limit = { - any_in_list = { - list = cull_naval_connection_counties - } - } - random_in_list = { - list = cull_naval_connection_counties - - save_scope_as = cull_origin_county - - every_connected_county = { - remove_from_list = cull_naval_connection_counties - remove_from_list = disconnected_counties - } - remove_from_list = cull_naval_connection_counties - remove_from_list = disconnected_counties - } - } - - every_in_list = { # Release Kings first - list = disconnected_counties - - limit = { - holder.primary_title.tier = tier_kingdom - NOR = { - holder = root - holder = { - any_sub_realm_title = { - tier = tier_county - NOT = { is_in_list = disconnected_counties } - } - } - } - } - holder = { - create_title_and_vassal_change = { - type = independency - save_scope_as = change - add_claim_on_loss = yes - } - becomes_independent = { - change = scope:change - } - resolve_title_and_vassal_change = scope:change - } - } - - every_in_list = { # Release Dukes second - list = disconnected_counties - - limit = { - holder.primary_title.tier = tier_duchy - NOR = { - holder = root - holder = { - any_sub_realm_title = { - tier = tier_county - NOT = { is_in_list = disconnected_counties } - } - } - } - } - holder = { - create_title_and_vassal_change = { - type = independency - save_scope_as = change - add_claim_on_loss = yes - } - becomes_independent = { - change = scope:change - } - resolve_title_and_vassal_change = scope:change - } - } - - every_in_list = { # Release Counts last - list = disconnected_counties - - limit = { - holder.primary_title.tier = tier_county - NOR = { - holder = root - holder = { - any_sub_realm_title = { - tier = tier_county - NOT = { is_in_list = disconnected_counties } - } - } - } - } - holder = { - create_title_and_vassal_change = { - type = independency - save_scope_as = change - add_claim_on_loss = yes - } - becomes_independent = { - change = scope:change - } - resolve_title_and_vassal_change = scope:change - } - } - - every_in_list = { # Finally, release contiguous areas under someone from the pool - list = disconnected_counties - - limit = { - OR = { - holder.top_liege = root - holder = root - } - } - - save_scope_as = county_of_origin - - every_pool_character = { - province = scope:county_of_origin.title_province - limit = { - is_available_adult = yes - } - add_to_list = potential_holders - } - - every_pool_character = { - province = scope:county_of_origin.holder.capital_province - limit = { - is_available_adult = yes - } - add_to_list = potential_holders - } - - if = { - limit = { - NOT = { - any_in_list = { - list = potential_holders - is_available_adult = yes - } - } - } - create_character = { - location = scope:county_of_origin.title_province - culture = scope:county_of_origin.culture - faith = scope:county_of_origin.faith - gender_female_chance = 50 - age = 32 - save_scope_as = backup_character - } - scope:backup_character = { - add_to_list = potential_holders - } - } - - random_in_list = { - list = potential_holders - limit = { - is_available_adult = yes - has_claim_on = scope:county_of_origin - faith = { - has_dominant_ruling_gender = prev - } - } - alternative_limit = { - is_available_adult = yes - culture = scope:county_of_origin.culture - faith = scope:county_of_origin.faith - faith = { - has_dominant_ruling_gender = prev - } - } - alternative_limit = { - is_available_adult = yes - culture = scope:county_of_origin.culture - faith = { - has_dominant_ruling_gender = prev - } - } - alternative_limit = { - is_available_adult = yes - faith = scope:county_of_origin.faith - faith = { - has_dominant_ruling_gender = prev - } - } - alternative_limit = { - is_available_adult = yes - faith = { - has_dominant_ruling_gender = prev - } - } - alternative_limit = { - is_available_adult = yes - has_claim_on = scope:county_of_origin - } - alternative_limit = { - is_available_adult = yes - culture = scope:county_of_origin.culture - faith = scope:county_of_origin.faith - } - alternative_limit = { - is_available_adult = yes - culture = scope:county_of_origin.culture - } - alternative_limit = { - is_available_adult = yes - faith = scope:county_of_origin.faith - } - alternative_limit = { - is_available_adult = yes - } - - save_scope_as = new_county_holder - add_character_flag = { - flag = domicile_culture_and_faith_check - days = 1 - } - #get_title = scope:county_of_origin - - create_title_and_vassal_change = { - type = independency - save_scope_as = change - add_claim_on_loss = yes - } - every_in_list = { - list = disconnected_counties - limit = { - OR = { - holder.top_liege = root - holder = root - } - is_connected_to = { - target = scope:county_of_origin - } - NOT ={ - is_connected_to = { - target = root.capital_province.county - } - } - } - change_title_holder = { - holder = scope:new_county_holder - change = scope:change - } - #scope:new_county_holder = { get_title = prev } - } - becomes_independent = { - change = scope:change - } - resolve_title_and_vassal_change = scope:change - # This system should not generate strange-culture nomads - if = { - limit = { - government_has_flag = government_is_nomadic - domicile.domicile_culture != scope:new_county_holder.capital_county.culture - } - domicile = { - set_domicile_culture = scope:new_county_holder.capital_county.culture - } - } - if = { - limit = { - government_has_flag = government_is_nomadic - domicile.domicile_faith != scope:new_county_holder.capital_county.faith - } - domicile = { - set_domicile_faith = scope:new_county_holder.capital_county.faith - } - } - if = { # Just in case they need to create a duchy - limit = { - gold < 500 - } - add_gold = 500 - } - } - } - } - else_if = { # Limited: Land connected to Capital, De Jure of Primary Title, or one gap away, as well as coastal - limit = { - has_game_rule = limited_exclave_independence - } - - remove_character_flag = delayed_cleanse - - root.capital_province.county = { - every_connected_county = { # Start off by making a list of all disconnected Counties - invert = yes - max_naval_distance = 2000 - allow_one_county_land_gap = yes - add_to_list = disconnected_counties - } - } - - every_in_list = { - list = disconnected_counties - - limit = { - any_connected_county = { - NOT = { is_in_list = disconnected_counties } - max_naval_distance = 2000 - } - } - add_to_list = cull_naval_connection_counties - } - - while = { - limit = { - any_in_list = { - list = cull_naval_connection_counties - } - } - random_in_list = { - list = cull_naval_connection_counties - - save_scope_as = cull_origin_county - - every_connected_county = { - remove_from_list = cull_naval_connection_counties - remove_from_list = disconnected_counties - } - remove_from_list = cull_naval_connection_counties - remove_from_list = disconnected_counties - } - } - - every_in_list = { - list = disconnected_counties - - limit = { - target_is_de_jure_liege_or_above = root.primary_title - } - add_to_list = cull_de_jure_connection_counties - } - - while = { - limit = { - any_in_list = { - list = cull_de_jure_connection_counties - } - } - random_in_list = { - list = cull_de_jure_connection_counties - - save_scope_as = cull_origin_county - - every_connected_county = { - remove_from_list = cull_de_jure_connection_counties - remove_from_list = disconnected_counties - } - remove_from_list = cull_de_jure_connection_counties - remove_from_list = disconnected_counties - } - } - - every_in_list = { # Release Kings first - list = disconnected_counties - - limit = { - holder.primary_title.tier = tier_kingdom - NOR = { - holder = root - holder = { - any_sub_realm_title = { - tier = tier_county - NOT = { is_in_list = disconnected_counties } - } - } - } - } - holder = { - create_title_and_vassal_change = { - type = independency - save_scope_as = change - add_claim_on_loss = yes - } - becomes_independent = { - change = scope:change - } - resolve_title_and_vassal_change = scope:change - } - } - - every_in_list = { # Release Dukes second - list = disconnected_counties - - limit = { - holder.primary_title.tier = tier_duchy - NOR = { - holder = root - holder = { - any_sub_realm_title = { - tier = tier_county - NOT = { is_in_list = disconnected_counties } - } - } - } - } - holder = { - create_title_and_vassal_change = { - type = independency - save_scope_as = change - add_claim_on_loss = yes - } - becomes_independent = { - change = scope:change - } - resolve_title_and_vassal_change = scope:change - } - } - - every_in_list = { # Release Counts last - list = disconnected_counties - - limit = { - holder.primary_title.tier = tier_county - NOR = { - holder = root - holder = { - any_sub_realm_title = { - tier = tier_county - NOT = { is_in_list = disconnected_counties } - } - } - } - } - holder = { - create_title_and_vassal_change = { - type = independency - save_scope_as = change - add_claim_on_loss = yes - } - becomes_independent = { - change = scope:change - } - resolve_title_and_vassal_change = scope:change - } - } - - every_in_list = { # Finally, release contiguous areas under someone from the pool - list = disconnected_counties - - limit = { - OR = { - holder.top_liege = root - holder = root - } - } - - save_scope_as = county_of_origin - - every_pool_character = { - province = scope:county_of_origin.title_province - limit = { - is_available_adult = yes - } - add_to_list = potential_holders - } - - every_pool_character = { - province = scope:county_of_origin.holder.capital_province - limit = { - is_available_adult = yes - } - add_to_list = potential_holders - } - - if = { - limit = { - NOT = { - any_in_list = { - list = potential_holders - is_available_adult = yes - } - } - } - create_character = { - location = scope:county_of_origin.title_province - culture = scope:county_of_origin.culture - faith = scope:county_of_origin.faith - gender_female_chance = 50 - age = 32 - save_scope_as = backup_character - } - scope:backup_character = { - add_to_list = potential_holders - } - } - - random_in_list = { - list = potential_holders - limit = { - is_available_adult = yes - has_claim_on = scope:county_of_origin - faith = { - has_dominant_ruling_gender = prev - } - } - alternative_limit = { - is_available_adult = yes - culture = scope:county_of_origin.culture - faith = scope:county_of_origin.faith - faith = { - has_dominant_ruling_gender = prev - } - } - alternative_limit = { - is_available_adult = yes - culture = scope:county_of_origin.culture - faith = { - has_dominant_ruling_gender = prev - } - } - alternative_limit = { - is_available_adult = yes - faith = scope:county_of_origin.faith - faith = { - has_dominant_ruling_gender = prev - } - } - alternative_limit = { - is_available_adult = yes - faith = { - has_dominant_ruling_gender = prev - } - } - alternative_limit = { - is_available_adult = yes - has_claim_on = scope:county_of_origin - } - alternative_limit = { - is_available_adult = yes - culture = scope:county_of_origin.culture - faith = scope:county_of_origin.faith - } - alternative_limit = { - is_available_adult = yes - culture = scope:county_of_origin.culture - } - alternative_limit = { - is_available_adult = yes - faith = scope:county_of_origin.faith - } - alternative_limit = { - is_available_adult = yes - } - - save_scope_as = new_county_holder - add_character_flag = { - flag = domicile_culture_and_faith_check - days = 1 - } - #get_title = scope:county_of_origin - - create_title_and_vassal_change = { - type = independency - save_scope_as = change - add_claim_on_loss = yes - } - every_in_list = { - list = disconnected_counties - limit = { - OR = { - holder.top_liege = root - holder = root - } - is_connected_to = { - target = scope:county_of_origin - } - NOT ={ - is_connected_to = { - target = root.capital_province.county - } - } - } - change_title_holder = { - holder = scope:new_county_holder - change = scope:change - } - #scope:new_county_holder = { get_title = prev } - } - becomes_independent = { - change = scope:change - } - resolve_title_and_vassal_change = scope:change - # This system should not generate strange-culture nomads - if = { - limit = { - government_has_flag = government_is_nomadic - domicile.domicile_culture != scope:new_county_holder.capital_county.culture - } - domicile = { - set_domicile_culture = scope:new_county_holder.capital_county.culture - } - } - if = { - limit = { - government_has_flag = government_is_nomadic - domicile.domicile_faith != scope:new_county_holder.capital_county.faith - } - domicile = { - set_domicile_faith = scope:new_county_holder.capital_county.faith - } - } - if = { # Just in case they need to create a duchy - limit = { - gold < 500 - } - add_gold = 500 - } - } - } - } - else_if = { # Significant: Land connected to Capital or De Jure of Primary Title, and coastal - limit = { - has_game_rule = significant_exclave_independence - } - - remove_character_flag = delayed_cleanse - - root.capital_province.county = { - every_connected_county = { # Start off by making a list of all disconnected Counties - invert = yes - max_naval_distance = 2000 - add_to_list = disconnected_counties - } - } - - every_in_list = { - list = disconnected_counties - - limit = { - target_is_de_jure_liege_or_above = root.primary_title - } - add_to_list = cull_de_jure_connection_counties - } - - while = { - limit = { - any_in_list = { - list = cull_de_jure_connection_counties - } - } - random_in_list = { - list = cull_de_jure_connection_counties - - save_scope_as = cull_origin_county - - every_connected_county = { - remove_from_list = cull_de_jure_connection_counties - remove_from_list = disconnected_counties - } - remove_from_list = cull_de_jure_connection_counties - remove_from_list = disconnected_counties - } - } - - while = { - limit = { - any_in_list = { - list = disconnected_counties - - any_connected_county = { - NOT = { is_in_list = disconnected_counties } - max_naval_distance = 2000 - } - } - } - random_in_list = { - list = disconnected_counties - - limit = { - any_connected_county = { - NOT = { is_in_list = disconnected_counties } - max_naval_distance = 2000 - } - } - - remove_from_list = disconnected_counties - } - } - - every_in_list = { # Release Kings first - list = disconnected_counties - - limit = { - holder.primary_title.tier = tier_kingdom - NOR = { - holder = root - holder = { - any_sub_realm_title = { - tier = tier_county - NOT = { is_in_list = disconnected_counties } - } - } - } - } - holder = { - create_title_and_vassal_change = { - type = independency - save_scope_as = change - add_claim_on_loss = yes - } - becomes_independent = { - change = scope:change - } - resolve_title_and_vassal_change = scope:change - } - } - - every_in_list = { # Release Dukes second - list = disconnected_counties - - limit = { - holder.primary_title.tier = tier_duchy - NOR = { - holder = root - holder = { - any_sub_realm_title = { - tier = tier_county - NOT = { is_in_list = disconnected_counties } - } - } - } - } - holder = { - create_title_and_vassal_change = { - type = independency - save_scope_as = change - add_claim_on_loss = yes - } - becomes_independent = { - change = scope:change - } - resolve_title_and_vassal_change = scope:change - } - } - - every_in_list = { # Release Counts last - list = disconnected_counties - - limit = { - holder.primary_title.tier = tier_county - NOR = { - holder = root - holder = { - any_sub_realm_title = { - tier = tier_county - NOT = { is_in_list = disconnected_counties } - } - } - } - } - holder = { - create_title_and_vassal_change = { - type = independency - save_scope_as = change - add_claim_on_loss = yes - } - becomes_independent = { - change = scope:change - } - resolve_title_and_vassal_change = scope:change - } - } - - every_in_list = { # Finally, release contiguous areas under someone from the pool - list = disconnected_counties - - limit = { - OR = { - holder.top_liege = root - holder = root - } - } - - save_scope_as = county_of_origin - - every_pool_character = { - province = scope:county_of_origin.title_province - limit = { - is_available_adult = yes - } - add_to_list = potential_holders - } - - every_pool_character = { - province = scope:county_of_origin.holder.capital_province - limit = { - is_available_adult = yes - } - add_to_list = potential_holders - } - - if = { - limit = { - NOT = { - any_in_list = { - list = potential_holders - is_available_adult = yes - } - } - } - create_character = { - location = scope:county_of_origin.title_province - culture = scope:county_of_origin.culture - faith = scope:county_of_origin.faith - gender_female_chance = 50 - age = 32 - save_scope_as = backup_character - } - scope:backup_character = { - add_to_list = potential_holders - } - } - - random_in_list = { - list = potential_holders - limit = { - is_available_adult = yes - has_claim_on = scope:county_of_origin - faith = { - has_dominant_ruling_gender = prev - } - } - alternative_limit = { - is_available_adult = yes - culture = scope:county_of_origin.culture - faith = scope:county_of_origin.faith - faith = { - has_dominant_ruling_gender = prev - } - } - alternative_limit = { - is_available_adult = yes - culture = scope:county_of_origin.culture - faith = { - has_dominant_ruling_gender = prev - } - } - alternative_limit = { - is_available_adult = yes - faith = scope:county_of_origin.faith - faith = { - has_dominant_ruling_gender = prev - } - } - alternative_limit = { - is_available_adult = yes - faith = { - has_dominant_ruling_gender = prev - } - } - alternative_limit = { - is_available_adult = yes - has_claim_on = scope:county_of_origin - } - alternative_limit = { - is_available_adult = yes - culture = scope:county_of_origin.culture - faith = scope:county_of_origin.faith - } - alternative_limit = { - is_available_adult = yes - culture = scope:county_of_origin.culture - } - alternative_limit = { - is_available_adult = yes - faith = scope:county_of_origin.faith - } - alternative_limit = { - is_available_adult = yes - } - - save_scope_as = new_county_holder - add_character_flag = { - flag = domicile_culture_and_faith_check - days = 1 - } - #get_title = scope:county_of_origin - - create_title_and_vassal_change = { - type = independency - save_scope_as = change - add_claim_on_loss = yes - } - every_in_list = { - list = disconnected_counties - limit = { - OR = { - holder.top_liege = root - holder = root - } - is_connected_to = { - target = scope:county_of_origin - } - NOT ={ - is_connected_to = { - target = root.capital_province.county - } - } - } - change_title_holder = { - holder = scope:new_county_holder - change = scope:change - } - #scope:new_county_holder = { get_title = prev } - } - becomes_independent = { - change = scope:change - } - resolve_title_and_vassal_change = scope:change - # This system should not generate strange-culture nomads - if = { - limit = { - government_has_flag = government_is_nomadic - domicile.domicile_culture != scope:new_county_holder.capital_county.culture - } - domicile = { - set_domicile_culture = scope:new_county_holder.capital_county.culture - } - } - if = { - limit = { - government_has_flag = government_is_nomadic - domicile.domicile_faith != scope:new_county_holder.capital_county.faith - } - domicile = { - set_domicile_faith = scope:new_county_holder.capital_county.faith - } - } - if = { # Just in case they need to create a duchy - limit = { - gold < 500 - } - add_gold = 500 - } - } - } - } - else_if = { # Total: Only keep things connected to your capital, or coastal - limit = { - has_game_rule = total_exclave_independence - } - - remove_character_flag = delayed_cleanse - - root.capital_province.county = { - every_connected_county = { # Start off by making a list of all disconnected Counties - invert = yes - max_naval_distance = 2000 - add_to_list = disconnected_counties - } - } - - every_in_list = { - list = disconnected_counties - - limit = { - any_connected_county = { - NOT = { is_in_list = disconnected_counties } - max_naval_distance = 2000 - } - } - add_to_list = cull_naval_connection_counties - } - - while = { - limit = { - any_in_list = { - list = cull_naval_connection_counties - } - } - random_in_list = { - list = cull_naval_connection_counties - - save_scope_as = cull_origin_county - - every_connected_county = { - remove_from_list = cull_naval_connection_counties - remove_from_list = disconnected_counties - } - remove_from_list = cull_naval_connection_counties - remove_from_list = disconnected_counties - } - } - - every_in_list = { # Release Kings first - list = disconnected_counties - - limit = { - holder.primary_title.tier = tier_kingdom - NOR = { - holder = root - holder = { - any_sub_realm_title = { - tier = tier_county - NOT = { is_in_list = disconnected_counties } - } - } - } - } - holder = { - create_title_and_vassal_change = { - type = independency - save_scope_as = change - add_claim_on_loss = yes - } - becomes_independent = { - change = scope:change - } - resolve_title_and_vassal_change = scope:change - } - } - - every_in_list = { # Release Dukes second - list = disconnected_counties - - limit = { - holder.primary_title.tier = tier_duchy - NOR = { - holder = root - holder = { - any_sub_realm_title = { - tier = tier_county - NOT = { is_in_list = disconnected_counties } - } - } - } - } - holder = { - create_title_and_vassal_change = { - type = independency - save_scope_as = change - add_claim_on_loss = yes - } - becomes_independent = { - change = scope:change - } - resolve_title_and_vassal_change = scope:change - } - } - - every_in_list = { # Release Counts last - list = disconnected_counties - - limit = { - holder.primary_title.tier = tier_county - NOR = { - holder = root - holder = { - any_sub_realm_title = { - tier = tier_county - NOT = { is_in_list = disconnected_counties } - } - } - } - } - holder = { - create_title_and_vassal_change = { - type = independency - save_scope_as = change - add_claim_on_loss = yes - } - becomes_independent = { - change = scope:change - } - resolve_title_and_vassal_change = scope:change - } - } - - every_in_list = { # Finally, release contiguous areas under someone from the pool - list = disconnected_counties - - limit = { - OR = { - holder.top_liege = root - holder = root - } - } - - save_scope_as = county_of_origin - - every_pool_character = { - province = scope:county_of_origin.title_province - limit = { - is_available_adult = yes - } - add_to_list = potential_holders - } - - every_pool_character = { - province = scope:county_of_origin.holder.capital_province - limit = { - is_available_adult = yes - } - add_to_list = potential_holders - } - - if = { - limit = { - NOT = { - any_in_list = { - list = potential_holders - is_available_adult = yes - } - } - } - create_character = { - location = scope:county_of_origin.title_province - culture = scope:county_of_origin.culture - faith = scope:county_of_origin.faith - gender_female_chance = 50 - age = 32 - save_scope_as = backup_character - } - scope:backup_character = { - add_to_list = potential_holders - } - } - - random_in_list = { - list = potential_holders - limit = { - is_available_adult = yes - has_claim_on = scope:county_of_origin - faith = { - has_dominant_ruling_gender = prev - } - } - alternative_limit = { - is_available_adult = yes - culture = scope:county_of_origin.culture - faith = scope:county_of_origin.faith - faith = { - has_dominant_ruling_gender = prev - } - } - alternative_limit = { - is_available_adult = yes - culture = scope:county_of_origin.culture - faith = { - has_dominant_ruling_gender = prev - } - } - alternative_limit = { - is_available_adult = yes - faith = scope:county_of_origin.faith - faith = { - has_dominant_ruling_gender = prev - } - } - alternative_limit = { - is_available_adult = yes - faith = { - has_dominant_ruling_gender = prev - } - } - alternative_limit = { - is_available_adult = yes - has_claim_on = scope:county_of_origin - } - alternative_limit = { - is_available_adult = yes - culture = scope:county_of_origin.culture - faith = scope:county_of_origin.faith - } - alternative_limit = { - is_available_adult = yes - culture = scope:county_of_origin.culture - } - alternative_limit = { - is_available_adult = yes - faith = scope:county_of_origin.faith - } - alternative_limit = { - is_available_adult = yes - } - - save_scope_as = new_county_holder - add_character_flag = { - flag = domicile_culture_and_faith_check - days = 1 - } - #get_title = scope:county_of_origin - - create_title_and_vassal_change = { - type = independency - save_scope_as = change - add_claim_on_loss = yes - } - every_in_list = { - list = disconnected_counties - limit = { - OR = { - holder.top_liege = root - holder = root - } - is_connected_to = { - target = scope:county_of_origin - } - NOT ={ - is_connected_to = { - target = root.capital_province.county - } - } - } - change_title_holder = { - holder = scope:new_county_holder - change = scope:change - } - #scope:new_county_holder = { get_title = prev } - } - becomes_independent = { - change = scope:change - } - resolve_title_and_vassal_change = scope:change - # This system should not generate strange-culture nomads - if = { - limit = { - government_has_flag = government_is_nomadic - domicile.domicile_culture != scope:new_county_holder.capital_county.culture - } - domicile = { - set_domicile_culture = scope:new_county_holder.capital_county.culture - } - } - if = { - limit = { - government_has_flag = government_is_nomadic - domicile.domicile_faith != scope:new_county_holder.capital_county.faith - } - domicile = { - set_domicile_faith = scope:new_county_holder.capital_county.faith - } - } - if = { # Just in case they need to create a duchy - limit = { - gold < 500 - } - add_gold = 500 - } - } - } - } -} - -############### -# HARM EVENTS # -############### - -# Controls logging for harm events where the character is killed. -## Unless you're specifically looking to gather easy death metrics whilst run testing, this should always be toggled off. -log_harm_event_death_as_variable_effect = { - if = { - limit = { always = no } - if = { - # Only track noteworthy characters. - limit = { harm_game_rule_valid_for_logging_trigger = yes } - add_to_global_variable_list = { - name = harm_deaths_list - target = root - } - } - } - # And, for error suppression. - if = { - limit = { always = no } - if = { - limit = { - global_variable_list_size = { - name = harm_deaths_list - value >= 1 - } - } - } - } -} - -# Controls logging for harm events where the character is rendered incapable. -## Unless you're specifically looking to gather easy death metrics whilst run testing, this should always be toggled off. -log_harm_event_incapability_as_variable_effect = { - if = { - limit = { always = no } - if = { - # Only track noteworthy characters. - limit = { harm_game_rule_valid_for_logging_trigger = yes } - add_to_global_variable_list = { - name = harm_incapables_list - target = root - } - } - } - # And, for error suppression. - if = { - limit = { always = no } - if = { - limit = { - global_variable_list_size = { - name = harm_incapables_list - value >= 1 - } - } - } - } -} - -# Controls logging for harm events where the character survives. -## Unless you're specifically looking to gather easy death metrics whilst run testing, this should always be toggled off. -log_harm_event_spared_as_variable_effect = { - if = { - limit = { always = no } - if = { - # Only track noteworthy characters. - limit = { harm_game_rule_valid_for_logging_trigger = yes } - add_to_global_variable_list = { - name = harm_spared_list - target = root - } - } - } - # And, for error suppression. - if = { - limit = { always = no } - if = { - limit = { - global_variable_list_size = { - name = harm_spared_list - value >= 1 - } - } - } - } -} diff --git a/N3OW/common/scripted_effects/00_governance_lifestyle_effects.txt b/N3OW/common/scripted_effects/00_governance_lifestyle_effects.txt deleted file mode 100644 index 5f282702..00000000 --- a/N3OW/common/scripted_effects/00_governance_lifestyle_effects.txt +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/N3OW/common/scripted_effects/00_historical_characters_scripted_effects.txt b/N3OW/common/scripted_effects/00_historical_characters_scripted_effects.txt deleted file mode 100644 index 37a3e53b..00000000 --- a/N3OW/common/scripted_effects/00_historical_characters_scripted_effects.txt +++ /dev/null @@ -1,6083 +0,0 @@ -spawn_historical_characters_effect = { - - if = { # Karunakara Tondaiman - limit = { - current_year >= 1067 - current_year <= 1070 - NOT = { exists = global_var:hchar_karunakara } - } - set_global_variable = { name = hchar_karunakara value = yes } - title:b_nagapattinam = { - save_scope_as = birth_location - create_character = { - age = 20 - name = Karunakara - dynasty_house = house:house_tondaiman - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = faith:vaishnavism - culture = scope:birth_location.title_province.culture - trait = education_martial_4 - trait = loyal - random_traits_list = { - count = 3 - brave = {} - vengeful = {} - ambitious = {} - wrathful = {} - zealous = {} - } - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_high_skill max_template_high_skill } - stewardship = { min_template_decent_skill max_template_decent_skill } - intrigue = { min_template_decent_skill max_template_decent_skill } - learning = { min_template_low_skill max_template_low_skill } - prowess = { min_template_high_skill max_template_high_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = karunakara - add_character_flag = ai_will_not_convert - } - if = { limit = { has_variable = karunakara } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - - if = { # Sekkilhar - limit = { - current_year >= 1140 - current_year <= 1150 - NOT = { exists = global_var:hchar_sekkilhar } - } - set_global_variable = { name = hchar_sekkilhar value = yes } - title:b_kanchipuram = { - save_scope_as = birth_location - create_character = { - age = 20 - name = Sekkilhar - dynasty = none - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = faith:shaivism - culture = scope:birth_location.title_province.culture - trait = education_learning_5 - trait = theologian - trait = intellect_good_3 - random_traits_list = { - count = 3 - lustful = {} - zealous = {} - diligent = {} - humble = {} - } - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_decent_skill max_template_high_skill } - intrigue = { min_template_decent_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = sekkilhar - set_variable = legendary_author - create_inspiration = book_inspiration - add_character_flag = ai_will_not_convert - save_scope_as = major - } - if = { limit = { has_variable = sekkilhar } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - - if = { # Omar Khayyam - limit = { - current_year >= 1068 - current_year <= 1070 - NOT = { exists = global_var:hchar_omar_khayyam } - } - set_global_variable = { name = hchar_omar_khayyam value = yes } - title:b_nishapur = { - save_scope_as = birth_location - create_character = { - age = 20 - name = Omar - dynasty_house = house:house_khayyam - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = faith:maturidi - culture = scope:birth_location.title_province.culture - trait = education_learning_5 - trait = lifestyle_poet - trait = lifestyle_reveler - trait = shrewd - random_traits_list = { - count = 3 - cynical = {} - compassionate = {} - patient = {} - gregarious = {} - } - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_decent_skill max_template_high_skill } - intrigue = { min_template_decent_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = omar_khayyam - set_variable = legendary_author - create_inspiration = book_inspiration - add_character_flag = ai_will_not_convert - save_scope_as = major - hidden_effect = { - learn_language_of_culture = culture:bedouin - add_trait_xp = { - trait = lifestyle_reveler - value = 75 - } - } - } - if = { limit = { has_variable = omar_khayyam } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - - if = { # Bhaskaracharya - limit = { - current_year >= 1134 - current_year <= 1150 - NOT = { exists = global_var:hchar_bhaskaracharya } - } - set_global_variable = { name = hchar_bhaskaracharya value = yes } - title:b_vijayapura_bis = { - save_scope_as = birth_location - create_character = { - age = 20 - name = Bhaskaracharya - dynasty = none - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = faith:vaishnavism - culture = scope:birth_location.title_province.culture - trait = education_learning_5 - trait = scholar - random_traits_list = { - count = 3 - diligent = {} - humble = {} - patient = {} - ambitious = {} - } - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_decent_skill max_template_high_skill } - intrigue = { min_template_decent_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = bhaskaracharya - set_variable = legendary_author - add_piety = 5000 - create_inspiration = book_inspiration - add_character_flag = ai_will_not_convert - } - if = { limit = { has_variable = bhaskaracharya } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - - if = { # Joseph Rabban - limit = { - current_year >= 970 - current_year <= 1000 - NOT = { exists = global_var:hchar_joseph_rabban } - } - set_global_variable = { name = hchar_joseph_rabban value = yes } - title:b_mahoyadapuram = { - save_scope_as = birth_location - create_character = { - age = 20 - name = Joseph - dynasty_house = house:house_rabban - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = faith:malabarism - culture = scope:birth_location.title_province.culture - trait = education_stewardship_4 - random_traits_list = { - count = 3 - honest = {} - ambitious = {} - diligent = {} - brave = {} - } - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_decent_skill max_template_high_skill } - intrigue = { min_template_decent_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = joseph_rabban - add_character_flag = ai_will_not_convert - } - if = { limit = { has_variable = joseph_rabban } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - - if = { # Atisha - limit = { - current_year >= 1040 - current_year <= 1045 - NOT = { exists = global_var:hchar_atisha } - } - set_global_variable = { name = hchar_atisha value = yes } - title:b_bikrampur = { - save_scope_as = birth_location - create_character = { - age = 50 - name = Atisha - dynasty = none - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = faith:vajrayana - culture = scope:birth_location.title_province.culture - trait = education_learning_4 - trait = theologian - trait = devoted - trait = lifestyle_mystic - random_traits_list = { - count = 3 - zealous = {} - calm = {} - diligent = {} - honest = {} - } - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_decent_skill max_template_high_skill } - intrigue = { min_template_decent_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = atisha - hidden_effect = { - add_trait_xp = { - trait = lifestyle_mystic - value = 100 - } - } - add_piety = 5000 - create_inspiration = religious_inspiration - add_character_flag = ai_will_not_convert - save_scope_as = major - } - if = { limit = { has_variable = atisha } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - - if = { # Hemachandra - limit = { - current_year >= 1109 - current_year <= 1130 - NOT = { exists = global_var:hchar_hemachandra } - } - set_global_variable = { name = hchar_hemachandra value = yes } - title:b_dhandhuka = { - save_scope_as = birth_location - create_character = { - age = 20 - name = Hemachandra - dynasty = none - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = faith:svetambara - culture = scope:birth_location.title_province.culture - trait = education_learning_5 - trait = lifestyle_poet - trait = scholar - trait = devoted - trait = lifestyle_mystic - trait = intellect_good_3 - random_traits_list = { - count = 3 - zealous = {} - ambitious = {} - diligent = {} - honest = {} - } - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_decent_skill max_template_high_skill } - intrigue = { min_template_decent_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = hemachandra - set_variable = legendary_author - hidden_effect = { - add_trait_xp = { - trait = lifestyle_mystic - value = 100 - } - } - add_piety = 5000 - create_inspiration = book_inspiration - } - if = { limit = { has_variable = hemachandra } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - - if = { # Kshemendra - limit = { - current_year >= 1037 - current_year <= 1070 - NOT = { exists = global_var:hchar_kshemendra } - } - set_global_variable = { name = hchar_kshemendra value = yes } - title:b_srinagara = { - save_scope_as = birth_location - create_character = { - age = 47 - name = Kshemendra - dynasty = none - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = faith:shaivism - culture = scope:birth_location.title_province.culture - trait = education_diplomacy_4 - trait = journaller - trait = scholar - random_traits_list = { - count = 3 - gregarious = {} - ambitious = {} - diligent = {} - honest = {} - } - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_decent_skill max_template_high_skill } - intrigue = { min_template_decent_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = kshemendra - set_variable = legendary_author - add_piety = 5000 - create_inspiration = book_inspiration - } - if = { limit = { has_variable = kshemendra } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Akka Mahadevi - limit = { - current_year >= 1150 - current_year <= 1155 - NOT = { exists = global_var:hchar_akka_mahadevi } - } - set_global_variable = { name = hchar_akka_mahadevi value = yes } - title:b_vaijayanti = { - save_scope_as = birth_location - create_character = { - age = 20 - name = Akka_Mahadevi - dynasty = none - gender_female_chance = 100 - random_traits = no - location = scope:birth_location.title_province - faith = faith:shaivism - culture = scope:birth_location.title_province.culture - trait = education_diplomacy_3 - trait = lifestyle_poet - trait = lifestyle_mystic - random_traits_list = { - count = 3 - compassionate = {} - zealous = {} - generous = {} - honest = {} - } - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_decent_skill max_template_high_skill } - intrigue = { min_template_decent_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = akka_mahadevi - set_variable = legendary_author - add_piety = 5000 - create_inspiration = book_inspiration - } - if = { limit = { has_variable = akka_mahadevi } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Namdev - limit = { - current_year >= 1290 - current_year <= 1295 - NOT = { exists = global_var:hchar_namdev } - } - set_global_variable = { name = hchar_namdev value = yes } - title:b_nanded = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Namdev" - dynasty = none - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = faith:vaishnavism - culture = scope:birth_location.title_province.culture - trait = education_learning_3 - trait = lifestyle_poet - trait = lifestyle_mystic - random_traits_list = { - count = 3 - humble = {} - calm = {} - generous = {} - honest = {} - } - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_decent_skill max_template_high_skill } - intrigue = { min_template_decent_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = namdev - hidden_effect = { - add_trait_xp = { - trait = lifestyle_mystic - value = 100 - } - } - add_piety = 10000 - create_inspiration = religious_inspiration - add_character_flag = ai_will_not_convert - save_scope_as = major - } - if = { limit = { has_variable = namdev } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Madhvacharya - limit = { - current_year >= 1258 - current_year <= 1260 - NOT = { exists = global_var:hchar_madhvacharya } - } - set_global_variable = { name = hchar_madhvacharya value = yes } - title:b_udayavara = { #Udupi - save_scope_as = birth_location - create_character = { - age = 20 - name = "Madhvacharya" - dynasty = none - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = faith:vaishnavism - culture = scope:birth_location.title_province.culture - trait = education_learning_5 - trait = theologian - trait = devoted - random_traits_list = { - count = 3 - zealous = {} - calm = {} - stubborn = {} - diligent = {} - } - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_decent_skill max_template_high_skill } - intrigue = { min_template_decent_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = madhvacharya - add_piety = 10000 - create_inspiration = religious_inspiration - add_character_flag = ai_will_not_convert - save_scope_as = major - } - if = { limit = { has_variable = madhvacharya } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Vidyapati - limit = { - current_year >= 1372 - current_year <= 1381 - NOT = { exists = global_var:hchar_vidyapati } - } - set_global_variable = { name = hchar_vidyapati value = yes } - title:b_darbhanga = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Vidyapati" - dynasty = none - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = faith:shaivism - culture = scope:birth_location.title_province.culture - trait = education_learning_4 - trait = scholar - trait = lifestyle_poet - random_traits_list = { - count = 3 - gregarious = {} - generous = {} - compassionate = {} - diligent = {} - } - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_decent_skill max_template_high_skill } - intrigue = { min_template_decent_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = vidyapati - set_variable = legendary_author - add_piety = 5000 - create_inspiration = book_inspiration - add_character_flag = ai_will_not_convert - save_scope_as = major - } - if = { limit = { has_variable = vidyapati } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Abhinavagupta - limit = { - current_year >= 980 - current_year <= 990 - NOT = { exists = global_var:hchar_abhinavagupta } - } - set_global_variable = { name = hchar_abhinavagupta value = yes } - title:b_srinagara = { - save_scope_as = birth_location - create_character = { - age = 30 - name = "Abhinavagupta" - dynasty = none - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = faith:shaivism - culture = scope:birth_location.title_province.culture - trait = education_learning_5 - trait = lifestyle_mystic - trait = scholar - trait = devoted - random_traits_list = { - count = 3 - zealous = {} - diligent = {} - calm = {} - just = {} - } - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_decent_skill max_template_high_skill } - intrigue = { min_template_decent_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = abhinavagupta - add_piety = 10000 - hidden_effect = { - add_trait_xp = { - trait = lifestyle_mystic - value = 100 - } - } - create_inspiration = religious_inspiration - add_character_flag = ai_will_not_convert - save_scope_as = major - } - if = { limit = { has_variable = abhinavagupta } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Basava - limit = { - current_year >= 1131 - current_year <= 1137 - NOT = { exists = global_var:hchar_basava } - } - set_global_variable = { name = hchar_basava value = yes } - title:b_basavapattana = { - save_scope_as = birth_location - create_character = { - age = 26 - name = "Basava" - dynasty = none - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = faith:shaivism - culture = scope:birth_location.title_province.culture - trait = education_learning_4 - trait = theologian - random_traits_list = { - count = 3 - zealous = {} - humble = {} - patient = {} - compassionate = {} - } - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_decent_skill max_template_high_skill } - intrigue = { min_template_decent_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = basava - add_piety = 10000 - create_inspiration = religious_inspiration - } - if = { limit = { has_variable = basava } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Hildegard von Bingen - limit = { - current_year >= 1121 - current_year <= 1127 - NOT = { exists = global_var:hchar_hildegard } - } - set_global_variable = { name = hchar_hildegard value = yes } - title:b_worms = { - save_scope_as = birth_location - create_character = { - age = 23 - name = "Hildegard" - dynasty_house = house:house_von_bingen - gender_female_chance = 100 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_learning_5 - trait = theologian - trait = zealous - trait = compassionate - trait = eccentric - trait = possessed_1 - trait = lifestyle_mystic - trait = devoted - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = hildegard - hidden_effect = { - add_trait_xp = { - trait = lifestyle_mystic - value = 100 - } - } - set_variable = legendary_author - add_piety = 5000 - create_inspiration = book_inspiration - add_character_flag = ai_will_not_convert - save_scope_as = major - } - if = { limit = { has_variable = hildegard } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Thomas Aquinas - limit = { - current_year >= 1245 - current_year <= 1251 - NOT = { exists = global_var:hchar_thomas_aquinas } - } - set_global_variable = { name = hchar_thomas_aquinas value = yes } - title:b_cassino = { - save_scope_as = birth_location - create_character = { - age = ep3_thomas_aquinas_age_value # This is just a scripted value that takes the current year and subtracts 1225 from it, so if Tommy spawns in 1245 then his age will be calculated as 1245-1225, or 20. - name = "Thomas" - dynasty_house = house:house_aquinas - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_learning_5 - trait = theologian - trait = zealous - trait = compassionate - trait = patient - trait = devoted - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { 20 24 } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = thomas_aquinas - set_variable = legendary_author - add_piety = 5000 - create_inspiration = book_inspiration - add_character_flag = ai_will_not_convert - add_character_flag = no_beard - if = { limit = { has_character_flag = no_beard } } # Error suppression - save_scope_as = major - } - if = { limit = { has_variable = thomas_aquinas } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Dante Alighieri - limit = { - current_year >= 1285 - current_year <= 1291 - NOT = { exists = global_var:hchar_dante_alighieri } - } - set_global_variable = { name = hchar_dante_alighieri value = yes } - title:b_firenze = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Dante" - dynasty_house = house:house_alighieri - gender_female_chance = 0 - random_traits = yes - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_diplomacy_4 - trait = lifestyle_poet - trait = irritable - trait = ambitious - diplomacy = { 16 20 } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = dante_alighieri - set_variable = legendary_author - create_inspiration = book_inspiration - add_character_flag = no_beard - save_scope_as = major - } - if = { limit = { has_variable = dante_alighieri } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Thomas Becket - limit = { - current_year >= 1149 - current_year <= 1155 - NOT = { exists = global_var:hchar_thomas_becket } - } - set_global_variable = { name = hchar_thomas_becket value = yes } - title:b_london = { - save_scope_as = birth_location - create_character = { - age = 30 - name = "Thomas" - dynasty_house = house:house_becket - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_diplomacy_3 - trait = zealous - trait = stubborn - trait = brave - trait = theologian - trait = devoted - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_low_skill max_template_low_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = thomas_becket - set_variable = legendary_author - add_piety = 5000 - create_inspiration = book_inspiration - save_scope_as = major - } - if = { limit = { has_variable = thomas_becket } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Maimonides (Moses ben Maimon) - limit = { - current_year >= 1155 - current_year <= 1161 - NOT = { exists = global_var:hchar_maimonides } - } - set_global_variable = { name = hchar_maimonides value = yes } - title:b_cordoba = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Moses" - dynasty_house = house:house_maimon - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = faith:rabbinism - culture = culture:sephardi - trait = education_learning_5 - trait = zealous - trait = humble - trait = diligent - trait = scholar - trait = lifestyle_physician - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = maimonides - set_variable = legendary_author - give_nickname = nick_maimonides - add_piety = 10000 - create_inspiration = book_inspiration - hidden_effect = { - add_trait_xp = { - trait = lifestyle_physician - value = 100 - } - } - save_scope_as = major - } - if = { limit = { has_variable = maimonides } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Chrétien de Troyes - limit = { - current_year >= 1150 - current_year <= 1156 - NOT = { exists = global_var:hchar_chretien_de_troyes } - } - set_global_variable = { name = hchar_chretien_de_troyes value = yes } - title:b_troyes = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Chretien" - dynasty_house = house:house_de_troyes - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_diplomacy_3 - trait = lifestyle_poet - trait = gregarious - trait = diligent - trait = brave - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = chretien_de_troyes - } - if = { limit = { has_variable = chretien_de_troyes } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Egil Skallagrímsson - limit = { - current_year >= 930 - current_year <= 936 - NOT = { exists = global_var:hchar_egil_skallagrimrsson } - } - set_global_variable = { name = hchar_egil_skallagrimrsson value = yes } - title:b_olafsvik = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Egil" - dynasty_house = house:house_skallagrimsson - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_diplomacy_2 - trait = lifestyle_poet - trait = gregarious - trait = wrathful - trait = brave - trait = berserker - trait = viking - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_high_skill max_template_high_skill } - stewardship = { min_template_low_skill max_template_low_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_high_skill max_template_high_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = egil_skallagrimrsson - save_scope_as = major - change_current_weight = 75 - } - if = { limit = { has_variable = egil_skallagrimrsson } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Gunnlaug Ormstunga - limit = { - current_year >= 1000 - current_year <= 1006 - NOT = { exists = global_var:hchar_gunnlaug_ormstunga } - } - set_global_variable = { name = hchar_gunnlaug_ormstunga value = yes } - title:b_reykjavik = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Gunnlaug" - dynasty_house = house:house_ormstunga - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_diplomacy_2 - trait = lifestyle_poet - trait = deceitful - trait = lustful - trait = ambitious - trait = viking - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_high_skill max_template_high_skill } - stewardship = { min_template_low_skill max_template_low_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_high_skill max_template_high_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - save_scope_as = explorer - historical_character_finalization_effect = yes - set_variable = gunnlaug_ormstunga - } - if = { limit = { has_variable = gunnlaug_ormstunga } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Þorbjörg the Seeress - limit = { - current_year >= 970 - current_year <= 976 - NOT = { exists = global_var:hchar_torbjorg_the_seeress } - } - set_global_variable = { name = hchar_torbjorg_the_seeress value = yes } - title:b_reydarfjall= { - save_scope_as = birth_location - create_character = { - age = 20 - name = "T_orbjO_rg" - dynasty = none - gender_female_chance = 100 - random_traits = no - location = scope:birth_location.title_province - faith = faith:norse_pagan - culture = scope:birth_location.title_province.culture - trait = education_learning_3 - trait = patient - trait = zealous - trait = humble - trait = lifestyle_mystic - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = torbjorg_the_seeress - hidden_effect = { - add_trait_xp = { - trait = lifestyle_mystic - value = 100 - } - } - give_nickname = nick_the_seeress - add_piety = 5000 - add_character_flag = ai_will_not_convert - } - if = { limit = { has_variable = torbjorg_the_seeress } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Erik Röde - limit = { - current_year >= 972 - current_year <= 978 - NOT = { exists = global_var:hchar_erik_rode } - } - set_global_variable = { name = hchar_erik_rode value = yes } - title:b_oslosyslar = { - save_scope_as = birth_location - create_character = { - age = 22 - name = "Erik" - dynasty_house = house:house_rode - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_martial_3 - trait = ambitious - trait = brave - trait = diligent - trait = viking - trait = organizer - trait = lifestyle_traveler - trait = adventurer - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_high_skill max_template_high_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_high_skill max_template_high_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = erik_rode - save_scope_as = major - save_scope_as = explorer - add_trait_xp = { - trait = lifestyle_traveler - track = travel - value = 100 - } - add_trait_xp = { - trait = lifestyle_traveler - track = danger - value = 100 - } - if = { - limit = { - has_ep1_dlc_trigger = yes - } - create_inspiration = adventure_inspiration - } - } - if = { limit = { has_variable = erik_rode } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Ibn al-Haytham (Alhazen) - limit = { - current_year >= 985 - current_year <= 991 - NOT = { exists = global_var:hchar_alhazen } - } - set_global_variable = { name = hchar_alhazen value = yes } - title:b_basra = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Hasan" - dynasty_house = house:house_al_haytham - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_intrigue_5 - trait = patient - trait = diligent - trait = shy - trait = scholar - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - give_nickname = nick_alhazen - set_variable = alhazen - add_character_flag = has_reading_glasses - create_inspiration = book_inspiration - } - if = { limit = { has_variable = alhazen } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Ibn Battuta - limit = { - current_year >= 1322 - current_year <= 1328 - NOT = { exists = global_var:hchar_ibn_battuta } - } - set_global_variable = { name = hchar_ibn_battuta value = yes } - title:b_tangiers = { - save_scope_as = birth_location - create_character = { - age = 18 - name = "Muhammad" - dynasty = none - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_diplomacy_4 - trait = gregarious - trait = diligent - trait = impatient - trait = pilgrim - trait = lifestyle_traveler - trait = journaller - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_decent_skill max_template_decent_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = ibn_battuta - give_nickname = nick_ibn_battuta - save_scope_as = explorer - if = { - limit = { - has_ep1_dlc_trigger = yes - } - create_inspiration = adventure_inspiration - } - save_scope_as = major - add_trait_xp = { - trait = lifestyle_traveler - track = travel - value = 100 - } - add_trait_xp = { - trait = lifestyle_traveler - track = danger - value = 100 - } - } - if = { limit = { has_variable = ibn_battuta } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # William of Ockham - limit = { - current_year >= 1307 - current_year <= 1313 - NOT = { exists = global_var:hchar_william_of_ockham } - } - set_global_variable = { name = hchar_william_of_ockham value = yes } - title:b_basingstoke = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "William" - dynasty_house = house:house_of_ockham - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_learning_4 - trait = cynical - trait = diligent - trait = humble - trait = stubborn - trait = scholar - trait = devoted - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_low_skill max_template_low_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = william_of_ockham - save_scope_as = major - add_piety = 5000 - } - if = { limit = { has_variable = william_of_ockham } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Geoffrey Chaucer - limit = { - current_year >= 1363 - current_year <= 1369 - NOT = { exists = global_var:hchar_geoffrey_chaucer } - } - set_global_variable = { name = hchar_geoffrey_chaucer value = yes } - title:b_london = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Geoffrey" - dynasty_house = house:house_chaucer - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_diplomacy_3 - trait = gregarious - trait = lustful - trait = diligent - trait = pilgrim - trait = lifestyle_poet - trait = journaller - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_low_skill max_template_low_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = geoffrey_chaucer - save_scope_as = major - set_variable = legendary_author - create_inspiration = book_inspiration - } - if = { limit = { has_variable = geoffrey_chaucer } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Roger Bacon - limit = { - current_year >= 1239 - current_year <= 1245 - NOT = { exists = global_var:hchar_roger_bacon } - } - set_global_variable = { name = hchar_roger_bacon value = yes } - title:b_ilchester = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Roger" - dynasty_house = house:house_bacon - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_learning_5 - trait = shy - trait = diligent - trait = stubborn - trait = devoted - trait = lifestyle_mystic - trait = scholar - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_low_skill max_template_low_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = roger_bacon - save_scope_as = major - add_piety = 5000 - create_inspiration = book_inspiration - } - if = { limit = { has_variable = roger_bacon } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Aaron of Lincoln - limit = { - current_year >= 1145 - current_year <= 1151 - NOT = { exists = global_var:hchar_aaron_of_lincoln } - } - set_global_variable = { name = hchar_aaron_of_lincoln value = yes } - title:b_lincoln = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Aaron" - dynasty_house = house:house_of_lincoln - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = faith:rabbinism - culture = scope:birth_location.title_province.culture - trait = education_stewardship_5 - trait = generous - trait = ambitious - trait = temperate - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_low_skill max_template_low_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = aaron_of_lincoln - add_gold = 1500 - } - if = { limit = { has_variable = aaron_of_lincoln } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # John Wycliffe - limit = { - current_year >= 1340 - current_year <= 1346 - NOT = { exists = global_var:hchar_john_wycliffe } - } - set_global_variable = { name = hchar_john_wycliffe value = yes } - title:b_yarlestre = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "John" - dynasty_house = house:house_wycliffe - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = faith:lollard - culture = scope:birth_location.title_province.culture - trait = education_learning_4 - trait = zealous - trait = brave - trait = stubborn - trait = theologian - trait = devoted - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_low_skill max_template_low_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = john_wycliffe - save_scope_as = major - create_inspiration = religious_inspiration - add_character_flag = ai_will_not_convert - add_piety = 5000 - add_character_modifier = { - modifier = vow_of_poverty_modifier - } - } - if = { limit = { has_variable = john_wycliffe } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Héloïse d'Argenteuil & Peter Abelard - limit = { - current_year >= 1110 - current_year <= 1116 - NOT = { exists = global_var:hchar_heloise_and_abelard } - } - set_global_variable = { name = hchar_heloise_and_abelard value = yes } - title:b_rais = { - save_scope_as = birth_location - create_character = { - age = 31 - name = "Peter" - dynasty_house = house:house_abelard - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = faith:catholic - culture = scope:birth_location.title_province.culture - trait = education_learning_5 - trait = lustful - trait = ambitious - trait = stubborn - trait = scholar - trait = devoted - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_low_skill max_template_low_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character_2 - } - scope:historical_character_2 ?= { - add_trait = historical_character - set_sexuality = heterosexual - set_variable = peter_abelard - save_scope_as = major - add_piety = 2500 - house ?= { - generate_coa = yes - } - dynasty ?= { - set_coa = scope:historical_character_2.house - } - set_variable = { - name = show_historical_gui - value = 1 - } - } - if = { limit = { has_variable = peter_abelard } } # Error suppression - } - title:b_paris = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "HE_loise" - dynasty_house = house:house_dargenteuil - gender_female_chance = 100 - random_traits = no - location = scope:birth_location.title_province - faith = faith:catholic - culture = scope:birth_location.title_province.culture - trait = education_learning_5 - trait = compassionate - trait = lustful - trait = diligent - trait = scholar - trait = lifestyle_poet - trait = devoted - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_low_skill max_template_low_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_sexuality = heterosexual - set_variable = heloise_dargenteuil - save_scope_as = major - add_piety = 2500 - set_random_lover_reason = { TARGET = scope:historical_character_2 } - } - scope:historical_character_2 = { - set_location = scope:historical_character.location - } - if = { limit = { has_variable = heloise_dargenteuil } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Petrarch (Francesco Petrarca) - limit = { - current_year >= 1324 - current_year <= 1344 - NOT = { exists = global_var:hchar_petrarch } - } - set_global_variable = { name = hchar_petrarch value = yes } - title:b_arezzo = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Francesco" - dynasty_house = house:house_petrarca - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_diplomacy_4 - trait = ambitious - trait = gregarious - trait = diligent - trait = lifestyle_poet - trait = scholar - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - give_nickname = nick_petrarch - set_variable = petrarch - save_scope_as = major - create_inspiration = book_inspiration - } - if = { limit = { has_variable = petrarch } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Giotto di Bondone - limit = { - current_year >= 1287 - current_year <= 1293 - NOT = { exists = global_var:hchar_giotto_di_bondone } - } - set_global_variable = { name = hchar_giotto_di_bondone value = yes } - title:b_firenze = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Giotto" - dynasty_house = house:house_bondone - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_learning_3 - trait = patient - trait = diligent - trait = humble - trait = architect - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = giotto_di_bondone - save_scope_as = major - create_inspiration = book_inspiration - } - if = { limit = { has_variable = giotto_di_bondone } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Leonardo Fibonacci - limit = { - current_year >= 1190 - current_year <= 1196 - NOT = { exists = global_var:hchar_fibonacci } - } - set_global_variable = { name = hchar_fibonacci value = yes } - title:b_pisa = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Leonardo" - dynasty_house = house:house_fibonacci - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_learning_5 - trait = patient - trait = diligent - trait = humble - trait = administrator - trait = scholar - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = fibonacci - save_scope_as = major - create_inspiration = book_inspiration - } - if = { limit = { has_variable = fibonacci } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Giovanni Boccaccio - limit = { - current_year >= 1333 - current_year <= 1339 - NOT = { exists = global_var:hchar_giovanni_boccaccio } - } - set_global_variable = { name = hchar_giovanni_boccaccio value = yes } - title:b_firenze = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Giovanni" - dynasty_house = house:house_boccaccio - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_diplomacy_3 - trait = gregarious - trait = diligent - trait = lustful - trait = lifestyle_poet - trait = journaller - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = giovanni_boccaccio - save_scope_as = major - create_inspiration = book_inspiration - } - if = { limit = { has_variable = giovanni_boccaccio } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Christine de Pizan - limit = { - current_year >= 1384 - current_year <= 1390 - NOT = { exists = global_var:hchar_christine_pizan } - } - set_global_variable = { name = hchar_christine_pizan value = yes } - title:b_venezia = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Christine" - dynasty_house = house:house_de_pizan - gender_female_chance = 100 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = title:b_paris.title_province.culture - trait = education_diplomacy_3 - trait = brave - trait = diligent - trait = compassionate - trait = lifestyle_poet - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = christine_pizan - save_scope_as = major - create_inspiration = book_inspiration - } - if = { limit = { has_variable = christine_pizan } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Snorri Sturluson - limit = { - current_year >= 1199 - current_year <= 1205 - NOT = { exists = global_var:hchar_snorri_sturluson } - } - set_global_variable = { name = hchar_snorri_sturluson value = yes } - title:b_reykjavik = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Snorri" - dynasty_house = house:house_sturluson - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_learning_3 - trait = ambitious - trait = diligent - trait = gregarious - trait = lifestyle_poet - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = snorri_sturluson - save_scope_as = major - create_inspiration = book_inspiration - } - if = { limit = { has_variable = snorri_sturluson } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Hrotsvitha - limit = { - current_year >= 955 - current_year <= 961 - NOT = { exists = global_var:hchar_hrotsvitha } - } - set_global_variable = { name = hchar_hrotsvitha value = yes } - title:b_hildesheim = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Hrotsvitha" - dynasty = none - gender_female_chance = 100 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_learning_3 - trait = brave - trait = ambitious - trait = zealous - trait = lifestyle_poet - trait = devoted - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = hrotsvitha - } - if = { limit = { has_variable = hrotsvitha } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Ramanuja - limit = { - current_year >= 1037 - current_year <= 1043 - NOT = { exists = global_var:hchar_ramanuja } - } - set_global_variable = { name = hchar_ramanuja value = yes } - title:b_kanchipuram = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Ramanuja" - dynasty = none - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_learning_5 - trait = zealous - trait = diligent - trait = forgiving - trait = theologian - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = ramanuja - save_scope_as = major - add_piety = 5000 - create_inspiration = religious_inspiration - } - if = { limit = { has_variable = ramanuja } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Arnaldus de Villa Nova - limit = { - current_year >= 1260 - current_year <= 1266 - NOT = { exists = global_var:hchar_arnaldus_de_villa_nova } - } - set_global_variable = { name = hchar_arnaldus_de_villa_nova value = yes } - title:b_valencia = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Arnaldus" - dynasty_house = house:house_de_villa_nova - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = title:b_barcelona.title_province.faith - culture = title:b_barcelona.title_province.culture - trait = education_learning_4 - trait = cynical - trait = diligent - trait = calm - trait = lifestyle_physician - trait = scholar - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = arnaldus_de_villa_nova - hidden_effect = { - add_trait_xp = { - trait = lifestyle_physician - value = 100 - } - } - } - if = { limit = { has_variable = arnaldus_de_villa_nova } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Ibn Khaldun - limit = { - current_year >= 1352 - current_year <= 1358 - NOT = { exists = global_var:hchar_ibn_khaldun } - } - set_global_variable = { name = hchar_ibn_khaldun value = yes } - title:b_tunis = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Abd-ar-Rahman" - dynasty_house = house:house_khalduni - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_learning_4 - trait = patient - trait = diligent - trait = generous - trait = journaller - trait = scholar - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - save_scope_as = major - set_variable = ibn_khaldun - set_variable = legendary_author - create_inspiration = book_inspiration - } - if = { limit = { has_variable = ibn_khaldun } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Jalaluddin Rumi - limit = { - current_year >= 1227 - current_year <= 1233 - NOT = { exists = global_var:hchar_rumi } - } - set_global_variable = { name = hchar_rumi value = yes } - title:b_ikonion = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Jalaluddin" - dynasty_house = house:house_rumi - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = title:b_balkh.title_province.faith - culture = title:b_balkh.title_province.culture - trait = education_learning_4 - trait = compassionate - trait = diligent - trait = generous - trait = lifestyle_poet - trait = theologian - trait = lifestyle_mystic - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - save_scope_as = major - set_variable = rumi - set_variable = legendary_author - create_inspiration = book_inspiration - hidden_effect = { - add_trait_xp = { - trait = lifestyle_mystic - value = 100 - } - } - } - if = { limit = { has_variable = rumi } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Avicenna - limit = { - current_year >= 1000 - current_year <= 1006 - NOT = { exists = global_var:hchar_avicenna } - } - set_global_variable = { name = hchar_avicenna value = yes } - title:b_bukhara = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Hussein" - dynasty_house = house:house_sina - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_learning_5 - trait = compassionate - trait = diligent - trait = patient - trait = shrewd - trait = scholar - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - save_scope_as = major - set_variable = avicenna - give_nickname = nick_avicenna - set_variable = legendary_author - create_inspiration = book_inspiration - } - if = { limit = { has_variable = avicenna } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Averroes - limit = { - current_year >= 1146 - current_year <= 1152 - NOT = { exists = global_var:hchar_averroes } - } - set_global_variable = { name = hchar_averroes value = yes } - title:b_cordoba = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Abu_al-Walid" - dynasty_house = house:house_rushdi - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_learning_5 - trait = just - trait = diligent - trait = patient - trait = shrewd - trait = scholar - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - save_scope_as = major - set_variable = averroes - give_nickname = nick_averroes - set_variable = legendary_author - create_inspiration = book_inspiration - } - if = { limit = { has_variable = averroes } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Al-Biruni - limit = { - current_year >= 993 - current_year <= 999 - NOT = { exists = global_var:hchar_al_biruni } - } - set_global_variable = { name = hchar_al_biruni value = yes } - title:b_kath = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Abu_Rayhan" - dynasty_house = house:house_biruni - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_learning_5 - trait = patient - trait = diligent - trait = humble - trait = scholar - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - save_scope_as = major - set_variable = al_biruni - set_variable = legendary_author - create_inspiration = book_inspiration - } - if = { limit = { has_variable = al_biruni } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Rashi (Shlomo Yitzchaki) - limit = { - current_year >= 1066 - current_year <= 1072 - NOT = { exists = global_var:hchar_rashi } - } - set_global_variable = { name = hchar_rashi value = yes } - title:b_troyes = { - save_scope_as = birth_location - create_character = { - age = 26 - name = "Shlomo" - dynasty_house = house:house_yitzchaki - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = faith:rabbinism - culture = scope:birth_location.title_province.culture - trait = education_learning_5 - trait = patient - trait = humble - trait = just - trait = scholar - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = rashi - give_nickname = nick_rashi - add_piety = 10000 - create_inspiration = book_inspiration - add_character_flag = ai_will_not_convert - save_scope_as = major - } - if = { limit = { has_variable = rashi } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Yehuda Halevi - limit = { - current_year >= 1095 - current_year <= 1101 - NOT = { exists = global_var:hchar_yehuda_halevi } - } - set_global_variable = { name = hchar_yehuda_halevi value = yes } - title:b_toledo = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Yehuda" - dynasty_house = house:house_halevi - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = faith:rabbinism - culture = culture:sephardi - trait = education_diplomacy_3 - trait = zealous - trait = gregarious - trait = content - trait = lifestyle_poet - trait = lifestyle_mystic - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = yehuda_halevi - create_inspiration = book_inspiration - add_character_flag = ai_will_not_convert - } - if = { limit = { has_variable = yehuda_halevi } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Hasdai ibn Shaprut - limit = { - current_year >= 935 - current_year <= 941 - NOT = { exists = global_var:hchar_shaprut } - } - set_global_variable = { name = hchar_shaprut value = yes } - title:b_jaen = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Hasdai" - dynasty_house = house:house_shaprut - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = faith:rabbinism - culture = culture:sephardi - trait = education_learning_5 - trait = patient - trait = just - trait = diligent - trait = scholar - trait = lifestyle_physician - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = shaprut - create_inspiration = book_inspiration - add_character_flag = ai_will_not_convert - } - if = { limit = { has_variable = shaprut } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Levi ben Gershon (Gersonides) - limit = { - current_year >= 1308 - current_year <= 1314 - NOT = { exists = global_var:hchar_gersonides } - } - set_global_variable = { name = hchar_gersonides value = yes } - title:b_montlaur = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Levi" - dynasty_house = house:house_gershon - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = faith:rabbinism - culture = scope:birth_location.title_province.culture - trait = education_learning_5 - trait = diligent - trait = patient - trait = cynical - trait = shrewd - trait = scholar - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = gersonides - give_nickname = nick_gersonides - create_inspiration = book_inspiration - add_character_flag = ai_will_not_convert - } - if = { limit = { has_variable = gersonides } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Abraham ibn Ezra - limit = { - current_year >= 1109 - current_year <= 1115 - NOT = { exists = global_var:hchar_ezra } - } - set_global_variable = { name = hchar_ezra value = yes } - title:b_tudela = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Abraham" - dynasty_house = house:house_ezra - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = faith:rabbinism - culture = culture:sephardi - trait = education_learning_5 - trait = patient - trait = humble - trait = brave - trait = scholar - trait = adventurer - trait = lifestyle_mystic - trait = lifestyle_traveler - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - save_scope_as = explorer - historical_character_finalization_effect = yes - set_variable = ezra - create_inspiration = book_inspiration - add_character_flag = ai_will_not_convert - } - if = { limit = { has_variable = ezra } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Solomon ibn Gabirol - limit = { - current_year >= 1041 - current_year <= 1047 - NOT = { exists = global_var:hchar_gabriol } - } - set_global_variable = { name = hchar_gabriol value = yes } - title:b_malaga = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Solomon" - dynasty_house = house:house_gabirol - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = faith:rabbinism - culture = culture:sephardi - trait = education_diplomacy_3 - trait = humble - trait = diligent - trait = content - trait = reclusive - trait = lifestyle_poet - trait = weak - trait = lifestyle_mystic - trait = irritable - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = gabriol - create_inspiration = book_inspiration - add_character_flag = ai_will_not_convert - } - if = { limit = { has_variable = gabriol } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Nachmanides (Moses ben Nahman) - limit = { - current_year >= 1214 - current_year <= 1220 - NOT = { exists = global_var:hchar_nachmanides} - } - set_global_variable = { name = hchar_nachmanides value = yes } - title:b_girona = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Moses" - dynasty_house = house:house_nahman - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = faith:rabbinism - culture = culture:sephardi - trait = education_learning_4 - trait = zealous - trait = brave - trait = just - trait = theologian - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = nachmanides - give_nickname = nick_nachmanides - create_inspiration = book_inspiration - add_piety = 10000 - add_character_flag = ai_will_not_convert - } - if = { limit = { has_variable = nachmanides } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Hasdai Crescas - limit = { - current_year >= 1360 - current_year <= 1366 - NOT = { exists = global_var:hchar_crescas } - } - set_global_variable = { name = hchar_crescas value = yes } - title:b_barcelona = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Hasdai" - dynasty_house = house:house_crescas - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = faith:rabbinism - culture = culture:sephardi - trait = education_learning_5 - trait = just - trait = diligent - trait = patient - trait = scholar - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = crescas - create_inspiration = book_inspiration - add_character_flag = ai_will_not_convert - } - if = { limit = { has_variable = crescas } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Saadia Gaon - limit = { - current_year >= 902 - current_year <= 908 - NOT = { exists = global_var:hchar_saadia } - } - set_global_variable = { name = hchar_saadia value = yes } - title:b_al-fayyum = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Saadia" - dynasty_house = house:house_gaon - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = faith:rabbinism - culture = scope:birth_location.title_province.culture - trait = education_learning_5 - trait = diligent - trait = just - trait = zealous - trait = scholar - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = saadia - create_inspiration = book_inspiration - add_character_flag = ai_will_not_convert - } - if = { limit = { has_variable = saadia } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Yusuf ibn 'Awkal - limit = { - current_year >= 990 - current_year <= 996 - NOT = { exists = global_var:hchar_awkal } - } - set_global_variable = { name = hchar_awkal value = yes } - title:b_cairo = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Yusuf" - dynasty_house = house:house_awkal - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = faith:rabbinism - culture = scope:birth_location.title_province.culture - trait = education_stewardship_5 - trait = impatient - trait = gregarious - trait = temperate - trait = lifestyle_traveler - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - save_scope_as = explorer - historical_character_finalization_effect = yes - set_variable = awkal - create_inspiration = book_inspiration - add_character_flag = ai_will_not_convert - } - if = { limit = { has_variable = awkal } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Benjamin of Tudela - limit = { - current_year >= 1150 - current_year <= 1156 - NOT = { exists = global_var:hchar_benjamin_of_tudela } - } - set_global_variable = { name = hchar_benjamin_of_tudela value = yes } - title:b_tudela = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Benjamin" - dynasty_house = house:house_tudela - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = faith:rabbinism - culture = culture:sephardi - trait = education_diplomacy_3 - trait = diligent - trait = fickle - trait = brave - trait = journaller - trait = lifestyle_traveler - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - save_scope_as = explorer - historical_character_finalization_effect = yes - set_variable = benjamin_of_tudela - create_inspiration = book_inspiration - add_character_flag = ai_will_not_convert - } - if = { limit = { has_variable = benjamin_of_tudela } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Marco Polo - limit = { - current_year >= 1270 - current_year <= 1276 - NOT = { exists = global_var:hchar_marco_polo } - } - set_global_variable = { name = hchar_marco_polo value = yes } - title:b_venezia = { - save_scope_as = birth_location - create_character = { - age = 22 - name = "Marco" - dynasty_house = house:house_polo - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_stewardship_5 - trait = ambitious - trait = brave - trait = gregarious - trait = organizer - trait = lifestyle_traveler - trait = adventurer - trait = journaller - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_high_skill max_template_high_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_high_skill max_template_high_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = marco_polo - save_scope_as = major - save_scope_as = explorer - add_trait_xp = { - trait = lifestyle_traveler - track = travel - value = 100 - } - add_trait_xp = { - trait = lifestyle_traveler - track = danger - value = 100 - } - if = { - limit = { - has_ep1_dlc_trigger = yes - } - create_inspiration = adventure_inspiration - } - } - if = { limit = { has_variable = marco_polo } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Bridget of Sweden - limit = { - current_year >= 1323 - current_year <= 1329 - NOT = { exists = global_var:hchar_bridget_of_sweden } - } - set_global_variable = { name = hchar_bridget_of_sweden value = yes } - title:b_sigtuna = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Birgitta" - dynasty = none - gender_female_chance = 100 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_diplomacy_3 - trait = zealous - trait = humble - trait = compassionate - trait = possessed_1 - trait = devoted - trait = lifestyle_mystic - trait = pilgrim - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_low_skill max_template_low_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = bridget_of_sweden - save_scope_as = major - give_nickname = nick_heliga - create_inspiration = religious_inspiration - hidden_effect = { - add_trait_xp = { - trait = lifestyle_mystic - value = 100 - } - } - add_piety = 5000 - add_character_flag = ai_will_not_convert - } - if = { limit = { has_variable = bridget_of_sweden } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Johannes Eckhart (Meister Eckhart) - limit = { - current_year >= 1280 - current_year <= 1286 - NOT = { exists = global_var:hchar_meister_eckhart } - } - set_global_variable = { name = hchar_meister_eckhart value = yes } - title:b_schmalkalden = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Johannes" - dynasty_house = house:house_eckhart - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_learning_5 - trait = zealous - trait = patient - trait = humble - trait = lifestyle_mystic - trait = devoted - trait = theologian - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_low_skill max_template_low_skill } - intrigue = { min_template_low_skill max_template_low_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = meister_eckhart - give_nickname = nick_meister - add_piety = 5000 - create_inspiration = book_inspiration - save_scope_as = major - hidden_effect = { - add_trait_xp = { - trait = lifestyle_mystic - value = 100 - } - } - } - if = { limit = { has_variable = meister_eckhart } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Jangar - limit = { - current_year >= 1100 - current_year <= 1106 - NOT = { exists = global_var:hchar_jangar } - } - set_global_variable = { name = hchar_jangar value = yes } - title:b_darkhad = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Jangar" - dynasty = none - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_martial_5 - trait = brave - trait = just - trait = ambitious - trait = strong - trait = athletic - trait = shrewd - trait = legend - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_high_skill max_template_high_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_high_skill max_template_high_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = jangar - change_current_weight = 50 - give_nickname = nick_the_wild - save_scope_as = major - add_character_flag = need_military_outfit - } - if = { limit = { has_variable = jangar } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Zawisza Czarny - limit = { - current_year >= 1390 - current_year <= 1396 - NOT = { exists = global_var:hchar_zawisza } - } - set_global_variable = { name = hchar_zawisza value = yes } - title:b_sandomierz = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Zawisza" - dynasty_house = house:house_czarny - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_diplomacy_5 - trait = brave - trait = gregarious - trait = ambitious - trait = strong - trait = legend - trait = gallant - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_high_skill max_template_high_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_high_skill max_template_high_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = zawisza - give_nickname = nick_the_black - save_scope_as = major - } - if = { limit = { has_variable = zawisza } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Theophanes the Greek - limit = { - current_year >= 1360 - current_year <= 1366 - NOT = { exists = global_var:hchar_theophanes_the_greek } - } - set_global_variable = { name = hchar_theophanes_the_greek value = yes } - title:b_moskva = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Theophanes" - dynasty = none - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = title:b_constantinople.title_province.faith - culture = title:b_constantinople.title_province.culture - trait = education_learning_2 - trait = patient - trait = diligent - trait = humble - trait = lifestyle_mystic - trait = architect - diplomacy = { min_template_decent_skill max_template_decent_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_decent_skill max_template_decent_skill } - intrigue = { min_template_decent_skill max_template_decent_skill } - learning = { min_template_decent_skill max_template_decent_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = theophanes_the_greek - give_nickname = nick_the_greek - } - if = { limit = { has_variable = theophanes_the_greek } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Nicetas Choniates - limit = { - current_year >= 1175 - current_year <= 1181 - NOT = { exists = global_var:hchar_nicetas_choniates } - } - set_global_variable = { name = hchar_nicetas_choniates value = yes } - title:b_chonae = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Nicetas" - dynasty_house = house:house_choniates - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_learning_4 - trait = patient - trait = diligent - trait = just - trait = scholar - trait = journaller - diplomacy = { min_template_decent_skill max_template_decent_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_decent_skill max_template_decent_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = nicetas_choniates - save_scope_as = major - create_inspiration = book_inspiration - } - if = { limit = { has_variable = nicetas_choniates } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Michael Psellos - limit = { - current_year >= 1037 - current_year <= 1067 - NOT = { exists = global_var:hchar_michael_psellos } - } - set_global_variable = { name = hchar_michael_psellos value = yes } - if = { - limit = { - game_start_date >= 1066.1.1 - game_start_date < 1178.10.1 - } - title:b_constantinople = { - save_scope_as = birth_location - create_character = { - age = 49 - name = "Michael" - dynasty_house = house:house_psellos - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_learning_3 - trait = arrogant - trait = fickle - trait = cynical - trait = devoted - trait = scholar - trait = lifestyle_poet - trait = stuttering - diplomacy = { min_template_decent_skill max_template_decent_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_decent_skill max_template_decent_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = michael_psellos - set_variable = alternative_origin_courtier - save_scope_as = major - create_inspiration = book_inspiration - give_nickname = nick_the_stammerer - } - if = { limit = { has_variable = michael_psellos } } # Error suppression - if = { limit = { has_variable = alternative_origin_courtier } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - else = { - title:b_constantinople = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Michael" - dynasty_house = house:house_psellos - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_learning_3 - trait = arrogant - trait = fickle - trait = cynical - trait = devoted - trait = scholar - trait = lifestyle_poet - trait = stuttering - diplomacy = { min_template_decent_skill max_template_decent_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_decent_skill max_template_decent_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = michael_psellos - save_scope_as = major - create_inspiration = book_inspiration - give_nickname = nick_the_stammerer - } - if = { limit = { has_variable = michael_psellos } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - } - if = { # John Tzetzes - limit = { - current_year >= 1130 - current_year <= 1136 - NOT = { exists = global_var:hchar_john_tzetzes } - } - set_global_variable = { name = hchar_john_tzetzes value = yes } - title:b_constantinople = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "John" - dynasty_house = house:house_tzetzes - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_learning_4 - trait = stubborn - trait = diligent - trait = shy - trait = scholar - trait = lifestyle_poet - diplomacy = { min_template_decent_skill max_template_decent_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_decent_skill max_template_decent_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = john_tzetzes - create_inspiration = book_inspiration - } - if = { limit = { has_variable = john_tzetzes } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Theophylact of Ohrid - limit = { - current_year >= 1075 - current_year <= 1081 - NOT = { exists = global_var:hchar_theophylact_of_ohrid } - } - set_global_variable = { name = hchar_theophylact_of_ohrid value = yes } - title:b_chalkis = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Theophylact" - dynasty = none - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_learning_4 - trait = zealous - trait = diligent - trait = patient - trait = scholar - trait = theologian - trait = devoted - diplomacy = { min_template_decent_skill max_template_decent_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_decent_skill max_template_decent_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = theophylact_of_ohrid - give_nickname = nick_of_ohrid - create_inspiration = book_inspiration - } - if = { limit = { has_variable = theophylact_of_ohrid } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Eustathius of Thessalonica - limit = { - current_year >= 1125 - current_year <= 1131 - NOT = { exists = global_var:hchar_eustathius_of_thessalonica } - } - set_global_variable = { name = hchar_eustathius_of_thessalonica value = yes } - title:b_thessaloniki = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Eustathius" - dynasty = none - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_learning_4 - trait = humble - trait = diligent - trait = patient - trait = scholar - trait = theologian - trait = devoted - diplomacy = { min_template_decent_skill max_template_decent_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_decent_skill max_template_decent_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = eustathius_of_thessalonica - give_nickname = nick_of_thessalonica - create_inspiration = book_inspiration - } - if = { limit = { has_variable = eustathius_of_thessalonica } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Nicephorus Blemmydes - limit = { - current_year >= 1217 - current_year <= 1223 - NOT = { exists = global_var:hchar_nicephorus_blemmydes } - } - set_global_variable = { name = hchar_nicephorus_blemmydes value = yes } - title:b_constantinople = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Nicephorus" - dynasty_house = house:house_blemmydes - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_learning_4 - trait = humble - trait = diligent - trait = zealous - trait = scholar - trait = theologian - trait = devoted - diplomacy = { min_template_decent_skill max_template_decent_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_decent_skill max_template_decent_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = nicephorus_blemmydes - create_inspiration = book_inspiration - } - if = { limit = { has_variable = nicephorus_blemmydes } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Georgius Pachymeres - limit = { - current_year >= 1262 - current_year <= 1268 - NOT = { exists = global_var:hchar_georgius_pachymeres } - } - set_global_variable = { name = hchar_georgius_pachymeres value = yes } - title:b_nikaea = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Georgius" - dynasty_house = house:house_pachymeres - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_learning_4 - trait = arrogant - trait = diligent - trait = patient - trait = scholar - trait = journaller - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_decent_skill max_template_decent_skill } - intrigue = { min_template_decent_skill max_template_decent_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = georgius_pachymeres - create_inspiration = book_inspiration - } - if = { limit = { has_variable = georgius_pachymeres } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Manuel Moschopoulos - limit = { - current_year >= 1285 - current_year <= 1291 - NOT = { exists = global_var:hchar_manuel_moschopoulos } - } - set_global_variable = { name = hchar_manuel_moschopoulos value = yes } - title:b_constantinople = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Manuel" - dynasty_house = house:house_moschopoulos - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_learning_4 - trait = patient - trait = diligent - trait = shy - trait = scholar - trait = journaller - diplomacy = { min_template_decent_skill max_template_decent_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_decent_skill max_template_decent_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = manuel_moschopoulos - create_inspiration = book_inspiration - } - if = { limit = { has_variable = manuel_moschopoulos } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Theodore Metochites - limit = { - current_year >= 1290 - current_year <= 1296 - NOT = { exists = global_var:hchar_theodore_metochites } - } - set_global_variable = { name = hchar_theodore_metochites value = yes } - title:b_constantinople = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Theodore" - dynasty_house = house:house_metochites - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_stewardship_5 - trait = ambitious - trait = diligent - trait = stubborn - trait = scholar - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = theodore_metochites - add_gold = 1000 - } - if = { limit = { has_variable = theodore_metochites } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Michael Choniates - limit = { - current_year >= 1160 - current_year <= 1166 - NOT = { exists = global_var:hchar_michael_choniates } - } - set_global_variable = { name = hchar_michael_choniates value = yes } - title:b_chonae = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Michael" - dynasty_house = house:house_choniates_2 - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_learning_4 - trait = humble - trait = zealous - trait = stubborn - trait = theologian - trait = devoted - diplomacy = { min_template_decent_skill max_template_decent_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_decent_skill max_template_decent_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = michael_choniates - } - if = { limit = { has_variable = michael_choniates } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Joseph Tarchaneiotes - limit = { - current_year >= 1063 - current_year <= 1069 - NOT = { exists = global_var:hchar_joseph_tarchaneiotes } - } - set_global_variable = { name = hchar_joseph_tarchaneiotes value = yes } - title:b_constantinople = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Joseph" - dynasty_house = house:house_tarchaneiotes - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_martial_5 - trait = ambitious - trait = just - trait = deceitful - trait = organizer - trait = strategist - trait = strong - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_high_skill max_template_high_skill } - stewardship = { min_template_decent_skill max_template_decent_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_low_skill max_template_low_skill } - prowess = { min_template_high_skill max_template_high_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = joseph_tarchaneiotes - add_gold = 1000 - add_character_flag = need_military_outfit - } - if = { limit = { has_variable = joseph_tarchaneiotes } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Gemistus Pletho - limit = { - current_year >= 1375 - current_year <= 1381 - NOT = { exists = global_var:hchar_gemistus_pletho } - } - set_global_variable = { name = hchar_gemistus_pletho value = yes } - title:b_constantinople = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Gemistus" - dynasty_house = house:house_pletho - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_learning_5 - trait = eccentric - trait = diligent - trait = stubborn - trait = scholar - trait = scholar - trait = intellect_good_2 - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = gemistus_pletho - save_scope_as = major - create_inspiration = book_inspiration - } - if = { limit = { has_variable = gemistus_pletho } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Arethas of Caesarea - limit = { - current_year >= 880 - current_year <= 886 - NOT = { exists = global_var:hchar_arethas_of_caesarea } - } - set_global_variable = { name = hchar_arethas_of_caesarea value = yes } - title:b_patras = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Arethas" - dynasty = none - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_learning_5 - trait = zealous - trait = diligent - trait = patient - trait = scholar - diplomacy = { min_template_decent_skill max_template_decent_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_decent_skill max_template_decent_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = arethas_of_caesarea - give_nickname = nick_of_caesarea - create_inspiration = book_inspiration - } - if = { limit = { has_variable = arethas_of_caesarea } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Basil Lekapenos - limit = { - current_year >= 945 - current_year <= 951 - NOT = { exists = global_var:hchar_basil_lekapenos } - } - set_global_variable = { name = hchar_basil_lekapenos value = yes } - title:b_constantinople = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Basil" - dynasty_house = house:house_lekapenos - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_stewardship_5 - trait = ambitious - trait = diligent - trait = patient - trait = beardless_eunuch - trait = bastard - trait = administrator - trait = intellect_good_1 - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_decent_skill max_template_decent_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = basil_lekapenos - change_current_weight = 75 - } - if = { limit = { has_variable = basil_lekapenos } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # John the Orphanotrophos AKA totally who Varys is based on - limit = { - current_year >= 985 - current_year <= 991 - NOT = { exists = global_var:hchar_john_the_orphanotrophos } - } - set_global_variable = { name = hchar_john_the_orphanotrophos value = yes } - title:b_patras = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "John" - dynasty = none - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_intrigue_5 - trait = ambitious - trait = compassionate - trait = deceitful - trait = schemer - trait = beardless_eunuch - diplomacy = { min_template_decent_skill max_template_decent_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = john_the_orphanotrophos - give_nickname = nick_the_orphanotrophos - change_current_weight = 125 - add_character_flag = bald_head - add_character_flag = no_hat - if = { limit = { has_character_flag = bald_head } } # Error suppression - } - if = { limit = { has_variable = john_the_orphanotrophos } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Samonas - limit = { - current_year >= 895 - current_year <= 901 - NOT = { exists = global_var:hchar_samonas } - } - set_global_variable = { name = hchar_samonas value = yes } - title:b_samosata = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Samonas" - dynasty = none - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = title:b_constantinople.title_province.faith - culture = title:b_constantinople.title_province.culture - trait = education_intrigue_5 - trait = gregarious - trait = ambitious - trait = deceitful - trait = schemer - trait = loyal - trait = beardless_eunuch - diplomacy = { min_template_decent_skill max_template_decent_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_decent_skill max_template_decent_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = samonas - } - if = { limit = { has_variable = samonas } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Peter the Eunuch - limit = { - current_year >= 1020 - current_year <= 1026 - NOT = { exists = global_var:hchar_peter_the_eunuch } - } - set_global_variable = { name = hchar_peter_the_eunuch value = yes } - title:b_constantinople = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Peter" - dynasty = none - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = title:b_constantinople.title_province.faith - culture = title:b_constantinople.title_province.culture - trait = education_diplomacy_4 - trait = zealous - trait = patient - trait = diligent - trait = lifestyle_mystic - trait = loyal - trait = beardless_eunuch - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_decent_skill max_template_decent_skill } - learning = { min_template_decent_skill max_template_decent_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = peter_the_eunuch - give_nickname = nick_the_eunuch - } - if = { limit = { has_variable = peter_the_eunuch } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Constantine the Paphlagonian - limit = { - current_year >= 867 - current_year <= 873 - NOT = { exists = global_var:hchar_constantine_the_paphlagonian } - } - set_global_variable = { name = hchar_constantine_the_paphlagonian value = yes } - title:b_amastris = { - save_scope_as = birth_location - create_character = { - age = 40 - name = "Constantine" - dynasty = none - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_stewardship_3 - trait = calm - trait = patient - trait = diligent - trait = loyal - trait = administrator - trait = beardless_eunuch - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_decent_skill max_template_decent_skill } - learning = { min_template_decent_skill max_template_decent_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = constantine_the_paphlagonian - give_nickname = nick_the_paphlagonian - } - if = { limit = { has_variable = constantine_the_paphlagonian } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Peter the Stratopedarches - limit = { - current_year >= 950 - current_year <= 956 - NOT = { exists = global_var:hchar_peter_the_stratopedarches } - } - set_global_variable = { name = hchar_peter_the_stratopedarches value = yes } - title:b_tyana = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Peter" - dynasty = none - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_martial_5 - trait = calm - trait = patient - trait = brave - trait = loyal - trait = physique_good_3 - trait = strong - trait = strategist - trait = beardless_eunuch - diplomacy = { min_template_low_skill max_template_low_skill } - martial = { min_template_high_skill max_template_high_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_decent_skill max_template_decent_skill } - learning = { min_template_low_skill max_template_low_skill } - prowess = { min_template_high_skill max_template_high_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = peter_the_stratopedarches - give_nickname = nick_the_stratopedarches - save_scope_as = major - } - if = { limit = { has_variable = peter_the_stratopedarches } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Basilios Bessarion - limit = { - current_year >= 1423 - current_year <= 1429 - NOT = { exists = global_var:hchar_basilios_bessarion } - } - set_global_variable = { name = hchar_basilios_bessarion value = yes } - title:b_trebizond = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Basilios" - dynasty_house = house:house_bessarion - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = faith:catholic - culture = scope:birth_location.title_province.culture - trait = education_learning_5 - trait = diligent - trait = patient - trait = cynical - trait = scholar - trait = theologian - trait = diplomat - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_decent_skill max_template_decent_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = basilios_bessarion - save_scope_as = major - add_character_flag = ai_will_not_convert - } - if = { limit = { has_variable = basilios_bessarion } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Demetrios Kydones - limit = { - current_year >= 1344 - current_year <= 1350 - NOT = { exists = global_var:hchar_demetrios_kydones } - } - set_global_variable = { name = hchar_demetrios_kydones value = yes } - title:b_larissa = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Demetrios" - dynasty_house = house:house_kydones - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_diplomacy_5 - trait = honest - trait = just - trait = forgiving - trait = scholar - trait = theologian - trait = diplomat - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_decent_skill max_template_decent_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = demetrios_kydones - } - if = { limit = { has_variable = demetrios_kydones } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Manuel Holobolos - limit = { - current_year >= 1240 - current_year <= 1246 - NOT = { exists = global_var:hchar_manuel_holobolos } - } - set_global_variable = { name = hchar_manuel_holobolos value = yes } - title:b_constantinople = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Manuel" - dynasty_house = house:house_holobolos - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_learning_4 - trait = craven - trait = humble - trait = gregarious - trait = scholar - trait = disfigured - trait = administrator - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = manuel_holobolos - } - if = { limit = { has_variable = manuel_holobolos } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # John Axuch - limit = { - current_year >= 1107 - current_year <= 1113 - NOT = { exists = global_var:hchar_john_axuch } - } - set_global_variable = { name = hchar_john_axuch value = yes } - title:b_satala = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "John" - dynasty_house = house:house_axuch - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = title:b_constantinople.title_province.faith - culture = title:b_maragha.title_province.culture - trait = education_martial_5 - trait = brave - trait = trusting - trait = content - trait = loyal - trait = strong - trait = strategist - trait = overseer - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_high_skill max_template_high_skill } - stewardship = { min_template_low_skill max_template_low_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_low_skill max_template_low_skill } - prowess = { min_template_high_skill max_template_high_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = john_axuch - save_scope_as = major - add_character_flag = need_military_outfit - learn_language_of_culture = scope:birth_location.title_province.culture - } - if = { limit = { has_variable = john_axuch } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Mkhitar Gosh - limit = { - current_year >= 1150 - current_year <= 1156 - NOT = { exists = global_var:hchar_mkhitar_gosh } - } - set_global_variable = { name = hchar_mkhitar_gosh value = yes } - title:b_kayan = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Mkhitar" - dynasty_house = house:house_gosh - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_learning_5 - trait = zealous - trait = just - trait = diligent - trait = scholar - trait = theologian - trait = administrator - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_decent_skill max_template_decent_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = mkhitar_gosh - create_inspiration = book_inspiration - } - if = { limit = { has_variable = mkhitar_gosh } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Shota Rustaveli - limit = { - current_year >= 1192 - current_year <= 1198 - NOT = { exists = global_var:hchar_shota_rustaveli } - } - set_global_variable = { name = hchar_shota_rustaveli value = yes } - title:b_batumi = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Shota" - dynasty_house = house:house_rustaveli - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_learning_3 - trait = compassionate - trait = humble - trait = diligent - trait = lifestyle_poet - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_decent_skill max_template_decent_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = shota_rustaveli - create_inspiration = book_inspiration - } - if = { limit = { has_variable = shota_rustaveli } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Grigor Tatevatsi - limit = { - current_year >= 1366 - current_year <= 1372 - NOT = { exists = global_var:hchar_grigor_tatevatsi } - } - set_global_variable = { name = hchar_grigor_tatevatsi value = yes } - title:b_kayan = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Grigor" - dynasty_house = house:house_tatevatsi - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_learning_5 - trait = zealous - trait = humble - trait = diligent - trait = theologian - trait = scholar - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_decent_skill max_template_decent_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = grigor_tatevatsi - } - if = { limit = { has_variable = grigor_tatevatsi } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Sargis Pitsak - limit = { - current_year >= 1310 - current_year <= 1316 - NOT = { exists = global_var:hchar_sargis_pitsak } - } - set_global_variable = { name = hchar_sargis_pitsak value = yes } - title:b_tarsus = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Sargis" - dynasty_house = house:house_pitsak - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_learning_2 - trait = patient - trait = calm - trait = diligent - trait = architect - diplomacy = { min_template_decent_skill max_template_decent_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_decent_skill max_template_decent_skill } - intrigue = { min_template_decent_skill max_template_decent_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = sargis_pitsak - } - if = { limit = { has_variable = sargis_pitsak } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Averardo de' Medici - limit = { - current_year >= 1336 - current_year <= 1342 - NOT = { exists = global_var:hchar_medici } - } - set_global_variable = { name = hchar_medici value = yes } - title:b_firenze = { - save_scope_as = birth_location - create_character = { - age = 16 - name = "Averardo" - dynasty_house = house:house_medici - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_stewardship_5 - trait = ambitious - trait = greedy - trait = diligent - trait = avaricious - trait = lifestyle_traveler - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_low_skill max_template_low_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = medici - add_gold = 1000 - save_scope_as = major - } - if = { limit = { has_variable = medici } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Alfonso de Borgia - limit = { - current_year >= 1398 - current_year <= 1404 - NOT = { exists = global_var:hchar_borgia } - } - set_global_variable = { name = hchar_borgia value = yes } - title:b_almansa = { - save_scope_as = birth_location - create_character = { - age = 16 - name = "Alfonso" - dynasty_house = house:house_borgia - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_diplomacy_5 - trait = ambitious - trait = greedy - trait = deceitful - trait = diplomat - trait = administrator - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = borgia - save_scope_as = major - } - if = { limit = { has_variable = borgia } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # William Wallace - limit = { - current_year >= 1290 - current_year <= 1296 - NOT = { exists = global_var:hchar_william_wallace } - } - set_global_variable = { name = hchar_william_wallace value = yes } - title:b_glasgow = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "William" - dynasty_house = house:house_wallace - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_martial_5 - trait = brave - trait = stubborn - trait = vengeful - trait = strong - trait = gallant - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_high_skill max_template_high_skill } - stewardship = { min_template_low_skill max_template_low_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_low_skill max_template_low_skill } - prowess = { min_template_high_skill max_template_high_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = william_wallace - save_scope_as = major - add_character_flag = need_military_outfit - } - if = { limit = { has_variable = william_wallace } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # La Hire (Étienne de Vignolles) - limit = { - current_year >= 1406 - current_year <= 1412 - NOT = { exists = global_var:hchar_la_hire } - } - set_global_variable = { name = hchar_la_hire value = yes } - title:b_dax = { - save_scope_as = birth_location - create_character = { - age = 16 - name = "Étienne" - dynasty_house = house:house_vignolles - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_martial_5 - trait = brave - trait = wrathful - trait = patient - trait = strong - trait = gallant - trait = loyal - trait = strategist - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_high_skill max_template_high_skill } - stewardship = { min_template_low_skill max_template_low_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_low_skill max_template_low_skill } - prowess = { min_template_high_skill max_template_high_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = la_hire - give_nickname = nick_la_hire - add_character_flag = need_military_outfit - } - if = { limit = { has_variable = la_hire } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Rabban Bar Sauma - limit = { - current_year >= 1240 - current_year <= 1246 - NOT = { exists = global_var:hchar_bar_sauma } - } - set_global_variable = { name = hchar_bar_sauma value = yes } - title:b_baghdad = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Bar_Sawma" - dynasty = none - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = faith:nestorian - culture = culture:uyghur - trait = education_diplomacy_4 - trait = diplomat - trait = calm - trait = diligent - trait = patient - trait = devoted - trait = adventurer - trait = lifestyle_traveler - trait = scholar - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = bar_sauma - add_character_flag = ai_will_not_convert - add_trait_xp = { - trait = lifestyle_traveler - track = travel - value = 100 - } - add_trait_xp = { - trait = lifestyle_traveler - track = danger - value = 100 - } - } - if = { limit = { has_variable = bar_sauma } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Nasreddin Hodja - limit = { - current_year >= 1228 - current_year <= 1234 - NOT = { exists = global_var:hchar_hodja } - } - set_global_variable = { name = hchar_hodja value = yes } - title:b_bukhara = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Nasreddin" - dynasty = none - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_intrigue_5 - trait = eccentric - trait = just - trait = arrogant - trait = shrewd - trait = hajjaj - trait = lifestyle_mystic - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = hodja - give_nickname = nick_the_hodja - hidden_effect = { - add_trait_xp = { - trait = lifestyle_mystic - value = 100 - } - } - } - if = { limit = { has_variable = hodja } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Widukind of Corvey - limit = { - current_year >= 945 - current_year <= 951 - NOT = { exists = global_var:hchar_widukind_of_corvey } - } - set_global_variable = { name = hchar_widukind_of_corvey value = yes } - title:b_everstein = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Widukind" - dynasty_house = house:house_corvey - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_learning_4 - trait = zealous - trait = diligent - trait = humble - trait = lifestyle_mystic - trait = devoted - trait = journaller - trait = lifestyle_poet - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_low_skill max_template_low_skill } - intrigue = { min_template_low_skill max_template_low_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = widukind_of_corvey - create_inspiration = book_inspiration - hidden_effect = { - add_trait_xp = { - trait = lifestyle_mystic - value = 100 - } - } - } - if = { limit = { has_variable = widukind_of_corvey } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Roger de Flor - limit = { - current_year >= 1291 - current_year <= 1296 - NOT = { exists = global_var:hchar_roger_de_flor } - } - set_global_variable = { name = hchar_roger_de_flor value = yes } - title:b_brindisi = { - save_scope_as = birth_location - create_character = { - age = 24 - name = "Roger" - dynasty_house = house:house_flor - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = title:b_roma.title_province.faith - culture = title:b_roma.title_province.culture - trait = education_martial_5 - trait = greedy - trait = ambitious - trait = stubborn - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_high_skill max_template_high_skill } - stewardship = { min_template_low_skill max_template_low_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_low_skill max_template_low_skill } - prowess = { min_template_high_skill max_template_high_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = roger_de_flor - add_gold = 1000 - add_character_modifier = { - modifier = holy_order_experience_modifier - } - add_character_flag = need_military_outfit - } - if = { limit = { has_variable = roger_de_flor } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Regino of Prüm - limit = { - current_year >= 860 - current_year <= 870 - NOT = { exists = global_var:hchar_regino_of_prum } - } - set_global_variable = { name = hchar_regino_of_prum value = yes } - title:b_speyer = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Regino" - dynasty_house = house:house_prum - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_learning_3 - trait = calm - trait = diligent - trait = humble - trait = devoted - trait = journaller - trait = lifestyle_poet - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_low_skill max_template_low_skill } - intrigue = { min_template_low_skill max_template_low_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = regino_of_prum - create_inspiration = book_inspiration - } - if = { limit = { has_variable = regino_of_prum } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - if = { # Geoffrey of Monmouth - limit = { - current_year >= 1120 - current_year <= 1126 - NOT = { exists = global_var:hchar_geoffrey_of_monmouth } - } - set_global_variable = { name = hchar_geoffrey_of_monmouth value = yes } - title:b_monmouth = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Geoffrey" - dynasty_house = house:house_monmouth - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_learning_2 - trait = ambitious - trait = diligent - trait = eccentric - trait = devoted - trait = lifestyle_poet - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_low_skill max_template_low_skill } - intrigue = { min_template_low_skill max_template_low_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = geoffrey_of_monmouth - create_inspiration = book_inspiration - } - if = { limit = { has_variable = geoffrey_of_monmouth } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - - # Start of All Under Heaven Characters - - if = { # Nichiren (日蓮) - limit = { - current_year >= 1242 - current_year <= 1248 - NOT = { exists = global_var:hchar_nichiren } - } - set_global_variable = { name = hchar_nichiren value = yes } - title:b_chiba = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Nichiren" - dynasty = none - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = faith:pundarika - culture = scope:birth_location.title_province.culture - trait = education_learning_5 - trait = zealous - trait = brave - trait = stubborn - trait = devoted - trait = lifestyle_mystic - diplomacy = { min_template_low_skill max_template_low_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_low_skill max_template_low_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_decent_skill max_template_decent_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = nichiren - add_character_flag = ai_will_not_convert - } - if = { limit = { has_variable = nichiren } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - - if = { # Dōgen (道元) - limit = { - current_year >= 1220 - current_year <= 1226 - NOT = { exists = global_var:hchar_dogen } - } - set_global_variable = { name = hchar_dogen value = yes } - title:b_kyo = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "DO_gen" - dynasty = none - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = faith:dhyana - culture = scope:birth_location.title_province.culture - trait = education_learning_5 - trait = zealous - trait = patient - trait = temperate - trait = devoted - trait = theologian - trait = lifestyle_mystic - diplomacy = { min_template_low_skill max_template_low_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_low_skill max_template_low_skill } - intrigue = { min_template_low_skill max_template_low_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_decent_skill max_template_decent_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = dogen - create_inspiration = religious_inspiration - } - if = { limit = { has_variable = dogen } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - - if = { # Shiren (师仁) - limit = { - current_year >= 1298 - current_year <= 1304 - NOT = { exists = global_var:hchar_kokan_shiren } - } - set_global_variable = { name = hchar_kokan_shiren value = yes } - title:b_kamakura = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Shiren_5E08_4EC1" - dynasty = none - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = faith:dhyana - culture = scope:birth_location.title_province.culture - trait = education_learning_4 - trait = zealous - trait = humble - trait = patient - trait = devoted - trait = lifestyle_mystic - trait = lifestyle_poet - trait = theologian - diplomacy = { min_template_low_skill max_template_low_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_low_skill max_template_low_skill } - intrigue = { min_template_low_skill max_template_low_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_decent_skill max_template_decent_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = kokan_shiren - create_inspiration = book_inspiration - } - if = { limit = { has_variable = kokan_shiren } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - - if = { # Jeong Mong-ju (鄭夢周) - limit = { - current_year >= 1366 - current_year <= 1374 - NOT = { exists = global_var:hchar_jeong_mong_ju } - } - set_global_variable = { name = hchar_jeong_mong_ju value = yes } - title:b_Goryeo_Gaeseong_Gaeseong = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Mong_ju" - dynasty_house = house:house_hchar_jeong - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = faith:daoxue - culture = scope:birth_location.title_province.culture - trait = education_learning_4 - trait = just - trait = honest - trait = brave - trait = lifestyle_poet - trait = scholar - diplomacy = { min_template_low_skill max_template_low_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_low_skill max_template_low_skill } - intrigue = { min_template_low_skill max_template_low_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = jeong_mong_ju - } - if = { limit = { has_variable = jeong_mong_ju } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - - if = { # Yi Saek (李穡) - limit = { - current_year >= 1351 - current_year <= 1357 - NOT = { exists = global_var:hchar_yi_saek } - } - set_global_variable = { name = hchar_yi_saek value = yes } - title:b_Goryeo_Gaeseong_Gaeseong = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Saek_7A61" - dynasty_house = house:house_hchar_yi - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = faith:daoxue - culture = scope:birth_location.title_province.culture - trait = education_learning_4 - trait = diligent - trait = temperate - trait = patient - trait = scholar - trait = theologian - diplomacy = { min_template_low_skill max_template_low_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_low_skill max_template_low_skill } - intrigue = { min_template_low_skill max_template_low_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_decent_skill max_template_decent_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = yi_saek - } - if = { limit = { has_variable = yi_saek } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - - if = { # Ji-nul (知訥) - limit = { - current_year >= 1183 - current_year <= 1189 - NOT = { exists = global_var:hchar_jinul } - } - set_global_variable = { name = hchar_jinul value = yes } - title:b_Goryeo_Gaeseong_Gaeseong = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Ji_nul" - dynasty = none - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = faith:dhyana - culture = scope:birth_location.title_province.culture - trait = education_learning_4 - trait = zealous - trait = calm - trait = diligent - trait = devoted - trait = lifestyle_mystic - trait = theologian - diplomacy = { min_template_low_skill max_template_low_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_low_skill max_template_low_skill } - intrigue = { min_template_low_skill max_template_low_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_decent_skill max_template_decent_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = jinul - create_inspiration = religious_inspiration - } - if = { limit = { has_variable = jinul } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - - if = { # Mpu Prapanca - limit = { - current_year >= 1365 - current_year <= 1371 - NOT = { exists = global_var:hchar_prapanca } - } - set_global_variable = { name = hchar_prapanca value = yes } - title:b_SUM_Palembang = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Prapanca" - dynasty = none - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_learning_4 - trait = zealous - trait = arrogant - trait = diligent - trait = devoted - trait = lifestyle_mystic - trait = lifestyle_poet - trait = scholar - diplomacy = { min_template_decent_skill max_template_decent_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_low_skill max_template_low_skill } - intrigue = { min_template_decent_skill max_template_decent_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = prapanca - give_nickname = nick_mpu - } - if = { limit = { has_variable = prapanca } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - - if = { # Mpu Tantular - limit = { - current_year >= 1320 - current_year <= 1326 - NOT = { exists = global_var:hchar_tantular } - } - set_global_variable = { name = hchar_tantular value = yes } - title:b_JAV_Kahuripan = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Tantular" - dynasty = none - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_learning_4 - trait = zealous - trait = patient - trait = diligent - trait = devoted - trait = lifestyle_mystic - trait = lifestyle_poet - trait = scholar - diplomacy = { min_template_decent_skill max_template_decent_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_low_skill max_template_low_skill } - intrigue = { min_template_decent_skill max_template_decent_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = tantular - give_nickname = nick_mpu - } - if = { limit = { has_variable = tantular } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - - if = { # Mpu Kanwa - limit = { - current_year >= 990 - current_year <= 996 - NOT = { exists = global_var:hchar_kanwa } - } - set_global_variable = { name = hchar_kanwa value = yes } - title:b_JAV_Kahuripan = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Kanwa" - dynasty = none - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_learning_4 - trait = zealous - trait = calm - trait = diligent - trait = devoted - trait = lifestyle_mystic - trait = lifestyle_poet - trait = scholar - diplomacy = { min_template_decent_skill max_template_decent_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_low_skill max_template_low_skill } - intrigue = { min_template_decent_skill max_template_decent_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = kanwa - give_nickname = nick_mpu - } - if = { limit = { has_variable = kanwa } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - - if = { # Mpu Sedah - limit = { - current_year >= 1120 - current_year <= 1126 - NOT = { exists = global_var:hchar_sedah } - } - set_global_variable = { name = hchar_sedah value = yes } - title:b_JAV_Kahuripan = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Sedah" - dynasty = none - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_learning_4 - trait = zealous - trait = compassionate - trait = diligent - trait = devoted - trait = lifestyle_mystic - trait = lifestyle_poet - trait = scholar - diplomacy = { min_template_decent_skill max_template_decent_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_low_skill max_template_low_skill } - intrigue = { min_template_decent_skill max_template_decent_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = sedah - give_nickname = nick_mpu - create_inspiration = book_inspiration - } - if = { limit = { has_variable = sedah } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - - if = { # Mpu Panuluh - limit = { - current_year >= 1140 - current_year <= 1146 - NOT = { exists = global_var:hchar_panuluh } - } - set_global_variable = { name = hchar_panuluh value = yes } - title:b_JAV_Kahuripan = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Panuluh" - dynasty = none - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_learning_4 - trait = zealous - trait = stubborn - trait = diligent - trait = devoted - trait = lifestyle_mystic - trait = lifestyle_poet - trait = scholar - diplomacy = { min_template_decent_skill max_template_decent_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_low_skill max_template_low_skill } - intrigue = { min_template_decent_skill max_template_decent_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = panuluh - give_nickname = nick_mpu - create_inspiration = book_inspiration - } - if = { limit = { has_variable = panuluh } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - - if = { # Mpu Dharmaja - limit = { - current_year >= 1010 - current_year <= 1016 - NOT = { exists = global_var:hchar_dharmaja } - } - set_global_variable = { name = hchar_dharmaja value = yes } - title:b_JAV_Kahuripan = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Dharmaja" - dynasty = none - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_learning_4 - trait = zealous - trait = forgiving - trait = humble - trait = devoted - trait = lifestyle_mystic - trait = lifestyle_poet - trait = scholar - trait = loyal - diplomacy = { min_template_decent_skill max_template_decent_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_low_skill max_template_low_skill } - intrigue = { min_template_decent_skill max_template_decent_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = dharmaja - give_nickname = nick_mpu - create_inspiration = book_inspiration - } - if = { limit = { has_variable = dharmaja } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - - if = { # Mpu Monaguna - limit = { - current_year >= 1220 - current_year <= 1226 - NOT = { exists = global_var:hchar_monaguna } - } - set_global_variable = { name = hchar_monaguna value = yes } - title:b_JAV_Kahuripan = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Monaguna" - dynasty = none - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_learning_4 - trait = humble - trait = calm - trait = diligent - trait = devoted - trait = lifestyle_mystic - trait = lifestyle_poet - trait = scholar - diplomacy = { min_template_decent_skill max_template_decent_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_low_skill max_template_low_skill } - intrigue = { min_template_decent_skill max_template_decent_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = monaguna - give_nickname = nick_mpu - } - if = { limit = { has_variable = monaguna } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - - if = { # Mpu Kuturan - limit = { - current_year >= 990 - current_year <= 996 - NOT = { exists = global_var:hchar_kuturan } - } - set_global_variable = { name = hchar_kuturan value = yes } - title:b_IDO_Bedulu = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Kuturan" - dynasty = none - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_learning_4 - trait = zealous - trait = patient - trait = diligent - trait = devoted - trait = lifestyle_mystic - trait = lifestyle_poet - trait = scholar - diplomacy = { min_template_decent_skill max_template_decent_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_low_skill max_template_low_skill } - intrigue = { min_template_decent_skill max_template_decent_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = kuturan - give_nickname = nick_mpu - } - if = { limit = { has_variable = kuturan } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - - if = { # Mpu Dwijendra - limit = { - current_year >= 1020 - current_year <= 1026 - NOT = { exists = global_var:hchar_dwijendra } - } - set_global_variable = { name = hchar_dwijendra value = yes } - title:b_IDO_Lombok = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Dwijendra" - dynasty = none - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_learning_4 - trait = zealous - trait = temperate - trait = patient - trait = devoted - trait = lifestyle_mystic - trait = lifestyle_poet - trait = scholar - diplomacy = { min_template_decent_skill max_template_decent_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_low_skill max_template_low_skill } - intrigue = { min_template_decent_skill max_template_decent_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = dwijendra - give_nickname = nick_mpu - } - if = { limit = { has_variable = dwijendra } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - - if = { # Kavindrarimathana - limit = { - current_year >= 940 - current_year <= 946 - NOT = { exists = global_var:hchar_kavindrarimathana } - } - set_global_variable = { name = hchar_kavindrarimathana value = yes } - title:b_angkor = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Kavindrarimathana" - dynasty = none - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_stewardship_5 - trait = diligent - trait = ambitious - trait = patient - trait = architect - diplomacy = { min_template_low_skill max_template_low_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_low_skill max_template_low_skill } - learning = { min_template_low_skill max_template_low_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = kavindrarimathana - } - if = { limit = { has_variable = kavindrarimathana } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - - if = { # Daun Penh - limit = { - current_year >= 1320 - current_year <= 1326 - NOT = { exists = global_var:hchar_daun_penh } - } - set_global_variable = { name = hchar_daun_penh value = yes } - title:b_angkor = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Daun" - dynasty_house = house:house_penh - gender_female_chance = 100 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_stewardship_3 - trait = zealous - trait = generous - trait = patient - trait = theologian - diplomacy = { min_template_low_skill max_template_low_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = daun_penh - add_gold = 1000 - } - if = { limit = { has_variable = daun_penh } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - - if = { # Yue Fei (岳飛) - limit = { - current_year >= 1123 - current_year <= 1129 - NOT = { exists = global_var:hchar_yue_fei } - } - set_global_variable = { name = hchar_yue_fei value = yes } - title:b_xindu = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Fei_98DB" - dynasty_house = house:house_hchar_yue - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_martial_5 - trait = zealous - trait = brave - trait = just - trait = strategist - trait = loyal - trait = lifestyle_poet - trait = lifestyle_blademaster - diplomacy = { min_template_decent_skill max_template_decent_skill } - martial = { min_template_high_skill max_template_high_skill } - stewardship = { min_template_decent_skill max_template_decent_skill } - intrigue = { min_template_decent_skill max_template_decent_skill } - learning = { min_template_decent_skill max_template_decent_skill } - prowess = { min_template_high_skill max_template_high_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = yue_fei - add_character_flag = need_military_outfit - } - if = { limit = { has_variable = yue_fei } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - - if = { # Wen Tianxiang - limit = { - current_year >= 1256 - current_year <= 1262 - NOT = { exists = global_var:hchar_wen_tianxiang } - } - set_global_variable = { name = hchar_wen_tianxiang value = yes } - title:b_luling = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Tianxiang" - dynasty_house = house:house_hchar_wen - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_martial_3 - trait = zealous - trait = just - trait = stubborn - trait = scholar - trait = lifestyle_poet - diplomacy = { min_template_low_skill max_template_low_skill } - martial = { min_template_high_skill max_template_high_skill } - stewardship = { min_template_low_skill max_template_low_skill } - intrigue = { min_template_low_skill max_template_low_skill } - learning = { min_template_decent_skill max_template_decent_skill } - prowess = { min_template_high_skill max_template_high_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = wen_tianxiang - add_character_flag = need_military_outfit - } - if = { limit = { has_variable = wen_tianxiang } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - - if = { # Fan Zhongyan - limit = { - current_year >= 1013 - current_year <= 1019 - NOT = { exists = global_var:hchar_fan_zhongyan } - } - set_global_variable = { name = hchar_fan_zhongyan value = yes } - title:b_wu = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Zhongyan_4EF2_6DF9" - dynasty_house = house:house_hchar_fan - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_learning_4 - trait = just - trait = diligent - trait = generous - trait = administrator - trait = scholar - diplomacy = { min_template_low_skill max_template_low_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_high_skill max_template_high_skill } - intrigue = { min_template_decent_skill max_template_decent_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = fan_zhongyan - } - if = { limit = { has_variable = fan_zhongyan } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - - if = { # Li Qingzhao - limit = { - current_year >= 1100 - current_year <= 1106 - NOT = { exists = global_var:hchar_li_qingzhao } - } - set_global_variable = { name = hchar_li_qingzhao value = yes } - title:b_zhangqiu = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Qingzhao_6E05_7167" - dynasty_house = house:house_hchar_li - gender_female_chance = 100 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_diplomacy_4 - trait = calm - trait = diligent - trait = humble - trait = lifestyle_poet - trait = journaller - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_low_skill max_template_low_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_low_skill max_template_low_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = li_qingzhao - } - if = { limit = { has_variable = li_qingzhao } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - - if = { # Qiu Chuji - limit = { - current_year >= 1199 - current_year <= 1205 - NOT = { exists = global_var:hchar_qiu_chuji } - } - set_global_variable = { name = hchar_qiu_chuji value = yes } - title:b_linji = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Chuji_8655_6A5F" - dynasty_house = house:house_hchar_qiu - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = faith:quanzhen - culture = scope:birth_location.title_province.culture - trait = education_learning_4 - trait = zealous - trait = temperate - trait = calm - trait = theologian - trait = lifestyle_mystic - diplomacy = { min_template_decent_skill max_template_decent_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_low_skill max_template_low_skill } - intrigue = { min_template_decent_skill max_template_decent_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = qiu_chuji - } - if = { limit = { has_variable = qiu_chuji } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - - if = { # Chu Van An - limit = { - current_year >= 1300 - current_year <= 1306 - NOT = { exists = global_var:hchar_chu_van_an } - } - set_global_variable = { name = hchar_chu_van_an value = yes } - title:b_thang_long = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "van_an" - dynasty_house = house:house_hchar_chu - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = faith:daoxue - culture = scope:birth_location.title_province.culture - trait = education_learning_5 - trait = honest - trait = temperate - trait = just - trait = theologian - trait = scholar - diplomacy = { min_template_decent_skill max_template_decent_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_low_skill max_template_low_skill } - intrigue = { min_template_decent_skill max_template_decent_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = chu_van_an - } - if = { limit = { has_variable = chu_van_an } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - - if = { # Nguyen Thuyen - limit = { - current_year >= 1270 - current_year <= 1276 - NOT = { exists = global_var:hchar_nguyen_thuyen } - } - set_global_variable = { name = hchar_nguyen_thuyen value = yes } - title:b_thang_long = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "thuyen" - dynasty_house = house:house_hchar_nguyen - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_learning_3 - trait = patient - trait = honest - trait = calm - trait = lifestyle_poet - diplomacy = { min_template_decent_skill max_template_decent_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_low_skill max_template_low_skill } - intrigue = { min_template_decent_skill max_template_decent_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_low_skill max_template_low_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = nguyen_thuyen - } - if = { limit = { has_variable = nguyen_thuyen } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - - if = { # Pham Ngu Lao - limit = { - current_year >= 1281 - current_year <= 1287 - NOT = { exists = global_var:hchar_pham_ngu_lao } - } - set_global_variable = { name = hchar_pham_ngu_lao value = yes } - title:b_thang_long = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "ngu_lao" - dynasty_house = house:house_hchar_pham - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_martial_4 - trait = brave - trait = diligent - trait = calm - trait = strategist - trait = lifestyle_poet - diplomacy = { min_template_decent_skill max_template_decent_skill } - martial = { min_template_high_skill max_template_high_skill } - stewardship = { min_template_low_skill max_template_low_skill } - intrigue = { min_template_decent_skill max_template_decent_skill } - learning = { min_template_low_skill max_template_low_skill } - prowess = { min_template_high_skill max_template_high_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = pham_ngu_lao - } - if = { limit = { has_variable = pham_ngu_lao } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - - if = { # Sakata Kintoki (坂田公時) - limit = { - current_year >= 1000 - current_year <= 1006 - NOT = { exists = global_var:hchar_sakata_kintoki } - } - set_global_variable = { name = hchar_sakata_kintoki value = yes } - title:b_kamakura = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Kin_toki" - dynasty_house = house:house_hchar_sakata - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_martial_3 - trait = brave - trait = lustful - trait = trusting - trait = strong - trait = loyal - trait = giant - trait = athletic - trait = physique_good_3 - diplomacy = { min_template_low_skill max_template_low_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_low_skill max_template_low_skill } - intrigue = { min_template_low_skill max_template_low_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_decent_skill max_template_decent_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = sakata_kintoki - give_nickname = nick_kintaro - } - if = { limit = { has_variable = sakata_kintoki } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - - if = { # Takezaki Suenaga (竹崎季長) - limit = { - current_year >= 1266 - current_year <= 1272 - NOT = { exists = global_var:hchar_takezaki_suenaga } - } - set_global_variable = { name = hchar_takezaki_suenaga value = yes } - title:b_mashiki = { - save_scope_as = birth_location - create_character = { - age = 20 - name = "Suenaga" - dynasty_house = house:house_hchar_takezaki - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = scope:birth_location.title_province.faith - culture = scope:birth_location.title_province.culture - trait = education_martial_4 - trait = ambitious - trait = brave - trait = arrogant - trait = gallant - trait = lifestyle_blademaster - trait = loyal - diplomacy = { min_template_low_skill max_template_low_skill } - martial = { min_template_high_skill max_template_high_skill } - stewardship = { min_template_low_skill max_template_low_skill } - intrigue = { min_template_low_skill max_template_low_skill } - learning = { min_template_low_skill max_template_low_skill } - prowess = { min_template_high_skill max_template_high_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = takezaki_suenaga - } - if = { limit = { has_variable = takezaki_suenaga } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - - if = { # Eisai (栄西) - limit = { - current_year >= 1185 - current_year <= 1195 - NOT = { exists = global_var:hchar_eisai } - } - set_global_variable = { name = hchar_eisai value = yes } - title:b_hakata = { - save_scope_as = birth_location - create_character = { - age = 50 - name = "Eisai" - dynasty = none - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = faith:dhyana - culture = scope:birth_location.title_province.culture - trait = education_learning_5 - trait = zealous - trait = calm - trait = diligent - trait = devoted - trait = theologian - diplomacy = { min_template_low_skill max_template_low_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_low_skill max_template_low_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_decent_skill max_template_decent_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = eisai - add_character_flag = ai_will_not_convert - } - if = { limit = { has_variable = eisai } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - - if = { # Ippen Shōnin (一遍上人) - limit = { - current_year >= 1271 - current_year <= 1281 - NOT = { exists = global_var:hchar_ippen } - } - set_global_variable = { name = hchar_ippen value = yes } - title:b_saku = { - save_scope_as = birth_location - create_character = { - age = 38 - name = "Ippen" - dynasty = none - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = faith:sukhavati - culture = scope:birth_location.title_province.culture - trait = education_learning_4 - trait = zealous - trait = compassionate - trait = diligent - trait = devoted - trait = lifestyle_mystic - trait = lifestyle_traveler - diplomacy = { min_template_low_skill max_template_low_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_low_skill max_template_low_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_decent_skill max_template_decent_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = ippen - add_character_flag = ai_will_not_convert - } - if = { limit = { has_variable = ippen } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - - if = { # Myōe (明恵) - limit = { - current_year >= 1200 - current_year <= 1210 - NOT = { exists = global_var:hchar_myoe } - } - set_global_variable = { name = hchar_myoe value = yes } - title:b_nagusa = { - save_scope_as = birth_location - create_character = { - age = 30 - name = "MyO_e" - dynasty = none - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = faith:avatamsaka # Kegon, also Shingon (Mantrayana) - culture = scope:birth_location.title_province.culture - trait = education_learning_5 - trait = zealous - trait = just - trait = stubborn - trait = devoted - trait = lifestyle_poet - trait = theologian - diplomacy = { min_template_low_skill max_template_low_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_low_skill max_template_low_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_decent_skill max_template_decent_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = myoe - add_character_flag = ai_will_not_convert - } - if = { limit = { has_variable = myoe } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - - if = { # Hōnen (法然) - limit = { - current_year >= 1178 - current_year <= 1188 - NOT = { exists = global_var:hchar_honen } - } - set_global_variable = { name = hchar_honen value = yes } - title:b_kyo = { - save_scope_as = birth_location - create_character = { - age = 55 - name = "HO_nen" - dynasty = none - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = faith:sukhavati - culture = scope:birth_location.title_province.culture - trait = education_learning_5 - trait = zealous - trait = just - trait = compassionate - trait = devoted - trait = theologian - diplomacy = { min_template_low_skill max_template_low_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_low_skill max_template_low_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_decent_skill max_template_decent_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = honen - add_character_flag = ai_will_not_convert - } - if = { limit = { has_variable = honen } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - - if = { # Shinran (親鸞) - limit = { - current_year >= 1218 - current_year <= 1228 - NOT = { exists = global_var:hchar_shinran } - } - set_global_variable = { name = hchar_shinran value = yes } - title:b_toshima = { - save_scope_as = birth_location - create_character = { - age = 50 - name = "Shinran" - dynasty = none - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = faith:sukhavati - culture = scope:birth_location.title_province.culture - trait = education_learning_5 - trait = zealous - trait = just - trait = compassionate - trait = devoted - trait = theologian - diplomacy = { min_template_low_skill max_template_low_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_low_skill max_template_low_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_decent_skill max_template_decent_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = shinran - add_character_flag = ai_will_not_convert - } - if = { limit = { has_variable = shinran } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - - if = { # Mibu Tadamine (壬生忠岑) - limit = { - current_year >= 885 - current_year <= 895 - NOT = { exists = global_var:hchar_mibu_tadamine } - } - set_global_variable = { name = hchar_mibu_tadamine value = yes } - title:b_kyo = { - save_scope_as = birth_location - create_character = { - age = 30 - name = "Tadamine" - dynasty_house = house:house_hchar_mibu - gender_female_chance = 0 - random_traits = no - location = scope:birth_location.title_province - faith = faith:pundarika - culture = scope:birth_location.title_province.culture - trait = education_diplomacy_4 - trait = gregarious - trait = cynical - trait = diligent - trait = lifestyle_poet - diplomacy = { min_template_high_skill max_template_high_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_low_skill max_template_low_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_high_skill max_template_high_skill } - prowess = { min_template_decent_skill max_template_decent_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - historical_character_finalization_effect = yes - set_variable = mibu_tadamine - } - if = { limit = { has_variable = mibu_tadamine } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } - - if = { # Murasaki Shikibu (紫式部) - limit = { - current_year >= 990 - current_year <= 1000 - NOT = { exists = global_var:hchar_murasaki } - } - set_global_variable = { name = hchar_murasaki value = yes } - title:b_kyo = { - save_scope_as = birth_location - create_character = { - age = 25 - name = "Kaoruko" - dynasty = none - gender_female_chance = 100 - random_traits = no - location = scope:birth_location.title_province - faith = faith:pundarika - culture = scope:birth_location.title_province.culture - trait = education_diplomacy_4 - trait = journaller - trait = lifestyle_poet - trait = gregarious - trait = honest - trait = compassionate - trait = beauty_good_1 - diplomacy = { min_template_decent_skill max_template_decent_skill } - martial = { min_template_low_skill max_template_low_skill } - stewardship = { min_template_low_skill max_template_low_skill } - intrigue = { min_template_high_skill max_template_high_skill } - learning = { min_template_low_skill max_template_low_skill } - prowess = { min_template_decent_skill max_template_decent_skill } - save_scope_as = historical_character - } - scope:historical_character ?= { - give_nickname = "nick_murasaki_shikibu" - historical_character_finalization_effect = yes - set_variable = murasaki - } - if = { limit = { has_variable = murasaki } } # Error suppression - spawn_historical_characters_boilerplate_effect = yes - } - } -} - -historical_character_finalization_effect = { - add_trait = historical_character - house ?= { - generate_coa = yes - } - dynasty ?= { - set_coa = scope:historical_character.house - } - set_variable = { - name = show_historical_gui - value = 1 - } -} - -spawn_historical_characters_boilerplate_effect = { - county = { save_scope_as = county_scope } - county.holder = { - if = { - limit = { - is_ai = no - } - trigger_event = historical_char_creation_events.1 - } - else_if = { - limit = { - OR = { - exists = scope:major - has_game_rule = all_historical_characters - } - any_liege_or_above = { - is_ai = no - } - } - random_liege_or_above = { - limit = { - is_ai = no - } - trigger_event = historical_char_creation_events.1 - } - } - else_if = { - limit = { - exists = scope:county_scope.duchy.holder - } - scope:county_scope.duchy.holder = { - trigger_event = historical_char_creation_events.1 - } - } - else = { - top_liege = { - trigger_event = historical_char_creation_events.1 - } - } - } -} diff --git a/N3OW/common/scripted_effects/00_history_effects.txt b/N3OW/common/scripted_effects/00_history_effects.txt deleted file mode 100644 index 62ad0377..00000000 --- a/N3OW/common/scripted_effects/00_history_effects.txt +++ /dev/null @@ -1,32 +0,0 @@ -eliminate_&_replace_faith_effect = { - if = { - limit = { - exists = $TARGET_FAITH$.religious_head_title - exists = $TARGET_FAITH$.religious_head_title.holder - NOT = { $TARGET_FAITH$.religious_head_title = $REPLACEMENT_FAITH$.religious_head_title } - } - - $TARGET_FAITH$.religious_head_title.holder = { - destroy_title = $TARGET_FAITH$.religious_head_title - } - } - every_county = { - limit = { faith = $TARGET_FAITH$ } - set_variable = { - name = forbid_crypto_reconversion - value = yes - days = 30 - } - set_county_faith = $REPLACEMENT_FAITH$ - } - $TARGET_FAITH$ = { - every_faith_character = { - set_variable = { - name = forbid_crypto_reconversion - value = yes - days = 30 - } - set_character_faith = $REPLACEMENT_FAITH$ - } - } -} diff --git a/N3OW/common/scripted_effects/00_holy_order_effects.txt b/N3OW/common/scripted_effects/00_holy_order_effects.txt deleted file mode 100644 index 8f60536c..00000000 --- a/N3OW/common/scripted_effects/00_holy_order_effects.txt +++ /dev/null @@ -1,187 +0,0 @@ - - -send_child_to_holy_order_tooltip_effect = { - scope:recipient = { - add_trait = order_member - add_piety_level = 1 - custom_tooltip = character_will_leave_court_holy_order - if = { - limit = { - is_married = yes - } - every_spouse = { - divorce = scope:recipient - } - } - if = { - limit = { - exists = betrothed - } - break_betrothal = betrothed - if = { - limit = { - has_been_promised_grand_wedding = yes - } - break_grand_wedding_betrothal_effect = yes - } - } - if = { - limit = { - is_concubine = yes - } - this.concubinist = { - remove_concubine = scope:recipient - } - } - if = { - limit = { - number_of_concubines > 0 - } - every_concubine = { - scope:recipient = { - remove_concubine = prev - } - } - } - } -} - -send_child_to_holy_order_effect = { - scope:$GRANDMASTER$ = { - add_courtier = scope:recipient - if = { - limit = { - scope:recipient = { - is_close_family_of = scope:actor - } - } - add_opinion = { - target = scope:actor - modifier = pleased_opinion - opinion = 20 - } - } - } - scope:recipient = { - add_trait = order_member - add_piety_level = 1 - if = { - limit = { is_ruler = yes } - depose = yes - } - if = { - limit = { - faith != scope:$GRANDMASTER$.faith - } - set_character_faith = scope:$GRANDMASTER$.faith - } - if = { - limit = { - is_married = yes - } - every_spouse = { - divorce = scope:recipient - } - } - if = { - limit = { - exists = betrothed - } - break_betrothal = betrothed - if = { - limit = { - has_been_promised_grand_wedding = yes - } - break_grand_wedding_betrothal_effect = yes - } - } - if = { - limit = { - is_concubine = yes - } - this.concubinist = { - remove_concubine = scope:recipient - } - } - if = { - limit = { - number_of_concubines > 0 - } - every_concubine = { - scope:recipient = { - remove_concubine = prev - } - } - } - } -} - -send_child_to_clergy_effect = { - scope:recipient = { - add_opinion = { - modifier = demanded_taking_vows - target = scope:actor - } - simplified_clergy_effect = { RECIPIENT = scope:recipient } - } -} - -simplified_clergy_effect = { - $RECIPIENT$ = { - add_trait = devoted - add_piety_level = 1 - if = { - limit = { is_ruler = yes } - depose = yes - } - if = { - limit = { - is_married = yes - } - every_spouse = { - divorce = $RECIPIENT$ - } - } - if = { - limit = { - exists = betrothed - } - break_betrothal = betrothed - if = { - limit = { - has_been_promised_grand_wedding = yes - } - break_grand_wedding_betrothal_effect = yes - } - } - if = { - limit = { - is_concubine = yes - } - this.concubinist = { - remove_concubine = $RECIPIENT$ - } - } - if = { - limit = { - number_of_concubines > 0 - } - every_concubine = { - $RECIPIENT$ = { - remove_concubine = prev - } - } - } - } -} - -release_as_executioner_effect = { - scope:actor = { - court_position_grant_effect = { - EMPLOYER = scope:actor - POS = executioner - CANDIDATE = scope:recipient - } - save_scope_as = liege - } -} diff --git a/N3OW/common/scripted_effects/00_hook_effects.txt b/N3OW/common/scripted_effects/00_hook_effects.txt deleted file mode 100644 index c8b5a89d..00000000 --- a/N3OW/common/scripted_effects/00_hook_effects.txt +++ /dev/null @@ -1,96 +0,0 @@ -######################################################################### -# EFFECT LIST # -######################################################################### -# !!! Remember to add all new effects with a short description here !!! # -######################################################################### - - -######################################################################### -# EFFECTS # -######################################################################### - -add_hook_if_possible_effect = { - if = { - limit = { - can_add_hook = { - target = $TARGET$ - type = $TYPE$ - } - } - add_hook = { - target = $TARGET$ - type = $TYPE$ - years = $YEARS$ - } - } -} - -add_hook_if_possible_default_length_effect = { - if = { - limit = { - can_add_hook = { - target = $TARGET$ - type = $TYPE$ - } - } - add_hook = { - target = $TARGET$ - type = $TYPE$ - } - } -} - -add_favour_hook_if_possible_simple_effect = { - if = { - limit = { - can_add_hook = { - target = $TARGET$ - type = favor_hook - } - } - add_hook = { - target = $TARGET$ - type = favor_hook - } - } -} - -add_mutual_gendered_blood_sibling_hook_effect = { - # First we do current scope. - if = { - limit = { - $TARGET$ = { is_female = yes } - } - add_hook = { - target = $TARGET$ - type = blood_sister_hook - } - } - else = { - add_hook = { - target = $TARGET$ - type = blood_brother_hook - } - } - # Then set target's. - save_scope_as = blood_sibling_self - $TARGET$ = { - if = { - limit = { - scope:blood_sibling_self = { is_female = yes } - } - add_hook = { - target = scope:blood_sibling_self - type = blood_sister_hook - } - } - else = { - add_hook = { - target = scope:blood_sibling_self - type = blood_brother_hook - } - } - } - # Clean up after ourselves. - clear_saved_scope = blood_sibling_self -} diff --git a/N3OW/common/scripted_effects/00_hunt_effects.txt b/N3OW/common/scripted_effects/00_hunt_effects.txt deleted file mode 100644 index 40903d8c..00000000 --- a/N3OW/common/scripted_effects/00_hunt_effects.txt +++ /dev/null @@ -1,4433 +0,0 @@ -#Effects used in hunt events - - -##################################################################### -# EFFECT LIST -##################################################################### -# !!! Remember to add all new effects with a short description here !!! -# - -#hunt_end_pulse_effect -#select_local_animal_effect - -###################################################################### -# EFFECTS -###################################################################### - - -#Used to find a local animal to hunt -#Note: Don't add more here without also revisiting artifact creation for Skulls and hides. -#Note: May save any of below scopes before running the effect to limit possible animals: -## big_local_game -## small_local_game -## dangerous_local_game -## harmless_local_game -## prowling_local_game -select_local_animal_effect = { - save_scope_as = $TYPE$_local_game - location = { save_scope_as = animal_location } - hidden_effect = { - if = { - limit = { - NOT = { exists = var:animal_type } - } - random_list = { - 60 = { # Deer, Antelope, Gazelle, etc. - trigger = { - scope:animal_location = { hunt_animal_deer_antelope_trigger = yes } - NOT = { exists = scope:dangerous_local_game } - NOT = { exists = scope:prowling_local_game } - } - hunt_activity_deer_game_effect = { PROVINCE = scope:animal_location } - } - 20 = { # Boar - trigger = { - scope:animal_location = { hunt_animal_boar_trigger = yes } - NOT = { exists = scope:small_local_game } - NOT = { exists = scope:harmless_local_game } - NOT = { exists = scope:prowling_local_game } - } - # they're everywhere, but Muslims and Jews wouldn't hunt them - modifier = { - factor = 0 - faith = { - OR = { - religion_tag = islam_religion - religion_tag = judaism_religion - } - } - } - set_variable = { name = animal_type value = flag:boar years = 3 } - } - 10 = { # Fox - trigger = { - scope:animal_location = { hunt_animal_fox_trigger = yes } - NOT = { exists = scope:big_local_game } - NOT = { exists = scope:dangerous_local_game } - NOT = { exists = scope:prowling_local_game } - } - # they're everywhere - set_variable = { name = animal_type value = flag:fox years = 3 } - } - 1 = { # Aurochs - trigger = { - scope:animal_location = { hunt_animal_aurochs_trigger = yes } - NOT = { religion = religion:hinduism_religion } - NOT = { exists = scope:small_local_game } - NOT = { exists = scope:dangerous_local_game } - NOT = { exists = scope:prowling_local_game } - } - set_variable = { name = animal_type value = flag:aurochs } - } - 10 = { # Bison - trigger = { - scope:animal_location = { hunt_animal_bison_trigger = yes } - NOT = { exists = scope:small_local_game } - NOT = { exists = scope:dangerous_local_game } - NOT = { exists = scope:prowling_local_game } - } - set_variable = { name = animal_type value = flag:bison } - } - 10 = { # Wolf, Hyena, Lynx - trigger = { - NOT = { exists = scope:harmless_local_game } - scope:animal_location = { - OR = { - hunt_animal_wolf_trigger = yes - hunt_animal_hyena_trigger = yes - hunt_animal_lynx_trigger = yes - } - } - } - random_list = { - 10 = { # Wolf - trigger = { - scope:animal_location = { hunt_animal_wolf_trigger = yes } - } - set_variable = { name = animal_type value = flag:wolf years = 3 } - } - 20 = { # Hyena - trigger = { - scope:animal_location = { hunt_animal_hyena_trigger = yes } - } - set_variable = { name = animal_type value = flag:hyena years = 3 } - } - 5 = { # Lynx - trigger = { - scope:animal_location = { hunt_animal_lynx_trigger = yes } - } - set_variable = { name = animal_type value = flag:lynx years = 3 } - } - } - } - 1 = { # Hare - trigger = { - NOT = { exists = scope:dangerous_local_game } - NOT = { exists = scope:prowling_local_game } - } - modifier = { - exists = scope:big_local_game - add = -5 - } - modifier = { - add = 10 #A really poor hunter or a child has a higher chance of focusing on hunting a hare - OR = { - is_adult = no - adventure_inspiration_average_skill_value < 2 - } - } - set_variable = { name = animal_type value = flag:hare years = 3 } - } - 5 = { # Bear - trigger = { - NOT = { exists = scope:small_local_game } - NOT = { exists = scope:harmless_local_game } - NOT = { exists = scope:prowling_local_game } - scope:animal_location = { hunt_animal_bear_trigger = yes } - } - set_variable = { name = animal_type value = flag:bear years = 3 } - } - 5 = { # Big Cat - trigger = { - NOT = { exists = scope:small_local_game } - NOT = { exists = scope:harmless_local_game } - scope:animal_location = { - hunt_animal_big_cat_trigger = yes - OR = { - hunt_animal_lion_trigger = yes - hunt_animal_tiger_trigger = yes - hunt_animal_leopard_trigger = yes - } - } - } - random_list = { - 5 = { # Lion - trigger = { - scope:animal_location = { hunt_animal_lion_trigger = yes } - } - modifier = { - factor = 5 - scope:animal_location = { - OR = { - terrain = desert - terrain = forest - } - } - } - set_variable = { name = animal_type value = flag:lion years = 3 } - } - 5 = { # Tiger - trigger = { - scope:animal_location = { hunt_animal_tiger_trigger = yes } - } - modifier = { - factor = 5 - scope:animal_location = { terrain = jungle } - } - set_variable = { name = animal_type value = flag:tiger years = 3 } - } - 5 = { # Leopard - trigger = { - scope:animal_location = { hunt_animal_leopard_trigger = yes } - } - modifier = { - factor = 0.5 - scope:animal_location = { - OR = { - terrain = desert - terrain = mountains - } - } - } - set_variable = { name = animal_type value = flag:leopard years = 3 } - } - } - } - 1 = { # Unicorn - # they're nowhere - trigger = { - NOT = { exists = scope:small_local_game } - NOT = { exists = scope:dangerous_local_game } - NOT = { exists = scope:prowling_local_game } - } - modifier = { - factor = 0 - NOT = { has_trait = lunatic } - } - set_variable = { - name = animal_type - value = flag:unicorn - years = 3 - } - } - 1 = { # Dragon - trigger = { - NOT = { exists = scope:small_local_game } - NOT = { exists = scope:harmless_local_game } - NOT = { exists = scope:prowling_local_game } - } - # they're nowhere - modifier = { - factor = 0 - NOT = { has_trait = lunatic } - } - set_variable = { - name = animal_type - value = flag:dragon - years = 3 - } - } - } - } - } - # Fallback - if = { - limit = { NOT = { exists = var:animal_type } } - set_variable = { name = animal_type value = flag:stag years = 3 } - } -} - -#Effect to start the story and show the right tooltip -start_hunt_mystical_animal_story_cycle_effect = { - #Only for players, fake it for ai - if = { - limit = { is_ai = no } - hidden_effect = { create_story = story_cycle_hunt_mystical_animal } - random_owned_story = { - type = story_cycle_hunt_mystical_animal - set_variable = { - name = legendary_county - value = scope:activity.activity_location.county - } - save_scope_as = story - } - custom_tooltip = hunt.4013.a.tt - } - else = { - hidden_effect = { - random_list = { - 5 = { #The ai got the animal, wow! - add_prestige = major_prestige_gain - add_character_modifier = { - modifier = hunt_mystical_animal_modifier - years = 20 - } - } - 95 = { - #Nothing happens for them - } - } - } - } -} - -#Effect to end the story and apply everything - You got the animal! -end_hunt_mystical_animal_story_cycle_effect = { - if = { - limit = { - has_dlc_feature = legends - NOT = { has_game_rule = historical_legends_only } - } - create_legend_seed = { - type = heroic - quality = famed - chronicle = beast_slayer - properties = { - beast = scope:activity.var:animal_type - location = root.location - } - } - } - add_prestige = major_prestige_gain - give_nickname = nick_the_venator - add_trait_xp = { - trait = lifestyle_hunter - track = hunter - value = 20 - } - add_character_modifier = { - modifier = hunt_mystical_animal_modifier - years = 20 - } - set_variable = { - name = hunted_mystical_animal - value = scope:activity.var:animal_type - } - hidden_effect = { - if = { - limit = { - can_animal_produce_skull_trigger = { VARIABLE = scope:activity.var:animal_type } - } - random = { - chance = 50 - create_artifact_wall_skull_effect = { - OWNER = root - HUNTER = root - LEGENDARY = yes - ANIMAL = scope:activity.var:animal_type - } - } - } - } - create_artifact_animal_hide_effect = { - OWNER = root - HUNTER = root - LEGENDARY = yes - ANIMAL = scope:activity.var:animal_type - } - add_stress = medium_stress_loss - scope:story = { - hidden_effect = { end_story = yes } - } - # Achievement tracking. - ## Ahab. - if = { - limit = { - is_ai = no - exists = global_var:started_ahab_achievement - } - set_global_variable = { - name = achieved_ahab_achievement - value = yes - } - } -} - -hunt_activity_standard_game_effect = { - random_list = { - 10 = { # Boar - trigger = { - $PROVINCE$ = { hunt_animal_boar_trigger = yes } - NOT = { exists = scope:small_local_game } - } - # Master of Hunt aptitude affects chance of managed game - activity_court_position_aptitude_positive_modifier = { LIEGE = root POS = master_of_hunt } - # Increase larger deer chance with management buildings - hunt_activity_game_building_modifier = { PROVINCE = $PROVINCE$ } - set_variable = { name = animal_type value = flag:boar years = 3 } - } - 30 = { # Deer/Antelope - trigger = { - $PROVINCE$ = { hunt_animal_deer_antelope_trigger = yes } - } - # Master of Hunt aptitude affects chance of managed game - activity_court_position_aptitude_positive_modifier = { LIEGE = root POS = master_of_hunt } - # Increase larger deer chance with management buildings - hunt_activity_game_building_modifier = { PROVINCE = $PROVINCE$ } - hunt_activity_deer_game_effect = { PROVINCE = $PROVINCE$ } - } - 1 = { # Aurochs - trigger = { - $PROVINCE$ = { hunt_animal_aurochs_trigger = yes } - NOT = { $HUNTER$.religion = religion:hinduism_religion } - NOT = { exists = scope:small_local_game } - } - set_variable = { name = animal_type value = flag:aurochs } - } - 10 = { # Bison - trigger = { - $PROVINCE$ = { hunt_animal_bison_trigger = yes } - NOT = { exists = scope:small_local_game } - } - set_variable = { name = animal_type value = flag:bison } - } - 5 = { # Fox - trigger = { - $PROVINCE$ = { hunt_animal_fox_trigger = yes } - NOT = { exists = scope:big_local_game } - } - set_variable = { name = animal_type value = flag:fox } - } - 5 = { # Hare - modifier = { - exists = scope:big_local_game - add = -5 - } - set_variable = { name = animal_type value = flag:hare } - } - } - # Fallback - if = { - limit = { NOT = { exists = var:animal_type } } - set_variable = { name = animal_type value = flag:stag years = 3 } - } -} - -hunt_activity_deer_game_effect = { - random_list = { - 5 = { # Deer - Europe, Middle East, India, Steppe - trigger = { - $PROVINCE$ = { hunt_animal_deer_trigger = yes } - } - random_list = { - 4 = { # Roe - Small deer - trigger = { - $PROVINCE$ = { hunt_animal_roe_trigger = yes } - } - modifier = { - add = -4 - exists = scope:big_local_game - } - set_variable = { name = animal_type value = flag:roe } # Roe - } - 4 = { # Stag - Standard deer - # Increase larger deer chance with management buildings - hunt_activity_game_building_modifier = { PROVINCE = $PROVINCE$ } - # Master of Hunt aptitude affects chance of managed game - activity_court_position_aptitude_positive_modifier = { LIEGE = root POS = master_of_hunt } - if = { - limit = { - $PROVINCE$ = { - geographical_region = hunt_animal_reindeer_region - OR = { - terrain = taiga - terrain = forest - } - } - } - set_variable = { name = animal_type value = flag:reindeer } - } - else = { - set_variable = { name = animal_type value = flag:stag } - } - } - 2 = { # Hart - Prestigious deer - trigger = { - NOT = { exists = scope:small_local_game } - } - # Offset lack of Roe chance - modifier = { - factor = 0.5 - $PROVINCE$ = { hunt_animal_roe_trigger = yes } - } - # Increase larger deer chance with management buildings - hunt_activity_game_building_modifier = { PROVINCE = $PROVINCE$ } - # Master of Hunt aptitude affects chance of managed game - activity_court_position_aptitude_positive_modifier = { LIEGE = root POS = master_of_hunt } - if = { - limit = { - $PROVINCE$ = { - geographical_region = hunt_animal_elk_region - OR = { - terrain = taiga - terrain = forest - } - } - } - set_variable = { name = animal_type value = flag:elk } - } - else = { - set_variable = { name = animal_type value = flag:hart } - } - } - } - } - 5 = { # Antelope - Africa, Middle East, India, Steppe - trigger = { - $PROVINCE$ = { hunt_animal_antelope_trigger = yes } - } - random_list = { - 4 = { # Gazelle - Small antelope - trigger = { - $PROVINCE$ = { hunt_animal_gazelle_trigger = yes } - } - modifier = { - add = -4 - exists = scope:big_local_game - } - set_variable = { name = animal_type value = flag:gazelle } - } - 4 = { # Antelope - Standard antelope - # Increase larger deer chance with management buildings - hunt_activity_game_building_modifier = { PROVINCE = $PROVINCE$ } - # Master of Hunt aptitude affects chance of managed game - activity_court_position_aptitude_positive_modifier = { LIEGE = root POS = master_of_hunt } - if = { - limit = { - $PROVINCE$ = { hunt_animal_steppe_trigger = yes } - } - set_variable = { name = animal_type value = flag:saiga } - } - else = { - set_variable = { name = animal_type value = flag:antelope } - } - } - } - } - } - # Fallback - if = { - limit = { NOT = { exists = var:animal_type } } - set_variable = { name = animal_type value = flag:stag years = 3 } - } -} - -hunt_activity_dangerous_game_effect = { - random_list = { - 15 = { # Wolf/Hyena/Lynx - Common - modifier = { - exists = scope:big_local_game - factor = 0 - } - random_list = { - 10 = { # Wolf - trigger = { - $PROVINCE$ = { hunt_animal_wolf_trigger = yes } - } - set_variable = { name = animal_type value = flag:wolf years = 3 } - } - 20 = { # Hyena - trigger = { - $PROVINCE$ = { hunt_animal_hyena_trigger = yes } - } - set_variable = { name = animal_type value = flag:hyena years = 3 } - } - 5 = { # Lynx - trigger = { - $PROVINCE$ = { hunt_animal_lynx_trigger = yes } - } - set_variable = { name = animal_type value = flag:lynx years = 3 } - } - } - } - 5 = { # Lion/Tiger/Leopard - Occasional (outside Europe) - trigger = { - $PROVINCE$ = { - hunt_animal_big_cat_trigger = yes - OR = { - hunt_animal_lion_trigger = yes - hunt_animal_tiger_trigger = yes - hunt_animal_leopard_trigger = yes - } - } - } - modifier = { - exists = scope:small_local_game - factor = 0 - } - random_list = { - 5 = { # Lion - trigger = { - $PROVINCE$ = { hunt_animal_lion_trigger = yes } - } - modifier = { - factor = 5 - $PROVINCE$ = { - OR = { - terrain = desert - terrain = forest - } - } - } - set_variable = { name = animal_type value = flag:lion years = 3 } - } - 5 = { # Tiger - trigger = { - $PROVINCE$ = { hunt_animal_tiger_trigger = yes } - } - modifier = { - factor = 5 - $PROVINCE$ = { terrain = jungle } - } - set_variable = { name = animal_type value = flag:tiger years = 3 } - } - 5 = { # Leopard - trigger = { - $PROVINCE$ = { hunt_animal_leopard_trigger = yes } - } - modifier = { - factor = 0.5 - $PROVINCE$ = { - OR = { - terrain = desert - terrain = mountains - } - } - } - set_variable = { name = animal_type value = flag:leopard years = 3 } - } - } - } - 5 = { # Bear - Occasional (outside Europe) - trigger = { - $PROVINCE$ = { hunt_animal_bear_trigger = yes } - } - modifier = { - exists = scope:small_local_game - factor = 0 - } - set_variable = { name = animal_type value = flag:bear years = 3 } - } - 10 = { # Boar - trigger = { - $PROVINCE$ = { hunt_animal_boar_trigger = yes } - } - modifier = { - exists = scope:small_local_game - factor = 0 - } - set_variable = { name = animal_type value = flag:boar years = 3 } - } - } - # Fallback - if = { - limit = { NOT = { exists = var:animal_type } } - set_variable = { name = animal_type value = flag:wolf years = 3 } - } -} - -hunt_activity_falconry_game_effect = { - random_list = { - 15 = { ### WATERFOWL ### - trigger = { - $PROVINCE$ = { - NOR = { - terrain = desert - terrain = desert_mountains - terrain = jungle - terrain = drylands - } - } - } - hunt_falconry_select_waterfowl_effect = { VAR = animal_type PROVINCE = $PROVINCE$ } - } - 10 = { ### GROUND ### - hunt_falconry_select_gamebird_effect = { VAR = animal_type PROVINCE = $PROVINCE$ } - } - 5 = { ### EXOTIC ### - random_list = { - 5 = { # Egret - trigger = { - $PROVINCE$ = { - OR = { - geographical_region = world_africa_north - geographical_region = world_africa_east - geographical_region = world_africa_west - geographical_region = world_middle_east_persia - geographical_region = world_europe_south_east - geographical_region = world_asia_minor - geographical_region = world_steppe - } - } - } - modifier = { - factor = 2 - $PROVINCE$ = { - OR = { - terrain = wetlands - terrain = floodplains - terrain = oasis - is_riverside_province = yes - } - } - } - set_variable = { name = animal_type value = flag:egret years = 3 } - } - 5 = { # Crane - trigger = { - $PROVINCE$ = { - OR = { - geographical_region = world_africa_north - geographical_region = world_africa_east - geographical_region = world_europe_north - geographical_region = world_europe_east - geographical_region = world_asia_minor - geographical_region = world_steppe - } - } - } - modifier = { - factor = 2 - $PROVINCE$ = { - OR = { - terrain = wetlands - terrain = floodplains - terrain = oasis - is_riverside_province = yes - } - } - } - set_variable = { name = animal_type value = flag:crane years = 3 } - } - 5 = { # Stork - modifier = { - factor = 2 - $PROVINCE$ = { - OR = { - terrain = wetlands - terrain = floodplains - terrain = oasis - is_riverside_province = yes - } - } - } - set_variable = { name = animal_type value = flag:stork years = 3 } - } - 5 = { # Heron - modifier = { - factor = 2 - $PROVINCE$ = { - OR = { - terrain = wetlands - terrain = floodplains - terrain = oasis - is_riverside_province = yes - } - } - } - set_variable = { name = animal_type value = flag:heron years = 3 } - } - 5 = { # Pelican - trigger = { - $PROVINCE$ = { - OR = { - geographical_region = world_africa_east - geographical_region = world_africa_west - geographical_region = world_india - geographical_region = world_middle_east_persia - geographical_region = world_asia_minor - geographical_region = world_europe_south_east - geographical_region = world_steppe_west - } - } - } - modifier = { - factor = 2 - $PROVINCE$ = { is_coastal = yes } - } - set_variable = { name = animal_type value = flag:pelican years = 3 } - } - 5 = { # Flamingo - trigger = { - $PROVINCE$ = { - OR = { - geographical_region = world_africa_east - geographical_region = world_africa_west - geographical_region = world_india - geographical_region = world_middle_east_persia - geographical_region = dlc_fp2_mediterranean_shoreline - } - is_coastal = yes - } - } - set_variable = { name = animal_type value = flag:flamingo years = 3 } - } - } - } - } -} - -hunt_falconry_select_waterfowl_effect = { - random_list = { - 5 = { # Swan - trigger = { - $PROVINCE$ = { - NOT = { geographical_region = world_africa } - } - } - modifier = { - factor = 2 - $PROVINCE$ = { - OR = { - terrain = oasis - terrain = wetlands - terrain = floodplains - is_riverside_province = yes - } - } - - } - modifier = { - factor = 2 - $PROVINCE$.county.holder.top_liege = { employs_court_position = keeper_of_swans_court_position } - } - set_variable = { name = $VAR$ value = flag:swan years = 3 } - } - 10 = { # Goose - modifier = { - factor = 0.5 - $PROVINCE$ = { - OR = { - terrain = desert - terrain = desert_mountains - terrain = jungle - terrain = drylands - } - } - } - set_variable = { name = $VAR$ value = flag:goose years = 3 } - } - 10 = { # Duck - modifier = { - factor = 2 - $PROVINCE$ = { - OR = { - terrain = oasis - terrain = wetlands - terrain = floodplains - is_riverside_province = yes - } - } - } - set_variable = { name = $VAR$ value = flag:duck years = 3 } - } - } -} - -hunt_falconry_select_gamebird_effect = { - random_list = { - 5 = { # Pheasant - modifier = { - factor = 2 - $PROVINCE$ = { - OR = { - terrain = farmlands - terrain = plains - terrain = hills - } - } - } - set_variable = { name = $VAR$ value = flag:pheasant years = 3 } - } - 5 = { # Bustard - modifier = { - factor = 2 - $PROVINCE$ = { - OR = { - terrain = steppe - terrain = plains - terrain = drylands - terrain = desert - terrain = oasis - } - } - } - set_variable = { name = $VAR$ value = flag:bustard years = 3 } - } - 5 = { # Grouse - trigger = { - $PROVINCE$ = { - OR = { - geographical_region = world_europe_north - geographical_region = world_europe_west_britannia - } - } - } - modifier = { - factor = 2 - $PROVINCE$ = { - OR = { - terrain = mountains - terrain = hills - terrain = taiga - terrain = forest - terrain = plains - } - } - } - set_variable = { name = $VAR$ value = flag:grouse years = 3 } - } - 5 = { # Quail - modifier = { - factor = 2 - $PROVINCE$ = { - OR = { - terrain = mountains - terrain = hills - terrain = steppe - terrain = plains - } - } - } - set_variable = { name = $VAR$ value = flag:quail years = 3 } - } - } -} - -hunt_activity_success_change_effect = { - scope:activity = { - if = { - limit = { - NOT = { exists = var:hunt_success_chance_event } - } - set_variable = { name = hunt_success_chance_event value = 0 } - } - change_variable = { - name = hunt_success_chance_event - add = hunt_activity_success_$CHANGE$_value - } - set_variable = { - name = hunt_success_chance - value = hunt_success_chance_value - } - } - custom_tooltip = hunt_activity_success_$CHANGE$_tt -} - -hunt_activity_success_outcome_effect = { - scope:activity = { - hidden_effect = { - random = { - chance = var:hunt_success_chance - set_variable = { - name = hunt_success - value = flag:yes - } - } - } - } -} - -hunt_individual_guest_awards_effect = { - # If character had the reduce stress intent, give them stress loss - if = { # Hosts - limit = { this = scope:host } - if = { # To hide hunter tooltip for guests - limit = { has_character_flag = host_existing_hunter } - if = { - limit = { scope:activity.var:hunt_success ?= flag:yes } - stress_impact = { - base = major_stress_loss - lazy = medium_stress_impact_loss - gregarious = medium_stress_impact_loss - lifestyle_hunter = major_stress_loss - shy = medium_stress_impact_gain - } - } - else = { - stress_impact = { - base = medium_stress_impact_loss - lazy = minor_stress_impact_loss - gregarious = minor_stress_impact_loss - lifestyle_hunter = medium_stress_impact_loss - shy = medium_stress_impact_gain - } - } - } - else = { - if = { - limit = { scope:activity.var:hunt_success ?= flag:yes } - stress_impact = { - base = major_stress_loss - lazy = medium_stress_impact_loss - gregarious = medium_stress_impact_loss - shy = medium_stress_impact_gain - } - } - else = { - stress_impact = { - base = medium_stress_impact_loss - lazy = minor_stress_impact_loss - gregarious = minor_stress_impact_loss - shy = medium_stress_impact_gain - } - } - } - } - else = { # Guests - if = { - limit = { scope:activity.var:hunt_success ?= flag:yes } - stress_impact = { - base = medium_stress_impact_loss - lazy = minor_stress_impact_loss - gregarious = minor_stress_impact_loss - lifestyle_hunter = medium_stress_impact_loss - shy = minor_stress_impact_gain - } - } - else = { - stress_impact = { - base = minor_stress_impact_loss - lazy = miniscule_stress_impact_loss - gregarious = miniscule_stress_impact_loss - lifestyle_hunter = minor_stress_impact_loss - shy = minor_stress_impact_gain - } - } - } - # Prestige/piety - if = { - limit = { - this != scope:host - is_adult = yes - trigger_if = { - limit = { - scope:activity = { - NOT = { - has_activity_option = { category = special_type option = hunt_type_falconry } - } - } - } - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host } - } - trigger_if = { - limit = { is_clergy = yes } - OR = { - faith = { has_doctrine_parameter = clergy_can_fight } - culture = { has_cultural_parameter = culture_clergy_can_fight } - } - } - } - if = { - limit = { - culture = { has_cultural_parameter = sacred_hunts } - } - add_prestige = hunt_prestige_with_piety_guest_gain_value - add_piety = hunt_piety_guest_gain_value - } - else = { add_prestige = hunt_prestige_guest_gain_value } - } - # Nomads gain prowess from dangerous animal kills - if = { - limit = { - NOT = { this = scope:host } - government_has_flag = government_is_nomadic - scope:activity = { - var:hunt_success ?= flag:yes - NOT = { exists = var:animal_spared } - hunt_animal_type_dangerous_trigger = { VAR = var:animal_type } - } - } - add_prowess_skill = 1 - } - # Trait XP - # Only called on the end of a *successful* hunt. Hunts which are interrupted due to death, imprisonment, etc., don't get this, so put critical clean-up stuff in the activity itself. - if = { - limit = { - scope:activity = { - has_activity_option = { category = special_type option = hunt_type_falconry } - } - } - hunter_lifestyle_rank_up_check_effect = { FALCONRY = yes } - } - else = { - hunter_lifestyle_rank_up_check_effect = { FALCONRY = no } - } - # Tourney - if = { - limit = { has_trait = tourney_participant } - if = { - limit = { - scope:activity = { - NOT = { - has_activity_option = { category = special_type option = hunt_type_falconry } - } - NOT = { - hunt_story_trigger = { STORY = chase } - } - } - } - add_trait_xp = { - trait = tourney_participant - track = horse - value = { 1 3 } - } - } - if = { - limit = { - OR = { - hunt_story_trigger = { STORY = ambush } - hunt_story_trigger = { STORY = stealth } - } - } - add_trait_xp = { - trait = tourney_participant - track = bow - value = { 1 3 } - } - } - } - accolades_activity_complete_hunt_glory_effect = yes - # LEGITIMACY GAIN FOR ACTIVITY PARTICIPATION - HUNT - if = { - limit = { - scope:activity = { # Special gain for Legendary Hunt - has_activity_option = { category = special_type option = hunt_type_legendary } - } - } - legendary_hunt_participation_legitimacy_effect = yes - } - else = { - standard_activity_participation_legitimacy_effect = yes - } - # Memories - if = { - limit = { - save_temporary_scope_as = hunter_temp - NOT = { - any_memory = { - has_memory_type = hunt_animal_slayer_memory - memory_participant:animal_slayer = scope:hunter_temp - memory_participant:host = scope:host - memory_age_years < 1 - } - } - exists = scope:activity.var:kill_animal_type - } - create_character_memory = { - type = hunt_success_memory - participants = { - host = scope:host - } - } - ordered_memory = { - limit = { has_memory_type = hunt_success_memory } - order_by = memory_creation_date - save_scope_as = new_memory - set_variable = { - name = animal_type - value = scope:activity.var:kill_animal_type - } - set_variable = { - name = location - value = scope:activity.activity_location - } - } - } -} - -hunt_animal_wound_effect = { - if = { - limit = { exists = $VARIABLE$ } - if = { - limit = { $VARIABLE$ = flag:elk } - increase_wounds_effect = { REASON = moose } - } - else_if = { - limit = { $VARIABLE$ = flag:hart } - increase_wounds_effect = { REASON = hart } - } - else_if = { - limit = { - OR = { - $VARIABLE$ = flag:stag - $VARIABLE$ = flag:reindeer - } - } - increase_wounds_effect = { REASON = deer } - } - else_if = { - limit = { $VARIABLE$ = flag:roe } - increase_wounds_effect = { REASON = roe } - } - else_if = { - limit = { - OR = { - $VARIABLE$ = flag:antelope - $VARIABLE$ = flag:saiga - } - } - increase_wounds_effect = { REASON = antelope } - } - else_if = { - limit = { $VARIABLE$ = flag:gazelle } - increase_wounds_effect = { REASON = gazelle } - } - else_if = { - limit = { $VARIABLE$ = flag:bison } - increase_wounds_effect = { REASON = bison } - } - else_if = { - limit = { $VARIABLE$ = flag:aurochs } - increase_wounds_effect = { REASON = aurochs } - } - else_if = { - limit = { $VARIABLE$ = flag:boar } - increase_wounds_effect = { REASON = boar } - } - else_if = { - limit = { $VARIABLE$ = flag:bear } - increase_wounds_effect = { REASON = bear } - } - else_if = { - limit = { $VARIABLE$ = flag:wolf } - increase_wounds_effect = { REASON = wolf } - } - else_if = { - limit = { $VARIABLE$ = flag:hyena } - increase_wounds_effect = { REASON = hyena } - } - else_if = { - limit = { $VARIABLE$ = flag:lynx } - increase_wounds_effect = { REASON = lynx } - } - else_if = { - limit = { $VARIABLE$ = flag:lion } - increase_wounds_effect = { REASON = lion } - } - else_if = { - limit = { $VARIABLE$ = flag:tiger } - increase_wounds_effect = { REASON = tiger } - } - else_if = { - limit = { $VARIABLE$ = flag:leopard } - increase_wounds_effect = { REASON = leopard } - } - else = { - increase_wounds_effect = { REASON = maimed_by_wild_beast } - } - } - else = { - increase_wounds_effect = { REASON = maimed_by_wild_beast } - } -} - -hunt_animal_death_effect = { - if = { - limit = { exists = $VAR$ } - if = { - limit = { $VAR$ = flag:elk } - death = { death_reason = death_moose } - } - else_if = { - limit = { $VAR$ = flag:hart } - death = { death_reason = death_hart } - } - else_if = { - limit = { - OR = { - $VAR$ = flag:stag - $VAR$ = flag:reindeer - } - } - death = { death_reason = death_deer } - } - else_if = { - limit = { $VAR$ = flag:roe } - death = { death_reason = death_roe } - } - else_if = { - limit = { - OR = { - $VAR$ = flag:antelope - $VAR$ = flag:saiga - } - } - death = { death_reason = death_antelope } - } - else_if = { - limit = { $VAR$ = flag:gazelle } - death = { death_reason = death_gazelle } - } - else_if = { - limit = { $VAR$ = flag:bison } - death = { death_reason = death_bison } - } - else_if = { - limit = { $VAR$ = flag:aurochs } - death = { death_reason = death_aurochs } - } - else_if = { - limit = { $VAR$ = flag:boar } - death = { death_reason = death_boar } - } - else_if = { - limit = { $VAR$ = flag:bear } - death = { death_reason = death_bear } - } - else_if = { - limit = { $VAR$ = flag:wolf } - death = { death_reason = death_wolf } - } - else_if = { - limit = { $VAR$ = flag:hyena } - death = { death_reason = death_hyena } - } - else_if = { - limit = { $VAR$ = flag:lynx } - death = { death_reason = death_lynx } - } - else_if = { - limit = { $VAR$ = flag:lion } - death = { death_reason = death_lion } - } - else_if = { - limit = { $VAR$ = flag:tiger } - death = { death_reason = death_tiger } - } - else_if = { - limit = { $VAR$ = flag:leopard } - death = { death_reason = death_leopard } - } - else = { - death = { death_reason = death_maimed_by_wild_beast } - } - } - else = { - death = { death_reason = death_maimed_by_wild_beast } - } -} - -hunt_activity_random_subordinate_participant_effect = { - save_scope_value_as = { - name = hunt_participant_archetype - value = flag:$ARCHETYPE$ - } - save_scope_value_as = { - name = hunt_participant_martial_gender - value = flag:$COMBATANT$ - } - scope:activity = { - random_attending_character = { - limit = { - trigger_if = { - limit = { scope:hunt_participant_martial_gender = flag:yes } - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host } - } - hunt_is_valid_subordinate_trigger = { LIEGE = scope:host } - } - weight = { - base = 10 - hunt_relevant_participant_modifiers = yes - } - save_scope_as = $SCOPE$ - } - } -} - -hunt_activity_random_interest_participant_effect = { - save_scope_value_as = { - name = hunt_participant_archetype - value = flag:$ARCHETYPE$ - } - save_scope_value_as = { - name = hunt_participant_martial_gender - value = flag:$COMBATANT$ - } - scope:activity = { - random_attending_character = { - # Major - limit = { - is_adult = yes - is_of_major_interest_trigger = { CHARACTER = root } - trigger_if = { - limit = { scope:hunt_participant_martial_gender = flag:yes } - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host } - } - NAND = { - exists = scope:murder_target - this = scope:murder_target - } - } - # Minor - alternative_limit = { - is_adult = yes - is_of_minor_interest_trigger = { CHARACTER = root } - trigger_if = { - limit = { scope:hunt_participant_martial_gender = flag:yes } - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host } - } - NAND = { - exists = scope:murder_target - this = scope:murder_target - } - } - weight = { - base = 10 - hunt_relevant_participant_modifiers = yes - } - save_scope_as = $SCOPE$ - } - } -} - -hunt_activity_chose_smaller_game_effect = { - save_scope_as = chose_smaller_game - if = { - limit = { exists = scope:hunt_participant } - scope:hunt_participant = { - add_opinion = { - modifier = hunt_disappointed_opinion - target = root - opinion = -10 - } - } - } - scope:activity = { - if = { - limit = { - any_attending_character = { - NOR = { - this = root - AND = { - exists = scope:hunt_participant - this = scope:hunt_participant - } - } - has_trait = lifestyle_hunter - } - } - every_attending_character = { - limit = { - NOR = { - this = root - AND = { - exists = scope:hunt_participant - this = scope:hunt_participant - } - } - has_trait = lifestyle_hunter - } - custom = hunt_every_hunter_attendee_tt - add_opinion = { - modifier = hunt_disappointed_opinion - target = root - opinion = -10 - } - } - } - } -} - -hunt_animal_kill_effect = { - save_scope_as = animal_slayer - play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Hunts/ConstructionKits/ep2_event_grand_hunt_ck_spear_impact" - # Is it possible to die? - save_scope_value_as = { - name = hunt_kill_death_chance - value = flag:$DEATH$ - } - - # Determine what is slayed - scope:activity = { - set_variable = { - name = kill_animal_type - value = $VAR$ - } - set_variable = { - name = animal_slayer - value = scope:animal_slayer - } - } -} - -hunt_animal_melee_kill_effect = { - save_scope_as = melee_kill - play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Hunts/ConstructionKits/ep2_event_grand_hunt_ck_spear_impact" - hunt_animal_kill_effect = { DEATH = $DEATH$ VAR = $VAR$ } - hunter_progress_point_gain_effect = { CHANGE = 3 RANDOM_CHANGE = 1 } #Gives Hunter Lifestyle XP - # Determine who could be wounded - scope:activity ?= { - random_attending_character = { - limit = { is_alive = yes } - save_scope_as = injury_target - hunt_wound_select_effect = yes - } - } - save_scope_as = injury_target - hunt_wound_select_effect = yes - duel = { - skill = prowess - value = hunt_melee_kill_prowess_value - 50 = { - desc = hunt_kill_success_melee - hunt_kill_melee_modifiers = yes # SPEAR - hunt_kill_hunter_modifiers = yes # HUNTER - if = { #chance_to_gain_prowess_during_bear_hunts parameter check - limit = { - faith = { has_doctrine_parameter = chance_to_gain_prowess_during_bear_hunts } - scope:activity.var:animal_type = flag:bear - } - add_prowess_skill = 1 - add_martial_skill = 1 - } - send_interface_toast = { - title = { - first_valid = { - triggered_desc = { - trigger = { scope:animal_slayer ?= root } - desc = hunt_kill_success_melee_root - } - desc = hunt_kill_success_melee_guest - } - } - left_icon = scope:animal_slayer - scope:activity ?= { - add_activity_log_entry = { - key = hunt_melee_log - tags = { kill } - score = 100 - - character = scope:animal_slayer - - #Effect - scope:animal_slayer ?= { - add_prestige = hunt_prestige_melee_value - # Complete activity intent if relevant - if = { - limit = { - AND = { - scope:hunt_kill_death_chance = flag:yes - NOT = { - hunt_small_game_trigger = { VAR = $VAR$ } - } - } - } - hunt_animal_slayer_memory_effect = yes - } - } - } - } - } - save_scope_as = melee_success - } - 1 = { # Injury - desc = hunt_kill_failure_melee - compare_modifier = { - value = scope:duel_value - multiplier = -3.5 - min = 5 - } - modifier = { - hunt_small_game_trigger = { VAR = $VAR$ } - factor = 0.05 - } - modifier = { add = hunt_melee_danger_value } - # Effect - hidden_effect = { - scope:injury_target = { - if = { - limit = { - hunt_animal_type_dangerous_trigger = { VAR = $VAR$ } - } - hunt_wound_apply_effect = { SEVERE = yes } - } - else = { - hunt_wound_apply_effect = { SEVERE = no } - } - } - } - scope:activity ?= { - add_activity_log_entry = { - key = hunt_melee_log - tags = { kill } - score = 100 - - character = scope:animal_slayer - - #Effects - scope:animal_slayer ?= { - add_prestige = hunt_prestige_melee_wound_value - # Complete activity intent if relevant - if = { - limit = { - AND = { - scope:hunt_kill_death_chance = flag:yes - NOT = { - hunt_small_game_trigger = { VAR = $VAR$ } - } - } - } - hunt_animal_slayer_memory_effect = yes - } - } - } - hidden_effect = { - add_activity_log_entry = { - key = hunt_melee_wounded_log - score = 75 - tags = { kill } - character = scope:injury_target - scope:injury_target = { hunt_wound_tooltip_effect = yes } - } - } - } - if = { - limit = { scope:severe ?= yes } - custom_tooltip = hunt_character_wound_tt - } - else = { - show_as_tooltip = { - increase_wounds_no_death_effect = { REASON = fight } - } - } - save_scope_as = melee_failure - } - 1 = { # Death - desc = hunt_kill_critical_failure_melee - trigger = { - scope:hunt_kill_death_chance = flag:yes - NOT = { - hunt_small_game_trigger = { VAR = $VAR$ } - } - } - compare_modifier = { - value = scope:duel_value - multiplier = -3.5 - min = 5 - } - modifier = { add = hunt_melee_kill_prowess_value } - scope:activity ?= { - add_activity_log_entry = { - key = hunt_melee_killed_log - score = 75 - tags = { kill } - character = scope:animal_slayer - - # Effect - scope:animal_slayer = { - hunt_animal_death_effect = { VAR = $VAR$ } - } - } - } - save_scope_as = melee_critical - } - } - # Outcome - scope:animal_slayer ?= { - if = { - limit = { has_activity_intent = slay_beast_intent } - show_as_tooltip = { complete_activity_intent = yes } - } - hunt_complete_slay_beast_intent_effect = yes # Complete activity intent if relevant - } - scope:activity ?= { - every_attending_character = { - limit = { is_ai = no } - trigger_event = hunt.1201 - } - } -} - -hunt_animal_melee_kill_group_effect = { - save_scope_as = group_kill - hunt_animal_kill_effect = { DEATH = $DEATH$ VAR = $VAR$ } - scope:activity ?= { - # Determine who is slaying - every_attending_character = { - limit = { - is_alive = yes - NOT = { has_character_flag = not_slaying } - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host } - trigger_if = { - limit = { exists = scope:group_craven } - this != scope:host - } - } - custom = hunt_every_hunter_tt - add_to_list = animal_slayers - hunter_progress_point_gain_effect = { CHANGE = 1 RANDOM_CHANGE = 1 } #Gives Hunter Lifestyle XP - } - } - # Determine who could be wounded - random_in_list = { - list = animal_slayers - weight = { - base = 20 - hunt_likely_injured_modifiers = yes - } - save_scope_as = injury_target - hunt_wound_select_effect = yes - } - # Outcome - random_list = { - 50 = { # Animal is captured - trigger = { exists = scope:group_capture } - desc = hunt_kill_success_capture - scope:activity ?= { - add_activity_log_entry = { - key = hunt_melee_capture_log - score = 75 - tags = { kill } - character = scope:animal_slayer - - # Effect - every_in_list = { - list = animal_slayers - custom = hunt_every_hunter_tt - add_prestige = hunt_prestige_melee_group_value - } - } - } - save_scope_as = group_success - } - 50 = { # Animal is slain - trigger = { - NOT = { exists = scope:group_capture } - } - desc = hunt_kill_success_melee - scope:activity ?= { - add_activity_log_entry = { - key = hunt_melee_group_log - score = 75 - tags = { kill } - character = scope:animal_slayer - - # Effect - every_in_list = { - list = animal_slayers - custom = hunt_every_hunter_tt - add_prestige = hunt_prestige_melee_group_value - } - } - } - save_scope_as = group_success - } - 25 = { # ...but someone is injured - desc = hunt_kill_failure_melee_group - modifier = { add = hunt_melee_kill_prowess_value } - modifier = { - hunt_small_game_trigger = { VAR = $VAR$ } - factor = 0.1 - } - modifier = { add = hunt_melee_danger_value } - # Effect - hidden_effect = { - scope:injury_target = { - if = { # Big animal injure big - limit = { - hunt_animal_type_dangerous_trigger = { VAR = $VAR$ } - } - hunt_wound_apply_effect = { SEVERE = yes } - } - else = { # Smol animal injure smol - hunt_wound_apply_effect = { SEVERE = no } - } - } - } - scope:activity ?= { - add_activity_log_entry = { - key = hunt_melee_group_log - score = 75 - tags = { kill } - character = scope:animal_slayer - - # Effect - every_in_list = { - list = animal_slayers - custom = hunt_every_hunter_tt - add_prestige = hunt_prestige_melee_wound_group_value - } - } - hidden_effect = { - add_activity_log_entry = { - key = hunt_melee_group_wounded_log - score = 75 - tags = { kill } - character = scope:injury_target - scope:injury_target = { hunt_wound_tooltip_effect = yes } - } - } - } - custom_tooltip = hunt_random_attendee_injured_tt - save_scope_as = group_failure - } - 10 = { # ...but someone is killed - desc = hunt_kill_critical_failure_melee_group - trigger = { - scope:hunt_kill_death_chance = flag:yes - NOT = { - hunt_small_game_trigger = { VAR = $VAR$ } - } - } - modifier = { add = hunt_melee_kill_prowess_value } - custom_tooltip = hunt_random_attendee_killed_tt - scope:activity ?= { - add_activity_log_entry = { - key = hunt_melee_group_log - score = 75 - tags = { kill } - character = scope:animal_slayer - } - hidden_effect = { - add_activity_log_entry = { - key = hunt_melee_group_killed_log - score = 75 - tags = { kill } - character = scope:injury_target - - # Effect - scope:injury_target = { - hunt_animal_death_effect = { VAR = $VAR$ } - } - } - } - } - save_scope_as = group_critical - } - } - if = { - limit = { - NOT = { exists = scope:group_capture } - } - hidden_effect = { - every_in_list = { - list = animal_slayers - custom = hunt_every_slay_beast_hunter_tt - # Complete activity intent if relevant - hunt_complete_slay_beast_intent_effect = yes - } - } - } - scope:activity ?= { - every_attending_character = { - limit = { is_ai = no } - trigger_event = hunt.1202 - } - } -} - -hunt_animal_bow_kill_effect = { - save_scope_as = bow_kill - hunt_animal_kill_effect = { DEATH = $DEATH$ VAR = $VAR$ } - if = { - limit = { has_trait = tourney_participant } - add_trait_xp = { - trait = tourney_participant - track = bow - value = { 1 3 } - } - hunter_progress_point_gain_effect = { CHANGE = 1 RANDOM_CHANGE = 1 } #Gives Hunter Lifestyle XP - } - else = { - hunter_progress_point_gain_effect = { CHANGE = 2 RANDOM_CHANGE = 1 } #Gives Hunter Lifestyle XP - } - # Determine who could be wounded - scope:activity ?= { - random_attending_character = { - limit = { is_alive = yes } - save_scope_as = injury_target - hunt_wound_select_effect = yes - } - } - if = { # Separate win option to avoid Duel tooltips if very easy - limit = { - scope:hunt_kill_death_chance = flag:no - exists = scope:hunt_ending - scope:activity = { - hunt_story_trigger = { STORY = chase } - } - } - scope:activity ?= { - add_activity_log_entry = { - key = hunt_bow_log - score = 75 - tags = { kill } - character = scope:animal_slayer - - # Effect - scope:animal_slayer = { - # Complete activity intent if relevant - if = { - limit = { has_activity_intent = slay_beast_intent } - show_as_tooltip = { complete_activity_intent = yes } - } - hunt_complete_slay_beast_intent_effect = yes - add_prestige = hunt_prestige_bow_value - } - } - } - save_scope_as = bow_success - play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Hunts/ConstructionKits/ep2_event_grand_hunt_ck_arrow_shoot" - } - else = { - duel = { - skill = prowess - value = hunt_melee_kill_prowess_value - 50 = { # Success - desc = hunt_kill_success_bow_tt - hunt_kill_bow_modifiers = yes # BOW - hunt_kill_hunter_modifiers = yes # HUNTER - compare_modifier = { - value = scope:duel_value - multiplier = 3.5 - min = -25 - } - scope:activity ?= { - add_activity_log_entry = { - key = hunt_bow_log - score = 75 - tags = { kill } - character = scope:animal_slayer - - # Effect - scope:animal_slayer = { - add_prestige = hunt_prestige_bow_value - # Complete activity intent if relevant - if = { - limit = { has_activity_intent = slay_beast_intent } - show_as_tooltip = { complete_activity_intent = yes } - } - hunt_complete_slay_beast_intent_effect = yes - if = { - limit = { - has_activity_intent = impose_obedience_intent - scope:host.intent_target = { - NOT = { is_obedient_to = scope:host } - } - } - scope:host.intent_target = { - add_opinion = { - target = scope:host - modifier = obedience_opinion - } - } - } - hunt_animal_slayer_memory_effect = yes - if = { #chance_to_gain_prowess_during_bear_hunts parameter check - limit = { - faith = { has_doctrine_parameter = chance_to_gain_prowess_during_bear_hunts } - scope:activity.var:animal_type = flag:bear - } - random = { - chance = 10 - add_prowess_skill = 1 - } - } - } - } - } - save_scope_as = bow_success - play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Hunts/ConstructionKits/ep2_event_grand_hunt_ck_arrow_impact_hit" - } - 5 = { # Failure - desc = hunt_kill_failure_melee_group - trigger = { scope:hunt_kill_death_chance = flag:yes } - compare_modifier = { - value = scope:duel_value - multiplier = -1.5 - min = 1 - } - modifier = { - hunt_small_game_trigger = { VAR = $VAR$ } - factor = 0.1 - } - modifier = { add = hunt_bow_danger_value } - custom_tooltip = hunt_random_attendee_injured_tt - hidden_effect = { - scope:host ?= { - send_interface_toast = { - title = hunt_kill_failure_melee_group - left_icon = scope:animal_slayer - right_icon = scope:injury_target - scope:activity = { - add_activity_log_entry = { - key = hunt_bow_log - score = 75 - tags = { kill } - character = scope:animal_slayer - target = scope:injury_target - - # Effect - scope:animal_slayer = { - custom_tooltip = hunt_kill_failure_bow - # Complete activity intent if relevant - hunt_complete_slay_beast_intent_effect = yes - } - if = { - limit = { exists = scope:injury_target } - scope:injury_target = { hunt_wound_tooltip_effect = yes } - } - } - } - } - } - } - save_scope_as = bow_failure - play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Hunts/ConstructionKits/ep2_event_grand_hunt_ck_arrow_impact_miss" - } - 50 = { # Critical Failure - desc = hunt_kill_critical_failure_bow_tt - trigger = { - NAND = { - exists = scope:hunt_ending - scope:activity ?= { - hunt_story_trigger = { STORY = chase } - } - } - } - compare_modifier = { - value = scope:duel_value - multiplier = -3.5 - min = 5 - } - send_interface_toast = { - title = hunt_kill_miss_bow_tt - left_icon = scope:animal_slayer - scope:activity ?= { - add_activity_log_entry = { - key = hunt_bow_miss_log - score = 75 - tags = { kill } - character = scope:animal_slayer - } - } - } - save_scope_as = bow_critical - play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Hunts/ConstructionKits/ep2_event_grand_hunt_ck_arrow_impact_miss" - } - } - } - scope:activity = { - every_attending_character = { - limit = { is_ai = no } - trigger_event = hunt.1200 - } - } -} - -animal_artifact_wealth_quality_effect = { - save_scope_value_as = { - name = quality - value = { - value = 0 - if = { - limit = { - exists = scope:excellent_animal_artifacts - } - add = 500 - } - if = { - limit = { - OR = { - scope:owner.var:animal_type ?= flag:hare - AND = { - hunt_activity_bird_trigger = { VAR = scope:owner.var:animal_type } - NOR = { - hunt_activity_ground_bird_trigger = { VAR = scope:owner.var:animal_type } - hunt_activity_exotic_bird_trigger = { VAR = scope:owner.var:animal_type } - } - } - } - } - add = { 0 30 } - } - else_if = { - limit = { - OR = { - scope:owner.var:animal_type ?= flag:fox - hunt_activity_ground_bird_trigger = { VAR = scope:owner.var:animal_type } - } - } - add = { 15 45 } - } - else_if = { - limit = { - OR = { - scope:owner.var:animal_type ?= flag:roe - scope:owner.var:animal_type ?= flag:gazelle - # Pets - scope:owner.var:animal_type ?= flag:cat - scope:owner.var:animal_type ?= flag:dog - scope:owner.var:animal_type ?= flag:eagle - } - } - add = { 30 60 } - } - else_if = { - limit = { - OR = { - scope:owner.var:animal_type ?= flag:wolf - scope:owner.var:animal_type ?= flag:hyena - scope:owner.var:animal_type ?= flag:lynx - # Exotic Birds - hunt_activity_exotic_bird_trigger = { VAR = scope:owner.var:animal_type } - } - } - add = { 45 75 } - } - else_if = { - limit = { - OR = { - scope:owner.var:animal_type ?= flag:bison - scope:owner.var:animal_type ?= flag:aurochs - scope:owner.var:animal_type ?= flag:stag - scope:owner.var:animal_type ?= flag:reindeer - scope:owner.var:animal_type ?= flag:antelope - } - } - add = { 60 90 } - } - else_if = { - limit = { - OR = { - scope:owner.var:animal_type ?= flag:lion - scope:owner.var:animal_type ?= flag:tiger - scope:owner.var:animal_type ?= flag:bear - scope:owner.var:animal_type ?= flag:leopard - } - } - add = { 75 105 } - } - else_if = { - limit = { - OR = { - scope:owner.var:animal_type ?= flag:boar - scope:owner.var:animal_type ?= flag:hart - scope:owner.var:animal_type ?= flag:elk - } - } - add = { 90 120 } - } - if = { - limit = { scope:legendary ?= yes } - multiply = 2 - } - if = { - limit = { exists = scope:impressive_trophy } - multiply = 1.5 - } - if = { - limit = { exists = var:pet_name } - multiply = 2 - } - } - } - save_scope_value_as = { - name = wealth - value = { - if = { - limit = { - exists = scope:excellent_animal_artifacts - } - add = 500 - } - if = { - # If our artifact already has a quality, set base wealth equal to 1/4th quality value. - limit = { exists = scope:quality } - add = scope:quality - multiply = 0.5 - round = yes - } - else = { - add = 10 # Otherwise, set base wealth value to 10. - } - scope:creator = { - if = { - limit = { has_trait = lifestyle_hunter } - add = 10 - } - } - if = { # Falconry Exp - limit = { - exists = scope:activity - scope:activity = { - has_activity_type = activity_hunt - has_activity_option = { category = special_type option = hunt_type_falconry } - } - } - if = { - limit = { - scope:creator = { - hunt_lifestyle_track_greater_equal_trigger = { TRACK = falconer GREATER_EQUAL = 50 } - } - } - add = 10 - } - if = { - limit = { - scope:creator = { - hunt_lifestyle_track_greater_equal_trigger = { TRACK = falconer GREATER_EQUAL = 100 } - } - } - add = 10 - } - } - else = { # Hunter Exp - if = { - limit = { - scope:creator = { - hunt_lifestyle_track_greater_equal_trigger = { TRACK = hunter GREATER_EQUAL = 50 } - } - } - add = 10 - } - if = { - limit = { - scope:creator = { - hunt_lifestyle_track_greater_equal_trigger = { TRACK = hunter GREATER_EQUAL = 100 } - } - } - add = 10 - } - } - } - } -} - -hunt_animal_slayer_bow_opinion_effect = { - if = { - limit = { hunt_dharmic_pacificist_trigger = yes } - add_opinion = { - target = scope:host - modifier = hunt_dharmic_mercy_opinion - opinion = -15 - } - stress_impact = { base = minor_stress_impact_gain } - add_character_flag = { - flag = dharmic_mercy_flag - weeks = 1 - } - } - else_if = { - limit = { - scope:host = { - exists = intent_target - OR = { - has_activity_intent = befriend_attendee_intent - has_activity_intent = woo_attendee_intent - AND = { - has_activity_intent = impose_obedience_intent - scope:host.intent_target = { # They're not obedient to you already - NOT = { is_obedient_to = scope:host } - } - } - } - } - this = scope:host.intent_target - } - save_scope_as = opinion_target - scope:host = { - switch = { - trigger = has_activity_intent - befriend_attendee_intent = { - progress_towards_friend_effect = { - REASON = friend_gave_hunt_kill_reason - CHARACTER = scope:opinion_target - OPINION = default_friend_opinion - } - } - woo_attendee_intent = { - progress_towards_lover_effect = { - REASON = friend_gave_hunt_kill_reason - CHARACTER = scope:opinion_target - OPINION = default_lover_opinion - } - } - impose_obedience_intent = { - scope:opinion_target = { - add_opinion = { - target = scope:host - modifier = obedience_opinion - } - } - } - } - } - } - else_if = { - limit = { - OR = { - $VAR$ = flag:hart - $VAR$ = flag:boar - } - } - add_opinion = { - target = scope:host - modifier = hunt_honored_with_kill_opinion - opinion = 15 - } - } - else_if = { - limit = { - OR = { - $VAR$ = flag:fox - $VAR$ = flag:hare - } - } - add_opinion = { - target = scope:host - modifier = hunt_honored_with_kill_opinion - opinion = 5 - } - } - else = { - add_opinion = { - target = scope:host - modifier = hunt_honored_with_kill_opinion - opinion = 10 - } - } -} - -hunt_animal_slayer_melee_opinion_effect = { - if = { - limit = { - OR = { - has_trait = craven - AND = { - NOT = { has_trait = lifestyle_hunter } - OR = { - scope:activity.var:animal_type = flag:hart - scope:activity.var:animal_type = flag:boar - } - } - hunt_dharmic_pacificist_trigger = yes - } - } - add_opinion = { - target = scope:host - modifier = hunt_forced_to_kill_opinion - opinion = -10 - } - } - else_if = { - limit = { - scope:host = { - exists = intent_target - OR = { - has_activity_intent = befriend_attendee_intent - has_activity_intent = woo_attendee_intent - AND = { - has_activity_intent = impose_obedience_intent - scope:host.intent_target = { # They're not obedient to you already - NOT = { is_obedient_to = scope:host } - } - } - } - } - this = scope:host.intent_target - } - save_scope_as = opinion_target - scope:host = { - switch = { - trigger = has_activity_intent - befriend_attendee_intent = { - progress_towards_friend_effect = { - REASON = friend_gave_hunt_kill_reason - CHARACTER = scope:opinion_target - OPINION = default_friend_opinion - } - } - woo_attendee_intent = { - progress_towards_lover_effect = { - REASON = friend_gave_hunt_kill_reason - CHARACTER = scope:opinion_target - OPINION = default_lover_opinion - } - } - impose_obedience_intent = { - scope:opinion_target = { - add_opinion = { - target = scope:host - modifier = obedience_opinion - } - } - } - } - } - } - else_if = { - limit = { - OR = { - has_trait = lifestyle_hunter - has_trait = ambitious - has_trait = arrogant - has_trait = brave - } - } - add_opinion = { - target = scope:host - modifier = hunt_honored_with_kill_opinion - opinion = 10 - } - } -} - -hunt_activity_method_effect = { - custom_tooltip = hunt_activity_$STORY$_tt - scope:activity = { - if = { - limit = { exists = var:hunt_activity_story } - remove_variable = hunt_activity_story - } - set_variable = { - name = hunt_activity_story - value = flag:$STORY$ - } - add_activity_log_entry = { - key = hunt_$STORY$_method_selected_log - score = 25 - tags = { method } - character = scope:host - } - } -} - -activity_improve_relations_intent_effect = { - if = { - limit = { - intent_target ?= $CHARACTER$ - OR = { - has_activity_intent = befriend_attendee_intent - has_activity_intent = woo_attendee_intent - AND = { - has_activity_intent = impose_obedience_intent - scope:host.intent_target = { # They're not obedient to you already - NOT = { is_obedient_to = scope:host } - } - } - } - } - switch = { - trigger = has_activity_intent - befriend_attendee_intent = { - progress_towards_friend_effect = { - REASON = $REASON$ - CHARACTER = $CHARACTER$ - OPINION = default_friend_opinion - } - } - woo_attendee_intent = { - progress_towards_lover_effect = { - REASON = $REASON$ - CHARACTER = $CHARACTER$ - OPINION = default_lover_opinion - } - } - impose_obedience_intent = { - scope:opinion_target = { - add_opinion = { - target = scope:host - modifier = obedience_opinion - } - } - } - } - } - else_if = { - limit = { - NOT = { this = $CHARACTER$ } - } - reverse_add_opinion = { - modifier = $MODIFIER$ - opinion = $OPINION$ - target = $CHARACTER$ - } - } -} - -# Save master of the hunt or a fallback -hunt_activity_sighting_master_effect = { - add_character_flag = { - flag = recent_hunt_sighting - years = 3 - } - save_scope_value_as = { - name = lifestyle - value = flag:$TYPE$ - } - if = { - limit = { - employs_court_position = master_of_hunt_court_position - court_position:master_of_hunt_court_position = { is_available_adult = yes } - } - court_position:master_of_hunt_court_position = { save_scope_as = sighting_character } - } - else_if = { - limit = { - employs_court_position = huntperson_camp_officer - court_position:huntperson_camp_officer = { is_available_adult = yes } - } - court_position:huntperson_camp_officer = { save_scope_as = sighting_character } - } - else = { - every_vassal_or_below = { - limit = { - is_available_adult = yes - has_trait = lifestyle_hunter - } - add_to_list = potential_sighting_givers - } - every_courtier = { - limit = { - is_available_adult = yes - has_trait = lifestyle_hunter - } - add_to_list = potential_sighting_givers - } - random_in_list = { - list = potential_sighting_givers - weight = { - base = 1 - modifier = { - factor = 2 - scope:lifestyle = flag:hunter - has_trait_xp = { - trait = lifestyle_hunter - track = hunter - value >= 25 - } - } - modifier = { - factor = 2 - scope:lifestyle = flag:falconer - has_trait_xp = { - trait = lifestyle_hunter - track = falconer - value >= 25 - } - } - modifier = { - factor = 0 - # Exclude clergy who don't fight - is_clergy = yes - NOR = { - faith = { has_doctrine_parameter = clergy_can_fight } - culture = { has_cultural_parameter = culture_clergy_can_fight } - } - } - modifier = { - factor = 0.1 - scope:lifestyle = flag:hunter - NOT = { - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } - } - } - } - save_scope_as = sighting_character - } - } - scope:sighting_character ?= { save_scope_as = portrait_character } - if = { - limit = { - NOT = { exists = scope:sighting_character } - is_ai = no - } - create_character = { - location = root.location - template = hunter_template - culture = root.location.culture - faith = root.location.faith - dynasty = none - save_scope_as = new_hunter - } - scope:new_hunter = { save_scope_as = portrait_character } - } -} - -hunt_dharmic_pacificism_effect = { - scope:activity ?= { - if = { - limit = { - any_attending_character = { - NOT = { scope:host ?= this } - hunt_dharmic_pacificist_trigger = yes - NOT = { has_character_flag = dharmic_mercy_flag } - } - } - every_attending_character = { - limit = { - NOT = { scope:host ?= this } - hunt_dharmic_pacificist_trigger = yes - NOT = { has_character_flag = dharmic_mercy_flag } - } - custom = every_non_cynical_dharmic_attendee_tt - add_opinion = { - target = root - modifier = hunt_dharmic_mercy_opinion - opinion = -10 - } - } - } - } - scope:host ?= { hunt_dharmic_pacificism_stress_effect = yes } -} - -hunt_dharmic_pacificism_stress_effect = { - if = { - limit = { - is_alive = yes - hunt_dharmic_pacificist_trigger = yes - } - if = { - limit = { - NOT = { scope:host ?= this } - } - add_opinion = { - target = scope:host - modifier = hunt_dharmic_mercy_opinion - opinion = -15 - } - } - stress_impact = { base = minor_stress_impact_gain } - add_character_flag = { - flag = dharmic_mercy_flag - weeks = 1 - } - } -} - -hunt_humble_hunter_stress_effect = { - if = { - limit = { is_alive = yes } - stress_impact = { - lazy = miniscule_stress_impact_gain - humble = miniscule_stress_impact_gain - shy = miniscule_stress_impact_gain - generous = miniscule_stress_impact_gain - lifestyle_hunter = minor_stress_impact_loss - } - } -} - -hunt_jealous_hunter_stress_effect = { - if = { - limit = { is_alive = yes } - stress_impact = { - diligent = miniscule_stress_impact_gain - arrogant = miniscule_stress_impact_gain - arbitrary = miniscule_stress_impact_gain - greedy = miniscule_stress_impact_gain - lifestyle_hunter = minor_stress_impact_gain - } - } -} - -hunt_remove_variables_effect = { - scope:host = { - if = { - limit = { is_alive = yes } - if = { - limit = { has_character_flag = dangerous_road } - remove_character_flag = dangerous_road - } - if = { - limit = { exists = var:animal_type } - remove_variable = animal_type - } - if = { - limit = { has_variable = strife_loss_total } - remove_variable = strife_loss_total - } - } - } - scope:activity = { - every_attending_character = { - if = { - limit = { exists = var:animal_type } - remove_variable = animal_type - } - } - } -} - -hunt_wound_select_effect = { - hidden_effect = { - random_list = { - 50 = { - save_scope_value_as = { - name = wound - value = flag:wound - } - } - 5 = { - trigger = { - NOT = { has_trait = incapable } - } - modifier = { - has_trait = wounded - add = 1 - } - save_scope_value_as = { - name = wound - value = flag:incapable - } - } - 5 = { - trigger = { - NOT = { has_trait = maimed } - } - modifier = { - has_trait = wounded - add = 1 - } - save_scope_value_as = { - name = wound - value = flag:maimed - } - } - 5 = { - trigger = { - NOT = { has_trait = one_eyed } - } - modifier = { - has_trait = wounded - add = 1 - } - save_scope_value_as = { - name = wound - value = flag:one_eyed - } - } - 5 = { - trigger = { - NOT = { has_trait = one_legged } - } - modifier = { - has_trait = wounded - add = 1 - } - save_scope_value_as = { - name = wound - value = flag:one_legged - } - } - 5 = { - trigger = { - NOT = { has_trait = disfigured } - } - modifier = { - has_trait = wounded - add = 1 - } - save_scope_value_as = { - name = wound - value = flag:disfigured - } - } - 5 = { - save_scope_value_as = { - name = wound - value = flag:none - } - } - } - } -} - -hunt_wound_apply_effect = { - if = { - limit = { has_character_flag = hunt_wound_ignored } - remove_character_flag = hunt_wound_ignored - } - save_scope_value_as = { - name = severe - value = $SEVERE$ - } - if = { - limit = { scope:severe = yes } - if = { - limit = { - NOT = { scope:wound = flag:wound } - } - hidden_effect = { - change_trait_rank = { - trait = wounded - rank = 1 - max = 3 - } - } - } - switch = { - trigger = scope:wound - flag:wound = { - hidden_effect = { - change_trait_rank = { - trait = wounded - rank = 2 - max = 3 - } - } - } - flag:incapable = { add_trait_force_tooltip = incapable } - flag:maimed = { apply_maimed_trait_and_modifier_effect = yes } - flag:one_eyed = { add_trait_force_tooltip = one_eyed } - flag:one_legged = { add_trait_force_tooltip = one_legged } - flag:disfigured = { add_trait_force_tooltip = disfigured } - flag:none = {} - } - } - else = { - hidden_effect = { - change_trait_rank = { - trait = wounded - rank = 1 - max = 3 - } - } - } - if = { - limit = { has_trait = wounded_1 } - add_trait_force_tooltip = wounded_1 - } - else_if = { - limit = { has_trait = wounded_2 } - add_trait_force_tooltip = wounded_2 - } - else = { add_trait_force_tooltip = wounded_3 } - add_character_flag = { - flag = recent_hunt_wound - weeks = 1 - } -} - -hunt_wound_tooltip_effect = { - show_as_tooltip = { - if = { - limit = { has_trait = wounded_3 } - add_trait_force_tooltip = wounded_3 - } - else_if = { - limit = { has_trait = wounded_2 } - add_trait_force_tooltip = wounded_2 - } - else_if = { - limit = { has_trait = wounded_1 } - add_trait_force_tooltip = wounded_1 - } - if = { - limit = { scope:severe = yes } - switch = { - trigger = scope:wound - flag:wound = {} - flag:incapable = { add_trait_force_tooltip = incapable } - flag:maimed = { apply_maimed_trait_and_modifier_effect = yes } - flag:one_eyed = { add_trait_force_tooltip = one_eyed } - flag:one_legged = { add_trait_force_tooltip = one_legged } - flag:disfigured = { add_trait_force_tooltip = disfigured } - flag:none = {} - } - } - } -} - -hunt_story_tooltip_effect = { - if = { - limit = { - hunt_story_trigger = { STORY = chase } - } - custom_tooltip = hunt_activity_chase_tt - } - else_if = { - limit = { - hunt_story_trigger = { STORY = stealth } - } - custom_tooltip = hunt_activity_stealth_tt - } - else_if = { - limit = { - hunt_story_trigger = { STORY = ambush } - } - custom_tooltip = hunt_activity_ambush_tt - } -} - -hunt_save_murder_target_effect = { - hidden_effect = { - if = { - limit = { hunt_murder_intent_target_trigger = yes } - intent_target = { save_scope_as = murder_target } - } - else_if = { - limit = { - var:hunt_murder_attempt ?= { - is_alive = yes - is_participant_in_activity = scope:activity - } - } - var:hunt_murder_attempt = { - save_scope_as = murder_target - random_targeting_scheme = { - limit = { - scheme_type = murder - OR = { - scheme_owner = root - any_scheme_agent_character = { this = root } - } - } - save_scope_as = scheme - every_scheme_agent_character = { add_to_list = murder_agents } - scheme_owner = { save_scope_as = murder_schemer } - hunt_save_hostile_accomplice_effect = { - SCHEME = murder - VICTIM = scope:murder_target - } - } - } - } - else_if = { - limit = { hunt_1012_hated_participant_trigger = yes } - var:participant_to_use_1011 = { save_scope_as = murder_target } - } - else = { - scope:activity = { - random_attending_character = { - limit = { has_relation_nemesis = root } - alternative_limit = { has_relation_rival = root } - save_scope_as = murder_target - } - } - } - if = { - limit = { - NOT = { exists = scope:accomplice } - } - random_list = { - 10 = { - trigger = { - primary_title = { - has_order_of_succession = election - any_election_candidate = { this = scope:murder_target } - any_elector = { - hunt_elective_accomplice_trigger = { - MURDERER = scope:murder_target - TARGET = root - } - } - } - } - primary_title = { - ordered_elector = { - limit = { - hunt_elective_accomplice_trigger = { - MURDERER = scope:murder_target - TARGET = root - } - } - order_by = intrigue - save_scope_as = accomplice - save_scope_as = elective_accomplice - } - } - } - 10 = { - trigger = { - any_targeting_faction = { - hunt_claimant_faction_trigger = { - MURDERER = scope:murder_target - TARGET = root - } - any_faction_member = { - hunt_accomplice_general_trigger = { - MURDERER = scope:murder_target - TARGET = root - } - } - } - } - random_targeting_faction = { - limit = { - hunt_claimant_faction_trigger = { - MURDERER = scope:murder_target - TARGET = root - } - any_faction_member = { - hunt_accomplice_general_trigger = { - MURDERER = scope:murder_target - TARGET = root - } - } - } - ordered_faction_member = { - limit = { - hunt_accomplice_general_trigger = { - MURDERER = scope:murder_target - TARGET = root - } - } - order_by = intrigue - save_scope_as = accomplice - save_scope_as = claimant_accomplice - } - } - } - 10 = { - trigger = { - scope:murder_target = { - any_relation = { - type = lover - type = friend - hunt_accomplice_general_trigger = { - MURDERER = scope:murder_target - TARGET = root - } - } - } - } - scope:murder_target = { - ordered_relation = { - type = lover - type = friend - limit = { - hunt_accomplice_general_trigger = { - MURDERER = scope:murder_target - TARGET = root - } - } - order_by = intrigue - save_scope_as = accomplice - save_scope_as = relation_accomplice - } - } - } - 0 = {} - } - } - } -} - -hunt_save_physician_effect = { - if = { - limit = { - exists = court_position:court_physician_court_position - court_position:court_physician_court_position = { - is_participant_in_activity = scope:activity - is_alive = yes - } - } - court_position:court_physician_court_position = { save_scope_as = physician } - } -} - -hunt_physician_treatment_effect = { - scope:physician = { - duel = { - skill = learning - value = medium_skill_rating - 20 = { - compare_modifier = { - value = scope:duel_value - multiplier = 3.5 - min = -25 - } - min = 5 - desc = hunt.4014.c.success - scope:host = { - send_interface_toast = { - title = hunt.4014.c.success - left_icon = scope:patient - right_icon = scope:physician - scope:patient = { - change_trait_rank = { - trait = wounded - rank = -1 - max = 1 - } - if = { - limit = { - this != scope:host - } - add_opinion = { - target = scope:host - modifier = grateful_opinion - opinion = 10 - } - } - add_opinion = { - target = scope:physician - modifier = grateful_opinion - opinion = 10 - } - } - } - } - } - 15 = { - compare_modifier = { - value = scope:duel_value - multiplier = -3.5 - min = -25 - } - modifier = { - factor = 0.5 - has_trait = lifestyle_physician - } - min = 5 - desc = hunt.4014.c.failure - scope:host = { - send_interface_toast = { - title = hunt.4014.c.failure - left_icon = scope:patient - right_icon = scope:physician - scope:patient = { - add_character_modifier = { modifier = infected_wound_modifier } - add_opinion = { - target = scope:physician - modifier = failed_to_treat_me_opinion - opinion = -15 - } - } - } - } - } - } - } -} - -hunt_friendly_intent_effect = { - if = { - limit = { - has_activity_intent = woo_attendee_intent - intent_target ?= $TARGET$ - } - progress_towards_lover_effect = { - REASON = $REASON$ - CHARACTER = $TARGET$ - OPINION = default_lover_opinion - } - } - else_if = { - limit = { - has_activity_intent = befriend_attendee_intent - intent_target ?= $TARGET$ - } - progress_towards_friend_effect = { - REASON = $REASON$ - CHARACTER = $TARGET$ - OPINION = default_friend_opinion - } - } - else = { - if = { - limit = { - can_add_hook = { target = $TARGET$ type = favor_hook } - } - add_hook = { type = favor_hook target = $TARGET$ } - } - } -} - -# Give hunt xp to every attending character -hunt_all_attendee_xp_effect = { - hidden_effect = { - scope:activity = { - every_attending_character = { - limit = { - is_alive = yes - NOT = { has_character_flag = not_slaying } - trigger_if = { - limit = { - NOT = { - scope:activity = { - has_activity_option = { category = special_type option = hunt_type_falconry } - } - } - } - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host } - } - } - add_to_list = animal_slayers - } - activity_host = { add_to_list = animal_slayers } - } - every_in_list = { - list = animal_slayers - if = { - limit = { has_trait = lifestyle_hunter } - send_interface_toast = { - title = hunter_xp_gain_message - hunter_progress_point_gain_effect = { CHANGE = $CHANGE$ RANDOM_CHANGE = $RANDOM$ } #Gives points towards ranking up the Hunter Lifestyle - } - } - else = { - hunter_progress_point_gain_effect = { CHANGE = $CHANGE$ RANDOM_CHANGE = $RANDOM$ } #Gives points towards ranking up the Hunter Lifestyle - } - } - } -} - -hunt_intent_outcome_tooltip_effect = { - if = { # Murder - limit = { has_activity_intent = murder_attendee_intent } - if = { - limit = { - exists = intent_target.killer - intent_target.killer = root - } - custom_tooltip = intent_murder_success_tt - } - else_if = { - limit = { - exists = intent_target.killer - intent_target.killer = { is_alive = no } - } - custom_tooltip = intent_murder_dead_tt - } - else = { custom_tooltip = intent_murder_fail_tt } - } - if = { # Impose Obedience - limit = { has_activity_intent = impose_obedience_intent } - if = { - limit = { - intent_target = { is_obedient_to = root } - } - custom_tooltip = intent_obedience_success_tt - } - else = { custom_tooltip = intent_obedience_fail_tt } - } - else_if = { # Woo - limit = { has_activity_intent = woo_attendee_intent } - if = { - limit = { has_relation_lover = intent_target } - custom_tooltip = intent_woo_success_tt - } - else_if = { - limit = { has_relation_potential_friend = intent_target } - custom_tooltip = intent_woo_potential_tt - } - else = { custom_tooltip = intent_woo_fail_tt } - } - else_if = { # Befriend - limit = { has_activity_intent = befriend_attendee_intent } - if = { - limit = { has_relation_friend = intent_target } - custom_tooltip = intent_befriend_success_tt - } - else_if = { - limit = { has_relation_potential_friend = intent_target } - custom_tooltip = intent_befriend_potential_tt - } - else = { custom_tooltip = intent_befriend_fail_tt } - } -} - -hunt_participant_to_blame_effect = { - scope:activity = { - if = { - limit = { - any_attending_character = { - NOR = { - this = root - this = scope:murder_target - } - is_alive = yes - } - } - every_attending_character = { - limit = { - NOR = { - this = root - this = scope:murder_target - } - is_alive = yes - } - add_to_list = potential_blamees - } - random_in_list = { - list = potential_blamees - limit = { #Blame someone you don't like! - OR = { - has_relation_rival = root - has_relation_potential_rival = root - reverse_opinion = { - target = root - value <= -30 - } - } - } - alternative_limit = { - reverse_opinion = { - target = root - value <= -10 - } - } - alternative_limit = { always = yes } #Just pick whomever at this stage - weight = { - base = 10 - modifier = { - add = -9 - OR = { - has_relation_friend = root - has_relation_potential_friend = root - has_relation_lover = root - } - } - } - save_scope_as = participant_to_blame - } - } - } -} - -hunt_murder_confession_opinion_effect = { - scope:activity = { - every_attending_character = { #All honorable participants lose opinion - limit = { - this != root - this != scope:murder_target - is_alive = yes - ai_honor >= high_positive_honor - } - custom = hunt.1014.all_honorable_hunt_participants - add_opinion = { - modifier = opinion_acting_strange - target = root - } - } - every_attending_character = { #All evil participants gain opinion - limit = { - this != root - this != scope:murder_target - is_alive = yes - OR = { - has_trait = sadistic - opinion = { - target = scope:murder_target - value <= -30 - } - } - } - custom = hunt.1014.all_who_dislike_or_are_evil - add_opinion = { - modifier = cruelty_opinion - target = root - opinion = 10 - } - } - } -} - -hunt_increment_murder_accident_attempt = { - if = { - limit = { exists = var:hunt_murder_accident_attempt } - change_variable = { - name = hunt_murder_accident_attempt - add = 1 - } - set_variable = { - name = hunt_murder_accident_attempt - value = var:hunt_murder_accident_attempt - years = 10 - } - custom_tooltip = hunt_attempted_accident_murder_tt - } - else = { - set_variable = { - name = hunt_murder_accident_attempt - value = 1 - years = 10 - } - } -} - -hunt_animal_from_death_effect = { - $DEAD$ = { - switch = { - trigger = death_reason - death_deer = { - $TARGET$ = { set_variable = { name = animal_type value = flag:stag } } - } - death_moose = { - $TARGET$ = { set_variable = { name = animal_type value = flag:elk } } - } - death_bear = { - $TARGET$ = { set_variable = { name = animal_type value = flag:bear } } - } - death_boar = { - $TARGET$ = { set_variable = { name = animal_type value = flag:boar } } - } - death_antelope = { - $TARGET$ = { set_variable = { name = animal_type value = flag:antelope } } - } - death_gazelle = { - $TARGET$ = { set_variable = { name = animal_type value = flag:gazelle } } - } - death_bison = { - $TARGET$ = { set_variable = { name = animal_type value = flag:bison } } - } - death_aurochs = { - $TARGET$ = { set_variable = { name = animal_type value = flag:aurochs } } - } - death_wolf = { - $TARGET$ = { set_variable = { name = animal_type value = flag:wolf } } - } - death_hyena = { - $TARGET$ = { set_variable = { name = animal_type value = flag:hyena } } - } - death_lion = { - $TARGET$ = { set_variable = { name = animal_type value = flag:lion } } - } - death_tiger = { - $TARGET$ = { set_variable = { name = animal_type value = flag:tiger } } - } - death_leopard = { - $TARGET$ = { set_variable = { name = animal_type value = flag:leopard } } - } - death_lynx = { - $TARGET$ = { set_variable = { name = animal_type value = flag:lynx } } - } - death_roe = { - $TARGET$ = { set_variable = { name = animal_type value = flag:roe } } - } - death_hart = { - $TARGET$ = { set_variable = { name = animal_type value = flag:hart } } - } - } - } -} - -hunt_chance_for_no_pelt_effect = { - # Chance for no pelt reward - if = { - limit = { has_royal_court = yes } - random = { - chance = 50 - custom_tooltip = hunt_pelt_damaged_tt - scope:activity = { set_variable = pelt_damaged } - } - } -} - -hunt_no_pelt_effect = { - if = { - limit = { has_royal_court = yes } - custom_tooltip = hunt_pelt_damaged_tt - scope:activity = { set_variable = pelt_damaged } - } -} - -hunt_no_skull_effect = { - if = { - limit = { has_royal_court = yes } - custom_tooltip = hunt_skull_damaged_tt - scope:activity = { set_variable = skull_damaged } - } -} - -hunt_save_master_or_hunter_courtier_effect = { - if = { - limit = { - employs_court_position = master_of_hunt_court_position - court_position:master_of_hunt_court_position = { is_available = yes } - } - court_position:master_of_hunt_court_position = { save_scope_as = m_hunt } - } - else = { - random_courtier = { - limit = { - is_adult = yes - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } - } - weight = { - base = 10 - modifier = { - factor = 2 - has_trait = lifestyle_hunter - } - # Not priest - modifier = { - factor = 0 - is_clergy = yes - } - modifier = { - factor = 0 - hunt_dharmic_pacificist_trigger = yes - } - } - save_scope_as = m_hunt - } - } -} - -hunt_murder_add_and_reveal_attempted_murder = { - if = { - limit = { is_alive = yes } - hidden_effect = { - add_secret = { - type = secret_murder_attempt - target = root - } - } - random_secret = { - type = secret_murder_attempt - limit = { - secret_target = root - } - reveal_to_without_events_effect = { CHARACTER = root } - if = { - limit = { - exists = scope:bodyguard_appears - exists = scope:bodyguard - scope:bodyguard = { is_alive = yes } - } - reveal_to_without_events_effect = { CHARACTER = scope:bodyguard } - } - } - } -} - -hunt_gift_trophy_opinion_effect = { - if = { - limit = { - $RECIPIENT$ != scope:host - } - if = { - limit = { - hunt_dharmic_pacificist_trigger = yes - } - add_opinion = { - target = scope:host - modifier = hunt_dharmic_mercy_opinion - opinion = -10 - } - } - else_if = { - limit = { - scope:activity = { - has_activity_option = { category = special_type option = hunt_type_legendary } - } - } - activity_improve_relations_intent_effect = { - CHARACTER = scope:host - REASON = friend_gave_hunt_trophy_reason - OPINION = 20 - MODIFIER = hunt_gifted_trophy_opinion - } - } - else_if = { - limit = { - $RECIPIENT$ = { is_adult = yes } - scope:newly_created_artifact = { - OR = { - artifact_type = animal_trinket - artifact_type = bird_feather - } - } - NOT = { - hunt_animal_type_predator_trigger = { VAR = scope:activity.var:animal_type } - } - } - activity_improve_relations_intent_effect = { - CHARACTER = scope:host - REASON = friend_gave_hunt_trophy_reason - OPINION = 5 - MODIFIER = hunt_gifted_trophy_opinion - } - } - else_if = { - limit = { - $RECIPIENT$ = { is_adult = yes } - scope:newly_created_artifact = { - hunt_activity_large_game_trigger = { VAR = var:animal_type } - } - } - activity_improve_relations_intent_effect = { - CHARACTER = scope:host - REASON = friend_gave_hunt_trophy_reason - OPINION = 15 - MODIFIER = hunt_gifted_trophy_opinion - } - } - else = { - activity_improve_relations_intent_effect = { - CHARACTER = scope:host - REASON = friend_gave_hunt_trophy_reason - OPINION = 10 - MODIFIER = hunt_gifted_trophy_opinion - } - } - } -} - -hunt_complete_remove_sightings_effect = { # Remove sightings - scope:activity = { - if = { - limit = { - activity_location.county.var:sighting_owner ?= scope:host - OR = { - # Standard/dangerous - AND = { - has_activity_option = { category = special_type option = hunt_type_standard } - activity_location.county = { - OR = { - has_county_modifier = hunt_sighting_standard_modifier - has_county_modifier = hunt_sighting_dangerous_modifier - } - } - } - # Falconry - AND = { - has_activity_option = { category = special_type option = hunt_type_falconry } - activity_location.county = { has_county_modifier = hunt_sighting_falconry_modifier } - } - } - } - # Remove sighting and trackers - activity_location.county = { hunt_remove_sighting_effect = yes } - } - else_if = { - limit = { - has_activity_option = { category = special_type option = hunt_type_legendary } - NOT = { exists = var:hunt_4013 } # Sighting already created - } - # Create new sighting - activity_location.county = { - hunt_create_sighting_effect = { - TYPE = legendary - ANIMAL = scope:activity.var:animal_type - OWNER = scope:host - } - } - } - } -} - -hunt_outcome_scope_effect = { - # Scopes - if = { - limit = { - exists = scope:activity.var:accident_target - scope:activity.var:accident_target != scope:host - } - scope:activity.var:accident_target = { save_scope_as = wounded_courtier } - } - if = { - limit = { exists = scope:activity.var:participant_to_use } - scope:activity.var:participant_to_use = { save_scope_as = hunt_participant } - } - else = { - hunt_activity_random_subordinate_participant_effect = { - ARCHETYPE = hunter - COMBATANT = yes - SCOPE = hunt_participant - } - } - if = { - limit = { - exists = intent_target - this != intent_target - } - intent_target = { - save_scope_as = intentee - save_scope_as = pertinent - } - } - else_if = { - limit = { exists = scope:hunt_participant } - save_scope_as = pertinent - } -} - -hunt_complete_slay_beast_intent_effect = { - if = { - limit = { - exists = involved_activity - has_activity_intent = slay_beast_intent - is_alive = yes - } - save_scope_as = intent_completer - hidden_effect = { - send_interface_toast = { - title = activity_intent_complete_toast - left_icon = scope:intent_completer - complete_activity_intent = yes - if = { - limit = { exists = scope:group_kill } - if = { - limit = { - OR = { - involved_activity.var:animal_type ?= flag:hare - involved_activity.var:animal_type ?= flag:fox - } - } - stress_impact = { base = miniscule_stress_impact_loss } - } - else = { - stress_impact = { base = minor_stress_impact_loss } - } - } - else = { - if = { - limit = { - OR = { - involved_activity.var:animal_type ?= flag:hare - involved_activity.var:animal_type ?= flag:fox - } - } - stress_impact = { base = minor_stress_impact_loss } - } - else = { - stress_impact = { base = major_stress_impact_loss } - } - } - } - } - show_as_tooltip = { - if = { - limit = { exists = scope:group_kill } - stress_impact = { base = minor_stress_impact_loss } - } - else = { - stress_impact = { base = major_stress_impact_loss } - } - } - } -} - -hunt_animal_slayer_memory_effect = { - if = { - limit = { - is_alive = yes - scope:activity.var:hunt_success ?= flag:yes - exists = scope:activity.var:kill_animal_type - } - create_character_memory = { - type = hunt_animal_slayer_memory - - participants = { - animal_slayer = scope:animal_slayer - host = scope:host - } - } - ordered_memory = { - memory_type = hunt_animal_slayer_memory - order_by = memory_creation_date - save_scope_as = new_memory - set_variable = { - name = animal_type - value = scope:activity.var:kill_animal_type - } - set_variable = { - name = location - value = scope:activity.activity_location - } - } - } -} - -hunt_trophy_recipient_scope_effect = { - # Save potential gift recipient - if = { - limit = { - intent_target ?= { is_alive = yes } - OR = { - has_activity_intent = woo_attendee_intent - has_activity_intent = befriend_attendee_intent - AND = { - has_activity_intent = impose_obedience_intent - scope:host.intent_target = { # They're not obedient to you already - NOT = { is_obedient_to = scope:host } - } - } - } - } - intent_target = { save_scope_as = trophy_recipient } - } - else = { - every_child = { - limit = { hunt_trophy_recipient_trigger = yes } - add_to_list = trophy_recipients - } - every_consort = { - limit = { hunt_trophy_recipient_trigger = yes } - add_to_list = trophy_recipients - } - every_close_family_member = { - limit = { hunt_trophy_recipient_trigger = yes } - add_to_list = trophy_recipients - } - every_relation = { - type = friend - type = lover - type = potential_friend - type = potential_lover - add_to_list = trophy_recipients - } - random_in_list = { - list = trophy_recipients - limit = { - trigger_if = { - limit = { - exists = scope:newly_created_artifact - scope:newly_created_artifact = { - OR = { - artifact_type = animal_hide_big - artifact_type = animal_hide - artifact_type = animal_skull - } - } - } - has_royal_court = yes - } - NOR = { - scope:animal_slayer ?= this - hunt_dharmic_pacificist_trigger = yes - } - this != root - } - alternative_limit = { - NOT = { scope:animal_slayer ?= this } - this != root - } - weight = { - base = 1 - modifier = { - add = 10 - OR = { - has_relation_potential_friend = root - has_relation_potential_lover = root - } - } - } - save_scope_as = trophy_recipient - } - } -} - -hunt_create_trophy_effect = { - # Scopes for artifact loc - if = { - limit = { - NOT = { exists = scope:animal_slayer } - } - if = { - limit = { exists = scope:credit_taker } - scope:credit_taker = { save_scope_as = animal_slayer } - } - else = { - scope:host = { save_scope_as = animal_slayer } - } - } - # Create trophy artifact - hidden_effect = { - random_list = { - 100 = { # Create Skull - trigger = { - has_royal_court = yes - exists = scope:activity.var:animal_type - can_animal_produce_skull_trigger = { VARIABLE = scope:activity.var:animal_type } - scope:activity = { - NOR = { - AND = { - hunt_activity_deer_game_trigger = { VAR = var:animal_type } - exists = scope:activity.var:female_quarry - } - exists = var:skull_damaged - has_activity_option = { category = special_type option = hunt_type_falconry } - } - } - } - modifier = { # Already have one of the same - factor = 0.5 - any_character_artifact = { - artifact_type = animal_skull - exists = var:animal_type - var:animal_type = scope:activity.var:animal_type - } - } - create_artifact_wall_skull_effect = { - OWNER = root - HUNTER = scope:animal_slayer - LEGENDARY = no - ANIMAL = scope:activity.var:animal_type - } - } - 100 = { # Create Hide - trigger = { - has_royal_court = yes - exists = scope:activity.var:animal_type - scope:activity = { - NOR = { - exists = scope:activity.var:pelt_damaged - has_activity_option = { category = special_type option = hunt_type_falconry } - } - } - } - modifier = { # Already have one - factor = 0.5 - trigger_if = { - limit = { - hunt_hide_big_trigger = { VARIABLE = scope:activity.var:animal_type } - } - any_character_artifact = { - artifact_type = animal_hide_big - exists = var:animal_type - var:animal_type = scope:activity.var:animal_type - } - } - trigger_else = { - any_character_artifact = { - artifact_type = animal_hide - exists = var:animal_type - var:animal_type = scope:activity.var:animal_type - } - } - } - create_artifact_animal_hide_effect = { - OWNER = root - HUNTER = scope:animal_slayer - LEGENDARY = no - ANIMAL = scope:activity.var:animal_type - } - } - 5 = { # Create Trinket - trigger = { - scope:activity = { # Must be hare if Falconry - trigger_if = { - limit = { - has_activity_option = { category = special_type option = hunt_type_falconry } - } - var:animal_type = flag:hare - } - NAND = { - hunt_activity_deer_game_trigger = { VAR = var:animal_type } - exists = scope:activity.var:female_quarry - } - NOT = { - has_activity_option = { category = special_type option = hunt_type_falconry } - } - } - } - create_artifact_animal_trinket_effect = { - OWNER = root - HUNTER = scope:animal_slayer - LEGENDARY = no - ANIMAL = scope:activity.var:animal_type - } - } - 5 = { # Create Feather - trigger = { - scope:activity = { - has_activity_option = { category = special_type option = hunt_type_falconry } - } - NOT = { scope:activity.var:animal_type = flag:hare } - } - create_artifact_bird_feather_effect = { - OWNER = root - HUNTER = root - ANIMAL = scope:activity.var:animal_type - } - } - } - if = { - limit = { exists = scope:newly_created_artifact } - scope:activity = { - add_to_variable_list = { - name = artifact_rewards - target = scope:newly_created_artifact - } - } - } - } -} - -hunt_save_hostile_accomplice_effect = { - if = { - limit = { - any_in_list = { - list = $SCHEME$_agents - is_ai = yes - is_participant_in_activity = scope:activity - NOR = { - this = root - trigger_if = { - limit = { exists = scope:accomplice } - this = scope:accomplice - } - } - } - } - random_in_list = { - list = $SCHEME$_agents - limit = { - is_ai = yes - is_participant_in_activity = scope:activity - NOR = { - this = root - trigger_if = { - limit = { exists = scope:accomplice } - this = scope:accomplice - } - } - save_temporary_scope_as = $SCHEME$er_temp - } - weight = { - base = 1 - hunt_murderer_modifier = { MURDERER = scope:$SCHEME$er_temp TARGET = $VICTIM$ } - } - save_scope_as = accomplice - } - } - if = { - limit = { - any_in_list = { - list = $SCHEME$_agents - is_ai = yes - is_participant_in_activity = scope:activity - NOR = { - this = root - trigger_if = { - limit = { exists = scope:accomplice } - this = scope:accomplice - } - } - } - } - random_in_list = { - list = $SCHEME$_agents - limit = { - is_ai = yes - is_participant_in_activity = scope:activity - NOR = { - this = root - trigger_if = { - limit = { exists = scope:accomplice } - this = scope:accomplice - } - } - save_temporary_scope_as = $SCHEME$er_temp - } - weight = { - base = 1 - hunt_murderer_modifier = { MURDERER = scope:$SCHEME$er_temp TARGET = $VICTIM$ } - } - save_scope_as = accomplice_2 - } - } -} - -hunt_invalidation_event_effect = { - if = { - limit = { is_in_list = attendees } - if = { - limit = { - scope:activity = { - has_activity_option = { category = special_type option = hunt_type_falconry } - } - } - hunter_lifestyle_rank_up_check_effect = { FALCONRY = yes } - } - else = { - hunter_lifestyle_rank_up_check_effect = { FALCONRY = no } - } - } - if = { - limit = { exists = scope:activity } - custom_tooltip = hunt_ends_tt - } - custom_tooltip = hunt_invalidated_warning_tt -} - -# Unified effect for adding sightings to counties -hunt_create_sighting_effect = { - if = { - limit = { NOT = { exists = scope:sighting_county } } - save_scope_as = sighting_county - } - # Track who can use the sighting - set_variable = { - name = animal_type - years = 3 - value = $ANIMAL$ - } - # Track who can use the sighting - set_variable = { - name = sighting_owner - years = 3 - value = $OWNER$ - } - # Stop sightings in the same place too regularly - set_variable = { - name = recent_sighting - years = 10 - } - # Add sighting modifier - add_county_modifier = { - modifier = hunt_sighting_$TYPE$_modifier - years = 3 - desc = hunt_sighting_$TYPE$_modifier_custom_desc - } -} - -hunt_remove_sighting_effect = { - # Remove sighting modifier - if = { - limit = { has_county_modifier = hunt_sighting_standard_modifier } - remove_county_modifier = hunt_sighting_standard_modifier - } - if = { - limit = { has_county_modifier = hunt_sighting_dangerous_modifier } - remove_county_modifier = hunt_sighting_dangerous_modifier - } - if = { - limit = { has_county_modifier = hunt_sighting_legendary_modifier } - remove_county_modifier = hunt_sighting_legendary_modifier - } - if = { - limit = { has_county_modifier = hunt_sighting_falconry_modifier } - remove_county_modifier = hunt_sighting_falconry_modifier - } - # Remove sightings - remove_variable = animal_type - remove_variable = sighting_owner -} - -### Nerge -nerge_rewards_effect = { - if = { - limit = { - scope:activity.var:activity_special_type_progression < 25 - } - scope:host = { - add_dread = unimpressive_nerge_dread_value - } - } - else_if = { - limit = { - scope:activity.var:activity_special_type_progression < 50 - } - scope:host = { - add_dread = regular_nerge_dread_value - add_prestige = regular_nerge_prestige_value - add_gold = regular_nerge_gold_value - add_legitimacy = regular_nerge_legitimacy_value - } - scope:activity = { - every_attending_character = { - custom = every_nerge_character - limit = { - NOT = { this = scope:host } - } - add_prestige = regular_nerge_guest_prestige_value - } - } - } - else_if = { - limit = { - scope:activity.var:activity_special_type_progression < 75 - } - scope:host = { - add_dread = impressive_nerge_dread_value - add_prestige = impressive_nerge_prestige_value - add_gold = impressive_nerge_gold_value - add_legitimacy = impressive_nerge_legitimacy_value - } - scope:activity = { - every_attending_character = { - custom = every_nerge_character - limit = { - NOT = { this = scope:host } - } - add_prestige = impressive_nerge_guest_prestige_value - } - } - } - else_if = { - limit = { - scope:activity.var:activity_special_type_progression < 100 - } - scope:host = { - add_dread = great_nerge_dread_value - add_prestige = great_nerge_prestige_value - add_gold = great_nerge_gold_value - add_legitimacy = great_nerge_legitimacy_value - } - scope:activity = { - every_attending_character = { - custom = every_nerge_character - limit = { - NOT = { this = scope:host } - } - custom_tooltip = nerge_commander_trait_tt - add_prestige = great_nerge_guest_prestige_value - } - } - } - else_if = { - limit = { - scope:activity.var:activity_special_type_progression >= 100 - } - scope:host = { - add_dread = fantastic_nerge_dread_value - add_prestige = fantastic_nerge_prestige_value - add_gold = fantastic_nerge_gold_value - add_legitimacy = fantastic_nerge_legitimacy_value - add_martial_skill = fantastic_nerge_martial_value - # MPO ACHIEVEMENT Shut up, Nerge - if = { - limit = { is_ai = no } - add_achievement_global_variable_effect = { - VARIABLE = mpo_shut_up_nerge_achievement_unlocked - VALUE = yes - } - } - } - scope:activity = { - every_attending_character = { - custom = every_nerge_character - limit = { - NOT = { this = scope:host } - } - custom_tooltip = nerge_commander_trait_tt - add_prestige = fantastic_nerge_guest_prestige_value - add_martial_skill = fantastic_nerge_guest_martial_value - } - } - } -} - -hand_out_nerge_rewards = { - if = { - limit = { - this = scope:host - } - scope:activity = { - add_activity_log_entry = { - key = finished_nerge_$OUTCOME$ - character = scope:host - show_in_conclusion = yes - scope:host = { nerge_rewards_effect = yes } - } - } - } - else = { - show_as_tooltip = { - nerge_rewards_effect = yes - } - } -} - -nerge_check_commander_trait_effect = { - prev = { - if = { - limit = { - NOT = { has_trait = $TRAIT$ } - } - add_trait_force_tooltip = $TRAIT$ - } - } -} - -nerge_check_commander_trait_xp_effect = { - prev = { - if = { - limit = { - has_trait = $TRAIT$ - } - add_trait_xp = { - trait = $TRAIT$ - value = 10 - } - } - } -} - -nerge_commander_trait_effect = { - scope:nerge_location = { - switch = { - trigger = terrain - plains = { - nerge_check_commander_trait_xp_effect = { TRAIT = open_terrain_expert } - } - farmlands = { - nerge_check_commander_trait_xp_effect = { TRAIT = open_terrain_expert } - } - steppe = { - nerge_check_commander_trait_xp_effect = { TRAIT = open_terrain_expert } - } - wetlands = { - nerge_check_commander_trait_xp_effect = { TRAIT = rough_terrain_expert } - } - hills = { - nerge_check_commander_trait_xp_effect = { TRAIT = rough_terrain_expert } - } - mountains = { - nerge_check_commander_trait_xp_effect = { TRAIT = rough_terrain_expert } - } - desert = { - nerge_check_commander_trait_xp_effect = { TRAIT = rough_terrain_expert } - } - desert_mountains = { - nerge_check_commander_trait_xp_effect = { TRAIT = desert_warrior } - } - oasis = { - nerge_check_commander_trait_xp_effect = { TRAIT = desert_warrior } - } - drylands = { - nerge_check_commander_trait_xp_effect = { TRAIT = desert_warrior } - } - jungle = { - nerge_check_commander_trait_xp_effect = { TRAIT = jungle_stalker } - } - forest = { - nerge_check_commander_trait_xp_effect = { TRAIT = forest_fighter } - } - taiga = { - nerge_check_commander_trait_xp_effect = { TRAIT = forest_fighter } - } - floodplains = { - nerge_check_commander_trait_xp_effect = { TRAIT = forder } - } - } - } - if = { - limit = { - number_of_commander_traits < 3 - } - scope:nerge_location = { - switch = { - trigger = terrain - plains = { - nerge_check_commander_trait_effect = { TRAIT = open_terrain_expert } - } - farmlands = { - nerge_check_commander_trait_effect = { TRAIT = open_terrain_expert } - } - steppe = { - nerge_check_commander_trait_effect = { TRAIT = open_terrain_expert } - } - wetlands = { - nerge_check_commander_trait_effect = { TRAIT = rough_terrain_expert } - } - hills = { - nerge_check_commander_trait_effect = { TRAIT = rough_terrain_expert } - } - mountains = { - nerge_check_commander_trait_effect = { TRAIT = rough_terrain_expert } - } - desert = { - nerge_check_commander_trait_effect = { TRAIT = rough_terrain_expert } - } - desert_mountains = { - nerge_check_commander_trait_effect = { TRAIT = desert_warrior } - } - oasis = { - nerge_check_commander_trait_effect = { TRAIT = desert_warrior } - } - drylands = { - nerge_check_commander_trait_effect = { TRAIT = desert_warrior } - } - jungle = { - nerge_check_commander_trait_effect = { TRAIT = jungle_stalker } - } - forest = { - nerge_check_commander_trait_effect = { TRAIT = forest_fighter } - } - taiga = { - nerge_check_commander_trait_effect = { TRAIT = forest_fighter } - } - floodplains = { - nerge_check_commander_trait_effect = { TRAIT = forder } - } - } - } - } -} - -nerge_progression_effect = { - save_temporary_scope_as = root_scope - save_scope_value_as = { - name = amount_of_players - value = { - value = 1 - scope:activity = { - every_attending_character = { - limit = { - is_ai = no - } - add = 1 - } - subtract = 1 - } - min = 1 - } - } - if = { - limit = { - OR = { - is_ai = no - AND = { - NOT = { - involved_activity = { any_attending_character = { is_ai = no } } - } - scope:root_scope = involved_activity.activity_host - } - } - } - scope:activity ?= { - if = { - limit = { - exists = var:activity_special_type_progression - } - change_variable = { - name = activity_special_type_progression - add = { - value = $VALUE$ - multiply = nerge_score_multiplier_value - divide = scope:amount_of_players - } - } - } - } - if = { - limit = { - $VALUE$ <= 2 - } - custom_tooltip = nerge_outcome_boost_tiny - } - else_if = { - limit = { - $VALUE$ <= 5 - } - custom_tooltip = nerge_outcome_boost_small - } - else_if = { - limit = { - $VALUE$ <= 9 - } - custom_tooltip = nerge_outcome_boost_medium - } - else_if = { - limit = { - $VALUE$ >= 13 - } - custom_tooltip = nerge_outcome_boost_large - } - } -} - -nerge_progression_tiny_effect = { nerge_progression_effect = { VALUE = 2 } } -nerge_progression_small_effect = { nerge_progression_effect = { VALUE = 5 } } -nerge_progression_medium_effect = { nerge_progression_effect = { VALUE = 9 } } -nerge_progression_large_effect = { nerge_progression_effect = { VALUE = 13 } } diff --git a/N3OW/common/scripted_effects/00_interaction_effects.txt b/N3OW/common/scripted_effects/00_interaction_effects.txt deleted file mode 100644 index 32071b81..00000000 --- a/N3OW/common/scripted_effects/00_interaction_effects.txt +++ /dev/null @@ -1,4818 +0,0 @@ - -####################################################################### -# EFFECT LIST -####################################################################### -# !!! Remember to add all new effects with a short description here !!! -####################################################################### - -blackmail_interaction_effect = { - scope:actor = { - if = { - limit = { exists = scope:target } - blackmail_target_with_secret_effect = { SECRET = scope:target TARGET = scope:recipient } - reverse_add_opinion = { - modifier = blackmailing_me_opinion - target = scope:recipient - } - } - if = { - limit = { has_government = administrative_government } - if = { - limit = { - scope:target = { is_criminal_for = scope:recipient } - } - change_influence = medium_influence_gain - } - else_if = { - limit = { - scope:target = { is_shunned_for = scope:recipient } - } - change_influence = minor_influence_gain - } - else = { change_influence = miniscule_influence_gain } - } - stress_impact = { - compassionate = medium_stress_impact_gain - trusting = medium_stress_impact_gain - honest = minor_stress_impact_gain - just = minor_stress_impact_gain - forgiving = minor_stress_impact_gain - } - } - scope:target = { - if = { - limit = { - exists = var:promised_not_to_reveal - var:promised_not_to_reveal = scope:actor - } - scope:recipient = { - add_opinion = { - target = scope:actor - modifier = broke_promise - } - } - } - } - scope:recipient = { #Nudge towards rivalry - if = { - limit = { - NOR = { - has_relation_rival = scope:actor - has_relation_potential_rival = scope:actor - } - } - set_relation_potential_rival = scope:actor - } - } -} - -torture_blind_castrate_disfigure_opinion_effect = { - scope:recipient = { - add_opinion = { - modifier = $VERB$_me - target = scope:actor - } - if = { - limit = { - has_opinion_modifier = { - modifier = grateful_opinion - target = scope:actor - } - } - remove_opinion = { - modifier = grateful_opinion - target = scope:actor - } - } - - if = { - limit = { - primary_spouse ?= { is_alive = yes } - NOT = { primary_spouse = { this = scope:actor } } - } - primary_spouse = { add_to_list = family_of_tortured } - } - every_close_family_member = { - limit = { this != scope:actor } - add_to_list = family_of_tortured - } - if = { - limit = { - any_in_list = { - list = family_of_tortured - count = 1 - always = yes - } - } - every_in_list = { - list = family_of_tortured - add_opinion = { - target = scope:actor - modifier = $VERB$_family_member - } - } - } - else_if = { - limit = { - any_in_list = { - list = family_of_tortured - count > 1 - always = yes - } - } - every_in_list = { - list = family_of_tortured - custom = all_close_family_and_spouses - add_opinion = { - target = scope:actor - modifier = $VERB$_family_member - } - } - } - } -} - - -torture_interaction_actor_effect = { - scope:actor = { - ###SECRETS### - custom_tooltip = torture_interaction_actor_effects.secrets.tt - - - ###STRESS### - - #Stress loss if they are my rival I hate them - if = { - limit = { has_relation_rival = scope:recipient } - - if = { - limit = { - NOR = { - has_trait = sadistic - has_trait = vengeful - has_trait = compassionate - has_trait = forgiving - } - } - add_stress = medium_stress_loss - } - else = { - stress_impact = { - sadistic = major_stress_impact_loss - vengeful = massive_stress_impact_loss - compassionate = minor_stress_impact_gain - forgiving = minor_stress_impact_gain - } - } - } - else_if = { # Torturing infidels is relaxing - limit = { - has_trait = zealous - scope:actor.faith != scope:recipient.faith - } - - if = { - limit = { - NOR = { - has_trait = sadistic - has_trait = compassionate - has_trait = forgiving - } - } - add_stress = medium_stress_loss - } - else = { - stress_impact = { - sadistic = major_stress_impact_loss - compassionate = minor_stress_impact_gain - forgiving = minor_stress_impact_gain - } - } - } - else_if = { - limit = { - NOT = { - has_trait = sadistic - } - scope:recipient = { - OR = { - is_child_of = scope:actor - is_grandchild_of = scope:actor - is_great_grandchild_of = scope:actor - } - } - } - stress_impact = { - base = medium_stress_impact_loss - compassionate = massive_stress_impact_gain - craven = major_stress_impact_gain - just = medium_stress_impact_gain - forgiving = major_stress_impact_gain - generous = medium_stress_impact_gain - trusting = minor_stress_impact_gain - content = minor_stress_impact_gain - family_first = minor_stress_impact_gain - } - } - else = { - stress_impact = { - sadistic = medium_stress_impact_loss - compassionate = major_stress_impact_gain - craven = major_stress_impact_gain - just = medium_stress_impact_gain - forgiving = medium_stress_impact_gain - generous = medium_stress_impact_gain - trusting = minor_stress_impact_gain - content = minor_stress_impact_gain - } - } - - ###DREAD### - if = { - limit = { - scope:recipient = { - OR = { - is_powerful_vassal_of = scope:actor # Is your powerful vassal - AND = { # Is an Emperor - exists = primary_title - primary_title.tier >= tier_empire - } - target_is_vassal_or_below = scope:actor # Your liege/s - scope:actor.faith.religious_head = scope:recipient # Your head of faith - } - } - } - add_dread = torture_interaction_massive_dread_gain - } - else_if = { - limit = { - scope:recipient = { - OR = { - AND = { # Is your vassal, and higher than Baron - is_vassal_of = scope:actor - primary_title.tier > tier_barony - } - AND = { # Is a King - exists = primary_title - primary_title.tier >= tier_kingdom - } - } - } - } - add_dread = torture_interaction_major_dread_gain - } - else_if = { - limit = { - scope:recipient = { - OR = { - scope:actor = { # Torturing close family of your vassals is dreadful... - any_vassal = { - is_close_family_of = scope:recipient - } - } - scope:actor = { # Torturing close family of your liege/s is the same... - any_liege_or_above = { - is_close_family_of = scope:recipient - } - } - AND = { # Peer Vassals - exists = primary_title - primary_title.tier > tier_barony - liege ?= scope:actor.liege - } - AND = { # Is a Duke - exists = primary_title - primary_title.tier >= tier_duchy - } - } - } - } - add_dread = torture_interaction_medium_dread_gain - } - else_if = { - limit = { - scope:recipient = { - OR = { - is_spouse_of = scope:actor # Your own spouse - is_close_or_extended_family_of = scope:actor # Your own family - AND = { - exists = primary_title - primary_title.tier >= tier_county # Is a Count - } - scope:actor = { # Torturing extended family of your vassals is dreadful... - any_vassal = { - is_extended_family_of = scope:recipient - } - } - scope:actor = { # Torturing extended family of your liege/s is the same... - any_liege_or_above = { - is_extended_family_of = scope:recipient - } - } - } - } - } - add_dread = torture_interaction_minor_dread_gain - } - - - ###OPINIONS### - torture_blind_castrate_disfigure_opinion_effect = { VERB = tortured } - - ###CHURCH OPINION & PIETY### - if = { - limit = { - NOR = { - faith = { has_doctrine = tenet_exaltation_of_pain } - - # Divine Retribution cancels out faith-based penalties - has_perk = divine_retribution_perk - } - } - add_piety = medium_piety_loss - - if = { - limit = { - any_learning_councillor = { - opinion = { - target = scope:recipient - value >= neutral_opinion - } - } - } - random_learning_councillor = { - add_opinion = { - modifier = impious_opinion - opinion = -10 - target = scope:actor - } - } - } - } - else_if = { - limit = { - faith = { has_doctrine = tenet_exaltation_of_pain } - } - add_piety = medium_piety_gain - } - } -} - -torturer_interaction_recipient_effect = { - scope:recipient = { - add_character_modifier = { - modifier = recently_tortured - years = 5 - } - - # Poetry does not cause lunacy. - if = { - limit = { - NOT = { scope:torture_method = flag:poetry } - } - random = { - chance = 5 - modifier = { - scope:actor = { has_trait = torturer } - add = 10 - } - add_trait = lunatic_1 - } - } - - if = { - limit = { - NOR = { - has_trait = craven - has_trait = brave - } - } - add_stress = massive_stress_impact_gain - } - else = { - stress_impact = { - craven = monumental_stress_gain - brave = medium_stress_impact_gain - } - } - - if = { # Remove the flag blocking other prison interactions - limit = { has_character_flag = is_being_tortured } - remove_character_flag = is_being_tortured - } - - torture_memory_effect = { - VICTIM = scope:recipient - TORTURER = scope:actor - TYPE = torture - } - } -} - -illegal_imprisonment_dread_effect = { - ###DREAD### - scope:actor = { - if = { - limit = { - NOT = { - has_imprisonment_reason = scope:recipient - } - } - if = { - limit = { - OR = { - is_spouse_of = scope:recipient - is_close_family_of = scope:recipient - scope:recipient = { tier_or_related_liege_tier_greater_or_equal_trigger = { TIER = tier_kingdom } } - } - } - add_dread = medium_dread_gain - } - else_if = { - limit = { - OR = { - scope:recipient = { tier_or_related_liege_tier_equal_trigger = { TIER = tier_duchy } } - scope:recipient = { tier_or_related_liege_tier_equal_trigger = { TIER = tier_county } } - } - } - add_dread = minor_dread_gain - } - } - } -} - -blind_castrate_and_disfigure_effect = { - ###STRESS## - scope:actor = { - if = { - limit = { has_relation_rival = scope:recipient } - - if = { - limit = { - NOR = { - has_trait = sadistic #Extra stress - has_trait = vengeful #Extra stress - has_trait = compassionate #Lessened impact - has_trait = forgiving #Lessened impact - } - } - add_stress = medium_stress_loss - } - else = { - stress_impact = { - sadistic = major_stress_impact_loss - vengeful = major_stress_impact_loss - compassionate = minor_stress_impact_gain - forgiving = minor_stress_impact_gain - } - } - } - #Regular stress - else = { - stress_impact = { - sadistic = minor_stress_impact_loss - compassionate = massive_stress_impact_gain - craven = major_stress_impact_gain - just = medium_stress_impact_gain - forgiving = medium_stress_impact_gain - generous = medium_stress_impact_gain - trusting = minor_stress_impact_gain - gregarious = minor_stress_impact_gain - calm = minor_stress_impact_gain - content = minor_stress_impact_gain - honest = minor_stress_impact_gain - } - } - - ###DREAD### - if = { - limit = { - OR = { - is_spouse_of = scope:recipient - is_close_family_of = scope:recipient - scope:recipient = { tier_or_related_liege_tier_greater_or_equal_trigger = { TIER = tier_kingdom } } #Kingdom & empire - } - } - add_dread = major_dread_gain - } - else_if = { - limit = { - OR = { - scope:recipient = { tier_or_related_liege_tier_equal_trigger = { TIER = tier_duchy } } - scope:recipient = { tier_or_related_liege_tier_equal_trigger = { TIER = tier_county } } - } - } - add_dread = medium_dread_gain - } - else = { - add_dread = minor_dread_gain - } - } -} - -blind_opinion_effect = { - ###OPINIONS### - scope:recipient = { - add_opinion = { - modifier = blinded_me - target = scope:actor - } - - if = { - limit = { - exists = primary_spouse - NOT = { primary_spouse = { this = scope:actor } } - } - primary_spouse = { add_to_list = family_of_blinded } - } - every_close_family_member = { - limit = { this != scope:actor } - add_to_list = family_of_blinded - } - if = { - limit = { - any_in_list = { - list = family_of_blinded - count = 1 - always = yes - } - } - every_in_list = { - list = family_of_blinded - add_opinion = { - target = scope:actor - modifier = blinded_family_member - } - } - } - else_if = { - limit = { - any_in_list = { - list = family_of_blinded - count > 1 - always = yes - } - } - every_in_list = { - list = family_of_blinded - custom = all_close_family_and_spouses - add_opinion = { - target = scope:actor - modifier = blinded_family_member - } - } - } - } -} - -blind_castrated_disfigured_recipient_support_effect = { #To be used in other effects - random = { - chance = 5 - add_trait = lunatic_1 - } - - if = { - limit = { - NOR = { - has_trait = craven - has_trait = brave - } - } - add_stress = major_stress_impact_gain - } - else = { - stress_impact = { - craven = massive_stress_gain - brave = medium_stress_impact_gain - } - } - add_character_flag = { #TO make sure that they don't get spammed about the release - flag = block_for_prison_release_notification - days = 2 - } - - release_from_prison = yes - - if = { # Remove the flag blocking other prison interactions - limit = { has_character_flag = is_being_tortured } - remove_character_flag = is_being_tortured - } -} - -blind_recipient_effect = { - scope:recipient = { - if = { - limit = { scope:actor = { is_ai = no } } - add_trait_force_tooltip = blind #This is because we want to show a blinded portrait it prison.1020 for players, then we add the trait in the immediate but we still want a tooltip - } - else = { - add_trait = blind - } - torture_memory_effect = { - VICTIM = scope:recipient - TORTURER = scope:actor - TYPE = blind - } - add_character_modifier = { - modifier = recently_blinded - years = 1 - } - blind_castrated_disfigured_recipient_support_effect = yes - } -} - -castrate_recipient_effect = { - scope:recipient = { - if = { - limit = { - age < 12 - } - ep3_child_castration_effect = yes - } - else = { - ep3_youth_castration_effect = yes - } - blind_castrated_disfigured_recipient_support_effect = yes - } -} - -disfigure_recipient_effect = { - scope:recipient = { - if = { - limit = { scope:actor = { is_ai = no } } - #This is because we want to show a blinded portrait it prison.1030 for players, then we add the trait in the immediate but we still want a tooltip - add_trait_force_tooltip = disfigured - } - else = { - add_trait = disfigured - } - torture_memory_effect = { - VICTIM = scope:recipient - TORTURER = scope:actor - TYPE = disfigured - } - add_character_modifier = { - modifier = recently_disfigured - years = 1 - } - blind_castrated_disfigured_recipient_support_effect = yes - } -} - -maimed_recipient_effect = { - scope:recipient = { - if = { - limit = { scope:maim_type = flag:arm } - if = { - limit = { scope:actor = { is_ai = no } } - #This is because we want to show a blinded portrait it prison.1030 for players, then we add the trait in the immediate but we still want a tooltip - apply_maimed_trait_and_modifier_effect = yes - } - else = { apply_maimed_trait_and_modifier_effect = yes } - torture_memory_effect = { - VICTIM = scope:recipient - TORTURER = scope:actor - TYPE = maim_arm - } - } - else_if = { - limit = { scope:maim_type = flag:leg } - if = { - limit = { scope:actor = { is_ai = no } } - #This is because we want to show a blinded portrait it prison.1030 for players, then we add the trait in the immediate but we still want a tooltip - add_trait_force_tooltip = one_legged - } - else = { add_trait = one_legged } - torture_memory_effect = { - VICTIM = scope:recipient - TORTURER = scope:actor - TYPE = maim_leg - } - add_character_modifier = { - modifier = recently_maimed_modifier - years = 1 - } - } - blind_castrated_disfigured_recipient_support_effect = yes - } -} - - -war_for_imprison_effect = { - scope:recipient = { - save_scope_value_as = { - name = war_for_imprisonment_flavour - value = yes - } - start_war = { - casus_belli = refused_liege_demand_war - target = scope:actor - } - } - # Disgruntled vassals - if = { - limit = { - scope:actor = { NOT = { has_imprisonment_reason = scope:recipient } } - } - scope:actor = { - every_vassal = { #Vassals joining the rebel. - limit = { - NOR = { - this = scope:recipient - is_ai = no - has_trait = incapable - is_imprisoned = yes - dread_modified_ai_boldness = { #Too scared to do anything. - dreaded_character = scope:actor - value <= -50 - } - is_at_war_with = scope:recipient - is_at_war_with = scope:actor - } - highest_held_title_tier > tier_barony - OR = { - #Lovers and friends always back rebel (unless also lovers/friends of the liege) - AND = { - OR = { - has_relation_lover = scope:recipient - has_relation_friend = scope:recipient - } - NOR = { - has_relation_lover = scope:actor - has_relation_friend = scope:actor - } - } - #Vassals that either like recipient or have high honor will rally if the liege is being tyrannical. - AND = { - OR = { - ai_honor >= 25 - opinion = { - target = scope:recipient - value >= 40 - } - AND = { - has_game_rule = hard_difficulty - scope:actor = { is_ai = no } - opinion = { - target = scope:recipient - value >= 20 - } - } - AND = { - has_game_rule = very_hard_difficulty - scope:actor = { is_ai = no } - opinion = { - target = scope:recipient - value >= 0 - } - } - } - NOT = { - scope:actor = { - has_imprisonment_reason = scope:recipient - } - } - } - #And finally, vassals that really hate their liege will join regardless (provided that they also do not hate recipient). - AND = { - OR = { - opinion = { - target = scope:recipient - value >= -25 - } - AND = { - has_game_rule = hard_difficulty - scope:actor = { is_ai = no } - opinion = { - target = scope:recipient - value >= -50 - } - } - AND = { - has_game_rule = very_hard_difficulty - scope:actor = { is_ai = no } - opinion = { - target = scope:recipient - value >= -75 - } - } - } - OR = { - opinion = { - target = scope:actor - value <= -40 - } - AND = { - has_game_rule = hard_difficulty - scope:actor = { is_ai = no } - opinion = { - target = scope:actor - value <= -20 - } - } - AND = { - has_game_rule = very_hard_difficulty - scope:actor = { is_ai = no } - opinion = { - target = scope:actor - value <= 0 - } - } - } - } - } - } - add_to_list = joining_vassals - } - } - } - # Bloc members join despite legality - if = { - limit = { - exists = scope:recipient.house.house_confederation - trigger_if = { - limit = { exists = scope:actor.house.house_confederation } - NOT = { scope:recipient = scope:actor.house.house_confederation.leading_house.house_head } - } - } - scope:recipient.top_liege ?= { - every_vassal = { - limit = { - highest_held_title_tier > tier_barony - house.house_confederation ?= scope:recipient.house.house_confederation - } - add_to_list = joining_vassals - } - } - } - every_in_list = { - list = joining_vassals - save_scope_as = joining_vassal - custom_tooltip = tooltip_fellow_vassal_joins_war #The war has not started when viewing the interaction screen. - hidden_effect = { - scope:recipient = { - every_character_war = { - limit = { - using_cb = refused_liege_demand_war - casus_belli = { - primary_attacker = scope:recipient - primary_defender = scope:actor - } - } - add_to_list = war_to_join - } - } - every_in_list = { - list = war_to_join - limit = { - NOT = { is_defender = prev } - } - hidden_effect = { - set_called_to = prev - } - add_attacker = prev - } - } - hidden_effect = { - scope:actor = { - add_opinion = { - target = prev - modifier = rebellious_vassal_opinion - } - } - } - } - every_player = { - limit = { is_vassal_of = scope:actor } - trigger_event = char_interaction.0232 - } - scope:recipient = { - add_opinion = { - target = scope:actor - modifier = attempted_arrest_opinion - } - } -} - -vassal_revocation_tyranny_effect = { #Despite its name this is referenced when _retracting_ vassals. - if = { - limit = { exists = scope:use_strife_not_tyranny } - # If you have revocation reason, we allow that. - if = { - limit = { has_revoke_title_reason = scope:recipient } - consume_revoke_title_reason = scope:recipient - } - else_if = { #Admin liege revoking from admin vassal - limit = { - government_allows = administrative - scope:recipient = { - government_allows = administrative - } - } - } - else = { change_strife_opinion = major_strife_gain } - } - else_if = { - limit = { - vassal_revocation_is_tyrannical_trigger = { VASSAL = scope:recipient } - } - # Special Legitimacy loss if you're revoking without a reason - if = { - limit = { has_legitimacy = yes } - add_legitimacy = minor_legitimacy_loss - } - add_tyranny = { - value = revoke_vassal_tyranny_gain - if = { - limit = { - scope:recipient = { - is_imprisoned = yes - NOT = { is_imprisoned_by = scope:actor } - } - NOT = { - scope:actor = { has_revoke_title_reason = scope:recipient } - } - } - multiply = 2 - } - } - } - else_if = { - limit = { - has_revoke_title_reason = scope:recipient - } - custom_tooltip = IS_ALLOWED_TO_REVOKE_VASSAL_DESC - } - else_if = { - limit = { - faith = { - OR = { - has_doctrine_parameter = pluralism_righteous_revocation_tyranny_reduced - has_doctrine_parameter = pluralism_fundamentalist_revocation_tyranny_minimal - } - faith_hostility_level = { - target = scope:recipient.faith - value >= faith_hostile_level - } - } - } - if = { - limit = { - faith = { - has_doctrine_parameter = pluralism_fundamentalist_revocation_tyranny_minimal - faith_hostility_level = { - target = scope:recipient.faith - value = faith_hostile_level - } - } - } - custom_tooltip = IS_ALLOWED_TO_REVOKE_HOSTILE_INFIDEL_VASSAL - } - else = { - custom_tooltip = IS_ALLOWED_TO_REVOKE_EVIL_INFIDEL_VASSAL - } - every_vassal = { - limit = { - faith = scope:recipient.faith - } - custom = INFIDEL_REVOCATION_OPINION - add_opinion = { - modifier = angry_opinion - target = scope:actor - opinion = { - value = revoke_vassal_tyranny_gain - multiply = -1 - } - } - } - } -} - -revocation_tyranny_effect = { - save_scope_as = liege_temp_scope - if = { - limit = { exists = scope:use_strife_not_tyranny } - # If you have revocation reason, we allow that. - if = { - limit = { has_revoke_title_reason = $VASSAL$ } - consume_revoke_title_reason = $VASSAL$ - } - else = { change_strife_opinion = major_strife_gain } - } - else_if = { - limit = { - title_revocation_is_tyrannical_trigger = { VASSAL = $VASSAL$ } - } - add_tyranny = revoke_title_tyranny_gain - # Special Legitimacy loss if you're revoking without a reason - if = { - limit = { - has_legitimacy = yes - NOT = { - scope:landed_title ?= { - duchy = scope:liege_temp_scope.capital_county.duchy - } - } - } - add_legitimacy = medium_legitimacy_loss - } - - #If my culture is different from the recipients - if = { - limit = { - NOT = { culture = $VASSAL$.culture } - } - $VASSAL$.culture = { - change_cultural_acceptance = { - target = scope:liege_temp_scope.culture - value = revoke_title_culture_acceptance_impact - desc = cultural_acceptance_loss_revokation - } - } - } - } - else = { - if = { - limit = { - title_revocation_is_admin_governor_trigger = { VASSAL = $VASSAL$ } - } - custom_description = { - text = IS_ALLOWED_TO_REVOKE_ADMIN_GOVERNMENT - subject = scope:liege_temp_scope - object = $VASSAL$ - } - } - else_if = { - limit = { - exists = scope:landed_title - has_claim_on = scope:landed_title - } - custom_tooltip = IS_ALLOWED_TO_REVOKE_TITLE_FOR_CLAIM_DESC - } - else_if = { - limit = { - has_revoke_title_reason = scope:recipient - } - custom_tooltip = IS_ALLOWED_TO_REVOKE_TITLE_DESC - } - else_if = { - limit = { - faith = { - OR = { - has_doctrine_parameter = pluralism_righteous_revocation_tyranny_reduced - has_doctrine_parameter = pluralism_fundamentalist_revocation_tyranny_minimal - } - faith_hostility_level = { - target = scope:recipient.faith - value >= faith_hostile_level - } - } - } - if = { - limit = { - faith = { - has_doctrine_parameter = pluralism_fundamentalist_revocation_tyranny_minimal - faith_hostility_level = { - target = scope:recipient.faith - value = faith_hostile_level - } - } - } - custom_tooltip = IS_ALLOWED_TO_REVOKE_HOSTILE_INFIDEL_TITLE - } - else = { - custom_tooltip = IS_ALLOWED_TO_REVOKE_EVIL_INFIDEL_TITLE - } - every_vassal = { - limit = { - faith = scope:recipient.faith - } - custom = INFIDEL_REVOCATION_OPINION - add_opinion = { - modifier = angry_opinion - target = scope:actor - opinion = { - value = revoke_title_tyranny_gain - multiply = -1 - } - } - } - } - } -} - -war_for_revoke_effect = { - $LIEGE$ = { save_temporary_scope_as = liege_temp } - $REBEL$ = { - save_temporary_scope_as = rebel_temp - save_scope_value_as = { - name = war_for_revocation_flavour - value = yes - } - start_war = { - casus_belli = refused_liege_demand_war - target = scope:liege_temp - } - } - scope:liege_temp = { - # Disgruntled vassals - if = { - limit = { - NOT = { has_revoke_title_reason = scope:rebel_temp } - } - every_vassal = { #Vassals joining the rebel. - custom = vassals_joining_war_tt - limit = { - NOR = { - this = scope:rebel_temp - is_ai = no - has_trait = incapable - is_imprisoned = yes - dread_modified_ai_boldness = { #Too scared to do anything. - dreaded_character = scope:liege_temp - value <= -50 - } - opinion = { # People who really, really like you will still back you - target = scope:liege_temp - value >= 80 - } - is_at_war_with = scope:rebel_temp - is_at_war_with = scope:liege_temp - } - highest_held_title_tier > tier_barony - OR = { - #Lovers and friends always back rebel (unless also lovers/friends of the liege) - AND = { - OR = { - has_relation_lover = scope:rebel_temp - has_relation_friend = scope:rebel_temp - } - NOR = { - has_relation_lover = scope:liege_temp - has_relation_friend = scope:liege_temp - } - } - #Vassals that either like recipient or have high honor will rally if the liege is being tyrannical. - AND = { - # If they can't join a faction against the liege they should not revolt - NOR = { - has_relation_lover = scope:liege_temp - has_relation_friend = scope:liege_temp - is_allied_to = scope:liege_temp - is_primary_heir_of = scope:liege_temp - scope:liege_temp = { has_strong_hook = prev } - has_dread_level_towards = { - target = scope:liege_temp - level = 2 - } - } - OR = { - ai_honor >= 25 - opinion = { - target = scope:rebel_temp - value >= 40 - } - AND = { - has_game_rule = hard_difficulty - scope:liege_temp = { is_ai = no } - opinion = { - target = scope:rebel_temp - value >= 20 - } - } - AND = { - has_game_rule = very_hard_difficulty - scope:liege_temp = { is_ai = no } - opinion = { - target = scope:rebel_temp - value >= 0 - } - } - } - NOR = { - scope:liege_temp = { has_revoke_title_reason = scope:rebel_temp } - trigger_if = { - limit = { exists = scope:landed_title } - scope:liege_temp = { has_claim_on = scope:landed_title } - } - faith = { - faith_hostility_level = { - target = scope:rebel_temp.faith - value >= faith_hostile_level - } - } - } - } - #And finally, vassals that really hate their liege will join regardless (provided that they also do not hate recipient). - AND = { - OR = { - opinion = { - target = scope:rebel_temp - value >= -25 - } - AND = { - has_game_rule = hard_difficulty - scope:liege_temp = { is_ai = no } - opinion = { - target = scope:rebel_temp - value >= -50 - } - } - AND = { - has_game_rule = very_hard_difficulty - scope:liege_temp = { is_ai = no } - opinion = { - target = scope:rebel_temp - value >= -75 - } - } - } - OR = { - #default threshold - opinion = { - target = scope:liege_temp - value <= -50 - } - AND = { - has_game_rule = hard_difficulty - scope:liege_temp = { is_ai = no } - opinion = { - target = scope:liege_temp - value <= -25 - } - } - AND = { - has_game_rule = very_hard_difficulty - scope:liege_temp = { is_ai = no } - opinion = { - target = scope:liege_temp - value <= 0 - } - } - #If tyrannical, the default threshold will be reached if at this level - AND = { - scope:liege_temp = { - title_revocation_is_tyrannical_trigger = { VASSAL = scope:rebel_temp } - } - OR = { - opinion = { - target = scope:liege_temp - value <= -30 #revoke_title_tyranny_gain adds -20 - } - AND = { - has_game_rule = hard_difficulty - scope:liege_temp = { is_ai = no } - opinion = { - target = scope:liege_temp - value <= -10 - } - } - AND = { - has_game_rule = very_hard_difficulty - scope:liege_temp = { is_ai = no } - opinion = { - target = scope:liege_temp - value <= 10 - } - } - } - } - } - } - } - # TGP bloc members follow their leader - trigger_if = { - limit = { exists = house.house_confederation.leading_house.house_head } - house.house_confederation.leading_house.house_head = this - } - } - add_to_list = joining_vassals - } - } - # Bloc members join despite legality - if = { - limit = { - exists = scope:rebel_temp.house.house_confederation - trigger_if = { - limit = { exists = scope:liege_temp.house.house_confederation } - NOT = { scope:rebel_temp = scope:liege_temp.house.house_confederation.leading_house.house_head } - } - } - scope:recipient.top_liege = { - every_vassal = { - limit = { - highest_held_title_tier > tier_barony - house.house_confederation ?= scope:recipient.house.house_confederation - NOT = { this = scope:actor } - } - add_to_list = joining_vassals - } - } - } - } - every_in_list = { - list = joining_vassals - save_scope_as = joining_vassal - custom_tooltip = tooltip_fellow_vassal_joins_war #The war has not started when viewing the interaction - hidden_effect = { - scope:rebel_temp = { - every_character_war = { - limit = { - using_cb = refused_liege_demand_war - casus_belli = { - primary_attacker = scope:rebel_temp - primary_defender = scope:liege_temp - } - } - add_to_list = war_to_join - } - } - every_in_list = { - list = war_to_join - limit = { - NOT = { is_defender = prev } - } - hidden_effect = { - set_called_to = prev - } - add_attacker = prev - } - } - hidden_effect = { - scope:liege_temp = { - add_opinion = { - target = prev - modifier = rebellious_vassal_opinion - } - } - } - } - every_player = { - limit = { is_vassal_of = scope:liege_temp } - scope:rebel_temp = { save_scope_as = recipient } - scope:liege_temp = { save_scope_as = actor } - trigger_event = char_interaction.0232 - } - scope:rebel_temp = { - add_opinion = { - target = scope:liege_temp - modifier = attempted_arrest_opinion - } - } -} - -war_for_retraction_effect = { - scope:recipient = { - save_scope_value_as = { - name = war_for_retraction_flavour - value = yes - } - start_war = { - casus_belli = refused_liege_demand_war - target = scope:actor - } - } - scope:actor = { - every_vassal = { #Vassals joining the rebel. - limit = { - NOR = { - this = scope:recipient - is_ai = no - has_trait = incapable - is_imprisoned = yes - dread_modified_ai_boldness = { #Too scared to do anything. - dreaded_character = scope:actor - value <= -50 - } - is_at_war_with = scope:recipient - is_at_war_with = scope:actor - } - highest_held_title_tier > tier_barony - OR = { - #Lovers and friends always back rebel (unless also lovers/friends of the liege) - AND = { - OR = { - has_relation_lover = scope:recipient - has_relation_friend = scope:recipient - } - NOR = { - has_relation_lover = scope:actor - has_relation_friend = scope:actor - } - } - #Vassals that either like recipient or have high honor will rally if the liege is being tyrannical (taking away de jure vassal). - AND = { - OR = { - ai_honor >= 25 - opinion = { - target = scope:recipient - value >= 40 - } - AND = { - has_game_rule = hard_difficulty - scope:actor = { is_ai = no } - opinion = { - target = scope:recipient - value >= 20 - } - } - AND = { - has_game_rule = very_hard_difficulty - scope:actor = { is_ai = no } - opinion = { - target = scope:recipient - value >= 0 - } - } - } - scope:recipient = { - any_held_title = { - is_de_jure_liege_or_above_target = scope:secondary_recipient.primary_title - } - } - } - #And finally, vassals that really hate their liege will join regardless (provided that they also do not hate recipient). - AND = { - OR = { - opinion = { - target = scope:recipient - value >= -25 - } - AND = { - has_game_rule = hard_difficulty - scope:actor = { is_ai = no } - opinion = { - target = scope:recipient - value >= -50 - } - } - AND = { - has_game_rule = very_hard_difficulty - scope:actor = { is_ai = no } - opinion = { - target = scope:recipient - value >= -75 - } - } - } - OR = { - opinion = { - target = scope:actor - value <= -40 - } - AND = { - has_game_rule = hard_difficulty - scope:actor = { is_ai = no } - opinion = { - target = scope:actor - value <= -20 - } - } - AND = { - has_game_rule = very_hard_difficulty - scope:actor = { is_ai = no } - opinion = { - target = scope:actor - value <= 0 - } - } - } - } - } - } - save_scope_as = joining_vassal - custom_tooltip = tooltip_fellow_vassal_joins_war #The war has not started when viewing the interaction screen. - hidden_effect = { - scope:recipient = { - every_character_war = { - limit = { - using_cb = refused_liege_demand_war - casus_belli = { - primary_attacker = scope:recipient - primary_defender = scope:actor - } - } - add_to_list = war_to_join - } - } - every_in_list = { - list = war_to_join - limit = { - NOT = { is_defender = prev } - } - hidden_effect = { - set_called_to = prev - } - add_attacker = prev - } - } - hidden_effect = { - scope:actor = { - add_opinion = { - target = prev - modifier = rebellious_vassal_opinion - } - } - } - } - every_player = { - limit = { is_vassal_of = scope:actor } - trigger_event = char_interaction.0232 - } - } - scope:recipient = { - add_opinion = { - target = scope:actor - modifier = attempted_arrest_opinion - } - } -} - -kick_from_court_interaction_warning_tooltip_effect = { - save_temporary_scope_as = kicked - if = { - limit = { is_councillor_of = scope:actor } - custom_tooltip = kick_from_court_councillor_warning_tt - } - if = { - limit = { - any_claim = { - useful_courtier_or_guest_claim_trigger = { RULER = scope:actor } - } - } - random_claim = { - limit = { - useful_courtier_or_guest_claim_trigger = { RULER = scope:actor } - tier = tier_kingdom - } - alternative_limit = { - useful_courtier_or_guest_claim_trigger = { RULER = scope:actor } - tier = tier_duchy - } - alternative_limit = { - useful_courtier_or_guest_claim_trigger = { RULER = scope:actor } - tier = tier_county - } - save_scope_as = kicked_claim - } - custom_tooltip = kick_from_court_claimant_warning_tt - } - if = { - limit = { is_commanding_army = yes } - custom_tooltip = kick_from_court_commander_warning_tt - } - if = { - limit = { is_knight_of = scope:actor } - custom_tooltip = kick_from_court_knight_warning_tt - } - if = { - limit = { - scope:kicked = { - has_any_court_position = yes - any_court_position_employer = { this = scope:actor } - } - } - custom_tooltip = kick_from_court_holds_court_title_warning_tt - } -} - -kick_from_court_interaction_effect = { - select_and_move_to_pool_effect = yes - - add_opinion = { - modifier = kicked_me_from_court - target = scope:actor - } - kick_from_court_interaction_warning_tooltip_effect = yes - - every_close_family_member = { - limit = { NOT = { any_in_list = { list = kicked_relatives_list this = prev } } } - add_to_list = kicked_relatives_list - } - - scope:actor = { - if = { - limit = { has_government = landless_adventurer_government } - every_courtier = { - limit = { - is_adult = yes - NOR = { - is_close_family_of = scope:recipient - has_any_moderate_bad_relationship_with_character_trigger = { CHARACTER = scope:recipient } - } - } - custom = custom.every_adult_follower - add_opinion = { - target = scope:actor - modifier = kicked_follower_from_camp_opinion - opinion = -5 - } - } - scope:recipient = { - every_relation = { - type = rival - limit = { is_courtier_of = scope:actor } - add_opinion = { - target = scope:actor - modifier = kicked_rival_from_camp_opinion - opinion = 30 - } - } - } - } - } -} - -disinherit_effect = { - if = { - limit = { - is_heir_of = $DISINHERITOR$ - NOT = { - has_trait = disputed_heritage - } - $DISINHERITOR$ = { - any_vassal = { - vassal_stance = courtly - } - } - } - $DISINHERITOR$ = { - custom_tooltip = courtly_vassal_disapproves_disinheriting - hidden_effect = { - every_vassal = { - vassal_stance = courtly - add_opinion = { - target = $DISINHERITOR$ - modifier = courtly_disinherit_opinion - } - } - } - } - } - add_trait = disinherited - add_opinion = { - modifier = disinherited_opinion - target = $DISINHERITOR$ - } - house = { - every_house_member = { - limit = { - NOT = { house = $DISINHERITOR$.house } - } - custom = all_house_members - add_opinion = { - modifier = disinherited_house_member_opinion - target = $DISINHERITOR$ - } - } - } - if = { - limit = { - exists = dynasty - NOT = { $DISINHERITOR$ = dynasty.dynast } - } - $DISINHERITOR$.dynasty.dynast = { - add_opinion = { - target = $DISINHERITOR$ - modifier = fp1_usurped_my_authority_opinion - years = 20 - } - } - } - hidden_effect = { #Nudge towards rivalry - if = { - limit = { - NOR = { - has_relation_rival = $DISINHERITOR$ - has_relation_potential_rival = $DISINHERITOR$ - } - } - set_relation_potential_rival = $DISINHERITOR$ - } - } -} - -restore_inheritance_effect = { - remove_trait = disinherited - if = { - limit = { - has_opinion_modifier = { - modifier = disinherited_opinion - target = scope:actor - } - } - remove_opinion = { - modifier = disinherited_opinion - target = scope:actor - } - house = { - if = { - limit = { - NOT = { - any_house_member = { - this != scope:recipient - has_opinion_modifier = { - modifier = disinherited_opinion - target = scope:actor - } - } - } - } - every_house_member = { - custom = all_house_members - remove_opinion = { - modifier = disinherited_house_member_opinion - target = scope:actor - single = yes - } - } - } - } - } - else = { - if = { - limit = { - this != scope:actor - } - add_opinion = { - modifier = restored_inheritance_opinion - target = scope:actor - } - } - house = { - every_house_member = { - limit = { - this != scope:recipient - this != scope:actor - } - custom = all_house_members - add_opinion = { - modifier = restored_house_member_inheritance_opinion - target = scope:actor - } - } - } - } - #Remove nithing status, if applicable. - hidden_effect = { - if = { - limit = { has_character_modifier = nithing_fp1_modifier } - remove_character_modifier = nithing_fp1_modifier - } - } -} - -denounce_effect = { - add_trait = denounced - if = { - limit = { - $ACTOR$ = { - has_hook_of_type = { - target = $RECIPIENT$ - type = house_head_hook - } - } - } - $ACTOR$ = { - remove_hook = { - target = $RECIPIENT$ - type = house_head_hook - } - } - } - if = { - limit = { - has_opinion_modifier = { - target = $ACTOR$ - modifier = forgave_denounced_opinion - } - } - custom_tooltip = forgiven_changed_to_denounced - hidden_effect = { - remove_opinion = { - target = $ACTOR$ - modifier = forgave_denounced_opinion - } - add_opinion = { - modifier = denounced_opinion - target = $ACTOR$ - } - } - } - else = { - add_opinion = { - modifier = denounced_opinion - target = $ACTOR$ - } - } - if = { - limit = { - NOT = { is_close_family_of = $ACTOR$ } - } - house = { - every_house_member = { - limit = { - NOT = { house = $ACTOR$.house } - } - custom = all_house_members - add_opinion = { - modifier = denounced_house_member_opinion - target = $ACTOR$ - } - } - } - - } -} - -forgive_effect = { - remove_trait = denounced - custom_tooltip = denounced_change_to_forgiven - hidden_effect = { - remove_opinion = { - target = scope:actor - modifier = denounced_opinion - } - add_opinion = { - modifier = forgave_denounced_opinion - target = scope:actor - opinion = -25 - } - } - if = { - limit = { - NOT = { is_close_family_of = scope:actor } - } - house = { - every_house_member = { - limit = { - house != scope:actor.house - } - custom = all_house_members - add_opinion = { - modifier = forgave_house_member_opinion - target = scope:actor - } - } - } - - } -} - -dynast_claim_title_effect = { - scope:actor = { - add_unpressed_claim = scope:target - stress_impact = { - content = minor_stress_impact_gain - generous = minor_stress_impact_gain - } - } - scope:recipient = { - add_opinion = { - target = scope:actor - modifier = claimed_my_title_opinion - opinion = -50 - } - } -} - -dynast_end_dynasty_wars_effect = { - scope:actor.dynasty = { - add_dynasty_prestige = medium_dynasty_prestige_loss - } - - scope:recipient = { - every_character_war = { - limit = { - primary_defender != scope:actor - primary_attacker = scope:recipient - primary_defender.dynasty = scope:recipient.dynasty - } - primary_defender = { - trigger_event = char_interaction.0071 - } - end_war = white_peace - } - } -} - -educate_child_interaction_effect = { - scope:ward = { - # Culture/faith conversion + university gold/tooltips - education_flags_tooltips_effect = yes - } - # Travel setup - ward_depart_effect = yes -} - -education_flags_tooltips_effect = { - #Convert culture - if = { - limit = { always = scope:convert_culture } - scope:ward = { - add_character_flag = { - flag = convert_culture - years = 10 - } - } - if = { - limit = { scope:ward.age < 11 } - custom_description = { - text = "educate_child_option_convert_culture_effect" - subject = scope:ward - object = scope:guardian.culture - } - } - else_if = { - limit = { - scope:ward.age >= 11 - scope:ward.age < 14 - } - custom_description = { - text = "educate_child_option_convert_culture_likely_effect" - subject = scope:ward - object = scope:guardian.culture - } - } - else_if = { - limit = { scope:ward.age >= 14 } - custom_description = { - text = "educate_child_option_convert_culture_unlikely_effect" - subject = scope:ward - object = scope:guardian.culture - } - } - } - #Convert faith - if = { - limit = { always = scope:convert_faith } - scope:ward = { - add_character_flag = { - flag = convert_faith - years = 10 - } - } - if = { - limit = { scope:ward.age < 11 } - custom_description = { - text = "educate_child_option_convert_faith_effect" - subject = scope:ward - object = scope:guardian.faith - } - } - else_if = { - limit = { - scope:ward.age >= 11 - scope:ward.age < 14 - } - custom_description = { - text = "educate_child_option_convert_faith_likely_effect" - subject = scope:ward - object = scope:guardian.faith - } - } - else_if = { - limit = { scope:ward.age >= 14 } - custom_description = { - text = "educate_child_option_convert_faith_unlikely_effect" - subject = scope:ward - object = scope:guardian.faith - } - } - } - - # Knowledge - if = { - limit = { - always = scope:send_to_university - OR = { - scope:recipient = { - OR = { - any_realm_province = { - is_higher_studies_location = yes - save_temporary_scope_as = university - } - any_realm_county = { - has_county_modifier = pandidakterion_university_modifier - save_temporary_scope_as = university - } - } - } - scope:actor = { - this = scope:secondary_actor - any_realm_province = { - is_higher_studies_location = yes - save_temporary_scope_as = university - } - } - } - } - scope:actor = { - remove_short_term_gold = { - value = monumental_gold_value - if = { - limit = { house = { has_house_modifier = ep3_eparch_university_influence_modifier } } - multiply = { - value = 1 - subtract = university_cost_reduction_value - } - } - } - } - custom_tooltip = is_sent_to_university - if = { - limit = { - scope:university ?= { - is_province_valid_confucian_education_trigger = yes - } - } - custom_tooltip = studying_confucian_education_trait - } - add_character_flag = { - flag = studying_at_university - years = 17 - } - } - # Confucian Education trait - if = { - limit = { - scope:guardian = { - has_trait = confucian_education - } - } - custom_tooltip = studying_confucian_education_trait - custom_tooltip = studying_confucian_education_disciple - add_character_flag = { - flag = studying_confucian_education - years = 17 - } - } -} - -educate_child_event_effect = { - scope:ward = { - #Set relation and move character - set_relation_guardian = scope:guardian - - if = { - limit = { - scope:guardian = { is_playable_character = yes } - scope:ward = { is_playable_character = no } - scope:guardian != scope:ward.host - } - visit_court_of = scope:guardian - } - else_if = { - limit = { - scope:guardian = { is_playable_character = no } - scope:ward = { is_playable_character = yes } - scope:ward != scope:guardian.host - } - scope:guardian = { - visit_court_of = scope:ward - } - } - else_if = { - limit = { - scope:guardian = { is_playable_character = no } - scope:ward = { is_playable_character = no } - exists = scope:guardian.host - scope:guardian.host != scope:ward.host - } - visit_court_of = scope:guardian.host - } - } - - #Opinions - guardian_add_opinion_effect = { GUARDIAN = scope:guardian WARD_LIEGE = scope:ward_liege WARD = scope:ward } -} - -call_dynasty_member_to_war_interaction_effect = { - if = { - limit = { - exists = scope:target - } - - scope:target = { - hidden_effect = { - set_called_to = scope:recipient - } - if = { - limit = { - is_attacker = scope:actor - } - add_attacker = scope:recipient - } - else = { - add_defender = scope:recipient - } - } - - scope:actor.dynasty = { - add_dynasty_prestige = medium_dynasty_prestige_loss - } - } - - if = { - limit = { always = scope:hook } - scope:actor = { - use_hook = scope:recipient - } - } -} - -offer_vassalization_interaction_effect = { - create_title_and_vassal_change = { - type = swear_fealty - save_scope_as = change - } - scope:recipient = { - change_liege = { - liege = scope:actor - change = scope:change - } - add_opinion = { - modifier = became_vassal - target = scope:actor - opinion = 10 - } - } - resolve_title_and_vassal_change = scope:change - - # Special terms for feudal contracts - scope:recipient = { - if = { - limit = { - government_has_flag = government_is_feudal - } - if = { - limit = { scope:high_obligations = yes } - hidden_effect = { - if = { - limit = { top_liege != this } # To avoid errors during tooltip generation (prior to the contract being generated) - vassal_contract_set_obligation_level = { type = feudal_government_taxes level = 3 } - vassal_contract_set_obligation_level = { type = feudal_government_levies level = 3 } - } - } - custom_tooltip = high_obligations_taxes - custom_tooltip = high_obligations_levies - } - else_if = { - limit = { scope:low_obligations = yes } - hidden_effect = { - if = { - limit = { top_liege != this } # To avoid errors during tooltip generation (prior to the contract being generated) - vassal_contract_set_obligation_level = { type = feudal_government_taxes level = 1 } - vassal_contract_set_obligation_level = { type = feudal_government_levies level = 1 } - } - } - custom_tooltip = low_obligations_taxes - custom_tooltip = low_obligations_levies - } - else_if = { - limit = { scope:religious_exemption = yes } - hidden_effect = { - if = { - limit = { top_liege != this } # To avoid errors during tooltip generation (prior to the contract being generated) - vassal_contract_set_obligation_level = { type = feudal_government_taxes level = 2 } - vassal_contract_set_obligation_level = { type = feudal_government_levies level = 1 } - vassal_contract_set_obligation_level = { type = religious_rights level = 1 } - } - } - custom_tooltip = normal_obligations_taxes - custom_tooltip = low_obligations_levies - custom_tooltip = religious_protection_tt - } - else = { - hidden_effect = { - if = { - limit = { top_liege != this } # To avoid errors during tooltip generation (prior to the contract being generated) - vassal_contract_set_obligation_level = { type = feudal_government_taxes level = 2 } - vassal_contract_set_obligation_level = { type = feudal_government_levies level = 2 } - } - } - custom_tooltip = normal_obligations_taxes - custom_tooltip = normal_obligations_levies - } - } - else_if = { - limit = { - government_has_flag = government_is_clan - scope:religious_exemption_clan = yes - } - hidden_effect = { - if = { - limit = { top_liege != this } # To avoid errors during tooltip generation (prior to the contract being generated) - vassal_contract_set_obligation_level = { type = religious_rights level = 1 } - } - } - custom_tooltip = religious_protection_tt - } - } - - # Struggle catalysts. - hidden_effect = { - fp3_struggle_apply_independent_vassalage_catalyst_effect = { - NEW_LIEGE = scope:actor - NEW_VASSAL = scope:recipient - } - } -} - -# Effect to start a tributary relationship from a war -# root-scope is the Suzerain -# $TRIBUTARY$ = the new tributary -# $SUZERAIN$ = their suzerain -# $WAR$ = required war scope -start_tributary_from_war_effect = { - $WAR$ ?= { save_scope_as = tributary_war } - if = { - limit = { NOT = { exists = $WAR$ } } - error_log = "Tried to call start_tributary_from_war_effect without a valid war scope!" - } - save_scope_value_as = { - name = high_obligations - value = yes - } - start_tributary_interaction_effect = { - TRIBUTARY = $TRIBUTARY$ - SUZERAIN = $SUZERAIN$ - } -} - -@starting_subject_standing_value = 10 - -# Effect to start a tributary relationship, can be called directly without a war or from start_tributary_from_war_effect -# $TRIBUTARY$ = the new tributary -# $SUZERAIN$ = their suzerain -start_tributary_interaction_effect = { - # Setup truces depending on how the tributary relationship was created - $TRIBUTARY$ = { save_scope_as = tributary_loc } - $SUZERAIN$ = { save_scope_as = suzerain_loc } - - #Mandala Tributaries - if = { - limit = { - should_be_mandala_tributary_trigger = { - SUZERAIN = $SUZERAIN$ - TRIBUTARY = $TRIBUTARY$ - } - trigger_if = { - limit = { exists = scope:tributary_war } - $SUZERAIN$ = { - AND = { - house = { has_house_head_parameter = can_make_mandala_tributaries_via_war } - is_house_head = yes - } - } - } - } - $TRIBUTARY$ = { - if = { - limit = { government_has_flag = government_is_tribal } - start_tributary = { - contract_group = tributary_mandala_tribal - suzerain = $SUZERAIN$ - } - if = { - limit = { - OR = { - scope:high_obligations ?= yes - exists = scope:tributary_war - } - } - if = { - limit = { is_tributary = yes } # suppress error logging - hidden_effect = { - tributary_contract_set_obligation_level = { - type = mandala_government_taxes - level = 3 - } - tributary_contract_set_obligation_level = { - type = mandala_government_prestige - level = 2 - } - tributary_contract_set_obligation_level = { - type = mandala_government_levies - level = 3 - } - } - } - custom_tooltip = high_mandala_tribute_taxes - custom_tooltip = high_mandala_tribute_prestige - custom_tooltip = high_mandala_tribute_levies - } - else_if = { - limit = { scope:low_obligations ?= yes } - if = { - limit = { is_tributary = yes } # suppress error logging - hidden_effect = { - tributary_contract_set_obligation_level = { - type = mandala_government_taxes - level = 0 - } - tributary_contract_set_obligation_level = { - type = mandala_government_prestige - level = 0 - } - tributary_contract_set_obligation_level = { - type = mandala_government_levies - level = 0 - } - } - } - custom_tooltip = exempt_mandala_tribute_taxes - custom_tooltip = low_mandala_tribute_prestige - custom_tooltip = exempt_mandala_tribute_levies - } - else = { - if = { - limit = { is_tributary = yes } # suppress error logging - hidden_effect = { - tributary_contract_set_obligation_level = { - type = mandala_government_taxes - level = 2 - } - tributary_contract_set_obligation_level = { - type = mandala_government_prestige - level = 2 - } - tributary_contract_set_obligation_level = { - type = mandala_government_levies - level = 1 - } - } - } - custom_tooltip = normal_mandala_tribute_taxes - custom_tooltip = normal_mandala_tribute_prestige - custom_tooltip = low_mandala_tribute_levies - } - - if = { - limit = { is_tributary = yes } # suppress error logging - tributary_contract_set_obligation_level = { - type = mandala_suzerain_war_participation_guarantee - level = 1 - } - } - } - else = { - start_tributary = { - contract_group = tributary_mandala - suzerain = $SUZERAIN$ - } - if = { - limit = { - OR = { - scope:high_obligations ?= yes - exists = scope:tributary_war - } - } - if = { - limit = { is_tributary = yes } # suppress error logging - hidden_effect = { - tributary_contract_set_obligation_level = { - type = mandala_government_taxes - level = 3 - } - tributary_contract_set_obligation_level = { - type = mandala_government_piety - level = 2 - } - tributary_contract_set_obligation_level = { - type = mandala_government_levies - level = 3 - } - } - } - custom_tooltip = high_mandala_tribute_taxes - custom_tooltip = high_mandala_tribute_piety - custom_tooltip = high_mandala_tribute_levies - } - else_if = { - limit = { scope:low_obligations ?= yes } - if = { - limit = { is_tributary = yes } # suppress error logging - hidden_effect = { - tributary_contract_set_obligation_level = { - type = mandala_government_taxes - level = 0 - } - tributary_contract_set_obligation_level = { - type = mandala_government_piety - level = 0 - } - tributary_contract_set_obligation_level = { - type = mandala_government_levies - level = 0 - } - } - } - custom_tooltip = exempt_mandala_tribute_taxes - custom_tooltip = low_mandala_tribute_piety - custom_tooltip = exempt_mandala_tribute_levies - } - else = { - if = { - limit = { is_tributary = yes } # suppress error logging - hidden_effect = { - tributary_contract_set_obligation_level = { - type = mandala_government_taxes - level = 2 - } - tributary_contract_set_obligation_level = { - type = mandala_government_piety - level = 2 - } - tributary_contract_set_obligation_level = { - type = mandala_government_levies - level = 1 - } - } - } - custom_tooltip = normal_mandala_tribute_taxes - custom_tooltip = normal_mandala_tribute_piety - custom_tooltip = low_mandala_tribute_levies - } - if = { - limit = { is_tributary = yes } # suppress error logging - tributary_contract_set_obligation_level = { - type = mandala_suzerain_war_participation_guarantee - level = 1 - } - } - } - } - } - # Wanua Tributaries - else_if = { - limit = { - should_be_wanua_tributary_trigger = { - SUZERAIN = $SUZERAIN$ - TRIBUTARY = $TRIBUTARY$ - } - } - $TRIBUTARY$ = { - start_tributary = { - contract_group = tributary_wanua - suzerain = $SUZERAIN$ - } - if = { - limit = { - OR = { - scope:high_obligations ?= yes - exists = scope:tributary_war - } - } - if = { - limit = { is_tributary = yes } # suppress error logging - hidden_effect = { - tributary_contract_set_obligation_level = { - type = barter_goods_obligations - level = 3 - } - tributary_contract_set_obligation_level = { type = default_tributary_taxes level = 2 } - tributary_contract_set_obligation_level = { type = default_tributary_prestige level = 1 } - } - } - custom_tooltip = high_wanua_tribute_barter_goods - custom_tooltip = high_subjugated_tribute_taxes - custom_tooltip = normal_subjugated_tribute_prestige - } - else_if = { - limit = { scope:low_obligations ?= yes } - if = { - limit = { is_tributary = yes } # suppress error logging - hidden_effect = { - tributary_contract_set_obligation_level = { - type = barter_goods_obligations - level = 1 - } - tributary_contract_set_obligation_level = { type = default_tributary_taxes level = 1 } - tributary_contract_set_obligation_level = { type = default_tributary_prestige level = 1 } - } - } - custom_tooltip = low_wanua_tribute_barter_goods - custom_tooltip = low_subjugated_tribute_taxes - custom_tooltip = none_subjugated_tribute_prestige - } - else = { - if = { - limit = { is_tributary = yes } # suppress error logging - hidden_effect = { - tributary_contract_set_obligation_level = { - type = barter_goods_obligations - level = 2 - } - tributary_contract_set_obligation_level = { type = default_tributary_taxes level = 1 } - tributary_contract_set_obligation_level = { type = default_tributary_prestige level = 1 } - } - } - custom_tooltip = medium_wanua_tribute_barter_goods - custom_tooltip = low_subjugated_tribute_taxes - } - } - } - # Nomadic Tributaries - else_if = { - limit = { - $SUZERAIN$ = { has_government = nomad_government } - } - $TRIBUTARY$ = { - if = { - limit = { - OR = { - has_government = nomad_government - has_government = herder_government - } - } - start_tributary = { - contract_group = tributary_nomadic - suzerain = $SUZERAIN$ - } - } - else = { - start_tributary = { - contract_group = tributary_settled - suzerain = $SUZERAIN$ - } - } - - # Special terms depending on which options were set - if = { # settled tributary - limit = { - NOR = { - has_government = nomad_government - has_government = herder_government - } - } - if = { - limit = { - OR = { - scope:high_obligations ?= yes - exists = scope:tributary_war - } - } - if = { - limit = { is_tributary = yes } # suppress error logging - hidden_effect = { - tributary_contract_set_obligation_level = { type = default_tributary_taxes level = 2 } - tributary_contract_set_obligation_level = { type = default_tributary_levies level = 2 } - tributary_contract_set_obligation_level = { type = default_tributary_prestige level = 2 } - } - } - custom_tooltip = high_feudal_tribute_taxes - custom_tooltip = high_feudal_tribute_levies - custom_tooltip = high_nomad_tribute_prestige - } - else_if = { - limit = { scope:low_obligations ?= yes } - if = { - limit = { is_tributary = yes } # suppress error logging - hidden_effect = { - tributary_contract_set_obligation_level = { type = default_tributary_taxes level = 0 } - tributary_contract_set_obligation_level = { type = default_tributary_levies level = 0 } - tributary_contract_set_obligation_level = { type = default_tributary_prestige level = 0 } - } - } - custom_tooltip = low_feudal_tribute_taxes - custom_tooltip = low_feudal_tribute_levies - custom_tooltip = none_nomad_tribute_prestige - } - else = { - if = { - limit = { is_tributary = yes } # suppress error logging - hidden_effect = { - tributary_contract_set_obligation_level = { type = default_tributary_taxes level = 1 } - tributary_contract_set_obligation_level = { type = default_tributary_levies level = 1 } - tributary_contract_set_obligation_level = { type = default_tributary_prestige level = 1 } - } - } - custom_tooltip = normal_feudal_tribute_taxes - custom_tooltip = normal_feudal_tribute_levies - custom_tooltip = normal_nomad_tribute_prestige - } - } - else = { # nomadic tributary - if = { - limit = { - OR = { - scope:high_obligations ?= yes - exists = scope:tributary_war - } - } - if = { - limit = { is_tributary = yes } # suppress error logging - hidden_effect = { - tributary_contract_set_obligation_level = { type = nomad_government_herd level = 3 } #herd_tax_high - tributary_contract_set_obligation_level = { type = nomad_government_prestige level = 2 } - } - } - custom_tooltip = high_nomad_tribute_herd - custom_tooltip = high_nomad_tribute_prestige - } - else_if = { - limit = { scope:low_obligations ?= yes } - if = { - limit = { is_tributary = yes } # suppress error logging - hidden_effect = { - tributary_contract_set_obligation_level = { type = nomad_government_herd level = 1 } #herd_tax_low - tributary_contract_set_obligation_level = { type = nomad_government_prestige level = 0 } - } - } - custom_tooltip = low_nomad_tribute_herd - custom_tooltip = none_nomad_tribute_prestige - } - else = { - if = { - limit = { is_tributary = yes } # suppress error logging - hidden_effect = { - tributary_contract_set_obligation_level = { type = nomad_government_herd level = 2 } #herd_tax_normal - tributary_contract_set_obligation_level = { type = nomad_government_prestige level = 1 } - } - } - custom_tooltip = normal_nomad_tribute_herd - custom_tooltip = normal_nomad_tribute_prestige - } - } - if = { - limit = { is_tributary = yes } # suppress error logging - tributary_contract_set_obligation_level = { type = suzerain_war_participation_guarantee level = 0 } - tributary_contract_set_obligation_level = { type = tributary_war_participation_obligation level = 0 } - custom_tooltip = no_tributary_war_obligations - custom_tooltip = no_suzerain_guarantee - } - } - } - else_if = { - limit = { - $SUZERAIN$ = { has_government = steppe_admin_government } - } - $TRIBUTARY$ = { - if = { - limit = { - OR = { - has_government = nomad_government - has_government = herder_government - } - } - start_tributary = { - contract_group = tributary_steppe - suzerain = $SUZERAIN$ - } - } - else = { - start_tributary = { - contract_group = tributary_settled - suzerain = $SUZERAIN$ - } - } - - # Special terms depending on which options were set - if = { # settled tributary - limit = { - NOR = { - has_government = nomad_government - has_government = herder_government - } - } - if = { - limit = { - OR = { - scope:high_obligations ?= yes - exists = scope:tributary_war - } - } - if = { - limit = { is_tributary = yes } # suppress error logging - hidden_effect = { - tributary_contract_set_obligation_level = { type = default_tributary_taxes level = 2 } - tributary_contract_set_obligation_level = { type = default_tributary_levies level = 2 } - tributary_contract_set_obligation_level = { type = default_tributary_prestige level = 2 } - } - } - custom_tooltip = high_feudal_tribute_taxes - custom_tooltip = high_feudal_tribute_levies - custom_tooltip = high_nomad_tribute_prestige - } - else_if = { - limit = { scope:low_obligations ?= yes } - if = { - limit = { is_tributary = yes } # suppress error logging - hidden_effect = { - tributary_contract_set_obligation_level = { type = default_tributary_taxes level = 0 } - tributary_contract_set_obligation_level = { type = default_tributary_levies level = 0 } - tributary_contract_set_obligation_level = { type = default_tributary_prestige level = 0 } - } - } - custom_tooltip = low_feudal_tribute_taxes - custom_tooltip = low_feudal_tribute_levies - custom_tooltip = none_nomad_tribute_prestige - } - else = { - if = { - limit = { is_tributary = yes } # suppress error logging - hidden_effect = { - tributary_contract_set_obligation_level = { type = default_tributary_taxes level = 1 } - tributary_contract_set_obligation_level = { type = default_tributary_levies level = 1 } - tributary_contract_set_obligation_level = { type = default_tributary_prestige level = 1 } - } - } - custom_tooltip = normal_feudal_tribute_taxes - custom_tooltip = normal_feudal_tribute_levies - custom_tooltip = normal_nomad_tribute_prestige - } - } - else = { # steppe tributary - if = { - limit = { - OR = { - scope:high_obligations ?= yes - exists = scope:tributary_war - } - } - if = { - limit = { is_tributary = yes } # suppress error logging - hidden_effect = { - tributary_contract_set_obligation_level = { type = default_tributary_taxes level = 2 } - tributary_contract_set_obligation_level = { type = nomad_government_prestige level = 2 } - } - } - custom_tooltip = high_nomad_tribute_herd - custom_tooltip = high_nomad_tribute_prestige - } - else_if = { - limit = { scope:low_obligations ?= yes } - if = { - limit = { is_tributary = yes } # suppress error logging - hidden_effect = { - tributary_contract_set_obligation_level = { type = default_tributary_taxes level = 1 } - tributary_contract_set_obligation_level = { type = nomad_government_prestige level = 0 } - } - } - custom_tooltip = low_nomad_tribute_herd - custom_tooltip = none_nomad_tribute_prestige - } - else = { - if = { - limit = { is_tributary = yes } # suppress error logging - hidden_effect = { - tributary_contract_set_obligation_level = { type = default_tributary_taxes level = 2 } - tributary_contract_set_obligation_level = { type = nomad_government_prestige level = 1 } - } - } - custom_tooltip = normal_nomad_tribute_herd - custom_tooltip = normal_nomad_tribute_prestige - } - } - if = { - limit = { - is_tributary = yes # suppress error logging - government_has_flag = government_is_nomadic - NOT = { government_has_flag = government_is_herder } - } - tributary_contract_set_obligation_level = { type = suzerain_war_participation_guarantee level = 0 } - tributary_contract_set_obligation_level = { type = tributary_war_participation_obligation level = 1 } - custom_tooltip = tributary_war_obligations - custom_tooltip = no_suzerain_guarantee - } - else_if = { - limit = { - is_tributary = yes # suppress error logging - } - tributary_contract_set_obligation_level = { type = suzerain_war_participation_guarantee level = 0 } - tributary_contract_set_obligation_level = { type = tributary_war_participation_obligation level = 0 } - custom_tooltip = no_tributary_war_obligations - custom_tooltip = no_suzerain_guarantee - } - } - } - else_if = { - limit = { - $SUZERAIN$ = { - has_government = celestial_government - highest_held_title_tier >= tier_hegemony - } - } - $TRIBUTARY$ = { - start_tributary = { - contract_group = tributary_celestial - suzerain = $SUZERAIN$ - } - - if = { - limit = { - OR = { - scope:high_obligations ?= yes - exists = scope:tributary_war - } - } - if = { - limit = { is_tributary = yes } # suppress error logging - hidden_effect = { - tributary_contract_set_obligation_level = { type = celestial_tribute_gold level = 2 } - tributary_contract_set_obligation_level = { type = celestial_tribute_prestige level = 2 } - } - } - custom_tooltip = normal_celestial_tribute_taxes - custom_tooltip = normal_celestial_tribute_prestige - } - else_if = { - limit = { scope:low_obligations ?= yes } - if = { - limit = { is_tributary = yes } # suppress error logging - hidden_effect = { - tributary_contract_set_obligation_level = { type = celestial_tribute_gold level = 0 } - tributary_contract_set_obligation_level = { type = celestial_tribute_prestige level = 0 } - } - } - custom_tooltip = no_celestial_tribute_taxes - custom_tooltip = no_celestial_tribute_prestige - } - else = { - if = { - limit = { is_tributary = yes } # suppress error logging - hidden_effect = { - tributary_contract_set_obligation_level = { type = celestial_tribute_gold level = 1 } - tributary_contract_set_obligation_level = { type = celestial_tribute_prestige level = 1 } - } - } - custom_tooltip = low_celestial_tribute_taxes - custom_tooltip = low_celestial_tribute_prestige - } - - add_subject_standing = @starting_subject_standing_value - custom_tooltip = expected_to_pay_tribute - } - } - else_if = { - limit = { - $SUZERAIN$ = { highest_held_title_tier = tier_hegemony } - } - $TRIBUTARY$ = { - start_tributary = { - contract_group = tributary_hegemonic - suzerain = $SUZERAIN$ - } - - if = { - limit = { - OR = { - scope:high_obligations ?= yes - exists = scope:tributary_war - } - } - if = { - limit = { is_tributary = yes } # suppress error logging - hidden_effect = { - tributary_contract_set_obligation_level = { type = hegemonic_tribute_gold level = 2 } - tributary_contract_set_obligation_level = { type = hegemonic_tribute_prestige level = 2 } - } - } - custom_tooltip = normal_hegemonic_tribute_taxes - custom_tooltip = normal_hegemonic_tribute_prestige - } - else_if = { - limit = { scope:low_obligations ?= yes } - if = { - limit = { is_tributary = yes } # suppress error logging - hidden_effect = { - tributary_contract_set_obligation_level = { type = hegemonic_tribute_gold level = 0 } - tributary_contract_set_obligation_level = { type = hegemonic_tribute_prestige level = 0 } - } - } - custom_tooltip = no_hegemonic_tribute_taxes - custom_tooltip = no_hegemonic_tribute_prestige - } - else = { - if = { - limit = { is_tributary = yes } # suppress error logging - hidden_effect = { - tributary_contract_set_obligation_level = { type = hegemonic_tribute_gold level = 1 } - tributary_contract_set_obligation_level = { type = hegemonic_tribute_prestige level = 1 } - } - } - custom_tooltip = low_hegemonic_tribute_taxes - custom_tooltip = low_hegemonic_tribute_prestige - } - - add_subject_standing = @starting_subject_standing_value - custom_tooltip = expected_to_pay_tribute - } - } - else = { # subjugated tributary - $TRIBUTARY$ = { - start_tributary = { - contract_group = tributary_subjugated - suzerain = $SUZERAIN$ - } - if = { - limit = { scope:low_obligations ?= yes } - if = { - limit = { is_tributary = yes } # suppress error logging - hidden_effect = { - tributary_contract_set_obligation_level = { type = default_tributary_taxes level = 1 } - tributary_contract_set_obligation_level = { type = default_tributary_prestige level = 0 } - } - } - custom_tooltip = low_subjugated_tribute_taxes - custom_tooltip = none_subjugated_tribute_prestige - } - else = { - if = { - limit = { is_tributary = yes } # suppress error logging - hidden_effect = { - tributary_contract_set_obligation_level = { type = default_tributary_taxes level = 2 } - tributary_contract_set_obligation_level = { type = default_tributary_prestige level = 1 } - tributary_contract_set_obligation_level = { type = suzerain_war_participation_guarantee level = 1 } - tributary_contract_set_obligation_level = { type = tributary_war_participation_obligation level = 0 } - } - } - custom_tooltip = high_subjugated_tribute_taxes - custom_tooltip = normal_subjugated_tribute_prestige - } - custom_tooltip = suzerain_guarantee - custom_tooltip = no_tributary_war_obligations - } - } - setup_tributary_truces_effect = { SUZERAIN = $SUZERAIN$ TRIBUTARY = $TRIBUTARY$ } -} - -@truce_duration_war_default = 15 -@truce_duration_war_mandala = 5 -@truce_duration_negotiated_default = 5 -@truce_duration_negotiated_celestial = 25 - -setup_tributary_truces_effect = { - # Setup truces depending on how the tributary relationship was created - $TRIBUTARY$ = { save_scope_as = tributary_loc } - $SUZERAIN$ = { save_scope_as = suzerain_loc } - - if = { - limit = { exists = scope:tributary_war } # this will exist if invoked from start_tributary_from_war_effect - $TRIBUTARY$ = { - if = { - limit = { should_be_mandala_tributary_trigger = { SUZERAIN = $SUZERAIN$ TRIBUTARY = $TRIBUTARY$ } } - add_truce_one_way = { - character = $SUZERAIN$ - years = @truce_duration_war_mandala - war = scope:tributary_war - result = defeat - } - } - else = { - add_truce_one_way = { - character = $SUZERAIN$ - years = @truce_duration_war_default - war = scope:tributary_war - result = defeat - } - } - } - } - else = { - $TRIBUTARY$ = { - if = { - limit = { $SUZERAIN$ = { has_government = celestial_government } } - add_truce_both_ways = { - character = $SUZERAIN$ - years = @truce_duration_negotiated_celestial - name = TRUCE_TRIBUTARY - } - } - else = { - add_truce_both_ways = { - character = $SUZERAIN$ - years = @truce_duration_negotiated_default - name = TRUCE_TRIBUTARY - } - } - } - } -} - -offer_fealty_interaction_effect = { - create_title_and_vassal_change = { - type = swear_fealty - save_scope_as = change - } - scope:actor = { - change_liege = { - liege = scope:recipient - change = scope:change - } - - stress_impact = { - ambitious = medium_stress_impact_gain - arrogant = medium_stress_impact_gain - } - } - resolve_title_and_vassal_change = scope:change - - scope:actor = { - # Special terms for feudal contracts - if = { - limit = { - government_has_flag = government_is_feudal - } - if = { - limit = { scope:high_obligations = yes } - hidden_effect = { - if = { - limit = { top_liege != this } # To avoid errors during tooltip generation (prior to the contract being generated) - vassal_contract_set_obligation_level = { type = feudal_government_taxes level = 3 } - vassal_contract_set_obligation_level = { type = feudal_government_levies level = 3 } - } - } - custom_tooltip = high_obligations_taxes - custom_tooltip = high_obligations_levies - } - else_if = { - limit = { scope:low_obligations = yes } - hidden_effect = { - if = { - limit = { top_liege != this } # To avoid errors during tooltip generation (prior to the contract being generated) - vassal_contract_set_obligation_level = { type = feudal_government_taxes level = 1 } - vassal_contract_set_obligation_level = { type = feudal_government_levies level = 1 } - } - } - custom_tooltip = low_obligations_taxes - custom_tooltip = low_obligations_levies - } - else_if = { - limit = { scope:religious_taxation = yes } - hidden_effect = { - if = { - limit = { top_liege != this } # To avoid errors during tooltip generation (prior to the contract being generated) - vassal_contract_set_obligation_level = { type = feudal_government_taxes level = 3 } - vassal_contract_set_obligation_level = { type = feudal_government_levies level = 2 } - vassal_contract_set_obligation_level = { type = religious_rights level = 1 } - } - } - custom_tooltip = high_obligations_taxes - custom_tooltip = normal_obligations_levies - if = { - limit = { scope:recipient.faith = { has_doctrine_parameter = unlock_jizya_contract } } - custom_tooltip = jizya_religious_protection_tt - } - else = { custom_tooltip = religious_protection_tt } - } - else = { - hidden_effect = { - if = { - limit = { top_liege != this } # To avoid errors during tooltip generation (prior to the contract being generated) - vassal_contract_set_obligation_level = { type = feudal_government_taxes level = 2 } - vassal_contract_set_obligation_level = { type = feudal_government_levies level = 2 } - } - } - custom_tooltip = normal_obligations_taxes - custom_tooltip = normal_obligations_levies - } - } - else_if = { - limit = { - government_has_flag = government_is_clan - scope:religious_exemption_clan = yes - } - hidden_effect = { - if = { - limit = { top_liege != this } # To avoid errors during tooltip generation (prior to the contract being generated) - vassal_contract_set_obligation_level = { type = religious_rights level = 1 } - } - } - custom_tooltip = religious_protection_tt - } - } - - # Struggle catalysts. - hidden_effect = { - fp3_struggle_apply_independent_vassalage_catalyst_effect = { - NEW_LIEGE = scope:recipient - NEW_VASSAL = scope:actor - } - } -} - - -call_ally_interaction_effect = { - if = { - limit = { - exists = scope:target - scope:recipient = { - NOR = { - is_at_war_with = scope:target.primary_defender - is_at_war_with = scope:target.primary_attacker - } - } - } - call_ally_interaction_event_effect = yes - - } -} - -#So that we can show a tooltip in the event about them responding -call_ally_interaction_event_effect = { - scope:target = { - hidden_effect = { - set_called_to = scope:recipient - } - if = { - limit = { - is_attacker = scope:actor - } - add_attacker = scope:recipient - scope:actor = { - #Check for Mandala first - if = { - limit = { - government_has_flag = government_is_mandala - scope:recipient = { is_tributary_of = scope:actor } - } - if = { - limit = { - scope:recipient.primary_title.tier = tier_barony - } - add_piety = { - add = minor_piety_loss - multiply = 2 - } - } - else_if = { - limit = { - scope:recipient.primary_title.tier = tier_county - } - add_piety = { - add = medium_piety_loss - multiply = 2 - } - } - else_if = { - limit = { - scope:recipient.primary_title.tier = tier_duchy - } - add_piety = { - add = major_piety_loss - multiply = 2 - } - } - else_if = { - limit = { - scope:recipient.primary_title.tier = tier_kingdom - } - add_piety = { - add = massive_piety_loss - multiply = 1.5 - } - } - else_if = { - limit = { - scope:recipient.primary_title.tier = tier_empire - } - add_piety = { - add = monumental_piety_loss - multiply = 1.5 - } - } - else_if = { - limit = { - scope:recipient.primary_title.tier = tier_hegemony - } - add_piety = { - add = monumental_piety_loss - multiply = 2.5 - } - } - } - #Then do everything else - else = { - if = { - limit = { - NOT = { - has_relation_blood_brother = scope:recipient - } - } - if = { - limit = { - scope:recipient.primary_title.tier = tier_barony - } - add_prestige = -10 - } - else_if = { - limit = { - scope:recipient.primary_title.tier = tier_county - } - add_prestige = minor_prestige_loss - } - else_if = { - limit = { - scope:recipient.primary_title.tier = tier_duchy - } - add_prestige = medium_prestige_loss - } - else_if = { - limit = { - scope:recipient.primary_title.tier = tier_kingdom - } - add_prestige = major_prestige_loss - } - else_if = { - limit = { - scope:recipient.primary_title.tier = tier_empire - } - add_prestige = massive_prestige_loss - } - } - } - - } - } - else = { - add_defender = scope:recipient - } - } -} - -seduce_interaction_stress_effect = { - if = { - limit = { - NOT = { - scope:recipient = { - is_consort_of = scope:actor - } - } - OR = { - scope:actor = { - is_male = yes - faith = { NOT = { has_doctrine_parameter = adultery_male_accepted } } - } - scope:actor = { - is_female = yes - faith = { NOT = { has_doctrine_parameter = adultery_female_accepted } } - } - } - } - scope:actor = { - stress_impact = { - chaste = medium_stress_impact_gain - zealous = minor_stress_impact_gain - honest = minor_stress_impact_gain - just = minor_stress_impact_gain - } - } - } - else = { - scope:actor = { - stress_impact = { - chaste = medium_stress_impact_gain - } - } - } -} - -retract_vassal_interaction_effect = { - scope:actor = { - vassal_revocation_tyranny_effect = yes - if = { - limit = { - vassal_revocation_is_tyrannical_trigger = { VASSAL = scope:recipient } - } - stress_impact = { - generous = medium_stress_impact_gain - just = medium_stress_impact_gain - } - } - else = { - stress_impact = { - generous = medium_stress_impact_gain - forgiving = minor_stress_impact_gain - } - } - consume_revoke_title_reason = scope:recipient - } - create_title_and_vassal_change = { - type = revoked - save_scope_as = change - add_claim_on_loss = no - } - - scope:secondary_recipient = { - change_liege = { - liege = scope:actor - change = scope:change - } - } - - resolve_title_and_vassal_change = scope:change - - scope:recipient = { - add_opinion = { - target = scope:actor - modifier = retracted_vassal - } - } - if = { - limit = { - always = scope:hook - scope:actor ?= { has_hook = scope:recipient } - } - scope:actor = { use_hook = scope:recipient } - } -} - -ask_for_pardon_interaction_effect = { - scope:actor = { - every_liege_or_above = { - if = { - limit = { has_imprisonment_reason = scope:actor } - send_interface_toast = { - title = ask_for_pardon_interaction_accept_toast - left_icon = scope:recipient - consume_imprisonment_reasons = scope:actor - } - } - if = { - limit = { has_banish_reason = scope:actor } - send_interface_toast = { - title = ask_for_pardon_interaction_accept_toast - left_icon = scope:recipient - consume_banish_reasons = scope:actor - } - } - if = { - limit = { has_execute_reason = scope:actor } - send_interface_toast = { - title = ask_for_pardon_interaction_accept_toast - left_icon = scope:recipient - consume_execute_reasons = scope:actor - } - } - if = { - limit = { has_revoke_title_reason = scope:actor } - send_interface_toast = { - title = ask_for_pardon_interaction_accept_toast - left_icon = scope:recipient - consume_revoke_title_reason = scope:actor - } - } - } - stress_impact = { - stubborn = minor_stress_impact_gain - } - } - if = { - limit = { - always = scope:hook - scope:actor = { # TO make sure you still have a hook on them - has_usable_hook = scope:recipient - } - } - scope:actor = { - use_hook = scope:recipient - } - } -} - -revoke_title_interaction_effect = { - if = { - limit = { - scope:recipient = { - faith = scope:actor.faith - government_has_flag = government_is_theocracy - } - scope:actor != scope:actor.faith.religious_head #No loss if actor is head of faith themselves - } - scope:actor = { - add_piety = major_piety_loss - } - if = { - limit = { - exists = scope:actor.faith.religious_head - } - scope:actor.faith.religious_head = { - add_opinion = { - target = scope:actor - modifier = impious_opinion - opinion = -20 - } - } - } - } - if = { - limit = { - exists = scope:actor.faith.religious_head - scope:recipient = scope:actor.faith.religious_head - } - scope:actor = { - add_piety_level = -2 - } - } - if = { - limit = { - scope:landed_title.tier != tier_barony - scope:recipient = { - NOT = { government_has_flag = government_is_herder } - } - } - scope:actor = { - revocation_tyranny_effect = { VASSAL = scope:recipient } - title_revocation_stress_effect = { VASSAL = scope:recipient } - consume_revoke_title_reason = scope:recipient - } - scope:recipient = { - if = { - limit = { - NOT = { exists = scope:administrative_revocation } - is_landed_or_landless_administrative = no - } - add_pressed_claim = scope:landed_title - } - if = { - limit = { - is_a_faction_member = yes - } - add_joined_faction_discontent = 25 - } - } - - if = { - limit = { scope:landed_title.tier = tier_county } - scope:landed_title = { - change_county_control = { - value = -30 - if = { - limit = { - scope:recipient.culture != scope:actor.culture - scope:recipient.culture = this.culture - } - multiply = 1.5 - } - if = { - limit = { - scope:recipient.faith != scope:actor.faith - scope:recipient.faith = this.faith - } - multiply = 1.5 - } - } - } - } - - if = { - limit = { - scope:actor.culture = { has_cultural_parameter = penalty_for_revoking_titles_from_house_members } - exists = scope:actor.house - exists = scope:recipient.house - scope:actor.house = scope:recipient.house - } - if = { - limit = { - scope:landed_title.tier = tier_county - } - scope:actor = { - add_prestige = medium_prestige_loss - } - } - else_if = { - limit = { - scope:landed_title.tier = tier_duchy - } - scope:actor = { - add_prestige = major_prestige_loss - } - } - else_if = { #Empire - limit = { - scope:landed_title.tier = tier_kingdom - } - scope:actor = { - add_prestige = massive_prestige_loss - } - } - } - - if = { - limit = { - scope:actor.culture = { has_cultural_parameter = penalty_for_revoking_titles_from_close_family } - exists = scope:actor - exists = scope:recipient - scope:actor = { - is_close_family_of = scope:recipient - } - } - if = { - limit = { - scope:landed_title.tier = tier_county - } - scope:actor = { - add_prestige = medium_prestige_loss - } - } - else_if = { - limit = { - scope:landed_title.tier = tier_duchy - } - scope:actor = { - add_prestige = major_prestige_loss - } - } - else_if = { #Empire - limit = { - scope:landed_title.tier = tier_kingdom - } - scope:actor = { - add_prestige = massive_prestige_loss - } - } - } - - if = { - limit = { - scope:actor.culture = { has_cultural_parameter = piety_penalty_for_revoking_titles_from_house_members } - exists = scope:actor.house - exists = scope:recipient.house - scope:actor.house = scope:recipient.house - } - if = { - limit = { - scope:landed_title.tier = tier_county - } - scope:actor = { - add_piety = medium_piety_loss - } - } - else_if = { - limit = { - scope:landed_title.tier = tier_duchy - } - scope:actor = { - add_piety = major_piety_loss - } - } - else = { #Can't revoke empire titles anyway - limit = { - scope:landed_title.tier = tier_kingdom - } - scope:actor = { - add_piety = massive_piety_loss - } - } - } - - # If we're a clan this interaction affects unity - if = { - limit = { - scope:actor = { government_has_flag = government_is_clan } - scope:recipient = { government_has_flag = government_is_clan } - exists = scope:actor.house - exists = scope:recipient.house - scope:actor.house = scope:recipient.house - scope:landed_title.tier >= tier_county - } - scope:actor.house = { - if = { - limit = { - scope:landed_title.tier = tier_county - } - save_scope_value_as = { - name = revoke_title_unity_loss - value = minor_unity_loss - } - } - if = { - limit = { - scope:landed_title.tier = tier_duchy - } - save_scope_value_as = { - name = revoke_title_unity_loss - value = medium_unity_loss - } - } - else_if = { - limit = { - scope:landed_title.tier = tier_kingdom - } - save_scope_value_as = { - name = revoke_title_unity_loss - value = major_unity_loss - } - } - if = { - limit = { exists = scope:revoke_title_unity_loss } - add_clan_unity_interaction_effect = { - CHARACTER = scope:actor - TARGET = scope:recipient - VALUE = scope:revoke_title_unity_loss - DESC = clan_unity_title_revoked.desc - REVERSE_NON_HOUSE_TARGET = no - } - } - } - } - - # EP3 - Become Adventurer - Revocation - scope:recipient = { - if = { - limit = { - has_ep3_dlc_trigger = yes - is_valid_for_laampdom = yes - } - # Plus for our memory variable. - primary_title = { save_scope_as = lost_primary_title } - custom_tooltip = { - text = laamp_may_become_adventurer_tt - trigger_event = { - id = ep3_laamps.0041 - delayed = yes - } - } - } - } - } - else = { - if = { - limit = { - NOT = { exists = scope:revoke_title_interaction } - } - custom_tooltip = IS_ALLOWED_TO_REVOKE_TITLE_BARONY_DESC - scope:actor = { - if = { - limit = { - any_vassal = { - vassal_stance = barons_and_minor_landholders - } - } - custom_tooltip = barons_and_minor_landholders_disapproves_baron_revocations - hidden_effect = { - every_vassal = { - vassal_stance = barons_and_minor_landholders - add_opinion = { - target = scope:actor - modifier = barons_and_minor_landholders_disapproves_baron_revocations_opinion - } - } - } - } - } - } - } - - - scope:actor = { - if = { - limit = { - scope:hook = yes - scope:recipient = { is_alive = yes } - } - use_hook = scope:recipient - } - if = { - limit = { - scope:hook_liege ?= yes - scope:intermediary = { is_alive = yes } - } - use_hook = scope:intermediary - } - } - if = { - limit = { - scope:recipient = { government_has_flag = government_is_herder } - } - scope:recipient = { - add_opinion = { - target = scope:actor - opinion = -10 # Herders don't care much - modifier = revoked_title - } - } - } - else = { - scope:recipient = { - add_opinion = { - target = scope:actor - modifier = revoked_title - } - if = { #If they recently imprisoned you, or asked for your excommunication, they become your rival - limit = { - OR = { - has_opinion_modifier = { - target = scope:actor - modifier = released_from_prison - } - AND = { - exists = var:requested_my_excommunication - var:requested_my_excommunication = scope:actor - } - } - NOT = { - has_relation_rival = scope:actor - } - } - if = { - limit = { - has_relation_potential_rival = scope:actor - } - remove_relation_potential_rival = scope:actor - } - set_relation_rival = { - target = scope:actor - reason = rival_revoked_title_reversed - } - } - else = { - progress_towards_rival_effect = { - CHARACTER = scope:actor - REASON = rival_revoked_title_progress - OPINION = 0 - } - } - # HOUSE RELATION - house ?= { - if = { - limit = { NOT = { this = scope:actor.house } } - change_house_relation_effect = { - HOUSE = scope:actor.house - VALUE = house_relation_damage_medium_value - REASON = title_revocation - CHAR = scope:actor - TARGET_CHAR = scope:recipient - TITLE = scope:landed_title - } - } - } - } - } - - # Penalty for taking the Party Baron's last title. I mean, come on... - if = { - limit = { - scope:recipient = { - has_character_flag = is_party_baron - NOT = { - any_held_title = { - this != scope:landed_title - } - } - } - } - scope:actor = { - add_character_modifier = { - modifier = party_baron_ended_the_party_modifier - years = 10 - } - random_owned_story = { - type = story_party_baron - end_story = yes - } - } - } -} - -call_house_member_to_war_interaction_effect = { - if = { - limit = { - exists = scope:target - } - - scope:target = { - hidden_effect = { - set_called_to = scope:recipient - } - if = { - limit = { - is_attacker = scope:actor - } - add_attacker = scope:recipient - } - else = { - add_defender = scope:recipient - } - } - } - - if = { - limit = { always = scope:hook } - scope:actor = { - use_hook = scope:recipient - } - } -} - -sun_trial_interaction_piety_effect = { - #Imprisoner gets piety - add_piety = { - value = minor_piety_value - if = { - limit = { has_execute_reason = scope:recipient } - add = minor_piety_value - } - if = { - limit = { has_banish_reason = scope:recipient } - add = miniscule_piety_value - } - if = { - limit = { has_revoke_title_reason = scope:recipient } - add = miniscule_piety_value - } - } -} - -declaration_of_repentance_interaction_effect = { - if = { - limit = { scope:declaration_hook = yes } - scope:actor = { - use_hook = scope:recipient - } - } - - scope:actor = { - if = { - limit = { - scope:declaration_hook = no - } - #Lose a ton of prestige (e.g., Henry's Walk to Canossa) - add_prestige = massive_prestige_loss - add_prestige_level = -1 - } - - #Character cannot be excommunicated again for 10 years. - remove_trait = excommunicated - add_character_modifier = { - modifier = excommunication_recently_lifted - years = 10 - } - - stress_impact = { - cynical = minor_stress_impact_gain - } - } - scope:recipient = { - add_prestige = major_prestige_gain - add_opinion = { - modifier = repentant_opinion - target = scope:actor - opinion = 10 - } - } -} - -seek_indulgences_interaction_effect = { - scope:actor = { - if = { - limit = { - OR = { - has_character_flag = seek_indulgences_removed_kinslayer_3 # For the post-interaction letter event - AND = { - has_trait = kinslayer_3 - trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = kinslayer_3 GENDER_CHARACTER = scope:actor } - } - } - } - pay_short_term_gold = { - target = scope:recipient - gold = seek_indulgences_major_criminal_trait_value - } - remove_trait_force_tooltip = kinslayer_3 - add_character_flag = { - flag = seek_indulgences_removed_kinslayer_3 - days = 30 - } - } - else_if = { - limit = { - OR = { - has_character_flag = seek_indulgences_removed_kinslayer_2 # For the post-interaction letter event - AND = { - has_trait = kinslayer_2 - trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = kinslayer_2 GENDER_CHARACTER = scope:actor } - } - } - } - pay_short_term_gold = { - target = scope:recipient - gold = seek_indulgences_medium_criminal_trait_value - } - remove_trait_force_tooltip = kinslayer_2 - add_character_flag = { - flag = seek_indulgences_removed_kinslayer_2 - days = 30 - } - } - else_if = { - limit = { - OR = { - has_character_flag = seek_indulgences_removed_witch # For the post-interaction letter event - AND = { - has_trait = witch - trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = witch GENDER_CHARACTER = scope:actor } - } - } - } - pay_short_term_gold = { - target = scope:recipient - gold = seek_indulgences_medium_criminal_trait_value - } - remove_trait_force_tooltip = witch - add_character_flag = { - flag = seek_indulgences_removed_witch - days = 30 - } - } - else_if = { - limit = { - OR = { - has_character_flag = seek_indulgences_removed_deviant # For the post-interaction letter event - AND = { - has_trait = deviant - trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = deviant GENDER_CHARACTER = scope:actor } - } - } - } - pay_short_term_gold = { - target = scope:recipient - gold = seek_indulgences_medium_criminal_trait_value - } - remove_trait_force_tooltip = deviant - add_character_flag = { - flag = seek_indulgences_removed_deviant - days = 30 - } - } - else_if = { - limit = { - OR = { - has_character_flag = seek_indulgences_removed_sodomite # For the post-interaction letter event - AND = { - has_trait = sodomite - trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = sodomite GENDER_CHARACTER = scope:actor } - } - } - } - pay_short_term_gold = { - target = scope:recipient - gold = seek_indulgences_medium_criminal_trait_value - } - remove_trait_force_tooltip = sodomite - add_character_flag = { - flag = seek_indulgences_removed_sodomite - days = 30 - } - } - else_if = { - limit = { - OR = { - has_character_flag = seek_indulgences_removed_kinslayer_1 # For the post-interaction letter event - AND = { - has_trait = kinslayer_1 - trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = kinslayer_1 GENDER_CHARACTER = scope:actor } - } - } - } - pay_short_term_gold = { - target = scope:recipient - gold = seek_indulgences_minor_criminal_trait_value - } - remove_trait_force_tooltip = kinslayer_1 - add_character_flag = { - flag = seek_indulgences_removed_kinslayer_1 - days = 30 - } - } - else_if = { - limit = { - OR = { - has_character_flag = seek_indulgences_removed_adulterer # For the post-interaction letter event - AND = { - has_trait = adulterer - trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = adulterer GENDER_CHARACTER = scope:actor } - } - } - } - pay_short_term_gold = { - target = scope:recipient - gold = seek_indulgences_minor_criminal_trait_value - } - remove_trait_force_tooltip = adulterer - add_character_flag = { - flag = seek_indulgences_removed_adulterer - days = 30 - } - } - else_if = { - limit = { - OR = { - has_character_flag = seek_indulgences_removed_fornicator # For the post-interaction letter event - AND = { - has_trait = fornicator - trait_is_shunned_or_criminal_in_faith_trigger = { FAITH = faith TRAIT = fornicator GENDER_CHARACTER = scope:actor } - } - } - } - pay_short_term_gold = { - target = scope:recipient - gold = seek_indulgences_minor_criminal_trait_value - } - remove_trait_force_tooltip = fornicator - add_character_flag = { - flag = seek_indulgences_removed_fornicator - days = 30 - } - } - else_if = { - limit = { has_trait = gallowsbait } - pay_short_term_gold = { - target = scope:recipient - gold = seek_indulgences_minor_criminal_trait_value - } - if = { - limit = { - has_trait_xp = { - trait = gallowsbait - track = bandit - value >= wipe_slate_min_xp_to_remove_trait_value - } - } - add_trait_xp = { - trait = gallowsbait - track = bandit - value = -40 - } - } - else_if = { - limit = { - has_trait_xp = { - trait = gallowsbait - track = trickster - value >= wipe_slate_min_xp_to_remove_trait_value - } - } - add_trait_xp = { - trait = gallowsbait - track = trickster - value = -40 - } - } - else_if = { - limit = { - has_trait_xp = { - trait = gallowsbait - track = thief - value >= wipe_slate_min_xp_to_remove_trait_value - } - } - add_trait_xp = { - trait = gallowsbait - track = thief - value = -40 - } - } - else_if = { - limit = { - has_trait_xp = { - trait = gallowsbait - track = poacher - value >= wipe_slate_min_xp_to_remove_trait_value - } - } - add_trait_xp = { - trait = gallowsbait - track = poacher - value = -40 - } - } - else_if = { - limit = { - has_trait_xp = { - trait = gallowsbait - track = marauder - value >= wipe_slate_min_xp_to_remove_trait_value - } - } - add_trait_xp = { - trait = gallowsbait - track = marauder - value = -40 - } - } - else = { remove_trait = gallowsbait } - } - else = { - pay_short_term_gold = { - target = scope:recipient - gold = seek_indulgences_buy_piety_value - } - add_piety = medium_piety_gain - } - - reverse_add_opinion = { - target = scope:recipient - modifier = pleased_opinion - opinion = 25 - } - stress_impact = { - greedy = minor_stress_impact_gain - cynical = minor_stress_impact_gain - } - } -} - -hof_ask_for_gold_interaction_effect = { - scope:recipient = { - pay_short_term_gold = { - target = scope:actor - gold = scope:actor.head_of_faith_gold_value - } - add_opinion = { - target = scope:actor - modifier = requested_money_opinion - opinion = -20 - } - } - scope:actor = { - if = { - limit = { - scope:hook = no - } - add_piety = major_piety_loss - } - if = { - limit = { always = scope:hook } - use_hook = scope:recipient - } - if = { - limit = { - any_vassal = { - vassal_stance = zealot - } - } - custom_tooltip = zealot_vassal_disapproves_asking_hof_for_gold - hidden_effect = { - every_vassal = { - vassal_stance = zealot - add_opinion = { - target = scope:actor - modifier = zealot_disapproves_of_asking_hof_for_gold_opinion - } - } - } - } - } -} - -hof_ask_for_claim_interaction_effect = { - scope:secondary_recipient = { - add_opinion = { - target = scope:actor - modifier = claimed_my_title_opinion - opinion = -50 - } - } - scope:actor = { - add_piety = { - value = claim_piety_value - multiply = -1 - } - if = { - limit = { always = scope:claim_hook } - use_hook = scope:recipient - } - add_pressed_claim = scope:target - } -} - -vassal_claim_liege_title_interaction_effect = { - scope:actor = { - add_unpressed_claim = scope:target - } - scope:recipient = { - add_opinion = { - target = scope:actor - modifier = claimed_my_title_opinion - opinion = -50 - } - } -} - -convert_at_war_interaction_effect = { - scope:actor = { - every_character_war = { - limit = { - primary_defender = scope:actor - primary_attacker = scope:recipient - using_non_ghw_holy_war_cb_trigger = yes - } - set_variable = { - name = invalidate_defender_faith_change #This variable will invalidate the war and send proper invalidation message - value = yes - } - show_as_tooltip = { end_war = invalidated } - } - - set_character_faith_with_conversion = scope:recipient.faith - - add_piety = medium_piety_loss - if = { - limit = { NOT = { scope:recipient.faith = { has_doctrine_parameter = unreformed } } } - add_piety_level = -3 - } - stress_impact = { - zealous = medium_stress_impact_gain - } - } - scope:recipient = { - add_piety_experience = major_piety_value - } -} - -demand_conversion_vassal_ruler_interaction_effect = { - demand_conversion_interaction_effect = yes - hidden_effect = { - if = { - limit = { - exists = scope:recipient.capital_county - scope:recipient.capital_county.faith = scope:recipient.faith - } - save_scope_value_as = { - name = convert_capital - value = yes - } - } - } - if = { - limit = { - scope:hook = yes - scope:actor = { has_usable_hook = scope:recipient } - } - scope:actor = { - use_hook = scope:recipient - } - } - else_if = { - limit = { scope:recipient = { is_imprisoned_by = scope:actor } } - scope:recipient = { release_from_prison = yes } - } - #Negative opinions - scope:recipient = { - add_opinion = { - modifier = demanded_my_conversion_opinion - target = scope:actor - opinion = -10 - } - } -} - -demand_conversion_player_ruler_interaction_effect = { - demand_conversion_interaction_effect = yes - - if = { - limit = { - scope:demand_conversion_hook = yes - } - scope:actor = { - use_hook = scope:recipient - } - } -} - -title_revocation_stress_effect = { - if = { - limit = { - title_revocation_is_tyrannical_trigger = { VASSAL = $VASSAL$ } - } - stress_impact = { - generous = medium_stress_impact_gain - just = medium_stress_impact_gain - } - } - else_if = { - limit = { - NOT = { has_revoke_title_reason = $VASSAL$ } - } - stress_impact = { - generous = minor_stress_impact_gain - forgiving = minor_stress_impact_gain - } - } - else = { - # No stress gain if you have a reason - } -} - -revoke_holy_order_lease_effect = { - if = { - limit = { - $TARGET$.faith = { - any_faith_holy_order = { - num_leased_titles = 1 - title = $BARONY$.lessee_title - } - } - } - custom_tooltip = destroy_holy_order_warning - } - - $TARGET$ = { - hidden_effect = { #Nudge towards rivalry - if = { - limit = { - NOR = { - has_relation_rival = $CHARACTER$ - has_relation_potential_rival = $CHARACTER$ - } - } - set_relation_potential_rival = $CHARACTER$ - } - } - - if = { - limit = { - NOT = { this = $CHARACTER$ } - } - add_opinion = { - target = $CHARACTER$ - modifier = angry_opinion - opinion = -40 - } - } - - faith = { - if = { - limit = { - exists = religious_head - NOT = { religious_head = $CHARACTER$ } - } - religious_head = { - add_opinion = { - modifier = angry_opinion - target = $CHARACTER$ - opinion = -20 - } - if = { - limit = { - has_opinion_modifier = { - target = $CHARACTER$ - modifier = founded_holy_order_opinion - } - } - remove_opinion = { - target = $CHARACTER$ - modifier = founded_holy_order_opinion - } - } - } - } - } - } - - $CHARACTER$ = { - send_interface_message = { - type = holy_order_lease_revoked_message - title = revoke_leased_title_interaction_notification - right_icon = $TARGET$ - - # Zealous costs stress if same-faith. - if = { - limit = { $CHARACTER$.faith = $TARGET$.faith } - stress_impact = { - zealous = massive_stress_impact_gain - generous = medium_stress_impact_gain - order_member = minor_stress_impact_gain - } - - add_piety = { - value = 0 - subtract = cancel_holy_order_piety_cost - } - } - else_if = { - # Bit less but still some if you view the other faith as astray. - limit = { - $CHARACTER$.faith = { - faith_hostility_level = { - target = $TARGET$.faith - value <= faith_astray_level - } - } - } - stress_impact = { - zealous = major_stress_impact_gain - generous = medium_stress_impact_gain - } - - add_piety = { - value = -100 - } - } - else = { - - if = { - limit = { exists = $CHARACTER$.faith.religious_head } - $CHARACTER$.faith.religious_head = { - add_opinion = { - modifier = pleased_opinion - target = $CHARACTER$ - opinion = 20 - } - } - } - - add_piety = { - value = 250 - } - - $TARGET$.faith = { - # Fervor impact: big as it's rare - change_fervor = { - value = 10 - desc = fervor_gain_holy_order_expelled_by_force - } - } - - # If the county has the same faith than the HO, locals are unhappy - $BARONY$ = { - if = { - limit = { title_province.county.faith = $TARGET$.faith } - title_province.county = { - add_county_modifier = { - modifier = lost_holy_order_modifier - years = 10 - } - } - } - } - } - - $BARONY$ = { - revoke_lease = yes - } - } - } -} - -revoke_holy_order_duel_victor_apply_effects_effect = { - scope:sc_victor = { - add_stress = major_stress_loss - add_prestige = major_prestige_gain - } -} - -add_clan_unity_interaction_effect = { - if = { - limit = { # Check if unity is relevant - $CHARACTER$ = { government_has_flag = government_is_clan } - $TARGET$ = { government_has_flag = government_is_clan } - exists = $CHARACTER$.house - exists = $TARGET$.house - $CHARACTER$.house = $TARGET$.house - trigger_if = { - limit = { - exists = scope:actor - exists = scope:recipient - scope:actor != scope:recipient - } - NOT = { $CHARACTER$ = $TARGET$ } # As a safety, let's make sure that we are not interacting with ourselves - } - } - - apply_clan_unity_interaction_effect = { - CHARACTER = $CHARACTER$ - TARGET = $TARGET$ - DESC = $DESC$ - VALUE = $VALUE$ - VALUE_REVERSED = no - } - } - else_if = { - limit = { # Only apply reversed effect for the house head to keep the gauge in check - $REVERSE_NON_HOUSE_TARGET$ = yes - - $CHARACTER$ = { government_has_flag = government_is_clan } - $CHARACTER$.house ?= { - house_head = $CHARACTER$ - } - OR = { - AND = { - exists = $TARGET$.house - NOT = { $CHARACTER$.house = $TARGET$.house } - } - $TARGET$ = { is_lowborn = yes } - } - } - apply_clan_unity_interaction_effect = { - CHARACTER = $CHARACTER$ - TARGET = $TARGET$ - DESC = $DESC$ - VALUE = $VALUE$ - VALUE_REVERSED = yes - } - } -} - -apply_clan_unity_interaction_effect = { - # Save scopes for localisation - $CHARACTER$ = { save_scope_as = unity_character } - $TARGET$ = { save_scope_as = unity_target } - - $CHARACTER$.house = { - save_scope_as = character_house - - add_unity_value = { - value = { - value = $VALUE$ - if = { # House heads have a larger impact on unity - limit = { house_head = $CHARACTER$ } - multiply = unity_house_head_multiplier_value - } - if = { - limit = { $VALUE_REVERSED$ = yes } - multiply = -1 - } - } - character = $CHARACTER$ - desc = $DESC$ - } - } - - # Notify human players if they are not involved! - if = { - limit = { - trigger_if = { - limit = { $VALUE$ >= 0 } - $VALUE$ >= major_unity_value - } - trigger_else = { - $VALUE$ <= major_unity_value - } - } - # Notify human players if they are not involved! - notify_players_about_unity_change_effect = { - CHARACTER = $CHARACTER$ - TARGET = $TARGET$ - DESC = $DESC$ - } - } -} - -diarch_declare_recipient_criminal_effect = { - scope:actor = { - # First we process the diarch. - ## Players get a different tooltip, since they don't want to see opinion. - if = { - limit = { is_ai = no } - custom_tooltip = diarch_imprison_reason_for_player.tt - hidden_effect = { - add_opinion = { - target = scope:recipient - modifier = treasonous_disobeyed_diarch - } - } - } - ## AI use the standard opinion flow. - else = { - add_opinion = { - target = scope:recipient - modifier = treasonous_disobeyed_diarch - } - } - # Then their liege. - liege = { - # Same flow: players get a different tooltip so that they don't see opinion. - if = { - limit = { is_ai = no } - custom_tooltip = ADD_OPINION_EFFECT_I_HAVE_IMPRISONMENT_REASON_UNUSABLE - hidden_effect = { - add_opinion = { - target = scope:recipient - modifier = treasonous_disobeyed_diarch - } - } - } - # But AI just get opinion. - else = { - add_opinion = { - target = scope:recipient - modifier = treasonous_disobeyed_diarch - } - } - } - } -} - -diarch_declare_claim_war_effect = { - start_war = { - casus_belli = claim_cb - target = scope:recipient - claimant = scope:actor - target_title = scope:landed_title - } -} - -diarch_declare_vassalisation_war_effect = { - start_war = { - casus_belli = diarch_vassalisation_cb - target = scope:recipient - target_title = scope:secondary_recipient.primary_title - } -} - -make_criminal_effect = { - random_list = { - 10 = { - trigger = { - trait_is_criminal_in_faith_trigger = { - TRAIT = adulterer - GENDER_CHARACTER = root - FAITH = root.faith - } - NOT = { has_trait = adulterer } - } - add_trait = adulterer - } - 10 = { - trigger = { - trait_is_criminal_in_faith_trigger = { - TRAIT = kinslayer_3 - GENDER_CHARACTER = root - FAITH = root.faith - } - NOT = { has_trait = kinslayer_3 } - } - add_trait = kinslayer_3 - } - 10 = { - trigger = { - trait_is_criminal_in_faith_trigger = { - TRAIT = witch - GENDER_CHARACTER = root - FAITH = root.faith - } - NOT = { has_trait = witch } - } - add_trait = witch - } - 10 = { - trigger = { - trait_is_criminal_in_faith_trigger = { - TRAIT = cannibal - GENDER_CHARACTER = root - FAITH = root.faith - } - NOT = { has_trait = cannibal } - } - add_trait = cannibal - } - 10 = { - trigger = { - trait_is_criminal_in_faith_trigger = { - TRAIT = deviant - GENDER_CHARACTER = root - FAITH = root.faith - } - NOT = { has_trait = deviant } - } - add_trait = deviant - } - 10 = { - trigger = { - trait_is_criminal_in_faith_trigger = { - TRAIT = fornicator - GENDER_CHARACTER = root - FAITH = root.faith - } - NOT = { has_trait = fornicator } - } - add_trait = fornicator - } - } -} - -clear_hostile_actions_lock_flag_effect = { - if = { - limit = { has_character_flag = flag_hostile_actions_disabled_delay } - remove_character_flag = flag_hostile_actions_disabled_delay - } -} - -ep3_hof_ask_for_influence_interaction_effect = { - scope:actor = { - if = { - limit = { - domicile ?= { - has_domicile_parameter = influence_gain_from_hof_support_6 - } - } - change_influence = ep3_requested_faith_support_6_value - custom_tooltip = requested_faith_support_domicile_tt - } - else_if = { - limit = { - domicile ?= { - has_domicile_parameter = influence_gain_from_hof_support_5 - } - } - change_influence = ep3_requested_faith_support_5_value - custom_tooltip = requested_faith_support_domicile_tt - } - else_if = { - limit = { - domicile ?= { - has_domicile_parameter = influence_gain_from_hof_support_4 - } - } - change_influence = ep3_requested_faith_support_4_value - custom_tooltip = requested_faith_support_domicile_tt - } - else_if = { - limit = { - domicile ?= { - has_domicile_parameter = influence_gain_from_hof_support_3 - } - } - change_influence = ep3_requested_faith_support_3_value - custom_tooltip = requested_faith_support_domicile_tt - } - else_if = { - limit = { - domicile ?= { - has_domicile_parameter = influence_gain_from_hof_support_2 - } - } - change_influence = ep3_requested_faith_support_2_value - custom_tooltip = requested_faith_support_domicile_tt - } - else_if = { - limit = { - domicile ?= { - has_domicile_parameter = influence_gain_from_hof_support_1 - } - } - change_influence = ep3_requested_faith_support_1_value - custom_tooltip = requested_faith_support_domicile_tt - } - else = { - change_influence = ep3_requested_faith_support_0_value - } - house = { - add_house_modifier = { - modifier = ep3_requested_faith_support_modifier - years = 10 - } - } - - reverse_add_opinion = { - target = scope:recipient - modifier = requested_influence_opinion - opinion = -30 - } - } - scope:actor = { - if = { - limit = { - scope:hook = no - } - add_piety = massive_piety_loss - } - if = { - limit = { always = scope:hook } - use_hook = scope:recipient - } - } -} - -torture_memory_effect = { - $VICTIM$ = { - create_character_memory = { - type = tortured_memory - participants = { torturer = $TORTURER$ } - } - ordered_memory = { - memory_type = tortured_memory - limit = { - any_memory_participant = { this = $TORTURER$ } - } - order_by = memory_creation_date - save_scope_as = tortured_memory - set_variable = { - name = type - value = flag:$TYPE$ - } - } - } - $TORTURER$ = { - create_character_memory = { - type = torturer_memory - participants = { victim = $VICTIM$ } - } - ordered_memory = { - memory_type = torturer_memory - limit = { - any_memory_participant = { this = $VICTIM$ } - } - order_by = memory_creation_date - save_scope_as = torturer_memory - set_variable = { - name = type - value = flag:$TYPE$ - } - } - } -} diff --git a/N3OW/common/scripted_effects/00_intercourse_effects.txt b/N3OW/common/scripted_effects/00_intercourse_effects.txt deleted file mode 100644 index 4fbc38d4..00000000 --- a/N3OW/common/scripted_effects/00_intercourse_effects.txt +++ /dev/null @@ -1,30 +0,0 @@ - -##################################################################### -# EFFECT LIST -##################################################################### -# !!! Remember to add all new effects with a short description here !!! - - -#Effects to run in events when intercourse takes place (pregnancy and SDT chance) -#intercourse_with_scope_effect - with a known, existing character -#intercourse_with_dummy_effect - with a dummy character -#intercourse_with_unknown_effect - when the gender(s) of the other character(s) is unclear - -##################################################################### -# EFFECTS -##################################################################### - -#Needs argument intercourse_character -intercourse_with_character_effect = { - $INTERCOURSE_CHARACTER$ = { add_gold = 1 } -} - -intercourse_with_dummy_effect = { - -} - -intercourse_with_unknown_effect = { - -} - - diff --git a/N3OW/common/scripted_effects/00_intrigue_lifestyle_effects.txt b/N3OW/common/scripted_effects/00_intrigue_lifestyle_effects.txt deleted file mode 100644 index 31520353..00000000 --- a/N3OW/common/scripted_effects/00_intrigue_lifestyle_effects.txt +++ /dev/null @@ -1,1004 +0,0 @@ -#Effects used in Lifestyle Focus events - - -##################################################################### -# EFFECT LIST -##################################################################### -# !!! Remember to add all new effects with a short description here !!! - -#intrigue_dread_4001_torture_increase_effectiveness_with_trait_effect - Used in event to check torture methods against target's personality. -#intrigue_dread_4001_torture_increase_effectiveness_remove_trait_effect - Used in event to check torture methods against target's personality, then remove those personality traits. -#intrigue_scheming_4050_display_player_response_effect - Used in event to display a special tooltip if the secret buyer is a player. - - - -#Find one personality trigger that the character has, and two that they do not. -decide_what_options_to_present_effect = { - hidden_effect = { - random_list = { - 1 = { - modifier = { - add = 2 - scope:courtier_spy = { - has_trait_malicious_trigger = yes - } - } - ai_value_modifier = { - ai_vengefulness = medium_chance_impact_positive_vengefulness - } - set_variable = { - name = option_to_present - value = flag:malicious - days = 800 - } - } - 1 = { - modifier = { - add = 2 - scope:courtier_spy = { - has_trait_benevolent_trigger = yes - } - } - ai_value_modifier = { - ai_compassion = medium_chance_impact_positive_compassion - ai_rationality = low_chance_impact_positive_rationality - } - set_variable = { - name = option_to_present - value = flag:benevolent - days = 800 - } - } - 1 = { - modifier = { - add = 2 - scope:courtier_spy = { - has_trait_dominant_trigger = yes - } - } - ai_value_modifier = { - ai_boldness = medium_chance_impact_positive_boldness - } - set_variable = { - name = option_to_present - value = flag:dominant - days = 800 - } - } - 1 = { - modifier = { - add = 2 - scope:courtier_spy = { - has_trait_submissive_trigger = yes - } - } - ai_value_modifier = { - ai_boldness = medium_chance_impact_negative_boldness - ai_energy = low_chance_impact_negative_energy - } - set_variable = { - name = option_to_present - value = flag:submissive - days = 800 - } - } - 1 = { - modifier = { - add = 2 - scope:courtier_spy = { - has_trait_extroverted_trigger = yes - } - } - ai_value_modifier = { - ai_boldness = medium_chance_impact_positive_boldness - ai_compassion = low_chance_impact_positive_boldness - } - set_variable = { - name = option_to_present - value = flag:extroverted - days = 800 - } - } - 1 = { - modifier = { - add = 2 - scope:courtier_spy = { - has_trait_introverted_trigger = yes - } - } - ai_value_modifier = { - ai_boldness = medium_chance_impact_negative_boldness - } - set_variable = { - name = option_to_present - value = flag:introverted - days = 800 - } - } - 1 = { - modifier = { - add = 2 - scope:courtier_spy = { - has_trait_emotional_trigger = yes - } - } - ai_value_modifier = { - ai_energy = medium_chance_impact_positive_energy - } - set_variable = { - name = option_to_present - value = flag:emotional - days = 800 - } - } - 1 = { - modifier = { - add = 2 - scope:courtier_spy = { - has_trait_levelheaded_trigger = yes - } - } - ai_value_modifier = { - ai_rationality = medium_chance_impact_positive_rationality - } - set_variable = { - name = option_to_present - value = flag:levelheaded - days = 800 - } - } - } - #Fallback - if = { - limit = { - NOT = { - exists = var:option_to_present - } - } - random_list = { - 1 = { - set_variable = { - name = option_to_present - value = flag:malicious - days = 800 - } - } - 1 = { - set_variable = { - name = option_to_present - value = flag:benevolent - days = 800 - } - } - 1 = { - set_variable = { - name = option_to_present - value = flag:dominant - days = 800 - } - } - 1 = { - set_variable = { - name = option_to_present - value = flag:submissive - days = 800 - } - } - 1 = { - set_variable = { - name = option_to_present - value = flag:extroverted - days = 800 - } - } - 1 = { - set_variable = { - name = option_to_present - value = flag:introverted - days = 800 - } - } - 1 = { - set_variable = { - name = option_to_present - value = flag:emotional - days = 800 - } - } - 1 = { - set_variable = { - name = option_to_present - value = flag:levelheaded - days = 800 - } - } - } - } - #Bad option 1 - random_list = { - 1 = { - trigger = { - NOT = { var:option_to_present = flag:malicious } - } - modifier = { - add = 2 - scope:courtier_spy = { - has_trait_malicious_trigger = yes - } - } - ai_value_modifier = { - ai_vengefulness = medium_chance_impact_positive_vengefulness - } - set_variable = { - name = option_1_fail_to_present - value = flag:malicious - days = 800 - } - } - 1 = { - trigger = { - NOT = { var:option_to_present = flag:benevolent } - } - modifier = { - add = 2 - scope:courtier_spy = { - has_trait_benevolent_trigger = yes - } - } - ai_value_modifier = { - ai_compassion = medium_chance_impact_positive_compassion - ai_rationality = low_chance_impact_positive_rationality - } - set_variable = { - name = option_1_fail_to_present - value = flag:benevolent - days = 800 - } - } - 1 = { - trigger = { - NOT = { var:option_to_present = flag:dominant } - } - modifier = { - add = 2 - scope:courtier_spy = { - has_trait_dominant_trigger = yes - } - } - ai_value_modifier = { - ai_boldness = medium_chance_impact_positive_boldness - } - set_variable = { - name = option_1_fail_to_present - value = flag:dominant - days = 800 - } - } - 1 = { - trigger = { - NOT = { var:option_to_present = flag:submissive } - } - modifier = { - add = 2 - scope:courtier_spy = { - has_trait_submissive_trigger = yes - } - } - ai_value_modifier = { - ai_boldness = medium_chance_impact_negative_boldness - ai_energy = low_chance_impact_negative_energy - } - set_variable = { - name = option_1_fail_to_present - value = flag:submissive - days = 800 - } - } - 1 = { - trigger = { - NOT = { var:option_to_present = flag:extroverted } - } - modifier = { - add = 2 - scope:courtier_spy = { - has_trait_extroverted_trigger = yes - } - } - ai_value_modifier = { - ai_boldness = medium_chance_impact_positive_boldness - ai_compassion = low_chance_impact_positive_boldness - } - set_variable = { - name = option_1_fail_to_present - value = flag:extroverted - days = 800 - } - } - 1 = { - trigger = { - NOT = { var:option_to_present = flag:introverted } - } - modifier = { - add = 2 - scope:courtier_spy = { - has_trait_introverted_trigger = yes - } - } - ai_value_modifier = { - ai_boldness = medium_chance_impact_negative_boldness - } - set_variable = { - name = option_1_fail_to_present - value = flag:introverted - days = 800 - } - } - 1 = { - trigger = { - NOT = { var:option_to_present = flag:emotional } - } - modifier = { - add = 2 - scope:courtier_spy = { - has_trait_emotional_trigger = yes - } - } - ai_value_modifier = { - ai_energy = medium_chance_impact_positive_energy - } - set_variable = { - name = option_1_fail_to_present - value = flag:emotional - days = 800 - } - } - 1 = { - trigger = { - NOT = { var:option_to_present = flag:levelheaded } - } - modifier = { - add = 2 - scope:courtier_spy = { - has_trait_levelheaded_trigger = yes - } - } - ai_value_modifier = { - ai_rationality = medium_chance_impact_positive_rationality - } - set_variable = { - name = option_1_fail_to_present - value = flag:levelheaded - days = 800 - } - } - } - #Fallback - if = { - limit = { - NOT = { - exists = var:option_1_fail_to_present - } - } - random_list = { - 1 = { - trigger = { - NOT = { var:option_to_present = flag:malicious } - } - set_variable = { - name = option_1_fail_to_present - value = flag:malicious - days = 800 - } - } - 1 = { - trigger = { - NOT = { var:option_to_present = flag:benevolent } - } - set_variable = { - name = option_1_fail_to_present - value = flag:benevolent - days = 800 - } - } - 1 = { - trigger = { - NOT = { var:option_to_present = flag:dominant } - } - set_variable = { - name = option_1_fail_to_present - value = flag:dominant - days = 800 - } - } - 1 = { - trigger = { - NOT = { var:option_to_present = flag:submissive } - } - set_variable = { - name = option_1_fail_to_present - value = flag:submissive - days = 800 - } - } - 1 = { - trigger = { - NOT = { var:option_to_present = flag:extroverted } - } - set_variable = { - name = option_1_fail_to_present - value = flag:extroverted - days = 800 - } - } - 1 = { - trigger = { - NOT = { var:option_to_present = flag:introverted } - } - set_variable = { - name = option_1_fail_to_present - value = flag:introverted - days = 800 - } - } - 1 = { - trigger = { - NOT = { var:option_to_present = flag:emotional } - } - set_variable = { - name = option_1_fail_to_present - value = flag:emotional - days = 800 - } - } - 1 = { - trigger = { - NOT = { var:option_to_present = flag:levelheaded } - } - set_variable = { - name = option_1_fail_to_present - value = flag:levelheaded - days = 800 - } - } - } - } - #Bad option 2 - random_list = { - 1 = { - trigger = { - NOR = { - var:option_to_present = flag:malicious - var:option_1_fail_to_present = flag:malicious - } - } - modifier = { - add = 2 - scope:courtier_spy = { - has_trait_malicious_trigger = yes - } - } - ai_value_modifier = { - ai_vengefulness = medium_chance_impact_positive_vengefulness - } - set_variable = { - name = option_2_fail_to_present - value = flag:malicious - days = 800 - } - } - 1 = { - trigger = { - NOR = { - var:option_to_present = flag:benevolent - var:option_1_fail_to_present = flag:benevolent - } - } - modifier = { - add = 2 - scope:courtier_spy = { - has_trait_benevolent_trigger = yes - } - } - ai_value_modifier = { - ai_compassion = medium_chance_impact_positive_compassion - ai_rationality = low_chance_impact_positive_rationality - } - set_variable = { - name = option_2_fail_to_present - value = flag:benevolent - days = 800 - } - } - 1 = { - trigger = { - NOR = { - var:option_to_present = flag:dominant - var:option_1_fail_to_present = flag:dominant - } - } - modifier = { - add = 2 - scope:courtier_spy = { - has_trait_dominant_trigger = yes - } - } - ai_value_modifier = { - ai_boldness = medium_chance_impact_positive_boldness - } - set_variable = { - name = option_2_fail_to_present - value = flag:dominant - days = 800 - } - } - 1 = { - trigger = { - NOR = { - var:option_to_present = flag:submissive - var:option_1_fail_to_present = flag:submissive - } - } - modifier = { - add = 2 - scope:courtier_spy = { - has_trait_submissive_trigger = yes - } - } - ai_value_modifier = { - ai_boldness = medium_chance_impact_negative_boldness - ai_energy = low_chance_impact_negative_energy - } - set_variable = { - name = option_2_fail_to_present - value = flag:submissive - days = 800 - } - } - 1 = { - trigger = { - NOR = { - var:option_to_present = flag:extroverted - var:option_1_fail_to_present = flag:extroverted - } - } - modifier = { - add = 2 - scope:courtier_spy = { - has_trait_extroverted_trigger = yes - } - } - ai_value_modifier = { - ai_boldness = medium_chance_impact_positive_boldness - ai_compassion = low_chance_impact_positive_boldness - } - set_variable = { - name = option_2_fail_to_present - value = flag:extroverted - days = 800 - } - } - 1 = { - trigger = { - NOR = { - var:option_to_present = flag:introverted - var:option_1_fail_to_present = flag:introverted - } - } - modifier = { - add = 2 - scope:courtier_spy = { - has_trait_introverted_trigger = yes - } - } - ai_value_modifier = { - ai_boldness = medium_chance_impact_negative_boldness - } - set_variable = { - name = option_2_fail_to_present - value = flag:introverted - days = 800 - } - } - 1 = { - trigger = { - NOR = { - var:option_to_present = flag:emotional - var:option_1_fail_to_present = flag:emotional - } - } - modifier = { - add = 2 - scope:courtier_spy = { - has_trait_emotional_trigger = yes - } - } - ai_value_modifier = { - ai_energy = medium_chance_impact_positive_energy - } - set_variable = { - name = option_2_fail_to_present - value = flag:emotional - days = 800 - } - } - 1 = { - trigger = { - NOR = { - var:option_to_present = flag:levelheaded - var:option_1_fail_to_present = flag:levelheaded - } - } - modifier = { - add = 2 - scope:courtier_spy = { - has_trait_levelheaded_trigger = yes - } - } - ai_value_modifier = { - ai_rationality = medium_chance_impact_positive_rationality - } - set_variable = { - name = option_2_fail_to_present - value = flag:levelheaded - days = 800 - } - } - } - #Fallback - if = { - limit = { - NOT = { - exists = var:option_2_fail_to_present - } - } - random_list = { - 1 = { - trigger = { - NOR = { - var:option_to_present = flag:malicious - var:option_1_fail_to_present = flag:malicious - } - } - set_variable = { - name = option_2_fail_to_present - value = flag:malicious - days = 800 - } - } - 1 = { - trigger = { - NOR = { - var:option_to_present = flag:benevolent - var:option_1_fail_to_present = flag:benevolent - } - } - set_variable = { - name = option_2_fail_to_present - value = flag:benevolent - days = 800 - } - } - 1 = { - trigger = { - NOR = { - var:option_to_present = flag:dominant - var:option_1_fail_to_present = flag:dominant - } - } - set_variable = { - name = option_2_fail_to_present - value = flag:dominant - days = 800 - } - } - 1 = { - trigger = { - NOR = { - var:option_to_present = flag:submissive - var:option_1_fail_to_present = flag:submissive - } - } - set_variable = { - name = option_2_fail_to_present - value = flag:submissive - days = 800 - } - } - 1 = { - trigger = { - NOR = { - var:option_to_present = flag:extroverted - var:option_1_fail_to_present = flag:extroverted - } - } - set_variable = { - name = option_2_fail_to_present - value = flag:extroverted - days = 800 - } - } - 1 = { - trigger = { - NOR = { - var:option_to_present = flag:introverted - var:option_1_fail_to_present = flag:introverted - } - } - set_variable = { - name = option_2_fail_to_present - value = flag:introverted - days = 800 - } - } - 1 = { - trigger = { - NOR = { - var:option_to_present = flag:emotional - var:option_1_fail_to_present = flag:emotional - } - } - set_variable = { - name = option_2_fail_to_present - value = flag:emotional - days = 800 - } - } - 1 = { - trigger = { - NOR = { - var:option_to_present = flag:levelheaded - var:option_1_fail_to_present = flag:levelheaded - } - } - set_variable = { - name = option_2_fail_to_present - value = flag:levelheaded - days = 800 - } - } - } - } - } -} - - -intrigue_dread_4001_select_prisoner_effect = { - $PRISONER$ = { - custom_tooltip = intrigue_dread.4001.a-c.tt - add_character_flag = intrigue_dread_4001_victim_flag - - if = { - limit = { - is_close_or_extended_family_of = root - } - custom_tooltip = intrigue_dread.4001.kinslayer - } - if = { - limit = { - NOT = { is_in_prison_type = dungeon } - } - change_prison_type = dungeon - } - save_scope_as = victim - } - - trigger_event = { - id = intrigue_dread.4002 - days = { 3 5 } - } -} - -intrigue_dread_4001_torture_increase_effectiveness_with_trait_effect = { - if = { - limit = { - scope:victim = { - has_trait = $TRAIT$ - } - } - change_variable = { - name = break_value - subtract = 1 - } - } -} - -intrigue_dread_4001_torture_increase_effectiveness_remove_trait_effect = { - if = { - limit = { - scope:victim = { - has_trait = $TRAIT$ - } - } - change_variable = { - name = break_value - subtract = 1 - } - scope:victim = { - remove_trait = $TRAIT$ - } - } -} - -intrigue_scheming_4050_display_player_response_effect = { - save_scope_value_as = { - name = payment - value = $PAYMENT$ - } - if = { - limit = { - scope:payment = flag:gold - } - random_list = { - 1 = { - desc = intrigue_scheming.4050.success - show_chance = no - show_as_tooltip = { - scope:buyer = { - pay_short_term_gold = { - target = scope:seller - gold = scope:saved_gold_amount - } - } - scope:secret = { - reveal_to = scope:buyer - } - custom_tooltip = intrigue_scheming_focus_point_clear_gain - hidden_effect = { add_focus_progress = standard_lifestyle_focus_progress } - } - } - 1 = { - desc = intrigue_scheming.4050.failure - show_chance = no - } - } - } - else_if = { - limit = { - scope:payment = flag:secret - } - random_list = { - 1 = { - desc = intrigue_scheming.4050.success - show_chance = no - show_as_tooltip = { - custom_tooltip = intrigue_scheming.4050.b.tt - scope:secret = { - reveal_to = scope:buyer - } - custom_tooltip = intrigue_scheming_focus_point_clear_gain - hidden_effect = { add_focus_progress = standard_lifestyle_focus_progress } - } - } - 1 = { - desc = intrigue_scheming.4050.failure - show_chance = no - } - } - } - else_if = { - limit = { - scope:payment = flag:favor - } - random_list = { - 1 = { - desc = intrigue_scheming.4050.success - show_chance = no - show_as_tooltip = { - scope:seller = { - add_hook = { - target = scope:buyer - type = favor_hook - } - } - scope:secret = { - reveal_to = scope:buyer - } - custom_tooltip = intrigue_scheming_focus_point_clear_gain - hidden_effect = { add_focus_progress = standard_lifestyle_focus_progress } - } - } - 1 = { - desc = intrigue_scheming.4050.failure - show_chance = no - } - } - } - else_if = { - limit = { - scope:payment = flag:reconciliation - } - random_list = { - 1 = { - desc = intrigue_scheming.4050.success - show_chance = no - show_as_tooltip = { - scope:buyer = { - remove_relation_rival = scope:seller - } - scope:secret = { - reveal_to = scope:buyer - } - custom_tooltip = intrigue_scheming_focus_point_clear_gain - hidden_effect = { add_focus_progress = standard_lifestyle_focus_progress } - } - } - 1 = { - desc = intrigue_scheming.4050.failure - show_chance = no - } - } - } - else_if = { - limit = { - scope:payment = flag:opinion - } - random_list = { - 1 = { - desc = intrigue_scheming.4050.success - show_chance = no - show_as_tooltip = { - scope:buyer = { - add_opinion = { - modifier = grateful_opinion - target = scope:seller - opinion = 30 - } - } - scope:secret = { - reveal_to = scope:buyer - } - custom_tooltip = intrigue_scheming_focus_point_clear_gain - hidden_effect = { add_focus_progress = standard_lifestyle_focus_progress } - } - } - 1 = { - desc = intrigue_scheming.4050.failure - show_chance = no - } - } - } - - scope:buyer = { - trigger_event = intrigue_scheming.4051 - } -} - -intrigue_scheming_4050_offer_refused_effect = { - show_as_tooltip = { - scope:buyer = { - add_opinion = { - modifier = insult_opinion - target = scope:seller - opinion = -10 - } - } - } - trigger_event = { - id = intrigue_scheming.4053 - days = { 5 7 } - } -} - -intrigue_temptation_3010_a_success_effect = { - if = { - limit = { - NOT = { has_relation_friend = scope:wingman } - } - set_relation_friend = { reason = friend_seduction_tips target = scope:wingman involved_character = scope:bar_servant } - } - add_intrigue_lifestyle_xp = minor_lifestyle_xp -} - -intrigue_temptation_3010_b_success_effect = { - add_intrigue_lifestyle_xp = major_lifestyle_xp -} - - - - - - - - - - diff --git a/N3OW/common/scripted_effects/00_intrigue_perk_effects.txt b/N3OW/common/scripted_effects/00_intrigue_perk_effects.txt deleted file mode 100644 index c4f09600..00000000 --- a/N3OW/common/scripted_effects/00_intrigue_perk_effects.txt +++ /dev/null @@ -1,114 +0,0 @@ - -### Effects for handling Intrigue Lifestyle Perks - -# dark_insights_skill_gain_roll_effect: Randomly rolls for whether the character should get a bonus Intrigue or Prowess point - -dark_insights_skill_gain_roll_effect = { - #Backup check in case something has gone wrong - if = { - limit = { - has_perk = dark_insights_perk - } - - # Backup for the variables - if = { - limit = { - NOT = { has_variable = dark_insights_prowess_increases } - } - set_variable = { - name = dark_insights_prowess_increases - value = 0 - } - } - if = { - limit = { - NOT = { has_variable = dark_insights_intrigue_increases } - } - set_variable = { - name = dark_insights_intrigue_increases - value = 0 - } - } - - # Roll to see if we get a skill increase. - if = { - # For tooltip generation, we need to check if we have the variable yet (the backups above won't create the variables until after the effect is actually run). - limit = { - NOR = { - has_variable = dark_insights_prowess_increases - has_variable = dark_insights_intrigue_increases - } - } - custom_tooltip = dark_insight_gain_stats_tt - } - else_if = { - limit = { - - OR = { - var:dark_insights_prowess_increases < dark_insights_prowess_increase_maximum - var:dark_insights_intrigue_increases < dark_insights_intrigue_increase_maximum - } - } - - custom_tooltip = dark_insight_gain_stats_tt - - hidden_effect = { - random = { - chance = dark_insights_stat_increase_chance - scope:actor = { - - } - random_list = { - 50 = { - trigger = { - var:dark_insights_prowess_increases < dark_insights_prowess_increase_maximum - } - - send_interface_toast = { - title = dark_insights_gain_message - left_icon = scope:actor - right_icon = scope:recipient - - add_character_modifier = { - modifier = dark_insights_prowess_modifier - } - } - - change_variable = { - name = dark_insights_prowess_increases - add = 1 - } - } - 50 = { - trigger = { - var:dark_insights_intrigue_increases < dark_insights_intrigue_increase_maximum - } - - send_interface_toast = { - title = dark_insights_gain_message - left_icon = scope:actor - right_icon = scope:recipient - - add_character_modifier = { - modifier = dark_insights_intrigue_modifier - } - } - - change_variable = { - name = dark_insights_intrigue_increases - add = 1 - } - } - } - } - } - } - else_if = { - limit = { - var:dark_insights_prowess_increases >= dark_insights_prowess_increase_maximum - var:dark_insights_intrigue_increases >= dark_insights_intrigue_increase_maximum - } - custom_tooltip = dark_insights_maximum_insight_tt - } - } -} diff --git a/N3OW/common/scripted_effects/00_journey_effects.txt b/N3OW/common/scripted_effects/00_journey_effects.txt deleted file mode 100644 index 05d51693..00000000 --- a/N3OW/common/scripted_effects/00_journey_effects.txt +++ /dev/null @@ -1,225 +0,0 @@ - -journey_knowledge_hoarding_skill_effect = { - scope:activity = { - if = { - limit = { has_variable = skill_chance } - change_variable = { - name = skill_chance - add = $VALUE$ - } - } - else = { - set_variable = { - name = skill_chance - value = $VALUE$ - } - } - if = { - limit = { - $VALUE$ == 25 - } - custom_tooltip = increase_skill_chance_25 - } - if = { - limit = { - $VALUE$ == 20 - } - custom_tooltip = increase_skill_chance_20 - } - else_if = { - limit = { - $VALUE$ == 15 - } - custom_tooltip = increase_skill_chance_15 - } - else_if = { - limit = { - $VALUE$ == 10 - } - custom_tooltip = increase_skill_chance_10 - } - else_if = { - limit = { - $VALUE$ == 5 - } - custom_tooltip = increase_skill_chance_5 - } - else_if = { - limit = { - $VALUE$ == 30 - } - custom_tooltip = increase_skill_chance_30 - } - else_if = { - limit = { - $VALUE$ == 35 - } - custom_tooltip = increase_skill_chance_35 - } - else_if = { - limit = { - $VALUE$ == 50 - } - custom_tooltip = increase_skill_chance_50 - } - else_if = { - limit = { - $VALUE$ == 2 - } - custom_tooltip = increase_skill_chance_2 - } - if = { - limit = { - has_variable = skill_chance - var:skill_chance > 100 - } - set_variable = { - name = skill_chance - value = 100 - } - } - } -} - -journey_find_or_create_excellent_court_position_effect = { - #if = { - # limit = { - # any_pool_character = { - # province = $LOCATION$ - # culture = $LOCATION$.culture - # aptitude = { - # court_position = $COURT_POSITION$ - # value >= 4 - # } - # is_available_healthy_ai_adult = yes - # $COURT_POSITION$_validity_trigger = { EMPLOYER = root } - # } - # } - # random_pool_character = { - # province = $LOCATION$ - # limit = { - # culture = $LOCATION$.culture - # aptitude = { - # court_position = $COURT_POSITION$ - # value >= 4 - # } - # is_available_healthy_ai_adult = yes - # $COURT_POSITION$_validity_trigger = { EMPLOYER = root } - # } - # save_scope_as = local_character - # } - #} - #else = { - create_character = { - template = $COURT_POSITION$_template - location = $LOCATION$ - culture = $LOCATION$.culture - faith = $LOCATION$.faith - save_scope_as = local_character - } - scope:local_character = { - add_character_flag = { - flag = silently_disappear_me - years = 1 - } - } - #} - if = { - limit = { - any_court_position_holder = { - type = $COURT_POSITION$ - } - } - random_court_position_holder = { - type = $COURT_POSITION$ - save_scope_as = current_holder - } - } - add_character_flag = $COURT_POSITION$ -} - -journey_employ_in_court_position = { - show_as_tooltip = { - if = { - limit = { - is_valid_to_hire_court_position_type = $COURT_POSITION$_court_position - } - appoint_court_position = { - recipient = $CHARACTER$ - court_position = $COURT_POSITION$_court_position - } - } - } - custom_tooltip = will_have_excellent_aptitude - - hidden_effect = { - $CHARACTER$ = { - add_to_court_and_entourage_effect = yes - } - } - - if = { - limit = { - is_valid_to_hire_court_position_type = $COURT_POSITION$_court_position - NOT = { exists = scope:current_holder } - } - employ_character_as_position_in_current_scope_court_effect = { - CHARACTER = $CHARACTER$ - POSITION = $COURT_POSITION$ - } - } - else_if = { - limit = { - exists = scope:current_holder - scope:local_character.aptitude:$COURT_POSITION$_court_position > scope:current_holder.aptitude:$COURT_POSITION$_court_position - } - replace_court_position = { - recipient = $CHARACTER$ - holder = scope:current_holder - court_position = $COURT_POSITION$_court_position - } - } -} - -journey_employ_in_camp_position = { - show_as_tooltip = { - if = { - limit = { - is_valid_to_hire_court_position_type = $COURT_POSITION$_camp_officer - } - appoint_court_position = { - recipient = $CHARACTER$ - court_position = $COURT_POSITION$_camp_officer - } - } - } - custom_tooltip = will_have_excellent_aptitude - - hidden_effect = { - $CHARACTER$ = { - add_to_court_and_entourage_effect = yes - } - } - - if = { - limit = { - is_valid_to_hire_court_position_type = $COURT_POSITION$_camp_officer - NOT = { exists = scope:current_holder } - } - employ_character_as_position_in_current_scope_camp_effect = { - CHARACTER = $CHARACTER$ - POSITION = $COURT_POSITION$ - } - } - else_if = { - limit = { - exists = scope:current_holder - scope:local_character.aptitude:$COURT_POSITION$_camp_officer > scope:current_holder.aptitude:$COURT_POSITION$_camp_officer - } - replace_court_position = { - recipient = $CHARACTER$ - holder = scope:current_holder - court_position = $COURT_POSITION$_camp_officer - } - } -} diff --git a/N3OW/common/scripted_effects/00_laamp_effects.txt b/N3OW/common/scripted_effects/00_laamp_effects.txt deleted file mode 100644 index 9e9749c3..00000000 --- a/N3OW/common/scripted_effects/00_laamp_effects.txt +++ /dev/null @@ -1,1638 +0,0 @@ -################################################## -# Landless Adventurer Camp Scripted Effects -################################################## - -################################################## -# Misc Effects - -apply_saharan_provisions_debuff_effect = { - if = { - limit = { - geographical_region = custom_sahara_proper - OR = { - terrain = desert - terrain = desert_mountains - } - } - add_province_modifier = world_africa_sahara_provisions_usage_multiplier_modifier - } -} - -become_bandit_king_decision_effect = { - add_character_modifier = bandit_king_modifier - bandit_king_maa_spawn_effect = yes - add_prestige_level = -3 - remove_trait = knight_errant -} - -################################################## -# Flavourisation Effects - -remove_camp_purpose_flavourisation_variables_effect = { - remove_variable = flavourise_camp_purpose_mercenaries - remove_variable = flavourise_camp_purpose_wanderers - remove_variable = flavourise_camp_purpose_scholars - remove_variable = flavourise_camp_purpose_explorers - remove_variable = flavourise_camp_purpose_brigands - remove_variable = flavourise_camp_purpose_legitimists -} - -################################################## -# Contract Effects - -populate_location_with_contracts_effect = { - if = { - limit = { - # The AI have their own system for getting contracts. - trigger_if = { - limit = { has_government = landless_adventurer_government } - is_ai = no - } - lock_contracts_from_spawning_in_sahara_trigger = yes - } - # Flag our pre-existing contracts if necessary. - if = { - limit = { exists = scope:toggle_distance_ignore } - every_character_task_contract = { add_to_list = pre_existing_contracts_list } - } - # Now populate. - populate_task_contracts_for_area = { - location = $AREA_CHAR$.capital_province - amount = $AMOUNT$ - group = { - laamp_contracts_transport_group - laamp_contracts_criminal_group - laamp_contracts_diplomacy_group - laamp_contracts_hireling_group - laamp_contracts_hunting_group - laamp_contracts_intrigue_group - laamp_contracts_learning_group - laamp_contracts_martial_group - laamp_contracts_stewardship_group - laamp_contracts_justicar_group - } - } - # Then flag our new contracts (again, if necessary). - if = { - limit = { exists = scope:toggle_distance_ignore } - every_character_task_contract = { - limit = { - NOT = { is_in_list = pre_existing_contracts_list } - } - set_variable = { - name = retain_despite_distance - value = yes - } - } - } - } -} - -populate_location_with_special_contracts_effect = { - if = { - limit = { - # The AI have their own system for getting contracts. - trigger_if = { - limit = { has_government = landless_adventurer_government } - is_ai = no - } - lock_contracts_from_spawning_in_sahara_trigger = yes - } - # Flag our pre-existing contracts if necessary. - if = { - limit = { exists = scope:toggle_distance_ignore } - every_character_task_contract = { add_to_list = pre_existing_contracts_list } - } - populate_task_contracts_for_area = { - location = $AREA_CHAR$.capital_province - amount = $AMOUNT$ - group = { - laamp_contracts_transport_group - laamp_contracts_war_group - laamp_contracts_hireling_group - laamp_contracts_intrigue_group - laamp_contracts_legitimist_group - } - } - # Then flag our new contracts (again, if necessary). - if = { - limit = { exists = scope:toggle_distance_ignore } - every_character_task_contract = { - limit = { - NOT = { is_in_list = pre_existing_contracts_list } - } - set_variable = { - name = retain_despite_distance - value = yes - } - } - } - } -} - -fire_generic_contract_scheme_on_going_events_effect = { - save_scope_as = scheme - if = { - limit = { - is_scheme_target_type = character - } - scheme_target_character = { save_scope_as = target } - } - else = { - scheme_target_title.holder = { save_scope_as = target } - } - - scheme_owner = { - save_scope_as = owner - trigger_event = { on_action = laamp_base_contract_scheme_on_going_events } - } -} - -spawn_join_war_contracts_effect = { - $WAR$ = { save_scope_as = war } - $ATTACKER$ = { save_scope_as = attacker } - $DEFENDER$ = { save_scope_as = defender } - $LAAMP$ = { - #spawn a defensive join war contract, if defender is weaker than attacker or in a civil war - if = { - limit = { - OR = { - task_contract_join_war_attacker_strength_ratio_value > 1 - scope:war = { - using_civil_war_cb_trigger = yes - } - } - can_create_task_contract = { - type_name = laamp_join_war_contract - employer = scope:defender - } - } - send_interface_message = { - type = msg_task_contract_created - title = join_war_contract_spawn.t - desc = join_war_contract_spawn.desc_defender - left_icon = scope:attacker - right_icon = scope:defender - create_task_contract = { - task_contract_employer = scope:defender - task_contract_type = laamp_join_war_contract - task_contract_tier = scope:defender.task_contract_tier_value - location = scope:defender.location - save_scope_as = new_contract_defender - } - } - scope:new_contract_defender = { - set_variable = { - name = retain_despite_distance - value = yes - } - set_variable = { - name = task_contract_war - value = scope:war - } - set_variable = { - name = task_contract_employer - value = scope:defender - } - set_variable = { - name = task_contract_target - value = scope:war.primary_attacker - } - } - } - #spawn an offensive join war contract for the same war, if attacker has +/- 60% the strength of defender - if = { - limit = { - task_contract_join_war_attacker_strength_ratio_value >= 0.4 - task_contract_join_war_attacker_strength_ratio_value <= 1.6 - can_create_task_contract = { - type_name = laamp_join_war_contract - employer = scope:attacker - } - } - send_interface_message = { - type = msg_task_contract_created - title = join_war_contract_spawn.t - desc = join_war_contract_spawn.desc_attacker - left_icon = scope:attacker - right_icon = scope:defender - create_task_contract = { - task_contract_employer = scope:attacker - task_contract_type = laamp_join_war_contract - task_contract_tier = scope:attacker.task_contract_tier_value - location = scope:attacker.location - save_scope_as = new_contract_attacker - } - } - scope:new_contract_attacker = { - set_variable = { - name = retain_despite_distance - value = yes - } - set_variable = { - name = task_contract_war - value = scope:war - } - set_variable = { - name = task_contract_employer - value = scope:attacker - } - set_variable = { - name = task_contract_target - value = scope:war.primary_defender - } - } - } - #else spawn contracts for both sides if their strength difference is +/- 100% - if = { - limit = { - NOR = { - exists = scope:new_contract_defender - exists = scope:new_contract_attacker - } - task_contract_join_war_attacker_strength_ratio_value >= 0 - task_contract_join_war_attacker_strength_ratio_value <= 2 - } - if = { - limit = { - can_create_task_contract = { - type_name = laamp_join_war_contract - employer = scope:attacker - } - } - send_interface_message = { - type = msg_task_contract_created - title = join_war_contract_spawn.t - desc = join_war_contract_spawn.desc_attacker - left_icon = scope:attacker - right_icon = scope:defender - create_task_contract = { - task_contract_employer = scope:attacker - task_contract_type = laamp_join_war_contract - task_contract_tier = scope:attacker.task_contract_tier_value - location = scope:attacker.location - save_scope_as = new_contract_attacker - } - } - scope:new_contract_attacker = { - set_variable = { - name = retain_despite_distance - value = yes - } - set_variable = { - name = task_contract_war - value = scope:war - } - set_variable = { - name = task_contract_employer - value = scope:attacker - } - set_variable = { - name = task_contract_target - value = scope:war.primary_defender - } - } - } - if = { - limit = { - can_create_task_contract = { - type_name = laamp_join_war_contract - employer = scope:defender - } - } - send_interface_message = { - type = msg_task_contract_created - title = join_war_contract_spawn.t - desc = join_war_contract_spawn.desc_defender - left_icon = scope:attacker - right_icon = scope:defender - create_task_contract = { - task_contract_employer = scope:defender - task_contract_type = laamp_join_war_contract - task_contract_tier = scope:defender.task_contract_tier_value - location = scope:defender.location - save_scope_as = new_contract_defender - } - } - scope:new_contract_defender = { - set_variable = { - name = retain_despite_distance - value = yes - } - set_variable = { - name = task_contract_war - value = scope:war - } - set_variable = { - name = task_contract_employer - value = scope:defender - } - set_variable = { - name = task_contract_target - value = scope:war.primary_attacker - } - } - } - } - } - debug_log = "spawn_join_war_contracts_effect" - debug_log_scopes = yes -} - -# used in task contracts triggered from council tasks, assumes you already saved root as task_contract -# COUNCILLOR_TYPE = councillor type name -# COUNCIL_TASK_TYPE = council task type name -assign_council_task_scopes_in_contract_effect = { - if = { - limit = { - scope:task_contract.task_contract_employer.cp:$COUNCILLOR_TYPE$ ?= { - is_performing_council_task = $COUNCIL_TASK_TYPE$ - } - } - set_task_contract_target = scope:task_contract.task_contract_employer.cp:$COUNCILLOR_TYPE$ - task_contract_target = { - save_scope_as = task_contract_councillor - liege = { - save_scope_as = task_contract_councillor_liege - } - } - } - else = { - set_task_contract_target = scope:task_contract.task_contract_employer.liege - scope:task_contract.task_contract_employer = { - save_scope_as = task_contract_councillor - liege = { - save_scope_as = task_contract_councillor_liege - } - } - } - set_variable = { - name = task_contract_target - value = scope:task_contract.task_contract_target - } - set_variable = { - name = task_contract_councillor - value = scope:task_contract_councillor - } - set_variable = { - name = task_contract_councillor_liege - value = scope:task_contract_councillor_liege - } -} - -# We have to sort our randomisation here because otherwise we get oodles of false positives from trying to do it inside the subsequent value. -grab_gold_fuzz_number_effect = { - save_scope_value_as = { - name = gold_fuzz - value = { - integer_range = { - min = 0 - max = 9 - } - } - } -} - -################################################## -# Reward Effects - -# General logic for giving out the appropriate amount of currencies to a laamp upon contract completion. -laamp_rewards_disburse_ordinary_currency_effect = { - # Grab some scope for ease of access. - save_scope_as = task_contract - task_contract_employer = { save_scope_as = employer } - task_contract_taker = { save_scope_as = taker } - # Gold. - scope:employer = { - # Yes, this is necessary. We get boot errors if we compare a direct script value vs. zero: maths works out, it's just Jomini Magic doin' its thing. - save_scope_value_as = { - name = gold - value = { - value = $GOLD$ - if = { - limit = { $EXTRA_REWARD$ = flag:yes } - multiply = task_contract_extra_reward_multiplier_value - } - round = yes - } - } - if = { - limit = { scope:gold != 0 } - # We pay players directly. - if = { - limit = { - scope:taker = { is_ai = no } - } - if = { - limit = { - scope:task_contract = { - is_criminal = yes - } - } - pay_short_term_gold = { - target = scope:taker - gold = scope:gold - } - } - else = { - pay_treasury_or_gold = { - target = scope:taker - value = scope:gold - } - } - } - # Otherwise only deduct gold if the AI can afford it. - else_if = { - limit = { short_term_treasury_or_gold >= $GOLD$ } - if = { - limit = { - scope:task_contract = { - is_criminal = yes - } - } - pay_short_term_gold = { - target = scope:taker - gold = scope:gold - } - } - else = { - pay_treasury_or_gold = { - target = scope:taker - value = scope:gold - } - } - } - # Else we magic the gold up so we don't bankrupt people foolishly. - else = { - scope:taker = { add_gold = scope:gold } - } - } - } - # Everything else. - scope:taker = { - # Prestige. - if = { - limit = { $PRESTIGE$ != 0 } - add_prestige = { - value = { - value = $PRESTIGE$ - if = { - limit = { $EXTRA_REWARD$ = flag:yes } - multiply = task_contract_extra_reward_multiplier_value - } - round = yes - } - } - } - # Piety. - if = { - limit = { $PIETY$ != 0 } - add_piety = { - value = { - value = $PIETY$ - if = { - limit = { $EXTRA_REWARD$ = flag:yes } - multiply = task_contract_extra_reward_multiplier_value - } - round = yes - } - } - } - # Provisions. - if = { - limit = { - $PROVISIONS$ != 0 - exists = domicile - } - domicile = { - change_provisions = { - value = { - value = $PROVISIONS$ - if = { - limit = { $EXTRA_REWARD$ = flag:yes } - multiply = task_contract_extra_reward_multiplier_value - } - round = yes - } - } - } - } - # Opinion. - if = { - limit = { $OPINION$ != 0 } - reverse_add_opinion = { - modifier = $OPINION_TYPE$ - target = scope:employer - opinion = $OPINION$ - } - } - # Contact. - save_scope_value_as = { - name = add_contact_toggle - value = flag:$CONTACT$ - } - save_scope_value_as = { - name = add_contact_hook_toggle - value =flag:$CONTACT_HOOK$ - } - if = { - limit = { scope:add_contact_toggle != flag:no } - # Huck 'em into our contact list. - add_contact = scope:employer - # Give hook as well as contact? - if = { - limit = { scope:add_contact_hook_toggle = flag:yes } - add_hook_if_possible_default_length_effect = { - TARGET = scope:employer - TYPE = contact_list_weak_hook - } - } - } - } -} - -# Dish out XP in the gallowsbait trait. -laamp_rewards_apply_criminal_xp_effect = { - save_scope_as = xp_gainer - save_scope_value_as = { - name = xp_change_min - value = $XP_MIN$ - } - if = { - limit = { - NOT = { has_trait = gallowsbait } - } - add_trait = gallowsbait - } - add_trait_xp = { - trait = gallowsbait - track = $TRACK$ - value = { - # Always use the gallowsbait_xp_minor_gain and related values for positive gains to ensure proper multipliers are applied! - integer_range = { - min = $XP_MIN$ - max = $XP_MAX$ - } - if = { - limit = { - scope:xp_change_min > 0 # Do not multiply reductions - scope:xp_gainer.domicile ?= { has_domicile_parameter = camp_reduced_criminal_contract_xp_gain } - } - multiply = reduced_criminal_contract_xp_gain_value - } - floor = yes # Round numbers down when modified - } - } -} - -# Dish out XP in the Knight-Errant trait. -laamp_rewards_apply_knight_errant_xp_effect = { - if = { - limit = { has_trait = knight_errant } - save_scope_as = xp_gainer - save_scope_value_as = { - name = xp_change_min - value = $XP_MIN$ - } - add_trait_xp = { - trait = knight_errant - value = { - # Always use the gallowsbait_xp_minor_gain and related values for positive gains to ensure proper multipliers are applied! - integer_range = { - min = $XP_MIN$ - max = $XP_MAX$ - } - floor = yes # Round numbers down when modified - } - } - } -} - -lower_gallowsbait_xp_effect = { - if = { - limit = { has_trait = gallowsbait } - if = { - limit = { - has_trait = gallowsbait - has_trait_xp = { - trait = gallowsbait - track = bandit - value >= 1 - } - } - add_trait_xp = { - trait = gallowsbait - track = bandit - VALUE = $VALUE$ - } - } - else_if = { - limit = { - has_trait = gallowsbait - has_trait_xp = { - trait = gallowsbait - track = trickster - value >= 1 - } - } - add_trait_xp = { - trait = gallowsbait - track = trickster - VALUE = $VALUE$ - } - } - else_if = { - limit = { - has_trait = gallowsbait - has_trait_xp = { - trait = gallowsbait - track = marauder - value >= 1 - } - } - add_trait_xp = { - trait = gallowsbait - track = marauder - VALUE = $VALUE$ - } - } - else_if = { - limit = { - has_trait = gallowsbait - has_trait_xp = { - trait = gallowsbait - track = poacher - value >= 1 - } - } - add_trait_xp = { - trait = gallowsbait - track = poacher - VALUE = $VALUE$ - } - } - else = { # Thief - add_trait_xp = { - trait = gallowsbait - track = thief - VALUE = $VALUE$ - } - } - } -} - -# grants hook and patronage from the councillor or liege of the employer in council task contracts, assumes you saved root as task_contract before -gain_patron_and_hook_from_council_task_contract_effect = { - task_contract_taker = { - if = { - limit = { - scope:task_contract.task_contract_employer = scope:task_contract.var:task_contract_councillor - scope:task_contract.var:task_contract_councillor_liege = { is_ai = yes } - } - add_contact = scope:task_contract.var:task_contract_councillor_liege - add_hook_if_possible_default_length_effect = { - TARGET = scope:task_contract.var:task_contract_councillor_liege - TYPE = contact_list_weak_hook - } - } - else = { - add_contact = scope:task_contract.var:task_contract_councillor - add_hook_if_possible_default_length_effect = { - TARGET = scope:task_contract.var:task_contract_councillor - TYPE = contact_list_weak_hook - } - } - } -} - -task_contract_justicar_contract_tracker_effect = { - custom_tooltip = task_contract_justicar_contract_tracker_effect.tt - increment_variable_effect = { - VAR = justicar_contracts_succeeded_counter - VAL = 1 - } -} - -task_successful_noncrim_contract_count_effect = { - custom_tooltip = task_successful_noncrim_contract_count_effect_tt - increment_variable_effect = { - VAR = laamp_total_noncrim_contracts_successfully_completed - VAL = 1 - } -} - -################################################## -# Camp Effects - -# Remove any inappropriate building upgrades on camp purpose changing. -laamp_clear_inappropriate_buildings_effect = { - # Warn that purpose-specific buildings will be demolished. - if = { - limit = { - domicile = { - OR = { - has_domicile_building = supply_tent_reserve_provisions - has_domicile_building = supply_tent_reserve_water - has_domicile_building = supply_tent_climbing_gear - has_domicile_building = supply_tent_subdued_gear - has_domicile_building = barber_tent_reference_corpus - has_domicile_building = barber_tent_morticians_tools - has_domicile_building = baggage_train_siege_engineers - has_domicile_building = baggage_train_scribes - has_domicile_building = baggage_train_proof_of_claims - has_domicile_building = baggage_train_ransom_cages - has_domicile_building = baggage_train_negotiators - has_domicile_building = baggage_train_ascetics - has_domicile_building = camp_fire_local_hangers_on - has_domicile_building = camp_fire_future_dreams - has_domicile_building = camp_fire_nightly_debates - has_domicile_building = camp_fire_juicy_rumors - has_domicile_building = proving_grounds_lockwagon - has_domicile_building = proving_grounds_martial_study - has_domicile_building = proving_grounds_the_stick_game - has_domicile_building = proving_grounds_bodyguard_drills - has_domicile_building = camp_perimeter_extra_watch - has_domicile_building = camp_perimeter_palisade - has_domicile_building = camp_perimeter_ditch - } - } - } - custom_tooltip = laamp_clear_inappropriate_buildings_effect.tt.buildings_may_be_lost - } - # Aaaand then queue our demolition. - trigger_event = { - id = ep3_laamps.1021 - delayed = yes - } -} - -# Liquidate a camp to refund a portion of all its buildings. -laamp_clear_domicile_buildings_effect = { - domicile ?= { - if = { - limit = { has_domicile_building = camp_main_04 } - remove_domicile_building = camp_main_04 - } - if = { - limit = { has_domicile_building = camp_main_03 } - remove_domicile_building = camp_main_03 - } - if = { - limit = { has_domicile_building = camp_main_02 } - remove_domicile_building = camp_main_02 - } - if = { - limit = { has_domicile_building = camp_main_01 } - remove_domicile_building = camp_main_01 - } - if = { - limit = { has_domicile_building = supply_tent_sutler } - remove_domicile_building = supply_tent_sutler - } - if = { - limit = { has_domicile_building = supply_tent_mender } - remove_domicile_building = supply_tent_mender - } - if = { - limit = { has_domicile_building = supply_tent_smithy } - remove_domicile_building = supply_tent_smithy - } - if = { - limit = { has_domicile_building = supply_tent_arsenal } - remove_domicile_building = supply_tent_arsenal - } - if = { - limit = { has_domicile_building = supply_tent_reserve_provisions } - remove_domicile_building = supply_tent_reserve_provisions - } - if = { - limit = { has_domicile_building = supply_tent_reserve_water } - remove_domicile_building = supply_tent_reserve_water - } - if = { - limit = { has_domicile_building = supply_tent_climbing_gear } - remove_domicile_building = supply_tent_climbing_gear - } - if = { - limit = { has_domicile_building = supply_tent_subdued_gear } - remove_domicile_building = supply_tent_subdued_gear - } - if = { - limit = { has_domicile_building = supply_tent_06 } - remove_domicile_building = supply_tent_06 - } - if = { - limit = { has_domicile_building = supply_tent_05 } - remove_domicile_building = supply_tent_05 - } - if = { - limit = { has_domicile_building = supply_tent_04 } - remove_domicile_building = supply_tent_04 - } - if = { - limit = { has_domicile_building = supply_tent_03 } - remove_domicile_building = supply_tent_03 - } - if = { - limit = { has_domicile_building = supply_tent_02 } - remove_domicile_building = supply_tent_02 - } - if = { - limit = { has_domicile_building = supply_tent_01 } - remove_domicile_building = supply_tent_01 - } - if = { - limit = { has_domicile_building = barber_tent_surgeons_tools } - remove_domicile_building = barber_tent_surgeons_tools - } - if = { - limit = { has_domicile_building = barber_tent_dentists_tools } - remove_domicile_building = barber_tent_dentists_tools - } - if = { - limit = { has_domicile_building = barber_tent_torturers_tools } - remove_domicile_building = barber_tent_torturers_tools - } - if = { - limit = { has_domicile_building = barber_tent_reference_corpus } - remove_domicile_building = barber_tent_reference_corpus - } - if = { - limit = { has_domicile_building = barber_tent_morticians_tools } - remove_domicile_building = barber_tent_morticians_tools - } - if = { - limit = { has_domicile_building = barber_tent_06 } - remove_domicile_building = barber_tent_06 - } - if = { - limit = { has_domicile_building = barber_tent_05 } - remove_domicile_building = barber_tent_05 - } - if = { - limit = { has_domicile_building = barber_tent_04 } - remove_domicile_building = barber_tent_04 - } - if = { - limit = { has_domicile_building = barber_tent_03 } - remove_domicile_building = barber_tent_03 - } - if = { - limit = { has_domicile_building = barber_tent_02 } - remove_domicile_building = barber_tent_02 - } - if = { - limit = { has_domicile_building = barber_tent_01 } - remove_domicile_building = barber_tent_01 - } - if = { - limit = { has_domicile_building = baggage_train_ample_steeds } - remove_domicile_building = baggage_train_ample_steeds - } - if = { - limit = { has_domicile_building = baggage_train_porters } - remove_domicile_building = baggage_train_porters - } - if = { - limit = { has_domicile_building = baggage_train_trackers } - remove_domicile_building = baggage_train_trackers - } - if = { - limit = { has_domicile_building = baggage_train_kennel } - remove_domicile_building = baggage_train_kennel - } - if = { - limit = { has_domicile_building = baggage_train_siege_engineers } - remove_domicile_building = baggage_train_siege_engineers - } - if = { - limit = { has_domicile_building = baggage_train_shrine } - remove_domicile_building = baggage_train_shrine - } - if = { - limit = { has_domicile_building = baggage_train_scribes } - remove_domicile_building = baggage_train_scribes - } - if = { - limit = { has_domicile_building = baggage_train_bartering_grounds } - remove_domicile_building = baggage_train_bartering_grounds - } - if = { - limit = { has_domicile_building = baggage_train_proof_of_claims } - remove_domicile_building = baggage_train_proof_of_claims - } - if = { - limit = { has_domicile_building = baggage_train_ransom_cages } - remove_domicile_building = baggage_train_ransom_cages - } - if = { - limit = { has_domicile_building = baggage_train_negotiators } - remove_domicile_building = baggage_train_negotiators - } - if = { - limit = { has_domicile_building = baggage_train_ascetics } - remove_domicile_building = baggage_train_ascetics - } - if = { - limit = { has_domicile_building = baggage_train_pleasure_tents } - remove_domicile_building = baggage_train_pleasure_tents - } - if = { - limit = { has_domicile_building = baggage_train_06 } - remove_domicile_building = baggage_train_06 - } - if = { - limit = { has_domicile_building = baggage_train_05 } - remove_domicile_building = baggage_train_05 - } - if = { - limit = { has_domicile_building = baggage_train_04 } - remove_domicile_building = baggage_train_04 - } - if = { - limit = { has_domicile_building = baggage_train_03 } - remove_domicile_building = baggage_train_03 - } - if = { - limit = { has_domicile_building = baggage_train_02 } - remove_domicile_building = baggage_train_02 - } - if = { - limit = { has_domicile_building = baggage_train_01 } - remove_domicile_building = baggage_train_01 - } - if = { - limit = { has_domicile_building = mess_tent_herbalists } - remove_domicile_building = mess_tent_herbalists - } - if = { - limit = { has_domicile_building = mess_tent_brewers } - remove_domicile_building = mess_tent_brewers - } - if = { - limit = { has_domicile_building = mess_tent_curers } - remove_domicile_building = mess_tent_curers - } - if = { - limit = { has_domicile_building = mess_tent_bakers } - remove_domicile_building = mess_tent_bakers - } - if = { - limit = { has_domicile_building = mess_tent_cooks } - remove_domicile_building = mess_tent_cooks - } - if = { - limit = { has_domicile_building = mess_tent_06 } - remove_domicile_building = mess_tent_06 - } - if = { - limit = { has_domicile_building = mess_tent_05 } - remove_domicile_building = mess_tent_05 - } - if = { - limit = { has_domicile_building = mess_tent_04 } - remove_domicile_building = mess_tent_04 - } - if = { - limit = { has_domicile_building = mess_tent_03 } - remove_domicile_building = mess_tent_03 - } - if = { - limit = { has_domicile_building = mess_tent_02 } - remove_domicile_building = mess_tent_02 - } - if = { - limit = { has_domicile_building = mess_tent_01 } - remove_domicile_building = mess_tent_01 - } - if = { - limit = { has_domicile_building = camp_fire_trailing_musicians } - remove_domicile_building = camp_fire_trailing_musicians - } - if = { - limit = { has_domicile_building = camp_fire_wandering_poets } - remove_domicile_building = camp_fire_wandering_poets - } - if = { - limit = { has_domicile_building = camp_fire_capering_fools } - remove_domicile_building = camp_fire_capering_fools - } - if = { - limit = { has_domicile_building = camp_fire_libations_for_the_lost } - remove_domicile_building = camp_fire_libations_for_the_lost - } - if = { - limit = { has_domicile_building = camp_fire_local_hangers_on } - remove_domicile_building = camp_fire_local_hangers_on - } - if = { - limit = { has_domicile_building = camp_fire_future_dreams } - remove_domicile_building = camp_fire_future_dreams - } - if = { - limit = { has_domicile_building = camp_fire_nightly_debates } - remove_domicile_building = camp_fire_nightly_debates - } - if = { - limit = { has_domicile_building = camp_fire_juicy_rumors } - remove_domicile_building = camp_fire_juicy_rumors - } - if = { - limit = { has_domicile_building = camp_fire_06 } - remove_domicile_building = camp_fire_06 - } - if = { - limit = { has_domicile_building = camp_fire_05 } - remove_domicile_building = camp_fire_05 - } - if = { - limit = { has_domicile_building = camp_fire_04 } - remove_domicile_building = camp_fire_04 - } - if = { - limit = { has_domicile_building = camp_fire_03 } - remove_domicile_building = camp_fire_03 - } - if = { - limit = { has_domicile_building = camp_fire_02 } - remove_domicile_building = camp_fire_02 - } - if = { - limit = { has_domicile_building = camp_fire_01 } - remove_domicile_building = camp_fire_01 - } - if = { - limit = { has_domicile_building = proving_grounds_horse_run } - remove_domicile_building = proving_grounds_horse_run - } - if = { - limit = { has_domicile_building = proving_grounds_camel_run } - remove_domicile_building = proving_grounds_camel_run - } - if = { - limit = { has_domicile_building = proving_grounds_elephantry_reserve } - remove_domicile_building = proving_grounds_elephantry_reserve - } - if = { - limit = { has_domicile_building = proving_grounds_nightly_barding_drills } - remove_domicile_building = proving_grounds_nightly_barding_drills - } - if = { - limit = { has_domicile_building = proving_grounds_life_in_the_saddle } - remove_domicile_building = proving_grounds_life_in_the_saddle - } - if = { - limit = { has_domicile_building = proving_grounds_the_stump } - remove_domicile_building = proving_grounds_the_stump - } - if = { - limit = { has_domicile_building = proving_grounds_personal_bouts } - remove_domicile_building = proving_grounds_personal_bouts - } - if = { - limit = { has_domicile_building = proving_grounds_training_circle } - remove_domicile_building = proving_grounds_training_circle - } - if = { - limit = { has_domicile_building = proving_grounds_mock_battle_drills } - remove_domicile_building = proving_grounds_mock_battle_drills - } - if = { - limit = { has_domicile_building = proving_grounds_lockwagon } - remove_domicile_building = proving_grounds_lockwagon - } - if = { - limit = { has_domicile_building = proving_grounds_martial_study } - remove_domicile_building = proving_grounds_martial_study - } - if = { - limit = { has_domicile_building = proving_grounds_the_stick_game } - remove_domicile_building = proving_grounds_the_stick_game - } - if = { - limit = { has_domicile_building = proving_grounds_bodyguard_drills } - remove_domicile_building = proving_grounds_bodyguard_drills - } - if = { - limit = { has_domicile_building = proving_grounds_06 } - remove_domicile_building = proving_grounds_06 - } - if = { - limit = { has_domicile_building = proving_grounds_05 } - remove_domicile_building = proving_grounds_05 - } - if = { - limit = { has_domicile_building = proving_grounds_04 } - remove_domicile_building = proving_grounds_04 - } - if = { - limit = { has_domicile_building = proving_grounds_03 } - remove_domicile_building = proving_grounds_03 - } - if = { - limit = { has_domicile_building = proving_grounds_02 } - remove_domicile_building = proving_grounds_02 - } - if = { - limit = { has_domicile_building = proving_grounds_01 } - remove_domicile_building = proving_grounds_01 - } - if = { - limit = { has_domicile_building = camp_perimeter_good_siting } - remove_domicile_building = camp_perimeter_good_siting - } - if = { - limit = { has_domicile_building = camp_perimeter_fixed_layout } - remove_domicile_building = camp_perimeter_fixed_layout - } - if = { - limit = { has_domicile_building = camp_perimeter_extra_watch } - remove_domicile_building = camp_perimeter_extra_watch - } - if = { - limit = { has_domicile_building = camp_perimeter_palisade } - remove_domicile_building = camp_perimeter_palisade - } - if = { - limit = { has_domicile_building = camp_perimeter_ditch } - remove_domicile_building = camp_perimeter_ditch - } - if = { - limit = { has_domicile_building = camp_perimeter_camp_hygiene } - remove_domicile_building = camp_perimeter_camp_hygiene - } - if = { - limit = { has_domicile_building = camp_perimeter_06 } - remove_domicile_building = camp_perimeter_06 - } - if = { - limit = { has_domicile_building = camp_perimeter_05 } - remove_domicile_building = camp_perimeter_05 - } - if = { - limit = { has_domicile_building = camp_perimeter_04 } - remove_domicile_building = camp_perimeter_04 - } - if = { - limit = { has_domicile_building = camp_perimeter_03 } - remove_domicile_building = camp_perimeter_03 - } - if = { - limit = { has_domicile_building = camp_perimeter_02 } - remove_domicile_building = camp_perimeter_02 - } - if = { - limit = { has_domicile_building = camp_perimeter_01 } - remove_domicile_building = camp_perimeter_01 - } - } -} - -################################################## -# Travel Effects - -remove_laamp_from_exiled_county_automatically_effect = { - $PROVINCE$ = { save_scope_as = province_effect } - $LAAMP$ = { save_scope_as = laamp_effect } - if = { - limit = { - exists = domicile.domicile_location.county.holder # Safety check - is_laamp_exiled_from_province_trigger = { - PROVINCE = scope:province_effect - LAAMP = scope:laamp_effect - } - } - scope:laamp_effect = { - # Grab any valid destination to shift to. - ## Try somewhere more sensible if we're a player (which is less performant). - domicile.domicile_location.county.holder = { # (is_laamp_exiled_from_province_trigger actually checks county holder) - every_neighboring_and_across_water_top_liege_realm_owner = { - limit = { - this != scope:laamp_effect - } - every_realm_border_county = { - limit = { - exists = holder - NOT = { - holder = { - is_laamp_exiled_from_holder_or_liege_trigger = { LAAMP = scope:laamp_effect } - } - } - } - add_to_list = reroute_counties_list - } - } - ordered_in_list = { - list = reroute_counties_list - order_by = { - value = "title_province.squared_distance(scope:laamp_effect.location)" - multiply = -1 - } - save_scope_as = exile_reroute - } - } - ## Otherwise, try to grab anywhere valid. - if = { - limit = { - NOT = { exists = scope:exile_reroute } - } - domicile.domicile_location.county.holder = { # (is_laamp_exiled_from_province_trigger actually checks county holder) - random_neighboring_and_across_water_top_liege_realm_owner = { - random_realm_county = { - limit = { - exists = holder - NOT = { - holder = { - is_laamp_exiled_from_holder_or_liege_trigger = { LAAMP = scope:laamp_effect } - } - } - } - save_scope_as = exile_reroute - } - } - } - } - ## If we got nothing (which is very unlikely), prep a backup. - if = { - limit = { - NOT = { exists = scope:exile_reroute } - } - scope:province_effect = { save_scope_as = province_to_exit } - ordered_empire = { - limit = { - any_de_jure_county = { - exists = holder - NOT = { - holder = { - is_laamp_exiled_from_holder_or_liege_trigger = { LAAMP = scope:laamp_effect } - } - } - } - } - order_by = { - title_capital_county = { add = "squared_distance(scope:province_to_exit)" } - multiply = -1 - } - random_de_jure_county = { - limit = { - exists = holder - NOT = { - holder = { - is_laamp_exiled_from_holder_or_liege_trigger = { LAAMP = scope:laamp_effect } - } - } - } - save_scope_as = exile_reroute - } - } - } - # If we're an AI, give us some relief for our (likely) poor choice of destination. - if = { - limit = { is_ai = yes } - add_character_modifier = laamp_provisions_forgiveness_travel_modifier - } - # Begin travelling. - start_travel_plan = { - destination = scope:exile_reroute.title_province - travel_with_domicile = yes - return_trip = no - players_use_planner = no - } - } - } -} - -################################################## -# Event Effects - -try_to_set_event_recurrer_relationship_effect = { - if = { - limit = { - save_scope_as = liege_temp - any_relation = { - type = event_recurrer - # Only count recurrers that are still useful: if they've been demoted or incapacitated, someone should fill the gap. - is_valid_active_event_recurrer_trigger = { LIEGE = scope:liege_temp } - # We don't want too few, don't want too many. - count < 5 - } - } - set_relation_event_recurrer = $TARGET$ - } -} - -laamp_contract_grab_suitable_rival_for_disposal_effect = { - # Used in valid_laamp_contract_foe_trigger. - save_scope_as = employer_ref - # First, try to grab suitable rivals. - ordered_relation = { - type = rival - limit = { valid_laamp_contract_foe_trigger = yes } - order_by = "opinion(scope:employer_ref)" - save_scope_as = target - } - # Then we try for potential rivals. - ## Non-if-else_if chaining here is deliberate: we iterate over each list once then look to see whether we came up with anything. If we didn't, we move on to the next list. - ### This saves us doubling up on checks for the same outcome. - if = { - limit = { - NOT = { exists = scope:target } - } - ordered_relation = { - type = potential_rival - order_by = "opinion(scope:employer_ref)" - limit = { valid_laamp_contract_foe_trigger = yes } - save_scope_as = target - } - } - # Then get peer vassals (if we're not independent). - if = { - limit = { - NOT = { exists = scope:target } - top_liege != this - } - liege = { - ordered_vassal = { - limit = { valid_laamp_contract_foe_trigger = yes } - order_by = "opinion(scope:employer_ref)" - save_scope_as = target - } - } - } - # Or neighbouring rulers otherwise. - if = { - limit = { - NOT = { exists = scope:target } - } - ordered_neighboring_and_across_water_top_liege_realm_owner = { - limit = { - valid_laamp_contract_foe_trigger = yes - # Make sure that we don't have barons putting out hits on emperors. - highest_held_title_tier <= { - value = scope:employer.highest_held_title_tier - add = 2 - } - } - order_by = "opinion(scope:employer_ref)" - save_scope_as = target - } - } - # For the AI we grab a pool character - if = { - limit = { - NOT = { exists = scope:target } - any_pool_character = { - province = location - is_physically_able_ai_adult = yes - } - } - save_scope_as = value_target - random_pool_character = { - province = location - limit = { - is_physically_able_ai_adult = yes - } - save_scope_as = target - } - } - # Then we just spawn someone. - if = { - limit = { - NOT = { exists = scope:target } - } - save_scope_as = value_target - create_character = { - template = bandit_character_generic - faith = scope:employer_ref.capital_county.faith - culture = scope:employer_ref.capital_county.culture - location = scope:employer_ref.capital_county.title_province - gender_female_chance = scope_value_target_soldier_female_chance - dynasty = none - save_scope_as = target - after_creation = { - add_opinion = { - target = scope:employer_ref - modifier = hate_opinion - opinion = -50 - } - reverse_add_opinion = { - target = scope:employer_ref - modifier = hate_opinion - opinion = -50 - } - } - } - } - # Plus, set up a grudge from our employer. - scope:employer_ref = { - set_random_rivalry_reason = { - TARGET = scope:target - RELATION = grudge - } - } - # Finally, log them to the contract. - scope:task_contract = { - set_variable = { - name = target - value = scope:target - } - } -} - -select_thriving_predator_animal_effect = { - random_list = { - # Boar - 20 = { - trigger = { - $LOCATION$ = { hunt_animal_boar_trigger = yes } - } - # We don't mind hunting them for pest control, regardless of faith. - set_variable = { - name = animal_type_event - value = flag:boar - } - } - # Wolf, Hyena, Lynx - 10 = { - random_list = { - # Wolf - 10 = { - trigger = { - $LOCATION$ = { - NAND = { - geographical_region = world_africa_west - OR = { - terrain = hills - terrain = forest - terrain = jungle - terrain = mountains - } - } - } - } - set_variable = { - name = animal_type_event - value = flag:wolf - } - } - # Hyena - 20 = { - trigger = { - $LOCATION$ = { hunt_animal_hyena_trigger = yes } - } - set_variable = { - name = animal_type_event - value = flag:hyena - } - } - # Lynx - 5 = { - trigger = { - $LOCATION$ = { hunt_animal_lynx_trigger = yes } - } - set_variable = { - name = animal_type_event - value = flag:lynx - } - } - } - } - # Bear - 5 = { - trigger = { - $LOCATION$ = { hunt_animal_bear_trigger = yes } - } - set_variable = { - name = animal_type_event - value = flag:bear - } - } - # Big Cat - 5 = { - trigger = { - $LOCATION$ = { - hunt_animal_big_cat_trigger = yes - OR = { - hunt_animal_lion_trigger = yes - hunt_animal_tiger_trigger = yes - hunt_animal_leopard_trigger = yes - } - } - } - random_list = { - # Lion - 5 = { - trigger = { - $LOCATION$ = { hunt_animal_lion_trigger = yes } - } - modifier = { - factor = 5 - $LOCATION$ = { - OR = { - terrain = desert - terrain = forest - } - } - } - set_variable = { - name = animal_type_event - value = flag:lion - } - } - # Tiger - 5 = { - trigger = { - $LOCATION$ = { hunt_animal_tiger_trigger = yes } - } - modifier = { - factor = 5 - $LOCATION$ = { terrain = jungle } - } - set_variable = { - name = animal_type_event - value = flag:tiger - } - } - # Leopard - 5 = { - trigger = { - $LOCATION$ = { hunt_animal_leopard_trigger = yes } - } - modifier = { - factor = 0.5 - $LOCATION$ = { - OR = { - terrain = desert - terrain = mountains - } - } - } - set_variable = { - name = animal_type_event - value = flag:leopard - } - } - } - } - } - if = { - limit = { - NOT = { has_variable = animal_type_event } - } - set_variable = { - name = animal_type_event - value = flag:dog - } - } -} - -relation_increase_harrying_stats_effect = { - # Harrying logic. - if = { - limit = { - character_is_valid_for_harrying_of_the_north_trigger = yes - scope:target = { - character_is_valid_for_harrying_of_the_north_trigger = yes - is_important_or_vip_struggle_character = yes - } - culture != scope:target.culture - } - global_var:harrying_of_the_north = { save_scope_as = story } - if = { - limit = { - OR = { - AND = { - character_is_valid_norman_for_harrying_of_the_north_trigger = yes - scope:target = { character_is_valid_anglo_saxon_for_harrying_of_the_north_trigger = yes } - } - AND = { - character_is_valid_anglo_saxon_for_harrying_of_the_north_trigger = yes - scope:target = { character_is_valid_norman_for_harrying_of_the_north_trigger = yes } - } - } - } - ep3_increase_$STAT$_effect = { AMOUNT = harrying_miniscule_increase_value } - } - } -} - -########################### -# City Construction Effects -laamp_city_builder_construction_effect = { - if = { - limit = { - has_character_flag = laamp_city_builder_$FLAG$_upgrade - } - scope:city_location = { - add_building = $BUILDING$_03 - } - } - else_if = { - limit = { - has_character_flag = laamp_city_builder_$FLAG$ - } - scope:city_location = { - add_building = $BUILDING$_02 - } - } -} diff --git a/N3OW/common/scripted_effects/00_learning_lifestyle_effects.txt b/N3OW/common/scripted_effects/00_learning_lifestyle_effects.txt deleted file mode 100644 index 103ddf73..00000000 --- a/N3OW/common/scripted_effects/00_learning_lifestyle_effects.txt +++ /dev/null @@ -1,1436 +0,0 @@ -#Effects used in Lifestyle Focus events - - -##################################################################### -# EFFECT LIST -##################################################################### -# !!! Remember to add all new effects with a short description here !!! -# -# zealous_progression_effect -# cynical_progression_effect -# pick_translation_book_effect -# set_up_translation_story_effect -# - -#Scholarship Zealous Progression -zealous_progression_effect = { - if = { - limit = { - NOT = { has_trait = zealous } - } - custom_tooltip = learning_zealous_path_tt - if = { - limit = { NOT = { has_variable = scholarship_zealous_cynical_value } } - if = { - limit = { - has_trait = cynical - } - set_variable = { - name = scholarship_zealous_cynical_value - value = 3 - } - } - set_variable = { - name = scholarship_zealous_cynical_value - value = -1 - } - } - else_if = { - limit = { - has_trait = cynical - var:scholarship_zealous_cynical_value <= 1 - } - remove_trait = cynical - set_variable = { - name = scholarship_zealous_cynical_value - value = 0 - } - } - else_if = { - limit = { - var:scholarship_zealous_cynical_value < scholarship_zealous_threshold - } - add_trait = zealous - } - else = { - change_variable = { - name = scholarship_zealous_cynical_value - subtract = 1 - } - } - } - stress_impact = { - cynical = minor_stress_impact_gain - } -} - - -#Scholarship Progression -cynical_progression_effect = { - if = { - limit = { NOT = { has_trait = cynical } } - custom_tooltip = learning_cynical_path_tt - if = { - limit = {NOT = { has_variable = scholarship_zealous_cynical_value } } - if = { - limit = { - has_trait = zealous - } - set_variable = { - name = scholarship_zealous_cynical_value - value = -3 - } - } - set_variable = { - name = scholarship_zealous_cynical_value - value = 1 - } - } - else_if = { - limit = { - has_trait = zealous - var:scholarship_zealous_cynical_value >= -1 - } - remove_trait = zealous - set_variable = { - name = scholarship_zealous_cynical_value - value = 0 - } - } - else_if = { - limit = { - NOT = { has_trait = cynical } - var:scholarship_zealous_cynical_value > scholarsip_cynical_threshold - } - add_trait = cynical - } - else = { - change_variable = { - name = scholarship_zealous_cynical_value - add = 1 - } - } - } - stress_impact = { - zealous = minor_stress_impact_gain - } -} - - -set_up_translation_story_effect = { - add_character_modifier = { - modifier = book_translation_ongoing_modifier - } - set_variable = { - name = book_to_translate - value = flag:$BOOK$ - } - create_story = book_translation_story -} - - -pick_translation_book_effect = { - random_list = { - 100 = { #Regula Pastoralis - trigger = { - trigger_if = { - limit = { - exists = scope:option_1 - } - NOT = { scope:option_1 = flag:regula_pastoralis } - } - capital_province = { - OR = { - geographical_region = world_europe - geographical_region = world_middle_east - geographical_region = world_africa_north - } - } - } - - save_scope_value_as = { - name = $OPTION$ - value = flag:regula_pastoralis - } - } - 100 = { #Physica Elementa - trigger = { - trigger_if = { - limit = { - exists = scope:option_1 - } - NOT = { scope:option_1 = flag:physica_elementa } - } - capital_province = { - OR = { - geographical_region = world_europe - geographical_region = world_middle_east - geographical_region = world_africa_north - geographical_region = world_persian_empire - } - } - } - - save_scope_value_as = { - name = $OPTION$ - value = flag:physica_elementa - } - } - 100 = { #Almagest - trigger = { - trigger_if = { - limit = { - exists = scope:option_1 - } - NOT = { scope:option_1 = flag:almagest } - } - capital_province = { - OR = { - geographical_region = world_europe - geographical_region = world_middle_east - geographical_region = world_africa_north - geographical_region = world_persian_empire - } - } - } - - save_scope_value_as = { - name = $OPTION$ - value = flag:almagest - } - } - 100 = { #The Elements - trigger = { - trigger_if = { - limit = { - exists = scope:option_1 - } - NOT = { scope:option_1 = flag:elements } - } - capital_province = { - OR = { - geographical_region = world_europe - geographical_region = world_middle_east - geographical_region = world_africa_north - geographical_region = world_persian_empire - } - } - } - - save_scope_value_as = { - name = $OPTION$ - value = flag:elements - } - } - 100 = { #Corpus Hermeticus - trigger = { - trigger_if = { - limit = { - exists = scope:option_1 - } - NOT = { scope:option_1 = flag:corpus_hermeticus } - } - capital_province = { - OR = { - geographical_region = world_europe - geographical_region = world_middle_east - geographical_region = world_africa_north - geographical_region = world_persian_empire - } - } - } - - save_scope_value_as = { - name = $OPTION$ - value = flag:corpus_hermeticus - } - } - 100 = { #Treatises of Hippocrates - trigger = { - trigger_if = { - limit = { - exists = scope:option_1 - } - NOT = { scope:option_1 = flag:treatises_of_hippocrates } - } - capital_province = { - OR = { - geographical_region = world_europe - geographical_region = world_middle_east - geographical_region = world_africa_north - geographical_region = world_persian_empire - } - } - } - - save_scope_value_as = { - name = $OPTION$ - value = flag:treatises_of_hippocrates - } - } - 100 = { #Peri Psyches - trigger = { - trigger_if = { - limit = { - exists = scope:option_1 - } - NOT = { scope:option_1 = flag:peri_psyches } - } - capital_province = { - OR = { - geographical_region = world_europe - geographical_region = world_middle_east - geographical_region = world_africa_north - geographical_region = world_persian_empire - } - } - } - - save_scope_value_as = { - name = $OPTION$ - value = flag:peri_psyches - } - } - 100 = { #Kategoriai - trigger = { - trigger_if = { - limit = { - exists = scope:option_1 - } - NOT = { scope:option_1 = flag:kategoriai } - } - capital_province = { - OR = { - geographical_region = world_europe - geographical_region = world_middle_east - geographical_region = world_africa_north - geographical_region = world_persian_empire - } - } - } - - save_scope_value_as = { - name = $OPTION$ - value = flag:kategoriai - } - } - 100 = { #Avesta - trigger = { - trigger_if = { - limit = { - exists = scope:option_1 - } - NOT = { scope:option_1 = flag:avesta } - } - capital_province = { - OR = { - geographical_region = world_middle_east - geographical_region = world_persian_empire - geographical_region = world_steppe - geographical_region = world_india_rajastan - } - } - } - - save_scope_value_as = { - name = $OPTION$ - value = flag:avesta - } - } - 100 = { #Avesta - trigger = { - trigger_if = { - limit = { - exists = scope:option_1 - } - NOT = { scope:option_1 = flag:avesta } - } - capital_province = { - OR = { - geographical_region = world_middle_east - geographical_region = world_persian_empire - geographical_region = world_steppe - geographical_region = world_india_rajastan - } - } - } - - save_scope_value_as = { - name = $OPTION$ - value = flag:avesta - } - } - 100 = { #De Oratore - trigger = { - trigger_if = { - limit = { - exists = scope:option_1 - } - NOT = { scope:option_1 = flag:de_oratore } - } - capital_province = { - OR = { - geographical_region = world_middle_east - geographical_region = world_persian_empire - geographical_region = world_europe_north - } - } - } - - save_scope_value_as = { - name = $OPTION$ - value = flag:de_oratore - } - } - 100 = { #Book of Arda Viraf - trigger = { - trigger_if = { - limit = { - exists = scope:option_1 - } - NOT = { scope:option_1 = flag:book_of_arda_viraf } - } - capital_province = { - OR = { - geographical_region = world_middle_east - geographical_region = world_persian_empire - geographical_region = world_india - geographical_region = world_steppe - } - } - } - - save_scope_value_as = { - name = $OPTION$ - value = flag:book_of_arda_viraf - } - } - 100 = { #The Upanishads - trigger = { - trigger_if = { - limit = { - exists = scope:option_1 - } - NOT = { scope:option_1 = flag:upanishads } - } - capital_province = { - OR = { - geographical_region = world_persian_empire - geographical_region = world_india - geographical_region = world_steppe_east - geographical_region = world_steppe_tarim - } - } - } - - save_scope_value_as = { - name = $OPTION$ - value = flag:upanishads - } - } - 100 = { #Rigveda - trigger = { - trigger_if = { - limit = { - exists = scope:option_1 - } - NOT = { scope:option_1 = flag:rigveda } - } - capital_province = { - OR = { - geographical_region = world_persian_empire - geographical_region = world_india - geographical_region = world_steppe_east - geographical_region = world_steppe_tarim - } - } - } - - save_scope_value_as = { - name = $OPTION$ - value = flag:rigveda - } - } - 100 = { #The Books of the Balances - trigger = { - trigger_if = { - limit = { - exists = scope:option_1 - } - NOT = { scope:option_1 = flag:books_of_the_balances } - } - capital_province = { - OR = { - geographical_region = world_persian_empire - geographical_region = world_asia_minor - geographical_region = world_india - geographical_region = world_steppe_east - geographical_region = world_steppe_tarim - geographical_region = world_europe - } - } - } - - save_scope_value_as = { - name = $OPTION$ - value = flag:books_of_the_balances - } - } - 100 = { #Secret of Secrets - trigger = { - trigger_if = { - limit = { - exists = scope:option_1 - } - NOT = { scope:option_1 = flag:secret_of_secrets } - } - capital_province = { - OR = { - geographical_region = world_persian_empire - geographical_region = world_asia_minor - geographical_region = world_india - geographical_region = world_steppe_east - geographical_region = world_steppe_tarim - geographical_region = world_europe - } - } - } - - save_scope_value_as = { - name = $OPTION$ - value = flag:secret_of_secrets - } - } - 100 = { #The Court of Agriculture - trigger = { - trigger_if = { - limit = { - exists = scope:option_1 - } - NOT = { scope:option_1 = flag:court_of_agriculture } - } - capital_province = { - OR = { - geographical_region = world_persian_empire - geographical_region = world_asia_minor - geographical_region = world_india - geographical_region = world_steppe_east - geographical_region = world_steppe_tarim - geographical_region = world_europe - } - } - } - - save_scope_value_as = { - name = $OPTION$ - value = flag:court_of_agriculture - } - } - 100 = { #The Lanterns of Wisdom - trigger = { - trigger_if = { - limit = { - exists = scope:option_1 - } - NOT = { scope:option_1 = flag:lanterns_of_wisdom } - } - capital_province = { - OR = { - geographical_region = world_persian_empire - geographical_region = world_asia_minor - geographical_region = world_india - geographical_region = world_steppe_east - geographical_region = world_steppe_tarim - geographical_region = world_europe - } - } - } - - save_scope_value_as = { - name = $OPTION$ - value = flag:lanterns_of_wisdom - } - } - 100 = { #The Shahnameh - trigger = { - trigger_if = { - limit = { - exists = scope:option_1 - } - NOT = { scope:option_1 = flag:shahnameh } - } - capital_province = { - OR = { - geographical_region = world_mesopotamia - geographical_region = world_asia_minor - geographical_region = world_middle_east_jerusalem - geographical_region = world_middle_east_arabia - geographical_region = world_africa_north - geographical_region = world_india - geographical_region = world_steppe_east - geographical_region = world_steppe_tarim - } - } - } - - save_scope_value_as = { - name = $OPTION$ - value = flag:shahnameh - } - } - 100 = { #The Arithmetica - trigger = { - trigger_if = { - limit = { - exists = scope:option_1 - } - NOT = { scope:option_1 = flag:arithmetica } - } - capital_province = { - OR = { - geographical_region = world_persian_empire - geographical_region = world_asia_minor - geographical_region = world_middle_east_jerusalem - geographical_region = world_middle_east_arabia - geographical_region = world_africa_north - geographical_region = world_india - geographical_region = world_steppe_east - geographical_region = world_steppe_west - geographical_region = world_steppe_tarim - geographical_region = world_europe - } - } - } - - save_scope_value_as = { - name = $OPTION$ - value = flag:arithmetica - } - } - 100 = { #The Pali Canon - trigger = { - trigger_if = { - limit = { - exists = scope:option_1 - } - NOT = { scope:option_1 = flag:pali_canon } - } - capital_province = { - OR = { - geographical_region = world_persian_empire - geographical_region = world_middle_east_jerusalem - geographical_region = world_middle_east_arabia - geographical_region = world_india - geographical_region = world_steppe_tarim - geographical_region = world_steppe_east - } - } - } - - save_scope_value_as = { - name = $OPTION$ - value = flag:pali_canon - } - } - 100 = { #The Sagas - trigger = { - trigger_if = { - limit = { - exists = scope:option_1 - } - NOT = { scope:option_1 = flag:the_norse_sagas } - } - OR = { - AND = { - religion = religion:christianity_religion - current_date > 1000.1.1 - capital_province = { - geographical_region = world_europe_north - } - } - AND = { - current_date > 1200.1.1 - OR = { - capital_province = { - geographical_region = world_europe_north - } - religion = religion:germanic_religion - } - } - } - } - - save_scope_value_as = { - name = $OPTION$ - value = flag:the_norse_sagas - } - } - 1 = { #Fallback: Family History - trigger = { - trigger_if = { - limit = { - exists = scope:option_1 - } - NOT = { scope:option_1 = flag:family_history } - } - } - - save_scope_value_as = { - name = $OPTION$ - value = flag:family_history - } - } - 1 = { #Fallback: Ancient Myths - trigger = { - trigger_if = { - limit = { - exists = scope:option_1 - } - NOT = { scope:option_1 = flag:ancient_myths } - } - } - - save_scope_value_as = { - name = $OPTION$ - value = flag:ancient_myths - } - } - } -} - - -learning_scholarship_special_2011_significantly_improve_translation_effect = { - custom_tooltip = book_translation_tooltip.more_good - hidden_effect = { - scope:story = { - change_variable = { - name = translation_quality - add = 2 - } - } - } -} - -learning_scholarship_special_2011_somewhat_improve_translation_effect = { - custom_tooltip = book_translation_tooltip.less_good - hidden_effect = { - scope:story = { - change_variable = { - name = translation_quality - add = 1 - } - } - } -} - -speed_up_translation_effect = { - custom_tooltip = book_translation_tooltip.finish_faster - hidden_effect = { - scope:story = { - change_variable = { - name = duration_left - add = -1 - } - } - } -} - -learning_theology_2020_randomize_virtue_options_effect = { - random_list = { - 1 = { - trigger = { - faith = { trait_is_virtue = brave } - NOT = { has_character_flag = virtue_brave } - } - modifier = { - scope:court_chaplain = { has_trait = brave } - factor = 10 - } - add_character_flag = virtue_brave - } - 1 = { - trigger = { - faith = { trait_is_virtue = just } - NOT = { has_character_flag = virtue_just } - } - modifier = { - scope:court_chaplain = { has_trait = just } - factor = 10 - } - add_character_flag = virtue_just - } - 1 = { - trigger = { - faith = { trait_is_virtue = temperate } - NOT = { has_character_flag = virtue_temperate } - } - modifier = { - scope:court_chaplain = { has_trait = temperate } - factor = 10 - } - add_character_flag = virtue_temperate - } - 1 = { - trigger = { - faith = { trait_is_virtue = chaste } - NOT = { has_character_flag = virtue_chaste } - } - modifier = { - scope:court_chaplain = { has_trait = chaste } - factor = 10 - } - add_character_flag = virtue_chaste - } - 1 = { - trigger = { - faith = { trait_is_virtue = compassionate } - NOT = { has_character_flag = virtue_compassionate } - } - modifier = { - scope:court_chaplain = { has_trait = compassionate } - factor = 10 - } - add_character_flag = virtue_compassionate - } - 1 = { - trigger = { - faith = { trait_is_virtue = honest } - NOT = { has_character_flag = virtue_honest } - } - modifier = { - scope:court_chaplain = { has_trait = honest } - factor = 10 - } - add_character_flag = virtue_honest - } - 1 = { - trigger = { - faith = { trait_is_virtue = forgiving } - NOT = { has_character_flag = virtue_forgiving } - } - modifier = { - scope:court_chaplain = { has_trait = forgiving } - factor = 10 - } - add_character_flag = virtue_forgiving - } - 1 = { - trigger = { - faith = { trait_is_virtue = wrathful } - NOT = { has_character_flag = virtue_wrathful } - } - modifier = { - scope:court_chaplain = { has_trait = wrathful } - factor = 10 - } - add_character_flag = virtue_wrathful - } - 1 = { - trigger = { - faith = { trait_is_virtue = vengeful } - NOT = { has_character_flag = virtue_vengeful } - } - modifier = { - scope:court_chaplain = { has_trait = vengeful } - factor = 10 - } - add_character_flag = virtue_vengeful - } - 1 = { - trigger = { - faith = { trait_is_virtue = content } - NOT = { has_character_flag = virtue_content } - } - modifier = { - scope:court_chaplain = { has_trait = content } - factor = 10 - } - add_character_flag = virtue_content - } - 1 = { - trigger = { - faith = { trait_is_virtue = patient } - NOT = { has_character_flag = virtue_patient } - } - modifier = { - scope:court_chaplain = { has_trait = patient } - factor = 10 - } - add_character_flag = virtue_patient - } - 1 = { - trigger = { - faith = { trait_is_virtue = calm } - NOT = { has_character_flag = virtue_calm } - } - modifier = { - scope:court_chaplain = { has_trait = calm } - factor = 10 - } - add_character_flag = virtue_calm - } - 1 = { - trigger = { - faith = { trait_is_virtue = humble } - NOT = { has_character_flag = virtue_humble } - } - modifier = { - scope:court_chaplain = { has_trait = humble } - factor = 10 - } - add_character_flag = virtue_humble - } - 1 = { - trigger = { - faith = { trait_is_virtue = diligent } - NOT = { has_character_flag = virtue_diligent } - } - modifier = { - scope:court_chaplain = { has_trait = diligent } - factor = 10 - } - add_character_flag = virtue_diligent - } - 1 = { - trigger = { - faith = { trait_is_virtue = generous } - NOT = { has_character_flag = virtue_generous } - } - modifier = { - scope:court_chaplain = { has_trait = generous } - factor = 10 - } - add_character_flag = virtue_generous - } - } -} - -learning_theology_2020_randomize_bad_virtue_options_effect = { - random_list = { - 1 = { - trigger = { - faith = { NOT = { trait_is_virtue = brave } } - NOT = { has_character_flag = virtue_brave } - } - add_character_flag = virtue_brave - } - 1 = { - trigger = { - faith = { NOT = { trait_is_virtue = just } } - NOT = { has_character_flag = virtue_just } - } - add_character_flag = virtue_just - } - 1 = { - trigger = { - faith = { NOT = { trait_is_virtue = temperate } } - NOT = { has_character_flag = virtue_temperate } - } - add_character_flag = virtue_temperate - } - 1 = { - trigger = { - faith = { NOT = { trait_is_virtue = chaste } } - NOT = { has_character_flag = virtue_chaste } - } - add_character_flag = virtue_chaste - } - 1 = { - trigger = { - faith = { NOT = { trait_is_virtue = compassionate } } - NOT = { has_character_flag = virtue_compassionate } - } - add_character_flag = virtue_compassionate - } - 1 = { - trigger = { - faith = { NOT = { trait_is_virtue = honest } } - NOT = { has_character_flag = virtue_honest } - } - add_character_flag = virtue_honest - } - 1 = { - trigger = { - faith = { NOT = { trait_is_virtue = forgiving } } - NOT = { has_character_flag = virtue_forgiving } - } - add_character_flag = virtue_forgiving - } - 1 = { - trigger = { - faith = { NOT = { trait_is_virtue = wrathful } } - NOT = { has_character_flag = virtue_wrathful } - } - add_character_flag = virtue_wrathful - } - 1 = { - trigger = { - faith = { NOT = { trait_is_virtue = vengeful } } - NOT = { has_character_flag = virtue_vengeful } - } - add_character_flag = virtue_vengeful - } - 1 = { - trigger = { - faith = { NOT = { trait_is_virtue = content } } - NOT = { has_character_flag = virtue_content } - } - add_character_flag = virtue_content - } - 1 = { - trigger = { - faith = { NOT = { trait_is_virtue = patient } } - NOT = { has_character_flag = virtue_patient } - } - add_character_flag = virtue_patient - } - 1 = { - trigger = { - faith = { NOT = { trait_is_virtue = calm } } - NOT = { has_character_flag = virtue_calm } - } - add_character_flag = virtue_calm - } - 1 = { - trigger = { - faith = { NOT = { trait_is_virtue = humble } } - NOT = { has_character_flag = virtue_humble } - } - add_character_flag = virtue_humble - } - 1 = { - trigger = { - faith = { NOT = { trait_is_virtue = diligent } } - NOT = { has_character_flag = virtue_diligent } - } - add_character_flag = virtue_diligent - } - 1 = { - trigger = { - faith = { NOT = { trait_is_virtue = generous } } - NOT = { has_character_flag = virtue_generous } - } - add_character_flag = virtue_generous - } - 1 = { - trigger = { - faith = { NOT = { trait_is_virtue = greedy } } - NOT = { has_character_flag = virtue_greedy } - } - add_character_flag = virtue_greedy - } - 1 = { - trigger = { - faith = { NOT = { trait_is_virtue = lustful } } - NOT = { has_character_flag = virtue_lustful } - } - add_character_flag = virtue_lustful - } - 1 = { - trigger = { - faith = { NOT = { trait_is_virtue = ambitious } } - NOT = { has_character_flag = virtue_ambitious } - } - add_character_flag = virtue_ambitious - } - 1 = { - trigger = { - faith = { NOT = { trait_is_virtue = gluttonous } } - NOT = { has_character_flag = virtue_gluttonous } - } - add_character_flag = virtue_gluttonous - } - } -} - -learning_theology_2020_tooltip_effect = { - show_as_tooltip = { - random_list = { - 1 = { #GREAT - desc = learning_theology.2020.success.desc - show_chance = no - add_piety = medium_piety_gain - reverse_add_opinion = { - target = scope:court_chaplain - modifier = kindness_opinion - opinion = 30 - } - } - 1 = { #GOOD - desc = learning_theology.2020.neutral.desc - show_chance = no - add_piety = medium_piety_gain - } - 1 = { #BAD - desc = learning_theology.2020.failure.desc - show_chance = no - reverse_add_opinion = { - target = scope:court_chaplain - modifier = insulted_opinion - opinion = -15 - } - } - } - } -} - -learning_theology_special_1001_doctrine_effect = { - if = { - limit = { - exists = scope:female_adultery_doctrine - } - faith = { - if = { - limit = { - has_doctrine = doctrine_adultery_women_crime - } - remove_doctrine = doctrine_adultery_women_crime - } - else_if = { - limit = { - has_doctrine = doctrine_adultery_women_shunned - } - remove_doctrine = doctrine_adultery_women_shunned - } - - add_doctrine = doctrine_adultery_women_accepted - } - } - else_if = { - limit = { - exists = scope:male_adultery_doctrine - } - faith = { - if = { - limit = { - has_doctrine = doctrine_adultery_men_crime - } - remove_doctrine = doctrine_adultery_men_crime - } - else_if = { - limit = { - has_doctrine = doctrine_adultery_men_shunned - } - remove_doctrine = doctrine_adultery_men_shunned - } - - add_doctrine = doctrine_adultery_men_accepted - } - } - else_if = { - limit = { - exists = scope:homosexuality_doctrine - } - faith = { - if = { - limit = { - has_doctrine = doctrine_homosexuality_crime - } - remove_doctrine = doctrine_homosexuality_crime - } - else_if = { - limit = { - has_doctrine = doctrine_homosexuality_shunned - } - remove_doctrine = doctrine_homosexuality_shunned - } - - add_doctrine = doctrine_homosexuality_accepted - } - } - else_if = { - limit = { - exists = scope:kinslyaing_doctrine - } - faith = { - if = { - limit = { - has_doctrine = doctrine_kinslaying_any_dynasty_member_crime - } - remove_doctrine = doctrine_kinslaying_any_dynasty_member_crime - } - else_if = { - limit = { - has_doctrine = doctrine_kinslaying_extended_family_crime - } - remove_doctrine = doctrine_kinslaying_extended_family_crime - } - else_if = { - limit = { - has_doctrine = doctrine_kinslaying_close_kin_crime - } - remove_doctrine = doctrine_kinslaying_close_kin_crime - } - else_if = { - limit = { - has_doctrine = doctrine_kinslaying_shunned - } - remove_doctrine = doctrine_kinslaying_shunned - } - - add_doctrine = doctrine_kinslaying_accepted - } - } - else_if = { - limit = { - exists = scope:witchcraft_doctrine - } - faith = { - if = { - limit = { - has_doctrine = doctrine_witchcraft_crime - } - remove_doctrine = doctrine_witchcraft_crime - } - else_if = { - limit = { - has_doctrine = doctrine_witchcraft_shunned - } - remove_doctrine = doctrine_witchcraft_shunned - } - - add_doctrine = doctrine_witchcraft_accepted - } - } - else_if = { - limit = { - exists = scope:consanguinity_doctrine - } - faith = { - if = { - limit = { - has_doctrine = doctrine_consanguinity_restricted - } - remove_doctrine = doctrine_consanguinity_restricted - } - else_if = { - limit = { - has_doctrine = doctrine_consanguinity_cousins - } - remove_doctrine = doctrine_consanguinity_cousins - } - else_if = { - limit = { - has_doctrine = doctrine_consanguinity_aunt_nephew_and_uncle_niece - } - remove_doctrine = doctrine_consanguinity_aunt_nephew_and_uncle_niece - } - - add_doctrine = doctrine_consanguinity_unrestricted - } - } - faith = { - change_fervor = { - value = medium_fervor_loss - desc = fervor_loss_theology_doctrine_change - } - set_variable = { - name = variable_changed_doctrine_learning_theology_special_1001 - value = yes - years = 250 - } - } -} - - -medicine_2050_soldier_saving_effect = { - add_courtier = scope:soldier - add_hook = { - target = scope:soldier - type = loyalty_hook - } - hidden_effect = { - scope:soldier = { - change_trait_rank = { - trait = wounded - rank = -1 - } - add_character_modifier = { - modifier = risky_wound_treatment_success_modifier - days = wound_treatment_success_duration - } - trigger_event = { - id = health.4999 #Sends health.4001 to me or 4002 to liege - days = wound_treatment_success_duration_plus_1 - } - } - } -} - -medicine_2050_a_success_effect = { - if = { - limit = { NOT = { has_relation_friend = scope:helper } } - set_relation_friend = { reason = friend_saved_life_together target = scope:helper } - } - add_learning_lifestyle_xp = minor_lifestyle_xp - medicine_2050_soldier_saving_effect = yes -} - -medicine_2050_a_failure_effect = { - scope:soldier = { - death = { - death_reason = death_wounds - } - } - if = { - limit = { ai_compassion >= 0 } - stress_impact = { - base = minor_stress_impact_gain - compassionate = minor_stress_impact_gain - } - } -} - -medicine_2050_b_failure_effect = { - scope:soldier = { - death = { - death_reason = death_treatment - killer = root - } - } - if = { - limit = { ai_compassion > 0 } - stress_impact = { - base = minor_stress_impact_gain - compassionate = minor_stress_impact_gain - } - } -} - -medicine_2050_b_success_effect = { - add_learning_lifestyle_xp = major_lifestyle_xp - medicine_2050_soldier_saving_effect = yes -} - - -theology_3011_a_success_effect = { - if = { - limit = { NOT = { has_relation_friend = scope:believer } } - set_relation_friend = { reason = friend_convinced_merchants_to_invest_in_church target = scope:believer } - } - add_learning_lifestyle_xp = minor_lifestyle_xp - scope:temple_county = { - if = { - limit = { - has_building = temple_01 - } - add_building = temple_02 - } - else_if = { - limit = { - has_building = temple_02 - } - add_building = temple_03 - } - else_if = { - limit = { - has_building = temple_03 - } - add_building = temple_04 - } - } -} - -theology_3011_a_failure_effect = { - scope:temple_county = { - county = { #temple_county is in fact not a county but a province. - add_county_modifier = { - modifier = modifier_dusgruntled_church - years = 25 - } - } - } -} - -theology_3021_a_success_effect = { - if = { - limit = { - exists = scope:believer - NOT = { has_relation_friend = scope:believer } - } - set_relation_friend = { reason = friend_wrote_letter_together target = scope:believer } - } - add_learning_lifestyle_xp = minor_lifestyle_xp - scope:compliment_receiver = { - add_opinion = { - target = root - modifier = respect_opinion - opinion = 20 - } - } -} - -theology_3021_a_failure_effect = { - scope:compliment_receiver = { - add_opinion = { - target = root - modifier = respect_opinion - opinion = -10 - } - } - if = { - limit = { ai_zeal >= 0 } - stress_impact = { - base = minor_stress_impact_gain - zealous = minor_stress_impact_gain - } - } -} - - -learning_theology_3021_outcome_effect = { - if = { - limit = { - exists = scope:believer - has_relation_friend = scope:believer - } - show_as_tooltip = { theology_3021_a_success_effect = yes } - } - else = { - random_list = { - 1 = { - desc = diplomacy_majesty.0004.success.tt - show_chance = no - show_as_tooltip = { theology_3021_a_success_effect = yes } - } - 1 = { - desc = diplomacy_majesty.0004.neutral.tt - show_chance = no - show_as_tooltip = { - add_diplomacy_lifestyle_xp = minor_lifestyle_xp - } - } - 1 = { - desc = diplomacy_majesty.0004.failure.tt - show_chance = no - show_as_tooltip = { theology_3021_a_failure_effect = yes } - } - } - } - - hidden_effect = { - if = { - limit = { - exists = scope:compliment_outcome - scope:compliment_outcome = flag:good - } - trigger_event = { id = learning_theology.3022 days = { 7 14 } } - } - - else_if = { - limit = { - exists = scope:compliment_outcome - scope:compliment_outcome = flag:neutral - } - trigger_event = { id = learning_theology.3023 days = { 7 14 } } - } - - else_if = { - limit = { - exists = scope:compliment_outcome - scope:compliment_outcome = flag:bad - } - trigger_event = { id = learning_theology.3024 days = { 7 14 } } - } - } -} diff --git a/N3OW/common/scripted_effects/00_lifestyle_focus_effects.txt b/N3OW/common/scripted_effects/00_lifestyle_focus_effects.txt deleted file mode 100644 index 56659583..00000000 --- a/N3OW/common/scripted_effects/00_lifestyle_focus_effects.txt +++ /dev/null @@ -1,1066 +0,0 @@ -#Effects used in Lifestyle Focus events - - -##################################################################### -# EFFECT LIST -##################################################################### -# !!! Remember to add all new effects with a short description here !!! - -#LIFESTYLE FRIEND EFFECTS -# save_potential_lifestyle_friend_effect - - -#SECONDARY LIFESTYLE EFFECTS -# reveler_lifestyle_rank_up_check_effect -# hunter_lifestyle_rank_up_check_effect -# hunter_progress_point_gain_effect -# physician_lifestyle_rank_up_effect -# mystic_lifestyle_rank_up_effect -# ai_mystic_lifestyle_rank_up_effect - -###################################################################### - - -####################### -# LIFESTYLE FRIEND EFFECTS -####################### - -#Needs FOCUS and SCOPE_NAME -potential_lifestyle_friend_saving_effect = { - hidden_effect = { - save_temporary_scope_as = friend_checker - save_temporary_scope_value_as = { - name = friend_saving_focus - value = flag:$FOCUS$ - } - - #PLAYERS - if = { - limit = { is_ai = no } - - #Add major characters to list - get_characters_of_major_interest_effect = { LISTNAME = lifestyle_friend_list } - - #Step 1: Add characters of minor interest - if = { - limit = { - any_in_list = { - list = lifestyle_friend_list - potential_lifestyle_friend_availability_trigger = { CHARACTER = scope:friend_checker FOCUS = $FOCUS$ } - count = 0 - } - } - - - get_characters_of_minor_interest_effect = { LISTNAME = lifestyle_friend_list } - } - - #Step 2: Randomize if we now have someone suitable - if = { - limit = { - any_in_list = { - list = lifestyle_friend_list - potential_lifestyle_friend_availability_trigger = { CHARACTER = scope:friend_checker FOCUS = $FOCUS$ } - } - } - #Randomize! - random_in_list = { - list = lifestyle_friend_list - limit = { potential_lifestyle_friend_availability_trigger = { CHARACTER = scope:friend_checker FOCUS = $FOCUS$ } } - weight = { - base = 1 - modifier = { - add = $FOCUS$_friend_points - } - modifier = { - has_relation_potential_friend = scope:friend_checker - add = 10 - } - opinion_modifier = { - opinion_target = scope:friend_checker - multiplier = 0.2 - } - } - if = { - limit = { is_ruler = yes } - set_focus = $FOCUS$ - } - save_scope_as = $SCOPE_NAME$ - } - } - #Step 3: Ok, there still was none. Try to force someone to switch focus - else = { - random_in_list = { - list = lifestyle_friend_list - limit = { - is_ruler = yes - opinion = { - target = scope:friend_checker - value >= 0 - } - this != root - trigger_if = { - limit = { - scope:friend_saving_focus = flag:diplomacy_foreign_affairs_focus - scope:friend_saving_focus = flag:diplomacy_majesty_focus - scope:friend_saving_focus = flag:diplomacy_family_focus - } - diplomacy >= decent_skill_rating - } - trigger_else_if = { - limit = { - scope:friend_saving_focus = flag:martial_strategy_focus - scope:friend_saving_focus = flag:martial_authority_focus - } - martial >= decent_skill_rating - } - trigger_else_if = { - limit = { - scope:friend_saving_focus = flag:martial_chivalry_focus - } - prowess >= decent_skill_rating - } - trigger_else_if = { - limit = { - scope:friend_saving_focus = flag:stewardship_wealth_focus - scope:friend_saving_focus = flag:stewardship_domain_focus - scope:friend_saving_focus = flag:stewardship_duty_focus - } - stewardship >= decent_skill_rating - } - trigger_else_if = { - limit = { - scope:friend_saving_focus = flag:intrigue_skulduggery_focus - scope:friend_saving_focus = flag:intrigue_temptation_focus - scope:friend_saving_focus = flag:intrigue_intimidation_focus - } - intrigue >= decent_skill_rating - } - trigger_else_if = { - limit = { - scope:friend_saving_focus = flag:learning_medicine_focus - scope:friend_saving_focus = flag:learning_scholarship_focus - scope:friend_saving_focus = flag:learning_theology_focus - } - learning >= decent_skill_rating - } - # making the default behavior explicit if no other trigger_(else_)ifs are valid - trigger_else = { - always = yes - } - } - weight = { - base = 1 - modifier = { - has_relation_potential_friend = scope:friend_checker - add = 10 - } - opinion_modifier = { - opinion_target = scope:friend_checker - multiplier = 0.2 - } - } - set_focus = $FOCUS$ - save_scope_as = $SCOPE_NAME$ - } - } - } - - #AI - else = { - every_vassal = { - limit = { potential_lifestyle_friend_availability_trigger = { CHARACTER = scope:friend_checker FOCUS = $FOCUS$ } } - add_to_temporary_list = lifestyle_friend_list - } - every_liege_or_above = { - limit = { potential_lifestyle_friend_availability_trigger = { CHARACTER = scope:friend_checker FOCUS = $FOCUS$ } } - add_to_temporary_list = lifestyle_friend_list - } - every_courtier = { - limit = { potential_lifestyle_friend_availability_trigger = { CHARACTER = scope:friend_checker FOCUS = $FOCUS$ } } - add_to_temporary_list = lifestyle_friend_list - } - random_in_list = { - list = lifestyle_friend_list - save_scope_as = $SCOPE_NAME$ - } - } - - #FALLBACK GENERATION - if = { - limit = { NOT = { exists = scope:$SCOPE_NAME$ } } - - if = { - limit = { exists = scope:friend_checker.capital_province } - create_character = { - location = scope:friend_checker.capital_province - template = $FOCUS$_friend_template - save_scope_as = $SCOPE_NAME$ - after_creation = { - add_character_flag = created - } - } - } - else = { - create_character = { - location = scope:friend_checker.location - template = $FOCUS$_friend_template - save_scope_as = $SCOPE_NAME$ - after_creation = { - add_character_flag = created - } - } - } - scope:$SCOPE_NAME$ = { visit_court_of = scope:friend_checker } - } - } -} - - -######################## -# SECONDARY LIFESTYLE EFFECTS -######################## -#Reveler (gained by feasts) -reveler_points_gain_effect = { - if = { - limit = { NOT = { has_variable = reveler_lifestyle_progress } } - set_variable = { - name = reveler_lifestyle_progress - value = $CHANGE$ - } - } - else = { - change_variable = { - name = reveler_lifestyle_progress - add = $CHANGE$ - } - } - #Random chance of additional increase to increase unpredictability - random = { - chance = 50 - change_variable = { - name = reveler_lifestyle_progress - add = $RANDOM_CHANGE$ - } - } - #Extra Random chance with the Festivities Tradition - if = { - limit = { - culture = { has_cultural_parameter = reveler_traits_more_common } - } - random = { - chance = 75 - change_variable = { - name = reveler_lifestyle_progress - add = 1 - } - } - } -} - -reveler_lifestyle_rank_up_check_effect = { - if = { - limit = { - NOT = { has_trait = lifestyle_reveler } - } - random = { - chance = 15 - modifier = { - add = -10 - faith = { trait_is_sin = lifestyle_reveler } - } - modifier = { - add = -10 - has_trait = temperate - } - modifier = { - add = -10 - has_trait = inappetetic - } - modifier = { - add = 10 - culture = { has_cultural_parameter = reveler_traits_more_valued } - } - modifier = { - add = 5 - has_trait = gluttonous - } - modifier = { - add = 5 - has_trait = drunkard - } - modifier = { - add = 5 - has_trait = comfort_eater - } - modifier = { - add = 15 - exists = var:reveler_lifestyle_progress - var:reveler_lifestyle_progress >= reveler_rank_up_3_threshold - } - modifier = { - add = 15 - exists = var:reveler_lifestyle_progress - var:reveler_lifestyle_progress >= reveler_rank_up_2_threshold - } - modifier = { - add = 15 - exists = var:reveler_lifestyle_progress - var:reveler_lifestyle_progress >= reveler_rank_up_1_threshold - } - trigger_event = feast.0050 - show_as_tooltip = { - add_trait = lifestyle_reveler - } - } - } - else = { - if = { - limit = { - NOT = { has_trait = lifestyle_reveler } - exists = var:reveler_lifestyle_progress - var:reveler_lifestyle_progress >= reveler_rank_up_3_threshold - } - add_trait_xp = { - trait = lifestyle_reveler - value = 10 - } - } - else_if = { - limit = { - exists = var:reveler_lifestyle_progress - var:reveler_lifestyle_progress >= reveler_rank_up_2_threshold - } - add_trait_xp = { - trait = lifestyle_reveler - value = 5 - } - } - else_if = { - limit = { - exists = var:reveler_lifestyle_progress - var:reveler_lifestyle_progress >= reveler_rank_up_1_threshold - } - add_trait_xp = { - trait = lifestyle_reveler - value = 3 - } - } - else = { - add_trait_xp = { - trait = lifestyle_reveler - value = 1 - } - } - set_variable = { - name = reveler_lifestyle_progress - value = 0 - } - } -} - -#Hunter (gained by hunting) -hunter_progress_point_gain_effect = { - if = { - limit = { is_alive = yes } - if = { - limit = { - NOT = { exists = var:hunter_lifestyle_progress } - } - set_variable = { - name = hunter_lifestyle_progress - value = $CHANGE$ - } - } - else = { - change_variable = { - name = hunter_lifestyle_progress - add = $CHANGE$ - } - } - save_scope_value_as = { - name = hunt_base_increase - value = $CHANGE$ - } - # Tooltips - if = { - limit = { scope:hunt_base_increase <= 1 } - custom_tooltip = hunt_progress_towards_trait_1_tt - } - else_if = { - limit = { scope:hunt_base_increase = 2 } - custom_tooltip = hunt_progress_towards_trait_2_tt - } - else = { custom_tooltip = hunt_progress_towards_trait_3_tt } - #Random chance of additional point to increase unpredictability - hidden_effect = { - random = { - chance = 50 - change_variable = { - name = hunter_lifestyle_progress - add = $RANDOM_CHANGE$ - } - } - } - #Extra Random chance with the Hunters Tradition - if = { - limit = { - culture = { has_cultural_parameter = hunting_traits_more_common } - involved_activity = { - NOT = { - has_activity_option = { category = special_type option = hunt_type_falconry } - } - } - } - random = { - chance = 75 - change_variable = { - name = hunter_lifestyle_progress - add = 1 - } - } - } - else_if = { - limit = { - culture = { has_cultural_parameter = falconer_traits_more_common } - involved_activity = { - has_activity_option = { category = special_type option = hunt_type_falconry } - } - } - random = { - chance = 75 - change_variable = { - name = hunter_lifestyle_progress - add = 1 - } - } - } - } -} - -hunter_lifestyle_rank_up_check_effect = { - save_scope_value_as = { - name = falconry - value = $FALCONRY$ - } - if = { - limit = { - is_alive = yes - NOT = { has_trait = lifestyle_hunter } - exists = var:hunter_lifestyle_progress - } - add_trait = lifestyle_hunter - } - else_if = { # To show host trait gain for guests - limit = { - is_alive = yes - exists = var:hunter_lifestyle_progress - NOT = { has_character_flag = host_existing_hunter } - } - add_trait_force_tooltip = lifestyle_hunter - } - if = { - limit = { - is_alive = yes - exists = var:hunter_lifestyle_progress - has_trait = lifestyle_hunter - scope:falconry = yes - } - send_interface_toast = { - title = hunter_xp_gain_message - if = { - limit = { var:hunter_lifestyle_progress >= hunter_rank_up_3_threshold } - add_trait_xp = { - trait = lifestyle_hunter - track = falconer - value = 15 - } - } - else_if = { - limit = { var:hunter_lifestyle_progress >= hunter_rank_up_2_threshold } - add_trait_xp = { - trait = lifestyle_hunter - track = falconer - value = 10 - } - } - else_if = { - limit = { var:hunter_lifestyle_progress >= hunter_rank_up_1_threshold } - add_trait_xp = { - trait = lifestyle_hunter - track = falconer - value = 5 - } - } - else = { - add_trait_xp = { - trait = lifestyle_hunter - track = falconer - value = 3 - } - } - } - } - else_if = { - limit = { - is_alive = yes - exists = var:hunter_lifestyle_progress - has_trait = lifestyle_hunter - } - send_interface_toast = { - title = hunter_xp_gain_message - if = { - limit = { var:hunter_lifestyle_progress >= hunter_rank_up_3_threshold } - add_trait_xp = { - trait = lifestyle_hunter - track = hunter - value = 15 - } - } - else_if = { - limit = { var:hunter_lifestyle_progress >= hunter_rank_up_2_threshold } - add_trait_xp = { - trait = lifestyle_hunter - track = hunter - value = 10 - } - } - else_if = { - limit = { var:hunter_lifestyle_progress >= hunter_rank_up_1_threshold } - add_trait_xp = { - trait = lifestyle_hunter - track = hunter - value = 5 - } - } - else = { - add_trait_xp = { - trait = lifestyle_hunter - track = hunter - value = 3 - } - } - } - } - set_variable = { - name = hunter_lifestyle_progress - value = 0 - } -} - -#Physician (for AI, gained through treatment events) -physician_lifestyle_rank_up_effect = { - if = { - limit = { - NOT = { has_trait = lifestyle_physician } - } - add_trait = lifestyle_physician - } - else_if = { - limit = { - has_trait_xp = { - trait = lifestyle_physician - value < 100 - } - } - add_trait_xp = { - trait = lifestyle_physician - value = 10 - } - } -} - - -#Blademaster (for AI, gained through knight events) -blademaster_lifestyle_rank_up_effect = { - if = { - limit = { - NOT = { has_trait = lifestyle_blademaster } - } - add_trait = lifestyle_blademaster - } - else_if = { - limit = { - has_trait_xp = { - trait = lifestyle_blademaster - value < 100 - } - } - add_trait_xp = { - trait = lifestyle_blademaster - value = 10 - } - } -} - -# Mystic -mystic_lifestyle_rank_up_effect = { - if = { - limit = { - NOT = { has_trait = lifestyle_mystic } - } - add_trait = lifestyle_mystic - } - else = { - add_trait_xp = { - trait = lifestyle_mystic - value = 10 - } - } -} - -mystic_lifestyle_point_gain_effect = { - # Expects VALUE - - # Tooltip stuff first: - show_as_tooltip = { - if = { - limit = { # No further rank ups if you're already at max - NAND = { - has_trait = lifestyle_mystic - has_trait_xp = { - trait = lifestyle_mystic - value >= 100 - } - } - exists = var:mystic_lifestyle_progress # This assumes you can never progress the lifestyle on the first point gain - } - # Show rank-up tooltip if relevant - if = { - limit = { - has_trait = lifestyle_mystic - has_trait_xp = { - trait = lifestyle_mystic - value >= 100 - } - } - set_local_variable = { - name = mystic_check_tooltip_value - value = mystic_second_rank_up_threshold - } - } - else = { - set_local_variable = { - name = mystic_check_tooltip_value - value = mystic_first_rank_up_threshold - } - } - change_local_variable = { - name = mystic_check_tooltip_value - subtract = $VALUE$ - } - if = { - limit = { - trigger_if = { # If Mystic 2, use the higher threshold - limit = { - AND = { - has_trait = lifestyle_mystic - has_trait_xp = { - trait = lifestyle_mystic - value >= 50 - } - has_trait_xp = { - trait = lifestyle_mystic - value < 100 - } - } - } - var:mystic_lifestyle_progress >= local_var:mystic_check_tooltip_value - } - trigger_else = { - var:mystic_lifestyle_progress >= mystic_first_rank_up_threshold - } - } - mystic_lifestyle_rank_up_effect = yes - } - } - } - # Actually run the lifestyle experience/rank-up gain effect: - hidden_effect = { - if = { - limit = { # No further rank ups if you're already at max - NAND = { - has_trait = lifestyle_mystic - has_trait_xp = { - trait = lifestyle_mystic - value >= 100 - } - } - } - if = { - limit = { - NOT = { exists = var:mystic_lifestyle_progress } - } - set_variable = { - name = mystic_lifestyle_progress - value = $VALUE$ - } - } - else = { - change_variable = { - name = mystic_lifestyle_progress - add = $VALUE$ - } - } - - # Rank up if relevant - if = { - limit = { - trigger_if = { # If Mystic 2, use the higher threshold - limit = { - has_trait = lifestyle_mystic - has_trait_xp = { - trait = lifestyle_mystic - value >= 50 - } - } - var:mystic_lifestyle_progress >= mystic_second_rank_up_threshold - } - trigger_else = { - var:mystic_lifestyle_progress >= mystic_first_rank_up_threshold - } - } - mystic_lifestyle_rank_up_effect = yes - # Remove the variable if you reach max rank - if = { - limit = { - has_trait = lifestyle_mystic - has_trait_xp = { - trait = lifestyle_mystic - value >= 100 - } - } - remove_variable = mystic_lifestyle_progress - } - # Set the variable back to 0 if you've ranked up - else = { - set_variable = { - name = mystic_lifestyle_progress - value = 0 - } - } - } - } - } -} - -mystical_communion_outcome_effect = { - # Limited to 2 effect lines due to showing up in a toast - add_learning_lifestyle_xp = major_lifestyle_xp - add_character_modifier = { - modifier = divine_guidance_modifier - years = 5 - } - if = { - limit = { - has_trait = lifestyle_mystic - } - add_trait_xp = { - trait = lifestyle_mystic - value = lifestyle_mystic_xp_gain_minor_value - } - } -} - -#Mystic (for AI, gained through treatment events) -ai_mystic_lifestyle_rank_up_effect = { - if = { - limit = { - NOT = { has_trait = lifestyle_mystic } - } - add_trait = lifestyle_mystic - } - else = { - add_trait_xp = { - trait = lifestyle_mystic - value = 10 - } - } -} - -# Remove all perk-unlocked traits when resetting -remove_all_perk_lifestyle_traits_effect = { - if = { - limit = { - has_trait = diplomat - } - remove_trait = diplomat - } - if = { - limit = { - has_trait = family_first - } - remove_trait = family_first - } - if = { - limit = { - has_trait = august - } - remove_trait = august - } - if = { - limit = { - has_trait = strategist - } - remove_trait = strategist - } - if = { - limit = { - has_trait = overseer - } - remove_trait = overseer - } - if = { - limit = { - has_trait = gallant - } - remove_trait = gallant - } - if = { - limit = { - has_trait = architect - } - remove_trait = architect - } - if = { - limit = { - has_trait = administrator - } - remove_trait = administrator - } - if = { - limit = { - has_trait = avaricious - } - remove_trait = avaricious - } - if = { - limit = { - has_trait = schemer - } - remove_trait = schemer - } - if = { - limit = { - has_trait = seducer - } - remove_trait = seducer - } - if = { - limit = { - has_trait = torturer - } - remove_trait = torturer - } - if = { - limit = { - has_trait = whole_of_body - } - remove_trait = whole_of_body - } - if = { - limit = { - has_trait = scholar - } - remove_trait = scholar - } - if = { - limit = { - has_trait = theologian - } - remove_trait = theologian - } - if = { - limit = { - has_trait = lifestyle_surveyor - } - remove_trait = lifestyle_surveyor - } - if = { - limit = { - has_trait = lifestyle_wayfarer - } - remove_trait = lifestyle_wayfarer - } - if = { - limit = { - has_trait = lifestyle_voyager - } - remove_trait = lifestyle_voyager - } - hidden_effect = { - set_absolute_country_control = no - } -} - -#If you don't have a lifestyle focus, this will yield xp in a random lifestyle -##Takes the amount of _lifestyle_xp you want to hand out as an argument, from the scripted values -add_focused_lifestyle_xp_effect = { - if = { - limit = { has_lifestyle = diplomacy_lifestyle } - add_diplomacy_lifestyle_xp = $AMOUNT$_lifestyle_xp - } - else_if = { - limit = { has_lifestyle = martial_lifestyle } - add_martial_lifestyle_xp = $AMOUNT$_lifestyle_xp - } - else_if = { - limit = { has_lifestyle = stewardship_lifestyle } - add_stewardship_lifestyle_xp = $AMOUNT$_lifestyle_xp - } - else_if = { - limit = { has_lifestyle = intrigue_lifestyle } - add_intrigue_lifestyle_xp = $AMOUNT$_lifestyle_xp - } - else_if = { - limit = { has_lifestyle = learning_lifestyle } - add_learning_lifestyle_xp = $AMOUNT$_lifestyle_xp - } - else_if = { - limit = { has_lifestyle = wanderer_lifestyle } - add_wanderer_lifestyle_xp = $AMOUNT$_lifestyle_xp - } - else = { - random_list = { - 10 = { add_diplomacy_lifestyle_xp = $AMOUNT$_lifestyle_xp } - 10 = { add_martial_lifestyle_xp = $AMOUNT$_lifestyle_xp } - 10 = { add_stewardship_lifestyle_xp = $AMOUNT$_lifestyle_xp } - 10 = { add_intrigue_lifestyle_xp = $AMOUNT$_lifestyle_xp } - 10 = { add_learning_lifestyle_xp = $AMOUNT$_lifestyle_xp } - # Excludes wanderer since it's picked less often - } - } -} - -ai_chance_to_switch_to_travel_focus_effect = { - if = { - limit = { - is_ai = yes - is_adult = yes - is_at_war = no - is_landed = yes - has_bp3_dlc_trigger = yes - gold >= minor_gold_value - highest_held_title_tier >= tier_county - has_completed_one_tree_in_current_lifestyle_trigger = yes - NOR = { - has_focus = wanderer_internal_affairs_focus - has_focus = wanderer_journey_focus - has_focus = wanderer_destination_focus - has_trait = reclusive - is_incapable = yes - has_character_modifier = isolating_modifier - } - } - random = { - chance = { - value = 5 - if = { - limit = { - has_completed_current_lifestyle_trigger = yes # No good reason to stick with your lifestyle - } - add = 75 - } - if = { - limit = { - has_trait_xp = { - trait = lifestyle_traveler - track = travel - value >= 25 - } - } - add = 20 - } - if = { - limit = { - has_trait_xp = { - trait = lifestyle_traveler - track = travel - value >= 50 - } - } - add = 20 - } - if = { # Busy doing.. other things - limit = { - has_focus = intrigue_temptation_focus - } - add = -20 - } - if = { # Wants to get away - limit = { - has_trait = shy - } - add = { - value = root.perk_points_assigned - multiply = 3 - } - } - if = { # Very stressed - limit = { - stress >= 150 - } - add = { - value = root.perk_points_assigned - multiply = 3 - } - } - if = { # Has an adventurous sort of personality - limit = { - ai_sociability >= 50 - ai_boldness >= 0 - } - add = { - value = root.perk_points_assigned - multiply = 3 - } - } - } - random_list = { - 1 = { # Stewards and realm-focused character - modifier = { - add = 99 - OR = { - ai_has_economical_boom_personality = yes - has_focus_stewardship = yes - has_trait = greedy - } - } - set_focus = wanderer_internal_affairs_focus - } - 1 = { # Stressed or asocial characters - modifier = { - add = 99 - OR = { - stress >= 50 - ai_sociability <= -25 - } - NOT = { - has_trait = impatient - } - } - modifier = { - add = 100 - stress >= 150 - NOT = { - has_trait = impatient - } - } - set_focus = wanderer_journey_focus - } - 1 = { # Learning focused self-improvement characters - modifier = { - add = 99 - OR = { - has_focus_learning = yes - has_trait = impatient - has_trait = ambitious - } - } - set_focus = wanderer_destination_focus - } - } - } - } -} - diff --git a/N3OW/common/scripted_effects/00_lover_effects.txt b/N3OW/common/scripted_effects/00_lover_effects.txt deleted file mode 100644 index d3850902..00000000 --- a/N3OW/common/scripted_effects/00_lover_effects.txt +++ /dev/null @@ -1,148 +0,0 @@ - -##################################################################### -# EFFECT LIST -##################################################################### -# !!! Remember to add all new effects with a short description here !!! - - -##################################################################### -# EFFECTS -##################################################################### - - -lover_breakup_rivalry_chance_effect = { - random = { - chance = 1 - compare_modifier = { - value = ai_vengefulness - multiplier = 0.5 - } - modifier = { - add = 25 - scope:breaker = { - any_secret = { - type = secret_lover - secret_target != scope:lover - is_known_by = scope:lover - } - } - } - modifier = { - add = 20 - has_trait = paranoid - } - modifier = { - add = 15 - has_trait = stubborn - } - - scope:breaker = { - every_consort = { - limit = { - this != scope:lover - NOR = { - has_relation_rival = scope:lover - has_relation_friend = scope:lover - } - } - add_to_list = other_lovers - } - every_relation = { - type = lover - limit = { - this != scope:lover - NOR = { - has_relation_rival = scope:lover - has_relation_friend = scope:lover - } - } - add_to_list = other_lovers - } - } - random_in_list = { - list = other_lovers - weight = { - base = 1 - #More likely to pick another known Lover - modifier = { - add = 3 - has_relation_lover = scope:breaker - save_temporary_scope_as = lover_check - scope:breaker = { - OR = { - NOT = { - any_secret = { - type = secret_lover - secret_target = scope:lover_check - NOT = { is_known_by = scope:lover } - } - } - any_secret = { - type = secret_lover - secret_target = scope:lover_check - is_known_by = scope:lover - } - } - } - } - } - save_scope_as = other_lover - } - } -} - - -remove_lover_or_soulmate_relation_effect = { - if = { - limit = { has_relation_soulmate = $CHARACTER$ } - remove_relation_soulmate = $CHARACTER$ - } - else_if = { - limit = { has_relation_lover = $CHARACTER$ } - remove_relation_lover = $CHARACTER$ - } -} - -lover_breakup_effect = { - $BREAKER$ = { - save_scope_as = breaker - } - $LOVER$ = { - save_scope_as = lover - } - - show_as_tooltip = { - $BREAKER$ = { - remove_lover_or_soulmate_relation_effect = { CHARACTER = $LOVER$ } - } - $LOVER$ = { - add_opinion = { - target = $BREAKER$ - modifier = lover_breakup_opinion - } - } - } - - hidden_effect = { - $LOVER$ = { - if = { - limit = { - is_consort_of = $BREAKER$ - } - trigger_event = lover.0202 #Spouse breakup - } - else_if = { - limit = { - opinion = { - target = $BREAKER$ - value > 0 - } - } - trigger_event = lover.0201 #Normal - } - else = { - trigger_event = lover.0203 #Relieved - } - } - } -} \ No newline at end of file diff --git a/N3OW/common/scripted_effects/00_major_decisions_scripted_effects_2.txt b/N3OW/common/scripted_effects/00_major_decisions_scripted_effects_2.txt deleted file mode 100644 index 266c5c0d..00000000 --- a/N3OW/common/scripted_effects/00_major_decisions_scripted_effects_2.txt +++ /dev/null @@ -1,326 +0,0 @@ -defenders_of_highgod_decision_hall_of_heroes_effect = { - set_variable = { - name = hall_of_heroes - value = yes - } - if = { - limit = { - has_special_building_slot = no - } - add_special_building_slot = hall_of_heroes_01 - } - add_special_building = hall_of_heroes_01 -} - -defenders_of_highgod_decision_effects = { - #Holy site building - #if = { - # limit = { - # faith = { - # any_holy_site = { - # count = 1 - # county.holder = root - # } - # } - # } - # faith = { - # every_holy_site = { - # limit = { county.holder = root } - # county.title_province = { defenders_of_highgod_decision_hall_of_heroes_effect = yes } - # } - # } - #} - if = { #The scope has been saved before this effect is run - limit = { exists = scope:holy_site } - scope:holy_site = { county.title_province = { defenders_of_highgod_decision_hall_of_heroes_effect = yes } } - } - else = { - faith = { - every_holy_site = { - county.title_province = { - add_to_list = every_holy_site_province - } - } - } - - show_as_tooltip = { - every_in_list = { - list = every_holy_site_province - custom = defenders_of_highgod_decision_effects_holy_site_of_choice - defenders_of_highgod_decision_hall_of_heroes_effect = yes - } - } - } - - #Fervor, modifiers and holy_warrior traits - faith = { - save_scope_as = highgod_faith_scope - change_fervor = { - value = medium_fervor_value - desc = fervor_gain_defenders_of_highgod - } - } - add_character_modifier = { - modifier = defender_of_the_faith - } - - if = { - limit = { number_of_commander_traits < commander_trait_limit } - add_trait = holy_warrior - } - - custom_tooltip = defenders_of_highgod_decision_effects_holy_warriors_tt - hidden_effect = { - every_vassal_or_below = { - add_to_list = warriors - } - every_courtier = { - add_to_list = warriors - } - every_in_list = { - list = warriors - limit = { - is_adult = yes - is_ai = yes - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } - number_of_commander_traits < commander_trait_limit - faith = root.faith - } - random = { - chance = 50 - add_trait = holy_warrior - } - } - } -} - -strengthen_bloodline_decision_effects = { - dynasty = { - add_dynasty_modifier = { - modifier = strong_blood - } - } -} - -dynasty_of_many_crowns_effects = { - if = { - limit = { - NOT = { - has_character_flag = dyn_many_crown_leg - } - } - add_character_flag = dyn_many_crown_leg - } - if = { - limit = { - domicile ?= { - has_domicile_building_or_higher = renown_gain_yurt_01 - } - } - if = { - limit = { - domicile ?= { - has_domicile_parameter = nomad_yurt_dynasty_many_crowns_bonus - } - } - every_dynasty_member = { - limit = { - government_has_flag = government_is_nomadic - primary_title ?= { - tier >= tier_kingdom - } - } - domicile ?= { - change_herd = { - value = 1000 - multiply = prev.primary_title.tier - } - } - } - } - if = { - limit = { - domicile ?= { - has_domicile_parameter = nomad_yurt_dynasty_many_khans - } - } - dynasty = { - add_dynasty_modifier = { - modifier = dynasty_of_many_crowns_nomad - } - } - } - - } - dynasty = { - add_dynasty_modifier = { - modifier = dynasty_of_many_crowns - } - add_dynasty_prestige = monumental_dynasty_prestige_gain - } -} - -appoint_a_righteous_caliph_scripted_effect = { - # Create a HoF title & assign it appropriately. - hidden_effect = { - # Are we Muwalladis? - if = { - limit = { faith = faith:muwalladi } - # Transfer the title. - create_title_and_vassal_change = { - type = created - save_scope_as = change - add_claim_on_loss = no - } - title:d_muwalladi = { - change_title_holder = { - holder = scope:founder - change = scope:change - } - } - resolve_title_and_vassal_change = scope:change - # Set up the remaining bits'n'bobs. - if = { - limit = { - NOT = { has_realm_law = same_faith_succession_law } - } - add_realm_law_skip_effects = same_faith_succession_law - } - title:d_muwalladi = { add_title_law = temporal_head_of_faith_succession_law } - # Make it the HoF head. - faith = { set_religious_head_title = title:d_muwalladi } - } - # If not, follow the usual flow. - else = { - set_up_dynamic_temporal_hof_title_effect = { NEW_HOLDER = scope:founder } - faith = { set_religious_head_title = scope:new_title } - } - } - custom_tooltip = appoint_a_righteous_caliph_decision.tt.you_become_caliph - # Give scope:founder an extra piety level, if possible. - if = { - limit = { piety_level < max_piety_level } - add_piety_level = 1 - } - # Try to scope:founder rivals with scope:old_caliph. - if = { - limit = { - can_set_relation_rival_trigger = { CHARACTER = scope:old_caliph } - } - set_relation_rival = { - target = scope:old_caliph - reason = rival_old_caliph_new_caliph - } - } - # If you've pulled a fast one on your HoF, they see through it. - if = { - limit = { has_character_flag = wishes_to_schism_caliphate_flag } - scope:old_caliph = { - remove_opinion = { - target = scope:founder - modifier = repentant_opinion - } - } - remove_hook = { - target = scope:old_caliph - type = indebted_hook - } - } - # And sort a bit of stress impact for the gravity of things. - stress_impact = { - base = major_stress_impact_gain - humble = major_stress_impact_gain - arrogant = medium_stress_impact_loss - } -} - -mozarabic_bind_the_faith_to_rome_decision_fundamentalist_path_scripted_effect = { - # Set the doctrinal alterations. - faith = { - # First, we remove the Rite tenet & replace it with Pursuit of Power. - remove_doctrine = tenet_rite - add_doctrine = tenet_pursuit_of_power - # Then we switch on over from Pluralist to Fundamentalist. - remove_doctrine = doctrine_pluralism_pluralistic - add_doctrine = doctrine_pluralism_fundamentalist - } -} - -mozarabic_bind_the_faith_to_rome_decision_righteous_path_scripted_effect = { - # Set the doctrinal alterations. - faith = { - # First, we remove the Rite tenet & replace it with Communal Identity. - remove_doctrine = tenet_rite - add_doctrine = tenet_communal_identity - # Then, we switch on over from Pluralist to Righteous so that we're actually receiving a net bonus. - remove_doctrine = doctrine_pluralism_pluralistic - add_doctrine = doctrine_pluralism_righteous - } -} - -mozarabic_bind_the_faith_to_rome_decision_pluralist_path_scripted_effect = { - # Set the doctrinal alterations. - faith = { - # First, we remove the Rite tenet & replace it with Religious Law. - remove_doctrine = tenet_rite - add_doctrine = tenet_religious_legal_pronouncements - # Then, since we're staying pluralist, we make the court chaplain fireable (since you're now really into the nitty-gritty of canon law). - remove_doctrine = doctrine_clerical_succession_spiritual_fixed_appointment - add_doctrine = doctrine_clerical_succession_spiritual_appointment - } -} - -mozarabic_break_with_rome_decision_hof_and_ecumenism_processing_scripted_effect = { - # Sort the HoF situation. - hidden_effect = { - # Create & swap-in the title. - set_up_dynamic_spiritual_hof_title_effect = { CREATOR = scope:religious_leader } - # & send out some visual notifications. - every_player = { - limit = { faith = scope:religious_leader.faith } - send_interface_toast = { - title = mozarabic_break_with_rome_decision.tt.new_hof_id - left_icon = scope:religious_leader.faith.religious_head - } - } - } - custom_tooltip = mozarabic_break_with_rome_decision.tt.you_gain_a_hof - # Remove ecumenism. - faith = { remove_doctrine = special_doctrine_ecumenical_christian} -} - -mozarabic_break_with_rome_decision_fundamentalist_path_scripted_effect = { - # Set the doctrinal alterations. - faith = { - # First, we remove the Rite tenet & replace it with Armed Pilgrimages. - remove_doctrine = tenet_rite - add_doctrine = tenet_armed_pilgrimages - # Then we switch on over from Pluralist to Fundamentalist. - remove_doctrine = doctrine_pluralism_pluralistic - add_doctrine = doctrine_pluralism_fundamentalist - } -} - -mozarabic_break_with_rome_decision_righteous_path_scripted_effect = { - # Set the doctrinal alterations. - faith = { - # First, we remove the Rite tenet & replace it with Pacifism. - remove_doctrine = tenet_rite - add_doctrine = tenet_pacifism - # Then, we switch on over from Pluralist to Righteous. - remove_doctrine = doctrine_pluralism_pluralistic - add_doctrine = doctrine_pluralism_righteous - } -} - -mozarabic_break_with_rome_decision_pluralist_path_scripted_effect = { - # Set the doctrinal alterations. - faith = { - # First, we remove the Rite tenet & replace it with Islamic Syncretism. - remove_doctrine = tenet_rite - add_doctrine = tenet_islamic_syncretism - # Then, since we're staying pluralist, we make the court chaplain fireable (since you've *really* localised power now). - remove_doctrine = doctrine_clerical_succession_spiritual_fixed_appointment - add_doctrine = doctrine_clerical_succession_temporal_appointment - } -} diff --git a/N3OW/common/scripted_effects/00_major_decisions_scripted_effects_3.txt b/N3OW/common/scripted_effects/00_major_decisions_scripted_effects_3.txt deleted file mode 100644 index 848c7fd3..00000000 --- a/N3OW/common/scripted_effects/00_major_decisions_scripted_effects_3.txt +++ /dev/null @@ -1,919 +0,0 @@ -take_stewardship_of_the_sacred_river_effect = { - give_nickname = nick_the_ladylord_of_the_ganges - add_piety_level = 1 - add_character_modifier = { - modifier = ruler_of_the_ganges_modifier - } - if = { - limit = { - exists = global_var:ruler_of_ganges - } - if = { - limit = { - NOT = { faith = global_var:ruler_of_ganges.faith} - } - faith = { - save_scope_as = ganges_faith - change_fervor = { - value = major_fervor_gain - desc = fervor_gain_stewardship_of_sacred_rivers - } - } - } - if = { - limit = { - global_var:ruler_of_ganges = { - is_alive = yes - } - } - show_as_tooltip = { - global_var:ruler_of_ganges = { - add_opinion = { - target = root - modifier = humbled_opinion - opinion = -40 - } - } - } - } - } - hidden_effect = { - set_global_variable = { - name = ruler_of_ganges - value = root - } - } -} - - -establish_bactrian_supremacy_effect = { - #Create the title and make it primary - create_title_and_vassal_change = { - type = created - save_scope_as = title_change - add_claim_on_loss = no - } - title:e_bactria = { - change_title_holder = { - holder = root - change = scope:title_change - } - } - resolve_title_and_vassal_change = scope:title_change - set_primary_title_to = title:e_bactria - - title:c_balkh = { - add_county_modifier = { - modifier = bactria_royal_tolls_modifier - } - } - - hidden_effect = { - every_held_title = { - title_tier = empire - limit = { - NOT = { this = title:e_bactria } - } - every_in_de_jure_hierarchy = { - continue = { - tier >= tier_kingdom - } - limit = { - tier = tier_kingdom - OR = { - holder = root - holder = { target_is_liege_or_above = root } - } - NOT = { is_in_list = new_de_jure_kingdoms } - } - add_to_list = new_de_jure_kingdoms - } - add_to_list = empire_for_destruction - } - - every_held_title = { - title_tier = kingdom - limit = { - NOT = { is_in_list = new_de_jure_kingdoms } - } - add_to_list = new_de_jure_kingdoms - } - - title:k_kabulistan = { - if = { - limit = { - NOT = { is_in_list = new_de_jure_kingdoms } - } - add_to_list = new_de_jure_kingdoms - } - } - title:k_khorasan = { - if = { - limit = { - NOT = { is_in_list = new_de_jure_kingdoms } - } - add_to_list = new_de_jure_kingdoms - } - } - title:k_transoxiana = { - if = { - limit = { - NOT = { is_in_list = new_de_jure_kingdoms } - } - add_to_list = new_de_jure_kingdoms - } - } - every_in_list = { - list = new_de_jure_kingdoms - limit = { - trigger_if = { - limit = { - exists = this - root = { is_ai = yes } - exists = holder - } - NOR = { - holder.top_liege = { is_ai = no } - holder = { is_ai = no } - } - } - } - set_de_jure_liege_title = title:e_bactria - } - every_in_list = { - list = empire_for_destruction - limit = { - NOT = { this = title:e_bactria } #Just a little safeguarding - } - root = { - destroy_title = prev - } - } - - #Notifications for characters who hold land that is now claimed - title:e_bactria = { - every_in_de_jure_hierarchy = { - continue = { - tier >= tier_duchy - } - limit = { - holder ?= { - NOR = { - this = root - target_is_liege_or_above = root - } - } - } - holder = { - if = { - limit = { - NOT = { is_in_list = notification_sent } - } - add_to_temporary_list = notification_sent - trigger_event = central_asia.0013 - } - } - } - } - - every_vassal = { - limit = { - NOT = { - is_in_list = notification_sent - } - } - trigger_event = central_asia.0012 - } - } -} - -create_custom_duchy_effect = { - save_scope_as = root_scope - custom_tooltip = create_new_duchy - show_as_tooltip = { - primary_title = { - custom_tooltip = create_custom_duchy_de_jure_changes - } - } - - hidden_effect = { - save_scope_as = founder - primary_title = { - save_scope_as = old_title - } - - create_dynamic_title = { - tier = duchy - name = NEW_CREATED_TITLE_NAME - } - create_title_and_vassal_change = { - type = created - save_scope_as = change - add_claim_on_loss = no - } - - scope:new_title = { - change_title_holder = { - holder = root - change = scope:change - } - } - - resolve_title_and_vassal_change = scope:change - - scope:new_title = { - set_de_jure_liege_title = scope:old_title.kingdom - } - scope:old_title = { - set_de_jure_liege_title = scope:new_title - } - - scope:new_title = { - set_coa = scope:old_title - set_color_from_title = scope:old_title - set_capital_county = scope:old_title.title_capital_county - } - set_primary_title_to = scope:new_title - - trigger_event = major_decisions.1101 - } -} - -create_custom_kingdom_effect = { - custom_tooltip = create_new_kingdom - show_as_tooltip = { - every_held_title = { - custom = create_title_every_held_duchy - title_tier = duchy - custom_tooltip = create_custom_kingdom_de_jure_changes - } - } - - hidden_effect = { - save_scope_as = founder - primary_title = { - save_scope_as = old_title - } - - create_dynamic_title = { - tier = kingdom - name = NEW_CREATED_TITLE_NAME - } - create_title_and_vassal_change = { - type = created - save_scope_as = change - add_claim_on_loss = no - } - - scope:new_title = { - change_title_holder = { - holder = root - change = scope:change - } - } - - resolve_title_and_vassal_change = scope:change - - #Check if all territory is from a single Empire, and if so, make Kingdom de jure of that Empire - every_sub_realm_county = { - if = { - limit = { - exists = empire - } - empire = { - if = { - limit = { - NOT = { - is_in_list = potential_empires - } - } - add_to_list = potential_empires - } - } - } - } - if = { - limit = { - any_in_list = { - list = potential_empires - count > 0 - } - } - ordered_in_list = { - list = potential_empires - order_by = { - every_in_de_jure_hierarchy = { - continue = { - tier > tier_county - } - limit = { - tier = tier_county - holder.top_liege = root - } - add = 1 - } - } - position = 0 - save_scope_as = old_empire - } - } - if = { - limit = { - exists = scope:old_empire - } - scope:new_title = { - set_de_jure_liege_title = scope:old_empire - } - } - - every_held_title = { - title_tier = duchy - if = { - limit = { - #Check if you need to notify a player - OR = { - AND = { - kingdom ?= { - holder ?= { - this != root - is_ai = no - } - } - } - AND = { - empire ?= { - holder ?= { - this != root - is_ai = no - } - } - } - } - } - add_to_temporary_list = duchy_for_notification - root = { - save_temporary_scope_value_as = { - name = send_notifications - value = yes - } - } - } - set_de_jure_liege_title = scope:new_title - } - - every_sub_realm_county = { - limit = { - exists = duchy - NOT = { exists = duchy.holder } - holder.top_liege = root - duchy = { - save_temporary_scope_as = test_duchy - } - holder.top_liege = { - completely_controls = scope:test_duchy - } - } - if = { - limit = { - NOT = { - duchy = { - is_in_list = additional_de_jure_duchies - } - } - } - duchy = { - set_de_jure_liege_title = scope:new_title - add_to_list = additional_de_jure_duchies - } - } - } - - scope:new_title = { - set_coa = scope:old_title - set_color_from_title = scope:old_title - set_capital_county = scope:old_title.title_capital_county - } - set_primary_title_to = scope:new_title - - trigger_event = major_decisions.1101 - - every_player = { - if = { - limit = { - top_liege = scope:founder - this != root - } - trigger_event = major_decisions.1102 - } - else_if = { - limit = { - exists = scope:send_notifications - this != root - top_liege != scope:founder - any_held_title = { - any_in_de_jure_hierarchy = { - continue = { - tier > tier_duchy - } - tier = tier_duchy - is_in_list = duchy_for_notification - } - } - } - every_held_title = { - every_in_de_jure_hierarchy = { - continue = { - tier > tier_duchy - } - limit = { - tier = tier_duchy - is_in_list = duchy_for_notification - } - add_to_list = notification_titles - } - } - if = { - limit = { - any_in_list = { - list = notification_titles - count > 0 - } - } - trigger_event = major_decisions.1105 - } - } - } - } -} - -create_custom_empire_effect = { - custom_tooltip = create_new_empire - show_as_tooltip = { - every_held_title = { - custom = create_title_every_held_kingdom - title_tier = kingdom - custom_tooltip = create_custom_empire_de_jure_changes - } - } - - hidden_effect = { - save_scope_as = founder - primary_title = { - save_scope_as = old_title - } - - create_dynamic_title = { - tier = empire - name = NEW_CREATED_TITLE_NAME - } - create_title_and_vassal_change = { - type = created - save_scope_as = change - add_claim_on_loss = no - } - - scope:new_title = { - change_title_holder = { - holder = root - change = scope:change - } - } - - resolve_title_and_vassal_change = scope:change - - every_held_title = { - title_tier = kingdom - if = { - limit = { - #Check if you need to notify a player - empire ?= { - holder ?= { - this != root - is_ai = no - } - } - } - add_to_temporary_list = kingdoms_for_notification - root = { - save_temporary_scope_value_as = { - name = send_notifications - value = yes - } - } - } - set_de_jure_liege_title = scope:new_title - } - - every_sub_realm_county = { - limit = { - exists = kingdom - NOT = { exists = kingdom.holder } - holder.top_liege = root - kingdom = { - save_temporary_scope_as = test_kingdom - } - holder.top_liege = { - completely_controls = scope:test_kingdom - } - } - if = { - limit = { - NOT = { - kingdom = { - is_in_list = additional_de_jure_kingdoms - } - } - } - kingdom = { - set_de_jure_liege_title = scope:new_title - add_to_list = additional_de_jure_kingdoms - } - } - } - - scope:new_title = { - set_coa = scope:old_title - set_color_from_title = scope:old_title - set_capital_county = scope:old_title.title_capital_county - } - set_primary_title_to = scope:new_title - - trigger_event = major_decisions.1103 - - every_player = { - if = { - limit = { - top_liege = scope:founder - this != root - } - trigger_event = major_decisions.1104 - } - else_if = { - #Notify any players who lose de jure territory - limit = { - exists = scope:send_notifications - this != root - top_liege != scope:founder - any_held_title = { - any_in_de_jure_hierarchy = { - continue = { - tier > tier_kingdom - } - tier = tier_kingdom - is_in_list = kingdoms_for_notification - } - } - } - every_held_title = { - every_in_de_jure_hierarchy = { - continue = { - tier > tier_kingdom - } - limit = { - tier = tier_kingdom - is_in_list = kingdoms_for_notification - } - add_to_list = notification_titles - } - } - if = { - limit = { - any_in_list = { - list = notification_titles - count > 0 - } - } - trigger_event = major_decisions.1105 - } - } - } - } -} - -break_with_old_ways_become_fundamentalist = { - remove_doctrine = unreformed_faith_doctrine - remove_doctrine = tenet_unreformed_syncretism - add_doctrine = tenet_armed_pilgrimages - remove_doctrine = doctrine_pluralism_pluralistic - add_doctrine = doctrine_pluralism_fundamentalist -} - -break_with_old_ways_become_righteous = { - remove_doctrine = unreformed_faith_doctrine - remove_doctrine = tenet_unreformed_syncretism - add_doctrine = tenet_esotericism - remove_doctrine = doctrine_pluralism_pluralistic - add_doctrine = doctrine_pluralism_righteous -} - -break_with_old_ways_become_chosen_people = { - remove_doctrine = unreformed_faith_doctrine - remove_doctrine = tenet_unreformed_syncretism - add_doctrine = tenet_communal_identity - remove_doctrine = doctrine_pluralism_pluralistic - add_doctrine = doctrine_pluralism_righteous -} - -#EP3 -retake_eastern_provinces_decision_effect = { - save_scope_as = root_scope - add_trait = augustus - give_nickname = nick_the_great - change_influence = { - value = massive_influence_gain - multiply = 5 - } - custom_tooltip = { - text = every_county_in_theodosian_region - title:k_bulgaria = { set_de_jure_liege_title = title:e_byzantium } - title:k_epirus = { set_de_jure_liege_title = title:e_byzantium } - title:k_hellas = { set_de_jure_liege_title = title:e_byzantium } - title:k_thessalonika = { set_de_jure_liege_title = title:e_byzantium } - title:k_krete = { set_de_jure_liege_title = title:e_byzantium } - title:k_cyprus = { set_de_jure_liege_title = title:e_byzantium } - title:k_nikaea = { set_de_jure_liege_title = title:e_byzantium } - title:k_anatolia = { set_de_jure_liege_title = title:e_byzantium } - title:k_pontus = { set_de_jure_liege_title = title:e_byzantium } - title:k_syria = { set_de_jure_liege_title = title:e_byzantium } - title:k_jerusalem = { set_de_jure_liege_title = title:e_byzantium } - title:k_egypt = { set_de_jure_liege_title = title:e_byzantium } - } - add_legitimacy = { - value = massive_legitimacy_gain - multiply = 2 - } - dynasty ?= { - add_dynasty_modifier = retaken_eastern_provinces_modifier - add_dynasty_prestige = 2500 - } - if = { - limit = { - culture = { has_cultural_parameter = holds_triumphs } - } - custom_tooltip = { - text = free_triumph_tooltip - add_character_flag = free_triumph_flag - } - } - gain_legitimizing_legend_seed_tooltip_effect = yes - hidden_effect = { legend_seed_great_deed_dynasty_effect = yes } - every_vassal = { - custom = custom.every_admin_vassal - limit = { government_allows = administrative } - add_opinion = { - target = scope:root_scope - modifier = admiration_opinion - opinion = 20 - } - } -} - -recreate_ere_decision_effect = { - if = { - limit = { - title:c_byzantion.holder = { - this != root - } - } - create_title_and_vassal_change = { - type = revoked - save_scope_as = change - add_claim_on_loss = yes - } - title:c_byzantion = { - change_title_holder = { - holder = root - change = scope:change - } - } - resolve_title_and_vassal_change = scope:change - } - # Give the ERE - create_title_and_vassal_change = { - type = created - save_scope_as = change - add_claim_on_loss = no - } - title:e_byzantium = { - change_title_holder = { - holder = root - change = scope:change - } - } - resolve_title_and_vassal_change = scope:change - # Make it primary title - set_primary_title_to = title:e_byzantium - # Make admin - if = { - limit = { - NOT = { - government_has_flag = government_is_administrative - } - } - convert_to_administrative_from_feudalism_effect = { GOVERNMENT_TO_ADOPT = flag:administrative } - } - if = { - limit = { - NOT = { - has_realm_law = acclamation_succession_law - } - } - # Give Acclamation succession - add_realm_law_skip_effects = acclamation_succession_law - } - # Set the capital in Constantinople - if = { - limit = { - NOT = { - capital_county = { - this = title:c_byzantion - } - } - } - set_realm_capital = title:c_byzantion - } - # Get free triumph - custom_tooltip = { - text = free_triumph_tooltip - add_character_flag = free_triumph_flag - } - if = { - limit = { - title:e_latin_empire = { - any_in_de_jure_hierarchy = { - tier < tier_empire - } - } - } - title:e_latin_empire = { - every_in_de_jure_hierarchy = { - limit = { - tier = tier_kingdom - } - set_de_jure_liege_title = title:e_byzantium - } - } - - } - change_influence = massive_influence_gain - if = { - limit = { - any_held_title = { - this = title:e_latin_empire - } - } - destroy_title = title:e_latin_empire - } - hidden_effect = { - title:e_byzantium = { set_state_faith = root.faith } - } -} - -reinstitute_grain_dole_decision_effect = { - if = { - limit = { - NOT = { capital_county = { has_variable = unlocked_grain_dole } } - } - custom_tooltip = { - text = half_price_chariot_race_tooltip - add_character_flag = half_price_chariot_race_flag - } - } - every_county_in_region = { - region = custom_roman_aegyptus - limit = { - any_county_province = { - has_building_or_higher = cereal_fields_05 - } - } - add_county_modifier = { - modifier = grain_providers_county_modifier - years = 25 - } - } - capital_county = { - add_county_modifier = { - modifier = panem_et_circenses_county_modifier - years = 25 - } - } - add_legitimacy = medium_legitimacy_gain - if = { - limit = { - NOT = { capital_county = { has_variable = unlocked_grain_dole } } - } - add_prestige = { - value = massive_prestige_gain - multiply = 3 - } - change_influence = { - value = massive_influence_gain - multiply = 3 - } - capital_county = { set_variable = unlocked_grain_dole } - } - else = { - add_prestige = massive_prestige_gain - change_influence = massive_influence_gain - } -} - -create_dar_al_islam_effect = { - save_scope_as = new_hegemon - scope:new_hegemon = { - # Get the title and assorted rewards - get_title = title:h_dar_al_islam - add_prestige = 5000 - dynasty ?= { add_dynasty_prestige = 5000 } - - # Become the head of faith of all islamic faiths that aren't hostile or evil - custom_tooltip = { - text = dar_al_islam_become_head_of_faith_desc - faith.religion = { - every_faith = { - limit = { - faith_hostility_level = { - target = scope:new_hegemon.faith - value < faith_hostile_level - } - } - if = { - limit = { - has_doctrine = doctrine_no_head - } - remove_doctrine = doctrine_no_head - add_doctrine = doctrine_temporal_head - } - else_if = { - limit = { - has_doctrine = doctrine_spiritual_head - } - remove_doctrine = doctrine_spiritual_head - add_doctrine = doctrine_temporal_head - } - if = { - limit = { - has_doctrine = doctrine_theocracy_temporal - } - remove_doctrine = doctrine_theocracy_temporal - add_doctrine = doctrine_theocracy_lay_clergy - } - set_religious_head_title = title:h_dar_al_islam - } - } - } - - # Destroy the old head of faith title, but there's no need to show it - hidden_effect = { - if = { - limit = { exists = var:old_hof_title } - destroy_title = var:old_hof_title - remove_variable = old_hof_title - } - } - - # Show conversion bonus - custom_tooltip = dar_al_islam_muslim_conversion_desc # Bonus is applied in religion_demand_conversion_default_modifier - - # Enable unlimited subjugations - custom_tooltip = { - text = dar_al_islam_subjugation_expanded_desc - house = { - set_variable = { - name = subjugations_expanded - value = yes - } - } - } - - # Show faction bonus - custom_tooltip = dar_al_islam_faction_desc # Actual effect is set up in the faction itself - - # Make all held empires de jure titles - every_held_title = { - limit = { - tier = tier_empire - } - set_de_jure_liege_title = title:h_dar_al_islam - } - } - - # Let's also make all fully controlled empires de jure title, even if you don't hold them - every_empire = { - if = { - limit = { - is_titular = no - trigger_if = { - limit = { exists = holder } - holder != scope:new_hegemon - } - scope:new_hegemon = { completely_controls = prev } - } - set_de_jure_liege_title = title:h_dar_al_islam - } - } - set_global_variable = { - name = created_dar_al_islam - value = yes - } -} diff --git a/N3OW/common/scripted_effects/00_marriage_effects.txt b/N3OW/common/scripted_effects/00_marriage_effects.txt deleted file mode 100644 index 837d6e84..00000000 --- a/N3OW/common/scripted_effects/00_marriage_effects.txt +++ /dev/null @@ -1,114 +0,0 @@ - -##################################################################### -# EFFECT LIST -##################################################################### -# All effects below determine if a marriage should be matrilineal or not -# marry_on_realm_law - Marry two characters based on Spouse 1's realm law -# marry_spouse_1_dominant - Marry two characters and make Spouse 1 dominant -##################################################################### -# EFFECTS -##################################################################### - - -marry_on_realm_law = { - if = { - limit = { - $SPOUSE_1$ = { is_ruler = yes } - $SPOUSE_1$ = { - OR = { - has_realm_law = male_only_law - has_realm_law = male_preference_law - } - } - } - $SPOUSE_1$ = { marry = $SPOUSE_2$ } - } - else_if = { - limit = { - $SPOUSE_1$ = { is_ruler = no } - $SPOUSE_1$.liege ?= { - OR = { - has_realm_law = male_only_law - has_realm_law = male_preference_law - } - } - } - $SPOUSE_1$ = { marry = $SPOUSE_2$ } - } - else_if = { - limit = { - $SPOUSE_1$ = { is_ruler = yes } - $SPOUSE_1$ = { - OR = { - has_realm_law = female_only_law - has_realm_law = female_preference_law - } - } - } - $SPOUSE_1$ = { marry_matrilineal = $SPOUSE_2$ } - } - else_if = { - limit = { - $SPOUSE_1$ = { is_ruler = no } - $SPOUSE_1$.liege ?= { - OR = { - has_realm_law = female_only_law - has_realm_law = female_preference_law - } - } - } - $SPOUSE_1$ = { marry_matrilineal = $SPOUSE_2$ } - } - else = { - marry_spouse_1_dominant = { - SPOUSE_1 = $SPOUSE_1$ - SPOUSE_2 = $SPOUSE_2$ - } - } -} - - -marry_spouse_1_dominant = { - if = { - limit = { - $SPOUSE_1$ = { is_male = yes } - } - $SPOUSE_1$ = { marry = $SPOUSE_2$ } - } - else = { - $SPOUSE_1$ = { marry_matrilineal = $SPOUSE_2$ } - } -} - -vassals_dislike_marry_lowborn_effect = { - $RULER$ = { - if = { - limit = { - is_lowborn = no - $SPOUSE$ = { is_lowborn = yes } - OR = { - NOT = { exists = primary_spouse } - primary_spouse ?= $SPOUSE$ - } - } - every_vassal_or_below = { - limit = { has_vassal_stance = courtly } - custom = every_courtly_vassal - add_opinion = { - modifier = married_lowborn_opinion - target = $RULER$ - opinion = -50 - } - } - every_vassal_or_below = { - limit = { has_vassal_stance = glory_hound } - custom = every_glory_hound_vassal - add_opinion = { - modifier = married_lowborn_opinion - target = $RULER$ - opinion = -30 - } - } - } - } -} diff --git a/N3OW/common/scripted_effects/00_marriage_interaction_effects.txt b/N3OW/common/scripted_effects/00_marriage_interaction_effects.txt deleted file mode 100644 index 627a0dba..00000000 --- a/N3OW/common/scripted_effects/00_marriage_interaction_effects.txt +++ /dev/null @@ -1,1839 +0,0 @@ -marriage_interaction_on_accept_effect = { - #Use hook - if = { - limit = { always = scope:hook } - scope:actor = { - use_hook = scope:recipient - } - #To make sure betrothals can't be broken if a hook was used - if = { - limit = { - OR = { - scope:secondary_actor = { is_adult = no } - scope:secondary_recipient = { is_adult = no } - } - } - scope:secondary_actor = { - set_variable = { - name = hook_used_for_betrothal - value = scope:secondary_recipient - } - } - } - } - - #Penalties for marrying a lowborn - scope:actor = { - if = { - limit = { - this = scope:secondary_actor # We check that you're marrying them yourself - scope:secondary_recipient = { is_lowborn = yes } - } - # Vassal dispositions get aggy. - ## Actual effect applied in the on_marriage on_action. - show_as_tooltip = { - vassals_dislike_marry_lowborn_effect = { - SPOUSE = scope:secondary_recipient - RULER = scope:actor - } - } - #Legitimacy loss for marrying a lowborn - if = { - limit = { - is_valid_for_legitimacy_change = yes - NOT = { has_variable = lowborn_legitimacy_cooldown } - OR = { - NOT = { exists = primary_spouse } - primary_spouse ?= scope:secondary_recipient - } - } - if = { - limit = { is_ai = no } - send_interface_toast = { - type = event_toast_effect_good - title = married_lowborn_toast - left_icon = scope:actor - add_legitimacy = { - value = medium_legitimacy_loss - multiply = scope:actor.primary_title.tier - } - } - } - else = { # To avoid destroying polygamy AIs - send_interface_toast = { - type = event_toast_effect_good - title = married_lowborn_toast - left_icon = scope:actor - add_legitimacy = { value = minor_legitimacy_loss } - } - hidden_effect = { - set_variable = { - name = lowborn_legitimacy_cooldown - years = 10 - } - } - } - } - } - if = { - limit = { - this = scope:secondary_recipient # We check that you're marrying them yourself - scope:secondary_actor = { is_lowborn = yes } - } - # Vassal dispositions get aggy. - ## Actual effect applied in the on_marriage on_action. - show_as_tooltip = { - vassals_dislike_marry_lowborn_effect = { - SPOUSE = scope:secondary_actor - RULER = scope:actor - } - } - #Legitimacy loss for marrying a lowborn - if = { - limit = { - is_valid_for_legitimacy_change = yes - NOT = { has_variable = lowborn_legitimacy_cooldown } - OR = { - NOT = { exists = primary_spouse } - primary_spouse ?= scope:secondary_actor - } - } - if = { - limit = { is_ai = no } - send_interface_toast = { - type = event_toast_effect_good - title = married_lowborn_toast - left_icon = scope:actor - add_legitimacy = { - value = medium_legitimacy_loss - multiply = scope:actor.primary_title.tier - } - } - } - else = { # To avoid destroying polygamy AIs - send_interface_toast = { - type = event_toast_effect_good - title = married_lowborn_toast - left_icon = scope:actor - add_legitimacy = { value = minor_legitimacy_loss } - } - hidden_effect = { - set_variable = { - name = lowborn_legitimacy_cooldown - years = 10 - } - } - } - } - } - else = { # If they're not a lowborn AND you and the recipient are both Nomad we may give you some Legitimacy - if = { - limit = { - is_valid_for_nomadic_legitimacy_change = yes - scope:recipient = { government_has_flag = government_is_nomadic } - mpo_lower_nomad_authority_trigger = { CHARACTER = scope:recipient } # Only if recipient has higher Dominance than you - } - add_legitimacy = medium_legitimacy_gain - } - } - } - - #No longer Herder - if = { - limit = { - scope:secondary_recipient = { - is_landed = yes - government_has_flag = government_is_herder - } - } - scope:actor = { - switch = { - trigger = has_government - feudal_government = { - scope:secondary_recipient = { change_government = feudal_government } - } - tribal_government = { - scope:secondary_recipient = { change_government = tribal_government } - } - clan_government = { - scope:secondary_recipient = { change_government = clan_government } - } - nomad_government = { - scope:secondary_recipient = { change_government = nomad_government } - } - administrative_government = { - scope:secondary_recipient = { change_government = administrative_government } - } - landless_adventurer_government = { - scope:secondary_recipient = { change_government = landless_adventurer_government } - } - } - } - } - - #No longer concubine - if = { - limit = { - scope:secondary_recipient = { is_concubine = yes } - } - scope:secondary_recipient = { - random_consort = { - limit = { - any_concubine = { this = scope:secondary_recipient } - } - remove_concubine = scope:secondary_recipient - } - } - } - if = { - limit = { - scope:secondary_actor = { is_concubine = yes } - } - scope:secondary_actor = { - random_consort = { - limit = { - any_concubine = { this = scope:secondary_actor } - } - remove_concubine = scope:secondary_actor - } - } - } - # A Grand Wedding was promised - if = { - limit = { - scope:grand_wedding_promise = yes - } - set_grand_wedding_betrothal_variables = { - SPOUSE_1 = scope:secondary_actor - SPOUSE_2 = scope:secondary_recipient - HOST = scope:actor - PROMISEE = scope:recipient - } - } - - #Marriage notification events - hidden_effect = { - scope:actor = { - if = { - limit = { this != scope:recipient } - trigger_event = marriage_interaction.0010 - } - else = { #In my own court - if = { - limit = { #Betrothal? - OR = { - scope:secondary_actor = { is_adult = no } - scope:secondary_recipient = { is_adult = no } - scope:secondary_actor = { has_been_promised_grand_wedding = yes } - scope:secondary_recipient = { has_been_promised_grand_wedding = yes } - } - } - send_interface_toast = { - type = event_toast_effect_good - title = arrange_marriage_interaction_accept_betrothal_toast - left_icon = scope:secondary_actor - right_icon = scope:secondary_recipient - custom_tooltip = arrange_marriage_interaction_accept_betrothal_toast_desc - } - } - else = { - send_interface_toast = { - type = event_toast_effect_good - title = arrange_marriage_interaction_accept_toast - left_icon = scope:secondary_actor - right_icon = scope:secondary_recipient - custom_tooltip = arrange_marriage_interaction_accept_toast_desc - } - } - } - } - - # Apply any relevant opinion penalties for relatives of spouse. - scope:secondary_actor = { - if = { # Polygamy - limit = { - any_consort = { - count >= 2 - } - } - every_consort = { - # If the spouse themselves does not believe in polygamy... - limit = { - NOR = { - culture = { has_cultural_tradition = tradition_polygamous } - faith = { has_doctrine = doctrine_polygamy } - faith = { has_doctrine = doctrine_concubines } - } - } - - #... then family members who also do not believe in polygamy aren't happy about having a relative forced into polygamous union with you. - every_close_family_member = { - if = { - limit = { - NOR = { - culture = { has_cultural_tradition = tradition_polygamous } - faith = { has_doctrine = doctrine_polygamy } - faith = { has_doctrine = doctrine_concubines } - } - } - add_opinion = { - target = scope:secondary_actor - modifier = relative_in_blasphemous_union_opinion - } - } - } - - # NOTE: Spouse's own opinions handled in the 'on_marriage' code on_action inside of marriage_concubinage.txt, and are not included here. - } - } - } - scope:secondary_recipient = { - if = { #Same-sex relations - limit = { - allowed_to_marry_same_sex_trigger = no - sex_same_as = scope:secondary_actor - } - every_close_family_member = { - if = { - limit = { - allowed_to_marry_same_sex_trigger = no - } - add_opinion = { - target = scope:secondary_actor - modifier = relative_in_blasphemous_union_opinion - } - } - } - } - } - # Courtly vassals like grand weddings - scope:secondary_actor = { - if = { - limit = { - any_vassal = { - vassal_stance = courtly - } - } - if = { - limit = { - has_been_promised_grand_wedding = yes - } - every_vassal = { - vassal_stance = courtly - add_opinion = { - target = scope:secondary_actor - modifier = prestigious_wedding_opinion - } - } - } - } - } - scope:secondary_recipient = { - if = { - limit = { - any_vassal = { - vassal_stance = courtly - } - } - if = { - limit = { - has_been_promised_grand_wedding = yes - } - every_vassal = { - vassal_stance = courtly - add_opinion = { - target = scope:secondary_recipient - modifier = prestigious_wedding_opinion - } - } - } - } - } - } - - ###MANAGEMENT SCRIPT FOR VARIOUS EVENTS/CONTENT### - - #If your spouse councillor had boosted the chance of marriage, remove modifier - if = { - limit = { - scope:secondary_actor = { - has_character_modifier = heir_easier_to_marry_off_modifier - } - scope:actor = { player_heir = scope:secondary_actor } - } - scope:secondary_actor = { - remove_character_modifier = heir_easier_to_marry_off_modifier - } - } - if = { - limit = { - scope:secondary_actor = { - is_child_of = scope:actor - has_character_modifier = child_easier_to_marry_off_modifier - } - } - scope:secondary_actor = { - remove_character_modifier = child_easier_to_marry_off_modifier - } - } - - #AI Break up consideration after marriage - scope:secondary_recipient = { - if = { - limit = { - is_adult = yes - is_ai = yes - } - scope:secondary_actor = { save_scope_as = new_spouse_secondary_actor } - trigger_event = lover.0205 - } - } - scope:secondary_actor = { - if = { - limit = { - is_adult = yes - is_ai = yes - } - scope:secondary_recipient = { save_scope_as = new_spouse_secondary_recipient } - trigger_event = lover.0205 - } - } - - # Struggle parameters - - #interfaith wedding costs piety - if = { - limit = { - scope:secondary_actor = { - faith != scope:secondary_recipient.faith - } - scope:actor ={ - any_character_struggle = { - has_struggle_phase_parameter = interfaith_marriages_between_involved_characters_costs_piety - } - } - } - scope:actor = { - add_piety = major_piety_loss - } - } - #interfaith wedding provides piety - if = { - limit = { - scope:secondary_actor = { - faith != scope:secondary_recipient.faith - } - scope:actor ={ - any_character_struggle = { - has_struggle_phase_parameter = interfaith_marriages_between_involved_characters_gives_piety - } - } - } - scope:actor = { - add_piety = medium_piety_gain - } - } - - #other stuff - #Khurramites and Mazdakists gain piety from marrying lowborn - if = { - limit = { - scope:secondary_recipient = { - is_lowborn = yes - } - scope:actor.faith = { - has_doctrine = tenet_communal_possessions - } - } - scope:actor = { - add_piety = medium_piety_gain - } - } -} - -concubine_on_accept_effect = { - scope:recipient = { - trigger_event = marriage_interaction.0040 - if = { - # Victim is angry for being forced into concubinage. - limit = { - OR = { - has_trait = celibate - is_imprisoned = yes - } - } - release_from_prison = yes - add_opinion = { - target = scope:actor - modifier = forced_me_concubine_marriage_opinion - } - - # Family members of victim are also angry that you've forced them into concubinage. - every_close_family_member = { - if = { - limit = { - this != scope:actor # Don't hate yourself. - } - add_opinion = { - target = scope:actor - modifier = forced_family_concubine_marriage_opinion - } - hidden_effect = { - send_interface_message = { - type = msg_family_became_concubine - title = msg_close_family_member_taken_as_concubine_title - right_icon = scope:actor - left_icon = scope:secondary_actor - show_as_tooltip = { scope:actor = { make_concubine = scope:secondary_actor } } - } - } - - # Family members are even *more* angry if they don't believe in concubines/polyamory (different from polygamy). Also if they don't accept same-sex relationships - if = { - limit = { - OR = { - NOT = { faith = { has_doctrine = doctrine_concubines } } - NOT = { faith = { has_doctrine = tenet_polyamory } } - AND = { - allowed_to_marry_same_sex_trigger = no - scope:recipient = { sex_same_as = scope:secondary_actor } - } - } - } - add_opinion = { - target = scope:actor - modifier = relative_in_blasphemous_union_opinion - } - } - } - } - - # Not up to them anymore... - if = { - limit = { has_trait = celibate } - remove_trait = celibate - } - - # Spouses, if any exist, are also furious. - if = { - limit = { - is_married = yes - } - every_spouse = { - show_as_tooltip = { - add_opinion = { - target = scope:actor - modifier = forced_spouse_concubine_marriage_opinion - } - divorce = scope:recipient # no additional opinion hit, no scripted effect - } - trigger_event = marriage_interaction.0041 - } - } - - # Stealing concubines pisses the former concubinist off. - if = { - limit = { - is_concubine = yes - } - this.concubinist = { - show_as_tooltip = { - add_opinion = { - target = scope:secondary_actor - modifier = stole_concubine_opinion - } - remove_concubine = scope:recipient # no additional opinion hit, no scripted effect - } - trigger_event = marriage_interaction.0041 - } - } - - # Break any betrothals which may exist (without additional opinion penalties). - if = { - limit = { exists = betrothed } - betrothed = { trigger_event = marriage_interaction.0041 } - break_betrothal = betrothed - } - - # Having concubines means they're now no longer yours. - if = { - limit = { number_of_concubines > 0 } - every_concubine = { - scope:recipient = { - remove_concubine = prev - } - } - } - } - } - - # Send us a notification about what we just did. - scope:secondary_actor = { - hidden_effect = { - send_interface_toast = { - type = event_toast_effect_neutral - title = msg_concubine_taken_title - right_icon = scope:recipient - make_concubine = scope:recipient - } - } - } -} - - -#This effect has some small differences to the previous one since this one involves one extra person (the one you give a concubine to) -concubine_offer_on_accept_effect = { - scope:secondary_recipient = { - trigger_event = marriage_interaction.0040 - if = { - # Victim is angry for being forced into concubinage. - limit = { - is_imprisoned = yes - } - add_character_flag = { - flag = block_release_from_prison_event - days = 3 - } - release_from_prison = yes - add_opinion = { - target = scope:actor - modifier = forced_me_concubine_marriage_opinion - } - - # Family members of victim are also angry that you've forced them into concubinage. - every_close_family_member = { - if = { - limit = { - this != scope:actor # Don't hate yourself. - } - add_opinion = { - target = scope:actor - modifier = forced_family_concubine_marriage_opinion - } - hidden_effect = { - send_interface_message = { - type = msg_family_became_concubine - title = msg_close_family_member_offered_as_concubine_title - right_icon = scope:actor - left_icon = scope:secondary_actor - show_as_tooltip = { scope:actor = { make_concubine = scope:secondary_actor } } - } - } - - # Family members are even *more* angry if they don't believe in concubines/polyamory (different from polygamy). Also if they don't accept same-sex relationships - if = { - limit = { - OR = { - NOT = { faith = { has_doctrine = doctrine_concubines } } - NOT = { faith = { has_doctrine = tenet_polyamory } } - AND = { - allowed_to_marry_same_sex_trigger = no - scope:recipient = { sex_same_as = scope:secondary_recipient } - } - } - } - add_opinion = { - target = scope:actor - modifier = relative_in_blasphemous_union_opinion - } - } - } - } - - # Spouses, if any exist, are also furious. - if = { - limit = { - is_married = yes - #A check to make sure you haven't somehow married them during the consideration time - NOT = { any_spouse = { this = scope:recipient } } - } - every_spouse = { - add_opinion = { - target = scope:actor - modifier = forced_spouse_concubine_marriage_opinion - } - divorce = scope:secondary_recipient # no additional opinion hit, no scripted effect - save_scope_value_as = { # For tooltips in the coming event - name = was_spouse - value = yes - } - trigger_event = marriage_interaction.0043 - } - } - - # Stealing concubines pisses the former concubinist off. - if = { - limit = { - is_concubine = yes - #A check to make sure you haven't somehow gotten them as concubine during the consideration time - NOT = { any_consort = { this = scope:recipient } } - } - this.concubinist = { - if = { - limit = { - this != scope:actor - } - add_opinion = { - target = scope:actor - modifier = stole_concubine_opinion - } - remove_concubine = scope:secondary_recipient # no additional opinion hit, no scripted effect - save_scope_value_as = { # For tooltips in the coming event - name = was_concubine - value = yes - } - trigger_event = marriage_interaction.0043 - } - else = { - remove_concubine = scope:secondary_recipient # no additional opinion hit, no scripted effect - } - } - } - - # Break any betrothals which may exist (without additional opinion penalties). - if = { - limit = { - exists = betrothed - #A check to make sure you haven't somehow gotten betrothed to them during the consideration time - betrothed != scope:recipient - } - betrothed = { trigger_event = marriage_interaction.0043 } - break_betrothal = betrothed - } - - # Having concubines means they're now no longer yours. - if = { - limit = { number_of_concubines > 0 } - every_concubine = { - scope:secondary_recipient = { - remove_concubine = prev - } - } - } - } - if = { - limit = { - is_concubine_of = scope:actor - } - scope:actor = { - remove_concubine = scope:secondary_recipient - } - } - remove_character_flag = has_been_offered_as_concubine - } - - # Send us a notification about what we just did. If the secondary_recipient somehow ended up as a consort (spouse/concubine) or betrothed to recipient during the consideration time of this request we'll send a message about that instead (should only happen to AI tho) - if = { - limit = { #Invalidation message - scope:secondary_recipient = { - OR = { - any_consort = { } - exists = betrothed - } - } - } - scope:secondary_recipient = { - # If they've somehow already become entangled with the recipient we tell this - if = { - limit = { - OR = { - is_consort_of = scope:recipient - betrothed ?= scope:recipient - } - } - scope:recipient = { - save_scope_as = spouse - } - } - # Else, if they've married or gotten betrothed to someone else, we say this - else_if = { - limit = { - exists = betrothed - } - betrothed = { - save_scope_as = spouse - } - } - else = { - random_consort = { - limit = { - this = scope:secondary_recipient.primary_spouse - } - alternative_limit = { - always = yes - } - save_scope_as = spouse - } - } - } - scope:actor = { - send_interface_toast = { - type = event_toast_effect_neutral - title = msg_concubine_offered_invalidated_title - right_icon = scope:recipient - left_icon = scope:secondary_recipient - if = { - limit = { - scope:secondary_recipient = { is_consort_of = scope:spouse } - } - custom_tooltip = msg_concubine_offered_invalidated_consort - } - else = { - custom_tooltip = msg_concubine_offered_invalidated_betrothed - } - } - } - scope:recipient = { - send_interface_toast = { - type = event_toast_effect_neutral - title = msg_concubine_offered_invalidated_recipient_title - right_icon = scope:actor - left_icon = scope:secondary_recipient - if = { - limit = { - scope:secondary_recipient = { is_consort_of = scope:spouse } - } - custom_tooltip = msg_concubine_offered_invalidated_consort - } - else = { - custom_tooltip = msg_concubine_offered_invalidated_betrothed - } - } - } - } - else = { #Proper notification - scope:actor = { - send_interface_toast = { - type = event_toast_effect_neutral - title = msg_concubine_offered_title - right_icon = scope:recipient - left_icon = scope:secondary_recipient - scope:recipient = { - make_concubine = scope:secondary_recipient - if = { #Scale opinion gain a bit depending on how cool the concubine is - limit = { - scope:secondary_recipient = { - OR = { - has_trait = beauty_good_2 - has_trait = beauty_good_3 - num_of_good_genetic_traits > 1 - has_relation_lover = scope:recipient - has_relation_soulmate = scope:recipient - } - trigger_if = { - limit = { - is_female = yes - } - age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE - } - } - } - add_opinion = { - target = scope:actor - modifier = grateful_opinion - opinion = 40 - } - } - else_if = { - limit = { - scope:secondary_recipient = { - OR = { - is_lowborn = no - has_trait = beauty_good_1 - num_of_good_genetic_traits > 0 - has_relation_friend = scope:recipient - has_relation_best_friend = scope:recipient - } - trigger_if = { - limit = { - is_female = yes - } - age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE - } - } - } - add_opinion = { - target = scope:actor - modifier = grateful_opinion - opinion = 30 - } - } - else = { - add_opinion = { - target = scope:actor - modifier = grateful_opinion - opinion = 20 - } - } - } - } - } - } -} - -#This effect has some small differences AGAIN to the previous one since this one has some roles reversed -demand_concubine_interaction_on_accept_effect = { - scope:secondary_actor = { - trigger_event = marriage_interaction.0040 - if = { - # Victim is angry for being forced into concubinage. - limit = { - is_imprisoned = yes - } - add_character_flag = { - flag = block_release_from_prison_event - days = 3 - } - release_from_prison = yes - add_opinion = { - target = scope:actor - modifier = forced_me_concubine_marriage_opinion - } - } - - # Family members of victim are also angry that you've forced them into concubinage. - every_close_family_member = { - if = { - limit = { - NOT = { this = scope:actor } # Don't hate yourself. - } - add_opinion = { - target = scope:actor - modifier = forced_family_concubine_marriage_opinion - } - hidden_effect = { - send_interface_message = { - type = msg_family_became_concubine - title = msg_close_family_member_taken_as_concubine_title - right_icon = scope:actor - left_icon = scope:secondary_actor - show_as_tooltip = { scope:actor = { make_concubine = scope:secondary_actor } } - } - } - - # Family members are even *more* angry if they don't believe in concubines/polyamory (different from polygamy). Also if they don't accept same-sex relationships - if = { - limit = { - OR = { - NOT = { faith = { has_doctrine = doctrine_concubines } } - NOT = { faith = { has_doctrine = tenet_polyamory } } - AND = { - allowed_to_marry_same_sex_trigger = no - scope:recipient = { sex_same_as = scope:secondary_actor } - } - } - } - add_opinion = { - target = scope:actor - modifier = relative_in_blasphemous_union_opinion - } - } - } - } - - # Spouses, if any exist, are also furious. - if = { - limit = { - is_married = yes - #A check to make sure you haven't somehow married them during the consideration time - NOT = { any_spouse = { this = scope:actor } } - } - every_spouse = { - if = { - limit = { - NOT = { - this = scope:recipient - } - } - add_opinion = { - target = scope:actor - modifier = forced_spouse_concubine_marriage_opinion - } - } - divorce = scope:secondary_actor # no additional opinion hit, no scripted effect - save_scope_value_as = { # For tooltips in the coming event - name = was_spouse - value = yes - } - } - } - - # Stealing concubines pisses the former concubinist off. - if = { - limit = { - is_concubine = yes - #A check to make sure you haven't somehow gotten them as concubine during the consideration time - NOT = { any_consort = { this = scope:actor } } - } - this.concubinist = { - if = { - limit = { - NOT = { - this = scope:recipient - } - } - add_opinion = { - target = scope:actor - modifier = stole_concubine_opinion - } - } - remove_concubine = scope:secondary_actor # no additional opinion hit, no scripted effect - } - } - - # Break any betrothals which may exist (without additional opinion penalties). - if = { - limit = { - exists = betrothed - #A check to make sure you haven't somehow gotten betrothed to them during the consideration time - NOT = { betrothed = scope:actor } - } - break_betrothal = betrothed - } - - # Having concubines means they're now no longer yours. - if = { - limit = { number_of_concubines > 0 } - every_concubine = { - scope:secondary_actor = { - remove_concubine = prev - } - } - } - - if = { - limit = { - is_concubine_of = scope:recipient - } - scope:recipient = { - remove_concubine = scope:secondary_actor - } - } - remove_character_flag = has_been_offered_as_concubine - } - - # Send us a notification about what we just did. - scope:actor = { - send_interface_toast = { - type = event_toast_effect_neutral - title = msg_concubine_offered_reversed_title - right_icon = scope:recipient - left_icon = scope:secondary_actor - scope:actor = { - make_concubine = scope:secondary_actor - if = { #Scale opinion gain a bit depending on how cool the concubine is - limit = { - scope:secondary_actor = { - OR = { - has_trait = beauty_good_2 - has_trait = beauty_good_3 - num_of_good_genetic_traits > 1 - has_relation_lover = scope:actor - has_relation_soulmate = scope:actor - } - trigger_if = { - limit = { - is_female = yes - } - age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE - } - } - } - add_opinion = { - target = scope:recipient - modifier = grateful_opinion - opinion = 40 - } - } - else_if = { - limit = { - scope:secondary_actor = { - OR = { - is_lowborn = no - has_trait = beauty_good_1 - num_of_good_genetic_traits > 0 - has_relation_friend = scope:actor - has_relation_best_friend = scope:actor - } - trigger_if = { - limit = { - is_female = yes - } - age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE - } - } - } - add_opinion = { - target = scope:recipient - modifier = grateful_opinion - opinion = 30 - } - } - else = { - add_opinion = { - target = scope:recipient - modifier = grateful_opinion - opinion = 20 - } - } - } - } - } -} - -divorce_effect = { - $DIVORCER$ = { - if = { - limit = { - any_spouse = { - this = $DIVORCEE$ - } - } - divorce = $DIVORCEE$ - } - - reverse_add_opinion = { - modifier = divorced_me_opinion - target = $DIVORCEE$ - } - } - # Opinion hit - $DIVORCEE$ = { - every_close_or_extended_family_member = { - limit = { NOT = { this = $DIVORCER$ } } # don't hate yourself just because of some incest - custom = all_family_members - add_opinion = { - modifier = divorced_close_kin - target = $DIVORCER$ - } - } - } - - if = { - limit = { - $DIVORCER$ = { - has_character_modifier = rejected_from_marriage_bed_modifier - } - } - $DIVORCER$ = { remove_character_modifier = rejected_from_marriage_bed_modifier } - } - if = { - limit = { - $DIVORCEE$ = { - has_character_modifier = rejected_from_marriage_bed_modifier - } - } - $DIVORCEE$ = { remove_character_modifier = rejected_from_marriage_bed_modifier } - } - - if = { - limit = { $DIVORCER$ = { has_relation_lover = $DIVORCEE$ } } - lover_breakup_effect = { - BREAKER = $DIVORCER$ - LOVER = $DIVORCEE$ - } - } -} - -less_verbose_divorce_effect = { - $DIVORCER$ = { - if = { - limit = { - any_spouse = { - this = $DIVORCEE$ - } - } - divorce = $DIVORCEE$ - } - - hidden_effect = { - reverse_add_opinion = { - modifier = divorced_me_opinion - target = $DIVORCEE$ - } - } - } - hidden_effect = { - # Opinion hit - $DIVORCEE$ = { - every_close_or_extended_family_member = { - limit = { NOT = { this = $DIVORCER$ } } # don't hate yourself just because of some incest - custom = all_family_members - add_opinion = { - modifier = divorced_close_kin - target = $DIVORCER$ - } - } - } - - if = { - limit = { - $DIVORCER$ = { - has_character_modifier = rejected_from_marriage_bed_modifier - } - } - $DIVORCER$ = { remove_character_modifier = rejected_from_marriage_bed_modifier } - } - if = { - limit = { - $DIVORCEE$ = { - has_character_modifier = rejected_from_marriage_bed_modifier - } - } - $DIVORCEE$ = { remove_character_modifier = rejected_from_marriage_bed_modifier } - } - } - - if = { - limit = { $DIVORCER$ = { has_relation_lover = $DIVORCEE$ } } - lover_breakup_effect = { - BREAKER = $DIVORCER$ - LOVER = $DIVORCEE$ - } - } -} - -marriage_soulmate_exclusivity_confrontation_effect = { - $SPOUSE_1$ = { add_to_temporary_list = new_spouses } - $SPOUSE_2$ = { add_to_temporary_list = new_spouses } - - every_in_list = { - list = new_spouses - limit = { - any_relation = { - type = soulmate - NOT = { is_in_list = new_spouses } - } - } - add_character_flag = { - flag = can_be_confronted_about_lover_exclusivity - days = 1825 - } - } -} - -# CHARACTER = character we check for if they should send a message -# SPOUSE = the spouse in this divorce -# scope:reason = flag:script or flag:faith -send_divorce_notifications_effect = { - $CHARACTER$ = { - if = { - limit = { - is_ai = no - } - switch = { - trigger = scope:reason - flag:script = { - send_interface_message = { - type = msg_divorce - left_icon = $SPOUSE$ - } - } - flag:faith = { - send_interface_message = { - type = msg_spouse_invalidated - left_icon = $SPOUSE$ - } - } - } - } - else_if = { - limit = { - any_heir_title = { - holder ?= { is_ai = no } - } - } - every_heir_title = { - limit = { - holder ?= { is_ai = no } - } - holder = { - if = { - limit = { - NOT = { is_in_list = had_notification_sent } - } - add_to_list = had_notification_sent - switch = { - trigger = scope:reason - flag:script = { - send_interface_message = { - type = msg_divorce_player_heir - left_icon = $CHARACTER$ - right_icon = $SPOUSE$ - } - } - flag:faith = { - send_interface_message = { - type = msg_spouse_invalidated_player_heir - left_icon = $CHARACTER$ - right_icon = $SPOUSE$ - } - } - } - } - } - } - } - } -} - -# CHARACTER = character we check for if they should send a message -# BETROTHED = the other person in the betrothal -# scope:reason = flag:timeout, flag:death, flag:faith, or flag:script -send_break_betrothal_notifications_effect = { - $CHARACTER$ = { - if = { - limit = { - is_ai = no - } - switch = { - trigger = scope:reason - flag:script = { - send_interface_message = { - type = msg_break_betrothal - left_icon = $BETROTHED$ - } - } - flag:faith = { - send_interface_message = { - type = msg_betrothal_invalidated - left_icon = $BETROTHED$ - } - } - # flag:death is hanlded by normal death management events - # flag:timeout is hanlded by caller separately - } - } - else_if = { - limit = { - any_heir_title = { - holder ?= { is_ai = no } - } - } - every_heir_title = { - limit = { - holder = { is_ai = no } - } - holder = { - if = { - limit = { - NOT = { is_in_list = had_notification_sent } - } - add_to_list = had_notification_sent - switch = { - trigger = scope:reason - flag:script = { - send_interface_message = { - type = msg_break_betrothal_player_heir - left_icon = $CHARACTER$ - right_icon = $BETROTHED$ - } - } - flag:faith = { - send_interface_message = { - type = msg_betrothal_invalidated_player_heir - left_icon = $CHARACTER$ - right_icon = $BETROTHED$ - } - } - # flag:death is hanlded by normal death management events - # flag:timeout is hanlded by caller separately - } - } - } - } - } - } -} - - - -# When you take spouses/concubines whose Faith does not permit that union, they will gain opinion penalties. -# This effect adds/updates/replaces/removes those opinion penalties, as approprite to the current situation. -update_active_consort_opinion_effect = { - - # If we currently have any existing consort opinion modifiers, check if they should be downgraded from permanent modifiers to decaying modifiers. - downgrade_invalid_consort_opinions_effect = { PARTNER = $PARTNER$ } - - if = { - # If this opinion change was triggered by being divorced/set-aside, we may still technically be married/joined to PARTNER at this moment, but we won't be very shortly and should skip this step. - limit = { - NOR = { - exists = scope:is_being_divorced - exists = scope:is_being_set_aside - } - } - - # Oterwise, apply any new consort opinion effects that are applicable. - if = { - # Characters who do not believe in concubinage, but are forced into it, have the harshest opinion penalties. - limit = { - is_concubine_of = $PARTNER$ - NOT = { faith = { has_doctrine = doctrine_concubines }} - NOT = { culture = { has_cultural_tradition = tradition_concubines } } - } - if = { - # Harshest opinion penalty if they are a concubine but believe in monogamy - limit = { faith = { has_doctrine = doctrine_monogamy }} - add_opinion = { - target = $PARTNER$ - modifier = concubine_with_monogamous_faith_opinion - } - } - else_if = { - # Lesser-but-still-harsh opinion penalty if they are a concubine but believe in polygamy - limit = { - OR = { - culture = { has_cultural_tradition = tradition_polygamous } - faith = { has_doctrine = doctrine_polygamy } - } - } - add_opinion = { - target = $PARTNER$ - modifier = concubine_with_polygamous_faith_opinion - } - } - } - else_if = { - # Characters who are legitimate spouses of their partner, but do not approve of their partner's other spouses/concubines, will have milder opinion penalties. - limit = { - is_spouse_of = $PARTNER$ - $PARTNER$ = { any_consort = { count >= 2 }} - NOT = { faith = { has_doctrine = doctrine_concubines }} - NOT = { faith = { has_doctrine = tenet_polyamory }} - NOT = { culture = { has_cultural_tradition = tradition_concubines } } - } - if = { - limit = { - $PARTNER$ = { any_concubine = { }} - } - add_opinion = { - target = $PARTNER$ - modifier = spouse_does_not_believe_in_concubines_opinion - } - #Remove the opinion modifier if you flip-flop and go get concubines after getting rid of them all... - remove_opinion = { - target = $PARTNER$ - modifier = spouse_does_not_believe_in_former_concubines_opinion - } - } - else_if = { - limit = { - NOR = { - culture = { has_cultural_tradition = tradition_polygamous } - faith = { has_doctrine = doctrine_polygamy } - } - } - add_opinion = { - target = $PARTNER$ - modifier = polygamous_marriage_opinion - } - } - } - #Same-sex not accepted penalty - if = { - limit = { - allowed_to_marry_same_sex_trigger = no - sex_same_as = $PARTNER$ - } - add_opinion = { - target = $PARTNER$ - modifier = same_sex_with_no_acceptance_opinion - } - } - } -} - -# Checks if we have any permanent opinion modifiers which are no longer applicable. If so, downgrade them to decaying opinion modifiers. -downgrade_invalid_consort_opinions_effect = { - if = { - limit = { - has_opinion_modifier = { - modifier = concubine_with_monogamous_faith_opinion - target = $PARTNER$ - } - OR = { - # We are no longer a concubine of PARTNER... - NOT = { is_concubine_of = $PARTNER$ } - # ...or will no longer be a concubine of them. - trigger_if = { - limit = { exists = scope:is_being_set_aside} - scope:is_being_set_aside = this - } - - # Or, our Faith has changed to permit us being a concubine. - faith = { has_doctrine = doctrine_concubines } - } - } - remove_opinion = { - modifier = concubine_with_monogamous_faith_opinion - target = $PARTNER$ - } - add_opinion = { - modifier = formerly_concubine_with_monogamous_faith_opinion - target = $PARTNER$ - } - } - - if = { - limit = { - has_opinion_modifier = { - modifier = concubine_with_polygamous_faith_opinion - target = $PARTNER$ - } - OR = { - # We are no longer a concubine of PARTNER... - NOT = { is_concubine_of = $PARTNER$ } - # ...or will no longer be a concubine of them. - trigger_if = { - limit = { exists = scope:is_being_set_aside} - scope:is_being_set_aside = this - } - - # Or, our Faith has changed to permit us being a concubine. - faith = { has_doctrine = doctrine_concubines } - } - } - remove_opinion = { - modifier = concubine_with_polygamous_faith_opinion - target = $PARTNER$ - } - add_opinion = { - modifier = formerly_concubine_with_polygamous_faith_opinion - target = $PARTNER$ - } - } - - if = { - limit = { - has_opinion_modifier = { - modifier = spouse_does_not_believe_in_concubines_opinion - target = $PARTNER$ - } - OR = { - # We are no longer married to PARTNER... - NOT = { is_spouse_of = $PARTNER$ } - # ...or will no longer be married to them. - trigger_if = { - limit = { exists = scope:is_being_divorced} - scope:is_being_divorced = this - } - - # Or, the offending relationship no longer exists. - $PARTNER$ = { any_concubine = { count = 0 }} - AND = { - # The last remaining concubine is being set aside, leaving none. - exists = scope:is_being_set_aside - $PARTNER$ = { any_concubine = { count = 1 }} - } - - # Or, our Faith has changed to permit the relationship. - faith = { has_doctrine = doctrine_concubines } - faith = { has_doctrine = tenet_polyamory } - } - } - remove_opinion = { - modifier = spouse_does_not_believe_in_concubines_opinion - target = $PARTNER$ - } - add_opinion = { - modifier = spouse_does_not_believe_in_former_concubines_opinion - target = $PARTNER$ - } - } - - if = { - limit = { - has_opinion_modifier = { - modifier = polygamous_marriage_opinion - target = $PARTNER$ - } - OR = { - # We are no longer married to PARTNER... - NOT = { is_spouse_of = $PARTNER$ } - # ...or will no longer be married to them. - trigger_if = { - limit = { exists = scope:is_being_divorced} - scope:is_being_divorced = this - } - - # Or, the offending relationship no longer exists. - $PARTNER$ = { any_spouse = { count = 1 }} - AND = { - # One of the 2 remaining spouses will be divorced next tick, leaving only 1. - exists = scope:is_being_divorced - $PARTNER$ = { any_spouse = { count = 2 }} - } - - # Or, our Faith has changed to permit the relationship. - faith = { has_doctrine = doctrine_concubines } - culture = { has_cultural_tradition = tradition_polygamous } - faith = { has_doctrine = doctrine_polygamy } - faith = { has_doctrine = tenet_polyamory } - } - } - remove_opinion = { - modifier = polygamous_marriage_opinion - target = $PARTNER$ - } - add_opinion = { - modifier = former_polygamous_marriage_opinion - target = $PARTNER$ - } - } - - if = { - limit = { - has_opinion_modifier = { - modifier = same_sex_with_no_acceptance_opinion - target = $PARTNER$ - } - OR = { - # We are no partner of PARTNER... - NOT = { is_consort_of = $PARTNER$ } - # ...or will no longer be married to them - trigger_if = { - limit = { exists = scope:is_being_divorced} - scope:is_being_divorced = this - } - # ...or will no longer be a concubine of them - trigger_if = { - limit = { exists = scope:is_being_set_aside} - scope:is_being_set_aside = this - } - - # Or, the offending relationship no longer exists. - sex_opposite_of = $PARTNER$ - - # Or, our Faith has changed to permit the relationship. - allowed_to_marry_same_sex_trigger = yes - } - } - remove_opinion = { - modifier = same_sex_with_no_acceptance_opinion - target = $PARTNER$ - } - add_opinion = { - modifier = former_same_sex_with_no_acceptance_opinion - target = $PARTNER$ - } - } -} - -##### EP2 - You promised a Grand Wedding and failed to deliver it -break_grand_wedding_betrothal_effect = { - # Uniform the scopes between breaking a betrothal with the interaction and saying no at the altar - if = { - limit = { - exists = scope:spouse_1 - exists = scope:spouse_2 - } - scope:spouse_1 = { save_scope_as = rejecting_betrothed } - scope:spouse_2 = { save_scope_as = rejected_betrothed } - root = { save_scope_as = actor } - } - scope:rejecting_betrothed.var:promised_grand_wedding_by ?= { save_scope_as = promising_host } - # Save the offended party - scope:rejected_betrothed = { - if = { - limit = { matchmaker != scope:rejected_betrothed } - matchmaker = { save_scope_as = rejected_betrothal_owner } - } - else = { save_scope_as = rejected_betrothal_owner } #The betrothed accepted the wedding for themselves - } - # First of all, the betrothal is broken - scope:rejecting_betrothed = { break_betrothal = scope:rejected_betrothed } - # If an alliance was connected to this, the alliance is broken - if = { - limit = { - yields_alliance = { - candidate = scope:rejecting_betrothed - target = scope:rejected_betrothal_owner - target_candidate = scope:rejected_betrothed - } - } - break_alliance = scope:rejected_betrothal_owner - } - # Opinion hit if there were no legitimate reason - scope:rejected_betrothed = { - if = { - limit = { - is_eunuch_trigger = no - scope:rejecting_betrothed = { is_eunuch_trigger = no } - NOR = { - scope:rejecting_betrothed = { - allowed_to_marry_same_sex_trigger = no - sex_same_as = scope:rejected_betrothed - } - AND = { - allowed_to_marry_same_sex_trigger = no - sex_same_as = scope:rejecting_betrothed - } - } - } - add_opinion = { - target = scope:actor - modifier = broke_betrothal_grand_wedding_opinion - opinion = -50 - } - if = { - limit = { scope:rejecting_betrothed != scope:actor } - add_opinion = { - target = scope:rejecting_betrothed - modifier = broke_betrothal_grand_wedding_opinion - opinion = -50 - } - } - if = { - limit = { this != scope:rejected_betrothal_owner } - scope:rejected_betrothal_owner = { - add_opinion = { - target = scope:actor - modifier = broke_betrothal_grand_wedding_opinion - opinion = -50 - } - if = { - limit = { scope:rejecting_betrothed != scope:actor } - add_opinion = { - target = scope:rejecting_betrothed - modifier = broke_betrothal_grand_wedding_opinion - opinion = -50 - } - } - } - } - } - } - # Regular Break Betrothal has a standard loss of prestige, but we need more - add_prestige_level = -1 - if = { - limit = { - OR = { - scope:rejected_betrothed = { highest_held_title_tier = tier_empire } - scope:rejected_betrothal_owner = { highest_held_title_tier = tier_empire } - } - } - add_prestige = monumental_prestige_loss - } - - else_if = { - limit = { - OR = { - scope:rejected_betrothed = { highest_held_title_tier = tier_kingdom } - scope:rejected_betrothal_owner = { highest_held_title_tier = tier_kingdom } - } - } - add_prestige = massive_prestige_loss - } - - else_if = { - limit = { - OR = { - scope:rejected_betrothed = { highest_held_title_tier = tier_duchy } - scope:rejected_betrothal_owner = { highest_held_title_tier = tier_duchy } - } - } - add_prestige = major_prestige_loss - } - - else_if = { - limit = { - OR = { - scope:rejected_betrothed = { highest_held_title_tier = tier_county } - scope:rejected_betrothal_owner = { highest_held_title_tier = tier_county } - } - } - add_prestige = medium_prestige_loss - } - - else_if = { - limit = { - OR = { - scope:rejected_betrothed = { highest_held_title_tier = tier_barony } - scope:rejected_betrothal_owner = { highest_held_title_tier = tier_barony } - } - } - add_prestige = minor_prestige_loss - } - else = { add_prestige = miniscule_prestige_loss } - # Start a Feud, if possible! - if = { - limit = { - has_dlc_feature = friends_and_foes - exists = scope:rejected_betrothal_owner.house.house_head - exists = scope:rejecting_betrothed.house.house_head - scope:rejected_betrothal_owner.house != scope:rejecting_betrothed.house - } - scope:rejected_betrothal_owner.house.house_head = { - if = { - limit = { this = scope:rejected_betrothed } # Rejected betrothed is also House Head - house_feud_start_effect = { - # Feuding House Head - ACTOR = scope:rejected_betrothal_owner.house.house_head - # Target House Head - TARGET = scope:rejecting_betrothed.house.house_head - # Feud Reason - REASON = head_broke_gw_betrothal - # House Member attacker if relevant - ATTACKER = scope:rejecting_betrothed - # House Member victim if relevant - VICTIM = scope:rejected_betrothed - } - } - else = { - house_feud_start_effect = { - # Feuding House Head - ACTOR = scope:rejected_betrothal_owner.house.house_head - # Target House Head - TARGET = scope:rejecting_betrothed.house.house_head - # Feud Reason - REASON = family_broke_gw_betrothal - # House Member attacker if relevant - ATTACKER = scope:rejecting_betrothed - # House Member victim if relevant - VICTIM = scope:rejected_betrothed - } - } - } - } - else = { - scope:rejected_betrothal_owner.house.house_head = { - change_house_relation_effect = { - HOUSE = scope:rejecting_betrothed.house - VALUE = house_relation_damage_medium_value - REASON = broke_grand_wedding_promise - CHAR = scope:rejecting_betrothed - TARGET_CHAR = scope:rejected_betrothed - TITLE = scope:dummy_gender - } - } - } - # If you say no at the altar, there are some extra consequences - if = { - limit = { - scope:rejecting_betrothed = { has_character_flag = grand_wedding_said_no } - } - scope:rejecting_betrothed = { - give_nickname = nick_the_naysayer - if = { - limit = { - this != scope:actor - } - reverse_add_opinion = { - target = scope:actor - modifier = challenged_authority_opinion - } - } - } - } - # Finally, the promise is wiped off - scope:rejecting_betrothed = { - var:promised_grand_wedding_by = { - remove_variable = promised_grand_wedding_marriage_countdown - } - remove_variable = promised_grand_wedding_by - } - scope:rejected_betrothed = { - remove_variable = promised_grand_wedding_by - } -} diff --git a/N3OW/common/scripted_effects/00_martial_lifestyle_effects.txt b/N3OW/common/scripted_effects/00_martial_lifestyle_effects.txt deleted file mode 100644 index 94d4d164..00000000 --- a/N3OW/common/scripted_effects/00_martial_lifestyle_effects.txt +++ /dev/null @@ -1,879 +0,0 @@ -#Effects used in Lifestyle Focus events - - -##################################################################### -# EFFECT LIST -##################################################################### -# !!! Remember to add all new effects with a short description here !!! -# - - -#giving_up_on_commander_trait_training_effect - Effect for when you give up on your commander training - -give_random_commander_trait_effect = { - random_list = { - 100 = { - trigger = { NOT = { has_trait = logistician } } - add_trait = logistician - } - 100 = { - trigger = { NOT = { has_trait = military_engineer } } - add_trait = military_engineer - } - 100 = { - trigger = { NOT = { has_trait = aggressive_attacker } } - add_trait = aggressive_attacker - } - 100 = { - trigger = { NOT = { has_trait = unyielding_defender } } - add_trait = unyielding_defender - } - 100 = { - trigger = { NOT = { has_trait = forder } } - add_trait = forder - } - 100 = { - trigger = { NOT = { has_trait = flexible_leader } } - add_trait = flexible_leader - } - 100 = { - trigger = { - NOT = { has_trait = desert_warrior } - any_sub_realm_barony = { - title_province = { - OR = { - terrain = desert - terrain = desert_mountains - terrain = oasis - terrain = drylands - } - } - } - } - add_trait = desert_warrior - } - 100 = { - trigger = { - NOT = { has_trait = jungle_stalker } - any_sub_realm_barony = { - title_province = { - terrain = jungle - } - } - } - add_trait = jungle_stalker - } - 100 = { - trigger = { - NOT = { has_trait = winter_soldier } - any_sub_realm_barony = { - title_province = { - OR = { - terrain = taiga - geographical_region = world_tibet - geographical_region = world_europe_north - geographical_region = world_europe_east - geographical_region = world_steppe - } - } - } - } - add_trait = winter_soldier - } - 100 = { - trigger = { - NOT = { has_trait = forest_fighter } - any_sub_realm_barony = { - title_province = { - OR = { - terrain = forest - terrain = taiga - } - } - } - } - add_trait = forest_fighter - } - 100 = { - trigger = { - NOT = { has_trait = open_terrain_expert } - any_sub_realm_barony = { - title_province = { - OR = { - terrain = plains - terrain = farmlands - terrain = steppe - } - } - } - } - add_trait = open_terrain_expert - } - 100 = { - trigger = { - NOT = { has_trait = rough_terrain_expert } - any_sub_realm_barony = { - title_province = { - OR = { - terrain = hills - terrain = mountains - terrain = wetlands - } - } - } - } - add_trait = rough_terrain_expert - } - 100 = { - trigger = { NOT = { has_trait = reaver } } - add_trait = reaver - } - 100 = { - trigger = { NOT = { has_trait = reckless } } - add_trait = reckless - } - 100 = { - trigger = { NOT = { has_trait = holy_warrior } } - add_trait = holy_warrior - } - 100 = { - trigger = { NOT = { has_trait = organizer } } - add_trait = organizer - } - 100 = { - trigger = { NOT = { has_trait = cautious_leader } } - add_trait = cautious_leader - } - } -} - -# Ensure that this effect stays up-to-date with all commander traits in 00_traits.txt -select_ct_for_teacher_to_teach_student_effect = { - random_list = { - 1 = { - trigger = { - $TEACHER$ = { has_trait = logistician } - $STUDENT$ = { NOT = { has_trait = logistician } } - } - $STUDENT$ = { - set_variable = { - name = commander_trait_being_taught - value = flag:logistician - } - } - } - 1 = { - trigger = { - $TEACHER$ = { has_trait = military_engineer } - $STUDENT$ = { NOT = { has_trait = military_engineer } } - } - $STUDENT$ = { - set_variable = { - name = commander_trait_being_taught - value = flag:military_engineer - } - } - } - 1 = { - trigger = { - $TEACHER$ = { has_trait = aggressive_attacker } - $STUDENT$ = { NOT = { has_trait = aggressive_attacker } } - } - $STUDENT$ = { - set_variable = { - name = commander_trait_being_taught - value = flag:aggressive_attacker - } - } - } - 1 = { - trigger = { - $TEACHER$ = { has_trait = unyielding_defender } - $STUDENT$ = { NOT = { has_trait = unyielding_defender } } - } - $STUDENT$ = { - set_variable = { - name = commander_trait_being_taught - value = flag:unyielding_defender - } - } - } - 1 = { - trigger = { - $TEACHER$ = { has_trait = forder } - $STUDENT$ = { NOT = { has_trait = forder } } - } - $STUDENT$ = { - set_variable = { - name = commander_trait_being_taught - value = flag:forder - } - } - } - 1 = { - trigger = { - $TEACHER$ = { has_trait = flexible_leader } - $STUDENT$ = { NOT = { has_trait = flexible_leader } } - } - $STUDENT$ = { - set_variable = { - name = commander_trait_being_taught - value = flag:flexible_leader - } - } - } - 1 = { - trigger = { - $TEACHER$ = { has_trait = desert_warrior } - $STUDENT$ = { NOT = { has_trait = desert_warrior } } - } - $STUDENT$ = { - set_variable = { - name = commander_trait_being_taught - value = flag:desert_warrior - } - } - } - 1 = { - trigger = { - $TEACHER$ = { has_trait = jungle_stalker } - $STUDENT$ = { NOT = { has_trait = jungle_stalker } } - } - $STUDENT$ = { - set_variable = { - name = commander_trait_being_taught - value = flag:jungle_stalker - } - } - } - 1 = { - trigger = { - $TEACHER$ = { has_trait = winter_soldier } - $STUDENT$ = { NOT = { has_trait = winter_soldier } } - } - $STUDENT$ = { - set_variable = { - name = commander_trait_being_taught - value = flag:winter_soldier - } - } - } - 1 = { - trigger = { - $TEACHER$ = { has_trait = reaver } - $STUDENT$ = { NOT = { has_trait = reaver } } - } - $STUDENT$ = { - set_variable = { - name = commander_trait_being_taught - value = flag:reaver - } - } - } - 1 = { - trigger = { - $TEACHER$ = { has_trait = reckless } - $STUDENT$ = { NOT = { has_trait = reckless } } - } - $STUDENT$ = { - set_variable = { - name = commander_trait_being_taught - value = flag:reckless - } - } - } - 1 = { - trigger = { - $TEACHER$ = { has_trait = holy_warrior } - $STUDENT$ = { NOT = { has_trait = holy_warrior } } - } - $STUDENT$ = { - set_variable = { - name = commander_trait_being_taught - value = flag:holy_warrior - } - } - } - 1 = { - trigger = { - $TEACHER$ = { has_trait = open_terrain_expert } - $STUDENT$ = { NOT = { has_trait = open_terrain_expert } } - } - $STUDENT$ = { - set_variable = { - name = commander_trait_being_taught - value = flag:open_terrain_expert - } - } - } - 1 = { - trigger = { - $TEACHER$ = { has_trait = rough_terrain_expert } - $STUDENT$ = { NOT = { has_trait = rough_terrain_expert } } - } - $STUDENT$ = { - set_variable = { - name = commander_trait_being_taught - value = flag:rough_terrain_expert - } - } - } - 1 = { - trigger = { - $TEACHER$ = { has_trait = forest_fighter } - $STUDENT$ = { NOT = { has_trait = forest_fighter } } - } - $STUDENT$ = { - set_variable = { - name = commander_trait_being_taught - value = flag:forest_fighter - } - } - } - 1 = { - trigger = { - $TEACHER$ = { has_trait = cautious_leader } - $STUDENT$ = { NOT = { has_trait = cautious_leader } } - } - $STUDENT$ = { - set_variable = { - name = commander_trait_being_taught - value = flag:cautious_leader - } - } - } - 1 = { - trigger = { - $TEACHER$ = { has_trait = organizer } - $STUDENT$ = { NOT = { has_trait = organizer } } - } - $STUDENT$ = { - set_variable = { - name = commander_trait_being_taught - value = flag:organizer - } - } - } - } -} - -discover_new_commander_trait_to_teach = { - random_list = { - 1 = { - trigger = { NOT = { has_trait = logistician } } - set_variable = { - name = commander_trait_being_taught - value = flag:logistician - } - } - 1 = { - trigger = { NOT = { has_trait = military_engineer } } - set_variable = { - name = commander_trait_being_taught - value = flag:military_engineer - } - } - 1 = { - trigger = { NOT = { has_trait = aggressive_attacker } } - set_variable = { - name = commander_trait_being_taught - value = flag:aggressive_attacker - } - } - 1 = { - trigger = { NOT = { has_trait = unyielding_defender } } - set_variable = { - name = commander_trait_being_taught - value = flag:unyielding_defender - } - } - 1 = { - trigger = { NOT = { has_trait = forder } } - set_variable = { - name = commander_trait_being_taught - value = flag:forder - } - } - 1 = { - trigger = { NOT = { has_trait = flexible_leader } } - set_variable = { - name = commander_trait_being_taught - value = flag:flexible_leader - } - } - 1 = { - trigger = { - exists = scope:teacher.location - scope:teacher.location = { - OR = { - terrain = oasis - terrain = desert - terrain = desert_mountains - } - } - NOT = { has_trait = desert_warrior } - } - set_variable = { - name = commander_trait_being_taught - value = flag:desert_warrior - } - } - 1 = { - trigger = { - exists = scope:teacher.location - scope:teacher.location = { - terrain = jungle - } - NOT = { has_trait = jungle_stalker } - } - set_variable = { - name = commander_trait_being_taught - value = flag:jungle_stalker - } - } - 1 = { - trigger = { - exists = scope:teacher.location - scope:teacher.location = { - OR = { - terrain = taiga - geographical_region = world_tibet - geographical_region = world_europe_north - geographical_region = world_europe_east - geographical_region = world_steppe - } - } - NOT = { has_trait = winter_soldier } - } - set_variable = { - name = commander_trait_being_taught - value = flag:winter_soldier - } - } - 1 = { - trigger = { NOT = { has_trait = reaver } } - set_variable = { - name = commander_trait_being_taught - value = flag:reaver - } - } - 1 = { - trigger = { NOT = { has_trait = reckless } } - set_variable = { - name = commander_trait_being_taught - value = flag:reckless - } - } - 1 = { - trigger = { NOT = { has_trait = holy_warrior } } - set_variable = { - name = commander_trait_being_taught - value = flag:holy_warrior - } - } - 1 = { - trigger = { NOT = { has_trait = open_terrain_expert } } - set_variable = { - name = commander_trait_being_taught - value = flag:open_terrain_expert - } - } - 1 = { - trigger = { NOT = { has_trait = rough_terrain_expert } } - set_variable = { - name = commander_trait_being_taught - value = flag:rough_terrain_expert - } - } - 1 = { - trigger = { - exists = scope:teacher.location - scope:teacher.location = { - OR = { - terrain = forest - terrain = taiga - } - } - NOT = { has_trait = forest_fighter } - } - set_variable = { - name = commander_trait_being_taught - value = flag:forest_fighter - } - } - 1 = { - trigger = { NOT = { has_trait = cautious_leader } } - set_variable = { - name = commander_trait_being_taught - value = flag:cautious_leader - } - } - 1 = { - trigger = { NOT = { has_trait = organizer } } - set_variable = { - name = commander_trait_being_taught - value = flag:organizer - } - } - } -} - -randomize_commander_trait_to_be_taught_effect = { - random_list = { - 100 = { - trigger = { - NOT = { has_trait = logistician } - scope:teacher = { - has_trait = logistician - } - } - set_variable = { - name = commander_trait_being_taught - value = flag:logistician - } - } - 100 = { - trigger = { - NOT = { has_trait = military_engineer } - scope:teacher = { - has_trait = military_engineer - } - } - set_variable = { - name = commander_trait_being_taught - value = flag:military_engineer - } - } - 100 = { - trigger = { - NOT = { has_trait = aggressive_attacker } - scope:teacher = { - has_trait = aggressive_attacker - } - } - set_variable = { - name = commander_trait_being_taught - value = flag:aggressive_attacker - } - } - 100 = { - trigger = { - NOT = { has_trait = unyielding_defender } - scope:teacher = { - has_trait = unyielding_defender - } - } - set_variable = { - name = commander_trait_being_taught - value = flag:unyielding_defender - } - } - 100 = { - trigger = { - NOT = { has_trait = forder } - scope:teacher = { - has_trait = forder - } - } - set_variable = { - name = commander_trait_being_taught - value = flag:forder - } - } - 100 = { - trigger = { - NOT = { has_trait = flexible_leader } - scope:teacher = { - has_trait = flexible_leader - } - } - set_variable = { - name = commander_trait_being_taught - value = flag:flexible_leader - } - } - 100 = { - trigger = { - NOT = { has_trait = desert_warrior } - scope:teacher = { - has_trait = desert_warrior - } - } - set_variable = { - name = commander_trait_being_taught - value = flag:desert_warrior - } - } - 100 = { - trigger = { - NOT = { has_trait = jungle_stalker } - scope:teacher = { - has_trait = jungle_stalker - } - } - set_variable = { - name = commander_trait_being_taught - value = flag:jungle_stalker - } - } - 100 = { - trigger = { - NOT = { has_trait = winter_soldier } - scope:teacher = { - has_trait = winter_soldier - } - } - set_variable = { - name = commander_trait_being_taught - value = flag:winter_soldier - } - } - 100 = { - trigger = { - NOT = { has_trait = reaver } - scope:teacher = { - has_trait = reaver - } - } - set_variable = { - name = commander_trait_being_taught - value = flag:reaver - } - } - 100 = { - trigger = { - NOT = { has_trait = reckless } - scope:teacher = { - has_trait = reckless - } - } - set_variable = { - name = commander_trait_being_taught - value = flag:reckless - } - } - 100 = { - trigger = { - NOT = { has_trait = holy_warrior } - scope:teacher = { - has_trait = holy_warrior - } - } - set_variable = { - name = commander_trait_being_taught - value = flag:holy_warrior - } - } - } - if = { #Fallback - limit = { - NOT = { exists = var:commander_trait_being_taught } - } - set_variable = { - name = commander_trait_being_taught - value = flag:flexible_leader - } - } -} - - -commander_trait_teaching_setup_effect = { - hidden_effect = { - trigger_event = { - on_action = learn_commander_trait_test - days = { 200 730 } - } - } - if = { - limit = { NOT = {has_relation_mentor = scope:teacher } } - set_relation_mentor = scope:teacher - } - else = { - save_scope_value_as = { - name = long_term_mentor - value = yes - } - } -} - - -giving_up_on_commander_trait_training_effect = { - custom_tooltip = learn_commander_trait.giving_up_tt - if = { - limit = { - scope:teacher = { is_alive = yes } - } - scope:teacher = { - add_opinion = { - target = root - modifier = gave_up_on_learn_commander_trait_opinion - } - } - } - if = { - limit = { - NOT = { exists = scope:long_term_mentor } - has_relation_mentor = scope:teacher - } - remove_relation_mentor = scope:teacher - } - remove_character_flag = being_taught_commander_trait - remove_variable = commander_trait_being_taught -} - - -learn_commander_trait_success_effect = { - remove_character_flag = being_taught_commander_trait - if = { - limit = { - has_relation_mentor = scope:teacher - NOT = { exists = scope:long_term_mentor } - scope:teacher = { - is_alive = yes - } - } - remove_relation_mentor = scope:teacher - } - if = { - limit = { - scope:teacher = { - is_alive = yes - } - } - hidden_effect = { - add_opinion = { - target = scope:teacher - modifier = taught_me_commander_trait_opinion - } - } - } - if = { - limit = { var:commander_trait_being_taught = flag:logistician } - add_trait = logistician - } - else_if = { - limit = { var:commander_trait_being_taught = flag:military_engineer } - add_trait = military_engineer - } - else_if = { - limit = { var:commander_trait_being_taught = flag:aggressive_attacker } - add_trait = aggressive_attacker - } - else_if = { - limit = { var:commander_trait_being_taught = flag:unyielding_defender } - add_trait = unyielding_defender - } - else_if = { - limit = { var:commander_trait_being_taught = flag:forder } - add_trait = forder - } - else_if = { - limit = { var:commander_trait_being_taught = flag:flexible_leader } - add_trait = flexible_leader - } - else_if = { - limit = { var:commander_trait_being_taught = flag:desert_warrior } - add_trait = desert_warrior - } - else_if = { - limit = { var:commander_trait_being_taught = flag:jungle_stalker } - add_trait = jungle_stalker - } - else_if = { - limit = { var:commander_trait_being_taught = flag:winter_soldier } - add_trait = winter_soldier - } - else_if = { - limit = { var:commander_trait_being_taught = flag:reaver } - add_trait = reaver - } - else_if = { - limit = { var:commander_trait_being_taught = flag:reckless } - add_trait = reckless - } - else_if = { - limit = { var:commander_trait_being_taught = flag:holy_warrior } - add_trait = holy_warrior - } - else_if = { - limit = { var:commander_trait_being_taught = flag:open_terrain_expert } - add_trait = open_terrain_expert - } - else_if = { - limit = { var:commander_trait_being_taught = flag:rough_terrain_expert } - add_trait = rough_terrain_expert - } - else_if = { - limit = { var:commander_trait_being_taught = flag:forest_fighter } - add_trait = forest_fighter - } - else_if = { - limit = { var:commander_trait_being_taught = flag:cautious_leader } - add_trait = cautious_leader - } - else_if = { - limit = { var:commander_trait_being_taught = flag:organizer } - add_trait = organizer - } -} - - -learn_commander_trait_final_test_duel_effect = { - duel = { - skill = martial - value = 10 - 10 = { - compare_modifier = { - value = scope:duel_value - } - desc = learn_commander_trait_final_test_success - custom_tooltip = learn_commander_trait_final_test_success_tt - trigger_event = { - on_action = learn_commander_trait_success - days = 1 - } - } - 10 = { - desc = learn_commander_trait_final_test_failure - custom_tooltip = learn_commander_trait_final_test_failure_tt - trigger_event = { - on_action = learn_commander_trait_failure - days = 1 - } - } - } -} - - - -martial_authority_special_1100_a_failure_effect = { - add_character_modifier = { - modifier = fought_a_seasoned_warrior - days = 3650 - } - random = { - chance = 33 - increase_wounds_effect = { REASON = training_accident } - } -} - - - -martial_authority_special_1100_soldier_friend_effects_effect = { - hidden_effect = { - set_relation_soldier_friend = scope:soldier_friend - set_relation_potential_friend = scope:soldier_friend - } - reverse_add_opinion = { - target = scope:soldier_friend - modifier = grateful_opinion - opinion = 15 - } - - add_hook = { - type = loyalty_hook - target = scope:soldier_friend - } - - add_courtier = scope:soldier_friend -} diff --git a/N3OW/common/scripted_effects/00_men_at_arms_effects.txt b/N3OW/common/scripted_effects/00_men_at_arms_effects.txt deleted file mode 100644 index 3baaeddc..00000000 --- a/N3OW/common/scripted_effects/00_men_at_arms_effects.txt +++ /dev/null @@ -1,13 +0,0 @@ - -##################################################################### -# EFFECT LIST -##################################################################### -# !!! Remember to add all new effects with a short description here !!! - -#spawn_heavy_infantry_army_effect - create a random fitting HI MAA army -#spawn_single_men_at_arms_army_effect - create a MAA army of a given type - -##################################################################### -# EFFECTS -##################################################################### - diff --git a/N3OW/common/scripted_effects/00_mongol_invasion_effects.txt b/N3OW/common/scripted_effects/00_mongol_invasion_effects.txt deleted file mode 100644 index f1ba1d44..00000000 --- a/N3OW/common/scripted_effects/00_mongol_invasion_effects.txt +++ /dev/null @@ -1,12646 +0,0 @@ -@creatable_successor_empire_county_threshold = 15 - - -# Give a suitable County to Genghis -give_temujin_land_effect = { - if = { - limit = { - OR = { - is_landed = no - highest_held_title_tier < tier_county - } - } - save_scope_as = genghis_khan - - create_title_and_vassal_change = { - type = conquest - save_scope_as = title_change - add_claim_on_loss = no - } - title:c_khentii = { - change_title_holder = { - holder = scope:genghis_khan - change = scope:title_change - } - } - resolve_title_and_vassal_change = scope:title_change - } - capital_county = { change_county_control = 100 } -} - -# A wild Genghis Khan appears! -spawn_temujin_character_effect = { - title:c_khentii.title_province = { - save_scope_as = temujins_birthplace - } - if = { - limit = { - exists = character:125501 - character:125501 = { - is_ai = no - } - } - character:125501 = { - save_scope_as = temujin - } - if = { - limit = { - #The DLC has our own BECOME GENGHIS stuff for players - has_mpo_dlc_trigger = no - } - scope:temujin = { - give_temujin_land_effect = yes - # Make temporarily immune to disease - add_character_flag = { - flag = immune_to_disease - years = 15 - } - - add_trait = greatest_of_khans - form_the_mongol_empire_effect = yes - add_prestige = 25000 - give_nickname = nick_genghis_khan - trigger_event = conqueror.0001 - } - } - else = { - scope:temujin = { - # Make temporarily immune to disease - add_character_flag = { - flag = immune_to_disease - years = 15 - } - trigger_event = conqueror.0001 - } - } - } - else_if = { - limit = { - exists = character:125501 - character:125501 = { is_physically_able_ai_adult = yes } - } - character:125501 = { - save_scope_as = temujin - } - scope:temujin = { - # Make temporarily immune to disease - add_character_flag = { - flag = immune_to_disease - years = 15 - } - - add_trait = greatest_of_khans - give_temujin_land_effect = yes - add_gold = 5000 - add_dread = high_dread - spawn_temujins_court_effect = yes - form_the_mongol_empire_effect = yes - add_prestige = 25000 - if = { - limit = { - has_mpo_dlc_trigger = no - NOT = { has_perk = peacemaker_perk } - } - add_perk = peacemaker_perk - } - remove_trait = education_diplomacy_1 - remove_trait = education_diplomacy_2 - remove_trait = education_diplomacy_3 - remove_trait = education_diplomacy_4 - remove_trait = education_diplomacy_5 - remove_trait = education_intrigue_1 - remove_trait = education_intrigue_2 - remove_trait = education_intrigue_3 - remove_trait = education_intrigue_4 - remove_trait = education_intrigue_5 - remove_trait = education_stewardship_1 - remove_trait = education_stewardship_2 - remove_trait = education_stewardship_3 - remove_trait = education_stewardship_4 - remove_trait = education_stewardship_5 - remove_trait = education_learning_1 - remove_trait = education_learning_2 - remove_trait = education_learning_3 - remove_trait = education_learning_4 - remove_trait = education_learning_5 - remove_trait = education_martial_1 - remove_trait = education_martial_2 - remove_trait = education_martial_3 - remove_trait = education_martial_4 - add_trait = education_martial_5 - add_trait = flexible_leader - add_trait = athletic - if = { - limit = { has_dlc_feature = tours_and_tournaments } - add_trait = tourney_participant - add_random_tiered_trait_track_xp_effect = { - TRAIT = lifestyle_hunter - TRACK = hunter - LEVEL_1 = yes - LEVEL_3 = no - } - add_random_tiered_trait_track_xp_effect = { - TRAIT = tourney_participant - TRACK = horse - LEVEL_1 = yes - LEVEL_3 = yes - } - add_random_tiered_trait_track_xp_effect = { - TRAIT = tourney_participant - TRACK = bow - LEVEL_1 = yes - LEVEL_3 = yes - } - } - dynasty = { - add_dynasty_prestige_level = 5 - add_dynasty_prestige = 10000 - add_dynasty_perk = warfare_legacy_1 - add_dynasty_perk = warfare_legacy_2 - add_dynasty_perk = warfare_legacy_3 - add_dynasty_perk = warfare_legacy_4 - add_dynasty_perk = warfare_legacy_5 - if = { - limit = { - has_dlc_feature = hybridize_culture - } - add_dynasty_perk = ep1_culture_legacy_1 - } - } - give_nickname = nick_genghis_khan - } - } - else_if = { - limit = { - exists = character:125501.dynasty - character:125501.dynasty = { - any_dynasty_member = { - is_ai = no - is_landed = yes - } - } - } - character:125501.dynasty = { - random_dynasty_member = { - limit = { - is_ai = no - is_landed = yes - } - save_scope_as = temujin - } - } - if = { - limit = { has_mpo_dlc_trigger = no } - scope:temujin = { - # Make temporarily immune to disease - add_character_flag = { - flag = immune_to_disease - years = 15 - } - - add_trait = greatest_of_khans - form_the_mongol_empire_effect = yes - add_prestige = 25000 - give_nickname = nick_genghis_khan - trigger_event = conqueror.0001 - } - } - else = { - scope:temujin = { - # Make temporarily immune to disease - add_character_flag = { - flag = immune_to_disease - years = 15 - } - trigger_event = conqueror.0001 - } - } - } - else_if = { - limit = { - exists = character:125501.dynasty - character:125501.dynasty = { - any_dynasty_member = { - is_physically_able_ai_adult = yes - } - } - } - character:125501.dynasty = { - random_dynasty_member = { - limit = { - is_physically_able_ai_adult = yes - is_landed = yes - } - alternative_limit = { - is_physically_able_ai_adult = yes - } - save_scope_as = temujin - } - } - scope:temujin = { - # Make temporarily immune to disease - add_character_flag = { - flag = immune_to_disease - years = 15 - } - - add_trait = greatest_of_khans - give_temujin_land_effect = yes - add_gold = 5000 - add_dread = high_dread - spawn_temujins_court_effect = yes - form_the_mongol_empire_effect = yes - add_prestige = 25000 - if = { - limit = { - has_mpo_dlc_trigger = no - NOT = { has_perk = peacemaker_perk } - } - add_perk = peacemaker_perk - } - remove_trait = education_diplomacy_1 - remove_trait = education_diplomacy_2 - remove_trait = education_diplomacy_3 - remove_trait = education_diplomacy_4 - remove_trait = education_diplomacy_5 - remove_trait = education_intrigue_1 - remove_trait = education_intrigue_2 - remove_trait = education_intrigue_3 - remove_trait = education_intrigue_4 - remove_trait = education_intrigue_5 - remove_trait = education_stewardship_1 - remove_trait = education_stewardship_2 - remove_trait = education_stewardship_3 - remove_trait = education_stewardship_4 - remove_trait = education_stewardship_5 - remove_trait = education_learning_1 - remove_trait = education_learning_2 - remove_trait = education_learning_3 - remove_trait = education_learning_4 - remove_trait = education_learning_5 - remove_trait = education_martial_1 - remove_trait = education_martial_2 - remove_trait = education_martial_3 - remove_trait = education_martial_4 - add_trait = education_martial_5 - add_trait = flexible_leader - add_trait = athletic - if = { - limit = { has_dlc_feature = tours_and_tournaments } - add_trait = tourney_participant - add_random_tiered_trait_track_xp_effect = { - TRAIT = lifestyle_hunter - TRACK = hunter - LEVEL_1 = yes - LEVEL_3 = no - } - add_random_tiered_trait_track_xp_effect = { - TRAIT = tourney_participant - TRACK = horse - LEVEL_1 = yes - LEVEL_3 = yes - } - add_random_tiered_trait_track_xp_effect = { - TRAIT = tourney_participant - TRACK = bow - LEVEL_1 = yes - LEVEL_3 = yes - } - } - dynasty = { - add_dynasty_prestige_level = 5 - add_dynasty_prestige = 10000 - add_dynasty_perk = warfare_legacy_1 - add_dynasty_perk = warfare_legacy_2 - add_dynasty_perk = warfare_legacy_3 - add_dynasty_perk = warfare_legacy_4 - add_dynasty_perk = warfare_legacy_5 - if = { - limit = { - has_dlc_feature = hybridize_culture - } - add_dynasty_perk = ep1_culture_legacy_1 - } - } - give_nickname = nick_genghis_khan - } - } - else_if = { - limit = { - #Generate Temujin if there has BEEN NO Temujin - NOT = { - has_global_variable = temujin_was_born - } - } - if = { - limit = { has_game_rule = inversed_gender_equality } - create_character = { - name = "Borte" # AKA: Genghis Khan's wife - gender = female - location = scope:temujins_birthplace - template = borte_character_template - save_scope_as = temujin - } - scope:temujin = { - # Make temporarily immune to disease - add_character_flag = { - flag = immune_to_disease - years = 15 - } - - add_trait = greatest_of_khans - give_temujin_land_effect = yes - add_gold = 5000 - add_dread = high_dread - spawn_temujins_court_effect = yes - form_the_mongol_empire_effect = yes - add_prestige = 25000 - give_nickname = nick_genghis_khan - if = { - limit = { - has_mpo_dlc_trigger = no - NOT = { has_perk = peacemaker_perk } - } - add_perk = peacemaker_perk - } - dynasty = { - add_dynasty_prestige_level = 5 - add_dynasty_prestige = 10000 - add_dynasty_perk = warfare_legacy_1 - add_dynasty_perk = warfare_legacy_2 - add_dynasty_perk = warfare_legacy_3 - add_dynasty_perk = warfare_legacy_4 - add_dynasty_perk = warfare_legacy_5 - if = { - limit = { - has_dlc_feature = hybridize_culture - } - add_dynasty_perk = ep1_culture_legacy_1 - } - } - } - } - else_if = { - limit = { has_game_rule = full_gender_equality } - random_list = { - #Female Ghengis Khan. - 50 = { - create_character = { - name = "Borte" # AKA: Genghis Khan's wife - gender = female - location = scope:temujins_birthplace - template = borte_character_template - save_scope_as = temujin - } - scope:temujin = { - # Make temporarily immune to disease - add_character_flag = { - flag = immune_to_disease - years = 15 - } - - add_trait = greatest_of_khans - give_temujin_land_effect = yes - add_gold = 5000 - add_dread = high_dread - spawn_temujins_court_effect = yes - form_the_mongol_empire_effect = yes - add_prestige = 25000 - give_nickname = nick_genghis_khan - if = { - limit = { - has_mpo_dlc_trigger = no - NOT = { has_perk = peacemaker_perk } - } - add_perk = peacemaker_perk - } - dynasty = { - add_dynasty_prestige_level = 5 - add_dynasty_prestige = 10000 - add_dynasty_perk = warfare_legacy_1 - add_dynasty_perk = warfare_legacy_2 - add_dynasty_perk = warfare_legacy_3 - add_dynasty_perk = warfare_legacy_4 - add_dynasty_perk = warfare_legacy_5 - if = { - limit = { - has_dlc_feature = hybridize_culture - } - add_dynasty_perk = ep1_culture_legacy_1 - } - } - } - } - #Male Ghengis Khan. - 50 = { - create_character = { - name = "Temujin" # AKA: Genghis Khan - location = scope:temujins_birthplace - template = genghis_khan_character_template - save_scope_as = temujin - } - scope:temujin = { - # Make temporarily immune to disease - add_character_flag = { - flag = immune_to_disease - years = 15 - } - - add_trait = greatest_of_khans - give_temujin_land_effect = yes - add_gold = 5000 - add_dread = high_dread - spawn_temujins_court_effect = yes - form_the_mongol_empire_effect = yes - add_prestige = 25000 - give_nickname = nick_genghis_khan - if = { - limit = { - has_mpo_dlc_trigger = no - NOT = { has_perk = peacemaker_perk } - } - add_perk = peacemaker_perk - } - dynasty = { - add_dynasty_prestige_level = 5 - add_dynasty_prestige = 10000 - add_dynasty_perk = warfare_legacy_1 - add_dynasty_perk = warfare_legacy_2 - add_dynasty_perk = warfare_legacy_3 - add_dynasty_perk = warfare_legacy_4 - add_dynasty_perk = warfare_legacy_5 - if = { - limit = { - has_dlc_feature = hybridize_culture - } - add_dynasty_perk = ep1_culture_legacy_1 - } - } - } - } - } - } - else = { - create_character = { - name = "Temujin" # AKA: Genghis Khan - location = scope:temujins_birthplace - template = genghis_khan_character_template - save_scope_as = temujin - } - scope:temujin = { - # Make temporarily immune to disease - add_character_flag = { - flag = immune_to_disease - years = 15 - } - - add_trait = greatest_of_khans - give_temujin_land_effect = yes - add_gold = 5000 - add_dread = high_dread - spawn_temujins_court_effect = yes - form_the_mongol_empire_effect = yes - add_prestige = 25000 - give_nickname = nick_genghis_khan - if = { - limit = { - has_mpo_dlc_trigger = no - NOT = { has_perk = peacemaker_perk } - } - add_perk = peacemaker_perk - } - dynasty = { - add_dynasty_prestige_level = 5 - add_dynasty_prestige = 10000 - add_dynasty_perk = warfare_legacy_1 - add_dynasty_perk = warfare_legacy_2 - add_dynasty_perk = warfare_legacy_3 - add_dynasty_perk = warfare_legacy_4 - add_dynasty_perk = warfare_legacy_5 - if = { - limit = { - has_dlc_feature = hybridize_culture - } - add_dynasty_perk = ep1_culture_legacy_1 - } - } - } - } - set_global_variable = { - name = temujin_was_born - value = scope:temujin - } - } - #Create a character... but they're random, not Temujin - else = { - create_character = { - location = scope:temujins_birthplace - template = dynamic_genghis_character_template - save_scope_as = temujin - } - scope:temujin = { - # Make temporarily immune to disease - add_character_flag = { - flag = immune_to_disease - years = 15 - } - add_trait = greatest_of_khans - give_temujin_land_effect = yes - add_gold = 5000 - add_dread = high_dread - spawn_dynamic_mongol_court_effect = yes - form_the_mongol_empire_effect = yes - add_prestige = 25000 - give_nickname = nick_genghis_khan - if = { - limit = { - has_mpo_dlc_trigger = no - NOT = { has_perk = peacemaker_perk } - } - add_perk = peacemaker_perk - } - dynasty = { - add_dynasty_prestige_level = 5 - add_dynasty_prestige = 10000 - add_dynasty_perk = warfare_legacy_1 - add_dynasty_perk = warfare_legacy_2 - add_dynasty_perk = warfare_legacy_3 - add_dynasty_perk = warfare_legacy_4 - add_dynasty_perk = warfare_legacy_5 - if = { - limit = { - has_dlc_feature = hybridize_culture - } - add_dynasty_perk = ep1_culture_legacy_1 - } - } - } - } - - if = { - limit = { - scope:temujin = { - is_ai = yes - } - } - if = { - limit = { - situation:dynastic_cycle ?= { - situation_top_has_catalyst = catalyst_event_mongol_empire_appears - } - } - situation:dynastic_cycle = { - trigger_situation_catalyst = { - catalyst = catalyst_event_mongol_empire_appears - character = scope:temujin - } - } - } - #Event for MPO dlc owners - if = { - limit = { - has_mpo_dlc_trigger = yes - } - every_player = { - trigger_event = mpo_greatest_of_khans.1001 #Genghis notification event - } - } - else = { - #Normal event - every_player = { - limit = { - NOT = { - this = scope:temujin - } - } - trigger_event = mongol_invasion.1002 # Mongol Empire spawned notification - } - } - } -} - - -# Form the actual Mongol Empire... -form_the_mongol_empire_effect = { - save_scope_as = mongol_founder - - if = { - limit = { - is_tributary = yes - } - end_tributary = yes - } - if = { - limit = { - is_confederation_member = yes - } - scope:mongol_founder.confederation = { - remove_confederation_member = scope:mongol_founder - } - if = { - limit = { - government_has_flag = government_is_nomadic - } - show_as_tooltip = { - remove_character_modifier = mpo_confederation_member_modifier - } - } - } - - #Create the title - create_title_and_vassal_change = { - type = created - save_scope_as = title_change - add_claim_on_loss = no - } - title:e_mongol_empire = { - change_title_holder = { - holder = scope:mongol_founder - change = scope:title_change - } - } - resolve_title_and_vassal_change = scope:title_change - - - if = { - limit = { - is_independent_ruler = no - } - create_title_and_vassal_change = { - type = independency - save_scope_as = indpendence_change - add_claim_on_loss = no - } - becomes_independent = { - change = scope:indpendence_change - } - resolve_title_and_vassal_change = scope:indpendence_change - } - - if = { - limit = { - capital_county = { - title_province = { - has_holding_type = herder_holding - } - } - } - capital_county = { - title_province = { - set_holding_type = nomad_holding - } - } - } - if = { - limit = { - has_mpo_dlc_trigger = yes - NOT = { - government_has_flag = government_is_nomadic - } - } - change_government = nomad_government - add_trait_force_tooltip = nomadic_philosophy - } - else_if = { - limit = { - has_mpo_dlc_trigger = no - NOT = { - government_has_flag = government_is_tribal - } - } - change_government = tribal_government - } - if = { - limit = { - government_has_flag = government_is_tribal - } - if = { - limit = { has_realm_law = tribal_authority_0 } - remove_realm_law = tribal_authority_0 - } - if = { - limit = { has_realm_law = tribal_authority_1 } - remove_realm_law = tribal_authority_1 - } - if = { - limit = { has_realm_law = tribal_authority_3 } - remove_realm_law = tribal_authority_3 - } - add_realm_law_skip_effects = tribal_authority_2 - - add_realm_law_skip_effects = high_partition_succession_law - } - if = { - limit = { - government_has_flag = government_is_nomadic - } - if = { - limit = { has_realm_law = nomadic_authority_1 } - remove_realm_law = nomadic_authority_1 - } - if = { - limit = { has_realm_law = nomadic_authority_2 } - remove_realm_law = nomadic_authority_2 - } - if = { - limit = { has_realm_law = nomadic_authority_3 } - remove_realm_law = nomadic_authority_3 - } - if = { - limit = { has_realm_law = nomadic_authority_4 } - remove_realm_law = nomadic_authority_4 - } - add_realm_law_skip_effects = nomadic_authority_5 - domicile ?= { - switch = { - trigger = has_domicile_building - yurt_main_01 = { - add_domicile_building = yurt_main_02 - add_domicile_building = yurt_main_03 - add_domicile_building = yurt_main_04 - add_domicile_building = yurt_main_05 - } - yurt_main_02 = { - add_domicile_building = yurt_main_03 - add_domicile_building = yurt_main_04 - add_domicile_building = yurt_main_05 - } - yurt_main_03 = { - add_domicile_building = yurt_main_04 - add_domicile_building = yurt_main_05 - } - yurt_main_04 = { - add_domicile_building = yurt_main_05 - } - } - } - if = { - limit = { - exists = domicile - domicile = { - free_external_domicile_building_slots >= 1 - NOT = { - has_domicile_building_or_higher = mass_warfare_yurt_01 - } - } - } - domicile = { - add_domicile_building = mass_warfare_yurt_01 - add_domicile_building = mass_warfare_yurt_02 - add_domicile_building = mass_warfare_yurt_03 - add_domicile_building = mass_warfare_yurt_04 - } - } - if = { - limit = { - exists = domicile - domicile = { - free_external_domicile_building_slots >= 1 - NOT = { - has_domicile_building_or_higher = character_warfare_yurt_03 - } - } - } - domicile = { - add_domicile_building = character_warfare_yurt_01 - add_domicile_building = character_warfare_yurt_02 - add_domicile_building = character_warfare_yurt_03 - add_domicile_building = character_warfare_yurt_04 - } - } - domicile = { - change_herd = { - add = nomadic_authority_level_5_requirement - } - } - } - - assert_if = { - limit = { NOT = { exists = title:e_mongol_empire } } - text = "Mongol Empire title was not created!" - } - - hidden_effect = { set_primary_title_to = title:e_mongol_empire } - - every_held_title = { - title_tier = empire - limit = { - NOT = { this = title:e_mongol_empire } - } - scope:mongol_founder = { - destroy_title = prev - } - } - - spawn_mongol_troops_effect = yes - - set_global_variable = { - name = mongol_empire_has_spawned - value = yes - } - - #Make sure that Genghis is crowned - #Anointed if he must be anointed - if = { - limit = { - OR = { - has_realm_law = uncrowned - has_realm_law = crowned_king - } - faith = { has_doctrine = doctrine_imperial_anointment } - } - if = { - limit = { - NOT = { - has_game_rule = coronation_laws_off - } - } - add_realm_law = crowned_emperor - } - set_variable = crowned_emperor_var - if = { - limit = { - has_variable = crowned_king_var - } - remove_variable = crowned_king_var - } - } - else_if = { - limit = { - has_realm_law = uncrowned - } - if = { - limit = { - NOT = { - has_game_rule = coronation_laws_off - } - } - add_realm_law = crowned_king - } - set_variable = crowned_king_var - } -} - -# Make sure the Empire has troops... -spawn_mongol_troops_effect = { - if = { - limit = { - has_mpo_dlc_trigger = yes - } - spawn_army = { - uses_supply = no - inheritable = yes - name = mongol_event_troops - men_at_arms = { - type = mangudai - stacks = 14 - } - men_at_arms = { - type = heavy_horse_archers - stacks = 10 - } - men_at_arms = { - type = steppe_raiders - stacks = 10 - } - men_at_arms = { - type = nomad_lancers - stacks = 5 - } - men_at_arms = { - type = trebuchet - stacks = 5 - } - men_at_arms = { - type = trebuchet - stacks = 5 - } - location = capital_province - origin = capital_province - } - spawn_army = { - uses_supply = no - inheritable = yes - name = mongol_event_troops - men_at_arms = { - type = mangudai - stacks = 10 - } - men_at_arms = { - type = horse_archers - stacks = 10 - } - men_at_arms = { - type = steppe_raiders - stacks = 10 - } - men_at_arms = { - type = steppe_raiders - stacks = 10 - } - men_at_arms = { - type = nomad_lancers - stacks = 3 - } - men_at_arms = { - type = trebuchet - stacks = 5 - } - location = capital_province - origin = capital_province - } - spawn_army = { - uses_supply = no - inheritable = yes - name = mongol_event_troops - men_at_arms = { - type = mangudai - stacks = 10 - } - men_at_arms = { - type = horse_archers - stacks = 10 - } - men_at_arms = { - type = steppe_raiders - stacks = 10 - } - men_at_arms = { - type = steppe_raiders - stacks = 10 - } - men_at_arms = { - type = nomad_lancers - stacks = 3 - } - men_at_arms = { - type = trebuchet - stacks = 5 - } - location = capital_province - origin = capital_province - } - spawn_army = { - uses_supply = no - inheritable = yes - name = mongol_event_troops - men_at_arms = { - type = mangudai - stacks = 10 - } - men_at_arms = { - type = horse_archers - stacks = 10 - } - men_at_arms = { - type = heavy_horse_archers - stacks = 10 - } - men_at_arms = { - type = steppe_raiders - stacks = 10 - } - men_at_arms = { - type = nomad_lancers - stacks = 3 - } - men_at_arms = { - type = trebuchet - stacks = 5 - } - location = capital_province - origin = capital_province - } - spawn_army = { - uses_supply = no - inheritable = yes - name = mongol_event_troops - men_at_arms = { - type = horse_archers - stacks = 5 - } - men_at_arms = { - type = steppe_raiders - stacks = 20 - } - men_at_arms = { - type = torch_bearers - stacks = 5 - } - location = capital_province - origin = capital_province - } - spawn_army = { - uses_supply = no - inheritable = yes - name = mongol_event_troops - men_at_arms = { - type = horse_archers - stacks = 5 - } - men_at_arms = { - type = steppe_raiders - stacks = 20 - } - men_at_arms = { - type = torch_bearers - stacks = 5 - } - location = capital_province - origin = capital_province - } - } - else = { - spawn_army = { - uses_supply = no - inheritable = no - name = mongol_event_troops - men_at_arms = { - type = horse_archers - stacks = 14 - } - men_at_arms = { - type = light_horsemen - stacks = 10 - } - men_at_arms = { - type = light_horsemen - stacks = 10 - } - men_at_arms = { - type = armored_horsemen - stacks = 5 - } - men_at_arms = { - type = trebuchet - stacks = 5 - } - men_at_arms = { - type = trebuchet - stacks = 5 - } - location = capital_province - origin = capital_province - } - spawn_army = { - uses_supply = no - inheritable = no - name = mongol_event_troops - levies = { - value = 5000 - } - men_at_arms = { - type = horse_archers - stacks = 10 - } - men_at_arms = { - type = horse_archers - stacks = 10 - } - men_at_arms = { - type = light_horsemen - stacks = 10 - } - men_at_arms = { - type = light_horsemen - stacks = 10 - } - men_at_arms = { - type = armored_horsemen - stacks = 3 - } - men_at_arms = { - type = trebuchet - stacks = 5 - } - location = capital_province - origin = capital_province - } - spawn_army = { - uses_supply = no - inheritable = no - name = mongol_event_troops - levies = { - value = 5000 - } - men_at_arms = { - type = horse_archers - stacks = 10 - } - men_at_arms = { - type = horse_archers - stacks = 10 - } - men_at_arms = { - type = light_horsemen - stacks = 10 - } - men_at_arms = { - type = light_horsemen - stacks = 10 - } - men_at_arms = { - type = armored_horsemen - stacks = 3 - } - men_at_arms = { - type = trebuchet - stacks = 5 - } - location = capital_province - origin = capital_province - } - spawn_army = { - uses_supply = no - inheritable = no - name = mongol_event_troops - levies = { - value = 5000 - } - men_at_arms = { - type = horse_archers - stacks = 10 - } - men_at_arms = { - type = horse_archers - stacks = 10 - } - men_at_arms = { - type = light_horsemen - stacks = 10 - } - men_at_arms = { - type = light_horsemen - stacks = 10 - } - men_at_arms = { - type = armored_horsemen - stacks = 3 - } - men_at_arms = { - type = trebuchet - stacks = 5 - } - location = capital_province - origin = capital_province - } - } -} - -spawn_mongol_troops_condensed_effect = { - if = { - limit = { - has_mpo_dlc_trigger = yes - } - spawn_army = { - uses_supply = no - inheritable = no - name = mongol_event_troops - men_at_arms = { - type = horse_archers - stacks = 40 - } - men_at_arms = { - type = steppe_raiders - stacks = 100 - } - men_at_arms = { - type = heavy_horse_archers - stacks = 20 - } - men_at_arms = { - type = mangudai - stacks = 44 - } - men_at_arms = { - type = nomad_lancers - stacks = 14 - } - men_at_arms = { - type = trebuchet - stacks = 25 - } - men_at_arms = { - type = torch_bearers - stacks = 10 - } - location = capital_province - origin = capital_province - } - } - else = { - spawn_army = { - uses_supply = no - inheritable = no - name = mongol_event_troops - levies = { - value = 15000 - } - men_at_arms = { - type = horse_archers - stacks = 74 - } - men_at_arms = { - type = light_horsemen - stacks = 70 - } - men_at_arms = { - type = light_horsemen - stacks = 10 - } - men_at_arms = { - type = armored_horsemen - stacks = 14 - } - men_at_arms = { - type = trebuchet - stacks = 25 - } - location = capital_province - origin = capital_province - } - } -} - -spawn_mongol_successor_state_troops_effect = { - if = { - limit = { - has_mpo_dlc_trigger = yes - } - spawn_army = { - uses_supply = no - inheritable = yes - name = mongol_event_troops - men_at_arms = { - type = nomadic_riders - stacks = 7 - } - men_at_arms = { - type = mangudai - stacks = 5 - } - men_at_arms = { - type = steppe_raiders - stacks = 5 - } - men_at_arms = { - type = trebuchet - stacks = 3 - } - location = capital_province - origin = capital_province - } - spawn_army = { - uses_supply = no - inheritable = yes - name = mongol_event_troops - men_at_arms = { - type = nomadic_riders - stacks = 7 - } - men_at_arms = { - type = horse_archers - stacks = 5 - } - men_at_arms = { - type = nomad_lancers - stacks = 5 - } - men_at_arms = { - type = trebuchet - stacks = 3 - } - location = capital_province - origin = capital_province - } - spawn_army = { - uses_supply = no - inheritable = yes - name = mongol_event_troops - men_at_arms = { - type = nomadic_riders - stacks = 7 - } - men_at_arms = { - type = horse_archers - stacks = 5 - } - men_at_arms = { - type = heavy_horse_archers - stacks = 5 - } - men_at_arms = { - type = trebuchet - stacks = 3 - } - location = capital_province - origin = capital_province - } - } - else = { - spawn_army = { - uses_supply = no - inheritable = yes - name = mongol_event_troops - levies = { - value = 1000 - } - men_at_arms = { - type = horse_archers - stacks = 5 - } - men_at_arms = { - type = light_horsemen - stacks = 5 - } - men_at_arms = { - type = trebuchet - stacks = 3 - } - location = capital_province - origin = capital_province - } - spawn_army = { - uses_supply = no - inheritable = yes - name = mongol_event_troops - levies = { - value = 1000 - } - men_at_arms = { - type = horse_archers - stacks = 5 - } - men_at_arms = { - type = light_horsemen - stacks = 5 - } - men_at_arms = { - type = trebuchet - stacks = 3 - } - location = capital_province - origin = capital_province - } - spawn_army = { - uses_supply = no - inheritable = yes - name = mongol_event_troops - levies = { - value = 1000 - } - men_at_arms = { - type = horse_archers - stacks = 5 - } - men_at_arms = { - type = light_horsemen - stacks = 5 - } - men_at_arms = { - type = trebuchet - stacks = 3 - } - location = capital_province - origin = capital_province - } - } - -} - -### Populating the life of Temujin... -spawn_temujins_court_effect = { - add_character_flag = is_temujin - if = { - limit = { - is_married = no - } - if = { - limit = { - scope:temujin = { is_female = yes } - } - # Create Temujin (husband)... - create_character = { - template = genghis_khan_character_template - name = "Temujin" # Husband of Temujin - employer = scope:temujin - save_scope_as = borte - } - } - else = { - # Create Borte (wife)... - create_character = { - template = borte_character_template - name = "Borte" # Wife of Temujin - gender = female - employer = scope:temujin - save_scope_as = borte - } - } - scope:borte = { - marry = scope:temujin - # Make temporarily immune to disease - add_character_flag = { - flag = immune_to_disease - years = 10 - } - } - if = { - limit = { - scope:temujin = { is_male = yes } - } - scope:temujin = { save_scope_as = great_khan_family_father } - scope:borte = { save_scope_as = great_khan_family_mother } - } - else = { - scope:temujin = { save_scope_as = great_khan_family_mother } - scope:borte = { save_scope_as = great_khan_family_father } - } - - # Create Jochi (son)... - create_character = { - template = jochi_character_template - name = "Jochi" # (Oldest son of Temujin and Borte) - employer = scope:temujin - mother = scope:great_khan_family_mother - father = scope:great_khan_family_father - save_scope_as = jochi - } - scope:jochi = { - # Make temporarily immune to disease - add_character_flag = { - flag = immune_to_disease - years = 10 - } - } - - # Create Tolui (son)... - create_character = { - template = tolui_character_template - name = "Tolui" # (Son of Temujin and Borte) - employer = scope:temujin - mother = scope:great_khan_family_mother - father = scope:great_khan_family_father - save_scope_as = tolui - } - - scope:tolui = { - # Make temporarily immune to disease - add_character_flag = { - flag = immune_to_disease - years = 10 - } - } - - # Create Chagatai (son)... - create_character = { - template = chagatai_character_template - name = "Chagatai" # (Son of Temujin and Borte) - employer = scope:temujin - mother = scope:great_khan_family_mother - father = scope:great_khan_family_father - save_scope_as = chagatai - } - - scope:chagatai = { - # Make temporarily immune to disease - add_character_flag = { - flag = immune_to_disease - years = 10 - } - - #Make it more likely that he gets a good martial education - hidden_effect = { - education_point_acquisition_effect = yes - education_point_acquisition_effect = yes - } - } - - # Create Ögedei (son)... - create_character = { - template = ogodei_character_template - name = "Ogodei" # Ögedei Khan (# Son of Temujin and Borte) - employer = scope:temujin - mother = scope:great_khan_family_mother - father = scope:great_khan_family_father - save_scope_as = ogodei - } - - scope:ogodei = { - # Make temporarily immune to disease - add_character_flag = { - flag = immune_to_disease - years = 10 - } - - #Make it more likely that he gets a good martial education - hidden_effect = { - education_point_acquisition_effect = yes - education_point_acquisition_effect = yes - } - } - - # Create Altun Begi (Daughter)... - create_character = { - template = altun_begi_character_template - name = "Altun_Begi" # (Daughter of Temujin) - employer = scope:temujin - gender = female - father = scope:great_khan_family_father - save_scope_as = altun_begi - } - - scope:altun_begi = { - # Make temporarily immune to disease - add_character_flag = { - flag = immune_to_disease - years = 10 - } - } - } - - # Create Subutai (Commander)... - create_character = { - template = subutai_character_template - name = "Subutai" # (Temujin's Commander of armies) - employer = scope:temujin - save_scope_as = subutai - } - - scope:subutai = { - # Make temporarily immune to disease - add_character_flag = { - flag = immune_to_disease - years = 10 - } - # Set friendship with Temujin - set_random_friendship_reason = { TARGET = scope:temujin } - } - - # Spawn some generic Bagathurs - create_character = { - gender_female_chance = temujin_soldier_female_chance - employer = scope:temujin - template = new_warrior_character - faith = scope:temujin.faith - culture = scope:temujin.culture - } - create_character = { - gender_female_chance = temujin_soldier_female_chance - employer = scope:temujin - template = new_warrior_character - faith = scope:temujin.faith - culture = scope:temujin.culture - } - create_character = { - gender_female_chance = temujin_soldier_female_chance - employer = scope:temujin - template = new_warrior_character - faith = scope:temujin.faith - culture = scope:temujin.culture - } - create_character = { - gender_female_chance = temujin_soldier_female_chance - employer = scope:temujin - template = new_warrior_character - faith = scope:temujin.faith - culture = scope:temujin.culture - } - create_character = { - gender_female_chance = temujin_soldier_female_chance - employer = scope:temujin - template = new_warrior_character - faith = scope:temujin.faith - culture = scope:temujin.culture - } - create_character = { - gender_female_chance = temujin_soldier_female_chance - employer = scope:temujin - template = new_warrior_character - faith = scope:temujin.faith - culture = scope:temujin.culture - } - create_character = { - gender_female_chance = temujin_soldier_female_chance - employer = scope:temujin - template = new_warrior_character - faith = scope:temujin.faith - culture = scope:temujin.culture - } - create_character = { - gender_female_chance = temujin_soldier_female_chance - employer = scope:temujin - template = new_warrior_character - faith = scope:temujin.faith - culture = scope:temujin.culture - } - - # Spawn some captured Han siege engineers - create_character = { - gender_female_chance = temujin_soldier_female_chance - employer = scope:temujin - template = new_siege_engineer - faith = faith:shangqing - culture = culture:han - } - create_character = { - gender_female_chance = temujin_soldier_female_chance - employer = scope:temujin - template = new_siege_engineer - faith = faith:shangqing - culture = culture:han - } - create_character = { - gender_female_chance = temujin_soldier_female_chance - employer = scope:temujin - template = new_siege_engineer - faith = faith:shangqing - culture = culture:han - } - create_character = { - gender_female_chance = temujin_soldier_female_chance - employer = scope:temujin - template = new_siege_engineer - faith = faith:shangqing - culture = culture:han - } -} - -### Populating the life of Temujin... -spawn_dynamic_mongol_court_effect = { - add_character_flag = is_temujin - - if = { - limit = { - scope:temujin = { - is_female = no - } - } - save_scope_as = great_khan_family_father - } - else = { - save_scope_as = great_khan_family_mother - } - if = { - limit = { - exists = scope:great_khan_family_father - } - create_character = { - template = dynamic_genghis_spouse_template - gender = female - employer = scope:temujin - save_scope_as = genghis_spouse - } - scope:genghis_spouse = { - save_scope_as = great_khan_family_mother - } - } - else = { - create_character = { - template = dynamic_genghis_spouse_template - gender = male - employer = scope:temujin - save_scope_as = genghis_spouse - } - scope:genghis_spouse = { - save_scope_as = great_khan_family_father - } - } - scope:genghis_spouse = { - marry = scope:temujin - # Make temporarily immune to disease - add_character_flag = { - flag = immune_to_disease - years = 10 - } - } - create_character = { - template = dynamic_genghis_child_template - employer = scope:temujin - father = scope:great_khan_family_father - mother = scope:great_khan_family_mother - dynasty = inherit - save_scope_as = genghis_child_1 - } - scope:genghis_child_1 = { - # Make temporarily immune to disease - add_character_flag = { - flag = immune_to_disease - years = 10 - } - } - create_character = { - template = dynamic_genghis_child_template - employer = scope:temujin - father = scope:great_khan_family_father - mother = scope:great_khan_family_mother - dynasty = inherit - save_scope_as = genghis_child_2 - } - scope:genghis_child_2 = { - # Make temporarily immune to disease - add_character_flag = { - flag = immune_to_disease - years = 10 - } - } - create_character = { - template = dynamic_genghis_child_template - employer = scope:temujin - father = scope:great_khan_family_father - mother = scope:great_khan_family_mother - dynasty = inherit - save_scope_as = genghis_child_3 - } - scope:genghis_child_3 = { - # Make temporarily immune to disease - add_character_flag = { - flag = immune_to_disease - years = 10 - } - } - create_character = { - template = dynamic_genghis_child_template - employer = scope:temujin - father = scope:great_khan_family_father - mother = scope:great_khan_family_mother - dynasty = inherit - save_scope_as = genghis_child_4 - } - scope:genghis_child_4 = { - # Make temporarily immune to disease - add_character_flag = { - flag = immune_to_disease - years = 10 - } - } - create_character = { - template = dynamic_genghis_child_template - employer = scope:temujin - father = scope:great_khan_family_father - mother = scope:great_khan_family_mother - dynasty = inherit - save_scope_as = genghis_child_5 - } - scope:genghis_child_5 = { - # Make temporarily immune to disease - add_character_flag = { - flag = immune_to_disease - years = 10 - } - } - - recruit_three_nomadic_capital_characters_effect = { - NOMAD_TEMPLATE_CHARACTER = nomadic_commander_template - } - - # Spawn some generic Bagathurs - create_character = { - gender_female_chance = temujin_soldier_female_chance - employer = scope:temujin - template = new_warrior_character - faith = scope:temujin.faith - culture = scope:temujin.culture - } - create_character = { - gender_female_chance = temujin_soldier_female_chance - employer = scope:temujin - template = new_warrior_character - faith = scope:temujin.faith - culture = scope:temujin.culture - } - create_character = { - gender_female_chance = temujin_soldier_female_chance - employer = scope:temujin - template = new_warrior_character - faith = scope:temujin.faith - culture = scope:temujin.culture - } - create_character = { - gender_female_chance = temujin_soldier_female_chance - employer = scope:temujin - template = new_warrior_character - faith = scope:temujin.faith - culture = scope:temujin.culture - } - create_character = { - gender_female_chance = temujin_soldier_female_chance - employer = scope:temujin - template = new_warrior_character - faith = scope:temujin.faith - culture = scope:temujin.culture - } - create_character = { - gender_female_chance = temujin_soldier_female_chance - employer = scope:temujin - template = new_warrior_character - faith = scope:temujin.faith - culture = scope:temujin.culture - } - create_character = { - gender_female_chance = temujin_soldier_female_chance - employer = scope:temujin - template = new_warrior_character - faith = scope:temujin.faith - culture = scope:temujin.culture - } - create_character = { - gender_female_chance = temujin_soldier_female_chance - employer = scope:temujin - template = new_warrior_character - faith = scope:temujin.faith - culture = scope:temujin.culture - } - - # Spawn some captured Han siege engineers - create_character = { - gender_female_chance = temujin_soldier_female_chance - employer = scope:temujin - template = new_siege_engineer - faith = faith:shangqing - culture = culture:han - } - create_character = { - gender_female_chance = temujin_soldier_female_chance - employer = scope:temujin - template = new_siege_engineer - faith = faith:shangqing - culture = culture:han - } - create_character = { - gender_female_chance = temujin_soldier_female_chance - employer = scope:temujin - template = new_siege_engineer - faith = faith:shangqing - culture = culture:han - } - create_character = { - gender_female_chance = temujin_soldier_female_chance - employer = scope:temujin - template = new_siege_engineer - faith = faith:shangqing - culture = culture:han - } -} - -### Start war of conquest for the Mongolian heartland -start_wars_for_mongolia_effect = { - save_temporary_scope_as = mongol_conqueror - # Build a list of potential targets - every_neighboring_top_liege_realm_owner = { - limit = { - any_sub_realm_county = { - is_landless_type_title = no - title_province = { geographical_region = special_mongol_empire_start_region } - } - is_landed = yes - } - if = { - limit = { NOT = { is_in_list = top_liege_targets } } - add_to_temporary_list = top_liege_targets - } - } - every_in_list = { - list = top_liege_targets - if = { - limit = { - government_has_flag = government_is_herder - } - create_title_and_vassal_change = { - type = swear_fealty - save_scope_as = change - add_claim_on_loss = no - } - change_liege = { - liege = scope:mongol_conqueror - change = scope:change - } - resolve_title_and_vassal_change = scope:change - } - else = { - save_temporary_scope_as = new_war_target - capital_county.empire = { save_temporary_scope_as = war_target_title } - # Declare the war - scope:mongol_conqueror = { - start_war = { - cb = mongol_realm_invasion_war - target = scope:new_war_target.top_liege - target_title = scope:war_target_title - } - } - } - } -} - -# Send subjugation demand effect -send_mongol_subjugation_demand_effect = { - if = { - limit = { - NOT = { is_allied_to = scope:mongol_emperor } - } - trigger_event = { - id = mongol_invasion.2001 - days = { 3 12 } - } - - save_temporary_scope_as = subjugation_offer_recipient - scope:mongol_emperor = { - add_to_variable_list = { - name = subjugation_offer_under_consideration - target = scope:subjugation_offer_recipient - } - } - } - else = { - if = { - limit = { - highest_held_title_tier >= tier_empire - } - trigger_event = { - id = mongol_invasion.2111 - days = { 3 12 } - } - } - else = { - trigger_event = { - id = mongol_invasion.2101 - days = { 3 12 } - } - } - } -} - - -### Mongol war target evaluation and declaration -mongol_war_target_evaluation_and_declaration_effect = { - # Set the Mongol Emperor as reference point - save_scope_as = mongol_emperor - add_character_flag = { - flag = free_mongol_cb - days = 14 - } - # Select a new target - random_neighboring_top_liege_realm_owner = { - limit = { - NOT = { is_allied_to = scope:mongol_emperor } - this != scope:mongol_emperor - top_liege != scope:mongol_emperor - save_temporary_scope_as = truce_check - NOT = { - scope:mongol_emperor = { - any_truce_target = { - this = scope:truce_check - } - } - } - trigger_if = { # We don't want the Byzantine empire to get annihilated immediately - limit = { - OR = { - has_primary_title = title:e_byzantium - has_primary_title = title:e_latin_empire - } - } - OR = { - current_year >= 1279 # Roughly when the mongols should fracture historically - scope:mongol_emperor = { - completely_controls_region = special_mongol_empire_golden_horde_region # Controls all of Russia and the Steppe - } - any_realm_county = { # Byzantium is expansionist - count >= 50 - title_province = { - OR = { - geographical_region = special_mongol_empire_conquest_region_prio_5 - geographical_region = special_mongol_empire_conquest_region_prio_4 - geographical_region = special_mongol_empire_conquest_region_prio_3 - geographical_region = special_mongol_empire_conquest_region_prio_2 - geographical_region = special_mongol_empire_conquest_region_prio_1 - geographical_region = special_mongol_empire_conquest_region_prio_1_alpha - } - } - } - } - } - } - weight = { - base = 0 - modifier = { - add = mongol_invasion_target_character_weight - always = yes - } - } - save_temporary_scope_as = next_invasion_target - primary_title = { - save_temporary_scope_as = next_invasion_title_target - } - } - if = { - limit = { - exists = scope:next_invasion_target - } - if = { - limit = { # Declare war on every same-tier count or duke in same empire - scope:next_invasion_target = { - OR = { - highest_held_title_tier = tier_county - highest_held_title_tier = tier_duchy - } - } - } - scope:next_invasion_title_target = { - add_to_temporary_list = all_titles_to_declare_on - empire = { - every_in_de_jure_hierarchy = { # Find all other same-tier titles in same de jure empire - continue = { - tier > tier_county - # Stop searching if you hit the Mongol Emperor's territory at any point - trigger_if = { - limit = { exists = holder } - holder != scope:mongol_emperor - holder.top_liege != scope:mongol_emperor - } - } - limit = { - exists = this - OR = { - tier = tier_county - tier = tier_duchy - } - holder ?= { - top_liege = this - this != scope:mongol_emperor - top_liege != scope:mongol_emperor - NOT = { is_at_war_with = scope:mongol_emperor } - NOT = { is_allied_to = scope:mongol_emperor } - save_temporary_scope_as = truce_check - NOT = { - scope:mongol_emperor = { - any_truce_target = { - this = scope:truce_check - } - } - } - } - } - add_to_temporary_list = all_titles_to_declare_on - } - } - } - every_in_list = { - list = all_titles_to_declare_on - limit = { - holder = { - # An extra check to make sure we haven't snuck any Mongol territory in - this != scope:mongol_emperor - top_liege != scope:mongol_emperor - - # Standard conditions - NOT = { is_at_war_with = scope:mongol_emperor } - NOT = { - is_in_list = has_been_sent_subjugation_offer - } - save_temporary_scope_as = truce_check - } - NOT = { - scope:mongol_emperor = { - any_truce_target = { - this = scope:truce_check - } - } - } - } - - holder = { - add_to_temporary_list = has_been_sent_subjugation_offer - send_mongol_subjugation_demand_effect = yes - } - } - } - else_if = { - limit = { - scope:next_invasion_target = { - highest_held_title_tier < tier_empire - } - } - scope:next_invasion_target = { - send_mongol_subjugation_demand_effect = yes - } - } - else = { # Emperors are not offered ways out - start_war = { - cb = mongol_realm_invasion_war - target = scope:next_invasion_target - target_title = scope:next_invasion_title_target.empire - } - } - } -} - -mongols_devastate_county_effect = { - change_development_level = { - subtract = scope:county.development_level - multiply = 0.5 - floor = yes - } - random = { - chance = 25 - random_county_province = { - limit = { - has_holding = yes - num_buildings >= 2 - } - destroy_random_building_variable_effect = yes - destroy_random_building_effect = yes - } - } - # Silk Road - scope:county = { - tgp_silk_road_mongol_devastation_effect = yes - } -} - - -### MONGOL EMPIRE BREAKUP EFFECTS ### - -### Title creation effects -assign_core_mongol_titles_to_heir_effect = { - save_temporary_scope_as = candidate - - if = { # Check whether everything is grantable - limit = { - NOT = { exists = global_var:handed_out_mongolia_in_mongol_succession } - NOT = { exists = title:e_mongolia.holder } - } - - # If the character doesn't hold any titles in the relevant - if = { - limit = { - NOT = { - any_held_title = { - title_tier = county - is_landless_type_title = no - title_province = { - NOR = { - geographical_region = special_mongol_empire_ilkhanate_region - geographical_region = special_mongol_empire_golden_horde_region - geographical_region = special_mongol_empire_chagatai_region - geographical_region = special_mongol_empire_red_horde_region - geographical_region = special_mongol_empire_white_horde_region - geographical_region = special_mongol_empire_aarlud_khanate_region - geographical_region = special_mongol_empire_togskol_khanate_region - geographical_region = special_mongol_empire_baruun_khanate_region - geographical_region = special_mongol_empire_great_yuan_region - geographical_region = special_mongol_empire_blue_horde_region - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - } - } - } - } - scope:old_mongol_emperor = { - random_sub_realm_county = { - limit = { - is_landless_type_title = no - title_province = { - NOR = { - geographical_region = special_mongol_empire_ilkhanate_region - geographical_region = special_mongol_empire_golden_horde_region - geographical_region = special_mongol_empire_chagatai_region - geographical_region = special_mongol_empire_red_horde_region - geographical_region = special_mongol_empire_white_horde_region - geographical_region = special_mongol_empire_aarlud_khanate_region - geographical_region = special_mongol_empire_togskol_khanate_region - geographical_region = special_mongol_empire_baruun_khanate_region - geographical_region = special_mongol_empire_great_yuan_region - geographical_region = special_mongol_empire_blue_horde_region - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - } - } - save_scope_as = county_to_transfer - } - } - create_title_and_vassal_change = { - type = granted - save_scope_as = title_change - add_claim_on_loss = no - } - scope:county_to_transfer = { - change_title_holder = { - holder = scope:candidate - change = scope:title_change - } - } - resolve_title_and_vassal_change = scope:title_change - } - - # Create and grant title - create_title_and_vassal_change = { - type = granted - save_scope_as = title_change - add_claim_on_loss = no - } - title:e_mongolia = { - change_title_holder = { - holder = scope:candidate - change = scope:title_change - } - } - resolve_title_and_vassal_change = scope:title_change - # Move de jure back from Mongol Empire to Mongolia - title:e_mongol_empire = { - every_in_de_jure_hierarchy = { - limit = { - tier = tier_kingdom - } - set_de_jure_liege_title = title:e_mongolia - } - } - # Used to check whether e_mongol_empire can be safely destroyed - set_global_variable = { - name = handed_out_mongolia_in_mongol_succession - value = yes - } - } - save_scope_as = mongolia_ruler - add_to_list = candidate_granted_title - - every_character_war = { - end_war = white_peace - } - if = { - limit = { - has_title = title:e_mongolia.title_capital_county - } - set_realm_capital = title:e_mongolia.title_capital_county - } - #The primary heir of the Mongol emperor will likely be inheriting big special armies if MPO is active - if = { - limit = { - has_mpo_dlc_trigger = no - NOT = { - is_primary_heir_of = scope:old_mongol_emperor - } - } - spawn_mongol_successor_state_troops_effect = yes - } - if = { - limit = { - government_has_flag = government_is_nomadic - } - domicile = { - change_herd = 5000 - } - } - add_gold = 1000 - add_dread = 100 - create_story = story_conqueror - if = { - limit = { - government_has_flag = government_is_nomadic - } - if = { - limit = { has_realm_law = nomadic_authority_1 } - remove_realm_law = nomadic_authority_1 - } - if = { - limit = { has_realm_law = nomadic_authority_2 } - remove_realm_law = nomadic_authority_2 - } - if = { - limit = { has_realm_law = nomadic_authority_3 } - remove_realm_law = nomadic_authority_3 - } - if = { - limit = { has_realm_law = nomadic_authority_5 } - remove_realm_law = nomadic_authority_5 - } - add_realm_law = nomadic_authority_4 - if = { - limit = { - exists = domicile - domicile = { - free_external_domicile_building_slots >= 1 - NOT = { - has_domicile_building_or_higher = mass_warfare_yurt_01 - } - } - } - domicile = { - add_domicile_building = mass_warfare_yurt_01 - add_domicile_building = mass_warfare_yurt_02 - add_domicile_building = mass_warfare_yurt_03 - } - } - if = { - limit = { - NOT = { - any_held_title = { - is_nomad_title = yes - } - } - } - save_scope_as = holder - create_nomad_title = { - name = nomad_title_name - holder = scope:holder - government = nomad_government - save_scope_as = new_nomad_title - } - } - } -} - -grant_mongol_successor_nomadic_bonuses_effect = { - if = { - limit = { - government_has_flag = government_is_nomadic - } - #They might not have a nomadic camp title, create if needed - if = { - limit = { - NOT = { - any_held_title = { - is_nomad_title = yes - } - } - } - save_scope_as = holder - create_nomad_title = { - name = nomad_title_name - holder = scope:holder - government = nomad_government - save_scope_as = new_nomad_title - } - } - if = { - limit = { - government_has_flag = government_is_nomadic - } - if = { - limit = { has_realm_law = nomadic_authority_1 } - remove_realm_law = nomadic_authority_1 - } - if = { - limit = { has_realm_law = nomadic_authority_2 } - remove_realm_law = nomadic_authority_2 - } - if = { - limit = { has_realm_law = nomadic_authority_3 } - remove_realm_law = nomadic_authority_3 - } - if = { - limit = { has_realm_law = nomadic_authority_5 } - remove_realm_law = nomadic_authority_5 - } - add_realm_law = nomadic_authority_4 - if = { - limit = { - exists = domicile - domicile = { - free_external_domicile_building_slots >= 1 - NOT = { - has_domicile_building_or_higher = mass_warfare_yurt_01 - } - } - } - domicile = { - add_domicile_building = mass_warfare_yurt_01 - add_domicile_building = mass_warfare_yurt_02 - add_domicile_building = mass_warfare_yurt_03 - } - } - domicile = { - change_herd = { - value = monumental_herd_value - multiply = 1.5 - } - } - } - } -} - -grant_ilkhanate_effect = { - # If the character doesn't hold any titles in the relevant - if = { - limit = { - NOT = { - any_held_title = { - title_tier = county - is_landless_type_title = no - title_province = { - geographical_region = special_mongol_empire_ilkhanate_region - } - } - } - } - scope:old_mongol_emperor = { - random_sub_realm_county = { - limit = { - is_landless_type_title = no - title_province = { - geographical_region = special_mongol_empire_ilkhanate_region - } - } - save_scope_as = county_to_transfer - } - } - create_title_and_vassal_change = { - type = granted - save_scope_as = title_change - add_claim_on_loss = no - } - scope:county_to_transfer = { - change_title_holder = { - holder = scope:candidate - change = scope:title_change - } - } - resolve_title_and_vassal_change = scope:title_change - } - create_title_and_vassal_change = { - type = created - save_scope_as = title_change - add_claim_on_loss = no - } - title:e_ilkhanate = { - change_title_holder = { - holder = scope:candidate - change = scope:title_change - } - } - resolve_title_and_vassal_change = scope:title_change - - scope:candidate = { - save_scope_as = ilkhanate_ruler - } - set_global_variable = { - name = ilkhanate_handed_out - value = yes - } - - # Give the character the appropriate capital area, if possible - if = { - limit = { - scope:old_mongol_emperor = { - any_sub_realm_county = { - duchy = title:e_ilkhanate.title_capital_county.duchy - NOR = { - holder = scope:candidate - holder = { # Don't steal the player's lands - is_ai = no - } - holder = { - any_liege_or_above = { is_ai = no } - } - } - } - } - } - scope:old_mongol_emperor = { - every_sub_realm_county = { - limit = { - duchy = title:e_ilkhanate.title_capital_county.duchy - NOR = { - holder = scope:candidate - holder = { # Don't steal the player's lands - is_ai = no - } - holder = { - any_liege_or_above = { is_ai = no } - } - } - } - add_to_list = titles_taken - } - } - create_title_and_vassal_change = { - type = granted - save_scope_as = title_change - add_claim_on_loss = no - } - every_in_list = { - list = titles_taken - change_title_holder = { - holder = scope:candidate - change = scope:title_change - take_baronies = yes - } - } - resolve_title_and_vassal_change = scope:title_change - } - - every_character_war = { - end_war = white_peace - } - if = { - limit = { - has_title = title:e_ilkhanate.title_capital_county - } - set_realm_capital = title:e_ilkhanate.title_capital_county - } - else_if = { - limit = { - NOT = { - capital_county.title_province = { - geographical_region = special_mongol_empire_ilkhanate_region - } - } - any_held_title = { - title_tier = county - is_landless_type_title = no - title_province = { - geographical_region = special_mongol_empire_ilkhanate_region - } - } - } - random_held_title = { - title_tier = county - limit = { - is_landless_type_title = no - title_province = { - geographical_region = special_mongol_empire_ilkhanate_region - } - } - scope:candidate = { - set_realm_capital = prev - } - } - } - spawn_mongol_successor_state_troops_effect = yes - add_gold = 1000 - add_dread = 100 - create_story = story_conqueror - grant_mongol_successor_nomadic_bonuses_effect = yes -} - -grant_golden_horde_effect = { - debug_log = "Golden Horde about to be created" - debug_log_scopes = no - - # If the character doesn't hold any titles in the relevant - if = { - limit = { - NOT = { - any_held_title = { - title_tier = county - is_landless_type_title = no - title_province = { - geographical_region = special_mongol_empire_golden_horde_region - } - } - } - } - scope:old_mongol_emperor = { - random_sub_realm_county = { - limit = { - is_landless_type_title = no - title_province = { - geographical_region = special_mongol_empire_golden_horde_region - } - } - save_scope_as = county_to_transfer - } - } - create_title_and_vassal_change = { - type = granted - save_scope_as = title_change - add_claim_on_loss = no - } - scope:county_to_transfer = { - change_title_holder = { - holder = scope:candidate - change = scope:title_change - } - } - resolve_title_and_vassal_change = scope:title_change - } - create_title_and_vassal_change = { - type = created - save_scope_as = title_change - add_claim_on_loss = no - } - title:e_golden_horde = { - change_title_holder = { - holder = scope:candidate - change = scope:title_change - } - } - resolve_title_and_vassal_change = scope:title_change - - scope:candidate = { - save_scope_as = golden_horde_ruler - } - - set_global_variable = { - name = golden_horde_handed_out - value = yes - } - - # Give the character the appropriate capital area, if possible - if = { - limit = { - scope:old_mongol_emperor = { - any_sub_realm_county = { - duchy = title:e_golden_horde.title_capital_county.duchy - NOR = { - holder = scope:candidate - holder = { # Don't steal the player's lands - is_ai = no - } - holder = { - any_liege_or_above = { is_ai = no } - } - } - } - } - } - scope:old_mongol_emperor = { - every_sub_realm_county = { - limit = { - duchy = title:e_golden_horde.title_capital_county.duchy - NOR = { - holder = scope:candidate - holder = { # Don't steal the player's lands - is_ai = no - } - holder = { - any_liege_or_above = { is_ai = no } - } - } - } - add_to_list = titles_taken - } - } - create_title_and_vassal_change = { - type = granted - save_scope_as = title_change - add_claim_on_loss = no - } - every_in_list = { - list = titles_taken - change_title_holder = { - holder = scope:candidate - change = scope:title_change - take_baronies = yes - } - } - resolve_title_and_vassal_change = scope:title_change - } - every_character_war = { - end_war = white_peace - } - if = { - limit = { - has_title = title:e_golden_horde.title_capital_county - } - set_realm_capital = title:e_golden_horde.title_capital_county - } - else_if = { - limit = { - NOT = { - capital_county.title_province = { - geographical_region = special_mongol_empire_golden_horde_region - } - } - any_held_title = { - title_tier = county - is_landless_type_title = no - title_province = { - geographical_region = special_mongol_empire_golden_horde_region - } - } - } - random_held_title = { - title_tier = county - limit = { - is_landless_type_title = no - title_province = { - geographical_region = special_mongol_empire_golden_horde_region - } - } - scope:candidate = { - set_realm_capital = prev - } - } - } - spawn_mongol_successor_state_troops_effect = yes - add_gold = 1000 - add_dread = 100 - create_story = story_conqueror - grant_mongol_successor_nomadic_bonuses_effect = yes -} - -grant_chagatai_effect = { - - # If the character doesn't hold any titles in the relevant - if = { - limit = { - NOT = { - any_held_title = { - title_tier = county - is_landless_type_title = no - title_province = { - geographical_region = special_mongol_empire_chagatai_region - } - } - } - } - scope:old_mongol_emperor = { - random_sub_realm_county = { - limit = { - is_landless_type_title = no - title_province = { - geographical_region = special_mongol_empire_chagatai_region - } - } - save_scope_as = county_to_transfer - } - } - create_title_and_vassal_change = { - type = granted - save_scope_as = title_change - add_claim_on_loss = no - } - scope:county_to_transfer = { - change_title_holder = { - holder = scope:candidate - change = scope:title_change - } - } - resolve_title_and_vassal_change = scope:title_change - } - create_title_and_vassal_change = { - type = created - save_scope_as = title_change - add_claim_on_loss = no - } - title:e_chagatai = { - change_title_holder = { - holder = scope:candidate - change = scope:title_change - } - } - resolve_title_and_vassal_change = scope:title_change - - scope:candidate = { - save_scope_as = chagatai_ruler - } - - set_global_variable = { - name = chagatai_handed_out - value = yes - } - - # Give the character the appropriate capital area, if possible - if = { - limit = { - scope:old_mongol_emperor = { - any_sub_realm_county = { - duchy = title:e_chagatai.title_capital_county.duchy - NOR = { - holder = scope:candidate - holder = { # Don't steal the player's lands - is_ai = no - } - holder = { - any_liege_or_above = { is_ai = no } - } - } - } - } - } - scope:old_mongol_emperor = { - every_sub_realm_county = { - limit = { - duchy = title:e_chagatai.title_capital_county.duchy - NOR = { - holder = scope:candidate - holder = { # Don't steal the player's lands - is_ai = no - } - holder = { - any_liege_or_above = { is_ai = no } - } - } - } - add_to_list = titles_taken - } - } - create_title_and_vassal_change = { - type = granted - save_scope_as = title_change - add_claim_on_loss = no - } - every_in_list = { - list = titles_taken - change_title_holder = { - holder = scope:candidate - change = scope:title_change - take_baronies = yes - } - } - resolve_title_and_vassal_change = scope:title_change - } - every_character_war = { - end_war = white_peace - } - if = { - limit = { - has_title = title:e_chagatai.title_capital_county - } - set_realm_capital = title:e_chagatai.title_capital_county - } - else_if = { - limit = { - NOT = { - capital_county.title_province = { - geographical_region = special_mongol_empire_chagatai_region - } - } - any_held_title = { - title_tier = county - is_landless_type_title = no - title_province = { - geographical_region = special_mongol_empire_chagatai_region - } - } - } - random_held_title = { - title_tier = county - limit = { - is_landless_type_title = no - title_province = { - geographical_region = special_mongol_empire_chagatai_region - } - } - scope:candidate = { - set_realm_capital = prev - } - } - } - spawn_mongol_successor_state_troops_effect = yes - add_gold = 1000 - add_dread = 100 - create_story = story_conqueror - grant_mongol_successor_nomadic_bonuses_effect = yes -} - -grant_red_horde_effect = { - - # If the character doesn't hold any titles in the relevant - if = { - limit = { - NOT = { - any_held_title = { - title_tier = county - is_landless_type_title = no - title_province = { - geographical_region = special_mongol_empire_red_horde_region - } - } - } - } - scope:old_mongol_emperor = { - random_sub_realm_county = { - limit = { - is_landless_type_title = no - title_province = { - geographical_region = special_mongol_empire_red_horde_region - } - } - save_scope_as = county_to_transfer - } - } - create_title_and_vassal_change = { - type = granted - save_scope_as = title_change - add_claim_on_loss = no - } - scope:county_to_transfer = { - change_title_holder = { - holder = scope:candidate - change = scope:title_change - } - } - resolve_title_and_vassal_change = scope:title_change - } - create_title_and_vassal_change = { - type = created - save_scope_as = title_change - add_claim_on_loss = no - } - title:e_red_horde = { - change_title_holder = { - holder = scope:candidate - change = scope:title_change - } - } - resolve_title_and_vassal_change = scope:title_change - - scope:candidate = { - save_scope_as = red_horde_ruler - } - - set_global_variable = { - name = red_horde_handed_out - value = yes - } - - # Give the character the appropriate capital area, if possible - if = { - limit = { - scope:old_mongol_emperor = { - any_sub_realm_county = { - duchy = title:e_red_horde.title_capital_county.duchy - NOR = { - holder = scope:candidate - holder = { # Don't steal the player's lands - is_ai = no - } - holder = { - any_liege_or_above = { is_ai = no } - } - } - } - } - } - scope:old_mongol_emperor = { - every_sub_realm_county = { - limit = { - duchy = title:e_red_horde.title_capital_county.duchy - NOR = { - holder = scope:candidate - holder = { # Don't steal the player's lands - is_ai = no - } - holder = { - any_liege_or_above = { is_ai = no } - } - } - } - add_to_list = titles_taken - } - } - create_title_and_vassal_change = { - type = granted - save_scope_as = title_change - add_claim_on_loss = no - } - every_in_list = { - list = titles_taken - change_title_holder = { - holder = scope:candidate - change = scope:title_change - take_baronies = yes - } - } - resolve_title_and_vassal_change = scope:title_change - } - every_character_war = { - end_war = white_peace - } - if = { - limit = { - has_title = title:e_red_horde.title_capital_county - } - set_realm_capital = title:e_red_horde.title_capital_county - } - else_if = { - limit = { - NOT = { - capital_county.title_province = { - geographical_region = special_mongol_empire_red_horde_region - } - } - any_held_title = { - title_tier = county - is_landless_type_title = no - title_province = { - geographical_region = special_mongol_empire_red_horde_region - } - } - } - random_held_title = { - title_tier = county - limit = { - is_landless_type_title = no - title_province = { - geographical_region = special_mongol_empire_red_horde_region - } - } - scope:candidate = { - set_realm_capital = prev - } - } - } - spawn_mongol_successor_state_troops_effect = yes - add_gold = 1000 - add_dread = 100 - create_story = story_conqueror - grant_mongol_successor_nomadic_bonuses_effect = yes -} - -grant_white_horde_effect = { - # If the character doesn't hold any titles in the relevant - if = { - limit = { - NOT = { - any_held_title = { - title_tier = county - is_landless_type_title = no - title_province = { - geographical_region = special_mongol_empire_white_horde_region - } - } - } - } - scope:old_mongol_emperor = { - random_sub_realm_county = { - limit = { - is_landless_type_title = no - title_province = { - geographical_region = special_mongol_empire_white_horde_region - } - } - save_scope_as = county_to_transfer - } - } - create_title_and_vassal_change = { - type = granted - save_scope_as = title_change - add_claim_on_loss = no - } - scope:county_to_transfer = { - change_title_holder = { - holder = scope:candidate - change = scope:title_change - } - } - resolve_title_and_vassal_change = scope:title_change - } - - create_title_and_vassal_change = { - type = created - save_scope_as = title_change - add_claim_on_loss = no - } - title:e_white_horde = { - change_title_holder = { - holder = scope:candidate - change = scope:title_change - } - } - resolve_title_and_vassal_change = scope:title_change - - scope:candidate = { - save_scope_as = white_horde_ruler - } - - set_global_variable = { - name = white_horde_handed_out - value = yes - } - - # Give the character the appropriate capital area, if possible - if = { - limit = { - scope:old_mongol_emperor = { - any_sub_realm_county = { - duchy = title:e_white_horde.title_capital_county.duchy - NOR = { - holder = scope:candidate - holder = { # Don't steal the player's lands - is_ai = no - } - holder = { - any_liege_or_above = { is_ai = no } - } - } - } - } - } - scope:old_mongol_emperor = { - every_sub_realm_county = { - limit = { - duchy = title:e_white_horde.title_capital_county.duchy - NOR = { - holder = scope:candidate - holder = { # Don't steal the player's lands - is_ai = no - } - holder = { - any_liege_or_above = { is_ai = no } - } - } - } - add_to_list = titles_taken - } - } - create_title_and_vassal_change = { - type = granted - save_scope_as = title_change - add_claim_on_loss = no - } - every_in_list = { - list = titles_taken - change_title_holder = { - holder = scope:candidate - change = scope:title_change - take_baronies = yes - } - } - resolve_title_and_vassal_change = scope:title_change - } - every_character_war = { - end_war = white_peace - } - if = { - limit = { - has_title = title:e_white_horde.title_capital_county - } - set_realm_capital = title:e_white_horde.title_capital_county - } - else_if = { - limit = { - NOT = { - capital_county.title_province = { - geographical_region = special_mongol_empire_white_horde_region - } - } - any_held_title = { - title_tier = county - is_landless_type_title = no - title_province = { - geographical_region = special_mongol_empire_white_horde_region - } - } - } - random_held_title = { - title_tier = county - limit = { - is_landless_type_title = no - title_province = { - geographical_region = special_mongol_empire_white_horde_region - } - } - scope:candidate = { - set_realm_capital = prev - } - } - } - spawn_mongol_successor_state_troops_effect = yes - add_gold = 1000 - add_dread = 100 - create_story = story_conqueror - grant_mongol_successor_nomadic_bonuses_effect = yes -} - -grant_aarlud_khanate_effect = { - - # If the character doesn't hold any titles in the relevant - if = { - limit = { - NOT = { - any_held_title = { - title_tier = county - is_landless_type_title = no - title_province = { - geographical_region = special_mongol_empire_aarlud_khanate_region - } - } - } - } - scope:old_mongol_emperor = { - random_sub_realm_county = { - limit = { - is_landless_type_title = no - title_province = { - geographical_region = special_mongol_empire_aarlud_khanate_region - } - } - save_scope_as = county_to_transfer - } - } - create_title_and_vassal_change = { - type = granted - save_scope_as = title_change - add_claim_on_loss = no - } - scope:county_to_transfer = { - change_title_holder = { - holder = scope:candidate - change = scope:title_change - } - } - resolve_title_and_vassal_change = scope:title_change - } - create_title_and_vassal_change = { - type = created - save_scope_as = title_change - add_claim_on_loss = no - } - title:e_aarlud_khanate = { - change_title_holder = { - holder = scope:candidate - change = scope:title_change - } - } - resolve_title_and_vassal_change = scope:title_change - - scope:candidate = { - save_scope_as = aarlud_khanate_ruler - } - - set_global_variable = { - name = aarlud_khanate_handed_out - value = yes - } - - # Give the character the appropriate capital area, if possible - if = { - limit = { - scope:old_mongol_emperor = { - any_sub_realm_county = { - duchy = title:e_aarlud_khanate.title_capital_county.duchy - NOR = { - holder = scope:candidate - holder = { # Don't steal the player's lands - is_ai = no - } - holder = { - any_liege_or_above = { is_ai = no } - } - } - } - } - } - scope:old_mongol_emperor = { - every_sub_realm_county = { - limit = { - duchy = title:e_aarlud_khanate.title_capital_county.duchy - NOR = { - holder = scope:candidate - holder = { # Don't steal the player's lands - is_ai = no - } - holder = { - any_liege_or_above = { is_ai = no } - } - } - } - add_to_list = titles_taken - } - } - create_title_and_vassal_change = { - type = granted - save_scope_as = title_change - add_claim_on_loss = no - } - every_in_list = { - list = titles_taken - change_title_holder = { - holder = scope:candidate - change = scope:title_change - take_baronies = yes - } - } - resolve_title_and_vassal_change = scope:title_change - } - every_character_war = { - end_war = white_peace - } - if = { - limit = { - has_title = title:e_aarlud_khanate.title_capital_county - } - set_realm_capital = title:e_aarlud_khanate.title_capital_county - } - else_if = { - limit = { - NOT = { - capital_county.title_province = { - geographical_region = special_mongol_empire_aarlud_khanate_region - } - } - any_held_title = { - title_tier = county - is_landless_type_title = no - title_province = { - geographical_region = special_mongol_empire_aarlud_khanate_region - } - } - } - random_held_title = { - title_tier = county - limit = { - is_landless_type_title = no - title_province = { - geographical_region = special_mongol_empire_aarlud_khanate_region - } - } - scope:candidate = { - set_realm_capital = prev - } - } - } - spawn_mongol_successor_state_troops_effect = yes - add_gold = 1000 - add_dread = 100 - create_story = story_conqueror - grant_mongol_successor_nomadic_bonuses_effect = yes -} - -grant_togskol_khanate_effect = { - - # If the character doesn't hold any titles in the relevant - if = { - limit = { - NOT = { - any_held_title = { - title_tier = county - is_landless_type_title = no - title_province = { - geographical_region = special_mongol_empire_togskol_khanate_region - } - } - } - } - scope:old_mongol_emperor = { - random_sub_realm_county = { - limit = { - is_landless_type_title = no - title_province = { - geographical_region = special_mongol_empire_togskol_khanate_region - } - } - save_scope_as = county_to_transfer - } - } - create_title_and_vassal_change = { - type = granted - save_scope_as = title_change - add_claim_on_loss = no - } - scope:county_to_transfer = { - change_title_holder = { - holder = scope:candidate - change = scope:title_change - } - } - resolve_title_and_vassal_change = scope:title_change - } - create_title_and_vassal_change = { - type = created - save_scope_as = title_change - add_claim_on_loss = no - } - title:e_togskol_khanate = { - change_title_holder = { - holder = scope:candidate - change = scope:title_change - } - } - resolve_title_and_vassal_change = scope:title_change - - scope:candidate = { - save_scope_as = togskol_khanate_ruler - } - - set_global_variable = { - name = togskol_khanate_handed_out - value = yes - } - - # Give the character the appropriate capital area, if possible - if = { - limit = { - scope:old_mongol_emperor = { - any_sub_realm_county = { - duchy = title:e_togskol_khanate.title_capital_county.duchy - NOR = { - holder = scope:candidate - holder = { # Don't steal the player's lands - is_ai = no - } - holder = { - any_liege_or_above = { is_ai = no } - } - } - } - } - } - scope:old_mongol_emperor = { - every_sub_realm_county = { - limit = { - duchy = title:e_togskol_khanate.title_capital_county.duchy - NOR = { - holder = scope:candidate - holder = { # Don't steal the player's lands - is_ai = no - } - holder = { - any_liege_or_above = { is_ai = no } - } - } - } - add_to_list = titles_taken - } - } - create_title_and_vassal_change = { - type = granted - save_scope_as = title_change - add_claim_on_loss = no - } - every_in_list = { - list = titles_taken - change_title_holder = { - holder = scope:candidate - change = scope:title_change - take_baronies = yes - } - } - resolve_title_and_vassal_change = scope:title_change - } - every_character_war = { - end_war = white_peace - } - if = { - limit = { - has_title = title:e_togskol_khanate.title_capital_county - } - set_realm_capital = title:e_togskol_khanate.title_capital_county - } - else_if = { - limit = { - NOT = { - capital_county.title_province = { - geographical_region = special_mongol_empire_togskol_khanate_region - } - } - any_held_title = { - title_tier = county - is_landless_type_title = no - title_province = { - geographical_region = special_mongol_empire_togskol_khanate_region - } - } - } - random_held_title = { - title_tier = county - limit = { - is_landless_type_title = no - title_province = { - geographical_region = special_mongol_empire_togskol_khanate_region - } - } - scope:candidate = { - set_realm_capital = prev - } - } - } - spawn_mongol_successor_state_troops_effect = yes - add_gold = 1000 - add_dread = 100 - create_story = story_conqueror - grant_mongol_successor_nomadic_bonuses_effect = yes -} - -grant_baruun_khanate_effect = { - - # If the character doesn't hold any titles in the relevant - if = { - limit = { - NOT = { - any_held_title = { - title_tier = county - is_landless_type_title = no - title_province = { - geographical_region = special_mongol_empire_baruun_khanate_region - } - } - } - } - scope:old_mongol_emperor = { - random_sub_realm_county = { - limit = { - is_landless_type_title = no - title_province = { - geographical_region = special_mongol_empire_baruun_khanate_region - } - } - save_scope_as = county_to_transfer - } - } - create_title_and_vassal_change = { - type = granted - save_scope_as = title_change - add_claim_on_loss = no - } - scope:county_to_transfer = { - change_title_holder = { - holder = scope:candidate - change = scope:title_change - } - } - resolve_title_and_vassal_change = scope:title_change - } - create_title_and_vassal_change = { - type = created - save_scope_as = title_change - add_claim_on_loss = no - } - title:e_baruun_khanate = { - change_title_holder = { - holder = scope:candidate - change = scope:title_change - } - } - resolve_title_and_vassal_change = scope:title_change - - scope:candidate = { - save_scope_as = baruun_khanate_ruler - } - - set_global_variable = { - name = baruun_khanate_handed_out - value = yes - } - - # Give the character the appropriate capital area, if possible - if = { - limit = { - scope:old_mongol_emperor = { - any_sub_realm_county = { - duchy = title:e_baruun_khanate.title_capital_county.duchy - NOR = { - holder = scope:candidate - holder = { # Don't steal the player's lands - is_ai = no - } - holder = { - any_liege_or_above = { is_ai = no } - } - } - } - } - } - scope:old_mongol_emperor = { - every_sub_realm_county = { - limit = { - duchy = title:e_baruun_khanate.title_capital_county.duchy - NOR = { - holder = scope:candidate - holder = { # Don't steal the player's lands - is_ai = no - } - holder = { - any_liege_or_above = { is_ai = no } - } - } - } - add_to_list = titles_taken - } - } - create_title_and_vassal_change = { - type = granted - save_scope_as = title_change - add_claim_on_loss = no - } - every_in_list = { - list = titles_taken - change_title_holder = { - holder = scope:candidate - change = scope:title_change - take_baronies = yes - } - } - resolve_title_and_vassal_change = scope:title_change - } - every_character_war = { - end_war = white_peace - } - if = { - limit = { - has_title = title:e_baruun_khanate.title_capital_county - } - set_realm_capital = title:e_baruun_khanate.title_capital_county - } - else_if = { - limit = { - NOT = { - capital_county.title_province = { - geographical_region = special_mongol_empire_baruun_khanate_region - } - } - any_held_title = { - title_tier = county - is_landless_type_title = no - title_province = { - geographical_region = special_mongol_empire_baruun_khanate_region - } - } - } - random_held_title = { - title_tier = county - limit = { - is_landless_type_title = no - title_province = { - geographical_region = special_mongol_empire_baruun_khanate_region - } - } - scope:candidate = { - set_realm_capital = prev - } - } - } - spawn_mongol_successor_state_troops_effect = yes - add_gold = 1000 - add_dread = 100 - create_story = story_conqueror - grant_mongol_successor_nomadic_bonuses_effect = yes -} - -grant_great_yuan_effect = { - - # If the character doesn't hold any titles in the relevant - if = { - limit = { - NOT = { - any_held_title = { - title_tier = county - is_landless_type_title = no - title_province = { - geographical_region = special_mongol_empire_great_yuan_region - } - } - } - } - #Prefer biggest available chinese empire - if = { - limit = { - scope:old_mongol_emperor = { - any_sub_realm_empire = { - any_this_title_or_de_jure_above = { - this = title:h_china - } - } - } - } - scope:old_mongol_emperor = { - #Prioritize Chinese empire they have the most titles in - ordered_sub_realm_empire = { - order_by = { - every_de_jure_county = { - limit = { - is_landless_type_title = no - holder.top_liege ?= scope:old_mongol_emperor - title_province ?= { - geographical_region = special_mongol_empire_great_yuan_region - } - } - add = 1 - } - } - limit = { - any_this_title_or_de_jure_above = { - this = title:h_china - } - } - random_de_jure_county = { - limit = { - is_landless_type_title = no - title_province = { - geographical_region = special_mongol_empire_great_yuan_region - } - } - } - save_scope_as = county_to_transfer - } - } - } - #Or just any county in Great Yuan region - else = { - scope:old_mongol_emperor = { - random_sub_realm_county = { - limit = { - is_landless_type_title = no - title_province = { - geographical_region = special_mongol_empire_great_yuan_region - } - } - save_scope_as = county_to_transfer - } - } - } - create_title_and_vassal_change = { - type = granted - save_scope_as = title_change - add_claim_on_loss = no - } - scope:county_to_transfer = { - change_title_holder = { - holder = scope:candidate - change = scope:title_change - } - } - resolve_title_and_vassal_change = scope:title_change - } - - #First - give Hegemony of China if it's empty and Mongols have enough China! - if = { - limit = { - has_tgp_dlc_trigger = yes - NOT = { - exists = title:h_china.holder - } - title:h_china ?= { - any_de_jure_county = { - percent >= claim_mandate_china_county_percentage_value - holder.top_liege = { - OR = { - this = scope:old_mongol_emperor - is_tributary_of_suzerain_or_above = scope:old_mongol_emperor - } - } - } - } - } - title:h_china = { - save_scope_as = great_yuan_title - } - } - #Give appropriate Chinese empire so that they aren't disturbed by a weird Yuan being created - else_if = { - limit = { - scope:old_mongol_emperor = { - any_realm_de_jure_empire = { - any_this_title_or_de_jure_above = { - this = title:h_china - } - OR = { - NOT = { - exists = holder - } - holder = scope:old_mongol_emperor - } - } - } - } - scope:old_mongol_emperor = { - ordered_realm_de_jure_empire = { - order_by = { - every_de_jure_county = { - limit = { - holder.top_liege ?= scope:old_mongol_emperor - title_province ?= { - geographical_region = special_mongol_empire_great_yuan_region - } - } - add = 1 - } - } - limit = { - any_this_title_or_de_jure_above = { - this = title:h_china - } - OR = { - NOT = { - exists = holder - } - holder = scope:old_mongol_emperor - } - } - save_scope_as = great_yuan_title - } - } - } - #Give any Empire in Great Yuan region, I guess that will do - else_if = { - limit = { - scope:old_mongol_emperor = { - any_realm_de_jure_empire = { - any_de_jure_county = { - title_province = { - geographical_region = special_mongol_empire_great_yuan_region - } - } - OR = { - NOT = { - exists = holder - } - holder = scope:old_mongol_emperor - } - } - } - } - scope:old_mongol_emperor = { - ordered_realm_de_jure_empire = { - order_by = { - every_de_jure_county = { - limit = { - holder.top_liege ?= scope:old_mongol_emperor - title_province ?= { - geographical_region = special_mongol_empire_great_yuan_region - } - } - add = 1 - } - } - limit = { - any_de_jure_county = { - title_province = { - geographical_region = special_mongol_empire_great_yuan_region - } - } - OR = { - NOT = { - exists = holder - } - holder = scope:old_mongol_emperor - } - } - save_scope_as = great_yuan_title - } - } - } - #Give Great Yuan title - else = { - title:e_great_yuan = { - save_scope_as = great_yuan_title - } - } - - create_title_and_vassal_change = { - type = created - save_scope_as = title_change - add_claim_on_loss = no - } - scope:great_yuan_title = { - change_title_holder = { - holder = scope:candidate - change = scope:title_change - } - } - resolve_title_and_vassal_change = scope:title_change - - #Put great yuan under h_china if it was just made - if = { - limit = { - scope:great_yuan_title = title:e_great_yuan - } - title:e_great_yuan = { - set_de_jure_liege_title = title:h_china - } - } - - scope:candidate = { - save_scope_as = great_yuan_ruler - } - - set_global_variable = { - name = great_yuan_handed_out - value = yes - } - - #If Hegemony or Great Yuan created, give appropriate capital for great yuan - if = { - limit = { - scope:great_yuan_title = { - OR = { - this = title:h_china - this = title:e_great_yuan - } - } - scope:old_mongol_emperor = { - any_sub_realm_county = { - duchy = title:e_great_yuan.title_capital_county.duchy - NOR = { - holder = scope:candidate - holder = { # Don't steal the player's lands - is_ai = no - } - holder = { - any_liege_or_above = { is_ai = no } - } - } - } - } - } - scope:old_mongol_emperor = { - every_sub_realm_county = { - limit = { - duchy = title:e_great_yuan.title_capital_county.duchy - NOR = { - holder = scope:candidate - holder = { # Don't steal the player's lands - is_ai = no - } - holder = { - any_liege_or_above = { is_ai = no } - } - } - } - add_to_list = titles_taken - } - } - create_title_and_vassal_change = { - type = granted - save_scope_as = title_change - add_claim_on_loss = no - } - every_in_list = { - list = titles_taken - change_title_holder = { - holder = scope:candidate - change = scope:title_change - take_baronies = yes - } - } - resolve_title_and_vassal_change = scope:title_change - } - # Give the character the appropriate dynamic capital area, if possible - else_if = { - limit = { - scope:old_mongol_emperor = { - any_sub_realm_county = { - duchy = scope:great_yuan_title.title_capital_county.duchy - NOR = { - holder = scope:candidate - holder = { # Don't steal the player's lands - is_ai = no - } - holder = { - any_liege_or_above = { is_ai = no } - } - } - } - } - } - scope:old_mongol_emperor = { - every_sub_realm_county = { - limit = { - duchy = scope:great_yuan_title.title_capital_county.duchy - NOR = { - holder = scope:candidate - holder = { # Don't steal the player's lands - is_ai = no - } - holder = { - any_liege_or_above = { is_ai = no } - } - } - } - add_to_list = titles_taken - } - } - create_title_and_vassal_change = { - type = granted - save_scope_as = title_change - add_claim_on_loss = no - } - every_in_list = { - list = titles_taken - change_title_holder = { - holder = scope:candidate - change = scope:title_change - take_baronies = yes - } - } - resolve_title_and_vassal_change = scope:title_change - } - every_character_war = { - end_war = white_peace - } - #If has Hegemony or Great Yuan, set Yuan capital as capital - if = { - limit = { - scope:great_yuan_title = { - OR = { - this = title:h_china - this = title:e_great_yuan - } - } - has_title = title:e_great_yuan.title_capital_county - } - set_realm_capital = title:e_great_yuan.title_capital_county - } - else_if = { - limit = { - has_title = scope:great_yuan_title.title_capital_county - } - set_realm_capital = scope:great_yuan_title.title_capital_county - } - else_if = { - limit = { - NOT = { - capital_county.title_province = { - geographical_region = special_mongol_empire_great_yuan_region - } - } - any_held_title = { - title_tier = county - is_landless_type_title = no - title_province = { - geographical_region = special_mongol_empire_great_yuan_region - } - } - } - random_held_title = { - title_tier = county - limit = { - is_landless_type_title = no - title_province = { - geographical_region = special_mongol_empire_great_yuan_region - } - } - scope:candidate = { - set_realm_capital = prev - } - } - } - spawn_mongol_successor_state_troops_effect = yes - add_gold = 1000 - add_dread = 100 - - #The Yuan Emperor should get the story that drives him to become Celestial Hegemon, if he isn't already and it's chaos phase - if = { - limit = { - scope:great_yuan_title = { - NOT = { - this = title:h_china - } - } - any_character_situation = { - situation_type = dynastic_cycle - situation_current_phase = situation_dynastic_cycle_phase_chaos - } - } - create_story = story_take_mandate_of_heaven - if = { - limit = { - has_treasury = yes - } - add_treasury = 2000 - } - else = { - add_gold = 2000 - } - } - else = { - create_story = story_conqueror - } -} - -grant_blue_horde_effect = { - - # If the character doesn't hold any titles in the relevant - if = { - limit = { - NOT = { - any_held_title = { - title_tier = county - is_landless_type_title = no - title_province = { - geographical_region = special_mongol_empire_blue_horde_region - } - } - } - } - scope:old_mongol_emperor = { - random_sub_realm_county = { - limit = { - is_landless_type_title = no - title_province = { - geographical_region = special_mongol_empire_blue_horde_region - } - } - save_scope_as = county_to_transfer - } - } - create_title_and_vassal_change = { - type = granted - save_scope_as = title_change - add_claim_on_loss = no - } - scope:county_to_transfer = { - change_title_holder = { - holder = scope:candidate - change = scope:title_change - } - } - resolve_title_and_vassal_change = scope:title_change - } - create_title_and_vassal_change = { - type = created - save_scope_as = title_change - add_claim_on_loss = no - } - title:e_blue_horde = { - change_title_holder = { - holder = scope:candidate - change = scope:title_change - } - } - resolve_title_and_vassal_change = scope:title_change - - scope:candidate = { - save_scope_as = blue_horde_ruler - } - - set_global_variable = { - name = blue_horde_handed_out - value = yes - } - - # Give the character the appropriate capital area, if possible - if = { - limit = { - scope:old_mongol_emperor = { - any_sub_realm_county = { - duchy = title:e_blue_horde.title_capital_county.duchy - NOR = { - holder = scope:candidate - holder = { # Don't steal the player's lands - is_ai = no - } - holder = { - any_liege_or_above = { is_ai = no } - } - } - } - } - } - scope:old_mongol_emperor = { - every_sub_realm_county = { - limit = { - duchy = title:e_blue_horde.title_capital_county.duchy - NOR = { - holder = scope:candidate - holder = { # Don't steal the player's lands - is_ai = no - } - holder = { - any_liege_or_above = { is_ai = no } - } - } - } - add_to_list = titles_taken - } - } - create_title_and_vassal_change = { - type = granted - save_scope_as = title_change - add_claim_on_loss = no - } - every_in_list = { - list = titles_taken - change_title_holder = { - holder = scope:candidate - change = scope:title_change - take_baronies = yes - } - } - resolve_title_and_vassal_change = scope:title_change - } - every_character_war = { - end_war = white_peace - } - if = { - limit = { - has_title = title:e_blue_horde.title_capital_county - } - set_realm_capital = title:e_blue_horde.title_capital_county - } - else_if = { - limit = { - NOT = { - capital_county.title_province = { - geographical_region = special_mongol_empire_blue_horde_region - } - } - any_held_title = { - title_tier = county - is_landless_type_title = no - title_province = { - geographical_region = special_mongol_empire_blue_horde_region - } - } - } - random_held_title = { - title_tier = county - limit = { - is_landless_type_title = no - title_province = { - geographical_region = special_mongol_empire_blue_horde_region - } - } - scope:candidate = { - set_realm_capital = prev - } - } - } - spawn_mongol_successor_state_troops_effect = yes - add_gold = 1000 - add_dread = 100 - create_story = story_conqueror - grant_mongol_successor_nomadic_bonuses_effect = yes -} - -grant_omnod_dalai_khanate_effect = { - - # If the character doesn't hold any titles in the relevant - if = { - limit = { - NOT = { - any_held_title = { - title_tier = county - is_landless_type_title = no - title_province = { - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - } - } - } - scope:old_mongol_emperor = { - random_sub_realm_county = { - limit = { - is_landless_type_title = no - title_province = { - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - } - save_scope_as = county_to_transfer - } - } - create_title_and_vassal_change = { - type = granted - save_scope_as = title_change - add_claim_on_loss = no - } - scope:county_to_transfer = { - change_title_holder = { - holder = scope:candidate - change = scope:title_change - } - } - resolve_title_and_vassal_change = scope:title_change - } - create_title_and_vassal_change = { - type = created - save_scope_as = title_change - add_claim_on_loss = no - } - title:e_omnod_dalai_khanate = { - change_title_holder = { - holder = scope:candidate - change = scope:title_change - } - } - resolve_title_and_vassal_change = scope:title_change - - scope:candidate = { - save_scope_as = omnod_dalai_khanate_ruler - } - - set_global_variable = { - name = omnod_dalai_khanate_handed_out - value = yes - } - - # Give the character the appropriate capital area, if possible - if = { - limit = { - scope:old_mongol_emperor = { - any_sub_realm_county = { - duchy = title:e_omnod_dalai_khanate.title_capital_county.duchy - NOR = { - holder = scope:candidate - holder = { # Don't steal the player's lands - is_ai = no - } - holder = { - any_liege_or_above = { is_ai = no } - } - } - } - } - } - scope:old_mongol_emperor = { - every_sub_realm_county = { - limit = { - duchy = title:e_omnod_dalai_khanate.title_capital_county.duchy - NOR = { - holder = scope:candidate - holder = { # Don't steal the player's lands - is_ai = no - } - holder = { - any_liege_or_above = { is_ai = no } - } - } - } - add_to_list = titles_taken - } - } - create_title_and_vassal_change = { - type = granted - save_scope_as = title_change - add_claim_on_loss = no - } - every_in_list = { - list = titles_taken - change_title_holder = { - holder = scope:candidate - change = scope:title_change - take_baronies = yes - } - } - resolve_title_and_vassal_change = scope:title_change - } - every_character_war = { - end_war = white_peace - } - if = { - limit = { - has_title = title:e_omnod_dalai_khanate.title_capital_county - } - set_realm_capital = title:e_omnod_dalai_khanate.title_capital_county - } - else_if = { - limit = { - NOT = { - capital_county.title_province = { - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - } - any_held_title = { - title_tier = county - is_landless_type_title = no - title_province = { - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - } - } - random_held_title = { - title_tier = county - limit = { - is_landless_type_title = no - title_province = { - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - } - scope:candidate = { - set_realm_capital = prev - } - } - } - spawn_mongol_successor_state_troops_effect = yes - add_gold = 1000 - add_dread = 100 - create_story = story_conqueror - grant_mongol_successor_nomadic_bonuses_effect = yes -} - -# Effect to clean up borders a little -pick_up_remaining_counties_effect = { - ### Ilkhanate - if = { - limit = { - NOT = { exists = global_var:ilkhanate_handed_out } - any_in_list = { - list = ilkhanate_counties - count > 0 - } - } - # Try giving them to Chagatai - if = { - limit = { - exists = global_var:chagatai_handed_out - } - every_in_list = { - list = ilkhanate_counties - add_to_list = chagatai_counties - } - } - # Try Red Horde - else_if = { - limit = { - exists = global_var:red_horde_handed_out - } - every_in_list = { - list = ilkhanate_counties - add_to_list = red_horde_counties - } - } - # Try Golden Horde - else_if = { - limit = { - exists = global_var:golden_horde_handed_out - } - every_in_list = { - list = ilkhanate_counties - add_to_list = golden_horde_counties - } - } - # Try Baruun - else_if = { - limit = { - exists = global_var:baruun_khanate_handed_out - } - every_in_list = { - list = ilkhanate_counties - add_to_list = baruun_khanate_counties - } - } - } - ### End Ilkhanate - - ### Golden Horde - if = { - limit = { - NOT = { exists = global_var:golden_horde_handed_out } - any_in_list = { - list = golden_horde_counties - count > 0 - } - } - # Try giving them to White Horde - if = { - limit = { - exists = global_var:white_horde_handed_out - } - every_in_list = { - list = golden_horde_counties - add_to_list = white_horde_counties - } - } - # Try Aarlud Khanate - else_if = { - limit = { - exists = global_var:aarlud_khanate_handed_out - } - every_in_list = { - list = golden_horde_counties - add_to_list = aarlud_khanate_counties - } - } - # Try Chagatai - else_if = { - limit = { - exists = global_var:chagatai_handed_out - } - every_in_list = { - list = golden_horde_counties - add_to_list = chagatai_counties - } - } - # Try Ilkhanate - else_if = { - limit = { - exists = global_var:ilkhanate_handed_out - } - every_in_list = { - list = golden_horde_counties - add_to_list = ilkhanate_counties - } - } - } - ### End Golden Horde - - ### Chagatai - if = { - limit = { - NOT = { exists = global_var:chagatai_handed_out } - any_in_list = { - list = chagatai_counties - count > 0 - } - } - # Try giving them to Golden Horde - if = { - limit = { - exists = global_var:golden_horde_handed_out - } - every_in_list = { - list = chagatai_counties - add_to_list = golden_horde_counties - } - } - # Try Ilkhanate - else_if = { - limit = { - exists = global_var:ilkhanate_handed_out - } - every_in_list = { - list = chagatai_counties - add_to_list = ilkhanate_counties - } - } - #Try Great Yuan - if = { - limit = { - exists = global_var:great_yuan_handed_out - } - every_in_list = { - list = chagatai_counties - add_to_list = great_yuan_counties - } - } - } - ### End Chagatai - - ### Great Yuan - if = { - limit = { - NOT = { exists = global_var:great_yuan_handed_out } - any_in_list = { - list = great_yuan_counties - count > 0 - } - } - # Try giving them to Chagatai - if = { - limit = { - exists = global_var:chagatai_handed_out - } - every_in_list = { - list = great_yuan_counties - add_to_list = chagatai_counties - } - } - # Try Red Horde - else_if = { - limit = { - exists = global_var:red_horde_handed_out - } - every_in_list = { - list = great_yuan_counties - add_to_list = red_horde_counties - } - } - # Try Blue Horde - else_if = { - limit = { - exists = global_var:blue_horde_handed_out - } - every_in_list = { - list = great_yuan_counties - add_to_list = blue_horde_counties - } - } - #Try Omnod Dalai Khanate - if = { - limit = { - exists = global_var:omnod_dalai_khanate_handed_out - } - every_in_list = { - list = great_yuan_counties - add_to_list = omnod_dalai_khanate_counties - } - } - # Try giving them to Golden Horde - if = { - limit = { - exists = global_var:golden_horde_handed_out - } - every_in_list = { - list = great_yuan_counties - add_to_list = golden_horde_counties - } - } - # Try giving them to Ilkhanate - if = { - limit = { - exists = global_var:ilkhanate_handed_out - } - every_in_list = { - list = great_yuan_counties - add_to_list = ilkhanate_counties - } - } - } - ### End Great Yuan - - ### Red Horde - if = { - limit = { - NOT = { exists = global_var:red_horde_handed_out } - any_in_list = { - list = red_horde_counties - count > 0 - } - } - # Try giving them to Ilkhanate - if = { - limit = { - exists = global_var:ilkhanate_handed_out - } - every_in_list = { - list = red_horde_counties - add_to_list = ilkhanate_counties - } - } - # Try Chagatai - else_if = { - limit = { - exists = global_var:chagatai_handed_out - } - every_in_list = { - list = red_horde_counties - add_to_list = chagatai_counties - } - } - #Try Great Yuan - if = { - limit = { - exists = global_var:great_yuan_handed_out - } - every_in_list = { - list = red_horde_counties - add_to_list = great_yuan_counties - } - } - #Try Omnod Dalai Khanate - if = { - limit = { - exists = global_var:omnod_dalai_khanate_handed_out - } - every_in_list = { - list = red_horde_counties - add_to_list = omnod_dalai_khanate_counties - } - } - # Try Baruun - else_if = { - limit = { - exists = global_var:baruun_khanate_handed_out - } - every_in_list = { - list = red_horde_counties - add_to_list = baruun_khanate_counties - } - } - } - ### End Red Horde - - ### White Horde - if = { - limit = { - NOT = { exists = global_var:white_horde_handed_out } - any_in_list = { - list = white_horde_counties - count > 0 - } - } - # Try giving them to Golden Horde - if = { - limit = { - exists = global_var:golden_horde_handed_out - } - every_in_list = { - list = white_horde_counties - add_to_list = golden_horde_counties - } - } - # Try Ilkhanate - else_if = { - limit = { - exists = global_var:ilkhanate_handed_out - } - every_in_list = { - list = white_horde_counties - add_to_list = ilkhanate_counties - } - } - # Try Aarlud Khanate - else_if = { - limit = { - exists = global_var:aarlud_khanate_handed_out - } - every_in_list = { - list = white_horde_counties - add_to_list = aarlud_khanate_counties - } - } - # Try Togskol - else_if = { - limit = { - exists = global_var:togskol_khanate_handed_out - } - every_in_list = { - list = white_horde_counties - add_to_list = togskol_khanate_counties - } - } - # Try Chagatai - else_if = { - limit = { - exists = global_var:chagatai_handed_out - } - every_in_list = { - list = white_horde_counties - add_to_list = chagatai_counties - } - } - } - ### End White Horde - - ### Blue Horde - if = { - limit = { - NOT = { exists = global_var:blue_horde_handed_out } - any_in_list = { - list = blue_horde_counties - count > 0 - } - } - #Try Great Yuan - if = { - limit = { - exists = global_var:great_yuan_handed_out - } - every_in_list = { - list = blue_horde_counties - add_to_list = great_yuan_counties - } - } - #Try Omnod Dalai Khanate - if = { - limit = { - exists = global_var:omnod_dalai_khanate_handed_out - } - every_in_list = { - list = blue_horde_counties - add_to_list = omnod_dalai_khanate_counties - } - } - # Try Chagatai - else_if = { - limit = { - exists = global_var:chagatai_handed_out - } - every_in_list = { - list = blue_horde_counties - add_to_list = chagatai_counties - } - } - # Try giving them to Golden Horde - if = { - limit = { - exists = global_var:golden_horde_handed_out - } - every_in_list = { - list = red_horde_counties - add_to_list = golden_horde_counties - } - } - } - ### End Blue Horde - - ### Omnod Dalai Khanate - if = { - limit = { - NOT = { exists = global_var:omnod_dalai_khanate_handed_out } - any_in_list = { - list = omnod_dalai_khanate_counties - count > 0 - } - } - #Try Great Yuan - if = { - limit = { - exists = global_var:great_yuan_handed_out - } - every_in_list = { - list = omnod_dalai_khanate_counties - add_to_list = great_yuan_counties - } - } - #Try Blue Horde - if = { - limit = { - exists = global_var:blue_horde_handed_out - } - every_in_list = { - list = omnod_dalai_khanate_counties - add_to_list = blue_horde_counties - } - } - #Try Red Horde - if = { - limit = { - exists = global_var:red_horde_handed_out - } - every_in_list = { - list = omnod_dalai_khanate_counties - add_to_list = red_horde_counties - } - } - # Try Ilkhanate - else_if = { - limit = { - exists = global_var:ilkhanate_handed_out - } - every_in_list = { - list = omnod_dalai_khanate_counties - add_to_list = ilkhanate_counties - } - } - # Try Chagatai - else_if = { - limit = { - exists = global_var:chagatai_handed_out - } - every_in_list = { - list = omnod_dalai_khanate_counties - add_to_list = chagatai_counties - } - } - } - ### End Omnod Dalai Khanate - - ### Aarlud Khanate - if = { - limit = { - NOT = { exists = global_var:aarlud_khanate_handed_out } - any_in_list = { - list = aarlud_khanate_counties - count > 0 - } - } - # Try giving them to White Horde - if = { - limit = { - exists = global_var:white_horde_handed_out - } - every_in_list = { - list = aarlud_khanate_counties - add_to_list = white_horde_counties - } - } - # Try Golden Horde - else_if = { - limit = { - exists = global_var:golden_horde_handed_out - } - every_in_list = { - list = aarlud_khanate_counties - add_to_list = golden_horde_counties - } - } - # Try Togskol - else_if = { - limit = { - exists = global_var:togskol_khanate_handed_out - } - every_in_list = { - list = aarlud_khanate_counties - add_to_list = togskol_khanate_counties - } - } - } - ### End Aarlud Khanate - - ### Togskol Khanate - if = { - limit = { - NOT = { exists = global_var:togskol_khanate_handed_out } - any_in_list = { - list = togskol_khanate_counties - count > 0 - } - } - # Try giving them to White Horde - if = { - limit = { - exists = global_var:white_horde_handed_out - } - every_in_list = { - list = togskol_khanate_counties - add_to_list = white_horde_counties - } - } - # Try Aarlud - else_if = { - limit = { - exists = global_var:aarlud_khanate_handed_out - } - every_in_list = { - list = togskol_khanate_counties - add_to_list = aarlud_khanate_counties - } - } - # Try Golden Horde - else_if = { - limit = { - exists = global_var:golden_horde_handed_out - } - every_in_list = { - list = togskol_khanate_counties - add_to_list = golden_horde_counties - } - } - # Try Baruun - else_if = { - limit = { - exists = global_var:baruun_khanate_handed_out - } - every_in_list = { - list = togskol_khanate_counties - add_to_list = baruun_khanate_counties - } - } - } - ### End Togskol Khanate - - ### Baruun Khanate - if = { - limit = { - NOT = { exists = global_var:baruun_khanate_handed_out } - any_in_list = { - list = baruun_khanate_counties - count > 0 - } - } - # Try giving them to Ilkhanate - if = { - limit = { - exists = global_var:ilkhanate_handed_out - } - every_in_list = { - list = baruun_khanate_counties - add_to_list = ilkhanate_counties - } - } - # Try Togskol - else_if = { - limit = { - exists = global_var:togskol_khanate_handed_out - } - every_in_list = { - list = baruun_khanate_counties - add_to_list = togskol_khanate_counties - } - } - # Try Red Horde - else_if = { - limit = { - exists = global_var:red_horde_handed_out - } - every_in_list = { - list = baruun_khanate_counties - add_to_list = red_horde_counties - } - } - #Try Omnod Dalai Khanate - if = { - limit = { - exists = global_var:omnod_dalai_khanate_handed_out - } - every_in_list = { - list = baruun_khanate_counties - add_to_list = omnod_dalai_khanate_counties - } - } - } - ### End Baruun Khanate -} - -# Set up all vassals and assign them flags for the "correct" Khanate -set_correct_mongol_breakup_vassalage_effect = { - scope:old_mongol_emperor = { - every_vassal = { - limit = { - NOT = { is_in_list = selected_mongol_heirs } - is_playable_character = yes - highest_held_title_tier >= tier_county - } - debug_log = "Trying to assign correct vassalage placement for:" - debug_log_scopes = no - - save_scope_as = vassal - - # Note: the variables for counting counties is set before checking whether the relevant title will be created, to prevent null-reference errors later - set_global_variable = { - name = ilkhanate_county_count - value = 0 - } - if = { # Count Ilkhanate Counties - limit = { - exists = global_var:ilkhanate_handed_out - } - every_sub_realm_county = { - limit = { - is_in_list = ilkhanate_counties - } - scope:vassal = { - change_global_variable = { - name = ilkhanate_county_count - add = 1 - } - } - } - } - set_global_variable = { - name = golden_horde_county_count - value = 0 - } - if = { # Count Golden Horde Counties - limit = { - exists = global_var:golden_horde_handed_out - } - every_sub_realm_county = { - limit = { - is_in_list = golden_horde_counties - } - scope:vassal = { - change_global_variable = { - name = golden_horde_county_count - add = 1 - } - } - } - } - set_global_variable = { - name = chagatai_county_count - value = 0 - } - if = { # Count Chagatai Counties - limit = { - exists = global_var:chagatai_handed_out - } - every_sub_realm_county = { - limit = { - is_in_list = chagatai_counties - } - scope:vassal = { - change_global_variable = { - name = chagatai_county_count - add = 1 - } - } - } - } - set_global_variable = { - name = great_yuan_county_count - value = 0 - } - if = { # Count Great Yuan Counties - limit = { - exists = global_var:great_yuan_handed_out - } - every_sub_realm_county = { - limit = { - is_in_list = great_yuan_counties - } - scope:vassal = { - change_global_variable = { - name = great_yuan_county_count - add = 1 - } - } - } - } - set_global_variable = { - name = red_horde_county_count - value = 0 - } - if = { # Count Red Horde counties - limit = { - exists = global_var:red_horde_handed_out - } - every_sub_realm_county = { - limit = { - is_in_list = red_horde_counties - } - scope:vassal = { - change_global_variable = { - name = red_horde_county_count - add = 1 - } - } - } - } - set_global_variable = { - name = white_horde_county_count - value = 0 - } - if = { # Count White Horde counties - limit = { - exists = global_var:white_horde_handed_out - } - every_sub_realm_county = { - limit = { - is_in_list = white_horde_counties - } - scope:vassal = { - change_global_variable = { - name = white_horde_county_count - add = 1 - } - } - } - } - set_global_variable = { - name = blue_horde_county_count - value = 0 - } - if = { # Count Blue Horde counties - limit = { - exists = global_var:blue_horde_handed_out - } - every_sub_realm_county = { - limit = { - is_in_list = blue_horde_counties - } - scope:vassal = { - change_global_variable = { - name = blue_horde_county_count - add = 1 - } - } - } - } - set_global_variable = { - name = omnod_dalai_khanate_county_count - value = 0 - } - if = { # Count Omnod Dalai Khanate counties - limit = { - exists = global_var:omnod_dalai_khanate_handed_out - } - every_sub_realm_county = { - limit = { - is_in_list = omnod_dalai_khanate_counties - } - scope:vassal = { - change_global_variable = { - name = omnod_dalai_khanate_county_count - add = 1 - } - } - } - } - set_global_variable = { - name = aarlud_khanate_county_count - value = 0 - } - if = { # Count Aarlud Khanate counties - limit = { - exists = global_var:aarlud_khanate_handed_out - } - every_sub_realm_county = { - limit = { - is_in_list = aarlud_khanate_counties - } - scope:vassal = { - change_global_variable = { - name = aarlud_khanate_county_count - add = 1 - } - } - } - } - set_global_variable = { - name = togskol_khanate_county_count - value = 0 - } - if = { # Count Tögsköl Khanate counties - limit = { - exists = global_var:togskol_khanate_handed_out - } - every_sub_realm_county = { - limit = { - is_in_list = togskol_khanate_counties - } - scope:vassal = { - change_global_variable = { - name = togskol_khanate_county_count - add = 1 - } - } - } - } - set_global_variable = { - name = baruun_khanate_county_count - value = 0 - } - if = { # Count Baruun Khanate counties - limit = { - exists = global_var:baruun_khanate_handed_out - } - every_sub_realm_county = { - limit = { - is_in_list = baruun_khanate_counties - } - scope:vassal = { - change_global_variable = { - name = baruun_khanate_county_count - add = 1 - } - } - } - } - # Find any counties not in any lists - set_global_variable = { - name = leftover_mongol_county_count - value = 0 - } - every_sub_realm_county = { - limit = { - trigger_if = { - limit = { exists = global_var:ilkhanate_handed_out } - NOT = { is_in_list = ilkhanate_counties } - } - trigger_if = { - limit = { exists = global_var:golden_horde_handed_out } - NOT = { is_in_list = golden_horde_counties } - } - trigger_if = { - limit = { exists = global_var:chagatai_handed_out } - NOT = { is_in_list = chagatai_counties } - } - trigger_if = { - limit = { exists = global_var:great_yuan_handed_out } - NOT = { is_in_list = great_yuan_counties } - } - trigger_if = { - limit = { exists = global_var:red_horde_handed_out } - NOT = { is_in_list = red_horde_counties } - } - trigger_if = { - limit = { exists = global_var:white_horde_handed_out } - NOT = { is_in_list = white_horde_counties } - } - trigger_if = { - limit = { exists = global_var:aarlud_khanate_handed_out } - NOT = { is_in_list = aarlud_khanate_counties } - } - trigger_if = { - limit = { exists = global_var:togskol_khanate_handed_out } - NOT = { is_in_list = togskol_khanate_counties } - } - trigger_if = { - limit = { exists = global_var:baruun_khanate_handed_out } - NOT = { is_in_list = baruun_khanate_counties } - } - trigger_if = { - limit = { exists = global_var:blue_horde_handed_out } - NOT = { is_in_list = blue_horde_counties } - } - trigger_if = { - limit = { exists = global_var:omnod_dalai_khanate_handed_out } - NOT = { is_in_list = omnod_dalai_khanate_counties } - } - } - scope:vassal = { - change_global_variable = { - name = leftover_mongol_county_count - add = 1 - } - } - } - - ### Mark vassals for the correct liege empire - if = { - limit = { - global_var:leftover_mongol_county_count >= global_var:ilkhanate_county_count - global_var:leftover_mongol_county_count >= global_var:golden_horde_county_count - global_var:leftover_mongol_county_count >= global_var:chagatai_county_count - global_var:leftover_mongol_county_count >= global_var:red_horde_county_count - global_var:leftover_mongol_county_count >= global_var:white_horde_county_count - global_var:leftover_mongol_county_count >= global_var:aarlud_khanate_county_count - global_var:leftover_mongol_county_count >= global_var:togskol_khanate_county_count - global_var:leftover_mongol_county_count >= global_var:baruun_khanate_county_count - global_var:leftover_mongol_county_count >= global_var:great_yuan_county_count - global_var:leftover_mongol_county_count >= global_var:blue_horde_county_count - global_var:leftover_mongol_county_count >= global_var:omnod_dalai_khanate_county_count - } - add_character_flag = should_be_vassalized_by_mongolia - } - else_if = { - limit = { - global_var:ilkhanate_county_count > global_var:leftover_mongol_county_count - global_var:ilkhanate_county_count > global_var:golden_horde_county_count - global_var:ilkhanate_county_count > global_var:chagatai_county_count - global_var:ilkhanate_county_count > global_var:red_horde_county_count - global_var:ilkhanate_county_count > global_var:white_horde_county_count - global_var:ilkhanate_county_count > global_var:aarlud_khanate_county_count - global_var:ilkhanate_county_count > global_var:togskol_khanate_county_count - global_var:ilkhanate_county_count > global_var:baruun_khanate_county_count - global_var:ilkhanate_county_count > global_var:great_yuan_county_count - global_var:ilkhanate_county_count > global_var:blue_horde_county_count - global_var:ilkhanate_county_count > global_var:omnod_dalai_khanate_county_count - } - add_character_flag = should_be_vassalized_by_ilkhanate - } - else_if = { - limit = { - global_var:golden_horde_county_count > global_var:leftover_mongol_county_count - global_var:golden_horde_county_count > global_var:ilkhanate_county_count - global_var:golden_horde_county_count > global_var:chagatai_county_count - global_var:golden_horde_county_count > global_var:red_horde_county_count - global_var:golden_horde_county_count > global_var:white_horde_county_count - global_var:golden_horde_county_count > global_var:aarlud_khanate_county_count - global_var:golden_horde_county_count > global_var:togskol_khanate_county_count - global_var:golden_horde_county_count > global_var:baruun_khanate_county_count - global_var:golden_horde_county_count > global_var:great_yuan_county_count - global_var:golden_horde_county_count > global_var:blue_horde_county_count - global_var:golden_horde_county_count > global_var:omnod_dalai_khanate_county_count - } - add_character_flag = should_be_vassalized_by_golden_horde - } - else_if = { - limit = { - global_var:chagatai_county_count > global_var:leftover_mongol_county_count - global_var:chagatai_county_count > global_var:ilkhanate_county_count - global_var:chagatai_county_count > global_var:golden_horde_county_count - global_var:chagatai_county_count > global_var:red_horde_county_count - global_var:chagatai_county_count > global_var:white_horde_county_count - global_var:chagatai_county_count > global_var:aarlud_khanate_county_count - global_var:chagatai_county_count > global_var:togskol_khanate_county_count - global_var:chagatai_county_count > global_var:baruun_khanate_county_count - global_var:chagatai_county_count > global_var:great_yuan_county_count - global_var:chagatai_county_count > global_var:blue_horde_county_count - global_var:chagatai_county_count > global_var:omnod_dalai_khanate_county_count - } - add_character_flag = should_be_vassalized_by_chagatai - } - else_if = { - limit = { - global_var:great_yuan_county_count > global_var:leftover_mongol_county_count - global_var:great_yuan_county_count > global_var:ilkhanate_county_count - global_var:great_yuan_county_count > global_var:chagatai_county_count - global_var:great_yuan_county_count > global_var:golden_horde_county_count - global_var:great_yuan_county_count > global_var:red_horde_county_count - global_var:great_yuan_county_count > global_var:white_horde_county_count - global_var:great_yuan_county_count > global_var:aarlud_khanate_county_count - global_var:great_yuan_county_count > global_var:togskol_khanate_county_count - global_var:great_yuan_county_count > global_var:baruun_khanate_county_count - global_var:great_yuan_county_count > global_var:blue_horde_county_count - global_var:great_yuan_county_count > global_var:omnod_dalai_khanate_county_count - } - add_character_flag = should_be_vassalized_by_great_yuan - } - else_if = { - limit = { - global_var:red_horde_county_count > global_var:leftover_mongol_county_count - global_var:red_horde_county_count > global_var:ilkhanate_county_count - global_var:red_horde_county_count > global_var:golden_horde_county_count - global_var:red_horde_county_count > global_var:chagatai_county_count - global_var:red_horde_county_count > global_var:white_horde_county_count - global_var:red_horde_county_count > global_var:aarlud_khanate_county_count - global_var:red_horde_county_count > global_var:togskol_khanate_county_count - global_var:red_horde_county_count > global_var:baruun_khanate_county_count - global_var:red_horde_county_count > global_var:great_yuan_county_count - global_var:red_horde_county_count > global_var:blue_horde_county_count - global_var:red_horde_county_count > global_var:omnod_dalai_khanate_county_count - } - add_character_flag = should_be_vassalized_by_red_horde - } - else_if = { - limit = { - global_var:white_horde_county_count > global_var:leftover_mongol_county_count - global_var:white_horde_county_count > global_var:ilkhanate_county_count - global_var:white_horde_county_count > global_var:golden_horde_county_count - global_var:white_horde_county_count > global_var:chagatai_county_count - global_var:white_horde_county_count > global_var:red_horde_county_count - global_var:white_horde_county_count > global_var:aarlud_khanate_county_count - global_var:white_horde_county_count > global_var:togskol_khanate_county_count - global_var:white_horde_county_count > global_var:baruun_khanate_county_count - global_var:white_horde_county_count > global_var:great_yuan_county_count - global_var:white_horde_county_count > global_var:blue_horde_county_count - global_var:white_horde_county_count > global_var:omnod_dalai_khanate_county_count - } - add_character_flag = should_be_vassalized_by_white_horde - } - else_if = { - limit = { - global_var:blue_horde_county_count > global_var:leftover_mongol_county_count - global_var:blue_horde_county_count > global_var:ilkhanate_county_count - global_var:blue_horde_county_count > global_var:golden_horde_county_count - global_var:blue_horde_county_count > global_var:chagatai_county_count - global_var:blue_horde_county_count > global_var:red_horde_county_count - global_var:blue_horde_county_count > global_var:white_horde_county_count - global_var:blue_horde_county_count > global_var:white_horde_county_count - global_var:blue_horde_county_count > global_var:togskol_khanate_county_count - global_var:blue_horde_county_count > global_var:baruun_khanate_county_count - global_var:blue_horde_county_count > global_var:great_yuan_county_count - global_var:blue_horde_county_count > global_var:omnod_dalai_khanate_county_count - } - add_character_flag = should_be_vassalized_by_blue_horde - } - else_if = { - limit = { - global_var:omnod_dalai_khanate_county_count > global_var:leftover_mongol_county_count - global_var:omnod_dalai_khanate_county_count > global_var:ilkhanate_county_count - global_var:omnod_dalai_khanate_county_count > global_var:golden_horde_county_count - global_var:omnod_dalai_khanate_county_count > global_var:chagatai_county_count - global_var:omnod_dalai_khanate_county_count > global_var:red_horde_county_count - global_var:omnod_dalai_khanate_county_count > global_var:white_horde_county_count - global_var:omnod_dalai_khanate_county_count > global_var:white_horde_county_count - global_var:omnod_dalai_khanate_county_count > global_var:togskol_khanate_county_count - global_var:omnod_dalai_khanate_county_count > global_var:baruun_khanate_county_count - global_var:omnod_dalai_khanate_county_count > global_var:great_yuan_county_count - global_var:omnod_dalai_khanate_county_count > global_var:blue_horde_county_count - } - add_character_flag = should_be_vassalized_by_omnod_dalai_khanate - } - else_if = { - limit = { - global_var:aarlud_khanate_county_count > global_var:leftover_mongol_county_count - global_var:aarlud_khanate_county_count > global_var:ilkhanate_county_count - global_var:aarlud_khanate_county_count > global_var:golden_horde_county_count - global_var:aarlud_khanate_county_count > global_var:chagatai_county_count - global_var:aarlud_khanate_county_count > global_var:red_horde_county_count - global_var:aarlud_khanate_county_count > global_var:white_horde_county_count - global_var:aarlud_khanate_county_count > global_var:togskol_khanate_county_count - global_var:aarlud_khanate_county_count > global_var:baruun_khanate_county_count - global_var:aarlud_khanate_county_count > global_var:great_yuan_county_count - global_var:aarlud_khanate_county_count > global_var:blue_horde_county_count - global_var:aarlud_khanate_county_count > global_var:omnod_dalai_khanate_county_count - } - add_character_flag = should_be_vassalized_by_aarlud_khanate - } - else_if = { - limit = { - global_var:aarlud_khanate_county_count > global_var:leftover_mongol_county_count - global_var:aarlud_khanate_county_count > global_var:ilkhanate_county_count - global_var:aarlud_khanate_county_count > global_var:golden_horde_county_count - global_var:aarlud_khanate_county_count > global_var:chagatai_county_count - global_var:aarlud_khanate_county_count > global_var:red_horde_county_count - global_var:aarlud_khanate_county_count > global_var:white_horde_county_count - global_var:aarlud_khanate_county_count > global_var:togskol_khanate_county_count - global_var:aarlud_khanate_county_count > global_var:baruun_khanate_county_count - global_var:aarlud_khanate_county_count > global_var:great_yuan_county_count - global_var:aarlud_khanate_county_count > global_var:blue_horde_county_count - global_var:aarlud_khanate_county_count > global_var:omnod_dalai_khanate_county_count - } - add_character_flag = should_be_vassalized_by_aarlud_khanate - } - else_if = { - limit = { - global_var:togskol_khanate_county_count > global_var:leftover_mongol_county_count - global_var:togskol_khanate_county_count > global_var:ilkhanate_county_count - global_var:togskol_khanate_county_count > global_var:golden_horde_county_count - global_var:togskol_khanate_county_count > global_var:chagatai_county_count - global_var:togskol_khanate_county_count > global_var:red_horde_county_count - global_var:togskol_khanate_county_count > global_var:white_horde_county_count - global_var:togskol_khanate_county_count > global_var:aarlud_khanate_county_count - global_var:togskol_khanate_county_count > global_var:baruun_khanate_county_count - global_var:togskol_khanate_county_count > global_var:great_yuan_county_count - global_var:togskol_khanate_county_count > global_var:blue_horde_county_count - global_var:togskol_khanate_county_count > global_var:omnod_dalai_khanate_county_count - } - add_character_flag = should_be_vassalized_by_togskol_khanate - } - else_if = { - limit = { - global_var:baruun_khanate_county_count > global_var:leftover_mongol_county_count - global_var:baruun_khanate_county_count > global_var:ilkhanate_county_count - global_var:baruun_khanate_county_count > global_var:golden_horde_county_count - global_var:baruun_khanate_county_count > global_var:chagatai_county_count - global_var:baruun_khanate_county_count > global_var:red_horde_county_count - global_var:baruun_khanate_county_count > global_var:white_horde_county_count - global_var:baruun_khanate_county_count > global_var:aarlud_khanate_county_count - global_var:baruun_khanate_county_count > global_var:togskol_khanate_county_count - global_var:baruun_khanate_county_count > global_var:great_yuan_county_count - global_var:baruun_khanate_county_count > global_var:blue_horde_county_count - global_var:baruun_khanate_county_count > global_var:omnod_dalai_khanate_county_count - } - add_character_flag = should_be_vassalized_by_baruun_khanate - } - else = { - add_character_flag = should_be_vassalized_by_mongolia - } - } - } -} - -# Forcibly shift counties around as appropriate -shift_counties_on_mongol_succession_effect = { - every_in_list = { - list = selected_mongol_heirs - every_held_title = { - title_tier = county - limit = { - is_landless_type_title = no - } - if = { - limit = { - exists = global_var:ilkhanate_handed_out - is_in_list = ilkhanate_counties - NOT = { holder = { has_title = title:e_ilkhanate } } - } - add_to_list = ilkhanate_titles_for_transfer - # Also mark duchies for transfer if relevant - if = { - limit = { - exists = duchy.holder - holder = duchy.holder - } - duchy = { - add_to_list = ilkhanate_titles_for_transfer - } - } - } - if = { - limit = { - exists = global_var:golden_horde_handed_out - is_in_list = golden_horde_counties - NOT = { holder = { has_title = title:e_golden_horde } } - } - add_to_list = golden_horde_titles_for_transfer - # Also mark duchies for transfer if relevant - if = { - limit = { - exists = duchy.holder - holder = duchy.holder - } - duchy = { - add_to_list = golden_horde_titles_for_transfer - } - } - } - if = { - limit = { - exists = global_var:chagatai_handed_out - is_in_list = chagatai_counties - NOT = { holder = { has_title = title:e_chagatai } } - } - add_to_list = chagatai_titles_for_transfer - # Also mark duchies for transfer if relevant - if = { - limit = { - exists = duchy.holder - holder = duchy.holder - } - duchy = { - add_to_list = chagatai_titles_for_transfer - } - } - - } - if = { - limit = { - exists = global_var:great_yuan_handed_out - is_in_list = great_yuan_counties - NOT = { holder = { has_title = scope:great_yuan_title } } - } - add_to_list = great_yuan_titles_for_transfer - # Also mark duchies for transfer if relevant - if = { - limit = { - exists = duchy.holder - holder = duchy.holder - } - duchy = { - add_to_list = great_yuan_titles_for_transfer - } - } - - } - if = { - limit = { - exists = global_var:red_horde_handed_out - is_in_list = red_horde_counties - NOT = { holder = { has_title = title:e_red_horde } } - } - add_to_list = red_horde_titles_for_transfer - # Also mark duchies for transfer if relevant - if = { - limit = { - exists = duchy.holder - holder = duchy.holder - } - duchy = { - add_to_list = red_horde_titles_for_transfer - } - } - - } - if = { - limit = { - exists = global_var:white_horde_handed_out - is_in_list = white_horde_counties - NOT = { holder = { has_title = title:e_white_horde } } - } - add_to_list = white_horde_titles_for_transfer - # Also mark duchies for transfer if relevant - if = { - limit = { - exists = duchy.holder - holder = duchy.holder - } - duchy = { - add_to_list = white_horde_titles_for_transfer - } - } - - } - if = { - limit = { - exists = global_var:blue_horde_handed_out - is_in_list = blue_horde_counties - NOT = { holder = { has_title = title:e_blue_horde } } - } - add_to_list = blue_horde_titles_for_transfer - # Also mark duchies for transfer if relevant - if = { - limit = { - exists = duchy.holder - holder = duchy.holder - } - duchy = { - add_to_list = blue_horde_titles_for_transfer - } - } - - } - if = { - limit = { - exists = global_var:omnod_dalai_khanate_handed_out - is_in_list = omnod_dalai_khanate_counties - NOT = { holder = { has_title = title:e_omnod_dalai_khanate } } - } - add_to_list = omnod_dalai_khanate_titles_for_transfer - # Also mark duchies for transfer if relevant - if = { - limit = { - exists = duchy.holder - holder = duchy.holder - } - duchy = { - add_to_list = omnod_dalai_khanate_titles_for_transfer - } - } - - } - if = { - limit = { - exists = global_var:aarlud_khanate_handed_out - is_in_list = aarlud_khanate_counties - NOT = { holder = { has_title = title:e_aarlud_khanate } } - } - add_to_list = aarlud_khanate_titles_for_transfer - # Also mark duchies for transfer if relevant - if = { - limit = { - exists = duchy.holder - holder = duchy.holder - } - duchy = { - add_to_list = aarlud_khanate_titles_for_transfer - } - } - - } - if = { - limit = { - exists = global_var:togskol_khanate_handed_out - is_in_list = togskol_khanate_counties - NOT = { holder = { has_title = title:e_togskol_khanate } } - } - add_to_list = togskol_khanate_titles_for_transfer - # Also mark duchies for transfer if relevant - if = { - limit = { - exists = duchy.holder - holder = duchy.holder - } - duchy = { - add_to_list = togskol_khanate_titles_for_transfer - } - } - - } - if = { - limit = { - exists = global_var:baruun_khanate_handed_out - is_in_list = baruun_khanate_counties - NOT = { holder = { has_title = title:e_baruun_khanate } } - } - add_to_list = baruun_khanate_titles_for_transfer - # Also mark duchies for transfer if relevant - if = { - limit = { - exists = duchy.holder - holder = duchy.holder - } - duchy = { - add_to_list = baruun_khanate_titles_for_transfer - } - } - - } - } - } - scope:old_mongol_emperor = { - every_held_title = { - title_tier = county - limit = { - is_landless_type_title = no - } - if = { - limit = { - exists = global_var:ilkhanate_handed_out - is_in_list = ilkhanate_counties - NOT = { holder = { has_title = title:e_ilkhanate } } - } - add_to_list = ilkhanate_titles_for_transfer - # Also mark duchies for transfer if relevant - if = { - limit = { - exists = duchy.holder - holder = duchy.holder - } - duchy = { - add_to_list = ilkhanate_titles_for_transfer - } - } - - } - if = { - limit = { - exists = global_var:golden_horde_handed_out - is_in_list = golden_horde_counties - NOT = { holder = { has_title = title:e_golden_horde } } - } - add_to_list = golden_horde_titles_for_transfer - # Also mark duchies for transfer if relevant - if = { - limit = { - exists = duchy.holder - holder = duchy.holder - } - duchy = { - add_to_list = golden_horde_titles_for_transfer - } - } - - } - if = { - limit = { - exists = global_var:chagatai_handed_out - is_in_list = chagatai_counties - NOT = { holder = { has_title = title:e_chagatai } } - } - add_to_list = chagatai_titles_for_transfer - # Also mark duchies for transfer if relevant - if = { - limit = { - exists = duchy.holder - holder = duchy.holder - } - duchy = { - add_to_list = chagatai_titles_for_transfer - } - } - - } - if = { - limit = { - exists = global_var:great_yuan_handed_out - is_in_list = great_yuan_counties - NOT = { holder = { has_title = scope:great_yuan_title } } - } - add_to_list = great_yuan_titles_for_transfer - # Also mark duchies for transfer if relevant - if = { - limit = { - exists = duchy.holder - holder = duchy.holder - } - duchy = { - add_to_list = great_yuan_titles_for_transfer - } - } - - } - if = { - limit = { - exists = global_var:red_horde_handed_out - is_in_list = red_horde_counties - NOT = { holder = { has_title = title:e_red_horde } } - } - add_to_list = red_horde_titles_for_transfer - # Also mark duchies for transfer if relevant - if = { - limit = { - exists = duchy.holder - holder = duchy.holder - } - duchy = { - add_to_list = red_horde_titles_for_transfer - } - } - - } - if = { - limit = { - exists = global_var:white_horde_handed_out - is_in_list = white_horde_counties - NOT = { holder = { has_title = title:e_white_horde } } - } - add_to_list = white_horde_titles_for_transfer - # Also mark duchies for transfer if relevant - if = { - limit = { - exists = duchy.holder - holder = duchy.holder - } - duchy = { - add_to_list = white_horde_titles_for_transfer - } - } - - } - if = { - limit = { - exists = global_var:blue_horde_handed_out - is_in_list = blue_horde_counties - NOT = { holder = { has_title = title:e_blue_horde } } - } - add_to_list = blue_horde_titles_for_transfer - # Also mark duchies for transfer if relevant - if = { - limit = { - exists = duchy.holder - holder = duchy.holder - } - duchy = { - add_to_list = blue_horde_titles_for_transfer - } - } - - } - if = { - limit = { - exists = global_var:omnod_dalai_khanate_handed_out - is_in_list = omnod_dalai_khanate_counties - NOT = { holder = { has_title = title:e_omnod_dalai_khanate } } - } - add_to_list = omnod_dalai_khanate_titles_for_transfer - # Also mark duchies for transfer if relevant - if = { - limit = { - exists = duchy.holder - holder = duchy.holder - } - duchy = { - add_to_list = omnod_dalai_khanate_titles_for_transfer - } - } - - } - if = { - limit = { - exists = global_var:aarlud_khanate_handed_out - is_in_list = aarlud_khanate_counties - NOT = { holder = { has_title = title:e_aarlud_khanate } } - } - add_to_list = aarlud_khanate_titles_for_transfer - # Also mark duchies for transfer if relevant - if = { - limit = { - exists = duchy.holder - holder = duchy.holder - } - duchy = { - add_to_list = aarlud_khanate_titles_for_transfer - } - } - - } - if = { - limit = { - exists = global_var:togskol_khanate_handed_out - is_in_list = togskol_khanate_counties - NOT = { holder = { has_title = title:e_togskol_khanate } } - } - add_to_list = togskol_khanate_titles_for_transfer - # Also mark duchies for transfer if relevant - if = { - limit = { - exists = duchy.holder - holder = duchy.holder - } - duchy = { - add_to_list = togskol_khanate_titles_for_transfer - } - } - - } - if = { - limit = { - exists = global_var:baruun_khanate_handed_out - is_in_list = baruun_khanate_counties - NOT = { holder = { has_title = title:e_baruun_khanate } } - } - add_to_list = baruun_khanate_titles_for_transfer - # Also mark duchies for transfer if relevant - if = { - limit = { - exists = duchy.holder - holder = duchy.holder - } - duchy = { - add_to_list = baruun_khanate_titles_for_transfer - } - } - - } - } - } - create_title_and_vassal_change = { - type = granted - save_scope_as = mongol_succession - add_claim_on_loss = no - } - - # Ilkhanate - if = { - limit = { - exists = scope:ilkhanate_ruler - } - every_in_list = { - list = ilkhanate_titles_for_transfer - change_title_holder = { - holder = scope:ilkhanate_ruler - change = scope:mongol_succession - } - } - scope:old_mongol_emperor = { - every_vassal_or_below = { - limit = { - has_character_flag = should_be_vassalized_by_ilkhanate - } - change_liege = { - liege = scope:ilkhanate_ruler - change = scope:mongol_succession - } - } - } - } - # Golden Horde - if = { - limit = { - exists = scope:golden_horde_ruler - } - every_in_list = { - list = golden_horde_titles_for_transfer - change_title_holder = { - holder = scope:golden_horde_ruler - change = scope:mongol_succession - } - } - scope:old_mongol_emperor = { - every_vassal_or_below = { - limit = { - has_character_flag = should_be_vassalized_by_golden_horde - } - change_liege = { - liege = scope:golden_horde_ruler - change = scope:mongol_succession - } - } - } - } - # Chagatai - if = { - limit = { - exists = scope:chagatai_ruler - } - every_in_list = { - list = chagatai_titles_for_transfer - change_title_holder = { - holder = scope:chagatai_ruler - change = scope:mongol_succession - } - } - scope:old_mongol_emperor = { - every_vassal_or_below = { - limit = { - has_character_flag = should_be_vassalized_by_chagatai - } - change_liege = { - liege = scope:chagatai_ruler - change = scope:mongol_succession - } - } - } - } - # Great Yuan - if = { - limit = { - exists = scope:great_yuan_ruler - } - every_in_list = { - list = great_yuan_titles_for_transfer - change_title_holder = { - holder = scope:great_yuan_ruler - change = scope:mongol_succession - } - } - scope:old_mongol_emperor = { - every_vassal_or_below = { - limit = { - has_character_flag = should_be_vassalized_by_great_yuan - } - change_liege = { - liege = scope:great_yuan_ruler - change = scope:mongol_succession - } - } - } - } - # Red Horde - if = { - limit = { - exists = scope:red_horde_ruler - } - every_in_list = { - list = red_horde_titles_for_transfer - change_title_holder = { - holder = scope:red_horde_ruler - change = scope:mongol_succession - } - } - scope:old_mongol_emperor = { - every_vassal_or_below = { - limit = { - has_character_flag = should_be_vassalized_by_red_horde - } - change_liege = { - liege = scope:red_horde_ruler - change = scope:mongol_succession - } - } - } - } - # White Horde - if = { - limit = { - exists = scope:white_horde_ruler - } - every_in_list = { - list = white_horde_titles_for_transfer - change_title_holder = { - holder = scope:white_horde_ruler - change = scope:mongol_succession - } - } - scope:old_mongol_emperor = { - every_vassal_or_below = { - limit = { - has_character_flag = should_be_vassalized_by_white_horde - } - change_liege = { - liege = scope:white_horde_ruler - change = scope:mongol_succession - } - } - } - } - # Blue Horde - if = { - limit = { - exists = scope:blue_horde_ruler - } - every_in_list = { - list = blue_horde_titles_for_transfer - change_title_holder = { - holder = scope:blue_horde_ruler - change = scope:mongol_succession - } - } - scope:old_mongol_emperor = { - every_vassal_or_below = { - limit = { - has_character_flag = should_be_vassalized_by_blue_horde - } - change_liege = { - liege = scope:blue_horde_ruler - change = scope:mongol_succession - } - } - } - } - # Omnod Dalai Khanate - if = { - limit = { - exists = scope:omnod_dalai_khanate_ruler - } - every_in_list = { - list = omnod_dalai_khanate_titles_for_transfer - change_title_holder = { - holder = scope:omnod_dalai_khanate_ruler - change = scope:mongol_succession - } - } - scope:old_mongol_emperor = { - every_vassal_or_below = { - limit = { - has_character_flag = should_be_vassalized_by_omnod_dalai_khanate - } - change_liege = { - liege = scope:omnod_dalai_khanate_ruler - change = scope:mongol_succession - } - } - } - } - # Aarlud Khanate - if = { - limit = { - exists = scope:aarlud_khanate_ruler - } - every_in_list = { - list = aarlud_khanate_titles_for_transfer - change_title_holder = { - holder = scope:aarlud_khanate_ruler - change = scope:mongol_succession - } - } - scope:old_mongol_emperor = { - every_vassal_or_below = { - limit = { - has_character_flag = should_be_vassalized_by_aarlud_khanate - } - change_liege = { - liege = scope:aarlud_khanate_ruler - change = scope:mongol_succession - } - } - } - } - # Togskol Khanate - if = { - limit = { - exists = scope:togskol_khanate_ruler - } - every_in_list = { - list = togskol_khanate_titles_for_transfer - change_title_holder = { - holder = scope:togskol_khanate_ruler - change = scope:mongol_succession - } - } - scope:old_mongol_emperor = { - every_vassal_or_below = { - limit = { - has_character_flag = should_be_vassalized_by_togskol_khanate - } - change_liege = { - liege = scope:togskol_khanate_ruler - change = scope:mongol_succession - } - } - } - } - # Baruun Khanate - if = { - limit = { - exists = scope:baruun_khanate_ruler - } - every_in_list = { - list = baruun_khanate_titles_for_transfer - change_title_holder = { - holder = scope:baruun_khanate_ruler - change = scope:mongol_succession - } - } - scope:old_mongol_emperor = { - every_vassal_or_below = { - limit = { - has_character_flag = should_be_vassalized_by_baruun_khanate - } - change_liege = { - liege = scope:baruun_khanate_ruler - change = scope:mongol_succession - } - } - } - } - # Mongolia - if = { - limit = { - exists = scope:mongolia_ruler - } - scope:old_mongol_emperor = { - every_vassal_or_below = { - limit = { - has_character_flag = should_be_vassalized_by_mongolia - } - change_liege = { - liege = scope:mongolia_ruler - change = scope:mongol_succession - } - } - } - } - - # Extra backup safety - # Ilkhanate - if = { - limit = { - exists = scope:ilkhanate_ruler - } - scope:old_mongol_emperor = { - every_vassal = { - limit = { - NOR = { - has_character_flag = should_be_vassalized_by_ilkhanate - has_character_flag = should_be_vassalized_by_golden_horde - has_character_flag = should_be_vassalized_by_chagatai - has_character_flag = should_be_vassalized_by_red_horde - has_character_flag = should_be_vassalized_by_white_horde - has_character_flag = should_be_vassalized_by_aarlud_khanate - has_character_flag = should_be_vassalized_by_togskol_khanate - has_character_flag = should_be_vassalized_by_baruun_khanate - has_character_flag = should_be_vassalized_by_mongolia - has_character_flag = should_be_vassalized_by_great_yuan - has_character_flag = should_be_vassalized_by_blue_horde - has_character_flag = should_be_vassalized_by_omnod_dalai_khanate - } - capital_province = { - geographical_region = special_mongol_empire_ilkhanate_region - } - } - change_liege = { - liege = scope:ilkhanate_ruler - change = scope:mongol_succession - } - } - } - } - # Golden Horde - if = { - limit = { - exists = scope:golden_horde_ruler - } - scope:old_mongol_emperor = { - every_vassal = { - limit = { - NOR = { - has_character_flag = should_be_vassalized_by_ilkhanate - has_character_flag = should_be_vassalized_by_golden_horde - has_character_flag = should_be_vassalized_by_chagatai - has_character_flag = should_be_vassalized_by_red_horde - has_character_flag = should_be_vassalized_by_white_horde - has_character_flag = should_be_vassalized_by_aarlud_khanate - has_character_flag = should_be_vassalized_by_togskol_khanate - has_character_flag = should_be_vassalized_by_baruun_khanate - has_character_flag = should_be_vassalized_by_mongolia - has_character_flag = should_be_vassalized_by_great_yuan - has_character_flag = should_be_vassalized_by_blue_horde - has_character_flag = should_be_vassalized_by_omnod_dalai_khanate - } - capital_province = { - geographical_region = special_mongol_empire_golden_horde_region - } - } - change_liege = { - liege = scope:golden_horde_ruler - change = scope:mongol_succession - } - } - } - } - # Chagatai - if = { - limit = { - exists = scope:chagatai_ruler - } - scope:old_mongol_emperor = { - every_vassal = { - limit = { - NOR = { - has_character_flag = should_be_vassalized_by_ilkhanate - has_character_flag = should_be_vassalized_by_golden_horde - has_character_flag = should_be_vassalized_by_chagatai - has_character_flag = should_be_vassalized_by_red_horde - has_character_flag = should_be_vassalized_by_white_horde - has_character_flag = should_be_vassalized_by_aarlud_khanate - has_character_flag = should_be_vassalized_by_togskol_khanate - has_character_flag = should_be_vassalized_by_baruun_khanate - has_character_flag = should_be_vassalized_by_mongolia - has_character_flag = should_be_vassalized_by_great_yuan - has_character_flag = should_be_vassalized_by_blue_horde - has_character_flag = should_be_vassalized_by_omnod_dalai_khanate - } - capital_province = { - geographical_region = special_mongol_empire_chagatai_region - } - } - change_liege = { - liege = scope:chagatai_ruler - change = scope:mongol_succession - } - } - } - } - # Great Yuan - if = { - limit = { - exists = scope:great_yuan_ruler - } - scope:old_mongol_emperor = { - every_vassal = { - limit = { - NOR = { - has_character_flag = should_be_vassalized_by_ilkhanate - has_character_flag = should_be_vassalized_by_golden_horde - has_character_flag = should_be_vassalized_by_chagatai - has_character_flag = should_be_vassalized_by_red_horde - has_character_flag = should_be_vassalized_by_white_horde - has_character_flag = should_be_vassalized_by_aarlud_khanate - has_character_flag = should_be_vassalized_by_togskol_khanate - has_character_flag = should_be_vassalized_by_baruun_khanate - has_character_flag = should_be_vassalized_by_mongolia - has_character_flag = should_be_vassalized_by_great_yuan - has_character_flag = should_be_vassalized_by_blue_horde - has_character_flag = should_be_vassalized_by_omnod_dalai_khanate - } - capital_province = { - geographical_region = special_mongol_empire_great_yuan_region - } - } - change_liege = { - liege = scope:great_yuan_ruler - change = scope:mongol_succession - } - } - } - } - # Red Horde - if = { - limit = { - exists = scope:red_horde_ruler - } - scope:old_mongol_emperor = { - every_vassal = { - limit = { - NOR = { - has_character_flag = should_be_vassalized_by_ilkhanate - has_character_flag = should_be_vassalized_by_golden_horde - has_character_flag = should_be_vassalized_by_chagatai - has_character_flag = should_be_vassalized_by_red_horde - has_character_flag = should_be_vassalized_by_white_horde - has_character_flag = should_be_vassalized_by_aarlud_khanate - has_character_flag = should_be_vassalized_by_togskol_khanate - has_character_flag = should_be_vassalized_by_baruun_khanate - has_character_flag = should_be_vassalized_by_mongolia - has_character_flag = should_be_vassalized_by_great_yuan - has_character_flag = should_be_vassalized_by_blue_horde - has_character_flag = should_be_vassalized_by_omnod_dalai_khanate - } - capital_province = { - geographical_region = special_mongol_empire_red_horde_region - } - } - change_liege = { - liege = scope:red_horde_ruler - change = scope:mongol_succession - } - } - } - } - # White Horde - if = { - limit = { - exists = scope:white_horde_ruler - } - scope:old_mongol_emperor = { - every_vassal = { - limit = { - NOR = { - has_character_flag = should_be_vassalized_by_ilkhanate - has_character_flag = should_be_vassalized_by_golden_horde - has_character_flag = should_be_vassalized_by_chagatai - has_character_flag = should_be_vassalized_by_red_horde - has_character_flag = should_be_vassalized_by_white_horde - has_character_flag = should_be_vassalized_by_aarlud_khanate - has_character_flag = should_be_vassalized_by_togskol_khanate - has_character_flag = should_be_vassalized_by_baruun_khanate - has_character_flag = should_be_vassalized_by_mongolia - has_character_flag = should_be_vassalized_by_great_yuan - has_character_flag = should_be_vassalized_by_blue_horde - has_character_flag = should_be_vassalized_by_omnod_dalai_khanate - } - capital_province = { - geographical_region = special_mongol_empire_white_horde_region - } - } - change_liege = { - liege = scope:white_horde_ruler - change = scope:mongol_succession - } - } - } - } - # Blue Horde - if = { - limit = { - exists = scope:blue_horde_ruler - } - scope:old_mongol_emperor = { - every_vassal = { - limit = { - NOR = { - has_character_flag = should_be_vassalized_by_ilkhanate - has_character_flag = should_be_vassalized_by_golden_horde - has_character_flag = should_be_vassalized_by_chagatai - has_character_flag = should_be_vassalized_by_red_horde - has_character_flag = should_be_vassalized_by_white_horde - has_character_flag = should_be_vassalized_by_aarlud_khanate - has_character_flag = should_be_vassalized_by_togskol_khanate - has_character_flag = should_be_vassalized_by_baruun_khanate - has_character_flag = should_be_vassalized_by_mongolia - has_character_flag = should_be_vassalized_by_great_yuan - has_character_flag = should_be_vassalized_by_blue_horde - has_character_flag = should_be_vassalized_by_omnod_dalai_khanate - } - capital_province = { - geographical_region = special_mongol_empire_blue_horde_region - } - } - change_liege = { - liege = scope:blue_horde_ruler - change = scope:mongol_succession - } - } - } - } - # Omnod Dalai Khanate - if = { - limit = { - exists = scope:omnod_dalai_khanate_ruler - } - scope:old_mongol_emperor = { - every_vassal = { - limit = { - NOR = { - has_character_flag = should_be_vassalized_by_ilkhanate - has_character_flag = should_be_vassalized_by_golden_horde - has_character_flag = should_be_vassalized_by_chagatai - has_character_flag = should_be_vassalized_by_red_horde - has_character_flag = should_be_vassalized_by_white_horde - has_character_flag = should_be_vassalized_by_aarlud_khanate - has_character_flag = should_be_vassalized_by_togskol_khanate - has_character_flag = should_be_vassalized_by_baruun_khanate - has_character_flag = should_be_vassalized_by_mongolia - has_character_flag = should_be_vassalized_by_great_yuan - has_character_flag = should_be_vassalized_by_blue_horde - has_character_flag = should_be_vassalized_by_omnod_dalai_khanate - } - capital_province = { - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - } - change_liege = { - liege = scope:omnod_dalai_khanate_ruler - change = scope:mongol_succession - } - } - } - } - # Aarlud Khanate - if = { - limit = { - exists = scope:aarlud_khanate_ruler - } - scope:old_mongol_emperor = { - every_vassal = { - limit = { - NOR = { - has_character_flag = should_be_vassalized_by_ilkhanate - has_character_flag = should_be_vassalized_by_golden_horde - has_character_flag = should_be_vassalized_by_chagatai - has_character_flag = should_be_vassalized_by_red_horde - has_character_flag = should_be_vassalized_by_white_horde - has_character_flag = should_be_vassalized_by_aarlud_khanate - has_character_flag = should_be_vassalized_by_togskol_khanate - has_character_flag = should_be_vassalized_by_baruun_khanate - has_character_flag = should_be_vassalized_by_mongolia - has_character_flag = should_be_vassalized_by_great_yuan - has_character_flag = should_be_vassalized_by_blue_horde - has_character_flag = should_be_vassalized_by_omnod_dalai_khanate - } - capital_province = { - geographical_region = special_mongol_empire_aarlud_khanate_region - } - } - change_liege = { - liege = scope:aarlud_khanate_ruler - change = scope:mongol_succession - } - } - } - } - # Togskol Khanate - if = { - limit = { - exists = scope:togskol_khanate_ruler - } - scope:old_mongol_emperor = { - every_vassal = { - limit = { - NOR = { - has_character_flag = should_be_vassalized_by_ilkhanate - has_character_flag = should_be_vassalized_by_golden_horde - has_character_flag = should_be_vassalized_by_chagatai - has_character_flag = should_be_vassalized_by_red_horde - has_character_flag = should_be_vassalized_by_white_horde - has_character_flag = should_be_vassalized_by_aarlud_khanate - has_character_flag = should_be_vassalized_by_togskol_khanate - has_character_flag = should_be_vassalized_by_baruun_khanate - has_character_flag = should_be_vassalized_by_mongolia - has_character_flag = should_be_vassalized_by_great_yuan - has_character_flag = should_be_vassalized_by_blue_horde - has_character_flag = should_be_vassalized_by_omnod_dalai_khanate - } - capital_province = { - geographical_region = special_mongol_empire_togskol_khanate_region - } - } - change_liege = { - liege = scope:togskol_khanate_ruler - change = scope:mongol_succession - } - } - } - } - # Baruun Khanate - if = { - limit = { - exists = scope:baruun_khanate_ruler - } - scope:old_mongol_emperor = { - every_vassal = { - limit = { - NOR = { - has_character_flag = should_be_vassalized_by_ilkhanate - has_character_flag = should_be_vassalized_by_golden_horde - has_character_flag = should_be_vassalized_by_chagatai - has_character_flag = should_be_vassalized_by_red_horde - has_character_flag = should_be_vassalized_by_white_horde - has_character_flag = should_be_vassalized_by_aarlud_khanate - has_character_flag = should_be_vassalized_by_togskol_khanate - has_character_flag = should_be_vassalized_by_baruun_khanate - has_character_flag = should_be_vassalized_by_mongolia - has_character_flag = should_be_vassalized_by_great_yuan - has_character_flag = should_be_vassalized_by_blue_horde - has_character_flag = should_be_vassalized_by_omnod_dalai_khanate - } - capital_province = { - geographical_region = special_mongol_empire_baruun_khanate_region - } - } - change_liege = { - liege = scope:baruun_khanate_ruler - change = scope:mongol_succession - } - } - } - } - # Mongolia - if = { - limit = { - exists = scope:mongolia_ruler - } - scope:old_mongol_emperor = { - every_vassal = { - limit = { - NOR = { - has_character_flag = should_be_vassalized_by_ilkhanate - has_character_flag = should_be_vassalized_by_golden_horde - has_character_flag = should_be_vassalized_by_chagatai - has_character_flag = should_be_vassalized_by_red_horde - has_character_flag = should_be_vassalized_by_white_horde - has_character_flag = should_be_vassalized_by_aarlud_khanate - has_character_flag = should_be_vassalized_by_togskol_khanate - has_character_flag = should_be_vassalized_by_baruun_khanate - has_character_flag = should_be_vassalized_by_mongolia - has_character_flag = should_be_vassalized_by_great_yuan - has_character_flag = should_be_vassalized_by_blue_horde - has_character_flag = should_be_vassalized_by_omnod_dalai_khanate - } - capital_province = { - NOR = { - geographical_region = special_mongol_empire_ilkhanate_region - geographical_region = special_mongol_empire_golden_horde_region - geographical_region = special_mongol_empire_chagatai_region - geographical_region = special_mongol_empire_red_horde_region - geographical_region = special_mongol_empire_white_horde_region - geographical_region = special_mongol_empire_aarlud_khanate_region - geographical_region = special_mongol_empire_togskol_khanate_region - geographical_region = special_mongol_empire_baruun_khanate_region - geographical_region = special_mongol_empire_great_yuan_region - geographical_region = special_mongol_empire_blue_horde_region - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - } - } - change_liege = { - liege = scope:mongolia_ruler - change = scope:mongol_succession - } - } - } - } - - resolve_title_and_vassal_change = scope:mongol_succession - - # Extra-extra cleanup - create_title_and_vassal_change = { - type = granted - save_scope_as = mongol_cleanup_succession - add_claim_on_loss = no - } - # Mongolia - if = { - limit = { - exists = scope:mongolia_ruler - } - scope:mongolia_ruler = { - every_vassal_or_below = { - limit = { - NOR = { - has_character_flag = should_be_vassalized_by_ilkhanate - has_character_flag = should_be_vassalized_by_golden_horde - has_character_flag = should_be_vassalized_by_chagatai - has_character_flag = should_be_vassalized_by_red_horde - has_character_flag = should_be_vassalized_by_white_horde - has_character_flag = should_be_vassalized_by_aarlud_khanate - has_character_flag = should_be_vassalized_by_togskol_khanate - has_character_flag = should_be_vassalized_by_baruun_khanate - has_character_flag = should_be_vassalized_by_mongolia - has_character_flag = should_be_vassalized_by_great_yuan - has_character_flag = should_be_vassalized_by_blue_horde - has_character_flag = should_be_vassalized_by_omnod_dalai_khanate - } - } - if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_ilkhanate_region - } - exists = scope:ilkhanate_ruler - } - change_liege = { - liege = scope:ilkhanate_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_golden_horde_region - } - exists = scope:golden_horde_ruler - } - change_liege = { - liege = scope:golden_horde_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_chagatai_region - } - exists = scope:chagatai_ruler - } - change_liege = { - liege = scope:chagatai_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_great_yuan_region - } - exists = scope:great_yuan_ruler - } - change_liege = { - liege = scope:great_yuan_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_red_horde_region - } - exists = scope:red_horde_ruler - } - change_liege = { - liege = scope:red_horde_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_white_horde_region - } - exists = scope:white_horde_ruler - } - change_liege = { - liege = scope:white_horde_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_blue_horde_region - } - exists = scope:blue_horde_ruler - } - change_liege = { - liege = scope:blue_horde_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - exists = scope:omnod_dalai_khanate_ruler - } - change_liege = { - liege = scope:omnod_dalai_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_aarlud_khanate_region - } - exists = scope:aarlud_khanate_ruler - } - change_liege = { - liege = scope:aarlud_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_togskol_khanate_region - } - exists = scope:togskol_khanate_ruler - } - change_liege = { - liege = scope:togskol_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_baruun_khanate_region - } - exists = scope:baruun_khanate_ruler - } - change_liege = { - liege = scope:baruun_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - } - every_held_title = { - title_tier = county - limit = { - is_landless_type_title = no - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_ilkhanate_region - } - exists = scope:ilkhanate_ruler - } - change_title_holder = { - holder = scope:ilkhanate_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_golden_horde_region - } - exists = scope:golden_horde_ruler - } - change_title_holder = { - holder = scope:golden_horde_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_chagatai_region - } - exists = scope:chagatai_ruler - } - change_title_holder = { - holder = scope:chagatai_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_great_yuan_region - } - exists = scope:great_yuan_ruler - } - change_title_holder = { - holder = scope:great_yuan_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_red_horde_region - } - exists = scope:red_horde_ruler - } - change_title_holder = { - holder = scope:red_horde_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_white_horde_region - } - exists = scope:white_horde_ruler - } - change_title_holder = { - holder = scope:white_horde_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_blue_horde_region - } - exists = scope:blue_horde_ruler - } - change_title_holder = { - holder = scope:blue_horde_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - exists = scope:omnod_dalai_khanate_ruler - } - change_title_holder = { - holder = scope:omnod_dalai_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_aarlud_khanate_region - } - exists = scope:aarlud_khanate_ruler - } - change_title_holder = { - holder = scope:aarlud_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_togskol_khanate_region - } - exists = scope:togskol_khanate_ruler - } - change_title_holder = { - holder = scope:togskol_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_baruun_khanate_region - } - exists = scope:baruun_khanate_ruler - } - change_title_holder = { - holder = scope:baruun_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - } - } - } - # Ilkhanate - if = { - limit = { - exists = scope:ilkhanate_ruler - } - scope:ilkhanate_ruler = { - every_vassal_or_below = { - limit = { - NOR = { - has_character_flag = should_be_vassalized_by_ilkhanate - has_character_flag = should_be_vassalized_by_golden_horde - has_character_flag = should_be_vassalized_by_chagatai - has_character_flag = should_be_vassalized_by_red_horde - has_character_flag = should_be_vassalized_by_white_horde - has_character_flag = should_be_vassalized_by_aarlud_khanate - has_character_flag = should_be_vassalized_by_togskol_khanate - has_character_flag = should_be_vassalized_by_baruun_khanate - has_character_flag = should_be_vassalized_by_mongolia - has_character_flag = should_be_vassalized_by_great_yuan - has_character_flag = should_be_vassalized_by_blue_horde - has_character_flag = should_be_vassalized_by_omnod_dalai_khanate - } - } - if = { - limit = { - capital_province = { - NOR = { - geographical_region = special_mongol_empire_ilkhanate_region - geographical_region = special_mongol_empire_golden_horde_region - geographical_region = special_mongol_empire_chagatai_region - geographical_region = special_mongol_empire_red_horde_region - geographical_region = special_mongol_empire_white_horde_region - geographical_region = special_mongol_empire_aarlud_khanate_region - geographical_region = special_mongol_empire_togskol_khanate_region - geographical_region = special_mongol_empire_baruun_khanate_region - geographical_region = special_mongol_empire_great_yuan_region - geographical_region = special_mongol_empire_blue_horde_region - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - } - exists = scope:mongolia_ruler - } - change_liege = { - liege = scope:mongolia_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_golden_horde_region - } - exists = scope:golden_horde_ruler - } - change_liege = { - liege = scope:golden_horde_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_chagatai_region - } - exists = scope:chagatai_ruler - } - change_liege = { - liege = scope:chagatai_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_great_yuan_region - } - exists = scope:great_yuan_ruler - } - change_liege = { - liege = scope:great_yuan_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_red_horde_region - } - exists = scope:red_horde_ruler - } - change_liege = { - liege = scope:red_horde_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_white_horde_region - } - exists = scope:white_horde_ruler - } - change_liege = { - liege = scope:white_horde_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_blue_horde_region - } - exists = scope:blue_horde_ruler - } - change_liege = { - liege = scope:blue_horde_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - exists = scope:omnod_dalai_khanate_ruler - } - change_liege = { - liege = scope:omnod_dalai_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_aarlud_khanate_region - } - exists = scope:aarlud_khanate_ruler - } - change_liege = { - liege = scope:aarlud_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_togskol_khanate_region - } - exists = scope:togskol_khanate_ruler - } - change_liege = { - liege = scope:togskol_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_baruun_khanate_region - } - exists = scope:baruun_khanate_ruler - } - change_liege = { - liege = scope:baruun_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - } - every_held_title = { - title_tier = county - limit = { - is_landless_type_title = no - } - if = { - limit = { - title_province = { - NOR = { - geographical_region = special_mongol_empire_ilkhanate_region - geographical_region = special_mongol_empire_golden_horde_region - geographical_region = special_mongol_empire_chagatai_region - geographical_region = special_mongol_empire_red_horde_region - geographical_region = special_mongol_empire_white_horde_region - geographical_region = special_mongol_empire_aarlud_khanate_region - geographical_region = special_mongol_empire_togskol_khanate_region - geographical_region = special_mongol_empire_baruun_khanate_region - geographical_region = special_mongol_empire_great_yuan_region - geographical_region = special_mongol_empire_blue_horde_region - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - } - exists = scope:mongolia_ruler - } - change_title_holder = { - holder = scope:mongolia_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_golden_horde_region - } - exists = scope:golden_horde_ruler - } - change_title_holder = { - holder = scope:golden_horde_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_chagatai_region - } - exists = scope:chagatai_ruler - } - change_title_holder = { - holder = scope:chagatai_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_great_yuan_region - } - exists = scope:great_yuan_ruler - } - change_title_holder = { - holder = scope:great_yuan_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_red_horde_region - } - exists = scope:red_horde_ruler - } - change_title_holder = { - holder = scope:red_horde_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_white_horde_region - } - exists = scope:white_horde_ruler - } - change_title_holder = { - holder = scope:white_horde_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_blue_horde_region - } - exists = scope:blue_horde_ruler - } - change_title_holder = { - holder = scope:blue_horde_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - exists = scope:omnod_dalai_khanate_ruler - } - change_title_holder = { - holder = scope:omnod_dalai_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_aarlud_khanate_region - } - exists = scope:aarlud_khanate_ruler - } - change_title_holder = { - holder = scope:aarlud_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_togskol_khanate_region - } - exists = scope:togskol_khanate_ruler - } - change_title_holder = { - holder = scope:togskol_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_baruun_khanate_region - } - exists = scope:baruun_khanate_ruler - } - change_title_holder = { - holder = scope:baruun_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - } - } - } - # Golden Horde - if = { - limit = { - exists = scope:golden_horde_ruler - } - scope:golden_horde_ruler = { - every_vassal_or_below = { - limit = { - NOR = { - has_character_flag = should_be_vassalized_by_ilkhanate - has_character_flag = should_be_vassalized_by_golden_horde - has_character_flag = should_be_vassalized_by_chagatai - has_character_flag = should_be_vassalized_by_red_horde - has_character_flag = should_be_vassalized_by_white_horde - has_character_flag = should_be_vassalized_by_aarlud_khanate - has_character_flag = should_be_vassalized_by_togskol_khanate - has_character_flag = should_be_vassalized_by_baruun_khanate - has_character_flag = should_be_vassalized_by_mongolia - has_character_flag = should_be_vassalized_by_great_yuan - has_character_flag = should_be_vassalized_by_blue_horde - has_character_flag = should_be_vassalized_by_omnod_dalai_khanate - } - } - if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_ilkhanate_region - } - exists = scope:ilkhanate_ruler - } - change_liege = { - liege = scope:ilkhanate_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - NOR = { - geographical_region = special_mongol_empire_ilkhanate_region - geographical_region = special_mongol_empire_golden_horde_region - geographical_region = special_mongol_empire_chagatai_region - geographical_region = special_mongol_empire_red_horde_region - geographical_region = special_mongol_empire_white_horde_region - geographical_region = special_mongol_empire_aarlud_khanate_region - geographical_region = special_mongol_empire_togskol_khanate_region - geographical_region = special_mongol_empire_baruun_khanate_region - geographical_region = special_mongol_empire_great_yuan_region - geographical_region = special_mongol_empire_blue_horde_region - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - } - exists = scope:mongolia_ruler - } - change_liege = { - liege = scope:mongolia_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_chagatai_region - } - exists = scope:chagatai_ruler - } - change_liege = { - liege = scope:chagatai_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_great_yuan_region - } - exists = scope:great_yuan_ruler - } - change_liege = { - liege = scope:great_yuan_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_red_horde_region - } - exists = scope:red_horde_ruler - } - change_liege = { - liege = scope:red_horde_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_white_horde_region - } - exists = scope:white_horde_ruler - } - change_liege = { - liege = scope:white_horde_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_blue_horde_region - } - exists = scope:blue_horde_ruler - } - change_liege = { - liege = scope:blue_horde_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - exists = scope:omnod_dalai_khanate_ruler - } - change_liege = { - liege = scope:omnod_dalai_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_aarlud_khanate_region - } - exists = scope:aarlud_khanate_ruler - } - change_liege = { - liege = scope:aarlud_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_togskol_khanate_region - } - exists = scope:togskol_khanate_ruler - } - change_liege = { - liege = scope:togskol_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_baruun_khanate_region - } - exists = scope:baruun_khanate_ruler - } - change_liege = { - liege = scope:baruun_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - } - every_held_title = { - title_tier = county - limit = { - is_landless_type_title = no - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_ilkhanate_region - } - exists = scope:ilkhanate_ruler - } - change_title_holder = { - holder = scope:ilkhanate_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - title_province = { - NOR = { - geographical_region = special_mongol_empire_ilkhanate_region - geographical_region = special_mongol_empire_golden_horde_region - geographical_region = special_mongol_empire_chagatai_region - geographical_region = special_mongol_empire_red_horde_region - geographical_region = special_mongol_empire_white_horde_region - geographical_region = special_mongol_empire_aarlud_khanate_region - geographical_region = special_mongol_empire_togskol_khanate_region - geographical_region = special_mongol_empire_baruun_khanate_region - geographical_region = special_mongol_empire_great_yuan_region - geographical_region = special_mongol_empire_blue_horde_region - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - } - exists = scope:mongolia_ruler - } - change_title_holder = { - holder = scope:mongolia_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_chagatai_region - } - exists = scope:chagatai_ruler - } - change_title_holder = { - holder = scope:chagatai_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_great_yuan_region - } - exists = scope:great_yuan_ruler - } - change_title_holder = { - holder = scope:great_yuan_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_red_horde_region - } - exists = scope:red_horde_ruler - } - change_title_holder = { - holder = scope:red_horde_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_white_horde_region - } - exists = scope:white_horde_ruler - } - change_title_holder = { - holder = scope:white_horde_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_blue_horde_region - } - exists = scope:blue_horde_ruler - } - change_title_holder = { - holder = scope:blue_horde_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - exists = scope:omnod_dalai_khanate_ruler - } - change_title_holder = { - holder = scope:omnod_dalai_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_aarlud_khanate_region - } - exists = scope:aarlud_khanate_ruler - } - change_title_holder = { - holder = scope:aarlud_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_togskol_khanate_region - } - exists = scope:togskol_khanate_ruler - } - change_title_holder = { - holder = scope:togskol_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_baruun_khanate_region - } - exists = scope:baruun_khanate_ruler - } - change_title_holder = { - holder = scope:baruun_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - } - } - } - # Chagatai - if = { - limit = { - exists = scope:chagatai_ruler - } - scope:chagatai_ruler = { - every_vassal_or_below = { - limit = { - NOR = { - has_character_flag = should_be_vassalized_by_ilkhanate - has_character_flag = should_be_vassalized_by_golden_horde - has_character_flag = should_be_vassalized_by_chagatai - has_character_flag = should_be_vassalized_by_red_horde - has_character_flag = should_be_vassalized_by_white_horde - has_character_flag = should_be_vassalized_by_aarlud_khanate - has_character_flag = should_be_vassalized_by_togskol_khanate - has_character_flag = should_be_vassalized_by_baruun_khanate - has_character_flag = should_be_vassalized_by_mongolia - has_character_flag = should_be_vassalized_by_great_yuan - has_character_flag = should_be_vassalized_by_blue_horde - has_character_flag = should_be_vassalized_by_omnod_dalai_khanate - } - } - if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_ilkhanate_region - } - exists = scope:ilkhanate_ruler - } - change_liege = { - liege = scope:ilkhanate_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_golden_horde_region - } - exists = scope:golden_horde_ruler - } - change_liege = { - liege = scope:golden_horde_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - NOR = { - geographical_region = special_mongol_empire_ilkhanate_region - geographical_region = special_mongol_empire_golden_horde_region - geographical_region = special_mongol_empire_chagatai_region - geographical_region = special_mongol_empire_red_horde_region - geographical_region = special_mongol_empire_white_horde_region - geographical_region = special_mongol_empire_aarlud_khanate_region - geographical_region = special_mongol_empire_togskol_khanate_region - geographical_region = special_mongol_empire_baruun_khanate_region - geographical_region = special_mongol_empire_great_yuan_region - geographical_region = special_mongol_empire_blue_horde_region - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - } - exists = scope:mongolia_ruler - } - change_liege = { - liege = scope:mongolia_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_great_yuan_region - } - exists = scope:great_yuan_ruler - } - change_liege = { - liege = scope:great_yuan_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_red_horde_region - } - exists = scope:red_horde_ruler - } - change_liege = { - liege = scope:red_horde_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_white_horde_region - } - exists = scope:white_horde_ruler - } - change_liege = { - liege = scope:white_horde_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_blue_horde_region - } - exists = scope:blue_horde_ruler - } - change_liege = { - liege = scope:blue_horde_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - exists = scope:omnod_dalai_khanate_ruler - } - change_liege = { - liege = scope:omnod_dalai_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_aarlud_khanate_region - } - exists = scope:aarlud_khanate_ruler - } - change_liege = { - liege = scope:aarlud_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_togskol_khanate_region - } - exists = scope:togskol_khanate_ruler - } - change_liege = { - liege = scope:togskol_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_baruun_khanate_region - } - exists = scope:baruun_khanate_ruler - } - change_liege = { - liege = scope:baruun_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - } - every_held_title = { - title_tier = county - limit = { - is_landless_type_title = no - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_ilkhanate_region - } - exists = scope:ilkhanate_ruler - } - change_title_holder = { - holder = scope:ilkhanate_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_golden_horde_region - } - exists = scope:golden_horde_ruler - } - change_title_holder = { - holder = scope:golden_horde_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - title_province = { - NOR = { - geographical_region = special_mongol_empire_ilkhanate_region - geographical_region = special_mongol_empire_golden_horde_region - geographical_region = special_mongol_empire_chagatai_region - geographical_region = special_mongol_empire_red_horde_region - geographical_region = special_mongol_empire_white_horde_region - geographical_region = special_mongol_empire_aarlud_khanate_region - geographical_region = special_mongol_empire_togskol_khanate_region - geographical_region = special_mongol_empire_baruun_khanate_region - geographical_region = special_mongol_empire_great_yuan_region - geographical_region = special_mongol_empire_blue_horde_region - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - } - exists = scope:mongolia_ruler - } - change_title_holder = { - holder = scope:mongolia_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_great_yuan_region - } - exists = scope:great_yuan_ruler - } - change_title_holder = { - holder = scope:great_yuan_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_red_horde_region - } - exists = scope:red_horde_ruler - } - change_title_holder = { - holder = scope:red_horde_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_white_horde_region - } - exists = scope:white_horde_ruler - } - change_title_holder = { - holder = scope:white_horde_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_blue_horde_region - } - exists = scope:blue_horde_ruler - } - change_title_holder = { - holder = scope:blue_horde_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - exists = scope:omnod_dalai_khanate_ruler - } - change_title_holder = { - holder = scope:omnod_dalai_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_aarlud_khanate_region - } - exists = scope:aarlud_khanate_ruler - } - change_title_holder = { - holder = scope:aarlud_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_togskol_khanate_region - } - exists = scope:togskol_khanate_ruler - } - change_title_holder = { - holder = scope:togskol_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_baruun_khanate_region - } - exists = scope:baruun_khanate_ruler - } - change_title_holder = { - holder = scope:baruun_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - } - } - } - - # Great Yuan - if = { - limit = { - exists = scope:great_yuan_ruler - } - scope:great_yuan_ruler = { - every_vassal_or_below = { - limit = { - NOR = { - has_character_flag = should_be_vassalized_by_ilkhanate - has_character_flag = should_be_vassalized_by_golden_horde - has_character_flag = should_be_vassalized_by_chagatai - has_character_flag = should_be_vassalized_by_red_horde - has_character_flag = should_be_vassalized_by_white_horde - has_character_flag = should_be_vassalized_by_aarlud_khanate - has_character_flag = should_be_vassalized_by_togskol_khanate - has_character_flag = should_be_vassalized_by_baruun_khanate - has_character_flag = should_be_vassalized_by_mongolia - has_character_flag = should_be_vassalized_by_great_yuan - has_character_flag = should_be_vassalized_by_blue_horde - has_character_flag = should_be_vassalized_by_omnod_dalai_khanate - } - } - if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_ilkhanate_region - } - exists = scope:ilkhanate_ruler - } - change_liege = { - liege = scope:ilkhanate_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_golden_horde_region - } - exists = scope:golden_horde_ruler - } - change_liege = { - liege = scope:golden_horde_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - NOR = { - geographical_region = special_mongol_empire_ilkhanate_region - geographical_region = special_mongol_empire_golden_horde_region - geographical_region = special_mongol_empire_chagatai_region - geographical_region = special_mongol_empire_red_horde_region - geographical_region = special_mongol_empire_white_horde_region - geographical_region = special_mongol_empire_aarlud_khanate_region - geographical_region = special_mongol_empire_togskol_khanate_region - geographical_region = special_mongol_empire_baruun_khanate_region - geographical_region = special_mongol_empire_great_yuan_region - geographical_region = special_mongol_empire_blue_horde_region - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - } - exists = scope:mongolia_ruler - } - change_liege = { - liege = scope:mongolia_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_red_horde_region - } - exists = scope:red_horde_ruler - } - change_liege = { - liege = scope:red_horde_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_white_horde_region - } - exists = scope:white_horde_ruler - } - change_liege = { - liege = scope:white_horde_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_blue_horde_region - } - exists = scope:blue_horde_ruler - } - change_liege = { - liege = scope:blue_horde_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - exists = scope:omnod_dalai_khanate_ruler - } - change_liege = { - liege = scope:omnod_dalai_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_aarlud_khanate_region - } - exists = scope:aarlud_khanate_ruler - } - change_liege = { - liege = scope:aarlud_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_togskol_khanate_region - } - exists = scope:togskol_khanate_ruler - } - change_liege = { - liege = scope:togskol_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_baruun_khanate_region - } - exists = scope:baruun_khanate_ruler - } - change_liege = { - liege = scope:baruun_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - } - every_held_title = { - title_tier = county - limit = { - is_landless_type_title = no - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_ilkhanate_region - } - exists = scope:ilkhanate_ruler - } - change_title_holder = { - holder = scope:ilkhanate_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_golden_horde_region - } - exists = scope:golden_horde_ruler - } - change_title_holder = { - holder = scope:golden_horde_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_chagatai_region - } - exists = scope:chagatai_ruler - } - change_title_holder = { - holder = scope:chagatai_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - title_province = { - NOR = { - geographical_region = special_mongol_empire_ilkhanate_region - geographical_region = special_mongol_empire_golden_horde_region - geographical_region = special_mongol_empire_chagatai_region - geographical_region = special_mongol_empire_red_horde_region - geographical_region = special_mongol_empire_white_horde_region - geographical_region = special_mongol_empire_aarlud_khanate_region - geographical_region = special_mongol_empire_togskol_khanate_region - geographical_region = special_mongol_empire_baruun_khanate_region - geographical_region = special_mongol_empire_great_yuan_region - geographical_region = special_mongol_empire_blue_horde_region - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - } - exists = scope:mongolia_ruler - } - change_title_holder = { - holder = scope:mongolia_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_red_horde_region - } - exists = scope:red_horde_ruler - } - change_title_holder = { - holder = scope:red_horde_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_white_horde_region - } - exists = scope:white_horde_ruler - } - change_title_holder = { - holder = scope:white_horde_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_blue_horde_region - } - exists = scope:blue_horde_ruler - } - change_title_holder = { - holder = scope:blue_horde_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - exists = scope:omnod_dalai_khanate_ruler - } - change_title_holder = { - holder = scope:omnod_dalai_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_aarlud_khanate_region - } - exists = scope:aarlud_khanate_ruler - } - change_title_holder = { - holder = scope:aarlud_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_togskol_khanate_region - } - exists = scope:togskol_khanate_ruler - } - change_title_holder = { - holder = scope:togskol_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_baruun_khanate_region - } - exists = scope:baruun_khanate_ruler - } - change_title_holder = { - holder = scope:baruun_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - } - } - } - # Red Horde - if = { - limit = { - exists = scope:red_horde_ruler - } - scope:red_horde_ruler = { - every_vassal_or_below = { - limit = { - NOR = { - has_character_flag = should_be_vassalized_by_ilkhanate - has_character_flag = should_be_vassalized_by_golden_horde - has_character_flag = should_be_vassalized_by_chagatai - has_character_flag = should_be_vassalized_by_red_horde - has_character_flag = should_be_vassalized_by_white_horde - has_character_flag = should_be_vassalized_by_aarlud_khanate - has_character_flag = should_be_vassalized_by_togskol_khanate - has_character_flag = should_be_vassalized_by_baruun_khanate - has_character_flag = should_be_vassalized_by_mongolia - has_character_flag = should_be_vassalized_by_great_yuan - has_character_flag = should_be_vassalized_by_blue_horde - has_character_flag = should_be_vassalized_by_omnod_dalai_khanate - } - } - if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_ilkhanate_region - } - exists = scope:ilkhanate_ruler - } - change_liege = { - liege = scope:ilkhanate_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_golden_horde_region - } - exists = scope:golden_horde_ruler - } - change_liege = { - liege = scope:golden_horde_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_chagatai_region - } - exists = scope:chagatai_ruler - } - change_liege = { - liege = scope:chagatai_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_great_yuan_region - } - exists = scope:great_yuan_ruler - } - change_liege = { - liege = scope:great_yuan_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - NOR = { - geographical_region = special_mongol_empire_ilkhanate_region - geographical_region = special_mongol_empire_golden_horde_region - geographical_region = special_mongol_empire_chagatai_region - geographical_region = special_mongol_empire_red_horde_region - geographical_region = special_mongol_empire_white_horde_region - geographical_region = special_mongol_empire_aarlud_khanate_region - geographical_region = special_mongol_empire_togskol_khanate_region - geographical_region = special_mongol_empire_baruun_khanate_region - geographical_region = special_mongol_empire_great_yuan_region - geographical_region = special_mongol_empire_blue_horde_region - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - } - exists = scope:mongolia_ruler - } - change_liege = { - liege = scope:mongolia_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_white_horde_region - } - exists = scope:white_horde_ruler - } - change_liege = { - liege = scope:white_horde_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_blue_horde_region - } - exists = scope:blue_horde_ruler - } - change_liege = { - liege = scope:blue_horde_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - exists = scope:omnod_dalai_khanate_ruler - } - change_liege = { - liege = scope:omnod_dalai_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_aarlud_khanate_region - } - exists = scope:aarlud_khanate_ruler - } - change_liege = { - liege = scope:aarlud_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_togskol_khanate_region - } - exists = scope:togskol_khanate_ruler - } - change_liege = { - liege = scope:togskol_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_baruun_khanate_region - } - exists = scope:baruun_khanate_ruler - } - change_liege = { - liege = scope:baruun_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - } - every_held_title = { - title_tier = county - limit = { - is_landless_type_title = no - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_ilkhanate_region - } - exists = scope:ilkhanate_ruler - } - change_title_holder = { - holder = scope:ilkhanate_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_golden_horde_region - } - exists = scope:golden_horde_ruler - } - change_title_holder = { - holder = scope:golden_horde_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_chagatai_region - } - exists = scope:chagatai_ruler - } - change_title_holder = { - holder = scope:chagatai_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_great_yuan_region - } - exists = scope:great_yuan_ruler - } - change_title_holder = { - holder = scope:great_yuan_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - title_province = { - NOR = { - geographical_region = special_mongol_empire_ilkhanate_region - geographical_region = special_mongol_empire_golden_horde_region - geographical_region = special_mongol_empire_chagatai_region - geographical_region = special_mongol_empire_red_horde_region - geographical_region = special_mongol_empire_white_horde_region - geographical_region = special_mongol_empire_aarlud_khanate_region - geographical_region = special_mongol_empire_togskol_khanate_region - geographical_region = special_mongol_empire_baruun_khanate_region - geographical_region = special_mongol_empire_great_yuan_region - geographical_region = special_mongol_empire_blue_horde_region - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - } - exists = scope:mongolia_ruler - } - change_title_holder = { - holder = scope:mongolia_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_white_horde_region - } - exists = scope:white_horde_ruler - } - change_title_holder = { - holder = scope:white_horde_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_blue_horde_region - } - exists = scope:blue_horde_ruler - } - change_title_holder = { - holder = scope:blue_horde_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - exists = scope:omnod_dalai_khanate_ruler - } - change_title_holder = { - holder = scope:omnod_dalai_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_aarlud_khanate_region - } - exists = scope:aarlud_khanate_ruler - } - change_title_holder = { - holder = scope:aarlud_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_togskol_khanate_region - } - exists = scope:togskol_khanate_ruler - } - change_title_holder = { - holder = scope:togskol_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_baruun_khanate_region - } - exists = scope:baruun_khanate_ruler - } - change_title_holder = { - holder = scope:baruun_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - } - } - } - # White Horde - if = { - limit = { - exists = scope:white_horde_ruler - } - scope:white_horde_ruler = { - every_vassal_or_below = { - limit = { - NOR = { - has_character_flag = should_be_vassalized_by_ilkhanate - has_character_flag = should_be_vassalized_by_golden_horde - has_character_flag = should_be_vassalized_by_chagatai - has_character_flag = should_be_vassalized_by_red_horde - has_character_flag = should_be_vassalized_by_white_horde - has_character_flag = should_be_vassalized_by_aarlud_khanate - has_character_flag = should_be_vassalized_by_togskol_khanate - has_character_flag = should_be_vassalized_by_baruun_khanate - has_character_flag = should_be_vassalized_by_mongolia - has_character_flag = should_be_vassalized_by_great_yuan - has_character_flag = should_be_vassalized_by_blue_horde - has_character_flag = should_be_vassalized_by_omnod_dalai_khanate - } - } - if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_ilkhanate_region - } - exists = scope:ilkhanate_ruler - } - change_liege = { - liege = scope:ilkhanate_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_golden_horde_region - } - exists = scope:golden_horde_ruler - } - change_liege = { - liege = scope:golden_horde_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_chagatai_region - } - exists = scope:chagatai_ruler - } - change_liege = { - liege = scope:chagatai_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_great_yuan_region - } - exists = scope:great_yuan_ruler - } - change_liege = { - liege = scope:great_yuan_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_red_horde_region - } - exists = scope:red_horde_ruler - } - change_liege = { - liege = scope:red_horde_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - NOR = { - geographical_region = special_mongol_empire_ilkhanate_region - geographical_region = special_mongol_empire_golden_horde_region - geographical_region = special_mongol_empire_chagatai_region - geographical_region = special_mongol_empire_red_horde_region - geographical_region = special_mongol_empire_white_horde_region - geographical_region = special_mongol_empire_aarlud_khanate_region - geographical_region = special_mongol_empire_togskol_khanate_region - geographical_region = special_mongol_empire_baruun_khanate_region - geographical_region = special_mongol_empire_great_yuan_region - geographical_region = special_mongol_empire_blue_horde_region - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - } - exists = scope:mongolia_ruler - } - change_liege = { - liege = scope:mongolia_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_blue_horde_region - } - exists = scope:blue_horde_ruler - } - change_liege = { - liege = scope:blue_horde_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - exists = scope:omnod_dalai_khanate_ruler - } - change_liege = { - liege = scope:omnod_dalai_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_aarlud_khanate_region - } - exists = scope:aarlud_khanate_ruler - } - change_liege = { - liege = scope:aarlud_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_togskol_khanate_region - } - exists = scope:togskol_khanate_ruler - } - change_liege = { - liege = scope:togskol_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_baruun_khanate_region - } - exists = scope:baruun_khanate_ruler - } - change_liege = { - liege = scope:baruun_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - } - every_held_title = { - title_tier = county - limit = { - is_landless_type_title = no - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_ilkhanate_region - } - exists = scope:ilkhanate_ruler - } - change_title_holder = { - holder = scope:ilkhanate_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_golden_horde_region - } - exists = scope:golden_horde_ruler - } - change_title_holder = { - holder = scope:golden_horde_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_chagatai_region - } - exists = scope:chagatai_ruler - } - change_title_holder = { - holder = scope:chagatai_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_great_yuan_region - } - exists = scope:great_yuan_ruler - } - change_title_holder = { - holder = scope:great_yuan_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_red_horde_region - } - exists = scope:red_horde_ruler - } - change_title_holder = { - holder = scope:red_horde_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - title_province = { - NOR = { - geographical_region = special_mongol_empire_ilkhanate_region - geographical_region = special_mongol_empire_golden_horde_region - geographical_region = special_mongol_empire_chagatai_region - geographical_region = special_mongol_empire_red_horde_region - geographical_region = special_mongol_empire_white_horde_region - geographical_region = special_mongol_empire_aarlud_khanate_region - geographical_region = special_mongol_empire_togskol_khanate_region - geographical_region = special_mongol_empire_baruun_khanate_region - geographical_region = special_mongol_empire_great_yuan_region - geographical_region = special_mongol_empire_blue_horde_region - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - } - exists = scope:mongolia_ruler - } - change_title_holder = { - holder = scope:mongolia_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_blue_horde_region - } - exists = scope:blue_horde_ruler - } - change_title_holder = { - holder = scope:blue_horde_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - exists = scope:omnod_dalai_khanate_ruler - } - change_title_holder = { - holder = scope:omnod_dalai_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_aarlud_khanate_region - } - exists = scope:aarlud_khanate_ruler - } - change_title_holder = { - holder = scope:aarlud_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_togskol_khanate_region - } - exists = scope:togskol_khanate_ruler - } - change_title_holder = { - holder = scope:togskol_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_baruun_khanate_region - } - exists = scope:baruun_khanate_ruler - } - change_title_holder = { - holder = scope:baruun_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - } - } - } - - # Blue Horde - if = { - limit = { - exists = scope:blue_horde_ruler - } - scope:blue_horde_ruler = { - every_vassal_or_below = { - limit = { - NOR = { - has_character_flag = should_be_vassalized_by_ilkhanate - has_character_flag = should_be_vassalized_by_golden_horde - has_character_flag = should_be_vassalized_by_chagatai - has_character_flag = should_be_vassalized_by_red_horde - has_character_flag = should_be_vassalized_by_white_horde - has_character_flag = should_be_vassalized_by_aarlud_khanate - has_character_flag = should_be_vassalized_by_togskol_khanate - has_character_flag = should_be_vassalized_by_baruun_khanate - has_character_flag = should_be_vassalized_by_mongolia - has_character_flag = should_be_vassalized_by_great_yuan - has_character_flag = should_be_vassalized_by_blue_horde - has_character_flag = should_be_vassalized_by_omnod_dalai_khanate - } - } - if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_ilkhanate_region - } - exists = scope:ilkhanate_ruler - } - change_liege = { - liege = scope:ilkhanate_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_golden_horde_region - } - exists = scope:golden_horde_ruler - } - change_liege = { - liege = scope:golden_horde_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_chagatai_region - } - exists = scope:chagatai_ruler - } - change_liege = { - liege = scope:chagatai_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_great_yuan_region - } - exists = scope:great_yuan_ruler - } - change_liege = { - liege = scope:great_yuan_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_red_horde_region - } - exists = scope:red_horde_ruler - } - change_liege = { - liege = scope:red_horde_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_white_horde_region - } - exists = scope:white_horde_ruler - } - change_liege = { - liege = scope:white_horde_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - NOR = { - geographical_region = special_mongol_empire_ilkhanate_region - geographical_region = special_mongol_empire_golden_horde_region - geographical_region = special_mongol_empire_chagatai_region - geographical_region = special_mongol_empire_red_horde_region - geographical_region = special_mongol_empire_white_horde_region - geographical_region = special_mongol_empire_aarlud_khanate_region - geographical_region = special_mongol_empire_togskol_khanate_region - geographical_region = special_mongol_empire_baruun_khanate_region - geographical_region = special_mongol_empire_great_yuan_region - geographical_region = special_mongol_empire_blue_horde_region - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - } - exists = scope:mongolia_ruler - } - change_liege = { - liege = scope:mongolia_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - exists = scope:omnod_dalai_khanate_ruler - } - change_liege = { - liege = scope:omnod_dalai_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_aarlud_khanate_region - } - exists = scope:aarlud_khanate_ruler - } - change_liege = { - liege = scope:aarlud_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_togskol_khanate_region - } - exists = scope:togskol_khanate_ruler - } - change_liege = { - liege = scope:togskol_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_baruun_khanate_region - } - exists = scope:baruun_khanate_ruler - } - change_liege = { - liege = scope:baruun_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - } - every_held_title = { - title_tier = county - limit = { - is_landless_type_title = no - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_ilkhanate_region - } - exists = scope:ilkhanate_ruler - } - change_title_holder = { - holder = scope:ilkhanate_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_golden_horde_region - } - exists = scope:golden_horde_ruler - } - change_title_holder = { - holder = scope:golden_horde_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_chagatai_region - } - exists = scope:chagatai_ruler - } - change_title_holder = { - holder = scope:chagatai_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_great_yuan_region - } - exists = scope:great_yuan_ruler - } - change_title_holder = { - holder = scope:great_yuan_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_red_horde_region - } - exists = scope:red_horde_ruler - } - change_title_holder = { - holder = scope:red_horde_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_white_horde_region - } - exists = scope:white_horde_ruler - } - change_title_holder = { - holder = scope:white_horde_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - title_province = { - NOR = { - geographical_region = special_mongol_empire_ilkhanate_region - geographical_region = special_mongol_empire_golden_horde_region - geographical_region = special_mongol_empire_chagatai_region - geographical_region = special_mongol_empire_red_horde_region - geographical_region = special_mongol_empire_white_horde_region - geographical_region = special_mongol_empire_aarlud_khanate_region - geographical_region = special_mongol_empire_togskol_khanate_region - geographical_region = special_mongol_empire_baruun_khanate_region - geographical_region = special_mongol_empire_great_yuan_region - geographical_region = special_mongol_empire_blue_horde_region - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - } - exists = scope:mongolia_ruler - } - change_title_holder = { - holder = scope:mongolia_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - exists = scope:omnod_dalai_khanate_ruler - } - change_title_holder = { - holder = scope:omnod_dalai_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_aarlud_khanate_region - } - exists = scope:aarlud_khanate_ruler - } - change_title_holder = { - holder = scope:aarlud_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_togskol_khanate_region - } - exists = scope:togskol_khanate_ruler - } - change_title_holder = { - holder = scope:togskol_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_baruun_khanate_region - } - exists = scope:baruun_khanate_ruler - } - change_title_holder = { - holder = scope:baruun_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - } - } - } - # Omnod Dalai Khanate - if = { - limit = { - exists = scope:omnod_dalai_khanate_ruler - } - scope:omnod_dalai_khanate_ruler = { - every_vassal_or_below = { - limit = { - NOR = { - has_character_flag = should_be_vassalized_by_ilkhanate - has_character_flag = should_be_vassalized_by_golden_horde - has_character_flag = should_be_vassalized_by_chagatai - has_character_flag = should_be_vassalized_by_red_horde - has_character_flag = should_be_vassalized_by_white_horde - has_character_flag = should_be_vassalized_by_aarlud_khanate - has_character_flag = should_be_vassalized_by_togskol_khanate - has_character_flag = should_be_vassalized_by_baruun_khanate - has_character_flag = should_be_vassalized_by_mongolia - has_character_flag = should_be_vassalized_by_great_yuan - has_character_flag = should_be_vassalized_by_blue_horde - has_character_flag = should_be_vassalized_by_omnod_dalai_khanate - } - } - if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_ilkhanate_region - } - exists = scope:ilkhanate_ruler - } - change_liege = { - liege = scope:ilkhanate_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_golden_horde_region - } - exists = scope:golden_horde_ruler - } - change_liege = { - liege = scope:golden_horde_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_chagatai_region - } - exists = scope:chagatai_ruler - } - change_liege = { - liege = scope:chagatai_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_great_yuan_region - } - exists = scope:great_yuan_ruler - } - change_liege = { - liege = scope:great_yuan_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_red_horde_region - } - exists = scope:red_horde_ruler - } - change_liege = { - liege = scope:red_horde_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_white_horde_region - } - exists = scope:white_horde_ruler - } - change_liege = { - liege = scope:white_horde_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_blue_horde_region - } - exists = scope:blue_horde_ruler - } - change_liege = { - liege = scope:blue_horde_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - NOR = { - geographical_region = special_mongol_empire_ilkhanate_region - geographical_region = special_mongol_empire_golden_horde_region - geographical_region = special_mongol_empire_chagatai_region - geographical_region = special_mongol_empire_red_horde_region - geographical_region = special_mongol_empire_white_horde_region - geographical_region = special_mongol_empire_aarlud_khanate_region - geographical_region = special_mongol_empire_togskol_khanate_region - geographical_region = special_mongol_empire_baruun_khanate_region - geographical_region = special_mongol_empire_great_yuan_region - geographical_region = special_mongol_empire_blue_horde_region - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - } - exists = scope:mongolia_ruler - } - change_liege = { - liege = scope:mongolia_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_aarlud_khanate_region - } - exists = scope:aarlud_khanate_ruler - } - change_liege = { - liege = scope:aarlud_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_togskol_khanate_region - } - exists = scope:togskol_khanate_ruler - } - change_liege = { - liege = scope:togskol_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_baruun_khanate_region - } - exists = scope:baruun_khanate_ruler - } - change_liege = { - liege = scope:baruun_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - } - every_held_title = { - title_tier = county - limit = { - is_landless_type_title = no - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_ilkhanate_region - } - exists = scope:ilkhanate_ruler - } - change_title_holder = { - holder = scope:ilkhanate_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_golden_horde_region - } - exists = scope:golden_horde_ruler - } - change_title_holder = { - holder = scope:golden_horde_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_chagatai_region - } - exists = scope:chagatai_ruler - } - change_title_holder = { - holder = scope:chagatai_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_great_yuan_region - } - exists = scope:great_yuan_ruler - } - change_title_holder = { - holder = scope:great_yuan_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_red_horde_region - } - exists = scope:red_horde_ruler - } - change_title_holder = { - holder = scope:red_horde_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_white_horde_region - } - exists = scope:white_horde_ruler - } - change_title_holder = { - holder = scope:white_horde_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_blue_horde_region - } - exists = scope:blue_horde_ruler - } - change_title_holder = { - holder = scope:blue_horde_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - title_province = { - NOR = { - geographical_region = special_mongol_empire_ilkhanate_region - geographical_region = special_mongol_empire_golden_horde_region - geographical_region = special_mongol_empire_chagatai_region - geographical_region = special_mongol_empire_red_horde_region - geographical_region = special_mongol_empire_white_horde_region - geographical_region = special_mongol_empire_aarlud_khanate_region - geographical_region = special_mongol_empire_togskol_khanate_region - geographical_region = special_mongol_empire_baruun_khanate_region - geographical_region = special_mongol_empire_great_yuan_region - geographical_region = special_mongol_empire_blue_horde_region - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - } - exists = scope:mongolia_ruler - } - change_title_holder = { - holder = scope:mongolia_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_aarlud_khanate_region - } - exists = scope:aarlud_khanate_ruler - } - change_title_holder = { - holder = scope:aarlud_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_togskol_khanate_region - } - exists = scope:togskol_khanate_ruler - } - change_title_holder = { - holder = scope:togskol_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_baruun_khanate_region - } - exists = scope:baruun_khanate_ruler - } - change_title_holder = { - holder = scope:baruun_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - } - } - } - # Aarlud Khanate - if = { - limit = { - exists = scope:aarlud_khanate_ruler - } - scope:aarlud_khanate_ruler = { - every_vassal_or_below = { - limit = { - NOR = { - has_character_flag = should_be_vassalized_by_ilkhanate - has_character_flag = should_be_vassalized_by_golden_horde - has_character_flag = should_be_vassalized_by_chagatai - has_character_flag = should_be_vassalized_by_red_horde - has_character_flag = should_be_vassalized_by_white_horde - has_character_flag = should_be_vassalized_by_aarlud_khanate - has_character_flag = should_be_vassalized_by_togskol_khanate - has_character_flag = should_be_vassalized_by_baruun_khanate - has_character_flag = should_be_vassalized_by_mongolia - has_character_flag = should_be_vassalized_by_great_yuan - has_character_flag = should_be_vassalized_by_blue_horde - has_character_flag = should_be_vassalized_by_omnod_dalai_khanate - } - } - if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_ilkhanate_region - } - exists = scope:ilkhanate_ruler - } - change_liege = { - liege = scope:ilkhanate_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_golden_horde_region - } - exists = scope:golden_horde_ruler - } - change_liege = { - liege = scope:golden_horde_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_chagatai_region - } - exists = scope:chagatai_ruler - } - change_liege = { - liege = scope:chagatai_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_great_yuan_region - } - exists = scope:great_yuan_ruler - } - change_liege = { - liege = scope:great_yuan_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_red_horde_region - } - exists = scope:red_horde_ruler - } - change_liege = { - liege = scope:red_horde_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_white_horde_region - } - exists = scope:white_horde_ruler - } - change_liege = { - liege = scope:white_horde_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_blue_horde_region - } - exists = scope:blue_horde_ruler - } - change_liege = { - liege = scope:blue_horde_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - exists = scope:omnod_dalai_khanate_ruler - } - change_liege = { - liege = scope:omnod_dalai_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - NOR = { - geographical_region = special_mongol_empire_ilkhanate_region - geographical_region = special_mongol_empire_golden_horde_region - geographical_region = special_mongol_empire_chagatai_region - geographical_region = special_mongol_empire_red_horde_region - geographical_region = special_mongol_empire_white_horde_region - geographical_region = special_mongol_empire_aarlud_khanate_region - geographical_region = special_mongol_empire_togskol_khanate_region - geographical_region = special_mongol_empire_baruun_khanate_region - geographical_region = special_mongol_empire_great_yuan_region - geographical_region = special_mongol_empire_blue_horde_region - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - } - exists = scope:mongolia_ruler - } - change_liege = { - liege = scope:mongolia_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_togskol_khanate_region - } - exists = scope:togskol_khanate_ruler - } - change_liege = { - liege = scope:togskol_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_baruun_khanate_region - } - exists = scope:baruun_khanate_ruler - } - change_liege = { - liege = scope:baruun_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - } - every_held_title = { - title_tier = county - limit = { - is_landless_type_title = no - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_ilkhanate_region - } - exists = scope:ilkhanate_ruler - } - change_title_holder = { - holder = scope:ilkhanate_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_golden_horde_region - } - exists = scope:golden_horde_ruler - } - change_title_holder = { - holder = scope:golden_horde_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_chagatai_region - } - exists = scope:chagatai_ruler - } - change_title_holder = { - holder = scope:chagatai_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_great_yuan_region - } - exists = scope:great_yuan_ruler - } - change_title_holder = { - holder = scope:great_yuan_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_red_horde_region - } - exists = scope:red_horde_ruler - } - change_title_holder = { - holder = scope:red_horde_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_white_horde_region - } - exists = scope:white_horde_ruler - } - change_title_holder = { - holder = scope:white_horde_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_blue_horde_region - } - exists = scope:blue_horde_ruler - } - change_title_holder = { - holder = scope:blue_horde_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - exists = scope:omnod_dalai_khanate_ruler - } - change_title_holder = { - holder = scope:omnod_dalai_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - title_province = { - NOR = { - geographical_region = special_mongol_empire_ilkhanate_region - geographical_region = special_mongol_empire_golden_horde_region - geographical_region = special_mongol_empire_chagatai_region - geographical_region = special_mongol_empire_red_horde_region - geographical_region = special_mongol_empire_white_horde_region - geographical_region = special_mongol_empire_aarlud_khanate_region - geographical_region = special_mongol_empire_togskol_khanate_region - geographical_region = special_mongol_empire_baruun_khanate_region - geographical_region = special_mongol_empire_great_yuan_region - geographical_region = special_mongol_empire_blue_horde_region - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - } - exists = scope:mongolia_ruler - } - change_title_holder = { - holder = scope:mongolia_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_togskol_khanate_region - } - exists = scope:togskol_khanate_ruler - } - change_title_holder = { - holder = scope:togskol_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_baruun_khanate_region - } - exists = scope:baruun_khanate_ruler - } - change_title_holder = { - holder = scope:baruun_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - } - } - } - # Togskol Khanate - if = { - limit = { - exists = scope:togskol_khanate_ruler - } - scope:togskol_khanate_ruler = { - every_vassal_or_below = { - limit = { - NOR = { - has_character_flag = should_be_vassalized_by_ilkhanate - has_character_flag = should_be_vassalized_by_golden_horde - has_character_flag = should_be_vassalized_by_chagatai - has_character_flag = should_be_vassalized_by_red_horde - has_character_flag = should_be_vassalized_by_white_horde - has_character_flag = should_be_vassalized_by_aarlud_khanate - has_character_flag = should_be_vassalized_by_togskol_khanate - has_character_flag = should_be_vassalized_by_baruun_khanate - has_character_flag = should_be_vassalized_by_mongolia - has_character_flag = should_be_vassalized_by_great_yuan - has_character_flag = should_be_vassalized_by_blue_horde - has_character_flag = should_be_vassalized_by_omnod_dalai_khanate - } - } - if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_ilkhanate_region - } - exists = scope:ilkhanate_ruler - } - change_liege = { - liege = scope:ilkhanate_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_golden_horde_region - } - exists = scope:golden_horde_ruler - } - change_liege = { - liege = scope:golden_horde_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_chagatai_region - } - exists = scope:chagatai_ruler - } - change_liege = { - liege = scope:chagatai_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_great_yuan_region - } - exists = scope:great_yuan_ruler - } - change_liege = { - liege = scope:great_yuan_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_red_horde_region - } - exists = scope:red_horde_ruler - } - change_liege = { - liege = scope:red_horde_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_white_horde_region - } - exists = scope:white_horde_ruler - } - change_liege = { - liege = scope:white_horde_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_blue_horde_region - } - exists = scope:blue_horde_ruler - } - change_liege = { - liege = scope:blue_horde_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - exists = scope:omnod_dalai_khanate_ruler - } - change_liege = { - liege = scope:omnod_dalai_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_aarlud_khanate_region - } - exists = scope:aarlud_khanate_ruler - } - change_liege = { - liege = scope:aarlud_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - NOR = { - geographical_region = special_mongol_empire_ilkhanate_region - geographical_region = special_mongol_empire_golden_horde_region - geographical_region = special_mongol_empire_chagatai_region - geographical_region = special_mongol_empire_red_horde_region - geographical_region = special_mongol_empire_white_horde_region - geographical_region = special_mongol_empire_aarlud_khanate_region - geographical_region = special_mongol_empire_togskol_khanate_region - geographical_region = special_mongol_empire_baruun_khanate_region - geographical_region = special_mongol_empire_great_yuan_region - geographical_region = special_mongol_empire_blue_horde_region - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - } - exists = scope:mongolia_ruler - } - change_liege = { - liege = scope:mongolia_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_baruun_khanate_region - } - exists = scope:baruun_khanate_ruler - } - change_liege = { - liege = scope:baruun_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - } - every_held_title = { - title_tier = county - limit = { - is_landless_type_title = no - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_ilkhanate_region - } - exists = scope:ilkhanate_ruler - } - change_title_holder = { - holder = scope:ilkhanate_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_golden_horde_region - } - exists = scope:golden_horde_ruler - } - change_title_holder = { - holder = scope:golden_horde_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_chagatai_region - } - exists = scope:chagatai_ruler - } - change_title_holder = { - holder = scope:chagatai_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_great_yuan_region - } - exists = scope:great_yuan_ruler - } - change_title_holder = { - holder = scope:great_yuan_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_red_horde_region - } - exists = scope:red_horde_ruler - } - change_title_holder = { - holder = scope:red_horde_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_white_horde_region - } - exists = scope:white_horde_ruler - } - change_title_holder = { - holder = scope:white_horde_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_blue_horde_region - } - exists = scope:blue_horde_ruler - } - change_title_holder = { - holder = scope:blue_horde_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - exists = scope:omnod_dalai_khanate_ruler - } - change_title_holder = { - holder = scope:omnod_dalai_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_aarlud_khanate_region - } - exists = scope:aarlud_khanate_ruler - } - change_title_holder = { - holder = scope:aarlud_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - title_province = { - NOR = { - geographical_region = special_mongol_empire_ilkhanate_region - geographical_region = special_mongol_empire_golden_horde_region - geographical_region = special_mongol_empire_chagatai_region - geographical_region = special_mongol_empire_red_horde_region - geographical_region = special_mongol_empire_white_horde_region - geographical_region = special_mongol_empire_aarlud_khanate_region - geographical_region = special_mongol_empire_togskol_khanate_region - geographical_region = special_mongol_empire_baruun_khanate_region - geographical_region = special_mongol_empire_great_yuan_region - geographical_region = special_mongol_empire_blue_horde_region - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - } - exists = scope:mongolia_ruler - } - change_title_holder = { - holder = scope:mongolia_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_baruun_khanate_region - } - exists = scope:baruun_khanate_ruler - } - change_title_holder = { - holder = scope:baruun_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - } - } - } - # Baruun Khanate - if = { - limit = { - exists = scope:baruun_khanate_ruler - } - scope:mongolia_ruler = { - every_vassal_or_below = { - limit = { - NOR = { - has_character_flag = should_be_vassalized_by_ilkhanate - has_character_flag = should_be_vassalized_by_golden_horde - has_character_flag = should_be_vassalized_by_chagatai - has_character_flag = should_be_vassalized_by_red_horde - has_character_flag = should_be_vassalized_by_white_horde - has_character_flag = should_be_vassalized_by_aarlud_khanate - has_character_flag = should_be_vassalized_by_togskol_khanate - has_character_flag = should_be_vassalized_by_baruun_khanate - has_character_flag = should_be_vassalized_by_mongolia - has_character_flag = should_be_vassalized_by_great_yuan - has_character_flag = should_be_vassalized_by_blue_horde - has_character_flag = should_be_vassalized_by_omnod_dalai_khanate - } - } - if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_ilkhanate_region - } - exists = scope:ilkhanate_ruler - } - change_liege = { - liege = scope:ilkhanate_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_golden_horde_region - } - exists = scope:golden_horde_ruler - } - change_liege = { - liege = scope:golden_horde_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_chagatai_region - } - exists = scope:chagatai_ruler - } - change_liege = { - liege = scope:chagatai_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_great_yuan_region - } - exists = scope:great_yuan_ruler - } - change_liege = { - liege = scope:great_yuan_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_red_horde_region - } - exists = scope:red_horde_ruler - } - change_liege = { - liege = scope:red_horde_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_white_horde_region - } - exists = scope:white_horde_ruler - } - change_liege = { - liege = scope:white_horde_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_blue_horde_region - } - exists = scope:blue_horde_ruler - } - change_liege = { - liege = scope:blue_horde_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - exists = scope:omnod_dalai_khanate_ruler - } - change_liege = { - liege = scope:omnod_dalai_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_aarlud_khanate_region - } - exists = scope:aarlud_khanate_ruler - } - change_liege = { - liege = scope:aarlud_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - geographical_region = special_mongol_empire_togskol_khanate_region - } - exists = scope:togskol_khanate_ruler - } - change_liege = { - liege = scope:togskol_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - capital_province = { - NOR = { - geographical_region = special_mongol_empire_ilkhanate_region - geographical_region = special_mongol_empire_golden_horde_region - geographical_region = special_mongol_empire_chagatai_region - geographical_region = special_mongol_empire_red_horde_region - geographical_region = special_mongol_empire_white_horde_region - geographical_region = special_mongol_empire_aarlud_khanate_region - geographical_region = special_mongol_empire_togskol_khanate_region - geographical_region = special_mongol_empire_baruun_khanate_region - geographical_region = special_mongol_empire_great_yuan_region - geographical_region = special_mongol_empire_blue_horde_region - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - } - exists = scope:mongolia_ruler - } - change_liege = { - liege = scope:mongolia_ruler - change = scope:mongol_cleanup_succession - } - } - } - every_held_title = { - title_tier = county - limit = { - is_landless_type_title = no - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_ilkhanate_region - } - exists = scope:ilkhanate_ruler - } - change_title_holder = { - holder = scope:ilkhanate_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_golden_horde_region - } - exists = scope:golden_horde_ruler - } - change_title_holder = { - holder = scope:golden_horde_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_chagatai_region - } - exists = scope:chagatai_ruler - } - change_title_holder = { - holder = scope:chagatai_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_great_yuan_region - } - exists = scope:great_yuan_ruler - } - change_title_holder = { - holder = scope:great_yuan_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_red_horde_region - } - exists = scope:red_horde_ruler - } - change_title_holder = { - holder = scope:red_horde_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_white_horde_region - } - exists = scope:white_horde_ruler - } - change_title_holder = { - holder = scope:white_horde_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_blue_horde_region - } - exists = scope:blue_horde_ruler - } - change_title_holder = { - holder = scope:blue_horde_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - exists = scope:omnod_dalai_khanate_ruler - } - change_title_holder = { - holder = scope:omnod_dalai_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_aarlud_khanate_region - } - exists = scope:aarlud_khanate_ruler - } - change_title_holder = { - holder = scope:aarlud_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - if = { - limit = { - title_province = { - geographical_region = special_mongol_empire_togskol_khanate_region - } - exists = scope:togskol_khanate_ruler - } - change_title_holder = { - holder = scope:togskol_khanate_ruler - change = scope:mongol_cleanup_succession - } - } - else_if = { - limit = { - title_province = { - NOR = { - geographical_region = special_mongol_empire_ilkhanate_region - geographical_region = special_mongol_empire_golden_horde_region - geographical_region = special_mongol_empire_chagatai_region - geographical_region = special_mongol_empire_red_horde_region - geographical_region = special_mongol_empire_white_horde_region - geographical_region = special_mongol_empire_aarlud_khanate_region - geographical_region = special_mongol_empire_togskol_khanate_region - geographical_region = special_mongol_empire_baruun_khanate_region - geographical_region = special_mongol_empire_great_yuan_region - geographical_region = special_mongol_empire_blue_horde_region - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - } - exists = scope:mongolia_ruler - } - change_title_holder = { - holder = scope:mongolia_ruler - change = scope:mongol_cleanup_succession - } - } - } - } - } - resolve_title_and_vassal_change = scope:mongol_cleanup_succession - - every_in_list = { # If tengri, switch to an organized faith in your new realm - list = selected_mongol_heirs - limit = { - primary_title.tier = tier_empire - faith = { has_doctrine_parameter = unreformed } - any_sub_realm_county = { - faith = { - NOT = { has_doctrine_parameter = unreformed } - } - } - } - save_scope_as = faith_changer - random_sub_realm_county = { - limit = { - faith = { - NOT = { has_doctrine_parameter = unreformed } - } - } - weight = { - base = 1 - modifier = { - save_temporary_scope_as = county_faith_check - add = mongol_successor_faith_chance - } - } - scope:faith_changer = { - set_character_faith = prev.faith - } - } - } -} - - -### END Title creation effects - -grant_suitable_title_to_candidate_effect = { - save_temporary_scope_as = candidate - - # Runs through available titles and grants an available one - random_list = { - # Ilkhanate - 1 = { - trigger = { - exists = global_var:creatable_ilkhanate - NOT = { exists = global_var:ilkhanate_handed_out } - NOT = { exists = title:e_ilkhanate.holder } - } - # Weight the chance by how much territory you hold there - modifier = { - add = { - every_sub_realm_county = { - limit = { - title_province = { - geographical_region = special_mongol_empire_ilkhanate_region - } - } - add = 50 - } - } - always = yes - } - grant_ilkhanate_effect = yes - } - # Golden Horde - 1 = { - trigger = { - exists = global_var:creatable_golden_horde - NOT = { exists = global_var:golden_horde_handed_out } - NOT = { exists = title:e_golden_horde.holder } - } - # Weight the chance by how much territory you hold there - modifier = { - add = { - every_sub_realm_county = { - limit = { - title_province = { - geographical_region = special_mongol_empire_golden_horde_region - } - } - add = 50 - } - } - always = yes - } - grant_golden_horde_effect = yes - } - # Chagatai - 1 = { - trigger = { - exists = global_var:creatable_chagatai - NOT = { exists = global_var:chagatai_handed_out } - NOT = { exists = title:e_chagatai.holder } - } - # Weight the chance by how much territory you hold there - modifier = { - add = { - every_sub_realm_county = { - limit = { - title_province = { - geographical_region = special_mongol_empire_chagatai_region - } - } - add = 50 - } - } - always = yes - } - grant_chagatai_effect = yes - } - # Great Yuan - 1 = { - trigger = { - exists = global_var:creatable_great_yuan - NOT = { exists = global_var:great_yuan_handed_out } - NOT = { exists = scope:great_yuan_title.holder } - } - # Weight the chance by how much territory you hold there - modifier = { - add = { - every_sub_realm_county = { - limit = { - title_province = { - geographical_region = special_mongol_empire_great_yuan_region - } - } - add = 50 - } - } - always = yes - } - grant_great_yuan_effect = yes - } - # Red Horde - 1 = { - trigger = { - exists = global_var:creatable_red_horde - NOT = { exists = global_var:red_horde_handed_out } - NOT = { exists = title:e_red_horde.holder } - } - # Weight the chance by how much territory you hold there - modifier = { - add = { - every_sub_realm_county = { - limit = { - title_province = { - geographical_region = special_mongol_empire_red_horde_region - } - } - add = 50 - } - } - always = yes - } - grant_red_horde_effect = yes - } - # White Horde - 1 = { - trigger = { - exists = global_var:creatable_white_horde - NOT = { exists = global_var:white_horde_handed_out } - NOT = { exists = title:e_white_horde.holder } - } - # Weight the chance by how much territory you hold there - modifier = { - add = { - every_sub_realm_county = { - limit = { - title_province = { - geographical_region = special_mongol_empire_white_horde_region - } - } - add = 50 - } - } - always = yes - } - grant_white_horde_effect = yes - } - # Blue Horde - 1 = { - trigger = { - exists = global_var:creatable_blue_horde - NOT = { exists = global_var:blue_horde_handed_out } - NOT = { exists = title:e_blue_horde.holder } - } - # Weight the chance by how much territory you hold there - modifier = { - add = { - every_sub_realm_county = { - limit = { - title_province = { - geographical_region = special_mongol_empire_blue_horde_region - } - } - add = 50 - } - } - always = yes - } - grant_blue_horde_effect = yes - } - # Omnod Dalai Khanate - 1 = { - trigger = { - exists = global_var:creatable_omnod_dalai_khanate - NOT = { exists = global_var:omnod_dalai_khanate_handed_out } - NOT = { exists = title:e_omnod_dalai_khanate.holder } - } - # Weight the chance by how much territory you hold there - modifier = { - add = { - every_sub_realm_county = { - limit = { - title_province = { - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - } - add = 50 - } - } - always = yes - } - grant_omnod_dalai_khanate_effect = yes - } - # Aarlud Khanate - 1 = { - trigger = { - exists = global_var:creatable_aarlud_khanate - NOT = { exists = global_var:aarlud_khanate_handed_out } - NOT = { exists = title:e_aarlud_khanate.holder } - } - # Weight the chance by how much territory you hold there - modifier = { - add = { - every_sub_realm_county = { - limit = { - title_province = { - geographical_region = special_mongol_empire_aarlud_khanate_region - } - } - add = 50 - } - } - always = yes - } - grant_aarlud_khanate_effect = yes - } - # Tögsköl Khanate - 1 = { - trigger = { - exists = global_var:creatable_togskol_khanate - NOT = { exists = global_var:togskol_khanate_handed_out } - NOT = { exists = title:e_togskol_khanate.holder } - } - # Weight the chance by how much territory you hold there - modifier = { - add = { - every_sub_realm_county = { - limit = { - title_province = { - geographical_region = special_mongol_empire_togskol_khanate_region - } - } - add = 50 - } - } - always = yes - } - grant_togskol_khanate_effect = yes - } - # Baruun Khanate - 1 = { - trigger = { - exists = global_var:creatable_baruun_khanate - NOT = { exists = global_var:baruun_khanate_handed_out } - NOT = { exists = title:e_baruun_khanate.holder } - } - # Weight the chance by how much territory you hold there - modifier = { - add = { - every_sub_realm_county = { - limit = { - title_province = { - geographical_region = special_mongol_empire_baruun_khanate_region - } - } - add = 50 - } - } - always = yes - } - grant_baruun_khanate_effect = yes - } - } - - # Add to list so we can move related titles around later - add_to_list = candidate_granted_title -} - - -break_up_mongol_empire_effect = { # Intended to run in the Mongol Emperor's scope - save_scope_as = old_mongol_emperor - - every_tributary = { - add_to_list = mongol_tributaries - } - - every_held_title = { # Clean up excess kingdoms - limit = { - is_landless_type_title = no - OR = { - tier = tier_kingdom - tier = tier_duchy - } - } - scope:old_mongol_emperor = { - destroy_title = prev - } - } - - every_character_war = { - limit = { - primary_attacker = scope:old_mongol_emperor - is_white_peace_possible = yes - } - end_war = white_peace - } - - set_global_variable = { - name = number_of_mongol_heir_candidates - value = 0 - } - # Find suitable heir candidates - dynasty = { - every_dynasty_member = { # Every potential khandidate - limit = { - character_gender_can_inherit_from_trigger = { - CHARACTER = scope:old_mongol_emperor - } - is_alive = yes - } - change_global_variable = { - name = number_of_mongol_heir_candidates - add = 1 - } - add_to_list = mongol_heir_candidates - } - } - - # Gather Ilkhanate counties - every_sub_realm_county = { - limit = { - title_province = { - geographical_region = special_mongol_empire_ilkhanate_region - } - } - add_to_temporary_list = ilkhanate_counties - } - # Gather Golden Horde counties - every_sub_realm_county = { - limit = { - title_province = { - geographical_region = special_mongol_empire_golden_horde_region - } - } - add_to_temporary_list = golden_horde_counties - } - # Gather Chagatai counties - every_sub_realm_county = { - limit = { - title_province = { - geographical_region = special_mongol_empire_chagatai_region - } - } - add_to_temporary_list = chagatai_counties - } - # Gather Great Yuan counties - every_sub_realm_county = { - limit = { - title_province = { - geographical_region = special_mongol_empire_great_yuan_region - } - } - add_to_temporary_list = great_yuan_counties - } - # Gather Red Horde counties - every_sub_realm_county = { - limit = { - title_province = { - geographical_region = special_mongol_empire_red_horde_region - } - } - add_to_temporary_list = red_horde_counties - } - # Gather White Horde counties - every_sub_realm_county = { - limit = { - title_province = { - geographical_region = special_mongol_empire_white_horde_region - } - } - add_to_temporary_list = white_horde_counties - } - # Gather Blue Horde counties - every_sub_realm_county = { - limit = { - title_province = { - geographical_region = special_mongol_empire_blue_horde_region - } - } - add_to_temporary_list = blue_horde_counties - } - # Gather Omnod Dalai Khanate counties - every_sub_realm_county = { - limit = { - title_province = { - geographical_region = special_mongol_empire_omnod_dalai_khanate_region - } - } - add_to_temporary_list = omnod_dalai_khanate_counties - } - # Gather Aarlud Khanate counties - every_sub_realm_county = { - limit = { - title_province = { - geographical_region = special_mongol_empire_aarlud_khanate_region - } - } - add_to_temporary_list = aarlud_khanate_counties - } - # Gather Tögsköl Khanate counties - every_sub_realm_county = { - limit = { - title_province = { - geographical_region = special_mongol_empire_togskol_khanate_region - } - } - add_to_temporary_list = togskol_khanate_counties - } - # Gather Baruun Khanate counties - every_sub_realm_county = { - limit = { - title_province = { - geographical_region = special_mongol_empire_baruun_khanate_region - } - } - add_to_temporary_list = baruun_khanate_counties - } - - # Check which titles are creatable - set_global_variable = { - name = creatable_mongol_successor_states_number - value = 0 - } - # Ilkhanate - if = { - limit = { - any_in_list = { - list = ilkhanate_counties - count >= @creatable_successor_empire_county_threshold - } - } - debug_log = "Ilkhanate is creatable" - set_global_variable = { - name = creatable_ilkhanate - value = yes - } - change_global_variable = { - name = creatable_mongol_successor_states_number - add = 1 - } - } - # Golden Horde - if = { - limit = { - any_in_list = { - list = golden_horde_counties - count >= @creatable_successor_empire_county_threshold - } - } - debug_log = "Golden Horde is creatable" - set_global_variable = { - name = creatable_golden_horde - value = yes - } - change_global_variable = { - name = creatable_mongol_successor_states_number - add = 1 - } - } - # Chagatai - if = { - limit = { - any_in_list = { - list = chagatai_counties - count >= @creatable_successor_empire_county_threshold - } - } - debug_log = "Chagatai is creatable" - set_global_variable = { - name = creatable_chagatai - value = yes - } - change_global_variable = { - name = creatable_mongol_successor_states_number - add = 1 - } - } - # Great Yuan - if = { - limit = { - any_in_list = { - list = great_yuan_counties - count >= @creatable_successor_empire_county_threshold - } - } - debug_log = "Great Yuan is creatable" - set_global_variable = { - name = creatable_great_yuan - value = yes - } - change_global_variable = { - name = creatable_mongol_successor_states_number - add = 1 - } - } - # Red Horde - if = { - limit = { - any_in_list = { - list = red_horde_counties - count >= @creatable_successor_empire_county_threshold - } - } - debug_log = "Red Horde is creatable" - set_global_variable = { - name = creatable_red_horde - value = yes - } - change_global_variable = { - name = creatable_mongol_successor_states_number - add = 1 - } - } - # White Horde - if = { - limit = { - any_in_list = { - list = white_horde_counties - count >= @creatable_successor_empire_county_threshold - } - } - debug_log = "White Horde is creatable" - set_global_variable = { - name = creatable_white_horde - value = yes - } - change_global_variable = { - name = creatable_mongol_successor_states_number - add = 1 - } - } - # Blue Horde - if = { - limit = { - any_in_list = { - list = blue_horde_counties - count >= @creatable_successor_empire_county_threshold - } - } - debug_log = "Blue Horde is creatable" - set_global_variable = { - name = creatable_blue_horde - value = yes - } - change_global_variable = { - name = creatable_mongol_successor_states_number - add = 1 - } - } - # Omnod Dalai Khanate - if = { - limit = { - any_in_list = { - list = omnod_dalai_khanate_counties - count >= @creatable_successor_empire_county_threshold - } - } - debug_log = "Omnod Dalai Khanate is creatable" - set_global_variable = { - name = creatable_omnod_dalai_khanate - value = yes - } - change_global_variable = { - name = creatable_mongol_successor_states_number - add = 1 - } - } - # Aarlud Khanate - if = { - limit = { - any_in_list = { - list = aarlud_khanate_counties - count >= @creatable_successor_empire_county_threshold - } - } - debug_log = "Aarlud is creatable" - set_global_variable = { - name = creatable_aarlud_khanate - value = yes - } - change_global_variable = { - name = creatable_mongol_successor_states_number - add = 1 - } - } - # Tögsköl Khanate - if = { - limit = { - any_in_list = { - list = togskol_khanate_counties - count >= @creatable_successor_empire_county_threshold - } - } - debug_log = "Tögsköl is creatable" - set_global_variable = { - name = creatable_togskol_khanate - value = yes - } - change_global_variable = { - name = creatable_mongol_successor_states_number - add = 1 - } - } - # Baruun Khanate - if = { - limit = { - any_in_list = { - list = baruun_khanate_counties - count >= @creatable_successor_empire_county_threshold - } - } - debug_log = "Baruun is creatable" - set_global_variable = { - name = creatable_baruun_khanate - value = yes - } - change_global_variable = { - name = creatable_mongol_successor_states_number - add = 1 - } - } - - ordered_in_list = { - list = mongol_heir_candidates - order_by = mongol_breakup_succession_score - max = 15 - - debug_log = "Mongol succession list found:" - debug_log_scopes = yes - - add_to_list = selected_mongol_heirs - add_character_flag = { - flag = mongol_successor_flag - days = 10 - } - } - - # Find the "main" heir - - if = { - limit = { - is_ai = no - player_heir.dynasty ?= dynasty - } - player_heir = { - debug_log = "Found Mongol main heir" - debug_log_scopes = yes - - assign_core_mongol_titles_to_heir_effect = yes - - remove_from_list = selected_mongol_heirs - } - } - else = { - ordered_in_list = { - list = selected_mongol_heirs - order_by = mongol_breakup_succession_score - max = 1 - - debug_log = "Found Mongol main heir" - debug_log_scopes = yes - - assign_core_mongol_titles_to_heir_effect = yes - - remove_from_list = selected_mongol_heirs - } - } - - if = { - limit = { - is_ai = no - player_heir.dynasty ?= dynasty - player_heir = { highest_held_title_tier < tier_empire } - } - player_heir = { - grant_suitable_title_to_candidate_effect = yes - } - } - - # Assign titles to everyone else - ordered_in_list = { - list = selected_mongol_heirs - order_by = mongol_breakup_succession_score - max = global_var:creatable_mongol_successor_states_number - - debug_log = "Found another Mongol Heir" - debug_log_scopes = yes - grant_suitable_title_to_candidate_effect = yes - - debug_log = "Tried granting title to heir" - } - - pick_up_remaining_counties_effect = yes - set_correct_mongol_breakup_vassalage_effect = yes - shift_counties_on_mongol_succession_effect = yes - - # Send notification events - scope:mongolia_ruler = { - save_scope_as = successor_1 - } - - ordered_in_list = { - list = selected_mongol_heirs - order_by = mongol_breakup_succession_score - max = 3 - - if = { - limit = { - NOT = { exists = scope:successor_2 } - } - save_scope_as = successor_2 - } - else_if = { - limit = { - NOT = { exists = scope:successor_3 } - NOT = { - this = scope:successor_2 - } - } - save_scope_as = successor_3 - } - if = { - limit = { - NOT = { exists = scope:successor_4 } - NOR = { - this = scope:successor_2 - this = scope:successor_3 - } - } - save_scope_as = successor_4 - } - } - - every_player = { - trigger_event = { - id = mongol_invasion.1004 - days = 2 # Delay it a little to let effects settle - } - } - - # Cleanup - remove_global_variable = creatable_mongol_successor_states_number - remove_global_variable = number_of_mongol_heir_candidates - remove_global_variable = creatable_ilkhanate - remove_global_variable = creatable_golden_horde - remove_global_variable = creatable_chagatai - remove_global_variable = creatable_great_yuan - remove_global_variable = creatable_red_horde - remove_global_variable = creatable_white_horde - remove_global_variable = creatable_blue_horde - remove_global_variable = creatable_omnod_dalai_khanate - remove_global_variable = creatable_aarlud_khanate - remove_global_variable = creatable_togskol_khanate - remove_global_variable = creatable_baruun_khanate - - # Make sure the Mongol Empire title is destroyed as appropriate - set_global_variable = { - name = mongol_empire_was_broken_up - value = yes - } - scope:successor_1 = { - trigger_event = { - id = mongol_invasion.9999 - days = 1 - } - } - - # Assign appropriate De Jure, so that the successors do not switch away from their empires immediately - if = { - limit = { - exists = scope:chagatai_ruler - } - scope:chagatai_ruler = { - add_realm_law_skip_effects = high_partition_succession_law - save_scope_as = title_assignment - every_sub_realm_county = { - limit = { - title_province = { - geographical_region = chagatai_de_jure_region - } - exists = kingdom - OR = { - NOT = { exists = kingdom.holder } - AND = { - exists = kingdom.holder - OR = { - kingdom.holder = scope:title_assignment - kingdom.holder = { - is_vassal_of = scope:title_assignment - } - } - } - } - holder.top_liege = scope:title_assignment - } - if = { - limit = { - NOT = { - kingdom = { - is_in_list = assigned_kingdoms - } - } - } - kingdom = { - set_de_jure_liege_title = scope:title_assignment.primary_title - add_to_list = assigned_kingdoms - } - } - } - change_mongol_successor_illegal_government = yes - } - } - if = { - limit = { - exists = scope:great_yuan_ruler - } - scope:great_yuan_ruler = { - #Should not have dejure reassignment if they got an already existing title - if = { - limit = { - scope:great_yuan_ruler.primary_title = title:e_great_yuan - } - add_realm_law_skip_effects = high_partition_succession_law - save_scope_as = title_assignment - every_sub_realm_county = { - limit = { - title_province = { - geographical_region = great_yuan_de_jure_region - } - exists = kingdom - OR = { - NOT = { exists = kingdom.holder } - kingdom.holder = { - OR = { - this = scope:title_assignment - is_vassal_of = scope:title_assignment - } - } - } - holder.top_liege = scope:title_assignment - } - if = { - limit = { - NOT = { - kingdom = { - is_in_list = assigned_kingdoms - } - } - } - kingdom = { - set_de_jure_liege_title = scope:title_assignment.primary_title - add_to_list = assigned_kingdoms - } - } - } - } - if = { - limit = { - has_dlc_feature = admin_gov - } - convert_great_yuan_to_admin_effect = yes - } - else = { - change_mongol_successor_illegal_government = yes - } - } - } - if = { - limit = { - exists = scope:golden_horde_ruler - } - scope:golden_horde_ruler = { - add_realm_law_skip_effects = high_partition_succession_law - save_scope_as = title_assignment - every_sub_realm_county = { - limit = { - title_province = { - geographical_region = golden_horde_de_jure_region - } - exists = kingdom - OR = { - NOT = { exists = kingdom.holder } - AND = { - exists = kingdom.holder - OR = { - kingdom.holder = scope:title_assignment - kingdom.holder = { - is_vassal_of = scope:title_assignment - } - } - } - } - holder.top_liege = scope:title_assignment - } - if = { - limit = { - NOT = { - kingdom = { - is_in_list = assigned_kingdoms - } - } - } - kingdom = { - set_de_jure_liege_title = scope:title_assignment.primary_title - add_to_list = assigned_kingdoms - } - } - } - change_mongol_successor_illegal_government = yes - } - } - if = { - limit = { - exists = scope:ilkhanate_ruler - } - scope:ilkhanate_ruler = { - add_realm_law_skip_effects = high_partition_succession_law - save_scope_as = title_assignment - every_sub_realm_county = { - limit = { - title_province = { - geographical_region = ilkhanate_de_jure_region - } - exists = kingdom - OR = { - NOT = { exists = kingdom.holder } - AND = { - exists = kingdom.holder - OR = { - kingdom.holder = scope:title_assignment - kingdom.holder = { - is_vassal_of = scope:title_assignment - } - } - } - } - holder.top_liege = scope:title_assignment - } - if = { - limit = { - NOT = { - kingdom = { - is_in_list = assigned_kingdoms - } - } - } - kingdom = { - set_de_jure_liege_title = scope:title_assignment.primary_title - add_to_list = assigned_kingdoms - } - } - } - change_mongol_successor_illegal_government = yes - } - } - if = { - limit = { - exists = scope:red_horde_ruler - } - scope:red_horde_ruler = { - add_realm_law_skip_effects = high_partition_succession_law - save_scope_as = title_assignment - every_sub_realm_county = { - limit = { - title_province = { - geographical_region = red_horde_de_jure_region - } - exists = kingdom - OR = { - NOT = { exists = kingdom.holder } - AND = { - exists = kingdom.holder - OR = { - kingdom.holder = scope:title_assignment - kingdom.holder = { - is_vassal_of = scope:title_assignment - } - } - } - } - holder.top_liege = scope:title_assignment - } - if = { - limit = { - NOT = { - kingdom = { - is_in_list = assigned_kingdoms - } - } - } - kingdom = { - set_de_jure_liege_title = scope:title_assignment.primary_title - add_to_list = assigned_kingdoms - } - } - } - change_mongol_successor_illegal_government = yes - } - } - if = { - limit = { - exists = scope:white_horde_ruler - } - scope:white_horde_ruler = { - add_realm_law_skip_effects = high_partition_succession_law - save_scope_as = title_assignment - every_sub_realm_county = { - limit = { - title_province = { - geographical_region = white_horde_de_jure_region - } - exists = kingdom - OR = { - NOT = { exists = kingdom.holder } - AND = { - exists = kingdom.holder - OR = { - kingdom.holder = scope:title_assignment - kingdom.holder = { - is_vassal_of = scope:title_assignment - } - } - } - } - holder.top_liege = scope:title_assignment - } - if = { - limit = { - NOT = { - kingdom = { - is_in_list = assigned_kingdoms - } - } - } - kingdom = { - set_de_jure_liege_title = scope:title_assignment.primary_title - add_to_list = assigned_kingdoms - } - } - } - change_mongol_successor_illegal_government = yes - } - } - if = { - limit = { - exists = scope:blue_horde_ruler - } - scope:blue_horde_ruler = { - add_realm_law_skip_effects = high_partition_succession_law - save_scope_as = title_assignment - every_sub_realm_county = { - limit = { - title_province = { - geographical_region = blue_horde_de_jure_region - } - exists = kingdom - OR = { - NOT = { exists = kingdom.holder } - AND = { - exists = kingdom.holder - OR = { - kingdom.holder = scope:title_assignment - kingdom.holder = { - is_vassal_of = scope:title_assignment - } - } - } - } - holder.top_liege = scope:title_assignment - } - if = { - limit = { - NOT = { - kingdom = { - is_in_list = assigned_kingdoms - } - } - } - kingdom = { - set_de_jure_liege_title = scope:title_assignment.primary_title - add_to_list = assigned_kingdoms - } - } - } - change_mongol_successor_illegal_government = yes - } - } - if = { - limit = { - exists = scope:omnod_dalai_khanate_ruler - } - scope:omnod_dalai_khanate_ruler = { - add_realm_law_skip_effects = high_partition_succession_law - save_scope_as = title_assignment - every_sub_realm_county = { - limit = { - title_province = { - geographical_region = omnod_dalai_khanate_de_jure_region - } - exists = kingdom - OR = { - NOT = { exists = kingdom.holder } - AND = { - exists = kingdom.holder - OR = { - kingdom.holder = scope:title_assignment - kingdom.holder = { - is_vassal_of = scope:title_assignment - } - } - } - } - holder.top_liege = scope:title_assignment - } - if = { - limit = { - NOT = { - kingdom = { - is_in_list = assigned_kingdoms - } - } - } - kingdom = { - set_de_jure_liege_title = scope:title_assignment.primary_title - add_to_list = assigned_kingdoms - } - } - } - change_mongol_successor_illegal_government = yes - } - } - if = { - limit = { - exists = scope:aarlud_khanate_ruler - } - scope:aarlud_khanate_ruler = { - add_realm_law_skip_effects = high_partition_succession_law - save_scope_as = title_assignment - every_sub_realm_county = { - limit = { - title_province = { - geographical_region = aarlud_khanate_de_jure_region - } - exists = kingdom - OR = { - NOT = { exists = kingdom.holder } - AND = { - exists = kingdom.holder - OR = { - kingdom.holder = scope:title_assignment - kingdom.holder = { - is_vassal_of = scope:title_assignment - } - } - } - } - holder.top_liege = scope:title_assignment - } - if = { - limit = { - NOT = { - kingdom = { - is_in_list = assigned_kingdoms - } - } - } - kingdom = { - set_de_jure_liege_title = scope:title_assignment.primary_title - add_to_list = assigned_kingdoms - } - } - } - change_mongol_successor_illegal_government = yes - } - } - if = { - limit = { - exists = scope:togskol_khanate_ruler - } - scope:togskol_khanate_ruler = { - add_realm_law_skip_effects = high_partition_succession_law - save_scope_as = title_assignment - every_sub_realm_county = { - limit = { - title_province = { - geographical_region = togskol_khanatede_jure_region - } - exists = kingdom - OR = { - NOT = { exists = kingdom.holder } - AND = { - exists = kingdom.holder - OR = { - kingdom.holder = scope:title_assignment - kingdom.holder = { - is_vassal_of = scope:title_assignment - } - } - } - } - holder.top_liege = scope:title_assignment - } - if = { - limit = { - NOT = { - kingdom = { - is_in_list = assigned_kingdoms - } - } - } - kingdom = { - set_de_jure_liege_title = scope:title_assignment.primary_title - add_to_list = assigned_kingdoms - } - } - } - change_mongol_successor_illegal_government = yes - } - } - if = { - limit = { - exists = scope:baruun_khanate_ruler - } - scope:baruun_khanate_ruler = { - add_realm_law_skip_effects = high_partition_succession_law - save_scope_as = title_assignment - every_sub_realm_county = { - limit = { - title_province = { - geographical_region = baruun_khanate_de_jure_region - } - exists = kingdom - OR = { - NOT = { exists = kingdom.holder } - AND = { - exists = kingdom.holder - OR = { - kingdom.holder = scope:title_assignment - kingdom.holder = { - is_vassal_of = scope:title_assignment - } - } - } - } - holder.top_liege = scope:title_assignment - } - if = { - limit = { - NOT = { - kingdom = { - is_in_list = assigned_kingdoms - } - } - } - kingdom = { - set_de_jure_liege_title = scope:title_assignment.primary_title - add_to_list = assigned_kingdoms - } - } - } - change_mongol_successor_illegal_government = yes - } - } - scope:mongolia_ruler = { - #Allocate tributaries of mongol empire or give them independence - trigger_event = { - id = mongol_invasion.3000 - days = 1 - } - #Break off exclaves - trigger_event = { - id = mongol_invasion.3200 - days = 1 - } - } - every_in_list = { - list = selected_mongol_heirs - limit = { - highest_held_title_tier >= tier_empire - NOT = { - this = scope:mongolia_ruler - } - } - #Break off exclaves - trigger_event = { - id = mongol_invasion.3200 - days = 1 - } - } -} - -# Special stuff for player Temüjin, disbursed in event conqueror.0001 -temujin_conqueror_bonuses_effect = { - add_gold = 100 - add_dread = medium_dread - add_prestige = 500 - if = { - limit = { - prestige_level < 2 - } - add_prestige_level = 2 - } - else_if = { - limit = { - prestige_level < 3 - } - add_prestige_level = 1 - } - if = { - limit = { - government_has_flag = government_is_nomadic - } - if = { - limit = { - OR = { - has_realm_law = nomadic_authority_4 - has_realm_law = nomadic_authority_5 - } - } - domicile = { - change_herd = { - add = nomadic_authority_level_2_requirement - } - } - } - else = { - domicile = { - change_herd = { - value = nomadic_authority_level_4_requirement - } - } - } - - if = { - limit = { - NOR = { - has_realm_law = nomadic_authority_5 - has_realm_law = nomadic_authority_4 - } - } - hidden_effect = { - if = { - limit = { has_realm_law = nomadic_authority_1 } - remove_realm_law = nomadic_authority_1 - } - if = { - limit = { has_realm_law = nomadic_authority_2 } - remove_realm_law = nomadic_authority_2 - } - if = { - limit = { has_realm_law = nomadic_authority_3 } - remove_realm_law = nomadic_authority_3 - } - } - add_realm_law_skip_effects = nomadic_authority_4 - } - } - if = { - limit = { - is_decision_on_cooldown = nomad_higher_tier_title_decision - } - remove_decision_cooldown = nomad_higher_tier_title_decision - } - custom_tooltip = temujin_horde_gathers_tt - trigger_event = { - id = mpo_greatest_of_khans.1010 - months = { 3 9 } - } -} - -convert_great_yuan_to_admin_effect = { - save_scope_as = administrative_liege - - #Create cadet branch to ensure you have a domicile - if = { - limit = { - exists = house.house_head - NOT = { - this = house.house_head - } - } - #Create cadet branch - found_cadet_house_decision_effect = { - CHARACTER = scope:administrative_liege - PRESTIGE = 0 - } - house = { - set_coa = scope:administrative_liege.capital_province.barony - } - } - change_to_administrative_effect = yes - - #Direct Vassals who fulfill the tgp_mongol_vassal_will_become_admin criteria are converted. Vassals above 25 opinion always accept - #Vassals are converted as a hierarchy. If a king is converted we convert all who are valid below that king (so his dukes, their counts, and their barons) are all converted. - #If a vassal does not convert (because of not accepting or because they are outside of the de jure empire, etc) then the vassals below them are _not_ converted either. - - #Human vassals are given a choice to convert or not in the ping event, even if powerful or having very good relation. - - hidden_effect = { - save_scope_as = actor - every_vassal = { - limit = { - tgp_mongol_vassal_will_become_admin = yes - } - save_scope_as = recipient - change_to_administrative_effect = yes - every_vassal = { #Everyone below also converts (could be Counts, could be Dukes) - limit = { - tgp_mongol_vassal_will_become_admin = yes #We still don't want mayors and bishops - is_ai = yes - } - save_scope_as = recipient - change_to_administrative_effect = yes - every_vassal = { #Everyone below also converts (Could be Counts, could be Barons) - limit = { - tgp_mongol_vassal_will_become_admin = yes #We still don't want mayors and bishops - is_ai = yes - } - save_scope_as = recipient - change_to_administrative_effect = yes - every_vassal = { #Everyone below also converts (could be Barons) - limit = { - tgp_mongol_vassal_will_become_admin = yes #We still don't want mayors and bishops - is_ai = yes - } - save_scope_as = recipient - change_to_administrative_effect = yes - } - } - } - } - } - - if = { - limit = { - NOT = { - has_character_flag = latin_emp_force_admin_flag - } - top_liege = this - } - add_character_modifier = { - modifier = first_admin_emperor - } - } - - change_influence = 1500 - add_treasury = 2500 - - every_vassal_or_below = { - limit = { - is_ai = no - tgp_mongol_vassal_will_become_admin = yes - } - trigger_event = ep3_decisions_event.4065 - } - if = { - limit = { - exists = capital_county - NOT = { - domicile.domicile_location.county ?= capital_county - } - } - domicile = { - move_domicile = scope:administrative_liege.capital_province - } - } - if = { - limit = { - government_has_flag = government_is_celestial - highest_held_title_tier >= tier_empire - primary_title = { - has_custom_title_name = no - } - } - trigger_event = { - id = tgp_dynastic_cycle.9000 - days = 1 - } - } -} - -change_mongol_successor_illegal_government = { - trigger_event = { - id = mongol_invasion.3100 - days = 1 - } -} - -mongol_breakup_purge_mongolia_exclaves_effect = { - save_scope_as = mongol_exclaves_target - - capital_province.county = { - every_connected_county = { # Start off by making a list of all disconnected Counties - invert = yes - max_naval_distance = 2000 - allow_one_county_land_gap = yes - add_to_list = disconnected_counties - } - } - - every_in_list = { - list = disconnected_counties - - limit = { - any_connected_county = { - NOT = { is_in_list = disconnected_counties } - max_naval_distance = 2000 - } - } - add_to_list = cull_naval_connection_counties - } - - while = { - limit = { - any_in_list = { - list = cull_naval_connection_counties - } - } - random_in_list = { - list = cull_naval_connection_counties - - save_scope_as = cull_origin_county - - every_connected_county = { - remove_from_list = cull_naval_connection_counties - remove_from_list = disconnected_counties - } - remove_from_list = cull_naval_connection_counties - remove_from_list = disconnected_counties - } - } - - every_in_list = { - list = disconnected_counties - - limit = { - target_is_de_jure_liege_or_above = scope:mongol_exclaves_target.primary_title - } - add_to_list = cull_de_jure_connection_counties - } - - while = { - limit = { - any_in_list = { - list = cull_de_jure_connection_counties - } - } - random_in_list = { - list = cull_de_jure_connection_counties - - save_scope_as = cull_origin_county - - every_connected_county = { - remove_from_list = cull_de_jure_connection_counties - remove_from_list = disconnected_counties - } - remove_from_list = cull_de_jure_connection_counties - remove_from_list = disconnected_counties - } - } - #Make them vassals if they are de jure vassals of another successor - every_in_list = { # Transfer Kings first - list = disconnected_counties - - limit = { - holder.primary_title = { - tier = tier_kingdom - empire.holder ?= { - OR = { - is_in_list = selected_mongol_heirs - primary_title = title:e_mongolia - } - NOT = { - this = scope:mongol_exclaves_target - } - } - } - NOR = { - holder = scope:mongol_exclaves_target - holder = { - any_sub_realm_title = { - tier = tier_county - NOT = { is_in_list = disconnected_counties } - } - } - } - } - holder = { - create_title_and_vassal_change = { - type = swear_fealty - save_scope_as = change - add_claim_on_loss = no - } - change_liege = { - liege = primary_title.empire.holder - change = scope:change - } - resolve_title_and_vassal_change = scope:change - every_realm_county = { - limit = { - is_in_list = disconnected_counties - } - remove_from_list = disconnected_counties - } - } - } - every_in_list = { # Transfer Dukes second - list = disconnected_counties - - limit = { - holder.primary_title = { - tier = tier_duchy - empire.holder ?= { - OR = { - is_in_list = selected_mongol_heirs - primary_title = title:e_mongolia - } - NOT = { - this = scope:mongol_exclaves_target - } - } - } - NOR = { - holder = scope:mongol_exclaves_target - holder = { - any_sub_realm_title = { - tier = tier_county - NOT = { is_in_list = disconnected_counties } - } - } - } - } - holder = { - create_title_and_vassal_change = { - type = swear_fealty - save_scope_as = change - add_claim_on_loss = no - } - change_liege = { - liege = primary_title.empire.holder - change = scope:change - } - resolve_title_and_vassal_change = scope:change - every_realm_county = { - limit = { - is_in_list = disconnected_counties - } - remove_from_list = disconnected_counties - } - } - } - - every_in_list = { # transfer Counts last - list = disconnected_counties - - limit = { - holder.primary_title = { - tier = tier_county - empire.holder ?= { - OR = { - is_in_list = selected_mongol_heirs - primary_title = title:e_mongolia - } - NOT = { - this = scope:mongol_exclaves_target - } - } - } - NOR = { - holder = scope:mongol_exclaves_target - holder = { - any_sub_realm_title = { - tier = tier_county - NOT = { is_in_list = disconnected_counties } - } - } - } - } - holder = { - create_title_and_vassal_change = { - type = swear_fealty - save_scope_as = change - add_claim_on_loss = no - } - change_liege = { - liege = primary_title.empire.holder - change = scope:change - } - resolve_title_and_vassal_change = scope:change - every_realm_county = { - limit = { - is_in_list = disconnected_counties - } - remove_from_list = disconnected_counties - } - } - } - every_in_list = { # Finally, transfer contiguous areas under someone from the pool - list = disconnected_counties - - limit = { - empire.holder ?= { - OR = { - is_in_list = selected_mongol_heirs - primary_title = title:e_mongolia - } - NOT = { - this = scope:mongol_exclaves_target - } - } - OR = { - holder.top_liege = scope:mongol_exclaves_target - holder = scope:mongol_exclaves_target - } - } - - save_scope_as = county_of_origin - - every_pool_character = { - province = scope:county_of_origin.title_province - limit = { - is_available_adult = yes - } - add_to_list = potential_holders - } - - every_pool_character = { - province = scope:county_of_origin.holder.capital_province - limit = { - is_available_adult = yes - } - add_to_list = potential_holders - } - - if = { - limit = { - NOT = { - any_in_list = { - list = potential_holders - is_available_adult = yes - } - } - } - create_character = { - location = scope:county_of_origin.title_province - culture = scope:county_of_origin.culture - faith = scope:county_of_origin.faith - gender_female_chance = 50 - age = 32 - save_scope_as = backup_character - } - scope:backup_character = { - add_to_list = potential_holders - } - } - - random_in_list = { - list = potential_holders - limit = { - is_available_adult = yes - has_claim_on = scope:county_of_origin - faith = { - has_dominant_ruling_gender = prev - } - } - alternative_limit = { - is_available_adult = yes - culture = scope:county_of_origin.culture - faith = scope:county_of_origin.faith - faith = { - has_dominant_ruling_gender = prev - } - } - alternative_limit = { - is_available_adult = yes - culture = scope:county_of_origin.culture - faith = { - has_dominant_ruling_gender = prev - } - } - alternative_limit = { - is_available_adult = yes - faith = scope:county_of_origin.faith - faith = { - has_dominant_ruling_gender = prev - } - } - alternative_limit = { - is_available_adult = yes - faith = { - has_dominant_ruling_gender = prev - } - } - alternative_limit = { - is_available_adult = yes - has_claim_on = scope:county_of_origin - } - alternative_limit = { - is_available_adult = yes - culture = scope:county_of_origin.culture - faith = scope:county_of_origin.faith - } - alternative_limit = { - is_available_adult = yes - culture = scope:county_of_origin.culture - } - alternative_limit = { - is_available_adult = yes - faith = scope:county_of_origin.faith - } - alternative_limit = { - is_available_adult = yes - } - - save_scope_as = new_county_holder - add_character_flag = { - flag = domicile_culture_and_faith_check - days = 1 - } - - create_title_and_vassal_change = { - type = granted - save_scope_as = change - add_claim_on_loss = no - } - every_in_list = { - list = disconnected_counties - limit = { - OR = { - holder.top_liege = scope:mongol_exclaves_target - holder = scope:mongol_exclaves_target - } - is_connected_to = { - target = scope:county_of_origin - } - NOT ={ - is_connected_to = { - target = scope:mongol_exclaves_target.capital_province.county - } - } - } - change_title_holder = { - holder = scope:new_county_holder - change = scope:change - } - #scope:new_county_holder = { get_title = prev } - } - resolve_title_and_vassal_change = scope:change - - create_title_and_vassal_change = { - type = swear_fealty - save_scope_as = change - add_claim_on_loss = no - } - change_liege = { - liege = primary_title.empire.holder - change = scope:change - } - resolve_title_and_vassal_change = scope:change - # This system should not generate strange-culture nomads - if = { - limit = { - government_has_flag = government_is_nomadic - domicile.domicile_culture != scope:new_county_holder.capital_county.culture - } - domicile = { - set_domicile_culture = scope:new_county_holder.capital_county.culture - } - } - if = { - limit = { - government_has_flag = government_is_nomadic - domicile.domicile_faith != scope:new_county_holder.capital_county.faith - } - domicile = { - set_domicile_faith = scope:new_county_holder.capital_county.faith - } - } - if = { # Just in case they need to create a duchy - limit = { - gold < 500 - } - add_gold = 500 - } - } - remove_from_list = disconnected_counties - } - - #Make the rest independent - every_in_list = { # Release Kings first - list = disconnected_counties - - limit = { - holder.primary_title.tier = tier_kingdom - NOR = { - holder = scope:mongol_exclaves_target - holder = { - any_sub_realm_title = { - tier = tier_county - NOT = { is_in_list = disconnected_counties } - } - } - } - } - holder = { - create_title_and_vassal_change = { - type = independency - save_scope_as = change - add_claim_on_loss = no - } - becomes_independent = { - change = scope:change - } - resolve_title_and_vassal_change = scope:change - } - } - - every_in_list = { # Release Dukes second - list = disconnected_counties - - limit = { - holder.primary_title.tier = tier_duchy - NOR = { - holder = scope:mongol_exclaves_target - holder = { - any_sub_realm_title = { - tier = tier_county - NOT = { is_in_list = disconnected_counties } - } - } - } - } - holder = { - create_title_and_vassal_change = { - type = independency - save_scope_as = change - add_claim_on_loss = no - } - becomes_independent = { - change = scope:change - } - resolve_title_and_vassal_change = scope:change - } - } - - every_in_list = { # Release Counts last - list = disconnected_counties - - limit = { - holder.primary_title.tier = tier_county - NOR = { - holder = scope:mongol_exclaves_target - holder = { - any_sub_realm_title = { - tier = tier_county - NOT = { is_in_list = disconnected_counties } - } - } - } - } - holder = { - create_title_and_vassal_change = { - type = independency - save_scope_as = change - add_claim_on_loss = no - } - becomes_independent = { - change = scope:change - } - resolve_title_and_vassal_change = scope:change - } - } - - every_in_list = { # Finally, release contiguous areas under someone from the pool - list = disconnected_counties - - limit = { - OR = { - holder.top_liege = scope:mongol_exclaves_target - holder = scope:mongol_exclaves_target - } - } - - save_scope_as = county_of_origin - - every_pool_character = { - province = scope:county_of_origin.title_province - limit = { - is_available_adult = yes - } - add_to_list = potential_holders - } - - every_pool_character = { - province = scope:county_of_origin.holder.capital_province - limit = { - is_available_adult = yes - } - add_to_list = potential_holders - } - - if = { - limit = { - NOT = { - any_in_list = { - list = potential_holders - is_available_adult = yes - } - } - } - create_character = { - location = scope:county_of_origin.title_province - culture = scope:county_of_origin.culture - faith = scope:county_of_origin.faith - gender_female_chance = 50 - age = 32 - save_scope_as = backup_character - } - scope:backup_character = { - add_to_list = potential_holders - } - } - - random_in_list = { - list = potential_holders - limit = { - is_available_adult = yes - has_claim_on = scope:county_of_origin - faith = { - has_dominant_ruling_gender = prev - } - } - alternative_limit = { - is_available_adult = yes - culture = scope:county_of_origin.culture - faith = scope:county_of_origin.faith - faith = { - has_dominant_ruling_gender = prev - } - } - alternative_limit = { - is_available_adult = yes - culture = scope:county_of_origin.culture - faith = { - has_dominant_ruling_gender = prev - } - } - alternative_limit = { - is_available_adult = yes - faith = scope:county_of_origin.faith - faith = { - has_dominant_ruling_gender = prev - } - } - alternative_limit = { - is_available_adult = yes - faith = { - has_dominant_ruling_gender = prev - } - } - alternative_limit = { - is_available_adult = yes - has_claim_on = scope:county_of_origin - } - alternative_limit = { - is_available_adult = yes - culture = scope:county_of_origin.culture - faith = scope:county_of_origin.faith - } - alternative_limit = { - is_available_adult = yes - culture = scope:county_of_origin.culture - } - alternative_limit = { - is_available_adult = yes - faith = scope:county_of_origin.faith - } - alternative_limit = { - is_available_adult = yes - } - - save_scope_as = new_county_holder - add_character_flag = { - flag = domicile_culture_and_faith_check - days = 1 - } - #get_title = scope:county_of_origin - - create_title_and_vassal_change = { - type = independency - save_scope_as = change - add_claim_on_loss = no - } - every_in_list = { - list = disconnected_counties - limit = { - OR = { - holder.top_liege = scope:mongol_exclaves_target - holder = scope:mongol_exclaves_target - } - is_connected_to = { - target = scope:county_of_origin - } - NOT ={ - is_connected_to = { - target = scope:mongol_exclaves_target.capital_province.county - } - } - } - change_title_holder = { - holder = scope:new_county_holder - change = scope:change - } - #scope:new_county_holder = { get_title = prev } - } - becomes_independent = { - change = scope:change - } - resolve_title_and_vassal_change = scope:change - # This system should not generate strange-culture nomads - if = { - limit = { - government_has_flag = government_is_nomadic - domicile.domicile_culture != scope:new_county_holder.capital_county.culture - } - domicile = { - set_domicile_culture = scope:new_county_holder.capital_county.culture - } - } - if = { - limit = { - government_has_flag = government_is_nomadic - domicile.domicile_faith != scope:new_county_holder.capital_county.faith - } - domicile = { - set_domicile_faith = scope:new_county_holder.capital_county.faith - } - } - if = { # Just in case they need to create a duchy - limit = { - gold < 500 - } - add_gold = 500 - } - } - } -} diff --git a/N3OW/common/scripted_effects/00_murder_effects.txt b/N3OW/common/scripted_effects/00_murder_effects.txt deleted file mode 100644 index 0405263b..00000000 --- a/N3OW/common/scripted_effects/00_murder_effects.txt +++ /dev/null @@ -1,1036 +0,0 @@ - - -murder_consequences_known_or_exposed_effect = { - $MURDERER$ = { - ###ADD TRAITS### - #Force tooltip is used for everyone but POV to make sure expose secret events looks right for everyone, even though the trait can only be added once. Kinslayer works the same way. - add_trait_only_force_tooltip_if_not_pov_effect = { TRAIT = murderer POV = $POV$ } - add_kinslayer_trait_or_nothing_effect = { VICTIM = $VICTIM$ } - - # Add piety penalty if the murder was unjust - if = { - limit = { - NOR = { - any_close_family_member = { - even_if_dead = yes - killer ?= $VICTIM$ - } - any_spouse = { - even_if_dead = yes - killer ?= $VICTIM$ - } - AND = { - faith = { has_doctrine = tenet_fp3_fedayeen } #this checks that assassins don't get piety loss for killing unbelievers - NOT = { faith = $VICTIM$.faith } - } - } - } - add_piety = medium_piety_loss - } - - # If we're a clan this affects unity - if = { - limit = { # If the victim is landed - $VICTIM$ = { is_landed = yes } - } - add_clan_unity_interaction_effect = { - CHARACTER = $MURDERER$ - TARGET = $VICTIM$ - VALUE = medium_unity_loss - DESC = clan_unity_murder.desc - REVERSE_NON_HOUSE_TARGET = no - } - } - # For unlanded characters, we don't care as much, but you still lose some unity - else = { - add_clan_unity_interaction_effect = { - CHARACTER = $MURDERER$ - TARGET = $VICTIM$ - VALUE = minor_unity_loss - DESC = clan_unity_murder.desc - REVERSE_NON_HOUSE_TARGET = no - } - } - - # Family Feud - house_feud_murder_effect = { VICTIM = $VICTIM$ MURDERER = $MURDERER$ } - - # Opinion and dread: we only show this for the murderer. - if = { - limit = { this = $POV$ } - murder_consequences_known_or_exposed_apply_dread_effect = { VICTIM = $VICTIM$ } - murder_opinion_effect = { VICTIM = $VICTIM$ MURDERER = $MURDERER$ } - } - # There are some things you just shouldn't do - show_as_tooltip = { - if = { - limit = { - $VICTIM$ = { has_character_flag = is_party_baron } - } - add_character_modifier = { modifier = party_baron_murdered_the_joy_of_life_modifier } - } - } - hidden_effect = { - if = { - limit = { - OR = { - exists = local_var:murdered_party_baron - exists = scope:secret.var:murdered_party_baron - } - } - add_character_modifier = { modifier = party_baron_murdered_the_joy_of_life_modifier } - } - } - } - - # Struggle Catalysts. - if = { - limit = { - $VICTIM$ = { is_vip_struggle_character = yes } - $MURDERER$ = { - any_character_struggle = { - involvement = involved - activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { - CATALYST = catalyst_discovery_of_very_important_murder - CHAR = scope:victim - } - } - } - } - $MURDERER$ = { - every_character_struggle = { - involvement = involved - limit = { - activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { - CATALYST = catalyst_discovery_of_very_important_murder - CHAR = scope:victim - } - } - activate_struggle_catalyst = { - catalyst = catalyst_discovery_of_very_important_murder - character = $MURDERER$ - } - } - } - } -} - -murder_consequences_known_or_exposed_hidden_opinion_effect = { - $MURDERER$ = { - ###ADD TRAITS### - #Force tooltip is used for everyone but POV to make sure expose secret events looks right for everyone, even though the trait can only be added once. Kinslayer works the same way. - add_trait_only_force_tooltip_if_not_pov_effect = { TRAIT = murderer POV = $POV$ } - add_kinslayer_trait_or_nothing_effect = { VICTIM = $VICTIM$ } - - if = { #Add piety penalty if the murder was unjust - limit = { - NOR = { - any_close_family_member = { - even_if_dead = yes - killer ?= $VICTIM$ - } - any_spouse = { - even_if_dead = yes - killer ?= $VICTIM$ - } - AND = { - faith = { has_doctrine = tenet_fp3_fedayeen } #this checks that assassins don't get piety loss for killing unbelievers - NOT = { faith = $VICTIM$.faith } - } - } - } - add_piety = medium_piety_loss - } - - # Family Feud - house_feud_murder_effect = { VICTIM = $VICTIM$ MURDERER = $MURDERER$ } - - ###OPINION AND DREAD### - #Hide this from POV if they're not the murderer - if = { - limit = { this = $POV$ } - add_dread = 15 - hidden_effect = { - murder_opinion_effect = { VICTIM = $VICTIM$ MURDERER = $MURDERER$ } - } - } - else = { - hidden_effect = { - add_dread = 15 - murder_opinion_effect = { VICTIM = $VICTIM$ MURDERER = $MURDERER$ } - } - } - # There are some things you just shouldn't do - show_as_tooltip = { - if = { - limit = { $VICTIM$ = { has_character_flag = is_party_baron } } - add_character_modifier = { - modifier = party_baron_murdered_the_joy_of_life_modifier - } - } - } - hidden_effect = { - if = { - limit = { - OR = { - exists = local_var:murdered_party_baron - exists = scope:secret.var:murdered_party_baron - } - } - add_character_modifier = { - modifier = party_baron_murdered_the_joy_of_life_modifier - } - } - } - } - - # Struggle Catalysts. - if = { - limit = { - $VICTIM$ = { is_vip_struggle_character = yes } - $MURDERER$ = { - any_character_struggle = { - involvement = involved - activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { - CATALYST = catalyst_discovery_of_very_important_murder - CHAR = scope:victim - } - } - } - } - $MURDERER$ = { - every_character_struggle = { - involvement = involved - limit = { - activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { - CATALYST = catalyst_discovery_of_very_important_murder - CHAR = scope:victim - } - } - activate_struggle_catalyst = { - catalyst = catalyst_discovery_of_very_important_murder - character = $MURDERER$ - } - } - } - } -} - -unknown_murder_effect = { - # Party Baron handling - if = { - limit = { $VICTIM$ = { has_character_flag = is_party_baron } } - set_local_variable = { - name = murdered_party_baron - value = yes - } - } - # If we're a clan this affects unity - if = { - limit = { # If the victim is landed - $VICTIM$ = { is_landed = yes } - } - add_clan_unity_interaction_effect = { - CHARACTER = $MURDERER$ - TARGET = $VICTIM$ - VALUE = minor_unity_loss - DESC = clan_unity_murder_unknown.desc - REVERSE_NON_HOUSE_TARGET = no - } - } - else = { # For unlanded characters, we don't care as much, but you still lose some unity - add_clan_unity_interaction_effect = { - CHARACTER = $MURDERER$ - TARGET = $VICTIM$ - VALUE = miniscule_unity_loss - DESC = clan_unity_murder_unknown.desc - REVERSE_NON_HOUSE_TARGET = no - } - } - $VICTIM$ = { - #Killed by murder: set this up first to keep the killer hidden. - hidden_effect = { - death = { - killer = $MURDERER$ - death_reason = $REASON$ - } - } - # Hide murderer in tooltip - show_as_tooltip = { - death = { death_reason = $REASON$ } - } - } - $MURDERER$ = { - if = { - limit = { is_alive = yes } - hidden_effect = { - add_secret = { - type = secret_murder - target = $VICTIM$ - } - } - if = { - limit = { exists = local_var:murdered_party_baron } - random_secret = { - type = secret_murder - limit = { - secret_target = $VICTIM$ - } - set_variable = { - name = murdered_party_baron - value = yes - } - } - } - } - } -} - -#If it's a cannibal eating you - so that that fact is saved for future reference -unknown_cannibal_murder_effect = { - $VICTIM$ = { - death = { - death_reason = death_mysterious - killer = $MURDERER$ - } - } - $MURDERER$ = { - add_secret = { - type = secret_murder - target = $VICTIM$ - } - random_secret = { - type = secret_murder - limit = { - secret_target = $VICTIM$ - } - set_variable = { #To set the right death reason if the secret is revealed - name = was_eaten_by_cannibal - value = yes - } - } - } -} - -#Your head is turned into a bell chime -unknown_bell_murder_effect = { - $VICTIM$ = { - death = { - death_reason = death_mysterious - killer = $MURDERER$ - } - } - $MURDERER$ = { - add_secret = { - type = secret_murder - target = $VICTIM$ - } - random_secret = { - type = secret_murder - limit = { - secret_target = $VICTIM$ - } - save_scope_as = bell_secret - set_variable = { #To set the right death reason if the secret is revealed - name = was_turned_into_bell_chime - value = yes - } - } - } -} - - -#KNOWN MURDER - -# Exposer can be another character, or the murderer themselves if no specific character makes sense -known_murder_effect = { - $VICTIM$ = { save_scope_as = victim_scope } - $MURDERER$ = { save_scope_as = murderer_scope } - hidden_effect = { - if = { - limit = { $VICTIM$ = { has_character_flag = is_party_baron } } - set_local_variable = { - name = murdered_party_baron - value = yes - } - } - } - # If we're a clan this affects unity - if = { - limit = { # If the victim is landed - $VICTIM$ = { is_landed = yes } - } - add_clan_unity_interaction_effect = { - CHARACTER = $MURDERER$ - TARGET = $VICTIM$ - VALUE = medium_unity_loss - DESC = clan_unity_murder.desc - REVERSE_NON_HOUSE_TARGET = no - } - } - else = { # For unlanded characters, we don't care as much, but you still lose some unity - add_clan_unity_interaction_effect = { - CHARACTER = $MURDERER$ - TARGET = $VICTIM$ - VALUE = minor_unity_loss - DESC = clan_unity_murder.desc - REVERSE_NON_HOUSE_TARGET = no - } - } - $VICTIM$ = { - every_close_family_member = { - limit = { - NOR = { - this = $MURDERER$ - is_scheming_against = { - target = $VICTIM$ - type = murder - } - has_any_bad_relationship_with_character_trigger = { CHARACTER = $VICTIM$ } - trigger_if = { - limit = { exists = scope:scheme } - scope:scheme = { scheme_is_character_agent = prev } - } - } - opinion = { - target = $VICTIM$ - value > -50 - } - } - hidden_effect = { - random = { - chance = 25 - modifier = { - factor = 2 - has_trait = wrathful - } - modifier = { - factor = 2 - has_trait = vengeful - } - modifier = { - factor = 2 - has_any_good_relationship_with_character_trigger = { CHARACTER = $VICTIM$ } - } - modifier = { - factor = 2 - OR = { - is_parent_of = $VICTIM$ - is_child_of = $VICTIM$ - } - } - trigger_event = { - id = bp1_yearly.8050 - days = 15 - } - } - } - } - death = { - death_reason = death_murder - killer = $MURDERER$ - } - hidden_effect = { set_killer_public = yes } - } - $MURDERER$ = { - hidden_effect = { - add_secret = { - type = secret_murder - target = $VICTIM$ - } - random_secret = { - type = secret_murder - limit = { - secret_target = $VICTIM$ - } - - set_variable = { - name = known_murder - value = yes - } - - expose_secret = $EXPOSER$ - } - } - } - show_as_tooltip = { - murder_consequences_known_or_exposed_effect = { - MURDERER = $MURDERER$ - VICTIM = $VICTIM$ - POV = root - } - } - # Family Feud - house_feud_murder_effect = { VICTIM = $VICTIM$ MURDERER = $MURDERER$ } -} - -known_murder_hidden_opinion_effect = { - $VICTIM$ = { save_scope_as = victim_scope } - $MURDERER$ = { save_scope_as = murderer_scope } - hidden_effect = { - if = { - limit = { $VICTIM$ = { has_character_flag = is_party_baron } } - set_local_variable = { - name = murdered_party_baron - value = yes - } - } - } - $VICTIM$ = { - every_close_family_member = { - limit = { - NOR = { - this = $MURDERER$ - is_scheming_against = { - target = $VICTIM$ - type = murder - } - has_any_bad_relationship_with_character_trigger = { CHARACTER = $VICTIM$ } - trigger_if = { - limit = { exists = scope:scheme } - scope:scheme = { scheme_is_character_agent = prev } - } - } - opinion = { - target = $VICTIM$ - value > -50 - } - } - hidden_effect = { - random = { - chance = 25 - modifier = { - factor = 2 - has_trait = wrathful - } - modifier = { - factor = 2 - has_trait = vengeful - } - modifier = { - factor = 2 - has_any_good_relationship_with_character_trigger = { CHARACTER = $VICTIM$ } - } - modifier = { - factor = 2 - OR = { - is_parent_of = $VICTIM$ - is_child_of = $VICTIM$ - } - } - trigger_event = { - id = bp1_yearly.8050 - days = 15 - } - } - } - } - death = { - death_reason = death_murder - killer = $MURDERER$ - } - hidden_effect = { set_killer_public = yes } - } - $MURDERER$ = { - hidden_effect = { - add_secret = { - type = secret_murder - target = $VICTIM$ - } - random_secret = { - type = secret_murder - limit = { - secret_target = $VICTIM$ - } - - set_variable = { - name = known_murder - value = yes - } - - expose_secret = $EXPOSER$ - } - } - } - show_as_tooltip = { - murder_consequences_known_or_exposed_hidden_opinion_effect = { - MURDERER = $MURDERER$ - VICTIM = $VICTIM$ - POV = root - } - } - # Family Feud - house_feud_murder_effect = { VICTIM = $VICTIM$ MURDERER = $MURDERER$ } -} - - -murder_opinion_effect = { - $VICTIM$ = { - #Victim's family - every_spouse = { - limit = { NOT = { this = $MURDERER$ } } - add_to_temporary_list = close_family_murder_opinion_list - } - every_close_family_member = { - limit = { NOT = { this = $MURDERER$ } } - add_to_temporary_list = close_family_murder_opinion_list - } - - if = { - limit = { - any_in_list = { - list = close_family_murder_opinion_list - always = yes - } - } - every_in_list = { - list = close_family_murder_opinion_list - custom = all_close_family_and_spouses - - add_opinion = { - target = $MURDERER$ - modifier = murdered_close_family_crime - } - } - } - #Victim's friends and lovers - every_relation = { - type = friend - limit = { - NOR = { - this = $MURDERER$ - this = $VICTIM$ - is_in_list = close_family_murder_opinion_list - } - } - add_to_list = victim_close_relations_list - } - every_relation = { - type = lover - limit = { - NOR = { - this = $MURDERER$ - this = $VICTIM$ - is_in_list = close_family_murder_opinion_list - is_in_list = victim_close_relations_list - } - } - add_to_list = victim_close_relations_list - } - if = { - limit = { - any_in_list = { - list = victim_close_relations_list - always = yes - } - } - every_in_list = { - list = victim_close_relations_list - custom = all_friends_and_lovers - add_opinion = { - target = $MURDERER$ - modifier = executed_close_relation_opinion - } - } - } - } -} - - -attempted_murder_opinion_effect = { - $VICTIM$ = { - if = { - limit = { is_alive = yes } - add_opinion = { - target = $MURDERER$ - modifier = attempted_murder_me_crime - } - hidden_effect = { - add_opinion = { - target = $MURDERER$ - modifier = murder_personal_grudge_opinion - years = 2 - } - } - } - - every_spouse = { - limit = { NOT = { this = $MURDERER$ } } - add_to_temporary_list = close_family_murder_opinion_list - } - every_close_family_member = { - limit = { NOT = { this = $MURDERER$ } } - add_to_temporary_list = close_family_murder_opinion_list - } - - if = { - limit = { - any_in_list = { - list = close_family_murder_opinion_list - count >= 1 - NOT = { - is_scheming_against = { - target = $VICTIM$ - type = murder - } - } - } - } - every_in_list = { - list = close_family_murder_opinion_list - limit = { - NOT = { - is_scheming_against = { - target = $VICTIM$ - type = murder - } - } - } - custom = all_close_family_and_spouses - add_opinion = { - target = $MURDERER$ - modifier = attempted_murder_close_family_crime - years = 20 - } - } - } - - if = { - limit = { - exists = house - exists = $MURDERER$.house - } - house = { - change_house_relation_effect = { - HOUSE = $MURDERER$.house - VALUE = house_relation_damage_medium_value - REASON = murder_attempt - CHAR = $MURDERER$ - TARGET_CHAR = root - TITLE = scope:dummy_gender - } - } - } - } -} - -abduct_opinion_effect = { - $VICTIM$ = { - add_opinion = { - target = $ABDUCTER$ - modifier = abducted_me_crime - } - #Victim's family - every_spouse = { - limit = { NOT = { this = $ABDUCTER$ } } - add_to_temporary_list = close_family_abduct_opinion_list - } - every_close_family_member = { - limit = { NOT = { this = $ABDUCTER$ } } - add_to_temporary_list = close_family_abduct_opinion_list - } - - if = { - limit = { - any_in_list = { - list = close_family_abduct_opinion_list - always = yes - } - } - every_in_list = { - list = close_family_abduct_opinion_list - custom = all_close_family_and_spouses - - add_opinion = { - target = $ABDUCTER$ - modifier = abducted_close_family_crime - } - } - } - #Victim's friends and lovers - every_relation = { - type = friend - limit = { - NOR = { - this = $ABDUCTER$ - is_in_list = close_family_abduct_opinion_list - } - } - add_to_list = victim_close_relations_list - } - every_relation = { - type = lover - limit = { - NOR = { - this = $VICTIM$ - is_in_list = close_family_abduct_opinion_list - is_in_list = victim_close_relations_list - } - } - add_to_list = victim_close_relations_list - } - if = { - limit = { - any_in_list = { - list = victim_close_relations_list - always = yes - } - } - every_in_list = { - list = victim_close_relations_list - custom = all_friends_and_lovers - add_opinion = { - target = $ABDUCTER$ - modifier = abducted_close_relation_opinion - } - } - } - } -} - -attempted_abduction_opinion_effect = { - $VICTIM$ = { - if = { - limit = { is_alive = yes } - add_opinion = { - target = $ABDUCTER$ - modifier = attempted_abduct_me_crime - } - hidden_effect = { - add_opinion = { - target = $ABDUCTER$ - modifier = murder_personal_grudge_opinion - years = 2 - } - } - } - every_spouse = { - limit = { NOT = { this = $ABDUCTER$ } } - add_to_temporary_list = close_family_abduct_opinion_list - } - every_close_family_member = { - limit = { NOT = { this = $ABDUCTER$ } } - add_to_temporary_list = close_family_abduct_opinion_list - } - - if = { - limit = { - any_in_list = { - list = close_family_abduct_opinion_list - always = yes - } - } - every_in_list = { - list = close_family_abduct_opinion_list - custom = all_close_family_and_spouses - - add_opinion = { - target = $ABDUCTER$ - modifier = attempted_abduct_close_family_crime - years = 20 - } - } - } - - } -} - - -#Pick a Local Creepy Crawly -set_local_venomous_creature_effect = { - random_list = { - 10 = { - save_scope_value_as = { - name = venomous_creature - value = flag:rare_spider ##Very rare, as spiders poisonous enough to kill a man would need to come from VERY far - } - } - 500 = { - save_scope_value_as = { - name = venomous_creature - value = flag:red_scorpion #India, Nepal - } - modifier = { - factor = 0 - trigger_if = { - limit = { - exists = location - } - NOT = { - location = { geographical_region = world_india } - } - } - } - } - 1000 = { - save_scope_value_as = { - name = venomous_creature - value = flag:deathstalker #North Africa or Middle East - } - modifier = { - factor = 0 - trigger_if = { - limit = { - exists = location - } - location = { - NOR = { - geographical_region = world_africa_north - geographical_region = world_middle_east_jerusalem - geographical_region = world_middle_east_persia - } - } - } - } - } - 500 = { - save_scope_value_as = { - name = venomous_creature - value = flag:fat_tail #Arabia, Middle East, Egypt - } - modifier = { - factor = 0 - trigger_if = { - limit = { - exists = location - } - location = { - NOR = { - geographical_region = world_middle_east - geographical_region = world_africa_north_east - } - } - } - } - } - 200 = { - save_scope_value_as = { - name = venomous_creature - value = flag:viper #Everywhere - fallback - } - } - 500 = { - save_scope_value_as = { - name = venomous_creature - value = flag:mamba #Sub-saharan Africa - } - modifier = { - factor = 0 - trigger_if = { - limit = { - exists = location - } - NOT = { - location = { geographical_region = world_africa_west } - } - } - } - } - 250 = { - save_scope_value_as = { - name = venomous_creature - value = flag:boomslang #Sub-saharan Africa - } - modifier = { - factor = 0 - trigger_if = { - limit = { - exists = location - } - NOT = { - location = { geographical_region = world_africa_west } - } - } - } - } - 250 = { - save_scope_value_as = { - name = venomous_creature - value = flag:king_cobra #South-east Asia + India - } - modifier = { - factor = 0 - trigger_if = { - limit = { - exists = location - } - location = { - NOR = { - geographical_region = world_india - geographical_region = world_burma - geographical_region = world_asia_southeast - } - } - } - } - } - 1000 = { - save_scope_value_as = { - name = venomous_creature - value = flag:daboia #India - } - modifier = { - factor = 0 - trigger_if = { - limit = { - exists = location - } - NOT = { - location = { geographical_region = world_india } - } - } - } - } - 500 = { - save_scope_value_as = { - name = venomous_creature - value = flag:saw_scale #North Africa, Middle East, Pakistan, India - } - modifier = { - factor = 0 - trigger_if = { - limit = { - exists = location - } - location = { - NOR = { - geographical_region = world_africa_north - geographical_region = world_middle_east - geographical_region = world_india - } - } - } - } - } - 500 = { - save_scope_value_as = { - name = venomous_creature - value = flag:krait #Pakistan, India, Southeast Asia - } - modifier = { - factor = 0 - trigger_if = { - limit = { - exists = location - } - location = { - NOR = { - geographical_region = world_india - geographical_region = world_burma - } - } - } - } - } - 1 = { - save_scope_value_as = { - name = venomous_creature - value = flag:beaked_mammal #Australia - } - modifier = { - factor = 0 - stewardship <= 35 #Errr, *amazing* trade routes, I guess? - } - } - } -} diff --git a/N3OW/common/scripted_effects/00_music_effects.txt b/N3OW/common/scripted_effects/00_music_effects.txt deleted file mode 100644 index d601821c..00000000 --- a/N3OW/common/scripted_effects/00_music_effects.txt +++ /dev/null @@ -1,14 +0,0 @@ -# plays a music cue once per player character's lifetime -# example use : play_music_cue_once = { TRACK = "mx_cue_combat_stinger" } -play_music_cue_once = { - if = { - limit = { - is_ai = no - NOT = { - has_character_flag = played_$TRACK$ - } - } - add_character_flag = played_$TRACK$ - play_music_cue = $TRACK$ - } -} diff --git a/N3OW/common/scripted_effects/00_nickname_effects.txt b/N3OW/common/scripted_effects/00_nickname_effects.txt deleted file mode 100644 index 8e3dd22b..00000000 --- a/N3OW/common/scripted_effects/00_nickname_effects.txt +++ /dev/null @@ -1,6402 +0,0 @@ -set_nickname_effect = { - if = { - limit = { - NAND = { # I cannot already have a bad nickname if the nickname I'm getting is also bad - has_bad_nickname = yes - is_bad_nickname = $NICKNAME$ - } - OR = { # Has no nickname or a bad nickname - NOT = { has_any_nickname = yes } - has_bad_nickname = yes - } - } - give_nickname = $NICKNAME$ - } -} - -chance_for_random_nickname_effect = { - random = { - chance = random_nickname_chance - #chance = 100 # For testing - save_scope_value_as = { - name = toggle_null_result - value = yes - } - assign_random_nickname_effect = yes - } -} - -flag_random_nickname_as_taken_in_batch_effect = { - save_scope_value_as = { - name = had_$NICK$ - value = yes - } -} - -assign_random_nickname_effect = { - save_scope_as = nickname_root_scope - if = { - limit = { - is_adult = yes - has_any_nickname = no - NOT = { government_has_flag = government_is_mercenary } - NOT = { has_game_rule = random_nickname_frequency_none } - } - random_list = { - 100 = { - trigger = { - exists = scope:toggle_null_result - } - # To make rare nicknames even rarer - } - 100 = { - trigger = { - is_male = yes - has_trait = stubborn - has_trait = impatient - NOR = { - prestige_level >= 3 - portrait_shared_clothing_contents_trigger = { # They have a chance to be bald normally; it's not weird or tease-worthy - CULTURE_SCOPE = culture - CULTURE_FLAG = african - } - is_bald_trigger = yes - exists = scope:had_nick_the_actually_bald - } - } - modifier = { - prestige_level < 2 - factor = 2 - } - give_nickname = nick_the_bald_ironic - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_bald_ironic } - trigger_event = lifestyle_nicknames.1000 - } - 10 = { - trigger = { - is_male = yes - age >= 30 - stress >= 100 - NOR = { - portrait_shared_clothing_contents_trigger = { # They have a chance to be bald normally; it's not weird or tease-worthy - CULTURE_SCOPE = culture - CULTURE_FLAG = african - } - is_bald_trigger = yes - exists = scope:had_nick_the_actually_bald - } - } - modifier = { - add = age - } - give_nickname = nick_the_actually_bald - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_actually_bald } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - NOR = { - has_trait = crusader_king - mpo_has_gok_mongol_empire_trigger = yes - } - has_personality_extroverted_trigger = yes - NOT = { - any_realm_county = { - culture = scope:nickname_root_scope.culture - } - } - NOT = { - primary_title ?= { - any_past_holder = { - has_nickname = nick_the_stranger - } - } - } - is_landed = yes - NOT = { exists = scope:had_nick_the_stranger } - } - modifier = { - NOT = { - any_realm_county = { - culture = { - cultural_acceptance = { target = scope:nickname_root_scope.culture value >= 40 } - } - } - } - factor = 2 - } - give_nickname = nick_the_stranger - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_stranger } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - is_playable_character = yes - NOR = { - any_sub_realm_county = { - faith = scope:nickname_root_scope.faith - } - AND = { - top_liege != this - faith = liege.faith - } - government_has_flag = government_is_theocracy - government_has_flag = government_is_landless_adventurer - } - NOT = { exists = scope:had_nick_the_faith } - } - modifier = { - has_trait = zealous - factor = 2 - } - give_nickname = nick_the_faith - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_faith } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - OR = { - has_trait = deceitful - has_trait = fickle - has_trait = ambitious - has_trait = greedy - } - NOR = { - has_trait = shy - has_trait = calm - } - ai_boldness >= 75 - ai_honor < -75 - NOT = { exists = scope:had_nick_troublemaker } - } - modifier = { - ai_honor <= -100 - factor = 2 - } - give_nickname = nick_troublemaker - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_troublemaker } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_trait_extroverted_trigger = no - has_trait_levelheaded_trigger = yes - OR = { - has_trait = calm - has_trait = patient - has_trait = content - has_trait = compassionate - } - days_of_continuous_peace >= 3650 - NOT = { exists = scope:had_nick_the_peaceful } - } - modifier = { - calc_true_if = { - amount >= 2 - has_trait = calm - has_trait = patient - has_trait = content - has_trait = compassionate - } - factor = 2 - } - give_nickname = nick_the_peaceful - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_peaceful } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - days_of_continuous_peace >= 700 - ai_has_economical_boom_personality = yes - any_held_title = { - count >= 4 - title_tier = county - title_province = { - has_ongoing_construction = yes - } - } - NOT = { exists = scope:had_nick_the_builder } - } - modifier = { - any_held_title = { - count = all - title_tier = county - title_province = { - has_ongoing_construction = yes - } - } - factor = 2 - } - give_nickname = nick_the_builder - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_builder } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - is_male = yes - has_trait = lazy - OR = { - has_trait = drunkard - has_trait = hashishiyah - } - NOT = { - prestige_level >= 3 - } - is_bald_trigger = no - NOT = { exists = scope:had_nick_the_hairy } - } - modifier = { - prestige_level < 2 - factor = 2 - } - give_nickname = nick_the_hairy - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_hairy } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - is_in_civil_war = yes - tyranny > 0 - diplomacy <= 8 - NOT = { exists = scope:had_nick_the_unready } - } - modifier = { - diplomacy <= 4 - factor = 2 - } - give_nickname = nick_the_unready - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_unready } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - OR = { - has_trait = wrathful - has_trait = irritable - has_trait = impatient - has_trait = ambitious - } - is_at_war = yes - any_character_war = { - primary_attacker = scope:nickname_root_scope - } - ai_boldness >= 50 - NOT = { exists = scope:had_nick_the_quarreller } - } - modifier = { - calc_true_if = { - amount >= 2 - has_trait = wrathful - has_trait = irritable - has_trait = impatient - has_trait = ambitious - } - factor = 2 - } - give_nickname = nick_the_quarreller - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_quarreller } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_personality_dominant_trigger = yes - has_trait = stubborn - is_at_war = yes - any_character_war = { - primary_attacker = scope:nickname_root_scope - OR = { - using_cb = claimant_faction_war - using_cb = claim_cb - } - } - NOT = { exists = scope:had_nick_the_determined } - } - modifier = { - ai_boldness >= 50 - factor = 2 - } - give_nickname = nick_the_determined - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_determined } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - OR = { - has_trait = wrathful - has_trait = irritable - has_trait = impatient - } - is_at_war = yes - any_character_war = { - primary_attacker = scope:nickname_root_scope - attacker_war_score <= -50 - } - NOT = { exists = scope:had_nick_the_rash } - } - modifier = { - calc_true_if = { - amount >= 2 - has_trait = wrathful - has_trait = irritable - has_trait = impatient - } - factor = 2 - } - give_nickname = nick_the_rash - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_rash } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_trait = arrogant - OR = { - has_trait = wrathful - has_trait = irritable - has_trait = impatient - } - is_at_war_as_attacker = yes - NOT = { exists = scope:had_nick_the_hotspur } - } - modifier = { - calc_true_if = { - amount >= 2 - has_trait = wrathful - has_trait = irritable - has_trait = impatient - } - factor = 2 - } - give_nickname = nick_the_hotspur - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_hotspur } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - OR = { - has_trait = deceitful - has_trait = arbitrary - has_trait = ambitious - has_trait = callous - has_trait = sadistic - has_trait = disloyal - } - any_killed_character = { - is_close_family_of = scope:nickname_root_scope - } - NOT = { exists = scope:had_nick_the_traitor } - } - modifier = { - is_at_war_with_liege = yes - factor = 2 - } - give_nickname = nick_the_traitor - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_traitor } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_personality_malicious_trigger = yes - any_killed_character = { - count >= 10 - death_reason = death_execution - } - NOT = { exists = scope:had_nick_the_executioner } - } - give_nickname = nick_the_executioner - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_executioner } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - prestige_level >= 5 - piety_level >= 3 - realm_size >= 30 - top_liege = this - NOT = { exists = scope:had_nick_the_great } - } - modifier = { - has_trait = conqueror - factor = 20 - } - modifier = { - piety_level >= 5 - factor = 2 - } - give_nickname = nick_the_great - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_great } - trigger_event = lifestyle_nicknames.1000 - } - 50 = { - trigger = { - religion = religion:christianity_religion - has_trait = faith_warrior - NOT = { exists = scope:had_nick_the_crusader } - } - modifier = { - has_education_martial_trigger = yes - factor = 4 - } - give_nickname = nick_the_crusader - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_crusader } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - martial >= 16 - is_at_war = yes - any_character_war = { - primary_attacker = { - this = scope:nickname_root_scope - current_military_strength >= prev.primary_defender.current_military_strength - } - attacker_war_score >= 50 - } - ai_boldness >= 50 - NOT = { exists = scope:had_nick_the_hammer } - } - modifier = { - has_trait = conqueror - factor = 10 - } - modifier = { - ai_boldness >= 100 - factor = 2 - } - give_nickname = nick_the_hammer - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_hammer } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_trait = brave - is_in_army = yes - martial >= 12 - prowess >= 12 - has_trait_submissive_trigger = no - NOT = { exists = scope:had_nick_the_lionheart } - } - modifier = { - martial >= 16 - prowess >= 16 - factor = 2 - } - modifier = { - has_trait = conqueror - factor = 10 - } - give_nickname = nick_the_lionheart - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_lionheart } - trigger_event = lifestyle_nicknames.1000 - } - 50 = { - trigger = { - learning >= 20 - has_personality_dominant_trigger = yes - has_personality_extroverted_trigger = yes - NOT = { exists = scope:had_nick_the_turbulent } - } - modifier = { - is_clergy = yes - factor = 2 - } - give_nickname = nick_the_turbulent - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_turbulent } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_trait = witch - NOT = { faith = { has_doctrine = doctrine_witchcraft_accepted } } - NOT = { exists = scope:had_nick_the_witch } - } - modifier = { - piety_level <= 1 - factor = 2 - } - give_nickname = nick_the_witch - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_witch } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - piety_level <= 0 - ai_rationality <= -50 - NOT = { exists = scope:had_nick_the_bewitched } - } - give_nickname = nick_the_bewitched - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_bewitched } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_trait = drunkard - prestige_level <= 2 - NOT = { exists = scope:had_nick_the_drunkard } - } - modifier = { - prestige_level <= 1 - factor = 2 - } - give_nickname = nick_the_drunkard - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_drunkard } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_trait = drunkard - prestige_level <= 2 - faith = faith:norse_pagan - NOT = { exists = scope:had_nick_ale_lover } - } - modifier = { - prestige_level <= 1 - factor = 2 - } - give_nickname = nick_ale_lover - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_ale_lover } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - culture = { has_cultural_tradition = tradition_seafaring } - location = { is_sea_province = yes } - NOT = { exists = scope:had_nick_the_navigator } - } - modifier = { - prestige_level >= 1 - factor = 2 - } - give_nickname = nick_the_navigator - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_navigator } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_trait = lifestyle_poet - has_trait = gregarious - NOT = { exists = scope:had_nick_the_troubadour } - } - modifier = { - has_trait_extroverted_trigger = yes - factor = 2 - } - give_nickname = nick_the_troubadour - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_troubadour } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - OR = { - has_trait = greedy - has_trait = avaricious - has_trait = gluttonous - } - ai_greed >= 50 - gold >= 200 - NOT = { exists = scope:had_nick_the_greedy } - } - modifier = { - has_trait = greedy - factor = 2 - } - give_nickname = nick_the_greedy - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_greedy } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - culture = culture:anglo_saxon - is_male = yes - OR = { - has_trait = greedy - has_trait = avaricious - has_trait = gluttonous - } - ai_greed >= 50 - gold >= 200 - NOT = { exists = scope:had_nick_pennyfather } - } - modifier = { - has_trait = greedy - factor = 2 - } - give_nickname = nick_pennyfather - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_pennyfather } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - OR = { - has_trait = comfort_eater - has_trait = gluttonous - } - has_personality_introverted_trigger = no - faith = faith:norse_pagan - NOT = { exists = scope:had_nick_foul_fart } - } - modifier = { - has_personality_extroverted_trigger = yes - factor = 2 - } - give_nickname = nick_foul_fart - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_foul_fart } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_personality_submissive_trigger = yes - has_personality_introverted_trigger = yes - is_at_war = no - NOT = { exists = scope:had_nick_the_timid } - } - modifier = { - has_trait = craven - factor = 2 - } - give_nickname = nick_the_timid - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_timid } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - prestige_level >= 1 - any_powerful_vassal = { - count >= 5 - } - any_powerful_vassal = { - count = all - opinion = { - target = scope:nickname_root_scope - value >= 25 - } - } - NOT = { exists = scope:had_nick_the_worthy } - } - modifier = { - prestige_level >= 3 - factor = 2 - } - give_nickname = nick_the_worthy - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_worthy } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - any_powerful_vassal = { - count >= 5 - } - any_powerful_vassal = { - count = all - opinion = { - target = scope:nickname_root_scope - value <= -25 - } - } - NOT = { exists = scope:had_nick_the_unworthy } - } - modifier = { - prestige_level <= 0 - factor = 2 - } - give_nickname = nick_the_unworthy - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_unworthy } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - NOT = { exists = scope:had_nick_the_unfaithful } - any_relation = { type = lover } - any_child = { - OR = { - has_trait = bastard - has_trait = legitimized_bastard - } - } - exists = primary_spouse - exposed_cheating_on_spouse_trigger = { SPOUSE = primary_spouse } - } - give_nickname = nick_the_unfaithful - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_unfaithful } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - is_male = yes - any_child = { - count >= 5 - mother ?= { - is_married = yes - NOT = { - is_consort_of = scope:nickname_root_scope - } - } - } - any_child = { - count = all - mother ?= { - is_married = yes - NOT = { - is_consort_of = scope:nickname_root_scope - } - add_to_temporary_list = cuckoo - } - } - any_in_list = { - list = cuckoo - count >= 5 - } - NOT = { exists = scope:had_nick_cuckoo } - } - give_nickname = nick_cuckoo - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_cuckoo } - trigger_event = lifestyle_nicknames.1000 - } - 50 = { - trigger = { - is_male = yes - culture = culture:anglo_saxon - any_child = { - count >= 10 - } - NOT = { exists = scope:had_nick_aurei_testiculi } - } - give_nickname = nick_aurei_testiculi - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_aurei_testiculi } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - NOT = { exists = scope:had_nick_the_unchaste } - any_relation = { type = lover } - any_child = { - OR = { - has_trait = bastard - has_trait = legitimized_bastard - } - } - exists = primary_spouse - exposed_cheating_on_spouse_trigger = { SPOUSE = primary_spouse } - } - give_nickname = nick_the_unchaste - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_unchaste } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - num_of_relation_lover >= 3 - NOT = { exists = scope:had_nick_the_beguiling } - } - modifier = { - OR = { - has_trait = beauty_good - has_trait = seducer - has_trait = rakish - } - factor = 2 - } - give_nickname = nick_the_beguiling - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_beguiling } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - is_female = yes - any_relation = { type = lover } - OR = { - has_trait = lustful - has_trait = beauty_good - attraction >= 50 - } - NOT = { exists = scope:had_nick_the_temptress } - } - modifier = { - num_of_relation_lover >= 2 - factor = 2 - } - give_nickname = nick_the_temptress - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_temptress } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - is_female = yes - any_relation = { type = lover } - attraction >= 50 - OR = { - has_trait = seducer - has_focus = intrigue_temptation_focus - } - NOT = { exists = scope:had_nick_the_seductress } - } - modifier = { - num_of_relation_lover >= 2 - factor = 2 - } - give_nickname = nick_the_seductress - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_seductress } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_trait = lustful - OR = { - has_trait = lovers_pox - has_trait = early_great_pox - has_trait = great_pox - has_trait = deviant - } - NOT = { exists = scope:had_nick_the_lewd } - } - modifier = { - any_relation = { type = lover } - factor = 2 - } - give_nickname = nick_the_lewd - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_lewd } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - is_male = yes - any_relation = { type = lover } - OR = { - has_trait = lustful - has_trait = beauty_good - attraction >= 50 - } - NOT = { exists = scope:had_nick_the_lecher } - } - modifier = { - num_of_relation_lover >= 2 - factor = 2 - } - give_nickname = nick_the_lecher - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_lecher } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - is_male = yes - any_relation = { type = lover } - attraction >= 50 - OR = { - has_trait = seducer - has_focus = intrigue_temptation_focus - } - NOT = { exists = scope:had_nick_the_seducer } - } - modifier = { - num_of_relation_lover >= 2 - factor = 2 - } - give_nickname = nick_the_seducer - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_seducer } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_trait = deceitful - intrigue >= 16 - NOT = { exists = scope:had_nick_the_trickster } - } - modifier = { - intrigue >= 20 - factor = 2 - } - give_nickname = nick_the_trickster - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_trickster } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - intrigue >= 10 - martial >= 10 - ai_boldness >= 25 - ai_rationality >= 50 - ai_honor < 0 - NOT = { exists = scope:had_nick_the_fox } - } - modifier = { - stewardship >= 10 - factor = 2 - } - give_nickname = nick_the_fox - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_fox } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - diplomacy >= 10 - intrigue >= 10 - learning >= 10 - martial >= 10 - stewardship >= 10 - ai_rationality >= 25 - NOT = { exists = scope:had_nick_the_shrewd } - } - modifier = { - prestige_level >= 3 - factor = 2 - } - give_nickname = nick_the_shrewd - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_shrewd } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_personality_benevolent_trigger = yes - has_personality_emotional_trigger = yes - prestige_level >= 2 - piety_level >= 2 - NOT = { exists = scope:had_nick_the_gracious } - } - modifier = { - prestige_level >= 3 - piety_level >= 3 - factor = 2 - } - give_nickname = nick_the_gracious - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_gracious } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - ai_rationality <= -25 - has_personality_emotional_trigger = yes - has_personality_extroverted_trigger = yes - prestige_level <= 1 - NOT = { exists = scope:had_nick_the_silly } - } - modifier = { - ai_rationality <= -75 - factor = 2 - } - give_nickname = nick_the_silly - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_silly } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_personality_benevolent_trigger = yes - has_personality_extroverted_trigger = yes - has_personality_levelheaded_trigger = yes - NOT = { exists = scope:had_nick_the_affable } - } - modifier = { - ai_compassion >= 100 - factor = 2 - } - give_nickname = nick_the_affable - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_affable } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_trait = lifestyle_poet - has_trait = gregarious - NOT = { exists = scope:had_nick_the_bard } - } - modifier = { - has_trait_extroverted_trigger = yes - factor = 2 - } - give_nickname = nick_the_bard - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_bard } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_personality_benevolent_trigger = yes - OR = { - has_trait = generous - has_trait = improvident - } - tyranny <= 0 - prestige_level >= 2 - NOT = { exists = scope:had_nick_the_generous } - } - modifier = { - prestige_level >= 3 - factor = 2 - } - give_nickname = nick_the_generous - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_generous } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - ai_greed <= 0 - ai_honor >= 100 - tyranny <= 0 - prestige_level >= 2 - NOT = { exists = scope:had_nick_the_just } - } - modifier = { - prestige_level >= 3 - factor = 2 - } - give_nickname = nick_the_just - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_just } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - gold >= 1000 - ai_greed >= 100 - NOT = { exists = scope:had_nick_moneybags } - } - modifier = { - gold >= 3000 - factor = 2 - } - give_nickname = nick_moneybags - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_moneybags } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_trait = lifestyle_poet - diplomacy >= 10 - NOT = { exists = scope:had_nick_the_poet } - } - modifier = { - prestige_level >= 2 - factor = 2 - } - give_nickname = nick_the_poet - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_poet } - trigger_event = lifestyle_nicknames.1000 - } - 500 = { - trigger = { - has_personality_dominant_trigger = yes - is_at_war = yes - any_character_war = { - primary_defender = scope:nickname_root_scope - defender_war_score >= 50 - } - prestige_level >= 2 - NOT = { exists = scope:had_nick_the_ironside } - } - modifier = { - has_trait = unyielding_defender - factor = 2 - } - give_nickname = nick_the_ironside - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_ironside } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_personality_malicious_trigger = yes - has_education_martial_trigger = yes - ai_boldness >= 50 - any_killed_character = { - count >= 1 - always = yes - } - NOT = { exists = scope:had_nick_the_ruthless } - } - modifier = { - any_killed_character = { - count >= 3 - always = yes - } - factor = 2 - } - give_nickname = nick_the_ruthless - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_ruthless } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - NOT = { exists = scope:had_nick_the_brute } - has_personality_dominant_trigger = yes - has_personality_malicious_trigger = yes - prowess >= 16 - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:nickname_root_scope } - } - give_nickname = nick_the_brute - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_brute } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - NOT = { exists = scope:had_nick_the_berserker } - has_trait = berserker - prowess >= 16 - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:nickname_root_scope } - } - give_nickname = nick_the_berserker - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_berserker } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - NOT = { exists = scope:had_nick_the_bear } - is_male = yes - has_personality_dominant_trigger = yes - has_personality_extroverted_trigger = yes - prowess >= 12 - martial >= 12 - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:nickname_root_scope } - } - give_nickname = nick_the_bear - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_bear } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - is_male = yes - ai_boldness >= 50 - OR = { - has_trait = brave - has_trait = strong - has_trait = physique_good - } - has_education_martial_trigger = yes - NOT = { exists = scope:had_nick_the_lion } - } - give_nickname = nick_the_lion - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_lion } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - martial >= 10 - intrigue >= 10 - OR = { - has_trait = shrewd - has_trait = intellect_good - has_trait = lifestyle_hunter - } - NOT = { exists = scope:had_nick_the_wolf } - } - modifier = { - prestige_level >= 3 - factor = 2 - } - give_nickname = nick_the_wolf - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_wolf } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_personality_extroverted_trigger = yes - ai_boldness >= 100 - prestige_level >= 2 - NOT = { exists = scope:had_nick_the_bold } - } - give_nickname = nick_the_bold - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_bold } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - NOT = { exists = scope:had_nick_the_brave } - has_trait = brave - has_personality_dominant_trigger = yes - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:nickname_root_scope } - } - modifier = { - prestige_level >= 3 - factor = 2 - } - give_nickname = nick_the_brave - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_brave } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_trait_xp = { - trait = lifestyle_hunter - track = hunter - value >= trait_second_level - } - NOT = { exists = scope:had_nick_the_hunter } - } - modifier = { - has_trait_xp = { - trait = lifestyle_hunter - track = hunter - value >= trait_third_level - } - factor = 2 - } - give_nickname = nick_the_hunter - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_hunter } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - ai_boldness >= 100 - has_personality_dominant_trigger = yes - has_personality_introverted_trigger = yes - NOT = { exists = scope:had_nick_the_fearless } - } - modifier = { - stress <= 0 - factor = 2 - } - give_nickname = nick_the_fearless - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_fearless } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_trait_xp = { - trait = lifestyle_hunter - track = falconer - value >= trait_second_level - } - NOT = { exists = scope:had_nick_the_fowler } - } - modifier = { - has_trait_xp = { - trait = lifestyle_hunter - track = falconer - value >= trait_third_level - } - factor = 2 - } - give_nickname = nick_the_fowler - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_fowler } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - OR = { - has_trait = sadistic - has_trait = torturer - has_trait = murderer - } - any_killed_character = { - count >= 3 - always = yes - } - NOT = { exists = scope:had_nick_the_butcher } - } - modifier = { - any_killed_character = { - count >= 5 - always = yes - } - factor = 2 - } - give_nickname = nick_the_butcher - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_butcher } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - OR = { - has_trait = lifestyle_blademaster - is_knight = yes - is_in_army = yes - } - any_killed_character = { - count >= 3 - always = yes - } - NOT = { exists = scope:had_nick_the_bloody } - } - modifier = { - any_killed_character = { - count >= 5 - always = yes - } - factor = 2 - } - give_nickname = nick_the_bloody - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_bloody } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - intrigue >= 10 - prowess >= 12 - martial >= 12 - has_education_martial_trigger = yes - NOT = { exists = scope:had_nick_the_hawk } - } - modifier = { - intrigue >= 16 - factor = 2 - } - give_nickname = nick_the_hawk - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_hawk } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - OR = { - has_trait = intellect_good - has_trait = shrewd - has_trait = theologian - has_trait = scholar - learning >= 16 - } - has_personality_introverted_trigger = yes - has_personality_levelheaded_trigger = yes - prestige_level >= 1 - NOT = { exists = scope:had_nick_the_wise } - } - modifier = { - prestige_level >= 3 - factor = 2 - } - give_nickname = nick_the_wise - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_wise } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_personality_submissive_trigger = yes - learning >= 16 - num_of_relation_ward >= 2 - NOT = { exists = scope:had_nick_the_sage } - } - give_nickname = nick_the_sage - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_sage } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - OR = { - has_trait = shy - has_trait = reclusive - has_trait = content - } - has_personality_introverted_trigger = yes - has_personality_submissive_trigger = yes - NOT = { exists = scope:had_nick_the_silent } - } - give_nickname = nick_the_silent - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_silent } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_personality_malicious_trigger = yes - has_personality_emotional_trigger = yes - OR = { - has_trait = deviant - has_trait = cannibal - has_trait = lustful - has_trait = sadistic - } - NOT = { exists = scope:had_nick_the_depraved } - } - give_nickname = nick_the_depraved - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_depraved } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_personality_malicious_trigger = yes - OR = { - any_prisoner = { - count >= 2 - always = yes - } - tyranny > 0 - dread >= 75 - } - NOT = { exists = scope:had_nick_the_cruel } - } - give_nickname = nick_the_cruel - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_cruel } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_personality_malicious_trigger = yes - OR = { - has_trait = giant - has_trait = beauty_bad_2 - has_trait = beauty_bad_3 - has_trait = scaly - } - OR = { - tyranny > 0 - dread >= 75 - } - NOT = { exists = scope:had_nick_the_abominable } - } - give_nickname = nick_the_abominable - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_abominable } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - OR = { - piety_level <= 0 - has_trait = excommunicated - } - OR = { - has_personality_malicious_trigger = yes - num_sinful_traits >= 1 - } - NOT = { exists = scope:had_nick_the_wicked } - } - modifier = { - num_sinful_traits >= 2 - factor = 2 - } - give_nickname = nick_the_wicked - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_wicked } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - OR = { - piety_level <= 0 - has_trait = excommunicated - } - OR = { - has_personality_malicious_trigger = yes - num_sinful_traits >= 1 - } - NOT = { exists = scope:had_nick_the_accursed } - } - modifier = { - num_sinful_traits >= 2 - factor = 2 - } - give_nickname = nick_the_accursed - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_accursed } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - exists = cp:councillor_court_chaplain - opinion = { - target = cp:councillor_court_chaplain - value <= -30 - } - OR = { - num_sinful_traits >= 1 - piety_level <= 0 - } - NOT = { exists = scope:had_nick_priest_hater } - } - modifier = { - num_sinful_traits >= 2 - factor = 2 - } - give_nickname = nick_priest_hater - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_priest_hater } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - ai_zeal >= 25 - top_liege != this - NOR = { - religion = liege.religion - faith = { has_doctrine = doctrine_pluralism_pluralistic } - } - NOT = { exists = scope:had_nick_the_heathen } - } - give_nickname = nick_the_heathen - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_heathen } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - faith.religion = { is_in_family = rf_abrahamic } - OR = { - num_sinful_traits >= 2 - piety_level <= 0 - has_trait = excommunicated - } - has_personality_malicious_trigger = yes - NOT = { exists = scope:had_nick_the_devil } - } - modifier = { - num_sinful_traits >= 3 - factor = 2 - } - give_nickname = nick_the_devil - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_devil } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - faith.religion = { is_in_family = rf_abrahamic } - OR = { - num_sinful_traits >= 2 - piety_level <= 0 - has_trait = excommunicated - } - has_personality_dominant_trigger = yes - NOT = { exists = scope:had_nick_the_black } - } - give_nickname = nick_the_black - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_black } - trigger_event = lifestyle_nicknames.1000 - } - 200 = { - trigger = { - piety_level >= 4 - has_personality_submissive_trigger = yes - num_sinful_traits <= 0 - NOT = { exists = scope:had_nick_the_pious } - } - modifier = { - piety_level >= 5 - factor = 2 - } - give_nickname = nick_the_pious - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_pious } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - piety_level >= 3 - has_trait = humble - num_sinful_traits <= 0 - ai_boldness < 0 - NOT = { exists = scope:had_nick_the_humble } - } - modifier = { - piety_level >= 4 - factor = 2 - } - give_nickname = nick_the_humble - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_humble } - trigger_event = lifestyle_nicknames.1000 - } - 200 = { - trigger = { - faith.religion = { is_in_family = rf_abrahamic } - piety_level >= 4 - has_personality_extroverted_trigger = yes - num_sinful_traits <= 0 - NOT = { exists = scope:had_nick_the_blessed } - } - modifier = { - piety_level >= 5 - factor = 2 - } - give_nickname = nick_the_blessed - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_blessed } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - faith.religion = { is_in_family = rf_abrahamic } - piety_level >= 3 - has_trait = theologian - has_trait_extroverted_trigger = no - num_sinful_traits <= 0 - NOT = { exists = scope:had_nick_the_theologian } - } - modifier = { - piety_level >= 4 - factor = 2 - } - give_nickname = nick_the_theologian - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_theologian } - trigger_event = lifestyle_nicknames.1000 - } - 200 = { - trigger = { - religion = { is_in_family = rf_eastern } - piety_level >= 4 - has_personality_extroverted_trigger = yes - num_sinful_traits <= 0 - NOT = { exists = scope:had_nick_the_enlightened } - } - modifier = { - piety_level >= 5 - factor = 2 - } - give_nickname = nick_the_enlightened - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_enlightened } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - OR = { - num_virtuous_traits >= 2 - piety_level >= 4 - } - has_personality_introverted_trigger = yes - num_sinful_traits <= 0 - NOT = { exists = scope:had_nick_the_holy } - } - modifier = { - piety_level >= 5 - factor = 2 - } - give_nickname = nick_the_holy - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_holy } - trigger_event = lifestyle_nicknames.1000 - } - 200 = { - trigger = { - faith.religion = { is_in_family = rf_abrahamic } - OR = { - num_virtuous_traits >= 2 - piety_level >= 4 - } - has_personality_submissive_trigger = yes - has_personality_extroverted_trigger = yes - num_sinful_traits <= 0 - NOT = { exists = scope:had_nick_the_confessor } - } - modifier = { - top_liege = this - factor = 2 - } - give_nickname = nick_the_confessor - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_confessor } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - OR = { - is_married = no - can_have_children = no - } - OR = { - has_trait = chaste - has_trait = celibate - } - NOT = { exists = scope:had_nick_the_chaste } - } - give_nickname = nick_the_chaste - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_chaste } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - is_male = yes - faith = { has_doctrine = doctrine_theocracy_temporal } - has_personality_levelheaded_trigger = yes - has_personality_introverted_trigger = yes - has_personality_submissive_trigger = yes - piety_level >= 2 - num_sinful_traits <= 0 - NOT = { exists = scope:had_nick_the_monk } - } - give_nickname = nick_the_monk - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_monk } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - piety_level >= 2 - has_trait_xp = { - trait = pilgrim - value >= trait_second_level - } - NOT = { exists = scope:had_nick_the_pilgrim } - } - modifier = { - has_trait_xp = { - trait = pilgrim - value >= trait_third_level - } - factor = 2 - } - give_nickname = nick_the_pilgrim - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_pilgrim } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_trait = diligent - has_trait = ambitious - is_at_war = no - NOT = { exists = scope:had_nick_the_able } - } - modifier = { - prestige_level >= 3 - factor = 2 - } - give_nickname = nick_the_able - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_able } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - ai_compassion >= 100 - has_personality_benevolent_trigger = yes - has_personality_emotional_trigger = yes - NOR = { - any_prisoner = { - count >= 1 - always = yes - } - any_killed_character = { - count >= 1 - always = yes - } - } - NOT = { exists = scope:had_nick_the_compassionate } - } - give_nickname = nick_the_compassionate - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_compassionate } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_personality_levelheaded_trigger = yes - ai_honor >= 75 - ai_greed <= 0 - NOT = { exists = scope:had_nick_the_noble } - } - modifier = { - prestige_level >= 2 - factor = 2 - } - give_nickname = nick_the_noble - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_noble } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - ai_boldness <= 0 - has_personality_emotional_trigger = yes - has_personality_benevolent_trigger = yes - NOT = { exists = scope:had_nick_the_gentle } - } - give_nickname = nick_the_gentle - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_gentle } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_personality_benevolent_trigger = yes - prestige_level >= 3 - tyranny <= 0 - NOT = { exists = scope:had_nick_the_good } - } - modifier = { - prestige_level >= 2 - factor = 2 - } - give_nickname = nick_the_good - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_good } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - ai_compassion >= 75 - has_personality_benevolent_trigger = yes - has_personality_extroverted_trigger = yes - NOT = { exists = scope:had_nick_the_kind } - } - give_nickname = nick_the_kind - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_kind } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_personality_extroverted_trigger = yes - OR = { - loves_food_trigger = yes - has_trait = lifestyle_reveler - } - has_trait_malicious_trigger = no - NOT = { exists = scope:had_nick_the_merry } - } - give_nickname = nick_the_merry - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_merry } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - ai_honor >= 100 - has_personality_levelheaded_trigger = yes - has_personality_benevolent_trigger = yes - NOT = { exists = scope:had_nick_the_honorable } - } - give_nickname = nick_the_honorable - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_honorable } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_trait = loyal - untrustworthy_trigger = no - NOT = { exists = scope:had_nick_the_loyal } - } - give_nickname = nick_the_loyal - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_loyal } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_trait = honest - has_trait_malicious_trigger = no - NOT = { exists = scope:had_nick_the_honest } - } - give_nickname = nick_the_honest - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_honest } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - OR = { - has_personality_malicious_trigger = yes - tyranny >= 50 - dread >= 75 - } - tyranny >= 10 - NOT = { exists = scope:had_nick_the_terrible } - } - modifier = { - tyranny >= 50 - factor = 2 - } - give_nickname = nick_the_terrible - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_terrible } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - OR = { - has_personality_dominant_trigger = yes - tyranny >= 50 - } - tyranny >= 10 - NOT = { exists = scope:had_nick_the_tyrant } - } - modifier = { - tyranny >= 30 - factor = 2 - } - give_nickname = nick_the_tyrant - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_tyrant } - trigger_event = lifestyle_nicknames.1000 - } - 50 = { - trigger = { - age >= 60 - NOT = { exists = scope:had_nick_the_old } - } - modifier = { - age >= 80 - factor = 5 - } - give_nickname = nick_the_old - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_old } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - OR = { - has_trait = shy - has_trait = reclusive - } - has_personality_introverted_trigger = yes - has_trait_dominant_trigger = no - NOT = { exists = scope:had_nick_the_shy } - } - modifier = { - has_personality_submissive_trigger = yes - factor = 2 - } - give_nickname = nick_the_shy - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_shy } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - prestige_level >= 4 - age <= 23 - NOT = { exists = scope:had_nick_the_young } - } - modifier = { - prestige_level >= 5 - factor = 2 - } - give_nickname = nick_the_young - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_young } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - is_male = yes - OR = { - has_trait = bastard - has_trait = legitimized_bastard - has_trait = bastard_founder - } - NOT = { exists = scope:had_nick_the_bastard } - } - modifier = { - prestige_level <= 1 - factor = 2 - } - give_nickname = nick_the_bastard - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_bastard } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - ai_boldness >= 50 - has_personality_extroverted_trigger = yes - has_personality_dominant_trigger = yes - prestige_level >= 1 - NOT = { exists = scope:had_nick_the_proud } - } - modifier = { - prestige_level >= 2 - factor = 2 - } - give_nickname = nick_the_proud - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_proud } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - NOT = { exists = scope:had_nick_the_strong } - OR = { - has_trait = strong - has_trait = physique_good - } - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:nickname_root_scope } - } - modifier = { - OR = { - has_trait = physique_good_2 - has_trait = physique_good_3 - } - factor = 2 - } - give_nickname = nick_the_strong - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_strong } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - is_male = yes - has_conventionally_attractive_trigger = yes - NOR = { - has_trait = disfigured - has_trait = leper - has_trait = scaly - has_trait = beauty_bad - } - NOT = { exists = scope:had_nick_the_handsome } - } - modifier = { - OR = { - has_trait = beauty_good_2 - has_trait = beauty_good_3 - } - factor = 2 - } - give_nickname = nick_the_handsome - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_handsome } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - is_female = yes - has_conventionally_attractive_trigger = yes - age <= 40 - NOR = { - has_trait = disfigured - has_trait = leper - has_trait = scaly - has_trait = beauty_bad - } - NOT = { exists = scope:had_nick_the_fair } - } - modifier = { - OR = { - has_trait = beauty_good_2 - has_trait = beauty_good_3 - } - factor = 2 - } - give_nickname = nick_the_fair - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_fair } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - culture = culture:anglo_saxon - is_female = yes - has_conventionally_attractive_trigger = yes - age <= 40 - NOR = { - has_trait = disfigured - has_trait = leper - has_trait = scaly - has_trait = beauty_bad - } - NOT = { exists = scope:had_nick_swan_neck } - } - modifier = { - OR = { - has_trait = beauty_good_2 - has_trait = beauty_good_3 - } - factor = 2 - } - give_nickname = nick_swan_neck - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_swan_neck } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - OR = { - has_conventionally_attractive_trigger = yes - has_trait = lustful - } - NOR = { - has_trait = disfigured - has_trait = leper - has_trait = scaly - has_trait = beauty_bad - } - any_targeting_scheme = { - OR = { - scheme_type = seduce - scheme_type = courting - } - } - NOT = { exists = scope:had_nick_the_desired } - } - modifier = { - OR = { - has_trait = beauty_good_2 - has_trait = beauty_good_3 - } - factor = 2 - } - give_nickname = nick_the_desired - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_desired } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_trait = beauty_good - age <= 40 - NOR = { - has_trait = disfigured - has_trait = leper - has_trait = scaly - has_trait = beauty_bad - } - NOT = { exists = scope:had_nick_the_beautiful } - } - modifier = { - OR = { - has_trait = beauty_good_2 - has_trait = beauty_good_3 - } - factor = 2 - } - give_nickname = nick_the_beautiful - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_beautiful } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_trait = giant - NOT = { exists = scope:had_nick_the_giant } - } - give_nickname = nick_the_giant - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_giant } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - prowess >= 10 - current_weight >= 50 - OR = { - loves_food_trigger = yes - has_trait = lifestyle_reveler - } - NOT = { exists = scope:had_nick_the_girthy } - } - modifier = { - current_weight >= 75 - factor = 2 - } - give_nickname = nick_the_girthy - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_girthy } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - OR = { - ai_rationality <= -75 - has_trait = lunatic - has_trait = possessed - AND = { - tyranny >= 50 - has_personality_emotional_trigger = yes - has_personality_malicious_trigger = yes - } - } - NOT = { exists = scope:had_nick_the_mad } - } - give_nickname = nick_the_mad - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_mad } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - probably_unintelligent_trigger = yes - NOT = { exists = scope:had_nick_the_simple } - } - give_nickname = nick_the_simple - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_simple } - trigger_event = lifestyle_nicknames.1000 - } - 500 = { - trigger = { - has_trait = leper - NOT = { exists = scope:had_nick_the_leper } - } - give_nickname = nick_the_leper - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_leper } - trigger_event = lifestyle_nicknames.1000 - } - 300 = { - trigger = { - has_trait = maimed - NOT = { exists = scope:had_nick_half_hand } - } - give_nickname = nick_half_hand - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_half_hand } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - OR = { - has_trait = beauty_bad - has_trait = hunchbacked - has_trait = scaly - has_trait = disfigured - has_trait = inbred - scarred_trait_activation_3 = yes - } - NOT = { - has_trait = beauty_good - } - NOT = { exists = scope:had_nick_the_hideous } - } - modifier = { - OR = { - has_trait = beauty_bad_2 - has_trait = beauty_bad_3 - } - factor = 2 - } - give_nickname = nick_the_hideous - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_hideous } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - OR = { - has_trait = beauty_bad - has_trait = hunchbacked - has_trait = scaly - has_trait = inbred - } - NOT = { - has_trait = beauty_good - } - NOT = { exists = scope:had_nick_the_frog } - } - modifier = { - OR = { - has_trait = beauty_bad_2 - has_trait = beauty_bad_3 - } - factor = 2 - } - give_nickname = nick_the_frog - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_frog } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - OR = { - has_trait = beauty_bad - has_trait = hunchbacked - has_trait = scaly - has_trait = inbred - scarred_trait_activation_3 = yes - } - NOT = { - has_trait = beauty_good - } - NOT = { exists = scope:had_nick_the_repulsive } - } - modifier = { - OR = { - has_trait = beauty_bad_2 - has_trait = beauty_bad_3 - } - factor = 2 - } - give_nickname = nick_the_repulsive - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_repulsive } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - OR = { - has_trait = infirm - has_trait = weak - has_trait = spindly - has_trait = physique_bad - has_trait = bleeder - has_trait = inbred - } - NOT = { - has_trait = physique_good - } - NOT = { exists = scope:had_nick_the_frail } - } - modifier = { - OR = { - has_trait = physique_bad_2 - has_trait = physique_bad_3 - } - factor = 2 - } - give_nickname = nick_the_frail - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_frail } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - prowess < 8 - OR = { - has_trait = infirm - has_trait = spindly - has_trait = weak - has_trait = physique_bad - has_trait = bleeder - has_trait = inbred - } - NOT = { - has_trait = physique_good - } - NOT = { exists = scope:had_nick_the_weak } - } - modifier = { - OR = { - has_trait = physique_bad_2 - has_trait = physique_bad_3 - } - factor = 2 - } - give_nickname = nick_the_weak - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_weak } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - OR = { - has_trait = clubfooted - has_trait = weak - has_trait = spindly - has_trait = physique_bad - } - NOT = { - has_trait = physique_good - } - NOT = { exists = scope:had_nick_the_lame } - } - modifier = { - has_trait = clubfooted - factor = 2 - } - give_nickname = nick_the_lame - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_lame } - trigger_event = lifestyle_nicknames.1000 - } - 1000 = { - trigger = { - has_trait = lisping - has_trait = clubfooted - NOT = { exists = scope:had_nick_the_lisp_and_lame } - } - give_nickname = nick_the_lisp_and_lame - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_lisp_and_lame } - trigger_event = lifestyle_nicknames.1000 - } - 300 = { - trigger = { - has_trait = hunchbacked - NOT = { exists = scope:had_nick_the_hunchback } - } - give_nickname = nick_the_hunchback - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_hunchback } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - current_weight >= 50 - OR = { - loves_food_trigger = yes - has_trait = lifestyle_reveler - } - NOT = { exists = scope:had_nick_the_fat } - } - modifier = { - current_weight >= 75 - factor = 2 - } - give_nickname = nick_the_fat - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_fat } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - culture = culture:anglo_saxon - current_weight >= 50 - OR = { - loves_food_trigger = yes - has_trait = lifestyle_reveler - } - NOT = { exists = scope:had_nick_chubbycheeks } - } - modifier = { - current_weight >= 75 - factor = 2 - } - give_nickname = nick_chubbycheeks - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_chubbycheeks } - trigger_event = lifestyle_nicknames.1000 - } - 50 = { - trigger = { - current_weight >= 50 - OR = { - loves_food_trigger = yes - has_trait = lifestyle_reveler - } - diplomacy <= 2 - NOT = { exists = scope:had_nick_the_slobberer } - } - modifier = { - current_weight >= 75 - factor = 2 - } - give_nickname = nick_the_slobberer - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_slobberer } - trigger_event = lifestyle_nicknames.1000 - } - 50 = { - trigger = { - current_weight >= 50 - OR = { - loves_food_trigger = yes - has_trait = lifestyle_reveler - } - NOT = { exists = scope:had_nick_the_rotund } - } - modifier = { - current_weight >= 75 - factor = 2 - } - give_nickname = nick_the_rotund - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_rotund } - trigger_event = lifestyle_nicknames.1000 - } - 25 = { - trigger = { - current_weight >= 50 - OR = { - loves_food_trigger = yes - has_trait = lifestyle_reveler - } - NOT = { exists = scope:had_nick_the_plump } - } - modifier = { - current_weight >= 75 - factor = 2 - } - give_nickname = nick_the_plump - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_plump } - trigger_event = lifestyle_nicknames.1000 - } - 200 = { - trigger = { - has_trait = blind - NOT = { exists = scope:had_nick_the_blind } - } - give_nickname = nick_the_blind - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_blind } - trigger_event = lifestyle_nicknames.1000 - } - 200 = { - trigger = { - has_trait = stuttering - NOT = { exists = scope:had_nick_the_stammerer } - } - give_nickname = nick_the_stammerer - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_stammerer } - trigger_event = lifestyle_nicknames.1000 - } - 200 = { - trigger = { - has_trait = gout_ridden - NOT = { exists = scope:had_nick_the_gouty } - } - give_nickname = nick_the_gouty - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_gouty } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - OR = { - has_trait = consumption - has_trait = cancer - has_trait = pneumonic - has_trait = typhus - has_trait = smallpox - has_trait = measles - has_trait = dysentery - has_trait = ergotism - has_trait = bubonic_plague - } - prestige_level <= 1 - NOT = { exists = scope:had_nick_the_diseased } - } - give_nickname = nick_the_diseased - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_diseased } - trigger_event = lifestyle_nicknames.1000 - } - 25 = { - trigger = { - dynasty ?= { dynasty_prestige_level >= 5 } - prestige_level <= 1 - NOT = { exists = scope:had_nick_the_disgraceful } - } - give_nickname = nick_the_disgraceful - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_disgraceful } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - NOT = { exists = scope:had_nick_bad_hand } - has_trait = maimed - AND = { - has_trait = scarred - prowess < 8 - } - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:nickname_root_scope } - } - give_nickname = nick_bad_hand - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_bad_hand } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_trait = one_eyed - NOT = { exists = scope:had_nick_the_one_eyed } - } - give_nickname = nick_the_one_eyed - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_one_eyed } - trigger_event = lifestyle_nicknames.1000 - } - 50 = { - trigger = { - has_trait = craven - prestige_level <= 2 - has_personality_submissive_trigger = yes - NOT = { exists = scope:had_nick_the_trembling } - } - modifier = { - prestige_level <= 1 - factor = 2 - } - give_nickname = nick_the_trembling - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_trembling } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_trait = craven - prestige_level <= 2 - has_personality_submissive_trigger = yes - NOT = { exists = scope:had_nick_the_craven } - } - modifier = { - prestige_level <= 1 - factor = 2 - } - give_nickname = nick_the_craven - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_craven } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - OR = { - ai_rationality <= -75 - has_trait = lunatic - has_trait = possessed - AND = { - tyranny >= 50 - has_personality_emotional_trigger = yes - has_personality_malicious_trigger = yes - } - } - NOT = { exists = scope:had_nick_the_insane } - } - give_nickname = nick_the_insane - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_insane } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_personality_introverted_trigger = yes - has_personality_dominant_trigger = yes - has_personality_levelheaded_trigger = yes - NOT = { exists = scope:had_nick_the_joyless } - } - give_nickname = nick_the_joyless - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_joyless } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_trait = viking - martial >= 10 - prowess >= 10 - NOT = { exists = scope:had_nick_the_viking } - } - give_nickname = nick_the_viking - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_viking } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - culture = { has_cultural_tradition = tradition_horse_lords } - martial >= 10 - prowess >= 10 - number_maa_regiments_of_base_type = { - type = archer_cavalry - value > 1 - } - any_raid_target = { - always = yes - } - NOT = { exists = scope:had_nick_the_horse } - } - give_nickname = nick_the_horse - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_horse } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - probably_unintelligent_trigger = yes - has_personality_introverted_trigger = yes - has_personality_levelheaded_trigger = yes - NOT = { exists = scope:had_nick_the_dull } - } - give_nickname = nick_the_dull - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_dull } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_personality_dominant_trigger = yes - has_personality_extroverted_trigger = yes - prowess >= 16 - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:nickname_root_scope } - NOT = { exists = scope:had_nick_strongarm } - } - give_nickname = nick_strongarm - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_strongarm } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_trait = one_eyed - NOT = { exists = scope:had_nick_one_eye } - } - give_nickname = nick_one_eye - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_one_eye } - trigger_event = lifestyle_nicknames.1000 - } - 300 = { - trigger = { - has_trait = maimed - NOT = { exists = scope:had_nick_one_hand } - } - give_nickname = nick_one_hand - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_one_hand } - trigger_event = lifestyle_nicknames.1000 - } - 300 = { - trigger = { - has_education_intrigue_trigger = yes - intrigue >= 16 - has_trait = disfigured - NOT = { exists = scope:had_nick_of_a_thousand_faces } - } - give_nickname = nick_of_a_thousand_faces - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_of_a_thousand_faces } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - OR = { - has_trait = consumption - has_trait = cancer - has_trait = pneumonic - has_trait = typhus - has_trait = smallpox - has_trait = measles - has_trait = dysentery - has_trait = ergotism - has_trait = bubonic_plague - } - prestige_level <= 1 - NOT = { exists = scope:had_nick_the_plaguebearer } - } - give_nickname = nick_the_plaguebearer - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_plaguebearer } - trigger_event = lifestyle_nicknames.1000 - } - 500 = { - trigger = { - calc_true_if = { - amount >= 2 - has_trait = maimed - has_trait = one_eyed - has_trait = one_legged - has_trait = disfigured - } - stress < 100 - health >= medium_health - NOT = { exists = scope:had_nick_the_persevering } - } - give_nickname = nick_the_persevering - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_persevering } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - OR = { - has_trait = physique_good_2 - has_trait = physique_good_3 - has_trait = beauty_good_2 - has_trait = beauty_good_3 - } - OR = { - has_trait = physique_bad_2 - has_trait = physique_bad_3 - has_trait = beauty_bad_2 - has_trait = beauty_bad_3 - has_trait = giant - has_trait = albino - has_trait = scaly - } - NOT = { exists = scope:had_nick_the_chimera } - } - give_nickname = nick_the_chimera - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_chimera } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - highest_held_title_tier <= tier_duchy - realm_size >= 5 - any_vassal = { - count >= 3 - } - has_personality_benevolent_trigger = yes - prestige_level >= 2 - diplomacy >= 12 - NOT = { exists = scope:had_nick_the_lord_of_realm } - } - give_nickname = nick_the_lord_of_realm - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_lord_of_realm } - trigger_event = lifestyle_nicknames.1000 - } - 50 = { - trigger = { - highest_held_title_tier <= tier_duchy - domain_size <= 2 - any_sibling = { - highest_held_title_tier >= tier_kingdom - domain_size >= 4 - prestige_level >= scope:nickname_root_scope.prestige_level - } - NOT = { exists = scope:had_nick_lackland } - } - give_nickname = nick_lackland - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_lackland } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - is_male = yes - culture = { - OR = { - this = culture:breton - any_parent_culture_or_above = { - this = culture:breton - } - } - } - is_at_war = yes - martial >= 12 - NOT = { exists = scope:had_nick_twistedbeard } - } - give_nickname = nick_twistedbeard - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_twistedbeard } - trigger_event = lifestyle_nicknames.1000 - } - 25 = { # Will make the character grow a beautiful beard - trigger = { - is_male = yes - age >= 30 - learning >= 16 - OR = { - has_trait = lifestyle_mystic - has_trait = scholar - has_trait = theologian - } - NOR = { - exists = scope:had_nick_the_bearded - has_trait = beardless_eunuch - } - } - give_nickname = nick_the_bearded - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_bearded } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - OR = { - has_trait = strong - has_trait = physique_good - } - OR = { - has_trait = beauty_bad - has_trait = hunchbacked - has_trait = scaly - has_trait = disfigured - } - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:nickname_root_scope } - NOT = { exists = scope:had_nick_the_boar } - } - give_nickname = nick_the_boar - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_boar } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_trait = disfigured - has_personality_introverted_trigger = yes - NOT = { exists = scope:had_nick_the_faceless } - } - give_nickname = nick_the_faceless - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_faceless } - trigger_event = lifestyle_nicknames.1000 - } - 300 = { - trigger = { - has_trait = giant - has_trait = one_eyed - NOT = { exists = scope:had_nick_the_cyclops } - } - give_nickname = nick_the_cyclops - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_cyclops } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_trait = giant - OR = { - has_trait = weak - has_trait = spindly - has_trait = physique_bad - } - NOT = { exists = scope:had_nick_the_beanstalk } - } - give_nickname = nick_the_beanstalk - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_beanstalk } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - is_female = yes - faith = { has_doctrine = doctrine_theocracy_temporal } - has_personality_levelheaded_trigger = yes - has_personality_introverted_trigger = yes - has_personality_submissive_trigger = yes - piety_level >= 2 - num_sinful_traits <= 0 - NOT = { exists = scope:had_nick_the_nun } - } - give_nickname = nick_the_nun - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_nun } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - is_in_civil_war = yes - tyranny > 0 - diplomacy <= 8 - NOT = { exists = scope:had_nick_the_ill_ruler } - } - modifier = { - diplomacy <= 4 - factor = 2 - } - give_nickname = nick_the_ill_ruler - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_ill_ruler } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - is_in_civil_war = yes - tyranny > 0 - diplomacy <= 8 - NOT = { exists = scope:had_nick_the_careless } - } - modifier = { - diplomacy <= 4 - factor = 2 - } - give_nickname = nick_the_careless - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_careless } - trigger_event = lifestyle_nicknames.1000 - } - 25 = { - trigger = { - age >= 60 - health >= good_health - NOT = { exists = scope:had_nick_the_undying } - } - give_nickname = nick_the_undying - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_undying } - trigger_event = lifestyle_nicknames.1000 - } - 50 = { - trigger = { - OR = { - debt_level >= 1 - treasury_debt_level >= 1 - } - NOT = { exists = scope:had_nick_of_the_empty_pockets } - } - modifier = { - factor = debt_level - } - modifier = { - factor = treasury_debt_level - } - give_nickname = nick_of_the_empty_pockets - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_of_the_empty_pockets } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_trait = giant - prowess >= 20 - NOT = { exists = scope:had_nick_the_goliath } - } - give_nickname = nick_the_goliath - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_goliath } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_education_martial_trigger = yes - exists = capital_county - capital_county.county_opinion >= 50 - NOT = { exists = scope:had_nick_the_shield_of_capital } - } - give_nickname = nick_the_shield_of_capital - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_shield_of_capital } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_trait = giant - religion = { is_in_family = rf_pagan } - NOT = { exists = scope:had_nick_the_ladder_legs } - } - give_nickname = nick_the_ladder_legs - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_ladder_legs } - trigger_event = lifestyle_nicknames.1000 - } - 25 = { - trigger = { - has_personality_dominant_trigger = yes - has_personality_extroverted_trigger = yes - has_trait = beauty_good - NOT = { exists = scope:had_nick_the_peacock } - } - give_nickname = nick_the_peacock - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_peacock } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - dread >= 50 - has_personality_dominant_trigger = yes - has_personality_extroverted_trigger = yes - NOT = { exists = scope:had_nick_the_bellower } - } - give_nickname = nick_the_bellower - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_bellower } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_trait = lifestyle_physician - has_personality_benevolent_trigger = yes - piety_level >= 2 - NOT = { exists = scope:had_nick_the_healer } - } - give_nickname = nick_the_healer - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_healer } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_personality_dominant_trigger = yes - has_personality_benevolent_trigger = yes - prestige_level >= 2 - piety_level >= 2 - NOT = { exists = scope:had_nick_the_righteous } - } - modifier = { - prestige_level >= 3 - piety_level >= 3 - factor = 2 - } - give_nickname = nick_the_righteous - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_righteous } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - ai_compassion >= 75 - ai_rationality >= 75 - has_personality_benevolent_trigger = yes - NOT = { exists = scope:had_nick_the_understanding } - } - give_nickname = nick_the_understanding - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_understanding } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - age >= 75 - piety_level >= 2 - NOT = { exists = scope:had_nick_the_venerable } - } - modifier = { - piety_level >= 3 - factor = 2 - } - give_nickname = nick_the_venerable - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_venerable } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_trait = lifestyle_mystic - has_personality_benevolent_trigger = yes - piety_level >= 2 - NOT = { exists = scope:had_nick_the_miracle_worker } - } - give_nickname = nick_the_miracle_worker - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_miracle_worker } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - ai_vengefulness <= -50 - has_personality_benevolent_trigger = yes - has_personality_levelheaded_trigger = yes - NOR = { - any_prisoner = { - count >= 1 - always = yes - } - any_killed_character = { - count >= 1 - always = yes - } - } - NOT = { exists = scope:had_nick_the_merciful } - } - give_nickname = nick_the_merciful - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_merciful } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - intrigue >= 14 - diplomacy >= 14 - has_personality_extroverted_trigger = yes - NOT = { exists = scope:had_nick_the_silver_tongue } - } - give_nickname = nick_the_silver_tongue - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_silver_tongue } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - is_male = yes - prowess >= 10 - attraction >= 30 - OR = { - has_trait = athletic - has_trait = strong - has_trait = physique_good - } - NOT = { exists = scope:had_nick_the_stallion } - } - give_nickname = nick_the_stallion - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_stallion } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - OR = { - has_trait = infirm - probably_unintelligent_trigger = yes - } - NOT = { exists = scope:had_nick_the_forgetful } - } - modifier = { - has_trait = fickle - factor = 2 - } - give_nickname = nick_the_forgetful - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_forgetful } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - OR = { - has_trait = shy - has_trait = reclusive - } - has_personality_introverted_trigger = yes - has_personality_submissive_trigger = yes - piety_level >= 1 - NOT = { exists = scope:had_nick_the_hermit } - } - give_nickname = nick_the_hermit - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_hermit } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - OR = { - has_trait = shy - has_trait = reclusive - } - has_personality_introverted_trigger = yes - has_personality_submissive_trigger = yes - NOT = { exists = scope:had_nick_the_recluse } - } - give_nickname = nick_the_recluse - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_recluse } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - OR = { - has_trait = infirm - has_trait = spindly - has_trait = weak - has_trait = physique_bad - has_trait = bleeder - has_trait = inbred - } - NOR = { - has_trait = strong - has_trait = physique_good - } - NOT = { exists = scope:had_nick_the_feeble } - } - give_nickname = nick_the_feeble - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_feeble } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_personality_dominant_trigger = yes - has_personality_extroverted_trigger = yes - has_trait = beauty_good - NOT = { exists = scope:had_nick_the_vain } - } - give_nickname = nick_the_vain - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_vain } - trigger_event = lifestyle_nicknames.1000 - } - 25 = { - trigger = { - days_of_continuous_peace >= 700 - ai_has_economical_boom_personality = yes - any_held_title = { - count >= 4 - title_tier = county - title_province = { - has_ongoing_construction = yes - } - } - NOT = { exists = scope:had_nick_the_castellan } - } - modifier = { - any_held_title = { - count = all - title_tier = county - title_province = { - has_ongoing_construction = yes - } - } - factor = 2 - } - give_nickname = nick_the_castellan - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_castellan } - trigger_event = lifestyle_nicknames.1000 - } - 25 = { - trigger = { - piety_level >= 2 - faith.religion = { is_in_family = rf_abrahamic } - days_of_continuous_peace >= 700 - ai_has_economical_boom_personality = yes - any_held_title = { - count >= 4 - title_tier = county - title_province = { - has_ongoing_construction = yes - } - } - NOT = { exists = scope:had_nick_the_carpenter } - } - modifier = { - any_held_title = { - count = all - title_tier = county - title_province = { - has_ongoing_construction = yes - } - } - factor = 2 - } - give_nickname = nick_the_carpenter - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_carpenter } - trigger_event = lifestyle_nicknames.1000 - } - 25 = { - trigger = { - intrigue >= 10 - prowess >= 12 - martial >= 12 - has_education_martial_trigger = yes - NOT = { exists = scope:had_nick_the_griffin } - } - modifier = { - intrigue >= 16 - factor = 2 - } - give_nickname = nick_the_griffin - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_griffin } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - ai_greed <= -50 - any_sponsored_inspiration = { } - prestige_level >= 2 - highest_held_title_tier >= tier_kingdom - NOT = { exists = scope:had_nick_the_patron_of_arts } - } - give_nickname = nick_the_patron_of_arts - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_patron_of_arts } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - ai_zeal >= 100 - ai_rationality <= -50 - piety_level >= 2 - NOT = { exists = scope:had_nick_the_zealot } - } - give_nickname = nick_the_zealot - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_zealot } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - age >= 75 - NOT = { exists = scope:had_nick_the_elder } - } - give_nickname = nick_the_elder - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_elder } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_personality_malicious_trigger = yes - num_sinful_traits >= 1 - OR = { - has_trait = sadistic - has_trait = callous - } - ai_zeal <= 0 - NOT = { exists = scope:had_nick_the_evil } - } - modifier = { - num_sinful_traits >= 2 - factor = 2 - } - give_nickname = nick_the_evil - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_evil } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_personality_extroverted_trigger = yes - OR = { - loves_food_trigger = yes - has_trait = lifestyle_reveler - } - diplomacy >= 8 - has_trait_malicious_trigger = no - NOT = { exists = scope:had_nick_the_jovial } - } - give_nickname = nick_the_jovial - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_jovial } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_personality_extroverted_trigger = yes - OR = { - loves_food_trigger = yes - has_trait = lifestyle_reveler - } - ai_rationality < 0 - has_trait_malicious_trigger = no - NOT = { exists = scope:had_nick_the_jolly } - } - give_nickname = nick_the_jolly - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_jolly } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - OR = { - has_trait = lifestyle_mystic - has_trait = lunatic - has_trait = possessed - } - has_trait_malicious_trigger = no - NOT = { exists = scope:had_nick_the_strange } - } - give_nickname = nick_the_strange - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_strange } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_trait = possessed - stress >= 200 - NOT = { exists = scope:had_nick_the_haunted } - } - give_nickname = nick_the_haunted - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_haunted } - trigger_event = lifestyle_nicknames.1000 - } - 300 = { - trigger = { - diplomacy < 8 - stewardship < 8 - martial < 8 - intrigue < 8 - learning < 8 - is_at_war_as_defender = yes - NOT = { exists = scope:had_nick_the_unlucky } - } - give_nickname = nick_the_unlucky - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_unlucky } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - any_relation = { - type = friend - always = yes - } - any_relation = { - type = lover - always = yes - } - is_at_war = no - gold >= 500 - realm_size >= 5 - has_any_illness = no - health > poor_health - stress < 100 - NOT = { exists = scope:had_nick_the_lucky } - } - give_nickname = nick_the_lucky - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_lucky } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - is_male = yes - prowess <= 4 - martial <= 4 - has_education_learning_trigger = yes - prestige_level <= 1 - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:nickname_root_scope } - NOT = { exists = scope:had_nick_the_effeminate } - } - give_nickname = nick_the_effeminate - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_effeminate } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - is_male = yes - culture = culture:anglo_saxon - prowess <= 4 - fertility <= 0.4 - NOT = { - any_child = { - count > 1 - } - } - NOT = { exists = scope:had_nick_softsword } - } - give_nickname = nick_softsword - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_softsword } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_trait = fickle - ai_rationality <= -50 - prestige_level <= 2 - NOT = { exists = scope:had_nick_the_clueless } - } - modifier = { - probably_unintelligent_trigger = yes - factor = 2 - } - give_nickname = nick_the_clueless - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_clueless } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - ai_vengefulness >= 35 - OR = { - has_trait = wrathful - has_trait = irritable - } - NOT = { exists = scope:had_nick_the_ill_tempered } - } - give_nickname = nick_the_ill_tempered - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_ill_tempered } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - calc_true_if = { - amount >= 2 - has_trait = maimed - has_trait = one_eyed - has_trait = one_legged - has_trait = disfigured - } - stress < 100 - health >= medium_health - NOT = { exists = scope:had_nick_the_resilient } - } - give_nickname = nick_the_resilient - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_resilient } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - OR = { - has_trait = lazy - AND = { - has_trait = reclusive - ai_energy <= -25 - } - } - NOT = { - has_trait = ambitious - } - days_of_continuous_peace = 3650 - NOT = { exists = scope:had_nick_do_nothing } - } - modifier = { - calc_true_if = { - amount >= 2 - prestige_level <= 2 - } - factor = 2 - } - give_nickname = nick_do_nothing - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_do_nothing } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_trait = lazy - ai_greed <= -25 - NOT = { - has_trait = ambitious - } - days_of_continuous_peace = 3650 - NOT = { exists = scope:had_nick_the_indolent } - } - modifier = { - calc_true_if = { - amount >= 2 - prestige_level <= 2 - } - factor = 2 - } - give_nickname = nick_the_indolent - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_indolent } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_trait = lazy - ai_boldness >= 25 - NOT = { exists = scope:had_nick_the_sluggard } - } - modifier = { - calc_true_if = { - amount >= 2 - prestige_level <= 2 - } - factor = 2 - } - give_nickname = nick_the_sluggard - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_sluggard } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_trait = lazy - ai_boldness <= -50 - ai_energy <= -25 - days_of_continuous_peace = 3650 - NOT = { exists = scope:had_nick_the_idle } - } - modifier = { - calc_true_if = { - amount >= 2 - prestige_level <= 2 - } - factor = 2 - } - give_nickname = nick_the_idle - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_idle } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_trait = dwarf - NOT = { exists = scope:had_nick_the_short } - } - give_nickname = nick_the_short - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_short } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_trait = dwarf - NOT = { exists = scope:had_nick_elbow_high } - } - give_nickname = nick_elbow_high - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_elbow_high } - trigger_event = lifestyle_nicknames.1000 - } - 200 = { - trigger = { - has_trait = athletic - prowess >= 12 - NOT = { exists = scope:had_nick_longshanks } - } - give_nickname = nick_longshanks - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_longshanks } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_trait = wrathful - ai_boldness >= 25 - ai_rationality <= -25 - num_of_relation_rival >= 2 - NOT = { exists = scope:had_nick_the_wrathful } - } - give_nickname = nick_the_wrathful - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_wrathful } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - diplomacy <= 4 - has_personality_emotional_trigger = yes - has_personality_dominant_trigger = yes - NOT = { exists = scope:had_nick_the_petulant } - } - give_nickname = nick_the_petulant - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_petulant } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_personality_emotional_trigger = yes - num_of_relation_rival >= 4 - NOT = { exists = scope:had_nick_the_quarrelsome } - } - give_nickname = nick_the_quarrelsome - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_quarrelsome } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - is_eunuch_trigger = yes - NOT = { exists = scope:had_nick_the_eunuch } - } - give_nickname = nick_the_eunuch - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_eunuch } - trigger_event = lifestyle_nicknames.1000 - } - 200 = { - trigger = { - has_trait = lifestyle_blademaster - any_equipped_character_artifact = { artifact_type = sword } - prowess >= 12 - NOT = { exists = scope:had_nick_longsword } - } - give_nickname = nick_longsword - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_longsword } - trigger_event = lifestyle_nicknames.1000 - } - 200 = { - trigger = { - has_trait = lifestyle_blademaster - any_equipped_character_artifact = { artifact_type = axe } - prowess >= 12 - NOT = { exists = scope:had_nick_greataxe } - } - give_nickname = nick_greataxe - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_greataxe } - trigger_event = lifestyle_nicknames.1000 - } - 200 = { - trigger = { - has_trait = lifestyle_blademaster - any_equipped_character_artifact = { artifact_type = mace } - prowess >= 12 - NOT = { exists = scope:had_nick_the_mace } - } - give_nickname = nick_the_mace - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_mace } - trigger_event = lifestyle_nicknames.1000 - } - 200 = { - trigger = { - has_trait = lifestyle_blademaster - any_equipped_character_artifact = { artifact_type = spear } - prowess >= 12 - NOT = { exists = scope:had_nick_the_spear_of_capital } - } - give_nickname = nick_the_spear_of_capital - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_spear_of_capital } - trigger_event = lifestyle_nicknames.1000 - } - 200 = { - trigger = { - has_trait = lifestyle_blademaster - any_equipped_character_artifact = { artifact_type = hammer } - prowess >= 12 - NOT = { exists = scope:had_nick_the_maul } - } - give_nickname = nick_the_maul - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_maul } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - capital_province ?= { geographical_region = world_india } - prestige_level >= 3 - prowess >= 12 - martial >= 12 - NOT = { exists = scope:had_nick_the_tiger_of_place } - } - give_nickname = nick_the_tiger_of_place - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_tiger_of_place } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - diplomacy >= 16 - has_personality_extroverted_trigger = yes - has_royal_court = yes - has_dlc_feature = royal_court - court_grandeur_current_level >= 9 - NOT = { exists = scope:had_nick_the_lover_of_elegance } - } - give_nickname = nick_the_lover_of_elegance - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_lover_of_elegance } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - OR = { - has_trait = strong - has_trait = physique_good - } - NOR = { - has_trait = weak - has_trait = spindly - has_trait = physique_bad - } - NOT = { exists = scope:had_nick_the_stout } - } - give_nickname = nick_the_stout - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_stout } - trigger_event = lifestyle_nicknames.1000 - } - 10 = { - trigger = { - diplomacy >= 16 - intrigue >= 16 - has_personality_levelheaded_trigger = yes - NOT = { exists = scope:had_nick_the_universal_spider } - } - give_nickname = nick_the_universal_spider - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_universal_spider } - trigger_event = lifestyle_nicknames.1000 - } - 25 = { - trigger = { - any_character_artifact = { - count >= 6 - is_unique = yes - } - NOT = { exists = scope:had_nick_the_collector } - } - give_nickname = nick_the_collector - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_collector } - trigger_event = lifestyle_nicknames.1000 - } - 50 = { - trigger = { - highest_held_title_tier >= tier_kingdom - prestige_level >= 3 - has_personality_dominant_trigger = yes - max_number_maa_soldiers_of_base_type = { - type = heavy_cavalry - value >= 500 - } - any_held_title = { - title_tier = county - any_county_province = { - has_building_with_flag = special_mine - #OR = { - # has_building_or_higher = rammelsberg_mines_01 - # has_building_or_higher = kutna_hora_mines_01 - # has_building_or_higher = kremnica_mines_01 - # has_building_or_higher = falun_mines_01 - # has_building_or_higher = schwaz_mines_01 - # has_building_or_higher = argentiera_mines_01 - # has_building_or_higher = kollur_mines_01 - # has_building_or_higher = ratnapura_mines_01 - # has_building_or_higher = siderokausia_mines_01 - # has_building_or_higher = mali_mines_01 - # has_building_or_higher = zawar_mines_01 - # has_building_or_higher = pansjhir_mines_01 - # has_building_or_higher = takkeda_mines_01 - # has_building_or_higher = trepca_mines_01 - # has_building_or_higher = cevennes_mines_01 - # has_building_or_higher = taghaza_mines_01 - # has_building_or_higher = allaq_mines_01 - # has_building_or_higher = phocaea_mines_01 - # has_building_or_higher = khetri_mines_01 - # has_building_or_higher = verespatak_mines_01 - # has_building_or_higher = srebrenica_mines_01 - # has_building_or_higher = nishapur_mines_01 - # has_building_or_higher = turda_mines_01 - # has_building_or_higher = rudnik_mines_01 - # has_building_or_higher = ijil_mines_01 - # has_building_or_higher = mogok_mines_01 - # has_building_or_higher = sar_i_sang_mines_01 - #} - } - } - NOT = { exists = scope:had_nick_the_iron_and_golden_king } - } - give_nickname = nick_the_iron_and_golden_king - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_iron_and_golden_king } - trigger_event = lifestyle_nicknames.1000 - } - 2000 = { - trigger = { - has_trait = incapable - NOT = { exists = scope:had_nick_the_sleeper } - } - give_nickname = nick_the_sleeper - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_sleeper } - trigger_event = lifestyle_nicknames.1000 - } - 10000 = { - trigger = { - has_trait = incapable - NOT = { exists = scope:had_nick_the_sleeping_king } - } - give_nickname = nick_the_sleeping_king - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_sleeping_king } - trigger_event = lifestyle_nicknames.1000 - } - 1000 = { - trigger = { - exists = liege - exists = mother - liege.culture = { - OR = { - this = culture:greek - any_parent_culture_or_above = { - this = culture:greek - } - } - } - culture = { - OR = { - this = culture:greek - any_parent_culture_or_above = { - this = culture:greek - } - } - } - mother.culture = { - NOR = { - this = culture:greek - any_parent_culture_or_above = { - this = culture:greek - } - } - } - NOT = { - faith = { has_dominant_ruling_gender = dummy_male} - } - NOT = { exists = scope:had_nick_the_foreign_mother } - } - give_nickname = nick_the_foreign_mother - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_foreign_mother } - trigger_event = lifestyle_nicknames.1000 - } - 1000 = { - trigger = { - exists = liege - exists = father - liege.culture = { - OR = { - this = culture:greek - any_parent_culture_or_above = { - this = culture:greek - } - } - } - culture = { - OR = { - this = culture:greek - any_parent_culture_or_above = { - this = culture:greek - } - } - } - father.culture = { - NOR = { - this = culture:greek - any_parent_culture_or_above = { - this = culture:greek - } - } - } - NOT = { - faith = { has_dominant_ruling_gender = dummy_female} - } - NOT = { exists = scope:had_nick_the_foreign_father } - } - give_nickname = nick_the_foreign_father - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_foreign_father } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - current_weight >= 50 - OR = { - loves_food_trigger = yes - has_trait = lifestyle_reveler - } - NOT = { exists = scope:had_nick_the_corpulent } - } - modifier = { - current_weight >= 75 - factor = 2 - } - give_nickname = nick_the_corpulent - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_corpulent } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - top_liege != this - OR = { - is_a_faction_member = yes - has_trait = disloyal - } - ai_boldness >= 50 - NOT = { exists = scope:had_nick_the_insubordinate } - } - give_nickname = nick_the_insubordinate - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_insubordinate } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_trait = disloyal - intrigue >= 15 - NOT = { exists = scope:had_nick_the_backstabber } - } - modifier = { - is_at_war_with_liege = yes - factor = 2 - } - give_nickname = nick_the_backstabber - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_backstabber } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - ai_greed >= 50 - ai_honor <= 50 - gold >= massive_gold_value - NOT = { exists = scope:had_nick_the_corrupt } - } - modifier = { - has_trait = disloyal - factor = 2 - } - give_nickname = nick_the_corrupt - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_corrupt } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - probably_unintelligent_trigger = yes - OR = { - AND = { - diplomacy <= 6 - martial <= 6 - stewardship <= 6 - intrigue <= 6 - learning <= 6 - } - AND = { - government_allows = administrative - governor_efficiency <= 0.7 - } - prestige_level <= 2 - } - NOT = { exists = scope:had_nick_the_incompetent } - } - modifier = { - government_allows = administrative - governor_efficiency <= 0.6 - factor = 2 - } - give_nickname = nick_the_incompetent - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_incompetent } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - ai_rationality <= -50 - ai_boldness >= 50 - OR = { - has_trait = profligate - has_trait = reckless - } - NOT = { exists = scope:had_nick_the_gambler } - } - give_nickname = nick_the_gambler - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_gambler } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - diplomacy <= 3 - has_personality_extroverted_trigger = yes - OR = { - has_trait = wrathful - has_trait = drunkard - has_trait = honest - has_trait = eccentric - has_trait = impatient - } - prestige_level <= 2 - NOT = { exists = scope:had_nick_the_obscene } - } - give_nickname = nick_the_obscene - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_obscene } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - has_trait = greedy - gold > massive_gold_value - NOT = { - has_trait = improvident - } - OR = { - has_royal_court = no - court_grandeur_current_level < court_grandeur_minimum_expected_level - } - NOT = { exists = scope:had_nick_the_miser } - } - give_nickname = nick_the_miser - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_miser } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - stress_level >= 3 - gold < 0 - NOT = { exists = scope:had_nick_the_unfortunate } - } - give_nickname = nick_the_unfortunate - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_the_unfortunate } - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - culture = { - OR = { - this = culture:norman - any_parent_culture_or_above = { this = culture:norman } - } - } - calc_true_if = { - amount >= 3 - has_trait = wrathful - has_trait = ambitious - has_trait = lifestyle_hunter - has_trait = education_martial - has_trait = logistician - } - NOT = { exists = scope:had_nick_curtmantle } - } - give_nickname = nick_curtmantle - # Flag this as having been spat out already, in case we're applying several nicknames in quick succession. - flag_random_nickname_as_taken_in_batch_effect = { NICK = nick_curtmantle } - trigger_event = lifestyle_nicknames.1000 - } - } - } -} - -#Chooses a random appropriate NEGATIVE nickname and sets it on the scoped character -#Much looser trigger than generic random nickname effect as it needs to get any that are relevant -set_random_negative_nickname_effect = { - save_scope_as = nick_recipient - custom_tooltip = receive_slanderous_nickname_tt - hidden_effect = { - random_list = { - 100 = { - trigger = { - is_male = yes - OR = { - has_trait = stubborn - has_trait = impatient - has_trait = ambitious - has_trait = arrogant - } - NOR = { - prestige_level >= 3 - portrait_shared_clothing_contents_trigger = { # They have a chance to be bald normally; it's not weird or tease-worthy - CULTURE_SCOPE = culture - CULTURE_FLAG = african - } - is_bald_trigger = yes - exists = scope:had_nick_the_actually_bald - } - any_claim = { - tier >= tier_kingdom - } - highest_held_title_tier < tier_kingdom - } - modifier = { - prestige_level < 2 - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_bald_ironic - } - } - 10 = { - trigger = { - is_male = yes - age >= 30 - NOR = { - portrait_shared_clothing_contents_trigger = { # They have a chance to be bald normally; it's not weird or tease-worthy - CULTURE_SCOPE = culture - CULTURE_FLAG = african - } - is_bald_trigger = yes - exists = scope:had_nick_the_actually_bald - } - } - modifier = { - add = scope:nick_recipient.age - } - set_nickname_effect = { - NICKNAME = nick_the_actually_bald - } - } - 100 = { - trigger = { - NOR = { - has_trait = crusader_king - mpo_has_gok_mongol_empire_trigger = yes - } - NOT = { - any_realm_county = { - culture = scope:nick_recipient.culture - } - } - NOT = { - primary_title ?= { - any_past_holder = { - has_nickname = nick_the_stranger - } - } - } - } - modifier = { - NOT = { - any_realm_county = { - culture = { - cultural_acceptance = { target = scope:nick_recipient.culture value >= 40 } - } - } - } - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_stranger - } - } - 100 = { - trigger = { - is_playable_character = yes - NOR = { - any_sub_realm_county = { - faith = scope:nick_recipient.faith - } - AND = { - top_liege != this - faith = liege.faith - } - government_has_flag = government_is_theocracy - government_has_flag = government_is_landless_adventurer - } - } - modifier = { - has_trait = zealous - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_faith - } - } - 100 = { - trigger = { - OR = { - has_trait = deceitful - has_trait = fickle - has_trait = ambitious - has_trait = greedy - has_trait = eccentric - has_trait = gregarious - has_Trait = arbitrary - } - NOR = { - has_trait = shy - has_trait = calm - } - ai_boldness >= 75 - ai_honor < -25 - } - modifier = { - ai_honor <= -100 - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_troublemaker - } - } - 100 = { - trigger = { - is_male = yes - OR = { - has_trait = lazy - has_trait = lunatic - has_trait = drunkard - has_trait = hashishiyah - has_trait = beauty_bad_1 - has_trait = beauty_bad_2 - has_trait = beauty_bad_3 - } - is_bald_trigger = no - } - modifier = { - prestige_level < 2 - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_hairy - } - } - 100 = { - trigger = { - is_in_civil_war = yes - tyranny > 0 - } - modifier = { - diplomacy <= 4 - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_unready - } - } - 100 = { - trigger = { - OR = { - has_trait = wrathful - has_trait = irritable - has_trait = impatient - has_trait = ambitious - has_trait = vengeful - } - is_at_war = yes - any_character_war = { - primary_attacker = scope:nick_recipient - } - } - modifier = { - calc_true_if = { - amount >= 2 - has_trait = wrathful - has_trait = irritable - has_trait = impatient - has_trait = ambitious - has_trait = vengeful - } - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_quarreller - } - } - 100 = { - trigger = { - OR = { - has_trait = wrathful - has_trait = irritable - has_trait = impatient - has_trait = fickle - } - is_at_war = yes - any_character_war = { - primary_attacker = scope:nick_recipient - attacker_war_score <= -50 - } - } - modifier = { - calc_true_if = { - amount >= 2 - has_trait = wrathful - has_trait = irritable - has_trait = impatient - has_trait = fickle - } - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_rash - } - } - 100 = { - trigger = { - OR = { - has_trait = deceitful - has_trait = arbitrary - has_trait = ambitious - has_trait = callous - has_trait = sadistic - has_trait = disloyal - has_trait = fickle - } - any_killed_character = { - is_close_family_of = scope:nick_recipient - } - } - modifier = { - is_at_war_with_liege = yes - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_traitor - } - } - 100 = { - trigger = { - has_personality_malicious_trigger = yes - any_killed_character = { - count >= 10 - death_reason = death_execution - } - } - set_nickname_effect = { - NICKNAME = nick_the_executioner - } - } - 50 = { - trigger = { - learning >= 10 - has_personality_dominant_trigger = yes - has_personality_extroverted_trigger = yes - } - modifier = { - is_clergy = yes - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_turbulent - } - } - 100 = { - trigger = { - has_trait = witch - NOT = { faith = { has_doctrine = doctrine_witchcraft_accepted } } - } - modifier = { - piety_level <= 1 - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_witch - } - } - 100 = { - trigger = { - piety_level <= 1 - ai_rationality <= -25 - stress_level >= 1 - } - set_nickname_effect = { - NICKNAME = nick_the_bewitched - } - } - 100 = { - trigger = { - has_trait = drunkard - } - modifier = { - prestige_level <= 1 - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_drunkard - } - } - 100 = { - trigger = { - has_trait = drunkard - faith = faith:norse_pagan - } - modifier = { - prestige_level <= 1 - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_ale_lover - } - } - 100 = { - trigger = { - ai_greed >= 50 - } - modifier = { - has_trait = greedy - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_greedy - } - } - 100 = { - trigger = { - culture = culture:anglo_saxon - is_male = yes - ai_greed >= 50 - gold >= 100 - } - modifier = { - has_trait = greedy - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_pennyfather - } - } - 100 = { - trigger = { - has_trait = gluttonous - has_personality_introverted_trigger = no - } - set_nickname_effect = { - NICKNAME = nick_foul_fart - } - } - 100 = { - trigger = { - OR = { - has_personality_submissive_trigger = yes - has_personality_introverted_trigger = yes - } - } - set_nickname_effect = { - NICKNAME = nick_the_timid - } - } - 100 = { - trigger = { - any_powerful_vassal = { - count >= 3 - } - any_powerful_vassal = { - count = all - opinion = { - target = scope:nick_recipient - value <= -25 - } - } - } - modifier = { - prestige_level <= 0 - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_unworthy - } - } - 100 = { - trigger = { - OR = { - has_trait = adulterer - AND = { - exists = primary_spouse - exposed_cheating_on_spouse_trigger = { SPOUSE = scope:nick_recipient.primary_spouse } - } - } - - } - set_nickname_effect = { - NICKNAME = nick_the_unfaithful - } - } - 100 = { - trigger = { - is_male = yes - any_child = { - count >= 4 - mother ?= { - is_married = yes - NOT = { - is_consort_of = scope:nick_recipient - } - } - } - any_child = { - count = all - mother ?= { - is_married = yes - NOT = { - is_consort_of = scope:nick_recipient - } - add_to_temporary_list = cuckoo - } - } - any_in_list = { - list = cuckoo - count >= 4 - } - } - set_nickname_effect = { - NICKNAME = nick_cuckoo - } - } - 100 = { - trigger = { - OR = { - has_trait = fornicator - has_trait = adulterer - AND = { - exists = primary_spouse - exposed_cheating_on_spouse_trigger = { SPOUSE = scope:nick_recipient.primary_spouse } - } - } - } - set_nickname_effect = { - NICKNAME = nick_the_unchaste - } - } - 100 = { - trigger = { - is_female = yes - any_relation = { type = lover } - OR = { - has_trait = lustful - has_trait = beauty_good - attraction >= 50 - has_trait = fornicator - has_trait = adulterer - } - } - modifier = { - num_of_relation_lover >= 2 - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_temptress - } - } - 100 = { - trigger = { - is_female = yes - any_relation = { type = lover } - OR = { - has_trait = lustful - has_trait = beauty_good - attraction >= 50 - has_trait = fornicator - has_trait = adulterer - } - } - modifier = { - num_of_relation_lover >= 2 - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_seductress - } - } - 100 = { - trigger = { - OR = { - has_trait = lustful - has_trait = lovers_pox - has_trait = early_great_pox - has_trait = great_pox - has_trait = deviant - } - } - modifier = { - any_relation = { type = lover } - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_lewd - } - } - 100 = { - trigger = { - is_male = yes - any_relation = { type = lover } - OR = { - has_trait = lustful - has_trait = beauty_good - attraction >= 50 - has_trait = fornicator - has_trait = adulterer - } - } - modifier = { - num_of_relation_lover >= 2 - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_lecher - } - } - 100 = { - trigger = { - is_male = yes - any_relation = { type = lover } - OR = { - has_trait = lustful - has_trait = beauty_good - attraction >= 50 - has_trait = fornicator - has_trait = adulterer - } - } - modifier = { - num_of_relation_lover >= 2 - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_seducer - } - } - 100 = { - trigger = { - OR = { - has_trait = deceitful - has_trait = schemer - has_trait = disloyal - } - intrigue >= 12 - } - modifier = { - intrigue >= 20 - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_trickster - } - } - 100 = { - trigger = { - diplomacy >= 10 - intrigue >= 10 - learning >= 10 - martial >= 10 - stewardship >= 10 - ai_rationality >= 25 - } - modifier = { - prestige_level >= 3 - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_shrewd - } - } - 100 = { - trigger = { - ai_rationality <= -50 - OR = { - has_personality_emotional_trigger = yes - has_personality_extroverted_trigger = yes - } - has_personality_dominant_trigger = no - } - modifier = { - ai_rationality <= -75 - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_silly - } - } - 100 = { - trigger = { - gold >= 500 - ai_greed >= 50 - } - modifier = { - gold >= 2000 - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_moneybags - } - } - 100 = { - trigger = { - has_personality_malicious_trigger = yes - ai_boldness >= 25 - any_killed_character = { - count >= 1 - always = yes - } - } - modifier = { - any_killed_character = { - count >= 3 - always = yes - } - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_ruthless - } - } - 100 = { - trigger = { - has_personality_dominant_trigger = yes - has_personality_malicious_trigger = yes - prowess >= 12 - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:nick_recipient } - } - set_nickname_effect = { - NICKNAME = nick_the_brute - } - } - 100 = { - trigger = { - OR = { - has_trait = sadistic - has_trait = torturer - has_trait = murderer - has_trait = kinslayer_1 - has_trait = kinslayer_2 - has_trait = kinslayer_3 - } - } - modifier = { - any_killed_character = { - count >= 4 - always = yes - } - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_butcher - } - } - 100 = { - trigger = { - any_killed_character = { - count >= 3 - always = yes - } - } - modifier = { - any_killed_character = { - count >= 5 - always = yes - } - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_bloody - } - } - 100 = { - trigger = { - OR = { - has_trait = shy - has_trait = reclusive - has_trait = content - } - has_personality_introverted_trigger = yes - } - set_nickname_effect = { - NICKNAME = nick_the_silent - } - } - 100 = { - trigger = { - OR = { - has_trait = deviant - has_trait = cannibal - has_trait = lunatic - has_trait = incestuous - AND = { - has_personality_malicious_trigger = yes - has_personality_emotional_trigger = yes - } - } - } - set_nickname_effect = { - NICKNAME = nick_the_depraved - } - } - 100 = { - trigger = { - has_personality_malicious_trigger = yes - OR = { - has_trait = torturer - has_trait = sadistic - has_trait = callous - has_trait = vengeful - tyranny > 0 - dread >= 50 - } - } - set_nickname_effect = { - NICKNAME = nick_the_cruel - } - } - 100 = { - trigger = { - has_personality_malicious_trigger = yes - OR = { - has_trait = giant - has_trait = beauty_bad_2 - has_trait = beauty_bad_3 - has_trait = scaly - } - OR = { - tyranny > 0 - dread >= 20 - } - } - set_nickname_effect = { - NICKNAME = nick_the_abominable - } - } - 100 = { - trigger = { - OR = { - AND = { - has_personality_malicious_trigger = yes - num_sinful_traits = 1 - } - num_sinful_traits > 1 - piety_level <= 0 - has_trait = excommunicated - } - } - modifier = { - num_sinful_traits > 2 - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_wicked - } - } - 100 = { - trigger = { - OR = { - num_sinful_traits >= 1 - piety_level <= 0 - has_trait = excommunicated - } - } - modifier = { - num_sinful_traits >= 2 - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_accursed - } - } - 100 = { - trigger = { - exists = cp:councillor_court_chaplain - opinion = { - target = cp:councillor_court_chaplain - value <= -50 - } - } - modifier = { - num_sinful_traits >= 1 - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_priest_hater - } - } - 100 = { - trigger = { - top_liege != this - NOR = { - religion = liege.religion - faith = { has_doctrine = doctrine_pluralism_pluralistic } - } - } - set_nickname_effect = { - NICKNAME = nick_the_heathen - } - } - 100 = { - trigger = { - faith.religion = { is_in_family = rf_abrahamic } - OR = { - dread >= 25 - piety_level <= 0 - has_trait = excommunicated - } - has_personality_malicious_trigger = yes - } - modifier = { - num_sinful_traits >= 2 - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_devil - } - } - 100 = { - trigger = { - faith.religion = { is_in_family = rf_abrahamic } - OR = { - num_sinful_traits >= 1 - piety_level <= 0 - has_trait = excommunicated - } - has_personality_dominant_trigger = yes - } - set_nickname_effect = { - NICKNAME = nick_the_black - } - } - 100 = { - trigger = { - OR = { - AND = { - has_personality_malicious_trigger = yes - dread > 0 - } - tyranny >= 10 - dread >= 50 - } - } - modifier = { - tyranny >= 75 - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_terrible - } - } - 100 = { - trigger = { - OR = { - has_personality_dominant_trigger = yes - tyranny >= 25 - } - tyranny >= 0 - } - modifier = { - tyranny >= 50 - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_tyrant - } - } - 50 = { - trigger = { - age >= 60 - } - modifier = { - age >= 80 - factor = 5 - } - set_nickname_effect = { - NICKNAME = nick_the_old - } - } - 100 = { - trigger = { - OR = { - has_trait = shy - has_trait = reclusive - } - has_personality_introverted_trigger = yes - } - modifier = { - has_personality_submissive_trigger = yes - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_shy - } - } - 100 = { - trigger = { - age <= 25 - } - modifier = { - age <= 20 - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_young - } - } - 100 = { - trigger = { - is_male = yes - OR = { - has_trait = bastard - has_trait = legitimized_bastard - has_trait = bastard_founder - } - } - modifier = { - prestige_level <= 1 - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_bastard - } - } - 100 = { - trigger = { - OR = { - AND = { - has_personality_dominant_trigger = yes - ai_boldness >= 50 - } - has_trait = arrogant - has_trait = ambitious - } - } - modifier = { - prestige_level >= 2 - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_proud - } - } - 100 = { - trigger = { - OR = { - loves_food_trigger = yes - has_trait = lifestyle_reveler - has_trait = gluttonous - current_weight >= 50 - } - } - modifier = { - current_weight >= 75 - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_girthy - } - } - 100 = { - trigger = { - OR = { - has_trait = lunatic - has_trait = possessed - has_trait = eccentric - AND = { - ai_rationality <= -50 - tyranny >= 25 - has_personality_emotional_trigger = yes - } - } - } - set_nickname_effect = { - NICKNAME = nick_the_mad - } - } - 100 = { - trigger = { - probably_unintelligent_trigger = yes - } - set_nickname_effect = { - NICKNAME = nick_the_simple - } - } - 500 = { - trigger = { - has_trait = leper - } - set_nickname_effect = { - NICKNAME = nick_the_leper - } - } - 300 = { - trigger = { - OR = { - has_trait = maimed - scarred_trait_activation_3 = yes - } - } - set_nickname_effect = { - NICKNAME = nick_half_hand - } - } - 100 = { - trigger = { - OR = { - has_trait = beauty_bad - has_trait = hunchbacked - has_trait = scaly - has_trait = disfigured - has_trait = inbred - scarred_trait_activation_3 = yes - } - NOT = { - has_trait = beauty_good - } - } - modifier = { - OR = { - has_trait = beauty_bad_2 - has_trait = beauty_bad_3 - } - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_hideous - } - } - 100 = { - trigger = { - OR = { - has_trait = beauty_bad - has_trait = hunchbacked - has_trait = scaly - has_trait = inbred - } - NOT = { - has_trait = beauty_good - } - } - modifier = { - OR = { - has_trait = beauty_bad_2 - has_trait = beauty_bad_3 - } - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_frog - } - } - 100 = { - trigger = { - OR = { - has_trait = beauty_bad - has_trait = hunchbacked - has_trait = scaly - has_trait = inbred - scarred_trait_activation_3 = yes - } - NOT = { - has_trait = beauty_good - } - } - modifier = { - OR = { - has_trait = beauty_bad_2 - has_trait = beauty_bad_3 - } - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_repulsive - } - } - 100 = { - trigger = { - OR = { - has_trait = infirm - has_trait = weak - has_trait = spindly - has_trait = physique_bad - has_trait = bleeder - has_trait = inbred - } - NOT = { - has_trait = physique_good - } - } - modifier = { - OR = { - has_trait = physique_bad_2 - has_trait = physique_bad_3 - } - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_frail - } - } - 100 = { - trigger = { - prowess < 10 - OR = { - has_trait = infirm - has_trait = spindly - has_trait = weak - has_trait = physique_bad - has_trait = bleeder - has_trait = inbred - prowess <= 2 - } - NOT = { - has_trait = physique_good - } - } - modifier = { - OR = { - has_trait = physique_bad_2 - has_trait = physique_bad_3 - } - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_weak - } - } - 100 = { - trigger = { - OR = { - has_trait = clubfooted - has_trait = weak - has_trait = spindly - has_trait = physique_bad - has_trait = infirm - } - NOT = { - has_trait = physique_good - } - } - modifier = { - has_trait = clubfooted - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_lame - } - } - 1000 = { - trigger = { - has_trait = lisping - has_trait = clubfooted - } - set_nickname_effect = { - NICKNAME = nick_the_lisp_and_lame - } - } - 300 = { - trigger = { - has_trait = hunchbacked - } - set_nickname_effect = { - NICKNAME = nick_the_hunchback - } - } - 100 = { - trigger = { - OR = { - loves_food_trigger = yes - has_trait = lifestyle_reveler - has_trait = gluttonous - current_weight >= 50 - } - } - modifier = { - current_weight >= 75 - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_fat - } - } - 100 = { - trigger = { - culture = culture:anglo_saxon - OR = { - loves_food_trigger = yes - has_trait = lifestyle_reveler - current_weight >= 50 - } - } - modifier = { - current_weight >= 75 - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_chubbycheeks - } - } - 50 = { - trigger = { - OR = { - current_weight >= 50 - loves_food_trigger = yes - has_trait = lifestyle_reveler - has_trait = gluttonous - } - diplomacy <= 8 - } - modifier = { - current_weight >= 75 - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_slobberer - } - } - 50 = { - trigger = { - OR = { - current_weight >= 50 - loves_food_trigger = yes - has_trait = lifestyle_reveler - has_trait = gluttonous - } - } - modifier = { - current_weight >= 75 - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_rotund - } - } - 25 = { - trigger = { - OR = { - current_weight >= 50 - loves_food_trigger = yes - has_trait = lifestyle_reveler - has_trait = gluttonous - } - } - modifier = { - current_weight >= 75 - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_plump - } - } - 200 = { - trigger = { - has_trait = blind - } - set_nickname_effect = { - NICKNAME = nick_the_blind - } - } - 200 = { - trigger = { - has_trait = stuttering - } - set_nickname_effect = { - NICKNAME = nick_the_stammerer - } - } - 200 = { - trigger = { - has_trait = gout_ridden - } - set_nickname_effect = { - NICKNAME = nick_the_gouty - } - } - 100 = { - trigger = { - OR = { - has_trait = consumption - has_trait = cancer - has_trait = pneumonic - has_trait = typhus - has_trait = smallpox - has_trait = measles - has_trait = dysentery - has_trait = ergotism - has_trait = bubonic_plague - } - } - set_nickname_effect = { - NICKNAME = nick_the_diseased - } - } - 25 = { - trigger = { - dynasty ?= { dynasty_prestige_level >= 2 } - prestige_level <= 1 - } - set_nickname_effect = { - NICKNAME = nick_the_disgraceful - } - } - 100 = { - trigger = { - OR = { - has_trait = maimed - AND = { - has_trait = scarred - prowess < 8 - } - } - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:nick_recipient } - } - set_nickname_effect = { - NICKNAME = nick_bad_hand - } - } - 100 = { - trigger = { - has_trait = one_eyed - } - set_nickname_effect = { - NICKNAME = nick_the_one_eyed - } - } - 50 = { - trigger = { - OR = { - has_trait = craven - AND = { - has_personality_submissive_trigger = yes - dread <= 0 - } - } - } - modifier = { - prestige_level <= 1 - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_trembling - } - } - 100 = { - trigger = { - has_trait = craven - has_personality_submissive_trigger = yes - } - modifier = { - prestige_level <= 1 - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_craven - } - } - 100 = { - trigger = { - OR = { - has_trait = lunatic - has_trait = possessed - has_trait = eccentric - AND = { - tyranny >= 50 - ai_rationality <= -50 - has_personality_emotional_trigger = yes - } - } - } - set_nickname_effect = { - NICKNAME = nick_the_insane - } - } - 100 = { - trigger = { - OR = { - AND = { - has_personality_introverted_trigger = yes - has_personality_levelheaded_trigger = yes - } - has_trait = depressed_1 - has_trait = depressed_genetic - } - } - set_nickname_effect = { - NICKNAME = nick_the_joyless - } - } - 100 = { - trigger = { - probably_unintelligent_trigger = yes - OR = { - has_personality_introverted_trigger = yes - has_personality_levelheaded_trigger = yes - } - } - set_nickname_effect = { - NICKNAME = nick_the_dull - } - } - 100 = { - trigger = { - has_trait = one_eyed - } - set_nickname_effect = { - NICKNAME = nick_one_eye - } - } - 300 = { - trigger = { - has_trait = maimed - } - set_nickname_effect = { - NICKNAME = nick_one_hand - } - } - 300 = { - trigger = { - intrigue >= 15 - has_trait = disfigured - } - set_nickname_effect = { - NICKNAME = nick_of_a_thousand_faces - } - } - 100 = { - trigger = { - OR = { - has_trait = consumption - has_trait = cancer - has_trait = pneumonic - has_trait = typhus - has_trait = smallpox - has_trait = measles - has_trait = dysentery - has_trait = ergotism - has_trait = bubonic_plague - } - } - set_nickname_effect = { - NICKNAME = nick_the_plaguebearer - } - } - 100 = { - trigger = { - OR = { - has_trait = physique_good - has_trait = beauty_good - } - OR = { - has_trait = physique_bad_2 - has_trait = physique_bad_3 - has_trait = beauty_bad_2 - has_trait = beauty_bad_3 - has_trait = giant - has_trait = albino - has_trait = scaly - has_trait = spindly - has_trait = hunchbacked - } - } - set_nickname_effect = { - NICKNAME = nick_the_chimera - } - } - 50 = { - trigger = { - highest_held_title_tier <= tier_duchy - domain_size <= 2 - any_sibling = { - highest_held_title_tier >= tier_kingdom - domain_size >= 4 - prestige_level >= scope:nick_recipient.prestige_level - } - } - set_nickname_effect = { - NICKNAME = nick_lackland - } - } - 100 = { - trigger = { - OR = { - has_trait = strong - has_trait = physique_good - prowess >= 18 - } - OR = { - has_trait = beauty_bad - has_trait = hunchbacked - has_trait = scaly - has_trait = disfigured - scarred_trait_activation_3 = yes - } - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:nick_recipient } - } - set_nickname_effect = { - NICKNAME = nick_the_boar - } - } - 100 = { - trigger = { - has_trait = disfigured - has_personality_introverted_trigger = yes - } - set_nickname_effect = { - NICKNAME = nick_the_faceless - } - } - 300 = { - trigger = { - has_trait = giant - has_trait = one_eyed - } - set_nickname_effect = { - NICKNAME = nick_the_cyclops - } - } - 100 = { - trigger = { - has_trait = giant - OR = { - has_trait = weak - has_trait = spindly - has_trait = physique_bad - } - } - set_nickname_effect = { - NICKNAME = nick_the_beanstalk - } - } - 100 = { - trigger = { - OR = { - tyranny > 0 - stewardship <= 4 - } - diplomacy <= 8 - } - modifier = { - diplomacy <= 4 - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_ill_ruler - } - } - 100 = { - trigger = { - is_in_civil_war = yes - OR = { - tyranny > 0 - diplomacy <= 8 - } - } - modifier = { - diplomacy <= 4 - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_careless - } - } - 50 = { - trigger = { - gold <= 0 - } - modifier = { - factor = debt_level - } - set_nickname_effect = { - NICKNAME = nick_of_the_empty_pockets - } - } - 100 = { - trigger = { - OR = { - has_trait = infirm - probably_unintelligent_trigger = yes - } - } - modifier = { - has_trait = fickle - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_forgetful - } - } - 100 = { - trigger = { - OR = { - has_trait = shy - has_trait = reclusive - } - has_personality_introverted_trigger = yes - } - set_nickname_effect = { - NICKNAME = nick_the_hermit - } - } - 100 = { - trigger = { - OR = { - has_trait = shy - has_trait = reclusive - } - has_personality_introverted_trigger = yes - } - set_nickname_effect = { - NICKNAME = nick_the_recluse - } - } - 100 = { - trigger = { - OR = { - has_trait = infirm - has_trait = spindly - has_trait = weak - has_trait = physique_bad - has_trait = bleeder - has_trait = inbred - prowess <= 2 - } - NOR = { - has_trait = strong - has_trait = physique_good - } - } - set_nickname_effect = { - NICKNAME = nick_the_feeble - } - } - 100 = { - trigger = { - has_personality_dominant_trigger = yes - OR = { - has_trait = arrogant - has_trait = lustful - has_trait = lazy - has_personality_extroverted_trigger = yes - } - has_trait = beauty_good - } - set_nickname_effect = { - NICKNAME = nick_the_vain - } - } - 100 = { - trigger = { - ai_zeal >= 100 - ai_rationality <= -20 - } - set_nickname_effect = { - NICKNAME = nick_the_zealot - } - } - 100 = { - trigger = { - has_personality_malicious_trigger = yes - OR = { - has_trait = sadistic - has_trait = callous - num_sinful_traits >= 1 - } - } - modifier = { - num_sinful_traits >= 2 - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_evil - } - } - 100 = { - trigger = { - OR = { - has_trait = lifestyle_mystic - has_trait = lunatic - has_trait = possessed - has_trait = witch - has_trait = eccentric - } - has_trait_malicious_trigger = no - } - set_nickname_effect = { - NICKNAME = nick_the_strange - } - } - 100 = { - trigger = { - has_trait = possessed - } - set_nickname_effect = { - NICKNAME = nick_the_haunted - } - } - 300 = { - trigger = { - OR = { - AND = { - diplomacy <= 6 - stewardship <= 6 - martial <= 6 - intrigue <= 6 - learning <= 6 - } - stress_level >= 3 - } - } - set_nickname_effect = { - NICKNAME = nick_the_unlucky - } - } - 100 = { - trigger = { - is_male = yes - prowess <= 4 - martial <= 4 - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:nick_recipient } - } - set_nickname_effect = { - NICKNAME = nick_the_effeminate - } - } - 100 = { - trigger = { - is_male = yes - culture = culture:anglo_saxon - prowess <= 6 - fertility <= 0.4 - NOT = { - any_child = { - count > 1 - } - } - } - set_nickname_effect = { - NICKNAME = nick_softsword - } - } - 100 = { - trigger = { - has_trait = fickle - ai_rationality <= -25 - } - modifier = { - probably_unintelligent_trigger = yes - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_clueless - } - } - 100 = { - trigger = { - ai_vengefulness >= 35 - OR = { - has_trait = wrathful - has_trait = irritable - has_trait = fickle - has_trait = stubborn - } - } - set_nickname_effect = { - NICKNAME = nick_the_ill_tempered - } - } - 100 = { - trigger = { - OR = { - has_trait = lazy - AND = { - has_trait = reclusive - ai_energy <= -20 - } - } - NOR = { - has_trait = ambitious - has_trait = diligent - } - } - modifier = { - calc_true_if = { - amount >= 2 - prestige_level <= 2 - } - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_do_nothing - } - } - 100 = { - trigger = { - has_trait = lazy - ai_greed <= -20 - NOR = { - has_trait = ambitious - } - } - modifier = { - calc_true_if = { - amount >= 2 - prestige_level <= 2 - } - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_indolent - } - } - 100 = { - trigger = { - has_trait = lazy - ai_boldness <= -20 - } - modifier = { - calc_true_if = { - amount >= 2 - prestige_level <= 2 - } - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_sluggard - } - } - 100 = { - trigger = { - has_trait = lazy - ai_boldness <= -20 - ai_energy <= -20 - } - modifier = { - calc_true_if = { - amount >= 2 - prestige_level <= 2 - } - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_idle - } - } - 100 = { - trigger = { - has_trait = dwarf - } - set_nickname_effect = { - NICKNAME = nick_the_short - } - } - 100 = { - trigger = { - has_trait = dwarf - } - set_nickname_effect = { - NICKNAME = nick_elbow_high - } - } - 100 = { - trigger = { - has_trait = wrathful - ai_rationality <= -25 - any_relation = { type = rival } - } - set_nickname_effect = { - NICKNAME = nick_the_wrathful - } - } - 100 = { - trigger = { - diplomacy <= 4 - has_personality_emotional_trigger = yes - } - set_nickname_effect = { - NICKNAME = nick_the_petulant - } - } - 100 = { - trigger = { - has_personality_emotional_trigger = yes - num_of_relation_rival >= 2 - } - set_nickname_effect = { - NICKNAME = nick_the_quarrelsome - } - } - 100 = { - trigger = { is_eunuch_trigger = yes } - set_nickname_effect = { - NICKNAME = nick_the_eunuch - } - } - 2000 = { - trigger = { - has_trait = incapable - } - set_nickname_effect = { - NICKNAME = nick_the_sleeper - } - } - 2000 = { - trigger = { - has_trait = incapable - highest_held_title_tier >= tier_kingdom - } - set_nickname_effect = { - NICKNAME = nick_the_sleeping_king - } - } - 1000 = { - trigger = { - exists = liege - exists = mother - liege.culture = { - OR = { - this = culture:greek - any_parent_culture_or_above = { - this = culture:greek - } - } - } - culture = { - OR = { - this = culture:greek - any_parent_culture_or_above = { - this = culture:greek - } - } - } - mother.culture = { - NOR = { - this = culture:greek - any_parent_culture_or_above = { - this = culture:greek - } - } - } - NOT = { - faith = { has_dominant_ruling_gender = dummy_male} - } - } - give_nickname = nick_the_foreign_mother - trigger_event = lifestyle_nicknames.1000 - } - 1000 = { - trigger = { - exists = liege - exists = father - liege.culture = { - OR = { - this = culture:greek - any_parent_culture_or_above = { - this = culture:greek - } - } - } - culture = { - OR = { - this = culture:greek - any_parent_culture_or_above = { - this = culture:greek - } - } - } - father.culture = { - NOR = { - this = culture:greek - any_parent_culture_or_above = { - this = culture:greek - } - } - } - NOT = { - faith = { has_dominant_ruling_gender = dummy_female} - } - } - give_nickname = nick_the_foreign_father - trigger_event = lifestyle_nicknames.1000 - } - 100 = { - trigger = { - OR = { - loves_food_trigger = yes - has_trait = lifestyle_reveler - has_trait = gluttonous - current_weight >= 50 - } - } - modifier = { - current_weight >= 75 - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_corpulent - } - } - 100 = { - trigger = { - top_liege != this - OR = { - is_a_faction_member = yes - has_trait = disloyal - opinion = { - target = liege - value <= -60 - } - } - ai_boldness >= low_positive_ai_value - } - set_nickname_effect = { - NICKNAME = nick_the_insubordinate - } - } - 100 = { - trigger = { - has_trait = disloyal - intrigue >= 10 - } - modifier = { - is_at_war_with_liege = yes - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_backstabber - } - } - 100 = { - trigger = { - ai_greed >= 25 - ai_honor <= 25 - gold >= massive_gold_value - } - modifier = { - has_trait = disloyal - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_corrupt - } - } - 100 = { - trigger = { - probably_unintelligent_trigger = yes - OR = { - AND = { - diplomacy <= 6 - martial <= 6 - stewardship <= 6 - intrigue <= 6 - learning <= 6 - } - AND = { - government_allows = administrative - governor_efficiency <= 0.7 - } - } - } - modifier = { - government_allows = administrative - governor_efficiency <= 0.6 - factor = 2 - } - set_nickname_effect = { - NICKNAME = nick_the_incompetent - } - } - 100 = { - trigger = { - ai_rationality <= -25 - ai_boldness > 0 - OR = { - has_trait = profligate - has_trait = reckless - } - } - set_nickname_effect = { - NICKNAME = nick_the_gambler - } - } - 100 = { - trigger = { - diplomacy <= 5 - has_personality_extroverted_trigger = yes - OR = { - has_trait = wrathful - has_trait = drunkard - has_trait = honest - has_trait = eccentric - has_trait = impatient - } - } - set_nickname_effect = { - NICKNAME = nick_the_obscene - } - } - 100 = { - trigger = { - has_trait = greedy - gold >= major_gold_value - NOT = { - has_trait = improvident - } - OR = { - has_royal_court = no - court_grandeur_current_level < court_grandeur_minimum_expected_level - } - } - set_nickname_effect = { - NICKNAME = nick_the_miser - } - } - #Fallback - 1 = { - trigger = { - } - set_nickname_effect = { - NICKNAME = nick_the_unfortunate - } - } - } - } -} diff --git a/N3OW/common/scripted_effects/00_parent_effects.txt b/N3OW/common/scripted_effects/00_parent_effects.txt deleted file mode 100644 index ef3bff84..00000000 --- a/N3OW/common/scripted_effects/00_parent_effects.txt +++ /dev/null @@ -1,84 +0,0 @@ -#Effects used in parent events - - -##################################################################### -# EFFECT LIST -##################################################################### -# !!! Remember to add all new effects with a short description here !!! -# - -#increase_parent_meddling_value_effect -#decrease_parent_meddling_value_effect - - -###################################################################### -# EFFECTS -###################################################################### - -#Effects for increasing and decreasing the parent_meddling variable value used in parent_events -increase_parent_meddling_value_effect = { - hidden_effect = { - if = { - limit = { - root = { is_ai = no } - has_variable = parent_meddling - } - change_variable = { - name = parent_meddling - add = 1 - } - } - else = { - set_variable = { - name = parent_meddling - value = 1 - } - } - random = { - chance = 10 - modifier = { - trigger = { has_variable = parent_meddling } - add = { - value = var:parent_meddling - multiply = 10 - } - } - trigger_event = { - on_action = parent_meddling_outcome - days = { 180 365 } - } - } - } -} - -decrease_parent_meddling_value_effect = { - hidden_effect = { - if = { - limit = { - root = { is_ai = no } - has_variable = parent_meddling - var:parent_meddling > 1 - } - change_variable = { - name = parent_meddling - add = -1 - } - } - else_if = { - limit = { has_variable = parent_meddling } - remove_variable = parent_meddling - } - } -} - -remove_parent_meddling_value_effect = { - hidden_effect = { - if = { - limit = { - root = { is_ai = no } - has_variable = parent_meddling - } - remove_variable = parent_meddling - } - } -} \ No newline at end of file diff --git a/N3OW/common/scripted_effects/00_personal_details_effects.txt b/N3OW/common/scripted_effects/00_personal_details_effects.txt deleted file mode 100644 index 0fb9342c..00000000 --- a/N3OW/common/scripted_effects/00_personal_details_effects.txt +++ /dev/null @@ -1,1422 +0,0 @@ -#Effects used in parent events - - -##################################################################### -# EFFECT LIST -##################################################################### -# !!! Remember to add all new effects with a short description here !!! -# - -#assign_quirk_effect -#get_quirk_character_effect = Used to make sure that a character used for a quirk has one, and utilises assign_quirk_effect if they're missing one. -#set_signature_weapon_effect -#pick_servant_romance_target_effect -#set_favorite_treat_effect -#set_favorite_toy_effect - -###################################################################### -# EFFECTS -###################################################################### - - -#Used to find a permanent quirk for a character -# Use get_quirk_character_effect for better performence as it also checks if root in an event is an AI! -assign_quirk_effect = { - if = { - limit = { - exists = var:my_quirk - var:my_quirk = flag:fallback - } - remove_variable = my_quirk #to give character's that were assigned the fallback a chance for better things - } - if = { - limit = { - NOT = { exists = var:my_quirk } - } - hidden_effect = { - random_list = { - 1 = { - trigger = { - OR = { - has_trait = shy - has_trait = pensive - } - } - set_variable = { - name = my_quirk - value = flag:shy - } - } - 1 = { - trigger = { has_trait = arrogant } - set_variable = { - name = my_quirk - value = flag:arrogant - } - } - 1 = { - trigger = { has_trait = impatient } - set_variable = { - name = my_quirk - value = flag:impatient - } - } - 1 = { - trigger = { has_trait = lustful } - set_variable = { - name = my_quirk - value = flag:lustful - } - } - 1 = { - trigger = { has_trait = chaste } - set_variable = { - name = my_quirk - value = flag:chaste - } - } - 1 = { - trigger = { has_trait = temperate } - set_variable = { - name = my_quirk - value = flag:temperate - } - } - 1 = { - trigger = { has_trait = gluttonous } - set_variable = { - name = my_quirk - value = flag:gluttonous - } - } - 1 = { - trigger = { has_trait = greedy } - set_variable = { - name = my_quirk - value = flag:greedy - } - } - 1 = { - trigger = { - OR = { - has_trait = diligent - has_trait = bossy - has_trait = curious - } - } - set_variable = { - name = my_quirk - value = flag:diligent - } - } - 1 = { - trigger = { has_trait = lazy } - set_variable = { - name = my_quirk - value = flag:lazy - } - } - 1 = { - trigger = { has_trait = wrathful } - set_variable = { - name = my_quirk - value = flag:wrathful - } - } - 1 = { - trigger = { - OR = { - has_trait = calm - has_trait = pensive - } - } - set_variable = { - name = my_quirk - value = flag:calm - } - } - 1 = { - trigger = { has_trait = impatient } - set_variable = { - name = my_quirk - value = flag:impatient - } - } - 1 = { - trigger = { has_trait = humble } - set_variable = { - name = my_quirk - value = flag:humble - } - } - 1 = { - trigger = { - OR = { - has_trait = deceitful - has_trait = charming - } - } - set_variable = { - name = my_quirk - value = flag:deceitful - } - } - 1 = { - trigger = { has_trait = honest } - set_variable = { - name = my_quirk - value = flag:honest - } - } - 1 = { - trigger = { has_trait = generous } - set_variable = { - name = my_quirk - value = flag:generous - } - } - 1 = { - trigger = { has_trait = craven } - set_variable = { - name = my_quirk - value = flag:craven - } - } - 1 = { - trigger = { - OR = { - has_trait = brave - has_trait = rowdy - } - } - set_variable = { - name = my_quirk - value = flag:brave - } - } - 1 = { - trigger = { - OR = { - has_trait = gregarious - has_trait = charming - has_trait = curious - } - } - set_variable = { - name = my_quirk - value = flag:gregarious - } - } - 1 = { - trigger = { has_trait = ambitious } - set_variable = { - name = my_quirk - value = flag:ambitious - } - } - 1 = { - trigger = { has_trait = arbitrary } - set_variable = { - name = my_quirk - value = flag:arbitrary - } - } - 1 = { - trigger = { has_trait = just } - set_variable = { - name = my_quirk - value = flag:just - } - } - 1 = { - trigger = { has_trait = cynical } - set_variable = { - name = my_quirk - value = flag:cynical - } - } - 1 = { - trigger = { has_trait = zealous } - set_variable = { - name = my_quirk - value = flag:zealous - } - } - 1 = { - trigger = { has_trait = paranoid } - set_variable = { - name = my_quirk - value = flag:paranoid - } - } - 1 = { - trigger = { has_trait = trusting } - set_variable = { - name = my_quirk - value = flag:trusting - } - } - 1 = { - trigger = { has_trait = compassionate } - set_variable = { - name = my_quirk - value = flag:compassionate - } - } - 1 = { - trigger = { has_trait = sadistic } - set_variable = { - name = my_quirk - value = flag:sadistic - } - } - 1 = { - trigger = { has_trait = vengeful } - set_variable = { - name = my_quirk - value = flag:vengeful - } - } - 1 = { - trigger = { has_trait = forgiving } - set_variable = { - name = my_quirk - value = flag:forgiving - } - } - 1 = { - trigger = { has_trait = lunatic } - set_variable = { - name = my_quirk - value = flag:lunatic - } - } - 1 = { - trigger = { has_trait = leper } - set_variable = { - name = my_quirk - value = flag:leper - } - } - 1 = { - trigger = { has_trait = gout_ridden } - set_variable = { - name = my_quirk - value = flag:gout_ridden - } - } - 1 = { - trigger = { has_trait = consumption } - set_variable = { - name = my_quirk - value = flag:consumption - } - } - 1 = { - trigger = { number_of_personality_traits = 0 } #fallback for kids etc. - set_variable = { - name = my_quirk - value = flag:fallback - } - } - } - } - } -} - - -#Used to make sure that a character used for a quirk has one -#Utilises assign_quirk_effect, and must always be placed in the same file, after that one. -get_quirk_character_effect = { - if = { - limit = { - root = { is_ai = no } - } - if = { - limit = { - has_variable = my_quirk - } - save_scope_as = quirk_character - } - else = { - assign_quirk_effect = yes - save_scope_as = quirk_character - } - } -} - - -#Sets a character's signature weapon effect, if they do not already have one. -set_signature_weapon_effect = { - save_temporary_scope_as = this_character - # If we're wielding an artifact weapon, override our signature weapon type with what we have equipped. - if = { - limit = { - NOT = { has_variable = temporary_signature_weapon } - any_equipped_character_artifact = { - artifact_slot_type = primary_armament - OR = { - artifact_type = axe - artifact_type = hammer - artifact_type = spear - artifact_type = mace - artifact_type = dagger - artifact_type = sword - } - } - } - random_equipped_character_artifact = { - limit = { - artifact_slot_type = primary_armament - OR = { - artifact_type = axe - artifact_type = hammer - artifact_type = spear - artifact_type = mace - artifact_type = dagger - artifact_type = sword - } - } - save_scope_as = equipped_signature_weapon - scope:this_character = { - set_variable = { - name = signature_weapon_scope - value = scope:equipped_signature_weapon - } - if = { - limit = { scope:equipped_signature_weapon = { artifact_type = axe } } - set_variable = { - name = signature_weapon - value = flag:axe - } - } - if = { - limit = { scope:equipped_signature_weapon = { artifact_type = hammer } } - set_variable = { - name = signature_weapon - value = flag:hammer - } - } - if = { - limit = { scope:equipped_signature_weapon = { artifact_type = spear } } - set_variable = { - name = signature_weapon - value = flag:spear - } - } - if = { - limit = { scope:equipped_signature_weapon = { artifact_type = mace } } - set_variable = { - name = signature_weapon - value = flag:mace - } - } - if = { - limit = { scope:equipped_signature_weapon = { artifact_type = dagger } } - set_variable = { - name = signature_weapon - value = flag:dagger - } - } - if = { - limit = { scope:equipped_signature_weapon = { artifact_type = sword } } - set_variable = { - name = signature_weapon - value = flag:sword - } - } - } - clear_saved_scope = equipped_signature_weapon # Clear the saved scope so we don't clone artifacts when this effect is run multiple times in sucession. - } - } - # Otherwise, if we do not have an equipped artifact AND we do not yet have a signature weapon type, pick one at random. - else_if = { - limit = { - NOR = { - has_variable = signature_weapon - has_variable = temporary_signature_weapon - } - } - hidden_effect = { - random_list = { - 30 = { - set_variable = { - name = signature_weapon - value = flag:sword - } - modifier = { - add = 150 - culture = { has_cultural_pillar = heritage_japonic } - } - } - - 10 = { - set_variable = { - name = signature_weapon - value = flag:mace - } - } - 10 = { - set_variable = { - name = signature_weapon - value = flag:axe - } - # Weight up the axe-bearing foreigners chance of bearing axes. - modifier = { - add = 150 - has_trait = varangian - } - modifier = { - add = 50 - culture = { has_cultural_pillar = heritage_north_germanic } - } - } - 5 = { - set_variable = { - name = signature_weapon - value = flag:hammer - } - } - 5 = { - set_variable = { - name = signature_weapon - value = flag:spear - } - } - 5 = { - trigger = { - intrigue > 12 - } - set_variable = { - name = signature_weapon - value = flag:dagger - } - } - } - } - - # If we had previously saved an equipped artifact scope, but no longer have that artifact equipped, remove the saved scope variable. - if = { - limit = { exists = var:signature_weapon_scope } - remove_variable = signature_weapon_scope - } - } -} - -#Sets a temporary signature weapon for a single duel. You have to assign WEAPON_TYPE parameter with a weapon type you want to use. -# Available weapon types: axe, hammer, spear, mace, dagger, sword, wooden_sword. -#Effect is removed by single_combat_clean_temp_weapon_effect triggered in combat conclusion events: single_combat.0031 and single_combat.0041 -set_temporary_signature_weapon = { - save_temporary_scope_as = wielding_character - scope:wielding_character = { - set_variable = { #save passed down weapon type to be the temp weapon for this battle - name = temporary_signature_weapon - value = flag:$WEAPON_TYPE$ - } - } - if = { - limit = { - scope:wielding_character = { - has_variable = signature_weapon - has_variable = temporary_signature_weapon - } - } - scope:wielding_character = { - set_variable = { #save the original signature_weapon if this character had one - name = og_signature_weapon - value = var:signature_weapon - } - switch = { #set the temporary weapon as a signature_weapon - trigger = var:temporary_signature_weapon - flag:axe = { - set_variable = { - name = signature_weapon - value = flag:axe - } - } - flag:hammer = { - set_variable = { - name = signature_weapon - value = flag:hammer - } - } - flag:spear = { - set_variable = { - name = signature_weapon - value = flag:spear - } - } - flag:mace = { - set_variable = { - name = signature_weapon - value = flag:mace - } - } - flag:dagger = { - set_variable = { - name = signature_weapon - value = flag:dagger - } - } - flag:sword = { - set_variable = { - name = signature_weapon - value = flag:sword - } - } - flag:wooden_sword = { - set_variable = { - name = signature_weapon - value = flag:wooden_sword - } - } - } - } - } - else_if = { - limit = { - scope:wielding_character = { - has_variable = temporary_signature_weapon - } - } - scope:wielding_character = { - set_variable = { #remember that there were no original signature_weapon - name = og_signature_weapon - value = flag:no_signature_weapon_yet - } - switch = { #set the temporary weapon as a signature_weapon - trigger = var:temporary_signature_weapon - flag:axe = { - set_variable = { - name = signature_weapon - value = flag:axe - } - } - flag:hammer = { - set_variable = { - name = signature_weapon - value = flag:hammer - } - } - flag:spear = { - set_variable = { - name = signature_weapon - value = flag:spear - } - } - flag:mace = { - set_variable = { - name = signature_weapon - value = flag:mace - } - } - flag:dagger = { - set_variable = { - name = signature_weapon - value = flag:dagger - } - } - flag:sword = { - set_variable = { - name = signature_weapon - value = flag:sword - } - } - flag:wooden_sword = { - set_variable = { - name = signature_weapon - value = flag:wooden_sword - } - } - } - } - } -} - -#Pick out "who" among the commoners a given character has a dalliance with -pick_servant_romance_target_effect = { - if = { - limit = { NOT = { has_variable = servant_romance_target } } - hidden_effect = { - random_list = { - 1 = { - trigger = { - is_attracted_to_men = yes - } - set_variable = { - name = servant_romance_target - value = flag:stable_boy - } - } - 1 = { - trigger = { - is_attracted_to_men = yes - } - set_variable = { - name = servant_romance_target - value = flag:page - } - } - 1 = { - trigger = { - is_attracted_to_women = yes - } - set_variable = { - name = servant_romance_target - value = flag:scullery_maid - } - } - 1 = { - set_variable = { - name = servant_romance_target - value = flag:chandler - } - } - 1 = { - trigger = { - is_attracted_to_women = yes - } - set_variable = { - name = servant_romance_target - value = flag:launderer - } - } - 1 = { - set_variable = { - name = servant_romance_target - value = flag:naperer - } - } - 1 = { - set_variable = { - name = servant_romance_target - value = flag:scalder - } - } - 1 = { - set_variable = { - name = servant_romance_target - value = flag:saucerer - } - } - } - } - } -} - -set_favorite_treat_effect = { - if = { - limit = { NOT = { has_variable = favorite_treat } } - hidden_effect = { - random_list = { - 10 = { - trigger = { - trigger_if = { - limit = { - exists = capital_province - is_travelling = no #Let's pick something from our location instead. - } - capital_province = { - NOT = { - geographical_region = world_europe_north - } - } - } - trigger_else_if = { - limit = { - exists = liege.capital_province - is_travelling = no #Let's pick something from our location instead. - } - liege.capital_province = { - NOT = { - geographical_region = world_europe_north - } - } - } - trigger_else_if = { - limit = { - exists = location - } - location = { - NOT = { - geographical_region = world_europe_north - } - } - } - trigger_else = { - always = no - } - } - set_variable = { - name = favorite_treat - value = flag:comfit #famous in sicily - } - } - 10 = { - set_variable = { - name = favorite_treat - value = flag:roasted_almonds - } - } - 10 = { - trigger = { - trigger_if = { - limit = { - exists = capital_province - is_travelling = no #Let's pick something from our location instead. - } - capital_province = { - OR = { - geographical_region = world_middle_east_persia - geographical_region = world_middle_east - geographical_region = world_asia_minor - geographical_region = world_india - geographical_region = world_africa_north - geographical_region = world_burma - geographical_region = world_europe_south - geographical_region = world_asia_china - geographical_region = world_asia_japan - geographical_region = world_asia_korea - geographical_region = world_asia_southeast - } - } - } - trigger_else_if = { - limit = { - exists = liege.capital_province - is_travelling = no #Let's pick something from our location instead. - } - liege.capital_province = { - OR = { - geographical_region = world_middle_east_persia - geographical_region = world_middle_east - geographical_region = world_asia_minor - geographical_region = world_india - geographical_region = world_africa_north - geographical_region = world_burma - geographical_region = world_europe_south - geographical_region = world_asia_china - geographical_region = world_asia_japan - geographical_region = world_asia_korea - geographical_region = world_asia_southeast - } - } - } - trigger_else_if = { - limit = { - exists = location - } - location = { - OR = { - geographical_region = world_middle_east_persia - geographical_region = world_middle_east - geographical_region = world_asia_minor - geographical_region = world_india - geographical_region = world_africa_north - geographical_region = world_burma - geographical_region = world_europe_south - geographical_region = world_asia_china - geographical_region = world_asia_japan - geographical_region = world_asia_korea - geographical_region = world_asia_southeast - } - } - } - trigger_else = { - always = no - } - } - set_variable = { - name = favorite_treat - value = flag:nougat - } - } - 10 = { - trigger = { - trigger_if = { - limit = { - exists = capital_province - is_travelling = no #Let's pick something from our location instead. - } - capital_province = { - NOT = { - geographical_region = world_europe_north - } - } - } - trigger_else_if = { - limit = { - exists = liege.capital_province - is_travelling = no #Let's pick something from our location instead. - } - liege.capital_province = { - NOT = { - geographical_region = world_europe_north - } - } - } - trigger_else_if = { - limit = { - exists = location - } - location = { - NOT = { - geographical_region = world_europe_north - } - } - } - trigger_else = { - always = no - } - } - set_variable = { - name = favorite_treat - value = flag:marzipan #europeans & arabs, possibly eastern asaia - } - } - 2 = { - set_variable = { - name = favorite_treat - value = flag:sweetroll #A northern delicacy - } - } - 10 = { - set_variable = { - name = favorite_treat - value = flag:poached_pear - } - } - 10 = { - set_variable = { - name = favorite_treat - value = flag:pudding - } - } - 10 = { - set_variable = { - name = favorite_treat - value = flag:apple_tart - } - } - 10 = { - set_variable = { - name = favorite_treat - value = flag:strawberry_compote - } - } - 10 = { - trigger = { - trigger_if = { - limit = { - exists = capital_province - is_travelling = no #Let's pick something from our location instead. - } - capital_province = { - OR = { - geographical_region = world_europe - geographical_region = custom_greater_armenia - } - } - } - trigger_else_if = { - limit = { - exists = liege.capital_province - is_travelling = no #Let's pick something from our location instead. - } - liege.capital_province = { - OR = { - geographical_region = world_europe - geographical_region = custom_greater_armenia - } - } - } - trigger_else_if = { - limit = { - exists = location - } - location = { - OR = { - geographical_region = world_europe - geographical_region = custom_greater_armenia - } - } - } - trigger_else = { - always = no - } - } - set_variable = { - name = favorite_treat - value = flag:gingerbread #europe, armenia - } - } - 5 = { - trigger = { - trigger_if = { - limit = { - exists = capital_province - is_travelling = no #Let's pick something from our location instead. - } - capital_province = { - geographical_region = world_europe_west - } - } - trigger_else_if = { - limit = { - exists = liege.capital_province - is_travelling = no #Let's pick something from our location instead. - } - liege.capital_province = { - geographical_region = world_europe_west - } - } - trigger_else_if = { - limit = { - exists = location - } - location = { - geographical_region = world_europe_west - } - } - trigger_else = { - always = no - } - } - set_variable = { - name = favorite_treat - value = flag:frytour_blaunched #western europe - } - } - 10 = { - trigger = { - trigger_if = { - limit = { - exists = capital_province - is_travelling = no #Let's pick something from our location instead. - } - capital_province = { - NOT = { - geographical_region = world_europe_north - } - } - } - trigger_else_if = { - limit = { - exists = liege.capital_province - is_travelling = no #Let's pick something from our location instead. - } - liege.capital_province = { - NOT = { - geographical_region = world_europe_north - } - } - } - trigger_else_if = { - limit = { - exists = location - } - location = { - NOT = { - geographical_region = world_europe_north - } - } - } - trigger_else = { - always = no - } - } - set_variable = { - name = favorite_treat - value = flag:fig_pie - } - } - 5 = { - trigger = { - trigger_if = { - limit = { - exists = capital_province - is_travelling = no #Let's pick something from our location instead. - } - capital_province = { - geographical_region = custom_england - } - } - trigger_else_if = { - limit = { - exists = liege.capital_province - is_travelling = no #Let's pick something from our location instead. - } - liege.capital_province = { - geographical_region = custom_england - } - } - trigger_else_if = { - limit = { - exists = location - } - location = { - geographical_region = custom_england - } - } - trigger_else = { - always = no - } - } - set_variable = { - name = favorite_treat - value = flag:pokerounce #england - } - } - 5 = { - trigger = { - trigger_if = { - limit = { - exists = capital_province - is_travelling = no #Let's pick something from our location instead. - } - capital_province = { - geographical_region = world_europe_west - } - } - trigger_else_if = { - limit = { - exists = liege.capital_province - is_travelling = no #Let's pick something from our location instead. - } - liege.capital_province = { - geographical_region = world_europe_west - } - } - trigger_else_if = { - limit = { - exists = location - } - location = { - geographical_region = world_europe_west - } - } - trigger_else = { - always = no - } - } - set_variable = { - name = favorite_treat - value = flag:sambocade #western europe - } - } - 5 = { - trigger = { - trigger_if = { - limit = { - exists = capital_province - is_travelling = no #Let's pick something from our location instead. - } - capital_province = { - OR = { - geographical_region = world_africa - geographical_region = world_middle_east - } - } - } - trigger_else_if = { - limit = { - exists = liege.capital_province - is_travelling = no #Let's pick something from our location instead. - } - liege.capital_province = { - OR = { - geographical_region = world_africa - geographical_region = world_middle_east - } - } - } - trigger_else_if = { - limit = { - exists = location - } - location = { - OR = { - geographical_region = world_africa - geographical_region = world_middle_east - } - } - } - trigger_else = { - always = no - } - } - set_variable = { - name = favorite_treat - value = flag:sesame_cake #africa, middle east - } - } - 2 = { - trigger = { - trigger_if = { - limit = { - exists = capital_province - is_travelling = no #Let's pick something from our location instead. - } - capital_province = { - geographical_region = world_africa - } - } - trigger_else_if = { - limit = { - exists = liege.capital_province - is_travelling = no #Let's pick something from our location instead. - } - liege.capital_province = { - geographical_region = world_africa - } - } - trigger_else_if = { - limit = { - exists = location - } - location = { - geographical_region = world_africa - } - } - trigger_else = { - always = no - } - } - set_variable = { - name = favorite_treat - value = flag:baked_banana #africa - } - } - 5 = { - trigger = { - trigger_if = { - limit = { - exists = capital_province - is_travelling = no #Let's pick something from our location instead. - } - capital_province = { - OR = { - geographical_region = world_europe_south_east - geographical_region = world_asia_minor - } - } - } - trigger_else_if = { - limit = { - exists = liege.capital_province - is_travelling = no #Let's pick something from our location instead. - } - liege.capital_province = { - OR = { - geographical_region = world_europe_south_east - geographical_region = world_asia_minor - } - } - } - trigger_else_if = { - limit = { - exists = location - } - location = { - OR = { - geographical_region = world_europe_south_east - geographical_region = world_asia_minor - } - } - } - trigger_else = { - always = no - } - } - set_variable = { - name = favorite_treat - value = flag:koptoplakous #Byzantium - } - } - 5 = { - trigger = { - trigger_if = { - limit = { - exists = capital_province - is_travelling = no #Let's pick something from our location instead. - } - capital_province = { - OR = { - geographical_region = world_europe_south_east - geographical_region = world_asia_minor - } - } - } - trigger_else_if = { - limit = { - exists = liege.capital_province - is_travelling = no #Let's pick something from our location instead. - } - liege.capital_province = { - OR = { - geographical_region = world_europe_south_east - geographical_region = world_asia_minor - } - } - } - trigger_else_if = { - limit = { - exists = location - } - location = { - OR = { - geographical_region = world_europe_south_east - geographical_region = world_asia_minor - } - } - } - trigger_else = { - always = no - } - } - set_variable = { - name = favorite_treat - value = flag:plakountas #Byzantium - } - } - } - } - } -} - -set_favorite_toy_effect = { - if = { - limit = { - NOT = { has_variable = child_toy_variable } - } - hidden_effect = { - random_list = { - 10 = { - modifier = { - has_trait = rowdy - factor = 5 - } - set_variable = { - name = child_toy_variable - value = flag:wooden_knight - } - } - 10 = { - set_variable = { - name = child_toy_variable - value = flag:toy_boat - } - } - 10 = { - modifier = { - has_trait = rowdy - factor = 5 - } - set_variable = { - name = child_toy_variable - value = flag:wooden_sword - } - } - 10 = { - modifier = { - has_trait = curious - factor = 5 - } - modifier = { - has_trait = charming - factor = 5 - } - set_variable = { - name = child_toy_variable - value = flag:ragdoll - } - } - 10 = { - modifier = { - has_trait = pensive - factor = 5 - } - set_variable = { - name = child_toy_variable - value = flag:spinning_top - } - } - 10 = { - set_variable = { - name = child_toy_variable - value = flag:rolling_hoop - } - } - 10 = { - set_variable = { - name = child_toy_variable - value = flag:scopperel - } - } - 10 = { - set_variable = { - name = child_toy_variable - value = flag:wooden_horse - } - } - 10 = { - modifier = { - has_trait = curious - factor = 5 - } - modifier = { - has_trait = charming - factor = 5 - } - set_variable = { - name = child_toy_variable - value = flag:doll - } - } - 10 = { - set_variable = { - name = child_toy_variable - value = flag:stick_horse - } - } - } - } - } -} - -#To get a creepy pet in prison -set_prison_pet_effect = { - if = { - limit = { - NOT = { exists = var:prison_pet_variable } - } - hidden_effect = { - random_list = { - 10 = { - set_variable = { - name = prison_pet_variable - value = flag:rat - } - } - 10 = { - set_variable = { - name = prison_pet_variable - value = flag:stone - } - } - 10 = { - set_variable = { - name = prison_pet_variable - value = flag:spoon - } - } - 10 = { - set_variable = { - name = prison_pet_variable - value = flag:cockroach - } - } - } - } - } -} diff --git a/N3OW/common/scripted_effects/00_personality_trait_effects.txt b/N3OW/common/scripted_effects/00_personality_trait_effects.txt deleted file mode 100644 index bdadfce7..00000000 --- a/N3OW/common/scripted_effects/00_personality_trait_effects.txt +++ /dev/null @@ -1,1884 +0,0 @@ -##################################################################### -# -# This file contains various scripted effects for comparing the personalities of different characters, in order to generate more -# believable character interactions (e.g., ensuring a Brave character would prefer to insult their rival for being Craven over -# insulting them for a non-opposing personality trait). -# -# Also see the '00_personality_trait_triggers.txt' file when using these in an event. - -##################################################################### -# -# check_if_chars_have_opposing_traits_effect: -# This scripted effect is for determining if two characters have opposing personality traits. -# If they do, it applies a parameterized flag to the 1st character for future usage in event scripts and localisation. -# -# Parameters: -# CHAR1 - The primary character we want to compare the traits of, and the one who all flags will be applied to -# CHAR2 - The secondary character we are comparing to CHAR1 -# TRAIT1 - The trait we are looking for on CHAR1 -# TRAIT2 - Should always be set to the opposite trait of TRAIT1 -# FLAG_PREFIX - The first half of the name the flag we will apply to CHAR1, i.e. "statecraft_progress_2200" -# FLAG_POSTFIX - The second half of the name the flag we will apply to CHAR1, i.e. "brave" -# SUCCESS_FLAG - A unique flag identifier indicating if this effect has successfully found a valid set of opposing traits on thew characters. -# STRICT - A boolean (yes/no) indicating if we should do the fallback check for only TRAIT1 on CHAR1 if CHAR1 and CHAR2 have no opposing traits at all -# -This is useful if you simply want to ensure the characters do not share the specified trait(i.e., one Brave char insulting another char for being Brave). -# -# By Sean Hughes - -personality_check_if_chars_have_opposing_traits_effect = { - $CHAR1$ = { - if = { - limit = { - number_of_opposing_traits = { - target = $CHAR2$ - value >= 1 - } - } - if = { - #If CHAR1 and CHAR2 have these opposite traits, CHAR1 gets the appropriate flags added to them. - limit = { - has_trait = $TRAIT1$ - $CHAR2$ = { - has_trait = $TRAIT2$ - } - } - save_scope_value_as = { - name = $FLAG_PREFIX$ - value = flag:$FLAG_POSTFIX$ - } - save_scope_value_as = { - name = $FLAG_SUCCESS$ - value = yes - } - } - } - else = { - if = { - #Fallback option if the two characters have no opposing traits at all. - limit = { - #If we are strictly looking for only opposite traits, do not do this step. - $STRICT$ = no - - #Otherwise, simply find a trait that CHAR1 has which CHAR2 does not, then add the appropriate flag to CHAR1. - has_trait = $TRAIT1$ - $CHAR2$ = { - NOT = { has_trait = $TRAIT1$ } - } - } - save_scope_value_as = { - name = $FLAG_PREFIX$ - value = flag:$FLAG_POSTFIX$ - } - save_scope_value_as = { - name = flag:$FLAG_SUCCESS$ - value = yes - } - } - } - } -} - -##################################################################### -# -# check_opposing_bad_ruler_traits_effect: -# This scripted effect uses the above effect to determine which trait a vassal would most dispise in their ruler. -# It was created for statecraft_progress.2200, but should be able to be used in any other event without an issue, -# as long as each event which uses this has NOT = {scope:opposing_trait_flag_applied = yes} in a trigger. -# -# Parameters: -# CHAR1 - The primary character we want to compare the traits of (the ruler/heir/potential ruler) -# CHAR2 - The secondary character we are comparing to CHAR1 (the vassal/potential vassal) -# TRAIT1 - The trait we are looking for on CHAR1 -# TRAIT2 - Should always be set to the opposite trait of TRAIT1 -# STRICT - A boolean (yes/no) indicating if we should do the fallback check for only TRAIT1 on CHAR1 if CHAR1 and CHAR2 have no opposing traits at all -# -This is useful if you simply want to ensure the characters do not share the specified trait(i.e., one Brave char insulting another char for being Brave). -# -# By Sean Hughes - -personality_check_opposing_bad_ruler_traits_effect = { - save_scope_value_as = { - name = opposing_trait_flag_applied - value = no - } - save_scope_value_as = { - name = has_opposing_trait - value = flag:none - } - #The first 11 trait pairings are selected from "Bad Ruler" traits, which vassals either dislike more than other traits or directly hurt diplomacy. - if = { - limit = { NOT = { scope:opposing_trait_flag_applied = yes } } - personality_check_if_chars_have_opposing_traits_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = arbitrary - TRAIT2 = just - FLAG_PREFIX = has_opposing_trait - FLAG_POSTFIX = arbitrary - FLAG_SUCCESS = opposing_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:opposing_trait_flag_applied = yes } } - personality_check_if_chars_have_opposing_traits_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = craven - TRAIT2 = brave - FLAG_PREFIX = has_opposing_trait - FLAG_POSTFIX = craven - FLAG_SUCCESS = opposing_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:opposing_trait_flag_applied = yes } } - personality_check_if_chars_have_opposing_traits_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = sadistic - TRAIT2 = compassionate - FLAG_PREFIX = has_opposing_trait - FLAG_POSTFIX = sadistic - FLAG_SUCCESS = opposing_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:opposing_trait_flag_applied = yes } } - personality_check_if_chars_have_opposing_traits_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = lazy - TRAIT2 = diligent - FLAG_PREFIX = has_opposing_trait - FLAG_POSTFIX = lazy - FLAG_SUCCESS = opposing_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:opposing_trait_flag_applied = yes } } - personality_check_if_chars_have_opposing_traits_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = stubborn - TRAIT2 = fickle - FLAG_PREFIX = has_opposing_trait - FLAG_POSTFIX = stubborn - FLAG_SUCCESS = opposing_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:opposing_trait_flag_applied = yes } } - personality_check_if_chars_have_opposing_traits_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = paranoid - TRAIT2 = trusting - FLAG_PREFIX = has_opposing_trait - FLAG_POSTFIX = paranoid - FLAG_SUCCESS = opposing_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:opposing_trait_flag_applied = yes } } - personality_check_if_chars_have_opposing_traits_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = vengeful - TRAIT2 = forgiving - FLAG_PREFIX = has_opposing_trait - FLAG_POSTFIX = vengeful - FLAG_SUCCESS = opposing_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:opposing_trait_flag_applied = yes } } - personality_check_if_chars_have_opposing_traits_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = callous - TRAIT2 = compassionate - FLAG_PREFIX = has_opposing_trait - FLAG_POSTFIX = callous - FLAG_SUCCESS = opposing_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:opposing_trait_flag_applied = yes } } - personality_check_if_chars_have_opposing_traits_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = wrathful - TRAIT2 = calm - FLAG_PREFIX = has_opposing_trait - FLAG_POSTFIX = wrathful - FLAG_SUCCESS = opposing_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:opposing_trait_flag_applied = yes } } - personality_check_if_chars_have_opposing_traits_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = arrogant - TRAIT2 = humble - FLAG_PREFIX = has_opposing_trait - FLAG_POSTFIX = arrogant - FLAG_SUCCESS = opposing_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:opposing_trait_flag_applied = yes } } - personality_check_if_chars_have_opposing_traits_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = shy - TRAIT2 = gregarious - FLAG_PREFIX = has_opposing_trait - FLAG_POSTFIX = shy - FLAG_SUCCESS = opposing_trait_flag_applied - STRICT = $STRICT$ - } - } - # The next 14 traits are neutral traits, which aren't considered "Bad Ruler" traits but an individual CHAR2 may dislike. - if = { - limit = { NOT = { scope:opposing_trait_flag_applied = yes } } - personality_check_if_chars_have_opposing_traits_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = cynical - TRAIT2 = zealous - FLAG_PREFIX = has_opposing_trait - FLAG_POSTFIX = cynical - FLAG_SUCCESS = opposing_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:opposing_trait_flag_applied = yes } } - personality_check_if_chars_have_opposing_traits_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = zealous - TRAIT2 = cynical - FLAG_PREFIX = has_opposing_trait - FLAG_POSTFIX = zealous - FLAG_SUCCESS = opposing_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:opposing_trait_flag_applied = yes } } - personality_check_if_chars_have_opposing_traits_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = deceitful - TRAIT2 = honest - FLAG_PREFIX = has_opposing_trait - FLAG_POSTFIX = deceitful - FLAG_SUCCESS = opposing_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:opposing_trait_flag_applied = yes } } - personality_check_if_chars_have_opposing_traits_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = honest - TRAIT2 = deceitful - FLAG_PREFIX = has_opposing_trait - FLAG_POSTFIX = honest - FLAG_SUCCESS = opposing_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:opposing_trait_flag_applied = yes } } - personality_check_if_chars_have_opposing_traits_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = generous - TRAIT2 = greedy - FLAG_PREFIX = has_opposing_trait - FLAG_POSTFIX = generous - FLAG_SUCCESS = opposing_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:opposing_trait_flag_applied = yes } } - personality_check_if_chars_have_opposing_traits_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = greedy - TRAIT2 = generous - FLAG_PREFIX = has_opposing_trait - FLAG_POSTFIX = greedy - FLAG_SUCCESS = opposing_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:opposing_trait_flag_applied = yes } } - personality_check_if_chars_have_opposing_traits_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = gluttonous - TRAIT2 = temperate - FLAG_PREFIX = has_opposing_trait - FLAG_POSTFIX = gluttonous - FLAG_SUCCESS = opposing_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:opposing_trait_flag_applied = yes } } - personality_check_if_chars_have_opposing_traits_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = temperate - TRAIT2 = gluttonous - FLAG_PREFIX = has_opposing_trait - FLAG_POSTFIX = temperate - FLAG_SUCCESS = opposing_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:opposing_trait_flag_applied = yes } } - personality_check_if_chars_have_opposing_traits_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = impatient - TRAIT2 = patient - FLAG_PREFIX = has_opposing_trait - FLAG_POSTFIX = impatient - FLAG_SUCCESS = opposing_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:opposing_trait_flag_applied = yes } } - personality_check_if_chars_have_opposing_traits_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = patient - TRAIT2 = impatient - FLAG_PREFIX = has_opposing_trait - FLAG_POSTFIX = patient - FLAG_SUCCESS = opposing_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:opposing_trait_flag_applied = yes } } - personality_check_if_chars_have_opposing_traits_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = lustful - TRAIT2 = chaste - FLAG_PREFIX = has_opposing_trait - FLAG_POSTFIX = lustful - FLAG_SUCCESS = opposing_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:opposing_trait_flag_applied = yes } } - personality_check_if_chars_have_opposing_traits_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = chaste - TRAIT2 = lustful - FLAG_PREFIX = has_opposing_trait - FLAG_POSTFIX = chaste - FLAG_SUCCESS = opposing_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:opposing_trait_flag_applied = yes } } - personality_check_if_chars_have_opposing_traits_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = content - TRAIT2 = ambitious - FLAG_PREFIX = has_opposing_trait - FLAG_POSTFIX = content - FLAG_SUCCESS = opposing_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:opposing_trait_flag_applied = yes } } - personality_check_if_chars_have_opposing_traits_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = ambitious - TRAIT2 = content - FLAG_PREFIX = has_opposing_trait - FLAG_POSTFIX = ambitious - FLAG_SUCCESS = opposing_trait_flag_applied - STRICT = $STRICT$ - } - } - #The last 11 traits are opposites of the "Bad Ruler" traits, I.E., things the player is unlikely to want tCHAR1 CHAR1 to lose. - if = { - limit = { NOT = { scope:opposing_trait_flag_applied = yes } } - personality_check_if_chars_have_opposing_traits_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = gregarious - TRAIT2 = shy - FLAG_PREFIX = has_opposing_trait - FLAG_POSTFIX = gregarious - FLAG_SUCCESS = opposing_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:opposing_trait_flag_applied = yes } } - personality_check_if_chars_have_opposing_traits_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = diligent - TRAIT2 = lazy - FLAG_PREFIX = has_opposing_trait - FLAG_POSTFIX = diligent - FLAG_SUCCESS = opposing_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:opposing_trait_flag_applied = yes } } - personality_check_if_chars_have_opposing_traits_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = humble - TRAIT2 = arrogant - FLAG_PREFIX = has_opposing_trait - FLAG_POSTFIX = humble - FLAG_SUCCESS = opposing_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:opposing_trait_flag_applied = yes } } - personality_check_if_chars_have_opposing_traits_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = brave - TRAIT2 = craven - FLAG_PREFIX = has_opposing_trait - FLAG_POSTFIX = brave - FLAG_SUCCESS = opposing_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:opposing_trait_flag_applied = yes } } - personality_check_if_chars_have_opposing_traits_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = calm - TRAIT2 = wrathful - FLAG_PREFIX = has_opposing_trait - FLAG_POSTFIX = calm - FLAG_SUCCESS = opposing_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:opposing_trait_flag_applied = yes } } - personality_check_if_chars_have_opposing_traits_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = compassionate - TRAIT2 = sadistic - FLAG_PREFIX = has_opposing_trait - FLAG_POSTFIX = compassionate - FLAG_SUCCESS = opposing_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:opposing_trait_flag_applied = yes } } - personality_check_if_chars_have_opposing_traits_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = compassionate - TRAIT2 = callous - FLAG_PREFIX = has_opposing_trait - FLAG_POSTFIX = compassionate - FLAG_SUCCESS = opposing_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:opposing_trait_flag_applied = yes } } - personality_check_if_chars_have_opposing_traits_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = fickle - TRAIT2 = stubborn - FLAG_PREFIX = has_opposing_trait - FLAG_POSTFIX = fickle - FLAG_SUCCESS = opposing_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:opposing_trait_flag_applied = yes } } - personality_check_if_chars_have_opposing_traits_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = forgiving - TRAIT2 = vengeful - FLAG_PREFIX = has_opposing_trait - FLAG_POSTFIX = forgiving - FLAG_SUCCESS = opposing_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:opposing_trait_flag_applied = yes } } - personality_check_if_chars_have_opposing_traits_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = trusting - TRAIT2 = paranoid - FLAG_PREFIX = has_opposing_trait - FLAG_POSTFIX = trusting - FLAG_SUCCESS = opposing_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:opposing_trait_flag_applied = yes } } - personality_check_if_chars_have_opposing_traits_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = just - TRAIT2 = arbitrary - FLAG_PREFIX = has_opposing_trait - FLAG_POSTFIX = just - FLAG_SUCCESS = opposing_trait_flag_applied - STRICT = $STRICT$ - } - } -} - -##################################################################### -# -# personality_minor_shift_effect: -# Designed to be used in tandem with 'check_opposing_bad_ruler_traits_effect', but can be used with other scripts. -# Checks if a character has the specified flag and, if so, removes the corresponding personality trait. -# -# By Sean Hughes - -personality_shift_effect = { - if = { - limit = { scope:has_opposing_trait = flag:arrogant } - remove_trait = arrogant - add_trait_force_tooltip = humble - } - else_if = { - limit = { scope:has_opposing_trait = flag:humble } - remove_trait = humble - add_trait_force_tooltip = arrogant - } - else_if = { - limit = { scope:has_opposing_trait = flag:lustful } - remove_trait = lustful - add_trait_force_tooltip = chaste - } - else_if = { - limit = { scope:has_opposing_trait = flag:chaste } - remove_trait = chaste - add_trait_force_tooltip = lustful - } - else_if = { - limit = { scope:has_opposing_trait = flag:gregarious } - remove_trait = gregarious - add_trait_force_tooltip = shy - } - else_if = { - limit = { scope:has_opposing_trait = flag:shy } - remove_trait = shy - add_trait_force_tooltip = gregarious - } - else_if = { - limit = { scope:has_opposing_trait = flag:generous } - remove_trait = generous - add_trait_force_tooltip = greedy - } - else_if = { - limit = { scope:has_opposing_trait = flag:greedy } - remove_trait = greedy - add_trait_force_tooltip = generous - } - else_if = { - limit = { scope:has_opposing_trait = flag:ambitious } - remove_trait = ambitious - add_trait_force_tooltip = content - } - else_if = { - limit = { scope:has_opposing_trait = flag:content } - remove_trait = content - add_trait_force_tooltip = ambitious - } - else_if = { - limit = { scope:has_opposing_trait = flag:impatient } - remove_trait = impatient - add_trait_force_tooltip = patient - } - else_if = { - limit = { scope:has_opposing_trait = flag:patient } - remove_trait = patient - add_trait_force_tooltip = impatient - } - else_if = { - limit = { scope:has_opposing_trait = flag:temperate } - remove_trait = temperate - add_trait_force_tooltip = gluttonous - } - else_if = { - limit = { scope:has_opposing_trait = flag:gluttonous } - remove_trait = gluttonous - add_trait_force_tooltip = temperate - } - else_if = { - limit = { scope:has_opposing_trait = flag:diligent } - remove_trait = diligent - add_trait_force_tooltip = lazy - } - else_if = { - limit = { scope:has_opposing_trait = flag:lazy } - remove_trait = lazy - add_trait_force_tooltip = diligent - } - else_if = { - limit = { scope:has_opposing_trait = flag:wrathful } - remove_trait = wrathful - add_trait_force_tooltip = calm - } - else_if = { - limit = { scope:has_opposing_trait = flag:calm } - remove_trait = calm - add_trait_force_tooltip = wrathful - } - else_if = { - limit = { scope:has_opposing_trait = flag:deceitful } - remove_trait = deceitful - add_trait_force_tooltip = honest - } - else_if = { - limit = { scope:has_opposing_trait = flag:honest } - remove_trait = honest - add_trait_force_tooltip = deceitful - } - else_if = { - limit = { scope:has_opposing_trait = flag:craven } - remove_trait = craven - add_trait_force_tooltip = brave - } - else_if = { - limit = { scope:has_opposing_trait = flag:brave } - remove_trait = brave - add_trait_force_tooltip = craven - } - else_if = { - limit = { scope:has_opposing_trait = flag:arbitrary } - remove_trait = arbitrary - add_trait_force_tooltip = just - } - else_if = { - limit = { scope:has_opposing_trait = flag:just } - remove_trait = just - add_trait_force_tooltip = arbitrary - } - else_if = { - limit = { scope:has_opposing_trait = flag:cynical } - remove_trait = cynical - add_trait_force_tooltip = zealous - } - else_if = { - limit = { scope:has_opposing_trait = flag:zealous } - remove_trait = zealous - add_trait_force_tooltip = cynical - } - else_if = { - limit = { scope:has_opposing_trait = flag:paranoid } - remove_trait = paranoid - add_trait_force_tooltip = trusting - } - else_if = { - limit = { scope:has_opposing_trait = flag:trusting } - remove_trait = trusting - add_trait_force_tooltip = paranoid - } - else_if = { - limit = { scope:has_opposing_trait = flag:compassionate } - remove_trait = compassionate - add_trait_force_tooltip = callous - } - else_if = { - limit = { scope:has_opposing_trait = flag:callous } - remove_trait = callous - add_trait_force_tooltip = compassionate - } - else_if = { - limit = { scope:has_opposing_trait = flag:sadistic } - remove_trait = sadistic - add_trait_force_tooltip = compassionate - } - else_if = { - limit = { scope:has_opposing_trait = flag:forgiving } - remove_trait = forgiving - add_trait_force_tooltip = vengeful - } - else_if = { - limit = { scope:has_opposing_trait = flag:vengeful } - remove_trait = vengeful - add_trait_force_tooltip = forgiving - } - else_if = { - limit = { scope:has_opposing_trait = flag:stubborn } - remove_trait = stubborn - add_trait_force_tooltip = fickle - } - else_if = { - limit = { scope:has_opposing_trait = flag:fickle } - remove_trait = fickle - add_trait_force_tooltip = stubborn - } -} - -##################################################################### -# -# personality_check_if_chars_have_shared_trait_effect: -# This scripted effect is for determining if two characters share a personality trait. -# If they do, it applies a parameterized flag to the 1st character for future usage in event scripts and localisation. -# -# Parameters: -# CHAR1 - The primary character we want to compare the traits of, and the one who all flags will be applied to -# CHAR2 - The secondary character we are comparing to CHAR1 -# TRAIT1 - The trait we are looking for on both the characters -# TRAIT2 - The opposite trait of trait 1, in case we need to rely on our fallback. -# FLAG_PREFIX - The first half of the name the flag we will apply to CHAR1, i.e. "statecraft_progress_2200" -# FLAG_POSTFIX - The second half of the name the flag we will apply to CHAR1, i.e. "brave" -# SUCCESS_FLAG - A unique flag identifier indicating if this effect has successfully found a valid set of shared traits on the characters. -# STRICT - A boolean (yes/no) indicating if we should do the fallback check for CHAR2 not having TRAIT2 if there are no shared traits. -# -# By Sean Hughes - -personality_check_if_chars_have_shared_trait_effect = { - $CHAR1$ = { - if = { - limit = { - number_of_personality_traits_in_common = { - target = $CHAR2$ - value >= 1 - } - } - if = { - #If CHAR1 and both have this trait, set the appropriate flag. - limit = { - has_trait = $TRAIT1$ - $CHAR2$ = { - has_trait = $TRAIT1$ } - } - save_scope_value_as = { - name = $FLAG_PREFIX$ - value = flag:$FLAG_POSTFIX$ - } - save_scope_value_as = { - name = $FLAG_SUCCESS$ - value = yes - } - } - } - else = { - if = { - #Fallback option if the two characters have no shared traits at all. - limit = { - #If we are strictly looking for only shared traits, do not do this step. - $STRICT$ = no - - #Otherwise, simply find a trait that CHAR1 has which CHAR2 does not have the opposite trait for, then add the appropriate flag to CHAR1. - has_trait = $TRAIT1$ - $CHAR2$ = { - NOT = { has_trait = $TRAIT2$ } - } - } - save_scope_value_as = { - name = $FLAG_PREFIX$ - value = flag:$FLAG_POSTFIX$ - } - save_scope_value_as = { - name = $FLAG_SUCCESS$ - value = yes - } - } - } - } -} - -##################################################################### -# -# personality_check_shared_good_ruler_traits_effect: -# This scripted effect uses the above effect to determine which trait a vassal would most approve of in their ruler. -# -# Parameters: -# CHAR1 - The primary character we want to compare the traits of (the ruler/heir/potential ruler) -# CHAR2 - The secondary character we are comparing to CHAR1 (the vassal/potential vassal) -# TRAIT1 - The trait we are looking for on CHAR1 -# TRAIT2 - Should always be set to the opposite trait of TRAIT1 -# STRICT - A boolean (yes/no) indicating if we should do the fallback check for only TRAIT1 on CHAR1 if CHAR1 and CHAR2 have no opposing traits at all -# -This is useful if you simply want to ensure the characters do not share the specified trait(i.e., one Brave char insulting another char for being Brave). -# -# By Sean Hughes - -personality_check_shared_good_ruler_traits_effect = { - save_scope_value_as = { - name = shared_trait_flag_applied - value = no - } - - #The first 11 trait pairings are selected from "Good Ruler" traits, which vassals either like more than other traits or directly help diplomacy. - if = { - limit = { NOT = { scope:shared_trait_flag_applied = yes } } - personality_check_if_chars_have_shared_trait_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = just - TRAIT2 = arbitrary - FLAG_PREFIX = has_shared_trait - FLAG_POSTFIX = just - FLAG_SUCCESS = shared_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:shared_trait_flag_applied = yes } } - personality_check_if_chars_have_shared_trait_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = brave - TRAIT2 = craven - FLAG_PREFIX = has_shared_trait - FLAG_POSTFIX = brave - FLAG_SUCCESS = shared_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:shared_trait_flag_applied = yes } } - personality_check_if_chars_have_shared_trait_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = compassionate - TRAIT2 = sadistic - FLAG_PREFIX = has_shared_trait - FLAG_POSTFIX = compassionate - FLAG_SUCCESS = shared_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:shared_trait_flag_applied = yes } } - personality_check_if_chars_have_shared_trait_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = diligent - TRAIT2 = lazy - FLAG_PREFIX = has_shared_trait - FLAG_POSTFIX = diligent - FLAG_SUCCESS = shared_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:shared_trait_flag_applied = yes } } - personality_check_if_chars_have_shared_trait_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = fickle - TRAIT2 = stubborn - FLAG_PREFIX = has_shared_trait - FLAG_POSTFIX = fickle - FLAG_SUCCESS = shared_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:shared_trait_flag_applied = yes } } - personality_check_if_chars_have_shared_trait_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = trusting - TRAIT2 = paranoid - FLAG_PREFIX = has_shared_trait - FLAG_POSTFIX = trusting - FLAG_SUCCESS = shared_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:shared_trait_flag_applied = yes } } - personality_check_if_chars_have_shared_trait_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = forgiving - TRAIT2 = vengeful - FLAG_PREFIX = has_shared_trait - FLAG_POSTFIX = forgiving - FLAG_SUCCESS = shared_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:shared_trait_flag_applied = yes } } - personality_check_if_chars_have_shared_trait_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = compassionate - TRAIT2 = callous - FLAG_PREFIX = has_shared_trait - FLAG_POSTFIX = compassionate - FLAG_SUCCESS = shared_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:shared_trait_flag_applied = yes } } - personality_check_if_chars_have_shared_trait_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = calm - TRAIT2 = wrathful - FLAG_PREFIX = has_shared_trait - FLAG_POSTFIX = calm - FLAG_SUCCESS = shared_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:shared_trait_flag_applied = yes } } - personality_check_if_chars_have_shared_trait_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = humble - TRAIT2 = arrogant - FLAG_PREFIX = has_shared_trait - FLAG_POSTFIX = humble - FLAG_SUCCESS = shared_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:shared_trait_flag_applied = yes } } - personality_check_if_chars_have_shared_trait_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = gregarious - TRAIT2 = shy - FLAG_PREFIX = has_shared_trait - FLAG_POSTFIX = gregarious - FLAG_SUCCESS = shared_trait_flag_applied - STRICT = $STRICT$ - } - } - # The next 14 traits are neutral traits, which aren't considered "Good Ruler" traits but an individual CHAR2 may dislike. - if = { - limit = { NOT = { scope:shared_trait_flag_applied = yes } } - personality_check_if_chars_have_shared_trait_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = cynical - TRAIT2 = zealous - FLAG_PREFIX = has_shared_trait - FLAG_POSTFIX = cynical - FLAG_SUCCESS = shared_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:shared_trait_flag_applied = yes } } - personality_check_if_chars_have_shared_trait_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = zealous - TRAIT2 = cynical - FLAG_PREFIX = has_shared_trait - FLAG_POSTFIX = zealous - FLAG_SUCCESS = shared_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:shared_trait_flag_applied = yes } } - personality_check_if_chars_have_shared_trait_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = deceitful - TRAIT2 = honest - FLAG_PREFIX = has_shared_trait - FLAG_POSTFIX = deceitful - FLAG_SUCCESS = shared_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:shared_trait_flag_applied = yes } } - personality_check_if_chars_have_shared_trait_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = honest - TRAIT2 = deceitful - FLAG_PREFIX = has_shared_trait - FLAG_POSTFIX = honest - FLAG_SUCCESS = shared_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:shared_trait_flag_applied = yes } } - personality_check_if_chars_have_shared_trait_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = generous - TRAIT2 = greedy - FLAG_PREFIX = has_shared_trait - FLAG_POSTFIX = generous - FLAG_SUCCESS = shared_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:shared_trait_flag_applied = yes } } - personality_check_if_chars_have_shared_trait_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = greedy - TRAIT2 = generous - FLAG_PREFIX = has_shared_trait - FLAG_POSTFIX = greedy - FLAG_SUCCESS = shared_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:shared_trait_flag_applied = yes } } - personality_check_if_chars_have_shared_trait_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = gluttonous - TRAIT2 = temperate - FLAG_PREFIX = has_shared_trait - FLAG_POSTFIX = gluttonous - FLAG_SUCCESS = shared_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:shared_trait_flag_applied = yes } } - personality_check_if_chars_have_shared_trait_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = temperate - TRAIT2 = gluttonous - FLAG_PREFIX = has_shared_trait - FLAG_POSTFIX = temperate - FLAG_SUCCESS = shared_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:shared_trait_flag_applied = yes } } - personality_check_if_chars_have_shared_trait_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = impatient - TRAIT2 = patient - FLAG_PREFIX = has_shared_trait - FLAG_POSTFIX = impatient - FLAG_SUCCESS = shared_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:shared_trait_flag_applied = yes } } - personality_check_if_chars_have_shared_trait_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = patient - TRAIT2 = impatient - FLAG_PREFIX = has_shared_trait - FLAG_POSTFIX = patient - FLAG_SUCCESS = shared_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:shared_trait_flag_applied = yes } } - personality_check_if_chars_have_shared_trait_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = lustful - TRAIT2 = chaste - FLAG_PREFIX = has_shared_trait - FLAG_POSTFIX = lustful - FLAG_SUCCESS = shared_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:shared_trait_flag_applied = yes } } - personality_check_if_chars_have_shared_trait_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = chaste - TRAIT2 = lustful - FLAG_PREFIX = has_shared_trait - FLAG_POSTFIX = chaste - FLAG_SUCCESS = shared_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:shared_trait_flag_applied = yes } } - personality_check_if_chars_have_shared_trait_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = content - TRAIT2 = ambitious - FLAG_PREFIX = has_shared_trait - FLAG_POSTFIX = content - FLAG_SUCCESS = shared_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:shared_trait_flag_applied = yes } } - personality_check_if_chars_have_shared_trait_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = ambitious - TRAIT2 = content - FLAG_PREFIX = has_shared_trait - FLAG_POSTFIX = ambitious - FLAG_SUCCESS = shared_trait_flag_applied - STRICT = $STRICT$ - } - } - #The last 11 traits are opposites of the "Good Ruler" traits, I.E., things CHAR2 is unlikely to appreciate unless they themselves are that way. - if = { - limit = { NOT = { scope:shared_trait_flag_applied = yes } } - personality_check_if_chars_have_shared_trait_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = shy - TRAIT2 = gregarious - FLAG_PREFIX = has_shared_trait - FLAG_POSTFIX = shy - FLAG_SUCCESS = shared_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:shared_trait_flag_applied = yes } } - personality_check_if_chars_have_shared_trait_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = lazy - TRAIT2 = diligent - FLAG_PREFIX = has_shared_trait - FLAG_POSTFIX = lazy - FLAG_SUCCESS = shared_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:shared_trait_flag_applied = yes } } - personality_check_if_chars_have_shared_trait_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = arrogant - TRAIT2 = humble - FLAG_PREFIX = has_shared_trait - FLAG_POSTFIX = arrogant - FLAG_SUCCESS = shared_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:shared_trait_flag_applied = yes } } - personality_check_if_chars_have_shared_trait_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = craven - TRAIT2 = brave - FLAG_PREFIX = has_shared_trait - FLAG_POSTFIX = craven - FLAG_SUCCESS = shared_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:shared_trait_flag_applied = yes } } - personality_check_if_chars_have_shared_trait_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = wrathful - TRAIT2 = calm - FLAG_PREFIX = has_shared_trait - FLAG_POSTFIX = wrathful - FLAG_SUCCESS = shared_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:shared_trait_flag_applied = yes } } - personality_check_if_chars_have_shared_trait_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = sadistic - TRAIT2 = compassionate - FLAG_PREFIX = has_shared_trait - FLAG_POSTFIX = sadistic - FLAG_SUCCESS = shared_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:shared_trait_flag_applied = yes } } - personality_check_if_chars_have_shared_trait_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = callous - TRAIT2 = compassionate - FLAG_PREFIX = has_shared_trait - FLAG_POSTFIX = callous - FLAG_SUCCESS = shared_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:shared_trait_flag_applied = yes } } - personality_check_if_chars_have_shared_trait_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = stubborn - TRAIT2 = fickle - FLAG_PREFIX = has_shared_trait - FLAG_POSTFIX = stubborn - FLAG_SUCCESS = shared_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:shared_trait_flag_applied = yes } } - personality_check_if_chars_have_shared_trait_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = vengeful - TRAIT2 = forgiving - FLAG_PREFIX = has_shared_trait - FLAG_POSTFIX = vengeful - FLAG_SUCCESS = shared_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:shared_trait_flag_applied = yes } } - personality_check_if_chars_have_shared_trait_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = paranoid - TRAIT2 = trusting - FLAG_PREFIX = has_shared_trait - FLAG_POSTFIX = paranoid - FLAG_SUCCESS = shared_trait_flag_applied - STRICT = $STRICT$ - } - } - if = { - limit = { NOT = { scope:shared_trait_flag_applied = yes } } - personality_check_if_chars_have_shared_trait_effect = { - CHAR1 = $CHAR1$ - CHAR2 = $CHAR2$ - TRAIT1 = arbitrary - TRAIT2 = just - FLAG_PREFIX = has_shared_trait - FLAG_POSTFIX = arbitrary - FLAG_SUCCESS = shared_trait_flag_applied - STRICT = $STRICT$ - } - } -} - -flip_sinful_trait_effect = { - if = { - limit = { - has_trait = lustful - faith = { trait_is_sin = lustful } - } - remove_trait = lustful - add_trait_force_tooltip = chaste - } - else_if = { - limit = { - has_trait = chaste - faith = { trait_is_sin = chaste } - } - remove_trait = chaste - add_trait_force_tooltip = lustful - } - else_if = { - limit = { - has_trait = temperate - faith = { trait_is_sin = temperate } - } - remove_trait = temperate - add_trait_force_tooltip = gluttonous - } - else_if = { - limit = { - has_trait = gluttonous - faith = { trait_is_sin = gluttonous } - } - remove_trait = gluttonous - add_trait_force_tooltip = temperate - } - else_if = { - limit = { - has_trait = greedy - faith = { trait_is_sin = greedy } - } - remove_trait = greedy - add_trait_force_tooltip = generous - } - else_if = { - limit = { - has_trait = generous - faith = { trait_is_sin = generous } - } - remove_trait = generous - add_trait_force_tooltip = greedy - } - else_if = { - limit = { - has_trait = lazy - faith = { trait_is_sin = lazy } - } - remove_trait = lazy - add_trait_force_tooltip = diligent - } - else_if = { - limit = { - has_trait = diligent - faith = { trait_is_sin = diligent } - } - remove_trait = diligent - add_trait_force_tooltip = lazy - } - else_if = { - limit = { - has_trait = wrathful - faith = { trait_is_sin = wrathful } - } - remove_trait = wrathful - add_trait_force_tooltip = calm - } - else_if = { - limit = { - has_trait = calm - faith = { trait_is_sin = calm } - } - remove_trait = calm - add_trait_force_tooltip = wrathful - } - else_if = { - limit = { - has_trait = humble - faith = { trait_is_sin = humble } - } - remove_trait = humble - add_trait_force_tooltip = arrogant - } - else_if = { - limit = { - has_trait = arrogant - faith = { trait_is_sin = arrogant } - } - remove_trait = arrogant - add_trait_force_tooltip = humble - } - else_if = { - limit = { - has_trait = impatient - faith = { trait_is_sin = impatient } - } - remove_trait = impatient - add_trait_force_tooltip = patient - } - else_if = { - limit = { - has_trait = patient - faith = { trait_is_sin = patient } - } - remove_trait = patient - add_trait_force_tooltip = impatient - } - else_if = { - limit = { - has_trait = craven - faith = { trait_is_sin = craven } - } - remove_trait = craven - add_trait_force_tooltip = brave - } - else_if = { - limit = { - has_trait = brave - faith = { trait_is_sin = brave } - } - remove_trait = brave - add_trait_force_tooltip = craven - } - else_if = { - limit = { - has_trait = shy - faith = { trait_is_sin = shy } - } - remove_trait = shy - add_trait_force_tooltip = gregarious - } - else_if = { - limit = { - has_trait = gregarious - faith = { trait_is_sin = gregarious } - } - remove_trait = gregarious - add_trait_force_tooltip = shy - } - else_if = { - limit = { - has_trait = ambitious - faith = { trait_is_sin = ambitious } - } - remove_trait = ambitious - add_trait_force_tooltip = content - } - else_if = { - limit = { - has_trait = content - faith = { trait_is_sin = content } - } - remove_trait = content - add_trait_force_tooltip = ambitious - } - else_if = { - limit = { - has_trait = arbitrary - faith = { trait_is_sin = arbitrary } - } - remove_trait = arbitrary - add_trait_force_tooltip = just - } - else_if = { - limit = { - has_trait = just - faith = { trait_is_sin = just } - } - remove_trait = just - add_trait_force_tooltip = arbitrary - } - else_if = { - limit = { - has_trait = zealous - faith = { trait_is_sin = zealous } - } - remove_trait = zealous - add_trait_force_tooltip = cynical - } - else_if = { - limit = { - has_trait = cynical - faith = { trait_is_sin = cynical } - } - remove_trait = cynical - add_trait_force_tooltip = zealous - } - else_if = { - limit = { - has_trait = trusting - faith = { trait_is_sin = trusting } - } - remove_trait = trusting - add_trait_force_tooltip = paranoid - } - else_if = { - limit = { - has_trait = paranoid - faith = { trait_is_sin = paranoid } - } - remove_trait = paranoid - add_trait_force_tooltip = trusting - } - else_if = { - limit = { - has_trait = callous - faith = { trait_is_sin = callous } - } - remove_trait = callous - add_trait_force_tooltip = compassionate - } - else_if = { - limit = { - has_trait = sadistic - faith = { trait_is_sin = sadistic } - } - remove_trait = sadistic - add_trait_force_tooltip = compassionate - } - else_if = { - limit = { - has_trait = compassionate - faith = { trait_is_sin = compassionate } - } - remove_trait = compassionate - add_trait_force_tooltip = callous - } - else_if = { - limit = { - has_trait = stubborn - faith = { trait_is_sin = stubborn } - } - remove_trait = stubborn - add_trait_force_tooltip = fickle - } - else_if = { - limit = { - has_trait = fickle - faith = { trait_is_sin = fickle } - } - remove_trait = fickle - add_trait_force_tooltip = stubborn - } - else_if = { - limit = { - has_trait = vengeful - faith = { trait_is_sin = vengeful } - } - remove_trait = vengeful - add_trait_force_tooltip = forgiving - } - else_if = { - limit = { - has_trait = forgiving - faith = { trait_is_sin = forgiving } - } - remove_trait = forgiving - add_trait_force_tooltip = vengeful - } - else_if = { - limit = { - has_trait = honest - faith = { trait_is_sin = honest } - } - remove_trait = honest - add_trait_force_tooltip = deceitful - } - else_if = { - limit = { - has_trait = deceitful - faith = { trait_is_sin = deceitful } - } - remove_trait = deceitful - add_trait_force_tooltip = honest - } -} - - -# Checks if the scoped character and the target character have any diametrically opposed personality traits. -# Saves a scope with the selected trait held by CHARACTER_1 -# Should use the following trigger number_of_opposing_personality_traits to check that an opposing personality trait exists -get_diametrically_opposed_trait_trigger = { - random_list = { - 1 = { - trigger = { - $CHARACTER_1$ = { has_trait = brave } - $CHARACTER_2$ = { has_trait = craven } - } - trait:brave = { save_scope_as = opposed_personality_trait } - } - 1 = { - trigger = { - $CHARACTER_1$ = { has_trait = craven } - $CHARACTER_2$ = { has_trait = brave } - } - trait:craven = { save_scope_as = opposed_personality_trait } - } - 1 = { - trigger = { - $CHARACTER_1$ = { has_trait = calm } - $CHARACTER_2$ = { has_trait = wrathful } - } - trait:calm = { save_scope_as = opposed_personality_trait } - } - 1 = { - trigger = { - $CHARACTER_1$ = { has_trait = wrathful } - $CHARACTER_2$ = { has_trait = calm } - } - trait:wrathful = { save_scope_as = opposed_personality_trait } - } - 1 = { - trigger = { - $CHARACTER_1$ = { has_trait = lustful } - $CHARACTER_2$ = { has_trait = chaste } - } - trait:lustful = { save_scope_as = opposed_personality_trait } - } - 1 = { - trigger = { - $CHARACTER_1$ = { has_trait = chaste } - $CHARACTER_2$ = { has_trait = lustful } - } - trait:chaste = { save_scope_as = opposed_personality_trait } - } - 1 = { - trigger = { - $CHARACTER_1$ = { has_trait = ambitious } - $CHARACTER_2$ = { has_trait = content } - } - trait:ambitious = { save_scope_as = opposed_personality_trait } - } - 1 = { - trigger = { - $CHARACTER_1$ = { has_trait = content } - $CHARACTER_2$ = { has_trait = ambitious } - } - trait:content = { save_scope_as = opposed_personality_trait } - } - 1 = { - trigger = { - $CHARACTER_1$ = { has_trait = diligent } - $CHARACTER_2$ = { has_trait = lazy } - } - trait:diligent = { save_scope_as = opposed_personality_trait } - } - 1 = { - trigger = { - $CHARACTER_1$ = { has_trait = lazy } - $CHARACTER_2$ = { has_trait = diligent } - } - trait:lazy = { save_scope_as = opposed_personality_trait } - } - 1 = { - trigger = { - $CHARACTER_1$ = { has_trait = stubborn } - $CHARACTER_2$ = { has_trait = fickle } - } - trait:stubborn = { save_scope_as = opposed_personality_trait } - } - 1 = { - trigger = { - $CHARACTER_1$ = { has_trait = fickle } - $CHARACTER_2$ = { has_trait = stubborn } - } - trait:fickle = { save_scope_as = opposed_personality_trait } - } - 1 = { - trigger = { - $CHARACTER_1$ = { has_trait = vengeful } - $CHARACTER_2$ = { has_trait = forgiving } - } - trait:vengeful = { save_scope_as = opposed_personality_trait } - } - 1 = { - trigger = { - $CHARACTER_1$ = { has_trait = forgiving } - $CHARACTER_2$ = { has_trait = vengeful } - } - trait:forgiving = { save_scope_as = opposed_personality_trait } - } - 1 = { - trigger = { - $CHARACTER_1$ = { has_trait = greedy } - $CHARACTER_2$ = { has_trait = generous } - } - trait:greedy = { save_scope_as = opposed_personality_trait } - } - 1 = { - trigger = { - $CHARACTER_1$ = { has_trait = generous } - $CHARACTER_2$ = { has_trait = greedy } - } - trait:generous = { save_scope_as = opposed_personality_trait } - } - 1 = { - trigger = { - $CHARACTER_1$ = { has_trait = gregarious } - $CHARACTER_2$ = { has_trait = shy } - } - trait:gregarious = { save_scope_as = opposed_personality_trait } - } - 1 = { - trigger = { - $CHARACTER_1$ = { has_trait = shy } - $CHARACTER_2$ = { has_trait = gregarious } - } - trait:shy = { save_scope_as = opposed_personality_trait } - } - 1 = { - trigger = { - $CHARACTER_1$ = { has_trait = honest } - $CHARACTER_2$ = { has_trait = deceitful } - } - trait:honest = { save_scope_as = opposed_personality_trait } - } - 1 = { - trigger = { - $CHARACTER_1$ = { has_trait = deceitful } - $CHARACTER_2$ = { has_trait = honest } - } - trait:deceitful = { save_scope_as = opposed_personality_trait } - } - 1 = { - trigger = { - $CHARACTER_1$ = { has_trait = humble } - $CHARACTER_2$ = { has_trait = arrogant } - } - trait:humble = { save_scope_as = opposed_personality_trait } - } - 1 = { - trigger = { - $CHARACTER_1$ = { has_trait = arrogant } - $CHARACTER_2$ = { has_trait = humble } - } - trait:arrogant = { save_scope_as = opposed_personality_trait } - } - 1 = { - trigger = { - $CHARACTER_1$ = { has_trait = just } - $CHARACTER_2$ = { has_trait = arbitrary } - } - trait:just = { save_scope_as = opposed_personality_trait } - } - 1 = { - trigger = { - $CHARACTER_1$ = { has_trait = arbitrary } - $CHARACTER_2$ = { has_trait = just } - } - trait:arbitrary = { save_scope_as = opposed_personality_trait } - } - 1 = { - trigger = { - $CHARACTER_1$ = { has_trait = patient } - $CHARACTER_2$ = { has_trait = impatient } - } - trait:patient = { save_scope_as = opposed_personality_trait } - } - 1 = { - trigger = { - $CHARACTER_1$ = { has_trait = impatient } - $CHARACTER_2$ = { has_trait = patient } - } - trait:impatient = { save_scope_as = opposed_personality_trait } - } - 1 = { - trigger = { - $CHARACTER_1$ = { has_trait = temperate } - $CHARACTER_2$ = { has_trait = gluttonous } - } - trait:temperate = { save_scope_as = opposed_personality_trait } - } - 1 = { - trigger = { - $CHARACTER_1$ = { has_trait = gluttonous } - $CHARACTER_2$ = { has_trait = temperate } - } - trait:gluttonous = { save_scope_as = opposed_personality_trait } - } - 1 = { - trigger = { - $CHARACTER_1$ = { has_trait = trusting } - $CHARACTER_2$ = { has_trait = paranoid } - } - trait:trusting = { save_scope_as = opposed_personality_trait } - } - 1 = { - trigger = { - $CHARACTER_1$ = { has_trait = paranoid } - $CHARACTER_2$ = { has_trait = trusting } - } - trait:paranoid = { save_scope_as = opposed_personality_trait } - } - 1 = { - trigger = { - $CHARACTER_1$ = { has_trait = zealous } - $CHARACTER_2$ = { has_trait = cynical } - } - trait:zealous = { save_scope_as = opposed_personality_trait } - } - 1 = { - trigger = { - $CHARACTER_1$ = { has_trait = cynical } - $CHARACTER_2$ = { has_trait = zealous } - } - trait:cynical = { save_scope_as = opposed_personality_trait } - } - 1 = { - trigger = { - $CHARACTER_1$ = { has_trait = compassionate } - $CHARACTER_2$ = { - OR = { - has_trait = callous - has_trait = sadistic - } - } - } - trait:compassionate = { save_scope_as = opposed_personality_trait } - } - 1 = { - trigger = { - $CHARACTER_1$ = { has_trait = callous } - $CHARACTER_2$ = { has_trait = compassionate } - } - trait:callous = { save_scope_as = opposed_personality_trait } - } - 1 = { - trigger = { - $CHARACTER_1$ = { has_trait = sadistic } - $CHARACTER_2$ = { has_trait = compassionate } - } - trait:sadistic = { save_scope_as = opposed_personality_trait } - } - 1 = { - trigger = { - $CHARACTER_1$ = { has_trait = loyal } - $CHARACTER_2$ = { has_trait = disloyal } - } - trait:loyal = { save_scope_as = opposed_personality_trait } - } - 1 = { - trigger = { - $CHARACTER_1$ = { has_trait = disloyal } - $CHARACTER_2$ = { has_trait = loyal } - } - trait:disloyal = { save_scope_as = opposed_personality_trait } - } - } -} diff --git a/N3OW/common/scripted_effects/00_petition_liege_effects.txt b/N3OW/common/scripted_effects/00_petition_liege_effects.txt deleted file mode 100644 index ba8c488d..00000000 --- a/N3OW/common/scripted_effects/00_petition_liege_effects.txt +++ /dev/null @@ -1,1358 +0,0 @@ - -#Effects used in Petitions - -### Council - -# Save most fitting council seat incumbent -petition_liege_0101_councillor_scope_first_effect = { - if = { - limit = { exists = $LIEGE$.cp:councillor_$ROLE$ } - $LIEGE$.cp:councillor_$ROLE$ = { save_scope_as = second_party } - } - $JOB_TAKER$ = { - set_variable = { - name = petition_liege_council_first - value = flag:$ROLE$ - } - } -} - -# Save 2nd most fitting council seat incumbent -petition_liege_0101_councillor_scope_second_effect = { - if = { - limit = { exists = $LIEGE$.cp:councillor_$ROLE$ } - $LIEGE$.cp:councillor_$ROLE$ = { save_scope_as = second_councillor } - } - $JOB_TAKER$ = { - set_variable = { - name = petition_liege_council_second - value = flag:$ROLE$ - } - } -} - -petition_liege_save_council_seat_effect = { - random_list = { # Pick best position, even if occupied - 2 = { - trigger = { - petition_liege_councillor_blocked_trigger = { - ROLE = chancellor - JOB_TAKER = $JOB_TAKER$ - LIEGE = $LIEGE$ - } - } - petition_liege_councillor_compare_modifier = { SKILL = diplomacy ROLE = chancellor JOB_TAKER = $JOB_TAKER$ } - petition_liege_0101_councillor_scope_first_effect = { ROLE = chancellor JOB_TAKER = $JOB_TAKER$ LIEGE = $LIEGE$ } - } - 2 = { - trigger = { - petition_liege_councillor_blocked_trigger = { - ROLE = marshal - JOB_TAKER = $JOB_TAKER$ - LIEGE = $LIEGE$ - } - } - petition_liege_councillor_compare_modifier = { SKILL = martial ROLE = marshal JOB_TAKER = $JOB_TAKER$ } - petition_liege_0101_councillor_scope_first_effect = { ROLE = marshal JOB_TAKER = $JOB_TAKER$ LIEGE = $LIEGE$ } - } - 2 = { - trigger = { - petition_liege_councillor_blocked_trigger = { - ROLE = steward - JOB_TAKER = $JOB_TAKER$ - LIEGE = $LIEGE$ - } - } - petition_liege_councillor_compare_modifier = { SKILL = stewardship ROLE = steward JOB_TAKER = $JOB_TAKER$ } - petition_liege_0101_councillor_scope_first_effect = { ROLE = steward JOB_TAKER = $JOB_TAKER$ LIEGE = $LIEGE$ } - } - 2 = { - trigger = { - petition_liege_councillor_blocked_trigger = { - ROLE = spymaster - JOB_TAKER = $JOB_TAKER$ - LIEGE = $LIEGE$ - } - } - petition_liege_councillor_compare_modifier = { SKILL = intrigue ROLE = spymaster JOB_TAKER = $JOB_TAKER$ } - petition_liege_0101_councillor_scope_first_effect = { ROLE = spymaster JOB_TAKER = $JOB_TAKER$ LIEGE = $LIEGE$ } - } - 2 = { - trigger = { - petition_liege_council_chaplain_appointable_trigger = { - JOB_TAKER = $JOB_TAKER$ - LIEGE = $LIEGE$ - } - petition_liege_councillor_blocked_trigger = { - ROLE = court_chaplain - JOB_TAKER = $JOB_TAKER$ - LIEGE = $LIEGE$ - } - } - petition_liege_councillor_compare_modifier = { SKILL = learning ROLE = court_chaplain JOB_TAKER = $JOB_TAKER$ } - petition_liege_0101_councillor_scope_first_effect = { ROLE = court_chaplain JOB_TAKER = $JOB_TAKER$ LIEGE = $LIEGE$ } - } - } - random_list = { - 2 = { - trigger = { - petition_liege_councillor_second_trigger = { - ROLE = chancellor - SKILL = diplomacy - JOB_TAKER = $JOB_TAKER$ - LIEGE = $LIEGE$ - } - } - modifier = { factor = $JOB_TAKER$.diplomacy } - petition_liege_0101_councillor_scope_second_effect = { - ROLE = chancellor - JOB_TAKER = $JOB_TAKER$ - LIEGE = $LIEGE$ - } - } - 2 = { - trigger = { - petition_liege_councillor_second_trigger = { - ROLE = marshal - SKILL = martial - JOB_TAKER = $JOB_TAKER$ - LIEGE = $LIEGE$ - } - } - modifier = { factor = $JOB_TAKER$.martial } - petition_liege_0101_councillor_scope_second_effect = { - ROLE = marshal - JOB_TAKER = $JOB_TAKER$ - LIEGE = $LIEGE$ - } - } - 2 = { - trigger = { - petition_liege_councillor_second_trigger = { - ROLE = steward - SKILL = stewardship - JOB_TAKER = $JOB_TAKER$ - LIEGE = $LIEGE$ - } - } - modifier = { factor = $JOB_TAKER$.stewardship } - petition_liege_0101_councillor_scope_second_effect = { - ROLE = steward - JOB_TAKER = $JOB_TAKER$ - LIEGE = $LIEGE$ - } - } - 2 = { - trigger = { - petition_liege_councillor_second_trigger = { - ROLE = spymaster - SKILL = intrigue - JOB_TAKER = $JOB_TAKER$ - LIEGE = $LIEGE$ - } - } - modifier = { factor = $JOB_TAKER$.intrigue } - petition_liege_0101_councillor_scope_second_effect = { - ROLE = spymaster - JOB_TAKER = $JOB_TAKER$ - LIEGE = $LIEGE$ - } - } - 2 = { - trigger = { - AND = { - petition_liege_council_chaplain_appointable_trigger = { JOB_TAKER = $JOB_TAKER$ LIEGE = $LIEGE$ } - petition_liege_councillor_second_trigger = { - ROLE = court_chaplain - SKILL = learning - JOB_TAKER = $JOB_TAKER$ - LIEGE = $LIEGE$ - } - } - } - modifier = { factor = $JOB_TAKER$.learning } - petition_liege_0101_councillor_scope_second_effect = { - ROLE = court_chaplain - JOB_TAKER = $JOB_TAKER$ - LIEGE = $LIEGE$ - } - } - } -} - -# Give most fitting council seat -petition_liege_0101_council_seat_effect = { - if = { - limit = { - exists = scope:second_party - scope:second_party = { is_councillor = yes } - } - scope:petition_liege = { fire_councillor = scope:second_party } - scope:second_party = { - progress_towards_rival_effect = { - CHARACTER = scope:petition_vassal - REASON = rival_council_seat - OPINION = 0 - } - add_opinion = { - target = scope:petition_vassal - modifier = annoyed_opinion - opinion = -10 - } - add_opinion = { - target = scope:petition_liege - modifier = annoyed_opinion - opinion = -10 - } - } - } - scope:petition_liege = { - if = { - limit = { scope:petition_vassal != $JOB_TAKER$ } - add_courtier = $JOB_TAKER$ - } - switch = { - trigger = $JOB_TAKER$.var:$VAR$ - flag:chancellor = { - assign_councillor_type = { type = councillor_chancellor target = $JOB_TAKER$ } - } - flag:marshal = { - assign_councillor_type = { type = councillor_marshal target = $JOB_TAKER$ } - } - flag:steward = { - assign_councillor_type = { type = councillor_steward target = $JOB_TAKER$ } - } - flag:spymaster = { - assign_councillor_type = { type = councillor_spymaster target = $JOB_TAKER$ } - } - flag:court_chaplain = { - assign_councillor_type = { type = councillor_court_chaplain target = $JOB_TAKER$ } - } - } - } - petition_liege_block_firing_councillor_effect = { - COURT_OWNER = scope:petition_liege - JOB_TAKER = $JOB_TAKER$ - } - scope:petition_vassal = { - hidden_effect = { - send_interface_toast = { - title = petition_liege.0101.t.council_seat - left_icon = scope:petition_liege - right_icon = $JOB_TAKER$ - $JOB_TAKER$ = { - custom_description = { text = petition_liege_block_firing_councillor_effect_tt } - custom_tooltip = council_appointment_toast_desc_vassal - } - show_as_tooltip = { - reverse_add_opinion = { - target = scope:second_party - modifier = annoyed_opinion - opinion = -10 - } - } - } - } - } - scope:petition_liege = { - hidden_effect = { - send_interface_toast = { - title = petition_liege.0101.t.council_seat - left_icon = $JOB_TAKER$ - right_icon = scope:second_party - $JOB_TAKER$ = { - custom_description = { text = petition_liege_block_firing_councillor_effect_tt } - custom_tooltip = council_appointment_toast_desc_liege - } - show_as_tooltip = { - reverse_add_opinion = { - target = scope:second_party - modifier = annoyed_opinion - opinion = -10 - } - } - } - } - } -} - -petition_liege_0101_court_position_effect = { - $JOB_TAKER$ = { - set_variable = { - name = petition_court_position_liege - value = scope:petition_liege - years = 5 - } - } - if = { - limit = { exists = scope:second_court_pos } - $JOB_TAKER$ = { - set_variable = { - name = petition_court_position_role - value = var:second_court_position - years = 5 - } - } - court_position_generator_assignment_effect = { - EMPLOYER = scope:petition_liege - CANDIDATE = $JOB_TAKER$ - VAR = second - } - } - else = { - $JOB_TAKER$ = { - set_variable = { - name = petition_court_position_role - value = var:target_court_position - years = 5 - } - } - court_position_generator_assignment_effect = { - EMPLOYER = scope:petition_liege - CANDIDATE = $JOB_TAKER$ - VAR = target - } - } - if = { - limit = { $JOB_TAKER$ != scope:petition_vassal } - scope:petition_vassal = { - hidden_effect = { - send_interface_toast = { - title = petition_liege.0101.t.court_position - left_icon = scope:petition_liege - right_icon = $JOB_TAKER$ - $JOB_TAKER$ = { - custom_tooltip = court_position_toast_desc_vassal - } - } - } - } - } -} - -# Block petitioner from being fired -petition_liege_block_firing_councillor_effect = { - $JOB_TAKER$ = { - custom_description = { text = petition_liege_block_firing_councillor_effect_tt } - set_variable = { - name = block_fire_councillor - value = $COURT_OWNER$ - years = council_position_locked_value - } - } -} - -### Gold -# Pay inverse of gold to petitioner -petition_liege_0101_gold_effect = { - scope:petition_liege = { - stress_impact = { - greedy = minor_stress_impact_gain - profligate = minor_stress_impact_loss - improvident = minor_stress_impact_loss - } - pay_short_term_gold = { - target = scope:petition_vassal - gold = medium_gold_value - } - } -} - -### Debt -# Pay inverse of gold to petitioner -petition_liege_0101_pay_debt_effect = { - scope:petition_liege = { - stress_impact = { - greedy = minor_stress_impact_gain - profligate = minor_stress_impact_loss - improvident = minor_stress_impact_loss - } - pay_short_term_gold = { - target = scope:petition_vassal - gold = petitioner_debt_positivization_value - } - } -} - -### War Aid -petition_liege_0101_war_aid_effect = { - scope:petition_liege = { - stress_impact = { - craven = minor_stress_impact_gain - shy = minor_stress_impact_gain - } - } - if = { - limit = { - scope:petition_vassal = { has_variable = petition_liege_war_aid_join } - } - if = { - limit = { - scope:petition_vassal = { is_attacker_in_war = scope:petition_war } - } - scope:petition_war = { add_attacker = scope:petition_liege } - } - else = { - scope:petition_war = { add_defender = scope:petition_liege } - } - } - else = { - scope:petition_liege = { remove_short_term_gold = petitioner_war_aid_levies_cost_value } - scope:petition_vassal = { - spawn_army = { - inheritable = no - name = petition_liege_war_aid_troops - levies = petitioner_war_aid_levies_value - location = scope:petition_vassal.capital_province - war = scope:petition_war - } - } - } -} - -### Vassal War -# End all vassal wars -petition_liege_0101_end_all_wars_effect = { - scope:petition_liege = { - stress_impact = { - craven = minor_stress_impact_gain - shy = minor_stress_impact_gain - diplomat = minor_stress_impact_loss - } - } - scope:petition_vassal = { - every_character_war = { - limit = { - OR = { - AND = { - primary_attacker = scope:petition_vassal - primary_defender = { is_vassal_of = scope:petition_liege } - } - AND = { - primary_defender = scope:petition_vassal - primary_attacker = { is_vassal_of = scope:petition_liege } - } - } - } - save_temporary_scope_as = this_war - show_as_tooltip = { end_war = white_peace } - primary_attacker = { - add_truce_both_ways = { - character = scope:this_war.primary_defender - years = 5 - war = scope:this_war - result = white_peace - } - } - hidden_effect = { end_war = white_peace } # For tooltip ordering, so that we can display the addition of a truce after the war ends instead of before. - } - } - scope:second_party = { - hidden_effect = { - send_interface_toast = { - title = petition_liege.0101.t.end_war - left_icon = scope:petition_vassal - right_icon = scope:petition_liege - custom_tooltip = vassal_war_toast_desc_second_party - } - } - } -} - -### Faction War -petition_liege_0101_faction_dismantle_effect = { - scope:petition_liege = { - stress_impact = { - shy = minor_stress_impact_gain - diplomat = minor_stress_impact_loss - } - } - scope:vassal_faction = { - faction_target = { - add_opinion = { - target = ROOT - modifier = grateful_opinion - opinion = 10 - } - } - if = { - limit = { - exists = special_character - NOT = { - any_faction_member = { THIS = scope:vassal_faction.special_character } - } - } - special_character = { - add_opinion = { - target = scope:petition_liege - modifier = angry_opinion - opinion = -10 - } - } - } - if = { - limit = { faction_is_at_war = no } - every_faction_member = { - custom = hold_court_8260_faction_member_tt - add_faction_cooldown_effect = { YEARS = faction_war_white_peace_cooldown } - add_opinion = { - target = scope:petition_liege - modifier = angry_opinion - opinion = -10 - } - } - destroy_faction = yes - } - else = { - every_faction_member = { - custom = hold_court_8260_faction_member_tt - add_faction_cooldown_effect = { YEARS = faction_war_defeat_cooldown } - add_opinion = { - target = scope:petition_liege - modifier = angry_opinion - opinion = -25 - } - } - faction_war = { end_war = defender } - } - } -} - -### Control -petition_liege_0101_county_control_effect = { - scope:petition_liege = { - stress_impact = { - lazy = minor_stress_impact_gain - greedy = minor_stress_impact_gain - } - remove_short_term_gold = medium_gold_value - } - every_in_list = { - list = petition_liege_county_control_list - limit = { holder = scope:petition_vassal } - custom = petition_liege_0101_county_control_effect_tt - change_county_control = 10 - add_county_modifier = { - modifier = petition_liege_county_control_modifier - years = 5 - } - custom_tooltip = petition_liege_county_control_modifier_tt - } -} - -### Convert -petition_liege_0101_county_convert_effect = { - scope:petition_liege = { - stress_impact = { - cynical = minor_stress_impact_gain - greedy = minor_stress_impact_gain - } - remove_short_term_gold = medium_gold_value - } - every_in_list = { - list = petition_liege_county_convert_list - limit = { - holder = scope:petition_vassal - county.faith != ROOT.faith - } - custom = petition_liege_0101_county_convert_effect_tt - add_county_modifier = { - modifier = petition_liege_county_convert_modifier - years = 5 - } - custom_tooltip = petition_liege_county_convert_modifier_tt - } -} - -### Opinion -petition_liege_0101_county_opinion_effect = { - scope:petition_liege = { - stress_impact = { - base = minor_stress_impact_gain - shy = minor_stress_impact_gain - lazy = minor_stress_impact_gain - craven = minor_stress_impact_gain - arrogant = minor_stress_impact_gain - reclusive = minor_stress_impact_gain - } - } - every_in_list = { - list = petition_liege_county_opinion_list - limit = { - holder = scope:petition_vassal - county_opinion <= -25 - } - custom = petition_liege_0101_county_opinion_effect_tt - add_county_modifier = { - modifier = petition_liege_county_opinion_modifier - years = 5 - } - } -} - -### Fortify -petition_liege_0101_fortify_border_effect = { - scope:petition_liege = { - stress_impact = { - brave = minor_stress_impact_gain - greedy = minor_stress_impact_gain - architect = minor_stress_impact_loss - } - remove_short_term_gold = medium_gold_value - } - every_in_list = { - list = petition_liege_fortify_border_list - limit = { - holder = scope:petition_vassal - } - custom = petition_liege_0101_fortify_border_effect_tt - add_county_modifier = { - modifier = petition_liege_fortify_border_modifier - years = 5 - } - } -} - -### Title Liege -petition_liege_0101_title_liege_effect = { - scope:petition_liege = { - stress_impact = { - greedy = medium_stress_impact_gain - } - } - create_title_and_vassal_change = { - type = granted - save_scope_as = change - add_claim_on_loss = no - } - scope:petition_claim = { - change_title_holder_include_vassals = { - holder = scope:petition_vassal - change = scope:change - } - } - resolve_title_and_vassal_change = scope:change - scope:petition_vassal = { - hidden_effect = { - send_interface_toast = { - title = petition_liege.0101.t.title_liege - left_icon = scope:petition_liege - show_as_tooltip = { - scope:petition_vassal = { get_title = scope:petition_claim } - } - } - } - } - scope:petition_liege = { - hidden_effect = { - send_interface_toast = { - title = petition_liege.0101.t.title_liege - left_icon = scope:petition_vassal - show_as_tooltip = { - scope:petition_vassal = { get_title = scope:petition_claim } - } - } - } - } -} - -### Title Vassal -petition_liege_0101_title_vassal_effect = { - scope:petition_liege = { - add_tyranny = minor_tyranny_gain - stress_impact = { - compassionate = minor_stress_impact_gain - } - } - create_title_and_vassal_change = { - type = granted - save_scope_as = change - add_claim_on_loss = yes - } - scope:petition_claim = { - change_title_holder = { - holder = scope:petition_vassal - change = scope:change - } - } - resolve_title_and_vassal_change = scope:change - scope:second_party = { - progress_towards_rival_effect = { - CHARACTER = scope:petition_vassal - REASON = rival_council_seat - OPINION = 0 - } - add_opinion = { - target = scope:petition_vassal - modifier = angry_opinion - opinion = -20 - } - add_opinion = { - target = scope:petition_liege - modifier = revoked_title - opinion = -20 - } - } - scope:petition_vassal = { - hidden_effect = { - send_interface_toast = { - title = petition_liege.0101.t.title_vassal - left_icon = scope:petition_liege - right_icon = scope:second_party - show_as_tooltip = { - scope:petition_vassal = { get_title = scope:petition_claim } - } - } - } - } - scope:petition_liege = { - hidden_effect = { - send_interface_toast = { - title = petition_liege.0101.t.title_vassal - left_icon = scope:petition_vassal - right_icon = scope:second_party - show_as_tooltip = { - scope:petition_vassal = { get_title = scope:petition_claim } - } - } - } - } - scope:second_party = { - hidden_effect = { - send_interface_toast = { - title = petition_liege.0101.t.title_vassal - left_icon = scope:petition_vassal - right_icon = scope:petition_liege - show_as_tooltip = { - scope:petition_vassal = { get_title = scope:petition_claim } - } - } - } - } - scope:petition_claim = { - set_variable = { - name = petition_title_cooldown - years = 5 - } - } -} - -### Construct City -petition_liege_0101_construct_city_effect = { - scope:petition_liege = { - stress_impact = { - greedy = medium_stress_impact_gain - architect = minor_stress_impact_loss - profligate = minor_stress_impact_loss - improvident = minor_stress_impact_loss - } - remove_short_term_gold = main_building_tier_1_cost - } - scope:petition_construct = { - begin_create_holding = { - type = city_holding - refund_cost = { gold = 0 } - } - } - scope:petition_vassal = { - hidden_effect = { - send_interface_toast = { - title = petition_liege.0101.t.construct_city - left_icon = scope:petition_liege - show_as_tooltip = { - scope:petition_construct = { - begin_create_holding = { - type = city_holding - refund_cost = { gold = 0 } - } - } - } - } - } - } -} - -### Construct Temple -petition_liege_0101_construct_temple_effect = { - scope:petition_liege = { - stress_impact = { - greedy = medium_stress_impact_gain - architect = minor_stress_impact_loss - profligate = minor_stress_impact_loss - improvident = minor_stress_impact_loss - } - remove_short_term_gold = main_building_tier_1_cost - } - scope:petition_construct = { - begin_create_holding = { - type = church_holding - refund_cost = { gold = 0 } - } - } - scope:petition_vassal = { - hidden_effect = { - send_interface_toast = { - title = petition_liege.0101.t.construct_temple - left_icon = scope:petition_liege - show_as_tooltip = { - scope:petition_construct = { - begin_create_holding = { - type = church_holding - refund_cost = { gold = 0 } - } - } - } - } - } - } -} - -### Development -petition_liege_0101_development_effect = { - scope:petition_liege = { - stress_impact = { - greedy = medium_stress_impact_gain - } - capital_province.county = { change_development_level = -2 } - hidden_effect = { - send_interface_toast = { - title = petition_liege.0101.t.development - left_icon = scope:petition_vassal - show_as_tooltip = { - capital_province.county = { change_development_level = -2 } - } - } - } - } - scope:petition_vassal = { - capital_province.county = { - change_development_level = 2 - add_county_modifier = { - modifier = petition_liege_development_modifier - years = 5 - } - } - hidden_effect = { - send_interface_toast = { - title = petition_liege.0101.t.development - left_icon = scope:petition_liege - show_as_tooltip = { - capital_province.county = { - change_development_level = 2 - add_county_modifier = { - modifier = petition_liege_development_modifier - years = 5 - } - } - } - } - } - } -} - -### House Fief -petition_liege_0101_house_fief_effect = { - scope:petition_liege = { - stress_impact = { - arrogant = medium_stress_impact_gain - } - hidden_effect = { - send_interface_toast = { - title = petition_liege.0101.t.house_fief - left_icon = scope:petition_vassal - custom_tooltip = petition_liege_house_fief_allowed - } - } - } - scope:petition_vassal = { - set_variable = { - name = petition_liege_house_fief_allowed_flag - value = scope:petition_liege - years = 10 - } - hidden_effect = { - send_interface_toast = { - title = petition_liege.0101.t.house_fief - left_icon = scope:petition_liege - custom_tooltip = petition_liege_house_fief_allowed - } - } - } -} - -petition_liege_0121_regent_effect = { - custom_tooltip = petition_liege_regent_support - scope:petition_liege = { - stress_impact = { - arrogant = medium_stress_impact_gain - } - hidden_effect = { - send_interface_toast = { - title = petition_liege.0121.t.regent - left_icon = scope:petition_vassal - right_icon = top_liege.primary_title - custom_tooltip = petition_liege_regent_support - } - } - } - scope:petition_vassal = { - hidden_effect = { - send_interface_toast = { - title = petition_liege.0121.t.regent - left_icon = scope:petition_liege - right_icon = top_liege.primary_title - set_variable = { - name = petition_liege_regent_support - value = scope:petition_liege - } - custom_tooltip = petition_liege_regent_support - } - } - } -} - -petition_liege_0121_appointment_effect = { - custom_tooltip = petition_liege_appointment_support - scope:petition_liege = { - stress_impact = { - arrogant = medium_stress_impact_gain - } - hidden_effect = { - send_interface_toast = { - title = petition_liege.0121.t.appointment - left_icon = scope:petition_vassal - right_icon = scope:petition_vassal.house - custom_tooltip = petition_liege_appointment_support - } - } - } - scope:petition_vassal = { - hidden_effect = { - send_interface_toast = { - title = petition_liege.0121.t.appointment - left_icon = scope:petition_liege - right_icon = house - house = { - set_variable = { - name = petition_liege_appointment_support - value = scope:petition_liege - } - } - custom_tooltip = petition_liege_appointment_support - } - } - } -} - -petition_liege_0121_wedding_effect = { - scope:petition_vassal = { custom_tooltip = petition_liege_wedding_permission } - scope:petition_liege = { - stress_impact = { - arrogant = medium_stress_impact_gain - } - hidden_effect = { - send_interface_toast = { - title = petition_liege.0121.t.wedding - left_icon = scope:petition_vassal - right_icon = house - custom_tooltip = petition_liege_wedding_permission - } - } - } - scope:petition_vassal = { - hidden_effect = { - send_interface_toast = { - title = petition_liege.0121.t.wedding - left_icon = scope:petition_liege - right_icon = scope:petition_liege.house - house = { - set_variable = { - name = petition_liege_wedding_permission_flag - value = scope:petition_liege.house - years = 5 - } - } - custom_tooltip = petition_liege_wedding_permission - } - } - } -} - -petition_liege_0121_privilege_effect = { - scope:petition_liege = { - stress_impact = { - arrogant = medium_stress_impact_gain - } - hidden_effect = { - send_interface_toast = { - title = petition_liege.0121.t.privilege - left_icon = scope:petition_vassal - show_as_tooltip = { add_prestige = major_prestige_value } - } - } - } - scope:petition_vassal = { - add_prestige = major_prestige_value - hidden_effect = { - send_interface_toast = { - title = petition_liege.0121.t.privilege - left_icon = scope:petition_liege - show_as_tooltip = { add_prestige = major_prestige_value } - } - } - } -} - -### Grandeur/Renown -petition_pos_grandeur_renown_effect = { - if = { - limit = { petition_liege_medium_cost_trigger = yes } - scope:petition_liege = { change_current_court_grandeur = minor_court_grandeur_gain } - } - else_if = { - limit = { petition_liege_high_cost_trigger = yes } - scope:petition_liege = { change_current_court_grandeur = medium_court_grandeur_gain } - } - if = { - limit = { scope:petition_liege.dynasty = scope:petition_vassal.dynasty } - scope:petition_liege.dynasty = { add_dynasty_prestige = minor_dynasty_prestige_value } - } - else = { - scope:petition_liege.dynasty = { add_dynasty_prestige = miniscule_dynasty_prestige_gain } - scope:petition_vassal.dynasty = { add_dynasty_prestige = miniscule_dynasty_prestige_gain } - } -} - -petition_neg_grandeur_renown_effect = { - scope:petition_liege = { - change_current_court_grandeur = minor_court_grandeur_loss - dynasty = { add_dynasty_prestige = miniscule_dynasty_prestige_loss } - } -} - -### Run relevant effects for request -petition_type_outcome_effect = { - switch = { - trigger = scope:petition_vassal.var:petition_type - flag:fallback = { petition_liege_0101_gold_effect = yes } - flag:gold = { petition_liege_0101_gold_effect = yes } - flag:council_seat = { - if = { - limit = { exists = scope:second_council_pos } - petition_liege_0101_council_seat_effect = { - JOB_TAKER = scope:petition_vassal - VAR = petition_liege_council_second - } - } - else = { - petition_liege_0101_council_seat_effect = { - JOB_TAKER = scope:petition_vassal - VAR = petition_liege_council_first - } - } - } - flag:council_seat_family = { - if = { - limit = { exists = scope:second_council_pos } - petition_liege_0101_council_seat_effect = { - JOB_TAKER = scope:petition_char - VAR = petition_liege_council_second - } - } - else = { - petition_liege_0101_council_seat_effect = { - JOB_TAKER = scope:petition_char - VAR = petition_liege_council_first - } - } - } - flag:court_position = { - petition_liege_0101_court_position_effect = { JOB_TAKER = scope:petition_vassal } - } - flag:court_position_family = { - petition_liege_0101_court_position_effect = { JOB_TAKER = scope:petition_char } - } - flag:governorship_family = { - petition_liege_governorship_effect = { - CHAR = scope:petition_char - TITLE = scope:governorship_title - GRANTED_FROM = scope:petition_liege - } - } - flag:house_governorship_rights = { - petition_liege_house_governorship_rights_effect = yes - } - flag:pay_debt = { petition_liege_0101_pay_debt_effect = yes } - flag:war_aid = {petition_liege_0101_war_aid_effect = yes } - flag:vassal_war = { petition_liege_0101_end_all_wars_effect = yes } - flag:faction_war = { petition_liege_0101_faction_dismantle_effect = yes } - flag:county_control = { petition_liege_0101_county_control_effect = yes } - flag:county_convert = { petition_liege_0101_county_convert_effect = yes } - flag:county_opinion = { petition_liege_0101_county_opinion_effect = yes } - flag:fortify_border = { petition_liege_0101_fortify_border_effect = yes } - flag:title_liege = { petition_liege_0101_title_liege_effect = yes } - flag:title_vassal = { - if = { - limit = { - scope:second_party = { is_ai = no } - } - scope:second_party = { trigger_event = petition_liege.0501 } - custom_description_no_bullet = { - text = petition_liege_second_if_tt - object = scope:second_party - } - scope:second_party = { - show_as_tooltip = { petition_liege_0101_title_vassal_effect = yes } - } - } - else = { petition_liege_0101_title_vassal_effect = yes } - } - flag:construct_city = { petition_liege_0101_construct_city_effect = yes } - flag:construct_temple = { petition_liege_0101_construct_temple_effect = yes } - flag:development = { petition_liege_0101_development_effect = yes } - flag:house_fief = { petition_liege_0101_house_fief_effect = yes } - flag:regent = { petition_liege_0121_regent_effect = yes } - flag:appointment = { petition_liege_0121_appointment_effect = yes } - flag:wedding = { petition_liege_0121_wedding_effect = yes } - flag:privilege = { petition_liege_0121_privilege_effect = yes } - } - petition_pos_grandeur_renown_effect = yes -} - -### Bribes -# Pay gold to liege -petition_liege_0101_petitioner_pays_gold_bribe_effect = { - scope:petition_vassal = { - pay_short_term_gold = { - target = scope:petition_liege - gold = scope:petition_vassal.medium_gold_value - } - } -} - -# Grant favor to liege -petition_liege_0101_petitioner_gives_favor_hook_effect = { - scope:petition_liege = { - add_hook = { - target = scope:petition_vassal - type = favor_hook - years = 10 - } - } -} - -# Remove petitioner from factions -petition_liege_0101_petitioner_blocked_from_factions_effect = { - scope:petition_vassal = { - leave_faction = joined_faction - add_faction_cooldown_effect = { YEARS = 10 } - } -} - -# Increase contractual obligations -petition_liege_0101_petitioner_contract_increase_effect = { - if = { - limit = { - vassal_contract_obligation_level:feudal_government_levies < vassal_contract_obligation_level:feudal_government_taxes - vassal_contract_obligation_level_can_be_increased = feudal_government_levies - } - vassal_contract_increase_obligation_level = feudal_government_levies - } - else_if = { - limit = { - vassal_contract_obligation_level:feudal_government_taxes < vassal_contract_obligation_level:feudal_government_levies - vassal_contract_obligation_level_can_be_increased = feudal_government_taxes - } - vassal_contract_increase_obligation_level = feudal_government_taxes - } - else = { - if = { - limit = { vassal_contract_obligation_level_can_be_increased = feudal_government_taxes } - vassal_contract_increase_obligation_level = feudal_government_levies - } - else = { vassal_contract_increase_obligation_level = feudal_government_taxes } - } - hidden_effect = { set_subject_contract_modification_blocked = yes } -} - -# Vows -petition_liege_0101_petitioner_vows_effect = { - scope:monk = { add_trait = devoted } -} - -# Knight -petition_liege_0101_petitioner_knight_effect = { - scope:petition_liege = { add_courtier = scope:knight } -} - -petition_skill_duel_lose_effect = { - send_interface_toast = { - title = petition_liege.0401.failure - left_icon = scope:petition_liege - #show_as_tooltip = { - # activity = { complete_activity = yes } - #} - } -} - -petition_skill_duel_effect = { - duel = { - skill = $SKILL$ - target = $TARGET$ - 8 = { - desc = petition_liege.0401.success - compare_modifier = { - value = scope:duel_value - multiplier = 0.5 - } - hidden_effect = { petition_type_outcome_effect = yes } - custom_tooltip = petition_liege_accept_tt - reverse_add_opinion = { - target = $TARGET$ - modifier = annoyed_opinion - opinion = -10 - } - } - 12 = { - desc = petition_liege.0401.failure - petition_skill_duel_lose_effect = yes - } - } -} - -petition_liege_governorship_effect = { - create_title_and_vassal_change = { - type = granted - save_scope_as = change - add_claim_on_loss = no - } - hidden_effect = { - $TITLE$ = { - $GRANTED_FROM$ = { - every_held_title = { - title_tier >= county - limit = { - OR = { - de_jure_liege = $TITLE$ - de_jure_liege.de_jure_liege = $TITLE$ - } - } - add_to_list = transfer_list - change_title_holder = { - holder = $CHAR$ - change = scope:change - take_baronies = no - } - } - } - } - } - $TITLE$ = { - change_title_holder_include_vassals = { - holder = $CHAR$ - change = scope:change - take_baronies = no - } - } - hidden_effect = { - scope:petition_vassal = { - send_interface_toast = { - title = petition_liege.0101.t.governorship - left_icon = $CHAR$ - right_icon = $TITLE$ - show_as_tooltip = { - $TITLE$ = { - change_title_holder_include_vassals = { - holder = $CHAR$ - change = scope:change - take_baronies = no - } - } - } - } - } - scope:petition_liege = { - send_interface_toast = { - title = petition_liege.0101.t.governorship - left_icon = $CHAR$ - right_icon = $TITLE$ - show_as_tooltip = { - $TITLE$ = { - change_title_holder_include_vassals = { - holder = $CHAR$ - change = scope:change - take_baronies = no - } - } - } - } - } - } - resolve_title_and_vassal_change = scope:change -} - -petition_liege_save_governorship_effect = { - if = { - limit = { - any_held_title = { - petition_liege_governorship_duchy_request = { LIEGE = scope:petition_liege } - } - } - random_held_title = { - limit = { petition_liege_governorship_duchy_request = { LIEGE = scope:petition_liege } } - save_scope_as = governorship_title - } - } - else_if = { - limit = { - any_held_title = { - petition_liege_governorship_county_request = { LIEGE = scope:petition_liege } - } - } - random_held_title = { - limit = { petition_liege_governorship_county_request = { LIEGE = scope:petition_liege } } - save_scope_as = governorship_title - } - } - else_if = { - limit = { - any_held_title = { - petition_liege_governorship_kingdom_request = { LIEGE = scope:petition_liege } - } - } - random_held_title = { - limit = { petition_liege_governorship_kingdom_request = { LIEGE = scope:petition_liege } } - save_scope_as = governorship_title - } - } -} - -petition_liege_house_governorship_rights_effect = { - scope:petition_vassal.primary_title = { - custom_tooltip = { - text = petition_liege_house_governorship_rights_tt - set_variable = { - name = petition_house_rights - value = scope:petition_vassal.house - years = 100 - } - } - } -} - -# Add petitioner to bloc -petition_liege_0121_petitioner_force_join_bloc_effect = { - scope:petition_vassal.house = { - if = { - limit = { exists = house_confederation } - tgp_leave_house_bloc_effect = { - OPINION = flag:yes - TRUCE = flag:yes - } - } - tgp_join_house_bloc_effect = { - INVITER = scope:petition_liege.house - OPINION = flag:no - } - } -} diff --git a/N3OW/common/scripted_effects/00_pilgrimage_effects.txt b/N3OW/common/scripted_effects/00_pilgrimage_effects.txt deleted file mode 100644 index 69b87408..00000000 --- a/N3OW/common/scripted_effects/00_pilgrimage_effects.txt +++ /dev/null @@ -1,1325 +0,0 @@ -##################################################################### -# EFFECT LIST -##################################################################### -# !!! Remember to add all new effects with a short description here !!! - -### Reward effects -# pilgrimage_completed_log_entry_effect -- Grants you Hajj or Pilgrimage rewards, is run in the on_complete of the Pilgrimage activity -# pilgrimage_additional_reward_effect -- Gives additional rewards for going on Pilgrimage with certain tenets -# -# give_pilgrim_trait_or_xp_effect -- Grants you Pilgrimage trait as appropriate; if you already have the trait it either gives xp or piety. Also logs arrival in activity log for host -# give_hajj_trait_or_xp_effect -- Grants you Hajjaj trait as appropriate; if you already have the trait it either gives xp or piety. Also logs arrival in activity log for host -# give_pilgrim_xp_effect -- If you already have the trait, determine what kind of xp or other reward to get -# -# award_piety_reward_effect -- Determines the amount of piety to reward, takes the predetermined $LENGTH$-parameter -# give_pious_type_reward_effect -- If we have the Pious/Hajj Type, determine what reward we are getting -# give_worldly_type_reward_effect -- If we have the Worldly Type, determine what reward we are getting - - -### Activity effects -# set_pilgrimage_distance_variable_effect -- Set variables tracking the length of the Pilgrimage (See pilgrimage_values.txt) -# save_unique_holy_site_and_update_count_variable_for_tally_effect - Track unique holy sites visited for conclusion, rewards and other statistics -# pilgrimages_track_encountered_cultures_effect -- Track how many cultures you've encountered on your pilgrimage - - -### Artifact effects -# christian_saint_bone_creation_effect -- Create a bone of a random saint in a box -# christian_saint_bone_tooltip_effect -- Needed to ensure tooltip matches artifact name - - -### Event effects -# give_pilgrimage_reward_effect -- Picks the correct Pilgrimage reward to grant -# pilgrimage_arrival_stress_loss_effect -- Stress loss when arriving at the holy site -# -# pious_type_option_effect -- Checks if you have the pious type and updates the activity_special_type_progression variable -# worldly_type_option_effect -- Checks if you have the worldly type and updates the activity_special_type_progression variable -# bonus_to_all_types_effect -- Blanket effect for an option that should boost all types -# very_pious_type_option_effect -- VERY boosting - very rare - Checks if you have the pious type and updates the activity_special_type_progression variable -# very_worldly_type_option_effect - VERY boosting - very rare - Checks if you have the worldly type and updates the activity_special_type_progression variable -# -# account_for_pilgrimage_length_type_effect -- Boost short pilgrimages a bit so they don't always get shafted -# resolve_pilgrimage_type_reward_effect -- Account for the state of our variables, apply flags that are resolved in give_pilgrimage_reward_effect - run in pilgrimage.7000 -# clean_up_pilgrimage_type_reward_flags_effect -- Clean up the flags - - - - - -##################################################################### -# EFFECTS -##################################################################### - -### Reward effects ### - -#Grants you Hajj or Pilgrimage rewards, is run in the on_complete of the Pilgrimage activity -pilgrimage_completed_log_entry_effect = { - if = { - limit = { has_hajj_pilgrimage_type_trigger = yes } - involved_activity = { - add_activity_log_entry = { - key = hajj_completed_log - tags = { completed } - score = 100 - show_in_conclusion = yes - character = root - #Effects - root = { - #This effect applies traits/xp as appropriate and ALSO calls give_pilgrimage_reward_effect - give_hajj_trait_or_xp_effect = yes - } - } - } - } - else_if = { - limit = { exists = involved_activity } - involved_activity = { - add_activity_log_entry = { - key = pilgrimage_completed_log - tags = { completed } - score = 100 - show_in_conclusion = yes - character = root - #Effects - root = { - #This effect applies traits/xp as appropriate and also calls give_pilgrimage_reward_effect - give_pilgrimage_reward_effect = yes - } - } - } - } -} - -#Gives additional rewards for going on Pilgrimage with certain tenets -pilgrimage_additional_reward_effect = { - # Armed Pilgrimages - if = { - limit = { - faith = { has_doctrine = tenet_armed_pilgrimages } - } - custom_description_no_bullet = { - text = pilgrimage_because_i_have_armed_pilgrimages - } - add_character_modifier = { - modifier = pilgrimage_armed_pilgrimages_modifier - years = 10 - } - } - # Mendicant Preachers - if = { - limit = { - faith = { has_doctrine = tenet_mendicant_preachers } - } - custom_description_no_bullet = { - text = pilgrimage_because_i_have_tenet_mendicant_preachers - } - add_character_modifier = { - modifier = pilgrimage_mendicant_preachers_modifier - years = 10 - } - } - # Pentarchy - if = { - limit = { - faith = { has_doctrine = tenet_pentarchy } - } - custom_description_no_bullet = { - text = pilgrimage_because_i_have_tenet_pentarchy - } - add_character_modifier = { - modifier = pilgrimage_pentarchy_modifier - years = 10 - } - } - # Struggle and Submission - if = { - limit = { - faith = { has_doctrine = tenet_struggle_submission } - } - custom_description_no_bullet = { - text = pilgrimage_because_i_have_tenet_struggle_submission - } - add_character_modifier = { - modifier = pilgrimage_struggle_submission_modifier - years = 10 - } - } - # Ancestor Worship - if = { - limit = { - faith = { has_doctrine = tenet_ancestor_worship } - } - custom_description_no_bullet = { - text = pilgrimage_because_i_have_tenet_ancestor_worship - } - add_character_modifier = { - modifier = pilgrimage_ancestor_worship_modifier - years = 10 - } - } - # Esotericism - if = { - limit = { - faith = { has_doctrine = tenet_esotericism } - NOT = { - has_trait = lifestyle_mystic - has_trait_xp = { - trait = lifestyle_mystic - value >= 100 - } - } - } - custom_description_no_bullet = { - text = pilgrimage_because_i_have_tenet_esotericism - subject = root - } - random_list = { - desc = pilgrimage_learn_from_the_bishops - 50 = { - desc = pilgrimage_learn_from_the_bishops_success - compare_modifier = { - value = learning - multiplier = 5 - } - if = { - limit = { - NOT = { has_trait = lifestyle_mystic } - } - add_trait = lifestyle_mystic - } - else = { - add_trait_xp = { - trait = lifestyle_mystic - value = 5 - } - } - } - 50 = { - desc = pilgrimage_learn_from_the_bishops_failure - send_interface_toast = { - title = pilgrimage_learn_from_the_bishops_failure - left_icon = root - } - } - } - } -} - -#Grants you Pilgrimage trait as appropriate; if you already have the trait it either gives xp or piety. Also logs arrival in activity log for host -give_pilgrim_trait_or_xp_effect = { - if = { - limit = { has_hajj_pilgrimage_type_trigger = no } - if = { # Host - limit = { this = involved_activity.activity_host } - involved_activity = { - add_activity_log_entry = { - key = pilgrimage_arrived_log - score = 50 - tags = { arrived } - character = root - show_in_conclusion = yes - #Effects - root = { - if = { - limit = { - NOT = { has_trait = pilgrim } - } - add_trait = pilgrim - } - else_if = { - limit = { - has_trait_xp = { - trait = pilgrim - value < 100 - } - } - add_trait_xp = { - trait = pilgrim - value = 20 - } - } - else_if = { - limit = { has_lifestyle = learning_lifestyle } - add_learning_lifestyle_xp = major_lifestyle_xp - } - else = { add_character_flag = should_get_trait_piety } - } - } - } - } - else = { # Non-Host - if = { - limit = { - NOT = { has_trait = pilgrim } - } - add_trait = pilgrim - } - else_if = { - limit = { - has_trait_xp = { - trait = pilgrim - value < 100 - } - } - add_trait_xp = { - trait = pilgrim - value = 10 - } - } - else_if = { - limit = { has_lifestyle = learning_lifestyle } - add_learning_lifestyle_xp = major_lifestyle_xp - } - else = { add_character_flag = should_get_trait_piety } - } - } - #Add trait or xp for any people coming along as well - if = { - limit = { - current_travel_plan ?= { - any_entourage_character = { count > 1 } - } - } - #To get the past tense loc for the Obligatory arrival - custom_description_no_bullet = { - text = pilgrimage_entourage_gains_pilgrim_trait - hidden_effect = { - current_travel_plan = { - every_entourage_character = { - if = { - limit = { - NOT = { has_trait = pilgrim } - } - add_trait = pilgrim - } - else_if = { - limit = { has_trait = pilgrim } - add_trait_xp = { - trait = pilgrim - value = 10 - } - } - } - } - } - } - } -} - -#Grants you Hajjaj trait as appropriate; if you already have the trait it either gives xp or piety. Also logs the effect in activity log for host -give_hajj_trait_or_xp_effect = { - if = { - limit = { - NOT = { has_trait = hajjaj } - } - add_trait = hajjaj - } - else_if = { - limit = { has_lifestyle = learning_lifestyle } - add_learning_lifestyle_xp = major_lifestyle_xp - } - else = { add_character_flag = should_get_trait_piety } - give_pilgrimage_reward_effect = yes -} - -#If you already have the trait, determine what kind of xp or other reward to get -give_pilgrim_xp_effect = { - if = { - limit = { - has_trait = pilgrim - has_trait_xp = { - trait = pilgrim - value < 100 - } - } - add_trait_xp = { - trait = pilgrim - value = 5 - } - } - else_if = { - limit = { has_lifestyle = learning_lifestyle } - add_learning_lifestyle_xp = medium_lifestyle_xp - } - else_if = { - limit = { has_trait = zealous } - stress_impact = { base = medium_stress_loss } - } - else = { - stress_impact = { base = minor_stress_loss } - } -} - -#Determines the amount of piety to reward, takes the predetermined $LENGTH$-parameter -give_piety_reward_effect = { - add_piety = { - value = $LENGTH$_pilgrimage_piety_gain - # Multipliers - ## How seriously are you taking this pilgrimage? - ### Not very. - if = { - limit = { - root.involved_activity = { - has_activity_option = { - category = pilgrimage_option_fidelity - option = pilgrimage_fidelity_obligatory - } - } - } - multiply = 0.5 - } - ### Thuper theriouthe. - else_if = { - limit = { - root.involved_activity = { - has_activity_option = { - category = pilgrimage_option_fidelity - option = pilgrimage_fidelity_contemplative - } - } - } - multiply = 1.25 - } - ## Depending on how well you clung to your intent, you may get a higher reward. - if = { - limit = { has_character_flag = perfect_pious_reward } - multiply = pilgrimage_perfect_pious_multiplier - } - else_if = { - limit = { has_character_flag = high_pious_reward } - multiply = pilgrimage_high_pious_multiplier - } - else_if = { - limit = { has_character_flag = mid_pious_reward } - multiply = pilgrimage_mid_pious_multiplier - } - else_if = { - limit = { has_character_flag = low_pious_reward } - multiply = pilgrimage_low_pious_multiplier - } - # Additives - ## Experienced pilgrims may get more piety overall. - if = { - limit = { has_character_flag = should_get_trait_piety } - add = minor_piety_gain - } - ## Certain activity options may give you more piety also. - if = { - limit = { - root.involved_activity = { - OR = { - has_activity_option = { - category = pilgrimage_option_pomp - option = pilgrimage_pomp_humble - } - has_activity_option = { - category = pilgrimage_option_pomp - option = pilgrimage_pomp_ceremonial - } - } - } - } - add = minor_piety_gain - } - else_if = { - limit = { - root.involved_activity = { - has_activity_option = { - category = pilgrimage_option_pomp - option = pilgrimage_pomp_throng - } - } - } - add = medium_piety_gain - } - # Final mutlipliers - if = { - limit = { - root.confederation ?= { has_cohesion_level_parameter = any_member_increased_pilgrimage_rewards } - } - multiply = 1.1 - } - } -} - -#If we have the Pious Type, determine what reward we are getting -give_pious_type_reward_effect = { - if = { - limit = { - has_trait = pilgrim #This should be awarded upon arrival from your first pilgrimage - has_trait_xp = { - trait = pilgrim - value < 100 - } - } - if = { - limit = { has_character_flag = perfect_pious_reward } - add_trait_xp = { - trait = pilgrim - value = 40 - } - } - if = { - limit = { has_character_flag = high_pious_reward } - add_trait_xp = { - trait = pilgrim - value = 20 - } - } - if = { - limit = { has_character_flag = mid_pious_reward } - add_trait_xp = { - trait = pilgrim - value = 10 - } - } - if = { - limit = { has_character_flag = low_pious_reward } - add_trait_xp = { - trait = pilgrim - value = 5 - } - } - } -} - -#If we have the Worldly Pilgrimage, determine what reward we are getting -give_worldly_type_reward_effect = { - if = { - limit = { has_character_flag = perfect_worldly_reward } - if = { - limit = { - root.culture.culture_head = root - current_travel_plan = { - any_in_list = { - variable = visited_cultures_list - count > 0 - } - } - } - current_travel_plan = { - if = { - limit = { - any_in_list = { - variable = visited_cultures_list - count > 5 - } - } - every_in_list = { - variable = visited_cultures_list - custom = pilgrimage_cultural_acceptance_all_encountered.tt - change_cultural_acceptance = { - target = root.culture - value = pilgrimage_perfect_worldly_acceptance_value - desc = cultural_acceptance_gain_worldly_pilgrimage - } - } - } - else = { - every_in_list = { - variable = visited_cultures_list - custom = pilgrimage_cultural_acceptance_all_encountered.tt - change_cultural_acceptance = { - target = root.culture - value = pilgrimage_perfect_worldly_acceptance_value - desc = cultural_acceptance_gain_worldly_pilgrimage - } - } - } - } - } - else = { - add_character_modifier = { - modifier = pilgrimage_perfect_worldly_reward_modifier - years = 5 - } - } - } - if = { - limit = { has_character_flag = high_worldly_reward } - if = { - limit = { - root.culture.culture_head = root - current_travel_plan = { - any_in_list = { - variable = visited_cultures_list - count > 0 - } - } - } - current_travel_plan = { - if = { - limit = { - any_in_list = { - variable = visited_cultures_list - count > 5 - } - } - every_in_list = { - variable = visited_cultures_list - custom = pilgrimage_cultural_acceptance_all_encountered.tt - change_cultural_acceptance = { - target = root.culture - value = pilgrimage_high_worldly_acceptance_value - desc = cultural_acceptance_gain_worldly_pilgrimage - } - } - } - else = { - every_in_list = { - variable = visited_cultures_list - custom = pilgrimage_cultural_acceptance_all_encountered.tt - change_cultural_acceptance = { - target = root.culture - value = pilgrimage_high_worldly_acceptance_value - desc = cultural_acceptance_gain_worldly_pilgrimage - } - } - } - } - } - else = { - add_character_modifier = { - modifier = pilgrimage_high_worldly_reward_modifier - years = 5 - } - } - } - if = { - limit = { has_character_flag = mid_worldly_reward } - if = { - limit = { - root.culture.culture_head = root - current_travel_plan = { - any_in_list = { - variable = visited_cultures_list - count > 0 - } - } - } - current_travel_plan = { - if = { - limit = { - any_in_list = { - variable = visited_cultures_list - count > 3 - } - } - every_in_list = { - variable = visited_cultures_list - custom = pilgrimage_cultural_acceptance_all_encountered.tt - change_cultural_acceptance = { - target = root.culture - value = pilgrimage_mid_worldly_acceptance_value - desc = cultural_acceptance_gain_worldly_pilgrimage - } - } - } - else = { - every_in_list = { - variable = visited_cultures_list - custom = pilgrimage_cultural_acceptance_all_encountered.tt - change_cultural_acceptance = { - target = root.culture - value = pilgrimage_mid_worldly_acceptance_value - desc = cultural_acceptance_gain_worldly_pilgrimage - } - } - } - } - } - else = { - add_character_modifier = { - modifier = pilgrimage_mid_worldly_reward_modifier - years = 5 - } - } - } - if = { - limit = { has_character_flag = low_worldly_reward } - if = { - limit = { - root.culture.culture_head = root - current_travel_plan = { - any_in_list = { - variable = visited_cultures_list - count > 0 - } - } - } - current_travel_plan = { - if = { - limit = { - any_in_list = { - variable = visited_cultures_list - count > 5 - } - } - every_in_list = { - variable = visited_cultures_list - custom = pilgrimage_cultural_acceptance_all_encountered.tt - change_cultural_acceptance = { - target = root.culture - value = pilgrimage_low_worldly_acceptance_value - desc = cultural_acceptance_gain_worldly_pilgrimage - } - } - } - else = { - every_in_list = { - variable = visited_cultures_list - custom = pilgrimage_cultural_acceptance_all_encountered.tt - change_cultural_acceptance = { - target = root.culture - value = pilgrimage_low_worldly_acceptance_value - desc = cultural_acceptance_gain_worldly_pilgrimage - } - } - } - } - } - else = { - add_character_modifier = { - modifier = pilgrimage_low_worldly_reward_modifier - years = 5 - } - } - } -} - - -### Activity effects ### - -#Set variables tracking the length of the Pilgrimage (See pilgrimage_values.txt) -set_pilgrimage_distance_variable_effect = { - # Requires PILGRIM = character - # Requires HOLY_SITE = barony_title - $PILGRIM$.capital_barony = { # Only landed characters can go on regular pilgrimages - save_temporary_scope_as = start_barony - } - # Calculate distance to the target holy site - # The value set indicates how many Journey Events a character will get - if = { - limit = { - scope:start_barony = { - squared_distance = { - target = $HOLY_SITE$ - value > long_pilgrimage_max_length - } - } - } - scope:activity = { - set_variable = { - name = pilgrimage_distance - value = flag:very_long_pilgrimage_var - } - } - } - else_if = { - limit = { - scope:start_barony = { - squared_distance = { - target = $HOLY_SITE$ - value > medium_pilgrimage_max_length - } - } - } - scope:activity = { - set_variable = { - name = pilgrimage_distance - value = flag:long_pilgrimage_var - } - } - } - else_if = { - limit = { - scope:start_barony = { - squared_distance = { - target = $HOLY_SITE$ - value > short_pilgrimage_max_length - } - } - } - scope:activity = { - set_variable = { - name = pilgrimage_distance - value = flag:medium_pilgrimage_var - } - } - } - else = { - scope:activity = { - set_variable = { - name = pilgrimage_distance - value = flag:short_pilgrimage_var - } - } - } -} - -#Track unique holy sites visited for conclusion, rewards and other statistics - saves a variable_list and variable on your character -save_unique_holy_site_and_update_count_variable_for_tally_effect = { - #If this is our first holy site, set up the variable - if = { - limit = { - #These two really shouldn't exist without each other, but safe-checking - NOT = { exists = var:visited_unique_holy_sites_list } - NOT = { exists = var:visited_unique_holy_sites_count } - } - #Create variables - add_to_variable_list = { - name = visited_unique_holy_sites_list - target = $HOLY_SITE$ - } - set_variable = { - name = visited_unique_holy_sites_count - value = 1 - } - add_character_flag = added_new_holy_site - } - #Otherwise add the holy site if we don't already have it - else_if = { - limit = { - #These two really shouldn't exist without each other, but safe-checking - exists = var:visited_unique_holy_sites_count - #Does this holy site exist in the list? - any_in_list = { - variable = visited_unique_holy_sites_list - NOT = { this = $HOLY_SITE$ } - } - } - #Add the holy site to the list - add_to_variable_list = { - name = visited_unique_holy_sites_list - target = $HOLY_SITE$ - } - #Count up the variable - change_variable = { - name = visited_unique_holy_sites_count - add = 1 - } - add_character_flag = added_new_holy_site - } -} - -#Track how many cultures you've encountered on your pilgrimage - is saved on the current_travel_plan and destroyed with the travel plan -pilgrimages_track_encountered_cultures_effect = { - current_travel_plan = { - if = { - limit = { - NOT = { - exists = var:visited_cultures_list - root.location.culture = root.culture - } - } - add_to_variable_list = { - name = visited_cultures_list - target = root.location.culture - } - } - else_if = { - limit = { - NOT = { - any_in_list = { - variable = visited_cultures_list - this = root.location.culture - } - root.location.culture = root.culture - } - } - add_to_variable_list = { - name = visited_cultures_list - target = root.location.culture - } - } - } -} - - -### Artifact effects ### - -# Create a bone of a random saint in a box -christian_saint_bone_creation_effect = { - if = { - limit = { - has_royal_court = yes - OR = { - faith = faith:catholic - faith = faith:orthodox - faith = faith:nestorian - faith = faith:coptic - faith = faith:armenian_apostolic - faith = faith:insular_celtic - faith = { has_doctrine = tenet_christian_syncretism } - } - } - hidden_effect = { - random = { - chance = 10 # 10% base chance - modifier = { - add = 10 # 20% chance for medium - exists = scope:activity - exists = var:pilgrimage_distance - scope:activity.var:pilgrimage_distance = flag:medium_pilgrimage_var - } - modifier = { - add = 20 # 30% chance for long - exists = scope:activity - exists = var:pilgrimage_distance - scope:activity.var:pilgrimage_distance = flag:long_pilgrimage_var - } - modifier = { - add = 30 # 40% chance for very long - exists = scope:activity - exists = var:pilgrimage_distance - scope:activity.var:pilgrimage_distance = flag:very_long_pilgrimage_var - } - modifier = { - add = 10 - has_character_flag = mid_pious_reward - } - modifier = { - add = 20 - has_character_flag = high_pious_reward - } - modifier = { - add = 30 - has_character_flag = perfect_pious_reward - } - modifier = { # half as likely for AI - factor = 0.5 - is_ai = yes - } - save_scope_as = saint_bone_owner - create_artifact = { - name = christian_saint_bone_name - description = christian_saint_bone_description - type = pedestal - visuals = bone - template = saintly_bones_template - modifier = artifact_monthly_piety_1_modifier - save_scope_as = christian_saint_bone_scope - } - scope:christian_saint_bone_scope = { - set_variable = { # required to track usability for template - name = saint_bone_faith - value = scope:saint_bone_owner.faith - } - set_variable = { # required to track usability for template - name = holy_site - value = scope:saint_bone_owner.involved_activity.activity_location.county - } - if = { - limit = { exists = var:holy_site } - #To prevent unused variable errors :catto: - } - } - scope:activity ?= { - add_activity_log_entry = { - key = pilgrimage_completed_relic_log - score = 75 - tags = { complete } - character = scope:host - artifact = scope:christian_saint_bone_scope - show_in_conclusion = yes - # Effects - scope:christian_saint_bone_scope = { - set_owner = root - } - } - } - } - } - } -} - -# Needed to ensure tooltip matches artifact name -christian_saint_bone_tooltip_effect = { - if = { - limit = { exists = scope:christian_saint_bone_scope } - show_as_tooltip = { - scope:christian_saint_bone_scope = { set_owner = scope:host } - } - } -} - - -### Event effects ### - -#Picks the correct Pilgrimage reward to grant -give_pilgrimage_reward_effect = { - #Short Pilgrimage reward - if = { - limit = { short_pilgrimage_trigger = yes } - give_piety_reward_effect = { LENGTH = short } - give_pious_type_reward_effect = yes - give_worldly_type_reward_effect = yes - } - #Medium Pilgrimage reward - else_if = { - limit = { medium_pilgrimage_trigger = yes } - give_piety_reward_effect = { LENGTH = medium } - give_pious_type_reward_effect = yes - give_worldly_type_reward_effect = yes - } - #Long Pilgrimage reward - else_if = { - limit = { long_pilgrimage_trigger = yes } - give_piety_reward_effect = { LENGTH = long } - give_pious_type_reward_effect = yes - give_worldly_type_reward_effect = yes - } - #Very Long Pilgrimage reward - else_if = { - limit = { very_long_pilgrimage_trigger = yes } - give_piety_reward_effect = { LENGTH = very_long } - give_pious_type_reward_effect = yes - give_worldly_type_reward_effect = yes - } - christian_saint_bone_tooltip_effect = yes - pilgrimage_additional_reward_effect = yes - remove_character_flag = should_get_trait_piety - # LEGITIMACY GAIN FOR ACTIVITY PARTICIPATION - PILGRIMAGE - pilgrimage_activity_participation_legitimacy_effect = yes - # Sacred Mountains tenet - if = { - limit = { - faith = { has_doctrine_parameter = piety_from_hills_and_mountains_pilgrimages } - location = { - OR = { - terrain = hills - terrain = mountains - terrain = desert_mountains - } - } - } - custom_tooltip = { - text = piety_from_hills_and_mountains_pilgrimages_tt - add_piety = medium_piety_gain - } - } -} - -#Stress loss when arriving at the holy site -pilgrimage_arrival_stress_loss_effect = { - if = { - limit = { has_trait = zealous } - stress_impact = { base = medium_stress_loss } - } - else_if = { - limit = { has_trait = cynical } - #No stress loss for you! - } - else = { - stress_impact = { base = minor_stress_loss } - } -} - - -#Checks if you have the pious type and updates the activity_special_type_progression variable -pious_type_option_effect = { - involved_activity = { - if = { - limit = { - OR = { - activity_has_pious_pilgrimage_type_trigger = yes - #Hajj should also be considered a pious pilgrimage - activity_has_hajj_pilgrimage_type_trigger = yes - } - } - custom_tooltip = pilgrimage_pious_type_tt_positive - activity_special_type_progression_major= yes - } - } -} - -#Checks if you have the worldly type and updates the activity_special_type_progression variable -worldly_type_option_effect = { - involved_activity = { - if = { - limit = { activity_has_worldly_pilgrimage_type_trigger = yes } - custom_tooltip = pilgrimage_worldly_type_tt_positive - activity_special_type_progression_major = yes - } - } -} - -#Blanket effect for an option that should boost all types (not Hajj) -bonus_to_all_types_effect = { - pious_type_option_effect = yes - worldly_type_option_effect = yes -} - -#VERY boosting - very rare - Checks if you have the pious type and updates the activity_special_type_progression variable -very_pious_type_option_effect = { - involved_activity = { - if = { - limit = { - OR = { - activity_has_pious_pilgrimage_type_trigger = yes - #Hajj should also be considered a pious pilgrimage - activity_has_hajj_pilgrimage_type_trigger = yes - } - } - custom_tooltip = pilgrimage_pious_type_tt_very_positive - activity_special_type_progression_massive = yes - } - } -} - -#VERY boosting - very rare - Checks if you have the worldly type and updates the activity_special_type_progression variable -very_worldly_type_option_effect = { - involved_activity = { - if = { - limit = { activity_has_worldly_pilgrimage_type_trigger = yes } - custom_tooltip = pilgrimage_worldly_type_tt_very_positive - activity_special_type_progression_massive = yes - } - } -} - -#Boost short pilgrimages a bit so they don't always get shafted -account_for_pilgrimage_length_type_effect = { - #Short Pilgrimage - if = { - limit = { short_pilgrimage_trigger = yes } - involved_activity = { activity_special_type_progression_medium = yes } - } - #Medium Pilgrimage - else_if = { - limit = { medium_pilgrimage_trigger = yes } - involved_activity = { activity_special_type_progression_tiny = yes } - } -} - -#Account for the state of our variables, apply flags that are resolved in give_pilgrimage_reward_effect - run in pilgrimage.7000 -resolve_pilgrimage_type_reward_effect = { - #Pious Type - involved_activity ?= { - if = { - limit = { - #Pious and Hajj - OR = { - activity_has_pious_pilgrimage_type_trigger = yes - activity_has_hajj_pilgrimage_type_trigger = yes - } - } - #Perfect piousness - 75-100 - if = { - limit = { var:activity_special_type_progression >= 75 } - scope:host = { add_character_flag = perfect_pious_reward } - } - #High-end piousness - 50-75 - else_if = { - limit = { - var:activity_special_type_progression < 75 - var:activity_special_type_progression >= 50 - } - scope:host = { add_character_flag = high_pious_reward } - } - #OK piousness - 25-50 - else_if = { - limit = { - var:activity_special_type_progression < 50 - var:activity_special_type_progression >= 25 - } - scope:host = { add_character_flag = mid_pious_reward } - } - #Lousy piousness - 0-25 - else = { - scope:host = { add_character_flag = low_pious_reward } - } - } - #Worldly Type - if = { - limit = { activity_has_worldly_pilgrimage_type_trigger = yes } - #Perfect worldliness - 75-100 - if = { - limit = { var:activity_special_type_progression >= 75 } - scope:host = { add_character_flag = perfect_worldly_reward } - } - #High end worldliness - 50-75 - else_if = { - limit = { - var:activity_special_type_progression < 75 - var:activity_special_type_progression >= 50 - } - scope:host = { add_character_flag = high_worldly_reward } - } - #OK piousness - 25-50 - else_if = { - limit = { - var:activity_special_type_progression < 50 - var:activity_special_type_progression >= 25 - } - scope:host = { add_character_flag = mid_worldly_reward } - } - #Lousy piousness - 0-25 - else = { - scope:host = { add_character_flag = low_worldly_reward } - } - } - } - if = { - limit = { - scope:host = { - has_trait_xp = { - trait = pilgrim - value >= 50 - } - NOR = { - has_character_flag = pilgrim_legend - has_game_rule = historical_legends_only - } - has_dlc_feature = legends - } - } - scope:host = { - random = { - chance = { - value = legend_seed_chance_low #15% - if = { - limit = { - has_trait_xp = { - trait = pilgrim - value >= 75 - } - } - add = legend_seed_chance_medium #55% chance - } - else_if = { - limit = { - has_trait_xp = { - trait = pilgrim - value >= 60 - } - } - add = legend_seed_chance_low #30% chance - } - } - add_character_flag = pilgrim_legend - create_legend_seed = { - type = holy - quality = famed - chronicle = saintly_deed - properties = { - ancestor = scope:host - religion = scope:host.religion - } - } - } - } - } -} - -#Clean up the flags -clean_up_pilgrimage_type_reward_flags_effect = { - remove_character_flag = perfect_pious_reward - remove_character_flag = high_pious_reward - remove_character_flag = mid_pious_reward - remove_character_flag = low_pious_reward - remove_character_flag = perfect_worldly_reward - remove_character_flag = high_worldly_reward - remove_character_flag = mid_worldly_reward - remove_character_flag = low_worldly_reward -} - - -#Dead predecessor - turn back and bury -pilgrimage_turn_back_and_bury_effect = { - save_scope_as = root_scope - add_prestige = major_prestige_gain - add_character_modifier = { - modifier = pilgrimage_turned_back_buried_modifier - years = 5 - } - every_vassal_or_below = { - vassal_stance = zealot - custom = every_zealot_vassal - add_opinion = { - modifier = disapproving_opinion - target = root - opinion = -10 - } - } - every_vassal_or_below = { - vassal_stance = glory_hound - custom = every_glory_hound_vassal - add_opinion = { - modifier = approving_opinion - target = root - opinion = 20 - } - } - stress_impact = { - base = medium_stress_impact_loss - impatient = medium_stress_impact_loss - zealous = medium_stress_impact_gain - } -} - -#Dead predecessor - bury at destination -pilgrimage_bury_at_destination_effect = { - save_scope_as = root_scope - add_piety = major_piety_gain - add_character_modifier = { - modifier = pilgrimage_buried_at_destination_modifier - years = 10 - } - every_vassal_or_below = { - vassal_stance = zealot - custom = every_zealot_vassal - add_opinion = { - modifier = approving_opinion - target = root - opinion = 20 - } - } - every_vassal_or_below = { - vassal_stance = glory_hound - custom = every_glory_hound_vassal - add_opinion = { - modifier = disapproving_opinion - target = root - opinion = -10 - } - } - stress_impact = { - base = medium_stress_impact_loss - zealous = medium_stress_impact_loss - cynical = minor_stress_impact_gain - } -} - -#Dead predecessor - go to destination and back, then bury -pilgrimage_bury_at_home_effect = { - save_scope_as = root_scope - add_prestige = medium_prestige_gain - add_piety = medium_piety_gain - add_character_modifier = { - modifier = pilgrimage_buried_at_capital_modifier - years = 15 - } - every_vassal_or_below = { - vassal_stance = zealot - custom = every_zealot_vassal - add_opinion = { - modifier = approving_opinion - target = root - opinion = 15 - } - } - every_vassal_or_below = { - vassal_stance = glory_hound - custom = every_glory_hound_vassal - add_opinion = { - modifier = approving_opinion - target = root - opinion = 15 - } - } - stress_impact = { - base = major_stress_impact_loss - zealous = major_stress_impact_loss - cynical = medium_stress_impact_gain - } -} diff --git a/N3OW/common/scripted_effects/00_playdate_scripted_effects.txt b/N3OW/common/scripted_effects/00_playdate_scripted_effects.txt deleted file mode 100644 index 2994de56..00000000 --- a/N3OW/common/scripted_effects/00_playdate_scripted_effects.txt +++ /dev/null @@ -1,42 +0,0 @@ - -#Effects used in playdates - -#playdate_end_guest_effect - Effect run for all guests when they leave playdates - -playdate_concluded_my_events_effect = { - save_temporary_scope_as = finished_participant -} - -playdate_fire_correct_default_event_effect = { - trigger_event = { - on_action = playdate_event_selection - days = { min_playdate_event_spacing max_playdate_event_spacing } - } -} - -playdate_end_guest_effect = { - # Only called on the end of a *successful* playdate. Playdates which are interrupted due to death, imprisonment, etc., don't get this, so put critical clean-up stuff in the activity itself. - stress_impact = { - base = medium_stress_loss - gregarious = medium_stress_impact_loss - charming = minor_stress_impact_loss - shy = medium_stress_impact_gain - pensive = minor_stress_impact_gain - } -} - -hosted_successful_playdate_interrupted_effect = { - add_prestige = medium_prestige_gain - scope:activity = { - every_attending_character = { - limit = { - this != scope:host - } - custom = every_guest_scope_tt - add_opinion = { - target = scope:host - modifier = hosted_successful_playdate_opinion - } - } - } -} diff --git a/N3OW/common/scripted_effects/00_poetry_effects.txt b/N3OW/common/scripted_effects/00_poetry_effects.txt deleted file mode 100644 index 642d1536..00000000 --- a/N3OW/common/scripted_effects/00_poetry_effects.txt +++ /dev/null @@ -1,800 +0,0 @@ -################################################## -# Generation -################################################## - -## Themes -select_poem_theme_romance_effect = { - set_variable = { - name = poetry_theme - value = flag:romance - } - # Set up a scope for gender effect checking. - save_scope_value_as = { - name = poetry_romance_target - value = yes - } -} - -select_poem_theme_mourning_effect = { - set_variable = { - name = poetry_theme - value = flag:mourning - } -} - -select_poem_theme_legacy_effect = { - set_variable = { - name = poetry_theme - value = flag:legacy - } -} - -select_poem_theme_strife_effect = { - set_variable = { - name = poetry_theme - value = flag:strife - } -} - -select_poem_theme_incompetence_effect = { - set_variable = { - name = poetry_theme - value = flag:incompetence - } -} - -select_poem_theme_random_effect = { - hidden_effect = { - random_list = { - # Romance - 100 = { select_poem_theme_romance_effect = yes } - # Mourning - 100 = { select_poem_theme_mourning_effect = yes } - # Legacy - 100 = { select_poem_theme_legacy_effect = yes } - # Strife - 100 = { select_poem_theme_strife_effect = yes } - # Incompetence - 100 = { select_poem_theme_incompetence_effect = yes } - } - } -} - -## Subject -### Used to select subject genders, taking any of the following: -#### flag:specific -#### flag:woman -#### flag:man -#### flag:random -### SUBJECT_TARGET needs to be filled out regardless to prevent errors, but is inert unless you've also set flag:specific. -#### Just stick it to root or whoever if not actively using it. -select_poem_subject_gender_effect = { - save_temporary_scope_value_as = { - name = subject - value = $SUBJECT$ - } - # If we have a $CHARACTER$ designated, select that. - if = { - limit = { scope:subject = flag:specific } - $SUBJECT_TARGET$ = { save_scope_as = subject } - } - # If we have a manually selected gender, grab that. - else_if = { - limit = { scope:subject = flag:woman } - dummy_female = { save_scope_as = subject } - } - else_if = { - limit = { scope:subject = flag:man } - dummy_male = { save_scope_as = subject } - } - # Otherwise, generate a dummy. - else = { - # Is this a romantic poem? - if = { - limit = { exists = scope:poetry_romance_target } - # If so, only target the correct gender for preference. - romance_target_gender_effect = { SCOPE_NAME = subject } - } - # Otherwise, just a random dummy is fine. - else = { - random_dummy_gender_soldier_effect = { SCOPE_NAME = subject } - } - } - # Finally, set this as a variable on root so that custom loc can access it. - set_variable = { - name = poem_subject - value = scope:subject - } -} - -################################################## -# Cleanup -################################################## - -cleanup_poem_effect = { - # Remove the generated theme. - remove_variable = poetry_theme - # And designated subject. - remove_variable = poem_subject -} - -################################################## -# Send Poem Interaction Consequences -################################################## - -@send_poem_rejected_prestige_cost = medium_prestige_loss -@send_poem_rejected_prestige_gain = minor_prestige_gain -@send_poem_accepted_prestige_regain = minor_prestige_gain - -send_poem_romance_duel_actor_victory_effect = { - scope:actor = { - if = { - limit = { - has_trait = lifestyle_poet - } - add_trait_xp = { - trait = lifestyle_poet - value = { 5 10 } - } - } - } - # Add a good amount of opinion of scope:actor. - scope:recipient = { - add_opinion = { - target = scope:actor - modifier = sent_poem_romance_opinion - } - hidden_effect = { - random = { - chance = 25 - if = { - limit = { can_set_relation_potential_lover_trigger = { CHARACTER = scope:actor } } - set_relation_potential_lover = scope:actor - } - } - } - } -} -send_poem_romance_duel_actor_failure_effect = { - # reduce their opinion of scope:recipient. - hidden_effect = { - scope:actor = { - add_opinion = { - target = scope:recipient - modifier = sent_poem_humiliated_opinion - } - } - } - # & give prestige to scope:recipient - scope:recipient = { - add_opinion = { - opinion = -20 - target = scope:actor - modifier = sent_poem_humiliated_opinion - } - hidden_effect = { - random = { - chance = 20 - if = { - limit = { can_set_relation_potential_rival_trigger = { CHARACTER = scope:actor } } - set_relation_potential_rival = scope:actor - } - } - } - add_prestige = @send_poem_rejected_prestige_gain - } -} - -send_poem_mourning_duel_actor_victory_effect = { - scope:actor = { - if = { - limit = { - has_trait = lifestyle_poet - } - add_trait_xp = { - trait = lifestyle_poet - value = { 5 10 } - } - } - } - # Add a modest amount of opinion of scope:actor & some stress loss. - scope:recipient = { - add_opinion = { - target = scope:actor - modifier = sent_poem_mourning_opinion - } - hidden_effect = { - random = { - chance = 25 - if = { - limit = { can_set_relation_potential_friend_trigger = { CHARACTER = scope:actor } } - set_relation_potential_friend = scope:actor - } - } - } - add_stress = medium_stress_loss - } -} -send_poem_mourning_duel_actor_failure_effect = { - # reduce their opinion of scope:recipient. - hidden_effect = { - scope:actor = { - add_opinion = { - target = scope:recipient - modifier = sent_poem_humiliated_opinion - } - } - } - scope:recipient = { - add_opinion = { - opinion = -20 - target = scope:actor - modifier = sent_poem_humiliated_opinion - } - hidden_effect = { - random = { - chance = 20 - if = { - limit = { can_set_relation_potential_rival_trigger = { CHARACTER = scope:actor } } - set_relation_potential_rival = scope:actor - } - } - } - add_prestige = @send_poem_rejected_prestige_gain - } -} - -send_poem_legacy_duel_actor_victory_effect = { - scope:actor = { - if = { - limit = { - has_trait = lifestyle_poet - } - add_trait_xp = { - trait = lifestyle_poet - value = { 5 10 } - } - } - } - # Add a modest amount of opinion of scope:actor & some piety. - scope:recipient = { - add_opinion = { - target = scope:actor - modifier = sent_poem_grateful_opinion - } - hidden_effect = { - random = { - chance = 25 - if = { - limit = { can_set_relation_potential_friend_trigger = { CHARACTER = scope:actor } } - set_relation_potential_friend = scope:actor - } - } - } - add_piety = minor_piety_gain - } -} -send_poem_legacy_duel_actor_failure_effect = { - # reduce their opinion of scope:recipient. - hidden_effect = { - scope:actor = { - add_opinion = { - target = scope:recipient - modifier = sent_poem_humiliated_opinion - } - } - } - # & give prestige to scope:recipient - scope:recipient = { - add_opinion = { - opinion = -20 - target = scope:actor - modifier = sent_poem_humiliated_opinion - } - hidden_effect = { - random = { - chance = 20 - if = { - limit = { can_set_relation_potential_rival_trigger = { CHARACTER = scope:actor } } - set_relation_potential_rival = scope:actor - } - } - } - add_prestige = @send_poem_rejected_prestige_gain - } -} - -send_poem_strife_duel_actor_victory_effect = { - scope:actor = { - if = { - limit = { - has_trait = lifestyle_poet - } - add_trait_xp = { - trait = lifestyle_poet - value = { 5 10 } - } - } - } - # Add a modest amount of opinion of scope:actor & some prestige. - scope:recipient = { - add_opinion = { - target = scope:actor - modifier = sent_poem_grateful_opinion - } - hidden_effect = { - random = { - chance = 25 - if = { - limit = { can_set_relation_potential_friend_trigger = { CHARACTER = scope:actor } } - set_relation_potential_friend = scope:actor - } - } - } - add_prestige = minor_prestige_gain - } -} -send_poem_strife_duel_actor_failure_effect = { - # reduce their opinion of scope:recipient. - hidden_effect = { - scope:actor = { - add_opinion = { - target = scope:recipient - modifier = sent_poem_humiliated_opinion - } - } - } - # & give prestige to scope:recipient - scope:recipient = { - add_opinion = { - opinion = -20 - target = scope:actor - modifier = sent_poem_humiliated_opinion - } - hidden_effect = { - random = { - chance = 20 - if = { - limit = { can_set_relation_potential_rival_trigger = { CHARACTER = scope:actor } } - set_relation_potential_rival = scope:actor - } - } - } - add_prestige = @send_poem_rejected_prestige_gain - } -} - -send_poem_incompetence_duel_actor_victory_effect = { - scope:actor = { - if = { - limit = { - has_trait = lifestyle_poet - } - add_trait_xp = { - trait = lifestyle_poet - value = { 5 10 } - } - } - } - # Reduce opinion of scope:actor & add stress. - scope:recipient = { - add_opinion = { - target = scope:actor - modifier = sent_poem_humiliated_opinion - } - hidden_effect = { - random = { - chance = 50 - if = { - limit = { can_set_relation_potential_rival_trigger = { CHARACTER = scope:actor } } - set_relation_potential_rival = scope:actor - } - } - } - add_stress = major_stress_gain - } -} -send_poem_incompetence_duel_actor_failure_effect = { - # reduce their opinion of scope:recipient. - hidden_effect = { - scope:actor = { - add_opinion = { - target = scope:recipient - modifier = sent_poem_humiliated_opinion - } - } - } - # & give prestige to scope:recipient - scope:recipient = { - add_opinion = { - opinion = -20 - target = scope:actor - modifier = sent_poem_humiliated_opinion - } - hidden_effect = { - random = { - chance = 20 - if = { - limit = { can_set_relation_potential_rival_trigger = { CHARACTER = scope:actor } } - set_relation_potential_rival = scope:actor - } - } - } - add_prestige = @send_poem_rejected_prestige_gain - } -} - -################################################## -# Send Poem Interaction Duels -################################################## - -send_poem_romance_duel_victory_notification_effect = { - # Send out toasts. - hidden_effect = { - # Send scope:actor-side toast - scope:actor = { - send_interface_toast = { - title = send_poem_interaction.success - left_icon = scope:recipient - show_as_tooltip = { send_poem_romance_duel_actor_victory_effect = yes } - } - } - # Send scope:recipient-side toast. - send_interface_toast = { - title = send_poem_interaction.success - left_icon = scope:actor - show_as_tooltip = { send_poem_romance_duel_actor_victory_effect = yes } - } - } - # Calculate the actual effects. - send_poem_romance_duel_actor_victory_effect = yes -} -send_poem_romance_duel_defeat_notification_effect = { - # Send out toasts. - hidden_effect = { - # Send scope:actor-side toast - scope:actor = { - send_interface_toast = { - title = send_poem_interaction.failure - left_icon = scope:recipient - show_as_tooltip = { send_poem_romance_duel_actor_failure_effect = yes } - } - } - # Send scope:recipient-side toast. - send_interface_toast = { - title = send_poem_interaction.failure - left_icon = scope:actor - show_as_tooltip = { send_poem_romance_duel_actor_failure_effect = yes } - } - } - # Calculate the actual effects. - send_poem_romance_duel_actor_failure_effect = yes -} -send_poem_romance_duel_effect = { - duel = { - skill = diplomacy - target = $POV_TARGET$ - # Scope:actor's words find their mark. - 50 = { - compare_modifier = { - value = scope:duel_value - multiplier = -3.5 - min = -49 - max = 49 - } - desc = send_poem_interaction.success - # Sort notifications & output. - send_poem_romance_duel_victory_notification_effect = yes - } - # Scope:recipient is able to publicly ridicule the poem. - 50 = { - compare_modifier = { - value = scope:duel_value - multiplier = 3.5 - min = -49 - max = 49 - } - desc = send_poem_interaction.failure - # Sort notifications & output. - send_poem_romance_duel_defeat_notification_effect = yes - } - } -} - -send_poem_mourning_duel_victory_notification_effect = { - # Send out toasts. - hidden_effect = { - # Send scope:actor-side toast - scope:actor = { - send_interface_toast = { - title = send_poem_interaction.success - left_icon = scope:recipient - show_as_tooltip = { send_poem_mourning_duel_actor_victory_effect = yes } - } - } - # Send scope:recipient-side toast. - send_interface_toast = { - title = send_poem_interaction.success - left_icon = scope:actor - show_as_tooltip = { send_poem_mourning_duel_actor_victory_effect = yes } - } - } - # Calculate the actual effects. - send_poem_mourning_duel_actor_victory_effect = yes -} -send_poem_mourning_duel_defeat_notification_effect = { - # Send out toasts. - hidden_effect = { - # Send scope:actor-side toast - scope:actor = { - send_interface_toast = { - title = send_poem_interaction.failure - left_icon = scope:recipient - show_as_tooltip = { send_poem_mourning_duel_actor_failure_effect = yes } - } - } - # Send scope:recipient-side toast. - send_interface_toast = { - title = send_poem_interaction.failure - left_icon = scope:actor - show_as_tooltip = { send_poem_mourning_duel_actor_failure_effect = yes } - } - } - # Calculate the actual effects. - send_poem_mourning_duel_actor_failure_effect = yes -} -send_poem_mourning_duel_effect = { - duel = { - skill = diplomacy - target = $POV_TARGET$ - # Scope:actor's words find their mark. - 50 = { - compare_modifier = { - value = scope:duel_value - multiplier = -3.5 - min = -49 - max = 49 - } - desc = send_poem_interaction.success - # Sort notifications & output. - send_poem_mourning_duel_victory_notification_effect = yes - } - # Scope:recipient is able to publicly ridicule the poem. - 50 = { - compare_modifier = { - value = scope:duel_value - multiplier = 3.5 - min = -49 - max = 49 - } - desc = send_poem_interaction.failure - # Sort notifications & output. - send_poem_mourning_duel_defeat_notification_effect = yes - } - } -} - -send_poem_legacy_duel_victory_notification_effect = { - # Send out toasts. - hidden_effect = { - # Send scope:actor-side toast - scope:actor = { - send_interface_toast = { - title = send_poem_interaction.success - left_icon = scope:recipient - show_as_tooltip = { send_poem_legacy_duel_actor_victory_effect = yes } - } - } - # Send scope:recipient-side toast. - send_interface_toast = { - title = send_poem_interaction.success - left_icon = scope:actor - show_as_tooltip = { send_poem_legacy_duel_actor_victory_effect = yes } - } - } - # Calculate the actual effects. - send_poem_legacy_duel_actor_victory_effect = yes -} - -send_poem_legacy_duel_defeat_notification_effect = { - # Send out toasts. - hidden_effect = { - # Send scope:actor-side toast - scope:actor = { - send_interface_toast = { - title = send_poem_interaction.failure - left_icon = scope:recipient - show_as_tooltip = { send_poem_legacy_duel_actor_failure_effect = yes } - } - } - # Send scope:recipient-side toast. - send_interface_toast = { - title = send_poem_interaction.failure - left_icon = scope:actor - show_as_tooltip = { send_poem_legacy_duel_actor_failure_effect = yes } - } - } - # Calculate the actual effects. - send_poem_legacy_duel_actor_failure_effect = yes -} - -send_poem_legacy_duel_effect = { - duel = { - skill = diplomacy - target = $POV_TARGET$ - # Scope:actor's words find their mark. - 50 = { - compare_modifier = { - value = scope:duel_value - multiplier = -3.5 - min = -49 - max = 49 - } - desc = send_poem_interaction.success - # Sort notifications & output. - send_poem_legacy_duel_victory_notification_effect = yes - } - # Scope:recipient is able to publicly ridicule the poem. - 50 = { - compare_modifier = { - value = scope:duel_value - multiplier = 3.5 - min = -49 - max = 49 - } - desc = send_poem_interaction.failure - # Sort notifications & output. - send_poem_legacy_duel_defeat_notification_effect = yes - } - } -} - -send_poem_strife_duel_victory_notification_effect = { - # Send out toasts. - hidden_effect = { - # Send scope:actor-side toast - scope:actor = { - send_interface_toast = { - title = send_poem_interaction.success - left_icon = scope:recipient - show_as_tooltip = { send_poem_strife_duel_actor_victory_effect = yes } - } - } - # Send scope:recipient-side toast. - send_interface_toast = { - title = send_poem_interaction.success - left_icon = scope:actor - show_as_tooltip = { send_poem_strife_duel_actor_victory_effect = yes } - } - } - # Calculate the actual effects. - send_poem_strife_duel_actor_victory_effect = yes -} - -send_poem_strife_duel_defeat_notification_effect = { - # Send out toasts. - hidden_effect = { - # Send scope:actor-side toast - scope:actor = { - send_interface_toast = { - title = send_poem_interaction.failure - left_icon = scope:recipient - show_as_tooltip = { send_poem_strife_duel_actor_failure_effect = yes } - } - } - # Send scope:recipient-side toast. - send_interface_toast = { - title = send_poem_interaction.failure - left_icon = scope:actor - show_as_tooltip = { send_poem_strife_duel_actor_failure_effect = yes } - } - } - # Calculate the actual effects. - send_poem_strife_duel_actor_failure_effect = yes -} - -send_poem_strife_duel_effect = { - duel = { - skill = diplomacy - target = $POV_TARGET$ - # Scope:actor's words find their mark. - 50 = { - compare_modifier = { - value = scope:duel_value - multiplier = -3.5 - min = -49 - max = 49 - } - desc = send_poem_interaction.success - # Sort notifications & output. - send_poem_strife_duel_victory_notification_effect = yes - } - # Scope:recipient is able to publicly ridicule the poem. - 50 = { - compare_modifier = { - value = scope:duel_value - multiplier = 3.5 - min = -49 - max = 49 - } - desc = send_poem_interaction.failure - # Sort notifications & output. - send_poem_strife_duel_defeat_notification_effect = yes - } - } -} - -send_poem_incompetence_duel_victory_notification_effect = { - # Send out toasts. - hidden_effect = { - # Send scope:actor-side toast - scope:actor = { - send_interface_toast = { - title = send_poem_interaction.success - left_icon = scope:recipient - show_as_tooltip = { send_poem_incompetence_duel_actor_victory_effect = yes } - } - } - # Send scope:recipient-side toast. - send_interface_toast = { - title = send_poem_interaction.success - left_icon = scope:actor - show_as_tooltip = { send_poem_incompetence_duel_actor_victory_effect = yes } - } - } - # Calculate the actual effects. - send_poem_incompetence_duel_actor_victory_effect = yes -} - -send_poem_incompetence_duel_defeat_notification_effect = { - # Send out toasts. - hidden_effect = { - # Send scope:actor-side toast - scope:actor = { - send_interface_toast = { - title = send_poem_interaction.failure - left_icon = scope:recipient - show_as_tooltip = { send_poem_incompetence_duel_actor_failure_effect = yes } - } - } - # Send scope:recipient-side toast. - send_interface_toast = { - title = send_poem_interaction.failure - left_icon = scope:actor - show_as_tooltip = { send_poem_incompetence_duel_actor_failure_effect = yes } - } - } - # Calculate the actual effects. - send_poem_incompetence_duel_actor_failure_effect = yes -} - -send_poem_incompetence_duel_effect = { - duel = { - skill = diplomacy - target = $POV_TARGET$ - # Scope:actor's words find their mark. - 50 = { - compare_modifier = { - value = scope:duel_value - multiplier = -3.5 - min = -49 - max = 49 - } - desc = send_poem_interaction.success - # Sort notifications & output. - send_poem_incompetence_duel_victory_notification_effect = yes - } - # Scope:recipient is able to publicly ridicule the poem. - 50 = { - compare_modifier = { - value = scope:duel_value - multiplier = 3.5 - min = -49 - max = 49 - } - desc = send_poem_interaction.failure - # Sort notifications & output. - send_poem_incompetence_duel_defeat_notification_effect = yes - } - } -} diff --git a/N3OW/common/scripted_effects/00_pool_effects.txt b/N3OW/common/scripted_effects/00_pool_effects.txt deleted file mode 100644 index 19f41a03..00000000 --- a/N3OW/common/scripted_effects/00_pool_effects.txt +++ /dev/null @@ -1,164 +0,0 @@ -set_interesting_traits_and_modifiers_effect = { - random_list = { - 50 = { - trigger = { - has_trait = gluttonous - } - change_current_weight = 150 - } - 50 = { - trigger = { - has_trait = gluttonous - } - change_current_weight = 100 - } - 10 = { - trigger = { - NOT = { has_trait = temperate } - } - change_current_weight = 50 - } - 10 = { - change_current_weight = 25 - } - 100 = { - } - 10 = { - change_current_weight = -25 - } - 5 = { - trigger = { - NOR = { - has_trait = temperate - has_trait = gluttonous - } - } - change_current_weight = -50 - } - } - random_list = { - 1 = { - modifier = { - add = 9 - culture = { - has_cultural_parameter = loyal_trait_more_common - } - } - add_trait = loyal - } - 1 = { - modifier = { - add = 9 - culture = { - has_cultural_parameter = disloyal_trait_more_common - } - } - add_trait = disloyal - } - 1 = { - modifier = { - add = 9 - culture = { - has_cultural_parameter = scholar_official_trait_bonuses - } - } - add_trait = confucian_education - } - 98 = {} - } -} - -add_random_tiered_trait_xp_effect = { - save_scope_value_as = { - name = level_1_possible - value = flag:$LEVEL_1$ - } - save_scope_value_as = { - name = level_3_possible - value = flag:$LEVEL_3$ - } - if = { - limit = { has_trait = $TRAIT$ } - random_list = { - 15 = { - trigger = { scope:level_1_possible = flag:yes } - add_trait_xp = { - trait = $TRAIT$ - value = { - integer_range = { - min = small_lifestyle_random_xp_low - max = small_lifestyle_random_xp_high - } - } - } - } - 10 = { - add_trait_xp = { - trait = $TRAIT$ - value = { - integer_range = { - min = medium_lifestyle_random_xp_low - max = medium_lifestyle_random_xp_high - } - } - } - } - 5 = { - trigger = { scope:level_3_possible = flag:yes } - add_trait_xp = { - trait = $TRAIT$ - value = 100 - } - } - } - } -} - -add_random_tiered_trait_track_xp_effect = { - save_scope_value_as = { - name = level_1_possible - value = flag:$LEVEL_1$ - } - save_scope_value_as = { - name = level_3_possible - value = flag:$LEVEL_3$ - } - if = { - limit = { has_trait = $TRAIT$ } - random_list = { - 15 = { - trigger = { scope:level_1_possible = flag:yes } - add_trait_xp = { - trait = $TRAIT$ - track = $TRACK$ - value = { - integer_range = { - min = small_lifestyle_random_xp_low - max = small_lifestyle_random_xp_high - } - } - } - } - 10 = { - add_trait_xp = { - trait = $TRAIT$ - track = $TRACK$ - value = { - integer_range = { - min = medium_lifestyle_random_xp_low - max = medium_lifestyle_random_xp_high - } - } - } - } - 5 = { - trigger = { scope:level_3_possible = flag:yes } - add_trait_xp = { - trait = $TRAIT$ - track = $TRACK$ - value = 100 - } - } - } - } -} diff --git a/N3OW/common/scripted_effects/00_pregnancy_effects.txt b/N3OW/common/scripted_effects/00_pregnancy_effects.txt deleted file mode 100644 index 157941b7..00000000 --- a/N3OW/common/scripted_effects/00_pregnancy_effects.txt +++ /dev/null @@ -1,407 +0,0 @@ - - -#Effects relating to pregnancy - -#unmarried_mother_pregnancy_effect -#pregnancy_termination_attempt_effect - - - -unmarried_mother_pregnancy_effect = { - add_trait_force_tooltip = pregnant - add_fornicator_trait_or_nothing_effect = yes - hidden_effect = { - set_known_bastard_on_pregnancy = yes #The bastard status is already known since the mother is unmarried. - if = { - limit = { - NOT = { - any_owned_story = { - type = story_peasant_affair - var:peasant_character = scope:mother.pregnancy_real_father - } - } - } - trigger_event = { #This parses whether the mother is planning to confess to a real_father, and checks if there are characters out there who should suspect that they might be the real father - id = adultery.1101 - days = 20 - } - } - } -} - - -married_mother_pregnancy_effect = { - add_trait_force_tooltip = pregnant - if = { - limit = { - NOT = { exists = scope:spouse } - exists = primary_spouse - } - primary_spouse = { - save_scope_as = spouse - } - } - if = { - limit = { exists = scope:spouse } - scope:spouse = { - pregnancy_spouse_suspicion_chance_effect = yes - } - } - hidden_effect = { - if = { - limit = { - NOT = { - any_owned_story = { - type = story_peasant_affair - var:peasant_character = { - this = scope:real_father - } - } - } - } - trigger_event = { #This parses whether the mother is planning to confess to a real_father, and checks if there are characters out there who should suspect that they might be the real father - id = adultery.1101 - days = 20 - } - } - } -} - -historical_pregnancy_effect = { - if = { - limit = { exists = var:historical_pregnancy } - switch = { - trigger = var:historical_pregnancy - flag:antoku = { - save_scope_as = mother - character:japanese_yamato_54 = { save_scope_as = father } - create_character = { - name = "Tokihito" # birth name of Antoku - gender_female_chance = 0 - random_traits = no - age = 0 - dynasty_house = scope:father.house # Yamato - employer = scope:mother.employer - father = scope:father # Emperor Takakura - mother = scope:mother # Noriko - faith = scope:father.faith - culture = scope:father.culture - save_scope_as = child - } - scope:child = { add_pressed_claim = title:k_chrysanthemum_throne } - } - } - create_character_memory = { - type = child_born - participants = { child = scope:child } - } - current_travel_plan ?= { - if = { - limit = { - travel_plan_owner = { is_ruler = yes } - } - add_companion = scope:child - } - } - } -} - -#This effect is used to handle all the tings that should ALWAYS be done at birth. -pregnancy_maintainance_effect = { - hidden_effect = { - historical_pregnancy_effect = yes # Handle specific scripted historical births - - remove_trait = pregnant - - #Save twin as child_2 - scope:child = { - if = { - limit = { has_trait = twin } - random_sibling = { - limit = { is_twin_of = scope:child } - save_scope_as = child_2 - } - - #Identical twins - if = { - limit = { sex_same_as = scope:child_2 } - random = { - chance = 50 - copy_inheritable_appearance_from = scope:child_2 - } - } - } - } - - #BASTARD OR NOT? TO HANDLE NON-COMPLICATED BIRTH EVENTS - #It is a bastard! - if = { - limit = { - OR = { - has_character_flag = unmarried_bastard_pregnancy - has_character_flag = bastard_pregnancy - } - } - - #To see if the assumed father has died while pregnant with unknown bastard - if = { - limit = { - scope:mother = { - NOT = { has_character_flag = pregnancy_real_father_of_bastard_is_known_flag } - exists = var:dead_spouse - } - } - var:dead_spouse = { - save_scope_as = father - } - scope:child = { - set_father = scope:father - } - scope:mother = { - remove_variable = dead_spouse - } - } - - #To fire the right event for the mother if the child secretly is a bastard - if = { - limit = { - NOT = { has_character_flag = pregnancy_real_father_of_bastard_is_known_flag } - has_character_flag = bastard_pregnancy - secret_disputed_heritage_is_valid_trigger = { - TARGET = scope:child - } - } - add_secret = { #Set up a new secret about the child - type = secret_disputed_heritage - target = scope:child - } - random_secret = { #Find the secret - type = secret_disputed_heritage - limit = { - secret_target = scope:child - } - save_scope_as = new_secret - } - - #If the real_father knows they're the father they will get an event about the bastard being born - if = { - limit = { - has_character_flag = pregnancy_real_father_knows - } - scope:child.real_father = { - add_to_list = illegitimacy_secret_knowers - } - } - #If the spouse knows they're NOT the father they will get an event about the bastard being born - if = { - limit = { - has_character_flag = pregnancy_spouse_knows_of_bastardy - } - scope:child.father = { - add_to_list = illegitimacy_secret_knowers - } - } - every_in_list = { - list = illegitimacy_secret_knowers - #A secret bastard is born - Share the news with everyone who knew that it was a bastard - trigger_event = secret_bastard.0001 - } - } - - #Check for unmarried mother bastardy flag - else_if = { - limit = { - NOT = { has_character_flag = pregnancy_real_father_of_bastard_is_known_flag } - has_character_flag = unmarried_bastard_pregnancy - - # Must be able to have the illegitimate child secret. - secret_unmarried_illegitimate_child_is_valid_trigger = { - TARGET = scope:child - } - } - add_secret = { #Set up a new secret about the child - type = secret_unmarried_illegitimate_child - target = scope:child - } - random_secret = { #Find the secret - type = secret_unmarried_illegitimate_child - limit = { - secret_target = scope:child - } - save_scope_as = new_secret - } - #If the real father knows he is the father, let him in on the Secret - if = { - limit = { - has_character_flag = pregnancy_real_father_knows - } - scope:child.real_father = { - trigger_event = secret_bastard.0002 #Announces that a child is born, and lets the recipient learn the unmarried_illegitimate_child secret - } - } - } - } - - #Mother married real_father while pregnant - make sure he's set as the father - if = { - limit = { - scope:mother = { - NOR = { - has_character_flag = unmarried_bastard_pregnancy - has_character_flag = bastard_pregnancy - } - any_consort = { this = scope:child.real_father } - NOT = { exists = scope:child.father } - } - } - scope:child = { - set_father = scope:child.real_father - } - } - } -} - -pregnancy_cleanup_effect = { - hidden_effect = { - if = { - limit = { - has_character_flag = unmarried_bastard_pregnancy - } - remove_character_flag = unmarried_bastard_pregnancy - } - if = { - limit = { - has_character_flag = bastard_pregnancy - } - remove_character_flag = bastard_pregnancy - } - if = { - limit = { - has_character_flag = pregnancy_real_father_of_bastard_is_known_flag - } - remove_character_flag = pregnancy_real_father_of_bastard_is_known_flag - } - if = { - limit = { - has_character_flag = pregnancy_spouse_knows_of_bastardy - } - remove_character_flag = pregnancy_spouse_knows_of_bastardy - } - if = { - limit = { - has_character_flag = pregnancy_real_father_knows - } - remove_character_flag = pregnancy_real_father_knows - } - if = { - limit = { - has_character_flag = birth_will_go_smoothly - } - remove_character_flag = birth_will_go_smoothly - } - if = { - limit = { - has_character_flag = birth_child_will_become_sickly - } - remove_character_flag = birth_child_will_become_sickly - } - if = { - limit = { - has_character_flag = birth_mother_will_become_ill - } - remove_character_flag = birth_mother_will_become_ill - } - if = { - limit = { - has_variable = borte_first_child_var - } - remove_variable = borte_first_child_var - } - } - if = { - limit = { - has_trait = pregnant - } - remove_trait = pregnant - } -} - - - -pregnancy_termination_attempt_effect = { - random_list = { - 100 = { #Pregnancy ends, no negative consequence - #custom_tooltip = pregnancy_treatment_succeeds_tt - show_as_tooltip = { - end_pregnancy = yes - } - hidden_effect = { - trigger_event = { - id = pregnancy.2003 - days = { 3 10 } - } - } - } - 30 = { #Pregnancy ends, mother becomes Ill - trigger = { - NOT = { has_trait = ill } - } - show_as_tooltip = { - end_pregnancy = yes - add_trait = ill - } - #custom_tooltip = pregnancy_treatment_succeeds_tt - #custom_tooltip = pregnancy_treatment_fall_ill_tt - hidden_effect = { - trigger_event = { - id = pregnancy.2004 - days = { 3 10 } - } - } - } - 100 = { #The pregnancy continues - custom_tooltip = pregnancy_treatment_fails_tt - hidden_effect = { - trigger_event = { - id = pregnancy.2005 - days = { 3 10 } - } - } - } - 10 = { #The mother dies - show_as_tooltip = { - death = { - death_reason = death_attempted_treatment - } - } - hidden_effect = { - trigger_event = { - id = pregnancy.2007 - days = { 3 10 } - } - } - } - } -} - - -#Effects to use in birth 3001-3999 -#Requires scope:child (scope:child_2, scope:child_3, and twin_list optional) -kill_child_and_possible_twins_effect = { - scope:child = { - death = { - death_reason = death_delivery - } - } - if = { - limit = { - exists = scope:child_2 - } - scope:child_2 = { - death = { - death_reason = death_delivery - } - } - } -} - diff --git a/N3OW/common/scripted_effects/00_prison_effects.txt b/N3OW/common/scripted_effects/00_prison_effects.txt deleted file mode 100644 index 3c99df25..00000000 --- a/N3OW/common/scripted_effects/00_prison_effects.txt +++ /dev/null @@ -1,2378 +0,0 @@ -# the effect used in all ransom interactions -ransom_interaction_effect = { - # For mass actions where an option is not selected manually - if = { - limit = { - NOR = { - scope:influence_send_option = yes - scope:herd_send_option = yes - scope:extortionate_current_gold = yes - scope:extortionate_gold = yes - scope:gold = yes - scope:current_gold = yes - scope:favor = yes - scope:hook ?= yes - } - } - save_scope_value_as = { - name = ransom_saved_gold_value - value = scope:payer.current_gold_value - } - if = { - limit = { - scope:imprisoner.dynasty ?= { has_dynasty_perk = fp1_pillage_legacy_3 } - scope:payer.gold >= scope:prisoner.increased_ransom_cost_value - } - save_scope_value_as = { name = extortionate_gold value = yes } - } - else_if = { - limit = { - scope:imprisoner.dynasty ?= { has_dynasty_perk = fp1_pillage_legacy_3 } - scope:payer.gold < scope:prisoner.increased_ransom_cost_value - scope:payer.gold >= 1 - } - save_scope_value_as = { name = extortionate_current_gold value = yes } - } - else_if = { - limit = { scope:payer.gold >= scope:prisoner.ransom_cost_value } - save_scope_value_as = { name = gold value = yes } - } - else_if = { - limit = { - scope:payer.gold < scope:prisoner.ransom_cost_value - scope:payer.gold >= 1 - } - save_scope_value_as = { name = current_gold value = yes } - } - else = { - save_scope_value_as = { name = favor value = yes } - } - } - scope:prisoner = { - add_character_flag = { #To make sure you don't get spammed about the release - flag = block_for_prison_release_notification - days = 1 - } - if = { # no opinion if you ransomed yourself - limit = { this != scope:payer } - if = { #Only visible if a player is involved - limit = { - OR = { - scope:prisoner = { is_ai = no } - scope:payer = { is_ai = no } - } - NOT = { scope:prisoner = { is_ai = no } } - } - add_opinion = { - modifier = ransomed_from_prison - target = scope:payer - years = 1 - } - if = { - limit = { - is_ai = yes - ai_honor >= 25 - ai_greed <= 0 - } - scope:payer = { - if = { - limit = { - can_add_hook = { - target = scope:prisoner - type = favor_hook - } - } - add_hook = { - target = scope:prisoner - type = indebted_hook - } - } - } - } - else = { - scope:payer = { - progress_towards_hook_effect = { - CHARACTER = scope:prisoner - HOOK_TYPE = indebted_hook - } - } - } - } - else = { - hidden_effect = { - if = { - limit = { - is_ai = yes - ai_honor >= 25 - ai_greed <= 0 - } - scope:payer = { - if = { - limit = { - can_add_hook = { - target = scope:prisoner - type = favor_hook - } - } - add_hook = { - target = scope:prisoner - type = indebted_hook - } - } - } - } - else = { - scope:payer = { - progress_towards_hook_effect = { - CHARACTER = scope:prisoner - HOOK_TYPE = indebted_hook - } - } - } - } - } - } - } - scope:payer = { - switch = { - trigger = always - # Perk: increased ransom + bonus prestige - scope:extortionate_gold = { - pay_short_term_gold = { - gold = scope:prisoner.increased_ransom_cost_value - target = scope:imprisoner - } - scope:imprisoner = { - add_prestige = scope:prisoner.increased_ransom_cost_value - mandala_trickster_increment_gold_ransomed_effect = { GOLD_AMOUNT = scope:prisoner.increased_ransom_cost_value } - } - } - # Perk: whatever they can pay + bonus prestige - scope:extortionate_current_gold = { - pay_short_term_gold = { - gold = scope:ransom_saved_gold_value # Calculated earlier in the ransom interaction. - target = scope:imprisoner - } - scope:imprisoner = { - add_prestige = scope:ransom_saved_gold_value - mandala_trickster_increment_gold_ransomed_effect = { GOLD_AMOUNT = scope:ransom_saved_gold_value } - } - } - # Full ransom - scope:gold = { - pay_short_term_gold = { - gold = scope:prisoner.ransom_cost_value - target = scope:imprisoner - } - scope:imprisoner = { - mandala_trickster_increment_gold_ransomed_effect = { GOLD_AMOUNT = scope:prisoner.ransom_cost_value } - } - } - # Whatever they can pay - scope:current_gold = { - pay_short_term_gold = { - gold = scope:ransom_saved_gold_value # Calculated earlier in the ransom interaction. - target = scope:imprisoner - } - scope:imprisoner = { - mandala_trickster_increment_gold_ransomed_effect = { GOLD_AMOUNT = scope:ransom_saved_gold_value } - } - } - } - # Favor hook - if = { - limit = { scope:favor = yes } - if = { - limit = { scope:payer = scope:prisoner } - add_opinion = { - modifier = demanded_hook - target = scope:imprisoner - } - } - scope:imprisoner = { - add_hook = { - target = scope:payer - type = favor_hook - } - } - } - # Herd - if = { - limit = { scope:herd_send_option = yes } - scope:payer = { - pay_herd = { - target = scope:imprisoner - value = scope:payer.domicile.medium_herd_value - } - } - } - } - scope:prisoner = { release_from_prison = yes } -} - -#Used for all executions -execute_prisoner_effect = { - - $VICTIM$ = { - save_scope_as = victim - } - - $EXECUTIONER$ = { - save_scope_as = executioner - save_scope_as = imprisoner #Save this scope to show correct tyranny tooltip - } - - show_as_tooltip = { - $VICTIM$ = { - death = { - death_reason = death_execution - killer = $EXECUTIONER$ - } - } - } - - scope:executioner = { - # Dread gain - if = { - limit = { - scope:victim = { - time_in_prison = { years > 15 } # No one even remembers who they are anymore - } - } - # No dread for you - } - else_if = { # Executing Emperors/HoF is quite dreadful - limit = { - scope:victim = { - OR = { - highest_held_title_tier >= tier_empire - scope:executioner.faith.religious_head = scope:victim # Your head of faith - } - } - } - add_dread = execute_interaction_massive_dread_gain - } - else_if = { - limit = { - scope:victim = { - OR = { - highest_held_title_tier >= tier_kingdom - tier_or_related_liege_tier_greater_or_equal_trigger = { TIER = tier_empire } - is_powerful_vassal_of = scope:executioner # Is your powerful vassal - target_is_vassal_or_below = scope:executioner # Your liege/s - is_close_family_of = scope:executioner - } - } - } - add_dread = execute_interaction_major_dread_gain - } - else_if = { - limit = { - scope:victim = { - OR = { - highest_held_title_tier >= tier_duchy - tier_or_related_liege_tier_greater_or_equal_trigger = { TIER = tier_kingdom } - AND = { # Is your vassal, and higher than Baron - is_vassal_of = scope:executioner - primary_title.tier > tier_barony - } - AND = { # Peer Vassals - exists = primary_title - primary_title.tier > tier_barony - liege ?= scope:executioner.liege - } - has_trait = peasant_leader - } - } - } - add_dread = execute_interaction_medium_dread_gain - } - else_if = { - limit = { - scope:victim = { - OR = { - highest_held_title_tier >= tier_county - tier_or_related_liege_tier_greater_or_equal_trigger = { TIER = tier_duchy } - is_vassal_of = scope:executioner # Is your Baron vassal - is_close_or_extended_family_of = scope:executioner - - scope:executioner = { # Executing close family of your vassals is dreadful... - any_vassal = { - is_close_family_of = scope:victim - } - } - scope:executioner = { # Executing close family of your liege/s is the same... - any_liege_or_above = { - is_close_family_of = scope:victim - } - } - } - } - } - add_dread = execute_interaction_minor_dread_gain - } - - # Piety loss (or gain) from executions - if = { - limit = { - faith = { - has_doctrine_parameter = human_sacrifice_active - } - } - scope:victim = { - if = { - limit = { - OR = { - highest_held_title_tier >= tier_empire - any_close_family_member = { - highest_held_title_tier >= tier_empire - } - } - } - scope:executioner = { add_piety = massive_piety_gain } - } - else_if = { - limit = { - OR = { - highest_held_title_tier >= tier_kingdom - any_close_family_member = { - highest_held_title_tier >= tier_kingdom - } - } - } - scope:executioner = { add_piety = major_piety_gain } - } - else_if = { - limit = { - OR = { - highest_held_title_tier >= tier_duchy - any_close_family_member = { - highest_held_title_tier >= tier_duchy - } - } - } - scope:executioner = { add_piety = medium_piety_gain } - } - else_if = { - limit = { - OR = { - is_ruler = yes - is_lowborn = no - any_close_family_member = { - is_ruler = yes - } - } - } - scope:executioner = { add_piety = minor_piety_gain } - } - else = { - scope:executioner = { add_piety = miniscule_piety_gain } - } - } - } - else_if = { - limit = { - faith = scope:victim.faith - NOT = { has_perk = divine_retribution_perk } - scope:victim = { - has_no_particular_noble_roots_trigger = yes - } - } - add_piety = miniscule_piety_loss - } - else_if = { - limit = { - faith = scope:victim.faith - NOT = { has_perk = divine_retribution_perk } - } - add_piety = medium_piety_loss - } - - # Stress loss - if = { - limit = { has_relation_rival = scope:victim } - - if = { - limit = { - NOR = { - has_trait = sadistic - has_trait = vengeful - has_trait = compassionate - has_trait = forgiving - } - } - add_stress = medium_stress_loss - } - else = { - stress_impact = { - sadistic = major_stress_impact_loss - vengeful = massive_stress_impact_loss - compassionate = minor_stress_impact_gain - forgiving = minor_stress_impact_gain - } - } - } - else_if = { #Killing infidels is relaxing - limit = { - has_trait = zealous - scope:executioner.faith != scope:victim.faith - } - - if = { - limit = { - NOR = { - has_trait = sadistic - has_trait = compassionate - has_trait = forgiving - } - } - add_stress = medium_stress_loss - } - else = { - stress_impact = { - sadistic = major_stress_impact_loss - compassionate = minor_stress_impact_gain - forgiving = minor_stress_impact_gain - } - } - } - # Stress Gain - else_if = { - limit = { - exists = scope:victim - has_execute_reason = scope:victim - NOT = { - has_trait = sadistic - } - scope:victim = { - OR = { - is_child_of = scope:executioner - is_grandchild_of = scope:executioner - is_great_grandchild_of = scope:executioner - } - } - } - stress_impact = { - base = minor_stress_impact_gain - compassionate = massive_stress_impact_gain - forgiving = major_stress_impact_gain - generous = minor_stress_impact_gain - family_first = minor_stress_impact_gain - } - } - else_if = { - limit = { - NOT = { - has_trait = sadistic - } - scope:victim = { - OR = { - is_child_of = scope:executioner - is_grandchild_of = scope:executioner - is_great_grandchild_of = scope:executioner - } - } - } - stress_impact = { - base = medium_stress_impact_gain - compassionate = massive_stress_impact_gain - forgiving = major_stress_impact_gain - generous = medium_stress_impact_gain - trusting = minor_stress_impact_gain - content = minor_stress_impact_gain - family_first = minor_stress_impact_gain - } - if = { - limit = { - exists = scope:execution_sacrifice - NOT = { always = scope:execution_sacrifice } - } - stress_impact = { - just = medium_stress_impact_gain - } - } - } - else_if = { - limit = { - NOT = { - has_trait = sadistic - } - scope:victim = { - OR = { - has_relation_friend = scope:executioner - has_relation_lover = scope:executioner - } - } - } - stress_impact = { - base = medium_stress_impact_gain - compassionate = massive_stress_impact_gain - forgiving = major_stress_impact_gain - generous = medium_stress_impact_gain - trusting = minor_stress_impact_gain - content = minor_stress_impact_gain - } - if = { - limit = { - exists = scope:execution_sacrifice - NOT = { always = scope:execution_sacrifice } - } - stress_impact = { - just = medium_stress_impact_gain - } - } - } - else_if = { - limit = { - exists = scope:victim - has_execute_reason = scope:victim - } - stress_impact = { - sadistic = medium_stress_impact_loss - compassionate = medium_stress_impact_gain - forgiving = minor_stress_impact_gain - generous = minor_stress_impact_gain - } - } - else = { - stress_impact = { - sadistic = medium_stress_impact_loss - compassionate = major_stress_impact_gain - forgiving = medium_stress_impact_gain - generous = medium_stress_impact_gain - trusting = minor_stress_impact_gain - content = minor_stress_impact_gain - } - if = { - limit = { - exists = scope:execution_sacrifice - NOT = { always = scope:execution_sacrifice } - } - stress_impact = { - just = medium_stress_impact_gain - } - } - } - - #Kinslaying - add_kinslayer_trait_or_nothing_effect = { VICTIM = scope:victim } - - #Tyranny - if = { - limit = { - exists = scope:recipient - has_execute_reason = scope:victim - } - custom_tooltip = IS_ALLOWED_TO_EXECUTE_DESC - } - else_if = { - limit = { - OR = { - AND = { - NOT = { exists = scope:recipient } - has_execute_reason = scope:victim - } - is_at_war_with = scope:victim - } - } - custom_tooltip = IS_ALLOWED_TO_EXECUTE_NO_RECIPIENT_DESC - } - else_if = { - limit = { - scope:victim = { - OR = { - is_playable_character = no - NOT = { is_of_major_or_minor_interest_trigger = { CHARACTER = scope:executioner } } - } - } - scope:executioner.faith = { - faith_hostility_level = { - target = scope:victim.faith - value > faith_astray_level - } - } - } - custom_tooltip = IS_ALLOWED_TO_EXECUTE_HOSTILE_RELIGION_DESC - } - else_if = { - limit = { - scope:victim = { target_is_liege_or_above = prev } - NOT = { exists = scope:suppress_legitimacy_from_crime } - } - add_tyranny = execution_tyranny_gain - if = { - limit = { has_legitimacy = yes} - add_legitimacy = miniscule_legitimacy_loss - } - } - else_if = { - limit = { - scope:victim = { - NOT = { exists = liege } - exists = host - } - any_pool_guest = { } - } - every_pool_guest = { - limit = { - NOR = { - this = scope:victim - is_in_list = guest_list - } - } - add_to_temporary_list = guest_list - } - every_in_list = { - list = guest_list - custom = all_your_guests - limit = { - this != scope:executioner - } - add_opinion = { - target = scope:executioner - modifier = executed_guest_modifier - } - } - } - else = { - if = { - limit = { - exists = scope:victim.liege - NOR = { - scope:victim.liege = scope:victim - scope:victim.liege = scope:executioner - scope:victim.liege = scope:imprisoner - } - } - scope:victim.liege = { - add_opinion = { - target = scope:executioner - modifier = executed_my_countryman_modifier - } - } - } - } - - # If we're a clan this affects unity - if = { - limit = { # If the victim is landed and you DON'T have an execution reason, you lose more unity - scope:victim = { is_landed = yes } - NOT = { has_execute_reason = scope:victim } - } - add_clan_unity_interaction_effect = { - CHARACTER = scope:executioner - TARGET = scope:victim - VALUE = medium_unity_loss - DESC = clan_unity_execute.desc - REVERSE_NON_HOUSE_TARGET = no - } - } - else_if = { - limit = { # If the victim is landed and you DO have an execution reason, you lose a bit less unity - scope:victim = { is_landed = yes } - has_execute_reason = scope:victim - } - add_clan_unity_interaction_effect = { - CHARACTER = scope:executioner - TARGET = scope:victim - VALUE = minor_unity_loss - DESC = clan_unity_execute.desc - REVERSE_NON_HOUSE_TARGET = no - } - } - else = { # For unlanded characters, we don't care as much, but you still lose some unity - add_clan_unity_interaction_effect = { - CHARACTER = scope:executioner - TARGET = scope:victim - VALUE = miniscule_unity_loss - DESC = clan_unity_execute.desc - REVERSE_NON_HOUSE_TARGET = no - } - } - #If you're a nomadic ruler, you can keep the head or send it for intimidation - if = { - limit = { - mpo_keep_prisoners_heads_trigger = yes - #execution by beheading, but that only gets tracked for players for some reason - OR = { - AND = { - is_ai = no - exists = scope:execution_beheaded - scope:execution_beheaded = yes - } - AND = { - is_ai = yes - NOT = { - scope:executioner.faith = { has_doctrine_parameter = human_sacrifice_active } - } - } - } - scope:victim = { - is_ruler = yes - is_adult = yes - highest_held_title_tier >= tier_county - #Need to be valid either for artifact or heir intimidation - OR = { - AND = { - exists = primary_heir - NOT = { - primary_heir = scope:executioner - } - } - highest_held_title_tier >= tier_kingdom - } - } - } - if = { - limit = { - scope:victim = { - highest_held_title_tier >= tier_empire - } - } - custom_tooltip = gain_illustrious_victim_head_artifact_tt - add_character_flag = { - flag = execution_head_illustrious_flag - days = 30 - } - } - else_if = { - limit = { - scope:victim = { - highest_held_title_tier >= tier_kingdom - } - } - custom_tooltip = gain_famed_victim_head_artifact_tt - add_character_flag = { - flag = execution_head_famed_flag - days = 30 - } - } - #Send head to heir - if = { - limit = { - scope:victim = { - AND = { - exists = primary_heir - NOT = { - primary_heir = scope:executioner - } - } - NOT = { - government_has_flag = government_is_theocracy - } - } - } - #Can send head for warscore - if = { - limit = { - is_at_war_with = scope:victim - any_character_war = { - primary_attacker = scope:executioner - primary_defender = scope:victim - casus_belli = { - any_target_title = { - this = scope:victim.primary_title - } - } - } - scope:victim = { is_ai = yes } - scope:victim.primary_heir = { - is_ai = yes - } - NAND = { - has_variable = peace_acceptance_head_scare - var:peace_acceptance_head_scare = { - this = scope:victim.primary_heir - } - } - } - custom_tooltip = send_head_for_warscore_tt - add_character_flag = { - flag = execution_head_warscore_flag - days = 30 - } - scope:victim.primary_heir = { - save_scope_as = headless_heir - } - } - #Can send head for vassalization acceptance - else_if = { - limit = { - scope:victim = { - is_independent_ruler = yes - highest_held_title_tier <= scope:executioner.highest_held_title_tier - primary_heir = { - highest_held_title_tier <= scope:executioner.highest_held_title_tier - NOR = { - is_vassal_or_below_of = scope:executioner - is_tributary_of_suzerain_or_above = scope:executioner - } - } - is_ai = yes - primary_heir = { is_ai = yes } - } - } - custom_tooltip = send_head_for_vassalization_tt - add_character_flag = { - flag = execution_head_vassalization_flag - days = 30 - } - scope:victim.primary_heir = { - save_scope_as = headless_heir - } - } - else_if = { - limit = { - OR = { - scope:victim = { - highest_held_title_tier > scope:executioner.highest_held_title_tier - } - scope:victim.primary_heir = { - highest_held_title_tier > scope:executioner.highest_held_title_tier - } - } - } - custom_tooltip = send_head_for_prestige_tt - add_character_flag = { - flag = execution_head_prestige_flag - days = 30 - } - scope:victim.primary_heir = { - save_scope_as = headless_heir - } - } - #Send head for obedient trait - else_if = { - limit = { - scope:victim = { - is_vassal_of = scope:executioner - } - scope:victim.primary_heir = { - obedience_target = root - is_obedient = no - } - } - custom_tooltip = send_head_for_obedience_tt - add_character_flag = { - flag = execution_head_obedience_flag - days = 30 - } - scope:victim.primary_heir = { - save_scope_as = headless_heir - } - } - #Can send head for fear hook - else_if = { - limit = { - scope:victim = { - highest_held_title_tier <= scope:executioner.highest_held_title_tier - } - scope:victim.primary_heir = { - highest_held_title_tier <= scope:executioner.highest_held_title_tier - } - can_add_hook = { - target = scope:victim.primary_heir - type = threat_hook - } - } - custom_tooltip = send_head_for_hook_tt - add_character_flag = { - flag = execution_head_hook_flag - days = 30 - } - scope:victim.primary_heir = { - save_scope_as = headless_heir - } - } - } - - trigger_event = { - id = mpo_nomad_events.1010 - days = 1 - } - } - } - - execute_opinion_effect = { VICTIM = scope:victim EXECUTIONER = scope:executioner } - - if = { - limit = { - scope:executioner = { - has_any_nickname = no - has_relation_lover = scope:victim - } - } - random = { - chance = 20 - scope:executioner = { - set_nickname_effect = { NICKNAME = nick_the_heartless } - } - } - } - - #If you have the Human Sacrifice tenet, give victim an appropriate death reason - hidden_effect = { - if = { - limit = { - scope:executioner.faith = { - has_doctrine = tenet_human_sacrifice - } - } - $VICTIM$ = { - death = { - death_reason = death_sacrificed_to_gods - killer = $EXECUTIONER$ - } - } - } - else_if = { - limit = { - exists = scope:execution_kennel - scope:execution_kennel = yes - } - $VICTIM$ = { - death = { - death_reason = death_kennel - killer = $EXECUTIONER$ - } - } - } - else = { - $VICTIM$ = { - death = { - death_reason = death_execution - killer = $EXECUTIONER$ - } - } - } - } -} - - -execute_opinion_effect = { - $VICTIM$ = { - # Victim's family & spouse hates executioner - every_close_family_member = { - limit = { NOT = { this = $EXECUTIONER$ } } - add_to_temporary_list = victim_family_list - } - every_spouse = { - limit = { - NOR = { - this = $EXECUTIONER$ - is_in_list = victim_family_list - } - } - add_to_temporary_list = victim_family_list - } - - if = { - limit = { - any_in_list = { - list = victim_family_list - count > 0 - } - } - if = { - limit = { - $EXECUTIONER$ = { - has_execute_reason = $VICTIM$ - } - } - every_in_list = { - list = victim_family_list - custom = all_close_family_and_spouses - add_opinion = { - target = $EXECUTIONER$ - modifier = executed_close_family - } - } - } - else = { - every_in_list = { - list = victim_family_list - custom = all_close_family_and_spouses - add_opinion = { - target = $EXECUTIONER$ - modifier = executed_close_family_crime - } - } - } - } - - # Victim's dynasty hates executioner - if = { - limit = { - exists = dynasty - exists = $EXECUTIONER$.dynasty - NOT = { dynasty = $EXECUTIONER$.dynasty } - NOT = { - $EXECUTIONER$ = { - has_execute_reason = $VICTIM$ - } - } - } - dynasty = { - every_dynasty_member = { - limit = { - NOR = { - this = $VICTIM$ - is_in_list = victim_family_list - } - } - custom = all_dynasty_members - add_to_temporary_list = victim_dynasty_list - add_opinion = { - target = $EXECUTIONER$ - modifier = executed_dynasty_member - } - } - } - } - - # Victim's friends and lovers - every_relation = { - type = friend - limit = { - NOR = { - this = $VICTIM$ - is_in_list = victim_family_list - is_in_list = victim_dynasty_list - } - } - add_to_list = victim_close_relations_list - } - every_relation = { - type = lover - limit = { - NOR = { - this = $VICTIM$ - is_in_list = victim_family_list - is_in_list = victim_dynasty_list - is_in_list = victim_close_relations_list - } - } - add_to_list = victim_close_relations_list - } - if = { - limit = { - any_in_list = { - list = victim_close_relations_list - always = yes - } - } - every_in_list = { - list = victim_close_relations_list - limit = { - NOT = { this = $EXECUTIONER$ } - } - custom = all_friends_and_lovers - add_opinion = { - target = $EXECUTIONER$ - modifier = executed_close_relation_opinion - } - } - } - - # House Relation - house ?= { - change_house_relation_effect = { - HOUSE = $EXECUTIONER$.house - VALUE = house_relation_damage_medium_value - REASON = execution - CHAR = $EXECUTIONER$ - TARGET_CHAR = $VICTIM$ - TITLE = scope:dummy_gender - } - } - } -} - - -#Used for religious sacrifice -sacrifice_prisoner_effect = { - - $VICTIM$ = { - save_scope_as = victim - } - - $EXECUTIONER$ = { - save_scope_as = executioner - } - - scope:executioner = { - if = { - limit = { - OR = { - #is_spouse_of = scope:victim - is_close_family_of = scope:victim - scope:victim = { tier_or_related_liege_tier_greater_or_equal_trigger = { TIER = tier_kingdom } } #Kingdom & empire - } - } - add_dread = major_dread_gain - } - else_if = { - limit = { - OR = { - scope:victim = { tier_or_related_liege_tier_equal_trigger = { TIER = tier_duchy } } - scope:victim = { tier_or_related_liege_tier_equal_trigger = { TIER = tier_county } } - } - } - add_dread = medium_dread_gain - } - else = { - add_dread = minor_dread_gain - } - if = { - limit = { - faith = scope:victim.faith - NOT = { - scope:executioner.faith = { - has_doctrine_parameter = human_sacrifice_active - } - } - } - add_piety = minor_piety_loss - } - else_if = { - limit = { - scope:executioner.faith = { - has_doctrine_parameter = human_sacrifice_active - } - } - if = { - limit = { - scope:victim = { - highest_held_title_tier = 5 - } - } - add_piety = massive_piety_gain - } - else_if = { - limit = { - scope:victim = { - highest_held_title_tier = 4 - } - } - add_piety = major_piety_gain - } - else_if = { - limit = { - scope:victim = { - highest_held_title_tier = 3 - } - } - add_piety = medium_piety_gain - } - else_if = { - limit = { - scope:victim = { - highest_held_title_tier = 2 - } - } - add_piety = minor_piety_gain - } - else_if = { - limit = { - scope:victim = { - highest_held_title_tier = 1 - } - } - add_piety = miniscule_piety_gain - } - } - # Stress loss - if = { - limit = { - has_trait = sadistic - } - stress_impact = { - sadistic = medium_stress_impact_loss - } - } - if = { - limit = { #Killing infidels is relaxing - has_trait = zealous - scope:executioner.faith != scope:victim.faith - NOT = { - scope:executioner.faith = { - has_doctrine_parameter = human_sacrifice_active - } - } - } - stress_impact = { - zealous = minor_stress_impact_loss - } - } - if = { - limit = { #Even more so if the religion is in favor of doing it. - has_trait = zealous - scope:executioner.faith != scope:victim.faith - scope:executioner.faith = { - has_doctrine_parameter = human_sacrifice_active - } - } - stress_impact = { - zealous = medium_stress_impact_loss - } - } - if = { - limit = { - has_relation_rival = scope:victim - } - add_prestige = medium_prestige_gain - if = { - limit = { - NOR = { - has_trait = vengeful - has_trait = forgiving - } - } - add_stress = major_stress_loss - } - else = { - stress_impact = { - vengeful = massive_stress_impact_loss - forgiving = 0 #No stress reduction - } - } - } - #Kinslaying - add_kinslayer_trait_or_nothing_effect = { VICTIM = scope:victim } - } - - execute_opinion_effect = { VICTIM = scope:victim EXECUTIONER = scope:executioner } - - $VICTIM$ = { - death = { - death_reason = death_sacrificed_to_gods - killer = $EXECUTIONER$ - } - } -} - - -imprison_character_effect = { - $TARGET$ = { save_scope_as = imprisonment_target } - $IMPRISONER$ = { save_scope_as = imprisoner } - - scope:imprisonment_target = { - if = { - limit = { - has_opinion_modifier = { - modifier = imprisoned_me_past - target = scope:imprisoner - } - } - hidden_effect = { - remove_opinion = { - target = scope:imprisoner - modifier = imprisoned_me - } - } - } - add_opinion = { - target = scope:imprisoner - modifier = imprisoned_me - } - } - - imprison_hostage_tooltip_effect = { WHO = scope:imprisonment_target } - - if = { - limit = { - scope:imprisoner = { is_landless_ruler = no } - scope:imprisonment_target = { - exists = liege - OR = { - is_playable_character = yes - is_close_or_extended_family_of = liege - is_spouse_of = liege - } - } - } - - scope:imprisoner = { - imprison = { - target = scope:imprisonment_target - type = house_arrest - } - scope:imprisonment_target = { - if = { - limit = { - any_close_or_extended_family_member = { - NOR = { - is_close_family_of = scope:imprisoner - scope:imprisoner = this - } - } - } - custom_tooltip = IMPRISONMENT_RELATIVES_EFFECT_HOUSE_ARREST - hidden_effect = { - every_close_or_extended_family_member = { - limit = { - NOR = { - is_close_family_of = scope:imprisoner - scope:imprisoner = this - } - } - add_opinion = { - modifier = imprisoned_family_member - target = scope:imprisoner - } - } - } - } - } - } - } - - else = { - scope:imprisoner = { - imprison = { - target = scope:imprisonment_target - type = dungeon - } - scope:imprisonment_target = { - if = { - limit = { - any_close_or_extended_family_member = { - NOR = { - is_close_family_of = scope:imprisoner - scope:imprisoner = this - } - } - } - custom_tooltip = IMPRISONMENT_RELATIVES_EFFECT_DUNGEON - hidden_effect = { - every_close_or_extended_family_member = { - limit = { - scope:imprisoner != this - } - add_opinion = { - modifier = imprisoned_family_member_dungeon - target = scope:imprisoner - } - } - } - } - } - } - } - - scope:imprisoner = { - imprison_tyranny_effect = yes - } - - #Disband any scheme you have against them - scope:imprisoner = { - if = { - limit = { - any_scheme = { - scheme_target_character = scope:imprisonment_target - } - } - every_scheme = { - limit = { - scheme_target_character = scope:imprisonment_target - } - end_scheme = yes - } - } - } - - #Send break up event if they are your lover - scope:imprisoner = { - if = { - limit = { - has_relation_lover = scope:imprisonment_target - NOT = { has_relation_rival = scope:imprisonment_target } #To enable really strange love stories - } - scope:imprisonment_target = { - trigger_event = { - id = lover.0101 - days = { 14 30 } - } - } - } - } - - #Remove them as guardian/ward for any courtiers and give feedback about this - imprison_remove_ward_guardian_effect = { IMPRISONER = scope:imprisoner PRISONER = scope:imprisonment_target } -} - -imprison_character_effect_ignore_reason = { - $TARGET$ = { save_temporary_scope_as = imprisonment_target } - $IMPRISONER$ = { save_temporary_scope_as = imprisoner } - - - if = { - limit = { - scope:imprisonment_target = { - exists = liege - OR = { - is_playable_character = yes - is_close_or_extended_family_of = liege - is_spouse_of = liege - } - } - } - - scope:imprisoner = { - imprison = { - target = scope:imprisonment_target - type = house_arrest - } - scope:imprisonment_target = { - if = { - limit = { - any_close_or_extended_family_member = { - NOR = { - is_close_family_of = scope:imprisoner - scope:imprisoner = this - } - } - } - custom_tooltip = IMPRISONMENT_RELATIVES_EFFECT_HOUSE_ARREST - } - } - } - } - - else = { - scope:imprisoner = { - imprison = { - target = scope:imprisonment_target - type = dungeon - } - scope:imprisonment_target = { - if = { - limit = { - any_close_or_extended_family_member = { - NOR = { - is_close_family_of = scope:imprisoner - scope:imprisoner = this - } - } - } - custom_tooltip = IMPRISONMENT_RELATIVES_EFFECT_DUNGEON - } - } - } - } - - scope:imprisoner = { - add_tyranny = imprisonment_tyranny_gain - } - - scope:imprisonment_target = { - if = { - limit = { - has_opinion_modifier = { - modifier = imprisoned_me_past - target = scope:imprisoner - } - } - hidden_effect = { - remove_opinion = { - target = scope:imprisoner - modifier = imprisoned_me - } - } - } - add_opinion = { - target = scope:imprisoner - modifier = imprisoned_me - } - } - - imprison_hostage_tooltip_effect = { WHO = scope:imprisonment_target } - - #Disband any scheme you have against them - scope:imprisoner = { - if = { - limit = { - any_scheme = { - scheme_target_character = scope:imprisonment_target - } - } - every_scheme = { - limit = { - scheme_target_character = scope:imprisonment_target - } - end_scheme = yes - } - } - } - - #Send break up event if they are your lover - scope:imprisoner = { - if = { - limit = { - has_relation_lover = scope:imprisonment_target - NOT = { has_relation_rival = scope:imprisonment_target } #To enable really strange love stories - } - scope:imprisonment_target = { - trigger_event = { - id = lover.0101 - days = { 14 30 } - } - } - } - } - - #Remove them as guardian/ward for any courtiers and give feedback about this - imprison_remove_ward_guardian_effect = { IMPRISONER = scope:imprisoner PRISONER = scope:imprisonment_target } -} - -imprison_hostage_tooltip_effect = { - $WHO$ = { - if = { - limit = { is_hostage = yes } - custom_tooltip = hostage_prison_invalidation_tt - } - } -} - - -hard_imprison_character_effect = { - $TARGET$ = { save_temporary_scope_as = new_target } - $IMPRISONER$ = { save_temporary_scope_as = new_imprisoner } - - - - scope:new_imprisoner = { - imprison = { - target = scope:new_target - type = house_arrest - } - } - - imprison_hostage_tooltip_effect = { WHO = scope:new_target } - - hidden_effect = { - #Disband any scheme you have against them - scope:new_imprisoner = { - if = { - limit = { - any_scheme = { - scheme_target_character = scope:new_target - } - } - every_scheme = { - limit = { - scheme_target_character = scope:new_target - } - end_scheme = yes - } - } - } - - #Send break up event if they are your lover - scope:new_imprisoner = { - if = { - limit = { - has_relation_lover = scope:new_target - NOT = { has_relation_rival = scope:new_target } #To enable really strange love stories - } - scope:new_target = { - trigger_event = { - id = lover.0101 - days = { 14 30 } - } - } - } - } - - #Remove them as guardian/ward for any courtiers and give feedback about this - imprison_remove_ward_guardian_effect = { IMPRISONER = scope:new_imprisoner PRISONER = scope:new_target } - } -} - -#Exactly the same as imprison_character_effect, except it never adds tyranny -#USE THIS SPARINGLY. READ ME: It is usually better to set an opinion with an imprisonment reason for "custom situations". For cases where there is a "standard imprisonment reason", such as for murder, but that imprisonment reason set before this script has to be executed, double-check that the imprisonment you're doing is actually rightful. -rightfully_imprison_character_effect = { - $TARGET$ = { save_scope_as = new_target } - $IMPRISONER$ = { save_scope_as = imprisoner } - - - if = { - limit = { - scope:new_target = { - exists = liege - OR = { - is_playable_character = yes - is_close_or_extended_family_of = liege - is_spouse_of = liege - } - } - } - - scope:imprisoner = { - imprison = { - target = scope:new_target - type = house_arrest - } - scope:new_target = { - if = { - limit = { - any_close_or_extended_family_member = { - NOR = { - is_close_family_of = scope:imprisoner - scope:imprisoner = this - } - } - } - hidden_effect = { - every_close_or_extended_family_member = { - limit = { - NOR = { - is_close_family_of = scope:imprisoner - scope:imprisoner = this - } - } - add_opinion = { - target = scope:imprisoner - modifier = imprisoned_family_member - opinion = -15 - } - } - } - custom_tooltip = IMPRISONMENT_RELATIVES_EFFECT_HOUSE_ARREST - } - } - } - } - - else = { - scope:imprisoner = { - imprison = { - target = scope:new_target - type = dungeon - } - scope:new_target = { - if = { - limit = { - any_close_or_extended_family_member = { - NOR = { - is_close_family_of = scope:imprisoner - scope:imprisoner = this - } - } - } - hidden_effect = { - every_close_or_extended_family_member = { - limit = { - NOR = { - is_close_family_of = scope:imprisoner - scope:imprisoner = this - } - } - add_opinion = { - target = scope:imprisoner - modifier = imprisoned_family_member - opinion = -15 - } - } - } - custom_tooltip = IMPRISONMENT_RELATIVES_EFFECT_DUNGEON - } - } - } - } - - scope:imprisoner = { - if = { - limit = { exists = scope:disable_display_rightful_imprisonment_tooltip } - # No tooltip if we do this. - } - else_if = { - limit = { - exists = scope:recipient - has_imprisonment_reason = scope:new_target - } - custom_tooltip = IS_ALLOWED_TO_IMPRISON_DESC - } - else = { custom_tooltip = IS_ALLOWED_TO_IMPRISON_NO_RECIPIENT_DESC } - } - - scope:new_target = { - if = { - limit = { - has_opinion_modifier = { - modifier = imprisoned_me_past - target = scope:imprisoner - } - } - hidden_effect = { - remove_opinion = { - target = scope:imprisoner - modifier = imprisoned_me - } - } - } - add_opinion = { - target = scope:imprisoner - modifier = imprisoned_me - } - } - - imprison_hostage_tooltip_effect = { WHO = scope:new_target } - - #Disband any scheme you have against them - scope:imprisoner = { - if = { - limit = { - any_scheme = { - scheme_target_character = scope:new_target - } - } - every_scheme = { - limit = { - scheme_target_character = scope:new_target - } - end_scheme = yes - } - } - } - - #Send break up event if they are your lover - scope:imprisoner = { - if = { - limit = { - has_relation_lover = scope:new_target - NOT = { has_relation_rival = scope:new_target } #To enable really strange love stories - } - scope:new_target = { - trigger_event = { - id = lover.0101 - days = { 14 30 } - } - } - } - } - - #Remove them as guardian/ward for any courtiers and give feedback about this - imprison_remove_ward_guardian_effect = { IMPRISONER = scope:imprisoner PRISONER = scope:new_target } -} - -rightfully_imprison_character_less_verbose_effect = { - $TARGET$ = { save_scope_as = new_target } - $IMPRISONER$ = { save_scope_as = imprisoner } - - - if = { - limit = { - scope:new_target = { - exists = liege - OR = { - is_playable_character = yes - is_close_or_extended_family_of = liege - is_spouse_of = liege - } - } - } - - scope:imprisoner = { - imprison = { - target = scope:new_target - type = house_arrest - } - hidden_effect = { - scope:new_target = { - if = { - limit = { - any_close_or_extended_family_member = { - NOR = { - is_close_family_of = scope:imprisoner - scope:imprisoner = this - } - } - } - hidden_effect = { - every_close_or_extended_family_member = { - limit = { - NOR = { - is_close_family_of = scope:imprisoner - scope:imprisoner = this - } - } - add_opinion = { - target = scope:imprisoner - modifier = imprisoned_family_member - opinion = -15 - } - } - } - custom_tooltip = IMPRISONMENT_RELATIVES_EFFECT_HOUSE_ARREST - } - } - } - } - } - - else = { - scope:imprisoner = { - imprison = { - target = scope:new_target - type = dungeon - } - hidden_effect = { - scope:new_target = { - if = { - limit = { - any_close_or_extended_family_member = { - NOR = { - is_close_family_of = scope:imprisoner - scope:imprisoner = this - } - } - } - hidden_effect = { - every_close_or_extended_family_member = { - limit = { - NOR = { - is_close_family_of = scope:imprisoner - scope:imprisoner = this - } - } - add_opinion = { - target = scope:imprisoner - modifier = imprisoned_family_member - opinion = -15 - } - } - } - custom_tooltip = IMPRISONMENT_RELATIVES_EFFECT_DUNGEON - } - } - } - } - } - - imprison_hostage_tooltip_effect = { WHO = scope:new_target } - - hidden_effect = { - scope:imprisoner = { - if = { - limit = { exists = scope:disable_display_rightful_imprisonment_tooltip } - # No tooltip if we do this. - } - else_if = { - limit = { - exists = scope:recipient - has_imprisonment_reason = scope:new_target - } - custom_tooltip = IS_ALLOWED_TO_IMPRISON_DESC - } - else = { custom_tooltip = IS_ALLOWED_TO_IMPRISON_NO_RECIPIENT_DESC } - } - - scope:new_target = { - add_opinion = { - target = scope:imprisoner - modifier = imprisoned_me - } - } - - #Disband any scheme you have against them - scope:imprisoner = { - if = { - limit = { - any_scheme = { - scheme_target_character = scope:new_target - } - } - every_scheme = { - limit = { - scheme_target_character = scope:new_target - } - end_scheme = yes - } - } - } - - #Send break up event if they are your lover - scope:imprisoner = { - if = { - limit = { - has_relation_lover = scope:new_target - NOT = { has_relation_rival = scope:new_target } #To enable really strange love stories - } - scope:new_target = { - trigger_event = { - id = lover.0101 - days = { 14 30 } - } - } - } - } - - #Remove them as guardian/ward for any courtiers and give feedback about this - imprison_remove_ward_guardian_effect = { IMPRISONER = scope:imprisoner PRISONER = scope:new_target } - } - -} - -# A lite version of imprison_character_effect without opinion penalties or other consequences (as they were captured in war, not at your command) -prisoner_of_war_capture_effect = { - $TARGET$ = { save_temporary_scope_as = new_target } - $IMPRISONER$ = { save_temporary_scope_as = imprisoner } - - if = { - limit = { - scope:new_target = { - exists = liege - OR = { - is_playable_character = yes - is_close_or_extended_family_of = liege - is_spouse_of = liege - } - } - } - - scope:imprisoner = { - imprison = { - target = scope:new_target - type = house_arrest - } - } - } - else = { - scope:imprisoner = { - imprison = { - target = scope:new_target - type = dungeon - } - } - } - - imprison_hostage_tooltip_effect = { WHO = scope:new_target } -} - -#An effect that picks imprison_character_effect or rightfully_imprison_character_effect as punishment for a sexual relationship, good to not show tyranny tooltip if imprisonment reason hasn't been set yet. But this should NEVER be used if the imprisonment reason isn't going to be set by the same piece of content. -pick_imprisonment_effect_based_on_sexual_relation_effect = { - if = { - limit = { - $TARGET$ = { - sexual_activity_with_partner_is_criminal_in_faith_trigger = { - PARTNER = $PARTNER$ - FAITH = $IMPRISONER$.faith - } - } - } - rightfully_imprison_character_effect = { - TARGET = $TARGET$ - IMPRISONER = $IMPRISONER$ - } - } - else = { - imprison_character_effect = { - TARGET = $TARGET$ - IMPRISONER = $IMPRISONER$ - } - } -} - -prison_pet_death_effect = { - if = { - limit = { - var:prison_pet_variable = flag:rat - } - remove_character_modifier = prison_pet_rat_modifier - } - else_if = { - limit = { - var:prison_pet_variable = flag:stone - } - remove_character_modifier = prison_pet_stone_modifier - } - else_if = { - limit = { - var:prison_pet_variable = flag:spoon - } - remove_character_modifier = prison_pet_spoon_modifier - } - else_if = { - limit = { - var:prison_pet_variable = flag:cockroach - } - remove_character_modifier = prison_pet_cockroach_modifier - } - remove_variable = prison_pet_variable -} - -consume_all_criminal_reasons_effect = { - $LIEGE$ = { - if = { - limit = { - has_imprisonment_reason = $CRIMINAL$ - } - consume_imprisonment_reasons = $CRIMINAL$ - } - if = { - limit = { - has_banish_reason = $CRIMINAL$ - } - consume_banish_reasons = $CRIMINAL$ - } - if = { - limit = { - has_execute_reason = $CRIMINAL$ - } - consume_execute_reasons = $CRIMINAL$ - } - if = { - limit = { - has_revoke_title_reason = $CRIMINAL$ - } - consume_revoke_title_reason = $CRIMINAL$ - } - } -} - -escape_from_prison_effect = { - save_scope_as = escapee - play_music_cue = "mx_cue_sacredrite" - scope:imprisoner = { - save_scope_as = bg_override_char - if = { - limit = { - exists = capital_province - } - capital_province = { - save_scope_as = background_wilderness_scope - } - } - else = { - location = { - save_scope_as = background_wilderness_scope - } - } - if = { - limit = { - OR = { - has_revoke_title_reason = scope:escapee - has_banish_reason = scope:escapee - has_execute_reason = scope:escapee - } - } - add_opinion = { - target = scope:escapee - modifier = escaped_from_prison_crime - } - } - else = { - add_opinion = { - target = scope:escapee - modifier = escaped_from_prison_opinion - } - } - } - create_character_memory = { - type = escaped_from_prison_memory - - participants = { - imprisoner = scope:imprisoner - } - } - add_character_flag = { - flag = escaped_from_prison_flag - days = 1 - } - add_character_flag = { #To make sure you don't get spammed about the release - flag = block_for_prison_release_notification - days = 1 - } - release_from_prison = yes - random_dummy_gender_soldier_effect = { SCOPE_NAME = dummy_gender } - hidden_effect = { - remove_decision_cooldown = escape_from_prison_decision - } - if = { - limit = { has_character_modifier = allowed_to_go_outside } - remove_character_modifier = allowed_to_go_outside - } - if = { - limit = { has_character_modifier = moldy_gruel_diet } - remove_character_modifier = moldy_gruel_diet - } -} - -#Are you unjustly trying to imprison your bishop? tut-tut -imprison_court_chaplain_consequences_effect = { - if = { - limit = { - scope:actor = { NOT = { has_imprisonment_reason = scope:recipient } } - scope:recipient = { has_council_position = councillor_court_chaplain } - } - if = { #Can I fire them? - limit = { - scope:recipient = { can_be_fired_from_council_trigger = { COURT_OWNER = scope:actor } } - } - scope:actor = { fire_councillor = scope:recipient } - } - scope:actor = { - add_piety_level = -1 - } - if = { - limit = { - exists = scope:actor.faith.religious_head - } - scope:actor.faith.religious_head = { - add_opinion = { - target = scope:actor - modifier = respect_opinion - opinion = -30 - } - } - } - } -} - -#You're trying to imprison your HoF? Oh boy -imprison_HoF_consequences_effect = { - if = { - limit = { - scope:actor = { - NOT = { has_imprisonment_reason = scope:recipient } - exists = faith.religious_head - faith.religious_head = scope:recipient - } - } - scope:actor = { - add_piety_level = -1 - add_piety = medium_piety_loss - } - } -} - -#Add tyranny if you don't have a justifiable reason -imprison_tyranny_effect = { - - # Normalize scopes for tooltip loc, because there is no god nor consistency - if = { - limit = { - exists = scope:imprisoner - NOT = { exists = scope:actor } - } - scope:imprisoner = { save_scope_as = actor } - } - if = { - limit = { - exists = scope:actor - NOT = { exists = scope:imprisoner } - } - scope:actor = { save_scope_as = imprisoner } - } - if = { - limit = { - exists = scope:imprisonment_target - NOT = { exists = scope:recipient } - } - scope:imprisonment_target = { save_scope_as = recipient } - } - if = { - limit = { - exists = scope:recipient - NOT = { exists = scope:imprisonment_target } - } - scope:recipient = { save_scope_as = imprisonment_target } - } - - # Determine if tyrannical or not - # Should use strife - if = { - limit = { exists = scope:use_strife_not_tyranny } - # If you have revocation reason, we allow that. - if = { - limit = { has_imprisonment_reason = scope:recipient } - consume_imprisonment_reasons = scope:recipient - } - else = { change_strife_opinion = medium_strife_gain } - } - # Got good reason - else_if = { - limit = { - scope:actor = { has_imprisonment_reason = scope:recipient } - } - custom_tooltip = IS_ALLOWED_TO_IMPRISON_DESC - - } - # Is at war or edge-case pondering general imprisonment - else_if = { - limit = { - OR = { - NOT = { exists = scope:recipient } - scope:actor = { is_at_war_with = scope:recipient } - } - } - custom_tooltip = IS_ALLOWED_TO_IMPRISON_NO_RECIPIENT_DESC - } - - else = { - add_tyranny = imprisonment_tyranny_gain - if = { - limit = { - scope:recipient = { - is_landed = yes - is_alive = yes - } - } - scope:actor = { - if = { - limit = { - has_legitimacy = yes - this = top_liege - } - add_legitimacy = miniscule_legitimacy_loss - } - } - } - } -} - -imprison_remove_ward_guardian_effect = { - #Remove them as guardian/ward for any courtiers and give feedback about this - $PRISONER$ = { save_temporary_scope_as = imprisonment_target } - $IMPRISONER$ = { save_temporary_scope_as = imprisoner } - - scope:imprisoner ?= { - #Check for relations - if = { - limit = { - exists = scope:imprisonment_target - any_courtier = { - has_relation_guardian = scope:imprisonment_target - has_relation_ward = scope:imprisonment_target - } - } - #Save all those with a ward/guardian relation to the person being imprisoned - every_courtier = { - limit = { - has_relation_guardian = scope:imprisonment_target - has_relation_ward = scope:imprisonment_target - } - add_to_list = ward_or_guardian_list - } - # Send messages to people that need to know that the ward/guardian relationship is over - every_in_list = { - list = ward_or_guardian_list - save_scope_as = their_ward_or_guardian #saved for appropriate portrait in message - - send_interface_message = { - type = event_childhood_neutral - title = remove_guardian_interaction_notification - left_icon = scope:imprisonment_target - right_icon = scope:their_ward_or_guardian - - scope:imprisonment_target = { - send_interface_message = { - type = event_childhood_neutral - title = remove_guardian_interaction_notification - left_icon = scope:imprisonment_target - right_icon = scope:their_ward_or_guardian - #Remove appropriate relationship - scope:their_ward_or_guardian = { - if = { - limit = { has_relation_guardian = scope:imprisonment_target } - remove_guardian_effect = { - GUARDIAN = scope:imprisonment_target - WARD = scope:their_ward_or_guardian - RETURN_WARD = yes - HIDE_OPINION = no - } - } - else = { - remove_guardian_effect = { - GUARDIAN = scope:their_ward_or_guardian - WARD = scope:imprisonment_target - RETURN_WARD = yes - HIDE_OPINION = no - } - } - } - } - } - } - } - } - } -} - -# If they recently revoked your title, or asked for your excommunication, they become your rival -imprison_attempt_escalates_rivalry_effect = { - scope:recipient = { - if = { - limit = { - OR = { - has_opinion_modifier = { - target = scope:actor - modifier = revoked_title - } - AND = { - exists = var:requested_my_excommunication - var:requested_my_excommunication = scope:actor - } - } - NOT = { has_relation_rival = scope:actor } - } - hidden_effect = { - if = { - limit = { has_relation_potential_rival = scope:actor } - remove_relation_potential_rival = scope:actor - } - } - set_relation_rival = scope:actor - } - else = { - hidden_effect = { - progress_towards_rival_effect = { - CHARACTER = scope:actor - REASON = rival_imprisoned - OPINION = 0 - } - } - } - } -} - -diarch_imprison_general_accept_effect = { - illegal_imprisonment_dread_effect = yes - imprison_HoF_consequences_effect = yes - # Sort stress. - scope:actor = { - # Stress. - if = { - limit = { has_imprisonment_reason = scope:recipient } - stress_impact = { - compassionate = minor_stress_impact_gain - forgiving = minor_stress_impact_gain - } - } - else = { - stress_impact = { - just = medium_stress_impact_gain - compassionate = medium_stress_impact_gain - } - } - tgp_activate_catalyst_against_hegemon_effect = { - HEGEMON = scope:actor.top_liege - CATALYST = catalyst_diarch_mandate - } - } - # Imprison the actual character. - imprison_character_effect = { - TARGET = scope:recipient - IMPRISONER = scope:actor - } - # If they recently revoked your title, or asked for your excommunication, they become your rival - imprison_attempt_escalates_rivalry_effect = yes - # Remove hostility flag. - if = { - limit = { - scope:actor = { has_character_flag = flag_hostile_actions_disabled_delay } - } - scope:actor = { remove_character_flag = flag_hostile_actions_disabled_delay } - } -} diff --git a/N3OW/common/scripted_effects/00_realm_effects.txt b/N3OW/common/scripted_effects/00_realm_effects.txt deleted file mode 100644 index 7ac73763..00000000 --- a/N3OW/common/scripted_effects/00_realm_effects.txt +++ /dev/null @@ -1,211 +0,0 @@ - -##################################################################### -# EFFECT LIST -##################################################################### - -increase_crown_authority_effect = { - if = { - limit = { has_realm_law_flag = uses_crown_authority } - #Laws - if = { - limit = { has_realm_law = crown_authority_0 } - add_realm_law = crown_authority_1 - } - else_if = { - limit = { has_realm_law = crown_authority_1 } - add_realm_law = crown_authority_2 - } - else_if = { - limit = { has_realm_law = crown_authority_2 } - add_realm_law = crown_authority_3 - } - } -} - -decrease_crown_authority_effect = { - if = { - limit = { has_realm_law_flag = uses_crown_authority } - #Laws - if = { - limit = { has_realm_law = crown_authority_3 } - add_realm_law = crown_authority_2 - } - else_if = { - limit = { has_realm_law = crown_authority_2 } - add_realm_law = crown_authority_1 - } - else_if = { - limit = { has_realm_law = crown_authority_1 } - add_realm_law = crown_authority_0 - } - } -} - -increase_tribal_authority_effect = { - if = { - limit = { has_realm_law_flag = uses_tribal_authority } - #Laws - if = { - limit = { has_realm_law = tribal_authority_0 } - add_realm_law = tribal_authority_1 - } - else_if = { - limit = { has_realm_law = tribal_authority_1 } - add_realm_law = tribal_authority_2 - } - else_if = { - limit = { has_realm_law = tribal_authority_2 } - add_realm_law = tribal_authority_3 - } - } -} - -decrease_tribal_authority_effect = { - if = { - limit = { has_realm_law_flag = uses_tribal_authority } - #Laws - if = { - limit = { has_realm_law = tribal_authority_3 } - add_realm_law = tribal_authority_2 - } - else_if = { - limit = { has_realm_law = tribal_authority_2 } - add_realm_law = tribal_authority_1 - } - else_if = { - limit = { has_realm_law = tribal_authority_1 } - add_realm_law = tribal_authority_0 - } - } -} - -increase_imperial_bureaucracy_effect = { - if = { - limit = { has_realm_law_flag = uses_imperial_bureaucracy } - #Laws - if = { - limit = { has_realm_law = imperial_bureaucracy_0 } - add_realm_law = imperial_bureaucracy_1 - } - else_if = { - limit = { has_realm_law = imperial_bureaucracy_1 } - add_realm_law = imperial_bureaucracy_2 - } - else_if = { - limit = { has_realm_law = imperial_bureaucracy_2 } - add_realm_law = imperial_bureaucracy_3 - } - } -} - -decrease_imperial_bureaucracy_effect = { - if = { - limit = { has_realm_law_flag = uses_imperial_bureaucracy } - #Laws - if = { - limit = { has_realm_law = imperial_bureaucracy_3 } - add_realm_law = imperial_bureaucracy_2 - } - else_if = { - limit = { has_realm_law = imperial_bureaucracy_2 } - add_realm_law = imperial_bureaucracy_1 - } - else_if = { - limit = { has_realm_law = imperial_bureaucracy_1 } - add_realm_law = imperial_bureaucracy_0 - } - } -} - -# We use this rather than doing it straight in the effect block for better mod compatibility, since this can be overridden without adjusting the rest of the laws file. -remove_law_related_modifiers_effect = { - # We call out some modifiers because we want the player to see what they're losing, but it's fine to hide future modifiers ye may add in a hidden_effect if they're minor. - if = { - limit = { has_character_modifier = liege_authority_boost_has_scapegoat_modifier } - remove_character_modifier = liege_authority_boost_has_scapegoat_modifier - } -} - -remove_vassal_directives = { - remove_character_flag = vassal_directive_improve_development - remove_character_flag = vassal_directive_train_commanders - remove_character_flag = vassal_directive_build_maa - remove_character_flag = vassal_directive_convert_faith - remove_character_flag = vassal_directive_convert_culture - remove_character_flag = vassal_directive_improve_cultural_acceptance - remove_character_flag = vassal_directive_building_focus_fortification - remove_character_flag = vassal_directive_building_focus_military - remove_character_flag = vassal_directive_building_focus_economy - remove_character_flag = vassal_directive_manage_fertility - remove_character_flag = vassal_directive_explore_cultures - remove_character_flag = vassal_directive_raid_innovation_intent - remove_character_flag = vassal_directive_raid_herd_intent -} - -increase_nomadic_authority_effect = { - if = { - limit = { has_realm_law_flag = uses_nomadic_authority } - #Laws - if = { - limit = { has_realm_law = nomadic_authority_1 } - add_realm_law = nomadic_authority_2 - } - else_if = { - limit = { has_realm_law = nomadic_authority_2 } - add_realm_law = nomadic_authority_3 - } - else_if = { - limit = { has_realm_law = nomadic_authority_3 } - add_realm_law = nomadic_authority_4 - } - } -} - -decrease_nomadic_authority_effect = { - if = { - limit = { has_realm_law_flag = uses_nomadic_authority } - #Laws - if = { - limit = { has_realm_law = nomadic_authority_4 } - add_realm_law = nomadic_authority_3 - } - else_if = { - limit = { has_realm_law = nomadic_authority_3 } - add_realm_law = nomadic_authority_2 - } - else_if = { - limit = { has_realm_law = nomadic_authority_2 } - add_realm_law = nomadic_authority_1 - } - } -} - -# Should be used in the county title scope -add_law_of_the_land_title_succession_law_if_appropriate_effect = { - save_scope_as = county_title - if = { - limit = { - #tier = tier_county # Commented out for performance reasons, comment back in if this effect is used outside of on_title_gained - NOT = { has_title_law = law_of_the_land_succession_law } - is_noble_family_title = no - title_province ?= { - holding_type = { - has_required_heir_governments = yes - NOT = { - any_required_heir_government_type = { - this = scope:county_title.holder.government_type - } - } - } - } - } - holder = { - send_interface_toast = { - title = succession_law_changed - left_icon = scope:county_title - - scope:county_title = { add_title_law = law_of_the_land_succession_law } - } - } - } -} diff --git a/N3OW/common/scripted_effects/00_regional_scripted_effects.txt b/N3OW/common/scripted_effects/00_regional_scripted_effects.txt deleted file mode 100644 index 3b97b921..00000000 --- a/N3OW/common/scripted_effects/00_regional_scripted_effects.txt +++ /dev/null @@ -1,871 +0,0 @@ -#For use with HornedMythicalCreature / call this effect (set_up_horned_mythical_creature_effect = yes) in the line before creating the artifact -#Use this in the artifact's name/description in the loc-file [ROOT.Char.Custom('HornedMythicalCreature')] -#Remember to clear the var:horned_mythical_creature in your after = { ... } -set_up_horned_mythical_creature_effect = { - random_list = { - 50 = { - set_variable = { - name = horned_mythical_creature - value = flag:tarasque - } - } - 50 = { - set_variable = { - name = horned_mythical_creature - value = flag:indrik - } - } - 50 = { - set_variable = { - name = horned_mythical_creature - value = flag:ophiotaurus - } - } - 50 = { - set_variable = { - name = horned_mythical_creature - value = flag:monocerus - } - } - 50 = { - set_variable = { - name = horned_mythical_creature - value = flag:centicore - } - } - 50 = { - set_variable = { - name = horned_mythical_creature - value = flag:erchitu - } - } - 50 = { - set_variable = { - name = horned_mythical_creature - value = flag:hadhayosh - } - } - 50 = { - set_variable = { - name = horned_mythical_creature - value = flag:bulgu - } - } - 50 = { - set_variable = { - name = horned_mythical_creature - value = flag:catoblepas - } - } - 5 = { - trigger = { - location = { geographical_region = custom_iceland } - } - set_variable = { - name = horned_mythical_creature - value = flag:keewakw - } - } - - } -} - -#For use with RegionalMythicalCreature / call this effect (set_up_regional_mythical_creature_effect = yes) in the line before creating the artifact -#Use this in the artifact's name/description in the loc-file [ROOT.Char.Custom('RegionalMythicalCreature')] /and/ [ROOT.Char.Custom('RegionalMythicalCreatureLower')] -#Remember to clear the var:regional_mythical_creature_trinket in your after = { ... } -set_up_regional_mythical_creature_effect = { - if = { - #Britannia - limit = { - location = { geographical_region = world_europe_west_britannia } - NOT = { exists = var:regional_mythical_creature_trinket } - } - random_list = { - 50 = { - set_variable = { - name = regional_mythical_creature_trinket - value = flag:water_leper - } - } - 50 = { - set_variable = { - name = regional_mythical_creature_trinket - value = flag:fomorian - } - } - 50 = { - set_variable = { - name = regional_mythical_creature_trinket - value = flag:fachan - } - } - } - } - else_if = { - #West Europe - limit = { - location = { geographical_region = world_europe_west } - NOT = { exists = var:regional_mythical_creature_trinket } - } - random_list = { - 50 = { - set_variable = { - name = regional_mythical_creature_trinket - value = flag:cockatrice - } - } - 50 = { - set_variable = { - name = regional_mythical_creature_trinket - value = flag:lou_carcolh - } - } - 50 = { - set_variable = { - name = regional_mythical_creature_trinket - value = flag:myrmecoleon - } - } - } - } - else_if = { - #North Europe - limit = { - location = { geographical_region = world_europe_north } - NOT = { exists = var:regional_mythical_creature_trinket } - } - random_list = { - 50 = { - set_variable = { - name = regional_mythical_creature_trinket - value = flag:antero_vipunen - } - } - 50 = { - set_variable = { - name = regional_mythical_creature_trinket - value = flag:tjelvar - } - } - 50 = { - set_variable = { - name = regional_mythical_creature_trinket - value = flag:fin - } - } - 50 = { - trigger = { - location = { geographical_region = custom_gotland } - } - set_variable = { - name = regional_mythical_creature_trinket - value = flag:bysn - } - } - 50 = { - trigger = { - location = { geographical_region = custom_gotland } - } - set_variable = { - name = regional_mythical_creature_trinket - value = flag:disma - } - } - } - } - else_if = { - #South Europe - limit = { - location = { geographical_region = world_europe_south } - NOT = { exists = var:regional_mythical_creature_trinket } - } - random_list = { - 50 = { - set_variable = { - name = regional_mythical_creature_trinket - value = flag:basilisk - } - } - 50 = { - set_variable = { - name = regional_mythical_creature_trinket - value = flag:lhombri - } - } - 50 = { - set_variable = { - name = regional_mythical_creature_trinket - value = flag:argus_panoptes - } - } - } - } - else_if = { - #East Europe - limit = { - location = { geographical_region = world_europe_east } - NOT = { exists = var:regional_mythical_creature_trinket } - } - random_list = { - 50 = { - set_variable = { - name = regional_mythical_creature_trinket - value = flag:baba_yaga - } - } - 50 = { - set_variable = { - name = regional_mythical_creature_trinket - value = flag:psoglav - } - } - 50 = { - set_variable = { - name = regional_mythical_creature_trinket - value = flag:sirin - } - } - } - } - else_if = { - #West Africa - limit = { - location = { geographical_region = world_africa_west } - NOT = { exists = var:regional_mythical_creature_trinket } - } - random_list = { - 50 = { - set_variable = { - name = regional_mythical_creature_trinket - value = flag:mami_wata - } - } - 50 = { - set_variable = { - name = regional_mythical_creature_trinket - value = flag:dodo - } - } - 50 = { - set_variable = { - name = regional_mythical_creature_trinket - value = flag:utelif - } - } - } - } - else_if = { - #East Africa - limit = { - location = { geographical_region = world_africa_east } - NOT = { exists = var:regional_mythical_creature_trinket } - } - random_list = { - 50 = { - set_variable = { - name = regional_mythical_creature_trinket - value = flag:liqimsa - } - } - 50 = { - set_variable = { - name = regional_mythical_creature_trinket - value = flag:bulgu - } - } - 50 = { - set_variable = { - name = regional_mythical_creature_trinket - value = flag:opimachus - } - } - } - } - else_if = { - #Middle East - limit = { - location = { geographical_region = world_middle_east } - NOT = { exists = var:regional_mythical_creature_trinket } - } - random_list = { - 50 = { - set_variable = { - name = regional_mythical_creature_trinket - value = flag:manticore - } - } - 50 = { - set_variable = { - name = regional_mythical_creature_trinket - value = flag:behemoth - } - } - 50 = { - set_variable = { - name = regional_mythical_creature_trinket - value = flag:humbaba - } - } - } - } - else_if = { - #India - limit = { - location = { geographical_region = world_india } - NOT = { exists = var:regional_mythical_creature_trinket } - } - random_list = { - 50 = { - set_variable = { - name = regional_mythical_creature_trinket - value = flag:makara - } - } - 50 = { - set_variable = { - name = regional_mythical_creature_trinket - value = flag:yali - } - } - 50 = { - set_variable = { - name = regional_mythical_creature_trinket - value = flag:rakshasha - } - } - } - } - else_if = { - #East Asia - limit = { - location = { - OR = { - geographical_region = world_tibet - geographical_region = world_asia_china - geographical_region = world_asia_japan - geographical_region = world_asia_korea - geographical_region = world_asia_southeast - } - } - NOT = { exists = var:regional_mythical_creature_trinket } - } - random_list = { - 50 = { - set_variable = { - name = regional_mythical_creature_trinket - value = flag:manaul - } - } - 50 = { - set_variable = { - name = regional_mythical_creature_trinket - value = flag:bashee - } - } - 50 = { - set_variable = { - name = regional_mythical_creature_trinket - value = flag:camphruch - } - } - 50 = { - set_variable = { - name = regional_mythical_creature_trinket - value = flag:qilin - } - } - 50 = { - set_variable = { - name = regional_mythical_creature_trinket - value = flag:tengu - } - } - 50 = { - set_variable = { - name = regional_mythical_creature_trinket - value = flag:naga - } - } - } - } - else_if = { - #West Steppe - limit = { - location = { geographical_region = world_steppe_west } - NOT = { exists = var:regional_mythical_creature_trinket } - } - random_list = { - 50 = { - set_variable = { - name = regional_mythical_creature_trinket - value = flag:aptah_baga #Legendary two-headed frog (from Sakha) - } - } - 50 = { - set_variable = { - name = regional_mythical_creature_trinket - value = flag:xullyukuns #Supernatural water spirit (from Sakha) - } - } - 50 = { - set_variable = { - name = regional_mythical_creature_trinket - value = flag:zilant #Dragon/wyvern-like creature - } - } - } - } - else_if = { - #East Steppe - limit = { - location = { geographical_region = world_steppe_east } - NOT = { exists = var:regional_mythical_creature_trinket } - } - random_list = { - 50 = { - set_variable = { - name = regional_mythical_creature_trinket - value = flag:yelbeghen #Seven-headed giant/dragon - } - } - 50 = { - set_variable = { - name = regional_mythical_creature_trinket - value = flag:tepegoz #Fleshy giant-like cyclops - } - } - 50 = { - set_variable = { - name = regional_mythical_creature_trinket - value = flag:archura #Deceitful forest demon - } - } - } - } - #Fallback - else = { - random_list = { - 100 = { - set_variable = { - name = regional_mythical_creature_trinket - value = flag:dragon - } - } - 5 = { - set_variable = { - name = regional_mythical_creature_trinket - value = flag:cipactli - } - } - } - } -} - -select_local_farm_animal_effect = { - random_list = { - 50 = { - set_variable = { - name = local_farm_animal - value = flag:goat - } - } - 50 = { - set_variable = { - name = local_farm_animal - value = flag:chicken - } - } - 50 = { - modifier = { - factor = 0 - faith = { religion_tag = hinduism_religion } - } - set_variable = { - name = local_farm_animal - value = flag:cow - } - } - 50 = { - set_variable = { - name = local_farm_animal - value = flag:sheep - } - } - 50 = { - modifier = { - factor = 0 - faith = { - OR = { - religion_tag = islam_religion - religion_tag = judaism_religion - } - } - } - set_variable = { - name = local_farm_animal - value = flag:pig - } - } - 50 = { - modifier = { - factor = 0 - location = { - NOR = { - geographical_region = world_tibet - geographical_region = world_asia_china - geographical_region = world_asia_korea - geographical_region = world_asia_southeast - geographical_region = ghw_region_mongolia - } - } - } - set_variable = { - name = local_farm_animal - value = flag:yak - } - } - } -} - -# Plague effect, get a regionally appropriate faith for people to scapegoat -select_scapegoat_faith_effect = { - random_list = { - 100 = { # Courtier in your realm with hostile faith - trigger = { - any_courtier_or_guest = { - save_temporary_scope_as = courtier_to_check - root.faith = { - faith_hostility_level = { - target = scope:courtier_to_check.faith - value >= faith_hostile_level - } - } - } - } - random_courtier_or_guest = { - limit = { - save_temporary_scope_as = courtier_to_check - root.faith = { - faith_hostility_level = { - target = scope:courtier_to_check.faith - value >= faith_hostile_level - } - } - } - faith = { save_scope_as = faith_to_blame } - } - } - 100 = { # Vassal in your realm with hostile faith - trigger = { - top_liege ?= { - any_vassal_or_below = { - save_temporary_scope_as = courtier_to_check - root.faith = { - faith_hostility_level = { - target = scope:courtier_to_check.faith - value >= faith_hostile_level - } - } - } - } - } - top_liege = { - random_vassal_or_below = { - limit = { - save_temporary_scope_as = courtier_to_check - root.faith = { - faith_hostility_level = { - target = scope:courtier_to_check.faith - value >= faith_hostile_level - } - } - } - faith = { save_scope_as = faith_to_blame } - } - } - } - 100 = { # Neighbouring hostile faith - trigger = { - any_neighboring_and_across_water_top_liege_realm_owner = { - any_sub_realm_county = { - save_temporary_scope_as = county_to_check - root.faith = { - faith_hostility_level = { - target = scope:county_to_check.faith - value >= faith_hostile_level - } - } - } - } - } - random_neighboring_and_across_water_top_liege_realm_owner = { - limit = { - any_sub_realm_county = { - save_temporary_scope_as = county_to_check - root.faith = { - faith_hostility_level = { - target = scope:county_to_check.faith - value >= faith_hostile_level - } - } - } - } - random_sub_realm_county = { - limit = { - save_temporary_scope_as = county_to_check - root.faith = { - faith_hostility_level = { - target = scope:county_to_check.faith - value >= faith_hostile_level - } - } - } - faith = { save_scope_as = faith_to_blame } - } - } - } - 10 = { # Regional, fallback - random_list = { - 1000 = { # Judaism - trigger = { - capital_province ?= { - OR = { - geographical_region = world_europe - geographical_region = world_asia_minor - geographical_region = world_middle_east - geographical_region = world_africa_east - geographical_region = world_africa_north - } - } - # Jewish faiths shouldn't blame themselves - NOT = { root.faith.religion = religion:judaism_religion } - # Account for Syncretics and the like - root.faith = { - NOT = { has_doctrine_parameter = jewish_syncretic_actor_opinion_active } - } - } - religion:judaism_religion = { - random_faith = { - limit = { - NOR = { # Regional faiths should be excluded - this = faith:malabarism - this = faith:kabarism - } - } - save_scope_as = faith_to_blame - } - } - } - 1000 = { # Islam - trigger = { - capital_province ?= { - OR = { - geographical_region = world_middle_east # This would only apply for non-Islamic middle-easterners - geographical_region = world_india - geographical_region = world_africa - geographical_region = world_steppe - geographical_region = world_asia_minor - geographical_region = world_europe_west_iberia - geographical_region = world_africa_east - geographical_region = world_africa_north - geographical_region = world_asia_china - geographical_region = world_asia_southeast - } - } - NOT = { root.faith.religion = religion:islam_religion } - root.faith = { - NOT = { has_doctrine_parameter = islamic_syncretic_actor_opinion_active } - } - } - religion:islam_religion = { - random_faith = { - save_scope_as = faith_to_blame - } - } - } - 1000 = { # Christianity - trigger = { - capital_province ?= { - OR = { - geographical_region = world_europe - geographical_region = world_india - geographical_region = world_steppe - geographical_region = world_asia_minor - geographical_region = world_tibet - geographical_region = world_middle_east - geographical_region = world_africa_east - geographical_region = world_africa_north - geographical_region = world_asia_china - } - } - NOT = { root.faith.religion = religion:christianity_religion } - root.faith = { - NOT = { has_doctrine_parameter = christian_syncretic_actor_opinion_active } - } - } - religion:christianity_religion = { - if = { # Exclude Eastern Christians for Europe - limit = { - root = { - capital_province = { - OR = { - geographical_region = world_europe - geographical_region = world_asia_minor - } - } - } - } - random_faith = { - limit = { - NOT = { has_doctrine_parameter = eastern_syncretic_actor_opinion_active } - } - save_scope_as = faith_to_blame - } - } - else = { # Exclude non-Eastern Christians for Asia - random_faith = { - limit = { - has_doctrine_parameter = eastern_syncretic_actor_opinion_active - } - save_scope_as = faith_to_blame - } - } - } - } - 1000 = { # Jainism - trigger = { - capital_province ?= { - OR = { - geographical_region = world_india - geographical_region = world_burma - geographical_region = world_asia_china - geographical_region = world_asia_korea - geographical_region = world_asia_southeast - } - } - NOT = { root.faith.religion = religion:jainism_religion } - } - religion:jainism_religion = { - random_faith = { - save_scope_as = faith_to_blame - } - } - } - 1000 = { # Zoroastrianism - trigger = { - capital_province ?= { - OR = { - geographical_region = world_india - geographical_region = world_middle_east_persia - geographical_region = world_asia_china - geographical_region = world_asia_southeast - } - } - NOT = { root.faith.religion = religion:zoroastrianism_religion } - } - religion:zoroastrianism_religion = { - random_faith = { - save_scope_as = faith_to_blame - } - } - } - 1000 = { # Buddhism (Non-Buddhist Tibetans) - trigger = { - capital_province ?= { - OR = { - geographical_region = world_tibet - geographical_region = world_burma # In case Burma ceases to be Buddhist - geographical_region = world_asia_china # for non buddhist chinese et al - geographical_region = world_asia_japan - geographical_region = world_asia_korea - geographical_region = world_asia_southeast - } - } - NOT = { root.faith.religion = religion:buddhism_religion } - } - religion:buddhism_religion = { - random_faith = { - save_scope_as = faith_to_blame - } - } - } - 1000 = { # Bon (Non-Bon Tibetans) - trigger = { - capital_province ?= { - geographical_region = world_tibet - geographical_region = world_asia_china - } - NOT = { root.faith.religion = religion:bon_religion } - } - religion:bon_religion = { - random_faith = { - save_scope_as = faith_to_blame - } - } - } - 1000 = { # West African paganism - trigger = { - capital_province ?= { - geographical_region = world_africa_west - } - NOT = { root.faith.religion = religion:west_african_religion } - } - religion:west_african_religion = { - random_faith = { - save_scope_as = faith_to_blame - } - } - } - 1000 = { # West African paganism - trigger = { - capital_province ?= { - geographical_region = world_africa_west - } - NOT = { root.faith.religion = religion:west_african_bori_religion } - } - religion:west_african_bori_religion = { - random_faith = { - save_scope_as = faith_to_blame - } - } - } - 1000 = { # West African paganism - trigger = { - capital_province ?= { - geographical_region = world_africa_west - } - NOT = { root.faith.religion = religion:west_african_orisha_religion } - } - religion:west_african_orisha_religion = { - random_faith = { - save_scope_as = faith_to_blame - } - } - } - 1000 = { # West African paganism - trigger = { - capital_province ?= { - geographical_region = world_africa_west - } - NOT = { root.faith.religion = religion:west_african_roog_religion } - } - religion:west_african_roog_religion = { - random_faith = { - save_scope_as = faith_to_blame - } - } - } - 1 = { # Generic Paganism, fallback - trigger = { - NOT = { root.faith.religion = religion:paganism_religion } - } - religion:paganism_religion = { - random_faith = { - save_scope_as = faith_to_blame - } - } - } - } - } - } -} diff --git a/N3OW/common/scripted_effects/00_relation_effects.txt b/N3OW/common/scripted_effects/00_relation_effects.txt deleted file mode 100644 index 383b1acf..00000000 --- a/N3OW/common/scripted_effects/00_relation_effects.txt +++ /dev/null @@ -1,1337 +0,0 @@ - -##################################################################### -# EFFECT LIST -##################################################################### -# !!! Remember to add all new effects with a short description here !!! - -#progress_towards_friend_effect - Sets potential friend + opinion or upgrades potential friend to full friend -#progress_towards_rival_effect - Sets potential rival + opinion or upgrades potential rival to full rival -#progress_towards_lover_effect - Sets potential lover + opinion or upgrades potential lover to full lover - -#get_characters_of_major_interest_effect -#get_characters_of_minor_interest_effect -#get_characters_of_interest_effect - -#get_potential_enemies_effect -#get_random_potential_enemy_effect - -#progress_towards_friend_ai_effect - Progresses to friend if the target is an AI -#progress_towards_rival_ai_effect - Progresses to rival if the target is an AI -#progress_towards_lover_ai_effect - Progresses to lover if the target is an AI - -##################################################################### -# EFFECTS -##################################################################### - -### RELATION PROGRESS EFFECTS ### - -# Needs CHARACTER and OPINION value, use 0 for no opinion change and default__opinion script value for the normal amount - -#Sets potential friend + opinion or upgrades potential friend to full friend -progress_towards_friend_effect = { - #If potential friend, set friend! - if = { - limit = { - has_relation_potential_friend = $CHARACTER$ - can_set_relation_friend_trigger = { CHARACTER = $CHARACTER$ } - } - if = { - limit = { - exists = scope:relationship_reason_involved_character - exists = scope:relationship_reason_province - } - set_relation_friend = { - reason = $REASON$ - target = $CHARACTER$ - involved_character = scope:relationship_reason_involved_character - province = scope:relationship_reason_province - } - if = { - limit = { - this.involved_activity ?= { - has_activity_type = activity_playdate - } - } - this.involved_activity ?= { - add_activity_log_entry = { - key = activity_generic_friend_log - tags = { good } - score = 10 - character = prev - target = $CHARACTER$ - } - } - } - } - else_if = { - limit = { - exists = scope:relationship_reason_province - } - set_relation_friend = { - reason = $REASON$ - target = $CHARACTER$ - province = scope:relationship_reason_province - } - if = { - limit = { - this.involved_activity ?= { - has_activity_type = activity_playdate - } - } - this.involved_activity ?= { - add_activity_log_entry = { - key = activity_generic_friend_log - tags = { good } - score = 10 - character = prev - target = $CHARACTER$ - } - } - } - } - else_if = { - limit = { - exists = scope:relationship_reason_involved_character - } - set_relation_friend = { - reason = $REASON$ - target = $CHARACTER$ - involved_character = scope:relationship_reason_involved_character - } - if = { - limit = { - this.involved_activity ?= { - has_activity_type = activity_playdate - } - } - this.involved_activity ?= { - add_activity_log_entry = { - key = activity_generic_friend_log - tags = { good } - score = 10 - character = prev - target = $CHARACTER$ - } - } - } - } - else = { - set_relation_friend = { - reason = $REASON$ - target = $CHARACTER$ - } - if = { - limit = { - this.involved_activity ?= { - has_activity_type = activity_playdate - } - } - this.involved_activity ?= { - add_activity_log_entry = { - key = activity_generic_friend_log - tags = { good } - score = 10 - character = prev - target = $CHARACTER$ - } - } - } - } - # Complete activity intent if relevant - if = { - limit = { - exists = involved_activity - has_activity_intent = befriend_attendee_intent - intent_target ?= $CHARACTER$ - intent_target.involved_activity ?= this.involved_activity - } - save_scope_as = intent_completer - send_interface_toast = { - title = activity_intent_complete_toast - left_icon = $CHARACTER$ - complete_activity_intent = yes - } - } - } - # If not... - else = { - # ... set potential relation if we're not already friends! - if = { - limit = { - can_set_relation_potential_friend_trigger = { CHARACTER = $CHARACTER$ } - trigger_if = { - limit = { - is_ai = yes - $CHARACTER$ = { is_ai = yes } - } - $CHARACTER$ = { - opinion = { - target = prev - value >= -25 - } - } - } - trigger_else = { - always = yes - } - } - set_relation_potential_friend = $CHARACTER$ - } - - # ... add opinion if we should! - save_temporary_scope_value_as = { - name = friend_opinion - value = $OPINION$ - } - if = { - limit = { NOT = { scope:friend_opinion = 0 } } - reverse_add_opinion = { - target = $CHARACTER$ - modifier = friendliness_opinion - opinion = scope:friend_opinion - } - hidden_effect = { - add_opinion = { - target = $CHARACTER$ - modifier = friendliness_opinion - opinion = scope:friend_opinion - } - } - } - } -} - -#Sets potential rival + opinion or upgrades potential rival to full rival -progress_towards_rival_effect = { - # Do we merit an actual rivalry? - if = { - limit = { - # We don't care between low-tier chars. - NOT = { - $CHARACTER$ = { highest_held_title_tier <= tier_barony } - } - # Are they low-tier themselves? - highest_held_title_tier <= tier_barony - # If they are then they must... - NOR = { - # ... be related to the target... - is_close_or_extended_family_of = $CHARACTER$ - is_consort_of = $CHARACTER$ - # ... or be heir to someone within social spitting distance of the target. - any_heir_title = { - tier >= { - value = $CHARACTER$.highest_held_title_tier - # So if they're feuding with an emperor, then they must be heir to at least a duchy. - subtract = 2 - } - } - } - } - # Now, set grudge if we could already set it. - if = { - limit = { - NOT = { has_relation_grudge = $CHARACTER$ } - } - if = { - limit = { - exists = scope:relationship_reason_involved_character - exists = scope:relationship_reason_province - } - set_relation_grudge = { - reason = $REASON$ - target = $CHARACTER$ - involved_character = scope:relationship_reason_involved_character - province = scope:relationship_reason_province - } - } - else_if = { - limit = { - exists = scope:relationship_reason_province - } - set_relation_grudge = { - reason = $REASON$ - target = $CHARACTER$ - province = scope:relationship_reason_province - } - } - else_if = { - limit = { - exists = scope:relationship_reason_involved_character - } - set_relation_grudge = { - reason = $REASON$ - target = $CHARACTER$ - involved_character = scope:relationship_reason_involved_character - } - } - else = { - set_relation_grudge = { - reason = $REASON$ - target = $CHARACTER$ - } - } - } - # Otherwise, increment raw opinion. - else = { - add_opinion = { - target = $CHARACTER$ - modifier = grudge_opinion - opinion = -20 - } - } - } - #If potential rival, set rival! - else_if = { - limit = { - has_relation_potential_rival = $CHARACTER$ - can_set_relation_rival_trigger = { CHARACTER = $CHARACTER$ } - } - if = { - limit = { - exists = scope:relationship_reason_involved_character - exists = scope:relationship_reason_province - } - set_relation_rival = { - reason = $REASON$ - target = $CHARACTER$ - involved_character = scope:relationship_reason_involved_character - province = scope:relationship_reason_province - } - if = { - limit = { - this.involved_activity ?= { - has_activity_type = activity_playdate - } - } - this.involved_activity ?= { - add_activity_log_entry = { - key = activity_generic_rival_log - tags = { bad } - score = 10 - character = prev - target = $CHARACTER$ - } - } - } - } - else_if = { - limit = { - exists = scope:relationship_reason_province - } - set_relation_rival = { - reason = $REASON$ - target = $CHARACTER$ - province = scope:relationship_reason_province - } - if = { - limit = { - this.involved_activity ?= { - has_activity_type = activity_playdate - } - } - this.involved_activity ?= { - add_activity_log_entry = { - key = activity_generic_rival_log - tags = { bad } - score = 10 - character = prev - target = $CHARACTER$ - } - } - } - } - else_if = { - limit = { - exists = scope:relationship_reason_involved_character - } - set_relation_rival = { - reason = $REASON$ - target = $CHARACTER$ - involved_character = scope:relationship_reason_involved_character - } - if = { - limit = { - this.involved_activity ?= { - has_activity_type = activity_playdate - } - } - this.involved_activity ?= { - add_activity_log_entry = { - key = activity_generic_rival_log - tags = { bad } - score = 10 - character = prev - target = $CHARACTER$ - } - } - } - } - else = { - set_relation_rival = { - reason = $REASON$ - target = $CHARACTER$ - } - if = { - limit = { - this.involved_activity ?= { - has_activity_type = activity_playdate - } - } - this.involved_activity ?= { - add_activity_log_entry = { - key = activity_generic_rival_log - tags = { bad } - score = 10 - character = prev - target = $CHARACTER$ - } - } - } - } - } - # If not... - else = { - # ... set potential relation if we're not already rivals! - if = { - limit = { can_set_relation_potential_rival_trigger = { CHARACTER = $CHARACTER$ } } - set_relation_potential_rival = $CHARACTER$ - } - - # ... add opinion if we should! - save_temporary_scope_value_as = { - name = rival_opinion - value = $OPINION$ - } - if = { - limit = { NOT = { scope:rival_opinion = 0 } } - if = { - limit = { - $CHARACTER$ = { is_ai = yes } - } - reverse_add_opinion = { - target = $CHARACTER$ - modifier = hate_opinion - opinion = scope:rival_opinion - } - } - add_opinion = { - target = $CHARACTER$ - modifier = hate_opinion - opinion = scope:rival_opinion - } - } - } -} -# Please use this one with care: players should never auto-upgrade to nemesis if we can help it, this is mostly for the AI. -progress_towards_nemesis_effect = { - if = { - limit = { - has_relation_rival = $CHARACTER$ - can_set_relation_nemesis_trigger = { CHARACTER = $CHARACTER$ } - } - if = { - limit = { - exists = scope:relationship_reason_involved_character - exists = scope:relationship_reason_province - } - set_relation_nemesis = { - reason = $REASON$ - target = $CHARACTER$ - involved_character = scope:relationship_reason_involved_character - province = scope:relationship_reason_province - } - } - else_if = { - limit = { - exists = scope:relationship_reason_province - } - set_relation_nemesis = { - reason = $REASON$ - target = $CHARACTER$ - province = scope:relationship_reason_province - } - } - else_if = { - limit = { - exists = scope:relationship_reason_involved_character - } - set_relation_nemesis = { - reason = $REASON$ - target = $CHARACTER$ - involved_character = scope:relationship_reason_involved_character - } - } - else = { - set_relation_nemesis = { - reason = $REASON$ - target = $CHARACTER$ - } - } - } - else = { - progress_towards_rival_effect = { - CHARACTER = $CHARACTER$ - REASON = $REASON$ - OPINION = $OPINION$ - } - } -} - -#Sets potential lover + opinion or upgrades potential lover to full lover -progress_towards_lover_effect = { - #If potential lover, set lover! - if = { - limit = { - has_relation_potential_lover = $CHARACTER$ - can_set_relation_lover_trigger = { CHARACTER = $CHARACTER$ } - } - if = { - limit = { - exists = scope:relationship_reason_involved_character - exists = scope:relationship_reason_province - } - set_relation_lover = { - reason = $REASON$ - target = $CHARACTER$ - involved_character = scope:relationship_reason_involved_character - province = scope:relationship_reason_province - } - } - else_if = { - limit = { - exists = scope:relationship_reason_province - } - set_relation_lover = { - reason = $REASON$ - target = $CHARACTER$ - province = scope:relationship_reason_province - } - } - else_if = { - limit = { - exists = scope:relationship_reason_involved_character - } - set_relation_lover = { - reason = $REASON$ - target = $CHARACTER$ - involved_character = scope:relationship_reason_involved_character - } - } - else = { - set_relation_lover = { - reason = $REASON$ - target = $CHARACTER$ - } - } - # Complete activity intent if relevant - if = { - limit = { - exists = involved_activity - has_activity_intent = woo_attendee_intent - intent_target ?= $CHARACTER$ - intent_target.involved_activity ?= this.involved_activity - } - save_scope_as = intent_completer - send_interface_toast = { - title = activity_intent_complete_toast - left_icon = $CHARACTER$ - complete_activity_intent = yes - } - } - } - # If not... - else = { - # ... set potential relation if we're not already rivals! - if = { - limit = { can_set_relation_potential_lover_trigger = { CHARACTER = $CHARACTER$ } } - set_relation_potential_lover = $CHARACTER$ - } - - # ... add opinion if we should! - save_temporary_scope_value_as = { - name = lover_opinion - value = $OPINION$ - } - if = { - limit = { NOT = { scope:lover_opinion = 0 } } - reverse_add_opinion = { - target = $CHARACTER$ - modifier = romance_opinion - opinion = scope:lover_opinion - } - hidden_effect = { - add_opinion = { - target = $CHARACTER$ - modifier = romance_opinion - opinion = scope:lover_opinion - } - } - } - } -} - -### CHARACTERS OF INTEREST EFFECTS ### - -#Makes a list of every character of major interest - #Parameters: - # LISTNAME - the name of the list - -get_characters_of_major_interest_effect = { - save_temporary_scope_as = major_root - # 1 - Player heir - if = { - limit = { - major_interest_player_heir_trigger = { LISTNAME = $LISTNAME$ } - } - player_heir = { add_to_temporary_list = $LISTNAME$ } - } - # 2 - Liege - if = { - limit = { - major_interest_liege_trigger = { LISTNAME = $LISTNAME$ } - } - liege = { add_to_temporary_list = $LISTNAME$ } - } - # 3 - Realm Priest - if = { - limit = { - major_interest_realm_priest_trigger = { LISTNAME = $LISTNAME$ } - } - cp:councillor_court_chaplain = { add_to_temporary_list = $LISTNAME$ } - } - # 4 - Primary Spouse - if = { - limit = { - major_interest_primary_spouse_trigger = { LISTNAME = $LISTNAME$ } - } - primary_spouse = { add_to_temporary_list = $LISTNAME$ } - } - # 5 - Spymaster & # 11 - Other councillors - every_normal_councillor = { - limit = { - NOT = { is_in_list = $LISTNAME$ } - } - add_to_temporary_list = $LISTNAME$ - } - # 6 - Powerful vassals - every_powerful_vassal = { - limit = { - NOT = { is_in_list = $LISTNAME$ } - } - add_to_temporary_list = $LISTNAME$ - } - # 7 - Religious head (Excluded because they're highly context-specific) - # 8 - Potential heirs (Player only) - if = { - limit = { is_ai = no } - if = { - limit = { exists = dynasty } - dynasty = { - every_dynasty_member = { - limit = { - major_interest_potential_heirs_trigger = { LISTNAME = $LISTNAME$ CHARACTER = scope:major_root } - } - add_to_temporary_list = $LISTNAME$ - } - } - } - # 9 - Allies (Player only, Enemies are only relevant for content about wars) - every_ally = { - limit = { - NOT = { is_in_list = $LISTNAME$ } - } - add_to_temporary_list = $LISTNAME$ - } - } - # 10 - Neighboring rulers (not included in this list, hard to gauge relevance) -} - -#Makes a list of every character of minor interest - #Parameters: - # CHARACTER - the character who the list will be for - # LISTNAME - the name of the list -get_characters_of_minor_interest_effect = { - save_temporary_scope_as = minor_root - # 1 - Concubines & secondary spouses - every_consort = { - limit = { minor_interest_concubines_secondary_spouses_trigger = { CHARACTER = scope:minor_root LISTNAME = $LISTNAME$ } } - add_to_temporary_list = $LISTNAME$ - } - # 2 - Direct vassals of high tier - every_vassal = { - limit = { minor_interest_high_tier_vassal_trigger = { LISTNAME = $LISTNAME$ } } - add_to_temporary_list = $LISTNAME$ - } - # 3 - Betrothed - if = { - limit = { minor_interest_betrothed_trigger = { LISTNAME = $LISTNAME$ } } - betrothed = { add_to_temporary_list = $LISTNAME$ } - } - # 4 - Lovers - every_relation = { - type = lover - limit = { NOT = { is_in_list = $LISTNAME$ } } - add_to_temporary_list = $LISTNAME$ - } - # 5 - Rivals (excluded as they're typically only used in specific contexts) - # 6 - Close relatives - every_close_or_extended_family_member = { - limit = { minor_interest_close_relatives_trigger = { CHARACTER = scope:minor_root LISTNAME = $LISTNAME$ } } - add_to_temporary_list = $LISTNAME$ - } - if = { #Below is just for players - limit = { is_ai = no } - # 7 - Guardian - every_relation = { - type = guardian - limit = { NOT = { is_in_list = $LISTNAME$ } } - add_to_temporary_list = $LISTNAME$ - } - # 8 - Ward - every_relation = { - type = ward - limit = { NOT = { is_in_list = $LISTNAME$ } } - add_to_temporary_list = $LISTNAME$ - } - # 9 - Friends - every_relation = { - type = friend - limit = { NOT = { is_in_list = $LISTNAME$ } } - add_to_temporary_list = $LISTNAME$ - } - # 10 - Knights - every_knight = { - limit = { NOT = { is_in_list = $LISTNAME$ } } - add_to_temporary_list = $LISTNAME$ - } - # 11 - Highly skilled courtiers (players only) - if = { - limit = { is_ai = no } - every_courtier = { - limit = { minor_interest_skilled_courtiers_trigger = { LISTNAME = $LISTNAME$ } } - add_to_temporary_list = $LISTNAME$ - } - } - every_liege_or_above = { - limit = { minor_interest_liege_or_above_trigger = { CHARACTER = scope:minor_root LISTNAME = $LISTNAME$ } } - add_to_temporary_list = $LISTNAME$ - } - } -} - - - -#Makes a list of all characters of interest - #Parameters: - # LISTNAME - the name of the list -get_characters_of_interest_effect = { - get_characters_of_major_interest_effect = { - LISTNAME = $LISTNAME$ - } - get_characters_of_minor_interest_effect = { - LISTNAME = $LISTNAME$ - } -} - - - - - -#Makes a list of characters who are classified as potential enemies - #Parameters - # CHARACTER - The character whose enemies are being found - # LISTNAME - The name of the list -get_potential_enemies_effect = { - $CHARACTER$ = { - every_vassal = { - limit = { - is_powerful = yes - opinion = { - target = $CHARACTER$ - value <= 0 - } - NOT = { is_in_list = $LISTNAME$ } - } - add_to_list = $LISTNAME$ - } - every_relation = { - type = rival - limit = { - NOT = { is_in_list = $LISTNAME$ } - } - add_to_list = $LISTNAME$ - } - if = { - limit = { - top_liege != this - liege = { - opinion = { - target = $CHARACTER$ - value <= 0 - } - NOT = { - is_in_list = $LISTNAME$ - } - } - } - liege = { - add_to_list = $LISTNAME$ - } - } - if = { - limit = { - top_liege = this - } - every_neighboring_top_liege_realm_owner = { - limit = { - NOT = { is_allied_to = $CHARACTER$ } - OR = { - opinion = { - target = $CHARACTER$ - value <= 20 - } - AND = { - opinion = { - target = $CHARACTER$ - value <= 50 - } - has_any_cb_on = $CHARACTER$ - } - } - NOT = { is_in_list = $LISTNAME$ } - } - add_to_list = $LISTNAME$ - } - } - #Potential Heirs that do not like you - } -} - -set_as_oaf_effect = { - if = { - limit = { - NOT = { has_relation_oaf = $CHARACTER$ } - } - set_relation_oaf = $CHARACTER$ - } -} - -remove_friend_or_downgrade_friendship_effect = { - if = { - limit = { has_relation_best_friend = $SCOPE$ } - hidden_effect = { remove_relation_best_friend = $SCOPE$ } - set_relation_friend = { reason = friend_downgrade_best_friends target = $SCOPE$ } - } - else = { remove_relation_friend = $SCOPE$ } -} - -remove_lover_or_downgrade_relationship_effect = { - if = { - limit = { has_relation_soulmate = $SCOPE$ } - hidden_effect = { remove_relation_soulmate = $SCOPE$ } - set_relation_lover = $SCOPE$ - } - else = { remove_relation_lover = $SCOPE$ } -} - -# Immediately upgrade the relationship -upgrade_to_friend_effect = { - #If nemesis, change to rival - if = { - limit = { has_relation_nemesis = $CHARACTER$ } - remove_relation_nemesis = $CHARACTER$ - if = { - limit = { - exists = scope:relationship_reason_involved_character - } - set_relation_rival = { - target = $CHARACTER$ - reason = $REASON$ - involved_character = scope:relationship_reason_involved_character - } - } - else = { - set_relation_rival = { - target = $CHARACTER$ - reason = $REASON$ - } - } - } - #If rival, end rivalry. - else_if = { - limit = { has_relation_rival = $CHARACTER$ } - remove_relation_rival = $CHARACTER$ - } - # If not, look at upgrading from friend to best friend - else_if = { - limit = { - has_relation_friend = $CHARACTER$ - } - if = { - limit = { - exists = scope:relationship_reason_involved_character - } - set_relation_best_friend = { - target = $CHARACTER$ - reason = $REASON$ - copy_reason = friend - involved_character = scope:relationship_reason_involved_character - } - } - else = { - set_relation_best_friend = { - target = $CHARACTER$ - copy_reason = friend - reason = $REASON$ - } - } - } - # If not, look at upgrading from nothing to friend - else_if = { - limit = { - NOT = { has_relation_friend = $CHARACTER$ } - } - if = { - limit = { - exists = scope:relationship_reason_involved_character - } - set_relation_friend = { - target = $CHARACTER$ - reason = $REASON$ - involved_character = scope:relationship_reason_involved_character - } - } - else = { - set_relation_friend = { - target = $CHARACTER$ - reason = $REASON$ - } - } - } -} - -# Immediately downgrade the relationship -# DO NOT USE AFTER BP1 - hard to implement with relationship reasons -downgrade_to_rival_effect = { - #If best friend, change to friend - if = { - limit = { - has_relation_best_friend = $CHARACTER$ - } - remove_relation_best_friend = $CHARACTER$ - set_relation_friend = { reason = friend_downgrade_best_friends target = $CHARACTER$ } - } - #If friend, end friendship. - else_if = { - limit = { - has_relation_friend = $CHARACTER$ - } - remove_relation_friend = $CHARACTER$ - } - # If not, look at upgrading from rival to nemesis - else_if = { - limit = { - has_relation_rival = $CHARACTER$ - NOT = { has_relation_nemesis = $CHARACTER$ } - } - set_relation_nemesis = { - target = $CHARACTER$ - copy_reason = rival - reason = nemesis_downgrade_from_rival - } - } - # If not, look at upgrading from nothing to rival - else_if = { - limit = { - NOT = { has_relation_nemesis = $CHARACTER$ } - } - set_relation_rival = { - target = $CHARACTER$ - reason = $REASON$ - } - } -} - -set_random_friendship_reason = { # Use for adults, primarily - show_as_tooltip = { - set_relation_friend = $TARGET$ - } - hidden_effect = { - random_list = { - 10 = { - trigger = { - exists = location - NOT = { exists = liege } - } - set_relation_friend = { reason = friend_random_1 target = $TARGET$ province = location } - } - 10 = { - trigger = { - exists = location - NOT = { exists = liege } - } - set_relation_friend = { reason = friend_random_2 target = $TARGET$ province = location } - } - 10 = { - trigger = { - exists = location - NOT = { exists = liege } - } - set_relation_friend = { reason = friend_random_3 target = $TARGET$ province = location } - } - 10 = { - trigger = { - exists = location - NOT = { exists = liege } - } - set_relation_friend = { reason = friend_random_4 target = $TARGET$ province = location } - } - 10 = { - trigger = { - exists = location - NOT = { exists = liege } - } - set_relation_friend = { reason = friend_random_5 target = $TARGET$ province = location } - } - 10 = { - trigger = { - exists = liege - } - set_relation_friend = { reason = friend_random_6 target = $TARGET$ involved_character = liege } - } - 10 = { - trigger = { - exists = liege - } - set_relation_friend = { reason = friend_random_7 target = $TARGET$ involved_character = liege } - } - 10 = { - trigger = { - exists = liege - } - set_relation_friend = { reason = friend_random_8 target = $TARGET$ involved_character = liege } - } - 10 = { - trigger = { - exists = liege.capital_province - } - set_relation_friend = { reason = friend_random_9 target = $TARGET$ involved_character = liege province = liege.capital_province } - } - 10 = { - trigger = { - exists = liege.capital_province - } - set_relation_friend = { reason = friend_random_10 target = $TARGET$ involved_character = liege province = liege.capital_province } - } - 10 = { - trigger = { - NOR ={ - exists = location - exists = liege - } - } - set_relation_friend = { reason = friend_random_fallback target = $TARGET$ } - } - } - } -} - -set_random_rivalry_reason = { # Use for adults, primarily - show_as_tooltip = { - set_relation_$RELATION$ = $TARGET$ - } - hidden_effect = { - random_list = { - 10 = { - trigger = { - exists = location - NOT = { exists = liege } - } - set_relation_$RELATION$ = { reason = rival_random_1 target = $TARGET$ province = location } - } - 10 = { - trigger = { - exists = location - NOT = { exists = liege } - } - set_relation_$RELATION$ = { reason = rival_random_2 target = $TARGET$ province = location } - } - 10 = { - trigger = { - exists = location - NOT = { exists = liege } - } - set_relation_$RELATION$ = { reason = rival_random_3 target = $TARGET$ province = location } - } - 10 = { - trigger = { - exists = location - NOT = { exists = liege } - } - set_relation_$RELATION$ = { reason = rival_random_4 target = $TARGET$ province = location } - } - 10 = { - trigger = { - exists = location - NOT = { exists = liege } - } - set_relation_$RELATION$ = { reason = rival_random_5 target = $TARGET$ province = location } - } - 10 = { - trigger = { - exists = liege - } - set_relation_$RELATION$ = { reason = rival_random_6 target = $TARGET$ involved_character = liege } - } - 10 = { - trigger = { - exists = liege - } - set_relation_$RELATION$ = { reason = rival_random_7 target = $TARGET$ involved_character = liege } - } - 10 = { - trigger = { - exists = liege - } - set_relation_$RELATION$ = { reason = rival_random_8 target = $TARGET$ involved_character = liege } - } - 10 = { - trigger = { - exists = liege.capital_province - } - set_relation_$RELATION$ = { reason = rival_random_9 target = $TARGET$ involved_character = liege province = liege.capital_province } - } - 10 = { - trigger = { - exists = liege.capital_province - } - set_relation_$RELATION$ = { reason = rival_random_10 target = $TARGET$ involved_character = liege province = liege.capital_province } - } - 10 = { - trigger = { - exists = liege - } - set_relation_$RELATION$ = { reason = rivalry_at_court target = $TARGET$ involved_character = liege } - } - 10 = { - trigger = { - NOR ={ - exists = location - exists = liege - } - } - set_relation_$RELATION$ = { reason = rival_random_fallback target = $TARGET$ } - } - } - } -} - -set_random_lover_reason = { - show_as_tooltip = { - set_relation_lover = $TARGET$ - } - hidden_effect = { - random_list = { - 10 = { - trigger = { - $TARGET$ = { - is_female = yes - } - } - set_relation_lover = { reason = lover_random_1 target = $TARGET$ } - } - 10 = { - set_relation_lover = { reason = lover_random_2 target = $TARGET$ } - } - 10 = { - set_relation_lover = { reason = lover_random_3 target = $TARGET$ } - } - 10 = { - trigger = { - $TARGET$ = { - is_male = yes - } - } - set_relation_lover = { reason = lover_random_4 target = $TARGET$ } - } - 10 = { - set_relation_lover = { reason = lover_random_5 target = $TARGET$ } - } - 10 = { - set_relation_lover = { reason = lover_random_6 target = $TARGET$ } - } - 10 = { - trigger = { - $TARGET$ = { - is_male = yes - } - } - set_relation_lover = { reason = lover_random_7 target = $TARGET$ } - } - 10 = { - set_relation_lover = { reason = lover_random_8 target = $TARGET$ } - } - 10 = { - trigger = { - $TARGET$ = { - is_female = yes - } - } - set_relation_lover = { reason = lover_random_9 target = $TARGET$ } - } - 10 = { - set_relation_lover = { reason = lover_random_10 target = $TARGET$ } - } - } - } -} - -# OWNER = character -# TARGET = character -# RELATION = relation_key -send_set_relation_toast_effect = { - $OWNER$ = { - save_temporary_scope_as = relation_owner - } - $TARGET$ = { - save_temporary_scope_as = relation_target - } - scope:relation_owner = { - send_interface_toast = { - type = msg_set_relation_$RELATION$ - left_icon = this - right_icon = scope:relation_target - } - } - scope:relation_target = { - send_interface_toast = { - type = msg_set_relation_$RELATION$ - left_icon = this - right_icon = scope:relation_owner - } - } -} - -#Sets favor relation, then gives hook -progress_towards_hook_effect = { - #If has potential favor, give hook! - if = { - limit = { - NOT = { - has_hook = $CHARACTER$ - } - has_relation_potential_hook = $CHARACTER$ - } - add_hook = { - type = $HOOK_TYPE$ - target = $CHARACTER$ - } - } - # If not... - else = { - if = { - limit = { - NOT = { has_hook = $CHARACTER$ } - } - set_relation_potential_hook = $CHARACTER$ - } - else = { - reverse_add_opinion = { - target = $CHARACTER$ - modifier = favor_opinion - opinion = 25 - } - } - } -} - -progress_towards_friend_ai_effect = { - if = { - limit = { - $CHARACTER$ = { is_ai = yes } - } - progress_towards_friend_effect = { - CHARACTER = $CHARACTER$ - OPINION = $OPINION$ - REASON = $REASON$ - } - } -} - -progress_towards_lover_ai_effect = { - if = { - limit = { - $CHARACTER$ = { is_ai = yes } - } - progress_towards_lover_effect = { - CHARACTER = $CHARACTER$ - OPINION = $OPINION$ - REASON = $REASON$ - } - } -} - -progress_towards_rival_ai_effect = { - if = { - limit = { - $CHARACTER$ = { is_ai = yes } - } - progress_towards_rival_effect = { - CHARACTER = $CHARACTER$ - OPINION = $OPINION$ - REASON = $REASON$ - } - } -} - -progress_towards_intent_effect = { - if = { - limit = { - intent_target ?= $CHARACTER$ - has_activity_intent = woo_attendee_intent - } - progress_towards_lover_effect = { - REASON = $REASON$ - CHARACTER = $CHARACTER$ - OPINION = default_lover_opinion - } - } - else_if = { - limit = { - OR = { - AND = { - intent_target ?= $CHARACTER$ - has_activity_intent = befriend_attendee_intent - } - $FRIEND_FALLBACK$ = yes - } - } - progress_towards_friend_effect = { - REASON = $REASON$ - CHARACTER = $CHARACTER$ - OPINION = default_friend_opinion - } - } - else = { - reverse_add_opinion = { - modifier = kindness_opinion - target = $CHARACTER$ - opinion = default_friend_opinion - } - } -} - -clear_grudges_effect = { - $CHAR_1$ = { - if = { - limit = { has_relation_grudge = $CHAR_2$ } - remove_relation_grudge = $CHAR_2$ - } - } - $CHAR_2$ = { - if = { - limit = { has_relation_grudge = $CHAR_1$ } - remove_relation_grudge = $CHAR_1$ - } - } -} diff --git a/N3OW/common/scripted_effects/00_religion_effects.txt b/N3OW/common/scripted_effects/00_religion_effects.txt deleted file mode 100644 index 246fe82a..00000000 --- a/N3OW/common/scripted_effects/00_religion_effects.txt +++ /dev/null @@ -1,712 +0,0 @@ -#Effects relating to religions - -# check_for_equal_doctrine_effect -# set_bhakti_effect - -# Used to set Equal Law when the Equal Faith Doctrine is gained -check_for_equal_doctrine_effect = { - if = { - limit = { - is_playable_character = yes - faith = { - has_doctrine = doctrine_gender_equal - } - scope:old_faith = { - NOT = { has_doctrine = doctrine_gender_equal } - } - NOT = { - has_realm_law = equal_law - } - } - add_realm_law_skip_effects = equal_law - } -} - -# Used to set a Hindu's personal god. -set_bhakti_effect = { - # Remove any previous personal god relation. - ## HINDUISM - if = { - limit = { religion = religion:hinduism_religion } - if = { - limit = { - has_character_modifier = bhakti_hinduism_ganga - } - remove_character_modifier = bhakti_hinduism_ganga - add_piety = massive_piety_loss - } - else_if = { - limit = { - has_character_modifier = bhakti_hinduism_saraswati - } - remove_character_modifier = bhakti_hinduism_saraswati - add_piety = massive_piety_loss - } - else_if = { - limit = { - has_character_modifier = bhakti_hinduism_kali - } - remove_character_modifier = bhakti_hinduism_kali - add_piety = massive_piety_loss - } - else_if = { - limit = { - has_character_modifier = bhakti_hinduism_kubera - } - remove_character_modifier = bhakti_hinduism_kubera - add_piety = massive_piety_loss - } - else_if = { - limit = { - has_character_modifier = bhakti_vaishnavism_lakishmi - } - remove_character_modifier = bhakti_vaishnavism_lakishmi - add_piety = massive_piety_loss - } - else_if = { - limit = { - has_character_modifier = bhakti_vaishnavism_jagganath - } - remove_character_modifier = bhakti_vaishnavism_jagganath - add_piety = massive_piety_loss - } - else_if = { - limit = { - has_character_modifier = bhakti_vaishnavism_jagganath - } - remove_character_modifier = bhakti_vaishnavism_jagganath - add_piety = massive_piety_loss - } - else_if = { - limit = { - has_character_modifier = bhakti_vaishnavism_hayagriva - } - remove_character_modifier = bhakti_vaishnavism_hayagriva - add_piety = massive_piety_loss - } - else_if = { - limit = { - has_character_modifier = bhakti_shaivism_parvati - } - remove_character_modifier = bhakti_shaivism_parvati - add_piety = massive_piety_loss - } - else_if = { - limit = { - has_character_modifier = bhakti_shaivism_virabhadra - } - remove_character_modifier = bhakti_shaivism_virabhadra - add_piety = massive_piety_loss - } - else_if = { - limit = { - has_character_modifier = bhakti_shaivism_munishwarar - } - remove_character_modifier = bhakti_shaivism_munishwarar - add_piety = massive_piety_loss - } - else_if = { - limit = { - has_character_modifier = bhakti_shaivism_dakshinamoorthy - } - remove_character_modifier = bhakti_shaivism_dakshinamoorthy - add_piety = massive_piety_loss - } - else_if = { - limit = { - has_character_modifier = bhakti_smartism_ganesha - } - remove_character_modifier = bhakti_smartism_ganesha - add_piety = massive_piety_loss - } - else_if = { - limit = { - has_character_modifier = bhakti_smartism_vishnu - } - remove_character_modifier = bhakti_smartism_vishnu - add_piety = massive_piety_loss - } - else_if = { - limit = { - has_character_modifier = bhakti_smartism_shiva - } - remove_character_modifier = bhakti_smartism_shiva - add_piety = massive_piety_loss - } - } - # GERMANIC - else_if = { - limit = { religion = religion:germanic_religion } - if = { - limit = { - has_character_modifier = bhakti_germanic_generic_odin - } - remove_character_modifier = bhakti_germanic_generic_odin - add_piety = massive_piety_loss - } - else_if = { - limit = { - has_character_modifier = bhakti_germanic_not_danish_ullr - } - remove_character_modifier = bhakti_germanic_not_danish_ullr - add_piety = massive_piety_loss - } - else_if = { - limit = { - has_character_modifier = bhakti_germanic_danish_tyr - } - remove_character_modifier = bhakti_germanic_danish_tyr - add_piety = massive_piety_loss - } - else_if = { - limit = { - has_character_modifier = bhakti_germanic_generic_thor - } - remove_character_modifier = bhakti_germanic_generic_thor - add_piety = massive_piety_loss - } - else_if = { - limit = { - has_character_modifier = bhakti_germanic_generic_freyr - } - remove_character_modifier = bhakti_germanic_generic_freyr - add_piety = massive_piety_loss - } - } - else = { - # If no current bhakti, cost is reduced. - add_piety = medium_piety_loss - } - - add_character_modifier = $BHAKTI$ -} - - -create_head_of_faith_title_effect = { - # Pay costs - if = { - limit = { - faith = { - has_doctrine_parameter = temporal_head_of_faith - OR = { - has_doctrine = muhammad_succession_sunni_doctrine - has_doctrine = muhammad_succession_shia_doctrine - } - } - } - if = { # Very expensive for non-sayyid to become a Caliph. - limit = { NOT = { has_trait = sayyid } } - add_piety = massive_piety_loss - } - # Free otherwise - } - else_if = { - limit = { faith = { has_doctrine_parameter = temporal_head_of_faith } } - add_piety = major_piety_loss - } - else = { remove_short_term_gold = medium_gold_max_value } - - # (Re)create the HoF title - custom_description_no_bullet = { - text = create_temporal_head_of_faith - subject = root - object = scope:faith - - # Temporal HoF - if = { - limit = { faith = { has_doctrine_parameter = temporal_head_of_faith } } - if = { - limit = { - faith = { - NOT = { exists = religious_head_title } - } - } - trigger_event = faith_creation.0001 # Creates new dynamic title - } - else = { trigger_event = faith_creation.0011 } # Re-uses existing title. - } - - # Spiritual HoF - else_if = { - limit = { faith = { has_doctrine_parameter = spiritual_head_of_faith } } - if = { - limit = { - faith = { - NOT = { exists = religious_head_title } - } - } - trigger_event = faith_creation.0002 # Creates new dynamic title - } - else = { trigger_event = faith_creation.0012 } # Re-uses existing title. - } - } - - # Send an informative message to all players about the new HoF - hidden_effect = { - save_scope_as = reformer - faith = { - save_scope_as = faith - change_fervor = { - value = major_fervor_gain - desc = fervor_gain_recreated_hof - } - } - every_player = { - if = { - limit = { faith = scope:faith } - trigger_event = { - id = faith_creation.1010 - days = 1 - } - } - else = { - trigger_event = { - id = faith_creation.1011 - days = 1 - } - } - } - } -} - -force_create_head_of_faith_title_Effect = { # Has no cost, should be done manually on a per-case basis - custom_description_no_bullet = { - text = create_temporal_head_of_faith - subject = root - object = scope:faith - - # Temporal HoF - if = { - limit = { faith = { has_doctrine_parameter = temporal_head_of_faith } } - trigger_event = faith_creation.0001 - } - - # Spiritual HoF - else_if = { - limit = { faith = { has_doctrine_parameter = spiritual_head_of_faith } } - trigger_event = faith_creation.0002 - } - } -} - -# Dynamic HoF title creation -set_up_dynamic_temporal_hof_title_effect = { - faith = { save_scope_as = my_faith } - create_dynamic_title = { - tier = duchy - name = REL_HEAD_TITLE_NAME - } - create_title_and_vassal_change = { - type = created - save_scope_as = change - add_claim_on_loss = no - } - scope:new_title = { - set_destroy_if_invalid_heir = yes - set_no_automatic_claims = yes - set_definitive_form = yes - set_always_follows_primary_heir = yes - change_title_holder = { - holder = $NEW_HOLDER$ - change = scope:change - } - } - resolve_title_and_vassal_change = scope:change - faith = { set_religious_head_title = scope:new_title } - if = { - limit = { - NOT = { has_realm_law = same_faith_succession_law } - } - add_realm_law_skip_effects = same_faith_succession_law - } - scope:new_title = { - generate_coa = religious_title - add_title_law = temporal_head_of_faith_succession_law - } -} - -set_up_dynamic_spiritual_hof_title_effect = { - # Sort scopes & starting processes. - faith = { save_scope_as = my_faith } - create_dynamic_title = { - tier = duchy - name = REL_HEAD_TITLE_NAME - } - create_title_and_vassal_change = { - type = created - save_scope_as = change - add_claim_on_loss = no - } - # Nab a suitable character. - if = { - limit = { - any_theocratic_vassal = { faith = $CREATOR$.faith } - } - ordered_theocratic_vassal = { - limit = { faith = $CREATOR$.faith } - order_by = head_of_faith_selection_weight - save_scope_as = new_religious_head - } - } - else = { - create_character = { - location = $CREATOR$.capital_province - age = { 30 50 } - gender_female_chance = root_faith_clergy_gender_female_chance - trait = education_learning_4 - faith = $CREATOR$.faith - culture = $CREATOR$.culture - learning = { 14 22 } - save_scope_as = new_religious_head - } - } - # Try to land the new title. - scope:my_faith = { - random_holy_site = { - # Prefer a capital that's under $CREATOR$. - limit = { county.holder = $CREATOR$ } - # Even if it's indirectly under $CREATOR$. - alternative_limit = { - county.holder = { target_is_liege_or_above = $CREATOR$ } - } - # Then go for any that's held by someone of the faith. - alternative_limit = { county.holder.faith = $CREATOR$.faith } - # Under *extreme* circumstances, pick any holy site with at least some faithful. - alternative_limit = { county.faith = $CREATOR$.faith } - # Ok, just pick any of them. We're out of options and we need _somewhere_. - alternative_limit = { always = yes } - save_scope_as = holy_site - } - } - if = { - limit = { exists = scope:holy_site } - scope:new_title = { set_capital_county = scope:holy_site.county } - } - # Configure final effects. - hidden_effect = { - scope:new_title = { - set_landless_title = yes - set_destroy_if_invalid_heir = yes - set_no_automatic_claims = yes - set_definitive_form = yes - set_always_follows_primary_heir = yes - change_title_holder = { - holder = scope:new_religious_head - change = scope:change - } - } - } - resolve_title_and_vassal_change = scope:change - faith = { set_religious_head_title = scope:new_title } - scope:new_title = { generate_coa = religious_title } - # We enclose the law safeguard in an if statement to prevent errors when this is only _about_ to be fired. - hidden_effect = { - if = { - limit = { exists = scope:new_religious_head } - scope:new_religious_head = { - if = { - limit = { - NOT = { has_realm_law = same_faith_theocratic_succession_law } - } - add_realm_law_skip_effects = same_faith_theocratic_succession_law - } - } - } - } -} - -# Excommunication management. -add_excommunication_tooltip_only_effect = { - show_as_tooltip = { - add_trait_force_tooltip = excommunicated - add_character_modifier = { # Minor negative modifier that stops us from immediately getting our excommunication recinded (so you have a guaranteed 'penance period'). - modifier = recent_excommunication - days = 365 - } - } -} -add_excommunication_actual_effect = { - add_trait = excommunicated - add_character_modifier = { # Minor negative modifier that stops us from immediately getting our excommunication recinded (so you have a guaranteed 'penance period'). - modifier = recent_excommunication - days = 365 - } -} - -add_excommunication_actual_effect_5_years_version = { - add_trait = excommunicated - add_character_modifier = { # Minor negative modifier that stops us from immediately getting our excommunication recinded (so you have a guaranteed 'penance period'). - modifier = recent_excommunication - years = 5 - } -} - -create_holy_order_neutral_effect = { - # Create a general holy order. - create_holy_order = { - leader = $LEADER$ - capital = $CAPITAL$ - save_scope_as = $NEW_HO_SCOPE$ - } - # Struggle Catalysts. - $FOUNDER$ = { - if = { - limit = { - any_character_struggle = { - involvement = involved - phase_has_catalyst = catalyst_creating_a_holy_order - } - } - every_character_struggle = { - involvement = involved - limit = { phase_has_catalyst = catalyst_creating_a_holy_order } - activate_struggle_catalyst = { - catalyst = catalyst_creating_a_holy_order - character = $FOUNDER$ - } - } - } - } -} - - -# Get random faith -get_random_faith_effect = { - if = { - limit = { $FORBIDROOTFAITH$ = yes } - random_religion_global = { - limit = { any_faith = { this != root.faith } } - random_faith = { - limit = { this != root.faith } - save_scope_as = random_faith - } - } - } - else = { - random_religion_global = { - random_faith = { save_scope_as = random_faith } - } - } -} - -set_up_dynamic_spiritual_hof_title_existing_hof_effect = { - - $RELIGIOUS_HEAD$ = { save_scope_as = new_religious_head } - - # Sort scopes & starting processes. - faith = { save_scope_as = my_faith } - create_dynamic_title = { - tier = duchy - name = REL_HEAD_TITLE_NAME - } - create_title_and_vassal_change = { - type = created - save_scope_as = change - add_claim_on_loss = no - } - - # Nab a suitable character. - # The decision already chose one. - - # Try to land the new title. - scope:my_faith = { - random_holy_site = { - limit = { county.holder = $CREATOR$ } - alternative_limit = { - county.holder = { target_is_liege_or_above = $CREATOR$ } - } - alternative_limit = { - county.holder = { - faith = $CREATOR$.faith - is_ai = yes - } - } - save_scope_as = holy_site - } - } - if = { - limit = { exists = scope:holy_site } - scope:new_title = { set_capital_county = scope:holy_site.county } - } - # Configure final effects. - hidden_effect = { - scope:new_title = { - set_landless_title = yes - set_destroy_if_invalid_heir = yes - set_no_automatic_claims = yes - set_definitive_form = yes - set_always_follows_primary_heir = yes - change_title_holder = { - holder = scope:new_religious_head - change = scope:change - } - } - } - resolve_title_and_vassal_change = scope:change - faith = { set_religious_head_title = scope:new_title } - scope:new_title = { generate_coa = religious_title } - # We enclose the law safeguard in an if statement to prevent errors when this is only _about_ to be fired. - hidden_effect = { - if = { - limit = { exists = scope:new_religious_head } - scope:new_religious_head = { - if = { - limit = { - NOT = { has_realm_law = same_faith_theocratic_succession_law } - } - add_realm_law_skip_effects = same_faith_theocratic_succession_law - } - } - } - } -} - -### SECRET FAITH ### - -# Openly convert -secret_faith_openly_convert_character = { - if = { - limit = { exists = secret_faith } - set_character_faith_with_conversion = secret_faith # Gets vassals too, if they like you enough - remove_character_secret_faith = yes - } -} - -# Openly convert all secret faith counties in your realm -secret_faith_openly_convert_all_in_realm = { - if = { - limit = { any_sub_realm_county = { has_variable = false_convert } } - save_scope_value_as = { # Keeping track how many counties convert - name = num_false_converts_counties - value = 0 - } - - every_sub_realm_county = { - limit = { has_variable = false_convert } - set_county_faith = var:false_convert # Convert them - remove_county_modifier = false_convert_modifier # Remove modifier too - remove_variable = false_convert # No longer mark them as converts - add_county_modifier = { # Everyone likes practicing their faith in the open! - modifier = relieved_cryptos_modifier - years = 25 - } - save_scope_value_as = { # Updating how many counties convert - name = num_false_converts_counties - value = { - value = scope:num_false_converts_counties - add = 1 - } - } - } - if = { # Include counties in the message if there are any - limit = { scope:num_false_converts_counties > 0 } - root = { # There is an edgecase where root has a link to realm, but is not a character themselves! - send_interface_message = { - type = event_religious_good_text - title = event_false_converts.t - desc = event_false_converts_plus_counties.desc - } - } - } - } -} - -# Openly convert all secret faith counties of your faith in your realm -secret_faith_openly_convert_all_in_realm_specific = { - if = { - limit = { - any_sub_realm_county = { - has_variable = false_convert - var:false_convert = root.faith - faith != root.faith # Discount them if they've already been switched by the conversion action. - } - } - - save_scope_value_as = { # Keeping track how many counties convert - name = num_false_converts_counties - value = 0 - } - - every_sub_realm_county = { - limit = { - has_variable = false_convert - var:false_convert = root.faith - faith != root.faith # Discount them if they've already been switched by the conversion action. - } - set_county_faith = var:false_convert # Change faith - remove_county_modifier = false_convert_modifier - remove_variable = false_convert # Cleanup - add_county_modifier = { # Everyone likes practicing their faith in the open! - modifier = relieved_cryptos_modifier - years = 25 - } - save_scope_value_as = { # Updating how many counties convert - name = num_false_converts_counties - value = { - value = scope:num_false_converts_counties - add = 1 - } - } - } - - if = { # Include counties in the message if there are any - limit = { scope:num_false_converts_counties > 0 } - root = { - send_interface_message = { - type = event_religious_good_text - title = event_false_converts.t - desc = event_false_converts_plus_counties.desc - } - } - } - } -} - -add_heresiarch_trait_effect = { # Flag is need to prevent trait being removed when gaining it close to conversion - add_character_flag = { - flag = new_heresiarch - days = 3 - } - if = { - limit = { - NOT = { has_trait = heresiarch } - } - add_trait = heresiarch - } -} - -self_mutilation_minor_piety_gain_effect = { - if = { - limit = { - faith = { has_doctrine_parameter = self_mutilation_active } - } - custom_tooltip = { - text = self_mutilation_minor_piety_gain_tt - add_piety = minor_piety_gain - } - } -} - -self_mutilation_medium_piety_gain_effect = { - if = { - limit = { - faith = { has_doctrine_parameter = self_mutilation_active } - } - custom_tooltip = { - text = self_mutilation_medium_piety_gain_tt - add_piety = medium_piety_gain - } - } -} - -self_mutilation_major_piety_gain_effect = { - if = { - limit = { - faith = { has_doctrine_parameter = self_mutilation_active } - } - custom_tooltip = { - text = self_mutilation_major_piety_gain_tt - add_piety = major_piety_gain - } - } -} diff --git a/N3OW/common/scripted_effects/00_religious_interaction_effects.txt b/N3OW/common/scripted_effects/00_religious_interaction_effects.txt deleted file mode 100644 index 2382abff..00000000 --- a/N3OW/common/scripted_effects/00_religious_interaction_effects.txt +++ /dev/null @@ -1,1676 +0,0 @@ -#Effects used for religion interactions - -excommunicate_character = { - if = { - limit = { - $REQUESTING_CHARACTER$.faith = $TARGET_CHARACTER$.faith - } - - $REQUESTING_CHARACTER$ = { - save_scope_as = requesting_character - } - $TARGET_CHARACTER$ = { - save_scope_as = target_character - faith.religious_head = { - save_scope_as = religious_head - } - - # If our religious head was convinced/persuaded to excommunicate us by another ruler, we want to make that clear. - if = { - limit = { - scope:requesting_character != scope:religious_head - } - add_excommunication_actual_effect = yes - add_opinion = { - modifier = angry_opinion - target = scope:religious_head - opinion = -30 - } - add_opinion = { - modifier = hate_opinion - target = scope:requesting_character - opinion = -50 - } - } - # Though if our head independently decided to excommunicate us, that should also be clear. - else = { - add_excommunication_actual_effect = yes - add_opinion = { - modifier = angry_opinion - target = scope:religious_head - opinion = -50 - } - } - - # LEGITIMACY LOSS FROM EXCOMMUNICATION - excommunication_legitimacy_effect = yes - - progress_towards_rival_effect = { - CHARACTER = scope:requesting_character - REASON = rival_requested_excommunication - OPINION = 0 - } - set_variable = { #TO save who wanted you excommunicated - name = requested_my_excommunication - value = scope:requesting_character - } - - # Regardless of why the excommunication happened, players should be aware whenever a character of interest is excommunicated. - every_player = { - limit = { - faith = scope:target_character.faith - NOR = { - this = scope:target_character # If we are the excommunication target, we were already send a notification in the script above this. - this = scope:requesting_character #If we are the excommunication requester, we already get a diplomacy response telling us about the excommunication. - } - - save_temporary_scope_as = player - OR = { - top_liege = scope:target_character # Our realm's top liege is a character of interest. - top_liege = { - any_vassal_or_below = { # Peers of the realm are also characters of interest... - this = scope:target_character - OR = { - NOT = { highest_held_title_tier = 1 } #... unless they're someone else's baron (then they're too inconsequential). - is_vassal_of = scope:player - } - } - } - any_close_family_member = { - this = scope:target_character # Family members are characters of interest, even if not part of our realm. - } - any_neighboring_top_liege_realm_owner = { - this = scope:target_character # Finally, any neighboring realm owners are characters of interest (as we get an excommunication war CB on them, as well as the ability to request claims). - } - } - } - save_scope_as = this_player - send_interface_message = { - type = excommunicated_other_message - title = excommunicated_other_message - desc = other_excommunicated_message - left_icon = scope:target_character - right_icon = scope:religious_head - } - } - } - } -} - -lift_character_excommunication_effect = { - $REQUESTING_CHARACTER$ = { - hidden_effect = { - send_interface_toast = { - title = lift_excommunicate_interaction_desc.tt - left_icon = $TARGET_CHARACTER$ - $TARGET_CHARACTER$ = { - show_as_tooltip = { remove_trait = excommunicated } - } - } - } - } - $TARGET_CHARACTER$ = { - remove_trait = excommunicated - add_character_modifier = { - modifier = excommunication_recently_lifted - years = 10 - } - add_opinion = { - modifier = grateful_opinion - target = $REQUESTING_CHARACTER$ - opinion = 30 - } - # To nudge friendship. - hidden_effect = { - if = { - limit = { - NOR = { - has_relation_friend = $REQUESTING_CHARACTER$ - has_relation_potential_friend = $REQUESTING_CHARACTER$ - } - } - set_relation_potential_friend = $REQUESTING_CHARACTER$ - } - } - } -} - -# Saves the target kingdom to scope:target_kingdom, and the target character to scope:target_character -determine_ghw_target_effect = { - # Find every *possible* kingdom - $FAITH$ = { - save_temporary_scope_value_as = { - name = faith_strength - value = faith_military_strength - } - } - #1178 Catholics target the Holy Land, to support Kingdom of Jerusalem and make Fourth Crusade more likely to trigger - if = { - limit = { - #Definitely hasn't been a crusade already - NOR = { - has_global_variable = frankokratia_occurred - has_global_variable = cath_crusade_1 - } - game_start_date = 1178.10.1 - $FAITH$ = { - this = faith:catholic - } - #Any holy land kingdom is valid - any_kingdom = { - valid_ghw_target_trigger = { FAITH = $FAITH$ } - OR = { - title_capital_county.title_province = { geographical_region = world_middle_east_arabia } - title_capital_county.title_province = { geographical_region = world_middle_east_jerusalem } - title_capital_county.title_province = { geographical_region = world_asia_minor } - this = title:k_cyprus - this = title:k_egypt - } - } - } - #Most likely to be aiding kingdom of jerusalem - if = { - limit = { - exists = title:k_jerusalem.holder - title:k_jerusalem.holder = { - faith = faith:catholic - } - any_kingdom = { - valid_ghw_target_trigger = { FAITH = $FAITH$ } - OR = { - title_capital_county.title_province = { geographical_region = world_middle_east_arabia } - title_capital_county.title_province = { geographical_region = world_middle_east_jerusalem } - title_capital_county.title_province = { geographical_region = world_asia_minor } - this = title:k_cyprus - this = title:k_egypt - } - any_de_jure_county = { - OR = { - holder = title:k_jerusalem.holder - holder.top_liege = title:k_jerusalem.holder - any_neighboring_county = { - OR = { - holder = title:k_jerusalem.holder - holder.top_liege = title:k_jerusalem.holder - } - } - } - } - } - } - every_kingdom = { - limit = { - valid_ghw_target_trigger = { FAITH = $FAITH$ } - OR = { - title_capital_county.title_province = { geographical_region = world_middle_east_arabia } - title_capital_county.title_province = { geographical_region = world_middle_east_jerusalem } - title_capital_county.title_province = { geographical_region = world_asia_minor } - this = title:k_cyprus - this = title:k_egypt - } - any_de_jure_county = { - OR = { - holder = title:k_jerusalem.holder - holder.top_liege = title:k_jerusalem.holder - any_neighboring_county = { - OR = { - holder = title:k_jerusalem.holder - holder.top_liege = title:k_jerusalem.holder - } - } - } - } - } - add_to_list = potential_kingdoms - } - } - else = { - every_kingdom = { - limit = { - valid_ghw_target_trigger = { FAITH = $FAITH$ } - OR = { - title_capital_county.title_province = { geographical_region = world_middle_east_arabia } - title_capital_county.title_province = { geographical_region = world_middle_east_jerusalem } - title_capital_county.title_province = { geographical_region = world_asia_minor } - this = title:k_cyprus - this = title:k_egypt - } - } - add_to_list = potential_kingdoms - } - } - } - else = { - every_kingdom = { - limit = { - valid_ghw_target_trigger = { FAITH = $FAITH$ } - } - add_to_list = potential_kingdoms - } - } - - # Pick out the 10 "best" ones - ordered_in_list = { - list = potential_kingdoms - order_by = great_holy_war_target_kingdom_weight - - min = 0 - max = 10 - check_range_bounds = no - - add_to_list = filtered_potential_kingdoms - } - # Pick one of the top 10 at random (weighted) - random_in_list = { - list = filtered_potential_kingdoms - weight = { - base = 10 - modifier = { - add = great_holy_war_target_kingdom_weight - } - } - save_scope_as = target_kingdom - } - random_log_scopes = yes - # Find a random top liege in the area - scope:target_kingdom = { - random_in_de_jure_hierarchy = { - continue = { tier > tier_county } - limit = { #Try to pick the largest ruler in the area. - tier = tier_county - $FAITH$ = { - is_hostile_enough_for_holy_war_trigger = { FAITH = prev.holder.faith } - } - holder = { - highest_held_title_tier >= 4 - any_realm_county = { count >= 5 } - } - } - alternative_limit = { - tier = tier_county - $FAITH$ = { - is_hostile_enough_for_holy_war_trigger = { FAITH = prev.holder.faith } - } - holder = { - highest_held_title_tier >= 3 - any_realm_county = { count >= 5 } - } - } - alternative_limit = { - tier = tier_county - $FAITH$ = { - is_hostile_enough_for_holy_war_trigger = { FAITH = prev.holder.faith } - } - holder = { - highest_held_title_tier >= 2 - any_realm_county = { count >= 5 } - } - } - alternative_limit = { - tier = tier_county - $FAITH$ = { - is_hostile_enough_for_holy_war_trigger = { FAITH = prev.holder.faith } - } - } - alternative_limit = { - tier = tier_kingdom - $FAITH$ = { - is_hostile_enough_for_holy_war_trigger = { FAITH = prev.holder.faith } - } - } - holder = { - save_scope_as = target_character - } - } - } -} - -pledge_ghw_piety_gain_effect = { - if = { - limit = { highest_held_title_tier = 5 } - add_piety = 150 - } - if = { - limit = { highest_held_title_tier = 4 } - add_piety = 120 - } - if = { - limit = { highest_held_title_tier = 3 } - add_piety = 90 - } - if = { - limit = { highest_held_title_tier = 2 } - add_piety = 60 - } - if = { - limit = { highest_held_title_tier = 1 } - add_piety = 30 - } -} - -pledge_ghw_piety_loss_effect = { - if = { - limit = { highest_held_title_tier = tier_empire } - add_piety = massive_piety_loss - } - if = { - limit = { highest_held_title_tier = tier_kingdom } - add_piety = major_piety_loss - } - if = { - limit = { highest_held_title_tier <= tier_duchy } - add_piety = medium_piety_loss - } -} - -pledge_ghw_war_chest_prestige_effect = { #To be fired within the scope of an Attacker of the correct Faith. - if = { - limit = { prev = { highest_held_title_tier = 5 } } - change_war_chest_prestige = 3000 - } - if = { - limit = { prev = { highest_held_title_tier = 4 } } - change_war_chest_prestige = 1500 - } - if = { - limit = { prev = { highest_held_title_tier = 3 } } - change_war_chest_prestige = 1000 - } - if = { - limit = { prev = { highest_held_title_tier = 2 } } - change_war_chest_prestige = 500 - } - if = { - limit = { prev = { highest_held_title_tier = 1 } } - change_war_chest_prestige = 250 - } -} - -pledge_ghw_war_chest_piety_effect = { #To be fired within the scope of an Attacker of the correct Faith. - if = { - limit = { prev = { highest_held_title_tier = 5 } } - change_war_chest_piety = 1200 - } - if = { - limit = { prev = { highest_held_title_tier = 4 } } - change_war_chest_piety = 600 - } - if = { - limit = { prev = { highest_held_title_tier = 3 } } - change_war_chest_piety = 300 - } - if = { - limit = { prev = { highest_held_title_tier = 2 } } - change_war_chest_piety = 150 - } - if = { - limit = { prev = { highest_held_title_tier = 1 } } - change_war_chest_piety = 75 - } -} - -unpledge_ghw_war_chest_prestige_effect = { #To be fired within the ghw scope, assuming that the prev scope is the character joining it as an attacker. - if = { - limit = { prev = { highest_held_title_tier = 5 } } - change_war_chest_prestige = -3000 - } - if = { - limit = { prev = { highest_held_title_tier = 4 } } - change_war_chest_prestige = -1500 - } - if = { - limit = { prev = { highest_held_title_tier = 3 } } - change_war_chest_prestige = -1000 - } - if = { - limit = { prev = { highest_held_title_tier = 2 } } - change_war_chest_prestige = -500 - } - if = { - limit = { prev = { highest_held_title_tier = 1 } } - change_war_chest_prestige = -250 - } -} - -unpledge_ghw_war_chest_piety_effect = { #To be fired within the scope of an Attacker of the correct Faith. - if = { - limit = { prev = { highest_held_title_tier = 5 } } - change_war_chest_piety = -1200 - } - if = { - limit = { prev = { highest_held_title_tier = 4 } } - change_war_chest_piety = -600 - } - if = { - limit = { prev = { highest_held_title_tier = 3 } } - change_war_chest_piety = -300 - } - if = { - limit = { prev = { highest_held_title_tier = 2 } } - change_war_chest_piety = -150 - } - if = { - limit = { prev = { highest_held_title_tier = 1 } } - change_war_chest_piety = -75 - } -} - -ghw_set_new_war_declarer_effect = { - #Determine Sponsor. (effect fired within FAITH scope) - if = { - limit = { - exists = religious_head - } - religious_head = { - save_scope_as = ghw_sponsor - } - great_holy_war = { - set_war_declarer = scope:ghw_sponsor - if = { - limit = { - NOT = { has_pledged_attacker = scope:ghw_sponsor } - } - pledge_attacker = scope:ghw_sponsor - } - } - } -} - -#Used within an undirected ghw scope to determine the Beneficiary selected by the war's leader. -#Notable scopes: -#the_faith -#target_faith -#target_kingdom -#ghw_sponsor - -undirected_ghw_recipient_selection_effect = { - #Prioritize Holder of the target_kingdom. - #Then Claimants of the target_kingdom. - #And so forth... - if = { #The Kingdom is held by a member of the Faith, the Crusade is attempting to restore some of its provinces. - limit = { - scope:target_kingdom = { - holder ?= { - this.faith = scope:the_faith - NOR = { - has_trait = excommunicated - has_trait = incapable - has_trait = devoted - } - } - } - } - scope:the_faith.great_holy_war = { - set_designated_winner = scope:target_kingdom.holder - } - } - else_if = { #Claimants of the King-title belonging to the Faith exist. - limit = { - scope:target_kingdom = { - any_claimant = { - this.faith = scope:the_faith - NOR = { - has_trait = excommunicated - has_trait = incapable - has_trait = devoted - } - } - } - } - scope:target_kingdom = { - random_claimant = { - limit = { - this.faith = scope:the_faith - is_adult = yes - has_trait = zealous - NOR = { - has_trait = excommunicated - has_trait = incapable - has_trait = devoted - } - OR = { - AND = { - is_male = yes - faith = { has_doctrine = doctrine_gender_male_dominated } - } - AND = { - is_female = yes - faith = { has_doctrine = doctrine_gender_female_dominated } - } - NOR = { - faith = { has_doctrine = doctrine_gender_male_dominated } - faith = { has_doctrine = doctrine_gender_female_dominated } - } - } - reverse_opinion = { - target = scope:ghw_sponsor - value >= 0 - } - } - alternative_limit = { - this.faith = scope:the_faith - is_adult = yes - NOR = { - has_trait = excommunicated - has_trait = incapable - has_trait = devoted - } - OR = { - AND = { - is_female = no - faith = { has_doctrine = doctrine_gender_male_dominated } - } - AND = { - is_female = yes - faith = { has_doctrine = doctrine_gender_female_dominated } - } - NOR = { - faith = { has_doctrine = doctrine_gender_male_dominated } - faith = { has_doctrine = doctrine_gender_female_dominated } - } - } - reverse_opinion = { - target = scope:ghw_sponsor - value >= 0 - } - } - alternative_limit = { - this.faith = scope:the_faith - is_adult = yes - NOR = { - has_trait = excommunicated - has_trait = incapable - has_trait = devoted - } - OR = { - AND = { - is_female = no - faith = { has_doctrine = doctrine_gender_male_dominated } - } - AND = { - is_female = yes - faith = { has_doctrine = doctrine_gender_female_dominated } - } - NOR = { - faith = { has_doctrine = doctrine_gender_male_dominated } - faith = { has_doctrine = doctrine_gender_female_dominated } - } - } - } - alternative_limit = { - this.faith = scope:the_faith - NOR = { - has_trait = excommunicated - has_trait = incapable - has_trait = devoted - } - OR = { - AND = { - is_female = no - faith = { has_doctrine = doctrine_gender_male_dominated } - } - AND = { - is_female = yes - faith = { has_doctrine = doctrine_gender_female_dominated } - } - NOR = { - faith = { has_doctrine = doctrine_gender_male_dominated } - faith = { has_doctrine = doctrine_gender_female_dominated } - } - } - } - alternative_limit = { - this.faith = scope:the_faith - NOR = { - has_trait = excommunicated - has_trait = incapable - has_trait = devoted - } - } - save_scope_as = ghw_claimant - } - } - scope:the_faith.great_holy_war = { - set_designated_winner = scope:ghw_claimant - } - } - else = { #Else leave Open: the Recepient of the top contributor gets it. - scope:the_faith.great_holy_war = { - reset_designated_winner = yes - } - } -} - -undirected_ghw_recipient_selection_on_death_effect = { - #Prioritize Holder of the target_kingdom. - #Then Claimants of the target_kingdom. - #And so forth... - if = { #The Kingdom is held by a member of the Faith, the Crusade is attempting to restore some of its provinces. - limit = { - scope:target_kingdom = { - holder ?= { - this.faith = scope:the_faith - NOR = { - has_trait = excommunicated - has_trait = incapable - has_trait = devoted - this = root - } - } - } - } - scope:the_faith.great_holy_war = { - set_designated_winner = scope:target_kingdom.holder - } - scope:target_kingdom.holder = { - save_scope_as = ghw_claimant - } - } - else_if = { #Claimants of the King-title belonging to the Faith exist. - limit = { - scope:target_kingdom = { - any_claimant = { - this.faith = scope:the_faith - NOR = { - has_trait = excommunicated - has_trait = incapable - has_trait = devoted - this = root - } - } - } - } - scope:target_kingdom = { - random_claimant = { - limit = { - this.faith = scope:the_faith - is_adult = yes - has_trait = zealous - NOR = { - has_trait = excommunicated - has_trait = incapable - has_trait = devoted - this = root - } - OR = { - AND = { - is_female = no - faith = { has_doctrine = doctrine_gender_male_dominated } - } - AND = { - is_female = yes - faith = { has_doctrine = doctrine_gender_female_dominated } - } - NOR = { - faith = { has_doctrine = doctrine_gender_male_dominated } - faith = { has_doctrine = doctrine_gender_female_dominated } - } - } - reverse_opinion = { - target = scope:ghw_sponsor - value >= 0 - } - } - alternative_limit = { - this.faith = scope:the_faith - is_adult = yes - NOR = { - has_trait = excommunicated - has_trait = incapable - has_trait = devoted - this = root - } - OR = { - AND = { - is_female = no - faith = { has_doctrine = doctrine_gender_male_dominated } - } - AND = { - is_female = yes - faith = { has_doctrine = doctrine_gender_female_dominated } - } - NOR = { - faith = { has_doctrine = doctrine_gender_male_dominated } - faith = { has_doctrine = doctrine_gender_female_dominated } - } - } - reverse_opinion = { - target = scope:ghw_sponsor - value >= 0 - } - } - alternative_limit = { - this.faith = scope:the_faith - is_adult = yes - NOR = { - has_trait = excommunicated - has_trait = incapable - has_trait = devoted - this = root - } - OR = { - AND = { - is_female = no - faith = { has_doctrine = doctrine_gender_male_dominated } - } - AND = { - is_female = yes - faith = { has_doctrine = doctrine_gender_female_dominated } - } - NOR = { - faith = { has_doctrine = doctrine_gender_male_dominated } - faith = { has_doctrine = doctrine_gender_female_dominated } - } - } - } - alternative_limit = { - this.faith = scope:the_faith - NOR = { - has_trait = excommunicated - has_trait = incapable - has_trait = devoted - this = root - } - OR = { - AND = { - is_female = no - faith = { has_doctrine = doctrine_gender_male_dominated } - } - AND = { - is_female = yes - faith = { has_doctrine = doctrine_gender_female_dominated } - } - NOR = { - faith = { has_doctrine = doctrine_gender_male_dominated } - faith = { has_doctrine = doctrine_gender_female_dominated } - } - } - } - alternative_limit = { - this.faith = scope:the_faith - NOR = { - has_trait = excommunicated - has_trait = incapable - has_trait = devoted - this = root - } - } - save_scope_as = ghw_claimant - } - } - scope:the_faith.great_holy_war = { - set_designated_winner = scope:ghw_claimant - } - } - else = { #Else leave Open: the Recepient of the top contributor gets it. - scope:the_faith.great_holy_war = { - reset_designated_winner = yes - } - } -} - -undirected_ghw_recipient_selection_on_victory_effect = { #Set in the event of no Recipient or Beneficiary when a Crusade is won. - #Prioritize Holder of the target_kingdom. - #Then Claimants of the target_kingdom. - #And so forth... - if = { #The Kingdom is held by a member of the Faith, the Crusade is attempting to restore some of its provinces. - limit = { - exists = scope:target_kingdom - exists = scope:target_kingdom.holder - exists = scope:the_faith.great_holy_war - scope:target_kingdom.holder = { - faith = scope:the_faith - NOR = { - has_trait = excommunicated - has_trait = incapable - has_trait = devoted - } - } - } - scope:target_kingdom.holder = { - save_scope_as = title_recipient - } - scope:the_faith.great_holy_war = { - set_designated_winner = scope:title_recipient - } - } - else_if = { #Claimants of the King-title belonging to the Faith exist. - limit = { - exists = scope:target_kingdom - exists = scope:the_faith.great_holy_war - scope:target_kingdom = { - any_claimant = { - faith = scope:the_faith - NOR = { - has_trait = excommunicated - has_trait = incapable - has_trait = devoted - } - } - } - } - scope:target_kingdom = { - random_claimant = { - limit = { - faith = scope:the_faith - is_adult = yes - has_trait = zealous - NOR = { - has_trait = excommunicated - has_trait = incapable - has_trait = devoted - } - OR = { - AND = { - is_female = no - faith = { has_doctrine = doctrine_gender_male_dominated } - } - AND = { - is_female = yes - faith = { has_doctrine = doctrine_gender_female_dominated } - } - NOR = { - faith = { has_doctrine = doctrine_gender_male_dominated } - faith = { has_doctrine = doctrine_gender_female_dominated } - } - } - reverse_opinion = { - target = scope:ghw_sponsor - value >= 0 - } - } - alternative_limit = { - this.faith = scope:the_faith - is_adult = yes - NOR = { - has_trait = excommunicated - has_trait = incapable - has_trait = devoted - } - OR = { - AND = { - is_female = no - faith = { has_doctrine = doctrine_gender_male_dominated } - } - AND = { - is_female = yes - faith = { has_doctrine = doctrine_gender_female_dominated } - } - NOR = { - faith = { has_doctrine = doctrine_gender_male_dominated } - faith = { has_doctrine = doctrine_gender_female_dominated } - } - } - reverse_opinion = { - target = scope:ghw_sponsor - value >= 0 - } - } - alternative_limit = { - this.faith = scope:the_faith - is_adult = yes - NOR = { - has_trait = excommunicated - has_trait = incapable - has_trait = devoted - } - OR = { - AND = { - is_female = no - faith = { has_doctrine = doctrine_gender_male_dominated } - } - AND = { - is_female = yes - faith = { has_doctrine = doctrine_gender_female_dominated } - } - NOR = { - faith = { has_doctrine = doctrine_gender_male_dominated } - faith = { has_doctrine = doctrine_gender_female_dominated } - } - } - } - alternative_limit = { - this.faith = scope:the_faith - NOR = { - has_trait = excommunicated - has_trait = incapable - has_trait = devoted - } - OR = { - AND = { - is_female = no - faith = { has_doctrine = doctrine_gender_male_dominated } - } - AND = { - is_female = yes - faith = { has_doctrine = doctrine_gender_female_dominated } - } - NOR = { - faith = { has_doctrine = doctrine_gender_male_dominated } - faith = { has_doctrine = doctrine_gender_female_dominated } - } - } - } - alternative_limit = { - this.faith = scope:the_faith - NOR = { - has_trait = excommunicated - has_trait = incapable - has_trait = devoted - } - } - save_scope_as = title_recipient - } - } - scope:the_faith.great_holy_war = { - set_designated_winner = scope:title_recipient - } - } - else_if = { #If truly no character is available, just pick a random faithful. - limit = { - exists = scope:ghw_sponsor - exists = scope:the_faith.great_holy_war - scope:ghw_sponsor = { - any_courtier = { - is_adult = yes - is_ai = yes - NOR = { - has_trait = excommunicated - has_trait = incapable - has_trait = devoted - } - faith = scope:the_faith - } - } - } - scope:ghw_sponsor = { - random_courtier = { - limit = { - has_character_flag = flag_is_ghw_fallback_recipient - is_adult = yes - is_ai = yes - NOR = { - has_trait = excommunicated - has_trait = incapable - has_trait = devoted - } - faith = scope:the_faith - } - alternative_limit = { - scope:the_faith = { has_doctrine = doctrine_gender_male_dominated } - is_female = no - is_adult = yes - is_ai = yes - NOR = { - has_trait = excommunicated - has_trait = incapable - has_trait = devoted - } - faith = scope:the_faith - } - alternative_limit = { - scope:the_faith = { has_doctrine = doctrine_gender_female_dominated } - is_female = yes - is_adult = yes - is_ai = yes - NOR = { - has_trait = excommunicated - has_trait = incapable - has_trait = devoted - } - faith = scope:the_faith - } - alternative_limit = { - is_adult = yes - is_ai = yes - NOR = { - has_trait = excommunicated - has_trait = incapable - has_trait = devoted - } - faith = scope:the_faith - } - save_scope_as = title_recipient - } - } - scope:the_faith.great_holy_war = { - set_designated_winner = scope:title_recipient - } - } -} - -# SECRET FAITH EFFECTS - -# When someone is made to change their faith, find out which of their spouses/family will also convert. -# -# Expects: -# scope:recipient - who's spouses/family may also convert. -# -# Returns: -# List 'spouses_and_family_to_convert' - grabbed characters. -# -grab_spouses_and_family_to_convert_effect = { - scope:recipient = { - # Add yourself - add_to_list = spouses_and_family_to_convert - add_character_flag = spouse_or_family_to_convert - # Spouses convert - every_spouse = { - limit = { - OR = { - is_courtier_of = scope:actor - is_courtier_of = scope:recipient - is_vassal_of = scope:actor - is_vassal_of = scope:recipient - } - NOT = { has_character_flag = spouse_or_family_to_convert } - } - add_to_list = spouses_and_family_to_convert - add_character_flag = spouse_or_family_to_convert - } - # Family in recipient's court also convert - if = { - limit = { - is_ruler = yes - } - every_close_or_extended_family_member = { - custom = all_family_members_at_court - limit = { - employer ?= scope:recipient - faith = scope:recipient.faith - faith != scope:actor.faith - is_ai = yes - NOT = { has_character_flag = spouse_or_family_to_convert } - # Don't add the recipient twice - #root != scope:recipient - } - add_to_list = spouses_and_family_to_convert - add_character_flag = spouse_or_family_to_convert - } - } - } - every_in_list = { - list = spouses_and_family_to_convert - remove_character_flag = spouse_or_family_to_convert - } -} - -# Default conversion effect; allows the recipient to demure whether to keep a secret faith or not -demand_conversion_interaction_effect = { - - # Reward conversion - scope:actor = { mandala_converter_piety_effect = yes } - - # Grab additional converters, and present them in the tooltip. - grab_spouses_and_family_to_convert_effect = yes - show_as_tooltip = { - convert_family_to_faith_effect = { - FALSE_CONVERSION = no - FORCED = yes - } - } - every_in_list = { - list = spouses_and_family_to_convert - # Don't say that people can convert when you know they can't - if = { - limit = { - faith = scope:recipient.faith - NOT = { has_crypto_religionist_secret_known_by_character_trigger = { CHARACTER = scope:actor } } - NOT = { exists = secret_faith } - } - custom_tooltip = ask_for_conversion_interaction_accept_tooltip - } - } - - # Fire event that handles actual conversion. - scope:recipient = { - trigger_event = false_conversion.0900 - } -} - -# Switch a character to the specified faith and keep their old faith as a secret (or not) -# Assumes that spouses and family to convert have already been grabbed -convert_family_to_faith_effect = { - every_in_list = { - list = spouses_and_family_to_convert - # Make crypto-religionists of them, if applicable - if = { - limit = { - $FALSE_CONVERSION$ = yes - faith = scope:recipient.faith - } - scope:recipient.faith = { save_temporary_scope_as = old_faith } - set_character_faith = scope:actor.faith - make_character_crypto_religionist_effect = { CRYPTO_RELIGION = scope:old_faith } - # Grab the character's recently added crypto secret - if = { - limit = { - any_secret = { type = secret_crypto_religionist } - exists = secret_faith - # Ignore the crypto secret if it's not new - # This prevents the edge case of family members finding out about other family's different crypto faiths - secret_faith = scope:old_faith - } - random_secret = { - type = secret_crypto_religionist - save_scope_as = crypto_religionist_secret - } - } - # Make the secret known to all other family members - every_in_list = { - list = spouses_and_family_to_convert - if = { - limit = { - exists = scope:crypto_religionist_secret - prev != this - } - scope:crypto_religionist_secret = { - reveal_to_without_events_effect = { CHARACTER = prev } - } - } - } - } - else = { - set_character_faith = scope:actor.faith - } - if = { - limit = { - $FORCED$ = yes - } - hidden_effect = { - add_character_flag = { - flag = converted_by_forced_conversion_interaction - years = 5 - } - } - } - } - - scope:recipient = { - bastard_to_wild_oat_conversion_interaction_effect = yes - } - - # Struggle Catalysts. - if = { - limit = { - scope:recipient = { is_important_or_vip_struggle_character = yes } - scope:actor = { - any_character_struggle = { - involvement = involved - activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { - CATALYST = catalyst_demanding_important_conversion - CHAR = scope:recipient - } - } - } - } - scope:actor = { - every_character_struggle = { - involvement = involved - limit = { - activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { - CATALYST = catalyst_demanding_important_conversion - CHAR = scope:recipient - } - } - activate_struggle_catalyst = { - catalyst = catalyst_demanding_important_conversion - character = scope:actor - } - } - } - } -} - -make_character_crypto_religionist_effect = { - if = { - limit = { - NOR = { - any_secret = { type = secret_crypto_religionist } - exists = secret_faith - $CRYPTO_RELIGION$ = faith - } - } - hidden_effect = { set_character_secret_faith = $CRYPTO_RELIGION$ } - add_secret = { - type = secret_crypto_religionist - } - } -} - -make_county_crypto_religionists_effect = { - set_variable = { - name = false_convert - value = $FAITH$ - days = 18250 - } - add_county_modifier = { - modifier = false_convert_modifier - years = 50 - } -} - -# Makes the target a crypto-religionist of the root's faith and exposes both secrets to one another -# Owner_Crypto_Secret needs to be already scoped before calling this effect -spread_crypto_religion_to_target_effect = { - $TARGET$ = { - if = { - limit = { - NOT = { - any_secret = { type = secret_crypto_religionist } - } - } - - make_character_crypto_religionist_effect = { CRYPTO_RELIGION = scope:owner.secret_faith } - random_secret = { - type = secret_crypto_religionist - reveal_to_without_events_effect = { CHARACTER = root } - } - if = { - limit = { - NOT = { scope:owner_crypto_secret = { is_known_by = $TARGET$ } } - } - scope:owner_crypto_secret = { - reveal_to_without_events_effect = { CHARACTER = $TARGET$ } - } - } - } - } -} - -child_secret_faith_conversion_success_effect = { - scope:child = { - make_character_crypto_religionist_effect = { - CRYPTO_RELIGION = scope:guardian.secret_faith - } - } - # Notify the actor - scope:guardian = { - send_interface_message = { - type = event_religious_good - title = secret_faith.1001.message - left_icon = scope:child - scope:child = { - random_secret = { - type = secret_crypto_religionist - limit = { - NOT = { is_known_by = scope:guardian } - } - reveal_to = scope:guardian - } - add_opinion = { - target = PREV - modifier = impressed_opinion - opinion = 20 - } - } - random_secret = { - type = secret_crypto_religionist - limit = { - NOT = { is_known_by = scope:child } - } - reveal_to = scope:child - } - } - } -} - -child_secret_faith_conversion_failure_effect = { - scope:guardian = { - send_interface_toast = { - title = child_secret_faith_conversion_failure_effect.desc - left_icon = scope:child - scope:child = { - add_opinion = { - target = scope:guardian - modifier = suspicion_opinion - opinion = -15 - } - } - } - scope:guardian = { - if = { - limit = { this = root } - hidden_effect = { - add_opinion = { - target = scope:child - modifier = disappointed_opinion - opinion = -15 - } - } - } - else = { - add_opinion = { - target = scope:child - modifier = disappointed_opinion - opinion = -15 - } - } - } - } -} - -child_secret_faith_conversion_critical_failure_effect = { - hidden_effect = { - # Save and reveal secret - scope:guardian = { - random_secret = { - type = secret_crypto_religionist - save_scope_as = guardian_secret_faith_secret - if = { - limit = { NOT = { is_known_by = scope:child } } - reveal_to = scope:child - } - } - } - scope:child = { - # Inform the child's liege if relevant - if = { - limit = { - is_ruler = yes - NOR = { - liege = this - liege ?= scope:guardian - } - } - liege = { - send_interface_message = { - type = event_religious_neutral - title = child_secret_faith_conversion_critical_failure_effect.liege.desc - left_icon = scope:child - right_icon = scope:guardian - show_as_tooltip = { - scope:guardian_secret_faith_secret = { expose_secret = scope:child } - scope:child = { - add_opinion = { - target = scope:guardian - modifier = hate_opinion - opinion = -30 - } - } - } - } - } - } - } - } - scope:child = { - # Inform the child - send_interface_toast = { - type = event_religious_neutral - title = child_secret_faith_conversion_critical_failure_effect.desc - left_icon = scope:child - right_icon = scope:guardian - scope:guardian_secret_faith_secret = { expose_secret = scope:child } - add_opinion = { - target = scope:guardian - modifier = hate_opinion - opinion = -30 - } - } - } - scope:guardian = { - if = { - limit = { this = root } - hidden_effect = { - add_opinion = { - target = scope:child - modifier = hate_opinion - opinion = -30 - } - } - } - else = { - add_opinion = { - target = scope:child - modifier = hate_opinion - opinion = -30 - } - } - } -} - -new_faith_created_conversion_effect = { - # Convert Capital (if of same faith as recipient's old faith) - if = { - limit = { - scope:recipient = { - is_playable_character = yes - highest_held_title_tier > tier_barony - capital_county.faith = scope:recipient.faith - } - } - scope:recipient.capital_county = { - set_county_faith = scope:actor.faith - } - } - - # Convert family to new faith - grab_spouses_and_family_to_convert_effect = yes - convert_family_to_faith_effect = { - FALSE_CONVERSION = no - FORCED = yes - } -} - -adopt_religion_interaction_effect = { - # Convert Capital (if of same faith as recipient's old faith) - if = { - limit = { - scope:actor = { - highest_held_title_tier > tier_barony - capital_county.faith != scope:recipient.faith - } - } - scope:actor.capital_county = { - set_county_faith = scope:recipient.faith - } - } - - # Spouses and family adopt new faith - grab_spouses_and_family_to_convert_effect = yes - convert_family_to_faith_effect = { - FALSE_CONVERSION = no - FORCED = no - } -} - -sun_trial_death_effect = { - scope:prisoner = { - death = { - death_reason = death_sun_trial - killer = scope:imprisoner - } - } - - #Opinion penalties - every_close_or_extended_family_member = { - # Non-imprisoner-same-faith family upset that you threw their family out into the desert to die. - limit = { - this != scope:imprisoner - NOT = { faith = scope:imprisoner.faith } - } - custom = sun_trial_interaction.non_faith_family - add_opinion = { - target = scope:imprisoner - modifier = executed_close_family - } - } -} - -sun_trial_survival_effect = { - scope:prisoner = { - release_from_prison = yes - - # Non-imprisoner-same-faith are upset that you threw them out into the desert to die. - if = { - limit = { - NAND = { - faith = scope:imprisoner.faith - ai_zeal >= low_positive_ai_value - } - } - add_opinion = { - target = scope:imprisoner - modifier = angry_opinion - opinion = -40 - } - } - - # imprisoner-same-faith gain a bonus if they survive the sun trial. - if = { - limit = { - faith = scope:imprisoner.faith - } - add_character_modifier = { - modifier = blessed_by_the_sun_modifier - years = 15 - } - } - - # Don't notify the player that they were released from prison (they were already released as part of the interaction). - hidden_effect = { - add_character_flag = { - flag = block_for_prison_release_notification - days = 3 - } - } - } - scope:imprisoner = { - consume_imprisonment_reasons = scope:prisoner - hidden_effect = { - consume_imprisonment_reasons = scope:prisoner - consume_banish_reasons = scope:prisoner - consume_execute_reasons = scope:prisoner - consume_revoke_title_reason = scope:prisoner - } - } -} - -humsacd_a_hof_effect = { - if = { - limit = { - $SACRIFICER$.faith = { has_doctrine_parameter = human_sacrifice_active } - $SACRIFICED_HOF$.faith = { - religious_head = $SACRIFICED_HOF$ - NOT = { has_doctrine_parameter = human_sacrifice_active } - } - } - $SACRIFICER$ = { - # Save scopes for future events. - save_scope_as = sacrificer - # Forever tarnished to members of the faith. - add_to_variable_list = { - name = humsacd_hofs - target = $SACRIFICED_HOF$.faith - } - } - # Give $SACRIFICED_HOF$'s faith some fervour for this atrocity. - $SACRIFICED_HOF$ = { - # Save scopes for future events. - save_scope_as = sacrificed_hof - # Up fervour. - faith = { - change_fervor = { - value = hof_humsacd_fervour_gain - desc = fervor_sacrificed_our_head_of_faith - } - } - # Martyr the HoF explicitly if possible. - if = { - limit = { - OR = { - has_bad_nickname = yes - has_any_nickname = no - } - } - give_nickname = nick_the_martyr - } - } - # Inform players of the consequences. - ## Scope:sacrificer is now cheaper to holy war if they're a separate faith. - if = { - limit = { - scope:sacrificer.faith != scope:sacrificed_hof.faith - } - every_player = { - limit = { faith = scope:sacrificed_hof.faith } - trigger_event = fp1_other_decisions.0021 - } - } - # Inform scope:sacrificer about any consequences if appropriate. - scope:sacrificer = { - # ... Eventually. - if = { - limit = { - faith != scope:sacrificed_hof.faith - } - trigger_event = { - id = fp1_other_decisions.0022 - months = 1 - } - } - } - } -} - -give_piety_for_clinging_to_state_faith_effect = { - if = { - limit = { top_liege.primary_title.state_faith ?= scope:recipient.faith } - add_piety = 200 - } -} - -revel_in_pain_effect = { - #Get both rewards - if = { - limit = { has_trait = flagellant } - add_stress = medium_stress_loss - add_piety = major_piety_value - } - #Only Piety - else = { add_piety = major_piety_value } - - #Not already flagellant? - if = { - limit = { - NOT = { has_trait = flagellant } - } - random = { - chance = 20 - add_trait = flagellant - add_stress = medium_stress_loss - } - } - - increase_wounds_effect = { REASON = whipping } -} - -revel_in_pain_opinion_effect = { - if = { - limit = { this = scope:actor } - scope:actor = { - if = { - limit = { is_ai = yes } - add_opinion = { - modifier = attempted_transcendence_together_opinion - target = scope:recipient - opinion = 20 - } - } - } - } - if = { - limit = { this = scope:recipient } - scope:recipient = { - if = { - limit = { is_ai = yes } - add_opinion = { - modifier = attempted_transcendence_together_opinion - target = scope:actor - opinion = 20 - } - } - } - } -} diff --git a/N3OW/common/scripted_effects/00_roaming_effects.txt b/N3OW/common/scripted_effects/00_roaming_effects.txt deleted file mode 100644 index 51056a6d..00000000 --- a/N3OW/common/scripted_effects/00_roaming_effects.txt +++ /dev/null @@ -1,145 +0,0 @@ -################### -# Roaming Effects # -################### - -roaming_fame_reward_APA_effect = { - if = { - limit = { - has_perk = roaming_perk - } - custom_tooltip = roaming_fame_$REWARD$_tt - add_prestige_experience = { value = roaming_reward_fame_$REWARD$ } - roaming_tally_variable_effect = { TYPE = fame VALUE = roaming_reward_fame_$REWARD$ } - } -} - -roaming_stress_reward_APA_effect = { - add_stress = $REWARD$ - roaming_tally_variable_effect = { TYPE = stress VALUE = $REWARD$ } -} - -roaming_gold_reward_APA_effect = { - add_gold = $REWARD$ - roaming_tally_variable_effect = { TYPE = gold VALUE = $REWARD$ } -} - -roaming_mystic_xp_APA_effect = { - if = { - limit = { - has_trait = lifestyle_mystic - } - add_trait_xp = { - trait = lifestyle_mystic - value = $REWARD$ - } - roaming_tally_variable_effect = { TYPE = mystic_xp VALUE = $REWARD$ } - } -} - -roaming_tally_variable_effect = { - if = { - limit = { - has_variable = roaming_tally_$TYPE$ - } - change_variable = { - name = roaming_tally_$TYPE$ - add = $VALUE$ - } - } - else = { - set_variable = { - name = roaming_tally_$TYPE$ - value = $VALUE$ - } - } -} - -roaming_pondering_stone_effect = { - involved_activity = { - add_activity_log_entry = { - key = roaming_pondering_stone_key - tags = { activity_log } - character = scope:host - root = { - send_interface_toast = { - title = bp3_roaming.0100.a.flavor - add_character_modifier = { - modifier = pondering_$TYPE$_modifier - years = 5 - } - } - } - } - } -} - -roaming_tally_stress_impact_effect = { - if = { - limit = { - has_trait = $TRAIT$ - } - roaming_tally_variable_effect = { TYPE = stress VALUE = $VALUE$ } - } -} - -roaming_fame_reward_event_effect = { - if = { - limit = { - has_perk = roaming_perk - } - save_scope_value_as = { - name = fame_value - value = $VALUE$ - } - custom_tooltip = { - text = roaming_fame_reward_tt - add_prestige_experience = $VALUE$ - } - roaming_tally_variable_effect = { TYPE = fame VALUE = $VALUE$ } - } -} - -roaming_progress_events_reward_effect = { - involved_activity = { - add_activity_log_entry = { - key = $LOG_KEY$ - tags = { activity_log } - character = root - root = { - if = { - limit = { - has_activity_intent = roaming_storyteller_intent - } - roaming_fame_reward_event_effect = { VALUE = roaming_reward_fame_small } - } - else_if = { - limit = { - exists = scope:special_guest - has_activity_intent = roaming_befriend_intent - } - scope:special_guest = { - reverse_add_opinion = { - modifier = friendliness_opinion - target = root - opinion = 15 - } - roaming_tally_variable_effect = { TYPE = opinion VALUE = 10 } - } - root = { - reverse_add_opinion = { - modifier = friendliness_opinion - target = scope:special_guest - opinion = 15 - } - roaming_tally_variable_effect = { TYPE = opinion VALUE = 10 } - } - } - else = { - stress_impact = { base = miniscule_stress_impact_loss } - roaming_tally_variable_effect = { TYPE = stress VALUE = miniscule_stress_impact_loss } - } - } - } - } -} - diff --git a/N3OW/common/scripted_effects/00_romance_effects.txt b/N3OW/common/scripted_effects/00_romance_effects.txt deleted file mode 100644 index 71766b81..00000000 --- a/N3OW/common/scripted_effects/00_romance_effects.txt +++ /dev/null @@ -1,1208 +0,0 @@ - -##################################################################### -# EFFECT LIST -##################################################################### -# !!! Remember to add all new effects with a short description here !!! - -#casual_sex_or_lover_event_effect - triggers an event about two characters after they've had sex to determine if it was just casual or if there's something more going on - -##################################################################### -# EFFECTS -##################################################################### - -love_letter_calculation_effect = { - hidden_effect = { - save_scope_as = letterAuthor - duel = { - skill = diplomacy - value = 10 - 25 = { - compare_modifier = { - value = scope:duel_value - } - set_variable = { - name = love_letter_quality - value = 4 - } - } - 25 = { - compare_modifier = { - value = scope:duel_value - } - set_variable = { - name = love_letter_quality - value = 3 - } - } - 25 = { - set_variable = { - name = love_letter_quality - value = 2 - } - } - 25 = { - compare_modifier = { - value = scope:duel_value - multiplier = -0.5 - } - set_variable = { - name = love_letter_quality - value = 1 - } - } - } - } -} - -lover_activity_set_variable_effect = { - hidden_effect = { - random_list = { - 10 = { #No trigger, always available - modifier = { - OR = { - has_trait = lifestyle_herbalist - has_trait = shy - } - factor = 5 - } - set_variable = { - name = lover_activity - value = flag:garden_walk - days = 1 - } - } - 10 = { #No trigger, always available - modifier = { - OR = { - has_trait = gregarious - has_trait = gluttonous - } - factor = 5 - } - set_variable = { - name = lover_activity - value = flag:dinner - days = 1 - } - } - 10 = { #No trigger, always available - modifier = { - has_trait = greedy - factor = 5 - } - set_variable = { - name = lover_activity - value = flag:buy_gift - days = 1 - } - } - 10 = { - trigger = { - NOR = { - has_trait = shy - has_trait = callous - has_trait = sadistic - } - NOT = { PREV = { has_trait = shy } } - } - modifier = { - OR = { - has_trait = diplomat - has_trait = gregarious - } - factor = 5 - } - set_variable = { - name = lover_activity - value = flag:social_events - days = 1 - } - } - 10 = { - trigger = { - PREV = { stewardship > 10 } - NOT = { has_trait = greedy } - NOT = { PREV = { has_trait = generous } } - } - set_variable = { - name = lover_activity - value = flag:play_games - days = 1 - } - } - 5 = { - trigger = { - NOR = { - has_trait = shy - has_trait = temperate - } - NOT = { PREV = { has_trait = temperate } } - } - modifier = { - OR = { - has_trait = lifestyle_reveler - has_trait = drunkard - } - factor = 10 - } - set_variable = { - name = lover_activity - value = flag:drink - days = 1 - } - } - 10 = { - trigger = { - NOR = { - has_trait = craven - has_trait = physique_bad_1 - has_trait = physique_bad_2 - has_trait = physique_bad_3 - } - PREV = { - NOR ={ - has_trait = craven - has_trait = physique_bad_1 - has_trait = physique_bad_2 - has_trait = physique_bad_3 - } - } - } - modifier = { - has_trait = lifestyle_hunter - factor = 5 - } - set_variable = { - name = lover_activity - value = flag:go_hunting - days = 1 - } - } - 10 = { - trigger = { - NOR = { - has_trait = cynical - has_trait = impatient - } - PREV = { - NOR = { - has_trait = cynical - has_trait = impatient - } - } - } - set_variable = { - name = lover_activity - value = flag:stargaze - days = 1 - } - } - 10 = { - trigger = { - NOT = { has_trait = humble } - } - modifier = { - has_trait = arrogant - factor = 5 - } - set_variable = { - name = lover_activity - value = flag:flatter - days = 1 - } - } - 10 = { - trigger = { - NOT = { - has_trait = cynical - } - PREV = { NOT = { has_trait = cynical } } - religion = PREV.religion - } - modifier = { - has_trait = zealous - factor = 5 - } - set_variable = { - name = lover_activity - value = flag:talk_about_god - days = 1 - } - } - 10 = { - trigger = { - NOR = { - has_trait = craven - has_trait = physique_bad_1 - has_trait = physique_bad_2 - has_trait = physique_bad_3 - } - PREV = { - NOR ={ - has_trait = craven - has_trait = physique_bad_1 - has_trait = physique_bad_2 - has_trait = physique_bad_3 - } - } - } - modifier = { - has_trait = brave - factor = 5 - } - set_variable = { - name = lover_activity - value = flag:go_adventuring - days = 1 - } - } - 10 = { - trigger = { - NOT = { has_trait = cynical } - PREV = { NOT = { has_trait = cynical } } - } - modifier = { - OR = { - has_trait = family_first - has_trait = gregarious - has_trait = ambitious - has_trait = pregnant - } - factor = 5 - } - set_variable = { - name = lover_activity - value = flag:talk_about_future - days = 1 - } - } - 10 = { - trigger = { - NOT = { - has_trait = calm - } - OR = { - opinion = { target = PREV value < 15 } - reverse_opinion = { target = PREV value < 15 } - has_trait = wrathful - } - PREV = { NOT = { has_trait = calm } } - } - modifier = { - OR = { - opinion = { target = PREV value < 0 } - reverse_opinion = { target = PREV value < 0 } - has_trait = wrathful - } - factor = 5 - } - set_variable = { - name = lover_activity - value = flag:fight - days = 1 - } - } - 10 = { - trigger = { - OR = { - learning = 12 - has_trait = scholar - } - PREV = { learning = 10 } - } - modifier = { - has_trait = scholar - factor = 5 - } - set_variable = { - name = lover_activity - value = flag:discuss_books - days = 1 - } - } - 10 = { - trigger = { - NOR = { - has_trait = celibate - has_trait = chaste - } - PREV = { - NOR = { - has_trait = celibate - has_trait = chaste - } - } - } - modifier = { - OR = { - has_trait = seducer - has_trait = lustful - has_trait = deviant - } - factor = 5 - } - set_variable = { - name = lover_activity - value = flag:lovemaking - days = 1 - } - } - } - } -} - -lover_activity_remove_flag_effect = { - -} - - - - -had_sex_with_effect = { - save_scope_as = had_sex_root_character - $CHARACTER$ = { save_scope_as = had_sex_with_effect_partner } - - # Error logging - ## Children should never run this effect. - if = { - limit = { - OR = { - scope:had_sex_root_character = { is_adult = no } - scope:had_sex_with_effect_partner = { is_adult = no } - } - } - error_log = "Trying to run had_sex_with_effect but one or more partners is a child" - } - ## Did you forget to run the check for whether adultery was valid? - if = { - limit = { - # Rarely, we may also want to block this check (e.g., seduction schemes or monogamous threesomes). - NOT = { exists = scope:ignore_cheating_error_check } - } - # Check whether the root char is cheating. - if = { - limit = { - scope:had_sex_root_character = { - NOR = { - is_consort_of = scope:had_sex_with_effect_partner - has_relation_lover = scope:had_sex_with_effect_partner - } - might_cheat_on_every_partner_trigger = no - } - } - # The weird structure here is so that we can use prev scope in loc to grab both chars. - scope:had_sex_with_effect_partner = { - scope:had_sex_root_character = { error_log = had_sex_with_effect.log.root_cheated_inappropriately } - } - } - # Check whether their partner is cheating. - ## Though this does lead to potential duplication in the error log, where you'll get an entry for X cheating with Y _and_ for Y cheating with X, it is necessary: it's perfectly possible for one char to be cheating but the other not. - if = { - limit = { - scope:had_sex_with_effect_partner = { - NOR = { - is_consort_of = scope:had_sex_root_character - has_relation_lover = scope:had_sex_root_character - } - might_cheat_on_every_partner_trigger = no - } - } - # The weird structure here is so that we can use prev scope in loc to grab both chars. - scope:had_sex_root_character = { - scope:had_sex_with_effect_partner = { error_log = had_sex_with_effect.log.target_cheated_inappropriately } - } - } - } - ### Plus, remove the blocking scope we might have. - clear_saved_scope = ignore_cheating_error_check - - if = { - limit = { this = root } - custom_tooltip = had_sex_with_effect.first_person.tt - } - else_if = { - limit = { root = scope:had_sex_with_effect_partner } - custom_tooltip = had_sex_with_effect.other_person.tt - } - else = { - custom_tooltip = had_sex_with_effect.third_person.tt - } - - create_character_memory = { - type = had_sex - participants = { - sex_partner = scope:had_sex_with_effect_partner - } - } - - #Stress - if = { - limit = { # For use with events that add/remove more stress than these values, to avoid ugly tooltips - NOT = { - has_character_flag = no_sex_stress_loss - } - } - $CHARACTER$ = { - if = { - limit = { this = root } - stress_impact = { - lustful = minor_stress_impact_loss - rakish = minor_stress_impact_loss - } - } - else = { - hidden_effect = { - stress_impact = { - lustful = minor_stress_impact_loss - rakish = minor_stress_impact_loss - } - } - } - } - if = { - limit = { this = root } - stress_impact = { - lustful = minor_stress_impact_loss - rakish = minor_stress_impact_loss - } - } - else = { - hidden_effect = { - stress_impact = { - lustful = minor_stress_impact_loss - rakish = minor_stress_impact_loss - } - } - } - } - - #Pregnancy & story cycles - hidden_effect = { - if = { - limit = { - is_female = yes - $CHARACTER$ = { is_male = yes } - possible_pregnancy_after_sex_with_character_trigger = { CHARACTER = scope:had_sex_with_effect_partner } - } - add_to_variable_list = { - name = potential_father_variable_list - target = $CHARACTER$ - } - random = { - chance = $PREGNANCY_CHANCE$ - make_pregnant = { - father = $CHARACTER$ - } - } - if = { - limit = { - is_ai = no - NOT = { has_character_flag = had_story_cycle_peasant_affair } - is_ruler = yes - $CHARACTER$ = { - is_lowborn = yes - is_playable_character = no - is_courtier = no - } - NOT = { - any_scheme = { - scheme_target_character = $CHARACTER$ - } - } - } - set_variable = { - name = story_peasant_affair_target - value = $CHARACTER$ - } - create_story = story_peasant_affair - } - } - else_if = { - limit = { - is_male = yes - $CHARACTER$ = { is_female = yes } - possible_pregnancy_after_sex_with_character_trigger = { CHARACTER = scope:had_sex_with_effect_partner } - } - $CHARACTER$ = { - add_to_variable_list = { - name = potential_father_variable_list - target = scope:had_sex_root_character - } - } - if = { - limit = { - is_ai = no - NOT = { has_character_flag = had_story_cycle_peasant_affair } - is_ruler = yes - $CHARACTER$ = { - is_lowborn = yes - is_playable_character = no - is_courtier = no - } - NOT = { - any_scheme = { - scheme_target_character ?= $CHARACTER$ - } - } - } - set_variable = { - name = story_peasant_affair_target - value = $CHARACTER$ - } - $CHARACTER$ = { - if = { - limit = { - is_pregnant = no - fertility >= 0.1 - is_visibly_fertile = yes - } - random = { - chance = $PREGNANCY_CHANCE$ - add_character_flag = { - flag = peasant_is_pregnant - days = 560 - } - } - } - } - create_story = story_peasant_affair - } - else = { - $CHARACTER$ = { - random = { - chance = $PREGNANCY_CHANCE$ - make_pregnant = { - father = scope:had_sex_root_character - } - } - } - } - } - - #STD transmission - risk_of_std_from_effect = { PARTNER = $CHARACTER$ } - hidden_effect = { - $CHARACTER$ = { risk_of_std_from_effect = { PARTNER = scope:had_sex_root_character } } - } - - #Adultery suspicion - hidden_effect = { - if = { - limit = { - OR = { - is_married = yes - is_concubine = yes - } - NOR = { - any_consort = { this = $CHARACTER$ } - AND = { - house.house_head ?= this - house ?= { has_house_power_parameter = aspect_of_creation } - } - } - } - set_variable = { - name = had_recent_sex_with - value = $CHARACTER$ - days = 1000 - } - random = { - chance = 50 #This should be quite high as there is a chance that adultery.0001 "fails" i.e. spouse doesn't realize - every_relation = { - type = soulmate - limit = { - NOT = { this = $CHARACTER$ } #Soulmates should not grow suspicous of adulterous affairs after sleeping with their lover - } - add_to_temporary_list = partners_1 - } - every_consort = { - add_to_temporary_list = partners_1 - } - random_in_list = { - list = partners_1 - limit = { is_ai = no } - alternative_limit = { always = yes } - trigger_event = { - id = adultery.0001 - days = { 14 365 } - } - } - } - } - $CHARACTER$ = { - if = { - limit = { - OR = { - is_married = yes - is_concubine = yes - } - NOR = { - any_consort = { this = scope:had_sex_root_character } - AND = { - house.house_head ?= this - house ?= { has_house_power_parameter = aspect_of_creation } - } - } - } - set_variable = { - name = had_recent_sex_with - value = scope:had_sex_root_character - days = 1000 - } - random = { - chance = 50 #This should be quite high as there is a chance that adultery.0001 "fails" i.e. spouse doesn't realize - every_relation = { - type = soulmate - limit = { - this != scope:had_sex_root_character #Soulmates should not grow suspicous of adulterous affairs after sleeping with their lover - } - add_to_temporary_list = partners_2 - } - every_consort = { - add_to_temporary_list = partners_2 - } - random_in_list = { - list = partners_2 - limit = { is_ai = no } - alternative_limit = { always = yes } - trigger_event = { - id = adultery.0001 - days = { 14 365 } - } - } - } - } - } - } - - #Incestuous Relations - give_incest_secret_or_nothing_with_target_effect = { CHARACTER = $CHARACTER$ } - hidden_effect = { - $CHARACTER$ = { give_incest_secret_or_nothing_with_target_effect = { CHARACTER = scope:had_sex_root_character } } - } - - #Homosexuality - give_homosexual_secret_or_nothing_with_target_effect = { CHARACTER = $CHARACTER$ } - hidden_effect = { - $CHARACTER$ = { give_homosexual_secret_or_nothing_with_target_effect = { CHARACTER = scope:had_sex_root_character } } - } - } - - #Violet Poet trait - if = { - limit = { - scope:had_sex_root_character = { - has_trait = violet_poet - } - } - scope:had_sex_root_character = { - add_trait_xp = { - trait = violet_poet - value = { - integer_range = { - min = 5 - max = 10 - } - } - } - } - } - if = { - limit = { - scope:had_sex_with_effect_partner = { - has_trait = violet_poet - } - } - scope:had_sex_with_effect_partner = { - add_trait_xp = { - trait = violet_poet - value = { - integer_range = { - min = 5 - max = 10 - } - } - } - } - } - - # Achievements - fp2_had_friend_with_benefits = yes # FP2 History's Best Friend -} - -#For having sex with "someone" (not a character) -had_sex_with_unknown_effect = { - save_temporary_scope_value_as = { - name = gender - value = flag:$GENDER$ - } - - #Error logging - if = { - limit = { - is_adult = no - } - error_log = "Trying to run had_sex_with_unknown_effect on a child" - } - - #Stress release - if = { - limit = { - OR = { - has_trait = lustful - has_trait = lifestyle_reveler - } - } - add_stress = minor_stress_loss - } - - #Sodomy - if = { - limit = { scope:gender = flag:male } - give_homosexual_secret_or_nothing_with_target_effect = { CHARACTER = dummy_male } - } - - hidden_effect = { - #Adultery suspicion - set_variable = { - name = had_recent_sex - value = flag:$GENDER$ - } - random = { - chance = 5 - random_spouse = { - limit = { is_ai = no } - alternative_limit = { always = yes } - trigger_event = adultery.0001 - } - } - - #STD transmission - random_list = { - 95 = { - #Nothing - } - 4 = { - contract_disease_notify_effect = { DISEASE = lovers_pox } - } - 1 = { - contract_disease_notify_effect = { DISEASE = great_pox } - } - } - } -} - -#Run in the scope of the character breaking things off -lose_lover_effect = { - if = { - limit = { - has_relation_lover = $LOVER$ - } - remove_relation_lover = $LOVER$ - } - #To clear flags - if = { - limit = { - has_character_flag = can_be_confronted_about_lover_exclusivity - } - remove_character_flag = can_be_confronted_about_lover_exclusivity - } - if = { - limit = { - $LOVER$ = { - has_character_flag = can_be_confronted_about_lover_exclusivity - } - } - $LOVER$ = { - remove_character_flag = can_be_confronted_about_lover_exclusivity - } - } - - #To remove the object of importance if it exists - if = { - limit = { - has_variable_list = lover_object_of_importance - is_target_in_variable_list = { - name = lover_object_of_importance - target = $LOVER$ - } - } - clear_variable_list = lover_object_of_importance - } - else_if = { - limit = { - has_variable_list = lover_object_of_importance_2 - is_target_in_variable_list = { - name = lover_object_of_importance_2 - target = $LOVER$ - } - } - clear_variable_list = lover_object_of_importance_2 - } - else_if = { - limit = { - $LOVER$ = { - has_variable_list = lover_object_of_importance - is_target_in_variable_list = { - name = lover_object_of_importance - target = prev - } - } - } - $LOVER$ = { clear_variable_list = lover_object_of_importance } - } - else_if = { - limit = { - $LOVER$ = { - has_variable_list = lover_object_of_importance_2 - is_target_in_variable_list = { - name = lover_object_of_importance_2 - target = prev - } - } - } - $LOVER$ = { clear_variable_list = lover_object_of_importance_2 } - } -} - - - -#Which one of the two characters do I love the most? -whom_do_i_love_the_most_effect = { - if = { - limit = { - has_opinion_modifier = { - target = $CHARACTER1$ - modifier = love_opinion - value >= 0 - } - has_opinion_modifier = { - target = $CHARACTER2$ - modifier = love_opinion - value >= 0 - } - } - if = { - limit = { - has_opinion_modifier = { - target = $CHARACTER1$ - modifier = love_opinion - value >= 10 - } - has_opinion_modifier = { - target = $CHARACTER2$ - modifier = love_opinion - value >= 10 - } - } - if = { - limit = { - has_opinion_modifier = { - target = $CHARACTER1$ - modifier = love_opinion - value >= 20 - } - has_opinion_modifier = { - target = $CHARACTER2$ - modifier = love_opinion - value >= 20 - } - } - if = { - limit = { - has_opinion_modifier = { - target = $CHARACTER1$ - modifier = love_opinion - value >= 30 - } - has_opinion_modifier = { - target = $CHARACTER2$ - modifier = love_opinion - value >= 30 - } - } - if = { - limit = { - has_opinion_modifier = { - target = $CHARACTER1$ - modifier = love_opinion - value >= 40 - } - has_opinion_modifier = { - target = $CHARACTER2$ - modifier = love_opinion - value >= 40 - } - } - if = { - limit = { - has_opinion_modifier = { - target = $CHARACTER1$ - modifier = love_opinion - value >= 50 - } - has_opinion_modifier = { - target = $CHARACTER2$ - modifier = love_opinion - value >= 50 - } - } - if = { - limit = { - has_opinion_modifier = { - target = $CHARACTER1$ - modifier = love_opinion - value >= 60 - } - has_opinion_modifier = { - target = $CHARACTER2$ - modifier = love_opinion - value >= 60 - } - } - if = { - limit = { - has_opinion_modifier = { - target = $CHARACTER1$ - modifier = love_opinion - value >= 70 - } - has_opinion_modifier = { - target = $CHARACTER2$ - modifier = love_opinion - value >= 70 - } - } - if = { - limit = { - has_opinion_modifier = { - target = $CHARACTER1$ - modifier = love_opinion - value >= 80 - } - has_opinion_modifier = { - target = $CHARACTER2$ - modifier = love_opinion - value >= 80 - } - } - random_list = { - 50 = { - $CHARACTER1$ = { save_scope_as = most_beloved } - } - 50 = { - $CHARACTER2$ = { save_scope_as = most_beloved } - } - } - } - else_if = { - limit = { - has_opinion_modifier = { - target = $CHARACTER1$ - modifier = love_opinion - value >= 80 - } - } - $CHARACTER1$ = { save_scope_as = most_beloved } - } - else_if = { - limit = { - has_opinion_modifier = { - target = $CHARACTER2$ - modifier = love_opinion - value >= 80 - } - } - $CHARACTER2$ = { save_scope_as = most_beloved } - } - } - else_if = { - limit = { - has_opinion_modifier = { - target = $CHARACTER1$ - modifier = love_opinion - value >= 70 - } - } - $CHARACTER1$ = { save_scope_as = most_beloved } - } - else_if = { - limit = { - has_opinion_modifier = { - target = $CHARACTER2$ - modifier = love_opinion - value >= 70 - } - } - $CHARACTER2$ = { save_scope_as = most_beloved } - } - } - else_if = { - limit = { - has_opinion_modifier = { - target = $CHARACTER1$ - modifier = love_opinion - value >= 60 - } - } - $CHARACTER1$ = { save_scope_as = most_beloved } - } - else_if = { - limit = { - has_opinion_modifier = { - target = $CHARACTER2$ - modifier = love_opinion - value >= 60 - } - } - $CHARACTER2$ = { save_scope_as = most_beloved } - } - } - else_if = { - limit = { - has_opinion_modifier = { - target = $CHARACTER1$ - modifier = love_opinion - value >= 50 - } - } - $CHARACTER1$ = { save_scope_as = most_beloved } - } - else_if = { - limit = { - has_opinion_modifier = { - target = $CHARACTER2$ - modifier = love_opinion - value >= 50 - } - } - $CHARACTER2$ = { save_scope_as = most_beloved } - } - } - else_if = { - limit = { - has_opinion_modifier = { - target = $CHARACTER1$ - modifier = love_opinion - value >= 40 - } - } - $CHARACTER1$ = { save_scope_as = most_beloved } - } - else_if = { - limit = { - has_opinion_modifier = { - target = $CHARACTER2$ - modifier = love_opinion - value >= 40 - } - } - $CHARACTER2$ = { save_scope_as = most_beloved } - } - } - else_if = { - limit = { - has_opinion_modifier = { - target = $CHARACTER1$ - modifier = love_opinion - value >= 30 - } - } - $CHARACTER1$ = { save_scope_as = most_beloved } - } - else_if = { - limit = { - has_opinion_modifier = { - target = $CHARACTER2$ - modifier = love_opinion - value >= 30 - } - } - $CHARACTER2$ = { save_scope_as = most_beloved } - } - } - else_if = { - limit = { - has_opinion_modifier = { - target = $CHARACTER1$ - modifier = love_opinion - value >= 20 - } - } - $CHARACTER1$ = { save_scope_as = most_beloved } - } - else_if = { - limit = { - has_opinion_modifier = { - target = $CHARACTER2$ - modifier = love_opinion - value >= 20 - } - } - $CHARACTER2$ = { save_scope_as = most_beloved } - } - } - else_if = { - limit = { - has_opinion_modifier = { - target = $CHARACTER1$ - modifier = love_opinion - value >= 10 - } - } - $CHARACTER1$ = { save_scope_as = most_beloved } - } - else_if = { - limit = { - has_opinion_modifier = { - target = $CHARACTER2$ - modifier = love_opinion - value >= 10 - } - } - $CHARACTER2$ = { save_scope_as = most_beloved } - } - } - else_if = { - limit = { - has_opinion_modifier = { - target = $CHARACTER1$ - modifier = love_opinion - value >= 0 - } - } - $CHARACTER1$ = { save_scope_as = most_beloved } - } - else_if = { - limit = { - has_opinion_modifier = { - target = $CHARACTER2$ - modifier = love_opinion - value >= 0 - } - } - $CHARACTER2$ = { save_scope_as = most_beloved } - } - else = { - random_list = { - 50 = { - $CHARACTER1$ = { save_scope_as = most_beloved } - } - 50 = { - $CHARACTER2$ = { save_scope_as = most_beloved } - } - } - } -} - -casual_sex_or_lover_event_effect = { - $CHARACTER_2$ = { save_scope_as = married_seducer } - $CHARACTER_1$ = { - trigger_event = { - id = yearly.1002 - days = $DAYS$ - } - } -} - - diff --git a/N3OW/common/scripted_effects/00_scheme_scripted_effects.txt b/N3OW/common/scripted_effects/00_scheme_scripted_effects.txt deleted file mode 100644 index 06557ac4..00000000 --- a/N3OW/common/scripted_effects/00_scheme_scripted_effects.txt +++ /dev/null @@ -1,16643 +0,0 @@ -########################## -# Scheme Scripted Effects -########################## - -################################################## -# General Scheme Effects - -try_to_force_assign_character_to_random_agent_slot_effect = { - if = { - limit = { - $CHAR$ = { is_valid_as_agent_in_any_slot = $SCHEME$ } - } - force_assign_character_to_random_agent_slot_effect = { - SCHEME = $SCHEME$ - CHAR = $CHAR$ - YEARS = $YEARS$ - } - } -} - -force_assign_character_to_random_agent_slot_effect = { - $SCHEME$ = { - random_scheme_agent_slot = { - limit = { - is_filled = no - save_temporary_scope_as = slot_temp - $CHAR$ = { is_valid_as_agent_in_slot = scope:slot_temp } - } - save_scope_as = valid_slot - } - } - $CHAR$ = { - force_add_to_agent_slot = { - agent_slot = scope:valid_slot - years = $YEARS$ - } - } -} - -increment_breaches_with_message_effect = { - scope:owner = { - send_interface_toast = { - type = msg_scheme_breached - title = feed_message.t.scheme_breached - left_icon = scope:target - scope:scheme = { add_scheme_breach = 1 } - play_sound_effect = "event:/DLC/EP3/SFX/Stingers/Scheme_Rework/ep3_mx_sting_schemerework_scheme_suffering_breaches" - } - } -} - -################################################## -# Ending Effects - -# What percentage chance is there that a scheme will be discovered per month? -## tl;dr = generally, 10% of 100 - secrecy rating. So if you have 60% secrecy, that's a 4% chance per month. -hostile_scheme_monthly_discovery_chance_effect = { - # If we're in the first X months of a scheme, give a grace period. - if = { - limit = { - has_variable = secrecy_grace_period - var:secrecy_grace_period >= 1 - } - change_variable = { - name = secrecy_grace_period - add = -1 - } - } - # Otherwise we want to start checking for discovery. - else_if = { - # Without a spymaster, you can't discover schemes. - ## This isn't tooltipped for the person doing the scheming: communicating it (and when it turns on, and when it turns off) would be erratic and spammy, so we just let them think they're getting nice'n'lucky. - limit = { - scope:scheme = { - # Character - trigger_if = { - limit = { exists = scheme_target_character.host } - scheme_target_character.host = { save_temporary_scope_as = breach_host_temp } - } - # Title - trigger_else_if = { - limit = { exists = scheme_target_title.holder } - scheme_target_title.holder = { save_temporary_scope_as = breach_host_temp } - } - # Fallback - trigger_else = { always = no } - scope:breach_host_temp ?= { - # Second for Adventurers - trigger_if = { - limit = { has_government = landless_adventurer_government } - court_position:second_camp_officer ?= { save_temporary_scope_as = breach_maker_temp } - } - # Spymaster for everyone else - trigger_else = { - cp:councillor_spymaster ?= { save_temporary_scope_as = breach_maker_temp } - } - } - } - } - # Sort scopes. - ## Vs. titles. - if = { - limit = { exists = scope:target.holder } - scope:target.holder = { save_scope_as = target } - } - ## Vs. characters. - else = { - scope:target = { save_scope_as = target } - } - ## Nab the spymaster too. - scope:breach_maker_temp = { save_scope_as = spymaster } - # Alright, now we roll for discovery. - # Save chance for simple debugging - save_scope_value_as = { - name = discovery_chance - value = monthly_scheme_discovery_chance_value - } - ## ... if scope:target lives at scope:owner's court. - if = { - limit = { - scope:breach_host_temp = scope:owner - scope:owner != scope:target - NOT = { exists = scope:scheme.var:had_self_court_discovery } - } - random = { - chance = scope:discovery_chance - # Either increment breaches. - if = { - limit = { scheme_breaches >= scheme_breaches_about_to_hit_limit_value } - increment_breaches_with_message_effect = yes - } - # Or expose us generally. - else = { - add_scheme_breach = 1 - scheme_owner = { play_sound_effect = "event:/DLC/EP3/SFX/Stingers/Scheme_Rework/ep3_mx_sting_schemerework_scheme_suffering_breaches" } - set_variable = { - name = had_self_court_discovery - value = yes - years = 3 - } - scope:owner = { - if = { - limit = { - scope:scheme = { is_savable_murder_scheme_trigger = yes } - } - trigger_event = hostile_scheme_discovery.4002 - } - else = { trigger_event = hostile_scheme_discovery.4001 } - } - # Flag that we're discovering something so that on-going events don't fire. - save_scope_value_as = { - name = discovery_event_happening - value = yes - } - } - } - } - ## ... otherwise they're at different courts. - else_if = { - limit = { - NOR = { - # You won't expose your own Scheme - scope:owner = scope:target - # Spymaster won't expose their own Scheme - scope:owner = scope:spymaster - # Spymaster won't expose *your* (liege's) Scheme - scope:owner = scope:spymaster.liege - # Spymaster won't expose a scheme if they are an agent of it - ## Secrecy is still relevant, you can still be discovered, just not on the monthly tick. - scheme_is_character_agent = scope:spymaster - } - } - # Roll to see whether we discover something. - random = { - chance = scope:discovery_chance - # If the scheme isn't exposed, then we do that first. - if = { - limit = { is_scheme_exposed = no } - # Increment our breaches. - increment_breaches_with_message_effect = yes - # Fire off an actual warning event. - scope:target_character.host ?= { trigger_event = hostile_scheme_discovery.2001 } - # Flag that we're discovering something so that on-going events don't fire. - save_scope_value_as = { - name = discovery_event_happening - value = yes - } - } - # Else, that means we've hit the limit for the scheme, so we discover and destroy it. - else_if = { - limit = { scheme_breaches >= scheme_breaches_about_to_hit_limit_value } - # Don't forget to increment breaches to max. - add_scheme_breach = 1 - scheme_owner = { play_sound_effect = "event:/DLC/EP3/SFX/Stingers/Scheme_Rework/ep3_mx_sting_schemerework_scheme_suffering_breaches" } - # Fire off the correct event. - scope:target_character.host ?= { trigger_event = hostile_scheme_discovery.1002 } - # Flag that we're discovering something so that on-going events don't fire. - save_scope_value_as = { - name = discovery_event_happening - value = yes - } - } - # Otherwise, we want to discover an agent. - else = { - # Increment our breaches. - increment_breaches_with_message_effect = yes - # And reveal an agent, if we can. - if = { - limit = { - any_scheme_agent_character = { - is_alive = yes - agent_valid_to_be_discovered_by_spymaster = yes - } - } - ordered_scheme_agent_character = { - limit = { - is_alive = yes - agent_valid_to_be_discovered_by_spymaster = yes - } - # Get the least stealthy agent. - order_by = { - value = 100 - subtract = intrigue - } - save_scope_as = agent - } - # If we have a candidate, reveal them. - scope:target_character.host ?= { trigger_event = hostile_scheme_discovery.1001 } - # Flag that we're discovering something so that on-going events don't fire. - save_scope_value_as = { - name = discovery_event_happening - value = yes - } - } - } - } - } - } -} - -# Sort the ending for a scheme. -generic_scheme_process_ending_effect = { - # Grab our scopes. - save_scope_as = scheme - scheme_owner = { save_scope_as = owner } - ## Targets. - scheme_target_character ?= { save_scope_as = target } - scheme_target_culture ?= { save_scope_as = target } - scheme_target_faith ?= { save_scope_as = target } - scheme_target_title ?= { save_scope_as = target } - # Success roll. - random = { - chance = scheme_success_chance - custom_tooltip = $RESULTS_TOOLTIP$ - save_scope_value_as = { - name = scheme_successful - value = yes - } - # Interception saves. - ## Unique saves roll. - ### E.g., your dog flings itself in front of an assassin for you. - if = { - limit = { is_savable_murder_scheme_trigger = yes } - # We use a scripted effect so that mods can overwrite it without overwriting the whole block. - scheme_unique_interception_roll_effect = yes - } - ## Repeatable saves roll. - ### E.g., your bodyguard flings itself in front of an assassin for you. - if = { - limit = { is_savable_murder_scheme_trigger = yes } - random = { - chance = scope:target.scheme_intercept_repeatable_chance_total_value - save_scope_value_as = { - name = interception_repeatable - value = yes - } - } - } - } - # Secrecy roll. - ## We check this after an interception so that, if a successful scheme is intercepted, we can boost its success a little to compensate. - if = { - limit = { is_type_secret = yes } - ## First, determine our secrecy value. - save_scope_value_as = { - name = discovery_chance - value = { - value = 100 - subtract = scheme_secrecy - # Boost this up a bit if the scheme was intercepted. - if = { - limit = { - OR = { - exists = scope:interception_unique - exists = scope:interception_repeatable - } - } - add = -30 - } - # And make sure there's always _some_ risk. - min = 5 - } - } - random = { - chance = scope:discovery_chance - custom_tooltip = scheme_remain_secret_roll_tt - save_scope_value_as = { - name = scheme_discovered - value = yes - } - # Grab an exposer. - if = { - limit = { exists = scope:target.host } - scope:target.host = { save_scope_as = murder_exposer } - } - else = { - scope:target = { save_scope_as = murder_exposer } - } - # Set up assorted cosmetics for murders. - scope:owner = { - # Portraits. - save_scope_as = owner_to_reveal - # Plus a flavour scope we use. - random_memory = { - limit = { - has_memory_category = negative - has_memory_participant = scope:target - NOR = { # These read poorly - has_memory_type = became_rivals - has_memory_type = became_nemesis - } - } - save_scope_as = bad_memory - } - } - } - } - # Process ending on_actions. - ## Scheme intercepted by a unique flag, stopping a killing at the last moment. - if = { - limit = { exists = scope:interception_unique } - scheme_owner = { - trigger_event = { on_action = pick_unique_murder_intercept_on_action } - } - } - ## Scheme intercepted by a repeatable flag, stopping a killing at the last moment. - else_if = { - limit = { exists = scope:interception_repeatable } - scheme_owner = { - trigger_event = { on_action = pick_repeatable_murder_intercept_on_action } - } - } - ## Scheme successful. - else_if = { - limit = { exists = scope:scheme_successful } - # If we have a contract conclusion event to fire, fire it. - if = { - limit = { exists = scope:contract_end_success } - scheme_owner = { - trigger_event = { - saved_event_id = scope:contract_end_success - delayed = yes - } - } - } - task_contract ?= { complete_task_contract = success_standard } - trigger_event = { $SUCCESS_EVENT_TYPE$ = $SUCCESS_EVENT_ID$ } - scheme_owner = { - play_sound_effect = "event:/DLC/EP3/SFX/Stingers/Scheme_Rework/ep3_mx_sting_schemerework_positive" - mandala_trickster_increment_successful_schemes_effect = yes - } - } - ## Scheme failed. - else = { - # If we have a contract conclusion event to fire, fire it. - if = { - limit = { exists = scope:contract_end_failure } - scheme_owner = { - trigger_event = { - saved_event_id = scope:contract_end_failure - delayed = yes - } - } - } - task_contract ?= { complete_task_contract = failure_standard } - trigger_event = { $FAILURE_EVENT_TYPE$ = $FAILURE_EVENT_ID$ } - scheme_owner = { play_sound_effect = "event:/DLC/EP3/SFX/Stingers/Scheme_Rework/ep3_mx_sting_schemerework_negative" } - } -} - -# Roll to see if a one-off factor stops an otherwise-successful murder scheme. -scheme_unique_interception_roll_effect = { - scope:target = { - # These are ordered highest % to lowest %: remember to adjust their position in the list if you adjust their percentage likelihood. - ## 50% — Saved by soulmate's sacrifice (boosted). - if = { - limit = { - has_perk = mortal_adoration_perk - any_relation = { - type = soulmate - available_lover_to_sacrifice_in_murder_trigger = { TARGET = scope:target } - } - } - random = { - chance = 50 - save_scope_value_as = { - name = interception_unique - value = flag:sacrifice_lover - } - } - } - ## 45% — Family Connections dynasty legacy. - else_if = { - limit = { - dynasty ?= { has_dynasty_perk = guile_legacy_5 } - NOT = { has_character_flag = guile_legacy_5_save_used } - } - random = { - chance = 45 - save_scope_value_as = { - name = interception_unique - value = flag:family_connections_dynleg - } - } - } - ## 30% — Saved by lover's sacrifice (boosted). - else_if = { - limit = { - has_perk = mortal_adoration_perk - any_relation = { - type = lover - available_lover_to_sacrifice_in_murder_trigger = { TARGET = scope:target } - } - } - random = { - chance = 30 - save_scope_value_as = { - name = interception_unique - value = flag:sacrifice_lover - } - } - } - ## 20% — Target's warhorse saves them from hired thugs - else_if = { - limit = { owns_story_of_type = story_cycle_martial_lifestyle_warhorse } - random = { - chance = 20 - save_scope_value_as = { - name = interception_unique - value = flag:sacrifice_warhorse - } - } - } - ## 20% — Saved by prison pet. - else_if = { - limit = { - is_imprisoned = yes - has_variable = prison_pet_variable - } - random = { - chance = 20 - save_scope_value_as = { - name = interception_unique - value = flag:sacrifice_pet_prison - } - } - } - ## 20% — Saved by soulmate's sacrifice (regular). - else_if = { - limit = { - any_relation = { - type = soulmate - available_lover_to_sacrifice_in_murder_trigger = { TARGET = scope:target } - } - } - random = { - chance = 20 - save_scope_value_as = { - name = interception_unique - value = flag:sacrifice_lover - } - } - } - ## 10% — Saved by lover's sacrifice (regular). - else_if = { - limit = { - any_relation = { - type = lover - available_lover_to_sacrifice_in_murder_trigger = { TARGET = scope:target } - } - } - random = { - chance = 10 - save_scope_value_as = { - name = interception_unique - value = flag:sacrifice_lover - } - } - } - ## 06% — Saved by cat. - ### Man's _true_ best friend. - else_if = { - limit = { - any_owned_story = { type = story_cycle_pet_cat } - } - random = { - chance = 6 - save_scope_value_as = { - name = interception_unique - value = flag:sacrifice_cat - } - } - } - ## 05% — Saved by dog. - else_if = { - limit = { - any_owned_story = { type = story_cycle_pet_dog } - } - random = { - chance = 5 - save_scope_value_as = { - name = interception_unique - value = flag:sacrifice_dog - } - } - } - ## 03% — Saved by due to bilinguality. - else_if = { - limit = { - knows_language_of_culture = scope:owner.culture - NOR = { - culture = { has_same_culture_language = scope:owner.culture } - AND = { - has_variable_list = bilingual_murder_saves - is_target_in_variable_list = { - name = bilingual_murder_saves - target = scope:owner.culture - } - } - } - } - random = { - chance = 3 - save_scope_value_as = { - name = interception_unique - value = flag:knowledge_bilingual - } - } - } - ## 01% — Saved due to mindbreak character. - else_if = { - limit = { - has_variable = mind_broken_victim - var:mind_broken_victim = { - is_alive = yes - NOT = { has_trait = incapable } - } - } - random = { - chance = 1 - save_scope_value_as = { - name = interception_unique - value = flag:sacrifice_mindbreak - } - } - } - ## 00.5% — Saved by having an artefact. - ### Special ridiculously low chance because otherwise this event, which has fun loc, will give _every_ character in the title a 1% chance to nullify any scheme against them. - else_if = { - limit = { - is_available_healthy_adult = yes - # Gotta be on land. - exists = location.barony - # And have a suitable artefact. - ## Which they probably will. - ### Statistically almost always, in fact. - has_any_artifact = yes - any_character_artifact = { - NOT = { has_variable = saved_from_assassination } - } - } - # Don't tell anyone this is even a possibility, as otherwise it's gonna look weird in the tooltips. - hidden_effect = { - random = { - chance = 1 - # And then reduce the chance even further. - random = { - chance = 50 - save_scope_value_as = { - name = interception_unique - value = flag:sacrifice_artefact - } - } - } - } - } - } -} - -# Reset a scoped scheme, including nixing any modifiers we don't want it to keep. -reset_failed_scheme_effect = { - reset_scheme_progress = yes - if = { - limit = { - has_scheme_modifier = scheme_end_buff_t2_modifier - } - remove_scheme_modifier = scheme_end_buff_t2_modifier - } - if = { - limit = { - has_scheme_modifier = scheme_end_buff_t3_modifier - } - remove_scheme_modifier = scheme_end_buff_t3_modifier - } - if = { - limit = { - has_scheme_modifier = scheme_end_buff_t4_modifier - } - remove_scheme_modifier = scheme_end_buff_t4_modifier - } -} - -################################################## -# General Critical Moment Effects - -# Sets up which agents are valid to be added to this scheme, then picks which two to suggest. -## We make a bazillion variants here because it's the easiest solution without having to have a dozen+ empty parameters in a single effect. -roll_critical_moment_options_02_agent_types_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:$OUTPUT_EVENT$ - } - if = { - limit = { - any_scheme_agent_slot = { count <= character_max_scheme_agents_value } - scope:scheme = { - NOR = { - has_variable = choice_a - has_variable = choice_b - } - } - } - # First, let's determine which types we're using and which we ain't. - ## Agent type 01. - save_scope_value_as = { - name = agent_type_01 - value = flag:$AGENT_TYPE_01$ - } - ## Agent type 02. - save_scope_value_as = { - name = agent_type_02 - value = flag:$AGENT_TYPE_02$ - } - # Then we roll for who's getting picked. - ## For var:choice_a. - random_list = { - # Agent type 01. - 0 = { - trigger = { - NOT = { scope:agent_type_01 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_01$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_01$ - } - modifier = { - add = $AGENT_TYPE_01_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_01$ } - } - } - # Agent type 02. - 0 = { - trigger = { - NOT = { scope:agent_type_02 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_02$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_02$ - } - modifier = { - add = $AGENT_TYPE_02_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_02$ } - } - } - } - ## And var:choice_b. - random_list = { - # Agent type 01. - 0 = { - trigger = { - NOR = { - scope:agent_type_01 = flag:empty - var:choice_a = flag:$AGENT_TYPE_01$ - } - scheme_owner = { can_have_$AGENT_TYPE_01$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_01$ - } - modifier = { - add = $AGENT_TYPE_01_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_01$ } - } - } - # Agent type 02. - 0 = { - trigger = { - NOR = { - scope:agent_type_02 = flag:empty - var:choice_a = flag:$AGENT_TYPE_02$ - } - scheme_owner = { can_have_$AGENT_TYPE_02$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_02$ - } - modifier = { - add = $AGENT_TYPE_02_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_02$ } - } - } - } - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0001 } - } -} -roll_critical_moment_options_03_agent_types_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:$OUTPUT_EVENT$ - } - if = { - limit = { - any_scheme_agent_slot = { count < character_max_scheme_agents_value } - scope:scheme = { - NOR = { - has_variable = choice_a - has_variable = choice_b - } - } - } - # First, let's determine which types we're using and which we ain't. - ## Agent type 01. - save_scope_value_as = { - name = agent_type_01 - value = flag:$AGENT_TYPE_01$ - } - ## Agent type 02. - save_scope_value_as = { - name = agent_type_02 - value = flag:$AGENT_TYPE_02$ - } - ## Agent type 03. - save_scope_value_as = { - name = agent_type_03 - value = flag:$AGENT_TYPE_03$ - } - # Then we roll for who's getting picked. - ## For var:choice_a. - random_list = { - # Agent type 01. - 0 = { - trigger = { - NOT = { scope:agent_type_01 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_01$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_01$ - } - modifier = { - add = $AGENT_TYPE_01_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_01$ } - } - } - # Agent type 02. - 0 = { - trigger = { - NOT = { scope:agent_type_02 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_02$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_02$ - } - modifier = { - add = $AGENT_TYPE_02_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_02$ } - } - } - # Agent type 03. - 0 = { - trigger = { - NOT = { scope:agent_type_03 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_03$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_03$ - } - modifier = { - add = $AGENT_TYPE_03_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_03$ } - } - } - } - ## And var:choice_b. - random_list = { - # Agent type 01. - 0 = { - trigger = { - NOR = { - scope:agent_type_01 = flag:empty - var:choice_a = flag:$AGENT_TYPE_01$ - } - scheme_owner = { can_have_$AGENT_TYPE_01$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_01$ - } - modifier = { - add = $AGENT_TYPE_01_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_01$ } - } - } - # Agent type 02. - 0 = { - trigger = { - NOR = { - scope:agent_type_02 = flag:empty - var:choice_a = flag:$AGENT_TYPE_02$ - } - scheme_owner = { can_have_$AGENT_TYPE_02$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_02$ - } - modifier = { - add = $AGENT_TYPE_02_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_02$ } - } - } - # Agent type 03. - 0 = { - trigger = { - NOR = { - scope:agent_type_03 = flag:empty - var:choice_a = flag:$AGENT_TYPE_03$ - } - scheme_owner = { can_have_$AGENT_TYPE_03$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_03$ - } - modifier = { - add = $AGENT_TYPE_03_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_03$ } - } - } - } - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0001 } - } -} -roll_critical_moment_options_04_agent_types_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:$OUTPUT_EVENT$ - } - if = { - limit = { - any_scheme_agent_slot = { count < character_max_scheme_agents_value } - scope:scheme = { - NOR = { - has_variable = choice_a - has_variable = choice_b - } - } - } - # First, let's determine which types we're using and which we ain't. - ## Agent type 01. - save_scope_value_as = { - name = agent_type_01 - value = flag:$AGENT_TYPE_01$ - } - ## Agent type 02. - save_scope_value_as = { - name = agent_type_02 - value = flag:$AGENT_TYPE_02$ - } - ## Agent type 03. - save_scope_value_as = { - name = agent_type_03 - value = flag:$AGENT_TYPE_03$ - } - ## Agent type 04. - save_scope_value_as = { - name = agent_type_04 - value = flag:$AGENT_TYPE_04$ - } - # Then we roll for who's getting picked. - ## For var:choice_a. - random_list = { - # Agent type 01. - 0 = { - trigger = { - NOT = { scope:agent_type_01 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_01$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_01$ - } - modifier = { - add = $AGENT_TYPE_01_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_01$ } - } - } - # Agent type 02. - 0 = { - trigger = { - NOT = { scope:agent_type_02 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_02$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_02$ - } - modifier = { - add = $AGENT_TYPE_02_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_02$ } - } - } - # Agent type 03. - 0 = { - trigger = { - NOT = { scope:agent_type_03 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_03$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_03$ - } - modifier = { - add = $AGENT_TYPE_03_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_03$ } - } - } - # Agent type 04. - 0 = { - trigger = { - NOT = { scope:agent_type_04 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_04$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_04$ - } - modifier = { - add = $AGENT_TYPE_04_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_04$ } - } - } - } - ## And var:choice_b. - random_list = { - # Agent type 01. - 0 = { - trigger = { - NOR = { - scope:agent_type_01 = flag:empty - var:choice_a = flag:$AGENT_TYPE_01$ - } - scheme_owner = { can_have_$AGENT_TYPE_01$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_01$ - } - modifier = { - add = $AGENT_TYPE_01_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_01$ } - } - } - # Agent type 02. - 0 = { - trigger = { - NOR = { - scope:agent_type_02 = flag:empty - var:choice_a = flag:$AGENT_TYPE_02$ - } - scheme_owner = { can_have_$AGENT_TYPE_02$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_02$ - } - modifier = { - add = $AGENT_TYPE_02_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_02$ } - } - } - # Agent type 03. - 0 = { - trigger = { - NOR = { - scope:agent_type_03 = flag:empty - var:choice_a = flag:$AGENT_TYPE_03$ - } - scheme_owner = { can_have_$AGENT_TYPE_03$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_03$ - } - modifier = { - add = $AGENT_TYPE_03_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_03$ } - } - } - # Agent type 04. - 0 = { - trigger = { - NOR = { - scope:agent_type_04 = flag:empty - var:choice_a = flag:$AGENT_TYPE_04$ - } - scheme_owner = { can_have_$AGENT_TYPE_04$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_04$ - } - modifier = { - add = $AGENT_TYPE_04_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_04$ } - } - } - } - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0001 } - } -} -roll_critical_moment_options_05_agent_types_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:$OUTPUT_EVENT$ - } - if = { - limit = { - any_scheme_agent_slot = { count < character_max_scheme_agents_value } - scope:scheme = { - NOR = { - has_variable = choice_a - has_variable = choice_b - } - } - } - # First, let's determine which types we're using and which we ain't. - ## Agent type 01. - save_scope_value_as = { - name = agent_type_01 - value = flag:$AGENT_TYPE_01$ - } - ## Agent type 02. - save_scope_value_as = { - name = agent_type_02 - value = flag:$AGENT_TYPE_02$ - } - ## Agent type 03. - save_scope_value_as = { - name = agent_type_03 - value = flag:$AGENT_TYPE_03$ - } - ## Agent type 04. - save_scope_value_as = { - name = agent_type_04 - value = flag:$AGENT_TYPE_04$ - } - ## Agent type 05. - save_scope_value_as = { - name = agent_type_05 - value = flag:$AGENT_TYPE_05$ - } - # Then we roll for who's getting picked. - ## For var:choice_a. - random_list = { - # Agent type 01. - 0 = { - trigger = { - NOT = { scope:agent_type_01 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_01$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_01$ - } - modifier = { - add = $AGENT_TYPE_01_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_01$ } - } - } - # Agent type 02. - 0 = { - trigger = { - NOT = { scope:agent_type_02 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_02$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_02$ - } - modifier = { - add = $AGENT_TYPE_02_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_02$ } - } - } - # Agent type 03. - 0 = { - trigger = { - NOT = { scope:agent_type_03 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_03$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_03$ - } - modifier = { - add = $AGENT_TYPE_03_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_03$ } - } - } - # Agent type 04. - 0 = { - trigger = { - NOT = { scope:agent_type_04 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_04$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_04$ - } - modifier = { - add = $AGENT_TYPE_04_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_04$ } - } - } - # Agent type 05. - 0 = { - trigger = { - NOT = { scope:agent_type_05 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_05$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_05$ - } - modifier = { - add = $AGENT_TYPE_05_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_05$ } - } - } - } - ## And var:choice_b. - random_list = { - # Agent type 01. - 0 = { - trigger = { - NOR = { - scope:agent_type_01 = flag:empty - var:choice_a = flag:$AGENT_TYPE_01$ - } - scheme_owner = { can_have_$AGENT_TYPE_01$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_01$ - } - modifier = { - add = $AGENT_TYPE_01_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_01$ } - } - } - # Agent type 02. - 0 = { - trigger = { - NOR = { - scope:agent_type_02 = flag:empty - var:choice_a = flag:$AGENT_TYPE_02$ - } - scheme_owner = { can_have_$AGENT_TYPE_02$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_02$ - } - modifier = { - add = $AGENT_TYPE_02_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_02$ } - } - } - # Agent type 03. - 0 = { - trigger = { - NOR = { - scope:agent_type_03 = flag:empty - var:choice_a = flag:$AGENT_TYPE_03$ - } - scheme_owner = { can_have_$AGENT_TYPE_03$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_03$ - } - modifier = { - add = $AGENT_TYPE_03_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_03$ } - } - } - # Agent type 04. - 0 = { - trigger = { - NOR = { - scope:agent_type_04 = flag:empty - var:choice_a = flag:$AGENT_TYPE_04$ - } - scheme_owner = { can_have_$AGENT_TYPE_04$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_04$ - } - modifier = { - add = $AGENT_TYPE_04_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_04$ } - } - } - # Agent type 05. - 0 = { - trigger = { - NOR = { - scope:agent_type_05 = flag:empty - var:choice_a = flag:$AGENT_TYPE_05$ - } - scheme_owner = { can_have_$AGENT_TYPE_05$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_05$ - } - modifier = { - add = $AGENT_TYPE_05_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_05$ } - } - } - } - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0001 } - } -} -roll_critical_moment_options_06_agent_types_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:$OUTPUT_EVENT$ - } - if = { - limit = { - any_scheme_agent_slot = { count < character_max_scheme_agents_value } - scope:scheme = { - NOR = { - has_variable = choice_a - has_variable = choice_b - } - } - } - # First, let's determine which types we're using and which we ain't. - ## Agent type 01. - save_scope_value_as = { - name = agent_type_01 - value = flag:$AGENT_TYPE_01$ - } - ## Agent type 02. - save_scope_value_as = { - name = agent_type_02 - value = flag:$AGENT_TYPE_02$ - } - ## Agent type 03. - save_scope_value_as = { - name = agent_type_03 - value = flag:$AGENT_TYPE_03$ - } - ## Agent type 04. - save_scope_value_as = { - name = agent_type_04 - value = flag:$AGENT_TYPE_04$ - } - ## Agent type 05. - save_scope_value_as = { - name = agent_type_05 - value = flag:$AGENT_TYPE_05$ - } - ## Agent type 06. - save_scope_value_as = { - name = agent_type_06 - value = flag:$AGENT_TYPE_06$ - } - # Then we roll for who's getting picked. - ## For var:choice_a. - random_list = { - # Agent type 01. - 0 = { - trigger = { - NOT = { scope:agent_type_01 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_01$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_01$ - } - modifier = { - add = $AGENT_TYPE_01_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_01$ } - } - } - # Agent type 02. - 0 = { - trigger = { - NOT = { scope:agent_type_02 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_02$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_02$ - } - modifier = { - add = $AGENT_TYPE_02_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_02$ } - } - } - # Agent type 03. - 0 = { - trigger = { - NOT = { scope:agent_type_03 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_03$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_03$ - } - modifier = { - add = $AGENT_TYPE_03_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_03$ } - } - } - # Agent type 04. - 0 = { - trigger = { - NOT = { scope:agent_type_04 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_04$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_04$ - } - modifier = { - add = $AGENT_TYPE_04_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_04$ } - } - } - # Agent type 05. - 0 = { - trigger = { - NOT = { scope:agent_type_05 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_05$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_05$ - } - modifier = { - add = $AGENT_TYPE_05_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_05$ } - } - } - # Agent type 06. - 0 = { - trigger = { - NOT = { scope:agent_type_06 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_06$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_06$ - } - modifier = { - add = $AGENT_TYPE_06_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_06$ } - } - } - } - ## And var:choice_b. - random_list = { - # Agent type 01. - 0 = { - trigger = { - NOR = { - scope:agent_type_01 = flag:empty - var:choice_a = flag:$AGENT_TYPE_01$ - } - scheme_owner = { can_have_$AGENT_TYPE_01$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_01$ - } - modifier = { - add = $AGENT_TYPE_01_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_01$ } - } - } - # Agent type 02. - 0 = { - trigger = { - NOR = { - scope:agent_type_02 = flag:empty - var:choice_a = flag:$AGENT_TYPE_02$ - } - scheme_owner = { can_have_$AGENT_TYPE_02$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_02$ - } - modifier = { - add = $AGENT_TYPE_02_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_02$ } - } - } - # Agent type 03. - 0 = { - trigger = { - NOR = { - scope:agent_type_03 = flag:empty - var:choice_a = flag:$AGENT_TYPE_03$ - } - scheme_owner = { can_have_$AGENT_TYPE_03$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_03$ - } - modifier = { - add = $AGENT_TYPE_03_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_03$ } - } - } - # Agent type 04. - 0 = { - trigger = { - NOR = { - scope:agent_type_04 = flag:empty - var:choice_a = flag:$AGENT_TYPE_04$ - } - scheme_owner = { can_have_$AGENT_TYPE_04$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_04$ - } - modifier = { - add = $AGENT_TYPE_04_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_04$ } - } - } - # Agent type 05. - 0 = { - trigger = { - NOR = { - scope:agent_type_05 = flag:empty - var:choice_a = flag:$AGENT_TYPE_05$ - } - scheme_owner = { can_have_$AGENT_TYPE_05$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_05$ - } - modifier = { - add = $AGENT_TYPE_05_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_05$ } - } - } - # Agent type 06. - 0 = { - trigger = { - NOR = { - scope:agent_type_06 = flag:empty - var:choice_a = flag:$AGENT_TYPE_06$ - } - scheme_owner = { can_have_$AGENT_TYPE_06$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_06$ - } - modifier = { - add = $AGENT_TYPE_06_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_06$ } - } - } - } - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0001 } - } -} -roll_critical_moment_options_07_agent_types_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:$OUTPUT_EVENT$ - } - if = { - limit = { - any_scheme_agent_slot = { count < character_max_scheme_agents_value } - scope:scheme = { - NOR = { - has_variable = choice_a - has_variable = choice_b - } - } - } - # First, let's determine which types we're using and which we ain't. - ## Agent type 01. - save_scope_value_as = { - name = agent_type_01 - value = flag:$AGENT_TYPE_01$ - } - ## Agent type 02. - save_scope_value_as = { - name = agent_type_02 - value = flag:$AGENT_TYPE_02$ - } - ## Agent type 03. - save_scope_value_as = { - name = agent_type_03 - value = flag:$AGENT_TYPE_03$ - } - ## Agent type 04. - save_scope_value_as = { - name = agent_type_04 - value = flag:$AGENT_TYPE_04$ - } - ## Agent type 05. - save_scope_value_as = { - name = agent_type_05 - value = flag:$AGENT_TYPE_05$ - } - ## Agent type 06. - save_scope_value_as = { - name = agent_type_06 - value = flag:$AGENT_TYPE_06$ - } - ## Agent type 07. - save_scope_value_as = { - name = agent_type_07 - value = flag:$AGENT_TYPE_07$ - } - # Then we roll for who's getting picked. - ## For var:choice_a. - random_list = { - # Agent type 01. - 0 = { - trigger = { - NOT = { scope:agent_type_01 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_01$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_01$ - } - modifier = { - add = $AGENT_TYPE_01_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_01$ } - } - } - # Agent type 02. - 0 = { - trigger = { - NOT = { scope:agent_type_02 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_02$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_02$ - } - modifier = { - add = $AGENT_TYPE_02_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_02$ } - } - } - # Agent type 03. - 0 = { - trigger = { - NOT = { scope:agent_type_03 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_03$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_03$ - } - modifier = { - add = $AGENT_TYPE_03_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_03$ } - } - } - # Agent type 04. - 0 = { - trigger = { - NOT = { scope:agent_type_04 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_04$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_04$ - } - modifier = { - add = $AGENT_TYPE_04_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_04$ } - } - } - # Agent type 05. - 0 = { - trigger = { - NOT = { scope:agent_type_05 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_05$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_05$ - } - modifier = { - add = $AGENT_TYPE_05_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_05$ } - } - } - # Agent type 06. - 0 = { - trigger = { - NOT = { scope:agent_type_06 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_06$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_06$ - } - modifier = { - add = $AGENT_TYPE_06_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_06$ } - } - } - # Agent type 07. - 0 = { - trigger = { - NOT = { scope:agent_type_07 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_07$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_07$ - } - modifier = { - add = $AGENT_TYPE_07_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_07$ } - } - } - } - ## And var:choice_b. - random_list = { - # Agent type 01. - 0 = { - trigger = { - NOR = { - scope:agent_type_01 = flag:empty - var:choice_a = flag:$AGENT_TYPE_01$ - } - scheme_owner = { can_have_$AGENT_TYPE_01$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_01$ - } - modifier = { - add = $AGENT_TYPE_01_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_01$ } - } - } - # Agent type 02. - 0 = { - trigger = { - NOR = { - scope:agent_type_02 = flag:empty - var:choice_a = flag:$AGENT_TYPE_02$ - } - scheme_owner = { can_have_$AGENT_TYPE_02$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_02$ - } - modifier = { - add = $AGENT_TYPE_02_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_02$ } - } - } - # Agent type 03. - 0 = { - trigger = { - NOR = { - scope:agent_type_03 = flag:empty - var:choice_a = flag:$AGENT_TYPE_03$ - } - scheme_owner = { can_have_$AGENT_TYPE_03$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_03$ - } - modifier = { - add = $AGENT_TYPE_03_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_03$ } - } - } - # Agent type 04. - 0 = { - trigger = { - NOR = { - scope:agent_type_04 = flag:empty - var:choice_a = flag:$AGENT_TYPE_04$ - } - scheme_owner = { can_have_$AGENT_TYPE_04$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_04$ - } - modifier = { - add = $AGENT_TYPE_04_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_04$ } - } - } - # Agent type 05. - 0 = { - trigger = { - NOR = { - scope:agent_type_05 = flag:empty - var:choice_a = flag:$AGENT_TYPE_05$ - } - scheme_owner = { can_have_$AGENT_TYPE_05$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_05$ - } - modifier = { - add = $AGENT_TYPE_05_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_05$ } - } - } - # Agent type 06. - 0 = { - trigger = { - NOR = { - scope:agent_type_06 = flag:empty - var:choice_a = flag:$AGENT_TYPE_06$ - } - scheme_owner = { can_have_$AGENT_TYPE_06$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_06$ - } - modifier = { - add = $AGENT_TYPE_06_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_06$ } - } - } - # Agent type 07. - 0 = { - trigger = { - NOR = { - scope:agent_type_07 = flag:empty - var:choice_a = flag:$AGENT_TYPE_07$ - } - scheme_owner = { can_have_$AGENT_TYPE_07$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_07$ - } - modifier = { - add = $AGENT_TYPE_07_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_07$ } - } - } - } - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0001 } - } -} -roll_critical_moment_options_08_agent_types_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:$OUTPUT_EVENT$ - } - if = { - limit = { - any_scheme_agent_slot = { count < character_max_scheme_agents_value } - scope:scheme = { - NOR = { - has_variable = choice_a - has_variable = choice_b - } - } - } - # First, let's determine which types we're using and which we ain't. - ## Agent type 01. - save_scope_value_as = { - name = agent_type_01 - value = flag:$AGENT_TYPE_01$ - } - ## Agent type 02. - save_scope_value_as = { - name = agent_type_02 - value = flag:$AGENT_TYPE_02$ - } - ## Agent type 03. - save_scope_value_as = { - name = agent_type_03 - value = flag:$AGENT_TYPE_03$ - } - ## Agent type 04. - save_scope_value_as = { - name = agent_type_04 - value = flag:$AGENT_TYPE_04$ - } - ## Agent type 05. - save_scope_value_as = { - name = agent_type_05 - value = flag:$AGENT_TYPE_05$ - } - ## Agent type 06. - save_scope_value_as = { - name = agent_type_06 - value = flag:$AGENT_TYPE_06$ - } - ## Agent type 07. - save_scope_value_as = { - name = agent_type_07 - value = flag:$AGENT_TYPE_07$ - } - ## Agent type 08. - save_scope_value_as = { - name = agent_type_08 - value = flag:$AGENT_TYPE_08$ - } - # Then we roll for who's getting picked. - ## For var:choice_a. - random_list = { - # Agent type 01. - 0 = { - trigger = { - NOT = { scope:agent_type_01 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_01$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_01$ - } - modifier = { - add = $AGENT_TYPE_01_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_01$ } - } - } - # Agent type 02. - 0 = { - trigger = { - NOT = { scope:agent_type_02 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_02$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_02$ - } - modifier = { - add = $AGENT_TYPE_02_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_02$ } - } - } - # Agent type 03. - 0 = { - trigger = { - NOT = { scope:agent_type_03 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_03$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_03$ - } - modifier = { - add = $AGENT_TYPE_03_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_03$ } - } - } - # Agent type 04. - 0 = { - trigger = { - NOT = { scope:agent_type_04 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_04$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_04$ - } - modifier = { - add = $AGENT_TYPE_04_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_04$ } - } - } - # Agent type 05. - 0 = { - trigger = { - NOT = { scope:agent_type_05 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_05$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_05$ - } - modifier = { - add = $AGENT_TYPE_05_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_05$ } - } - } - # Agent type 06. - 0 = { - trigger = { - NOT = { scope:agent_type_06 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_06$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_06$ - } - modifier = { - add = $AGENT_TYPE_06_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_06$ } - } - } - # Agent type 07. - 0 = { - trigger = { - NOT = { scope:agent_type_07 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_07$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_07$ - } - modifier = { - add = $AGENT_TYPE_07_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_07$ } - } - } - # Agent type 08. - 0 = { - trigger = { - NOT = { scope:agent_type_08 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_08$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_08$ - } - modifier = { - add = $AGENT_TYPE_08_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_08$ } - } - } - } - ## And var:choice_b. - random_list = { - # Agent type 01. - 0 = { - trigger = { - NOR = { - scope:agent_type_01 = flag:empty - var:choice_a = flag:$AGENT_TYPE_01$ - } - scheme_owner = { can_have_$AGENT_TYPE_01$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_01$ - } - modifier = { - add = $AGENT_TYPE_01_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_01$ } - } - } - # Agent type 02. - 0 = { - trigger = { - NOR = { - scope:agent_type_02 = flag:empty - var:choice_a = flag:$AGENT_TYPE_02$ - } - scheme_owner = { can_have_$AGENT_TYPE_02$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_02$ - } - modifier = { - add = $AGENT_TYPE_02_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_02$ } - } - } - # Agent type 03. - 0 = { - trigger = { - NOR = { - scope:agent_type_03 = flag:empty - var:choice_a = flag:$AGENT_TYPE_03$ - } - scheme_owner = { can_have_$AGENT_TYPE_03$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_03$ - } - modifier = { - add = $AGENT_TYPE_03_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_03$ } - } - } - # Agent type 04. - 0 = { - trigger = { - NOR = { - scope:agent_type_04 = flag:empty - var:choice_a = flag:$AGENT_TYPE_04$ - } - scheme_owner = { can_have_$AGENT_TYPE_04$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_04$ - } - modifier = { - add = $AGENT_TYPE_04_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_04$ } - } - } - # Agent type 05. - 0 = { - trigger = { - NOR = { - scope:agent_type_05 = flag:empty - var:choice_a = flag:$AGENT_TYPE_05$ - } - scheme_owner = { can_have_$AGENT_TYPE_05$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_05$ - } - modifier = { - add = $AGENT_TYPE_05_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_05$ } - } - } - # Agent type 06. - 0 = { - trigger = { - NOR = { - scope:agent_type_06 = flag:empty - var:choice_a = flag:$AGENT_TYPE_06$ - } - scheme_owner = { can_have_$AGENT_TYPE_06$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_06$ - } - modifier = { - add = $AGENT_TYPE_06_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_06$ } - } - } - # Agent type 07. - 0 = { - trigger = { - NOR = { - scope:agent_type_07 = flag:empty - var:choice_a = flag:$AGENT_TYPE_07$ - } - scheme_owner = { can_have_$AGENT_TYPE_07$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_07$ - } - modifier = { - add = $AGENT_TYPE_07_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_07$ } - } - } - # Agent type 08. - 0 = { - trigger = { - NOR = { - scope:agent_type_08 = flag:empty - var:choice_a = flag:$AGENT_TYPE_08$ - } - scheme_owner = { can_have_$AGENT_TYPE_08$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_08$ - } - modifier = { - add = $AGENT_TYPE_08_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_08$ } - } - } - } - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0001 } - } -} -roll_critical_moment_options_09_agent_types_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:$OUTPUT_EVENT$ - } - if = { - limit = { - any_scheme_agent_slot = { count < character_max_scheme_agents_value } - scope:scheme = { - NOR = { - has_variable = choice_a - has_variable = choice_b - } - } - } - # First, let's determine which types we're using and which we ain't. - ## Agent type 01. - save_scope_value_as = { - name = agent_type_01 - value = flag:$AGENT_TYPE_01$ - } - ## Agent type 02. - save_scope_value_as = { - name = agent_type_02 - value = flag:$AGENT_TYPE_02$ - } - ## Agent type 03. - save_scope_value_as = { - name = agent_type_03 - value = flag:$AGENT_TYPE_03$ - } - ## Agent type 04. - save_scope_value_as = { - name = agent_type_04 - value = flag:$AGENT_TYPE_04$ - } - ## Agent type 05. - save_scope_value_as = { - name = agent_type_05 - value = flag:$AGENT_TYPE_05$ - } - ## Agent type 06. - save_scope_value_as = { - name = agent_type_06 - value = flag:$AGENT_TYPE_06$ - } - ## Agent type 07. - save_scope_value_as = { - name = agent_type_07 - value = flag:$AGENT_TYPE_07$ - } - ## Agent type 08. - save_scope_value_as = { - name = agent_type_08 - value = flag:$AGENT_TYPE_08$ - } - ## Agent type 09. - save_scope_value_as = { - name = agent_type_09 - value = flag:$AGENT_TYPE_09$ - } - # Then we roll for who's getting picked. - ## For var:choice_a. - random_list = { - # Agent type 01. - 0 = { - trigger = { - NOT = { scope:agent_type_01 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_01$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_01$ - } - modifier = { - add = $AGENT_TYPE_01_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_01$ } - } - } - # Agent type 02. - 0 = { - trigger = { - NOT = { scope:agent_type_02 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_02$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_02$ - } - modifier = { - add = $AGENT_TYPE_02_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_02$ } - } - } - # Agent type 03. - 0 = { - trigger = { - NOT = { scope:agent_type_03 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_03$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_03$ - } - modifier = { - add = $AGENT_TYPE_03_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_03$ } - } - } - # Agent type 04. - 0 = { - trigger = { - NOT = { scope:agent_type_04 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_04$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_04$ - } - modifier = { - add = $AGENT_TYPE_04_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_04$ } - } - } - # Agent type 05. - 0 = { - trigger = { - NOT = { scope:agent_type_05 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_05$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_05$ - } - modifier = { - add = $AGENT_TYPE_05_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_05$ } - } - } - # Agent type 06. - 0 = { - trigger = { - NOT = { scope:agent_type_06 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_06$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_06$ - } - modifier = { - add = $AGENT_TYPE_06_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_06$ } - } - } - # Agent type 07. - 0 = { - trigger = { - NOT = { scope:agent_type_07 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_07$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_07$ - } - modifier = { - add = $AGENT_TYPE_07_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_07$ } - } - } - # Agent type 08. - 0 = { - trigger = { - NOT = { scope:agent_type_08 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_08$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_08$ - } - modifier = { - add = $AGENT_TYPE_08_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_08$ } - } - } - # Agent type 09. - 0 = { - trigger = { - NOT = { scope:agent_type_09 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_09$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_09$ - } - modifier = { - add = $AGENT_TYPE_09_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_09$ } - } - } - } - ## And var:choice_b. - random_list = { - # Agent type 01. - 0 = { - trigger = { - NOR = { - scope:agent_type_01 = flag:empty - var:choice_a = flag:$AGENT_TYPE_01$ - } - scheme_owner = { can_have_$AGENT_TYPE_01$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_01$ - } - modifier = { - add = $AGENT_TYPE_01_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_01$ } - } - } - # Agent type 02. - 0 = { - trigger = { - NOR = { - scope:agent_type_02 = flag:empty - var:choice_a = flag:$AGENT_TYPE_02$ - } - scheme_owner = { can_have_$AGENT_TYPE_02$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_02$ - } - modifier = { - add = $AGENT_TYPE_02_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_02$ } - } - } - # Agent type 03. - 0 = { - trigger = { - NOR = { - scope:agent_type_03 = flag:empty - var:choice_a = flag:$AGENT_TYPE_03$ - } - scheme_owner = { can_have_$AGENT_TYPE_03$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_03$ - } - modifier = { - add = $AGENT_TYPE_03_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_03$ } - } - } - # Agent type 04. - 0 = { - trigger = { - NOR = { - scope:agent_type_04 = flag:empty - var:choice_a = flag:$AGENT_TYPE_04$ - } - scheme_owner = { can_have_$AGENT_TYPE_04$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_04$ - } - modifier = { - add = $AGENT_TYPE_04_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_04$ } - } - } - # Agent type 05. - 0 = { - trigger = { - NOR = { - scope:agent_type_05 = flag:empty - var:choice_a = flag:$AGENT_TYPE_05$ - } - scheme_owner = { can_have_$AGENT_TYPE_05$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_05$ - } - modifier = { - add = $AGENT_TYPE_05_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_05$ } - } - } - # Agent type 06. - 0 = { - trigger = { - NOR = { - scope:agent_type_06 = flag:empty - var:choice_a = flag:$AGENT_TYPE_06$ - } - scheme_owner = { can_have_$AGENT_TYPE_06$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_06$ - } - modifier = { - add = $AGENT_TYPE_06_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_06$ } - } - } - # Agent type 07. - 0 = { - trigger = { - NOR = { - scope:agent_type_07 = flag:empty - var:choice_a = flag:$AGENT_TYPE_07$ - } - scheme_owner = { can_have_$AGENT_TYPE_07$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_07$ - } - modifier = { - add = $AGENT_TYPE_07_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_07$ } - } - } - # Agent type 08. - 0 = { - trigger = { - NOR = { - scope:agent_type_08 = flag:empty - var:choice_a = flag:$AGENT_TYPE_08$ - } - scheme_owner = { can_have_$AGENT_TYPE_08$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_08$ - } - modifier = { - add = $AGENT_TYPE_08_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_08$ } - } - } - # Agent type 09. - 0 = { - trigger = { - NOR = { - scope:agent_type_09 = flag:empty - var:choice_a = flag:$AGENT_TYPE_09$ - } - scheme_owner = { can_have_$AGENT_TYPE_09$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_09$ - } - modifier = { - add = $AGENT_TYPE_09_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_09$ } - } - } - } - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0001 } - } -} -roll_critical_moment_options_10_agent_types_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:$OUTPUT_EVENT$ - } - if = { - limit = { - any_scheme_agent_slot = { count < character_max_scheme_agents_value } - scope:scheme = { - NOR = { - has_variable = choice_a - has_variable = choice_b - } - } - } - # First, let's determine which types we're using and which we ain't. - ## Agent type 01. - save_scope_value_as = { - name = agent_type_01 - value = flag:$AGENT_TYPE_01$ - } - ## Agent type 02. - save_scope_value_as = { - name = agent_type_02 - value = flag:$AGENT_TYPE_02$ - } - ## Agent type 03. - save_scope_value_as = { - name = agent_type_03 - value = flag:$AGENT_TYPE_03$ - } - ## Agent type 04. - save_scope_value_as = { - name = agent_type_04 - value = flag:$AGENT_TYPE_04$ - } - ## Agent type 05. - save_scope_value_as = { - name = agent_type_05 - value = flag:$AGENT_TYPE_05$ - } - ## Agent type 06. - save_scope_value_as = { - name = agent_type_06 - value = flag:$AGENT_TYPE_06$ - } - ## Agent type 07. - save_scope_value_as = { - name = agent_type_07 - value = flag:$AGENT_TYPE_07$ - } - ## Agent type 08. - save_scope_value_as = { - name = agent_type_08 - value = flag:$AGENT_TYPE_08$ - } - ## Agent type 09. - save_scope_value_as = { - name = agent_type_09 - value = flag:$AGENT_TYPE_09$ - } - ## Agent type 10. - save_scope_value_as = { - name = agent_type_10 - value = flag:$AGENT_TYPE_10$ - } - # Then we roll for who's getting picked. - ## For var:choice_a. - random_list = { - # Agent type 01. - 0 = { - trigger = { - NOT = { scope:agent_type_01 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_01$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_01$ - } - modifier = { - add = $AGENT_TYPE_01_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_01$ } - } - } - # Agent type 02. - 0 = { - trigger = { - NOT = { scope:agent_type_02 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_02$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_02$ - } - modifier = { - add = $AGENT_TYPE_02_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_02$ } - } - } - # Agent type 03. - 0 = { - trigger = { - NOT = { scope:agent_type_03 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_03$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_03$ - } - modifier = { - add = $AGENT_TYPE_03_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_03$ } - } - } - # Agent type 04. - 0 = { - trigger = { - NOT = { scope:agent_type_04 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_04$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_04$ - } - modifier = { - add = $AGENT_TYPE_04_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_04$ } - } - } - # Agent type 05. - 0 = { - trigger = { - NOT = { scope:agent_type_05 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_05$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_05$ - } - modifier = { - add = $AGENT_TYPE_05_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_05$ } - } - } - # Agent type 06. - 0 = { - trigger = { - NOT = { scope:agent_type_06 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_06$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_06$ - } - modifier = { - add = $AGENT_TYPE_06_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_06$ } - } - } - # Agent type 07. - 0 = { - trigger = { - NOT = { scope:agent_type_07 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_07$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_07$ - } - modifier = { - add = $AGENT_TYPE_07_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_07$ } - } - } - # Agent type 08. - 0 = { - trigger = { - NOT = { scope:agent_type_08 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_08$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_08$ - } - modifier = { - add = $AGENT_TYPE_08_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_08$ } - } - } - # Agent type 09. - 0 = { - trigger = { - NOT = { scope:agent_type_09 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_09$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_09$ - } - modifier = { - add = $AGENT_TYPE_09_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_09$ } - } - } - # Agent type 10. - 0 = { - trigger = { - NOT = { scope:agent_type_10 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_10$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_10$ - } - modifier = { - add = $AGENT_TYPE_10_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_10$ } - } - } - } - ## And var:choice_b. - random_list = { - # Agent type 01. - 0 = { - trigger = { - NOR = { - scope:agent_type_01 = flag:empty - var:choice_a = flag:$AGENT_TYPE_01$ - } - scheme_owner = { can_have_$AGENT_TYPE_01$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_01$ - } - modifier = { - add = $AGENT_TYPE_01_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_01$ } - } - } - # Agent type 02. - 0 = { - trigger = { - NOR = { - scope:agent_type_02 = flag:empty - var:choice_a = flag:$AGENT_TYPE_02$ - } - scheme_owner = { can_have_$AGENT_TYPE_02$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_02$ - } - modifier = { - add = $AGENT_TYPE_02_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_02$ } - } - } - # Agent type 03. - 0 = { - trigger = { - NOR = { - scope:agent_type_03 = flag:empty - var:choice_a = flag:$AGENT_TYPE_03$ - } - scheme_owner = { can_have_$AGENT_TYPE_03$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_03$ - } - modifier = { - add = $AGENT_TYPE_03_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_03$ } - } - } - # Agent type 04. - 0 = { - trigger = { - NOR = { - scope:agent_type_04 = flag:empty - var:choice_a = flag:$AGENT_TYPE_04$ - } - scheme_owner = { can_have_$AGENT_TYPE_04$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_04$ - } - modifier = { - add = $AGENT_TYPE_04_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_04$ } - } - } - # Agent type 05. - 0 = { - trigger = { - NOR = { - scope:agent_type_05 = flag:empty - var:choice_a = flag:$AGENT_TYPE_05$ - } - scheme_owner = { can_have_$AGENT_TYPE_05$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_05$ - } - modifier = { - add = $AGENT_TYPE_05_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_05$ } - } - } - # Agent type 06. - 0 = { - trigger = { - NOR = { - scope:agent_type_06 = flag:empty - var:choice_a = flag:$AGENT_TYPE_06$ - } - scheme_owner = { can_have_$AGENT_TYPE_06$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_06$ - } - modifier = { - add = $AGENT_TYPE_06_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_06$ } - } - } - # Agent type 07. - 0 = { - trigger = { - NOR = { - scope:agent_type_07 = flag:empty - var:choice_a = flag:$AGENT_TYPE_07$ - } - scheme_owner = { can_have_$AGENT_TYPE_07$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_07$ - } - modifier = { - add = $AGENT_TYPE_07_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_07$ } - } - } - # Agent type 08. - 0 = { - trigger = { - NOR = { - scope:agent_type_08 = flag:empty - var:choice_a = flag:$AGENT_TYPE_08$ - } - scheme_owner = { can_have_$AGENT_TYPE_08$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_08$ - } - modifier = { - add = $AGENT_TYPE_08_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_08$ } - } - } - # Agent type 09. - 0 = { - trigger = { - NOR = { - scope:agent_type_09 = flag:empty - var:choice_a = flag:$AGENT_TYPE_09$ - } - scheme_owner = { can_have_$AGENT_TYPE_09$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_09$ - } - modifier = { - add = $AGENT_TYPE_09_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_09$ } - } - } - # Agent type 10. - 0 = { - trigger = { - NOR = { - scope:agent_type_10 = flag:empty - var:choice_a = flag:$AGENT_TYPE_10$ - } - scheme_owner = { can_have_$AGENT_TYPE_10$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_10$ - } - modifier = { - add = $AGENT_TYPE_10_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_10$ } - } - } - } - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0001 } - } -} -roll_critical_moment_options_11_agent_types_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:$OUTPUT_EVENT$ - } - if = { - limit = { - any_scheme_agent_slot = { count < character_max_scheme_agents_value } - scope:scheme = { - NOR = { - has_variable = choice_a - has_variable = choice_b - } - } - } - # First, let's determine which types we're using and which we ain't. - ## Agent type 01. - save_scope_value_as = { - name = agent_type_01 - value = flag:$AGENT_TYPE_01$ - } - ## Agent type 02. - save_scope_value_as = { - name = agent_type_02 - value = flag:$AGENT_TYPE_02$ - } - ## Agent type 03. - save_scope_value_as = { - name = agent_type_03 - value = flag:$AGENT_TYPE_03$ - } - ## Agent type 04. - save_scope_value_as = { - name = agent_type_04 - value = flag:$AGENT_TYPE_04$ - } - ## Agent type 05. - save_scope_value_as = { - name = agent_type_05 - value = flag:$AGENT_TYPE_05$ - } - ## Agent type 06. - save_scope_value_as = { - name = agent_type_06 - value = flag:$AGENT_TYPE_06$ - } - ## Agent type 07. - save_scope_value_as = { - name = agent_type_07 - value = flag:$AGENT_TYPE_07$ - } - ## Agent type 08. - save_scope_value_as = { - name = agent_type_08 - value = flag:$AGENT_TYPE_08$ - } - ## Agent type 09. - save_scope_value_as = { - name = agent_type_09 - value = flag:$AGENT_TYPE_09$ - } - ## Agent type 10. - save_scope_value_as = { - name = agent_type_10 - value = flag:$AGENT_TYPE_10$ - } - ## Agent type 11. - save_scope_value_as = { - name = agent_type_11 - value = flag:$AGENT_TYPE_11$ - } - # Then we roll for who's getting picked. - ## For var:choice_a. - random_list = { - # Agent type 01. - 0 = { - trigger = { - NOT = { scope:agent_type_01 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_01$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_01$ - } - modifier = { - add = $AGENT_TYPE_01_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_01$ } - } - } - # Agent type 02. - 0 = { - trigger = { - NOT = { scope:agent_type_02 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_02$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_02$ - } - modifier = { - add = $AGENT_TYPE_02_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_02$ } - } - } - # Agent type 03. - 0 = { - trigger = { - NOT = { scope:agent_type_03 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_03$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_03$ - } - modifier = { - add = $AGENT_TYPE_03_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_03$ } - } - } - # Agent type 04. - 0 = { - trigger = { - NOT = { scope:agent_type_04 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_04$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_04$ - } - modifier = { - add = $AGENT_TYPE_04_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_04$ } - } - } - # Agent type 05. - 0 = { - trigger = { - NOT = { scope:agent_type_05 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_05$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_05$ - } - modifier = { - add = $AGENT_TYPE_05_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_05$ } - } - } - # Agent type 06. - 0 = { - trigger = { - NOT = { scope:agent_type_06 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_06$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_06$ - } - modifier = { - add = $AGENT_TYPE_06_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_06$ } - } - } - # Agent type 07. - 0 = { - trigger = { - NOT = { scope:agent_type_07 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_07$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_07$ - } - modifier = { - add = $AGENT_TYPE_07_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_07$ } - } - } - # Agent type 08. - 0 = { - trigger = { - NOT = { scope:agent_type_08 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_08$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_08$ - } - modifier = { - add = $AGENT_TYPE_08_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_08$ } - } - } - # Agent type 09. - 0 = { - trigger = { - NOT = { scope:agent_type_09 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_09$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_09$ - } - modifier = { - add = $AGENT_TYPE_09_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_09$ } - } - } - # Agent type 10. - 0 = { - trigger = { - NOT = { scope:agent_type_10 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_10$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_10$ - } - modifier = { - add = $AGENT_TYPE_10_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_10$ } - } - } - # Agent type 11. - 0 = { - trigger = { - NOT = { scope:agent_type_11 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_11$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_11$ - } - modifier = { - add = $AGENT_TYPE_11_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_11$ } - } - } - } - ## And var:choice_b. - random_list = { - # Agent type 01. - 0 = { - trigger = { - NOR = { - scope:agent_type_01 = flag:empty - var:choice_a = flag:$AGENT_TYPE_01$ - } - scheme_owner = { can_have_$AGENT_TYPE_01$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_01$ - } - modifier = { - add = $AGENT_TYPE_01_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_01$ } - } - } - # Agent type 02. - 0 = { - trigger = { - NOR = { - scope:agent_type_02 = flag:empty - var:choice_a = flag:$AGENT_TYPE_02$ - } - scheme_owner = { can_have_$AGENT_TYPE_02$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_02$ - } - modifier = { - add = $AGENT_TYPE_02_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_02$ } - } - } - # Agent type 03. - 0 = { - trigger = { - NOR = { - scope:agent_type_03 = flag:empty - var:choice_a = flag:$AGENT_TYPE_03$ - } - scheme_owner = { can_have_$AGENT_TYPE_03$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_03$ - } - modifier = { - add = $AGENT_TYPE_03_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_03$ } - } - } - # Agent type 04. - 0 = { - trigger = { - NOR = { - scope:agent_type_04 = flag:empty - var:choice_a = flag:$AGENT_TYPE_04$ - } - scheme_owner = { can_have_$AGENT_TYPE_04$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_04$ - } - modifier = { - add = $AGENT_TYPE_04_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_04$ } - } - } - # Agent type 05. - 0 = { - trigger = { - NOR = { - scope:agent_type_05 = flag:empty - var:choice_a = flag:$AGENT_TYPE_05$ - } - scheme_owner = { can_have_$AGENT_TYPE_05$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_05$ - } - modifier = { - add = $AGENT_TYPE_05_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_05$ } - } - } - # Agent type 06. - 0 = { - trigger = { - NOR = { - scope:agent_type_06 = flag:empty - var:choice_a = flag:$AGENT_TYPE_06$ - } - scheme_owner = { can_have_$AGENT_TYPE_06$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_06$ - } - modifier = { - add = $AGENT_TYPE_06_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_06$ } - } - } - # Agent type 07. - 0 = { - trigger = { - NOR = { - scope:agent_type_07 = flag:empty - var:choice_a = flag:$AGENT_TYPE_07$ - } - scheme_owner = { can_have_$AGENT_TYPE_07$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_07$ - } - modifier = { - add = $AGENT_TYPE_07_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_07$ } - } - } - # Agent type 08. - 0 = { - trigger = { - NOR = { - scope:agent_type_08 = flag:empty - var:choice_a = flag:$AGENT_TYPE_08$ - } - scheme_owner = { can_have_$AGENT_TYPE_08$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_08$ - } - modifier = { - add = $AGENT_TYPE_08_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_08$ } - } - } - # Agent type 09. - 0 = { - trigger = { - NOR = { - scope:agent_type_09 = flag:empty - var:choice_a = flag:$AGENT_TYPE_09$ - } - scheme_owner = { can_have_$AGENT_TYPE_09$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_09$ - } - modifier = { - add = $AGENT_TYPE_09_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_09$ } - } - } - # Agent type 10. - 0 = { - trigger = { - NOR = { - scope:agent_type_10 = flag:empty - var:choice_a = flag:$AGENT_TYPE_10$ - } - scheme_owner = { can_have_$AGENT_TYPE_10$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_10$ - } - modifier = { - add = $AGENT_TYPE_10_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_10$ } - } - } - # Agent type 11. - 0 = { - trigger = { - NOR = { - scope:agent_type_11 = flag:empty - var:choice_a = flag:$AGENT_TYPE_11$ - } - scheme_owner = { can_have_$AGENT_TYPE_11$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_11$ - } - modifier = { - add = $AGENT_TYPE_11_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_11$ } - } - } - } - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0001 } - } -} -roll_critical_moment_options_12_agent_types_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:$OUTPUT_EVENT$ - } - if = { - limit = { - any_scheme_agent_slot = { count < character_max_scheme_agents_value } - scope:scheme = { - NOR = { - has_variable = choice_a - has_variable = choice_b - } - } - } - # First, let's determine which types we're using and which we ain't. - ## Agent type 01. - save_scope_value_as = { - name = agent_type_01 - value = flag:$AGENT_TYPE_01$ - } - ## Agent type 02. - save_scope_value_as = { - name = agent_type_02 - value = flag:$AGENT_TYPE_02$ - } - ## Agent type 03. - save_scope_value_as = { - name = agent_type_03 - value = flag:$AGENT_TYPE_03$ - } - ## Agent type 04. - save_scope_value_as = { - name = agent_type_04 - value = flag:$AGENT_TYPE_04$ - } - ## Agent type 05. - save_scope_value_as = { - name = agent_type_05 - value = flag:$AGENT_TYPE_05$ - } - ## Agent type 06. - save_scope_value_as = { - name = agent_type_06 - value = flag:$AGENT_TYPE_06$ - } - ## Agent type 07. - save_scope_value_as = { - name = agent_type_07 - value = flag:$AGENT_TYPE_07$ - } - ## Agent type 08. - save_scope_value_as = { - name = agent_type_08 - value = flag:$AGENT_TYPE_08$ - } - ## Agent type 09. - save_scope_value_as = { - name = agent_type_09 - value = flag:$AGENT_TYPE_09$ - } - ## Agent type 10. - save_scope_value_as = { - name = agent_type_10 - value = flag:$AGENT_TYPE_10$ - } - ## Agent type 11. - save_scope_value_as = { - name = agent_type_11 - value = flag:$AGENT_TYPE_11$ - } - ## Agent type 12. - save_scope_value_as = { - name = agent_type_12 - value = flag:$AGENT_TYPE_12$ - } - # Then we roll for who's getting picked. - ## For var:choice_a. - random_list = { - # Agent type 01. - 0 = { - trigger = { - NOT = { scope:agent_type_01 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_01$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_01$ - } - modifier = { - add = $AGENT_TYPE_01_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_01$ } - } - } - # Agent type 02. - 0 = { - trigger = { - NOT = { scope:agent_type_02 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_02$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_02$ - } - modifier = { - add = $AGENT_TYPE_02_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_02$ } - } - } - # Agent type 03. - 0 = { - trigger = { - NOT = { scope:agent_type_03 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_03$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_03$ - } - modifier = { - add = $AGENT_TYPE_03_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_03$ } - } - } - # Agent type 04. - 0 = { - trigger = { - NOT = { scope:agent_type_04 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_04$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_04$ - } - modifier = { - add = $AGENT_TYPE_04_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_04$ } - } - } - # Agent type 05. - 0 = { - trigger = { - NOT = { scope:agent_type_05 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_05$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_05$ - } - modifier = { - add = $AGENT_TYPE_05_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_05$ } - } - } - # Agent type 06. - 0 = { - trigger = { - NOT = { scope:agent_type_06 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_06$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_06$ - } - modifier = { - add = $AGENT_TYPE_06_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_06$ } - } - } - # Agent type 07. - 0 = { - trigger = { - NOT = { scope:agent_type_07 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_07$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_07$ - } - modifier = { - add = $AGENT_TYPE_07_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_07$ } - } - } - # Agent type 08. - 0 = { - trigger = { - NOT = { scope:agent_type_08 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_08$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_08$ - } - modifier = { - add = $AGENT_TYPE_08_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_08$ } - } - } - # Agent type 09. - 0 = { - trigger = { - NOT = { scope:agent_type_09 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_09$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_09$ - } - modifier = { - add = $AGENT_TYPE_09_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_09$ } - } - } - # Agent type 10. - 0 = { - trigger = { - NOT = { scope:agent_type_10 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_10$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_10$ - } - modifier = { - add = $AGENT_TYPE_10_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_10$ } - } - } - # Agent type 11. - 0 = { - trigger = { - NOT = { scope:agent_type_11 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_11$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_11$ - } - modifier = { - add = $AGENT_TYPE_11_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_11$ } - } - } - # Agent type 12. - 0 = { - trigger = { - NOT = { scope:agent_type_12 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_12$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_12$ - } - modifier = { - add = $AGENT_TYPE_12_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_12$ } - } - } - } - ## And var:choice_b. - random_list = { - # Agent type 01. - 0 = { - trigger = { - NOR = { - scope:agent_type_01 = flag:empty - var:choice_a = flag:$AGENT_TYPE_01$ - } - scheme_owner = { can_have_$AGENT_TYPE_01$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_01$ - } - modifier = { - add = $AGENT_TYPE_01_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_01$ } - } - } - # Agent type 02. - 0 = { - trigger = { - NOR = { - scope:agent_type_02 = flag:empty - var:choice_a = flag:$AGENT_TYPE_02$ - } - scheme_owner = { can_have_$AGENT_TYPE_02$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_02$ - } - modifier = { - add = $AGENT_TYPE_02_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_02$ } - } - } - # Agent type 03. - 0 = { - trigger = { - NOR = { - scope:agent_type_03 = flag:empty - var:choice_a = flag:$AGENT_TYPE_03$ - } - scheme_owner = { can_have_$AGENT_TYPE_03$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_03$ - } - modifier = { - add = $AGENT_TYPE_03_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_03$ } - } - } - # Agent type 04. - 0 = { - trigger = { - NOR = { - scope:agent_type_04 = flag:empty - var:choice_a = flag:$AGENT_TYPE_04$ - } - scheme_owner = { can_have_$AGENT_TYPE_04$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_04$ - } - modifier = { - add = $AGENT_TYPE_04_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_04$ } - } - } - # Agent type 05. - 0 = { - trigger = { - NOR = { - scope:agent_type_05 = flag:empty - var:choice_a = flag:$AGENT_TYPE_05$ - } - scheme_owner = { can_have_$AGENT_TYPE_05$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_05$ - } - modifier = { - add = $AGENT_TYPE_05_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_05$ } - } - } - # Agent type 06. - 0 = { - trigger = { - NOR = { - scope:agent_type_06 = flag:empty - var:choice_a = flag:$AGENT_TYPE_06$ - } - scheme_owner = { can_have_$AGENT_TYPE_06$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_06$ - } - modifier = { - add = $AGENT_TYPE_06_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_06$ } - } - } - # Agent type 07. - 0 = { - trigger = { - NOR = { - scope:agent_type_07 = flag:empty - var:choice_a = flag:$AGENT_TYPE_07$ - } - scheme_owner = { can_have_$AGENT_TYPE_07$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_07$ - } - modifier = { - add = $AGENT_TYPE_07_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_07$ } - } - } - # Agent type 08. - 0 = { - trigger = { - NOR = { - scope:agent_type_08 = flag:empty - var:choice_a = flag:$AGENT_TYPE_08$ - } - scheme_owner = { can_have_$AGENT_TYPE_08$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_08$ - } - modifier = { - add = $AGENT_TYPE_08_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_08$ } - } - } - # Agent type 09. - 0 = { - trigger = { - NOR = { - scope:agent_type_09 = flag:empty - var:choice_a = flag:$AGENT_TYPE_09$ - } - scheme_owner = { can_have_$AGENT_TYPE_09$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_09$ - } - modifier = { - add = $AGENT_TYPE_09_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_09$ } - } - } - # Agent type 10. - 0 = { - trigger = { - NOR = { - scope:agent_type_10 = flag:empty - var:choice_a = flag:$AGENT_TYPE_10$ - } - scheme_owner = { can_have_$AGENT_TYPE_10$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_10$ - } - modifier = { - add = $AGENT_TYPE_10_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_10$ } - } - } - # Agent type 11. - 0 = { - trigger = { - NOR = { - scope:agent_type_11 = flag:empty - var:choice_a = flag:$AGENT_TYPE_11$ - } - scheme_owner = { can_have_$AGENT_TYPE_11$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_11$ - } - modifier = { - add = $AGENT_TYPE_11_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_11$ } - } - } - # Agent type 12. - 0 = { - trigger = { - NOR = { - scope:agent_type_12 = flag:empty - var:choice_a = flag:$AGENT_TYPE_12$ - } - scheme_owner = { can_have_$AGENT_TYPE_12$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_12$ - } - modifier = { - add = $AGENT_TYPE_12_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_12$ } - } - } - } - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0001 } - } -} -roll_critical_moment_options_13_agent_types_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:$OUTPUT_EVENT$ - } - if = { - limit = { - any_scheme_agent_slot = { count < character_max_scheme_agents_value } - scope:scheme = { - NOR = { - has_variable = choice_a - has_variable = choice_b - } - } - } - # First, let's determine which types we're using and which we ain't. - ## Agent type 01. - save_scope_value_as = { - name = agent_type_01 - value = flag:$AGENT_TYPE_01$ - } - ## Agent type 02. - save_scope_value_as = { - name = agent_type_02 - value = flag:$AGENT_TYPE_02$ - } - ## Agent type 03. - save_scope_value_as = { - name = agent_type_03 - value = flag:$AGENT_TYPE_03$ - } - ## Agent type 04. - save_scope_value_as = { - name = agent_type_04 - value = flag:$AGENT_TYPE_04$ - } - ## Agent type 05. - save_scope_value_as = { - name = agent_type_05 - value = flag:$AGENT_TYPE_05$ - } - ## Agent type 06. - save_scope_value_as = { - name = agent_type_06 - value = flag:$AGENT_TYPE_06$ - } - ## Agent type 07. - save_scope_value_as = { - name = agent_type_07 - value = flag:$AGENT_TYPE_07$ - } - ## Agent type 08. - save_scope_value_as = { - name = agent_type_08 - value = flag:$AGENT_TYPE_08$ - } - ## Agent type 09. - save_scope_value_as = { - name = agent_type_09 - value = flag:$AGENT_TYPE_09$ - } - ## Agent type 10. - save_scope_value_as = { - name = agent_type_10 - value = flag:$AGENT_TYPE_10$ - } - ## Agent type 11. - save_scope_value_as = { - name = agent_type_11 - value = flag:$AGENT_TYPE_11$ - } - ## Agent type 12. - save_scope_value_as = { - name = agent_type_12 - value = flag:$AGENT_TYPE_12$ - } - ## Agent type 13. - save_scope_value_as = { - name = agent_type_13 - value = flag:$AGENT_TYPE_13$ - } - # Then we roll for who's getting picked. - ## For var:choice_a. - random_list = { - # Agent type 01. - 0 = { - trigger = { - NOT = { scope:agent_type_01 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_01$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_01$ - } - modifier = { - add = $AGENT_TYPE_01_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_01$ } - } - } - # Agent type 02. - 0 = { - trigger = { - NOT = { scope:agent_type_02 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_02$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_02$ - } - modifier = { - add = $AGENT_TYPE_02_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_02$ } - } - } - # Agent type 03. - 0 = { - trigger = { - NOT = { scope:agent_type_03 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_03$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_03$ - } - modifier = { - add = $AGENT_TYPE_03_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_03$ } - } - } - # Agent type 04. - 0 = { - trigger = { - NOT = { scope:agent_type_04 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_04$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_04$ - } - modifier = { - add = $AGENT_TYPE_04_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_04$ } - } - } - # Agent type 05. - 0 = { - trigger = { - NOT = { scope:agent_type_05 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_05$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_05$ - } - modifier = { - add = $AGENT_TYPE_05_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_05$ } - } - } - # Agent type 06. - 0 = { - trigger = { - NOT = { scope:agent_type_06 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_06$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_06$ - } - modifier = { - add = $AGENT_TYPE_06_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_06$ } - } - } - # Agent type 07. - 0 = { - trigger = { - NOT = { scope:agent_type_07 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_07$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_07$ - } - modifier = { - add = $AGENT_TYPE_07_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_07$ } - } - } - # Agent type 08. - 0 = { - trigger = { - NOT = { scope:agent_type_08 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_08$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_08$ - } - modifier = { - add = $AGENT_TYPE_08_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_08$ } - } - } - # Agent type 09. - 0 = { - trigger = { - NOT = { scope:agent_type_09 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_09$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_09$ - } - modifier = { - add = $AGENT_TYPE_09_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_09$ } - } - } - # Agent type 10. - 0 = { - trigger = { - NOT = { scope:agent_type_10 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_10$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_10$ - } - modifier = { - add = $AGENT_TYPE_10_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_10$ } - } - } - # Agent type 11. - 0 = { - trigger = { - NOT = { scope:agent_type_11 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_11$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_11$ - } - modifier = { - add = $AGENT_TYPE_11_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_11$ } - } - } - # Agent type 12. - 0 = { - trigger = { - NOT = { scope:agent_type_12 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_12$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_12$ - } - modifier = { - add = $AGENT_TYPE_12_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_12$ } - } - } - # Agent type 13. - 0 = { - trigger = { - NOT = { scope:agent_type_13 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_13$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_13$ - } - modifier = { - add = $AGENT_TYPE_13_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_13$ } - } - } - } - ## And var:choice_b. - random_list = { - # Agent type 01. - 0 = { - trigger = { - NOR = { - scope:agent_type_01 = flag:empty - var:choice_a = flag:$AGENT_TYPE_01$ - } - scheme_owner = { can_have_$AGENT_TYPE_01$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_01$ - } - modifier = { - add = $AGENT_TYPE_01_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_01$ } - } - } - # Agent type 02. - 0 = { - trigger = { - NOR = { - scope:agent_type_02 = flag:empty - var:choice_a = flag:$AGENT_TYPE_02$ - } - scheme_owner = { can_have_$AGENT_TYPE_02$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_02$ - } - modifier = { - add = $AGENT_TYPE_02_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_02$ } - } - } - # Agent type 03. - 0 = { - trigger = { - NOR = { - scope:agent_type_03 = flag:empty - var:choice_a = flag:$AGENT_TYPE_03$ - } - scheme_owner = { can_have_$AGENT_TYPE_03$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_03$ - } - modifier = { - add = $AGENT_TYPE_03_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_03$ } - } - } - # Agent type 04. - 0 = { - trigger = { - NOR = { - scope:agent_type_04 = flag:empty - var:choice_a = flag:$AGENT_TYPE_04$ - } - scheme_owner = { can_have_$AGENT_TYPE_04$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_04$ - } - modifier = { - add = $AGENT_TYPE_04_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_04$ } - } - } - # Agent type 05. - 0 = { - trigger = { - NOR = { - scope:agent_type_05 = flag:empty - var:choice_a = flag:$AGENT_TYPE_05$ - } - scheme_owner = { can_have_$AGENT_TYPE_05$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_05$ - } - modifier = { - add = $AGENT_TYPE_05_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_05$ } - } - } - # Agent type 06. - 0 = { - trigger = { - NOR = { - scope:agent_type_06 = flag:empty - var:choice_a = flag:$AGENT_TYPE_06$ - } - scheme_owner = { can_have_$AGENT_TYPE_06$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_06$ - } - modifier = { - add = $AGENT_TYPE_06_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_06$ } - } - } - # Agent type 07. - 0 = { - trigger = { - NOR = { - scope:agent_type_07 = flag:empty - var:choice_a = flag:$AGENT_TYPE_07$ - } - scheme_owner = { can_have_$AGENT_TYPE_07$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_07$ - } - modifier = { - add = $AGENT_TYPE_07_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_07$ } - } - } - # Agent type 08. - 0 = { - trigger = { - NOR = { - scope:agent_type_08 = flag:empty - var:choice_a = flag:$AGENT_TYPE_08$ - } - scheme_owner = { can_have_$AGENT_TYPE_08$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_08$ - } - modifier = { - add = $AGENT_TYPE_08_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_08$ } - } - } - # Agent type 09. - 0 = { - trigger = { - NOR = { - scope:agent_type_09 = flag:empty - var:choice_a = flag:$AGENT_TYPE_09$ - } - scheme_owner = { can_have_$AGENT_TYPE_09$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_09$ - } - modifier = { - add = $AGENT_TYPE_09_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_09$ } - } - } - # Agent type 10. - 0 = { - trigger = { - NOR = { - scope:agent_type_10 = flag:empty - var:choice_a = flag:$AGENT_TYPE_10$ - } - scheme_owner = { can_have_$AGENT_TYPE_10$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_10$ - } - modifier = { - add = $AGENT_TYPE_10_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_10$ } - } - } - # Agent type 11. - 0 = { - trigger = { - NOR = { - scope:agent_type_11 = flag:empty - var:choice_a = flag:$AGENT_TYPE_11$ - } - scheme_owner = { can_have_$AGENT_TYPE_11$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_11$ - } - modifier = { - add = $AGENT_TYPE_11_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_11$ } - } - } - # Agent type 12. - 0 = { - trigger = { - NOR = { - scope:agent_type_12 = flag:empty - var:choice_a = flag:$AGENT_TYPE_12$ - } - scheme_owner = { can_have_$AGENT_TYPE_12$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_12$ - } - modifier = { - add = $AGENT_TYPE_12_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_12$ } - } - } - # Agent type 13. - 0 = { - trigger = { - NOR = { - scope:agent_type_13 = flag:empty - var:choice_a = flag:$AGENT_TYPE_13$ - } - scheme_owner = { can_have_$AGENT_TYPE_13$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_13$ - } - modifier = { - add = $AGENT_TYPE_13_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_13$ } - } - } - } - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0001 } - } -} -roll_critical_moment_options_14_agent_types_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:$OUTPUT_EVENT$ - } - if = { - limit = { - any_scheme_agent_slot = { count < character_max_scheme_agents_value } - scope:scheme = { - NOR = { - has_variable = choice_a - has_variable = choice_b - } - } - } - # First, let's determine which types we're using and which we ain't. - ## Agent type 01. - save_scope_value_as = { - name = agent_type_01 - value = flag:$AGENT_TYPE_01$ - } - ## Agent type 02. - save_scope_value_as = { - name = agent_type_02 - value = flag:$AGENT_TYPE_02$ - } - ## Agent type 03. - save_scope_value_as = { - name = agent_type_03 - value = flag:$AGENT_TYPE_03$ - } - ## Agent type 04. - save_scope_value_as = { - name = agent_type_04 - value = flag:$AGENT_TYPE_04$ - } - ## Agent type 05. - save_scope_value_as = { - name = agent_type_05 - value = flag:$AGENT_TYPE_05$ - } - ## Agent type 06. - save_scope_value_as = { - name = agent_type_06 - value = flag:$AGENT_TYPE_06$ - } - ## Agent type 07. - save_scope_value_as = { - name = agent_type_07 - value = flag:$AGENT_TYPE_07$ - } - ## Agent type 08. - save_scope_value_as = { - name = agent_type_08 - value = flag:$AGENT_TYPE_08$ - } - ## Agent type 09. - save_scope_value_as = { - name = agent_type_09 - value = flag:$AGENT_TYPE_09$ - } - ## Agent type 10. - save_scope_value_as = { - name = agent_type_10 - value = flag:$AGENT_TYPE_10$ - } - ## Agent type 11. - save_scope_value_as = { - name = agent_type_11 - value = flag:$AGENT_TYPE_11$ - } - ## Agent type 12. - save_scope_value_as = { - name = agent_type_12 - value = flag:$AGENT_TYPE_12$ - } - ## Agent type 13. - save_scope_value_as = { - name = agent_type_13 - value = flag:$AGENT_TYPE_13$ - } - ## Agent type 14. - save_scope_value_as = { - name = agent_type_14 - value = flag:$AGENT_TYPE_14$ - } - # Then we roll for who's getting picked. - ## For var:choice_a. - random_list = { - # Agent type 01. - 0 = { - trigger = { - NOT = { scope:agent_type_01 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_01$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_01$ - } - modifier = { - add = $AGENT_TYPE_01_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_01$ } - } - } - # Agent type 02. - 0 = { - trigger = { - NOT = { scope:agent_type_02 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_02$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_02$ - } - modifier = { - add = $AGENT_TYPE_02_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_02$ } - } - } - # Agent type 03. - 0 = { - trigger = { - NOT = { scope:agent_type_03 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_03$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_03$ - } - modifier = { - add = $AGENT_TYPE_03_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_03$ } - } - } - # Agent type 04. - 0 = { - trigger = { - NOT = { scope:agent_type_04 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_04$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_04$ - } - modifier = { - add = $AGENT_TYPE_04_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_04$ } - } - } - # Agent type 05. - 0 = { - trigger = { - NOT = { scope:agent_type_05 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_05$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_05$ - } - modifier = { - add = $AGENT_TYPE_05_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_05$ } - } - } - # Agent type 06. - 0 = { - trigger = { - NOT = { scope:agent_type_06 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_06$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_06$ - } - modifier = { - add = $AGENT_TYPE_06_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_06$ } - } - } - # Agent type 07. - 0 = { - trigger = { - NOT = { scope:agent_type_07 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_07$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_07$ - } - modifier = { - add = $AGENT_TYPE_07_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_07$ } - } - } - # Agent type 08. - 0 = { - trigger = { - NOT = { scope:agent_type_08 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_08$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_08$ - } - modifier = { - add = $AGENT_TYPE_08_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_08$ } - } - } - # Agent type 09. - 0 = { - trigger = { - NOT = { scope:agent_type_09 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_09$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_09$ - } - modifier = { - add = $AGENT_TYPE_09_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_09$ } - } - } - # Agent type 10. - 0 = { - trigger = { - NOT = { scope:agent_type_10 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_10$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_10$ - } - modifier = { - add = $AGENT_TYPE_10_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_10$ } - } - } - # Agent type 11. - 0 = { - trigger = { - NOT = { scope:agent_type_11 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_11$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_11$ - } - modifier = { - add = $AGENT_TYPE_11_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_11$ } - } - } - # Agent type 12. - 0 = { - trigger = { - NOT = { scope:agent_type_12 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_12$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_12$ - } - modifier = { - add = $AGENT_TYPE_12_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_12$ } - } - } - # Agent type 13. - 0 = { - trigger = { - NOT = { scope:agent_type_13 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_13$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_13$ - } - modifier = { - add = $AGENT_TYPE_13_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_13$ } - } - } - # Agent type 14. - 0 = { - trigger = { - NOT = { scope:agent_type_14 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_14$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_14$ - } - modifier = { - add = $AGENT_TYPE_14_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_14$ } - } - } - } - ## And var:choice_b. - random_list = { - # Agent type 01. - 0 = { - trigger = { - NOR = { - scope:agent_type_01 = flag:empty - var:choice_a = flag:$AGENT_TYPE_01$ - } - scheme_owner = { can_have_$AGENT_TYPE_01$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_01$ - } - modifier = { - add = $AGENT_TYPE_01_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_01$ } - } - } - # Agent type 02. - 0 = { - trigger = { - NOR = { - scope:agent_type_02 = flag:empty - var:choice_a = flag:$AGENT_TYPE_02$ - } - scheme_owner = { can_have_$AGENT_TYPE_02$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_02$ - } - modifier = { - add = $AGENT_TYPE_02_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_02$ } - } - } - # Agent type 03. - 0 = { - trigger = { - NOR = { - scope:agent_type_03 = flag:empty - var:choice_a = flag:$AGENT_TYPE_03$ - } - scheme_owner = { can_have_$AGENT_TYPE_03$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_03$ - } - modifier = { - add = $AGENT_TYPE_03_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_03$ } - } - } - # Agent type 04. - 0 = { - trigger = { - NOR = { - scope:agent_type_04 = flag:empty - var:choice_a = flag:$AGENT_TYPE_04$ - } - scheme_owner = { can_have_$AGENT_TYPE_04$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_04$ - } - modifier = { - add = $AGENT_TYPE_04_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_04$ } - } - } - # Agent type 05. - 0 = { - trigger = { - NOR = { - scope:agent_type_05 = flag:empty - var:choice_a = flag:$AGENT_TYPE_05$ - } - scheme_owner = { can_have_$AGENT_TYPE_05$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_05$ - } - modifier = { - add = $AGENT_TYPE_05_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_05$ } - } - } - # Agent type 06. - 0 = { - trigger = { - NOR = { - scope:agent_type_06 = flag:empty - var:choice_a = flag:$AGENT_TYPE_06$ - } - scheme_owner = { can_have_$AGENT_TYPE_06$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_06$ - } - modifier = { - add = $AGENT_TYPE_06_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_06$ } - } - } - # Agent type 07. - 0 = { - trigger = { - NOR = { - scope:agent_type_07 = flag:empty - var:choice_a = flag:$AGENT_TYPE_07$ - } - scheme_owner = { can_have_$AGENT_TYPE_07$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_07$ - } - modifier = { - add = $AGENT_TYPE_07_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_07$ } - } - } - # Agent type 08. - 0 = { - trigger = { - NOR = { - scope:agent_type_08 = flag:empty - var:choice_a = flag:$AGENT_TYPE_08$ - } - scheme_owner = { can_have_$AGENT_TYPE_08$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_08$ - } - modifier = { - add = $AGENT_TYPE_08_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_08$ } - } - } - # Agent type 09. - 0 = { - trigger = { - NOR = { - scope:agent_type_09 = flag:empty - var:choice_a = flag:$AGENT_TYPE_09$ - } - scheme_owner = { can_have_$AGENT_TYPE_09$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_09$ - } - modifier = { - add = $AGENT_TYPE_09_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_09$ } - } - } - # Agent type 10. - 0 = { - trigger = { - NOR = { - scope:agent_type_10 = flag:empty - var:choice_a = flag:$AGENT_TYPE_10$ - } - scheme_owner = { can_have_$AGENT_TYPE_10$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_10$ - } - modifier = { - add = $AGENT_TYPE_10_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_10$ } - } - } - # Agent type 11. - 0 = { - trigger = { - NOR = { - scope:agent_type_11 = flag:empty - var:choice_a = flag:$AGENT_TYPE_11$ - } - scheme_owner = { can_have_$AGENT_TYPE_11$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_11$ - } - modifier = { - add = $AGENT_TYPE_11_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_11$ } - } - } - # Agent type 12. - 0 = { - trigger = { - NOR = { - scope:agent_type_12 = flag:empty - var:choice_a = flag:$AGENT_TYPE_12$ - } - scheme_owner = { can_have_$AGENT_TYPE_12$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_12$ - } - modifier = { - add = $AGENT_TYPE_12_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_12$ } - } - } - # Agent type 13. - 0 = { - trigger = { - NOR = { - scope:agent_type_13 = flag:empty - var:choice_a = flag:$AGENT_TYPE_13$ - } - scheme_owner = { can_have_$AGENT_TYPE_13$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_13$ - } - modifier = { - add = $AGENT_TYPE_13_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_13$ } - } - } - # Agent type 14. - 0 = { - trigger = { - NOR = { - scope:agent_type_14 = flag:empty - var:choice_a = flag:$AGENT_TYPE_14$ - } - scheme_owner = { can_have_$AGENT_TYPE_14$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_14$ - } - modifier = { - add = $AGENT_TYPE_14_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_14$ } - } - } - } - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0001 } - } -} -roll_critical_moment_options_15_agent_types_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:$OUTPUT_EVENT$ - } - if = { - limit = { - any_scheme_agent_slot = { count < character_max_scheme_agents_value } - scope:scheme = { - NOR = { - has_variable = choice_a - has_variable = choice_b - } - } - } - # First, let's determine which types we're using and which we ain't. - ## Agent type 01. - save_scope_value_as = { - name = agent_type_01 - value = flag:$AGENT_TYPE_01$ - } - ## Agent type 02. - save_scope_value_as = { - name = agent_type_02 - value = flag:$AGENT_TYPE_02$ - } - ## Agent type 03. - save_scope_value_as = { - name = agent_type_03 - value = flag:$AGENT_TYPE_03$ - } - ## Agent type 04. - save_scope_value_as = { - name = agent_type_04 - value = flag:$AGENT_TYPE_04$ - } - ## Agent type 05. - save_scope_value_as = { - name = agent_type_05 - value = flag:$AGENT_TYPE_05$ - } - ## Agent type 06. - save_scope_value_as = { - name = agent_type_06 - value = flag:$AGENT_TYPE_06$ - } - ## Agent type 07. - save_scope_value_as = { - name = agent_type_07 - value = flag:$AGENT_TYPE_07$ - } - ## Agent type 08. - save_scope_value_as = { - name = agent_type_08 - value = flag:$AGENT_TYPE_08$ - } - ## Agent type 09. - save_scope_value_as = { - name = agent_type_09 - value = flag:$AGENT_TYPE_09$ - } - ## Agent type 10. - save_scope_value_as = { - name = agent_type_10 - value = flag:$AGENT_TYPE_10$ - } - ## Agent type 11. - save_scope_value_as = { - name = agent_type_11 - value = flag:$AGENT_TYPE_11$ - } - ## Agent type 12. - save_scope_value_as = { - name = agent_type_12 - value = flag:$AGENT_TYPE_12$ - } - ## Agent type 13. - save_scope_value_as = { - name = agent_type_13 - value = flag:$AGENT_TYPE_13$ - } - ## Agent type 14. - save_scope_value_as = { - name = agent_type_14 - value = flag:$AGENT_TYPE_14$ - } - ## Agent type 15. - save_scope_value_as = { - name = agent_type_15 - value = flag:$AGENT_TYPE_15$ - } - # Then we roll for who's getting picked. - ## For var:choice_a. - random_list = { - # Agent type 01. - 0 = { - trigger = { - NOT = { scope:agent_type_01 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_01$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_01$ - } - modifier = { - add = $AGENT_TYPE_01_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_01$ } - } - } - # Agent type 02. - 0 = { - trigger = { - NOT = { scope:agent_type_02 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_02$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_02$ - } - modifier = { - add = $AGENT_TYPE_02_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_02$ } - } - } - # Agent type 03. - 0 = { - trigger = { - NOT = { scope:agent_type_03 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_03$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_03$ - } - modifier = { - add = $AGENT_TYPE_03_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_03$ } - } - } - # Agent type 04. - 0 = { - trigger = { - NOT = { scope:agent_type_04 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_04$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_04$ - } - modifier = { - add = $AGENT_TYPE_04_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_04$ } - } - } - # Agent type 05. - 0 = { - trigger = { - NOT = { scope:agent_type_05 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_05$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_05$ - } - modifier = { - add = $AGENT_TYPE_05_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_05$ } - } - } - # Agent type 06. - 0 = { - trigger = { - NOT = { scope:agent_type_06 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_06$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_06$ - } - modifier = { - add = $AGENT_TYPE_06_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_06$ } - } - } - # Agent type 07. - 0 = { - trigger = { - NOT = { scope:agent_type_07 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_07$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_07$ - } - modifier = { - add = $AGENT_TYPE_07_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_07$ } - } - } - # Agent type 08. - 0 = { - trigger = { - NOT = { scope:agent_type_08 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_08$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_08$ - } - modifier = { - add = $AGENT_TYPE_08_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_08$ } - } - } - # Agent type 09. - 0 = { - trigger = { - NOT = { scope:agent_type_09 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_09$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_09$ - } - modifier = { - add = $AGENT_TYPE_09_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_09$ } - } - } - # Agent type 10. - 0 = { - trigger = { - NOT = { scope:agent_type_10 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_10$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_10$ - } - modifier = { - add = $AGENT_TYPE_10_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_10$ } - } - } - # Agent type 11. - 0 = { - trigger = { - NOT = { scope:agent_type_11 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_11$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_11$ - } - modifier = { - add = $AGENT_TYPE_11_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_11$ } - } - } - # Agent type 12. - 0 = { - trigger = { - NOT = { scope:agent_type_12 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_12$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_12$ - } - modifier = { - add = $AGENT_TYPE_12_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_12$ } - } - } - # Agent type 13. - 0 = { - trigger = { - NOT = { scope:agent_type_13 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_13$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_13$ - } - modifier = { - add = $AGENT_TYPE_13_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_13$ } - } - } - # Agent type 14. - 0 = { - trigger = { - NOT = { scope:agent_type_14 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_14$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_14$ - } - modifier = { - add = $AGENT_TYPE_14_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_14$ } - } - } - # Agent type 15. - 0 = { - trigger = { - NOT = { scope:agent_type_15 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_15$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_15$ - } - modifier = { - add = $AGENT_TYPE_15_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_15$ } - } - } - } - ## And var:choice_b. - random_list = { - # Agent type 01. - 0 = { - trigger = { - NOR = { - scope:agent_type_01 = flag:empty - var:choice_a = flag:$AGENT_TYPE_01$ - } - scheme_owner = { can_have_$AGENT_TYPE_01$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_01$ - } - modifier = { - add = $AGENT_TYPE_01_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_01$ } - } - } - # Agent type 02. - 0 = { - trigger = { - NOR = { - scope:agent_type_02 = flag:empty - var:choice_a = flag:$AGENT_TYPE_02$ - } - scheme_owner = { can_have_$AGENT_TYPE_02$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_02$ - } - modifier = { - add = $AGENT_TYPE_02_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_02$ } - } - } - # Agent type 03. - 0 = { - trigger = { - NOR = { - scope:agent_type_03 = flag:empty - var:choice_a = flag:$AGENT_TYPE_03$ - } - scheme_owner = { can_have_$AGENT_TYPE_03$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_03$ - } - modifier = { - add = $AGENT_TYPE_03_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_03$ } - } - } - # Agent type 04. - 0 = { - trigger = { - NOR = { - scope:agent_type_04 = flag:empty - var:choice_a = flag:$AGENT_TYPE_04$ - } - scheme_owner = { can_have_$AGENT_TYPE_04$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_04$ - } - modifier = { - add = $AGENT_TYPE_04_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_04$ } - } - } - # Agent type 05. - 0 = { - trigger = { - NOR = { - scope:agent_type_05 = flag:empty - var:choice_a = flag:$AGENT_TYPE_05$ - } - scheme_owner = { can_have_$AGENT_TYPE_05$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_05$ - } - modifier = { - add = $AGENT_TYPE_05_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_05$ } - } - } - # Agent type 06. - 0 = { - trigger = { - NOR = { - scope:agent_type_06 = flag:empty - var:choice_a = flag:$AGENT_TYPE_06$ - } - scheme_owner = { can_have_$AGENT_TYPE_06$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_06$ - } - modifier = { - add = $AGENT_TYPE_06_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_06$ } - } - } - # Agent type 07. - 0 = { - trigger = { - NOR = { - scope:agent_type_07 = flag:empty - var:choice_a = flag:$AGENT_TYPE_07$ - } - scheme_owner = { can_have_$AGENT_TYPE_07$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_07$ - } - modifier = { - add = $AGENT_TYPE_07_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_07$ } - } - } - # Agent type 08. - 0 = { - trigger = { - NOR = { - scope:agent_type_08 = flag:empty - var:choice_a = flag:$AGENT_TYPE_08$ - } - scheme_owner = { can_have_$AGENT_TYPE_08$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_08$ - } - modifier = { - add = $AGENT_TYPE_08_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_08$ } - } - } - # Agent type 09. - 0 = { - trigger = { - NOR = { - scope:agent_type_09 = flag:empty - var:choice_a = flag:$AGENT_TYPE_09$ - } - scheme_owner = { can_have_$AGENT_TYPE_09$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_09$ - } - modifier = { - add = $AGENT_TYPE_09_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_09$ } - } - } - # Agent type 10. - 0 = { - trigger = { - NOR = { - scope:agent_type_10 = flag:empty - var:choice_a = flag:$AGENT_TYPE_10$ - } - scheme_owner = { can_have_$AGENT_TYPE_10$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_10$ - } - modifier = { - add = $AGENT_TYPE_10_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_10$ } - } - } - # Agent type 11. - 0 = { - trigger = { - NOR = { - scope:agent_type_11 = flag:empty - var:choice_a = flag:$AGENT_TYPE_11$ - } - scheme_owner = { can_have_$AGENT_TYPE_11$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_11$ - } - modifier = { - add = $AGENT_TYPE_11_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_11$ } - } - } - # Agent type 12. - 0 = { - trigger = { - NOR = { - scope:agent_type_12 = flag:empty - var:choice_a = flag:$AGENT_TYPE_12$ - } - scheme_owner = { can_have_$AGENT_TYPE_12$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_12$ - } - modifier = { - add = $AGENT_TYPE_12_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_12$ } - } - } - # Agent type 13. - 0 = { - trigger = { - NOR = { - scope:agent_type_13 = flag:empty - var:choice_a = flag:$AGENT_TYPE_13$ - } - scheme_owner = { can_have_$AGENT_TYPE_13$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_13$ - } - modifier = { - add = $AGENT_TYPE_13_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_13$ } - } - } - # Agent type 14. - 0 = { - trigger = { - NOR = { - scope:agent_type_14 = flag:empty - var:choice_a = flag:$AGENT_TYPE_14$ - } - scheme_owner = { can_have_$AGENT_TYPE_14$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_14$ - } - modifier = { - add = $AGENT_TYPE_14_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_14$ } - } - } - # Agent type 15. - 0 = { - trigger = { - NOR = { - scope:agent_type_15 = flag:empty - var:choice_a = flag:$AGENT_TYPE_15$ - } - scheme_owner = { can_have_$AGENT_TYPE_15$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_15$ - } - modifier = { - add = $AGENT_TYPE_15_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_15$ } - } - } - } - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0001 } - } -} -roll_critical_moment_options_16_agent_types_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:$OUTPUT_EVENT$ - } - if = { - limit = { - any_scheme_agent_slot = { count < character_max_scheme_agents_value } - scope:scheme = { - NOR = { - has_variable = choice_a - has_variable = choice_b - } - } - } - # First, let's determine which types we're using and which we ain't. - ## Agent type 01. - save_scope_value_as = { - name = agent_type_01 - value = flag:$AGENT_TYPE_01$ - } - ## Agent type 02. - save_scope_value_as = { - name = agent_type_02 - value = flag:$AGENT_TYPE_02$ - } - ## Agent type 03. - save_scope_value_as = { - name = agent_type_03 - value = flag:$AGENT_TYPE_03$ - } - ## Agent type 04. - save_scope_value_as = { - name = agent_type_04 - value = flag:$AGENT_TYPE_04$ - } - ## Agent type 05. - save_scope_value_as = { - name = agent_type_05 - value = flag:$AGENT_TYPE_05$ - } - ## Agent type 06. - save_scope_value_as = { - name = agent_type_06 - value = flag:$AGENT_TYPE_06$ - } - ## Agent type 07. - save_scope_value_as = { - name = agent_type_07 - value = flag:$AGENT_TYPE_07$ - } - ## Agent type 08. - save_scope_value_as = { - name = agent_type_08 - value = flag:$AGENT_TYPE_08$ - } - ## Agent type 09. - save_scope_value_as = { - name = agent_type_09 - value = flag:$AGENT_TYPE_09$ - } - ## Agent type 10. - save_scope_value_as = { - name = agent_type_10 - value = flag:$AGENT_TYPE_10$ - } - ## Agent type 11. - save_scope_value_as = { - name = agent_type_11 - value = flag:$AGENT_TYPE_11$ - } - ## Agent type 12. - save_scope_value_as = { - name = agent_type_12 - value = flag:$AGENT_TYPE_12$ - } - ## Agent type 13. - save_scope_value_as = { - name = agent_type_13 - value = flag:$AGENT_TYPE_13$ - } - ## Agent type 14. - save_scope_value_as = { - name = agent_type_14 - value = flag:$AGENT_TYPE_14$ - } - ## Agent type 15. - save_scope_value_as = { - name = agent_type_15 - value = flag:$AGENT_TYPE_15$ - } - ## Agent type 16. - save_scope_value_as = { - name = agent_type_16 - value = flag:$AGENT_TYPE_16$ - } - # Then we roll for who's getting picked. - ## For var:choice_a. - random_list = { - # Agent type 01. - 0 = { - trigger = { - NOT = { scope:agent_type_01 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_01$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_01$ - } - modifier = { - add = $AGENT_TYPE_01_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_01$ } - } - } - # Agent type 02. - 0 = { - trigger = { - NOT = { scope:agent_type_02 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_02$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_02$ - } - modifier = { - add = $AGENT_TYPE_02_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_02$ } - } - } - # Agent type 03. - 0 = { - trigger = { - NOT = { scope:agent_type_03 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_03$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_03$ - } - modifier = { - add = $AGENT_TYPE_03_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_03$ } - } - } - # Agent type 04. - 0 = { - trigger = { - NOT = { scope:agent_type_04 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_04$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_04$ - } - modifier = { - add = $AGENT_TYPE_04_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_04$ } - } - } - # Agent type 05. - 0 = { - trigger = { - NOT = { scope:agent_type_05 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_05$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_05$ - } - modifier = { - add = $AGENT_TYPE_05_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_05$ } - } - } - # Agent type 06. - 0 = { - trigger = { - NOT = { scope:agent_type_06 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_06$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_06$ - } - modifier = { - add = $AGENT_TYPE_06_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_06$ } - } - } - # Agent type 07. - 0 = { - trigger = { - NOT = { scope:agent_type_07 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_07$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_07$ - } - modifier = { - add = $AGENT_TYPE_07_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_07$ } - } - } - # Agent type 08. - 0 = { - trigger = { - NOT = { scope:agent_type_08 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_08$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_08$ - } - modifier = { - add = $AGENT_TYPE_08_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_08$ } - } - } - # Agent type 09. - 0 = { - trigger = { - NOT = { scope:agent_type_09 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_09$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_09$ - } - modifier = { - add = $AGENT_TYPE_09_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_09$ } - } - } - # Agent type 10. - 0 = { - trigger = { - NOT = { scope:agent_type_10 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_10$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_10$ - } - modifier = { - add = $AGENT_TYPE_10_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_10$ } - } - } - # Agent type 11. - 0 = { - trigger = { - NOT = { scope:agent_type_11 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_11$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_11$ - } - modifier = { - add = $AGENT_TYPE_11_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_11$ } - } - } - # Agent type 12. - 0 = { - trigger = { - NOT = { scope:agent_type_12 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_12$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_12$ - } - modifier = { - add = $AGENT_TYPE_12_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_12$ } - } - } - # Agent type 13. - 0 = { - trigger = { - NOT = { scope:agent_type_13 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_13$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_13$ - } - modifier = { - add = $AGENT_TYPE_13_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_13$ } - } - } - # Agent type 14. - 0 = { - trigger = { - NOT = { scope:agent_type_14 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_14$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_14$ - } - modifier = { - add = $AGENT_TYPE_14_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_14$ } - } - } - # Agent type 15. - 0 = { - trigger = { - NOT = { scope:agent_type_15 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_15$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_15$ - } - modifier = { - add = $AGENT_TYPE_15_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_15$ } - } - } - # Agent type 16. - 0 = { - trigger = { - NOT = { scope:agent_type_16 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_16$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_16$ - } - modifier = { - add = $AGENT_TYPE_16_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_16$ } - } - } - } - ## And var:choice_b. - random_list = { - # Agent type 01. - 0 = { - trigger = { - NOR = { - scope:agent_type_01 = flag:empty - var:choice_a = flag:$AGENT_TYPE_01$ - } - scheme_owner = { can_have_$AGENT_TYPE_01$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_01$ - } - modifier = { - add = $AGENT_TYPE_01_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_01$ } - } - } - # Agent type 02. - 0 = { - trigger = { - NOR = { - scope:agent_type_02 = flag:empty - var:choice_a = flag:$AGENT_TYPE_02$ - } - scheme_owner = { can_have_$AGENT_TYPE_02$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_02$ - } - modifier = { - add = $AGENT_TYPE_02_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_02$ } - } - } - # Agent type 03. - 0 = { - trigger = { - NOR = { - scope:agent_type_03 = flag:empty - var:choice_a = flag:$AGENT_TYPE_03$ - } - scheme_owner = { can_have_$AGENT_TYPE_03$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_03$ - } - modifier = { - add = $AGENT_TYPE_03_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_03$ } - } - } - # Agent type 04. - 0 = { - trigger = { - NOR = { - scope:agent_type_04 = flag:empty - var:choice_a = flag:$AGENT_TYPE_04$ - } - scheme_owner = { can_have_$AGENT_TYPE_04$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_04$ - } - modifier = { - add = $AGENT_TYPE_04_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_04$ } - } - } - # Agent type 05. - 0 = { - trigger = { - NOR = { - scope:agent_type_05 = flag:empty - var:choice_a = flag:$AGENT_TYPE_05$ - } - scheme_owner = { can_have_$AGENT_TYPE_05$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_05$ - } - modifier = { - add = $AGENT_TYPE_05_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_05$ } - } - } - # Agent type 06. - 0 = { - trigger = { - NOR = { - scope:agent_type_06 = flag:empty - var:choice_a = flag:$AGENT_TYPE_06$ - } - scheme_owner = { can_have_$AGENT_TYPE_06$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_06$ - } - modifier = { - add = $AGENT_TYPE_06_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_06$ } - } - } - # Agent type 07. - 0 = { - trigger = { - NOR = { - scope:agent_type_07 = flag:empty - var:choice_a = flag:$AGENT_TYPE_07$ - } - scheme_owner = { can_have_$AGENT_TYPE_07$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_07$ - } - modifier = { - add = $AGENT_TYPE_07_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_07$ } - } - } - # Agent type 08. - 0 = { - trigger = { - NOR = { - scope:agent_type_08 = flag:empty - var:choice_a = flag:$AGENT_TYPE_08$ - } - scheme_owner = { can_have_$AGENT_TYPE_08$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_08$ - } - modifier = { - add = $AGENT_TYPE_08_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_08$ } - } - } - # Agent type 09. - 0 = { - trigger = { - NOR = { - scope:agent_type_09 = flag:empty - var:choice_a = flag:$AGENT_TYPE_09$ - } - scheme_owner = { can_have_$AGENT_TYPE_09$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_09$ - } - modifier = { - add = $AGENT_TYPE_09_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_09$ } - } - } - # Agent type 10. - 0 = { - trigger = { - NOR = { - scope:agent_type_10 = flag:empty - var:choice_a = flag:$AGENT_TYPE_10$ - } - scheme_owner = { can_have_$AGENT_TYPE_10$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_10$ - } - modifier = { - add = $AGENT_TYPE_10_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_10$ } - } - } - # Agent type 11. - 0 = { - trigger = { - NOR = { - scope:agent_type_11 = flag:empty - var:choice_a = flag:$AGENT_TYPE_11$ - } - scheme_owner = { can_have_$AGENT_TYPE_11$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_11$ - } - modifier = { - add = $AGENT_TYPE_11_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_11$ } - } - } - # Agent type 12. - 0 = { - trigger = { - NOR = { - scope:agent_type_12 = flag:empty - var:choice_a = flag:$AGENT_TYPE_12$ - } - scheme_owner = { can_have_$AGENT_TYPE_12$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_12$ - } - modifier = { - add = $AGENT_TYPE_12_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_12$ } - } - } - # Agent type 13. - 0 = { - trigger = { - NOR = { - scope:agent_type_13 = flag:empty - var:choice_a = flag:$AGENT_TYPE_13$ - } - scheme_owner = { can_have_$AGENT_TYPE_13$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_13$ - } - modifier = { - add = $AGENT_TYPE_13_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_13$ } - } - } - # Agent type 14. - 0 = { - trigger = { - NOR = { - scope:agent_type_14 = flag:empty - var:choice_a = flag:$AGENT_TYPE_14$ - } - scheme_owner = { can_have_$AGENT_TYPE_14$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_14$ - } - modifier = { - add = $AGENT_TYPE_14_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_14$ } - } - } - # Agent type 15. - 0 = { - trigger = { - NOR = { - scope:agent_type_15 = flag:empty - var:choice_a = flag:$AGENT_TYPE_15$ - } - scheme_owner = { can_have_$AGENT_TYPE_15$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_15$ - } - modifier = { - add = $AGENT_TYPE_15_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_15$ } - } - } - # Agent type 16. - 0 = { - trigger = { - NOR = { - scope:agent_type_16 = flag:empty - var:choice_a = flag:$AGENT_TYPE_16$ - } - scheme_owner = { can_have_$AGENT_TYPE_16$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_16$ - } - modifier = { - add = $AGENT_TYPE_16_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_16$ } - } - } - } - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0001 } - } -} -roll_critical_moment_options_17_agent_types_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:$OUTPUT_EVENT$ - } - if = { - limit = { - any_scheme_agent_slot = { count < character_max_scheme_agents_value } - scope:scheme = { - NOR = { - has_variable = choice_a - has_variable = choice_b - } - } - } - # First, let's determine which types we're using and which we ain't. - ## Agent type 01. - save_scope_value_as = { - name = agent_type_01 - value = flag:$AGENT_TYPE_01$ - } - ## Agent type 02. - save_scope_value_as = { - name = agent_type_02 - value = flag:$AGENT_TYPE_02$ - } - ## Agent type 03. - save_scope_value_as = { - name = agent_type_03 - value = flag:$AGENT_TYPE_03$ - } - ## Agent type 04. - save_scope_value_as = { - name = agent_type_04 - value = flag:$AGENT_TYPE_04$ - } - ## Agent type 05. - save_scope_value_as = { - name = agent_type_05 - value = flag:$AGENT_TYPE_05$ - } - ## Agent type 06. - save_scope_value_as = { - name = agent_type_06 - value = flag:$AGENT_TYPE_06$ - } - ## Agent type 07. - save_scope_value_as = { - name = agent_type_07 - value = flag:$AGENT_TYPE_07$ - } - ## Agent type 08. - save_scope_value_as = { - name = agent_type_08 - value = flag:$AGENT_TYPE_08$ - } - ## Agent type 09. - save_scope_value_as = { - name = agent_type_09 - value = flag:$AGENT_TYPE_09$ - } - ## Agent type 10. - save_scope_value_as = { - name = agent_type_10 - value = flag:$AGENT_TYPE_10$ - } - ## Agent type 11. - save_scope_value_as = { - name = agent_type_11 - value = flag:$AGENT_TYPE_11$ - } - ## Agent type 12. - save_scope_value_as = { - name = agent_type_12 - value = flag:$AGENT_TYPE_12$ - } - ## Agent type 13. - save_scope_value_as = { - name = agent_type_13 - value = flag:$AGENT_TYPE_13$ - } - ## Agent type 14. - save_scope_value_as = { - name = agent_type_14 - value = flag:$AGENT_TYPE_14$ - } - ## Agent type 15. - save_scope_value_as = { - name = agent_type_15 - value = flag:$AGENT_TYPE_15$ - } - ## Agent type 16. - save_scope_value_as = { - name = agent_type_16 - value = flag:$AGENT_TYPE_16$ - } - ## Agent type 17. - save_scope_value_as = { - name = agent_type_17 - value = flag:$AGENT_TYPE_17$ - } - # Then we roll for who's getting picked. - ## For var:choice_a. - random_list = { - # Agent type 01. - 0 = { - trigger = { - NOT = { scope:agent_type_01 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_01$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_01$ - } - modifier = { - add = $AGENT_TYPE_01_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_01$ } - } - } - # Agent type 02. - 0 = { - trigger = { - NOT = { scope:agent_type_02 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_02$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_02$ - } - modifier = { - add = $AGENT_TYPE_02_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_02$ } - } - } - # Agent type 03. - 0 = { - trigger = { - NOT = { scope:agent_type_03 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_03$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_03$ - } - modifier = { - add = $AGENT_TYPE_03_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_03$ } - } - } - # Agent type 04. - 0 = { - trigger = { - NOT = { scope:agent_type_04 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_04$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_04$ - } - modifier = { - add = $AGENT_TYPE_04_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_04$ } - } - } - # Agent type 05. - 0 = { - trigger = { - NOT = { scope:agent_type_05 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_05$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_05$ - } - modifier = { - add = $AGENT_TYPE_05_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_05$ } - } - } - # Agent type 06. - 0 = { - trigger = { - NOT = { scope:agent_type_06 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_06$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_06$ - } - modifier = { - add = $AGENT_TYPE_06_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_06$ } - } - } - # Agent type 07. - 0 = { - trigger = { - NOT = { scope:agent_type_07 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_07$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_07$ - } - modifier = { - add = $AGENT_TYPE_07_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_07$ } - } - } - # Agent type 08. - 0 = { - trigger = { - NOT = { scope:agent_type_08 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_08$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_08$ - } - modifier = { - add = $AGENT_TYPE_08_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_08$ } - } - } - # Agent type 09. - 0 = { - trigger = { - NOT = { scope:agent_type_09 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_09$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_09$ - } - modifier = { - add = $AGENT_TYPE_09_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_09$ } - } - } - # Agent type 10. - 0 = { - trigger = { - NOT = { scope:agent_type_10 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_10$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_10$ - } - modifier = { - add = $AGENT_TYPE_10_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_10$ } - } - } - # Agent type 11. - 0 = { - trigger = { - NOT = { scope:agent_type_11 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_11$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_11$ - } - modifier = { - add = $AGENT_TYPE_11_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_11$ } - } - } - # Agent type 12. - 0 = { - trigger = { - NOT = { scope:agent_type_12 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_12$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_12$ - } - modifier = { - add = $AGENT_TYPE_12_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_12$ } - } - } - # Agent type 13. - 0 = { - trigger = { - NOT = { scope:agent_type_13 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_13$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_13$ - } - modifier = { - add = $AGENT_TYPE_13_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_13$ } - } - } - # Agent type 14. - 0 = { - trigger = { - NOT = { scope:agent_type_14 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_14$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_14$ - } - modifier = { - add = $AGENT_TYPE_14_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_14$ } - } - } - # Agent type 15. - 0 = { - trigger = { - NOT = { scope:agent_type_15 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_15$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_15$ - } - modifier = { - add = $AGENT_TYPE_15_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_15$ } - } - } - # Agent type 16. - 0 = { - trigger = { - NOT = { scope:agent_type_16 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_16$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_16$ - } - modifier = { - add = $AGENT_TYPE_16_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_16$ } - } - } - # Agent type 17. - 0 = { - trigger = { - NOT = { scope:agent_type_17 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_17$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_17$ - } - modifier = { - add = $AGENT_TYPE_17_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_17$ } - } - } - } - ## And var:choice_b. - random_list = { - # Agent type 01. - 0 = { - trigger = { - NOR = { - scope:agent_type_01 = flag:empty - var:choice_a = flag:$AGENT_TYPE_01$ - } - scheme_owner = { can_have_$AGENT_TYPE_01$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_01$ - } - modifier = { - add = $AGENT_TYPE_01_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_01$ } - } - } - # Agent type 02. - 0 = { - trigger = { - NOR = { - scope:agent_type_02 = flag:empty - var:choice_a = flag:$AGENT_TYPE_02$ - } - scheme_owner = { can_have_$AGENT_TYPE_02$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_02$ - } - modifier = { - add = $AGENT_TYPE_02_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_02$ } - } - } - # Agent type 03. - 0 = { - trigger = { - NOR = { - scope:agent_type_03 = flag:empty - var:choice_a = flag:$AGENT_TYPE_03$ - } - scheme_owner = { can_have_$AGENT_TYPE_03$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_03$ - } - modifier = { - add = $AGENT_TYPE_03_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_03$ } - } - } - # Agent type 04. - 0 = { - trigger = { - NOR = { - scope:agent_type_04 = flag:empty - var:choice_a = flag:$AGENT_TYPE_04$ - } - scheme_owner = { can_have_$AGENT_TYPE_04$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_04$ - } - modifier = { - add = $AGENT_TYPE_04_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_04$ } - } - } - # Agent type 05. - 0 = { - trigger = { - NOR = { - scope:agent_type_05 = flag:empty - var:choice_a = flag:$AGENT_TYPE_05$ - } - scheme_owner = { can_have_$AGENT_TYPE_05$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_05$ - } - modifier = { - add = $AGENT_TYPE_05_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_05$ } - } - } - # Agent type 06. - 0 = { - trigger = { - NOR = { - scope:agent_type_06 = flag:empty - var:choice_a = flag:$AGENT_TYPE_06$ - } - scheme_owner = { can_have_$AGENT_TYPE_06$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_06$ - } - modifier = { - add = $AGENT_TYPE_06_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_06$ } - } - } - # Agent type 07. - 0 = { - trigger = { - NOR = { - scope:agent_type_07 = flag:empty - var:choice_a = flag:$AGENT_TYPE_07$ - } - scheme_owner = { can_have_$AGENT_TYPE_07$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_07$ - } - modifier = { - add = $AGENT_TYPE_07_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_07$ } - } - } - # Agent type 08. - 0 = { - trigger = { - NOR = { - scope:agent_type_08 = flag:empty - var:choice_a = flag:$AGENT_TYPE_08$ - } - scheme_owner = { can_have_$AGENT_TYPE_08$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_08$ - } - modifier = { - add = $AGENT_TYPE_08_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_08$ } - } - } - # Agent type 09. - 0 = { - trigger = { - NOR = { - scope:agent_type_09 = flag:empty - var:choice_a = flag:$AGENT_TYPE_09$ - } - scheme_owner = { can_have_$AGENT_TYPE_09$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_09$ - } - modifier = { - add = $AGENT_TYPE_09_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_09$ } - } - } - # Agent type 10. - 0 = { - trigger = { - NOR = { - scope:agent_type_10 = flag:empty - var:choice_a = flag:$AGENT_TYPE_10$ - } - scheme_owner = { can_have_$AGENT_TYPE_10$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_10$ - } - modifier = { - add = $AGENT_TYPE_10_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_10$ } - } - } - # Agent type 11. - 0 = { - trigger = { - NOR = { - scope:agent_type_11 = flag:empty - var:choice_a = flag:$AGENT_TYPE_11$ - } - scheme_owner = { can_have_$AGENT_TYPE_11$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_11$ - } - modifier = { - add = $AGENT_TYPE_11_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_11$ } - } - } - # Agent type 12. - 0 = { - trigger = { - NOR = { - scope:agent_type_12 = flag:empty - var:choice_a = flag:$AGENT_TYPE_12$ - } - scheme_owner = { can_have_$AGENT_TYPE_12$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_12$ - } - modifier = { - add = $AGENT_TYPE_12_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_12$ } - } - } - # Agent type 13. - 0 = { - trigger = { - NOR = { - scope:agent_type_13 = flag:empty - var:choice_a = flag:$AGENT_TYPE_13$ - } - scheme_owner = { can_have_$AGENT_TYPE_13$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_13$ - } - modifier = { - add = $AGENT_TYPE_13_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_13$ } - } - } - # Agent type 14. - 0 = { - trigger = { - NOR = { - scope:agent_type_14 = flag:empty - var:choice_a = flag:$AGENT_TYPE_14$ - } - scheme_owner = { can_have_$AGENT_TYPE_14$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_14$ - } - modifier = { - add = $AGENT_TYPE_14_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_14$ } - } - } - # Agent type 15. - 0 = { - trigger = { - NOR = { - scope:agent_type_15 = flag:empty - var:choice_a = flag:$AGENT_TYPE_15$ - } - scheme_owner = { can_have_$AGENT_TYPE_15$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_15$ - } - modifier = { - add = $AGENT_TYPE_15_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_15$ } - } - } - # Agent type 16. - 0 = { - trigger = { - NOR = { - scope:agent_type_16 = flag:empty - var:choice_a = flag:$AGENT_TYPE_16$ - } - scheme_owner = { can_have_$AGENT_TYPE_16$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_16$ - } - modifier = { - add = $AGENT_TYPE_16_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_16$ } - } - } - # Agent type 17. - 0 = { - trigger = { - NOR = { - scope:agent_type_17 = flag:empty - var:choice_a = flag:$AGENT_TYPE_17$ - } - scheme_owner = { can_have_$AGENT_TYPE_17$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_17$ - } - modifier = { - add = $AGENT_TYPE_17_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_17$ } - } - } - } - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0001 } - } -} -roll_critical_moment_options_18_agent_types_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:$OUTPUT_EVENT$ - } - if = { - limit = { - any_scheme_agent_slot = { count < character_max_scheme_agents_value } - scope:scheme = { - NOR = { - has_variable = choice_a - has_variable = choice_b - } - } - } - # First, let's determine which types we're using and which we ain't. - ## Agent type 01. - save_scope_value_as = { - name = agent_type_01 - value = flag:$AGENT_TYPE_01$ - } - ## Agent type 02. - save_scope_value_as = { - name = agent_type_02 - value = flag:$AGENT_TYPE_02$ - } - ## Agent type 03. - save_scope_value_as = { - name = agent_type_03 - value = flag:$AGENT_TYPE_03$ - } - ## Agent type 04. - save_scope_value_as = { - name = agent_type_04 - value = flag:$AGENT_TYPE_04$ - } - ## Agent type 05. - save_scope_value_as = { - name = agent_type_05 - value = flag:$AGENT_TYPE_05$ - } - ## Agent type 06. - save_scope_value_as = { - name = agent_type_06 - value = flag:$AGENT_TYPE_06$ - } - ## Agent type 07. - save_scope_value_as = { - name = agent_type_07 - value = flag:$AGENT_TYPE_07$ - } - ## Agent type 08. - save_scope_value_as = { - name = agent_type_08 - value = flag:$AGENT_TYPE_08$ - } - ## Agent type 09. - save_scope_value_as = { - name = agent_type_09 - value = flag:$AGENT_TYPE_09$ - } - ## Agent type 10. - save_scope_value_as = { - name = agent_type_10 - value = flag:$AGENT_TYPE_10$ - } - ## Agent type 11. - save_scope_value_as = { - name = agent_type_11 - value = flag:$AGENT_TYPE_11$ - } - ## Agent type 12. - save_scope_value_as = { - name = agent_type_12 - value = flag:$AGENT_TYPE_12$ - } - ## Agent type 13. - save_scope_value_as = { - name = agent_type_13 - value = flag:$AGENT_TYPE_13$ - } - ## Agent type 14. - save_scope_value_as = { - name = agent_type_14 - value = flag:$AGENT_TYPE_14$ - } - ## Agent type 15. - save_scope_value_as = { - name = agent_type_15 - value = flag:$AGENT_TYPE_15$ - } - ## Agent type 16. - save_scope_value_as = { - name = agent_type_16 - value = flag:$AGENT_TYPE_16$ - } - ## Agent type 17. - save_scope_value_as = { - name = agent_type_17 - value = flag:$AGENT_TYPE_17$ - } - ## Agent type 18. - save_scope_value_as = { - name = agent_type_18 - value = flag:$AGENT_TYPE_18$ - } - # Then we roll for who's getting picked. - ## For var:choice_a. - random_list = { - # Agent type 01. - 0 = { - trigger = { - NOT = { scope:agent_type_01 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_01$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_01$ - } - modifier = { - add = $AGENT_TYPE_01_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_01$ } - } - } - # Agent type 02. - 0 = { - trigger = { - NOT = { scope:agent_type_02 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_02$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_02$ - } - modifier = { - add = $AGENT_TYPE_02_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_02$ } - } - } - # Agent type 03. - 0 = { - trigger = { - NOT = { scope:agent_type_03 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_03$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_03$ - } - modifier = { - add = $AGENT_TYPE_03_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_03$ } - } - } - # Agent type 04. - 0 = { - trigger = { - NOT = { scope:agent_type_04 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_04$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_04$ - } - modifier = { - add = $AGENT_TYPE_04_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_04$ } - } - } - # Agent type 05. - 0 = { - trigger = { - NOT = { scope:agent_type_05 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_05$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_05$ - } - modifier = { - add = $AGENT_TYPE_05_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_05$ } - } - } - # Agent type 06. - 0 = { - trigger = { - NOT = { scope:agent_type_06 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_06$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_06$ - } - modifier = { - add = $AGENT_TYPE_06_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_06$ } - } - } - # Agent type 07. - 0 = { - trigger = { - NOT = { scope:agent_type_07 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_07$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_07$ - } - modifier = { - add = $AGENT_TYPE_07_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_07$ } - } - } - # Agent type 08. - 0 = { - trigger = { - NOT = { scope:agent_type_08 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_08$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_08$ - } - modifier = { - add = $AGENT_TYPE_08_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_08$ } - } - } - # Agent type 09. - 0 = { - trigger = { - NOT = { scope:agent_type_09 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_09$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_09$ - } - modifier = { - add = $AGENT_TYPE_09_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_09$ } - } - } - # Agent type 10. - 0 = { - trigger = { - NOT = { scope:agent_type_10 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_10$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_10$ - } - modifier = { - add = $AGENT_TYPE_10_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_10$ } - } - } - # Agent type 11. - 0 = { - trigger = { - NOT = { scope:agent_type_11 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_11$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_11$ - } - modifier = { - add = $AGENT_TYPE_11_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_11$ } - } - } - # Agent type 12. - 0 = { - trigger = { - NOT = { scope:agent_type_12 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_12$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_12$ - } - modifier = { - add = $AGENT_TYPE_12_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_12$ } - } - } - # Agent type 13. - 0 = { - trigger = { - NOT = { scope:agent_type_13 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_13$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_13$ - } - modifier = { - add = $AGENT_TYPE_13_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_13$ } - } - } - # Agent type 14. - 0 = { - trigger = { - NOT = { scope:agent_type_14 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_14$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_14$ - } - modifier = { - add = $AGENT_TYPE_14_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_14$ } - } - } - # Agent type 15. - 0 = { - trigger = { - NOT = { scope:agent_type_15 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_15$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_15$ - } - modifier = { - add = $AGENT_TYPE_15_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_15$ } - } - } - # Agent type 16. - 0 = { - trigger = { - NOT = { scope:agent_type_16 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_16$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_16$ - } - modifier = { - add = $AGENT_TYPE_16_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_16$ } - } - } - # Agent type 17. - 0 = { - trigger = { - NOT = { scope:agent_type_17 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_17$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_17$ - } - modifier = { - add = $AGENT_TYPE_17_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_17$ } - } - } - # Agent type 18. - 0 = { - trigger = { - NOT = { scope:agent_type_18 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_18$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_18$ - } - modifier = { - add = $AGENT_TYPE_18_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_18$ } - } - } - } - ## And var:choice_b. - random_list = { - # Agent type 01. - 0 = { - trigger = { - NOR = { - scope:agent_type_01 = flag:empty - var:choice_a = flag:$AGENT_TYPE_01$ - } - scheme_owner = { can_have_$AGENT_TYPE_01$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_01$ - } - modifier = { - add = $AGENT_TYPE_01_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_01$ } - } - } - # Agent type 02. - 0 = { - trigger = { - NOR = { - scope:agent_type_02 = flag:empty - var:choice_a = flag:$AGENT_TYPE_02$ - } - scheme_owner = { can_have_$AGENT_TYPE_02$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_02$ - } - modifier = { - add = $AGENT_TYPE_02_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_02$ } - } - } - # Agent type 03. - 0 = { - trigger = { - NOR = { - scope:agent_type_03 = flag:empty - var:choice_a = flag:$AGENT_TYPE_03$ - } - scheme_owner = { can_have_$AGENT_TYPE_03$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_03$ - } - modifier = { - add = $AGENT_TYPE_03_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_03$ } - } - } - # Agent type 04. - 0 = { - trigger = { - NOR = { - scope:agent_type_04 = flag:empty - var:choice_a = flag:$AGENT_TYPE_04$ - } - scheme_owner = { can_have_$AGENT_TYPE_04$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_04$ - } - modifier = { - add = $AGENT_TYPE_04_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_04$ } - } - } - # Agent type 05. - 0 = { - trigger = { - NOR = { - scope:agent_type_05 = flag:empty - var:choice_a = flag:$AGENT_TYPE_05$ - } - scheme_owner = { can_have_$AGENT_TYPE_05$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_05$ - } - modifier = { - add = $AGENT_TYPE_05_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_05$ } - } - } - # Agent type 06. - 0 = { - trigger = { - NOR = { - scope:agent_type_06 = flag:empty - var:choice_a = flag:$AGENT_TYPE_06$ - } - scheme_owner = { can_have_$AGENT_TYPE_06$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_06$ - } - modifier = { - add = $AGENT_TYPE_06_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_06$ } - } - } - # Agent type 07. - 0 = { - trigger = { - NOR = { - scope:agent_type_07 = flag:empty - var:choice_a = flag:$AGENT_TYPE_07$ - } - scheme_owner = { can_have_$AGENT_TYPE_07$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_07$ - } - modifier = { - add = $AGENT_TYPE_07_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_07$ } - } - } - # Agent type 08. - 0 = { - trigger = { - NOR = { - scope:agent_type_08 = flag:empty - var:choice_a = flag:$AGENT_TYPE_08$ - } - scheme_owner = { can_have_$AGENT_TYPE_08$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_08$ - } - modifier = { - add = $AGENT_TYPE_08_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_08$ } - } - } - # Agent type 09. - 0 = { - trigger = { - NOR = { - scope:agent_type_09 = flag:empty - var:choice_a = flag:$AGENT_TYPE_09$ - } - scheme_owner = { can_have_$AGENT_TYPE_09$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_09$ - } - modifier = { - add = $AGENT_TYPE_09_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_09$ } - } - } - # Agent type 10. - 0 = { - trigger = { - NOR = { - scope:agent_type_10 = flag:empty - var:choice_a = flag:$AGENT_TYPE_10$ - } - scheme_owner = { can_have_$AGENT_TYPE_10$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_10$ - } - modifier = { - add = $AGENT_TYPE_10_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_10$ } - } - } - # Agent type 11. - 0 = { - trigger = { - NOR = { - scope:agent_type_11 = flag:empty - var:choice_a = flag:$AGENT_TYPE_11$ - } - scheme_owner = { can_have_$AGENT_TYPE_11$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_11$ - } - modifier = { - add = $AGENT_TYPE_11_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_11$ } - } - } - # Agent type 12. - 0 = { - trigger = { - NOR = { - scope:agent_type_12 = flag:empty - var:choice_a = flag:$AGENT_TYPE_12$ - } - scheme_owner = { can_have_$AGENT_TYPE_12$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_12$ - } - modifier = { - add = $AGENT_TYPE_12_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_12$ } - } - } - # Agent type 13. - 0 = { - trigger = { - NOR = { - scope:agent_type_13 = flag:empty - var:choice_a = flag:$AGENT_TYPE_13$ - } - scheme_owner = { can_have_$AGENT_TYPE_13$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_13$ - } - modifier = { - add = $AGENT_TYPE_13_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_13$ } - } - } - # Agent type 14. - 0 = { - trigger = { - NOR = { - scope:agent_type_14 = flag:empty - var:choice_a = flag:$AGENT_TYPE_14$ - } - scheme_owner = { can_have_$AGENT_TYPE_14$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_14$ - } - modifier = { - add = $AGENT_TYPE_14_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_14$ } - } - } - # Agent type 15. - 0 = { - trigger = { - NOR = { - scope:agent_type_15 = flag:empty - var:choice_a = flag:$AGENT_TYPE_15$ - } - scheme_owner = { can_have_$AGENT_TYPE_15$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_15$ - } - modifier = { - add = $AGENT_TYPE_15_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_15$ } - } - } - # Agent type 16. - 0 = { - trigger = { - NOR = { - scope:agent_type_16 = flag:empty - var:choice_a = flag:$AGENT_TYPE_16$ - } - scheme_owner = { can_have_$AGENT_TYPE_16$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_16$ - } - modifier = { - add = $AGENT_TYPE_16_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_16$ } - } - } - # Agent type 17. - 0 = { - trigger = { - NOR = { - scope:agent_type_17 = flag:empty - var:choice_a = flag:$AGENT_TYPE_17$ - } - scheme_owner = { can_have_$AGENT_TYPE_17$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_17$ - } - modifier = { - add = $AGENT_TYPE_17_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_17$ } - } - } - # Agent type 18. - 0 = { - trigger = { - NOR = { - scope:agent_type_18 = flag:empty - var:choice_a = flag:$AGENT_TYPE_18$ - } - scheme_owner = { can_have_$AGENT_TYPE_18$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_18$ - } - modifier = { - add = $AGENT_TYPE_18_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_18$ } - } - } - } - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0001 } - } -} -roll_critical_moment_options_19_agent_types_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:$OUTPUT_EVENT$ - } - if = { - limit = { - any_scheme_agent_slot = { count < character_max_scheme_agents_value } - scope:scheme = { - NOR = { - has_variable = choice_a - has_variable = choice_b - } - } - } - # First, let's determine which types we're using and which we ain't. - ## Agent type 01. - save_scope_value_as = { - name = agent_type_01 - value = flag:$AGENT_TYPE_01$ - } - ## Agent type 02. - save_scope_value_as = { - name = agent_type_02 - value = flag:$AGENT_TYPE_02$ - } - ## Agent type 03. - save_scope_value_as = { - name = agent_type_03 - value = flag:$AGENT_TYPE_03$ - } - ## Agent type 04. - save_scope_value_as = { - name = agent_type_04 - value = flag:$AGENT_TYPE_04$ - } - ## Agent type 05. - save_scope_value_as = { - name = agent_type_05 - value = flag:$AGENT_TYPE_05$ - } - ## Agent type 06. - save_scope_value_as = { - name = agent_type_06 - value = flag:$AGENT_TYPE_06$ - } - ## Agent type 07. - save_scope_value_as = { - name = agent_type_07 - value = flag:$AGENT_TYPE_07$ - } - ## Agent type 08. - save_scope_value_as = { - name = agent_type_08 - value = flag:$AGENT_TYPE_08$ - } - ## Agent type 09. - save_scope_value_as = { - name = agent_type_09 - value = flag:$AGENT_TYPE_09$ - } - ## Agent type 10. - save_scope_value_as = { - name = agent_type_10 - value = flag:$AGENT_TYPE_10$ - } - ## Agent type 11. - save_scope_value_as = { - name = agent_type_11 - value = flag:$AGENT_TYPE_11$ - } - ## Agent type 12. - save_scope_value_as = { - name = agent_type_12 - value = flag:$AGENT_TYPE_12$ - } - ## Agent type 13. - save_scope_value_as = { - name = agent_type_13 - value = flag:$AGENT_TYPE_13$ - } - ## Agent type 14. - save_scope_value_as = { - name = agent_type_14 - value = flag:$AGENT_TYPE_14$ - } - ## Agent type 15. - save_scope_value_as = { - name = agent_type_15 - value = flag:$AGENT_TYPE_15$ - } - ## Agent type 16. - save_scope_value_as = { - name = agent_type_16 - value = flag:$AGENT_TYPE_16$ - } - ## Agent type 17. - save_scope_value_as = { - name = agent_type_17 - value = flag:$AGENT_TYPE_17$ - } - ## Agent type 18. - save_scope_value_as = { - name = agent_type_18 - value = flag:$AGENT_TYPE_18$ - } - ## Agent type 19. - save_scope_value_as = { - name = agent_type_19 - value = flag:$AGENT_TYPE_19$ - } - # Then we roll for who's getting picked. - ## For var:choice_a. - random_list = { - # Agent type 01. - 0 = { - trigger = { - NOT = { scope:agent_type_01 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_01$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_01$ - } - modifier = { - add = $AGENT_TYPE_01_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_01$ } - } - } - # Agent type 02. - 0 = { - trigger = { - NOT = { scope:agent_type_02 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_02$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_02$ - } - modifier = { - add = $AGENT_TYPE_02_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_02$ } - } - } - # Agent type 03. - 0 = { - trigger = { - NOT = { scope:agent_type_03 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_03$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_03$ - } - modifier = { - add = $AGENT_TYPE_03_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_03$ } - } - } - # Agent type 04. - 0 = { - trigger = { - NOT = { scope:agent_type_04 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_04$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_04$ - } - modifier = { - add = $AGENT_TYPE_04_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_04$ } - } - } - # Agent type 05. - 0 = { - trigger = { - NOT = { scope:agent_type_05 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_05$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_05$ - } - modifier = { - add = $AGENT_TYPE_05_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_05$ } - } - } - # Agent type 06. - 0 = { - trigger = { - NOT = { scope:agent_type_06 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_06$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_06$ - } - modifier = { - add = $AGENT_TYPE_06_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_06$ } - } - } - # Agent type 07. - 0 = { - trigger = { - NOT = { scope:agent_type_07 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_07$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_07$ - } - modifier = { - add = $AGENT_TYPE_07_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_07$ } - } - } - # Agent type 08. - 0 = { - trigger = { - NOT = { scope:agent_type_08 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_08$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_08$ - } - modifier = { - add = $AGENT_TYPE_08_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_08$ } - } - } - # Agent type 09. - 0 = { - trigger = { - NOT = { scope:agent_type_09 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_09$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_09$ - } - modifier = { - add = $AGENT_TYPE_09_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_09$ } - } - } - # Agent type 10. - 0 = { - trigger = { - NOT = { scope:agent_type_10 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_10$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_10$ - } - modifier = { - add = $AGENT_TYPE_10_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_10$ } - } - } - # Agent type 11. - 0 = { - trigger = { - NOT = { scope:agent_type_11 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_11$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_11$ - } - modifier = { - add = $AGENT_TYPE_11_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_11$ } - } - } - # Agent type 12. - 0 = { - trigger = { - NOT = { scope:agent_type_12 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_12$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_12$ - } - modifier = { - add = $AGENT_TYPE_12_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_12$ } - } - } - # Agent type 13. - 0 = { - trigger = { - NOT = { scope:agent_type_13 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_13$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_13$ - } - modifier = { - add = $AGENT_TYPE_13_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_13$ } - } - } - # Agent type 14. - 0 = { - trigger = { - NOT = { scope:agent_type_14 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_14$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_14$ - } - modifier = { - add = $AGENT_TYPE_14_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_14$ } - } - } - # Agent type 15. - 0 = { - trigger = { - NOT = { scope:agent_type_15 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_15$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_15$ - } - modifier = { - add = $AGENT_TYPE_15_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_15$ } - } - } - # Agent type 16. - 0 = { - trigger = { - NOT = { scope:agent_type_16 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_16$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_16$ - } - modifier = { - add = $AGENT_TYPE_16_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_16$ } - } - } - # Agent type 17. - 0 = { - trigger = { - NOT = { scope:agent_type_17 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_17$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_17$ - } - modifier = { - add = $AGENT_TYPE_17_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_17$ } - } - } - # Agent type 18. - 0 = { - trigger = { - NOT = { scope:agent_type_18 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_18$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_18$ - } - modifier = { - add = $AGENT_TYPE_18_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_18$ } - } - } - # Agent type 19. - 0 = { - trigger = { - NOT = { scope:agent_type_19 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_19$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_19$ - } - modifier = { - add = $AGENT_TYPE_19_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_19$ } - } - } - } - ## And var:choice_b. - random_list = { - # Agent type 01. - 0 = { - trigger = { - NOR = { - scope:agent_type_01 = flag:empty - var:choice_a = flag:$AGENT_TYPE_01$ - } - scheme_owner = { can_have_$AGENT_TYPE_01$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_01$ - } - modifier = { - add = $AGENT_TYPE_01_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_01$ } - } - } - # Agent type 02. - 0 = { - trigger = { - NOR = { - scope:agent_type_02 = flag:empty - var:choice_a = flag:$AGENT_TYPE_02$ - } - scheme_owner = { can_have_$AGENT_TYPE_02$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_02$ - } - modifier = { - add = $AGENT_TYPE_02_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_02$ } - } - } - # Agent type 03. - 0 = { - trigger = { - NOR = { - scope:agent_type_03 = flag:empty - var:choice_a = flag:$AGENT_TYPE_03$ - } - scheme_owner = { can_have_$AGENT_TYPE_03$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_03$ - } - modifier = { - add = $AGENT_TYPE_03_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_03$ } - } - } - # Agent type 04. - 0 = { - trigger = { - NOR = { - scope:agent_type_04 = flag:empty - var:choice_a = flag:$AGENT_TYPE_04$ - } - scheme_owner = { can_have_$AGENT_TYPE_04$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_04$ - } - modifier = { - add = $AGENT_TYPE_04_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_04$ } - } - } - # Agent type 05. - 0 = { - trigger = { - NOR = { - scope:agent_type_05 = flag:empty - var:choice_a = flag:$AGENT_TYPE_05$ - } - scheme_owner = { can_have_$AGENT_TYPE_05$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_05$ - } - modifier = { - add = $AGENT_TYPE_05_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_05$ } - } - } - # Agent type 06. - 0 = { - trigger = { - NOR = { - scope:agent_type_06 = flag:empty - var:choice_a = flag:$AGENT_TYPE_06$ - } - scheme_owner = { can_have_$AGENT_TYPE_06$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_06$ - } - modifier = { - add = $AGENT_TYPE_06_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_06$ } - } - } - # Agent type 07. - 0 = { - trigger = { - NOR = { - scope:agent_type_07 = flag:empty - var:choice_a = flag:$AGENT_TYPE_07$ - } - scheme_owner = { can_have_$AGENT_TYPE_07$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_07$ - } - modifier = { - add = $AGENT_TYPE_07_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_07$ } - } - } - # Agent type 08. - 0 = { - trigger = { - NOR = { - scope:agent_type_08 = flag:empty - var:choice_a = flag:$AGENT_TYPE_08$ - } - scheme_owner = { can_have_$AGENT_TYPE_08$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_08$ - } - modifier = { - add = $AGENT_TYPE_08_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_08$ } - } - } - # Agent type 09. - 0 = { - trigger = { - NOR = { - scope:agent_type_09 = flag:empty - var:choice_a = flag:$AGENT_TYPE_09$ - } - scheme_owner = { can_have_$AGENT_TYPE_09$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_09$ - } - modifier = { - add = $AGENT_TYPE_09_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_09$ } - } - } - # Agent type 10. - 0 = { - trigger = { - NOR = { - scope:agent_type_10 = flag:empty - var:choice_a = flag:$AGENT_TYPE_10$ - } - scheme_owner = { can_have_$AGENT_TYPE_10$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_10$ - } - modifier = { - add = $AGENT_TYPE_10_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_10$ } - } - } - # Agent type 11. - 0 = { - trigger = { - NOR = { - scope:agent_type_11 = flag:empty - var:choice_a = flag:$AGENT_TYPE_11$ - } - scheme_owner = { can_have_$AGENT_TYPE_11$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_11$ - } - modifier = { - add = $AGENT_TYPE_11_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_11$ } - } - } - # Agent type 12. - 0 = { - trigger = { - NOR = { - scope:agent_type_12 = flag:empty - var:choice_a = flag:$AGENT_TYPE_12$ - } - scheme_owner = { can_have_$AGENT_TYPE_12$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_12$ - } - modifier = { - add = $AGENT_TYPE_12_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_12$ } - } - } - # Agent type 13. - 0 = { - trigger = { - NOR = { - scope:agent_type_13 = flag:empty - var:choice_a = flag:$AGENT_TYPE_13$ - } - scheme_owner = { can_have_$AGENT_TYPE_13$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_13$ - } - modifier = { - add = $AGENT_TYPE_13_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_13$ } - } - } - # Agent type 14. - 0 = { - trigger = { - NOR = { - scope:agent_type_14 = flag:empty - var:choice_a = flag:$AGENT_TYPE_14$ - } - scheme_owner = { can_have_$AGENT_TYPE_14$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_14$ - } - modifier = { - add = $AGENT_TYPE_14_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_14$ } - } - } - # Agent type 15. - 0 = { - trigger = { - NOR = { - scope:agent_type_15 = flag:empty - var:choice_a = flag:$AGENT_TYPE_15$ - } - scheme_owner = { can_have_$AGENT_TYPE_15$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_15$ - } - modifier = { - add = $AGENT_TYPE_15_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_15$ } - } - } - # Agent type 16. - 0 = { - trigger = { - NOR = { - scope:agent_type_16 = flag:empty - var:choice_a = flag:$AGENT_TYPE_16$ - } - scheme_owner = { can_have_$AGENT_TYPE_16$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_16$ - } - modifier = { - add = $AGENT_TYPE_16_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_16$ } - } - } - # Agent type 17. - 0 = { - trigger = { - NOR = { - scope:agent_type_17 = flag:empty - var:choice_a = flag:$AGENT_TYPE_17$ - } - scheme_owner = { can_have_$AGENT_TYPE_17$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_17$ - } - modifier = { - add = $AGENT_TYPE_17_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_17$ } - } - } - # Agent type 18. - 0 = { - trigger = { - NOR = { - scope:agent_type_18 = flag:empty - var:choice_a = flag:$AGENT_TYPE_18$ - } - scheme_owner = { can_have_$AGENT_TYPE_18$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_18$ - } - modifier = { - add = $AGENT_TYPE_18_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_18$ } - } - } - # Agent type 19. - 0 = { - trigger = { - NOR = { - scope:agent_type_19 = flag:empty - var:choice_a = flag:$AGENT_TYPE_19$ - } - scheme_owner = { can_have_$AGENT_TYPE_19$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_19$ - } - modifier = { - add = $AGENT_TYPE_19_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_19$ } - } - } - } - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0001 } - } -} -roll_critical_moment_options_20_agent_types_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:$OUTPUT_EVENT$ - } - if = { - limit = { - any_scheme_agent_slot = { count < character_max_scheme_agents_value } - scope:scheme = { - NOR = { - has_variable = choice_a - has_variable = choice_b - } - } - } - # First, let's determine which types we're using and which we ain't. - ## Agent type 01. - save_scope_value_as = { - name = agent_type_01 - value = flag:$AGENT_TYPE_01$ - } - ## Agent type 02. - save_scope_value_as = { - name = agent_type_02 - value = flag:$AGENT_TYPE_02$ - } - ## Agent type 03. - save_scope_value_as = { - name = agent_type_03 - value = flag:$AGENT_TYPE_03$ - } - ## Agent type 04. - save_scope_value_as = { - name = agent_type_04 - value = flag:$AGENT_TYPE_04$ - } - ## Agent type 05. - save_scope_value_as = { - name = agent_type_05 - value = flag:$AGENT_TYPE_05$ - } - ## Agent type 06. - save_scope_value_as = { - name = agent_type_06 - value = flag:$AGENT_TYPE_06$ - } - ## Agent type 07. - save_scope_value_as = { - name = agent_type_07 - value = flag:$AGENT_TYPE_07$ - } - ## Agent type 08. - save_scope_value_as = { - name = agent_type_08 - value = flag:$AGENT_TYPE_08$ - } - ## Agent type 09. - save_scope_value_as = { - name = agent_type_09 - value = flag:$AGENT_TYPE_09$ - } - ## Agent type 10. - save_scope_value_as = { - name = agent_type_10 - value = flag:$AGENT_TYPE_10$ - } - ## Agent type 11. - save_scope_value_as = { - name = agent_type_11 - value = flag:$AGENT_TYPE_11$ - } - ## Agent type 12. - save_scope_value_as = { - name = agent_type_12 - value = flag:$AGENT_TYPE_12$ - } - ## Agent type 13. - save_scope_value_as = { - name = agent_type_13 - value = flag:$AGENT_TYPE_13$ - } - ## Agent type 14. - save_scope_value_as = { - name = agent_type_14 - value = flag:$AGENT_TYPE_14$ - } - ## Agent type 15. - save_scope_value_as = { - name = agent_type_15 - value = flag:$AGENT_TYPE_15$ - } - ## Agent type 16. - save_scope_value_as = { - name = agent_type_16 - value = flag:$AGENT_TYPE_16$ - } - ## Agent type 17. - save_scope_value_as = { - name = agent_type_17 - value = flag:$AGENT_TYPE_17$ - } - ## Agent type 18. - save_scope_value_as = { - name = agent_type_18 - value = flag:$AGENT_TYPE_18$ - } - ## Agent type 19. - save_scope_value_as = { - name = agent_type_19 - value = flag:$AGENT_TYPE_19$ - } - ## Agent type 20. - save_scope_value_as = { - name = agent_type_20 - value = flag:$AGENT_TYPE_20$ - } - # Then we roll for who's getting picked. - ## For var:choice_a. - random_list = { - # Agent type 01. - 0 = { - trigger = { - NOT = { scope:agent_type_01 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_01$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_01$ - } - modifier = { - add = $AGENT_TYPE_01_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_01$ } - } - } - # Agent type 02. - 0 = { - trigger = { - NOT = { scope:agent_type_02 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_02$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_02$ - } - modifier = { - add = $AGENT_TYPE_02_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_02$ } - } - } - # Agent type 03. - 0 = { - trigger = { - NOT = { scope:agent_type_03 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_03$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_03$ - } - modifier = { - add = $AGENT_TYPE_03_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_03$ } - } - } - # Agent type 04. - 0 = { - trigger = { - NOT = { scope:agent_type_04 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_04$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_04$ - } - modifier = { - add = $AGENT_TYPE_04_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_04$ } - } - } - # Agent type 05. - 0 = { - trigger = { - NOT = { scope:agent_type_05 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_05$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_05$ - } - modifier = { - add = $AGENT_TYPE_05_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_05$ } - } - } - # Agent type 06. - 0 = { - trigger = { - NOT = { scope:agent_type_06 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_06$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_06$ - } - modifier = { - add = $AGENT_TYPE_06_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_06$ } - } - } - # Agent type 07. - 0 = { - trigger = { - NOT = { scope:agent_type_07 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_07$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_07$ - } - modifier = { - add = $AGENT_TYPE_07_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_07$ } - } - } - # Agent type 08. - 0 = { - trigger = { - NOT = { scope:agent_type_08 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_08$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_08$ - } - modifier = { - add = $AGENT_TYPE_08_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_08$ } - } - } - # Agent type 09. - 0 = { - trigger = { - NOT = { scope:agent_type_09 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_09$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_09$ - } - modifier = { - add = $AGENT_TYPE_09_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_09$ } - } - } - # Agent type 10. - 0 = { - trigger = { - NOT = { scope:agent_type_10 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_10$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_10$ - } - modifier = { - add = $AGENT_TYPE_10_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_10$ } - } - } - # Agent type 11. - 0 = { - trigger = { - NOT = { scope:agent_type_11 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_11$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_11$ - } - modifier = { - add = $AGENT_TYPE_11_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_11$ } - } - } - # Agent type 12. - 0 = { - trigger = { - NOT = { scope:agent_type_12 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_12$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_12$ - } - modifier = { - add = $AGENT_TYPE_12_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_12$ } - } - } - # Agent type 13. - 0 = { - trigger = { - NOT = { scope:agent_type_13 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_13$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_13$ - } - modifier = { - add = $AGENT_TYPE_13_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_13$ } - } - } - # Agent type 14. - 0 = { - trigger = { - NOT = { scope:agent_type_14 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_14$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_14$ - } - modifier = { - add = $AGENT_TYPE_14_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_14$ } - } - } - # Agent type 15. - 0 = { - trigger = { - NOT = { scope:agent_type_15 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_15$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_15$ - } - modifier = { - add = $AGENT_TYPE_15_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_15$ } - } - } - # Agent type 16. - 0 = { - trigger = { - NOT = { scope:agent_type_16 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_16$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_16$ - } - modifier = { - add = $AGENT_TYPE_16_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_16$ } - } - } - # Agent type 17. - 0 = { - trigger = { - NOT = { scope:agent_type_17 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_17$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_17$ - } - modifier = { - add = $AGENT_TYPE_17_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_17$ } - } - } - # Agent type 18. - 0 = { - trigger = { - NOT = { scope:agent_type_18 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_18$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_18$ - } - modifier = { - add = $AGENT_TYPE_18_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_18$ } - } - } - # Agent type 19. - 0 = { - trigger = { - NOT = { scope:agent_type_19 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_19$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_19$ - } - modifier = { - add = $AGENT_TYPE_19_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_19$ } - } - } - # Agent type 20. - 0 = { - trigger = { - NOT = { scope:agent_type_20 = flag:empty } - scheme_owner = { can_have_$AGENT_TYPE_20$_trigger = yes } - } - set_variable = { - name = choice_a - value = flag:$AGENT_TYPE_20$ - } - modifier = { - add = $AGENT_TYPE_20_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_20$ } - } - } - } - ## And var:choice_b. - random_list = { - # Agent type 01. - 0 = { - trigger = { - NOR = { - scope:agent_type_01 = flag:empty - var:choice_a = flag:$AGENT_TYPE_01$ - } - scheme_owner = { can_have_$AGENT_TYPE_01$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_01$ - } - modifier = { - add = $AGENT_TYPE_01_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_01$ } - } - } - # Agent type 02. - 0 = { - trigger = { - NOR = { - scope:agent_type_02 = flag:empty - var:choice_a = flag:$AGENT_TYPE_02$ - } - scheme_owner = { can_have_$AGENT_TYPE_02$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_02$ - } - modifier = { - add = $AGENT_TYPE_02_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_02$ } - } - } - # Agent type 03. - 0 = { - trigger = { - NOR = { - scope:agent_type_03 = flag:empty - var:choice_a = flag:$AGENT_TYPE_03$ - } - scheme_owner = { can_have_$AGENT_TYPE_03$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_03$ - } - modifier = { - add = $AGENT_TYPE_03_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_03$ } - } - } - # Agent type 04. - 0 = { - trigger = { - NOR = { - scope:agent_type_04 = flag:empty - var:choice_a = flag:$AGENT_TYPE_04$ - } - scheme_owner = { can_have_$AGENT_TYPE_04$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_04$ - } - modifier = { - add = $AGENT_TYPE_04_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_04$ } - } - } - # Agent type 05. - 0 = { - trigger = { - NOR = { - scope:agent_type_05 = flag:empty - var:choice_a = flag:$AGENT_TYPE_05$ - } - scheme_owner = { can_have_$AGENT_TYPE_05$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_05$ - } - modifier = { - add = $AGENT_TYPE_05_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_05$ } - } - } - # Agent type 06. - 0 = { - trigger = { - NOR = { - scope:agent_type_06 = flag:empty - var:choice_a = flag:$AGENT_TYPE_06$ - } - scheme_owner = { can_have_$AGENT_TYPE_06$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_06$ - } - modifier = { - add = $AGENT_TYPE_06_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_06$ } - } - } - # Agent type 07. - 0 = { - trigger = { - NOR = { - scope:agent_type_07 = flag:empty - var:choice_a = flag:$AGENT_TYPE_07$ - } - scheme_owner = { can_have_$AGENT_TYPE_07$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_07$ - } - modifier = { - add = $AGENT_TYPE_07_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_07$ } - } - } - # Agent type 08. - 0 = { - trigger = { - NOR = { - scope:agent_type_08 = flag:empty - var:choice_a = flag:$AGENT_TYPE_08$ - } - scheme_owner = { can_have_$AGENT_TYPE_08$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_08$ - } - modifier = { - add = $AGENT_TYPE_08_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_08$ } - } - } - # Agent type 09. - 0 = { - trigger = { - NOR = { - scope:agent_type_09 = flag:empty - var:choice_a = flag:$AGENT_TYPE_09$ - } - scheme_owner = { can_have_$AGENT_TYPE_09$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_09$ - } - modifier = { - add = $AGENT_TYPE_09_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_09$ } - } - } - # Agent type 10. - 0 = { - trigger = { - NOR = { - scope:agent_type_10 = flag:empty - var:choice_a = flag:$AGENT_TYPE_10$ - } - scheme_owner = { can_have_$AGENT_TYPE_10$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_10$ - } - modifier = { - add = $AGENT_TYPE_10_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_10$ } - } - } - # Agent type 11. - 0 = { - trigger = { - NOR = { - scope:agent_type_11 = flag:empty - var:choice_a = flag:$AGENT_TYPE_11$ - } - scheme_owner = { can_have_$AGENT_TYPE_11$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_11$ - } - modifier = { - add = $AGENT_TYPE_11_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_11$ } - } - } - # Agent type 12. - 0 = { - trigger = { - NOR = { - scope:agent_type_12 = flag:empty - var:choice_a = flag:$AGENT_TYPE_12$ - } - scheme_owner = { can_have_$AGENT_TYPE_12$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_12$ - } - modifier = { - add = $AGENT_TYPE_12_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_12$ } - } - } - # Agent type 13. - 0 = { - trigger = { - NOR = { - scope:agent_type_13 = flag:empty - var:choice_a = flag:$AGENT_TYPE_13$ - } - scheme_owner = { can_have_$AGENT_TYPE_13$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_13$ - } - modifier = { - add = $AGENT_TYPE_13_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_13$ } - } - } - # Agent type 14. - 0 = { - trigger = { - NOR = { - scope:agent_type_14 = flag:empty - var:choice_a = flag:$AGENT_TYPE_14$ - } - scheme_owner = { can_have_$AGENT_TYPE_14$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_14$ - } - modifier = { - add = $AGENT_TYPE_14_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_14$ } - } - } - # Agent type 15. - 0 = { - trigger = { - NOR = { - scope:agent_type_15 = flag:empty - var:choice_a = flag:$AGENT_TYPE_15$ - } - scheme_owner = { can_have_$AGENT_TYPE_15$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_15$ - } - modifier = { - add = $AGENT_TYPE_15_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_15$ } - } - } - # Agent type 16. - 0 = { - trigger = { - NOR = { - scope:agent_type_16 = flag:empty - var:choice_a = flag:$AGENT_TYPE_16$ - } - scheme_owner = { can_have_$AGENT_TYPE_16$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_16$ - } - modifier = { - add = $AGENT_TYPE_16_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_16$ } - } - } - # Agent type 17. - 0 = { - trigger = { - NOR = { - scope:agent_type_17 = flag:empty - var:choice_a = flag:$AGENT_TYPE_17$ - } - scheme_owner = { can_have_$AGENT_TYPE_17$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_17$ - } - modifier = { - add = $AGENT_TYPE_17_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_17$ } - } - } - # Agent type 18. - 0 = { - trigger = { - NOR = { - scope:agent_type_18 = flag:empty - var:choice_a = flag:$AGENT_TYPE_18$ - } - scheme_owner = { can_have_$AGENT_TYPE_18$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_18$ - } - modifier = { - add = $AGENT_TYPE_18_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_18$ } - } - } - # Agent type 19. - 0 = { - trigger = { - NOR = { - scope:agent_type_19 = flag:empty - var:choice_a = flag:$AGENT_TYPE_19$ - } - scheme_owner = { can_have_$AGENT_TYPE_19$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_19$ - } - modifier = { - add = $AGENT_TYPE_19_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_19$ } - } - } - # Agent type 20. - 0 = { - trigger = { - NOR = { - scope:agent_type_20 = flag:empty - var:choice_a = flag:$AGENT_TYPE_20$ - } - scheme_owner = { can_have_$AGENT_TYPE_20$_trigger = yes } - } - set_variable = { - name = choice_b - value = flag:$AGENT_TYPE_20$ - } - modifier = { - add = $AGENT_TYPE_20_WEIGHT$ - always = yes - } - modifier = { - factor = weight_down_existing_agent_slots_value - any_scheme_agent_slot = { is_agent_slot_type = $AGENT_TYPE_20$ } - } - } - } - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0001 } - } -} - -# Add an agent type to a scheme. -## When you add a new agent type, add them to the bottom of this effect. Everything else should be taken care of automatically. -select_critical_moment_agents_effect = { - if = { - limit = { $CHOICE$ = flag:agent_assassin } - scope:scheme = { add_agent_slot = agent_assassin } - # Error suppression. - save_scope_value_as = { - name = $CHOICE$ - value = flag:agent_assassin - } - } - else_if = { - limit = { $CHOICE$ = flag:agent_lookout } - scope:scheme = { add_agent_slot = agent_lookout } - # Error suppression. - save_scope_value_as = { - name = $CHOICE$ - value = flag:agent_lookout - } - } - else_if = { - limit = { $CHOICE$ = flag:agent_infiltrator } - scope:scheme = { add_agent_slot = agent_infiltrator } - # Error suppression. - save_scope_value_as = { - name = $CHOICE$ - value = flag:agent_infiltrator - } - } - else_if = { - limit = { $CHOICE$ = flag:agent_footpad } - scope:scheme = { add_agent_slot = agent_footpad } - # Error suppression. - save_scope_value_as = { - name = $CHOICE$ - value = flag:agent_footpad - } - } - else_if = { - limit = { $CHOICE$ = flag:agent_alibi } - scope:scheme = { add_agent_slot = agent_alibi } - # Error suppression. - save_scope_value_as = { - name = $CHOICE$ - value = flag:agent_alibi - } - } - else_if = { - limit = { $CHOICE$ = flag:agent_thug } - scope:scheme = { add_agent_slot = agent_thug } - # Error suppression. - save_scope_value_as = { - name = $CHOICE$ - value = flag:agent_thug - } - } - else_if = { - limit = { $CHOICE$ = flag:agent_comrade_in_arms } - scope:scheme = { add_agent_slot = agent_comrade_in_arms } - # Error suppression. - save_scope_value_as = { - name = $CHOICE$ - value = flag:agent_comrade_in_arms - } - } - else_if = { - limit = { $CHOICE$ = flag:agent_socialite } - scope:scheme = { add_agent_slot = agent_socialite } - # Error suppression. - save_scope_value_as = { - name = $CHOICE$ - value = flag:agent_socialite - } - } - else_if = { - limit = { $CHOICE$ = flag:agent_musician } - scope:scheme = { add_agent_slot = agent_musician } - # Error suppression. - save_scope_value_as = { - name = $CHOICE$ - value = flag:agent_musician - } - } - else_if = { - limit = { $CHOICE$ = flag:agent_tumbler } - scope:scheme = { add_agent_slot = agent_tumbler } - # Error suppression. - save_scope_value_as = { - name = $CHOICE$ - value = flag:agent_tumbler - } - } - else_if = { - limit = { $CHOICE$ = flag:agent_poet } - scope:scheme = { add_agent_slot = agent_poet } - # Error suppression. - save_scope_value_as = { - name = $CHOICE$ - value = flag:agent_poet - } - } - else_if = { - limit = { $CHOICE$ = flag:agent_gabbler } - scope:scheme = { add_agent_slot = agent_gabbler } - # Error suppression. - save_scope_value_as = { - name = $CHOICE$ - value = flag:agent_gabbler - } - } - else_if = { - limit = { $CHOICE$ = flag:agent_shill } - scope:scheme = { add_agent_slot = agent_shill } - # Error suppression. - save_scope_value_as = { - name = $CHOICE$ - value = flag:agent_shill - } - } - else_if = { - limit = { $CHOICE$ = flag:agent_diplomat } - scope:scheme = { add_agent_slot = agent_diplomat } - # Error suppression. - save_scope_value_as = { - name = $CHOICE$ - value = flag:agent_diplomat - } - } - else_if = { - limit = { $CHOICE$ = flag:agent_justiciar } - scope:scheme = { add_agent_slot = agent_justiciar } - # Error suppression. - save_scope_value_as = { - name = $CHOICE$ - value = flag:agent_justiciar - } - } - else_if = { - limit = { $CHOICE$ = flag:agent_scribe } - scope:scheme = { add_agent_slot = agent_scribe } - # Error suppression. - save_scope_value_as = { - name = $CHOICE$ - value = flag:agent_scribe - } - } - else_if = { - limit = { $CHOICE$ = flag:agent_cleric } - scope:scheme = { add_agent_slot = agent_cleric } - # Error suppression. - save_scope_value_as = { - name = $CHOICE$ - value = flag:agent_cleric - } - } - else_if = { - limit = { $CHOICE$ = flag:agent_theologian } - scope:scheme = { add_agent_slot = agent_theologian } - # Error suppression. - save_scope_value_as = { - name = $CHOICE$ - value = flag:agent_theologian - } - } - else_if = { - limit = { $CHOICE$ = flag:agent_herald } - scope:scheme = { add_agent_slot = agent_herald } - # Error suppression. - save_scope_value_as = { - name = $CHOICE$ - value = flag:agent_herald - } - } - else_if = { - limit = { $CHOICE$ = flag:agent_wolf_hunter } - scope:scheme = { add_agent_slot = agent_wolf_hunter } - # Error suppression. - save_scope_value_as = { - name = $CHOICE$ - value = flag:agent_wolf_hunter - } - } - else_if = { - limit = { $CHOICE$ = flag:agent_thief } - scope:scheme = { add_agent_slot = agent_thief } - # Error suppression. - save_scope_value_as = { - name = $CHOICE$ - value = flag:agent_thief - } - } - else_if = { - limit = { $CHOICE$ = flag:agent_tutor } - scope:scheme = { add_agent_slot = agent_tutor } - # Error suppression. - save_scope_value_as = { - name = $CHOICE$ - value = flag:agent_tutor - } - } - else_if = { - limit = { $CHOICE$ = flag:agent_poisoner } - scope:scheme = { add_agent_slot = agent_poisoner } - # Error suppression. - save_scope_value_as = { - name = $CHOICE$ - value = flag:agent_poisoner - } - } - else_if = { - limit = { $CHOICE$ = flag:agent_eunuch } - scope:scheme = { add_agent_slot = agent_eunuch } - # Error suppression. - save_scope_value_as = { - name = $CHOICE$ - value = flag:agent_eunuch - } - } - else_if = { - limit = { $CHOICE$ = flag:agent_decoy } - scope:scheme = { add_agent_slot = agent_decoy } - # Error suppression. - save_scope_value_as = { - name = $CHOICE$ - value = flag:agent_decoy - } - } - else_if = { - limit = { $CHOICE$ = flag:agent_muscle } - scope:scheme = { add_agent_slot = agent_muscle } - # Error suppression. - save_scope_value_as = { - name = $CHOICE$ - value = flag:agent_muscle - } - } - else_if = { - limit = { $CHOICE$ = flag:agent_drillmaster } - scope:scheme = { add_agent_slot = agent_drillmaster } - # Error suppression. - save_scope_value_as = { - name = $CHOICE$ - value = flag:agent_drillmaster - } - } - else_if = { - limit = { $CHOICE$ = flag:agent_tracker } - scope:scheme = { add_agent_slot = agent_tracker } - # Error suppression. - save_scope_value_as = { - name = $CHOICE$ - value = flag:agent_tracker - } - } - else_if = { - limit = { $CHOICE$ = flag:agent_physic } - scope:scheme = { add_agent_slot = agent_physic } - # Error suppression. - save_scope_value_as = { - name = $CHOICE$ - value = flag:agent_physic - } - } - else_if = { - limit = { $CHOICE$ = flag:agent_smith } - scope:scheme = { add_agent_slot = agent_smith } - # Error suppression. - save_scope_value_as = { - name = $CHOICE$ - value = flag:agent_smith - } - } - else_if = { - limit = { $CHOICE$ = flag:agent_ambusher } - scope:scheme = { add_agent_slot = agent_ambusher } - # Error suppression. - save_scope_value_as = { - name = $CHOICE$ - value = flag:agent_ambusher - } - } - else_if = { - limit = { $CHOICE$ = flag:agent_bodyguard } - scope:scheme = { add_agent_slot = agent_bodyguard } - # Error suppression. - save_scope_value_as = { - name = $CHOICE$ - value = flag:agent_bodyguard - } - } - else_if = { - limit = { $CHOICE$ = flag:agent_scout } - scope:scheme = { add_agent_slot = agent_scout } - # Error suppression. - save_scope_value_as = { - name = $CHOICE$ - value = flag:agent_scout - } - } - else_if = { - limit = { $CHOICE$ = flag:agent_outrider } - scope:scheme = { add_agent_slot = agent_outrider } - # Error suppression. - save_scope_value_as = { - name = $CHOICE$ - value = flag:agent_outrider - } - } - else_if = { - limit = { $CHOICE$ = flag:agent_bookkeeper } - scope:scheme = { add_agent_slot = agent_bookkeeper } - # Error suppression. - save_scope_value_as = { - name = $CHOICE$ - value = flag:agent_bookkeeper - } - } - else_if = { - limit = { $CHOICE$ = flag:agent_bailiff } - scope:scheme = { add_agent_slot = agent_bailiff } - # Error suppression. - save_scope_value_as = { - name = $CHOICE$ - value = flag:agent_bailiff - } - } - else_if = { - limit = { $CHOICE$ = flag:agent_draughtsman } - scope:scheme = { add_agent_slot = agent_draughtsman } - # Error suppression. - save_scope_value_as = { - name = $CHOICE$ - value = flag:agent_draughtsman - } - } - else_if = { - limit = { $CHOICE$ = flag:agent_planner } - scope:scheme = { add_agent_slot = agent_planner } - # Error suppression. - save_scope_value_as = { - name = $CHOICE$ - value = flag:agent_planner - } - } - else_if = { - limit = { $CHOICE$ = flag:agent_supplier } - scope:scheme = { add_agent_slot = agent_supplier } - # Error suppression. - save_scope_value_as = { - name = $CHOICE$ - value = flag:agent_supplier - } - } - else_if = { - limit = { $CHOICE$ = flag:agent_outcast } - scope:scheme = { add_agent_slot = agent_outcast } - # Error suppression. - save_scope_value_as = { - name = $CHOICE$ - value = flag:agent_outcast - } - } - else_if = { - limit = { $CHOICE$ = flag:agent_wrangler } - scope:scheme = { add_agent_slot = agent_wrangler } - # Error suppression. - save_scope_value_as = { - name = $CHOICE$ - value = flag:agent_wrangler - } - } - else_if = { - limit = { $CHOICE$ = flag:agent_wrangler_speed } - scope:scheme = { add_agent_slot = agent_wrangler_speed } - # Error suppression. - save_scope_value_as = { - name = $CHOICE$ - value = flag:agent_wrangler_speed - } - } - else_if = { - limit = { $CHOICE$ = flag:agent_theologian_success } - scope:scheme = { add_agent_slot = agent_theologian_success } - # Error suppression. - save_scope_value_as = { - name = $CHOICE$ - value = flag:agent_theologian_success - } - } - else_if = { - limit = { $CHOICE$ = flag:agent_cleric_success } - scope:scheme = { add_agent_slot = agent_cleric_success } - # Error suppression. - save_scope_value_as = { - name = $CHOICE$ - value = flag:agent_cleric_success - } - } - else_if = { - limit = { $CHOICE$ = flag:agent_lookout_success } - scope:scheme = { add_agent_slot = agent_lookout_success } - # Error suppression. - save_scope_value_as = { - name = $CHOICE$ - value = flag:agent_lookout_success - } - } - else_if = { - limit = { $CHOICE$ = flag:agent_lookout_speed } - scope:scheme = { add_agent_slot = agent_lookout_speed } - # Error suppression. - save_scope_value_as = { - name = $CHOICE$ - value = flag:agent_lookout_speed - } - } - # And remove the variables. - scope:scheme = { - remove_variable = choice_a - remove_variable = choice_b - } -} - -# Stop schemes from overflowing with opportunities forever + tell the player when they should do something. -cap_schemes_and_fire_reminders_effect = { - if = { - limit = { - scheme_agent_charges >= opportunity_cap_value - scheme_success_chance >= max_scheme_success_chance - } - if = { - limit = { - scheme_owner = { - is_ai = no - NOR = { - has_character_flag = scheme_critical_moments.0011 - has_variable = opportunities_reminder - } - } - } - scheme_owner = { - add_character_flag = currently_in_scheme_reminder - # supress the 'variable is used but is never set' error, the flag is set through code with the cooldown effect on the event, smh! - if = { - limit = { - always = no - } - add_character_flag = scheme_critical_moments.0011 - } - } - switch = { - trigger = scheme_type - murder = { - murder_scheme_prep_effect = yes - } - abduct = { - abduct_scheme_prep_effect = yes - } - challenge_status = { - challenge_status_scheme_prep_effect = yes - } - claim_throne = { - claim_throne_scheme_prep_effect = yes - } - depose = { - depose_scheme_prep_effect = yes - } - overthrow_regent = { - overthrow_regent_scheme_prep_effect = yes - } - expand_power_base = { - expand_power_base_scheme_prep_effect = yes - } - fabricate_hook = { - fabricate_hook_scheme_prep_effect = yes - } - generate_claim = { - generate_claim_scheme_prep_effect = yes - } - promote = { - promote_scheme_prep_effect = yes - } - slander = { - slander_scheme_prep_effect = yes - } - steal_back_artifact = { - steal_back_artifact_scheme_prep_effect = yes - } - seize_realm = { - seize_realm_scheme_prep_effect = yes - } - found_despotate = { - found_despotate_scheme_prep_effect = yes - } - raid_estate = { - raid_estate_scheme_prep_effect = yes - } - prepare_fire_dromons_scheme = { - prepare_fire_dromons_scheme_prep_effect = yes - } - steal_herd = { - steal_herd_scheme_prep_effect = yes - } - celestial_siphon_treasury = { - celestial_siphon_treasury_prep_effect = yes - } - disbelieve_mandala = { - disbelieve_mandala_scheme_prep_effect = yes - } - coerce_tributary = { - coerce_tributary_scheme_prep_effect = yes - } - } - } - # If the player hasn't been reminded once, tell them that their scheme has hit max opportunities. - scheme_owner = { - if = { - limit = { - is_ai = no - NOT = { has_variable = opportunities_reminder } - } - trigger_event = scheme_critical_moments.0011 - } - } - } -} - -# Tell schemes to wait for the player's say-so before firing a follow-up event. -suppress_scheme_follow_up_event_till_input_given_effect = { - save_scope_value_as = { - name = suppress_next_event - value = yes - } -} - -# Improve a certain type of modifier attached to the scheme, burning opportunities to do so. -improve_scheme_preparation_burnt_opportunities_modifier_effect = { - # Cap us at 10. - if = { - limit = { has_scheme_modifier = $MODIFIER$_level_10 } - # We should never be able to take the option at this point, but if we break it somehow, then do nothing rather than doubling up. - } - # 9 -> 10. - else_if = { - limit = { has_scheme_modifier = $MODIFIER$_level_09 } - # Clean the previous level. - hidden_effect = { remove_scheme_modifier = $MODIFIER$_level_09 } - # Add the new one. - add_scheme_modifier = { type = $MODIFIER$_level_10 } - } - # 8 -> 9. - else_if = { - limit = { has_scheme_modifier = $MODIFIER$_level_08 } - # Clean the previous level. - hidden_effect = { remove_scheme_modifier = $MODIFIER$_level_08 } - # Add the new one. - add_scheme_modifier = { type = $MODIFIER$_level_09 } - } - # 7 -> 8. - else_if = { - limit = { has_scheme_modifier = $MODIFIER$_level_07 } - # Clean the previous level. - hidden_effect = { remove_scheme_modifier = $MODIFIER$_level_07 } - # Add the new one. - add_scheme_modifier = { type = $MODIFIER$_level_08 } - } - # 6 -> 7. - else_if = { - limit = { has_scheme_modifier = $MODIFIER$_level_06 } - # Clean the previous level. - hidden_effect = { remove_scheme_modifier = $MODIFIER$_level_06 } - # Add the new one. - add_scheme_modifier = { type = $MODIFIER$_level_07 } - } - # 5 -> 6. - else_if = { - limit = { has_scheme_modifier = $MODIFIER$_level_05 } - # Clean the previous level. - hidden_effect = { remove_scheme_modifier = $MODIFIER$_level_05 } - # Add the new one. - add_scheme_modifier = { type = $MODIFIER$_level_06 } - } - # 4 -> 5. - else_if = { - limit = { has_scheme_modifier = $MODIFIER$_level_04 } - # Clean the previous level. - hidden_effect = { remove_scheme_modifier = $MODIFIER$_level_04 } - # Add the new one. - add_scheme_modifier = { type = $MODIFIER$_level_05 } - } - # 3 -> 4. - else_if = { - limit = { has_scheme_modifier = $MODIFIER$_level_03 } - # Clean the previous level. - hidden_effect = { remove_scheme_modifier = $MODIFIER$_level_03 } - # Add the new one. - add_scheme_modifier = { type = $MODIFIER$_level_04 } - } - # 2 -> 3. - else_if = { - limit = { has_scheme_modifier = $MODIFIER$_level_02 } - # Clean the previous level. - hidden_effect = { remove_scheme_modifier = $MODIFIER$_level_02 } - # Add the new one. - add_scheme_modifier = { type = $MODIFIER$_level_03 } - } - # 1 -> 2. - else_if = { - limit = { has_scheme_modifier = $MODIFIER$_level_01 } - # Clean the previous level. - hidden_effect = { remove_scheme_modifier = $MODIFIER$_level_01 } - # Add the new one. - add_scheme_modifier = { type = $MODIFIER$_level_02 } - } - # 0 -> 1. - else = { - # Add the first rung.. - add_scheme_modifier = { type = $MODIFIER$_level_01 } - } -} - -################################################## -# AI Usage Critical Moment Effects — Regular Schemes - -murder_scheme_prep_effect = { - save_scope_as = scheme - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.1001 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -seduce_scheme_prep_effect = { - roll_critical_moment_options_07_agent_types_effect = { - # Success results event. - OUTPUT_EVENT = scheme_critical_moments.1011 - # Lookout - AGENT_TYPE_01 = agent_lookout - AGENT_TYPE_01_WEIGHT = critical_moment_agent_weight_high_value - # Infiltrator - AGENT_TYPE_02 = agent_infiltrator - AGENT_TYPE_02_WEIGHT = critical_moment_agent_weight_high_value - # Comrade_in_arms - AGENT_TYPE_03 = agent_comrade_in_arms - AGENT_TYPE_03_WEIGHT = critical_moment_agent_weight_high_value - # Socialite - AGENT_TYPE_04 = agent_socialite - AGENT_TYPE_04_WEIGHT = critical_moment_agent_weight_medium_value - # Musician - AGENT_TYPE_05 = agent_musician - AGENT_TYPE_05_WEIGHT = critical_moment_agent_weight_low_value - # Tumbler - AGENT_TYPE_06 = agent_tumbler - AGENT_TYPE_06_WEIGHT = critical_moment_agent_weight_low_value - # Poet - AGENT_TYPE_07 = agent_poet - AGENT_TYPE_07_WEIGHT = critical_moment_agent_weight_low_value - } -} - -abduct_scheme_prep_effect = { - save_scope_as = scheme - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.1061 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -befriend_scheme_prep_effect = { - roll_critical_moment_options_04_agent_types_effect = { - # Success results event. - OUTPUT_EVENT = scheme_critical_moments.1031 - # Socialite - AGENT_TYPE_01 = agent_socialite - AGENT_TYPE_01_WEIGHT = critical_moment_agent_weight_high_value - # Infiltrator - AGENT_TYPE_02 = agent_infiltrator - AGENT_TYPE_02_WEIGHT = critical_moment_agent_weight_high_value - # Gabbler - AGENT_TYPE_03 = agent_gabbler - AGENT_TYPE_03_WEIGHT = critical_moment_agent_weight_high_value - # Shill - AGENT_TYPE_04 = agent_shill - AGENT_TYPE_04_WEIGHT = critical_moment_agent_weight_medium_value - } -} - -challenge_status_scheme_prep_effect = { - save_scope_as = scheme - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.1171 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -claim_throne_scheme_prep_effect = { - save_scope_as = scheme - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.1101 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -convert_to_witchcraft_scheme_prep_effect = { - roll_critical_moment_options_03_agent_types_effect = { - # Success results event. - OUTPUT_EVENT = scheme_critical_moments.1121 - # Infiltrator - AGENT_TYPE_01 = agent_infiltrator - AGENT_TYPE_01_WEIGHT = critical_moment_agent_weight_high_value - # Shill - AGENT_TYPE_02 = agent_shill - AGENT_TYPE_02_WEIGHT = critical_moment_agent_weight_high_value - # Alibi - AGENT_TYPE_03 = agent_alibi - AGENT_TYPE_03_WEIGHT = critical_moment_agent_weight_high_value - } -} - -court_scheme_prep_effect = { - roll_critical_moment_options_07_agent_types_effect = { - # Success results event. - OUTPUT_EVENT = scheme_critical_moments.1041 - # Herald - AGENT_TYPE_01 = agent_herald - AGENT_TYPE_01_WEIGHT = critical_moment_agent_weight_high_value - # Comrade-in-Arms - AGENT_TYPE_02 = agent_comrade_in_arms - AGENT_TYPE_02_WEIGHT = critical_moment_agent_weight_high_value - # Socialite - AGENT_TYPE_03 = agent_socialite - AGENT_TYPE_03_WEIGHT = critical_moment_agent_weight_high_value - # Musician - AGENT_TYPE_04 = agent_musician - AGENT_TYPE_04_WEIGHT = critical_moment_agent_weight_very_low_value - # Poet - AGENT_TYPE_05 = agent_poet - AGENT_TYPE_05_WEIGHT = critical_moment_agent_weight_very_low_value - # Tumbler - AGENT_TYPE_06 = agent_tumbler - AGENT_TYPE_06_WEIGHT = critical_moment_agent_weight_very_low_value - # Wolf Hunter - AGENT_TYPE_07 = agent_wolf_hunter - AGENT_TYPE_07_WEIGHT = critical_moment_agent_weight_microscopic_value - } -} - -damage_legitimacy_scheme_prep_effect = { - roll_critical_moment_options_03_agent_types_effect = { - # Success results event. - OUTPUT_EVENT = scheme_critical_moments.4010 - # Infiltrator - AGENT_TYPE_01 = agent_infiltrator - AGENT_TYPE_01_WEIGHT = critical_moment_agent_weight_high_value - # Diplomat - AGENT_TYPE_02 = agent_diplomat - AGENT_TYPE_02_WEIGHT = critical_moment_agent_weight_high_value - # Socialite - AGENT_TYPE_03 = agent_socialite - AGENT_TYPE_03_WEIGHT = critical_moment_agent_weight_medium_value - } -} - -depose_scheme_prep_effect = { - save_scope_as = scheme - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.1191 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -overthrow_regent_scheme_prep_effect = { - save_scope_as = scheme - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.1091 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -elope_scheme_prep_effect = { - roll_critical_moment_options_07_agent_types_effect = { - # Success results event. - OUTPUT_EVENT = scheme_critical_moments.1051 - # Infiltrator - AGENT_TYPE_01 = agent_infiltrator - AGENT_TYPE_01_WEIGHT = critical_moment_agent_weight_high_value - # Comrade_in_arms - AGENT_TYPE_02 = agent_comrade_in_arms - AGENT_TYPE_02_WEIGHT = critical_moment_agent_weight_high_value - # Socialite - AGENT_TYPE_03 = agent_socialite - AGENT_TYPE_03_WEIGHT = critical_moment_agent_weight_high_value - # Alibi - AGENT_TYPE_04 = agent_alibi - AGENT_TYPE_04_WEIGHT = critical_moment_agent_weight_medium_value - # Musician - AGENT_TYPE_05 = agent_musician - AGENT_TYPE_05_WEIGHT = critical_moment_agent_weight_very_low_value - # Poet - AGENT_TYPE_06 = agent_poet - AGENT_TYPE_06_WEIGHT = critical_moment_agent_weight_very_low_value - # Tumbler - AGENT_TYPE_07 = agent_tumbler - AGENT_TYPE_07_WEIGHT = critical_moment_agent_weight_very_low_value - } -} - -expand_power_base_scheme_prep_effect = { - save_scope_as = scheme - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.1181 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -fabricate_hook_scheme_prep_effect = { - save_scope_as = scheme - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.1071 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -foster_legitimacy_scheme_prep_effect = { - roll_critical_moment_options_03_agent_types_effect = { - # Success results event. - OUTPUT_EVENT = scheme_critical_moments.4000 - - # Herald - AGENT_TYPE_01 = agent_herald - AGENT_TYPE_01_WEIGHT = critical_moment_agent_weight_high_value - # Diplomat - AGENT_TYPE_02 = agent_diplomat - AGENT_TYPE_02_WEIGHT = critical_moment_agent_weight_high_value - # Socialite - AGENT_TYPE_03 = agent_socialite - AGENT_TYPE_03_WEIGHT = critical_moment_agent_weight_medium_value - } -} - -generate_claim_scheme_prep_effect = { - save_scope_as = scheme - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.1151 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -learn_language_scheme_prep_effect = { - roll_critical_moment_options_04_agent_types_effect = { - # Success results event. - OUTPUT_EVENT = scheme_critical_moments.1081 - # Diplomat - AGENT_TYPE_01 = agent_diplomat - AGENT_TYPE_01_WEIGHT = critical_moment_agent_weight_high_value - # Cleric - AGENT_TYPE_02 = agent_cleric - AGENT_TYPE_02_WEIGHT = critical_moment_agent_weight_high_value - # Scribe - AGENT_TYPE_03 = agent_scribe - AGENT_TYPE_03_WEIGHT = critical_moment_agent_weight_high_value - # Tutor - AGENT_TYPE_04 = agent_tutor - AGENT_TYPE_04_WEIGHT = critical_moment_agent_weight_medium_value - } -} - -promote_scheme_prep_effect = { - save_scope_as = scheme - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.1141 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -slander_scheme_prep_effect = { - save_scope_as = scheme - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.1131 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -steal_back_artifact_scheme_prep_effect = { - save_scope_as = scheme - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.1111 - } - scope:scheme.var:target_artifact = { - save_scope_as = artifact - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -steal_herd_scheme_prep_effect = { - save_scope_as = scheme - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.1161 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -celestial_siphon_treasury_prep_effect = { - save_scope_as = scheme - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.1201 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -celestial_movement_power_promote_prep_effect = { - save_scope_as = scheme - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.1231 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -celestial_movement_power_slander_prep_effect = { - save_scope_as = scheme - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.1234 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -sway_scheme_prep_effect = { - roll_critical_moment_options_07_agent_types_effect = { - # Success results event. - OUTPUT_EVENT = scheme_critical_moments.1021 - # Herald - AGENT_TYPE_01 = agent_herald - AGENT_TYPE_01_WEIGHT = critical_moment_agent_weight_high_value - # Diplomat - AGENT_TYPE_02 = agent_diplomat - AGENT_TYPE_02_WEIGHT = critical_moment_agent_weight_high_value - # Gabbler - AGENT_TYPE_03 = agent_gabbler - AGENT_TYPE_03_WEIGHT = critical_moment_agent_weight_high_value - # Shill - AGENT_TYPE_04 = agent_shill - AGENT_TYPE_04_WEIGHT = critical_moment_agent_weight_medium_value - # Musician - AGENT_TYPE_05 = agent_musician - AGENT_TYPE_05_WEIGHT = critical_moment_agent_weight_low_value - # Tumbler - AGENT_TYPE_06 = agent_tumbler - AGENT_TYPE_06_WEIGHT = critical_moment_agent_weight_low_value - # Poet - AGENT_TYPE_07 = agent_poet - AGENT_TYPE_07_WEIGHT = critical_moment_agent_weight_low_value - } -} - -seize_realm_scheme_prep_effect = { - save_scope_as = scheme - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.2901 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -found_despotate_scheme_prep_effect = { - save_scope_as = scheme - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.8021 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -raid_estate_scheme_prep_effect = { - save_scope_as = scheme - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.8035 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -ingratiate_family_scheme_prep_effect = { - save_scope_as = scheme - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.8051 } - } -} - -prepare_fire_dromons_scheme_prep_effect = { - save_scope_as = scheme - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.8060 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -disbelieve_mandala_scheme_prep_effect = { - save_scope_as = scheme - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.1211 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -coerce_tributary_scheme_prep_effect = { - save_scope_as = scheme - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.1221 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -coerce_contribution_scheme_prep_effect = { - save_scope_as = scheme - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.1241 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -leverage_contribution_scheme_prep_effect = { - save_scope_as = scheme - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.1251 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -################################################## -# AI Usage Critical Moment Effects — Contract Schemes - -laamp_base_0001_contract_scheme_prep_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.2001 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -laamp_base_0011_contract_scheme_prep_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.2011 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -laamp_base_0021_contract_scheme_prep_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.2021 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -laamp_base_0031_contract_scheme_prep_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.2031 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -laamp_base_0041_contract_scheme_prep_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.2041 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -laamp_base_1001_contract_scheme_prep_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.2201 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -laamp_base_1011_contract_scheme_prep_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.2211 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -laamp_base_1021_contract_scheme_prep_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.2221 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -laamp_base_1031_contract_scheme_prep_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.2231 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -laamp_base_1041_contract_scheme_prep_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.2241 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -laamp_base_2001_contract_scheme_prep_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.2401 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -laamp_base_2011_contract_scheme_prep_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.2411 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -laamp_base_2021_contract_scheme_prep_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.2421 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -laamp_base_2031_contract_scheme_prep_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.2431 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -laamp_base_2041_contract_scheme_prep_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.2441 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -laamp_base_3001_contract_scheme_prep_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.2601 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -laamp_base_3011_contract_scheme_prep_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.2611 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -laamp_base_3021_contract_scheme_prep_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.2621 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -laamp_base_3031_contract_scheme_prep_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.2631 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -laamp_base_3041_contract_scheme_prep_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.2641 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -laamp_base_4001_contract_scheme_prep_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.2801 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -laamp_base_4011_contract_scheme_prep_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.2811 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -laamp_base_4021_contract_scheme_prep_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.2821 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -laamp_base_4031_contract_scheme_prep_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.2831 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -laamp_base_4041_contract_scheme_prep_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.2841 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -laamp_base_5001_contract_scheme_prep_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.3001 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -laamp_base_5011_contract_scheme_prep_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.3011 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -laamp_base_5021_contract_scheme_prep_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.3021 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -laamp_base_5031_contract_scheme_prep_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.3031 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -laamp_base_5041_contract_scheme_prep_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.3041 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -laamp_base_5051_contract_scheme_prep_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.3051 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -laamp_base_6001_contract_scheme_prep_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.6001 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -laamp_base_6011_contract_scheme_prep_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.6011 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -laamp_base_6021_contract_scheme_prep_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.6021 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -laamp_base_6031_contract_scheme_prep_effect = { - save_scope_as = scheme - scope:scheme.task_contract ?= { save_scope_as = task_contract } - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.6031 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -protect_minority_vassal_contract_diplomacy_scheme_prep_effect = { - save_scope_as = scheme - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.3201 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -protect_minority_vassal_contract_martial_scheme_prep_effect = { - save_scope_as = scheme - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.3201 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -protect_minority_vassal_contract_intrigue_scheme_prep_effect = { - save_scope_as = scheme - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.3201 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -protect_minority_vassal_contract_learning_scheme_prep_effect = { - save_scope_as = scheme - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.3201 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -laamp_prison_break_scheme_prep_effect = { - save_scope_as = scheme - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.3211 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -laamp_help_find_secrets_scheme_prep_effect = { - save_scope_as = scheme - task_contract = { - save_scope_as = task_contract - var:task_contract_councillor = { - save_scope_as = task_contract_councillor - } - } - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.3221 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -celestial_minister_find_secrets_scheme_prep_effect = { - save_scope_as = scheme - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.8065 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -################################################## -# Murder Scheme Effects - -# Give out the appropriate amount of dread when it's discovered the scoped char murdered someone. -murder_consequences_known_or_exposed_apply_dread_effect = { - # Don't apply this twice if it's gone out earlier in the chain. - if = { - limit = { - NOT = { exists = scope:murderer_dread_applied } - } - # Murdered own close family, king/emperor, or family of king/emperor. - if = { - limit = { - OR = { - is_close_family_of = $VICTIM$ - $VICTIM$ = { - tier_or_related_liege_tier_greater_or_equal_trigger = { TIER = tier_kingdom } - } - } - } - add_dread = major_dread_gain - } - # Murdered close family of duke/count. - else_if = { - limit = { - $VICTIM$ = { - tier_or_related_liege_tier_greater_or_equal_trigger = { TIER = tier_county } - } - } - add_dread = medium_dread_gain - } - # Murdered just... some guy. Just a person. Just a lil dude. - else = { add_dread = minor_dread_gain } - # And flag that we've gone through this. - save_scope_value_as = { - name = murderer_dread_applied - value = yes - } - } -} - -# Apply scope:owner's general ending & consequences. -scheme_owner_pov_murder_success_effect = { - # Murdering your rival gets you some bonus cred. - ## Presumably in how you comport yourself & who's a thorn in your side. - if = { - limit = { - scope:owner = { has_relation_rival = scope:target } - } - custom_tooltip = { - text = murder_outcome_murdered_rival_tt - add_prestige = medium_prestige_gain - } - } - # Dread for successfully murdering someone and getting discovered. - if = { - limit = { exists = scope:scheme_discovered } - murder_consequences_known_or_exposed_apply_dread_effect = { VICTIM = scope:target } - } - # Piety, if appropriate. - if = { - limit = { - faith = { has_doctrine_parameter = piety_gain_from_successful_intrigue_schemes } - } - add_piety = minor_piety_gain - } - # Stress. - ## Murdered a rival. - if = { - limit = { - scope:owner = { has_relation_rival = scope:target } - } - stress_impact = { - base = murder_base_stress_value - vengeful = massive_stress_impact_loss - sadistic = minor_stress_impact_loss - callous = miniscule_stress_impact_loss - compassionate = minor_stress_impact_gain - forgiving = major_stress_impact_gain - } - } - ## Murdered someone helpless. - else_if = { - limit = { - scope:target = { - OR = { - is_adult = no - is_incapable = yes - } - } - } - stress_impact = { - base = murder_base_stress_value - sadistic = major_stress_impact_loss - callous = minor_stress_impact_loss - compassionate = major_stress_impact_gain - } - } - ## Murdered anyone else. - else = { - stress_impact = { - base = murder_base_stress_value - sadistic = minor_stress_impact_loss - callous = miniscule_stress_impact_loss - compassionate = minor_stress_impact_gain - } - } - # Aaaaand show our other consequences. - show_as_tooltip = { - murder_success_kill_effect = { REASON = $REASON$ } - } -} - -# Actually kill scope:target. -murder_success_kill_effect = { - # If the scheme was discovered, reveal the murderer immediately. - if = { - limit = { exists = scope:scheme_discovered } - # Kill the target. - known_murder_effect = { - VICTIM = scope:target - MURDERER = scope:owner - EXPOSER = scope:murder_exposer - } - # Kill them. Kill them all. - murder_success_kill_entourage_too_effect = { - KNOWN_UNKNOWN = known - EXPOSER_REASON_PRE = EXPOSER - EXPOSER_REASON_POST = scope:murder_exposer - SHOW_UNKNOWN_ASSAILANT_TOOLTIP = no - } - } - # Otherwise, we process this anonymously. - else = { - # For scope:owner, we only show the effects as tooltips. - if = { - limit = { this = scope:owner } - show_as_tooltip = { - unknown_murder_effect = { - VICTIM = scope:target - MURDERER = scope:owner - REASON = $REASON$ - } - } - # Kill them. Kill them all. - show_as_tooltip = { - murder_success_kill_entourage_too_effect = { - KNOWN_UNKNOWN = unknown - EXPOSER_REASON_PRE = REASON - EXPOSER_REASON_POST = death_mysterious - SHOW_UNKNOWN_ASSAILANT_TOOLTIP = no - } - } - } - # Whereas for the target, we process the whole lot. - else_if = { - limit = { this = scope:target } - custom_tooltip = murder_unknown_murder_against_you_was_successful - hidden_effect = { - unknown_murder_effect = { - VICTIM = scope:target - MURDERER = scope:owner - REASON = $REASON$ - } - } - # Kill them. Kill them all. - murder_success_kill_entourage_too_effect = { - KNOWN_UNKNOWN = unknown - EXPOSER_REASON_PRE = REASON - EXPOSER_REASON_POST = death_mysterious - SHOW_UNKNOWN_ASSAILANT_TOOLTIP = yes - } - } - } -} - -# If appropriate, kill off a bunch of the folks travelling with scope:target. -murder_success_kill_entourage_too_effect = { - scope:owner ?= { - if = { - limit = { has_variable_list = entourage_members_to_kill } - save_temporary_scope_value_as = { - name = show_unknown_assailant_tooltip - value = $SHOW_UNKNOWN_ASSAILANT_TOOLTIP$ - } - every_in_list = { - variable = entourage_members_to_kill - save_temporary_scope_as = to_be_killed - if = { - limit = { scope:show_unknown_assailant_tooltip = yes } - custom_tooltip = murder_unknown_murder_against_you_was_successful_other - } - $KNOWN_UNKNOWN$_murder_effect = { - VICTIM = scope:to_be_killed - MURDERER = scope:owner - $EXPOSER_REASON_PRE$ = $EXPOSER_REASON_POST$ - } - } - } - } -} - -# Distribute murder failure effects. -murder_failure_effect = { - # Add Watchful Modifier to the target - scope:target = { - add_character_modifier = { - modifier = watchful_modifier - days = watchful_modifier_duration - } - } - # If the attempt was discovered, process the consequences of that. - if = { - limit = { exists = scope:scheme_discovered } - # If we're a clan this affects unity - ## Landed victims cost more unity. - if = { - limit = { - scope:target = { is_landed = yes } - } - add_clan_unity_interaction_effect = { - CHARACTER = scope:owner - TARGET = scope:target - VALUE = medium_unity_loss - DESC = clan_unity_murder_attempted.desc - REVERSE_NON_HOUSE_TARGET = no - } - } - ## For unlanded characters, we don't care as much, but you still lose some. - else = { - add_clan_unity_interaction_effect = { - CHARACTER = scope:owner - TARGET = scope:target - VALUE = minor_unity_loss - DESC = clan_unity_murder_attempted.desc - REVERSE_NON_HOUSE_TARGET = no - } - } - ## Tag scope:owner with a separate scope for portraits... - scope:owner = { - save_scope_as = owner_to_reveal - # ... and apply a little dread. - add_dread = minor_dread_gain - } - ## Point out that yeah, attempted murder will sour someone's opinion of you. - attempted_murder_opinion_effect = { - VICTIM = scope:target - MURDERER = scope:owner - } - } - # Otherwise, we just add a murder attempt secret. - else = { - # Make sure we don't inadvertently reveal the scheme to the target. - if = { - limit = { this = scope:owner } - scope:owner = { - add_secret = { - type = secret_murder_attempt - target = scope:target - } - } - } - } - # Lastly, if our imaginary friend put us up to this, then we address that. - scope:owner = { - if = { - limit = { - any_owned_story = { - type = story_cycle_imaginary_friend - var:imaginary_friend_murder_target ?= scope:target - } - } - trigger_event = { - id = bp2_yearly.2024 - days = 4 - } - } - } -} - -# If appropriate, murder anyone travelling with scope:target. -murder_entourage_list_effect = { - # Pick three random entourage members to kill - scope:target = { - current_travel_plan = { - random_entourage_character = { - limit = { - this != scope:target - } - scope:owner = { - add_to_variable_list = { - name = entourage_members_to_kill - target = prev - } - } - } - random_entourage_character = { - limit = { - NOR = { - this = scope:target - this = scope:owner - scope:owner = { - is_target_in_variable_list = { - name = entourage_members_to_kill - target = prev - } - } - } - } - scope:owner = { - add_to_variable_list = { - name = entourage_members_to_kill - target = prev - } - } - } - random_entourage_character = { - limit = { - NOR = { - this = scope:target - this = scope:owner - scope:owner = { - is_target_in_variable_list = { - name = entourage_members_to_kill - target = prev - } - } - } - } - scope:owner = { - add_to_variable_list = { - name = entourage_members_to_kill - target = prev - } - } - } - } - } -} - -# Restart's the current murder scheme, setting all its variables and such back to zero. -restart_murder_scheme_effect = { - show_as_tooltip = { - start_scheme = { - type = murder - target_character = scope:target - } - } - hidden_effect = { - scope:scheme = { - # Track how many times we've restarted, so we can reset progress. - increment_variable_effect = { - VAR = scheme_reset_to_zero_value - VAL = scheme_success_chance - } - # Reset our scheme. - reset_failed_scheme_effect = yes - } - } -} - -# Process the death result for anyone who dies during the murder interception. -murder_interception_handle_extra_deaths_effect = { - if = { - limit = { exists = scope:scheme_discovered } - known_murder_effect = { - VICTIM = $VICTIM$ - MURDERER = scope:owner - EXPOSER = scope:target - } - } - else = { - unknown_murder_effect = { - VICTIM = $VICTIM$ - MURDERER = scope:owner - REASON = $REASON$ - } - } -} - -# Adds either "Plush and Unremarkable Carpet" modifier if character is Iranian, otherwise adds "Plush and Exotic Carpet" -add_carpet_modifier_effect = { - if = { - limit = { - has_fp3_dlc_trigger = yes - culture = { has_cultural_pillar = heritage_iranian } - } - add_character_modifier = { - modifier = persian_has_plush_carpet_modifier - days = 3650 - } - } - else = { - add_character_modifier = { - modifier = has_plush_carpet_modifier - days = 3650 - } - } -} - -# If trying to lure a child to push off a roof, try to pick something tangible to tempt them with. -## The things I do for script hygiene. -rooftop_murder_lure_for_child_effect = { - random_list = { - # Dog. - 25 = { - trigger = { - scope:target = { any_owned_story = { type = story_cycle_pet_dog } } - } - save_scope_value_as = { - name = child_pushed_dog - value = yes - } - } - # Cat. - ## You monster. - 25 = { - trigger = { - scope:target = { any_owned_story = { type = story_cycle_pet_cat } } - } - save_scope_value_as = { - name = child_pushed_cat - value = yes - } - random = { - chance = 60 - save_scope_value_as = { - name = cat_survives - value = yes - } - } - } - # Toy. - 25 = { - trigger = { - scope:target = { has_variable = child_toy_variable } - } - save_scope_value_as = { - name = child_pushed_toy - value = yes - } - } - # Else nothing. - 1 = {} - } -} - -grab_best_agent_murderer_effect = { - scope:scheme = { - random_scheme_agent_slot = { - limit = { - is_agent_slot_type = agent_assassin - is_filled = yes - } - alternative_limit = { is_filled = yes } - slot_character = { save_scope_as = assassin } - } - # Plus generate a back-up, in case we need it. - random_dummy_gender_assassin_effect = yes - } -} - -################################################## -# Seduce Scheme Effects - -#Milestone should be 1 or 2, outcome should be success or failure -seduce_ongoing_add_scheme_modifier_effect = { - scope:scheme = { - add_scheme_modifier = { - type = seduce_$OUTCOME$_$MILESTONE$_modifier - } - } -} - -seduce_ongoing_possible_outcomes_tooltip_effect = { - show_as_tooltip = { - random_list = { - 1 = { - desc = seduce_ongoing_possible_outcomes_tooltip_effect.success.desc - show_chance = no - seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = $MILESTONE$ OUTCOME = success } - } - 1 = { - desc = seduce_ongoing_possible_outcomes_tooltip_effect.failure.desc - show_chance = no - seduce_ongoing_add_scheme_modifier_effect = { MILESTONE = $MILESTONE$ OUTCOME = failure } - } - } - } -} - -#To add CHARACTER to a list that block seduction schemes from being initiated -## use in the scope of the character that blocks CHARACTER (i.e. the scheme target's scope) -seduction_block_character_effect = { - if = { - limit = { root = scope:target } - custom_tooltip = seduce_outcome.permanent_block - - hidden_effect = { - add_opinion = { - target = $CHARACTER$ - modifier = seduce_permanent_blocker_opinion - } - } - } - else_if = { - limit = { - exists = scope:target - scope:target = { - is_alive = yes - } - } - add_opinion = { - target = $CHARACTER$ - modifier = seduce_permanent_blocker_opinion - } - } -} - -seduction_cooldown_for_character_effect = { - if = { - limit = { root = scope:target } - custom_tooltip = seduce_outcome.cooldown - - hidden_effect = { - add_opinion = { - target = $CHARACTER$ - modifier = seduce_regular_cooldown_opinion - } - } - } - else = { - add_opinion = { - target = $CHARACTER$ - modifier = seduce_regular_cooldown_opinion - } - } -} - -owner_seduce_outcome_success_send_discovery_event_effect = { - hidden_effect = { - if = { - limit = { exists = scope:scheme_discovered } - trigger_event = { - id = seduce_outcome.2900 - days = 3 - } - } - } -} - -owner_seduce_outcome_become_lovers_option_effects = { - show_as_tooltip = { set_relation_lover = scope:target } - add_character_flag = { #to assure that this is when the relationship is set - flag = consummation_and_relationship - days = 10 - } - - reverse_add_opinion = { - target = scope:target - modifier = romance_opinion - opinion = 20 - } - - if = { - limit = { - faith = { - has_doctrine_parameter = piety_gain_from_successful_intrigue_schemes - } - } - add_piety = minor_piety_gain - } - - if = { - limit = { - has_government = landless_adventurer_government - has_perk = mortal_adoration_perk - scope:target = { is_ruler = yes } - } - add_contact = scope:target - add_hook_if_possible_default_length_effect = { - TARGET = scope:target - TYPE = manipulation_hook - } - } - - if = { - limit = { - dynasty ?= { - has_dynasty_perk = fp1_adventure_legacy_2 - } - } - add_prestige = fp1_adventure_legacy_2_prestige_value - } - - if = { - limit = { - is_close_family_of = scope:target - } - create_character_memory = { - type = seduced_family - - participants = { - family_member = scope:target - } - } - } - - owner_seduce_outcome_success_send_discovery_event_effect = yes -} - -owner_seduce_outcome_just_sex_effects = { - reverse_add_opinion = { - target = scope:target - modifier = romance_opinion - opinion = 20 - } - - if = { - limit = { - faith = { - has_doctrine_parameter = piety_gain_from_successful_intrigue_schemes - } - } - add_piety = minor_piety_gain - } - - if = { - limit = { - dynasty ?= { - has_dynasty_perk = fp1_adventure_legacy_2 - } - } - add_prestige = fp1_adventure_legacy_2_prestige_value - } - - owner_seduce_outcome_success_send_discovery_event_effect = yes -} - -#In most cases, it makes more sense to actually apply the sex effect in the target's events (which are after the owner's events). This is because A) you don't want any pop-ups for the target before they have recieved their event and B) because some effects won't get a tooltip for being applied if they were already applied before. The only exception is when the owner is a player and the target is an AI. - - target_seduce_outcome_sex_effect = { - scope:target = { - if = { - limit = { - NAND = { - scope:owner = { is_ai = no } - scope:target = { is_ai = yes } - } - } - had_sex_with_effect = { - CHARACTER = scope:owner - PREGNANCY_CHANCE = seduce_pregnancy_chance - } - } - else = { - show_as_tooltip = { - had_sex_with_effect = { - CHARACTER = scope:owner - PREGNANCY_CHANCE = seduce_pregnancy_chance - } - } - } - } -} - -owner_seduce_outcome_sex_effect = { - scope:owner = { - if = { - limit = { - scope:owner = { is_ai = no } - scope:target = { is_ai = yes } - } - had_sex_with_effect = { - CHARACTER = scope:target - PREGNANCY_CHANCE = seduce_pregnancy_chance - } - } - else = { - show_as_tooltip = { - had_sex_with_effect = { - CHARACTER = scope:owner - PREGNANCY_CHANCE = seduce_pregnancy_chance - } - } - } - } -} - - -seduce_outcome_discovered_expose_secrets_and_adultery_effect = { - extramarital_sex_attempt_exposure_consequences_with_target_effect = { TARGET = $CHARACTER$ SPOUSE_EVENT = yes } #Adds trait - if = { - limit = { relation_with_character_is_incestuous_in_my_or_lieges_faith_trigger = { CHARACTER = $CHARACTER$ } } - random_secret = { - type = secret_incest - expose_secret = $EXPOSER$ - } - } - if = { - limit = { relation_with_character_is_sodomy_in_my_or_lieges_faith_trigger = { CHARACTER = $CHARACTER$ } } - random_secret = { - type = secret_homosexual - expose_secret = $EXPOSER$ - } - } -} - -seduce_outcome_failure_discovered_apply_secrets_effect = { - give_incest_secret_or_nothing_with_target_effect = { CHARACTER = scope:target } - give_homosexual_secret_or_nothing_with_target_effect = { CHARACTER = scope:target } -} - -seduce_outcome_success_discovered_effect = { - if = { - limit = { - any_secret = { - type = secret_lover - OR = { - secret_target = scope:target - secret_target = scope:owner - } - } - } - random_secret = { #Revealing the secret will send events for both lovers - type = secret_lover - limit = { - OR = { - secret_target = scope:target - secret_target = scope:owner - } - } - expose_secret = scope:target_liege - } - } - else = { - scope:owner = { seduce_outcome_discovered_expose_secrets_and_adultery_effect = { CHARACTER = scope:target EXPOSER = scope:target_liege } } - scope:target = { seduce_outcome_discovered_expose_secrets_and_adultery_effect = { CHARACTER = scope:owner EXPOSER = scope:target_liege } } - } -} - -seduce_outcome_publicised_attempted_crimes_or_nothing_effect = { - $TARGET$ = { - #Grab everyone relevant who might be interested in the attempt. - every_close_family_member = { add_to_list = relevant_parties } - every_consort = { - limit = { - NOT = { is_in_list = relevant_parties } - } - add_to_list = relevant_parties - } - if = { - limit = { - liege ?= { - NOT = { is_in_list = relevant_parties } - } - } - add_to_list = relevant_parties - } - if = { - limit = { - court_owner ?= { - NOT = { is_in_list = relevant_parties } - } - } - add_to_list = relevant_parties - } - every_vassal = { - limit = { - NOT = { is_in_list = relevant_parties } - } - add_to_list = relevant_parties - } - every_relation = { - type = friend - limit = { - NOT = { is_in_list = relevant_parties } - } - add_to_list = relevant_parties - } - every_relation = { - type = lover - limit = { - NOT = { is_in_list = relevant_parties } - } - add_to_list = relevant_parties - } - $OWNER$ = { - every_close_family_member = { - limit = { - NOT = { is_in_list = relevant_parties } - } - add_to_list = relevant_parties - } - } - - #Adulterer - if = { - limit = { - $OWNER$ = { is_married = yes } - trait_is_shunned_or_criminal_in_faith_trigger = { - TRAIT = adulterer - FAITH = this.faith - GENDER_CHARACTER = $OWNER$ - } - } - every_in_list = { - list = relevant_parties - limit = { - #Filter out anyone who wouldn't care about this. - NOR = { - #Kids too young to understand the bias have no prejudice. - is_adult = no - #Not compos mentis. - has_trait = incapable - #People who are adulterers. - has_trait = adulterer - #The person doing the seducing don't think less of themselves either. - this = $OWNER$ - } - #And who count the action as adulterous. - trait_is_shunned_or_criminal_in_faith_trigger = { - TRAIT = adulterer - FAITH = faith - GENDER_CHARACTER = $OWNER$ - } - } - custom = characters_close_to_target_who_dislike_adultery - #Apply attempt opinion effects. - add_opinion = { - modifier = adulterer_advances_on_relevant_character - target = $OWNER$ - } - } - } - - #Fornicator - if = { - limit = { - $OWNER$ = { is_married = no } - trait_is_shunned_or_criminal_in_faith_trigger = { - TRAIT = fornicator - FAITH = faith - GENDER_CHARACTER = $OWNER$ - } - } - every_in_list = { - list = relevant_parties - limit = { - #Filter out anyone who wouldn't care about this. - NOR = { - #Kids too young to understand the bias have no prejudice. - is_adult = no - #Not compos mentis. - has_trait = incapable - #People who are fornicators. - has_trait = fornicator - #The person doing the seducing don't think less of themselves either. - this = $OWNER$ - } - #And who count the action to be fornication. - trait_is_shunned_or_criminal_in_faith_trigger = { - TRAIT = fornicator - FAITH = this.faith - GENDER_CHARACTER = $OWNER$ - } - } - custom = characters_close_to_target_who_dislike_fornication - #Apply attempt opinion effects. - add_opinion = { - modifier = fornicator_advances_on_relevant_character - target = $OWNER$ - } - } - } - - #Incestuous - if = { - limit = { - relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = $OWNER$ } - } - every_in_list = { - list = relevant_parties - limit = { - #Filter out anyone who wouldn't care about this. - NOR = { - #Kids too young to understand the bias have no prejudice. - is_adult = no - #Not compos mentis. - has_trait = incapable - #People who are incestuous. - has_trait = incestuous - #Or who don't count the action as incestuous. - faith = { - faith_allows_marriage_consanguinity_trigger = { - CHARACTER_1 = $OWNER$ - CHARACTER_2 = $TARGET$ - } - } - #The person doing the seducing don't think less of themselves either. - this = $OWNER$ - } - } - custom = characters_close_to_target_who_dislike_incest - #Apply attempt opinion effects. - add_opinion = { - modifier = incestuous_advances_on_relevant_character - target = $OWNER$ - } - } - } - - #Sodomite - if = { - limit = { - relation_with_character_is_sodomy_trigger = { CHARACTER = $OWNER$ } - } - every_in_list = { - list = relevant_parties - limit = { - #Filter out anyone who wouldn't care about this. - NOR = { - #Kids too young to understand the bias have no prejudice. - is_adult = no - #Not compos mentis. - has_trait = incapable - #People who are sodomites themselves. - has_trait = sodomite - #Males who could be sodomites. - AND = { - is_male = yes - OR = { - has_sexuality = bisexual - has_sexuality = homosexual - } - } - #Or who don't count the action as incestuous. - faith = { - faith_allows_marriage_consanguinity_trigger = { - CHARACTER_1 = $OWNER$ - CHARACTER_2 = $TARGET$ - } - } - #The person doing the seducing don't think less of themselves either. - this = $OWNER$ - } - #And, finally, must actually be fussed about sodomy to begin with. - relation_between_characters_is_sodomy_in_my_faith_trigger = { - CHARACTER_1 = $OWNER$ - CHARACTER_2 = $TARGET$ - } - } - custom = characters_close_to_target_who_dislike_sodomy - #Apply attempt opinion effects. - add_opinion = { - modifier = sodomite_advances_on_relevant_character - target = $OWNER$ - } - } - } - } -} - -set_relation_lover_through_seduction_effect = { - $CHARACTER$ = { save_scope_as = second_character } - if = { #To save a potential important object to be used later on - limit = { - exists = scope:scheme - scope:scheme = { has_variable = object_of_importance } - NOT = { has_variable_list = lover_object_of_importance } - } - add_to_variable_list = { - name = lover_object_of_importance - target = scope:scheme.var:object_of_importance - } - add_to_variable_list = { - name = lover_object_of_importance - target = scope:second_character - } - } - else_if = { #you can save two different seduction objects - limit = { - exists = scope:scheme - scope:scheme = { has_variable = object_of_importance } - has_variable_list = lover_object_of_importance - NOT = { has_variable_list = lover_object_of_importance_2 } - } - add_to_variable_list = { - name = lover_object_of_importance_2 - target = scope:scheme.var:object_of_importance - } - add_to_variable_list = { - name = lover_object_of_importance_2 - target = scope:second_character - } - } - scope:scheme = { - end_scheme = yes - } - if = { # Safeguard because so much stuff can happen - limit = { - NOT = { has_relation_lover = scope:second_character } - } - scope:second_character = { - set_relation_lover = { - target = prev - reason = $REASON$ - province = $LOCATION$ - } - } - } -} - -set_object_of_significance_effect = { - if = { - limit = { - scope:scheme = { - NOT = { has_variable = object_of_importance } - } - } - scope:scheme = { - random_list = { - 1 = { - set_variable = { - name = object_of_importance - value = flag:rose - } - } - 1 = { - set_variable = { - name = object_of_importance - value = flag:sea_shell - } - } - } - } - } -} - -set_random_religious_text_effect = { - random_list = { - 1 = { - #Christian - trigger = { faith.religion = religion:christianity_religion } - save_scope_value_as = { - name = religious_book_title - value = flag:golden_legend - } - } - 1 = { - #Christian - trigger = { faith.religion = religion:christianity_religion } - save_scope_value_as = { - name = religious_book_title - value = flag:city_of_god - } - } - 1 = { - #Christian - trigger = { - faith.religion = religion:christianity_religion - NOT = { faith = faith:orthodox } - } - save_scope_value_as = { - name = religious_book_title - value = flag:summa_theologica - } - } - 1 = { - #Christian - trigger = { - faith.religion = religion:christianity_religion - NOT = { faith = faith:orthodox } - } - save_scope_value_as = { - name = religious_book_title - value = flag:sic_et_non - } - } - 1 = { - #Christian Orthodox - trigger = { - faith = faith:orthodox - } - save_scope_value_as = { - name = religious_book_title - value = flag:chrysostomos - } - } - 1 = { - #Christian Orthodox - trigger = { - faith = faith:orthodox - } - save_scope_value_as = { - name = religious_book_title - value = flag:symeon_menologion - } - } - 1 = { - #Christian Orthodox - trigger = { - faith = faith:orthodox - } - save_scope_value_as = { - name = religious_book_title - value = flag:god_and_christ - } - } - 1 = { - #Muslim - trigger = { faith.religion = religion:islam_religion } - save_scope_value_as = { - name = religious_book_title - value = flag:the_small_book_on_theism - } - } - 1 = { - #Muslim - trigger = { faith.religion = religion:islam_religion } - save_scope_value_as = { - name = religious_book_title - value = flag:modern_philosophy - } - } - 1 = { - #Any - save_scope_value_as = { - name = religious_book_title - value = flag:stories_from_holy_book - } - } - } -} - -set_random_entertainment_text_effect = { - random_list = { - 1 = { - #Germanic language - trigger = { - root.culture = { - OR = { - has_cultural_pillar = language_central_germanic - has_cultural_pillar = language_norse - has_cultural_pillar = language_anglic - } - } - } - save_scope_value_as = { - name = entertainment_book_title - value = flag:beowulf - } - } - 1 = { - #Germanic language - trigger = { - root.culture = { - OR = { - has_cultural_pillar = language_central_germanic - has_cultural_pillar = language_norse - has_cultural_pillar = language_anglic - } - } - } - save_scope_value_as = { - name = entertainment_book_title - value = flag:niebelungenlied - } - } - 1 = { - #Latin - trigger = { root.culture = { has_cultural_pillar = language_italian } } - save_scope_value_as = { - name = entertainment_book_title - value = flag:song_of_roland - } - } - 1 = { - #Welsh saga - trigger = { - OR = { - root.culture = { has_cultural_pillar = language_brythonic } - root.culture = { has_cultural_pillar = language_goidelic } - } - } - save_scope_value_as = { - name = entertainment_book_title - value = flag:mabinogi - } - } - 1 = { - #Not in Jerusalem - trigger = { - NOR = { - AND = { - exists = root.capital_province - root.capital_province = { geographical_region = world_middle_east } - } - root.culture = { has_cultural_pillar = language_israelite } - } - } - save_scope_value_as = { - name = entertainment_book_title - value = flag:travels_to_jerusalem - } - } - 1 = { - # Not in India - trigger = { - trigger_if = { - limit = { - exists = root.capital_province - } - NOT = { - root.capital_province = { geographical_region = world_india } - } - } - } - save_scope_value_as = { - name = entertainment_book_title - value = flag:east_of_indus - } - } - 1 = { - #Not in Byzantium - trigger = { - NOR = { - root.culture = { - OR = { - has_cultural_pillar = heritage_byzantine - has_cultural_pillar = heritage_caucasian - } - } - has_title = title:e_byzantium - } - } - save_scope_value_as = { - name = entertainment_book_title - value = flag:travels_to_byzantium - } - } - 1 = { - #Greek - trigger = { root.culture = { has_cultural_pillar = language_greek } } - save_scope_value_as = { - name = entertainment_book_title - value = flag:digenes_akrites - } - } - 1 = { - #Greek - trigger = { root.culture = { has_cultural_pillar = language_greek } } - save_scope_value_as = { - name = entertainment_book_title - value = flag:epigrams - } - } - 1 = { - #Greek - trigger = { root.culture = { has_cultural_pillar = language_greek } } - save_scope_value_as = { - name = entertainment_book_title - value = flag:philogelos - } - } - 1 = { - #Any - save_scope_value_as = { - name = entertainment_book_title - value = flag:riddle_poems - } - } - } -} - -set_random_informative_text_effect = { - random_list = { - 1 = { - #Arabic - trigger = { - OR = { - root.culture = { has_cultural_pillar = heritage_arabic } - root.culture = { has_cultural_pillar = language_arabic } - } - } - save_scope_value_as = { - name = informative_book_title - value = flag:on_the_judgement_of_the_stars - } - } - 1 = { - #Arabic - trigger = { - OR = { - scope:culture ?= { has_cultural_pillar = heritage_arabic } - scope:culture ?= { has_cultural_pillar = language_arabic } - } - } - save_scope_value_as = { - name = informative_book_title - value = flag:the_perfect_state - } - } - 1 = { - #"Any" - save_scope_value_as = { - name = informative_book_title - value = flag:spiritual_medicine - } - } - 1 = { - #Latin - trigger = { - root.capital_province ?= { geographical_region = world_europe } - } - save_scope_value_as = { - name = informative_book_title - value = flag:trotula - } - } - 1 = { - #Jewish/Any - save_scope_value_as = { - name = informative_book_title - value = flag:the_improvement_of_the_moral_qualities - } - } - 1 = { - #Welsh (Anyone in the British Isles) - trigger = { - root.capital_province ?= { geographical_region = world_europe_west_britannia } - } - save_scope_value_as = { - name = informative_book_title - value = flag:armes_prydein - } - } - 1 = { - #Anywhere around the Mediterrenean - trigger = { - root.capital_province ?= { - OR = { - geographical_region = world_europe - geographical_region = world_africa_north_east - geographical_region = world_africa_north_west - } - } - } - save_scope_value_as = { - name = informative_book_title - value = flag:almagest - } - } - 1 = { - #Greek - trigger = { root.culture = { has_cultural_pillar = language_greek } } - save_scope_value_as = { - name = informative_book_title - value = flag:anekdota - } - } - 1 = { - #Greek - trigger = { root.culture = { has_cultural_pillar = language_greek } } - save_scope_value_as = { - name = informative_book_title - value = flag:chronographia - } - } - } -} - -#To set up a location to use for the sex scene custom loc key -set_random_sex_scene_location_effect = { - hidden_effect = { - if = { - limit = { NOT = { has_variable = sex_scene_location } } - random_list = { - 20 = { - set_variable = { - name = sex_scene_location - value = flag:garden - } - } - 20 = { - set_variable = { - name = sex_scene_location - value = flag:private_chamber - } - } - 20 = { - set_variable = { - name = sex_scene_location - value = flag:stable - } - } - 20 = { - set_variable = { - name = sex_scene_location - value = flag:copse - } - } - 20 = { - set_variable = { - name = sex_scene_location - value = flag:kitchen - } - } - } - } - } -} - -#To transfer the location used in the sex scene custom loc key from one character to another -transfer_sex_scene_location_to_character_effect = { - if = { - limit = { - has_variable = sex_scene_location - } - if = { - limit = { - var:sex_scene_location = flag:garden - } - $CHARACTER$ = { - set_variable = { - name = sex_scene_location - value = flag:garden - } - } - } - else_if = { - limit = { - var:sex_scene_location = flag:private_chamber - } - $CHARACTER$ = { - set_variable = { - name = sex_scene_location - value = flag:private_chamber - } - } - } - else_if = { - limit = { - var:sex_scene_location = flag:stable - } - $CHARACTER$ = { - set_variable = { - name = sex_scene_location - value = flag:stable - } - } - } - else_if = { - limit = { - var:sex_scene_location = flag:copse - } - $CHARACTER$ = { - set_variable = { - name = sex_scene_location - value = flag:copse - } - } - } - else_if = { - limit = { - var:sex_scene_location = flag:kitchen - } - $CHARACTER$ = { - set_variable = { - name = sex_scene_location - value = flag:kitchen - } - } - } - } -} - -################################################## -# Abduct Scheme Effects - -#Sets up the Outcome Roll values -abduct_outcome_roll_setup_effect = { - #Discovery Roll setup - save_scope_value_as = { - name = discovery_chance - value = { - value = 100 - subtract = scope:scheme.scheme_secrecy - } - } -} - -#Roll to check whether a Abduct Scheme is a success or a failure, and whether the owner is discovered -abduct_outcome_roll_effect = { - #SUCCESS ROLL - random = { - chance = scope:scheme.scheme_success_chance - custom_tooltip = abduct_successful_roll_tt - scope:owner = { mandala_trickster_increment_successful_schemes_effect = yes } - save_scope_value_as = { - name = scheme_successful - value = yes - } - } - ### End Success roll - #DISCOVERY ROLL - custom_label = abduct_success_discovery_tt - random = { - chance = scope:discovery_chance - custom_tooltip = abduct_become_discovered_roll_tt - save_scope_value_as = { - name = scheme_discovered - value = yes - } - } - ### End Discovery roll - - hidden_effect = { - #FIRE CORRECT ON ACTIONS - if = { - limit = { - exists = scope:scheme_successful - } - trigger_event = { - on_action = abduct_succeeded - } - } - else = { - trigger_event = { - on_action = abduct_failed - } - } - } -} - -#Used in the immediate of the Scheme Owner's success event -abduct_success_effect = { - - scope:target = { - add_character_flag = { - flag = was_abducted_block_notification_event - days = 2 - } - trigger_event = abduct_outcome.5001 - } - - hard_imprison_character_effect = { - TARGET = scope:target - IMPRISONER = scope:owner - } - - if = { - limit = { - exists = scope:owner.house - exists = scope:target.house - } - scope:owner.house = { - change_house_relation_effect = { - HOUSE = scope:target.house - VALUE = house_relation_damage_medium_value - REASON = abduction - CHAR = scope:owner - TARGET_CHAR = scope:target - TITLE = scope:dummy_gender - } - } - } -} - -abduct_failure_effect = { - #Add Watchful Modifier to the target - scope:target = { - show_as_tooltip = { - add_character_modifier = { - modifier = watchful_modifier - days = watchful_modifier_duration - } - } - } - - scope:target = { - trigger_event = abduct_outcome.5002 - } -} - -successful_abduct_outcome_event_option_effect = { - if = { - limit = { - faith = { - has_doctrine_parameter = piety_gain_from_successful_intrigue_schemes - } - } - add_piety = minor_piety_gain - } - - scope:scheme ?= { - end_scheme = yes - } -} - -################################################## -# Befriend Scheme Effects - -successful_befriend_potential_friend_effect = { - $CHARACTER$ = { - if = { #Always leads to a potential friendship - limit = { - NOR = { - has_relation_potential_friend = root - has_relation_friend = root - } - } - if = { #Remove potential rival relation if you have it - limit = { - has_relation_potential_rival = root - } - remove_relation_potential_rival = root - } - set_relation_potential_friend = root - } - if = { - limit = { - number_of_traits_in_common = { - target = root - value >= 3 - } - } - $CHARACTER$ = { - add_opinion = { - modifier = friendliness_opinion - target = root - opinion = 30 - } - } - } - else = { - $CHARACTER$ = { - add_opinion = { - modifier = friendliness_opinion - target = root - opinion = 20 - } - } - } - } -} - -successful_befriend_critical_change_effect = { - $CHARACTER$ = { - hidden_effect = { - if = { #Remove potential rival relation if you have it - limit = { - has_relation_potential_rival = root - } - remove_relation_potential_rival = root - } - } - if = { #Set friend relation - limit = { - NOT = { has_relation_friend = root } - } - if = { - limit = { - exists = scope:relationship_reason_location - } - set_relation_friend = { reason = $REASON$ target = root province = scope:relationship_reason_location } - } - else = { - set_relation_friend = { reason = $REASON$ target = root } - } - } - else_if = { #Fallback - limit = { - has_relation_friend = root - } - $CHARACTER$ = { - add_opinion = { - modifier = friendliness_opinion - target = root - opinion = 40 - } - } - } - } - if = { - limit = { - has_government = landless_adventurer_government - has_perk = friendly_counsel_perk - $CHARACTER$ = { is_ruler = yes } - } - add_contact = $CHARACTER$ - } -} - -failed_befriend_opinion_change_effect = { - $CHARACTER$ = { - add_opinion = { - modifier = refusal_opinion - target = root - opinion = -5 - } - hidden_effect = { - set_relation_potential_friend = root - } - } -} - -failed_befriend_opinion_critical_change_effect = { - $CHARACTER$ = { - add_opinion = { - modifier = disastrous_befriend_attempt_opinion - target = root - } - if = { - limit = { - NOR = { - has_relation_potential_rival = root - has_relation_rival = root - } - } - hidden_effect = { set_relation_potential_rival = root } - } - else_if = { #If you already are potential rivals, you have a chance of becoming Rivals - limit = { - has_relation_potential_rival = root - NOT = { has_relation_rival = root } - } - hidden_effect = { remove_relation_potential_rival = root } - set_relation_rival = { - target = root - reason = rival_disastrous_befriend_attempt - } - } - } -} - -################################################## -# Claim Throne Scheme Effects - -#Sets up the Outcome Roll values -claim_throne_outcome_roll_setup_effect = { - # Find appropriate title - scope:target = { - primary_title = { - save_scope_as = target_title - } - } - # Discovery Roll setup - save_scope_value_as = { - name = discovery_chance - value = { - value = 100 - subtract = scope:scheme.scheme_secrecy - } - } -} - -claim_throne_check_target_title_effect = { - # In case something has happened to the target_title, we try to reset it here: - if = { - limit = { - OR = { - NOT = { exists = scope:target_title } # The title could somehow disappear - NOT = { - scope:target_title = { # The title might feasibly pass to someone else - holder ?= scope:target - - } - } - } - } - scope:target = { - primary_title = { # We just assign the target's primary title as the new target title - save_scope_as = target_title - } - } - } - - # Rivalry check is done here, since it's run in every outcome - if = { - limit = { - OR = { - exists = scope:scheme_successful - exists = scope:scheme_discovered - } - NOT = { has_relation_rival = scope:target } - } - hidden_effect = { - random = { - chance = 30 - modifier = { - add = 30 - has_relation_potential_rival = scope:target - } - modifier = { - exists = scope:scheme_discovered - add = 30 - } - modifier = { - has_relation_friend = scope:target - add = -25 - } - - save_scope_value_as = { - name = set_rivalry - value = yes - } - } - } - } -} - -#Roll to check whether a Claim Throne Scheme is a success or a failure, and whether the owner is discovered -claim_throne_outcome_roll_effect = { - #SUCCESS ROLL - random = { - chance = scope:scheme.scheme_success_chance - custom_tooltip = claim_throne_successful_roll_tt - scope:owner = { mandala_trickster_increment_successful_schemes_effect = yes } - save_scope_value_as = { - name = scheme_successful - value = yes - } - } - ### End Success roll - #DISCOVERY ROLL - custom_description_no_bullet = { - text = claim_throne_success_discovery_warning_effect - } - random = { - chance = scope:discovery_chance - custom_tooltip = claim_throne_become_discovered_roll_tt - save_scope_value_as = { - name = scheme_discovered - value = yes - } - } - ### End Discovery roll - - hidden_effect = { - #FIRE CORRECT ON ACTIONS - if = { - limit = { - exists = scope:scheme_successful - } - trigger_event = { - on_action = claim_throne_succeeded - days = 3 - } - } - else = { - trigger_event = { - on_action = claim_throne_failed - days = 3 - } - } - } -} - -#Used in the immediate of the Scheme Owner's success event -claim_throne_success_effect = { - # Note that the Claim itself is added in successful_claim_throne_outcome_event_option_effect - - if = { - limit = { - exists = scope:scheme_discovered - } - # Trigger the response event for the target (actual opinion is set here) - scope:target = { - trigger_event = claim_throne_outcome.5001 - } - - show_as_tooltip = { # Target dislikes you - scope:target = { - add_opinion = { - target = scope:owner - modifier = claim_my_throne_success_discovered_opinion - } - } - } - } - else = { - # Trigger the response event for the target (actual opinion is set here) - scope:target = { - trigger_event = claim_throne_outcome.5002 - } - show_as_tooltip = { - scope:target = { - add_opinion = { - target = scope:owner - modifier = claim_my_throne_success_undiscovered_opinion - years = 10 - } - } - } - } -} - -claim_throne_failure_effect = { - add_prestige = claim_throne_discovered_failure_prestige_loss - scope:target = { - # Fire notification event for target - trigger_event = claim_throne_outcome.5003 - show_as_tooltip = { - add_opinion = { - target = scope:owner - modifier = claim_my_throne_failure_opinion - years = 10 - } - if = { - limit = { exists = scope:set_rivalry } - set_relation_rival = { - target = scope:owner - reason = rival_claimed_throne_failed - } - } - } - } -} - -successful_claim_throne_event_option_effect = { - if = { - limit = { - exists = scope:scheme_discovered - } - add_prestige = claim_throne_discovered_prestige_loss - } - show_as_tooltip = { - scope:target = { - if = { - limit = { exists = scope:set_rivalry } - set_relation_rival = { - target = scope:owner - reason = rival_claimed_throne - } - } - if = { - limit = { exists = scope:scheme_discovered } - add_opinion = { - target = scope:owner - modifier = claim_my_throne_success_discovered_opinion - } - } - else = { - add_opinion = { - target = scope:owner - modifier = claim_my_throne_success_undiscovered_opinion - years = 10 - } - } - } - } - - scope:scheme = { - end_scheme = yes - } - - add_pressed_claim = scope:target_title -} - -claim_throne_decline_execution_effect = { - custom_tooltip = do_not_execute_claim_throne_tooltip - scope:scheme = { - reset_failed_scheme_effect = yes - } -} - -claim_throne_set_mythical_founder_variable_effect = { - if = { - limit = { - AND = { # Charles Martell - OR = { - scope:target_title = title:k_france - scope:target_title = title:e_france - } - current_date > 1000.1.1 - } - } - set_variable = { - name = mythical_founder - value = flag:charles_martell - } - } - else_if = { # Alexander - limit = { - OR = { - scope:target_title = title:k_thessalonika - scope:target_title = title:k_hellas - scope:target_title = title:k_egypt - AND = { - OR = { - scope:target_title = title:k_persia - scope:target_title = title:e_persia - } - NOR = { - root.faith.religion = religion:islam_religion - root.faith.religion = religion:zoroastrianism_religion - } - } - scope:target_title = title:k_anatolia - } - } - set_variable = { - name = mythical_founder - value = flag:alexander - } - } - else_if = { # Lech - limit = { - scope:target_title = title:k_poland # Lech - } - set_variable = { - name = mythical_founder - value = flag:lech - } - } - else_if = { # Czech - limit = { - scope:target_title = title:k_bohemia # Lech - } - set_variable = { - name = mythical_founder - value = flag:czech - } - } - else_if = { # Rus - limit = { - OR = { # Rus - scope:target_title = title:k_white_rus - scope:target_title = title:k_ruthenia - scope:target_title = title:e_russia - } - } - set_variable = { - name = mythical_founder - value = flag:rus - } - } - else_if = { # Arthur - limit = { - OR = { - scope:target_title = title:k_wales - scope:target_title = title:k_cornwall - scope:target_title = title:k_england - scope:target_title = title:e_britannia - } - } - set_variable = { - name = mythical_founder - value = flag:arthur - } - } - else_if = { # Belisarius - limit = { - OR = { - scope:target_title = title:k_italy - scope:target_title = title:k_romagna - scope:target_title = title:k_sardinia - scope:target_title = title:e_italy - scope:target_title = title:h_roman_empire - scope:target_title = title:h_eastern_roman_empire - } - faith = faith:orthodox - } - set_variable = { - name = mythical_founder - value = flag:belisarius - } - } - else_if = { # Romulus - limit = { - OR = { - scope:target_title = title:k_italy - scope:target_title = title:k_romagna - scope:target_title = title:k_sardinia - scope:target_title = title:e_italy - scope:target_title = title:h_roman_empire - scope:target_title = title:h_eastern_roman_empire - } - } - set_variable = { - name = mythical_founder - value = flag:romulus - } - } - else_if = { # Ardashir - limit = { - OR = { - scope:target_title = title:k_persia - scope:target_title = title:e_persia - } - } - set_variable = { - name = mythical_founder - value = flag:ardashir - } - } - else_if = { # The Pharaohs - limit = { - scope:target_title = title:k_egypt - NOT = { religion = religion:islam_religion } - } - set_variable = { - name = mythical_founder - value = flag:pharaohs - } - } - else_if = { # The Visigothic Kings - limit = { - OR = { - scope:target_title = title:k_castille - scope:target_title = title:k_aragon - scope:target_title = title:k_navarra - scope:target_title = title:k_andalusia - scope:target_title = title:k_portugal - scope:target_title = title:e_spain - } - NOT = { religion = religion:islam_religion } - } - set_variable = { - name = mythical_founder - value = flag:visigothic_kings - } - } - else_if = { # Abd al-Rahman - limit = { - OR = { - scope:target_title = title:k_castille - scope:target_title = title:k_aragon - scope:target_title = title:k_navarra - scope:target_title = title:k_andalusia - scope:target_title = title:k_portugal - scope:target_title = title:e_spain - } - religion = religion:islam_religion - } - set_variable = { - name = mythical_founder - value = flag:abd_al_rahman - } - } - else_if = { # Zenobia - limit = { - OR = { - scope:target_title = title:k_syria - scope:target_title = title:k_mesopotamia - } - NOT = { religion = religion:islam_religion } - } - set_variable = { - name = mythical_founder - value = flag:zenobia - } - } - else = { - set_variable = { - name = mythical_founder - value = flag:fallback - } - } -} - -################################################## -# Elope Scheme Effects - -elope_opinion_list_builder_effect = { - $OWNER$ = { - every_spouse = { - limit = { NOT = { this = $TARGET$ } } - add_to_temporary_list = $LIST_NAME$ - } - } - $TARGET$ = { - every_spouse = { - limit = { NOT = { this = $OWNER$ } } - add_to_temporary_list = $LIST_NAME$ - } - liege = { - if = { - limit = { - NOR = { - is_in_list = $LIST_NAME$ - this = $OWNER$ - } - } - add_to_temporary_list = $LIST_NAME$ - } - } - } -} - -elope_success_effect = { - elope_opinion_list_builder_effect = { OWNER = $OWNER$ TARGET = $TARGET$ LIST_NAME = elope_opinion_list } - - #Because this can be used in events or interaction window, we save root_scope here - if = { - limit = { exists = scope:actor } - scope:actor = { save_temporary_scope_as = root_scope } - } - else = { - root = { save_temporary_scope_as = root_scope } - } - - #Target prisoner release - $TARGET$ = { - if = { - limit = { is_imprisoned = yes } - release_from_prison = yes - } - } - - $OWNER$ = { - #Tooltip for marriage - show_as_tooltip = { - if = { - limit = { is_female = yes } - marry_matrilineal = $TARGET$ - } - else = { - marry = $TARGET$ - } - } - - #Owner's personal consequences (hidden or not), divorce happens here - if = { - limit = { - scope:root_scope = $OWNER$ - } - elope_success_personal_consequences_effect = { CHARACTER = $OWNER$ } - } - else = { - hidden_effect = { elope_success_personal_consequences_effect = { CHARACTER = $OWNER$ } } - } - } - - #Opinions - ordered_in_list = { - list = elope_opinion_list - max = 10 #To make sure we include all - check_range_bounds = no - order_by = ai_vengefulness - - #Towards owner - if = { - limit = { - OR = { #Owner wants to see everything, root wants to see their own - scope:root_scope = $OWNER$ - scope:root_scope = this - } - } - elope_success_opinion_rivalry_effect = { CHARACTER = $OWNER$ } - } - else = { - hidden_effect = { elope_success_opinion_rivalry_effect = { CHARACTER = $OWNER$ } } - } - - #Towards target - if = { - limit = { scope:root_scope = this } #Root wants to see their own - elope_success_opinion_rivalry_effect = { CHARACTER = $TARGET$ } - } - else = { - hidden_effect = { elope_success_opinion_rivalry_effect = { CHARACTER = $TARGET$ } } - } - } - - - hidden_effect = { - #Target's personal consequences, divorce happens here - elope_success_personal_consequences_effect = { CHARACTER = $TARGET$ } - - #Marriage - $OWNER$ = { #We do this last so old spouses remain when we run personal consequences effect - if = { - limit = { is_female = yes } - marry_matrilineal = $TARGET$ - } - else = { - marry = $TARGET$ - } - } - } -} - -elope_failure_discovered_effect = { - elope_opinion_list_builder_effect = { OWNER = $OWNER$ TARGET = $TARGET$ LIST_NAME = elope_opinion_list } - - #Expose lover secret - $OWNER$ = { - random_secret = { - type = secret_lover - limit = { - secret_target = $TARGET$ - } - - if = { - limit = { $DISCOVERER$ = { is_ai = yes } } - expose_secret = $DISCOVERER$ - } - else = { - reveal_to = $DISCOVERER$ - } - } - } - - #Opinions - ordered_in_list = { - list = elope_opinion_list - max = 10 #To make sure we include all - check_range_bounds = no - order_by = ai_vengefulness - - #Towards owner - if = { - limit = { - OR = { #Owner wants to see everything, root wants to see their own - root = $OWNER$ - root = this - } - } - elope_failure_discovered_opinion_rivalry_effect = { CHARACTER = $OWNER$ } - } - else = { - hidden_effect = { elope_failure_discovered_opinion_rivalry_effect = { CHARACTER = $OWNER$ } } - } - - #Towards target - if = { - limit = { root = this } #Root wants to see their own - elope_failure_discovered_opinion_rivalry_effect = { CHARACTER = $TARGET$ } - } - else = { - hidden_effect = { elope_failure_discovered_opinion_rivalry_effect = { CHARACTER = $TARGET$ } } - } - } -} - -elope_success_opinion_rivalry_effect = { - #Crime opinion - add_opinion = { - target = $CHARACTER$ - modifier = elopement_opinion - } - - #Rivalry - if = { - limit = { - can_set_relation_rival_trigger = { CHARACTER = $CHARACTER$ } - is_ai = yes - trigger_if = { - limit = { is_spouse_of = $CHARACTER$ } - ai_vengefulness >= low_positive_ai_value - } - trigger_else = { - ai_vengefulness > 0 - } - } - if = { - limit = { - can_set_relation_nemesis_trigger = { CHARACTER = $CHARACTER$ } - ai_vengefulness >= medium_positive_ai_value - } - set_relation_nemesis = { - reason = nemesis_elopement - copy_reason = rival - target = $CHARACTER$ - } - } - else = { - set_relation_rival = { - target = $CHARACTER$ - reason = rival_eloped - } - } - } - else_if = { - limit = { - can_set_relation_potential_rival_trigger = { CHARACTER = $CHARACTER$ } - } - hidden_effect = { set_relation_potential_rival = $CHARACTER$ } - } -} - -elope_success_personal_consequences_effect = { - $CHARACTER$ = { - - #Divorce - if = { - limit = { - is_married = yes - } - every_spouse = { - save_temporary_scope_as = eloper_divorcee - - divorce_effect = { - DIVORCER = $CHARACTER$ - DIVORCEE = scope:eloper_divorcee - } - if = { - limit = { has_relation_lover = $CHARACTER$ } - remove_relation_lover = $CHARACTER$ - } - } - - #Divorce consequences - if = { - limit = { faith = { NOT = { has_doctrine = doctrine_divorce_allowed } } } - add_prestige_level = -1 - add_piety_level = -1 - - if = { - limit = { - faith = { has_doctrine = tenet_communion } - NOT = { has_trait = excommunicated } - } - add_trait = excommunicated - } - } - } - - #Break betrothal - if = { - limit = { is_betrothed = yes } - reverse_add_opinion = { - modifier = broke_betrothal_opinion - target = betrothed - } - break_betrothal = betrothed - if = { - limit = { - has_been_promised_grand_wedding = yes - } - break_grand_wedding_betrothal_effect = yes - } - } - - #End concubinage - if = { - limit = { is_concubine = yes } - liege = { - remove_concubine = $CHARACTER$ - - if = { - limit = { has_relation_lover = $CHARACTER$ } - remove_relation_lover = $CHARACTER$ - } - } - add_prestige_level = -1 - } - } -} - -elope_failure_discovered_opinion_rivalry_effect = { - add_opinion = { - target = $CHARACTER$ - modifier = attempted_elopement_opinion - } - - #Rivalry - if = { - limit = { - can_set_relation_potential_rival_trigger = { CHARACTER = $CHARACTER$ } - } - hidden_effect = { set_relation_potential_rival = $CHARACTER$ } - } -} - -################################################## -# Fabricate Hook Scheme Effects - -fabricate_hook_assign_appropriate_type_effect = { - debug_log = "Running Fabricate Hook's Assign Appropriate Hook effect" - assert_if = { - limit = { - scope:owner = { - has_strong_hook = scope:target - } - } - text = "The Fabricate Hook Scheme Owner already has a Strong Hook on the Target! Why is this effect running?" - } - assert_if = { - limit = { - scope:target = { is_ruler = yes } - NOT = { exists = scope:strong_hook_against_ruler } - scope:owner = { has_hook = scope:target } - } - text = "The Owner has a hook against a ruler target, and the strong hook roll failed. Something has gone wrong to get here!" - } - - save_scope_value_as = { - name = hook_type - value = flag:$TYPE$ - } - # Go through the Hook types, and assign the appropriate one - if = { - limit = { - scope:hook_type = flag:loyalty_hook - } - # Check rulers first (to give weaker Hooks) - if = { - limit = { - scope:target = { is_ruler = yes } - NOT = { exists = scope:strong_hook_against_ruler } # Set by on_ready in the Scheme - } - send_interface_toast = { - title = fabricate_hook_gained_indebted_title - left_icon = scope:target - add_hook = { - type = indebted_hook - target = scope:target - } - } - } - else = { - send_interface_toast = { - title = fabricate_hook_gained_loyalty_title - left_icon = scope:target - add_hook = { - type = loyalty_hook - target = scope:target - } - } - } - } - else_if = { - limit = { - scope:hook_type = flag:fabrication_hook - } - # Check rulers first (to give weaker Hooks) - if = { - limit = { - scope:target = { is_ruler = yes } - NOT = { exists = scope:strong_hook_against_ruler } # Set by on_ready in the Scheme - } - send_interface_toast = { - title = fabricate_hook_gained_manipulation_title - left_icon = scope:target - add_hook = { - type = manipulation_hook - target = scope:target - } - } - } - else = { - send_interface_toast = { - title = fabricate_hook_gained_indebted_title - left_icon = scope:target - add_hook = { - type = fabrication_hook - target = scope:target - } - } - } - } - else_if = { - limit = { - scope:hook_type = flag:life_threat_hook - } - debug_log = "Attempting to set life threat hook" - # Check rulers first (to give weaker Hooks) - if = { - limit = { - scope:target = { is_ruler = yes } - NOT = { exists = scope:strong_hook_against_ruler } # Set by on_ready in the Scheme - } - debug_log = "Trying to set regular threat hook against ruler" - send_interface_toast = { - title = fabricate_hook_gained_threat_title - left_icon = scope:target - add_hook = { - type = threat_hook - target = scope:target - } - scope:target = { - add_opinion = { - target = scope:owner - modifier = fabricate_hook_threatened_me - years = 10 - } - } - } - } - else = { - if = { - limit = { exists = scope:strong_hook_against_ruler } - debug_log = "Trying to set life_threat_hook against a ruler" - } - else = { - debug_log = "Setting life_threat_hook against non-ruler" - assert_if = { - limit = { scope:target = { is_ruler = yes } } - text = "There is no ruler strong hook roll, but we're still trying to set a life_threat_hook on them!" - } - } - send_interface_toast = { - title = fabricate_hook_gained_threat_title - left_icon = scope:target - add_hook = { - type = life_threat_hook - target = scope:target - } - scope:target = { - add_opinion = { - target = scope:owner - modifier = fabricate_hook_threatened_me - years = 10 - } - } - } - } - } - # Error catch - else = { - assert_if = { - limit = { always = yes } # It should never get here - text = "Fabricate Hook assignment effect did not have a Hook type set when trying to assign a Hook!" - } - } -} - -fabricate_hook_block_scheme_owner_from_further_schemes_effect = { - add_opinion = { - target = scope:owner - modifier = fabricated_hook_against_court_opinion - years = 5 - } - custom_tooltip = fabricate_hook_i_may_not_fabricate_again -} - -fabricate_hook_discovery_effect = { - show_as_tooltip = { # Target dislikes you - custom_tooltip = fabricate_hook_i_may_not_fabricate_again - scope:target = { - add_opinion = { - target = scope:owner - modifier = fabricated_hook_against_court_opinion - years = 5 - } - } - if = { - limit = { - exists = scope:target.court_owner - scope:target != scope:target.court_owner - } - scope:target.court_owner = { - add_opinion = { - target = scope:owner - modifier = fabricated_hook_against_court_opinion - years = 5 - } - } - } - } - - hidden_effect = { - # Set a blocker for Fabricating further Hooks against Court in question - if = { - limit = { - exists = scope:target.court_owner - } - scope:target.court_owner = { - send_interface_message = { - type = fabricate_hook_bad_message - left_icon = scope:owner - title = hostile_scheme_discovery.3002.t - - if = { - limit = { - scope:owner != scope:target.court_owner - } - fabricate_hook_block_scheme_owner_from_further_schemes_effect = yes - } - } - } - } - if = { - limit = { - OR = { - NOT = { exists = scope:target.court_owner } - scope:target.court_owner != scope:target - } - } - scope:target = { - add_opinion = { - target = scope:owner - modifier = fabricated_hook_against_court_opinion - years = 5 - } - } - } - } -} - -#Used in event options -fabricate_hook_success_effect = { - fabricate_hook_assign_appropriate_type_effect = { - TYPE = $TYPE$ # Sets the correct hook type to give - } - if = { - limit = { exists = scope:scheme_discovered } - fabricate_hook_discovery_effect = yes - } - if = { - limit = { exists = scope:scheme } - scope:scheme = { - end_scheme = yes - } - } -} - -fabricate_hook_decline_execution_effect = { - scope:scheme = { - add_scheme_modifier = { - type = fabricate_hook_building_influence_modifier - } - custom_tooltip = restart_scheme_tt - reset_failed_scheme_effect = yes - } -} - -fabricate_hook_success_notification_event_effect = { - custom_tooltip = fabricate_hook_hook_gained_on_you - if = { - limit = { - exists = scope:scheme_discovered - scope:target = scope:target.court_owner - } - fabricate_hook_block_scheme_owner_from_further_schemes_effect = yes - } -} - -################################################## -# Sway Scheme Effects - -sway_end_effect = { - if = { - limit = { - scope:target = { - NOT = { - has_opinion_modifier = { - target = scope:owner - modifier = scheme_sway_opinion - value >= sway_max_value # 100 by default - } - } - } - } - if = { - limit = { - exists = scope:scheme - } - scope:scheme = { - reset_failed_scheme_effect = yes - } - } - if = { - limit = { - exists = scope:scheme_successful - } - custom_tooltip = sway_continue - } - else = { - custom_tooltip = sway_try_again - } - - scope:owner = { # The AI never stops swaying unless we force it to, this makes them use a more even spread of schemes - if = { - limit = { - is_ai = yes - scope:target = { - NAND = { - is_vassal_of = scope:owner - is_a_faction_member = yes - opinion = { - target = scope:owner - value < 100 - } - } - } - } - if = { # Sway your realm priest for a long time - limit = { - scope:target = { - is_theocratic_lessee = yes - opinion = { - target = scope:owner - value <= 50 - } - } - } - random = { - chance = 10 - scope:scheme = { - end_scheme = yes - } - } - } - else_if = { - limit = { - scope:target = { - opinion = { - target = scope:owner - value < -25 - } - } - } - random = { - chance = 10 - scope:scheme = { - end_scheme = yes - } - } - } - else_if = { - limit = { - scope:target = { - opinion = { - target = scope:owner - value < 0 - } - } - } - random = { - chance = 30 - scope:scheme = { - end_scheme = yes - } - } - } - else_if = { - limit = { - scope:target = { - opinion = { - target = scope:owner - value < 35 - } - } - } - random = { - chance = 50 - scope:scheme = { - end_scheme = yes - } - } - } - else = { - scope:scheme = { - end_scheme = yes - } - } - } - } - } - else = { - #hidden_effect = { # What was this ever supposed to achieve? - # remove_opinion = { - # target = scope:owner - # modifier = scheme_sway_opinion - # } - # add_opinion = { - # target = scope:owner - # modifier = scheme_sway_opinion - # opinion = 100 - # } - #} - scope:owner = { - send_interface_toast = { - title = sway_complete - left_icon = scope:target - scope:scheme = { - end_scheme = yes - } - } - } - } -} - -sway_ongoing_1002_outcome_effect = { - if = { - limit = { - exists = scope:believer - has_relation_friend = scope:believer - } - show_as_tooltip = { theology_3021_a_success_effect = yes } - } - else = { - random_list = { - 1 = { - desc = diplomacy_majesty.0004.success.tt - show_chance = no - show_as_tooltip = { - scope:compliment_receiver = { - add_opinion = { - target = root - modifier = respect_opinion - opinion = 10 - } - } - } - } - 1 = { - desc = diplomacy_majesty.0004.failure.tt - show_chance = no - show_as_tooltip = { - scope:compliment_receiver = { - add_opinion = { - target = root - modifier = respect_opinion - opinion = -5 - } - } - } - } - } - } - - hidden_effect = { - if = { - limit = { - exists = scope:compliment_outcome - scope:compliment_outcome = flag:good - } - trigger_event = sway_ongoing.1003 - } - else_if = { #Is treated as a good outcome here - limit = { - exists = scope:compliment_outcome - scope:compliment_outcome = flag:neutral - } - trigger_event = sway_ongoing.1003 - } - else_if = { - limit = { - exists = scope:compliment_outcome - scope:compliment_outcome = flag:bad - } - trigger_event = sway_ongoing.1004 - } - } -} - -################################################## -# Court Scheme Effects - -court_success_prestige_effect = { - - if = { - limit = { court_love_is_shunned_or_criminal_trigger = no } #Only if it's not a taboo courtship - - #Whose tier matters? - if = { - limit = { - scope:target = { - is_ruler = no - exists = liege - OR = { - is_spouse_of = this.liege - is_close_or_extended_family_of = this.liege - } - } - } - scope:target = { liege = { save_scope_as = prestige_comparison } } - } - else = { - scope:target = { save_scope_as = prestige_comparison } - } - - #Epic - if = { - limit = { - #They are at least two levels above you or empire level - OR = { - tier_difference = { - target = scope:prestige_comparison - value <= -2 - } - scope:prestige_comparison.highest_held_title_tier = tier_empire - } - } - add_prestige = massive_prestige_gain - } - #Great - else_if = { - limit = { - OR = { - #They are one level above you or kingdom level - tier_difference = { - target = scope:prestige_comparison - value = -1 - } - scope:prestige_comparison.highest_held_title_tier = tier_kingdom - } - } - add_prestige = major_prestige_gain - } - #Good - else_if = { - limit = { - #They're your level or duchy level - OR = { - scope:prestige_comparison.highest_held_title_tier = this.highest_held_title_tier - scope:prestige_comparison.highest_held_title_tier = tier_duchy - } - } - add_prestige = medium_prestige_value - } - #Okay - else_if = { - limit = { - #They're at least county level - scope:prestige_comparison.highest_held_title_tier >= tier_county - } - add_prestige = minor_prestige_value - } - #Everything else (everyone targeting barons/unlanded) - else = { - add_prestige = miniscule_prestige_value - } - } -} - -court_ongoing_1010_good_duel_outcome_effect = { - add_prestige = medium_prestige_gain - scope:scheme = { - add_scheme_modifier = { - type = courting_act_of_heroism_modifier - } - } -} - -court_ongoing_fetch_gift_modifier_effect = { - #Wolf pelt - if = { - limit = { - scope:target = { has_character_flag = court_ongoing_wolf_pelt_flag } - has_royal_court = yes # Since these are court artifacts and serve no real purpose to those without a court - } - create_artifact_animal_hide_effect = { - OWNER = scope:target - HUNTER = scope:target - LEGENDARY = no - ANIMAL = flag:wolf - } - } - # Necklace - else_if = { - limit = { - scope:target = { has_character_flag = court_ongoing_necklace_flag } - } - create_artifact_necklace_effect = { - OWNER = scope:target - SMITH = scope:target - } - hidden_effect_new_object = { - scope:newly_created_artifact = { - flag_as_trash_artifact = yes - } - } - } - # Flower - else_if = { - limit = { - scope:target = { has_character_flag = court_ongoing_orchid_flag } - } - save_scope_value_as = { - name = flower_species - value = flag:flower_type_orchid - } - create_artifact_pressed_flower_effect = { OWNER = scope:target } - clear_saved_scope = flower_species - hidden_effect_new_object = { - scope:newly_created_artifact = { - flag_as_trash_artifact = yes - } - } - } - else = { - add_character_modifier = { - modifier = $GIFT$_modifier - years = 20 - } - } -} - -court_ongoing_fetch_gift_target_outcome_effect = { - hidden_effect = { - scope:target = { - if = { - limit = { is_ai = no } - } - save_temporary_scope_value_as = { - name = gift_outcome - value = flag:$OUTCOME$ - } - - if = { - limit = { - scope:gift_outcome = flag:success - } - send_interface_toast = { - title = court_ongoing.1021.$GIFT$.success - left_icon = scope:owner - court_ongoing_fetch_gift_modifier_effect = { GIFT = $GIFT$ } - } - } - else_if = { - limit = { - scope:gift_outcome = flag:failure - } - send_interface_toast = { - title = court_ongoing.1021.$GIFT$.failure - left_icon = scope:owner - } - } - #Flag clean up - remove_character_flag = court_ongoing_wolf_pelt_flag - remove_character_flag = court_ongoing_necklace_flag - remove_character_flag = court_ongoing_orchid_flag - } - } -} - -court_ongoing_1030_dog_modifier_effect = { - if = { - limit = { - NOT = { has_character_flag = had_dog_story } - } - start_dog_story_cycle_effect = yes - } -} - -court_ongoing_1030_cat_modifier_effect = { - if = { - limit = { - NOT = { has_character_flag = had_cat_story } - } - start_cat_story_cycle_effect = yes - } -} - -court_ongoing_1030_eagle_modifier_effect = { - if = { - limit = { - NOT = { has_character_flag = had_eagle_story } - } - save_scope_value_as = { - name = eagle_capture_method - value = flag:gift - } - start_eagle_story_cycle_effect = yes - } -} - -court_ongoing_1030_failure_effect = { - reverse_add_opinion = { - target = scope:target - modifier = disappointed_opinion - opinion = -10 - } -} - -court_ongoing_1100_outcome_effect = { - show_as_tooltip = { - random_list = { - 1 = { - desc = court_ongoing.1100.success.tt - show_chance = no - scope:scheme = { - add_scheme_modifier = { - type = courting_charm_modifier - } - } - } - 1 = { - desc = court_ongoing.1100.neutral.tt - show_chance = no - } - 1 = { - desc = court_ongoing.1100.failure.tt - show_chance = no - reverse_add_opinion = { - target = scope:target - modifier = insult_opinion - opinion = -10 - } - } - } - } - - hidden_effect = { - scope:target = { - trigger_event = { - id = court_ongoing.1101 - days = { 3 7 } - } - } - } -} - -court_consummate_effect = { - if = { - limit = { this = scope:owner } - - } - else = { - set_relation_soulmate = scope:owner - } -} - -court_kiss_effect = { - - hidden_effect = { - if = { - limit = { NOT = { has_relation_potential_lover = scope:target } } - set_relation_potential_lover = scope:target - } - } -} - -target_success_opinion_bonus_effect = { - reverse_add_opinion = { - target = scope:owner - modifier = love_opinion - opinion = 30 - } -} - -end_court_scheme_effect = { - save_temporary_scope_value_as = { - name = court_outcome - value = flag:$OUTCOME$ - } - - scope:owner = { - # SUCCESS: SOULMATES - # (This is the only one which target also needs to see, run it in owner scope in show_as_tooltip first and then execute in target's scope) - if = { - limit = { scope:court_outcome = flag:success_soulmate } - - scope:target = { set_relation_soulmate = { reason = $REASON$ target = prev } } - if = { - limit = { - NOR = { - has_sexuality = asexual - scope:target = { has_sexuality = asexual } - } - } - had_sex_with_effect = { #Run this in target scope because owner has own tooltip - CHARACTER = scope:target - PREGNANCY_CHANCE = pregnancy_chance - } - } - reverse_add_opinion = { - target = scope:target - modifier = romance_scheme_courtship_opinion #Blocks courtship - } - - #Maybe break of existing lover relationships - hidden_effect = { - scope:target = { - if = { - limit = { - has_trait = lustful - is_ai = yes - any_relation = { - type = lover - this != scope:owner - } - } - every_relation = { - type = lover - random = { - chance = 90 - opinion_modifier = { #Less likely if they really like the lover - who = scope:target - opinion_target = this - multiplier = -0.5 - min = -20 - } - modifier = { #More likely if they have more lovers - add = 10 - scope:target = { - any_relation = { - type = lover - count >= 2 - } - } - } - lover_breakup_effect = { - BREAKER = scope:target - LOVER = this - } - } - } - } - } - } - } - # SUCCESS: KISS - else_if = { - limit = { scope:court_outcome = flag:success_kiss } - custom_tooltip = court_outcome.kiss.tt - reverse_add_opinion = { - target = scope:target - modifier = romance_scheme_courtship_opinion #Blocks courtship - } - } - # FAILURE: SOFT - else_if = { - limit = { scope:court_outcome = flag:failure_soft } - #Shared effect with Seduce because failure in one scheme should block the other - scope:target = { seduction_cooldown_for_character_effect = { CHARACTER = scope:owner } } - } - # FAILURE: HARD - else_if = { - limit = { scope:court_outcome = flag:failure_hard } - #Shared effect with Seduce because failure in one scheme should block the other - scope:target = { seduction_block_character_effect = { CHARACTER = scope:owner } } - } - - # Tradition bonuses - if = { - limit = { - OR = { - scope:court_outcome = flag:success_soulmate - scope:court_outcome = flag:success_kiss - } - culture = { - has_cultural_parameter = romance_scheme_bonuses - } - exists = dynasty - } - dynasty = { - add_dynasty_prestige = minor_dynasty_prestige_gain - } - } - else_if = { - limit = { - OR = { - scope:court_outcome = flag:failure_soft - scope:court_outcome = flag:failure_hard - } - culture = { - has_cultural_parameter = romance_scheme_bonuses - } - } - add_stress = medium_stress_impact_gain - } - } - - scope:scheme = { end_scheme = yes } -} - -################################################## -# Steal Back Artefact Scheme Effects - -#Used in the immediate of the Scheme Owner's success event -steal_back_artifact_success_effect = { - scope:target = { - add_opinion = { - target = scope:owner - modifier = stole_artifact_from_me - } - # Feud score - scope:owner.house = { - change_house_relation_feud_score_effect = { - TARGET = scope:owner.house - REASON = stole_artifact - VALUE = house_feud_medium_counter_value - } - } - # Contracts - hidden_effect = { - if = { - limit = { - any_character_task_contract = { - task_contract_type = laamp_steal_artifact_contract - var:task_contract_target ?= scope:target - } - } - random_character_task_contract = { - task_contract_type = laamp_steal_artifact_contract - limit = { - var:task_contract_target ?= scope:target - } - complete_task_contract = success_standard - } - } - } - } -} - -steal_back_artifact_failure_effect = { - #Add Watchful Modifier to the target - scope:target = { - add_character_modifier = { - modifier = watchful_modifier - days = watchful_modifier_duration - } - add_opinion = { - target = scope:owner - modifier = attempted_to_steal_artifact_from_me - } - } -} - -################################################## -# Scheme Start Effects - -## Start a (non-contract) scheme with agents -# -# Arguments: -# SCHEME_TYPE - Type of scheme -# TARGET_TYPE - What type of thing to target (character or title) -# TARGET_SCOPE - Individual game object to target (character or title) -# AGENT_1..5 - Scheme agent slots for the scheme. -begin_scheme_with_agents_effect = { - save_scope_as = scheme_launcher - - # Flag that we _don't_ need more agents. - set_variable = { - name = agents_added - value = yes - days = 1 - } - - # Start the scheme. - start_scheme = { - type = $SCHEME_TYPE$ - $TARGET_TYPE$ = $TARGET_SCOPE$ - - save_scope_as = new_scheme - } - - # Assign agent slots et al. to the newly created scheme. - scope:new_scheme ?= { - # Add our starting agents. - add_agent_slot = $AGENT_1$ - add_agent_slot = $AGENT_2$ - add_agent_slot = $AGENT_3$ - add_agent_slot = $AGENT_4$ - add_agent_slot = $AGENT_5$ - - # Assign initial agents for non-player schemers. - if = { - limit = { - scope:scheme_launcher = { - is_ai = yes - } - } - auto_assign_scheme_agents = yes - } - - # If we have a custom charge threshold to complete, set that here. - ## Overthrow Regent. - if = { - limit = { scheme_type = overthrow_regent } - set_variable = { - name = custom_charge_threshold - value = 1 - } - } - # Set up our grace period. - set_variable = { - name = secrecy_grace_period - value = secrecy_grace_character_total_starting_value - } - } - - open_view = { - view = intrigue_window - player = scope:new_scheme.scheme_owner - } -} - -begin_contract_scheme_with_agents_effect = { - # Log our scheme launcher so that we can refer to them down the line. - save_scope_as = scheme_launcher - # Flag that we _don't_ need more agents. - set_variable = { - name = agents_added - value = yes - days = 1 - } - every_scheme = { add_to_list = current_schemes_list } - # check if you have to attach a contract to the scheme - # Now start the scheme. - start_scheme = { - type = $SCHEME_TYPE$ - $TARGET_TYPE$ = $TARGET_SCOPE$ - contract = $TASK_CONTRACT$ - } - # And grab the scheme's scope. - random_scheme = { - limit = { - NOT = { is_in_list = current_schemes_list } - } - save_scope_as = new_scheme - } - scope:new_scheme ?= { - # Add our starting agents. - add_agent_slot = $AGENT_1$ - add_agent_slot = $AGENT_2$ - add_agent_slot = $AGENT_3$ - add_agent_slot = $AGENT_4$ - add_agent_slot = $AGENT_5$ - # If we have a custom charge threshold to complete, set that here. - ## Overthrow Regent. - if = { - limit = { scheme_type = overthrow_regent } - set_variable = { - name = custom_charge_threshold - value = 1 - } - } - # Set up our grace period. - set_variable = { - name = secrecy_grace_period - value = secrecy_grace_character_total_starting_value - } - set_variable = { - name = attached_task_contract - value = $TASK_CONTRACT$ - } - } - $TASK_CONTRACT$ = { - set_variable = { - name = attached_scheme - value = scope:new_scheme - } - } - open_view = { - view = intrigue_window - player = scope:new_scheme.scheme_owner - } -} - -begin_scheme_basic_effect = { - # Log our scheme launcher so that we can refer to them down the line. - save_scope_as = scheme_launcher - # Log all the currently on-going schemes. - ## We do it this way being we can't guarantee mutually exclusive targets with non-character scheme targets any more: we can't just look for "X's murder scheme against Y", because X might be plotting against no target whatsoever and have multiple schemes of that type against nothing. - every_scheme = { add_to_list = current_schemes_list } - # Now start the scheme. - start_scheme = { - type = $SCHEME_TYPE$ - $TARGET_TYPE$ = $TARGET_SCOPE$ - } - # And grab the scheme's scope. - random_scheme = { - limit = { - NOT = { is_in_list = current_schemes_list } - } - save_scope_as = new_scheme - } - scope:new_scheme ?= { - # If we have a custom charge threshold to complete, set that here. - ## Sway. - if = { - limit = { scheme_type = sway } - set_variable = { - name = custom_charge_threshold - value = 5 - } - } - } -} - -add_scheme_starting_opportunities_intrigue_effect = { - if = { - limit = { scheme_owner.intrigue >= scheme_starting_opportunities_per_intrigue_threshold_value } - change_opportunities = { - value = scheme_owner.intrigue - subtract = scheme_starting_opportunities_per_intrigue_threshold_value - divide = scheme_starting_opportunities_per_intrigue_increment_value - ceiling = yes - max = 4 - } - } -} - -################################################## -# Scheme Pulse Action Effects - -# How many months should we wait before another pulse action can be queued? -scheme_pulse_action_sort_cooldown_effect = { - set_variable = { - name = scheme_pulse_action_on_cooldown - value = yes - months = 8 - } -} - -################################################## -# Countermeasure Effects - -inform_player_of_relevant_countermeasure_activated_effect = { - every_player = { - limit = { - any_scheme = { - scheme_target_character ?= root - has_variable = apply_countermeasures - } - } - send_interface_message = { - type = msg_countermeasure_change - title = countermeasures.t.target_changes - desc = countermeasures.desc.$COUNTERMEASURE$ - right_icon = root - } - } -} - -dispute_borders_scheme_prep_effect = { - save_scope_as = scheme - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.8001 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -subsume_province_scheme_prep_effect = { - save_scope_as = scheme - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.8011 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} - -raid_estate_opinion_effect = { - $TARGET$ = { save_temporary_scope_as = target_temp } - $OWNER$ = { save_temporary_scope_as = owner_temp } - scope:target_temp.house.house_head ?= { - # OPINION - add_opinion = { - target = scope:owner_temp - modifier = raided_estate_crime - } - # FEUD - if = { - limit = { has_relation_rival = scope:owner_temp } - if = { - limit = { valid_for_feud_events_with_target_trigger = { TARGET = scope:owner_temp } } - house_feud_start_effect = { - # Feuding House Head - ACTOR = scope:target_temp - # Target House Head - TARGET = scope:owner_temp - # Feud Reason - REASON = raid_estate - # House Member attacker if relevant - ATTACKER = scope:target_temp - # House Member victim if relevant - VICTIM = scope:owner_temp - } - } - } - # RELATION - progress_towards_rival_effect = { - REASON = rival_raid_estate - CHARACTER = scope:owner_temp - OPINION = 0 - } - } - # VICTIM OPINION - every_in_list = { - list = target_victims - if = { - limit = { exists = scope:scheme_maim } - add_opinion = { - target = scope:owner_temp - modifier = raid_estate_maimed_opinion - } - } - } - scope:target_temp.house = { - # HOUSE RELATION - change_house_relation_effect = { - HOUSE = scope:owner_temp.house - VALUE = house_relation_damage_major_value - REASON = raided_estate - CHAR = scope:owner_temp - TARGET_CHAR = scope:target_temp - TITLE = scope:dummy_gender - } - # OTHER MEMBER OPINION - every_house_member = { - custom = every_other_raid_estate_house_member_tt - limit = { - NOR = { - this = scope:target_temp - is_in_list = target_victims - } - } - add_opinion = { - target = scope:owner_temp - modifier = raid_estate_house_opinion - } - } - } - # CRIME - scope:owner_temp.top_liege ?= { - if = { - limit = { - this != scope:owner_temp - this != scope:target_temp - NOT = { scope:owner_temp.var:raid_estate_permission ?= scope:target_temp.house } - } - add_opinion = { - target = scope:owner_temp - modifier = raid_estate_vassal_crime - } - } - } -} - -education_5_scheme_progress_effect = { - if = { - limit = { - scope:actor = { has_trait = education_$SKILL$_5 } - } - scope:new_scheme ?= { - add_scheme_progress = { - value = scheme_progress_gain - multiply = 3 - } - } - } -} - -steal_herd_success_effect = { - if = { - limit = { - scope:target = { - exists = domicile - domicile.herd > 0 - } - } - scope:target = { - if = { - limit = { - scope:owner = { - OR = { - is_vassal_of = scope:target - is_liege_or_above_of = scope:target - } - } - } - add_opinion = { - target = scope:owner - modifier = stole_my_herd_crime - } - } - else = { - add_opinion = { - target = scope:owner - modifier = stole_my_herd - } - } - if = { - limit = { - is_independent_ruler = no - liege = { - NOT = { is_liege_or_above_of = scope:owner } - } - } - liege = { - add_opinion = { - target = scope:owner - modifier = stole_vassals_herd - } - } - } - custom_tooltip = { - text = steal_herd_vassal_tt - every_powerful_vassal = { - limit = { - NOR = { - this = scope:target - this = scope:owner - } - } - add_opinion = { - target = scope:owner - modifier = stole_lieges_herd - } - } - } - } - scope:owner = { - if = { - limit = { - scope:scheme = { exists = var:steal_herd_low } - } - if = { - limit = { - has_character_flag = steal_herd_extra - } - scope:target = { - pay_herd = { - target = scope:owner - value = { - value = domicile.ten_percent_current_herd_value - max = scope:owner.domicile.fifty_percent_current_herd_value - } - } - } - } - else = { - scope:target = { - pay_herd = { - target = scope:owner - value = { - value = domicile.five_percent_current_herd_value - max = scope:owner.domicile.fifty_percent_current_herd_value - } - } - } - } - } - else_if = { - limit = { - scope:scheme = { exists = var:steal_herd_normal } - } - if = { - limit = { - has_character_flag = steal_herd_extra - } - scope:target = { - pay_herd = { - target = scope:owner - value = { - value = domicile.fifteen_percent_current_herd_value - max = scope:owner.domicile.fifty_percent_current_herd_value - } - } - } - } - else = { - scope:target = { - pay_herd = { - target = scope:owner - value = { - value = domicile.ten_percent_current_herd_value - max = scope:owner.domicile.fifty_percent_current_herd_value - } - } - } - } - } - else_if = { - limit = { - scope:scheme = { exists = var:steal_herd_high } - } - if = { - limit = { - has_character_flag = steal_herd_extra - } - scope:target = { - pay_herd = { - target = scope:owner - value = { - value = domicile.twenty_percent_current_herd_value - max = scope:owner.domicile.fifty_percent_current_herd_value - } - } - } - } - else = { - scope:target = { - pay_herd = { - target = scope:owner - value = { - value = domicile.fifteen_percent_current_herd_value - max = scope:owner.domicile.fifty_percent_current_herd_value - } - } - } - } - } - } - } - - scope:owner = { - if = { - limit = { - has_character_flag = steal_herd_money - } - scope:target = { - pay_short_term_gold = { - target = scope:owner - gold = medium_gold_value - } - } - remove_character_flag = steal_herd_money - } - - if = { - limit = { - has_character_flag = steal_herd_extra - } - remove_character_flag = steal_herd_extra - } - } -} - -steal_herd_failure_effect = { - #Add Watchful Modifier to the target - scope:target = { - add_character_modifier = { - modifier = watchful_modifier - days = watchful_modifier_duration - } - - add_opinion = { - target = scope:owner - modifier = attempted_to_steal_herd_crime - } - } - #Lose some prestige - scope:owner = { - add_prestige = minor_prestige_loss - } -} - -purge_ai_scheme_slots_effect = { - scope:scheme = { - if = { - limit = { - any_scheme_agent_slot = { - is_filled = no - } - } - every_scheme_agent_slot = { - limit = { - is_filled = no - } - save_scope_as = slot_purge - prev = { remove_agent_slot = scope:slot_purge } - } - } - } -} - -coup_ceremonial_liege_scheme_prep_effect = { - save_scope_as = scheme - save_scope_value_as = { - name = follow_up_event - value = event_id:scheme_critical_moments.2921 - } - if = { - limit = { - NOT = { exists = scope:suppress_next_event } - } - scheme_owner = { trigger_event = scheme_critical_moments.0002 } - } -} diff --git a/N3OW/common/scripted_effects/00_scripted_effects.txt b/N3OW/common/scripted_effects/00_scripted_effects.txt deleted file mode 100644 index b1ed210e..00000000 --- a/N3OW/common/scripted_effects/00_scripted_effects.txt +++ /dev/null @@ -1,137 +0,0 @@ - -##################################################################### -# EFFECT LIST -##################################################################### -# !!! Remember to add all new effects with a short description here !!! - -#save_var_scope_effect - To check for a variable saved scope and save it as a scope - -##################################################################### -# EFFECTS -##################################################################### - -#To check for a scope saved to a variable and save it as a scope -save_var_scope_effect = { - var:$VAR$ = { - save_scope_as = $VAR$ - } -} - -#To loan money from someone (Remember: you can only have one loan at a time!) -set_up_loan_effect = { - set_variable = { - name = loan_holder - value = $LENDER$ - } - set_variable = { - name = loan_amount_owed - value = $AMOUNT$ - } - $LENDER$ = { #To make the loan inheritable - set_variable = { - name = owes_me_money - value = root - } - hidden_effect = { - set_variable = { - name = loan_amount_lent - value = prev.var:loan_amount_owed - } - if = { - limit = { exists = var:loan_amount_lent } - pay_short_term_gold = { - target = root - gold = var:loan_amount_lent - } - remove_variable = loan_amount_lent - } - } - } -} - -disease_data_save_contraction_effect = { - if = { - limit = { - activate_disease_data_tracking_trigger = yes - has_variable = disease_data_activate_tracking - } - - change_variable = { - name = disease_data_character_$DISEASE$_amount - add = 1 - } - } -} - -#ARTIFACTS -add_character_artifact_claim_to_scope_effect = { - prev = { save_scope_as = artifact } - if = { - limit = { - NOT = { - $SCOPE$ = { has_personal_artifact_claim = scope:artifact } - } - } - $SCOPE$ = { add_personal_artifact_claim = prev } - } -} - -# For setting randomized event locales -get_random_location_effect = { - hidden_effect = { - random_list = { - 1 = { # Library - trigger = { - NOT = { government_has_flag = government_is_tribal } - } - set_variable = { - name = random_location - value = 0 - } - } - 1 = { # Garden - set_variable = { - name = random_location - value = 1 - } - } - 1 = { # Corridor - set_variable = { - name = random_location - value = 2 - } - } - 1 = { # Council Chamber - trigger = { - NOT = { government_has_flag = government_is_tribal } - } - set_variable = { - name = random_location - value = 3 - } - } - 1 = { # Throne Room - set_variable = { - name = random_location - value = 4 - } - } - 1 = { # War Camp - trigger = { is_in_army = yes } - set_variable = { - name = random_location - value = 5 - } - } - } - } -} - -# For setting or adding a character to the bought_truce_list -add_to_bought_truce_list = { - add_to_variable_list = { - name = bought_truce_list - target = $TARGET$ - days = $DAYS$ - } -} diff --git a/N3OW/common/scripted_effects/00_secret_effects.txt b/N3OW/common/scripted_effects/00_secret_effects.txt deleted file mode 100644 index 2a7285d9..00000000 --- a/N3OW/common/scripted_effects/00_secret_effects.txt +++ /dev/null @@ -1,2417 +0,0 @@ -#Scripted effects relating to secrets - -##################################################################### -# EFFECT LIST -##################################################################### -# !!! Remember to add all new effects with a short description here !!! - -#BLACKMAIL -#blackmail_target_with_secret_effect - adds a blackmail strong or weak blackmail hook for current scope against TARGET based on SECRET type, always use with "is_blackmailable_secret_trigger" - -#SECRET HANDLING -#give_incest_secret_or_nothing_effect - adds incest secret if incest is shunned in my or liege's faith -#give_incest_secret_or_nothing_with_target_effect - adds incest secret if relation with target is incest in my or liege's faith -#give_witch_secret_or_trait_effect - trait if accepted, secret if not -#give_deviant_secret_or_trait_effect - trait if accepted, secret if not -#give_cannibal_secret_or_trait_effect - trait if accepted, secret if not -#give_homosexual_secret_or_nothing_effect - nothing if accepted, secret if not -#give_homosexual_secret_or_nothing_with_target_effect - nothing if accepted, secret if relation with target is sodomy -#add_adulterer_trait_or_nothing_effect - adds trait is married and adultery is shunned/criminal, otherwise nothing -#add_fornicator_trait_or_nothing_effect - adds trait if unmarried and adultery is shunned/criminal, otherwise nothing -#add_adulterer_fornicator_trait_or_nothing_effect - add fornicator/adulterer trait if shunned/criminal, otherwise nothing -#add_kinslayer_trait_or_nothing_effect - adds kinslayer_1/2/3 trait or nothing (if kinslaying is accepted) - -#SECRET DISCOVERY -#reveal_to_without_events_effect - this effect should - -#SECRET EXPOSURE -#secret_exposed_notification_effect - sends events and feed messages -#remove_piety_level_for_shunned_or_criminal_trait_effect - removes a piety level if the trait is shunned/criminal -#secret_exposed_owner_effects_effect - applies traits etc. when a secret is revaled -#secret_exposed_notification_effects_effect - shows a tooltip for adding traits etc. when a secret is revealed -#secret_exposed_effects_effect - applies the correct effect for - -# LOVER SECRETS: INFIDELITY CONFRONTATION -# start_infidelity_confrontation_story_discovery_effect - Creates a story about confrontations/choices after discovered infidelity (lover secret discovery) -# start_infidelity_confrontation_story_exposure_effect - Creates a story about confrontations/choices after discovered infidelity (lover secret exposure) -# infidelity_confrontation_story_add_to_list_effect - Support effect for building lists in "start_infidelity_confrontation_story_exposure_effect" -# infidelity_confrontation_story_creation_effect - Support for "start_infidelity_confrontation_story_exposure/discovery_effect" for creating the story - -# MISC -#give_random_secret_effect - for testing -#give_random_likely_secret_effect - - - - -###################################################################### -# EFFECTS -###################################################################### - - -####BLACKMAIL#### - -#adds a blackmail strong or weak blackmail hook for current scope against TARGET based on SECRET type -#Always use with is_blackmailable_secret_trigger -blackmail_target_with_secret_effect = { - if = { - limit = { - $SECRET$ = { is_criminal_for = $TARGET$ } - can_add_hook = { - target = $TARGET$ - type = strong_blackmail_hook - } - } - add_hook = { - target = $TARGET$ - type = strong_blackmail_hook - secret = $SECRET$ - } - } - else_if = { - limit = { - $SECRET$ = { is_shunned_for = $TARGET$ } - can_add_hook = { - target = $TARGET$ - type = weak_blackmail_hook - } - } - add_hook = { - target = $TARGET$ - type = weak_blackmail_hook - secret = $SECRET$ - } - } -} - - -###SECRET HANDLING### - - -give_incest_secret_or_nothing_effect = { - save_temporary_scope_as = incest_character - if = { - limit = { - NOR = { - has_trait = incestuous - any_secret = { type = secret_incest } - } - is_adult = yes - trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { TRAIT = incestuous GENDER_CHARACTER = scope:incest_character } - } - add_secret = { - type = secret_incest - } - } -} - -give_incest_secret_or_nothing_with_target_effect = { #Should only add secret to one character! - if = { - limit = { relation_with_character_is_incestuous_in_my_or_lieges_faith_trigger = { CHARACTER = $CHARACTER$ } } - give_incest_secret_or_nothing_effect = yes #Checks my and liege's faith - } -} - - -give_witch_secret_or_trait_effect = { - save_temporary_scope_as = witch_character - if = { - limit = { #Not already a witch - NOR = { - has_trait = witch - any_secret = { type = secret_witch } - } - } - if = { - limit = { - trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { TRAIT = witch GENDER_CHARACTER = scope:witch_character } - } - add_secret = { - type = secret_witch - } - random_secret = { - type = secret_witch - save_scope_as = witch_secret - } - # If you have a legend maybe we change it? - if = { - limit = { - has_legend_chapter_trigger = { CHAPTER = opening } - } - random = { - chance = 10 - send_interface_toast = { - title = legend_chapter_change_toast - left_icon = root - promoted_legend = { - set_legend_chapter = { - name = opening - localization_key = legend_chapter_opening_witch - } - } - } - } - } - } - else = { - add_trait = witch - # If you have a legend maybe we change it? - if = { - limit = { - has_legend_chapter_trigger = { CHAPTER = opening } - } - random = { - chance = 10 - send_interface_toast = { - title = legend_chapter_change_toast - left_icon = root - promoted_legend = { - set_legend_chapter = { - name = opening - localization_key = legend_chapter_opening_witch - } - } - } - } - } - } - } -} - -remove_witch_secret_or_trait_effect = { - save_temporary_scope_as = witch_character - if = { - limit = { #Is already a witch - OR = { - has_trait = witch - any_secret = { type = secret_witch } - } - } - if = { - limit = { - has_trait = witch - } - remove_trait = witch - } - else = { - random_secret = { - type = secret_witch - remove_secret = yes - } - } - } -} - -give_deviant_secret_or_trait_effect = { - save_temporary_scope_as = deviant_character - if = { - limit = { #Not already a deviant - is_adult = yes - NOR = { - has_trait = deviant - any_secret = { type = secret_deviant } - } - } - if = { - limit = { - trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { TRAIT = deviant GENDER_CHARACTER = scope:deviant_character } - } - add_secret = { - type = secret_deviant - } - } - else_if = { - limit = { - is_adult = yes - } - add_trait = deviant - } - } -} - -give_cannibal_secret_or_trait_effect = { - save_temporary_scope_as = cannibal_character - if = { - limit = { #Not already a cannibal - NOR = { - has_trait = cannibal - any_secret = { type = secret_cannibal } - } - } - if = { - limit = { - trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { TRAIT = cannibal GENDER_CHARACTER = scope:cannibal_character } - } - add_secret = { - type = secret_cannibal - } - } - else = { - add_trait = cannibal - } - } -} - -remove_cannibal_secret_or_trait_effect = { - save_temporary_scope_as = cannibal_character - if = { - limit = { #Is already a cannibal - OR = { - has_trait = cannibal - any_secret = { type = secret_cannibal } - } - } - if = { - limit = { - has_trait = cannibal - } - remove_trait = cannibal - } - else = { - random_secret = { - type = secret_cannibal - remove_secret = yes - } - } - } -} - -give_homosexual_secret_or_nothing_effect = { - save_temporary_scope_as = homosexual_character - if = { - limit = { #Not already a known/secret sodomite and can become one - is_adult = yes - NOR = { - has_trait = sodomite - any_secret = { type = secret_homosexual } - } - is_male = yes - trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { TRAIT = sodomite GENDER_CHARACTER = scope:homosexual_character } - } - add_secret = { - type = secret_homosexual - } - } -} - -give_homosexual_secret_or_nothing_with_target_effect = { #Should only add secret to one character! - if = { - limit = { - is_adult = yes - is_male = yes - $CHARACTER$ = { - is_adult = yes - is_male = yes - } - } - give_homosexual_secret_or_nothing_effect = yes #Checks my and liege's faith - } -} - -give_non_believer_secret_effect = { - add_secret = { - type = secret_non_believer - } -} - -add_adulterer_trait_or_nothing_effect = { - save_scope_as = adulterer_check - if = { - limit = { - is_married = yes - trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { TRAIT = adulterer GENDER_CHARACTER = scope:adulterer_check } - } - add_trait_force_tooltip = adulterer - } -} - -add_fornicator_trait_or_nothing_effect = { - save_scope_as = fornicator_check - if = { - limit = { - is_adult = yes - is_married = no - trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { TRAIT = fornicator GENDER_CHARACTER = scope:fornicator_check } - } - add_trait_force_tooltip = fornicator - } -} - -add_adulterer_fornicator_trait_or_nothing_effect = { - if = { - limit = { is_married = yes } - add_adulterer_trait_or_nothing_effect = yes - } - else_if = { - limit = { - is_adult = yes - } - add_fornicator_trait_or_nothing_effect = yes - } -} - -add_kinslayer_trait_or_nothing_effect = { - save_scope_as = slayer - if = { - limit = { - murdering_character_is_kinslaying_in_my_or_same_dynasty_lieges_faith_trigger = { CHARACTER = $VICTIM$ } - } - if = { - limit = { - is_close_family_of = $VICTIM$ - } - if = { - limit = { this = scope:slayer } - set_trait_rank = { - trait = kinslayer - rank = 3 - } - remove_piety_level_for_shunned_or_criminal_trait_effect = { TRAIT = kinslayer_3 } - } - else = { - add_trait_force_tooltip = kinslayer_3 #This is to make sure trait appears in notification messages for other characters - } - } - else_if = { - limit = { - is_extended_family_of = $VICTIM$ - } - if = { - limit = { this = scope:slayer } - set_trait_rank = { - trait = kinslayer - rank = 2 - } - remove_piety_level_for_shunned_or_criminal_trait_effect = { TRAIT = kinslayer_2 } - } - else = { - add_trait_force_tooltip = kinslayer_2 #This is to make sure trait appears in notification messages for other characters - } - } - else_if = { - limit = { - dynasty ?= $VICTIM$.dynasty - } - if = { - limit = { this = scope:slayer } - set_trait_rank = { - trait = kinslayer - rank = 1 - } - remove_piety_level_for_shunned_or_criminal_trait_effect = { TRAIT = kinslayer_1 } - } - else = { - add_trait_force_tooltip = kinslayer_1 #This is to make sure trait appears in notification messages for other characters - } - } - } -} - -give_or_update_embezzler_secret_effect = { - # Either try to add a new embezzler secret. - if = { - limit = { - NOT = { - any_secret = { - type = secret_embezzler - secret_target = $TARGET$ - } - } - } - add_secret = { - type = secret_embezzler - target = $TARGET$ - } - random_secret = { - type = secret_embezzler - limit = { - secret_target = $TARGET$ - } - set_variable = { - name = embezzlement_stake - value = $STAKE$ - } - set_variable = { - name = embezzlement_stake_half - value = { - value = $STAKE$ - multiply = 0.5 - } - } - } - } - # Or else increment the existing one. - else = { - random_secret = { - type = secret_embezzler - limit = { - secret_target = $TARGET$ - has_variable = embezzlement_stake - } - change_variable = { - name = embezzlement_stake - add = $STAKE$ - } - change_variable = { - name = embezzlement_stake_half - add = { - value = $STAKE$ - multiply = 0.5 - } - } - } - } -} - -forgive_exposed_embezzler_effect = { - # Let 'em know they're off the hook. - scope:embezzler = { - # Very kind of you, old chap. - add_opinion = { - target = root - modifier = grateful_opinion - opinion = $OPINION$ - } - send_interface_toast = { - title = secrets.0122.c.tt - left_icon = root - root = { - if = { - limit = { - scope:secret = { - secret_type = secret_embezzler - } - } - remove_opinion = { - target = scope:embezzler - modifier = embezzled_opinion - } - } - else = { - remove_opinion = { - target = scope:embezzler - modifier = siphoned_treasury_crime - } - } - } - } - } -} - -give_coup_plotter_secret_effect = { - if = { - limit = { - NOT = { - any_secret = { - type = secret_coup_plotter - secret_target = $TARGET$ - } - } - } - add_secret = { - type = secret_coup_plotter - target = $TARGET$ - } - random_secret = { - type = secret_coup_plotter - limit = { - secret_target = $TARGET$ - } - } - } -} - - -###SECRET DISCOVERY### - -reveal_to_without_events_effect = { - if = { - limit = { secret_type = secret_disputed_heritage } - $CHARACTER$ = { - add_character_flag = { - flag = block_secret_disputed_heritage_discovery_event - days = 20 - } - } - } - else_if = { - limit = { secret_type = secret_unmarried_illegitimate_child } - $CHARACTER$ = { - add_character_flag = { - flag = block_secret_unmarried_illegitimate_child_discovery_event - days = 20 - } - } - } - else_if = { - limit = { secret_type = secret_murder_attempt } - $CHARACTER$ = { - add_character_flag = { - flag = block_secret_murder_attempt_discovery_event - days = 20 - } - } - } - else_if = { - limit = { secret_type = secret_murder } - $CHARACTER$ = { - add_character_flag = { - flag = block_secret_murder_discovery_event - days = 20 - } - } - } - else_if = { - limit = { secret_type = secret_lover } - #Cannot block because the event is mechanical. - #You can reveal a lover secret and add a variable to it to get special texts. Check out the story_cycle_infidelty_confronter - } - reveal_to = $CHARACTER$ -} - -###SECRET EXPOSURE EFFECTS### - -#Support effect for secret_exposed_notification_effect -save_list_targets_for_secret_exposure_events_effect = { - every_spouse = { - limit = { - show_me_exposed_secret_event_trigger = { SECRET = $SECRET$ CHARACTER = $CHARACTER$ } - } - add_to_list = send_exposed_secret_event_list - } - every_close_family_member = { - limit = { - show_me_exposed_secret_event_trigger = { SECRET = $SECRET$ CHARACTER = $CHARACTER$ } - NOT = { - any_in_list = { #These checks should remain here and not be in the scripted triggers - list = send_exposed_secret_event_list - this = prev - } - } - } - add_to_list = send_exposed_secret_event_list - } - if = { - limit = { - is_playable_character = yes # Do not send this event about mere courtiers; they're not important enough. - exists = liege - } - liege = { - if = { - limit = { - show_me_exposed_secret_event_trigger = { SECRET = $SECRET$ CHARACTER = $CHARACTER$ } - #Don't inform liege when exposed_secret_character is murder victim - NAND = { - $SECRET$ = { - OR = { - secret_type = secret_murder - secret_type = secret_murder_attempt - } - } - scope:victim = { this = $CHARACTER$ } - } - NOT = { - any_in_list = { - list = send_exposed_secret_event_list - this = prev - } - } - } - add_to_list = send_exposed_secret_event_list - } - } - } - every_heir_title = { - limit = { exists = holder } - holder = { - if = { - limit = { - show_me_exposed_secret_event_trigger = { SECRET = $SECRET$ CHARACTER = $CHARACTER$ } - NOT = { - any_in_list = { - list = send_exposed_secret_event_list - this = prev - } - } - } - add_to_list = send_exposed_secret_event_list - } - } - } -} - -save_extra_lover_list_targets_for_secret_exposure_events_effect = { - scope:target = { - if = { - limit = { - any_secret = { - type = secret_lover - secret_target = scope:owner - } - } - save_temporary_scope_as = secret_character - #Save spouses, close family members, liege and anyone they are primary heir of - random_secret = { - type = secret_lover - limit = { - secret_target = scope:owner - } - save_scope_as = targets_secret - } - save_list_targets_for_secret_exposure_events_effect = { SECRET = scope:targets_secret CHARACTER = scope:secret_character } - } - } -} - -save_extra_bastard_list_targets_for_secret_exposure_events_effect = { - #Those who care about child - if = { - limit = { - exists = scope:child - scope:owner != scope:child #Child hasn't inherited the secret - } - scope:target = { - save_temporary_scope_as = secret_character - save_list_targets_for_secret_exposure_events_effect = { SECRET = scope:secret CHARACTER = scope:secret_character } - } - } - #Those who care about real father - if = { - limit = { - exists = scope:real_father - scope:owner != scope:real_father #Real_father hasn't inherited the secret - } - scope:real_father = { - save_temporary_scope_as = secret_character - save_list_targets_for_secret_exposure_events_effect = { SECRET = scope:secret CHARACTER = scope:secret_character } - } - } - #Those who care about mother - if = { - limit = { - exists = scope:mother - scope:owner != scope:mother #Mother doesn't have secret anymore (dead) - } - scope:mother = { - save_temporary_scope_as = secret_character - save_list_targets_for_secret_exposure_events_effect = { SECRET = scope:secret CHARACTER = scope:secret_character } - } - } - #Make sure father is in there - if = { - limit = { - exists = scope:father - scope:father = { show_me_exposed_secret_event_trigger = { SECRET = scope:secret CHARACTER = scope:secret_character } } - } - scope:father = { add_to_list = send_exposed_secret_event_list } - } -} - -#Support effect for secret_exposed_notification_effect -save_list_targets_for_secret_exposure_feed_messages_effect = { - $SECRET$ = { - every_secret_knower = { - limit = { - show_me_exposed_secret_feed_message_trigger = { SECRET = $SECRET$ CHARACTER = $CHARACTER$ } - NOR = { - any_in_list = { #These checks should remain here and not be in the scripted triggers - list = send_exposed_secret_event_list - this = prev - } - any_in_list = { - list = send_exposed_secret_feed_message_list - this = prev - } - } - } - add_to_list = send_exposed_secret_feed_message_list - } - } -} - -#Support effect for secret_exposed_notification_effect -save_additional_lover_secret_list_targets_for_feed_messages_effect = { - #If it's a sodomy lover relation, also tell people who know of my sodomy secret - if = { - limit = { relation_with_character_is_sodomy_in_my_or_lieges_faith_trigger = { CHARACTER = scope:other_lover } } - random_secret = { - type = secret_homosexual - every_secret_knower = { - limit = { - show_me_exposed_secret_feed_message_trigger = { SECRET = scope:secret CHARACTER = scope:owner } - NOR = { - any_in_list = { #These checks should remain here and not be in the scripted triggers - list = send_exposed_secret_event_list - this = prev - } - any_in_list = { - list = send_exposed_secret_feed_message_list - this = prev - } - } - } - add_to_list = send_exposed_secret_feed_message_list - } - } - } - #If it's a incest lover relation, also tell people who know of my incest secret - if = { - limit = { relation_with_character_is_incestuous_in_my_or_lieges_faith_trigger = { CHARACTER = scope:other_lover } } - random_secret = { - type = secret_incest - every_secret_knower = { - limit = { - show_me_exposed_secret_feed_message_trigger = { SECRET = scope:secret CHARACTER = scope:owner } - NOR = { - any_in_list = { #These checks should remain here and not be in the scripted triggers - list = send_exposed_secret_event_list - this = prev - } - any_in_list = { - list = send_exposed_secret_feed_message_list - this = prev - } - } - } - add_to_list = send_exposed_secret_feed_message_list - } - } - } -} - -#Used to notify everyone who cares about secret owner/target (and additional characters of interest) about secret + effects -secret_exposed_notification_effect = { - save_scope_as = secret - secret_owner = { - save_scope_as = owner - } - if = { - limit = { exists = secret_target } - secret_target = { save_scope_as = target } - } - - - #### Visible events for those who care and knower of landed people's secrets ### - - #Save spouses, close family members, liege and anyone whom I am primary heir of - scope:owner = { - save_list_targets_for_secret_exposure_events_effect = { SECRET = scope:secret CHARACTER = scope:owner } - } - - #If it's a lover secret, tell people who cares about the target as well - if = { - limit = { scope:secret = { secret_type = secret_lover } } - save_extra_lover_list_targets_for_secret_exposure_events_effect = yes - } - - #If it's a bastard secret, tell people who cares about child/real_father as well - else_if = { - limit = { - scope:secret = { - OR = { - secret_type = secret_disputed_heritage - secret_type = secret_unmarried_illegitimate_child - } - } - } - save_extra_bastard_list_targets_for_secret_exposure_events_effect = yes - } - - #If it's a murder/murder attempt secret, also inform those who care about victim - else_if = { - limit = { - scope:secret = { - OR = { - secret_type = secret_murder_attempt - secret_type = secret_murder - } - } - } - - scope:victim = { save_list_targets_for_secret_exposure_events_effect = { SECRET = scope:secret CHARACTER = scope:victim } } - } - - #If it's a secret faith, save the faith - else_if = { - limit = { - scope:secret = { secret_type = secret_crypto_religionist } - } - scope:owner.secret_faith = { save_scope_as = crypto_faith } - } - - #Send the notification event - every_in_list = { - list = send_exposed_secret_event_list - - if = { - limit = { - scope:secret = { secret_type = secret_incest } - } - trigger_event = secrets.0106 - } - else_if = { - limit = { - scope:secret = { secret_type = secret_witch } - } - trigger_event = secrets.0107 - } - else_if = { - limit = { - scope:secret = { - OR = { - secret_type = secret_embezzler - secret_type = secret_siphoned_treasury - } - } - } - trigger_event = secrets.0122 - } - else_if = { - limit = { - scope:secret = { secret_type = secret_cannibal } - } - trigger_event = secrets.0104 - } - else_if = { - limit = { - scope:secret = { secret_type = secret_non_believer } - } - trigger_event = secrets.0105 - } - else_if = { - limit = { - scope:secret = { secret_type = secret_homosexual } - } - trigger_event = secrets.0103 - } - else_if = { - limit = { - scope:secret = { secret_type = secret_lover } - } - trigger_event = secrets.0108 - } - else_if = { - limit = { - scope:secret = { secret_type = secret_deviant } - } - trigger_event = secrets.0101 - } - else_if = { - limit = { - scope:secret = { secret_type = secret_disputed_heritage } - } - trigger_event = secrets.0110 - } - else_if = { - limit = { - scope:secret = { secret_type = secret_unmarried_illegitimate_child } - } - trigger_event = secrets.0112 - } - else_if = { - limit = { - scope:secret = { secret_type = secret_murder_attempt } - } - trigger_event = secrets.0116 - } - else_if = { - limit = { - scope:secret = { secret_type = secret_murder } - } - if = { - limit = { - scope:secret = { has_variable = known_murder } - } - add_death_event_blocker_effect = { DEAD = scope:victim } - } - trigger_event = secrets.0118 - } - else = { - add_to_list = send_exposed_secret_feed_message_list - } - } - - ### Sending feed messages to other characters who care ### - scope:owner = { - #Save secret knowers and extended family members for feed messages - save_list_targets_for_secret_exposure_feed_messages_effect = { SECRET = scope:secret CHARACTER = scope:owner } - } - - #Extra stuff for lover secrets - if = { - limit = { scope:secret = { secret_type = secret_lover } } - secret_owner = { - #Also send feed messages who know about my sodomy/incest secret if relation is homosexual/incestuous - scope:target = { save_temporary_scope_as = other_lover } - save_additional_lover_secret_list_targets_for_feed_messages_effect = yes - } - - #Feed messages for my lover secret target - scope:target = { - if = { - limit = { - exists = scope:targets_secret - } - #Save secret knowers and extended family members for feed messages - save_list_targets_for_secret_exposure_feed_messages_effect = { SECRET = scope:targets_secret CHARACTER = scope:target } - } - - #Also send feed messages who know about target's sodomy/incest secret if relation is homosexual/incestuous - scope:target = { save_temporary_scope_as = other_lover } - save_additional_lover_secret_list_targets_for_feed_messages_effect = yes - } - } - - every_in_list = { - list = send_exposed_secret_feed_message_list - save_scope_as = secret_expose_feed_message_scope - - send_interface_message = { - type = secret_exposed_message - left_icon = scope:owner - right_icon = scope:target - title = secret_exposed_notification_effect_message - desc = { - first_valid = { - triggered_desc = { - trigger = { scope:secret = { secret_type = secret_incest } } - desc = secret_exposed_notification_effect_message_incest - } - triggered_desc = { - trigger = { scope:secret = { secret_type = secret_witch } } - desc = secret_exposed_notification_effect_message_witch - } - triggered_desc = { - trigger = { scope:secret = { secret_type = secret_cannibal } } - desc = secret_exposed_notification_effect_message_cannibal - } - triggered_desc = { - trigger = { scope:secret = { secret_type = secret_non_believer } } - desc = secret_exposed_notification_effect_message_non_believer - } - triggered_desc = { - trigger = { scope:secret = { secret_type = secret_homosexual } } - desc = secret_exposed_notification_effect_message_homosexual - } - triggered_desc = { - trigger = { #Incest lover - scope:secret = { secret_type = secret_lover } - scope:owner = { relation_with_character_is_incestuous_in_faith_trigger = { CHARACTER = scope:target FAITH = scope:secret_expose_feed_message_scope.faith } } - } - desc = secret_exposed_notification_effect_message_lover_incest - } - triggered_desc = { - trigger = { #Sodomy lover - scope:secret = { secret_type = secret_lover } - scope:owner = { relation_with_character_is_sodomy_in_faith_trigger = { CHARACTER = scope:target FAITH = scope:secret_expose_feed_message_scope.faith } } - } - desc = secret_exposed_notification_effect_message_lover_sodomy - } - triggered_desc = { - trigger = { scope:secret = { secret_type = secret_lover } } - desc = secret_exposed_notification_effect_message_lover - } - triggered_desc = { - trigger = { scope:secret = { secret_type = secret_deviant } } - desc = secret_exposed_notification_effect_message_deviant - } - triggered_desc = { #Illegitimate child - trigger = { - scope:secret = { - OR = { - secret_type = secret_disputed_heritage - secret_type = secret_unmarried_illegitimate_child - } - } - } - desc = secret_exposed_notification_effect_message_illegitimate_child - } - triggered_desc = { - trigger = { scope:secret = { secret_type = secret_murder_attempt } } - desc = secret_exposed_notification_effect_message_murder_attempt - } - triggered_desc = { - trigger = { - scope:secret = { secret_type = secret_murder } - scope:owner != scope:secret_exposer - } - desc = secret_exposed_notification_effect_message_murder - } - triggered_desc = { - trigger = { - scope:secret = { secret_type = secret_murder } - scope:owner = scope:secret_exposer - } - desc = secret_exposed_notification_effect_message_known_murder - } - triggered_desc = { - trigger = { - scope:secret = { secret_type = secret_crypto_religionist } - } - desc = secret_exposed_notification_effect_message_faith - } - } - } - - if = { - limit = { has_hook_from_secret = scope:secret } - if = { - limit = { - has_hook_of_type = { - target = scope:owner - type = weak_blackmail_hook - } - } - remove_hook = { - target = scope:owner - type = weak_blackmail_hook - } - } - else_if = { - limit = { - has_hook_of_type = { - target = scope:owner - type = strong_blackmail_hook - } - } - remove_hook = { - target = scope:owner - type = strong_blackmail_hook - } - } - } - } - } - - ### Send toast to exposer ### - if = { - limit = { - trigger_if = { - limit = { exists = scope:target } - NOR = { - scope:secret_exposer = scope:target - scope:secret_exposer = scope:owner - } - } - trigger_else = { - scope:secret_exposer != scope:owner - } - } - scope:secret_exposer = { - save_scope_as = secret_expose_feed_message_scope - send_interface_toast = { - left_icon = scope:owner - right_icon = scope:target - title = secret_exposed_notification_effect_message - - if = { - limit = { scope:secret = { secret_type = secret_incest } } - custom_tooltip = secret_exposed_notification_effect_message_incest.i_exposed - } - else_if = { - limit = { scope:secret = { secret_type = secret_witch } } - custom_tooltip = secret_exposed_notification_effect_message_witch.i_exposed - } - else_if = { - limit = { scope:secret = { secret_type = secret_cannibal } } - custom_tooltip = secret_exposed_notification_effect_message_cannibal.i_exposed - } - else_if = { - limit = { scope:secret = { secret_type = secret_non_believer } } - custom_tooltip = secret_exposed_notification_effect_message_non_believer.i_exposed - } - else_if = { - limit = { scope:secret = { secret_type = secret_homosexual } } - custom_tooltip = secret_exposed_notification_effect_message_homosexual.i_exposed - } - else_if = { - limit = { #Incest lover - scope:secret = { secret_type = secret_lover } - scope:owner = { relation_with_character_is_incestuous_in_faith_trigger = { CHARACTER = scope:target FAITH = scope:secret_expose_feed_message_scope.faith } } - } - custom_tooltip = secret_exposed_notification_effect_message_lover_incest.i_exposed - } - else_if = { - limit = { #Sodomy lover - scope:secret = { secret_type = secret_lover } - scope:owner = { relation_with_character_is_sodomy_in_faith_trigger = { CHARACTER = scope:target FAITH = scope:secret_expose_feed_message_scope.faith } } - } - custom_tooltip = secret_exposed_notification_effect_message_lover_sodomy.i_exposed - } - else_if = { - limit = { scope:secret = { secret_type = secret_lover } } - custom_tooltip = secret_exposed_notification_effect_message_lover.i_exposed - } - else_if = { - limit = { scope:secret = { secret_type = secret_deviant } } - custom_tooltip = secret_exposed_notification_effect_message_deviant.i_exposed - } - else_if = { - limit = { - scope:secret = { - OR = { - secret_type = secret_disputed_heritage - secret_type = secret_unmarried_illegitimate_child - } - } - } - custom_tooltip = secret_exposed_notification_effect_message_illegitimate_child.i_exposed - } - else_if = { - limit = { scope:secret = { secret_type = secret_murder_attempt } } - custom_tooltip = secret_exposed_notification_effect_message_murder_attempt.i_exposed - } - else_if = { - limit = { scope:secret = { secret_type = secret_murder } } - custom_tooltip = secret_exposed_notification_effect_message_murder.i_exposed - } - else_if = { - limit = { scope:secret = { secret_type = secret_crypto_religionist } } - custom_tooltip = secret_exposed_notification_effect_message_faith.i_exposed - } - - if = { - limit = { has_hook_from_secret = scope:secret } - remove_hook = { - target = scope:owner - type = weak_blackmail_hook - } - } - - if = { - limit = { - has_government = landless_adventurer_government - has_perk = court_of_shadows_perk - } - add_prestige = { - value = 100 - multiply = { - value = scope:owner.highest_held_title_tier - add = 1 - } - min = 50 - } - } - - stress_impact = { - honest = medium_stress_impact_loss - just = medium_stress_impact_loss - } - - scope:owner = { - stress_impact = { - honest = medium_stress_impact_loss - just = medium_stress_impact_loss - } - } - - # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { - CHARACTER = scope:secret_expose_feed_message_scope - TARGET = scope:owner - VALUE = major_unity_loss - DESC = clan_unity_secret_exposure.desc - REVERSE_NON_HOUSE_TARGET = no - } - } - } - } -} - -remove_piety_level_for_shunned_or_criminal_trait_effect = { - save_temporary_scope_as = piety_character - if = { - limit = { - OR = { - trait_is_shunned_in_faith_trigger = { TRAIT = $TRAIT$ FAITH = scope:piety_character.faith GENDER_CHARACTER = scope:piety_character } - trait_is_criminal_in_faith_trigger = { TRAIT = $TRAIT$ FAITH = scope:piety_character.faith GENDER_CHARACTER = scope:piety_character } - } - } - add_piety_level = -1 - - # LEGITIMACY LOSS FROM CRIME EXPOSURE - if = { - limit = { - is_valid_for_legitimacy_change = yes - NOT = { exists = scope:suppress_legitimacy_from_crime } - } - if = { - limit = { - trait_is_shunned_in_faith_trigger = { TRAIT = $TRAIT$ FAITH = scope:piety_character.faith GENDER_CHARACTER = scope:piety_character } - } - add_legitimacy = minor_legitimacy_loss - } - else = { add_legitimacy = medium_legitimacy_loss } - # Flag that we might not always want to apply future legitimacy losses down the line. - save_scope_value_as = { - name = suppress_legitimacy_from_crime - value = yes - } - } - } -} - -#Purpose: to make sure trait always appears in tooltip for other characters informed about you gaining trait -add_trait_only_force_tooltip_if_not_pov_effect = { - if = { - limit = { this = $POV$ } - add_trait = $TRAIT$ - } - else = { - add_trait_force_tooltip = $TRAIT$ - } -} - -remove_trait_only_force_tooltip_if_not_root_effect = { - if = { - limit = { this = root } - remove_trait = $TRAIT$ - } - else = { - remove_trait_force_tooltip = $TRAIT$ - } -} - -#applies traits etc. when a secret is revealed -#SECRET = secret in question, POV = point of view i.e. who get this event -secret_exposed_owner_effects_effect = { - - $SECRET$ = { - if = { - limit = { #Checks to make sure the right target gets saved. Confusion might arise from the secret's "on_expose" effect since it sends the same event (secrets.0008) for both target and owner. - exists = secret_target - exists = scope:target - scope:target = secret_owner - NOT = { secret_owner = $POV$ } #To not mess up tooltips (in e.g. secrets.0108) - } - secret_owner = { save_scope_as = exposed_secret_target } - } - else_if = { - limit = { - exists = secret_target - } - secret_target = { save_scope_as = exposed_secret_target } - } - - secret_owner = { save_scope_as = local_secret_owner } - } - - ###DEVIANT### - if = { - limit = { $SECRET$ = { secret_type = secret_deviant } } - add_trait_only_force_tooltip_if_not_pov_effect = { TRAIT = deviant POV = $POV$ } - remove_piety_level_for_shunned_or_criminal_trait_effect = { TRAIT = deviant } - } - ###SODOMITE### - else_if = { - limit = { - $SECRET$ = { secret_type = secret_homosexual } - relation_with_character_is_sodomy_in_my_or_lieges_faith_trigger = { CHARACTER = this } #To check your own gender - } - add_trait_only_force_tooltip_if_not_pov_effect = { TRAIT = sodomite POV = $POV$ } - remove_piety_level_for_shunned_or_criminal_trait_effect = { TRAIT = sodomite } - } - ###CANNIBAL### - else_if = { - limit = { $SECRET$ = { secret_type = secret_cannibal } } - add_trait_only_force_tooltip_if_not_pov_effect = { TRAIT = cannibal POV = $POV$ } - remove_piety_level_for_shunned_or_criminal_trait_effect = { TRAIT = cannibal } - } - ###NON-BELIEVER### - else_if = { - limit = { $SECRET$ = { secret_type = secret_non_believer } } - add_character_modifier = { - modifier = known_non_believer - days = 3650 - } - if = { - limit = { - OR = { - has_trait = zealous - has_character_flag = non_believer_lost_zealous - } - } - remove_trait_only_force_tooltip_if_not_root_effect = { TRAIT = zealous } - add_character_flag = { - flag = non_believer_lost_zealous - days = 5 - } - } - if = { - limit = { - OR = { - number_of_personality_traits < personality_trait_limit - has_character_flag = non_believer_gained_cynical - } - } - add_trait_only_force_tooltip_if_not_pov_effect = { TRAIT = cynical POV = $POV$ } - add_character_flag = { - flag = non_believer_gained_cynical - days = 5 - } - } - add_piety_level = -1 - } - ###EMBEZZLER### - else_if = { - limit = { - $SECRET$ = { secret_type = secret_embezzler } - scope:secret_target = { is_alive = yes } - } - scope:secret_target = { - # Apply appropriate criminal opinion. - add_opinion = { - target = scope:secret_owner - modifier = embezzled_opinion - } - } - } - else_if = { - limit = { - $SECRET$ = { secret_type = secret_siphoned_treasury } - scope:secret_target = { is_alive = yes } - } - scope:secret_target = { - add_opinion = { - target = scope:owner - modifier = siphoned_treasury_crime - } - } - } - ###INCEST### - else_if = { - limit = { $SECRET$ = { secret_type = secret_incest } } - add_trait_only_force_tooltip_if_not_pov_effect = { TRAIT = incestuous POV = $POV$ } - remove_piety_level_for_shunned_or_criminal_trait_effect = { TRAIT = incestuous } - } - ###WITCH### - else_if = { - limit = { $SECRET$ = { secret_type = secret_witch } } - add_trait_only_force_tooltip_if_not_pov_effect = { TRAIT = witch POV = $POV$ } - remove_piety_level_for_shunned_or_criminal_trait_effect = { TRAIT = witch } - } - ###LOVER### - else_if = { - limit = { - $SECRET$ = { secret_type = secret_lover } - NOT = { - scope:exposed_secret_target = { - government_has_flag = government_is_mandala - house ?= { has_house_power_parameter = aspect_of_creation } - } - } - } - - #Adds traits (adulterer, fornicator, sodomite, incestuous), removes devotion, sets opinions & rivalry - extramarital_sex_exposure_consequences_with_target_effect = { TARGET = scope:exposed_secret_target SPOUSE_EVENT = no } - } - ###DISPUTED HERITAGE### - else_if = { - limit = { - $SECRET$ = { - secret_type = secret_disputed_heritage - } - } - - # Child gains the Disputed Heritage trait - scope:child = { add_trait = disputed_heritage } - - # Biological parents, if alive, suffer penalties from adultery. - if = { - limit = { scope:mother = { is_alive = yes } } - scope:mother = { - # Comprehensive effect which adds adulter/fornicator/incestuous traits, unfaithfulness & slept with wife opinions, and characters losing the appropriate number of piety level(s). - expose_lover_secret_or_run_consequence_effect = { - TARGET = scope:real_father - EXPOSER = $POV$ - } - } - } - else_if = { limit = { scope:real_father = { is_alive = yes } } - # If the mother is dead, run this on the real_father instead (so it gets run somewhere). If the mother is alive, the real_father will have already suffered the penalties. - scope:real_father = { - expose_lover_secret_or_run_consequence_effect = { - TARGET = scope:mother - EXPOSER = $POV$ - } - } - } - - # Additional father opinion modifiers - hidden_effect = { - # Real father gains opinion of child - if = { - limit = { - scope:real_father = { is_alive = yes } - } - scope:real_father = { - add_opinion = { - target = scope:child - modifier = truly_of_my_blood_opinion - } - } - } - - #Non-real father loses opinion of child - if = { - limit = { - exists = scope:father - scope:father = { - is_alive = yes - } - } - scope:father = { - add_opinion = { - target = scope:child - modifier = uncertain_lineage_opinion - } - } - } - } - } - ###UNKNOWN FATHER### - else_if = { - limit = { - $SECRET$ = { - secret_type = secret_unmarried_illegitimate_child - } - } - # Set the correct Father for the child - scope:child = { - set_father = scope:real_father - set_parent_house_effect = yes - remove_inherited_descendent_traits_effect = yes - } - - #Father becomes adulterer/fornicator (mother already suffered these penalties when she was discovered pregnant out of wedlock) - scope:real_father = { - if = { - limit = { is_alive = yes } - - #Adds adulter/fornicator/incestuous traits, unfaithfulness & slept with wife opinions, removes piety levels - expose_lover_secret_or_run_consequence_effect = { - TARGET = scope:mother - EXPOSER = $POV$ - } - } - } - } - - ###ATTEMPTED MURDERER### - else_if = { - limit = { $SECRET$ = { secret_type = secret_murder_attempt } } - - #Hide this for everyone else - if = { - limit = { root = scope:murderer } - add_dread = 10 - hostile_scheme_exposure_legitimacy_effect = yes - attempted_murder_opinion_effect = { VICTIM = scope:victim MURDERER = scope:murderer } - } - } - ###MURDERER### - else_if = { - limit = { $SECRET$ = { secret_type = secret_murder } } - - #Traits, (crime) opinions, dread - murder_consequences_known_or_exposed_effect = { - MURDERER = scope:murderer - VICTIM = scope:victim - POV = $POV$ - } - } - else_if = { - limit = { - $SECRET$ = { secret_type = secret_coup_plotter } - scope:secret_target = { is_alive = yes } - } - - scope:secret_target = { - # Apply appropriate criminal opinion. - add_opinion = { - target = scope:secret_owner - modifier = coup_plotter_opinion - } - } - } - - - ## Struggle Catalysts - if = { - limit = { - scope:local_secret_owner = { - is_semi_important_ruler_struggle_character = yes - any_character_struggle = { - involvement = involved - phase_has_catalyst = catalyst_reveal_secret_important - } - } - } - scope:local_secret_owner = { - every_character_struggle = { - involvement = involved - activate_struggle_catalyst = { - catalyst = catalyst_reveal_secret_important - character = scope:local_secret_owner - } - } - } - } - if = { - limit = { - scope:local_secret_owner = { - has_trait = fp3_struggle_supporter - any_character_struggle = { - involvement = involved - phase_has_catalyst = catalyst_reveal_secret_supporter - } - } - } - scope:local_secret_owner = { - every_character_struggle = { - involvement = involved - activate_struggle_catalyst = { - catalyst = catalyst_reveal_secret_supporter - character = scope:local_secret_owner - } - log_debug_variable_for_persian_struggle_effect = { VAR = unrest_catalyst_reveal_secret_supporter } - } - } - } - if = { - limit = { - scope:local_secret_owner = { - has_trait = fp3_struggle_detractor - any_character_struggle = { - involvement = involved - phase_has_catalyst = catalyst_reveal_secret_detractor - } - } - } - scope:local_secret_owner = { - every_character_struggle = { - involvement = involved - activate_struggle_catalyst = { - catalyst = catalyst_reveal_secret_detractor - character = scope:local_secret_owner - } - log_debug_variable_for_persian_struggle_effect = { VAR = stabil_catalyst_reveal_secret_detractor } - } - } - } -} - -secret_exposed_owner_opinion_effects_effect = { - if = { - limit = { - exists = scope:secret_exposer - this != scope:secret_exposer - scope:secret_exposer = { is_alive = yes } - } - add_opinion = { - target = scope:secret_exposer - modifier = exposed_my_secret_opinion - } - } -} - -secret_exposed_notification_effects_effect = { - save_temporary_scope_as = notification_receiver - if = { - limit = { has_hook_from_secret = $SECRET$ } - remove_hook = { - target = $CHARACTER$ - } - } - show_as_tooltip = { - $CHARACTER$ = { #Shows traits etc. applied to owner (and other involved characters) - secret_exposed_owner_effects_effect = { SECRET = $SECRET$ POV = scope:notification_receiver } - secret_exposed_owner_opinion_effects_effect = yes - } - } -} - - - - - - - - - - -########################################### -# LOVER SECRETS: INFIDELITY CONFRONTATION # -########################################### - -# Support effect for building lists in "start_infidelity_confrontation_story_exposure_effect" -infidelity_confrontation_story_add_to_list_effect = { - save_temporary_scope_as = checked_confronting_partner - if = { - limit = { - NOR = { - this = $LOVER_1$ - this = $LOVER_2$ - scope:infidelity_story = { - is_target_in_variable_list = { - name = confronting_partners - target = scope:checked_confronting_partner - } - } - } - #Exempt polyamorous spouses. - accepts_adultery_without_penalty_trigger = no - } - scope:infidelity_story = { - add_to_variable_list = { - name = confronting_partners - target = scope:checked_confronting_partner - } - } - } -} - -# Support for "start_infidelity_confrontation_story_exposure/discovery_effect" effects to creating the story -infidelity_confrontation_story_creation_effect = { - $LOVER_1$ = { - create_story = { - type = story_cycle_infidelty_confronter - save_scope_as = infidelity_story - } - scope:infidelity_story = { - set_variable = { - name = lover_1 - value = $LOVER_1$ - } - set_variable = { - name = lover_2 - value = $LOVER_2$ - } - add_to_variable_list = { - name = infidelity_lovers - target = $LOVER_1$ - } - add_to_variable_list = { - name = infidelity_lovers - target = $LOVER_2$ - } - } - } -} - -# Creates a story about confrontations/choices after discovered infidelity (lover secret discovery) -start_infidelity_confrontation_story_discovery_effect = { - if = { - limit = { - NOR = { - $DISCOVERER$ = $LOVER_2$ - $DISCOVERER$ = $LOVER_1$ - } - $DISCOVERER$ = { - OR = { - has_relation_lover = $LOVER_1$ - is_spouse_of = $LOVER_1$ - has_relation_lover = $LOVER_2$ - is_spouse_of = $LOVER_2$ - } - } - NOR = { - $LOVER_1$ = { - any_owned_story = { - type = story_cycle_infidelty_confronter - var:lover_2 = $LOVER_2$ #var:lover_2 is the secret target i.e. the other person - } - } - $LOVER_2$ = { - any_owned_story = { - type = story_cycle_infidelty_confronter - var:lover_2 = $LOVER_1$ #var:lover_2 is the secret target i.e. the other person - } - } - } - #Exempt marriages to polyamorous spouses. - NOR = { - $LOVER_1$ = { - OR = { - any_spouse = { - count = all - accepts_adultery_without_penalty_trigger = yes - } - has_character_flag = block_infidelity_flag - } - } - $LOVER_2$ = { - OR = { - any_spouse = { - count = all - accepts_adultery_without_penalty_trigger = yes - } - has_character_flag = block_infidelity_flag - } - } - } - } - infidelity_confrontation_story_creation_effect = { LOVER_1 = $LOVER_1$ LOVER_2 = $LOVER_2$ } - scope:infidelity_story = { - add_to_variable_list = { - name = confronting_partners - target = $DISCOVERER$ - } - } - #Certain changes to desc in event if the secret was revealed through investigation - if = { - limit = { $DISCOVERER$ = { is_ai = no } } #Text changes are only relevant to players - - #Save the secrets so we can check them - $LOVER_1$ = { - random_secret = { - type = secret_lover - limit = { - secret_target = $LOVER_2$ - } - add_to_temporary_list = secrets_for_desc - } - } - $LOVER_2$ = { - random_secret = { - type = secret_lover - limit = { - secret_target = $LOVER_1$ - } - add_to_temporary_list = secrets_for_desc - } - } - - #infidelity_confrontation_1000_investigation_desc - if = { - limit = { - any_in_list = { - list = secrets_for_desc - exists = var:revealed_through_investigation_by_desc - var:revealed_through_investigation_by_desc = $DISCOVERER$ - } - } - scope:infidelity_story = { - set_variable = { - name = infidelity_confrontation_1000_investigation_desc - value = yes - } - } - } - - #revealed_through_confession_to_desc - if = { - limit = { - any_in_list = { - list = secrets_for_desc - exists = var:revealed_through_confession_to_desc - var:revealed_through_confession_to_desc = $DISCOVERER$ - } - } - scope:infidelity_story = { - set_variable = { - name = infidelity_confrontation_1000_confession_desc - value = yes - } - } - } - } - } -} - -# Creates a story about confrontations/choices after discovered infidelity (lover secret exposure) -start_infidelity_confrontation_story_exposure_effect = { - if = { - limit = { - NOR = { - $EXPOSER$ = $LOVER_2$ - $EXPOSER$ = $LOVER_1$ - } - OR = { - $LOVER_1$ = { - OR = { - any_spouse = { NOT = { this = $LOVER_2$ } } - any_relation = { - type = lover - NOT = { this = $LOVER_2$ } - } - } - } - $LOVER_2$ = { - OR = { - any_spouse = { NOT = { this = $LOVER_1$ } } - any_relation = { - type = lover - NOT = { this = $LOVER_1$ } - } - } - } - } - } - #Set up story - infidelity_confrontation_story_creation_effect = { LOVER_1 = $LOVER_1$ LOVER_2 = $LOVER_2$ } - scope:infidelity_story = { - set_variable = { - name = exposer - value = $EXPOSER$ - } - } - - #Add all confronting partners - $LOVER_1$ = { - every_spouse = { - infidelity_confrontation_story_add_to_list_effect = { LOVER_1 = $LOVER_1$ LOVER_2 = $LOVER_2$ } - } - every_relation = { - type = lover - infidelity_confrontation_story_add_to_list_effect = { LOVER_1 = $LOVER_1$ LOVER_2 = $LOVER_2$ } - } - } - $LOVER_2$ = { - every_spouse = { - infidelity_confrontation_story_add_to_list_effect = { LOVER_1 = $LOVER_1$ LOVER_2 = $LOVER_2$ } - } - every_relation = { - type = lover - infidelity_confrontation_story_add_to_list_effect = { LOVER_1 = $LOVER_1$ LOVER_2 = $LOVER_2$ } - } - } - - #Save a list of the confronting partners who already knew - scope:infidelity_story = { - every_in_list = { - variable = confronting_partners - limit = { - save_temporary_scope_as = confronting_partner_knowledge_check - OR = { - $LOVER_1$ = { - any_secret = { - type = secret_lover - secret_target = $LOVER_2$ - any_secret_knower = { this = scope:confronting_partner_knowledge_check } - } - } - $LOVER_2$ = { - any_secret = { - type = secret_lover - secret_target = $LOVER_1$ - any_secret_knower = { this = scope:confronting_partner_knowledge_check } - } - } - } - } - save_temporary_scope_as = knowing_confronting_partner - scope:infidelity_story = { - add_to_variable_list = { - name = knowing_confronting_partners - target = scope:knowing_confronting_partner - } - } - } - } - } -} - - - - -################# -# MISC -############## - - -# Used to give people a random secret (small chance of multiples) -give_random_secret_effect = { - random_list = { - 20 = { - modifier = { - factor = 0 - OR = { - has_trait = deviant - any_secret = { - type = secret_deviant - } - } - } - give_deviant_secret_or_trait_effect = yes - } - 20 = { - modifier = { - factor = 0 - OR = { - has_sexuality = homosexual - any_secret = { - type = secret_homosexual - } - } - } - give_homosexual_secret_or_nothing_effect = yes - } - 10 = { - modifier = { - factor = 0 - OR = { - has_trait = deviant - any_secret = { - type = secret_deviant - } - has_sexuality = homosexual - any_secret = { - type = secret_homosexual - } - } - } - add_secret = { - type = secret_deviant - } - give_homosexual_secret_or_nothing_effect = yes - } - 5 = { # Get ALL the secrets! - if = { - limit = { - NOR = { - has_sexuality = homosexual - any_secret = { - type = secret_homosexual - } - } - } - give_homosexual_secret_or_nothing_effect = yes - } - if = { - limit = { - NOR = { - has_trait = deviant - any_secret = { - type = secret_deviant - } - } - } - give_deviant_secret_or_trait_effect = yes - } - } - } -} - - -give_random_likely_secret_effect = { - save_temporary_scope_as = secret_getter - random_list = { - 100 = { #DEVIANT - trigger = { - is_adult = yes - secret_deviant_is_valid_trigger = { OWNER = this } - NOR = { - has_trait = chaste - has_trait = celibate - } - NOT = { any_secret = { type = secret_deviant } } - trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { TRAIT = deviant GENDER_CHARACTER = scope:secret_getter } - - } - modifier = { - has_trait = lustful - add = 200 - } - ai_value_modifier = { - ai_boldness = tiny_chance_impact_positive_ai_value #+50 for high positive boldness - ai_honor = tiny_chance_impact_negative_ai_value #+50 for high negative honor - ai_zeal = medium_chance_impact_negative_ai_value #-200 for high positive zeal - } - give_deviant_secret_or_trait_effect = yes - } - 200 = { #HOMOSEXUAL - trigger = { - is_adult = yes - trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { TRAIT = sodomite GENDER_CHARACTER = scope:secret_getter } - OR = { - has_sexuality = homosexual - has_sexuality = bisexual - } - NOT = { any_secret = { type = secret_homosexual } } - } - modifier = { - any_relation = { type = lover sex_opposite_of = prev } - factor = 0.1 - } - give_homosexual_secret_or_nothing_effect = yes - } - 150 = { #MURDER ATTEMPT - trigger = { - is_adult = yes - save_temporary_scope_as = murderer - OR = { - any_relation = { - type = rival - give_random_likely_secret_murder_attempt_victim_trigger = yes - } - any_close_or_extended_family_member = { - reverse_opinion = { - target = prev - value <= -10 - } - give_random_likely_secret_murder_attempt_victim_trigger = yes - } - } - } - ai_value_modifier = { - ai_boldness = tiny_chance_impact_positive_ai_value #+50 for high positive boldness - ai_greed = tiny_chance_impact_positive_ai_value #+50 for high positive greed - ai_compassion = low_chance_impact_negative_ai_value #-100 for high positive compassion - } - - save_temporary_scope_as = murderer - - every_relation = { - type = rival - limit = { - give_random_likely_secret_murder_attempt_victim_trigger = yes - } - add_to_list = victim_options - } - every_close_or_extended_family_member = { - limit = { - reverse_opinion = { - target = prev - value <= -10 - } - give_random_likely_secret_murder_attempt_victim_trigger = yes - } - add_to_list = victim_options - } - - random_in_list = { - list = victim_options - save_temporary_scope_as = victim - } - - add_secret = { - type = secret_murder_attempt - target = scope:victim - } - } - 100 = { #CANNIBAL - trigger = { - secret_cannibal_is_valid_trigger = { OWNER = this } - NOT = { any_secret = { type = secret_cannibal } } - trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { TRAIT = cannibal GENDER_CHARACTER = scope:secret_getter } - } - ai_value_modifier = { - ai_boldness = tiny_chance_impact_positive_ai_value #+50 for high positive boldness - ai_greed = tiny_chance_impact_positive_ai_value #+50 for high positive greed - ai_zeal = low_chance_impact_negative_ai_value #-100 for high positive zeal - ai_compassion = medium_chance_impact_negative_ai_value #-200 for high positive compassion - } - modifier = { - is_adult = no - add = -80 - } - - give_cannibal_secret_or_trait_effect = yes - } - 200 = { #HERETIC - trigger = { - NOT = { any_secret = { type = secret_non_believer } } - } - modifier = { - add = { - value = ai_zeal - multiply = -2 - } - } - - give_non_believer_secret_effect = yes - } - 400 = { #LOVER - trigger = { - is_adult = yes - NOT = { has_trait = celibate } - save_temporary_scope_as = lover_1 - OR = { - any_courtier_or_guest = { - give_random_likely_secret_lover_trigger = yes - } - any_vassal = { - any_courtier_or_guest = { - give_random_likely_secret_lover_trigger = yes - } - } - } - } - modifier = { - OR = { - has_trait = lustful - has_trait = seducer - } - add = 400 - } - modifier = { - has_trait = chaste - add = -300 - } - ai_value_modifier = { - ai_compassion = medium_chance_impact_positive_ai_value #+200 for high positive compassion - } - - save_temporary_scope_as = lover_1 - random_courtier_or_guest = { - limit = { give_random_likely_secret_lover_trigger = yes } - weight = { - base = 1 - modifier = { - has_trait = lustful - factor = 3 - } - } - save_temporary_scope_as = lover - } - if = { - limit = { NOT = { exists = scope:lover } } - random_vassal = { - limit = { any_courtier_or_guest = { give_random_likely_secret_lover_trigger = yes } } - random_courtier_or_guest = { - limit = { give_random_likely_secret_lover_trigger = yes } - weight = { - base = 1 - modifier = { - has_trait = lustful - factor = 3 - } - } - save_temporary_scope_as = lover - } - } - } - - set_random_lover_reason = { TARGET = scope:lover } - } - 100 = { #INCESTOUS LOVER - trigger = { - is_adult = yes - NOT = { has_trait = celibate } - save_temporary_scope_as = lover_2 - any_close_family_member = { - give_random_likely_secret_incestous_lover_trigger = yes - } - } - modifier = { - has_trait = deviant - add = 100 - } - - random_close_family_member = { - limit = { give_random_likely_secret_incestous_lover_trigger = yes } - set_random_lover_reason = { TARGET = prev } - } - } - 100 = { #WITCH - trigger = { - NOT = { any_secret = { type = secret_witch } } - trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { TRAIT = witch GENDER_CHARACTER = scope:secret_getter } - } - ai_value_modifier = { - ai_greed = tiny_chance_impact_positive_ai_value #+50 for high positive greed - ai_zeal = medium_chance_impact_negative_ai_value #+200 for high negative zeal - ai_compassion = tiny_chance_impact_negative_ai_value #+50 for high negative compassion - } - modifier = { - has_trait = lifestyle_mystic - add = 100 - } - modifier = { - has_trait = lifestyle_physician - add = 40 - } - - add_secret = { - type = secret_witch - } - } - } -} - - - -#Give secret and save as scope:secret -give_secret_and_save_as_secret_effect = { - save_temporary_scope_value_as = { - name = give_secret_type - value = flag:$SECRET_TYPE$ - } - - if = { - limit = { - OR = { - scope:give_secret_type = flag:secret_deviant - scope:give_secret_type = flag:secret_cannibal - scope:give_secret_type = flag:secret_non_believer - scope:give_secret_type = flag:secret_witch - } - } - add_secret = { - type = $SECRET_TYPE$ - } - } - else_if = { - limit = { - scope:give_secret_type = flag:secret_incest - } - give_incest_secret_or_nothing_effect = yes - } - else_if = { - limit = { - scope:give_secret_type = flag:secret_homosexual - is_male = yes - } - give_homosexual_secret_or_nothing_effect = yes - } - - random_secret = { - limit = { - secret_type = $SECRET_TYPE$ - } - save_scope_as = secret - } -} - -save_my_known_father_effect = { - if = { - limit = { - exists = this.father - NOT = { - any_known_secret = { - secret_target = prev - OR = { - secret_type = secret_disputed_heritage - secret_type = secret_unmarried_illegitimate_child - } - } - } - } - scope:father = { save_scope_as = known_father } - } - else_if = { - limit = { - exists = this.real_father - any_known_secret = { - secret_target = prev - OR = { - secret_type = secret_disputed_heritage - secret_type = secret_unmarried_illegitimate_child - } - } - } - scope:real_father = { save_scope_as = known_father } - } -} - - -add_random_blackmailable_secret_effect = { - save_scope_as = target - - random_list = { - 3 = { #Secret Deviant - trigger = { - secret_type_is_blackmailable_simple_trigger = { - TYPE = secret_deviant - TARGET = scope:target - BLACKMAILER = $BLACKMAILER$ - } - } - add_secret = { - type = secret_deviant - } - random_secret = { - type = secret_deviant - save_scope_as = new_secret - } - } - 5 = { #Secret Homosexual - trigger = { - secret_type_is_blackmailable_simple_trigger = { - TYPE = secret_homosexual - TARGET = scope:target - BLACKMAILER = $BLACKMAILER$ - } - } - add_secret = { - type = secret_homosexual - } - random_secret = { - type = secret_homosexual - save_scope_as = new_secret - } - } - 1 = { #Secret Cannibal - trigger = { - secret_type_is_blackmailable_simple_trigger = { - TYPE = secret_cannibal - TARGET = scope:target - BLACKMAILER = $BLACKMAILER$ - } - } - add_secret = { - type = secret_cannibal - } - random_secret = { - type = secret_cannibal - save_scope_as = new_secret - } - } - 2 = { #Secret Non-believer - trigger = { - secret_type_is_blackmailable_simple_trigger = { - TYPE = secret_non_believer - TARGET = scope:target - BLACKMAILER = $BLACKMAILER$ - } - } - add_secret = { - type = secret_non_believer - } - random_secret = { - type = secret_non_believer - save_scope_as = new_secret - } - } - 1 = { #Secret Incest - trigger = { - secret_type_is_blackmailable_simple_trigger = { - TYPE = secret_incest - TARGET = scope:target - BLACKMAILER = $BLACKMAILER$ - } - } - add_secret = { - type = secret_incest - } - random_secret = { - type = secret_incest - save_scope_as = new_secret - } - } - 2 = { #Secret Witch - trigger = { - secret_type_is_blackmailable_simple_trigger = { - TYPE = secret_witch - TARGET = scope:target - BLACKMAILER = $BLACKMAILER$ - } - } - add_secret = { - type = secret_witch - } - random_secret = { - type = secret_witch - save_scope_as = new_secret - } - } - } - - assert_if = { - limit = { - NOT = { exists = scope:new_secret } - } - text = "No secret added by add_random_blackmailable_secret_effect - Always check the target with random_blackmailable_secret_can_be_added_simple_trigger first!" - } -} diff --git a/N3OW/common/scripted_effects/00_setup_tests_effect.txt b/N3OW/common/scripted_effects/00_setup_tests_effect.txt deleted file mode 100644 index 3119d7ad..00000000 --- a/N3OW/common/scripted_effects/00_setup_tests_effect.txt +++ /dev/null @@ -1,55 +0,0 @@ -# Tests in this effect will only run if the game is in debug mode - -run_setup_tests_effect = { - every_living_character = { - if = { - limit = { - is_married = yes - is_adult = no - } - error_log = "[THIS.Char.GetLogName] is married but not an adult!" - } - } - every_ruler = { - if = { - limit = { - has_government = herder_government - holds_landed_title = yes - liege = { - this != prev - has_government = nomad_government - } - } - error_log = "[THIS.Char.GetLogName] is a landed herder marked as a vassal of a nomadic ruler!" - } - if = { - limit = { suzerain != this } - if = { - limit = { - NOR = { - has_government = nomad_government - has_government = herder_government - } - OR = { - has_subject_contract_group = tributary_nomadic - has_subject_contract_group = tributary_steppe - } - } - error_log = "[THIS.Char.GetLogName] is not a herder or nomad tributary but has a nomadic or steppe subject contract!" - } - else_if = { - limit = { - OR = { - has_government = nomad_government - has_government = herder_government - } - NOR = { - has_subject_contract_group = tributary_nomadic - has_subject_contract_group = tributary_steppe - } - } - error_log = "[THIS.Char.GetLogName] is a herder or nomad tributary with a non-nomadic/steppe subject contract!" - } - } - } -} diff --git a/N3OW/common/scripted_effects/00_sibling_effects.txt b/N3OW/common/scripted_effects/00_sibling_effects.txt deleted file mode 100644 index 23bb9f15..00000000 --- a/N3OW/common/scripted_effects/00_sibling_effects.txt +++ /dev/null @@ -1,112 +0,0 @@ - -###EFFECT LIST - -#save_friendly_unlanded_sibling_as_et_effect - -#Effects for increasing and decreasing sibling variable trackers: -#increase_helped_landed_sibling_value_effect -#decrease_helped_landed_sibling_value_effect -#increase_sibling_causing_trouble_value_effect -#decrease_sibling_causing_trouble_value_effect - - -save_friendly_unlanded_sibling_as_et_effect = { - random_sibling = { - limit = { - is_playable_character = no - is_adult = yes - opinion = { - target = root - value > 30 - } - } - save_scope_as = sibling - } -} - - - - -increase_helped_landed_sibling_value_effect = { - custom_tooltip = accepted_sibling_help_tt - hidden_effect = { - if = { - limit = { - root = { is_ai = no } - has_variable = helped_landed_sibling - } - change_variable = { - name = helped_landed_sibling - add = 1 - } - } - else = { - set_variable = { - name = helped_landed_sibling - value = 1 - } - } - } -} - - -decrease_helped_landed_sibling_value_effect = { - hidden_effect = { - if = { - limit = { - root = { is_ai = no } - has_variable = helped_landed_sibling - var:helped_landed_sibling > 1 - } - change_variable = { - name = helped_landed_sibling - add = -1 - } - } - else = { - remove_variable = helped_landed_sibling - } - } -} - - -increase_sibling_causing_trouble_value_effect = { - hidden_effect = { - if = { - limit = { - root = { is_ai = no } - has_variable = sibling_causing_trouble - } - change_variable = { - name = sibling_causing_trouble - add = 1 - } - } - else = { - set_variable = { - name = sibling_causing_trouble - value = 1 - } - } - } -} - - -decrease_sibling_causing_trouble_value_effect = { - hidden_effect = { - if = { - limit = { - root = { is_ai = no } - has_variable = sibling_causing_trouble - var:sibling_causing_trouble > 1 - } - change_variable = { - name = sibling_causing_trouble - add = -1 - } - } - else = { - remove_variable = sibling_causing_trouble - } - } -} \ No newline at end of file diff --git a/N3OW/common/scripted_effects/00_single_combat_effects.txt b/N3OW/common/scripted_effects/00_single_combat_effects.txt deleted file mode 100644 index 65933db6..00000000 --- a/N3OW/common/scripted_effects/00_single_combat_effects.txt +++ /dev/null @@ -1,502 +0,0 @@ - -################################################## -# Effects related to the Single Combat Engine -################################################## - -################################################## -# SETUP & CLEANUP EFFECTS - -configure_start_single_combat_effect = { - # DOCUMENTATION - ## scope:sc_initiator - ### Who started the combat? This is who the output/invalidation events will fire for. - ## scope:sc_attacker - ### The attacking party. - ## scope:sc_defender - ### The defending party. - ## scope:fatality = flag:default/possible/no/always - ### default: always if tribal, no otherwise. - ### possible: losing can be fatal, but isn't necessarily. - ### no: losing is never fatal. - ### always: losing always fatal. - ### practice: no death, no wounds. - ## scope:fixed = flag:no/flag:sc_attacker/scope:sc_defender - ### No: the match uses normal rules. - ### scope:sc_attacker: the attacker will always win. - ### scope:challenged: the defender will always win. - ## scope:locale = flag:XYZ - ### These just trigger the event background of the same name. New ones can be added as needed, but should be added across all three events (round, victory, loss/single_combat.0001, single_combat.0031, single_combat.0041), as we can't add a scripted list. - ### terrain_scope - ### battlefield - ### alley_night - ### alley_day - ### temple - ### corridor_night - ### corridor_day - ### courtyard - ### dungeon - ### docks - ### feast - ### market - ### tavern - ### throne_room - ### army_camp - ## output event ID - ### Which event fires after the combat's completion? - - # Sort parties. - $SC_INITIATOR$ = { save_scope_as = sc_initiator } - $SC_ATTACKER$ = { save_scope_as = sc_attacker } - $SC_DEFENDER$ = { save_scope_as = sc_defender } - # Arrange aftermath. - ## We're doing this early so we can invalidate well in a sec. - if = { - limit = { exists = scope:sc_finished } - clear_saved_scope = sc_finished - } - save_scope_value_as = { - name = follow_up_event - value = event_id:$OUTPUT_EVENT$ - } - save_scope_value_as = { - name = invalidation_event - value = event_id:$INVALIDATION_EVENT$ - } - # Invalidation check: have we managed to set scope:sc_attacker and scope:sc_defender to the same person? - ## If so, invalidate the duel, because this will cause crashes on Mac due to the duel's logic then looping in on itself later. - ### Shocking to hear Mac has problems, I know. - if = { - limit = { - scope:sc_attacker != scope:sc_defender - } - # Make sure they're clean for setup. - hidden_effect = { remove_single_combat_info_effect = yes } - # Set them both to busy for the single combat. - scope:sc_attacker = { - set_variable = { - name = engaged_in_single_combat - value = yes - } - } - scope:sc_defender = { - set_variable = { - name = engaged_in_single_combat - value = yes - } - } - ## Then try to take shirts off. - single_combat_apply_default_shirtlessness_effect = { - ATTACKER = scope:sc_attacker - DEFENDER = scope:sc_defender - } - # Set rules. - save_scope_value_as = { - name = fatality - value = flag:$FATALITY$ - } - save_scope_value_as = { - name = fixed - value = flag:$FIXED$ - } - save_scope_value_as = { - name = locale - value = flag:$LOCALE$ - } - ## Note where the fight is taking place, if we're using a specific location. - if = { - limit = { scope:locale = flag:terrain_scope } - scope:sc_defender.location = { save_scope_as = background_terrain_scope } - } - # Configure starting bonus/threshold variables. - scope:sc_attacker = { - set_variable = { - name = sc_attacker_injury_bonus - value = starting_injury_bonus - } - } - scope:sc_defender = { - set_variable = { - name = sc_defender_injury_bonus - value = starting_injury_bonus - } - set_variable = { - name = success_threshold - value = starting_success_threshold - } - } - # Configure starting round variables. - scope:sc_attacker = { - set_variable = { - name = sc_attacker_injury_risk_score - value = 0 - } - set_variable = { - name = sc_attacker_duel_success_score - value = 0 - } - # Including local variables for combat buffs & debuffs. - set_local_variable = { - name = current_duel_edge_buff - value = 0 - } - set_local_variable = { - name = current_duel_edge_debuff - value = 0 - } - # If the character lacks a preferred weapon, pick one. - set_signature_weapon_effect = yes - } - scope:sc_defender = { - set_variable = { - name = sc_defender_injury_risk_score - value = 0 - } - set_variable = { - name = sc_defender_duel_success_score - value = 0 - } - # Including local variables for combat buffs & debuffs. - set_local_variable = { - name = current_duel_edge_buff - value = 0 - } - set_local_variable = { - name = current_duel_edge_debuff - value = 0 - } - # Set up the combat rounds. - set_variable = { - name = current_round - value = 1 - } - # If the character lacks a preferred weapon, pick one. - set_signature_weapon_effect = yes - } - # Finally, send the first event. - scope:sc_defender = { trigger_event = single_combat.0001 } - } - # Otherwise, invalidate the duel immediately. - else = { - scope:sc_initiator = { - trigger_event = { saved_event_id = scope:invalidation_event } - } - # And fire an error to the debug log for us. - error_log = debug_log.single_combat_setup.attacker_and_defender_same_person - debug_log = debug_log.single_combat_setup.attacker_and_defender_same_person.notice - debug_log_scopes = yes - } -} - -# Clean all duel edge buff character modifiers. -remove_temporary_duel_edge_buff_modifiers_effect = { - # General modifiers. - remove_character_modifier = duel_edge_buff_01_modifier - remove_character_modifier = duel_edge_buff_02_modifier - remove_character_modifier = duel_edge_buff_03_modifier - remove_character_modifier = duel_edge_buff_04_modifier - remove_character_modifier = duel_edge_buff_05_modifier - remove_character_modifier = duel_edge_buff_06_modifier - remove_character_modifier = duel_edge_buff_07_modifier - remove_character_modifier = duel_edge_buff_08_modifier - remove_character_modifier = duel_edge_buff_09_modifier - remove_character_modifier = duel_edge_buff_10_modifier - remove_character_modifier = duel_edge_buff_11_modifier - remove_character_modifier = duel_edge_buff_12_modifier - remove_character_modifier = duel_edge_buff_13_modifier - remove_character_modifier = duel_edge_buff_14_modifier - remove_character_modifier = duel_edge_buff_15_modifier - remove_character_modifier = duel_edge_buff_16_modifier - remove_character_modifier = duel_edge_buff_17_modifier - remove_character_modifier = duel_edge_buff_18_modifier - remove_character_modifier = duel_edge_buff_19_modifier - remove_character_modifier = duel_edge_buff_20_modifier - remove_character_modifier = duel_edge_buff_21_modifier - remove_character_modifier = duel_edge_buff_22_modifier - remove_character_modifier = duel_edge_buff_23_modifier - remove_character_modifier = duel_edge_buff_24_modifier - remove_character_modifier = duel_edge_buff_25_modifier - remove_character_modifier = duel_edge_buff_26_modifier - remove_character_modifier = duel_edge_buff_27_modifier - remove_character_modifier = duel_edge_buff_28_modifier - remove_character_modifier = duel_edge_buff_29_modifier - remove_character_modifier = duel_edge_buff_30_modifier - # And the recalc flag. - remove_character_flag = sce_needs_forced_recalc_flag -} - -# Clean all duel edge debuff character modifiers. -remove_temporary_duel_edge_debuff_modifiers_effect = { - # General modifiers. - remove_character_modifier = duel_edge_debuff_01_modifier - remove_character_modifier = duel_edge_debuff_02_modifier - remove_character_modifier = duel_edge_debuff_03_modifier - remove_character_modifier = duel_edge_debuff_04_modifier - remove_character_modifier = duel_edge_debuff_05_modifier - remove_character_modifier = duel_edge_debuff_06_modifier - remove_character_modifier = duel_edge_debuff_07_modifier - remove_character_modifier = duel_edge_debuff_08_modifier - remove_character_modifier = duel_edge_debuff_09_modifier - remove_character_modifier = duel_edge_debuff_10_modifier - remove_character_modifier = duel_edge_debuff_11_modifier - remove_character_modifier = duel_edge_debuff_12_modifier - remove_character_modifier = duel_edge_debuff_13_modifier - remove_character_modifier = duel_edge_debuff_14_modifier - remove_character_modifier = duel_edge_debuff_15_modifier - remove_character_modifier = duel_edge_debuff_16_modifier - remove_character_modifier = duel_edge_debuff_17_modifier - remove_character_modifier = duel_edge_debuff_18_modifier - remove_character_modifier = duel_edge_debuff_19_modifier - remove_character_modifier = duel_edge_debuff_20_modifier - remove_character_modifier = duel_edge_debuff_21_modifier - remove_character_modifier = duel_edge_debuff_22_modifier - remove_character_modifier = duel_edge_debuff_23_modifier - remove_character_modifier = duel_edge_debuff_24_modifier - remove_character_modifier = duel_edge_debuff_25_modifier - remove_character_modifier = duel_edge_debuff_26_modifier - remove_character_modifier = duel_edge_debuff_27_modifier - remove_character_modifier = duel_edge_debuff_28_modifier - remove_character_modifier = duel_edge_debuff_29_modifier - remove_character_modifier = duel_edge_debuff_30_modifier - # And the recalc flag. - remove_character_flag = sce_needs_forced_recalc_flag -} - -# Clean all special combat character modifiers. -remove_temporary_combat_move_special_modifiers_effect = { - remove_character_modifier = combat_move_taunt_modifier - remove_character_modifier = combat_move_hurt_me_better_wounded_1_modifier - remove_character_modifier = combat_move_hurt_me_better_wounded_2_modifier - remove_character_modifier = combat_move_hurt_me_better_wounded_3_modifier -} - -# Clean up all character modifiers resulting from single combat. -remove_temporary_modifiers_combat_effect = { - # Buffs. - remove_temporary_duel_edge_buff_modifiers_effect = yes - # Debuffs. - remove_temporary_duel_edge_debuff_modifiers_effect = yes - # Special Combat. - remove_temporary_combat_move_special_modifiers_effect = yes -} - -# Clean up all combat move variables resulting from single combat. -remove_single_combat_character_local_variables_effect = { - # Reset the special move flag. - remove_local_variable = combat_move_special_slot_used_flag - # Remove previous combat move flags. - ## Tier 1 moves - remove_local_variable = combat_move_wait_and_hope_flag - remove_local_variable = combat_move_unsure_attack_flag - remove_local_variable = combat_move_enthusiastic_onslaught_flag - remove_local_variable = combat_move_hail_mary_flag - remove_local_variable = combat_move_pocket_sand_flag - remove_local_variable = combat_move_nut_em_flag - ## Tier 2 moves - remove_local_variable = combat_move_guard_flag - remove_local_variable = combat_move_probing_attack_flag - remove_local_variable = combat_move_onslaught_flag - remove_local_variable = combat_move_surprise_attack_flag - remove_local_variable = combat_move_taunt_flag - remove_local_variable = combat_move_put_the_boot_in_flag - ## Tier 3 moves - remove_local_variable = combat_move_strict_guard_flag - remove_local_variable = combat_move_confident_attack_flag - remove_local_variable = combat_move_expert_onslaught_flag - remove_local_variable = combat_move_attempt_disarm_flag - remove_local_variable = combat_move_lightning_assault_flag - remove_local_variable = combat_move_tire_opponent_flag - ## High Secondary Skill special moves - remove_local_variable = combat_move_reason_you_suck_speech_flag - remove_local_variable = combat_move_technique_from_legend_flag - remove_local_variable = combat_move_like_a_viper_flag - remove_local_variable = combat_move_pocket_silver_flag - remove_local_variable = combat_move_martial_voice_flag - remove_local_variable = combat_move_mocking_boast_flag - ## Location Specific special moves - remove_local_variable = combat_move_is_that_a_crocodile_flag - remove_local_variable = combat_move_desert_warrior_flag - remove_local_variable = combat_move_jungle_stalker_flag - remove_local_variable = combat_move_open_terrain_expert_flag - remove_local_variable = combat_move_rough_terrain_expert_flag - remove_local_variable = combat_move_forest_fighter_flag - ## Trait-Specific special moves - remove_local_variable = combat_move_raaargh_flag - remove_local_variable = combat_move_hard_grit_flag - remove_local_variable = combat_move_feint_and_stab_flag - remove_local_variable = combat_move_butchery_flag - remove_local_variable = combat_move_stoic_veteran_flag - remove_local_variable = combat_move_blade_dance_flag - remove_local_variable = combat_move_wrath_of_highgod_flag - remove_local_variable = combat_move_hurt_me_better_flag - ## Misc special moves - remove_local_variable = combat_move_special_fallback_flag - remove_local_variable = combat_move_something_to_hide_flag -} - -# Clean up all variables resulting from single combat. -remove_single_combat_variables_effect = { - remove_variable = tier_1_counter - remove_variable = tier_2_counter - remove_variable = tier_3_counter - remove_variable = sc_attacker_success_check - remove_variable = sc_defender_success_check - remove_variable = sc_attacker_injury_risk_check - remove_variable = sc_defender_injury_risk_check - remove_variable = sc_attacker_injury_bonus - remove_variable = sc_defender_injury_bonus - remove_variable = success_threshold - remove_variable = sc_attacker_injury_risk_score - remove_variable = sc_attacker_duel_success_score - remove_variable = sc_defender_injury_risk_score - remove_variable = sc_defender_duel_success_score - remove_variable = current_round - # Note, we don't remove var:engaged_in_single_combat here, as we run this effect at the start of combat for clean-up also. -} - -# Clean all consequences of a single combat. -remove_single_combat_info_effect = { - scope:sc_attacker = { - # Only remove variables if they're alive, as otherwise we get errors. - if = { - limit = { is_alive = yes } - remove_single_combat_character_local_variables_effect = yes - remove_single_combat_variables_effect = yes - remove_temporary_modifiers_combat_effect = yes - } - } - scope:sc_defender = { - # Only remove variables if they're alive, as otherwise we get errors. - if = { - limit = { is_alive = yes } - remove_single_combat_character_local_variables_effect = yes - remove_single_combat_variables_effect = yes - remove_temporary_modifiers_combat_effect = yes - } - } -} - -# Strip the shirts from characters where appropriate. -single_combat_apply_default_shirtlessness_effect = { - if = { - limit = { - $ATTACKER$ = { government_has_flag = government_is_tribal } - $DEFENDER$ = { government_has_flag = government_is_tribal } - } - $ATTACKER$ = { add_character_flag = single_combat_stripped_to_waist } - $DEFENDER$ = { add_character_flag = single_combat_stripped_to_waist } - } - else = { - $ATTACKER$ = { add_character_flag = single_combat_duel_armor } - $DEFENDER$ = { add_character_flag = single_combat_duel_armor } - } -} - -# Let everyone put their shirts back on. -single_combat_clean_shirtlessness_effect = { - $ATTACKER$ = { - if = { - limit = { has_character_flag = single_combat_stripped_to_waist } - remove_character_flag = single_combat_stripped_to_waist - } - else_if = { - limit = { has_character_flag = single_combat_duel_armor } - remove_character_flag = single_combat_duel_armor - } - } - $DEFENDER$ = { - if = { - limit = { has_character_flag = single_combat_stripped_to_waist } - remove_character_flag = single_combat_stripped_to_waist - } - else_if = { - limit = { has_character_flag = single_combat_duel_armor } - remove_character_flag = single_combat_duel_armor - } - } -} - -# Let everyone put their signature weapon back on. -single_combat_clean_temp_weapon_effect = { - $ATTACKER$ = { - if = { #check for variables set up in set_temporary_signature_weapon - limit = { - is_alive = yes - OR = { - has_variable = og_signature_weapon - has_variable = temporary_signature_weapon - } - } - if = { #remove the signature_weapon variable if the character didn't have anything before - limit = { - var:og_signature_weapon = flag:no_signature_weapon_yet - } - remove_variable = signature_weapon - } - else = { #restore the original signature_weapon - set_variable = { - name = signature_weapon - value = var:og_signature_weapon - } - } - #remove all variables set up in set_temporary_signature_weapon - remove_variable = temporary_signature_weapon - remove_variable = og_signature_weapon - } - } - $DEFENDER$ = { - if = { #check for variables set up in set_temporary_signature_weapon - limit = { - is_alive = yes - OR = { - has_variable = og_signature_weapon - has_variable = temporary_signature_weapon - } - } - if = { #remove the signature_weapon variable if the character didn't have anything before - limit = { - var:og_signature_weapon = flag:no_signature_weapon_yet - } - remove_variable = signature_weapon - } - else = { #restore the original signature_weapon - set_variable = { - name = signature_weapon - value = var:og_signature_weapon - } - } - #remove all variables set up in set_temporary_signature_weapon - remove_variable = temporary_signature_weapon - remove_variable = og_signature_weapon - } - } -} - -################################################## -# CONSEQUENCE EFFECTS - -single_combat_have_slain_kin_effect = { - # Check $ATTACKER$. - if = { - limit = { - $ATTACKER$ = { - is_alive = no - killer = $DEFENDER$ - } - } - $DEFENDER$ = { - add_kinslayer_trait_or_nothing_effect = { VICTIM = $ATTACKER$ } - } - } - # Check $DEFENDER$. - if = { - limit = { - $DEFENDER$ = { - is_alive = no - killer = $ATTACKER$ - } - } - $ATTACKER$ = { - add_kinslayer_trait_or_nothing_effect = { VICTIM = $DEFENDER$ } - } - } -} diff --git a/N3OW/common/scripted_effects/00_skill_effects.txt b/N3OW/common/scripted_effects/00_skill_effects.txt deleted file mode 100644 index d11c91cb..00000000 --- a/N3OW/common/scripted_effects/00_skill_effects.txt +++ /dev/null @@ -1,190 +0,0 @@ -#add_random_skill_point_effect - -add_random_skill_point_effect = { - random_list = { - 1 = { add_diplomacy_skill = 1 } - 1 = { add_intrigue_skill = 1 } - 1 = { add_learning_skill = 1 } - 1 = { add_martial_skill = 1 } - 1 = { add_prowess_skill = 1 } - 1 = { add_stewardship_skill = 1 } - } -} - -add_random_five_skill_points_effect = { - random_list = { - 1 = { add_diplomacy_skill = 5 } - 1 = { add_intrigue_skill = 5 } - 1 = { add_learning_skill = 5 } - 1 = { add_martial_skill = 5 } - 1 = { add_prowess_skill = 5 } - 1 = { add_stewardship_skill = 5 } - } -} - -add_highest_skill_point_effect = { - switch = { - trigger = highest_skill_including_prowess - diplomacy = { add_diplomacy_skill = 1 } - intrigue = { add_intrigue_skill = 1 } - learning = { add_learning_skill = 1 } - martial = { add_martial_skill = 1 } - stewardship = { add_stewardship_skill = 1 } - prowess = { add_prowess_skill = 1 } - } -} - -add_highest_skill_five_points_effect = { - switch = { - trigger = highest_skill_including_prowess - diplomacy = { add_diplomacy_skill = 5 } - intrigue = { add_intrigue_skill = 5 } - learning = { add_learning_skill = 5 } - martial = { add_martial_skill = 5 } - stewardship = { add_stewardship_skill = 5 } - prowess = { add_prowess_skill = 5 } - } -} - -add_highest_skill_two_points_effect = { - switch = { - trigger = highest_skill_including_prowess - diplomacy = { add_diplomacy_skill = 2 } - intrigue = { add_intrigue_skill = 2 } - learning = { add_learning_skill = 2 } - martial = { add_martial_skill = 2 } - stewardship = { add_stewardship_skill = 2 } - prowess = { add_prowess_skill = 2 } - } -} - -#Is run by get_lowest_skill_effect -calculate_lowest_skill_effect = { - save_scope_value_as = { - name = lowest_character_skill - value = flag:$SKILL$ - } - save_scope_value_as = { - name = lowest_character_skill_value - value = $SKILL$ - } -} - -#Sets scopes scope:lowest_character_skill and scope:lowest_character_skill_value -get_lowest_skill_effect = { - save_scope_value_as = { - name = lowest_character_skill - value = flag:diplomacy - } - save_scope_value_as = { - name = lowest_character_skill_value - value = diplomacy - } - #Let's make it a bit more random in case you have the same level in a lot of skills - random_list = { - 10 = { - if = { - limit = { - martial <= scope:lowest_character_skill_value - } - calculate_lowest_skill_effect = { SKILL = martial } - } - if = { - limit = { - stewardship <= scope:lowest_character_skill_value - } - calculate_lowest_skill_effect = { SKILL = stewardship } - } - if = { - limit = { - intrigue <= scope:lowest_character_skill_value - } - calculate_lowest_skill_effect = { SKILL = intrigue } - } - if = { - limit = { - learning <= scope:lowest_character_skill_value - } - calculate_lowest_skill_effect = { SKILL = learning } - } - } - 10 = { - if = { - limit = { - stewardship <= scope:lowest_character_skill_value - } - calculate_lowest_skill_effect = { SKILL = stewardship } - } - if = { - limit = { - intrigue <= scope:lowest_character_skill_value - } - calculate_lowest_skill_effect = { SKILL = intrigue } - } - if = { - limit = { - learning <= scope:lowest_character_skill_value - } - calculate_lowest_skill_effect = { SKILL = learning } - } - if = { - limit = { - martial <= scope:lowest_character_skill_value - } - calculate_lowest_skill_effect = { SKILL = martial } - } - } - 10 = { - if = { - limit = { - intrigue <= scope:lowest_character_skill_value - } - calculate_lowest_skill_effect = { SKILL = intrigue } - } - if = { - limit = { - learning <= scope:lowest_character_skill_value - } - calculate_lowest_skill_effect = { SKILL = learning } - } - if = { - limit = { - martial <= scope:lowest_character_skill_value - } - calculate_lowest_skill_effect = { SKILL = martial } - } - if = { - limit = { - stewardship <= scope:lowest_character_skill_value - } - calculate_lowest_skill_effect = { SKILL = stewardship } - } - } - 10 = { - if = { - limit = { - learning <= scope:lowest_character_skill_value - } - calculate_lowest_skill_effect = { SKILL = learning } - } - if = { - limit = { - martial <= scope:lowest_character_skill_value - } - calculate_lowest_skill_effect = { SKILL = martial } - } - if = { - limit = { - stewardship <= scope:lowest_character_skill_value - } - calculate_lowest_skill_effect = { SKILL = stewardship } - } - if = { - limit = { - intrigue <= scope:lowest_character_skill_value - } - calculate_lowest_skill_effect = { SKILL = intrigue } - } - } - } -} \ No newline at end of file diff --git a/N3OW/common/scripted_effects/00_spouse_effects.txt b/N3OW/common/scripted_effects/00_spouse_effects.txt deleted file mode 100644 index 1ab12c23..00000000 --- a/N3OW/common/scripted_effects/00_spouse_effects.txt +++ /dev/null @@ -1,117 +0,0 @@ - -##################################################################### -# EFFECT LIST -##################################################################### -# !!! Remember to add all new effects with a short description here !!! - -#councillor_spouse_lifestyle_rank_up_effect - -##################################################################### -# EFFECTS -##################################################################### - -councillor_spouse_lifestyle_rank_up_effect = { - random = { - chance = var:councillor_spouse_lifestyle_progress - modifier = { - add = $SKILL$ - } - modifier = { - factor = councillor_spouse_lifestyle_progress_factor - } - save_temporary_scope_value_as = { - name = ranked_up - value = yes - } - save_scope_as = councillor - random_spouse = { - limit = { - exists = this.cp:councillor_spouse - this.cp:councillor_spouse = scope:councillor - } - save_scope_as = council_owner - } - save_scope_value_as = { - name = skill_type - value = flag:$SKILL$ - } - if = { - limit = { has_character_modifier = councillor_spouse_$SKILL$_2_modifier } - remove_character_modifier = councillor_spouse_$SKILL$_2_modifier - scope:council_owner = { - send_interface_message = { - type = msg_spouse_task_good - title = councillor_spouse_background.0001.title - desc = councillor_spouse_background.0001.$SKILL$_notification - left_icon = scope:councillor - scope:councillor = { - switch = { - trigger = scope:skill_type - flag:diplomacy = { - add_trait = diplomat - debug_log = "A Spouse reached Lifestyle Rank 3, Diplomat was set" - } - flag:martial = { - add_trait = strategist - debug_log = "A Spouse reached Lifestyle Rank 3, Strategist was set" - } - flag:stewardship = { - add_trait = architect - debug_log = "A Spouse reached Lifestyle Rank 3, Architect was set" - } - flag:intrigue = { - add_trait = schemer - debug_log = "A Spouse reached Lifestyle Rank 3, Schemer was set" - } - flag:learning = { - add_trait = scholar - debug_log = "A Spouse reached Lifestyle Rank 3, Scholar was set" - } - fallback = { debug_log = "A Spouse reached Lifestyle Rank 3, but no trait was set" } - } - } - } - } - } - else_if = { - limit = { has_character_modifier = councillor_spouse_$SKILL$_1_modifier } - remove_character_modifier = councillor_spouse_$SKILL$_1_modifier - scope:council_owner = { - send_interface_message = { - type = msg_spouse_task_good - title = councillor_spouse_background.0001.title - desc = councillor_spouse_background.0001.$SKILL$_notification - left_icon = scope:councillor - scope:councillor = { - add_character_modifier = { - modifier = councillor_spouse_$SKILL$_2_modifier - } - } - } - } - debug_log = "A Spouse reached Lifestyle Rank 2" - } - else = { - scope:council_owner = { - send_interface_message = { - type = msg_spouse_task_good - title = councillor_spouse_background.0001.title - desc = councillor_spouse_background.0001.$SKILL$_notification - left_icon = scope:councillor - scope:councillor = { - add_character_modifier = { - modifier = councillor_spouse_$SKILL$_1_modifier - } - } - } - } - debug_log = "A Spouse reached Lifestyle Rank 1" - } - - #Reset the progress once the character has ranked up - set_variable = { - name = councillor_spouse_lifestyle_progress - value = 0 - } - } -} diff --git a/N3OW/common/scripted_effects/00_stewardship_lifestyle_effects.txt b/N3OW/common/scripted_effects/00_stewardship_lifestyle_effects.txt deleted file mode 100644 index 8133984c..00000000 --- a/N3OW/common/scripted_effects/00_stewardship_lifestyle_effects.txt +++ /dev/null @@ -1,548 +0,0 @@ -#Effects used in Stewardship Lifestyle Focus events - -##################################################################### -# EFFECT LIST -##################################################################### -# !!! Remember to add all new effects with a short description here !!! -# -# Mediation Event Effects: -# stewardship_duty_special_2000_sc_mediation_saved_scopes_effect - Takes scopes saved as story cycle variables and re-saves them as accessible scopes. -# stewardship_duty_special_2000_sc_mediation_increase_s1_event_count_effect - Increments the counter of how many state 1 events have fired (for tracking event completion progress) -# stewardship_duty_special_2000_sc_mediation_increase_s2_event_count_effect - Increments the counter of how many stage 2 events have fired (for tracking event completion preogress) -# stewardship_duty_special_2000_sc_mediation_get_random_quarreler_effect - Randomly picks one of the two quarrelers and saves their scope for localization usage. -# -# Map Painting Effects: -# stewardship_duty_special_1201_map_painting_journey_continuation_effect - Advances the event chain onto the next step. -# stewardship_duty_special_1201_conclude_map_painting_effect - Concludes the event chain. -# -# Road Building Effects: -# stewardship_domain_special_1301_increase_road_progress_effect - Advances the event chain onto the next step. -# stewardship_domain_special_1301_increase_road_quality_effect - Improves the final outcome of the event chain when it completes. -# stewardship_domain_special_1301_decrease_road_quality_effect - Worsens the final outcome of the event chain when it completes. -# stewardship_domain_special_1301_automatic_progress_effect - Used to automatically progress the road's construction over time, without the need to fire repetitive events. -# stewardship_domain_special_1301_road_building_event_effect - Fires a random event in the event chain. -# -# Paton Effects: -# stewardship_duty_1062_get_client_effect - If a valid $FLAG$ courtier exists in the pool, save their scope so we don't need to create a new one. -# stewardship_duty_1062_create_philosopher_effect - Creates a courtier with the philosopher $FLAG$ and appropriate skills. -# stewardship_duty_1062_create_gardener_effect - Creates a courtier with the gardener $FLAG$ and appropriate skills. -# stewardship_duty_1062_create_poet_effect - Creates a courtier with the poet $FLAG$ and appropriate skills. -# stewardship_duty_1064_extend_patronage_term_effect - Extends the patronage contract for 5 years. -# stewardship_duty_1064_remove_patrons_buff_effect - Cleans up residual effects from the patronage contract if it ends early. -# -# Domesday Book Effects: -# stewardship_domain_special_1500_apply_domesday_effects - Braching script structure to apply all correct effects at the conclusion of the event chain. -# stewardship_domain_special_1500_apply_domesday_effects_2 - Script sub-structure called within the above effect, but with differing parameters based on what happened during the event chain. -# stewardship_domain_special_1500_apply_domesday_effects_3 - Script sub-structure called within the above effect, but with differing parameters based on what happened during the event chain. -# stewardship_domain_special_1500_increase_quality_effect - Improves the final outcome of the event chain when it completes. -# stewardship_domain_special_1500_decrease_quality_effect - Worstens the final outcome of the event chain when it completes. -# stewardship_domain_special_1500_domesday_cleanup - Removes all tracking variables & flags for the event chain once it has concluded. - -# sell_titles_grant_sufficient_gold_effect - gives the character sufficient gold to pay root - - -stewardship_duty_special_2000_sc_mediation_saved_scopes_effect = { - scope:story = { - var:vassal_1 = { - save_scope_as = vassal_1 - } - var:vassal_2 = { - save_scope_as = vassal_2 - } - } -} - -stewardship_duty_special_2000_sc_mediation_increase_s1_event_count_effect = { - scope:story = { - change_variable = { - name = num_of_stage_1_events - add = 1 - } - } -} - -stewardship_duty_special_2000_sc_mediation_increase_s2_event_count_effect = { - scope:story = { - change_variable = { - name = num_of_stage_2_events - add = 1 - } - } -} - -stewardship_duty_special_2000_sc_mediation_get_random_quarreler_effect = { - scope:story = { - var:vassal_1 = { - add_to_temporary_list = quarrelers - } - var:vassal_2 = { - add_to_temporary_list = quarrelers - } - } - random_in_list = { - list = quarrelers - save_scope_as = quarreler - } -} - -#Effects used in Lifestyle Focus events - - - -# stewardship_duty.1200 -stewardship_duty_special_1201_map_painting_journey_continuation_effect = { - hidden_effect = { - random_list = { - 70 = { - trigger_event = { - on_action = map_painting_event_selection - days = { 5 15 } - } - } - 30 = { - modifier = { - add = 30 - exists = scope:had_1203 - } - modifier = { - add = 30 - exists = scope:had_1204 - } - modifier = { - add = 30 - exists = scope:had_1205 - } - modifier = { - add = 30 - exists = scope:had_1206 - } - modifier = { - add = 30 - exists = scope:had_1207 - } - modifier = { - add = 30 - exists = scope:had_1208 - } - trigger_event = { - on_action = map_painting_outcome - days = { 5 15 } - } - } - } - } - custom_tooltip = stewardship_duty_special.1201.continue_tooltip -} - -#Used to clear flags and variables from the map painting rank up chain (intrigue_scheming_rare.1201) -stewardship_duty_special_1201_conclude_map_painting_effect = { - hidden_effect = { - remove_character_flag = is_in_stewardship_domain_special_event - } -} - - -#Scripted effects for the road building event chain: -stewardship_domain_special_1301_increase_road_progress_effect = { - set_variable = { - name = governance_road_progress - value = scope:road_progress - } - change_variable = { - name = governance_road_progress - add = 1 - } - save_scope_value_as = { - name = road_progress - value = var:governance_road_progress - } -} - -#Decrease road progress - - -#Increase road quality -stewardship_domain_special_1301_increase_road_quality_effect = { - set_variable = { - name = governance_road_quality - value = scope:road_quality - } - change_variable = { - name = governance_road_quality - add = 1 - } - save_scope_value_as = { - name = road_quality - value = var:governance_road_quality - } -} - - -#Decrease road quality -stewardship_domain_special_1301_decrease_road_quality_effect = { - set_variable = { - name = governance_road_quality - value = scope:road_quality - } - change_variable = { - name = governance_road_quality - add = -1 - } - save_scope_value_as = { - name = road_quality - value = var:governance_road_quality - } -} - - -stewardship_domain_special_1301_automatic_progress_effect = { - hidden_effect = { - random_list = { - 10 = { } - 10 = { - stewardship_domain_special_1301_increase_road_progress_effect = yes - } - 10 = { - stewardship_domain_special_1301_increase_road_progress_effect = yes - stewardship_domain_special_1301_increase_road_quality_effect = yes - } - 1 = { - stewardship_domain_special_1301_increase_road_progress_effect = yes - stewardship_domain_special_1301_increase_road_quality_effect = yes - scope:project_leader = { - add_stewardship_skill = 1 - } - } - } - } -} - -stewardship_domain_special_1301_road_building_event_effect = { - hidden_effect = { - trigger_event = { - on_action = stewardship_road_building_chain - days = { 30 60 } - } - } -} - -##################### -# Patronage Effects # -##################### -stewardship_duty_1062_get_client_effect = { - #If a suitable candidate was generated earlier, select them as an option. - - if = { - limit = { - any_pool_character = { - province = root.capital_province - has_character_flag = $FLAG$ - faith = root.faith - culture = { has_same_culture_heritage = root.culture } - age < 45 - NOT = { has_character_flag = stewardship_duty_1062_already_being_considered } - } - } - random_pool_character = { - province = root.capital_province - limit = { - has_character_flag = $FLAG$ - faith = root.faith - culture = { has_same_culture_heritage = root.culture } - age < 45 - NOT = { has_character_flag = stewardship_duty_1062_already_being_considered } - } - add_character_flag = { - flag = stewardship_duty_1062_already_being_considered - days = 10 - } - save_scope_as = $CLIENT_SCOPE$ - } - } -} - -stewardship_duty_1062_create_philosopher_effect = { - #Create a character with high learning to be our philosopher. - random_dummy_gender_scholar_effect = yes - create_character = { - location = root.capital_province - age = { 25 35 } - gender = scope:dummy_scholar_gender - trait = education_learning_2 - trait = shrewd - faith = root.faith - culture = root.culture - learning = { 10 12 } - save_scope_as = $CLIENT_SCOPE$ - } - scope:$CLIENT_SCOPE$ = { - add_character_flag = governance_1062_philosopher_flag - add_character_flag = { - flag = stewardship_duty_1062_already_being_considered - days = 10 - } - } -} - -stewardship_duty_1062_create_gardener_effect = { - #Create a character with decent stewardship and intelligence to be our gardener. - random_dummy_gender_servant_effect = yes - create_character = { - location = root.capital_province - age = { 25 35 } - gender = scope:dummy_servant_gender - trait = education_stewardship_1 - trait = diligent - trait = patient - faith = root.faith - culture = root.culture - learning = { 8 10 } - stewardship = { 8 10 } - save_scope_as = $CLIENT_SCOPE$ - } - scope:$CLIENT_SCOPE$ = { - add_character_flag = governance_1062_gardener_flag - add_character_flag = { - flag = stewardship_duty_1062_already_being_considered - days = 10 - } - } -} - -stewardship_duty_1062_create_poet_effect = { - #Create a character with high Diplomacy to be our poet. - random_dummy_gender_scholar_effect = yes - create_character = { - location = root.capital_province - age = { 25 35 } - gender = scope:dummy_scholar_gender - trait = education_diplomacy_2 - trait = gregarious - trait = zealous - trait = lifestyle_poet - faith = root.faith - culture = root.culture - diplomacy = { 10 12 } - save_scope_as = $CLIENT_SCOPE$ - } - scope:$CLIENT_SCOPE$ = { - add_character_flag = governance_1062_poet_flag - add_character_flag = { - flag = stewardship_duty_1062_already_being_considered - days = 10 - } - } -} - -stewardship_duty_1064_extend_patronage_term_effect = { - if = { - limit = { - $CLIENT$ = { - has_character_flag = governance_1062_gardener_flag - } - } - add_character_modifier = { - modifier = governance_1062_immaculate_gardens_modifier - years = 5 - } - } - else_if = { - limit = { - $CLIENT$ = { - has_character_flag = governance_1062_poet_flag - } - } - add_character_modifier = { - modifier = governance_1062_religious_tapestries_modifier - years = 5 - } - } - else_if = { - limit = { - $CLIENT$ = { - has_character_flag = governance_1062_philosopher_flag - } - } - add_character_modifier = { - modifier = governance_1062_natural_philosopher_modifier - years = 5 - } - } -} - -stewardship_duty_1064_remove_patrons_buff_effect = { - if = { - limit = { - $CLIENT$ = { - var:stewardship_duty_1062_employer = { - has_character_modifier = governance_1062_immaculate_gardens_modifier - } - } - } - $CLIENT$ = { - var:stewardship_duty_1062_employer = { - remove_character_modifier = governance_1062_immaculate_gardens_modifier - } - } - } - else_if = { - limit = { - $CLIENT$ = { - var:stewardship_duty_1062_employer = { - has_character_modifier = governance_1062_religious_tapestries_modifier - } - } - } - $CLIENT$ = { - var:stewardship_duty_1062_employer = { - remove_character_modifier = governance_1062_religious_tapestries_modifier - } - } - } - else_if = { - limit = { - $CLIENT$ = { - var:stewardship_duty_1062_employer = { - has_character_modifier = governance_1062_natural_philosopher_modifier - } - } - } - $CLIENT$ = { - var:stewardship_duty_1062_employer = { - remove_character_modifier = governance_1062_natural_philosopher_modifier - } - } - } - - #Removes the reference to our employer now that we're no longer working for them. - $CLIENT$ = { - remove_variable = stewardship_duty_1062_employer - } -} - -######################### -# Domesday Book Effects # -######################### - -#The following series of effects are used to calculate the ultimate impact of the domesday event chain on all of your provinces. -#These are divided up into 3 sequential effects which will each check one possible factor to determine what that's factor's impact -#on the final outcome will be, before the effect fires off the next effect in the sequence. - -#Determine which custom county localisation we should use, based on whether or not any counties have been excluded. -stewardship_domain_special_1500_apply_domesday_effects = { - #If any counties have been excluded at all, specify that they will not receive the bonus. - if = { - limit = { - any_in_list = { - list = excluded_counties - exists = this - } - } - stewardship_domain_special_1500_apply_domesday_effects_2 = { - CUSTOM_TEXT = stewardship_domain_special.1590.every_nonexcluded_county - } - } - #If no counties have been excluded from the survey, specify that all counties will receive the bonus. - else = { - stewardship_domain_special_1500_apply_domesday_effects_2 = { - CUSTOM_TEXT = stewardship_domain_special.1590.every_county - } - } -} - -#Determine which modifier we will apply to our counties, based on the total quality score accumulated during the event chain. -stewardship_domain_special_1500_apply_domesday_effects_2 = { - #All non-excluded counties receive the excellent quality modifier. - if = { - limit = { - var:stewardship_domain_special_1500_domesday_quality >= stewardship_domain_special_1500_domesday_excellent_quality - } - stewardship_domain_special_1500_apply_domesday_effects_3 = { - CUSTOM_TEXT = $CUSTOM_TEXT$ - DOMESDAY_ASSESSMENT = stewardship_domain_special_1500_excellent_quality_assessment - INCREASE_CONTROL = 20 - } - } - #All non-excluded counties receive the high quality modifier. - else_if = { - limit = { - var:stewardship_domain_special_1500_domesday_quality >= stewardship_domain_special_1500_domesday_high_quality - } - stewardship_domain_special_1500_apply_domesday_effects_3 = { - CUSTOM_TEXT = $CUSTOM_TEXT$ - DOMESDAY_ASSESSMENT = stewardship_domain_special_1500_high_quality_assessment - INCREASE_CONTROL = 15 - } - } - #All non-excluded-counties receive the mediocre quality modifier. - else = { - stewardship_domain_special_1500_apply_domesday_effects_3 = { - CUSTOM_TEXT = $CUSTOM_TEXT$ - DOMESDAY_ASSESSMENT = stewardship_domain_special_1500_mediocre_quality_assessment - INCREASE_CONTROL = 10 - } - } - #If the quality level of the survey is poor, no counties will receive any modifier. -} - -#Determine whether to use the distributed records effect or the no records effect, based on which option the player picked during the final event. -stewardship_domain_special_1500_apply_domesday_effects_3 = { - every_in_list = { - list = non_excluded_counties - custom = $CUSTOM_TEXT$ - - #Apply only the survey modifier to eligible counties. - change_county_control = $INCREASE_CONTROL$ - add_county_modifier = { - modifier = $DOMESDAY_ASSESSMENT$ - days = 1825 - } - - } -} - -#These following two effects increase or decrease the variable which keeps track of the survey's quality. -#Taking a penalty to the quality level hurts more than gaining a bonus, so the player needs to be judicious -#when determining if what they gain from accepting a penalty is worth the trade-off. - -#Increase domesday quality -stewardship_domain_special_1500_increase_quality_effect = { - change_variable = { - name = stewardship_domain_special_1500_domesday_quality - add = 1 - } - custom_tooltip = stewardship_domain_special.1500.quality_increase.tt -} - - -#Decrease domesday quality -stewardship_domain_special_1500_decrease_quality_effect = { - change_variable = { - name = stewardship_domain_special_1500_domesday_quality - add = -2 - } - custom_tooltip = stewardship_domain_special.1500.quality_decrease.tt -} - -#This effect is used at the end of the Domesday event chain to clean up any remaining variables/flags. -stewardship_domain_special_1500_domesday_cleanup = { - remove_character_flag = is_in_stewardship_domain_special_event - remove_variable = stewardship_domain_special_1500_domesday_is_active - remove_variable = stewardship_domain_special_1500_domesday_assessors_protected - remove_variable = stewardship_domain_special_1500_remaining_random_events - remove_variable = stewardship_domain_special_1500_domesday_quality - remove_variable = stewardship_domain_special_1500_last_random_event - remove_variable = stewardship_domain_special_1500_domesday_is_active -} - - -sell_titles_grant_sufficient_gold_effect = { - hidden_effect = { - if = { - limit = { - short_term_gold < $AMOUNT$ - } - add_gold = $AMOUNT$ - } - } -} diff --git a/N3OW/common/scripted_effects/00_stewardship_perk_effects.txt b/N3OW/common/scripted_effects/00_stewardship_perk_effects.txt deleted file mode 100644 index 1702fd01..00000000 --- a/N3OW/common/scripted_effects/00_stewardship_perk_effects.txt +++ /dev/null @@ -1,124 +0,0 @@ - -# Effects used by Perks in the Stewardship Lifestyle - -# extort_subjects_effect: Fires an extortion event for a suitable subject - -extort_subjects_effect = { - random_list = { - 10 = { # A Powerful Vassal - trigger = { - any_powerful_vassal = { - extortion_powerful_vassal_trigger = yes - } - } - save_temporary_scope_value_as = { - name = found_suitable_target - value = yes - } - random_powerful_vassal = { - limit = { - extortion_powerful_vassal_trigger = yes - } - save_scope_as = extortion_target - } - trigger_event = subject_extortion.0001 - } - 5 = { # A County - trigger = { - is_ai = no # So that this doesn't wreak havoc in the player's realm - any_held_title = { - extortion_county_trigger = yes - } - } - save_temporary_scope_value_as = { - name = found_suitable_target - value = yes - } - random_held_title = { - limit = { - extortion_county_trigger = yes - } - save_scope_as = extortion_target - } - trigger_event = subject_extortion.0002 - } - 10 = { # Theocratic Vassals - trigger = { - NOR = { has_character_flag = recently_extorted_theocratic_vassals } - any_vassal = { - extortion_theocratic_vassal_trigger = yes - } - } - save_temporary_scope_value_as = { - name = found_suitable_target - value = yes - } - random_vassal = { - limit = { - extortion_theocratic_vassal_trigger = yes - } - save_scope_as = extortion_target - } - trigger_event = subject_extortion.0003 - } - 5 = { # Vassals at Large - trigger = { - NOT = { has_character_flag = recently_extorted_vassals_at_large } - any_vassal = { - extortion_vassal_at_large_trigger = yes - } - } - save_temporary_scope_value_as = { - name = found_suitable_target - value = yes - } - random_vassal = { - limit = { - is_powerful_vassal = no - extortion_vassal_at_large_trigger = yes - } - alternative_limit = { - extortion_vassal_at_large_trigger = yes - } - save_scope_as = extortion_target - } - trigger_event = subject_extortion.0004 - } - 5 = { # Courtiers - trigger = { - NOT = { has_character_flag = recently_extorted_courtiers } - any_courtier = { - extortion_courtier_representative_trigger = yes - } - } - save_temporary_scope_value_as = { - name = found_suitable_target - value = yes - } - random_courtier = { - limit = { - extortion_courtier_representative_trigger = yes - } - save_scope_as = extortion_target - } - trigger_event = subject_extortion.0005 - } - } - - # Fallback in case no-one could be found - if = { - limit = { - NOT = { exists = scope:found_suitable_target } - } - trigger_event = subject_extortion.9998 - } -} - - -extortion_tracking_effect = { - set_variable = { - name = was_recently_extorted - value = yes - days = 1825 - } -} \ No newline at end of file diff --git a/N3OW/common/scripted_effects/00_story_cycle_same_gender_pen_pal_effects.txt b/N3OW/common/scripted_effects/00_story_cycle_same_gender_pen_pal_effects.txt deleted file mode 100644 index a8b6cea0..00000000 --- a/N3OW/common/scripted_effects/00_story_cycle_same_gender_pen_pal_effects.txt +++ /dev/null @@ -1,127 +0,0 @@ - -##################################################################### -# EFFECT LIST -##################################################################### -# !!! Remember to add all new effects with a short description here !!! - - -##################################################################### -# EFFECTS -##################################################################### - -#Bring up opinion to at least 20 (They can't start out with less than -30) -test_m_1001_opinion_setting_effect = { - if = { #-30 to -16 - limit = { - opinion = { - target = $CHARACTER$ - value < -15 - } - } - add_opinion = { - target = $CHARACTER$ - modifier = respect_opinion - opinion = 50 - } - } - else_if = { # -15 to -1 - limit = { - opinion = { - target = $CHARACTER$ - value < -0 - } - } - add_opinion = { - target = $CHARACTER$ - modifier = respect_opinion - opinion = 35 - } - } - else_if = { #0 to 19 - limit = { - opinion = { - target = $CHARACTER$ - value < 20 - } - } - add_opinion = { - target = $CHARACTER$ - modifier = respect_opinion - opinion = 20 - } - } -} - -test_m_1100_options_effect = { - random_list = { - 100 = { - trigger = { NOT = { has_character_flag = test_m_1100_pregnancy_option } } - add_character_flag = test_m_1100_pregnancy_option - } - 1 = { - trigger = { NOT = { has_character_flag = test_m_1100_seduction_option } } - add_character_flag = test_m_1100_seduction_option - } - 1 = { - trigger = { NOT = { has_character_flag = test_m_1100_stress_option } } - add_character_flag = test_m_1100_stress_option - } - 1 = { - trigger = { NOT = { has_character_flag = test_m_1100_unhappy_marriage_option } } - add_character_flag = test_m_1100_unhappy_marriage_option - random_spouse = { - save_scope_as = spouse - } - } - 1 = { - trigger = { NOT = { has_character_flag = test_m_1100_regular_marriage_option } } - add_character_flag = test_m_1100_regular_marriage_option - random_spouse = { - save_scope_as = spouse - } - } - 1 = { - trigger = { - NOT = { has_character_flag = test_m_1100_raising_children_option } - any_child = { is_alive = yes } - } - add_character_flag = test_m_1100_raising_children_option - } - 1 = { - trigger = { - NOT = { has_character_flag = test_m_1100_secret_lover_option } - any_secret = { - type = secret_lover - secret_target = { is_alive = yes } - } - } - add_character_flag = test_m_1100_secret_lover_option - random_secret = { - type = secret_lover - limit = { - secret_target = { is_alive = yes } - } - secret_target = { save_scope_as = secret_lover } - } - } - } -} - -test_m_1100_clear_flags_effect = { - remove_character_flag = test_m_1100_pregnancy_option - remove_character_flag = test_m_1100_seduction_option - remove_character_flag = test_m_1100_stress_option - remove_character_flag = test_m_1100_unhappy_marriage_option - remove_character_flag = test_m_1100_regular_marriage_option - remove_character_flag = test_m_1100_raising_children_option - remove_character_flag = test_m_1100_secret_lover_option -} - -#Things to handle through other events: -# someone you fancy -# birthday gift -# happy new baby -# abortion -# rich friend helps poor friend -# best skill -# recent death support (both?) \ No newline at end of file diff --git a/N3OW/common/scripted_effects/00_stress_effects.txt b/N3OW/common/scripted_effects/00_stress_effects.txt deleted file mode 100644 index 1f2c1932..00000000 --- a/N3OW/common/scripted_effects/00_stress_effects.txt +++ /dev/null @@ -1,1013 +0,0 @@ -#Effects used in Stress events - -##################################################################### -# EFFECT LIST -##################################################################### -# -# By Sean Hughes: -# stress_threshold_event_aftereffects - Runs all post-event cleanup and pre-event setup to ensure the stress system keeps working without any breaks. -# remove_stress_threshold_option_flags_effect – Cleans up all flags which may have been applied to a character for the purpose of calculating which event options get offered to the player. -# contrite_get_secret_scopes_effect – Setup for 'contrite_get_secret_scopes_effect', should be run in immediate. -# contrite_reveal_secrets_effect – Reduces stress, but exposes one or more of your secrets. -# rakish_brothel_night_effect – Reduces stress, but has a high chance to contract STDs. -# reclusive_get_relationships_effect – setup for 'reclusive_damage_relationship_effect', should be run in the immediate. -# reclusive_damage_relationships_effect – Reduces stress, but damages a positive relationship you have with someone. -# inappetetic_advance_starvation_effect – Reduces stress, but applies a skill and health penalty. -# stress_replace_personality_trait_with_opposite_effect – Takes a personality trait, will add the trait and find an appropraite trait to remove to make space for it. -# stress_prison_remove_ordered_personality_trait_effect – Part of the above. Removes a personaliy trait based on an ordered list designed to be used in prison. -# stress_unimprisoned_remove_ordered_personality_trait_effect — Part of the above. Removes a personaliy trait based on an ordered list designed to be used outside of prison. -# stress_save_deceased_character_for_mental_break — Saves a character as a variable for a mental break event to reference them later. Does not actually trigger a mental break. - - -# Must be run at the end of 'immediate' in EVERY stress threshold event, to ensure all tasks the system expects to execute are done properly. -stress_threshold_event_post_immediate = { - - # Record the character's current stress level (must be done in the immediate so that if a character's stress level changes before 'after' executes we still apply the correct cooldowns). - if = { - limit = { - stress_level >= 3 - } - add_character_flag = apply_stress_threshold_cooldown_level_3 - } - else_if = { - limit = { - stress_level >= 2 - } - add_character_flag = apply_stress_threshold_cooldown_level_2 - } - else_if = { - limit = { - stress_level >= 1 - } - add_character_flag = apply_stress_threshold_cooldown_level_1 - } -} - -# Must be run in the 'after' EVERY stress threshold event, to ensure all tasks the system expect to execute are done properly. -stress_threshold_event_aftereffects = { - if = { - limit = { - is_alive = yes - } - - # Clean up all event option flags. - remove_stress_threshold_option_flags_effect = yes - - # Based on the character's recorded stress level, apply the appropraite cooldown flag for the cooldown duration - 1 days. - if = { - limit = { - has_character_flag = apply_stress_threshold_cooldown_level_3 - } - add_character_flag = { - flag = stress_threshold_event_3_cooldown - days = stress_threshold_cooldown_duration # 1 day less than 5 years (8 with Perk) - } - } - else_if = { - limit = { - has_character_flag = apply_stress_threshold_cooldown_level_2 - } - add_character_flag = { - flag = stress_threshold_event_2_cooldown - days = stress_threshold_cooldown_duration # 1 day less than 5 years (8 with Perk) - } - } - else = { - add_character_flag = { - flag = stress_threshold_event_1_cooldown - days = stress_threshold_cooldown_duration # 1 day less than 5 years (8 with Perk) - } - } - - # Remove the character's recorded stress level flags. - remove_character_flag = apply_stress_threshold_cooldown_level_3 - remove_character_flag = apply_stress_threshold_cooldown_level_2 - remove_character_flag = apply_stress_threshold_cooldown_level_1 - - # Schedule a new stress event to occur after the cooldown duration has elapsed. - trigger_event = { - id = stress_threshold.0005 - days = stress_threshold_second_check_timing # 5 year maximum between events (8 with Perk) - } - - # Warn the player that they will receive another event if they are still Stressed. - custom_tooltip = stress_threshold_cooldown_message - } -} - -# Clears all 'stress_threshold_option_xxx' flags from a character so that they will get the correct options offered to them the next time they get a stress threshold event. -remove_stress_threshold_option_flags_effect = { - remove_character_flag = stress_threshold_option_drunkard - remove_character_flag = stress_threshold_option_hashishiyah - remove_character_flag = stress_threshold_option_rakish - remove_character_flag = stress_threshold_option_reclusive - remove_character_flag = stress_threshold_option_irritable - remove_character_flag = stress_threshold_option_flagellant - remove_character_flag = stress_threshold_option_profligate - remove_character_flag = stress_threshold_option_improvident - remove_character_flag = stress_threshold_option_contrite - remove_character_flag = stress_threshold_option_comfort_eater - remove_character_flag = stress_threshold_option_inappetetic - remove_character_flag = stress_threshold_option_journaller - remove_character_flag = stress_threshold_option_confider - remove_character_flag = stress_threshold_option_athletic - remove_character_flag = stress_threshold_option_conversion - remove_character_flag = stress_threshold_option_depression - remove_character_flag = stress_threshold_option_burdened -} - -# Setup for 'contrite_reveal_secrets_effect'. Checks what secrets we have and save their scopes so the option tooltip is consistent and correct. -# While preferable to have some, it is okay if we don't have any, as we have a fallback in the option itself. -contrite_get_secret_scopes_effect = { - - random_secret = { - limit = { - is_criminal_for = root - can_be_exposed_by = root - } - save_scope_as = confessed_secret # The first secret must be criminal. - } - if = { - limit = { - exists = scope:confessed_secret - any_secret = { - this != scope:confessed_secret - can_be_exposed_by = root - } - } - random_secret = { - limit = { - this != scope:confessed_secret - can_be_exposed_by = root - } - save_scope_as = second_confessed_secret # The second secret can be anything as long as it is different from the first. - } - } -} - -# Requires 'contrite_get_secret_scopes_effect' to be run first. Reveals one or more secrets you know or, if you have none, applies a general opinion modifier to you and reduces stress. -contrite_reveal_secrets_effect = { - # The more secrets you have to confess, the more stress reduction you get! - if = { - limit = { - exists = scope:confessed_secret - scope:confessed_secret = { can_be_exposed_by = root } - } - scope:confessed_secret = { - expose_secret = root - } - if = { - limit = { - exists = scope:second_confessed_secret - scope:second_confessed_secret = { can_be_exposed_by = root } - } - scope:second_confessed_secret = { - expose_secret = root - } - add_stress = massive_stress_impact_loss # Revealing both a Criminal secret and a 2nd secret gives us a lot of Stress Reduction. - } - else = { - add_stress = major_stress_impact_loss # Revealing only a Criminal secret still gives us a lot of Stress Reduction. - } - } - else_if = { - limit = { - exists = scope:second_confessed_secret - scope:second_confessed_secret = { can_be_exposed_by = root } - } - scope:second_confessed_secret = { - expose_secret = root - } - add_stress = medium_stress_impact_loss # Revealing only a non-Criminal secret gives us less Stress Reduction. - } - # If you have no secrets, you reveal a 'minor secret' about yourself (not something which is a real Secret, but something still disturbing enough to make people uncomfortable). - else = { - add_character_modifier = { - modifier = stress_disturbing_confession - years = 3 - } - add_stress = medium_stress_impact_loss - } -} - -# Applies the effects of a one-night debauchery spree in a brothel. -# (Does not use "had_sex_with_unknown_effect" since we want a higher risk of STDs) -rakish_brothel_night_effect = { - # Warn the character about possible negative consequences. - custom_tooltip = stress_threshold.1011.rakish.tt - - # Negative consequences of the night. - random_list = { - 50 = { - trigger = { - is_attracted_to_men = yes - } - set_variable = { - name = had_recent_sex - value = flag:male - } - give_homosexual_secret_or_nothing_with_target_effect = { CHARACTER = dummy_male } - } - 50 = { - trigger = { - is_attracted_to_women = yes - } - set_variable = { - name = had_recent_sex - value = flag:female - } - } - } - hidden_effect = { - #Adultery suspicion - random = { - chance = 5 - random_spouse = { - limit = { is_ai = no } - alternative_limit = { always = yes } - trigger_event = adultery.0001 - } - } - - # Possible STD transmission - random_list = { - 75 = { - #Nothing - } - 20 = { - contract_disease_notify_effect = { DISEASE = lovers_pox } - } - 5 = { - contract_disease_notify_effect = { DISEASE = great_pox } - } - } - - #Possibility to start peasant story cycle - random = { - chance = 5 - if = { - limit = { - NOT = { has_character_flag = had_story_cycle_peasant_affair } - is_ruler = yes - is_ai = no - } - create_character = { - location = root.capital_province - template = beautiful_peasant_character - gender_female_chance = root_attraction_based_female_chance - faith = root.faith - culture = root.culture - save_scope_as = beautiful_peasant - } - scope:beautiful_peasant = { - set_sexuality = bisexual - } - if = { - limit = { - is_male = yes - exists = scope:beautiful_peasant - scope:beautiful_peasant = { - is_female = yes - age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE - } - } - random = { - chance = pregnancy_chance - scope:beautiful_peasant = { - add_character_flag = { - flag = peasant_is_pregnant - days = 560 - } - } - } - } - set_variable = { - name = story_peasant_affair_target - value = scope:beautiful_peasant - } - set_variable = { #To save how you met - name = rakish_night - value = 0 - } - create_story = story_peasant_affair - } - } - } - - add_stress = major_stress_impact_loss -} - - -# Check what relationships we have and save their scopes for 'reclusive_damage_relationships_effect' so that the option tooltip is consistent and correct. -# While preferable to have some, it is okay if we don't have any, as we have a fallback in the option itself. -reclusive_get_relationships_effect = { - if = { - limit = { - any_relation = { type = friend } - } - random_relation = { - type = friend - save_scope_as = lost_friend - } - } - else_if = { - limit = { - any_relation = { type = lover } - } - random_relation = { - type = lover - save_scope_as = lost_lover - } - } - else_if = { - limit = { - any_spouse = { - exists = this - } - } - random_spouse = { - save_scope_as = neglected_spouse - } - } -} - -# Requires 'reclusive_get_relationships_effect' to be run first (preferably in the immediate). Hurts the opinion of someone important to us and relieves stress. -reclusive_damage_relationships_effect = { - if = { - limit = { - exists = scope:lost_friend - scope:lost_friend = { is_alive = yes } - has_relation_friend = scope:lost_friend - } - remove_relation_friend = scope:lost_friend - add_stress = medium_stress_impact_loss - } - else_if = { - limit = { - exists = scope:lost_lover - scope:lost_lover = { is_alive = yes } - has_relation_lover = scope:lost_lover - } - remove_relation_lover = scope:lost_lover - add_stress = medium_stress_impact_loss - } - else_if = { - limit = { - exists = scope:neglected_spouse - scope:neglected_spouse = { is_alive = yes } - any_consort = { this = scope:neglected_spouse } - } - scope:neglected_spouse = { - add_opinion = { - modifier = neglected_opinion - target = root - opinion = -25 - } - } - add_stress = medium_stress_impact_loss - } - else = { - add_stress = minor_stress_impact_loss - } -} - -# Adds increasingly severe starvation penalties to a character. -inappetetic_advance_starvation_effect = { - if = { - limit = { - has_character_modifier = stress_inappetetic_hunger_3 - } - death = { death_reason = death_malnourishment } - } - else_if = { - limit = { - has_character_modifier = stress_inappetetic_hunger_2 - } - remove_character_modifier = stress_inappetetic_hunger_2 - add_character_modifier = { - modifier = stress_inappetetic_hunger_3 - years = 3 - } - } - else_if = { - limit = { - has_character_modifier = stress_inappetetic_hunger_1 - } - remove_character_modifier = stress_inappetetic_hunger_1 - add_character_modifier = { - modifier = stress_inappetetic_hunger_2 - years = 3 - } - } - else = { - add_character_modifier = { - modifier = stress_inappetetic_hunger_1 - years = 3 - } - } -} - -stress_get_victim_in_court_effect = { - if = { - limit = { - any_courtier = { - exists = this - is_imprisoned = no - } - } - random_courtier = { - limit = { - is_imprisoned = no - exists = root.player_heir - this = root.player_heir - } - alternative_limit = { - is_imprisoned = no - is_child_of = root - } - alternative_limit = { - is_imprisoned = no - is_spouse_of = root - } - alternative_limit = { - is_imprisoned = no - } - - save_scope_as = victim - } - } -} - -# Removes an existing personality trait and replace it with a 'negative' personality trait (though could conceivably be used with any personality trait). -# Designed for use in prison or high-stress situations. -stress_replace_personality_trait_with_opposite_effect = { - if = { - limit = { - flag:$TRAIT$ = flag:lustful - has_trait = chaste - } - remove_trait = chaste - } - else_if = { - limit = { - flag:$TRAIT$ = flag:chaste - has_trait = lustful - } - remove_trait = lustful - } - else_if = { - limit = { - flag:$TRAIT$ = flag:gluttonous - has_trait = temperate - } - remove_trait = temperate - } - else_if = { - limit = { - flag:$TRAIT$ = flag:temperate - has_trait = gluttonous - } - remove_trait = gluttonous - } - else_if = { - limit = { - flag:$TRAIT$ = flag:greedy - has_trait = generous - } - remove_trait = generous - } - else_if = { - limit = { - flag:$TRAIT$ = flag:generous - has_trait = greedy - } - remove_trait = greedy - } - else_if = { - limit = { - flag:$TRAIT$ = flag:lazy - has_trait = diligent - } - remove_trait = diligent - } - else_if = { - limit = { - flag:$TRAIT$ = flag:diligent - has_trait = lazy - } - remove_trait = lazy - } - else_if = { - limit = { - flag:$TRAIT$ = flag:wrathful - has_trait = calm - } - remove_trait = calm - } - else_if = { - limit = { - flag:$TRAIT$ = flag:calm - has_trait = wrathful - } - remove_trait = wrathful - } - else_if = { - limit = { - flag:$TRAIT$ = flag:patient - has_trait = impatient - } - remove_trait = impatient - } - else_if = { - limit = { - flag:$TRAIT$ = flag:impatient - has_trait = patient - } - remove_trait = patient - } - else_if = { - limit = { - flag:$TRAIT$ = flag:arrogant - has_trait = humble - } - remove_trait = humble - } - else_if = { - limit = { - flag:$TRAIT$ = flag:humble - has_trait = arrogant - } - remove_trait = arrogant - } - else_if = { - limit = { - flag:$TRAIT$ = flag:deceitful - has_trait = honest - } - remove_trait = honest - } - else_if = { - limit = { - flag:$TRAIT$ = flag:honest - has_trait = deceitful - } - remove_trait = deceitful - } - else_if = { - limit = { - flag:$TRAIT$ = flag:craven - has_trait = brave - } - remove_trait = brave - } - else_if = { - limit = { - flag:$TRAIT$ = flag:brave - has_trait = craven - } - remove_trait = craven - } - else_if = { - limit = { - flag:$TRAIT$ = flag:shy - has_trait = gregarious - } - remove_trait = gregarious - } - else_if = { - limit = { - flag:$TRAIT$ = flag:gregarious - has_trait = shy - } - remove_trait = shy - } - else_if = { - limit = { - flag:$TRAIT$ = flag:ambitious - has_trait = content - } - remove_trait = content - } - else_if = { - limit = { - flag:$TRAIT$ = flag:content - has_trait = ambitious - } - remove_trait = ambitious - } - else_if = { - limit = { - flag:$TRAIT$ = flag:arbitrary - has_trait = just - } - remove_trait = just - } - else_if = { - limit = { - flag:$TRAIT$ = flag:just - has_trait = arbitrary - } - remove_trait = arbitrary - } - else_if = { - limit = { - flag:$TRAIT$ = flag:cynical - has_trait = zealous - } - remove_trait = zealous - } - else_if = { - limit = { - flag:$TRAIT$ = flag:zealous - has_trait = cynical - } - remove_trait = cynical - } - else_if = { - limit = { - flag:$TRAIT$ = flag:paranoid - has_trait = trusting - } - remove_trait = trusting - } - else_if = { - limit = { - flag:$TRAIT$ = flag:trusting - has_trait = paranoid - } - remove_trait = paranoid - } - else_if = { - limit = { - flag:$TRAIT$ = flag:compassionate - OR = { - has_trait = callous - has_trait = sadistic - } - } - remove_trait = callous - remove_trait = sadistic - } - else_if = { - limit = { - flag:$TRAIT$ = flag:callous - has_trait = compassionate - } - remove_trait = compassionate - } - else_if = { - limit = { - flag:$TRAIT$ = flag:sadistic - has_trait = compassionate - } - remove_trait = compassionate - } - else_if = { - limit = { - flag:$TRAIT$ = flag:stubborn - has_trait = fickle - } - remove_trait = fickle - } - else_if = { - limit = { - flag:$TRAIT$ = flag:fickle - has_trait = stubborn - } - remove_trait = stubborn - } - else_if = { - limit = { - flag:$TRAIT$ = flag:vengeful - has_trait = forgiving - } - remove_trait = forgiving - } - else_if = { - limit = { - flag:$TRAIT$ = flag:forgiving - has_trait = vengeful - } - remove_trait = vengeful - } - else = { - if = { - limit = { - is_imprisoned = yes - } - stress_prison_remove_ordered_personality_trait_effect = yes - } - else = { - stress_unimprisoned_remove_ordered_personality_trait_effect = yes - } - } - add_trait_force_tooltip = $TRAIT$ -} - -# Removes one personality trait from a character, ordered based on what makes more sense for a character to lose while in prison. -stress_prison_remove_ordered_personality_trait_effect = { - if = { - limit = { has_trait = forgiving } - remove_trait = forgiving - } - else_if = { - limit = { has_trait = trusting } - remove_trait = trusting - } - else_if = { - limit = { has_trait = lustful } - remove_trait = lustful - } - else_if = { - limit = { has_trait = arrogant } - remove_trait = arrogant - } - else_if = { - limit = { has_trait = gregarious } - remove_trait = gregarious - } - else_if = { - limit = { has_trait = ambitious } - remove_trait = ambitious - } - else_if = { - limit = { has_trait = impatient } - remove_trait = impatient - } - else_if = { - limit = { has_trait = diligent } - remove_trait = diligent - } - else_if = { - limit = { has_trait = temperate } - remove_trait = temperate - } - else_if = { - limit = { has_trait = generous } - remove_trait = generous - } - else_if = { - limit = { has_trait = compassionate } - remove_trait = compassionate - } - else_if = { - limit = { has_trait = zealous } - remove_trait = zealous - } - else_if = { - limit = { has_trait = brave } - remove_trait = brave - } - else_if = { - limit = { has_trait = calm } - remove_trait = calm - } - else_if = { - limit = { has_trait = just } - remove_trait = just - } - else_if = { - limit = { has_trait = fickle } - remove_trait = fickle - } - else_if = { - limit = { has_trait = stubborn } - remove_trait = stubborn - } - else_if = { - limit = { has_trait = content } - remove_trait = content - } - else_if = { - limit = { has_trait = honest } - remove_trait = honest - } - else_if = { - limit = { has_trait = gluttonous } - remove_trait = gluttonous - } - else_if = { - limit = { has_trait = chaste } - remove_trait = chaste - } - else_if = { - limit = { has_trait = greedy } - remove_trait = greedy - } - else_if = { - limit = { has_trait = deceitful } - remove_trait = deceitful - } - else_if = { - limit = { has_trait = cynical } - remove_trait = cynical - } - else_if = { - limit = { has_trait = shy } - remove_trait = shy - } - else_if = { - limit = { has_trait = lazy } - remove_trait = lazy - } - else_if = { - limit = { has_trait = patient } - remove_trait = patient - } - else_if = { - limit = { has_trait = arbitrary } - remove_trait = arbitrary - } - else_if = { - limit = { has_trait = humble } - remove_trait = humble - } - else_if = { - limit = { has_trait = wrathful } - remove_trait = wrathful - } - else_if = { - limit = { has_trait = sadistic } - remove_trait = sadistic - } - else_if = { - limit = { has_trait = callous } - remove_trait = callous - } - else_if = { - limit = { has_trait = vengeful } - remove_trait = vengeful - } - else_if = { - limit = { has_trait = paranoid } - remove_trait = paranoid - } - else_if = { - limit = { has_trait = craven } - remove_trait = craven - } -} - -# Removes one personality trait from a character, ordered based on what makes more sense for a character to lose while not in prison. -stress_unimprisoned_remove_ordered_personality_trait_effect = { - if = { - limit = { has_trait = ambitious } - remove_trait = ambitious - } - else_if = { - limit = { has_trait = just } - remove_trait = just - } - else_if = { - limit = { has_trait = brave } - remove_trait = brave - } - else_if = { - limit = { has_trait = diligent } - remove_trait = diligent - } - else_if = { - limit = { has_trait = gregarious } - remove_trait = gregarious - } - else_if = { - limit = { has_trait = zealous } - remove_trait = zealous - } - else_if = { - limit = { has_trait = calm } - remove_trait = calm - } - else_if = { - limit = { has_trait = temperate } - remove_trait = temperate - } - else_if = { - limit = { has_trait = generous } - remove_trait = generous - } - else_if = { - limit = { has_trait = compassionate } - remove_trait = compassionate - } - else_if = { - limit = { has_trait = forgiving } - remove_trait = forgiving - } - else_if = { - limit = { has_trait = honest } - remove_trait = honest - } - else_if = { - limit = { has_trait = content } - remove_trait = content - } - else_if = { - limit = { has_trait = patient } - remove_trait = patient - } - else_if = { - limit = { has_trait = trusting } - remove_trait = trusting - } - else_if = { - limit = { has_trait = arrogant } - remove_trait = arrogant - } - else_if = { - limit = { has_trait = impatient } - remove_trait = impatient - } - else_if = { - limit = { has_trait = stubborn } - remove_trait = stubborn - } - else_if = { - limit = { has_trait = fickle } - remove_trait = fickle - } - else_if = { - limit = { has_trait = lustful } - remove_trait = lustful - } - else_if = { - limit = { has_trait = gluttonous } - remove_trait = gluttonous - } - else_if = { - limit = { has_trait = greedy } - remove_trait = greedy - } - else_if = { - limit = { has_trait = chaste } - remove_trait = chaste - } - else_if = { - limit = { has_trait = shy } - remove_trait = shy - } - else_if = { - limit = { has_trait = deceitful } - remove_trait = deceitful - } - else_if = { - limit = { has_trait = cynical } - remove_trait = cynical - } - else_if = { - limit = { has_trait = lazy } - remove_trait = lazy - } - else_if = { - limit = { has_trait = humble } - remove_trait = humble - } - else_if = { - limit = { has_trait = wrathful } - remove_trait = wrathful - } - else_if = { - limit = { has_trait = callous } - remove_trait = callous - } - else_if = { - limit = { has_trait = vengeful } - remove_trait = vengeful - } - else_if = { - limit = { has_trait = sadistic } - remove_trait = sadistic - } - else_if = { - limit = { has_trait = arbitrary } - remove_trait = arbitrary - } - else_if = { - limit = { has_trait = paranoid } - remove_trait = paranoid - } - else_if = { - limit = { has_trait = craven } - remove_trait = craven - } -} - -stress_save_deceased_character_for_mental_break = { - if = { - limit = { - always = no - } - } - else = { - set_variable = { - name = mental_break_deceased_character - value = $TARGET$ - days = 14 - } - set_variable = { - name = mental_break_deceased_character_relation - value = flag:$FLAG$ - days = 14 - } - } -} \ No newline at end of file diff --git a/N3OW/common/scripted_effects/00_task_contract_scripted_effects.txt b/N3OW/common/scripted_effects/00_task_contract_scripted_effects.txt deleted file mode 100644 index 0f4436e5..00000000 --- a/N3OW/common/scripted_effects/00_task_contract_scripted_effects.txt +++ /dev/null @@ -1,35 +0,0 @@ -############# -# Task Contract Scripted Effects -############# - -################################################## -# General Effects - -laamp_base_contract_schemes_set_up_outcome_immediate_effect = { - scope:scheme = { - # Grab the right scopes. - task_contract = { - task_contract_employer = { - save_scope_as = employer - save_scope_as = bg_override_char - } - save_scope_value_as = { - name = task_contract_tier - value = task_contract_tier - } - } - } -} - -governor_contract_travel_or_progress_effect = { - if = { - limit = { location != $DESTINATION$ } - start_travel_plan = { - destination = $DESTINATION$ - on_arrival_event = $ARRIVAL_EVENT$ - on_travel_planner_cancel_event = governor_contract_event.1012 - on_arrival_destinations = all_but_last - } - } - else = { trigger_event = $ARRIVAL_EVENT$ } -} diff --git a/N3OW/common/scripted_effects/00_tax_rivalry_effects.txt b/N3OW/common/scripted_effects/00_tax_rivalry_effects.txt deleted file mode 100644 index 16eef1d9..00000000 --- a/N3OW/common/scripted_effects/00_tax_rivalry_effects.txt +++ /dev/null @@ -1,29 +0,0 @@ -# TAX RIVALRY EFFECTS - -# NOTE: This effect needs var:story_steward and var:tax_collector to be set -create_tax_rivalry_story_effect = { - if = { - limit = { - is_ai = no # Don't care about AI enough to trigger this cycle for them - government_has_flag = government_is_clan - exists = house - exists = var:story_steward - exists = var:story_tax_collector - } - create_story = story_cycle_tax_rivalry - } - else = { - clean_up_tax_rivalry_story_variables_effect = yes - } -} - -# Clears these redundant variables if the tax rivalry story cycle isn't ongoing -clean_up_tax_rivalry_story_variables_effect = { - if = { - limit = { - NOT = { any_owned_story = { type = story_cycle_tax_rivalry } } - } - remove_variable = story_steward - remove_variable = story_tax_collector - } -} diff --git a/N3OW/common/scripted_effects/00_title_effects.txt b/N3OW/common/scripted_effects/00_title_effects.txt deleted file mode 100644 index 9706b7a5..00000000 --- a/N3OW/common/scripted_effects/00_title_effects.txt +++ /dev/null @@ -1,87 +0,0 @@ -become_title_holder_effect = { - create_title_and_vassal_change = { - type = created - save_scope_as = title_change - add_claim_on_loss = no - } - $TITLE$ = { - change_title_holder = { - holder = root - change = scope:title_change - } - } - resolve_title_and_vassal_change = scope:title_change -} - -reduce_partition_succession_law_effect = { - if = { - limit = { - has_realm_law = single_heir_succession_law - } - add_realm_law = high_partition_succession_law - } - else_if = { - limit = { - has_realm_law = high_partition_succession_law - } - add_realm_law = partition_succession_law - } - else_if = { - limit = { - has_realm_law = partition_succession_law - } - add_realm_law = confederate_partition_succession_law - } -} - -asturias_becomes_leon_and_castille_effect = { - create_title_and_vassal_change = { - type = created - save_scope_as = title_change - add_claim_on_loss = no - } - title:k_leon = { - if = { - limit = { exists = scope:leon_char } - change_title_holder = { - holder = scope:leon_char - change = scope:title_change - } - } - copy_title_history = title:k_asturias - } - title:k_asturias = { - every_in_de_jure_hierarchy = { - limit = { tier = tier_duchy } - set_de_jure_liege_title = title:k_leon - } - hidden_effect = { - every_claimant = { - if = { - limit = { has_strong_claim_on = title:k_asturias } - remove_claim = title:k_asturias - add_pressed_claim = title:k_leon - } - else = { - remove_claim = title:k_asturias - add_unpressed_claim = title:k_leon - } - } - } - } - resolve_title_and_vassal_change = scope:title_change - # Destroy Asturias if appropriate. - if = { - limit = { exists = scope:leon_char } - scope:leon_char = { destroy_title = title:k_asturias } - } -} - -adjust_de_jure_effect = { - if = { - limit = { - completely_controls = $TITLE$ - } - $TITLE$ = { set_de_jure_liege_title = $DE_JURE$ } - } -} diff --git a/N3OW/common/scripted_effects/00_travel_effects.txt b/N3OW/common/scripted_effects/00_travel_effects.txt deleted file mode 100644 index b040c258..00000000 --- a/N3OW/common/scripted_effects/00_travel_effects.txt +++ /dev/null @@ -1,92 +0,0 @@ -mp_pause_travel_plan = { - hidden_effect = { - current_travel_plan ?= { - pause_travel_plan_mp = yes - } - } -} - -mp_resume_travel_plan = { - hidden_effect = { - if = { - limit = { has_multiple_players = yes } - current_travel_plan ?= { - resume_travel_plan = yes - } - } - } -} - -mp_delay_travel_plan = { - hidden_effect = { - if = { - limit = { has_multiple_players = yes } - current_travel_plan ?= { - delay_travel_plan = { - days = $DAYS$ - } - } - } - } -} - -food_poison_chance_effect = { - custom_tooltip = chance_of_food_poisoning - hidden_effect = { - random = { - chance = food_poison_value - contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = yes } - } - } -} - -add_poi_diplomacy_experience_effect = { - poi_lifestyle_experience_effect = { - LIFESTYLE = diplomacy - VALUE = travel_medium_xp - } -} - -add_poi_martial_experience_effect = { - poi_lifestyle_experience_effect = { - LIFESTYLE = martial - VALUE = travel_medium_xp - } -} - -add_poi_stewardship_experience_effect = { - poi_lifestyle_experience_effect = { - LIFESTYLE = stewardship - VALUE = travel_medium_xp - } -} - -add_poi_intrigue_experience_effect = { - poi_lifestyle_experience_effect = { - LIFESTYLE = intrigue - VALUE = travel_medium_xp - } -} - -add_poi_learning_experience_effect = { - poi_lifestyle_experience_effect = { - LIFESTYLE = learning - VALUE = travel_medium_xp - } -} - -add_poi_wanderer_experience_effect = { - if = { - limit = { - has_bp3_dlc_trigger = yes - } - poi_lifestyle_experience_effect = { - LIFESTYLE = wanderer - VALUE = travel_medium_xp - } - } -} - -poi_lifestyle_experience_effect = { - add_$LIFESTYLE$_lifestyle_xp = $VALUE$ -} diff --git a/N3OW/common/scripted_effects/00_tributary_setup_effects.txt b/N3OW/common/scripted_effects/00_tributary_setup_effects.txt deleted file mode 100644 index eb38bc2b..00000000 --- a/N3OW/common/scripted_effects/00_tributary_setup_effects.txt +++ /dev/null @@ -1,1537 +0,0 @@ -# This file contains the setup effects for the tributaries in the game. -# The setup_tributaries_effect is invoked by on_game_start and should make calls to subsequent scripted effects. -# Sections are organized by top-suzerain title. -# Note that existing vassals (as established in title history) must be released and recreated into tributaries before -# they can have their own tributaries. - -setup_tributaries_effect = { - if = { - limit = { has_mpo_dlc_trigger = yes } - if = { - limit = { current_date < 1066.9.15 } # so, 867 - mpo_867_tributary_setup_effect = yes - } - else_if = { - limit = { current_date = 1066.9.15 } - mpo_1066_tributary_setup_effect = yes - } - else_if = { - limit = { current_date > 1066.9.15 } # so, 1178 - mpo_1178_tributary_setup_effect = yes - } - } - if = { - limit = { has_tgp_dlc_trigger = yes } - if = { - limit = { current_date < 1066.9.15 } # so, 867 - tgp_867_tributary_setup_effect = yes - } - else_if = { - limit = { current_date = 1066.9.15 } - tgp_1066_tributary_setup_effect = yes - } - else_if = { - limit = { current_date > 1066.9.15 } # so, 1178 - tgp_1178_tributary_setup_effect = yes - } - } -} - -# $TRIBUTARY$ = the new tributary -# $SUZERAIN$ = their suzerain -# $WAR$ = determines if this was caused by war or agreement, yes or no -break_subject_contract_and_establish_tributary_effect = { - if = { - limit = { liege != this } - create_title_and_vassal_change = { - type = independency - save_scope_as = change - add_claim_on_loss = no - } - becomes_independent = { - change = scope:change - } - resolve_title_and_vassal_change = scope:change - } - start_tributary_interaction_effect = { - SUZERAIN = $SUZERAIN$ - TRIBUTARY = $TRIBUTARY$ - } -} - -mpo_867_tributary_setup_effect = { - - #### k_magyar - character:159137 = { # Almos Árpád of k_magyar - save_scope_as = suzerain - character:fictional_mogyers_1 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - - #### k_zhetysu - character:34872 = { # Bilge Karakhanid of k_zhetysu - save_scope_as = suzerain - character:188834 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:188852 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - - character:188834 = { - save_scope_as = suzerain - character:fictional_karluks_16 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_karluks_18 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - - #### k_oghuz_il - character:74031 = { # Kurush Yoishta of k_oghuz_il - save_scope_as = suzerain - character:fictional_turkish_5 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_turkish_7 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_turkish_9 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_turkish_10 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_turkish_11 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_turkish_13 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_turkish_31 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_turkish_33 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - character:fictional_turkish_7 = { - save_scope_as = suzerain - character:fictional_turkish_34 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - character:fictional_turkish_31 = { - save_scope_as = suzerain - character:fictional_turkish_8 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - character:fictional_turkish_11 = { # Cuneyd of c_mangyshalak - save_scope_as = suzerain - character:fictional_turkish_12 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - character:fictional_turkish_13 = { # Cuneyd of c_mangyshalak - save_scope_as = suzerain - character:fictional_turkish_32 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - - ### e_caspian-pontic_steppe - character:74025 = { # Manasseh Bulanid of e_caspian-pontic_steppe - save_scope_as = suzerain - character:180236 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:159128 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:160111 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:160112 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:6860 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:6834 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:302238 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:302235 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:159708 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:302276 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:163118= { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_khazars_11 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_khazars_12 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_khazars_14 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_pechenegs_2 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_pechenegs_10 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_alans_3 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - - #### e_kirghiz_khanate - character:303238 = { # Uzur Enisey Kyrgyz of e_kirghiz_khanate - save_scope_as = suzerain - character:302426 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:303104 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:303009 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:303288 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:303295 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:303308 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:302958 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:302952 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:303301 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:303220 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:303189 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:303180 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:302995 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:303255 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:303123 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_kirghiz_1 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_kirghiz_2 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - - - # herders - character:fictional_uriankhais_11 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_uriankhais_12 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_buryats_2 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_buryats_3 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_buryats_7 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_kirghiz_12 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_kirghiz_13 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_kirghiz_14 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_kirghiz_16 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_kirghiz_18 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_kirghiz_19 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - character:302426 = { - save_scope_as = suzerain - character:fictional_laktans_1 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_ostyaks_1 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_ostyaks_2 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_ostyaks_3 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - character:303308 = { - save_scope_as = suzerain - character:fictional_naimans_1 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - character:303189 = { - save_scope_as = suzerain - character:fictional_kirghiz_15 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - character:303180 = { - save_scope_as = suzerain - character:fictional_uriankhais_13 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - character:302995 = { - save_scope_as = suzerain - character:fictional_kirghiz_3 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_kirghiz_4 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_kirghiz_11 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - character:303255 = { # Bodonchar Munkhag of c_karabalgasun - save_scope_as = suzerain - character:fictional_mongols_11 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - character:303220 = { # Jakha Kereyid of d_ovorkhangai - save_scope_as = suzerain - character:fictional_keraits_5 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_mongols_1 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - character:303123 = { # Menggei Mergid of d_selenga_valley - save_scope_as = suzerain - character:fictional_mongols_10 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - character:303301 = { # Qatarqa Güchügüd of d_gobi_altai - save_scope_as = suzerain - character:fictional_naimans_12 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_mongols_12 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - - ### k_balhae - character:balhae_dae_12 = { # King Geon_hwang of k_balhae - save_scope_as = suzerain - character:jurchen_tieli_1 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:jurchen_odoli_01_fic = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:jurchen_tuowen_01_fic = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:mohe_funie_1 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:mohe_yuexi_1 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:mohe_yulou_1 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - - ### d_BAL_hoewon - character:jurchen_tuowen_01_fic = { - save_scope_as = suzerain - character:mohe_suhemo_1 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - - ### k_silla - character:balhae_dae_12 = { # King Eung-nyeom of k_silla - save_scope_as = suzerain - character:mohe_a_1 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } -} - -mpo_1066_tributary_setup_effect = { - - #### e_great_liao - character:194333 = { - save_scope_as = suzerain - character:303309 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:303226 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_naimans_4 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_naimans_5 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_naimans_11 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:303013 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:303083 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:303296 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:303062 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:303083 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_uriankhais_2 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_uriankhais_4 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_mongols_2 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_mongols_7 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_mongols_8 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:ruzhe_8 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:nn_yelu_zongyuan = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:303303 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:303314 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:303226 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:303267 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:303289 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:303131 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:nn_yelu_tieli_LUF = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:nn_xiao_yangliu = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - #Eastern tributaries, mostly Jurchens - character:balhae_dae_34 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:jurchen_wanyan_6 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:jurchen_jiagu_10_fic = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:jurchen_adian_10_fic = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:jurchen_tangkuo_10_fic = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:jurchen_nipanggu_10_fic = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:jurchen_tudan_10_fic = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:jurchen_yulou_8 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:jurchen_yuexi_8 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:jurchen_hesheli_10_fic = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - #Tribs in k_amur - character:jurchen_boli_10_fic = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:jurchen_boli_11_fic = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:jurchen_boli_12_fic = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - character:fictional_uriankhais_4 = { - save_scope_as = suzerain - character:fictional_uriankhais_10 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_uriankhais_3 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - character:303062 = { - save_scope_as = suzerain - character:fictional_mongols_9 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - character:303083 = { - save_scope_as = suzerain - character:fictional_uriankhais_1 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - character:303013 = { - save_scope_as = suzerain - character:fictional_oirats_2 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_buryats_1 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - - - #### k_zhetysu - character:144107 = { - save_scope_as = suzerain - character:fictional_karluks_12 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_karluks_13 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:3022 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:302790 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:188843 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - - character:188843 = { - save_scope_as = suzerain - character:188844 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - character:3022 = { - save_scope_as = suzerain - character:fictional_karluks_5 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_karluks_11 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_karluks_15 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - - #### k_pechenegs - character:20641 = { - save_scope_as = suzerain - character:fictional_pechenegs_8 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_pechenegs_9 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - - - #### k_caspian_steppe - character:806 = { - save_scope_as = suzerain - - character:302765 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:302584 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:302575 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:302596 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:302621 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:302762 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:228058 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:194447 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_kimeks_14 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_kimeks_18 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_kimeks_19 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_kimeks_21 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_kimeks_23 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_kimeks_25 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_kimeks_27 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_kimeks_28 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_turkish_16 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_turkish_17 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_turkish_18 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_turkish_19 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_turkish_20 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_cumans_15 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_cumans_16 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_kipchaks_4 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_kipchaks_28 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - - character:fictional_kipchaks_4 = { - save_scope_as = suzerain - character:fictional_kipchaks_7 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_kipchaks_27 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - character:fictional_kimeks_23 = { - save_scope_as = suzerain - character:fictional_kimeks_24 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_kimeks_54 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - character:fictional_kimeks_21 = { - save_scope_as = suzerain - character:fictional_kimeks_26 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - character:302762 = { - save_scope_as = suzerain - character:fictional_kimeks_22 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_kimeks_30 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_kimeks_53 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_kipchaks_11 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - character:fictional_kimeks_19 = { - save_scope_as = suzerain - character:fictional_kimeks_29 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - character:302621 = { - save_scope_as = suzerain - character:fictional_kipchaks_9 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - character:fictional_kimeks_14 = { - save_scope_as = suzerain - character:fictional_kimeks_13 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - character:302765 = { - save_scope_as = suzerain - character:fictional_kimeks_17 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - character:302596 = { - save_scope_as = suzerain - character:fictional_bashkirs_7 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_ostyaks_4 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - character:fictional_turkish_19 = { - save_scope_as = suzerain - character:fictional_kipchaks_10 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_kipchaks_25 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - character:fictional_turkish_17 = { - save_scope_as = suzerain - character:fictional_turkish_27 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - character:fictional_turkish_16 = { - save_scope_as = suzerain - character:fictional_turkish_15 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_turkish_28 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - - #### d_kargassia - - character:303046 = { - save_scope_as = suzerain - character:fictional_uriankhais_14 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - - #### e_goryeo - - character:194333 = { - save_scope_as = suzerain - character:jurchen_yalu_10_fic = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } -} - -mpo_1178_tributary_setup_effect = { - - #### k_caspian_steppe - character:228030 = { - save_scope_as = suzerain - character:302579 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:302606 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:302627 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:302782 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_kipchaks_16 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_kipchaks_17 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_kimeks_34 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_kimeks_35 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_kimeks_42 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - - # herders - character:fictional_cumans_9 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_cumans_10 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_cumans_11 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_cumans_12 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_cumans_13 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_cumans_14 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_kipchaks_13 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_kipchaks_14 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_kipchaks_19 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_kipchaks_20 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_bolghars_7 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_khazars_9 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_turkish_21 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - character:302627 = { - save_scope_as = suzerain - character:fictional_kipchaks_15 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_kipchaks_21 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - character:fictional_kimeks_35 = { - save_scope_as = suzerain - character:fictional_kimeks_51 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - character:fictional_kipchaks_16 = { - save_scope_as = suzerain - character:fictional_kipchaks_18 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - character:302606 = { - save_scope_as = suzerain - character:fictional_kimeks_32 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_kimeks_41 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - character:302782 = { - save_scope_as = suzerain - character:fictional_kimeks_33 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_kimeks_37 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_kimeks_38 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_kimeks_39 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_kimeks_40 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - - #### e_kara_khitai - character:188912 = { - save_scope_as = suzerain - character:fictional_karluks_7 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_karluks_8 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_karluks_22 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_kimeks_48 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:144122 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:karakhanid_1 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - - character:144122 = { - save_scope_as = suzerain - character:fictional_kipchaks_22 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_karluks_9 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:karakhanid_3 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - - #### k_naiman - character:naiman_guchugud_1 = { - save_scope_as = suzerain - character:fictional_naimans_6 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_naimans_7 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_naimans_8 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - - #### d_degelen - character:fictional_kimeks_44 = { - save_scope_as = suzerain - character:fictional_kimeks_45 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_kimeks_46 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_kimeks_49 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_kimeks_50 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - - #### d_khakass_hollow - character:303249 = { - save_scope_as = suzerain - character:fictional_kirghiz_28 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - - #### d_ovorkhangai - character:303211 = { - save_scope_as = suzerain - character:fictional_keraits_1 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_keraits_2 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - - #### d_khovsgol - character:303019 = { - save_scope_as = suzerain - character:303022 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:fictional_oirats_1 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - - #### d_selenga_valley - character:303142 = { - save_scope_as = suzerain - character:fictional_mongols_5 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - - #### e_andong - character:jurchen_wanyan_14 = { - save_scope_as = suzerain - character:jurchen_yulou_12 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:jurchen_yuexi_11 = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - #Tribs in k_amur - character:mohe_molihewen_20_fic = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:mohe_choripi_20_fic = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:mohe_wuguihai_20_fic = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:mohe_heishuiyang_20_fic = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:mohe_beihean_20_fic = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:mohe_vanda_20_fic = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:mohe_nimen_20_fic = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } -} - -tgp_867_tributary_setup_effect = { - title:h_china.holder = { - save_scope_as = suzerain - title:k_champa.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:k_silla.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:k_balhae.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:k_dzungaria.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:k_hexi.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_yinzhou_1.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:d_luoshi.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:d_shimen.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:d_luodian.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_yanchuan.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_juzhou.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:d_zangke.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:d_xiyuan.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_guile.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - #Srivijaya 867 - title:e_srivijaya.holder = { - save_scope_as = suzerain - title:c_SUM_bangka-belitung.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_SUM_east_sumatra.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_SUM_lampung.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_SUM_pasemah.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_SUM_bengkulu.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_SUM_lingga.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_SUM_dharmasraya.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_SUM_indragiri.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_SUM_meranti.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_SUM_kampar.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_SUM_muara_takus.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_SUM_pekanbaru.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_SUM_rokan.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_SUM_panai.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_SUM_lambri.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_MAL_gelanggi.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_MAL_johor.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_MAL_pahang.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_MAL_gangganegara.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_MAL_kedah.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_THAI_takua_pa.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_THAI_tambralinga.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:d_MAL_langkasuka.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_riau.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_JAV_sunda.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_JAV_galuh.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_JAV_cimanuk.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - #Borneo - title:d_BOR_tanjungpura.holder = { - save_scope_as = suzerain - title:c_BOR_sambas.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - #Silla - title:k_silla.holder = { - save_scope_as = suzerain - title:d_tamna.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_ulleong.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } -} - -tgp_1066_tributary_setup_effect = { - title:h_china.holder = { - save_scope_as = suzerain - title:k_dali.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:k_viet.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:k_dzungaria.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_yinzhou_1.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:d_shimen.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_zongzhou.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:d_luoshi.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_shaoqing.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:d_luodian.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_yanchuan.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_yanzhou_3.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_juzhou.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_guzhou.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:d_zangke.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_nanping.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_guile.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_tianzhou.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:d_xiyuan.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - title:k_viet.holder = { - save_scope_as = suzerain - title:k_champa.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - #Srivijaya 1066 - title:k_malayadvipa.holder = { - save_scope_as = suzerain - title:c_SUM_bangka-belitung.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_SUM_jambi.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_SUM_karang_brahi.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - #Melayu kingdom 1066 - title:d_SUM_jambi.holder = { - save_scope_as = suzerain - title:c_SUM_indragiri.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - #Chola tribs in Sumatra/Malaysia 1066 - title:k_tamilakam.holder = { - save_scope_as = suzerain - title:k_malayadvipa.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_SUM_panai.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_SUM_rokan.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_SUM_lambri.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_SUM_lingga.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - # - title:c_MAL_kedah.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_MAL_pahang.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_MAL_gangganegara.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - #Borneo - title:d_BOR_tanjungpura.holder = { - save_scope_as = suzerain - title:c_BOR_sambas.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } -} - -tgp_1178_tributary_setup_effect = { - title:h_china.holder = { - save_scope_as = suzerain - title:k_dali.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:k_viet.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - #Melayu kingdom/new Sanfoqi in Sumatra/Malaysia 1178 - title:d_SUM_jambi.holder = { - save_scope_as = suzerain - title:d_SUM_palembang.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_SUM_indragiri.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_SUM_minangkabau.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_SUM_lambri.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - #Tribs in Sumatra 1178 - title:d_SUM_riau.holder = { - save_scope_as = suzerain - title:c_SUM_pekanbaru.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - #Tribs of Kediri 1178 - title:d_JAV_mataram.holder = { - save_scope_as = suzerain - title:c_JAV_lumajang.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_JAV_madura.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_IDO_bali.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - title:c_SuMa_ternate.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - #Borneo - title:d_BOR_tanjungpura.holder = { - save_scope_as = suzerain - title:c_BOR_sambas.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - title:d_BOR_nan_sarunai.holder = { - save_scope_as = suzerain - title:c_BOR_banjar.holder = { - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } -} - -base_867_tributary_setup_effect = { - - character:34014 = { # Caliph ak-Mu'tazz ibn al-Mutawakkil (Abbasid) of the Abbasid Empire - save_scope_as = suzerain - character:41505 = { # Prince Ashot (Bagratuni) of Armenian Principality (Subjugated Tributary) - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:163115 = { # Sultan Ahmad ibn Tulun (Tulunid) of the Tulunid Sultanate - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - - character:163115 = { # Sultan Ahmad ibn Tulun (Tulunid) of the Tulunid Sultanate - save_scope_as = suzerain - character:31720 = { # Petty King Zakharias III (Azim) of Makuria - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - - character:1700 = { # Basileus Basileios (Makedon) of the Byzantine Empire - save_scope_as = suzerain - character:184026 = { # Serene Doge Orso (Participazio) of Venice (Subjugated Tributary) - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:303450 = { # Count Miroslav (Bar) of Duklja (Subjugated Tributary) - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:303449 = { # Count Uros (Trebinje) of Travunija (Subjugated Tributary) - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:303447 = { # Count Pavel (Blagaj) of Zahumlje (Subjugated Tributary) - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:303448 = { # Count Gjin (Mokro) of Paganija (Subjugated Tributary) - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:145120 = { # Doux Amphilochios (Radenos) of Dalmatia (Subjugated Tributary) - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - - character:90107 = { # King Ludwig II (Karling) of East Francia - save_scope_as = suzerain - character:184001 = { # Chieftain Msciwoj (Obodrytow) of Liubice - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:168582 = { # High Chieftain Mscislav (Hevelli) of Luticia - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } -} - -base_1066_tributary_setup_effect = { - character:107500 = { # King Sancho II (Jimena) of Castille - save_scope_as = suzerain - character:3924 = { # Emir Yahya ibn al-Zafir (Dhunnunid) of Tulaytulah - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - tributary_contract_set_obligation_level = { type = default_tributary_taxes level = 1 } - } - character:45016 = { # Emir Badis ibn Habus (Zirid) of Garnatah - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - tributary_contract_set_obligation_level = { type = default_tributary_taxes level = 1 } - } - } - - character:108500 = { # King Alfonso VI (Jimena) of Leon - save_scope_as = suzerain - character:3900 = { # Emir al-Muzaffar ibn al-Mansur (Aftasid) of Batalyaws - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - tributary_contract_set_obligation_level = { type = default_tributary_taxes level = 1 } - } - character:3212 = { # Emir al-Mu'tadid ibn Muhammad (Abbadid) of Isbiliyyah - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - tributary_contract_set_obligation_level = { type = default_tributary_taxes level = 1 } - } - } - - character:110500 = { # King Sancho Remiriz (Aragon) of Aragon - save_scope_as = suzerain - character:3934 = { # Emir al-Muqtadir ibn al-Musta'in (Hudid) of Saraqustah - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - tributary_contract_set_obligation_level = { type = default_tributary_taxes level = 1 } - } - character:3938 = { # Sheikh al-Muzaffar II ibn al-Musta'in (Hudid) of Laridah - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - tributary_contract_set_obligation_level = { type = default_tributary_taxes level = 1 } - } - } - - character:3096 = { # Caliph al-Mustansir ibn az-Zahir (Fatimid) of the Fatimid Sultanate - save_scope_as = suzerain - character:20572 = { # Petty King Georgios III (Azim) of Makuria - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } -} - -base_1178_tributary_setup_effect = { - character:204500 = { # King Henry II (Plantagenet) of England - save_scope_as = suzerain - character:202999 = { # King William (Dunkeld) of Scotland - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - - character:201510 = { # King Valdemar (Estrid) of Denmark - save_scope_as = suzerain - character:221735 = { # Count Jaromar (Wizlawid) of Rana - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - - character:226000 = { # Sultan Salah al-Dun Yusuf Ayyubid of the Ayyubid Sultanate - save_scope_as = suzerain - character:31729 = { # Petty King Basileios II (Azim) of Makuria - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } - - character:215530 = { # Basileus Manuel (Komnenos) of the Byzantine Empire - save_scope_as = suzerain - character:218500 = { # Duke Stefan Zavidic (Nemanjic) of Raska - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - character:223750 = { # Duke Bohemond III of (Poitiers-Antioch) of Antioch - break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:suzerain TRIBUTARY = this } - } - } -} diff --git a/N3OW/common/scripted_effects/00_unity_effects.txt b/N3OW/common/scripted_effects/00_unity_effects.txt deleted file mode 100644 index ab843e4f..00000000 --- a/N3OW/common/scripted_effects/00_unity_effects.txt +++ /dev/null @@ -1,228 +0,0 @@ -########################## -# UNITY EFFECTS -########################## - -# This is a general effect to make you able to impact House Unity. -# The following scopes are needed: -# CHARACTER - The character doing the "action" that changes unity (usually scope:actor or ROOT) -# TARGET - The character being targeted by the "action" -# VALUE - How much unity should change (there are scripted values for these) -# DESC - A description of what CHARACTER did -#add_clan_unity_interaction_effect = { -# if = { -# limit = { # Check if unity is relevant -# $CHARACTER$ = { government_has_flag = government_is_clan } -# $TARGET$ = { government_has_flag = government_is_clan } -# exists = $CHARACTER$.house -# exists = $TARGET$.house -# $CHARACTER$.house = $TARGET$.house -# } -# -# # Save scopes for localisation -# $CHARACTER$ = { save_scope_as = unity_character } -# $TARGET$ = { save_scope_as = unity_target } -# -# $CHARACTER$.house = { -# save_scope_as = character_house -# -# add_unity_value = { -# value = { -# value = $VALUE$ -# if = { # House heads have a larger impact on unity -# limit = { house_head = $CHARACTER$ } -# multiply = unity_house_head_multiplier_value -# } -# } -# character = $CHARACTER$ -# desc = $DESC$ -# } -# } -# } -#} - -# Used in the following events: -# vassal_interaction.0002 -# vassal_interaction.0003 -# vassal_interaction.0004 -stop_attacker_vassal_war_add_clan_unity_effect = { - # If we are clan, we want to affect unity, but only during certain situations... - if = { - limit = { # If we are asking a non-house member to stop attacking a house member, gain unity - exists = scope:actor.house - exists = scope:recipient.house - scope:recipient.house != scope:actor.house - } - add_clan_unity_interaction_effect = { - CHARACTER = scope:actor - TARGET = scope:defender - VALUE = medium_unity_gain - DESC = clan_unity_aided_in_war.desc - REVERSE_NON_HOUSE_TARGET = no - } - } - else_if = { - limit = { # If we are asking a house member to stop attacking a non-house member, lose unity - exists = scope:actor.house - exists = scope:defender.house - scope:defender.house != scope:actor.house - } - add_clan_unity_interaction_effect = { - CHARACTER = scope:actor - TARGET = scope:recipient - VALUE = medium_unity_loss - DESC = clan_unity_stopped_vassal_war.desc - REVERSE_NON_HOUSE_TARGET = no - } - } -} - -# Used in the following events: -# vassal_interaction.0012 -# vassal_interaction.0013 -# vassal_interaction.0014 -stop_defender_vassal_war_add_clan_unity_effect = { - # If we are clan, we want to affect unity, but only during certain situations... - if = { - limit = { # If recipient is a house member and the attacker is not, lose unity - exists = scope:actor.house - exists = scope:attacker.house - scope:attacker.house != scope:actor.house - } - add_clan_unity_interaction_effect = { - CHARACTER = scope:actor - TARGET = scope:recipient - VALUE = medium_unity_loss - DESC = clan_unity_stop_defender_vassal_war.desc - REVERSE_NON_HOUSE_TARGET = no - } - } - else_if = { - limit = { # If recipient is a non-house member and the attacker is, gain unity - exists = scope:actor.house - exists = scope:recipient.house - scope:recipient.house != scope:actor.house - } - add_clan_unity_interaction_effect = { - CHARACTER = scope:actor - TARGET = scope:attacker - VALUE = medium_unity_gain - DESC = clan_unity_aided_in_war.desc - REVERSE_NON_HOUSE_TARGET = no - } - } -} - -refuse_call_to_arms_add_clan_unity_effect = { - add_clan_unity_interaction_effect = { - CHARACTER = scope:actor - TARGET = scope:recipient - VALUE = medium_unity_loss - DESC = clan_unity_call_to_war_decline.desc - REVERSE_NON_HOUSE_TARGET = no - } -} - -accept_faith_conversion_add_clan_unity_effect = { - # If we are clan, we want to affect unity when converting another house member to our faith... - if = { # But you only gain unity if you are converting a member TO the house's primary faith - limit = { - exists = scope:actor.house - scope:actor.house = { - any_house_member = { - percent >= 0.6 - faith = scope:actor.faith - } - } - } - add_clan_unity_interaction_effect = { - CHARACTER = scope:actor - TARGET = scope:recipient - VALUE = minor_unity_gain - DESC = clan_unity_conversion_accepted.desc - REVERSE_NON_HOUSE_TARGET = no - } - } - else_if = { # If you are converting them AWAY from the primary faith, lose unity - limit = { - exists = scope:actor.house - scope:actor.house = { - any_house_member = { - percent >= 0.6 - faith = scope:recipient.faith - } - } - } - add_clan_unity_interaction_effect = { - CHARACTER = scope:actor - TARGET = scope:recipient - VALUE = medium_unity_loss - DESC = clan_unity_conversion_accepted.desc - REVERSE_NON_HOUSE_TARGET = no - } - } -} - -refuse_faith_conversion_add_clan_unity_effect = { - # If we are clan, we want to affect unity when we fail to convert another house member to our faith... - if = { # If target declines to convert TO the house's primary faith, lose unity - limit = { - exists = scope:actor.house - scope:actor.house = { - any_house_member = { - percent >= 0.6 - faith = scope:actor.faith - } - } - } - add_clan_unity_interaction_effect = { - CHARACTER = scope:actor - TARGET = scope:recipient - VALUE = medium_unity_loss - DESC = clan_unity_conversion_declined.desc - REVERSE_NON_HOUSE_TARGET = no - } - } - else_if = { # If target declines to convert while BEING of the primary faith, gain unity - limit = { - exists = scope:actor.house - scope:actor.house = { - any_house_member = { - percent >= 0.6 - faith = scope:recipient.faith - } - } - } - add_clan_unity_interaction_effect = { - CHARACTER = scope:actor - TARGET = scope:recipient - VALUE = minor_unity_gain - DESC = clan_unity_conversion_declined.desc - REVERSE_NON_HOUSE_TARGET = no - } - } -} - -notify_players_about_unity_change_effect = { - # Notify human players if they are not involved! - $CHARACTER$.house = { - every_house_member = { - limit = { - is_ai = no - NOT = { this = $CHARACTER$ } - NOT = { this = $TARGET$ } - } - $CHARACTER$ = { save_scope_as = actor } - - send_interface_message = { - type = event_generic_neutral_text - title = unity_changed_title - desc = { - desc = unity_changed_desc - desc = $DESC$ - } - left_icon = $CHARACTER$ - right_icon = $TARGET$ - } - } - } -} diff --git a/N3OW/common/scripted_effects/00_wanderer_lifestyle_effects.txt b/N3OW/common/scripted_effects/00_wanderer_lifestyle_effects.txt deleted file mode 100644 index 64708d23..00000000 --- a/N3OW/common/scripted_effects/00_wanderer_lifestyle_effects.txt +++ /dev/null @@ -1,1039 +0,0 @@ -# Effects used in the Wanderer Lifestyle - -visiting_poi_effect = { - if = { # Offa's Dyke - limit = { - OR = { - scope:province = province:1632 - scope:province = province:1633 - scope:province = province:1634 - scope:province = province:1648 - scope:province = province:1646 - scope:province = province:1643 - } - } - visiting_poi_variable_effect = { PROVINCE = province:1632 } - visiting_poi_variable_effect = { PROVINCE = province:1633 } - visiting_poi_variable_effect = { PROVINCE = province:1634 } - visiting_poi_variable_effect = { PROVINCE = province:1648 } - visiting_poi_variable_effect = { PROVINCE = province:1646 } - visiting_poi_variable_effect = { PROVINCE = province:1643 } - } - else_if = { # Hadrian's Wall - limit = { - OR = { - scope:province = province:8780 - scope:province = province:1635 - scope:province = province:1611 - scope:province = province:1609 - } - } - visiting_poi_variable_effect = { PROVINCE = province:8780 } - visiting_poi_variable_effect = { PROVINCE = province:1635 } - visiting_poi_variable_effect = { PROVINCE = province:1611 } - visiting_poi_variable_effect = { PROVINCE = province:1609 } - } - else_if = { # Danevirke - limit = { - OR = { - scope:province = province:62 - scope:province = province:84 - } - } - visiting_poi_variable_effect = { PROVINCE = province:62 } - visiting_poi_variable_effect = { PROVINCE = province:84 } - } - else_if = { # Great Wall of Gorgan - limit = { - OR = { - scope:province = province:4031 - scope:province = province:4030 - } - } - visiting_poi_variable_effect = { PROVINCE = province:4031 } - visiting_poi_variable_effect = { PROVINCE = province:4030 } - } - else = { - visiting_poi_variable_effect = { PROVINCE = scope:province } - } -} - -visiting_poi_variable_effect = { - add_to_variable_list = { - name = visited_poi - target = $PROVINCE$ - } -} - -visiting_monument_exploration_effect = { - if = { # Offa's Dyke - limit = { - OR = { - scope:province = province:1632 - scope:province = province:1633 - scope:province = province:1634 - scope:province = province:1648 - scope:province = province:1646 - scope:province = province:1643 - } - } - visiting_monument_exploration_variable_effect = { PROVINCE = province:1632 } - visiting_monument_exploration_variable_effect = { PROVINCE = province:1633 } - visiting_monument_exploration_variable_effect = { PROVINCE = province:1634 } - visiting_monument_exploration_variable_effect = { PROVINCE = province:1648 } - visiting_monument_exploration_variable_effect = { PROVINCE = province:1646 } - visiting_monument_exploration_variable_effect = { PROVINCE = province:1643 } - } - else_if = { # Hadrian's Wall - limit = { - OR = { - scope:province = province:8780 - scope:province = province:1635 - scope:province = province:1611 - scope:province = province:1609 - } - } - visiting_monument_exploration_variable_effect = { PROVINCE = province:8780 } - visiting_monument_exploration_variable_effect = { PROVINCE = province:1635 } - visiting_monument_exploration_variable_effect = { PROVINCE = province:1611 } - visiting_monument_exploration_variable_effect = { PROVINCE = province:1609 } - } - else_if = { # Danevirke - limit = { - OR = { - scope:province = province:62 - scope:province = province:84 - } - } - visiting_monument_exploration_variable_effect = { PROVINCE = province:62 } - visiting_monument_exploration_variable_effect = { PROVINCE = province:84 } - } - else_if = { # Great Wall of Gorgan - limit = { - OR = { - scope:province = province:4031 - scope:province = province:4030 - } - } - visiting_monument_exploration_variable_effect = { PROVINCE = province:4031 } - visiting_monument_exploration_variable_effect = { PROVINCE = province:4030 } - } - else = { - visiting_monument_exploration_variable_effect = { PROVINCE = scope:province } - } -} - -visiting_monument_exploration_variable_effect = { - add_to_variable_list = { - name = visited_monument_exploration - target = $PROVINCE$ - } -} - -wanderer_lifestyle_destination_effect = { - root = { - if = { - limit = { - OR = { - has_focus = wanderer_destination_focus - has_perk = finally_there_perk - } - } - add_prestige = wanderer_destination_prestige_value_with_effects - } - finally_there_stress_loss_effect = yes - } -} - -point_of_interest_prestige_effect = { - root = { - add_prestige = point_of_interest_prestige_value - finally_there_stress_loss_effect = yes - } -} - -finally_there_stress_loss_effect = { - root = { - if = { - limit = { - has_perk = finally_there_perk - } - if = { - limit = { - has_perk = been_there_done_that_perk - } - stress_impact = { base = -7 } - } - else = { stress_impact = { base = -5 } } - } - } -} - -local_arbitration_effect = { - root = { - send_interface_message = { - type = msg_county_corruption_good_increase_control - title = local_arbitration_key - left_icon = current_location.county - right_icon = root - - prev = { - remove_county_modifier = $COUNTY_MODIFIER$ - } - } - } -} - -local_arbitration_positive_effect = { - root = { - send_interface_message = { - type = event_generic_good - title = local_arbitration_key - left_icon = root.location.county - right_icon = root - - prev = { - add_county_modifier = { - modifier = $COUNTY_MODIFIER$ - years = 10 - } - } - } - } - hidden_effect = { - if = { - limit = { - root.location.county.holder != root - } - root.location.county.holder = { - send_interface_message = { - type = event_generic_good - title = local_arbitration_key - left_icon = root.location.county - right_icon = root - - show_as_tooltip = { - prev = { - add_county_modifier = { - modifier = $COUNTY_MODIFIER$ - years = 10 - } - } - } - } - } - } - } -} - -voyager_souvenirs_aplenty_effect = { - if = { - limit = { - has_perk = souvenirs_aplenty_perk - NOT = { location.barony ?= root.capital_barony } - location.county.development_level > root.capital_county.development_level - } - if = { - limit = { - has_variable = souvenirs_aplenty_var - } - change_variable = { - name = souvenirs_aplenty_var - add = { - add = voyager_souvenirs_aplenty_script_value - max = voyager_souvenirs_aplenty_max_value - } - } - } - else = { - set_variable = { - name = souvenirs_aplenty_var - value = voyager_souvenirs_aplenty_script_value - } - } - } -} - -voyager_souvenirs_aplenty_completion_effect = { - if = { - limit = { - has_perk = souvenirs_aplenty_perk - has_variable = souvenirs_aplenty_var - } - send_interface_toast = { - type = event_generic_good - title = souvenirs_aplenty_perk_title_message - - root.capital_county = { - change_development_progress_with_overflow = root.var:souvenirs_aplenty_var - } - } - remove_variable = souvenirs_aplenty_var - } -} - -voyager_gracious_host_impeccable_guest_effect = { - if = { - limit = { - has_perk = gracious_host_impeccable_guest_perk - exists = root.location.barony.holder - this != root.location.barony.holder - root.location.barony.holder.capital_barony = root.location.barony - } - root.location.barony.holder = { - add_opinion = { - modifier = impeccable_guest_opinion - opinion = 10 - target = root - } - } - } - if = { - limit = { - exists = root.location.barony.holder - this != root.location.barony.holder - root.location.barony.holder = { - has_perk = gracious_host_impeccable_guest_perk - } - } - add_opinion = { - modifier = gracious_host_opinion - opinion = 10 - target = root.location.barony.holder - } - } -} - -wayfarer_storyteller_fame_effect = { - if = { - limit = { - has_perk = roaming_perk - } - save_scope_value_as = { - name = fame_value - value = $VALUE$ - } - custom_tooltip = { - text = roaming_fame_reward_tt - add_prestige_experience = $VALUE$ - } - } -} - -wayfarer_the_real_threat_effect = { - ordered_councillor = { - limit = { - wayfarer_the_real_threat_trigger = yes - } - order_by = wayfarer_the_real_threat_value - position = $NUMBER$ - save_scope_as = threat_$NUMBER$ - } -} - -wayfarer_the_home_away_from_home_modifier_effect = { - if = { - limit = { - has_character_modifier = the_home_away_from_home_modifier - } - remove_character_modifier = the_home_away_from_home_modifier - } -} - -destination_remove_excursion_modifier_effect = { - if = { - limit = { - has_character_modifier = destination_excursion_safety_modifier - } - remove_character_modifier = destination_excursion_safety_modifier - } - else_if = { - limit = { - has_character_modifier = destination_excursion_speed_modifier - } - remove_character_modifier = destination_excursion_speed_modifier - } -} - -surveyor_perk_mustering_effect = { - if = { - limit = { - government_has_flag = government_is_settled - has_perk = mustering_the_troops_perk - location = { - exists = barony - barony.holder = root - has_stationed_regiment = yes - } - } - location = { - switch = { - trigger = has_stationed_regiment_of_base_type - skirmishers = { - add_province_modifier = { - modifier = mustered_skirmishers - years = 15 - } - } - archers = { - add_province_modifier = { - modifier = mustered_archers - years = 15 - } - } - light_cavalry = { - add_province_modifier = { - modifier = mustered_light_cavalry - years = 15 - } - } - pikemen = { - add_province_modifier = { - modifier = mustered_pikemen - years = 15 - } - } - heavy_infantry = { - add_province_modifier = { - modifier = mustered_heavy_infantry - years = 15 - } - } - siege_weapon = { - add_province_modifier = { - modifier = mustered_siege_weapon - years = 15 - } - } - heavy_cavalry = { - add_province_modifier = { - modifier = mustered_heavy_cavalry - years = 15 - } - } - elephant_cavalry = { - add_province_modifier = { - modifier = mustered_elephant_cavalry - years = 15 - } - } - camel_cavalry = { - add_province_modifier = { - modifier = mustered_camel_cavalry - years = 15 - } - } - archer_cavalry = { - add_province_modifier = { - modifier = mustered_archer_cavalry - years = 15 - } - } - } - } - } -} - -charting_the_realm_perk_effect = { - if = { - limit = { - has_perk = realm_charts_perk - OR = { - NOT = { has_variable_list = mapmaking_location_list } - NOT = { - is_target_in_variable_list = { - name = mapmaking_location_list - target = location - } - } - } - exists = location.county - location = { has_holding = yes } - OR = { #We save domain provinces, top lieges capital or direct vassals capitals at count tier or over - always by link comparisons - AND = { - location.county.holder = root - location.county != location.county.holder.capital_county - } - AND = { - top_liege != this - location.county.holder != root - root.top_liege = location.county.holder.top_liege - location = location.county.holder.top_liege.capital_province - } - AND = { - location.county.holder != root - location.county.holder.liege = root - location = location.county.holder.capital_province - } - } - } - add_to_variable_list = { - name = mapmaking_location_list - target = location - } - } -} - - -surveyor_tutor_child_effect = { - if = { - limit = { - location = { - exists = barony - barony.holder = root - } - current_travel_plan = { - has_travel_option = tutor_child_option - } - player_heir ?= { - NOT = { - is_target_in_variable_list = { - name = visited_domain_to_learn - target = location - } - } - OR = { - NOT = { has_variable_list = visited_domain_to_learn } - variable_list_size = { - name = visited_domain_to_learn - value < 8 - } - } - } - } - player_heir ?= { - if = { - limit = { - age < 15 - } - add_to_variable_list = { - name = visited_domain_to_learn - target = location - } - random_list = { - 15 = { - add_character_modifier = { - modifier = domain_tutoring_martial - } - } - 5 = { #Smaller chance of double boost, done as 2 boosts to maintain the right count for the maximum boost attainable - add_character_modifier = { - modifier = domain_tutoring_martial - } - add_character_modifier = { - modifier = domain_tutoring_martial - } - } - 15 = { - add_character_modifier = { - modifier = domain_tutoring_diplomacy - } - } - 5 = { #Smaller chance of double boost, done as 2 boosts to maintain the right count for the maximum boost attainable - add_character_modifier = { - modifier = domain_tutoring_diplomacy - } - add_character_modifier = { - modifier = domain_tutoring_diplomacy - } - } - 15 = { - add_character_modifier = { - modifier = domain_tutoring_intrigue - } - } - 5 = { #Smaller chance of double boost, done as 2 boosts to maintain the right count for the maximum boost attainable - add_character_modifier = { - modifier = domain_tutoring_intrigue - } - add_character_modifier = { - modifier = domain_tutoring_intrigue - } - } - 15 = { - add_character_modifier = { - modifier = domain_tutoring_stewardship - } - } - 5 = { #Smaller chance of double boost, done as 2 boosts to maintain the right count for the maximum boost attainable - add_character_modifier = { - modifier = domain_tutoring_stewardship - } - add_character_modifier = { - modifier = domain_tutoring_stewardship - } - } - 15 = { - add_character_modifier = { - modifier = domain_tutoring_learning - } - } - 5 = { #Smaller chance of double boost, done as 2 boosts to maintain the right count for the maximum boost attainable - add_character_modifier = { - modifier = domain_tutoring_learning - } - add_character_modifier = { - modifier = domain_tutoring_learning - } - } - } - } - } - } -} - -surveyor_no_stone_unturned_perk_effect = { - if = { - limit = { - OR = { - AND = { - has_perk = no_stone_unturned_perk - government_has_flag = government_is_settled - } - AND = { - has_perk = know_your_land_know_your_people_perk - government_has_flag = government_is_nomadic - } - } - this = scope:host - exists = location.county - location.county.holder = root - } - if = { - limit = { - location.county = { - NOR = { - has_county_modifier = no_stone_unturned_perk_modifier - has_county_modifier = no_stone_unturned_boosted_perk_modifier - } - } - } - if = { - limit = { - has_perk = personal_touch_perk #Increased effect - } - send_interface_toast = { - type = event_generic_good - title = no_stone_unturned_perk_modifier - - location.county = { - add_county_modifier = { - modifier = no_stone_unturned_boosted_perk_modifier - years = 10 - } - if = { - limit = { - scope:host = { government_has_flag = government_is_nomadic } - } - change_county_fertility = 15 - } - else = { - change_development_progress_with_overflow = 75 - } - } - } - } - else = { #Standard Effect - send_interface_toast = { - type = event_generic_good - title = no_stone_unturned_perk_modifier - - location.county = { - add_county_modifier = { - modifier = no_stone_unturned_perk_modifier - years = 10 - } - if = { - limit = { - scope:host = { government_has_flag = government_is_nomadic } - } - change_county_fertility = 10 - } - else = { - change_development_progress_with_overflow = 50 - } - } - } - } - } - else = { - location.county = { save_scope_as = perk_county } - send_interface_toast = { - type = event_generic_good - title = no_stone_unturned_perk_cooldown_title_message - custom_description_no_bullet = { - text = no_stone_unturned_perk_cooldown_message - } - } - } - } -} - -local_adjudicate_effect = { - if = { - limit = { - has_county_corruption_trigger = yes - } - switch = { - trigger = has_county_modifier - county_corruption_inefficient_tax_collection_modifier = { local_arbitration_effect = { COUNTY_MODIFIER = county_corruption_inefficient_tax_collection_modifier } } - county_corruption_deserting_levies_modifier = { local_arbitration_effect = { COUNTY_MODIFIER = county_corruption_deserting_levies_modifier } } - county_corruption_smuggling_ring_modifier = { local_arbitration_effect = { COUNTY_MODIFIER = county_corruption_smuggling_ring_modifier } } - county_corruption_bandits_rampant_modifier = { local_arbitration_effect = { COUNTY_MODIFIER = county_corruption_bandits_rampant_modifier } } - county_corruption_inefficient_census_modifier = { local_arbitration_effect = { COUNTY_MODIFIER = county_corruption_inefficient_census_modifier } } - county_corruption_lack_of_sheriffs_modifier = { local_arbitration_effect = { COUNTY_MODIFIER = county_corruption_lack_of_sheriffs_modifier } } - county_corruption_lack_of_courts_modifier = { local_arbitration_effect = { COUNTY_MODIFIER = county_corruption_lack_of_courts_modifier } } - county_corruption_thieves_guild_modifier = { local_arbitration_effect = { COUNTY_MODIFIER = county_corruption_thieves_guild_modifier } } - county_corruption_unsafe_highways_modifier = { local_arbitration_effect = { COUNTY_MODIFIER = county_corruption_unsafe_highways_modifier } } - county_corruption_uncooperative_guilds_modifier = { local_arbitration_effect = { COUNTY_MODIFIER = county_corruption_uncooperative_guilds_modifier } } - county_corruption_lackluster_administration_modifier = { local_arbitration_effect = { COUNTY_MODIFIER = county_corruption_lackluster_administration_modifier } } - county_corruption_roaming_bandits_modifier = { local_arbitration_effect = { COUNTY_MODIFIER = county_corruption_roaming_bandits_modifier } } - county_corruption_wild_beast_attacks_modifier = { local_arbitration_effect = { COUNTY_MODIFIER = county_corruption_wild_beast_attacks_modifier } } - county_corruption_upset_shepherds_modifier = { local_arbitration_effect = { COUNTY_MODIFIER = county_corruption_upset_shepherds_modifier } } - county_corruption_rogue_warriors_modifier = { local_arbitration_effect = { COUNTY_MODIFIER = county_corruption_rogue_warriors_modifier } } - county_corruption_unruly_nomads_modifier = { local_arbitration_effect = { COUNTY_MODIFIER = county_corruption_unruly_nomads_modifier } } - } - } - else = { - random_list = { - 1 = { - local_arbitration_positive_effect = { COUNTY_MODIFIER = local_arbitration_modifier_1 } - } - 1 = { - local_arbitration_positive_effect = { COUNTY_MODIFIER = local_arbitration_modifier_2 } - } - 1 = { - local_arbitration_positive_effect = { COUNTY_MODIFIER = local_arbitration_modifier_3 } - } - } - } -} - -battle_poi_trait_effect = { - root = { - if = { - limit = { - NOT = { has_trait = $TRAIT$ } - } - send_interface_toast = { - title = poi_battles.learn - left_icon = root - - add_trait = $TRAIT$ - } - } - } -} - -battle_poi_maa_regiment_effect = { - scope:combat_location = { - set_variable = { - name = battle_poi_$NAME$ - } - } -} - -battle_poi_randomizer_effect = { - set_variable = { - name = battle_poi_randomizer_$NAME$ - } -} - -battle_poi_region_cooldown_effect = { - set_global_variable = { - name = battle_poi_$REGION$_cooldown - years = 25 - } -} - -mapmaking_mythical_lie_effect = { - random_list = { - 1 = { - save_scope_value_as = { - name = mythical_lie - value = flag:dragon - } - } - 1 = { - save_scope_value_as = { - name = mythical_lie - value = flag:unicorn - } - } - 1 = { - save_scope_value_as = { - name = mythical_lie - value = flag:dog_people - } - } - 1 = { - save_scope_value_as = { - name = mythical_lie - value = flag:basilisk - } - } - 1 = { - save_scope_value_as = { - name = mythical_lie - value = flag:giant_serpent - } - } - 1 = { - save_scope_value_as = { - name = mythical_lie - value = flag:horned_men - } - } - 1 = { - save_scope_value_as = { - name = mythical_lie - value = flag:amazons - } - } - 1 = { - save_scope_value_as = { - name = mythical_lie - value = flag:headless_men - } - } - 1 = { - save_scope_value_as = { - name = mythical_lie - value = flag:giants - } - } - 1 = { - save_scope_value_as = { - name = mythical_lie - value = flag:hoved_feeted_men - } - } - 1 = { - save_scope_value_as = { - name = mythical_lie - value = flag:giant_crabs - } - } - 1 = { - save_scope_value_as = { - name = mythical_lie - value = flag:cyclops - } - } - } -} - -reminiscing_event_effect = { - if = { - limit = { - reminiscing_event_trigger = yes - } - trigger_event = wanderer_lifestyle_events.25 - } -} - -local_guild_effect = { - random_list = { - 10 = { # Millers Guild (Watermills) - trigger = { - has_building_or_higher = watermills_01 - } - save_scope_value_as = { - name = local_guild_scope - value = 1 - } - } - 10 = { # Bakers Guild (Windmills) - trigger = { - has_building_or_higher = windmills_01 - } - save_scope_value_as = { - name = local_guild_scope - value = 2 - } - } - 10 = { # Fishmongers Guild (Port) - trigger = { - has_building_or_higher = common_tradeport_01 - } - save_scope_value_as = { - name = local_guild_scope - value = 3 - } - } - 10 = { # Shoemakers/Tanners/Tailors/Weavers Guild (Cattle Pastures) - trigger = { - has_building_or_higher = pastures_01 - } - random_list = { - 10 = { - save_scope_value_as = { - name = local_guild_scope - value = 4 - } - } - 10 = { - save_scope_value_as = { - name = local_guild_scope - value = 5 - } - } - 10 = { - save_scope_value_as = { - name = local_guild_scope - value = 6 - } - } - 10 = { - save_scope_value_as = { - name = local_guild_scope - value = 7 - } - } - } - } - 10 = { # Butchers/Furriers/Skinners Guild (Hunting Grounds) - trigger = { - has_building_or_higher = hunting_grounds_01 - } - random_list = { - 10 = { - save_scope_value_as = { - name = local_guild_scope - value = 8 - } - } - 10 = { - save_scope_value_as = { - name = local_guild_scope - value = 9 - } - } - 10 = { - save_scope_value_as = { - name = local_guild_scope - value = 10 - } - } - } - } - 10 = { # Vintners Guild (Orchards) - trigger = { - has_building_or_higher = orchards_01 - } - save_scope_value_as = { - name = local_guild_scope - value = 11 - } - } - 10 = { # Carpenters Guild (Logging Camps) - trigger = { - has_building_or_higher = logging_camps_01 - } - save_scope_value_as = { - name = local_guild_scope - value = 12 - } - } - 10 = { # Masons/Miners Guild (Quarries) - trigger = { - has_building_or_higher = quarries_01 - } - random_list = { - 10 = { - save_scope_value_as = { - name = local_guild_scope - value = 13 - } - } - 10 = { - save_scope_value_as = { - name = local_guild_scope - value = 14 - } - } - } - } - 10 = { # Blacksmiths Guild (Blacksmith) - trigger = { - has_building_or_higher = smiths_01 - } - save_scope_value_as = { - name = local_guild_scope - value = 15 - } - } - 10 = { # Saddlers Guild (Stables) - trigger = { - has_building_or_higher = stables_01 - } - save_scope_value_as = { - name = local_guild_scope - value = 16 - } - } - 10 = { # Merchants Guild (Guild Halls) - trigger = { - has_building_or_higher = guild_halls_01 - } - save_scope_value_as = { - name = local_guild_scope - value = 17 - } - } - 10 = { # Physicians/Pharmacists Guild (Hospices) - trigger = { - has_building_or_higher = hospices_01 - } - random_list = { - 10 = { - save_scope_value_as = { - name = local_guild_scope - value = 18 - } - } - 10 = { - save_scope_value_as = { - name = local_guild_scope - value = 19 - } - } - } - } - 10 = { # Toolmakers Guild (Workshops) - trigger = { - has_building_or_higher = workshops_01 - } - save_scope_value_as = { - name = local_guild_scope - value = 20 - } - } - } -} - -local_guild_reward_effect = { - switch = { - trigger = scope:local_guild_scope - 1 = { add_building = watermills_01 } - 2 = { add_building = windmills_01 } - 3 = { add_building = common_tradeport_01 } - 4 = { add_building = pastures_01 } - 5 = { add_building = pastures_01 } - 6 = { add_building = pastures_01 } - 7 = { add_building = pastures_01 } - 8 = { add_building = hunting_grounds_01 } - 9 = { add_building = hunting_grounds_01 } - 10 = { add_building = hunting_grounds_01 } - 11 = { add_building = orchards_01 } - 12 = { add_building = logging_camps_01 } - 13 = { add_building = quarries_01 } - 14 = { add_building = quarries_01 } - 15 = { add_building = smiths_01 } - 16 = { add_building = stables_01 } - 17 = { add_building = guild_halls_01 } - 18 = { add_building = hospices_01 } - 19 = { add_building = hospices_01 } - 20 = { add_building = workshops_01 } - } -} diff --git a/N3OW/common/scripted_effects/00_wanderer_perk_effects.txt b/N3OW/common/scripted_effects/00_wanderer_perk_effects.txt deleted file mode 100644 index 1f8470b3..00000000 --- a/N3OW/common/scripted_effects/00_wanderer_perk_effects.txt +++ /dev/null @@ -1,22 +0,0 @@ - -# Effects used by Perks in the Wanderer Lifestyle -of_the_people_effect = { - if = { - limit = { - exists = location.county - is_ruler = yes - has_perk = of_the_people_perk - OR = { - location.county.holder ?= root - location.county.holder.liege ?= root - location.county.holder.top_liege ?= root - } - } - location.county = { - add_county_modifier = { - modifier = of_the_people_perk_modifier - years = 2 - } - } - } -} diff --git a/N3OW/common/scripted_effects/00_war_effects.txt b/N3OW/common/scripted_effects/00_war_effects.txt deleted file mode 100644 index ac5154fe..00000000 --- a/N3OW/common/scripted_effects/00_war_effects.txt +++ /dev/null @@ -1,3060 +0,0 @@ - -##################################################################### -# EFFECT LIST -##################################################################### -# !!! Remember to add all new effects with a short description here !!! - -# on_declared_war -# -# [...] -# -# send_captured_combatant_message: Sends the specified message to a character about a combatant being captured after a battle. -# send_slain_combatant_message: Sends the specified message to a character about a combatant being slain after (or in) a battle. -# add_truce_attacker_victory_effect: Used to set truces in a CB's on_victory -# add_truce_white_peace_effect: Used to set truces in a CB's on_white_peace -# add_truce_attacker_defeat_effect: Used to set truces in a CB's on_defeat - - -##################################################################### -# EFFECTS -##################################################################### - -on_declared_war = { - ############################### - ##### Attacker music - ############################### - if = { - limit = { - exists = scope:war # silence error when building description before war exists - scope:war = { using_holy_war_cb_trigger = yes } # going CB->war->is this war's CB a certain type->yes - } - scope:attacker = { play_music_cue = mx_cue_crusade_starts } - } - else_if = { - limit = { - exists = scope:war - has_mpo_dlc_trigger = yes - OR = { - scope:attacker = { - government_has_flag = government_is_nomadic - any_character_situation = { - this = situation:the_great_steppe - } - } - scope:defender = { - government_has_flag = government_is_nomadic - any_character_situation = { - this = situation:the_great_steppe - } - } - } - } - scope:attacker = { play_music_cue = mx_cue_the_khans_glory } - } - else_if = { - limit = { - exists = scope:war - OR = { - scope:attacker = { fp3_character_any_involvement_persian_struggle_trigger = yes } - scope:defender = { fp3_character_any_involvement_persian_struggle_trigger = yes } - } - } - scope:attacker = { play_music_cue = strugglewar_cue } - } - else_if = { - limit = { - exists = scope:war - OR = { - scope:attacker = { fp2_character_any_involvement_iberian_struggle_trigger = yes } - scope:defender = { fp2_character_any_involvement_iberian_struggle_trigger = yes } - } - } - scope:attacker = { play_music_cue = mx_IberiaWar } - } - else_if = { - limit = { - exists = scope:war - scope:attacker = { fp1_is_norse_tribal = yes } - } - scope:attacker = { play_music_cue = mx_raid } - } - else = { - scope:attacker = { play_music_cue = mx_cue_war_declared } - } - ############################### - ##### Defender music - ############################### - if = { - limit = { - exists = scope:war - OR = { - scope:attacker = { fp2_character_any_involvement_iberian_struggle_trigger = yes } - scope:defender = { fp2_character_any_involvement_iberian_struggle_trigger = yes } - } - } - scope:defender = { play_music_cue = mx_IberiaWar } - } - else_if = { - limit = { - exists = scope:war - has_mpo_dlc_trigger = yes - OR = { - scope:attacker = { - government_has_flag = government_is_nomadic - any_character_situation = { - this = situation:the_great_steppe - } - } - scope:defender = { - government_has_flag = government_is_nomadic - any_character_situation = { - this = situation:the_great_steppe - } - } - } - } - scope:defender = { play_music_cue = mx_cue_the_khans_glory } - } - else_if = { - limit = { - exists = scope:war - OR = { - scope:attacker = { fp3_character_any_involvement_persian_struggle_trigger = yes } - scope:defender = { fp3_character_any_involvement_persian_struggle_trigger = yes } - } - } - scope:defender = { play_music_cue = strugglewar_cue } - } - else_if = { - limit = { - exists = scope:war - scope:attacker = { fp1_is_norse_tribal = yes } - } - scope:defender = { play_music_cue = mx_raid } - } - - else = { - scope:defender = { - play_music_cue = mx_cue_war_declared - } - } - - ############################### - ##### Effects - ############################### - - #There is no fighting in the admin room! - if = { - limit = { - scope:attacker = { - OR = { - government_has_flag = government_is_feudal - government_has_flag = government_is_clan - government_has_flag = government_is_tribal - } - liege ?= { - government_has_flag = government_is_administrative - } - } - scope:defender = { - government_has_flag = government_is_administrative - liege ?= scope:attacker.liege - } - } - custom_description_no_bullet = { - text = on_declared_war_in_admin - } - scope:attacker.liege = { - add_opinion = { - target = scope:attacker - modifier = declared_war_in_admin - } - } - } - - # Breaking Truce - if = { - limit = { - scope:attacker = { - has_truce = scope:defender - NOT = { has_character_flag = allowed_war_declaration_sans_truce_penalties } - } - } - scope:attacker = { - custom_description_no_bullet = { - text = attack_breaking_truce_text - } - - # Remove the war target from the bought_truce_list if they're in it - if = { - limit = { - has_purchased_truce_with_char = { TARGET = scope:defender } - } - remove_list_variable = { - name = bought_truce_list - target = scope:recipient - } - } - - if = { - limit = { - NOT = { has_perk = flexible_truces_perk } - } - add_prestige = break_truce_prestige_loss - add_prestige_level = break_truce_prestige_level_loss - } - - if = { - limit = { - government_has_flag = government_is_mandala - scope:defender = { var:recent_mandala_suzerain ?= scope:attacker } - } - add_legitimacy = { - value = medium_legitimacy_loss - multiply = primary_title.tier - } - add_piety_experience = massive_piety_loss - add_character_modifier = { - modifier = mandala_broke_truce_modifier - years = 5 - } - } - else = { - add_legitimacy = { - value = medium_legitimacy_loss - multiply = primary_title.tier - } - } - add_character_modifier = { - modifier = broke_truce - years = 3 - } - - # Struggle Catalysts. - if = { - limit = { - any_character_struggle = { - involvement = involved - activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { - CATALYST = catalyst_broke_truce_against_important_character - CHAR = scope:defender - } - } - } - every_character_struggle = { - involvement = involved - limit = { - activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { - CATALYST = catalyst_broke_truce_against_important_character - CHAR = scope:defender - } - } - activate_struggle_catalyst = { - catalyst = catalyst_broke_truce_against_important_character - character = scope:attacker - } - } - } - } - } - # Breaking Betrothals - if = { - limit = { - scope:attacker = { - is_allied_to = scope:defender - any_close_family_member = { - court_owner = scope:attacker - is_betrothed = yes - betrothed = { - court_owner = scope:defender - is_close_family_of = scope:defender - } - } - } - } - scope:attacker = { - custom_description_no_bullet = { - text = attack_breaking_betrothal_text - } - add_prestige = { - value = break_truce_prestige_loss - multiply = break_betrothal_prestige_cost - } - #Did you promise a grand wedding? - if = { - limit = { - has_variable = promised_grand_wedding_marriage_countdown - any_close_family_member = { - court_owner = scope:attacker - is_betrothed = yes - has_been_promised_grand_wedding = yes - betrothed = { - court_owner = scope:defender - is_close_family_of = scope:defender - has_been_promised_grand_wedding = yes - } - } - } - random_close_family_member = { - limit = { - court_owner = scope:attacker - is_betrothed = yes - has_been_promised_grand_wedding = yes - betrothed = { - court_owner = scope:defender - is_close_family_of = scope:defender - has_been_promised_grand_wedding = yes - } - } - save_scope_as = victim - } - #Start a house feud, if possible. - if = { - limit = { - has_dlc_feature = friends_and_foes - exists = scope:attacker.house.house_head - exists = scope:defender.house.house_head - NOT = { scope:attacker.house = scope:defender.house} - } - house_feud_start_effect = { - #Feuding House Head - ACTOR = scope:attacker.house.house_head - #Target House Head - TARGET = scope:defender.house.house_head - #Feud Reason - REASON = family_broke_gw_betrothal - #House Member attacker if relevant - ATTACKER = scope:attacker - #House Member victim if relevant - VICTIM = scope:victim - } - } - #Then remove promise - remove_variable = promised_grand_wedding_marriage_countdown - } - every_close_family_member = { - limit = { - court_owner = scope:attacker - is_betrothed = yes - betrothed = { - court_owner = scope:defender - is_close_family_of = scope:defender - } - } - break_betrothal = betrothed - } - } - } - # Breaking Alliance - else_if = { - limit = { - scope:attacker = { - is_allied_to = scope:defender - } - } - scope:attacker = { - break_alliance_due_to_attack_effect = { TARGET = scope:defender } - } - } - # Breaking Tributary - if = { - limit = { - OR = { - scope:attacker = { is_tributary_of = scope:defender } - scope:defender = { is_tributary_of = scope:attacker } - } - } - scope:attacker = { - break_tributary_contract_due_to_attack_effect = { DEFENDER = scope:defender } - } - } - # BP2: Attacking Warden - if = { - limit = { - scope:attacker = { - any_home_court_hostage = { is_hostage_of = scope:defender } - } - } - scope:attacker = { - add_prestige = break_truce_prestige_loss - add_prestige_level = break_truce_prestige_level_loss - add_character_modifier = { - modifier = attacked_warden - years = 5 - } - # Hostages they hold (yours) - every_home_court_hostage = { - save_scope_as = hostage - every_close_family_member = { - limit = { - this != scope:attacker - } - custom = attacked_warden_tt - add_opinion = { - modifier = attacked_warden - target = scope:attacker - } - } - if = { - limit = { is_hostage_of = scope:defender } - custom_description_no_bullet = { - text = attack_breaking_truce_hostage - subject = scope:defender - object = scope:hostage - } - } - } - } - } - # BP2: Attacking Home Court - if = { - limit = { - scope:attacker = { - any_warden_hostage = { is_hostage_from = scope:defender } - } - } - scope:attacker = { - # Hostages you hold (theirs) - every_warden_hostage = { - save_scope_as = hostage - if = { - limit = { is_hostage_from = scope:defender } - custom_description_no_bullet = { - text = attack_breaking_truce_hostage - subject = scope:attacker - object = scope:hostage - } - } - } - add_prestige = break_truce_prestige_loss - add_prestige_level = break_truce_prestige_level_loss - add_character_modifier = { - modifier = attacked_home_court - years = 5 - } - # Hostages they hold (yours) - every_home_court_hostage = { - save_scope_as = hostage - every_close_family_member = { - limit = { - this != scope:attacker - } - custom = attacked_warden_tt - add_opinion = { - modifier = attacked_home_court - target = scope:attacker - } - } - if = { - limit = { is_hostage_of = scope:defender } - custom_description_no_bullet = { - text = attack_breaking_truce_hostage - subject = scope:defender - object = scope:hostage - } - } - } - } - } - - # Opinion - scope:defender = { - add_opinion = { - target = scope:attacker - modifier = declared_war - } - } - if = { - limit = { - NOT = { - scope:attacker = { - is_parent_of = scope:defender - } - } - } - if = { - limit = { - scope:defender = { - has_father = yes - } - } - scope:defender = { - father = { - add_opinion = { - target = scope:attacker - modifier = declared_war_on_son_daughter - } - } - } - } - if = { - limit = { - scope:defender = { - has_mother = yes - } - } - scope:defender = { - mother = { - add_opinion = { - target = scope:attacker - modifier = declared_war_on_son_daughter - } - } - } - } - } - if = { - limit = { - scope:attacker.culture != scope:defender.culture - scope:attacker = { is_landed = yes } - scope:defender = { is_landed = yes } - } - scope:defender.culture = { - change_cultural_acceptance = { - target = scope:attacker.culture - value = declare_war_culture_acceptance_impact - desc = cultural_acceptance_loss_declared_war - } - } - } - - scope:attacker = { - if = { - limit = { - any_vassal = { - vassal_stance = parochial - } - eighty_percent_of_current_military_strength <= scope:defender.current_military_strength - } - custom_tooltip = parochial_vassal_disapproves_war - hidden_effect = { - every_vassal = { - vassal_stance = parochial - add_opinion = { - target = scope:attacker - modifier = parochial_disapproves_strong_war_enemy_opinion - } - } - } - } - } - - # If we're a clan this interaction affects unity - add_clan_unity_interaction_effect = { - CHARACTER = scope:attacker - TARGET = scope:defender - VALUE = massive_unity_loss - DESC = clan_unity_declared_war.desc - REVERSE_NON_HOUSE_TARGET = no - } - - intrigue_duel_on_attack_effect = yes -} - -break_alliance_due_to_attack_effect = { - custom_description_no_bullet = { text = attack_ally_text } - add_prestige = attack_ally_prestige_loss - add_prestige_level = attack_ally_prestige_level_loss - add_character_modifier = { - modifier = attacked_ally - years = 3 - } - break_alliance = $TARGET$ -} - -break_tributary_contract_due_to_attack_effect = { - save_scope_as = attacker - if = { - limit = { is_tributary_of = $DEFENDER$ } - reverse_add_opinion = { - modifier = tributary_ceased_payments_opinion - target = $DEFENDER$ - } - $DEFENDER$ = { - send_interface_toast = { - type = msg_tributary_contract_broken_due_to_war - left_icon = $DEFENDER$ - right_icon = scope:attacker - } - } - send_interface_toast = { - type = msg_tributary_contract_broken_due_to_war - left_icon = scope:attacker - right_icon = $DEFENDER$ - } - end_tributary = yes - } - else = { - if = { - limit = { - scope:attacker = { - NOT = { has_character_flag = allowed_war_declaration_sans_truce_penalties } - } - } - reverse_add_opinion = { - modifier = betrayal_opinion - target = $DEFENDER$ - opinion = -50 - } - } - send_interface_toast = { - type = msg_tributary_contract_broken_due_to_war - left_icon = scope:attacker - right_icon = $DEFENDER$ - } - $DEFENDER$ = { - send_interface_toast = { - type = msg_tributary_contract_broken_due_to_war - left_icon = $DEFENDER$ - right_icon = scope:attacker - } - end_tributary = yes - } - } -} - -conquest_cb_title_transfer = { - save_scope_as = target_title # For the vassalization trigger. - - # Compile a list of all counties in the kingdom we will take from the defender. - every_in_de_jure_hierarchy = { - continue = { - tier > tier_county - } - limit = { - tier = tier_county - - # Current holder must be a (sub)vassal of the defender (no poaching titles from 3rd parties!) - holder ?= { - OR = { - this = scope:defender - target_is_liege_or_above = scope:defender - } - } - } - add_to_list = titles_taken - } - - # If we can take the current holder of a title as a vassal instead of siezing their land directly, do so. - every_in_de_jure_hierarchy = { - limit = { - tier >= tier_county - trigger_if = { - limit = { $RELIGIOUS_WAR$ = yes } - religious_cb_holder_under_target_can_be_vassalized = yes - } - trigger_else = { - conquest_cb_holder_under_target_can_be_vassalized = yes - } - } - - # Mark this vassal as being eligible to transfer from the defender to the attacker. - holder = { - if = { - limit = { - NOT = { is_in_list = potential_vassals} - } - add_to_list = potential_vassals - } - } - } - ordered_in_list = { - list = potential_vassals - order_by = highest_held_title_tier - max = 99 - check_range_bounds = no - - if = { - # If a liege has already been added to the vassalization list, skip us (we will remain our liege's vassal.) - limit = { - save_temporary_scope_as = this_vassal - any_in_list = { - list = vassals_taken - target_is_vassal_or_below = scope:this_vassal - } - } - } - else = { - # Flag this character to be vassalized instead of usurped. - add_to_list = vassals_taken - - # Remove the counties this vassal holds from the siezed title list (the vassal gets to keep their land when switching allegiance!) - every_sub_realm_county = { - remove_from_list = titles_taken - } - } - } -} - -expansion_cb_title_transfer = { - save_scope_as = target_title # For the vassalization trigger. - - # Compile a list of all counties in the target title we will take from the defender. - every_in_de_jure_hierarchy = { - continue = { - tier > tier_county - } - limit = { - tier = tier_county - - # Current holder must be a (sub)vassal of the defender (no poaching titles from 3rd parties!) - holder ?= { - OR = { - this = scope:defender - target_is_liege_or_above = scope:defender - } - } - } - add_to_list = titles_taken - } - - if = { - limit = { - save_temporary_scope_as = checked_title - - tier >= scope:attacker.highest_held_title_tier - OR = { - AND = { - is_title_created = yes - holder = { - NOT = { - any_sub_realm_county = { - NOT = { target_is_de_jure_liege_or_above = scope:checked_title } - } - } - } - } - AND = { - is_title_created = no - any_de_jure_county = { - percent > 0.5 - holder ?= { - OR = { - this = scope:defender - any_liege_or_above = { this = scope:defender } - } - } - } - } - } - } - add_to_list = target_title_taken - } - - # If we can take the current holder of a title as a vassal instead of siezing their land directly, do so. - every_in_de_jure_hierarchy = { - limit = { - tier >= tier_county - conquest_cb_holder_under_target_can_be_vassalized = yes - } - - # Mark this vassal as being eligible to transfer from the defender to the attacker. - holder = { - if = { - limit = { - NOT = { is_in_list = potential_vassals} - } - add_to_list = potential_vassals - } - } - } - ordered_in_list = { - list = potential_vassals - order_by = highest_held_title_tier - max = 99 - check_range_bounds = no - - if = { - # If a liege has already been added to the vassalization list, skip us (we will remain our liege's vassal.) - limit = { - save_temporary_scope_as = this_vassal - any_in_list = { - list = vassals_taken - target_is_vassal_or_below = scope:this_vassal - } - } - } - else = { - # Flag this character to be vassalized instead of usurped. - add_to_list = vassals_taken - - # Remove the counties this vassal holds from the siezed title list (the vassal gets to keep their land when switching allegiance!) - every_sub_realm_county = { - remove_from_list = titles_taken - } - } - } -} - -expedition_cb_title_transfer = { - save_scope_as = target_title # For the vassalization trigger. - - # Compile a list of all counties in the kingdom we will take from the defender. - every_in_de_jure_hierarchy = { - continue = { - tier > tier_county - } - limit = { - OR = { - tier = tier_county - tier = tier_duchy - } - - # Current holder must be a (sub)vassal of the defender (no poaching titles from 3rd parties!) - holder ?= { - OR = { - this = scope:defender - target_is_liege_or_above = scope:defender - } - } - } - add_to_list = titles_taken - } - - # If we can take the current holder of a title as a vassal instead of siezing their land directly, do so. - every_in_de_jure_hierarchy = { - limit = { - tier >= tier_county - trigger_if = { - limit = { $RELIGIOUS_WAR$ = yes } - religious_cb_holder_under_target_can_be_vassalized = yes - } - trigger_else = { - conquest_cb_holder_under_target_can_be_vassalized = yes - } - } - - # Mark this vassal as being eligible to transfer from the defender to the attacker. - holder = { - if = { - limit = { - NOT = { is_in_list = potential_vassals} - } - add_to_list = potential_vassals - } - } - } - ordered_in_list = { - list = potential_vassals - order_by = highest_held_title_tier - max = 99 - check_range_bounds = no - - if = { - # If a liege has already been added to the vassalization list, skip us (we will remain our liege's vassal.) - limit = { - save_temporary_scope_as = this_vassal - any_in_list = { - list = vassals_taken - target_is_vassal_or_below = scope:this_vassal - } - } - } - else = { - # Flag this character to be vassalized instead of usurped. - add_to_list = vassals_taken - - # Remove the counties this vassal holds from the siezed title list (the vassal gets to keep their land when switching allegiance!) - every_sub_realm_county = { - remove_from_list = titles_taken - } - } - } -} - -struggle_cb_title_transfer = { - save_scope_as = target_title # For the vassalization trigger. - - # Compile a list of all counties in the kingdom we will take from the defender. - every_in_de_jure_hierarchy = { - continue = { - tier > tier_county - } - limit = { - tier = tier_county - - # Current holder must be a (sub)vassal of the defender (no poaching titles from 3rd parties!) - holder ?= { - OR = { - this = scope:defender - target_is_liege_or_above = scope:defender - } - } - } - add_to_list = titles_taken - } - - every_in_list = { - list = target_titles - limit = { - tier = tier_county - holder ?= { - highest_held_title_tier < scope:attacker.highest_held_title_tier - OR = { - this = scope:defender - target_is_liege_or_above = scope:defender - } - any_sub_realm_county = { - count = all - is_in_list = titles_taken - } - } - } - holder = { - if = { - limit = { - NOT = { is_in_list = potential_vassals } - } - add_to_list = potential_vassals - } - } - } - - ordered_in_list = { - list = potential_vassals - order_by = highest_held_title_tier - max = 99 - check_range_bounds = no - - if = { - # If a liege has already been added to the vassalization list, skip us (we will remain our liege's vassal.) - limit = { - save_temporary_scope_as = this_vassal - any_in_list = { - list = vassals_taken - target_is_vassal_or_below = scope:this_vassal - } - } - } - else = { - # Flag this character to be vassalized instead of usurped. - add_to_list = vassals_taken - - # Remove the counties this vassal holds from the siezed title list (the vassal gets to keep their land when switching allegiance!) - every_held_county = { - remove_from_list = titles_taken - } - every_sub_realm_county = { - remove_from_list = titles_taken - } - } - } -} - -excommunication_cb_piety_change = { - - #Amount of piety gain is scaled based on the highest tier title the defender has. - if = { - limit = { - scope:defender.highest_held_title_tier = tier_empire - } - $WINNER$ = { - if = { - limit = { - $WINNER$ = scope:attacker - } - add_piety = { - add = religious_cb_piety_gain_empire - multiply = excommunication_cb_piety_change_multiplier - } - } - else = { - add_piety = religious_cb_piety_gain_empire - } - } - $LOSER$ = { - add_piety = religious_cb_piety_loss_empire - } - } - - else_if = { - limit = { - scope:defender.highest_held_title_tier = tier_kingdom - } - $WINNER$ = { - if = { - limit = { - $WINNER$ = scope:attacker - } - add_piety = { - add = religious_cb_piety_gain_kingdom - multiply = excommunication_cb_piety_change_multiplier - } - } - else = { - add_piety = religious_cb_piety_gain_kingdom - } - } - $LOSER$ = { - add_piety = religious_cb_piety_loss_kingdom - } - } - else_if = { - limit = { - scope:defender.highest_held_title_tier = tier_duchy - } - $WINNER$ = { - if = { - limit = { - $WINNER$ = scope:attacker - } - add_piety = { - add = religious_cb_piety_gain_duchy - multiply = excommunication_cb_piety_change_multiplier - } - } - else = { - add_piety = religious_cb_piety_gain_duchy - } - } - $LOSER$ = { - add_piety = religious_cb_piety_loss_duchy - } - } - else = { - $WINNER$ = { - if = { - limit = { - $WINNER$ = scope:attacker - } - add_piety = { - add = religious_cb_piety_gain_county - multiply = excommunication_cb_piety_change_multiplier - } - } - else = { - add_piety = religious_cb_piety_gain_county - } - } - $LOSER$ = { - add_piety = religious_cb_piety_loss_county - } - } -} - -on_lost_aggression_war_discontent_loss = { - scope:loser = { - if = { - limit = { - has_targeting_faction = yes - } - add_targeting_factions_discontent = 25 - } - } -} - - -# Imprison all faction-members (rebelling vassals if there's no faction) if they lose a revolt-war and add a revoke reason -on_lost_faction_revolt_war = { - scope:defender = { save_scope_as = imprisoner } - if = { - limit = { - exists = scope:attacker.joined_faction - } - scope:attacker.joined_faction = { - set_variable = { - name = peasant_destroying - value = yes - } - every_faction_member = { - if = { - limit = { - exists = scope:attacker.joined_faction # Can get destroyed as we loop through - } - leave_faction_with_cooldown_effect = { - FACTION = scope:attacker.joined_faction - YEARS = faction_war_defeat_cooldown - } - } - else = { - add_faction_cooldown_effect = { YEARS = faction_war_defeat_cooldown } - } - } - } - } - war = { - every_war_attacker = { - limit = { - exists = liege - any_liege_or_above = { this = scope:defender } - } - if = { - limit = { - has_title = title:k_chrysanthemum_throne - exists = title:k_chrysanthemum_throne.current_heir - } - title:k_chrysanthemum_throne.current_heir = { save_scope_as = new_emperor } - create_title_and_vassal_change = { - type = revoked - save_scope_as = title_change - } - title:k_chrysanthemum_throne = { - change_title_holder = { - holder = scope:new_emperor - change = scope:title_change - } - } - resolve_title_and_vassal_change = scope:title_change - } - if = { # Imprison them if they aren't imprisoned. - limit = { - is_imprisoned = no - } - hard_imprison_character_effect = { - TARGET = this - IMPRISONER = scope:defender - } - } - scope:defender = { - add_opinion = { - target = prev - modifier = vassal_lost_faction_revolt_war - } - } - hidden_effect = { - #block them from joining factions if they aren't blocked yet, hidden because you should always see it through the effect applied to every_faction_member above - if = { - limit = { - NOT = { has_character_flag = joining_faction_block } - } - add_faction_cooldown_effect = { YEARS = faction_war_defeat_cooldown } - } - } - } - } -} - -# Imprison all revolters on lost request revolt. -on_lost_request_revolt_war = { - war = { - every_war_attacker = { - limit = { - exists = liege - any_liege_or_above = { this = scope:defender } - } - if = { - limit = { is_imprisoned = no } - hard_imprison_character_effect = { - TARGET = this - IMPRISONER = scope:defender - } - } - if = { - limit = { liege = scope:defender } - add_faction_cooldown_effect = { YEARS = faction_war_defeat_cooldown } - } - scope:defender = { - add_opinion = { - target = prev - modifier = vassal_lost_faction_revolt_war - } - } - } - } -} - -# Add revoke reason on all faction-members if they white peace a revolt-war -on_white_peace_faction_revolt_war = { - if = { - limit = { exists = scope:attacker.joined_faction } - scope:attacker.joined_faction = { - save_scope_as = current_faction - every_faction_member = { - if = { - limit = { - exists = scope:current_faction # Can get destroyed as we loop through - } - leave_faction_with_cooldown_effect = { - FACTION = scope:current_faction - YEARS = faction_war_white_peace_cooldown - } - } - else = { - add_faction_cooldown_effect = { YEARS = faction_war_white_peace_cooldown } - } - scope:defender = { - add_opinion = { - target = prev - modifier = vassal_wp_faction_revolt_war - } - } - } - } - scope:current_faction ?= { add_faction_discontent = -200 } - } -} - -#Add revoke reason to all attackers if they white peace on request war. -on_white_peace_request_revolt_war = { - war = { - every_war_attacker = { - limit = { - exists = liege - any_liege_or_above = { this = scope:defender } - } - scope:defender = { - add_opinion = { - target = prev - modifier = vassal_wp_faction_revolt_war - } - } - if = { - limit = { liege = scope:defender } - add_faction_cooldown_effect = { YEARS = faction_war_white_peace_cooldown } - } - } - } -} - -change_liege_or_become_independent = { - $CHANGE$ = { save_scope_as = change } - $VASSAL$ = { save_scope_as = vassal } - scope:vassal.liege = { save_scope_as = liege } - - if = { - limit = { - scope:liege = { - top_liege = this - } - } - scope:vassal = { - becomes_independent = { - change = scope:change - } - } - } - else = { - scope:vassal = { - change_liege = { - liege = scope:liege.liege - change = scope:change - } - } - } -} - -on_peasant_faction_war_win_common = { - create_title_and_vassal_change = { - type = conquest - save_scope_as = change - add_claim_on_loss = yes - } - - setup_claim_cb = { - titles = $TARGET_TITLES$ - attacker = $ATTACKER$ - defender = $DEFENDER$ - claimant = $CLAIMANT$ - change = scope:change - } - - resolve_title_and_vassal_change = scope:change -} - -on_claimant_faction_war_win_common = { - $DEFENDER$ = { - if = { - limit = { - is_tributary = yes - exists = suzerain - $CLAIMANT$ = { - is_tributary = no - OR = { - is_ruler = no - is_vassal_or_below_of = $DEFENDER$ - } - } - } - suzerain = { save_scope_as = handover_suzerain } - } - } - $CLAIMANT$ = { - save_scope_as = the_claimant - } - - # If the claimant is the prisoner of the defender, free the claimant (it doesn't make much sense to leave the new king in the old king's dungeon) - scope:the_claimant = { - if = { - limit = { - is_imprisoned_by = $DEFENDER$ - } - release_from_prison = yes - } - } - - # Add mutual opinion bonuses between claimant and faction members, as well as a hook on the claimant if possible. - $ATTACKER$.joined_faction = { - every_faction_member = { - custom = FACTION_CLAIMANT_EVERY_FACTION_MEMBER - limit = { - NOT = { this = $ATTACKER$.joined_faction.special_character } - } - hidden_effect = { - add_opinion = { - modifier = claimant_faction_member_opinion - target = $ATTACKER$.joined_faction.special_character - } - reverse_add_opinion = { - modifier = claimant_faction_claimant_opinion - target = $ATTACKER$.joined_faction.special_character - } - } - if = { - limit = { - can_add_hook = { - type = favor_hook - target = $ATTACKER$.joined_faction.special_character - } - } - add_hook = { - type = favor_hook - target = $ATTACKER$.joined_faction.special_character - } - } - # Struggle boost - if = { - limit = { - culture = $ATTACKER$.joined_faction.special_character.culture - any_character_struggle = { - involvement = involved - has_struggle_phase_parameter = struggle_prestige_install_same_culture_claimant - } - } - add_prestige = major_prestige_gain - } - - # Save the number of faction members for use further down - add_to_list = num_faction_members - } - } - - # Give the claimant their new title. - create_title_and_vassal_change = { - type = faction_demand - save_scope_as = change - add_claim_on_loss = yes - } - - # Ceremonial Liege - if = { - limit = { - exists = top_liege.primary_title.var:administrative_ui_special_title - scope:faction_targeted_title = $DEFENDER$.top_liege.primary_title.var:administrative_ui_special_title - } - $DEFENDER$ = { - every_held_title = { - limit = { - is_noble_family_title = no - is_landless_type_title = no - tier >= scope:faction_targeted_title.tier - } - add_to_list = faction_titles - } - } - } - every_in_list = { - list = $TARGET_TITLES$ - add_to_list = faction_titles - holder = { - save_scope_as = target_holder - } - } - scope:target_holder ?= { - if = { - limit = { - top_liege = this - government_allows = administrative - primary_title = { is_in_list = faction_titles } - } - every_held_title = { - title_tier > barony - limit = { - is_noble_family_title = no - } - add_to_list = faction_titles - } - } - } - ordered_in_list = { - list = $TARGET_TITLES$ - position = 0 - order_by = tier - save_scope_as = target_title - } - $ATTACKER$.joined_faction = { - every_faction_county_member = { - limit = { - NOT = { is_in_list = faction_titles } - } - add_to_list = faction_titles - } - } - - setup_claim_cb = { - titles = faction_titles - attacker = $ATTACKER$ - defender = $DEFENDER$ - claimant = scope:the_claimant - change = scope:change - civil_war = yes - } - - # Ensure that the liege structure is preserved - if = { - limit = { - scope:target_title.holder = { top_liege != this } - scope:the_claimant.primary_title.tier < scope:target_title.tier - } - scope:the_claimant = { - change_liege = { - liege = scope:target_title.holder.liege - change = scope:change - } - } - } - - # Preserve Grandeur - if = { - limit = { - scope:target_title.holder = { - has_royal_court = yes - has_dlc_feature = royal_court - } - scope:the_claimant = { - has_royal_court = no - } - } - scope:the_claimant = { - set_variable = { - name = previous_holder_grandeur_value - value = scope:target_title.holder.court_grandeur_current - } - } - } - - hidden_effect = { - if = { - limit = { - exists = scope:target_title.holder.dynasty - exists = scope:the_claimant.dynasty - scope:target_title.holder = { - has_variable = conqueror - scope:target_title.holder.dynasty = scope:the_claimant.dynasty - } - scope:the_claimant = { - OR = { - is_ai = no - ai_has_cautious_personality = no - } - NOT = { has_variable = conqueror } - } - } - scope:the_claimant = { - if = { - limit = { - is_ai = no - } - trigger_event = { - id = conqueror.0001 - days = 10 - } - } - else = { - trigger_event = conqueror.0001 - } - } - } - } - - resolve_title_and_vassal_change = scope:change - - # We give you decent Legitimacy so you don't get immediately deposed - people _really_ want you in the throne - # Can you even get Legitimacy? - if = { - limit = { - scope:the_claimant = { - is_valid_for_legitimacy_change = yes - } - } - # Per tier - if = { - limit = { - scope:target_title.tier = tier_empire - } - scope:the_claimant = { - add_legitimacy = { - value = 1000 - multiply = nomadic_legitimacy_claimant_multiplier - } - } - } - else_if = { - limit = { - scope:target_title.tier = tier_kingdom - } - scope:the_claimant = { - add_legitimacy = { - value = 750 - multiply = nomadic_legitimacy_claimant_multiplier - } - } - } - else_if = { - limit = { - scope:target_title.tier = tier_duchy - } - scope:the_claimant = { - add_legitimacy = { - value = 500 - multiply = nomadic_legitimacy_claimant_multiplier - } - } - } - else = { - scope:the_claimant = { - add_legitimacy = { - value = 300 - multiply = nomadic_legitimacy_claimant_multiplier - } - } - } - # Per number of faction members - if = { - limit = { - list_size:num_faction_members > 0 - scope:the_claimant = { - is_valid_for_legitimacy_change = yes - } - } - scope:the_claimant = { - add_legitimacy = { - value = list_size:num_faction_members - multiply = 50 - } - } - } - - } - - # Add Appropriate Grandeur - scope:the_claimant = { - if = { - limit = { - exists = var:previous_holder_grandeur_value - has_royal_court = yes - has_dlc_feature = royal_court - } - hidden_effect = { - change_current_court_grandeur = -100 # Reset to 0 - change_current_court_grandeur = var:previous_holder_grandeur_value - remove_variable = previous_holder_grandeur_value - } - change_current_court_grandeur = massive_court_grandeur_gain # Gain a bonus to Grandeur for winning a claim faction - } - } - - # Byzantine flavor - if = { - limit = { - scope:target_title = title:e_byzantium - has_ep3_dlc_trigger = yes - } - scope:the_claimant = { - trigger_event = { - id = ep3_emperor_yearly.2030 - days = 15 - } - } - } - - if = { - limit = { - exists = scope:handover_suzerain - } - start_tributary_interaction_effect = { - TRIBUTARY = scope:the_claimant - SUZERAIN = scope:handover_suzerain - } - } - -} - - -#To release the winners prisoners when the war ends -#Needs the arguments ATTACKER and WINNER. ATTACKER is weather the attacker won or not (y/n) and WINNER is the scope of the winner. -release_prisoners_of_war_effect = { - #Prisoners of defenders - every_war_defender = { - every_prisoner = { - limit = { - OR = { - this = scope:war.primary_attacker - scope:war.primary_attacker.primary_title = { - place_in_line_of_succession = { - target = prev - value <= 3 - } - } - } - } - add_to_list = defender_valuable_prisoners_list - release_from_prison = yes - } - scope:war.primary_defender = { - set_variable = { - name = valuable_prisoners - value = list_size:defender_valuable_prisoners_list - } - } - } - #Prisoners of attackers - every_war_attacker = { - every_prisoner = { - limit = { - OR = { - this = scope:war.primary_defender - scope:war.primary_defender.primary_title = { - place_in_line_of_succession = { - target = prev - value <= 3 - } - } - } - } - add_to_list = attacker_valuable_prisoners_list - release_from_prison = yes - } - scope:war.primary_attacker = { - set_variable = { - name = valuable_prisoners - value = list_size:attacker_valuable_prisoners_list - } - } - } -} - - -send_captured_combatant_message = { - # The positioning of the character portraits needs to sync up with the loc-string we're using. - if = { - limit = { - $IS_ENEMY_MESSAGE$ = no - } - root = { - save_scope_as = right_character - } - scope:enemy_army_owner = { - save_scope_as = left_character - } - } - else = { - root = { - save_scope_as = left_character - } - scope:enemy_army_owner = { - save_scope_as = right_character - } - } - - # Send either a toast or a message to this character, depending on what variable was passed in. - if = { - limit = { - $TOAST$ = yes - } - send_interface_toast = { - message_filter_type = combat_prisoners - title = $DESC$ - left_icon = scope:left_character - right_icon = scope:right_character - } - } - else_if = { - limit = { - $IS_ENEMY_MESSAGE$ = no - } - send_interface_message = { - type = event_captured_combatants_good - title = $TITLE$ - desc = $DESC$ - left_icon = scope:left_character - right_icon = scope:right_character - } - } - else = { - send_interface_message = { - type = event_captured_combatants_bad - title = $TITLE$ - desc = $DESC$ - left_icon = scope:left_character - right_icon = scope:right_character - } - } -} - -send_slain_combatant_message = { - # The positioning of the character portraits needs to sync up with the loc-string we're using. - if = { - limit = { - $IS_ENEMY_MESSAGE$ = no - } - root = { - save_scope_as = right_character - } - $KILLER$ = { - save_scope_as = left_character - } - } - else = { - root = { - save_scope_as = left_character - } - $KILLER$ = { - save_scope_as = right_character - } - } - - # Send either a toast or a message to this character, depending on what variable was passed in. - if = { - limit = { - $TOAST$ = yes - } - send_interface_toast = { - message_filter_type = combat_casualties - title = $DESC$ - left_icon = scope:left_character - right_icon = scope:right_character - } - } - # - else_if = { - limit = { - $IS_ENEMY_MESSAGE$ = no - } - send_interface_message = { - type = event_slain_combatants_good - title = $TITLE$ - desc = $DESC$ - left_icon = scope:left_character - right_icon = scope:right_character - } - } - else = { - send_interface_message = { - type = event_slain_combatants_bad - title = $TITLE$ - desc = $DESC$ - left_icon = scope:left_character - right_icon = scope:right_character - } - } -} - -send_new_alliance_message = { - $THIS_CHARACTER$ = { - every_character_war = { - limit = { - # As a pure notification thing, we only care about players. No need to waste CPU cycles for AI-only wars. - any_war_participant = { - is_ai = no - } - # Only if we're the primary attacker or defender (non-primary participants can't call their own allies) - OR = { - primary_attacker = $THIS_CHARACTER$ - primary_defender = $THIS_CHARACTER$ - } - # Don't send messages about alliances to landless courtiers (who can't actually join wars, alliance or no) - $THIS_CHARACTER$ = { is_playable_character = yes } - $OTHER_CHARACTER$ = { is_playable_character = yes } - } - save_scope_as = this_war - $THIS_CHARACTER$ = { save_scope_as = this_character } - $OTHER_CHARACTER$ = { save_scope_as = other_character } - every_war_participant = { - limit = { - is_ai = no - # We only want to alert people of potential new enemies - any_war_enemy = { this = scope:this_character} - } - send_interface_toast = { - type = msg_war_enemy_new_ally - title = enemy_gained_new_ally - left_icon = scope:this_character - right_icon = scope:other_character - custom_tooltip = enemy_gained_new_ally_tt - } - } - } - } -} - -# TRUCES -# Add attacker truce on victory -add_truce_attacker_victory_effect = { - scope:attacker = { # Vassal Stance opinion effect - if = { - limit = { - any_vassal = { - vassal_stance = glory_hound - } - } - custom_tooltip = glory_hound_approves_war_victory - hidden_effect = { - every_vassal = { - vassal_stance = glory_hound - add_opinion = { - target = scope:attacker - modifier = glory_hound_approves_war_victory_opinion - } - } - } - } - if = { - limit = { - government_has_flag = government_is_clan - house ?= { has_house_unity_stage = antagonistic } - any_vassal = { - house ?= scope:attacker.house - } - } - custom_tooltip = antagonistic_house_approves_war_victory - hidden_effect = { - every_vassal = { - limit = { - house ?= scope:attacker.house - } - add_opinion = { - target = scope:attacker - modifier = antagonistic_house_approves_war_victory_opinion - } - } - } - } - } - scope:defender ?= { # Vassal Stance opinion effect - if = { - limit = { - any_vassal = { - vassal_stance = glory_hound - } - } - custom_tooltip = glory_hound_disapproves_war_defeat_defender - hidden_effect = { - every_vassal = { - vassal_stance = glory_hound - add_opinion = { - target = scope:defender - modifier = glory_hound_disapproves_war_defeat_opinion - } - } - } - } - if = { - limit = { - government_has_flag = government_is_clan - house ?= { has_house_unity_stage = antagonistic } - any_vassal = { - house ?= scope:defender.house - } - } - custom_tooltip = antagonistic_house_disapproves_war_defeat_defender - hidden_effect = { - every_vassal = { - limit = { - house ?= scope:defender.house - } - add_opinion = { - target = scope:defender - modifier = antagonistic_house_disapproves_war_defeat_opinion - } - } - } - } - } - scope:attacker = { - hidden_effect = { - add_truce_one_way = { - character = scope:defender - days = standard_truce_duration_days - war = root.war - result = victory - } - } - } - # Feud - scope:attacker.house = { - change_house_relation_feud_score_effect = { - TARGET = scope:defender.house - REASON = war - VALUE = house_feud_medium_counter_value - } - } - # Tooltips for hostage exchange, handled here as it's shared between casus belli - bp2_hostage_war_end_tooltip_effect = yes -} - -# Add white peace truce -add_truce_white_peace_effect = { - scope:attacker = { # Vassal Stance opinion effect - if = { - limit = { - any_vassal = { - vassal_stance = glory_hound - } - } - custom_tooltip = glory_hound_disapproves_war_white_peace - hidden_effect = { - every_vassal = { - vassal_stance = glory_hound - add_opinion = { - target = scope:attacker - modifier = glory_hound_disapproves_war_white_peace_opinion - } - } - } - } - if = { - limit = { - government_has_flag = government_is_clan - house ?= { has_house_unity_stage = antagonistic } - any_vassal = { - house ?= scope:attacker.house - } - } - custom_tooltip = antagonistic_house_disapproves_war_white_peace - hidden_effect = { - every_vassal = { - limit = { - house ?= scope:attacker.house - } - add_opinion = { - target = scope:attacker - modifier = antagonistic_house_disapproves_war_white_peace_opinion - } - } - } - } - if = { - limit = { - any_active_accolade = { - accolade_parameter = accolade_champions_white_peace - } - } - add_prestige = accolade_white_peace_prestige_value - } - } - scope:defender = { # Vassal Stance opinion effect - if = { - limit = { - any_vassal = { - vassal_stance = glory_hound - } - } - custom_tooltip = glory_hound_disapproves_war_white_peace_defender - hidden_effect = { - every_vassal = { - vassal_stance = glory_hound - add_opinion = { - target = scope:defender - modifier = glory_hound_disapproves_war_white_peace_opinion - } - } - } - } - if = { - limit = { - government_has_flag = government_is_clan - house ?= { has_house_unity_stage = antagonistic } - any_vassal = { - house ?= scope:defender.house - } - } - custom_tooltip = antagonistic_house_disapproves_war_white_peace_defender - hidden_effect = { - every_vassal = { - limit = { - house ?= scope:defender.house - } - add_opinion = { - target = scope:defender - modifier = antagonistic_house_disapproves_war_white_peace_opinion - } - } - } - } - } - hidden_effect = { - scope:attacker = { - add_truce_one_way = { - character = scope:defender - days = standard_truce_duration_days - war = root.war - result = white_peace - } - } - } - scope:attacker = { - if = { - limit = { - house_has_feud_relation_with_trigger = { TARGET = scope:defender } - } - house = { - every_house_member = { - limit = { is_ai = no } - send_interface_message = { - type = house_feud_white_peace_message - left_icon = scope:attacker - right_icon = scope:defender - title = msg_house_feud_white_peace - desc = msg_house_feud_white_peace_desc - } - } - } - scope:defender.house = { - every_house_member = { - limit = { is_ai = no } - send_interface_message = { - type = house_feud_white_peace_message - left_icon = scope:defender - right_icon = scope:attacker - title = msg_house_feud_white_peace - desc = msg_house_feud_white_peace_desc - } - } - } - } - } - # Tooltips for hostage exchange, handled here as it's shared between casus belli - bp2_hostage_war_end_tooltip_effect = yes -} - -# Add attacker truce on defeat -add_truce_attacker_defeat_effect = { - scope:attacker = { # Vassal Stance opinion effect - if = { - limit = { - any_vassal = { - vassal_stance = glory_hound - } - } - custom_tooltip = glory_hound_disapproves_war_defeat - hidden_effect = { - every_vassal = { - vassal_stance = glory_hound - add_opinion = { - target = scope:attacker - modifier = glory_hound_disapproves_war_defeat_opinion - } - } - } - } - if = { - limit = { - government_has_flag = government_is_clan - house ?= { has_house_unity_stage = antagonistic } - any_vassal = { - house ?= scope:attacker.house - } - } - custom_tooltip = antagonistic_house_disapproves_war_defeat - hidden_effect = { - every_vassal = { - limit = { - house ?= scope:attacker.house - } - add_opinion = { - target = scope:attacker - modifier = antagonistic_house_disapproves_war_defeat_opinion - } - } - } - } - } - hidden_effect = { - scope:attacker = { - add_truce_one_way = { - character = scope:defender - days = standard_truce_duration_days - war = root.war - result = defeat - } - } - } - scope:defender = { - # Feud - house = { - change_house_relation_feud_score_effect = { - TARGET = scope:attacker.house - REASON = war - VALUE = house_feud_medium_counter_value - } - } - if = { - limit = { - government_has_flag = government_is_clan - house ?= { has_house_unity_stage = antagonistic } - any_vassal = { - house ?= scope:defender.house - } - } - custom_tooltip = antagonistic_house_approves_war_victory_defensive - hidden_effect = { - every_vassal = { - limit = { - house ?= scope:defender.house - } - add_opinion = { - target = scope:defender - modifier = antagonistic_house_approves_war_victory_defensive_opinion - } - } - } - } - } - # Tooltips for hostage exchange, handled here as it's shared between casus belli - bp2_hostage_war_end_tooltip_effect = yes -} - -# Add GHW truces on attacker victory. -add_truce_GHW_attacker_victory_effect = { - hidden_effect = { - scope:attacker.faith.great_holy_war = { - every_pledged_defender = { - add_truce_both_ways = { - character = scope:title_recipient - days = 3650 - war = root.war - result = defeat - } - } - } - } -} - -# Force a white peace on any forced. -force_truce_GHW_defenders_effect = { - hidden_effect = { - #if any defender - #owns lands in target kingdom - #is primary in war with another defender who - #owns land in target kingdom - #is also a primary - #then end that war with a white peace - scope:the_ghw = { - every_pledged_defender = { - save_temporary_scope_as = white_peace_attacker - every_character_war = { - if = { - limit = { - primary_attacker = scope:white_peace_attacker - primary_defender = { - save_temporary_scope_as = white_peace_defender - OR = { - scope:the_ghw = { has_forced_defender = scope:white_peace_defender } - AND = { - scope:target_kingdom = { - any_de_jure_county_holder = { - OR = { - this = scope:white_peace_defender - any_liege_or_above = { this = scope:white_peace_defender } - } - } - } - top_liege = { - save_temporary_scope_as = white_peace_liege - scope:the_ghw = { has_forced_defender = scope:white_peace_liege } - } - } - } - } - } - end_war = white_peace - } - } - } - } - } -} - -notify_players_about_neighboring_war_resolution_effect = { - every_player = { - limit = { - NOT = { is_participant_in_war = scope:war} - } - save_scope_as = this_player - - # Checks if this player should be notified at all about the war resolution (e.g., either attacker or defender are neighbors). - if = { - limit = { - should_notify_player_about_neighboring_rulers_wars_trigger = { TARGET_CHARACTER = scope:winner } - - # Only notify about revolts if rebels win - trigger_if = { - limit = { - scope:war = { - OR = { - using_cb = peasant_war - using_cb = independence_faction_war - using_cb = liberty_faction_war - using_cb = populist_war - using_cb = depose_war - using_cb = claimant_faction_war - } - } - } - scope:winner = scope:attacker - } - } - - # Check which type of message we need to send to the player. - if = { - limit = { - always = yes - should_notify_player_about_neighboring_rulers_wars_trigger = { TARGET_CHARACTER = scope:loser } - } - # Send combined message about both the winner and the loser. - send_interface_message = { - type = msg_war_ended_neighbor - left_icon = scope:winner - right_icon = scope:loser - title = war_event.neighbor_war.both_neighbors.t - desc = war_event.neighbor_war.both_neighbors.desc - } - } - else = { - # Send message only about the winner. - send_interface_message = { - type = msg_war_ended_neighbor - left_icon = scope:winner - right_icon = scope:loser - title = war_event.neighbor_war.only_winner.t - desc = war_event.neighbor_war.only_winner.desc - } - } - } - else_if = { - limit = { - should_notify_player_about_neighboring_rulers_wars_trigger = { TARGET_CHARACTER = scope:loser } - - # Only notify about revolts if rebels win - trigger_if = { - limit = { - scope:war = { - OR = { - using_cb = peasant_war - using_cb = independence_faction_war - using_cb = liberty_faction_war - using_cb = populist_war - using_cb = depose_war - using_cb = claimant_faction_war - } - } - } - scope:winner = scope:attacker - } - } - - # Send message only about the loser. - send_interface_message = { - type = msg_war_ended_neighbor - left_icon = scope:loser - right_icon = scope:winner - title = war_event.neighbor_war.only_loser.t - desc = war_event.neighbor_war.only_loser.desc - } - } - } -} - -show_pow_release_message_effect = { - if = { - limit = { - any_character_war = { - primary_attacker = scope:attacker - primary_defender = scope:defender - } - } - every_character_war = { - limit = { - primary_attacker = scope:attacker - primary_defender = scope:defender - } - save_scope_as = war - } - if = { - limit = { prisoners_of_war_trigger = yes } - custom_tooltip = release_pow_at_end_of_war - } - } -} - -add_prestige_war_defender_effect = { - add_prestige = { - value = $PRESTIGE_VALUE$ - if = { - limit= { - scope:defender.culture = { - has_cultural_parameter = more_fame_for_successful_defensive_wars - } - } - multiply = 2 - } - } -} - -pay_short_term_gold_reparations_effect = { - if = { - limit = { has_government = landless_adventurer_government } - pay_short_term_gold = { - gold = { - value = medium_gold_value - multiply = $GOLD_VALUE$ - if = { - limit= { - scope:defender.culture = { has_cultural_parameter = more_gold_for_successful_defensive_wars } - } - multiply = 2 - } - } - target = scope:defender - } - } - else = { - pay_short_term_gold = { - gold = { - value = $GOLD_VALUE$ - if = { - limit= { - scope:defender.culture = { has_cultural_parameter = more_gold_for_successful_defensive_wars } - } - multiply = 2 - } - } - target = scope:defender - yearly_income = yes # STANDARD - } - } -} - -pay_short_term_gold_reparations_prefer_greater_income_effect = { - if = { - limit = { scope:defender.yearly_character_income >= scope:attacker.yearly_character_income } - pay_short_term_gold = { - gold = { - value = scope:defender.yearly_character_income - multiply = { - add = $FACTOR$ - if = { - limit= { - scope:defender.culture = { - has_cultural_parameter = more_gold_for_successful_defensive_wars - } - } - multiply = 2 - } - } - } - target = scope:defender - } - } - else = { - pay_short_term_gold = { - gold = { - value = yearly_character_income - multiply = { - add = $FACTOR$ - if = { - limit= { - scope:defender.culture = { - has_cultural_parameter = more_gold_for_successful_defensive_wars - } - } - multiply = 2 - } - } - } - target = scope:defender - } - } -} - - -mongol_invasion_county_looting_chance_effect = { - save_temporary_scope_as = county - if = { - limit = { - NOR = { - exists = var:looted_by_mongols - holder = scope:attacker - } - } - random = { - chance = scope:attacker.martial - # Each County should only be devastated once - set_variable = { - name = looted_by_mongols - value = yes - } - # Send a message (and gold!) to the Mongol Emperor - scope:attacker = { - send_interface_message = { - type = event_war_bad - title = mongols_sieged_county.t - left_icon = scope:county.holder - right_icon = scope:county - if = { - limit = { - scope:county.development_level >= 1 - } - add_gold = { - add = scope:county.development_level - multiply = 5 - } - } - if = { - limit = { dread < 150 } - add_dread = 2 - } - } - save_scope_as = mongol_emperor - # Send a message to the County's owner - scope:county.holder = { - send_interface_message = { - type = event_war_bad - title = mongols_sieged_county.t - left_icon = scope:mongol_emperor - right_icon = scope:county - scope:county = { mongols_devastate_county_effect = yes } - } - } - } - } - } -} - -intrigue_duel_on_attack_effect = { - scope:attacker = { - if = { - limit = { - has_character_flag = intrigue_duel_on_attack - } - duel = { - skill = intrigue - value = scope:defender.intrigue - 50 = { - compare_modifier = { - value = scope:duel_value - multiplier = 3.5 - min = -49 - } - desc = intrigue_duel_on_attack_effect.success - send_interface_toast = { - title = armies_hampered - left_icon = scope:attacker - right_icon = scope:defender - scope:defender = { - add_character_modifier = { - modifier = hampered_by_false_information_modifier - years = 5 - } - } - } - hidden_effect = { - show_as_tooltip = { - send_interface_toast = { - title = armies_hampered - left_icon = scope:attacker - right_icon = scope:defender - scope:defender = { - add_character_modifier = { - modifier = hampered_by_false_information_modifier - years = 5 - } - } - } - } - } - } - 50 = { - compare_modifier = { - value = scope:duel_value - multiplier = -3.5 - min = -49 - } - desc = intrigue_duel_on_attack_effect.failure - send_interface_toast = { - title = armies_unhampered - left_icon = scope:attacker - right_icon = scope:defender - } - } - } - } - } -} - -allies_progress_towards_friendship_effect = { - scope:war = { - every_war_participant = { - limit = { - is_target_in_variable_list = { - name = joined_as_ally - target = scope:war - } - } - if = { - limit = { - is_defender_in_war = scope:war - } - scope:defender = { - save_scope_as = actor - } - } - else = { - scope:attacker = { - save_scope_as = actor - } - } - save_scope_as = ally - if = { - limit = { - is_ai = yes - scope:war = { - war_contribution = { - target = scope:ally - value > 0 - } - } - } - scope:actor = { - progress_towards_friend_effect = { - CHARACTER = scope:ally - OPINION = 0 - REASON = friend_alliance - } - } - } - else = { - hidden_effect = { #To nudge friendship - scope:actor = { - if = { - limit = { - NOR = { - has_relation_friend = scope:ally - has_relation_potential_friend = scope:ally - } - scope:war = { - war_contribution = { - target = scope:ally - value > 0 - } - } - } - set_relation_potential_friend = scope:ally - } - } - } - } - remove_list_variable = { - name = joined_as_ally - target = scope:war - } - } - } -} - -# ROOT is a combat side in this scripted effect, but the THIS scope should be the commander -commander_trait_leveling_leveling_effect = { - if = { # Terrain Based - limit = { - OR = { - has_trait = desert_warrior - has_trait = open_terrain_expert - has_trait = rough_terrain_expert - has_trait = forest_fighter - has_trait = jungle_stalker - } - } - if = { - limit = { - has_trait = desert_warrior - location = { - OR = { - terrain = drylands - terrain = desert - terrain = desert_mountains - terrain = oasis - } - } - } - add_trait_xp = { - trait = desert_warrior - value = { - value = $XP$ - multiply = 2 - add = { - value = martial - divide = 10 - } - } - } - } - else_if = { - limit = { - has_trait = open_terrain_expert - location = { - OR = { - terrain = farmlands - terrain = plains - terrain = steppe - } - } - } - add_trait_xp = { - trait = open_terrain_expert - value = { - value = $XP$ - multiply = 2 - add = { - value = martial - divide = 10 - } - } - } - } - else_if = { - limit = { - has_trait = rough_terrain_expert - location = { - OR = { - terrain = hills - terrain = mountains - terrain = wetlands - } - } - } - add_trait_xp = { - trait = rough_terrain_expert - value = { - value = $XP$ - multiply = 2 - add = { - value = martial - divide = 10 - } - } - } - } - else_if = { - limit = { - has_trait = forest_fighter - location = { - OR = { - terrain = forest - terrain = taiga - } - } - } - add_trait_xp = { - trait = forest_fighter - value = { - value = $XP$ - multiply = 2 - add = { - value = martial - divide = 10 - } - } - } - } - else_if = { - limit = { - has_trait = jungle_stalker - location = { - terrain = jungle - } - } - add_trait_xp = { - trait = jungle_stalker - value = { - value = $XP$ - multiply = 2 - add = { - value = martial - divide = 10 - } - } - } - } - } - if = { # Forder - limit = { - has_trait = forder - location = { - OR = { - is_coastal = yes - is_riverside_province = yes - } - } - } - add_trait_xp = { - trait = forder - value = { - value = $XP$ - multiply = 2 - add = { - value = martial - divide = 10 - } - } - } - } - if = { # Attackers/Defenders - limit = { - OR = { - has_trait = aggressive_attacker - has_trait = unyielding_defender - } - } - if = { - limit = { - has_trait = aggressive_attacker - root = { is_combat_side_attacker = yes } - } - add_trait_xp = { - trait = aggressive_attacker - value = { - value = $XP$ - add = { - value = martial - divide = 10 - } - } - } - } - else_if = { - limit = { - has_trait = unyielding_defender - root = { is_combat_side_attacker = no } - } - add_trait_xp = { - trait = unyielding_defender - value = { - value = $XP$ - add = { - value = martial - divide = 10 - } - } - } - } - } - if = { # Flexible Leader - limit = { - has_trait = flexible_leader - } - add_trait_xp = { - trait = flexible_leader - value = { - value = $XP$ - multiply = 0.5 - add = { - value = martial - divide = 10 - } - } - } - } - if = { # Religious - limit = { - has_trait = holy_warrior - root.enemy_side.side_commander.religion != root.side_commander.religion - } - add_trait_xp = { - trait = holy_warrior - value = { - value = $XP$ - multiply = 0.75 - add = { - value = martial - divide = 10 - } - } - } - } - if = { # Larger Armies - limit = { - OR = { - has_trait = reckless - has_trait = cautious_leader - } - root = { troops_ratio < 0.95 } - } - if = { - limit = { - has_trait = reckless - } - add_trait_xp = { - trait = reckless - value = { - value = $XP$ - multiply = 3 - add = { - value = martial - divide = 10 - } - } - } - } - if = { - limit = { - has_trait = cautious_leader - } - add_trait_xp = { - trait = cautious_leader - value = { - value = $XP$ - multiply = 3 - add = { - value = martial - divide = 10 - } - } - } - } - } - if = { # Seasonal - limit = { - has_trait = winter_soldier - location = { has_winter_combat_trigger = yes } - } - add_trait_xp = { - trait = winter_soldier - value = { - value = $XP$ - multiply = 0.75 - add = { - value = martial - divide = 10 - } - } - } - } - if = { # Peasant Leader fighting non peasants - limit = { - has_trait = peasant_leader - root.enemy_side.side_commander = { - is_lowborn = no - } - } - add_trait_xp = { - trait = peasant_leader - value = { - value = $XP$ - multiply = 0.75 - add = { - value = martial - divide = 10 - } - } - } - } -} - -on_ceremonial_claimant_faction_war_win_common = { - $TITLE$ = { - save_scope_as = target_title - holder = { save_scope_as = previous_emperor } - } - $CLAIMANT$ = { - save_scope_as = the_claimant - # If the claimant is the prisoner of the defender, free the claimant (it doesn't make much sense to leave the new king in the old king's dungeon) - if = { - limit = { is_imprisoned_by = $DEFENDER$ } - release_from_prison = yes - } - } - - # Add mutual opinion bonuses between claimant and faction members, as well as a hook on the claimant if possible. - $ATTACKER$.joined_faction = { - every_faction_member = { - custom = FACTION_CLAIMANT_EVERY_FACTION_MEMBER - limit = { - NOT = { this = $ATTACKER$.joined_faction.special_character } - } - hidden_effect = { - add_opinion = { - modifier = ceremonial_claimant_faction_member_opinion - target = $ATTACKER$.joined_faction.special_character - } - reverse_add_opinion = { - modifier = ceremonial_claimant_faction_claimant_opinion - target = $ATTACKER$.joined_faction.special_character - } - } - if = { - limit = { - can_add_hook = { - type = favor_hook - target = $ATTACKER$.joined_faction.special_character - } - } - add_hook = { - type = favor_hook - target = $ATTACKER$.joined_faction.special_character - } - } - # Struggle boost - if = { - limit = { - culture = $ATTACKER$.joined_faction.special_character.culture - any_character_struggle = { - involvement = involved - has_struggle_phase_parameter = struggle_prestige_install_same_culture_claimant - } - } - add_prestige = major_prestige_gain - } - - # Save the number of faction members for use further down - add_to_list = num_faction_members - } - } - - scope:the_claimant = { - if = { - limit = { is_landed = yes } - force_step_down_landed_titles = yes - } - } - - # Give the claimant their new title. - create_title_and_vassal_change = { - type = faction_demand - save_scope_as = change - add_claim_on_loss = yes - } - - # Preserve Grandeur - if = { - limit = { - scope:target_title.holder = { - has_royal_court = yes - has_dlc_feature = royal_court - } - scope:the_claimant = { - has_royal_court = no - } - } - scope:the_claimant = { - set_variable = { - name = previous_holder_grandeur_value - value = scope:target_title.holder.court_grandeur_current - } - } - } - - scope:the_claimant = { - if = { - limit = { has_trait = former_emperor } - remove_trait = former_emperor - } - } - - scope:target_title = { - change_title_holder = { - holder = scope:the_claimant - change = scope:change - } - } - - resolve_title_and_vassal_change = scope:change - - scope:previous_emperor = { - add_trait = former_emperor - } - - # We give you decent Legitimacy so you don't get immediately deposed - people _really_ want you in the throne - # Can you even get Legitimacy? - if = { - limit = { - scope:the_claimant = { - is_valid_for_legitimacy_change = yes - } - } - # Per tier - if = { - limit = { - scope:target_title.tier = tier_empire - } - scope:the_claimant = { - add_legitimacy = { - value = 1000 - multiply = nomadic_legitimacy_claimant_multiplier - } - } - } - else_if = { - limit = { - scope:target_title.tier = tier_kingdom - } - scope:the_claimant = { - add_legitimacy = { - value = 750 - multiply = nomadic_legitimacy_claimant_multiplier - } - } - } - else_if = { - limit = { - scope:target_title.tier = tier_duchy - } - scope:the_claimant = { - add_legitimacy = { - value = 500 - multiply = nomadic_legitimacy_claimant_multiplier - } - } - } - else = { - scope:the_claimant = { - add_legitimacy = { - value = 300 - multiply = nomadic_legitimacy_claimant_multiplier - } - } - } - # Per number of faction members - if = { - limit = { - list_size:num_faction_members > 0 - scope:the_claimant = { - is_valid_for_legitimacy_change = yes - } - } - scope:the_claimant = { - add_legitimacy = { - value = list_size:num_faction_members - multiply = 50 - } - } - } - - } - - # Add Appropriate Grandeur - scope:the_claimant = { - if = { - limit = { - exists = var:previous_holder_grandeur_value - has_royal_court = yes - has_dlc_feature = royal_court - } - hidden_effect = { - change_current_court_grandeur = -100 # Reset to 0 - change_current_court_grandeur = var:previous_holder_grandeur_value - remove_variable = previous_holder_grandeur_value - } - change_current_court_grandeur = massive_court_grandeur_gain # Gain a bonus to Grandeur for winning a claim faction - } - } -} diff --git a/N3OW/common/scripted_effects/00_while_loop_effects.txt b/N3OW/common/scripted_effects/00_while_loop_effects.txt deleted file mode 100644 index bc01ac71..00000000 --- a/N3OW/common/scripted_effects/00_while_loop_effects.txt +++ /dev/null @@ -1,89 +0,0 @@ -#WHILE LOOP EFFECTS - -#3 effects for managing while loops with counter: -#set_while_counter_variable_effect -#increase_while_counter_variable_effect -#remove_while_counter_variable_effect - -#save_target_list_as_separate_scopes_effect - saves up to 6 members of a target_list in alphabetical scopes (can be expanded if needed) - - -#3 effects for managing while loops with counter -set_while_counter_variable_effect = { - set_variable = { - name = while_counter - value = 0 - } -} - -increase_while_counter_variable_effect = { - change_variable = { - name = while_counter - add = 1 - } - -} - -remove_while_counter_variable_effect = { - remove_variable = while_counter -} - -#saves up to 6 members of a target_list in alphabetical scopes (can be expanded if needed) - -#Needs the argument TARGET_LIST with the target_list name -save_target_list_as_separate_scopes_effect = { - random_in_list = { - list = $TARGET_LIST$ - save_scope_as = target_list_member_a - } - random_in_list = { - list = $TARGET_LIST$ - limit = { scope:target_list_member_a != this } - save_scope_as = target_list_member_b - } - random_in_list = { - list = $TARGET_LIST$ - limit = { - NOR = { - scope:target_list_member_a = this - scope:target_list_member_b = this - } - } - save_scope_as = target_list_member_c - } - random_in_list = { - list = $TARGET_LIST$ - limit = { - NOR = { - scope:target_list_member_a = this - scope:target_list_member_b = this - scope:target_list_member_c = this - } - } - save_scope_as = target_list_member_d - } - random_in_list = { - list = $TARGET_LIST$ - limit = { - NOR = { - scope:target_list_member_a = this - scope:target_list_member_b = this - scope:target_list_member_c = this - scope:target_list_member_d = this - } - } - save_scope_as = target_list_member_e - } - random_in_list = { - list = $TARGET_LIST$ - limit = { - NOR = { - scope:target_list_member_a = this - scope:target_list_member_b = this - scope:target_list_member_c = this - scope:target_list_member_d = this - } - } - save_scope_as = target_list_member_f - } -} \ No newline at end of file diff --git a/N3OW/common/scripted_effects/00_witch_effects.txt b/N3OW/common/scripted_effects/00_witch_effects.txt deleted file mode 100644 index 24cf89dd..00000000 --- a/N3OW/common/scripted_effects/00_witch_effects.txt +++ /dev/null @@ -1,209 +0,0 @@ -###CHILD CONVERSION EFFECTS### - -child_witch_conversion_success_effect = { - scope:child = { - give_witch_secret_or_trait_effect = yes - house = { - house_head = { - add_to_list = witch_message - } - } - every_parent = { - limit = { - is_ruler = yes - is_witch_trigger = yes - } - add_to_list = witch_message - } - random_relation = { - type = guardian - save_scope_as = guardian - } - } - every_in_list = { - list = witch_message - limit = { - this != scope:child - } - save_scope_as = witch_knower - send_interface_message = { - type = event_witchcraft_good - title = witch.1001.message - left_icon = scope:child - scope:child = { - if = { - limit = { has_trait = witch } - show_as_tooltip = { add_trait_force_tooltip = witch } - } - else_if = { - limit = { exists = scope:witch_secret } - scope:witch_secret = { reveal_to = scope:witch_knower } - } - add_opinion = { - target = PREV - modifier = impressed_opinion - opinion = 20 - } - } - random_secret = { - type = secret_witch - limit = { - NOT = { is_known_by = scope:child } - } - reveal_to = scope:child - } - } - } -} - -child_witch_conversion_failure_effect = { - scope:guardian = { - send_interface_toast = { - type = event_witchcraft_bad - title = child_witch_conversion_failure_effect.desc - left_icon = scope:child - scope:child = { - add_opinion = { - target = scope:guardian - modifier = suspicion_opinion - opinion = -15 - } - } - } - if = { - limit = { this = root } - hidden_effect = { - add_opinion = { - target = scope:child - modifier = disappointed_opinion - opinion = -15 - } - } - } - else = { - add_opinion = { - target = scope:child - modifier = disappointed_opinion - opinion = -15 - } - } - } -} - -child_witch_conversion_critical_failure_effect = { - scope:guardian = { - send_interface_toast = { - type = event_witchcraft_bad - title = child_witch_conversion_critical_failure_effect.desc - left_icon = scope:child - - scope:child = { - add_opinion = { - target = scope:guardian - modifier = hate_opinion - opinion = -30 - } - } - } - scope:child = { - scope:guardian = { - random_secret = { - type = secret_witch - save_scope_as = guardian_witch_secret - if = { - limit = { NOT = { is_known_by = scope:child } } - reveal_to = scope:child - } - if = { - limit = { - exists = scope:child.liege - NOR = { - is_known_by = scope:child.liege - scope:child = { is_ruler = yes } - } - } - scope:child.liege = { - send_interface_message = { - type = event_witchcraft_bad - title = child_witch_conversion_critical_failure_effect.liege.desc - left_icon = scope:guardian - right_icon = scope:child - scope:guardian_witch_secret = { reveal_to = scope:child.liege } - } - } - } - } - } - } - scope:guardian = { - if = { - limit = { this = root } - hidden_effect = { - add_opinion = { - target = scope:child - modifier = hate_opinion - opinion = -30 - } - } - } - else = { - add_opinion = { - target = scope:child - modifier = hate_opinion - opinion = -30 - } - } - } - } -} - -#Creates a witch and saves it as created_witch -#WHO is character who will interact with the witch and TEMPLATE is the character whose culture should be used -create_witch_effect = { - #Gender - random_list = { - 50 = { #Female - modifier = { - $WHO$ = { is_attracted_to_women = yes } - add = 30 - } - dummy_female = { save_temporary_scope_as = witch_gender } - } - 50 = { #Male - modifier = { - $WHO$ = { is_attracted_to_men = yes } - add = 30 - } - dummy_male = { save_temporary_scope_as = witch_gender } - } - } - - #Create them - create_character = { - location = $WHO$.capital_province - culture = $WHO$.culture - faith = $WHO$.faith - gender = scope:witch_gender - template = witchy_template - random_traits = no - - after_creation = { - give_witch_secret_or_trait_effect = yes - - #Sometimes adjust sexuality to create compatibility with WHO - if = { - limit = { - $WHO$ = { is_attracted_to_gender_of = prev } - NOT = { is_attracted_to_gender_of = $WHO$ } - } - random = { - chance = 65 - set_sexuality = bisexual - } - } - } - - save_scope_as = created_witch - } -} - diff --git a/N3OW/common/scripted_effects/00_yearly_event_effects.txt b/N3OW/common/scripted_effects/00_yearly_event_effects.txt deleted file mode 100644 index f36cde51..00000000 --- a/N3OW/common/scripted_effects/00_yearly_event_effects.txt +++ /dev/null @@ -1,433 +0,0 @@ -#Effects used in the random Yearly Events - -##################################################################### -# EFFECT LIST -##################################################################### -# !!! Remember to add all new effects with a short description here !!! -# - -yearly_0001_set_random_weighted_skill_effect = { - set_variable = { - name = yearly_0001_skill - value = flag:diplomacy - } - random_list = { - 20 = { - #Must be better at the skill we pick than our liege. - trigger = { - $MENTEE$.diplomacy < $MENTOR$.diplomacy - } - - $MENTEE$ = { - set_variable = { - name = yearly_0001_skill - value = flag:diplomacy - } - } - } - 20 = { - #Must be better at the skill we pick than our liege. - trigger = { - $MENTEE$.martial < $MENTOR$.martial - } - - $MENTEE$ = { - set_variable = { - name = yearly_0001_skill - value = flag:martial - } - } - } - 20 = { - #Must be better at the skill we pick than our liege. - trigger = { - $MENTEE$.stewardship < $MENTOR$.stewardship - } - - $MENTEE$ = { - set_variable = { - name = yearly_0001_skill - value = flag:stewardship - } - } - } - 20 = { - #Must be better at the skill we pick than our liege. - trigger = { - $MENTEE$.intrigue < $MENTOR$.intrigue - } - - $MENTEE$ = { - set_variable = { - name = yearly_0001_skill - value = flag:intrigue - } - } - } - 20 = { - # - trigger = { - $MENTEE$.learning < $MENTOR$.learning - } - - $MENTEE$ = { - set_variable = { - name = yearly_0001_skill - value = flag:learning - } - } - } - } -} - -yearly_0001_improve_skill_effect = { - $MENTOR$ = { - save_scope_as = effect_mentor - } - $MENTEE$ = { - save_scope_as = effect_mentee - } - - #First we need to determine how much our mentor can teach us. - #This is based on the skill difference between the two of us. - if = { - limit = { - var:yearly_0001_skill = flag:diplomacy - } - - random_list = { - #Permanently increase Diplomacy by 2 points - 33 = { - desc = yearly.0001.a.success - - #Lower chance of getting this result as Diplomacy increases. - yearly_0001_success_modifier = { - SKILL = diplomacy - } - - #Apply the skill increase - send_interface_toast = { - title = yearly.0001.a.success - left_icon = $MENTEE$ - right_icon = $MENTOR$ - add_diplomacy_skill = 2 - } - - } - #Temporarily increase Diplomacy by 3 points - 66 = { - desc = yearly.0001.a.failure - - send_interface_toast = { - title = yearly.0001.a.failure - left_icon = $MENTEE$ - right_icon = $MENTOR$ - add_character_modifier = { - modifier = yearly_0001_improved_diplomacy - years = 5 - } - } - } - } - } - else_if = { - limit = { - var:yearly_0001_skill = flag:martial - } - - random_list = { - #Permanently increase Martial by 2 points - 33 = { - desc = yearly.0001.a.success - - #Lower chance of getting this result as Martial increases. - yearly_0001_success_modifier = { - SKILL = martial - } - - #Apply the skill increase - send_interface_toast = { - title = yearly.0001.a.success - left_icon = $MENTEE$ - right_icon = $MENTOR$ - add_martial_skill = 2 - } - } - #Temporarily increase Martial by 3 points - 66 = { - desc = yearly.0001.a.failure - - send_interface_toast = { - title = yearly.0001.a.failure - left_icon = $MENTEE$ - right_icon = $MENTOR$ - add_character_modifier = { - modifier = yearly_0001_improved_martial - years = 5 - } - } - } - } - - } - else_if = { - limit = { - var:yearly_0001_skill = flag:stewardship - } - - random_list = { - #Permanently increase Stewardship by 2 points - 33 = { - desc = yearly.0001.a.success - #Lower chance of getting this result as Stewardship increases. - yearly_0001_success_modifier = { - SKILL = stewardship - } - - #Apply the skill increase - send_interface_toast = { - title = yearly.0001.a.success - left_icon = $MENTEE$ - right_icon = $MENTOR$ - add_stewardship_skill = 2 - } - } - #Temporarily increase Stewardship by 3 points - 66 = { - desc = yearly.0001.a.failure - - send_interface_toast = { - title = yearly.0001.a.failure - left_icon = $MENTEE$ - right_icon = $MENTOR$ - add_character_modifier = { - modifier = yearly_0001_improved_stewardship - years = 5 - } - } - } - } - } - else_if = { - limit = { - var:yearly_0001_skill = flag:intrigue - } - - random_list = { - #Permanently increase Intrigue by 2 points - 33 = { - desc = yearly.0001.a.success - #Lower chance of getting this result as Intrigue increases. - yearly_0001_success_modifier = { - SKILL = intrigue - } - - #Apply the skill increase - send_interface_toast = { - title = yearly.0001.a.success - left_icon = $MENTEE$ - right_icon = $MENTOR$ - add_intrigue_skill = 2 - } - } - #Temporarily increase Intrigue by 3 points - 66 = { - desc = yearly.0001.a.failure - - send_interface_toast = { - title = yearly.0001.a.failure - left_icon = $MENTEE$ - right_icon = $MENTOR$ - - add_character_modifier = { - modifier = yearly_0001_improved_intrigue - years = 5 - } - } - } - } - } - else_if = { - limit = { - var:yearly_0001_skill = flag:learning - } - - random_list = { - #Permanently increase Learning by 2 points - 33 = { - desc = yearly.0001.a.success - #Lower chance of getting this result as Learning increases. - yearly_0001_success_modifier = { - SKILL = learning - } - - #Apply the skill increase - send_interface_toast = { - title = yearly.0001.a.success - left_icon = $MENTEE$ - right_icon = $MENTOR$ - add_learning_skill = 2 - } - } - #Temporarily increase Learning by 3 points - 66 = { - desc = yearly.0001.a.failure - - send_interface_toast = { - title = yearly.0001.a.failure - left_icon = $MENTEE$ - right_icon = $MENTOR$ - add_character_modifier = { - modifier = yearly_0001_improved_learning - years = 5 - } - } - } - } - } -} - -#Tried to come up with a better way to do this other than making a duplicate function for it, but failed. -#Localization makes it nigh impossible to make a scripted effect which can handle all possible use cases effectively. -yearly_0001_improve_vassal_skill_effect = { - - #First we need to determine how much our mentor can teach us. - #This is based on the skill difference between the two of us. - if = { - limit = { - var:yearly_0001_skill = flag:diplomacy - } - - random_list = { - #Permanently increase Diplomacy by 2 points - 33 = { - desc = yearly.0001.b.success - #Lower chance of getting this result as Diplomacy increases. - yearly_0001_success_modifier = { - SKILL = diplomacy - } - - add_diplomacy_skill = 2 - } - #Temporarily increase Diplomacy by 3 points - 66 = { - desc = yearly.0001.b.failure - - add_character_modifier = { - modifier = yearly_0001_improved_diplomacy - years = 5 - } - } - } - } - else_if = { - limit = { - var:yearly_0001_skill = flag:martial - } - - random_list = { - #Permanently increase Martial by 2 points - 33 = { - desc = yearly.0001.b.success - #Lower chance of getting this result as Martial increases. - yearly_0001_success_modifier = { - SKILL = martial - } - - add_martial_skill = 2 - } - #Temporarily increase Martial by 3 points - 66 = { - desc = yearly.0001.b.failure - - add_character_modifier = { - modifier = yearly_0001_improved_martial - years = 5 - } - } - } - } - else_if = { - limit = { - var:yearly_0001_skill = flag:stewardship - } - - random_list = { - #Permanently increase Stewardship by 2 points - 33 = { - desc = yearly.0001.b.success - #Lower chance of getting this result as Stewardship increases. - yearly_0001_success_modifier = { - SKILL = stewardship - } - - add_stewardship_skill = 2 - } - #Temporarily increase Stewardship by 3 points - 66 = { - desc = yearly.0001.b.failure - - add_character_modifier = { - modifier = yearly_0001_improved_stewardship - years = 5 - } - } - } - } - else_if = { - limit = { - var:yearly_0001_skill = flag:intrigue - } - - random_list = { - #Permanently increase Intrigue by 2 points - 33 = { - desc = yearly.0001.b.success - #Lower chance of getting this result as Intrigue increases. - yearly_0001_success_modifier = { - SKILL = intrigue - } - - add_intrigue_skill = 2 - } - #Temporarily increase Intrigue by 3 points - 66 = { - desc = yearly.0001.b.failure - - add_character_modifier = { - modifier = yearly_0001_improved_intrigue - years = 5 - } - } - } - } - else_if = { - limit = { - var:yearly_0001_skill = flag:learning - } - - random_list = { - #Permanently increase Learning by 2 points - 33 = { - desc = yearly.0001.b.success - #Lower chance of getting this result as Learning increases. - yearly_0001_success_modifier = { - SKILL = learning - } - - add_learning_skill = 2 - } - #Temporarily increase Learning by 3 points - 66 = { - desc = yearly.0001.b.failure - - add_character_modifier = { - modifier = yearly_0001_improved_learning - years = 5 - } - } - } - } -} - - diff --git a/N3OW/common/scripted_effects/01_building_upgrade_effects.txt b/N3OW/common/scripted_effects/01_building_upgrade_effects.txt deleted file mode 100644 index da11f80e..00000000 --- a/N3OW/common/scripted_effects/01_building_upgrade_effects.txt +++ /dev/null @@ -1,275 +0,0 @@ -################################################## -# Decisions -################################################## - -# Upgrades a single farm type building -# If such building does not exist, it is built. If building does not exist and there is no slot, it is built and a slot is added. -upgrade_farm_building = { - if = { - limit = { - building_farm_estates_requirement_terrain = yes - } - if = { - limit = { - NOT = { has_building = farm_estates_01 } - free_building_slots = 0 - } - add_province_modifier = extra_building_slot - add_building = farm_estates_01 - } - else_if = { - limit = { - NOT = { has_building = farm_estates_01 } - free_building_slots > 0 - } - add_building = farm_estates_01 - } - else_if = { - limit = { - has_building = farm_estates_01 - } - add_building = farm_estates_02 - } - else_if = { - limit = { - has_building = farm_estates_02 - } - add_building = farm_estates_03 - } - else_if = { - limit = { - has_building = farm_estates_03 - } - add_building = farm_estates_04 - } - else_if = { - limit = { - has_building = farm_estates_04 - } - add_building = farm_estates_05 - } - else_if = { - limit = { - has_building = farm_estates_05 - } - add_building = farm_estates_06 - } - else_if = { - limit = { - has_building = farm_estates_06 - } - add_building = farm_estates_07 - } - else_if = { - limit = { - has_building = farm_estates_07 - } - add_building = farm_estates_08 - } - } - else = { - if = { - limit = { - NOT = { has_building = pastures_01 } - free_building_slots = 0 - } - add_province_modifier = extra_building_slot - add_building = pastures_01 - } - else_if = { - limit = { - NOT = { has_building = pastures_01 } - free_building_slots >= 0 - } - add_building = pastures_01 - } - else_if = { - limit = { - has_building = pastures_01 - } - add_building = pastures_02 - } - else_if = { - limit = { - has_building = pastures_02 - } - add_building = pastures_03 - } - else_if = { - limit = { - has_building = pastures_03 - } - add_building = pastures_04 - } - else_if = { - limit = { - has_building = pastures_04 - } - add_building = pastures_05 - } - else_if = { - limit = { - has_building = pastures_05 - } - add_building = pastures_06 - } - else_if = { - limit = { - has_building = pastures_06 - } - add_building = pastures_07 - } - else_if = { - limit = { - has_building = pastures_07 - } - add_building = pastures_08 - } - } -} - -# Upgrades a single tradeport building -# If such a building does not exist and can be built, it is built. If no slot exists, a slot is added and it is built. -upgrade_tradeport = { - if = { - limit = { - NOR = { - has_building = common_tradeport_01 - has_building = common_tradeport_02 - has_building = common_tradeport_03 - has_building = common_tradeport_04 - has_building = common_tradeport_05 - has_building = common_tradeport_06 - has_building = common_tradeport_07 - has_building = common_tradeport_08 - } - free_building_slots = 0 - } - add_province_modifier = extra_building_slot - add_building = common_tradeport_01 - } - else_if = { - limit = { - NOR = { - has_building = common_tradeport_01 - has_building = common_tradeport_02 - has_building = common_tradeport_03 - has_building = common_tradeport_04 - has_building = common_tradeport_05 - has_building = common_tradeport_06 - has_building = common_tradeport_07 - has_building = common_tradeport_08 - } - free_building_slots > 1 - } - add_building = common_tradeport_01 - } - else_if = { - limit = { - has_building = common_tradeport_01 - } - add_building = common_tradeport_02 - } - else_if = { - limit = { - has_building = common_tradeport_02 - } - add_building = common_tradeport_03 - } - else_if = { - limit = { - has_building = common_tradeport_03 - } - add_building = common_tradeport_04 - } - else_if = { - limit = { - has_building = common_tradeport_04 - } - add_building = common_tradeport_05 - } - else_if = { - limit = { - has_building = common_tradeport_05 - } - add_building = common_tradeport_06 - } - else_if = { - limit = { - has_building = common_tradeport_06 - } - add_building = common_tradeport_07 - } - else_if = { - limit = { - has_building = common_tradeport_07 - } - add_building = common_tradeport_08 - } -} - -# Upgrades a single guidhall building -# If such a building does not exist and can be built, it is built. If no slot exists, a slot is added and it is built. -upgrade_guildhall = { - if = { - limit = { - NOT = { - has_building_or_higher = guild_halls_01 - } - free_building_slots = 0 - } - add_province_modifier = extra_building_slot - add_building = guild_halls_01 - } - else_if = { - limit = { - NOT = { - has_building_or_higher = guild_halls_01 - } - free_building_slots > 1 - } - add_building = guild_halls_01 - } - else_if = { - limit = { - has_building = guild_halls_01 - } - add_building = guild_halls_02 - } - else_if = { - limit = { - has_building = guild_halls_02 - } - add_building = guild_halls_03 - } - else_if = { - limit = { - has_building = guild_halls_03 - } - add_building = guild_halls_04 - } - else_if = { - limit = { - has_building = guild_halls_04 - } - add_building = guild_halls_05 - } - else_if = { - limit = { - has_building = guild_halls_05 - } - add_building = guild_halls_06 - } - else_if = { - limit = { - has_building = guild_halls_06 - } - add_building = guild_halls_07 - } - else_if = { - limit = { - has_building = guild_halls_07 - } - add_building = guild_halls_08 - } -} diff --git a/N3OW/common/scripted_effects/01_dlc_bp1_filippa_scripted_effects.txt b/N3OW/common/scripted_effects/01_dlc_bp1_filippa_scripted_effects.txt deleted file mode 100644 index 8a67ea4f..00000000 --- a/N3OW/common/scripted_effects/01_dlc_bp1_filippa_scripted_effects.txt +++ /dev/null @@ -1,369 +0,0 @@ - -#Does not add opinion if either person is NOT AI -worsen_relationship_effect = { - if = { - limit = { - NOT = { this = $TARGET$ } - } - #Best Friend -> Friend - if = { - limit = { - has_relation_best_friend = $TARGET$ - } - remove_relation_best_friend = $TARGET$ - hidden_effect = { - set_relation_friend = { - target = $TARGET$ - reason = $REASON$ - } - } - if = { - limit = { - root = { is_ai = yes } - } - add_opinion = { - target = $TARGET$ - modifier = unfriendly_opinion - opinion = -15 - } - } - if = { - limit = { - $TARGET$ = { is_ai = yes } - } - reverse_add_opinion = { - target = $TARGET$ - modifier = unfriendly_opinion - opinion = -15 - } - } - } - #Friend -> Potential Friend - else_if = { - limit = { - has_relation_friend = $TARGET$ - } - remove_relation_friend = $TARGET$ - hidden_effect = { set_relation_potential_friend = $TARGET$ } - if = { - limit = { - root = { is_ai = yes } - } - add_opinion = { - target = $TARGET$ - modifier = unfriendly_opinion - opinion = -15 - } - } - if = { - limit = { - $TARGET$ = { is_ai = yes } - } - reverse_add_opinion = { - target = $TARGET$ - modifier = unfriendly_opinion - opinion = -15 - } - } - } - #Potential Friend -> Potential Rival - else_if = { - limit = { - has_relation_potential_friend = $TARGET$ - NOT = { has_relation_potential_rival = $TARGET$ } - } - remove_relation_potential_friend = $TARGET$ - set_relation_potential_rival = $TARGET$ - if = { - limit = { - root = { is_ai = yes } - } - add_opinion = { - target = $TARGET$ - modifier = unfriendly_opinion - opinion = -15 - } - } - if = { - limit = { - $TARGET$ = { is_ai = yes } - } - reverse_add_opinion = { - target = $TARGET$ - modifier = unfriendly_opinion - opinion = -15 - } - } - } - #Potential Rival -> Rival - else_if = { - limit = { - has_relation_potential_rival = $TARGET$ - } - set_relation_rival = { - target = $TARGET$ - reason = $REASON$ - } - if = { - limit = { - root = { is_ai = yes } - } - add_opinion = { - target = $TARGET$ - modifier = unfriendly_opinion - opinion = -30 - } - } - if = { - limit = { - $TARGET$ = { is_ai = yes } - } - reverse_add_opinion = { - target = $TARGET$ - modifier = unfriendly_opinion - opinion = -30 - } - } - } - #Rival -> Nemesis - else_if = { - limit = { - has_relation_rival = $TARGET$ - can_set_relation_nemesis_trigger = { CHARACTER = $TARGET$ } - } - set_relation_nemesis = { - target = $TARGET$ - reason = $REASON$ - } - if = { - limit = { - root = { is_ai = yes } - } - add_opinion = { - target = $TARGET$ - modifier = hate_opinion - opinion = -50 - } - } - if = { - limit = { - $TARGET$ = { is_ai = yes } - } - reverse_add_opinion = { - target = $TARGET$ - modifier = hate_opinion - opinion = -50 - } - } - } - #Nothing -> Potential Rival - else = { - set_relation_potential_rival = $TARGET$ - if = { - limit = { - root = { is_ai = yes } - } - add_opinion = { - target = $TARGET$ - modifier = unfriendly_opinion - opinion = -15 - } - } - if = { - limit = { - $TARGET$ = { is_ai = yes } - } - reverse_add_opinion = { - target = $TARGET$ - modifier = unfriendly_opinion - opinion = -15 - } - } - } - } -} - -#Does not add opinion if either person is NOT AI -improve_relationship_effect = { - if = { - limit = { - NOT = { this = $TARGET$ } - is_alive = yes - $TARGET$ = { is_alive = yes } - } - #Nemesis -> Rival - if = { - limit = { - has_relation_nemesis = $TARGET$ - } - remove_relation_nemesis = $TARGET$ - hidden_effect = { - set_relation_rival = { - target = $TARGET$ - reason = $REASON$ - } - } - if = { - limit = { - root = { is_ai = yes } - } - add_opinion = { - target = $TARGET$ - modifier = friendliness_opinion - opinion = 15 - } - } - if = { - limit = { - $TARGET$ = { is_ai = yes } - } - reverse_add_opinion = { - target = $TARGET$ - modifier = friendliness_opinion - opinion = 15 - } - } - } - #Rival -> Potential Rival - else_if = { - limit = { - has_relation_rival = $TARGET$ - } - remove_relation_rival = $TARGET$ - hidden_effect = { set_relation_potential_rival = $TARGET$ } - if = { - limit = { - root = { is_ai = yes } - } - add_opinion = { - target = $TARGET$ - modifier = friendliness_opinion - opinion = 15 - } - } - if = { - limit = { - $TARGET$ = { is_ai = yes } - } - reverse_add_opinion = { - target = $TARGET$ - modifier = friendliness_opinion - opinion = 15 - } - } - } - #Potential Rival -> Potential Friend - else_if = { - limit = { - has_relation_potential_rival = $TARGET$ - } - remove_relation_potential_rival = $TARGET$ - hidden_effect = { set_relation_potential_friend = $TARGET$ } - if = { - limit = { - root = { is_ai = yes } - } - add_opinion = { - target = $TARGET$ - modifier = friendliness_opinion - opinion = 15 - } - } - if = { - limit = { - $TARGET$ = { is_ai = yes } - } - reverse_add_opinion = { - target = $TARGET$ - modifier = friendliness_opinion - opinion = 15 - } - } - } - #Potential Friend -> Friend - else_if = { - limit = { - has_relation_potential_friend = $TARGET$ - } - set_relation_friend = { - target = $TARGET$ - reason = $REASON$ - } - if = { - limit = { - root = { is_ai = yes } - } - add_opinion = { - target = $TARGET$ - modifier = friendliness_opinion - opinion = 30 - } - } - if = { - limit = { - $TARGET$ = { is_ai = yes } - } - reverse_add_opinion = { - target = $TARGET$ - modifier = friendliness_opinion - opinion = 30 - } - } - } - #Friend -> Best Friend - else_if = { - limit = { - has_relation_friend = $TARGET$ - can_set_relation_best_friend_trigger = { CHARACTER = $TARGET$ } - } - set_relation_best_friend = { - target = $TARGET$ - reason = $REASON$ - } - if = { - limit = { - root = { is_ai = yes } - } - add_opinion = { - target = $TARGET$ - modifier = friendliness_opinion - opinion = 50 - } - } - if = { - limit = { - $TARGET$ = { is_ai = yes } - } - reverse_add_opinion = { - target = $TARGET$ - modifier = friendliness_opinion - opinion = 50 - } - } - } - #Nothing -> Potential Friend - else = { - set_relation_potential_friend = $TARGET$ - if = { - limit = { - root = { is_ai = yes } - } - add_opinion = { - target = $TARGET$ - modifier = friendliness_opinion - opinion = 15 - } - } - if = { - limit = { - $TARGET$ = { is_ai = yes } - } - reverse_add_opinion = { - target = $TARGET$ - modifier = friendliness_opinion - opinion = 15 - } - } - } - } -} diff --git a/N3OW/common/scripted_effects/01_dlc_fp1_scripted_effects.txt b/N3OW/common/scripted_effects/01_dlc_fp1_scripted_effects.txt deleted file mode 100644 index cbccc128..00000000 --- a/N3OW/common/scripted_effects/01_dlc_fp1_scripted_effects.txt +++ /dev/null @@ -1,1105 +0,0 @@ -################################################## -# Decisions -################################################## - -secure_high_kingdom_north_sea_scripted_effect = { - scope:founder = { - #Standard effects. - ##Adjust the de jure capital appropriately first up, since otherwise we won't be able to see your preferred title. - hidden_effect = { - #If it's Denmark, we do nothing, as Denmark has the capital & CoA by default. - #If it's England, we make the capital London/York. - if = { - limit = { primary_title = title:k_england } - title:e_north_sea = { - set_capital_county = title:k_england.title_capital_county - } - } - #If it's Norway, we make the capital Steinkjer. - if = { - limit = { primary_title = title:k_norway } - title:e_north_sea = { - set_capital_county = title:c_trandheim.title_capital_county - } - } - } - ##Hand over the High Kingdom. - create_title_and_vassal_change = { - type = created - save_scope_as = title_change - add_claim_on_loss = no - } - title:e_north_sea = { - change_title_holder = { - holder = scope:founder - change = scope:title_change - } - } - resolve_title_and_vassal_change = scope:title_change - ##Configure the new de jure setup. - title:k_england = { set_de_jure_liege_title = title:e_north_sea } - title:k_denmark = { set_de_jure_liege_title = title:e_north_sea } - title:k_norway = { set_de_jure_liege_title = title:e_north_sea } - ##Rename rump-Britannia, as it hardly covers the whole island any more. - title:e_britannia = { set_title_name = e_albia } - ## Completely controlled duchies of k_daneland are transferred back to k_england. - if = { - limit = { - title:k_daneland = { - any_in_de_jure_hierarchy = { - tier = tier_duchy - save_temporary_scope_as = current_duchy - scope:founder = { completely_controls = scope:current_duchy } - } - } - } - custom_tooltip = secure_high_kingdom_north_sea_scripted_effect.daneland_reabsorbed.tt - hidden_effect = { - title:k_daneland = { - every_in_de_jure_hierarchy = { - limit = { - tier = tier_duchy - save_temporary_scope_as = current_duchy - scope:founder = { completely_controls = scope:current_duchy } - } - set_de_jure_liege_title = title:k_england - } - } - } - } - - #Variable effects. - ##Unreformed tribals. - if = { - limit = { - government_has_flag = government_is_tribal - faith = { has_doctrine_parameter = unreformed } - } - #First, set a flag for achievements. - add_achievement_flag_effect = { FLAG = canute_the_greater_achievement_flag } - #You become feudal. - convert_whole_realm_to_feudalism_effect = yes - #To keep you stable, we give you a nice permanent modifier. - if = { - limit = { is_male = yes } - add_character_modifier = { modifier = high_king_of_the_seas_fp1_modifier } - } - else = { - add_character_modifier = { modifier = high_queen_of_the_seas_fp1_modifier } - } - #And a historically-appropriate nickname. - give_nickname = nick_the_sea_king - } - ##Reformed pagans. - else_if = { - limit = { - faith.religion = { is_in_family = rf_pagan } - NOT = { - faith = { has_doctrine_parameter = unreformed } - } - } - #We give you a nice hefty conversion boost against other reformed faiths for twenty years. - if = { - limit = { is_male = yes } - add_character_modifier = { - modifier = defiant_high_king_conversion_boost_modifier - years = 20 - } - } - else = { - add_character_modifier = { - modifier = defiant_high_queen_conversion_boost_modifier - years = 20 - } - } - #And an appropriate nickname. - give_nickname = nick_the_defiant - } - ##Everyone else (e.g., Christians, unreformed feudals, etc). - else = { - #Loyalty hooks & huge opinion boost from all agreeable vassals. - every_vassal = { - limit = { - is_powerful_vassal = yes - opinion = { - target = scope:founder - value >= 1 - } - } - if = { - limit = { - scope:founder = { is_male = yes } - } - add_opinion = { - modifier = king_of_the_north_sea_opinion - target = scope:founder - } - } - else = { - add_opinion = { - modifier = queen_of_the_north_sea_opinion - target = scope:founder - } - } - save_temporary_scope_as = current_vassal - scope:founder = { - add_hook = { - type = loyalty_hook - target = scope:current_vassal - } - } - } - #And a suitable nickname. - give_nickname = nick_the_great - } - } -} - -found_capital_of_rus_scripted_effect = { - #Reward fame to compensate for reduced development gain. - scope:new_rus_capital.holder = { - add_prestige_experience = major_prestige_gain - } - scope:new_rus_capital = { - #Boost local development a few levels; majority of development gain is handled in the modifiers now. - if = { - limit = { development_level < 5 } - change_development_level = { - value = 5 - subtract = scope:new_rus_capital.development_level - } - } - else_if = { - limit = { development_level < 8 } - change_development_level = { - value = 8 - subtract = scope:new_rus_capital.development_level - } - } - else_if = { - limit = { development_level < 12 } - change_development_level = { - value = 12 - subtract = scope:new_rus_capital.development_level - } - } - #If control is less than full, boost it to full. - if = { - limit = { county_control < full_county_control } - change_county_control = 100 - } - #Add county modifier giving solid opinion for a decent chunk of time. - add_county_modifier = { - modifier = capital_of_rus_opinion_modifier - years = 20 - } - #Add county modifier giving intense benefits for a century. - add_county_modifier = { - modifier = capital_of_rus_misc_benefits_modifier - years = 100 - } - #If this county isn't the de jure capital of e_russia, make it so. - if = { - limit = { - NOT = { this = title:e_russia.title_capital_county } - } - title:e_russia = { set_capital_county = scope:new_rus_capital } - } - } -} - -fp1_apply_generic_stele_bonuses_effect = { - add_piety = major_piety_gain - add_prestige = major_prestige_gain - add_legitimacy = medium_legitimacy_gain - every_vassal = { - limit = { fp1_can_raise_stele_trigger = yes } - custom = fp1_raise_runestone_vassals - add_opinion = { - modifier = pleased_opinion - target = root - opinion = 10 - } - } - # Saga in Stone achievement tracking. - if = { - limit = { - # Grab the player and any dynasty members of theirs. - any_player = { dynasty = root.dynasty } - } - dynasty = { - # Start a count if we don't have one. - if = { - limit = { - NOT = { exists = var:saga_in_stone_achievement_tally } - } - set_variable = { - name = saga_in_stone_achievement_tally - value = 1 - } - } - # Otherwise, increment it. - else = { - change_variable = { - name = saga_in_stone_achievement_tally - add = 1 - } - } - } - } -} - -elevate_mann_and_the_isles_scripted_effect = { - # You gain the Legacy of Piracy dynasty modifier. - dynasty = { - add_dynasty_modifier = { - modifier = fp1_legacy_of_piracy_modifier - years = 100 - } - # Also gain a large amount of dynasty prestige. - add_dynasty_prestige = excessive_dynasty_prestige_gain - } - # Cool nickname distributed elsewhere. - # Mann becomes a kingdom. - title:d_the_isles = { set_de_jure_liege_title = title:k_mann_the_isles } - create_title_and_vassal_change = { - type = created - save_scope_as = title_change - } - title:k_mann_the_isles = { - change_title_holder = { - holder = scope:founder - change = scope:title_change - } - } - resolve_title_and_vassal_change = scope:title_change - # Buff the Isle of Mann. - title:c_isle_of_man = { - # Give it some extra building slots - title_province = { - add_province_modifier = elevate_mann_and_the_isles_modifier - } - # And a decent development boost. - change_development_level = medium_development_level_gain - } - # Make it your capital if it wasn't already. - if = { - limit = { - NOT = { capital_county = title:c_isle_of_man } - } - set_realm_capital = title:c_isle_of_man - } - # And convert it to your culture if it wasn't some flavour of North Germanic. - if = { - limit = { - NOR = { - title:c_isle_of_man.culture = { - has_cultural_pillar = heritage_north_germanic - } - title:c_isle_of_man.culture = culture:norman - } - } - title:c_isle_of_man = { set_county_culture = scope:founder.culture } - } - # Have a huge, terrifying event army. - spawn_army = { - levies = 5000 - men_at_arms = { - type = jomsviking_pirates - stacks = 5 - } - men_at_arms = { - type = jomsviking_pirates - stacks = 5 - } - men_at_arms = { - type = varangian_veterans - stacks = 5 - } - men_at_arms = { - type = bondi - stacks = 5 - } - men_at_arms = { - type = bondi - stacks = 5 - } - location = title:c_isle_of_man.title_province - name = fp1_mann_event_troops - } - # Mann gets a huge modernising boost. - title:c_isle_of_man = { - add_county_modifier = { - modifier = fp1_mann_pirate_capital_modifier - years = 100 - } - } - # If completely controlled, you integrate the duchies of the Western Isles, the Northern Isles, and Strathclyde. - ## The Western Isles. - if = { - limit = { completely_controls = title:d_northern_isles } - title:d_northern_isles = { set_de_jure_liege_title = title:k_mann_the_isles } - } - ## The Northern Isles. - if = { - limit = { completely_controls = title:d_western_isles } - title:d_western_isles = { set_de_jure_liege_title = title:k_mann_the_isles } - } - ## Strathclyde. - if = { - limit = { completely_controls = title:d_galloway } - title:d_galloway = { set_de_jure_liege_title = title:k_mann_the_isles } - } - # Plus, if you weren't already, become feudal. - if = { - limit = { government_has_flag = government_is_tribal } - convert_whole_realm_to_feudalism_effect = yes - } -} - -fp1_remove_stele_effect = { - if = { - limit = { has_county_modifier = fp1_stele_ancestors_strong } - remove_county_modifier = fp1_stele_ancestors_strong - } - if = { - limit = { has_county_modifier = fp1_stele_ancestors_weak } - remove_county_modifier = fp1_stele_ancestors_weak - } - if = { - limit = { has_county_modifier = fp1_stele_conquest_strong } - remove_county_modifier = fp1_stele_conquest_strong - } - if = { - limit = { has_county_modifier = fp1_stele_conquest_weak } - remove_county_modifier = fp1_stele_conquest_weak - } - if = { - limit = { has_county_modifier = fp1_stele_promotion_strong } - remove_county_modifier = fp1_stele_promotion_strong - } - if = { - limit = { has_county_modifier = fp1_stele_promotion_weak } - remove_county_modifier = fp1_stele_promotion_weak - } -} - -forge_the_jomsvikings_scripted_effect = { - # Display simplified results. - custom_tooltip = create_holy_order_decision_effect_message - # Select a random county. - random_held_title = { - limit = { fp1_valid_county_for_jomsvikings_trigger = yes } - save_scope_as = designated_county - } - # Select an appropriate barony. - ## If there's an empty space in the capital, we create a castle. - if = { - limit = { - scope:designated_county = { - any_county_province = { has_holding = no } - } - } - scope:designated_county = { - random_county_province = { - limit = { has_holding = no } - set_holding_type = castle_holding - barony = { save_scope_as = leased_barony } - } - } - } - ## Otherwise, grab an existing non-capital castle/city. - else = { - scope:designated_county = { - random_county_province = { - limit = { - is_county_capital = no - OR = { - has_holding_type = castle_holding - has_holding_type = city_holding - } - } - barony = { save_scope_as = leased_barony } - } - } - } - # Create a suitable leader for the Jomsvikings. - create_character = { - template = fp1_jomsviking_bigwig - location = scope:leased_barony.title_province - save_scope_as = leader - } - # Create the actual holy order. - create_holy_order_neutral_effect = { - LEADER = scope:leader - CAPITAL = scope:leased_barony - NEW_HO_SCOPE = new_holy_order - FOUNDER = scope:founder - } - # Make the local settlement Jomsberg. - ## Rename it. - scope:leased_barony = { set_title_name = b_jomsberg } - ## Give it some buildings. - hidden_effect = { - scope:leased_barony.title_province = { - # Walls & Towers. - if = { - limit = { - NOT = { has_building_or_higher = curtain_walls_01 } - } - # If it doesn't have a free building slot, give it one. - if = { - limit = { free_building_slots = 0 } - add_province_modifier = extra_building_slot - } - # Add the building. - add_building = curtain_walls_01 - } - # Barracks. - if = { - limit = { - NOT = { has_building_or_higher = barracks_01 } - } - # If it doesn't have a free building slot, give it one. - if = { - limit = { free_building_slots = 0 } - add_province_modifier = extra_building_slot - } - # Add the building. - add_building = barracks_01 - } - # Military Camps. - if = { - limit = { - NOT = { has_building_or_higher = military_camps_01 } - } - # If it doesn't have a free building slot, give it one. - if = { - limit = { free_building_slots = 0 } - add_province_modifier = extra_building_slot - } - # Add the building. - add_building = military_camps_01 - } - } - } - ## Mark it so it can be renamed if the order is ever destroyed. - set_global_variable = { - name = jomsberg_location - value = scope:leased_barony - } - # And the Grandmaster of Jomsberg certainly looks favourably on their patron. - ## Hidden because the title doesn't play nicely with characters created in the same immediate block. - hidden_effect = { - scope:founder = { set_relation_friend = { reason = friend_forging_jomsvikings target = scope:leader } } - } - # Mark the Jomsvikings as existing & make them easily accessible - set_global_variable = { - name = jomsvikings_title - value = scope:leader.primary_title - } - # Some minor misc effects. - create_holy_order_effect = yes - scope:leader.primary_title = { set_coa = ho_jomsvikings } - # Flag the Jomsvikings as forged. - hidden_effect = { - add_to_global_variable_list = { - name = unavailable_unique_decisions - target = flag:flag_forged_jomvikings - } - } -} - -forge_the_jomsvikings_maa_reward_effect = { - spawn_army = { - levies = { add = 500 } - men_at_arms = { - type = jomsviking_pirates - stacks = 4 - } - men_at_arms = { - type = varangian_veterans - stacks = 2 - } - men_at_arms = { - type = bondi - stacks = 4 - } - inheritable = yes - uses_supply = yes - location = scope:founder.capital_province - name = fp1_jomsvikings_event_troops - } -} - -forge_the_jomsvikings_decision_tooltip_effect = { - # Standard info. - custom_tooltip = create_holy_order_decision_effect_message - create_holy_order_effect = yes - # And the free army. - forge_the_jomsvikings_maa_reward_effect = yes -} - -fp1_remove_humsac_offended_counties_effect = { - every_sub_realm_county = { - if = { - limit = { has_county_modifier = held_human_sacrifice_fp1_modifier } - remove_county_modifier = held_human_sacrifice_fp1_modifier - } - } -} - -################################################## -# Interactions -################################################## - -designate_gruesome_festivals_sacrifice_interaction_effect = { - add_character_modifier = gruesome_festivals_designated_sacrifice_fp1_modifier - add_opinion = { - target = scope:actor - modifier = hate_opinion - opinion = -50 - } -} - -designate_gruesome_festivals_sacrifice_modifier_removed_effect = { - send_interface_toast = { - title = designate_gruesome_festivals_sacrifice_modifier_removed_effect.t - left_icon = $DESIGNATOR$ - remove_character_modifier = gruesome_festivals_designated_sacrifice_fp1_modifier - # Removed manually. - if = { - limit = { - exists = scope:removal_type - scope:removal_type = flag:manual - } - custom_tooltip = designate_gruesome_festivals_sacrifice_modifier_removed_effect.manual.tt - } - # Removed due to a new chief sacrifice being designated. - else_if = { - limit = { - exists = scope:removal_type - scope:removal_type = flag:override - } - custom_tooltip = designate_gruesome_festivals_sacrifice_modifier_removed_effect.override.tt - } - # Removed due to the chain invalidating. - else = { custom_tooltip = designate_gruesome_festivals_sacrifice_modifier_removed_effect.invalidation.tt } - } -} - -# Either-side effects for a tbc ending with death. -fp1_tbc_death_effect = { - # Check to see if this is a duel to the death between those of equal rank. - ## We check this here in case an *untimely* death causes either participant to go up a rank. - ## Equal rank: level playing field, maximum honour. - if = { - limit = { $TBC_VICTOR$.primary_title.tier = $TBC_LOSER$.primary_title.tier } - $TBC_VICTOR$ = { add_prestige = medium_prestige_gain } - } - ## Unequal rank: challenging your betters but clearly it was merited. - else_if = { - limit = { $TBC_VICTOR$.primary_title.tier < $TBC_LOSER$.primary_title.tier } - $TBC_VICTOR$ = { add_prestige = minor_prestige_gain } - } - $TBC_LOSER$ = { - death = { - killer = $TBC_VICTOR$ - death_reason = death_duel - } - } -} - -# Recipient-side effects for a tbc ending with a cash settlement. -fp1_tbc_gold_effect = { - $TBC_LOSER$ = { - pay_short_term_gold = { - target = $TBC_VICTOR$ - gold = major_gold_value - } - } -} - -# Recipient-side effects for a tbc ending with an agreed favour. -fp1_tbc_hook_effect = { - $TBC_VICTOR$ = { - add_hook = { - type = trial_by_combat_hook - target = $TBC_LOSER$ - } - } -} - -# Recipient-side effects for a tbc ending with utter humiliation. -fp1_tbc_humiliation_effect = { - $TBC_LOSER$ = { - every_vassal = { - custom = every_belligerent_vassal - limit = { - has_vassal_stance = belligerent - } - add_opinion = { - modifier = liege_lost_duel - target = $TBC_LOSER$ - } - } - add_stress = massive_stress_gain - } - $TBC_VICTOR$ = { - every_vassal = { - custom = every_belligerent_vassal - limit = { - has_vassal_stance = belligerent - } - custom = every_belligerent_vassal - add_opinion = { - modifier = liege_won_duel - target = $TBC_VICTOR$ - } - } - } -} - -# Actor-side effects for losing most types of tbc. -fp1_tbc_actor_defeated_effect = { - $TBC_LOSER$ = { - every_vassal = { - custom = every_belligerent_vassal - limit = { - has_vassal_stance = belligerent - } - add_opinion = { - modifier = liege_lost_duel - target = $TBC_LOSER$ - } - } - add_stress = major_stress_gain - } - $TBC_VICTOR$ = { - every_vassal = { - custom = every_belligerent_vassal - limit = { - has_vassal_stance = belligerent - } - custom = every_belligerent_vassal - add_opinion = { - modifier = liege_won_duel - target = $TBC_VICTOR$ - } - } - } -} - -try_create_challenge_to_single_combat = { - if = { - limit = { - is_imprisoned = no - root = { has_imprisonment_reason = prev } - } - try_create_important_action = { - important_action_type = action_can_challenge_to_single_combat - actor = root - recipient = this - } - } -} - -replace_with_learning_trait_effect = { - if = { - limit = { has_trait = education_intrigue_1 } - remove_trait = education_intrigue_1 - } - else_if = { - limit = { has_trait = education_intrigue_2 } - remove_trait = education_intrigue_2 - } - else_if = { - limit = { has_trait = education_intrigue_3 } - remove_trait = education_intrigue_3 - } - else_if = { - limit = { has_trait = education_intrigue_4 } - remove_trait = education_intrigue_4 - } - else_if = { - limit = { has_trait = education_intrigue_5 } - remove_trait = education_intrigue_5 - } - else_if = { - limit = { has_trait = education_diplomacy_1 } - remove_trait = education_diplomacy_1 - } - else_if = { - limit = { has_trait = education_diplomacy_2 } - remove_trait = education_diplomacy_2 - } - else_if = { - limit = { has_trait = education_diplomacy_3 } - remove_trait = education_diplomacy_3 - } - else_if = { - limit = { has_trait = education_diplomacy_4 } - remove_trait = education_diplomacy_4 - } - else_if = { - limit = { has_trait = education_diplomacy_5 } - remove_trait = education_diplomacy_5 - } - else_if = { - limit = { has_trait = education_stewardship_1 } - remove_trait = education_stewardship_1 - } - else_if = { - limit = { has_trait = education_stewardship_2 } - remove_trait = education_stewardship_2 - } - else_if = { - limit = { has_trait = education_stewardship_3 } - remove_trait = education_stewardship_3 - } - else_if = { - limit = { has_trait = education_stewardship_4 } - remove_trait = education_stewardship_4 - } - else_if = { - limit = { has_trait = education_stewardship_5 } - remove_trait = education_stewardship_5 - } - else_if = { - limit = { has_trait = education_martial_1 } - remove_trait = education_martial_1 - } - else_if = { - limit = { has_trait = education_martial_2 } - remove_trait = education_martial_2 - } - else_if = { - limit = { has_trait = education_martial_3 } - remove_trait = education_martial_3 - } - else_if = { - limit = { has_trait = education_martial_4 } - remove_trait = education_martial_4 - } - else_if = { - limit = { has_trait = education_martial_5 } - remove_trait = education_martial_5 - } - random_list = { - 2 = { add_trait = education_learning_2 } - 2 = { add_trait = education_learning_3 } - 1 = { add_trait = education_learning_4 } - } -} - -################################################## -# CBs -################################################## - -clean_scandinavian_adventurer_effect = { - scope:attacker = { - every_held_title = { - limit = { has_variable = temporary_title } - save_scope_as = destroyable_title - scope:attacker = { destroy_title = scope:destroyable_title } - } - remove_character_modifier = scandinavian_adventurer_fp1_modifier - } -} - -fp1_add_realm_size_appropriate_sa_reprieve_effect = { - # Depending on the sub realm size of $VICTIM$, we give them a scaling amount of time not to be hit by SA attacks. - ## The smallest realms get a long reprieve. - if = { - limit = { sub_realm_size <= tiny_realm_size } - add_character_modifier = { - modifier = fp1_reprieve_from_sa_modifier - years = 20 - } - } - ## Then a decent reprieve. - else_if = { - limit = { sub_realm_size <= minor_realm_size } - add_character_modifier = { - modifier = fp1_reprieve_from_sa_modifier - years = 15 - } - } - ## Then a short reprieve. - else_if = { - limit = { sub_realm_size <= medium_realm_size } - add_character_modifier = { - modifier = fp1_reprieve_from_sa_modifier - years = 10 - } - } - ## Then you're clearly too big and juicy a target for much reprieve at all. - else = { - add_character_modifier = { - modifier = fp1_reprieve_from_sa_modifier - years = 5 - } - } -} - -fp1_remember_recent_conquest_victory_effect = { - if = { - limit = { - # DLC check. - has_fp1_dlc_trigger = yes - # Is the culture eligible? - fp1_can_raise_stele_trigger = yes - } - set_variable = { - name = recent_conquest_victory - value = scope:defender - years = 5 - } - } -} - -################################################## -# Yearlies -################################################## - -nithing_character_creation_scripted_effect = { - add_trait = disinherited - add_character_modifier = { modifier = nithing_fp1_modifier } -} - -################################################## -# Legacies -################################################## - -initial_decentralized_rule_friends_modifier_effect = { - if = { - limit = { - exists = dynasty - is_ruler = yes - } - if = { - limit = { - NOT = { has_variable = decentralized_rule_perk_value } - } - set_variable = { - name = decentralized_rule_perk_value - value = 0 - } - } - - every_relation = { - type = friend - add_to_temporary_list = decentralized_rule_friends - } - every_relation = { - type = best_friend - add_to_temporary_list = decentralized_rule_friends - } - - if = { - limit = { - exists = var:decentralized_rule_perk_value - save_temporary_scope_as = affected_friend - var:decentralized_rule_perk_value < decentralized_rule_max - any_in_list = { - list = decentralized_rule_friends - count > scope:affected_friend.var:decentralized_rule_perk_value - } - } - add_character_modifier = { - modifier = decentralized_rule_perk_modifier - } - change_variable = { - name = decentralized_rule_perk_value - add = 1 - } - } - } -} - -decentralized_rule_friends_modifier_effect = { - if = { - limit = { - dynasty ?= { - has_dynasty_perk = fp1_adventure_legacy_5 - } - is_ruler = yes - } - if = { - limit = { - NOT = { has_variable = decentralized_rule_perk_value } - } - set_variable = { - name = decentralized_rule_perk_value - value = 0 - } - } - - every_relation = { - type = friend - add_to_temporary_list = decentralized_rule_friends - } - every_relation = { - type = best_friend - add_to_temporary_list = decentralized_rule_friends - } - - if = { - limit = { - exists = var:decentralized_rule_perk_value - save_temporary_scope_as = affected_friend - var:decentralized_rule_perk_value < decentralized_rule_max - any_in_list = { - list = decentralized_rule_friends - count > scope:affected_friend.var:decentralized_rule_perk_value - } - } - add_character_modifier = { - modifier = decentralized_rule_perk_modifier - } - change_variable = { - name = decentralized_rule_perk_value - add = 1 - } - } - } -} - -decentralized_rule_removal_effect = { - if = { - limit = { - dynasty ?= { - has_dynasty_perk = fp1_adventure_legacy_5 - } - } - - every_relation = { - type = friend - add_to_temporary_list = decentralized_rule_friends - } - every_relation = { - type = best_friend - add_to_temporary_list = decentralized_rule_friends - } - - if = { - limit = { - exists = var:decentralized_rule_perk_value - save_temporary_scope_as = affected_friend - var:decentralized_rule_perk_value <= decentralized_rule_max - var:decentralized_rule_perk_value > 0 - any_in_list = { - list = decentralized_rule_friends - count < var:decentralized_rule_perk_value - NOT = { has_character_flag = about_to_die_but_not_dead_yet_flag } - } - } - - if = { - limit = { - has_character_modifier = decentralized_rule_perk_modifier - } - remove_character_modifier = decentralized_rule_perk_modifier - } - - change_variable = { - name = decentralized_rule_perk_value - subtract = 1 - } - } - } -} - -################################################## -# Governments -################################################## - -calculate_authority_cooldown_break_effect = { - if = { - limit = { - has_variable = crown_authority_cooldown - realm_law_use_crown_authority = yes - } - # Set it up if it doesn't exist. - if = { - limit = { - NOT = { has_variable = authority_cooldown_break_tally } - } - set_variable = { - name = authority_cooldown_break_tally - value = authority_cooldown_breaker_value - } - # And increment it once, since they've just taken the first use and we give no freebies. - change_variable = { - name = authority_cooldown_break_tally - add = authority_cooldown_breaker_value - } - } - # Otherwise, increment it. - else_if = { - limit = { has_variable = authority_cooldown_break_tally } - change_variable = { - name = authority_cooldown_break_tally - add = authority_cooldown_breaker_value - } - } - } - else_if = { - limit = { - has_variable = tribal_authority_cooldown - realm_law_use_tribal_authority = yes - } - # Set it up if it doesn't exist. - if = { - limit = { - NOT = { has_variable = authority_cooldown_break_tally } - } - set_variable = { - name = authority_cooldown_break_tally - value = authority_cooldown_breaker_value - } - # And increment it once, since they've just taken the first use and we give no freebies. - change_variable = { - name = authority_cooldown_break_tally - add = authority_cooldown_breaker_value - } - } - # Otherwise, increment it. - else_if = { - limit = { has_variable = authority_cooldown_break_tally } - change_variable = { - name = authority_cooldown_break_tally - add = authority_cooldown_breaker_value - } - } - } - else_if = { - limit = { - has_variable = imperial_bureaucracy_cooldown - realm_law_use_imperial_bureaucracy = yes - } - # Set it up if it doesn't exist. - if = { - limit = { - NOT = { has_variable = authority_cooldown_break_tally } - } - set_variable = { - name = authority_cooldown_break_tally - value = authority_cooldown_breaker_value - } - # And increment it once, since they've just taken the first use and we give no freebies. - change_variable = { - name = authority_cooldown_break_tally - add = authority_cooldown_breaker_value - } - } - # Otherwise, increment it. - else_if = { - limit = { has_variable = authority_cooldown_break_tally } - change_variable = { - name = authority_cooldown_break_tally - add = authority_cooldown_breaker_value - } - } - } -} diff --git a/N3OW/common/scripted_effects/01_dlc_fp3_scripted_effects.txt b/N3OW/common/scripted_effects/01_dlc_fp3_scripted_effects.txt deleted file mode 100644 index 41d24eac..00000000 --- a/N3OW/common/scripted_effects/01_dlc_fp3_scripted_effects.txt +++ /dev/null @@ -1,1369 +0,0 @@ -restore_badd_fortress_scripted_effect = { - - # Buff Ahar - title:b_ahar = { - # Give it an extra building slot. - title_province = { - add_province_modifier = extra_building_slot - add_province_modifier = { #and a mighty defensive buff - modifier = fp3_mountain_redoubt_modifier - } - } - } - title:c_tabriz = { # And a decent development boost. - change_development_level = minor_development_level_gain - } - # Make it your capital if it wasn't already. - if = { - limit = { - NOT = { capital_county = title:c_tabriz } - } - set_realm_capital = title:c_tabriz - } - title:b_ahar = { set_capital_barony = yes } -} - -destroy_the_magi_scripted_effect = { - - add_heresiarch_trait_effect = yes - - religion = { save_scope_as = root_religion } - - faith = { - change_fervor = { - value = 50 - desc = fervor_gain_magi_destroyed - } - if = { - limit = { - AND = { - has_doctrine = doctrine_spiritual_head - has_doctrine = doctrine_theocracy_temporal - } - } - custom_tooltip = replace_the_high_priest_effect_tooltip - hidden_effect = { - remove_doctrine = doctrine_spiritual_head - add_doctrine = doctrine_no_head - } - } - } - - - if = { - limit = { - AND = { - root.religion = religion:zoroastrianism_religion - OR = { - has_faith = faith:mazdakism - has_faith = faith:zurvanism - } - } - } - add_prestige = massive_prestige_gain - } - - custom_tooltip = destroy_the_magi_opinion_tooltip - hidden_effect = { - every_ruler = { - if = { - limit = { - AND = { - NOR = { - has_faith = faith:mazdakism - has_faith = faith:zurvanism - } - religion = religion:zoroastrianism_religion - } - } - add_opinion = { - target = root - modifier = fp3_spawn_of_ahriman_opinion - } - } - else_if = { - limit = { - faith = { has_doctrine = doctrine_major_branch_behdin } - } - add_opinion = { - target = root - modifier = fp3_abolished_priesthood_opinion - } - } - } - } -} - -opinion_based_on_sky_burial_viewpoint_scripted_effect = { - if = { - limit = { - OR = { - faith = { has_doctrine_parameter = sky_burials_active } - has_trait = compassionate - has_trait = cynical - has_trait = trusting - has_trait = forgiving - AND = { - NOT = { faith = { has_doctrine_parameter = sky_burials_active } } - ai_compassion >= medium_positive_ai_value - ai_zeal <= medium_positive_ai_value - } - AND = { - NOT = { faith = { has_doctrine_parameter = sky_burials_active } } - faith = { has_doctrine = doctrine_pluralism_pluralistic } - ai_zeal <= medium_positive_ai_value - } - } - } - add_opinion = { - target = root - opinion = 20 - modifier = fp3_loyal_to_dead_spouse_opinion - } - } - else_if = { - limit = { ai_zeal > medium_positive_ai_value } - add_opinion = { - target = root - opinion = -30 - modifier = fp3_blasphemous_practices_opinion - } - } - else = { - add_opinion = { - target = root - opinion = -10 - modifier = fp3_strange_rituals_opinion - } - } -} - -opinion_based_on_sky_burial_viewpoint_for_relatives_scripted_effect = { - if = { - limit = { - OR = { - faith = { has_doctrine_parameter = sky_burials_active } - has_trait = compassionate - has_trait = cynical - has_trait = trusting - has_trait = forgiving - AND = { - NOT = { faith = { has_doctrine_parameter = sky_burials_active } } - ai_compassion >= medium_positive_ai_value - ai_zeal <= medium_positive_ai_value - } - AND = { - NOT = { faith = { has_doctrine_parameter = sky_burials_active } } - faith = { has_doctrine = doctrine_pluralism_pluralistic } - ai_zeal <= medium_positive_ai_value - } - } - } - add_opinion = { - target = root - opinion = 20 - modifier = fp3_benevolent_opinion - } - } - else_if = { - limit = { ai_zeal > medium_positive_ai_value } - add_opinion = { - target = root - opinion = -30 - modifier = fp3_blasphemous_practices_opinion - } - } - else = { - add_opinion = { - target = root - opinion = -10 - modifier = fp3_strange_rituals_opinion - } - } -} - - - -##################################################################### -##### SELJUK INVASION -##################################################################### - -## Set up default title -give_seljuk_title_effect = { - create_dynamic_title = { - tier = duchy - name = fp3_seljuk_horde_title_title - adj = fp3_seljuk_horde_title_adj - } - create_title_and_vassal_change = { - type = created - save_scope_as = change - add_claim_on_loss = no - } - - scope:new_title = { - set_capital_county = scope:seljuk_birthplace.county - set_landless_title = yes - set_coa = house:house_seljuk - set_destroy_if_invalid_heir = yes - set_destroy_on_gain_same_tier = yes - set_delete_on_destroy = yes - set_no_automatic_claims = yes - set_definitive_form = yes - set_can_be_named_after_dynasty = no - set_can_use_nomadic_naming = no - change_title_holder = { - holder = scope:lead_seljuk - change = scope:change - } - } - resolve_title_and_vassal_change = scope:change -} - -### A leader is created -spawn_seljuk_character_effect = { - ## CULTURE SELECTION - # Look for a random culture in the region, weight up Oghuz with it also as a fallback - random_county_in_region = { - region = dlc_fp3_seljuk_birth_region - limit = { - exists = culture - } - weight = { - base = 1 - modifier = { - culture = culture:turkish - add = 100 - } - modifier = { - culture = { has_cultural_pillar = heritage_turkic } - add = 50 - } - } - culture = { save_scope_as = seljuk_birth_culture } - } - - ## FAITH SELECTION - # Create a list of possible faiths - every_county_in_region = { - region = world_steppe_west - title_province.faith = { add_to_list = seljuk_faith_selection_list } - } - # Find a religion in the wider region. weight it up if a county with the culture has that religion - random_in_list = { - list = seljuk_faith_selection_list - weight = { - base = 1 - # Upweight the faith of the culture if it is in their historical birth place - modifier = { - add = 50 - save_temporary_scope_as = temp_faith - scope:seljuk_birth_culture = { - any_culture_county = { - faith = scope:temp_faith - title_province = { geographical_region = dlc_fp3_seljuk_birth_region } - } - } - } - # Upweight Islamic faiths since it's historical (Maturidi) - modifier = { - religion_tag = islam_religion - add = 5 - } - # Exclude pagan faiths - modifier = { - has_doctrine_parameter = unreformed - factor = 0 - } - } - save_scope_as = seljuk_birth_faith - } - random_county_in_region = { - region = dlc_fp3_seljuk_birth_region - weight = { - base = 1 - modifier = { - culture = scope:seljuk_birth_culture - add = 2 - } - modifier = { - faith = scope:seljuk_birth_faith - add = 2 - } - } - random_county_province = { save_scope_as = seljuk_birthplace } - } - - create_character = { - age = { 20 40 } - location = scope:seljuk_birthplace - gender_female_chance = fp3_chance_female_leader - culture = scope:seljuk_birth_culture - faith = scope:seljuk_birth_faith - trait = brave - trait = ambitious - trait = gregarious - trait = education_martial_5 - trait = open_terrain_expert - trait = warlike_court_2 - martial = { 16 21 } - stewardship = { 12 15 } - diplomacy = { 11 14 } - intrigue = { 10 13 } - learning = { 9 11 } - prowess = { 18 24 } - - dynasty_house = house:house_seljuk - - after_creation = { - set_variable = { - name = seljuk_birthplace - value = scope:seljuk_birthplace - } - give_seljuk_title_effect = yes - add_gold = { medium_gold_min_value major_gold_max_value } - add_prestige = { medium_prestige_value massive_prestige_value } - add_piety = { medium_piety_value massive_piety_value } - add_martial_lifestyle_xp = 10000 - random = { - chance = 25 - add_trait = athletic - } - - add_character_flag = is_seljuk - game_rule_create_spouse_and_children = { CHARACTER = this LOCATION = this } #to make sure there is someone to continue the invasions - } - save_scope_as = lead_seljuk - } -} - -try_to_settle_the_seljuk_effect = { - # Search for a character who can host the tribe - save_scope_as = lead_seljuk - - if = { # # Attempt to settle them in a duchy within the d_nishapur region, where the conflict historically started. Starting here to save the Seljuks the trip from the Oghuz-Il region to Persia proper, then attempt to settle them in a suitable duchy title - limit = { - any_county_in_region = { - region = world_persian_empire - de_jure_liege = { - trigger_if = { - limit = { exists = holder } - holder = { is_ai = yes } - } - save_temporary_scope_as = duchy_temp - } - holder.top_liege = { capital_county.de_jure_liege != scope:duchy_temp } - } - } - random_county_in_region = { - region = world_persian_empire - limit = { - de_jure_liege = { - this = title:d_nishapur - trigger_if = { - limit = { exists = holder } - holder = { is_ai = yes } - } - save_temporary_scope_as = duchy_temp - } - holder.top_liege = { capital_county.de_jure_liege != scope:duchy_temp } - } - alternative_limit = { - de_jure_liege = { - de_jure_liege = title:k_khorasan - trigger_if = { - limit = { exists = holder } - holder = { is_ai = yes } - } - save_temporary_scope_as = duchy_temp - } - holder.top_liege = { capital_county.de_jure_liege != scope:duchy_temp } - } - alternative_limit = { - de_jure_liege = { - trigger_if = { - limit = { exists = holder } - holder = { is_ai = yes } - } - save_temporary_scope_as = duchy_temp - } - holder.top_liege = { capital_county.de_jure_liege != scope:duchy_temp } - } - weight = { - base = 1 - modifier = { - holder.top_liege = { save_temporary_scope_as = top_liege_temp } - any_neighboring_county = { - holder.top_liege != scope:top_liege_temp - } - } - } - de_jure_liege = { save_scope_as = fp3_seljuk_settle_target } - - debug_log = "Attempting to settle seljuk in random duchy" - - holder.top_liege = { trigger_event = fp3_story_cycle_seljuks_invasion_events.0002 } - } - } - else = { # nobody to settle, then attack! - start_wars_for_seljuk_empire_effect = yes - debug_log = "Attempting to settle seljuk by force" - } -} - -### Start war of conquest for the Seljuk heartland -start_wars_for_seljuk_empire_effect = { - save_temporary_scope_as = seljuk_conqueror - # Build a list of potential targets - every_independent_ruler = { - limit = { - any_sub_realm_county = { - title_province = { geographical_region = world_persian_empire } - } - } - if = { - limit = { NOT = { is_in_list = top_liege_targets } } - add_to_temporary_list = top_liege_targets - } - } - ordered_in_list = { - list = top_liege_targets - # Find the weakest target - order_by = { - value = current_military_strength - # Inver the list so the weakest is at the top - multiply = -1 - } - save_temporary_scope_as = new_war_target - primary_title = { save_temporary_scope_as = war_target_title } - # Declare the war - scope:seljuk_conqueror = { - start_war = { - cb = fp3_seljuk_invasion_cb - target = scope:new_war_target - target_title = scope:war_target_title - } - } - } -} - -# focus on forming a custom persian empire and freeing turkish people first -seljuk_war_target_evaluation_and_declaration_effect = { - # Set the Seljuk leader as reference point - save_scope_as = lead_seljuk - - #if the seljuk is a vassal he will try to fight other vassals first - if = { - limit = { - scope:lead_seljuk = { - top_liege != this - liege = { - any_vassal = { - highest_held_title_tier > tier_barony - NOR = { - is_allied_to = scope:lead_seljuk - has_usable_hook = scope:lead_seljuk - this = scope:lead_seljuk - } - } - } - } - } - #if you can't attack vassals, due to crown laws, then do a liberty faction instead - if = { - limit = { - liege = { - OR = { - has_realm_law = crown_authority_2 - has_realm_law = crown_authority_3 - } - } - can_join_or_create_faction_against = { - who = liege - faction = liberty_faction - } - } - #join one if it already exists - if = { - limit = { - liege = { - any_targeting_faction = { - faction_type = liberty_faction - } - } - } - liege = { - random_targeting_faction = { - faction_type = liberty_faction - save_temporary_scope_as = liberty_faction - } - } - scope:lead_seljuk = { - join_faction = scope:liberty_faction - } - #debug_log = "Seljuk joined liberty faction" - } - #otherwise create it - else = { - create_faction = { - type = liberty_faction - target = liege - } - #debug_log = "Seljuk created liberty faction" - } - } - #if you can attack, do it - else = { - scope:lead_seljuk = { - liege = { - random_vassal = { - limit = { - #don't try to attack barons - highest_held_title_tier > tier_barony - #don't try to attack anyone that you shouldn't want to - NOT = { - is_allied_to = scope:lead_seljuk - has_usable_hook = scope:lead_seljuk - this = scope:lead_seljuk - } - } - weight = { - base = 1 - #attack the weaklings first - modifier = { - add = { - value = current_military_strength - multiply = -1 - } - } - #focus on the closest to you - modifier = { - add = 1000 - any_held_county = { - any_neighboring_county = { - holder = scope:lead_seljuk - } - } - } - #attack mainly those inside the persian empire - modifier = { - add = 1000 - any_realm_province = { - geographical_region = world_persian_empire - } - } - } - save_temporary_scope_as = next_invasion_target - primary_title = { - duchy = { - save_temporary_scope_as = next_invasion_title_target - } - } - } - } - } - #debug_log = "Seljuk attacked a vassal" - } - } - # Select a new target - else_if = { # Check if a direct neighbor is a valid war target - limit = { - any_neighboring_and_across_water_top_liege_realm_owner = { - NOR = { - is_allied_to = scope:lead_seljuk - this = scope:lead_seljuk - any_liege_or_above = { - this = scope:lead_seljuk.liege - } - } - save_temporary_scope_as = truce_check - NOT = { - scope:lead_seljuk = { - any_truce_target = { - this = scope:truce_check - } - } - } - any_sub_realm_county = { - title_province = { geographical_region = world_persian_empire } - } - } - } - random_neighboring_and_across_water_top_liege_realm_owner = { - limit = { - NOR = { - is_allied_to = scope:lead_seljuk - this = scope:lead_seljuk - any_liege_or_above = { - this = scope:lead_seljuk.liege - } - } - save_temporary_scope_as = truce_check - NOT = { - scope:lead_seljuk = { - any_truce_target = { - this = scope:truce_check - } - } - } - any_sub_realm_county = { - title_province = { geographical_region = world_persian_empire } - } - } - weight = { - base = 1 - #attack the weaklings first - modifier = { - add = { - value = current_military_strength - multiply = -1 - } - } - #focus on the closest to you - modifier = { - add = 1000 - any_held_county = { - any_neighboring_county = { - holder = scope:lead_seljuk - } - } - } - } - save_temporary_scope_as = next_invasion_target - random_sub_realm_county = { - limit = { - title_province = { geographical_region = world_persian_empire } - } - weight = { - base = 1 - #pick a neighboring county if possible - modifier = { - add = 1000 - is_neighbor_to_realm = scope:lead_seljuk - } - } - duchy = { - save_temporary_scope_as = next_invasion_title_target - } - } - #debug_log = "Seljuk attacked a neighbor" - } - } - else_if = { # if no direct neighbors are valid war targets, then check the neighbors of the neighbors - limit = { - any_neighboring_and_across_water_top_liege_realm_owner = { - any_neighboring_and_across_water_top_liege_realm_owner = { - NOR = { - is_allied_to = scope:lead_seljuk - this = scope:lead_seljuk - any_liege_or_above = { - this = scope:lead_seljuk.liege - } - } - save_temporary_scope_as = truce_check - NOT = { - scope:lead_seljuk = { - any_truce_target = { - this = scope:truce_check - } - } - } - any_sub_realm_county = { - title_province = { geographical_region = world_persian_empire } - } - } - } - } - random_neighboring_and_across_water_top_liege_realm_owner = { - random_neighboring_and_across_water_top_liege_realm_owner = { - limit = { - NOR = { - is_allied_to = scope:lead_seljuk - this = scope:lead_seljuk - any_liege_or_above = { - this = scope:lead_seljuk.liege - } - } - save_temporary_scope_as = truce_check - NOT = { - scope:lead_seljuk = { - any_truce_target = { - this = scope:truce_check - } - } - } - any_sub_realm_county = { - title_province = { geographical_region = world_persian_empire } - } - } - weight = { - base = 1 - #attack the weaklings first - modifier = { - add = { - value = current_military_strength - multiply = -1 - } - } - #focus on the closest to you - modifier = { - add = 1000 - any_held_county = { - any_neighboring_county = { - holder = scope:lead_seljuk - } - } - } - } - save_temporary_scope_as = next_invasion_target - random_sub_realm_county = { - limit = { - title_province = { geographical_region = world_persian_empire } - } - weight = { - base = 1 - #pick a neighboring county if possible - modifier = { - add = 1000 - is_neighbor_to_realm = scope:lead_seljuk - } - } - duchy = { - save_temporary_scope_as = next_invasion_title_target - } - } - #debug_log = "Seljuk attacked a neihgbor's neighbor" - } - } - } - if = { - limit = { - exists = scope:next_invasion_target - } - start_war = { - cb = fp3_seljuk_invasion_cb - target = scope:next_invasion_target - target_title = scope:next_invasion_title_target - } - } -} - -# Fight for independence -seljuk_request_independence_from_liege_effect = { - save_scope_as = lead_seljuk - scope:lead_seljuk = { - if = { - limit = { - liege = { - any_targeting_faction = { - faction_type = independence_faction - } - } - } - run_interaction = { - interaction = join_independence_faction_interaction - actor = scope:lead_seljuk - recipient = liege - execute_threshold = decline - } - } - else_if = { - limit = { - can_create_faction = { - target = liege - type = independence_faction - } - } - run_interaction = { - interaction = start_independence_faction_interaction - actor = scope:lead_seljuk - recipient = liege - execute_threshold = decline - } - } - #debug_log_scopes = yes - #debug_log = "Seljuk asked for independence" - liege = { - random_targeting_faction = { - faction_type = independence_faction - faction_start_war = {} - } - } - } -} - -### Zanj Rebellion Effects - -#This is Ali Ibn Muhammad, leader of the Zanj Rebellion -spawn_zanj_leader_character_effect = { - create_character = { - age = { 55 65 } - name = "Muhammad" - gender = male - faith = faith:zayidi - location = title:c_basra.title_province - culture = culture:bedouin - - dynasty = none - - save_scope_as = zanj_leader_father - } - - create_character = { - age = { 55 65 } - gender = female - faith = faith:azariqa - location = title:c_basra.title_province - culture = culture:bedouin - - dynasty = none - - save_scope_as = zanj_leader_mother - } - - create_character = { - age = { 25 35 } - name = "Ali" - gender = male - faith = faith:zayidi - location = title:c_basra.title_province - culture = culture:bedouin - father = scope:zanj_leader_father - mother = scope:zanj_leader_mother - dynasty = none - - trait = education_intrigue_3 - trait = ambitious - trait = deceitful - trait = just - trait = shrewd - trait = peasant_leader - - random_traits = no - #Skills - learning = { - min_template_high_skill - max_template_high_skill - } - martial = { - min_template_average_skill - max_template_average_skill - } - prowess = { - min_template_low_skill - max_template_low_skill - } - diplomacy = { - min_template_average_skill - max_template_average_skill - } - intrigue = { - min_template_high_skill - max_template_high_skill - } - stewardship = { - min_template_low_skill - max_template_low_skill - } - save_scope_as = zanj_leader - } -} - -spawn_zanj_representative_character_effect = { - create_character = { - age = { 30 40 } - gender_female_chance = 50 - faith = faith:azariqa - location = title:c_basra.title_province - culture = culture:east_bantu - - dynasty = none - - trait = education_martial_3 - trait = organizer - trait = brave - trait = peasant_leader - random_traits_list = { - count = 2 - ambitious = {} - gregarious = {} - trusting = {} - wrathful = {} - just = {} - compassionate = {} - honest = {} - vengeful = {} - } - #Skills - learning = { - min_template_low_skill - max_template_average_skill - } - martial = { - min_template_average_skill - max_template_average_skill - } - prowess = { - min_template_low_skill - max_template_average_skill - } - diplomacy = { - min_template_average_skill - max_template_average_skill - } - intrigue = { - min_template_low_skill - max_template_average_skill - } - stewardship = { - min_template_low_skill - max_template_average_skill - } - save_scope_as = zanj_representative - } -} - -fp3_start_zanj_rebellion_effect = { - - $REBEL_LEADER$ = { save_scope_as = rebel_leader } - $TARGET_COUNTY$ = { save_scope_as = target_county } - #Give the zanj leader a title - create_dynamic_title = { - tier = duchy - name = fp3_zanj_rebellion_name - adj = fp3_zanj_rebellion_name_adj - } - create_title_and_vassal_change = { - type = created - save_scope_as = change - add_claim_on_loss = no - } - scope:new_title = { - set_capital_county = scope:target_county - set_landless_title = yes - set_destroy_on_gain_same_tier = yes - set_no_automatic_claims = yes - set_can_be_named_after_dynasty = no - set_can_use_nomadic_naming = no - change_title_holder = { - holder = scope:rebel_leader - change = scope:change - } - } - resolve_title_and_vassal_change = scope:change - scope:new_title = { - generate_coa = yes - set_variable = { - name = temporary_title - value = yes - } - } - #Declare the war. - scope:rebel_leader = { - start_war = { - cb = fp3_zanj_rebellion_war - target = scope:target_county.holder.top_liege - target_title = scope:target_county.duchy - } - } - # Setup event troops. - scope:rebel_leader = { - spawn_army = { - levies = zanj_rebellion_strength_score_levy - men_at_arms = { - type = pikemen_unit - stacks = zanj_rebellion_strength_score_pikemen - } - men_at_arms = { - type = bowmen - stacks = zanj_rebellion_strength_score_bowmen - } - men_at_arms = { - type = light_footmen - stacks = zanj_rebellion_strength_score_skirmishers - } - location = province:6022 - origin = province:6022 - inheritable = yes - name = fp3_zanj_rebel_army_title - } - } -} - -create_zanj_courtier_effect = { - hidden_effect = { - create_character = { - location = $LOCATION$ - faith = faith:azariqa - culture = culture:east_bantu - dynasty = none - age = { 18 30 } - save_scope_as = new_zanj_courtier - gender_female_chance = 50 - } - scope:new_zanj_courtier = { - set_employer = $EMPLOYER$ - } - } -} - -create_zanj_vassal_effect = { - hidden_effect = { - create_character = { - faith = faith:azariqa - culture = culture:east_bantu - gender_female_chance = 50 - age = { 18 30 } - trait = peasant_leader - save_scope_as = new_zanj_vassal - location = $LOCATION$ - } - } -} - -inherit_zanj_rebellion_effect = { - scope:zanj_leader = { save_scope_as = old_zanj_leader } - spawn_zanj_representative_character_effect = yes - scope:zanj_representative = { save_scope_as = zanj_leader } - - scope:zanj_leader = { - set_variable = { - name = zanj_rebellion_strength_score - value = 7 - } - add_character_flag = new_zanj_leader - save_scope_as = story_owner - } -} - - -create_seljuk_army_effect = { - scope:lead_seljuk = { # Give them a sizable amount of troops to begin with so they don't instantly wipe out - if = { - limit = { has_dlc_feature = tours_and_tournaments } - # Give base_level troops that don't replenish - if = { - limit = { - has_mpo_dlc_trigger = yes - } - spawn_army = { - men_at_arms = { - type = nomadic_riders - stacks = { - value = seljuk_invasion_nomad_strength_score_levy - multiply = 2 - divide = 100 - } - } - men_at_arms = { - type = horse_archers - stacks = { - value = var:seljuk_invasion_nomad_strength_score - multiply = fp3_seljuk_stack_miniscule_value - multiply = scope:victim_strength_modifier - } - } - men_at_arms = { - type = accolade_maa_horse_archers - stacks = { - value = var:seljuk_invasion_nomad_strength_score - multiply = fp3_seljuk_stack_miniscule_value - multiply = scope:victim_strength_modifier - } - } - men_at_arms = { - type = heavy_horse_archers - stacks = { - value = var:seljuk_invasion_nomad_strength_score - multiply = fp3_seljuk_stack_miniscule_value - multiply = scope:victim_strength_modifier - } - } - men_at_arms = { - type = steppe_raiders - stacks = { - value = var:seljuk_invasion_nomad_strength_score - multiply = fp3_seljuk_stack_minor_value - multiply = scope:victim_strength_modifier - } - } - men_at_arms = { - type = nomad_lancers - stacks = { - value = var:seljuk_invasion_nomad_strength_score - multiply = fp3_seljuk_stack_miniscule_value - multiply = scope:victim_strength_modifier - } - } - men_at_arms = { - type = accolade_maa_outriders - stacks = { - value = var:seljuk_invasion_nomad_strength_score - multiply = fp3_seljuk_stack_miniscule_value - multiply = scope:victim_strength_modifier - } - } - men_at_arms = { - type = onager - stacks = { - value = seljuk_invasion_nomad_strength_score_siege_weapon - multiply = fp3_seljuk_stack_monumental_value - multiply = scope:victim_strength_modifier - } - } - location = scope:spawn_location - war = scope:war - war_keep_on_attacker_victory = yes - uses_supply = no - save_scope_as = seljuk_nomad_horde - name = fp3_seljuk_horde_army_title - } - } - else = { - spawn_army = { - levies = { - value = seljuk_invasion_nomad_strength_score_levy - multiply = 2 - } - men_at_arms = { - type = horse_archers - stacks = { - value = var:seljuk_invasion_nomad_strength_score - multiply = fp3_seljuk_stack_miniscule_value - multiply = scope:victim_strength_modifier - } - } - men_at_arms = { - type = accolade_maa_horse_archers - stacks = { - value = var:seljuk_invasion_nomad_strength_score - multiply = fp3_seljuk_stack_miniscule_value - multiply = scope:victim_strength_modifier - } - } - men_at_arms = { - type = accolade_maa_horse_archers - stacks = { - value = var:seljuk_invasion_nomad_strength_score - multiply = fp3_seljuk_stack_miniscule_value - multiply = scope:victim_strength_modifier - } - } - men_at_arms = { - type = light_horsemen - stacks = { - value = var:seljuk_invasion_nomad_strength_score - multiply = fp3_seljuk_stack_minor_value - multiply = scope:victim_strength_modifier - } - } - men_at_arms = { - type = accolade_maa_outriders - stacks = { - value = var:seljuk_invasion_nomad_strength_score - multiply = fp3_seljuk_stack_miniscule_value - multiply = scope:victim_strength_modifier - } - } - men_at_arms = { - type = accolade_maa_outriders - stacks = { - value = var:seljuk_invasion_nomad_strength_score - multiply = fp3_seljuk_stack_miniscule_value - multiply = scope:victim_strength_modifier - } - } - men_at_arms = { - type = onager - stacks = { - value = seljuk_invasion_nomad_strength_score_siege_weapon - multiply = fp3_seljuk_stack_monumental_value - multiply = scope:victim_strength_modifier - } - } - location = scope:spawn_location - war = scope:war - war_keep_on_attacker_victory = yes - uses_supply = no - save_scope_as = seljuk_nomad_horde - name = fp3_seljuk_horde_army_title - } - } - } - else = { - if = { - limit = { - has_mpo_dlc_trigger = yes - } - # Give base_level troops that don't replenish - spawn_army = { - men_at_arms = { - type = nomadic_riders - stacks = { - value = seljuk_invasion_nomad_strength_score_levy - divide = 100 - } - } - men_at_arms = { - type = horse_archers - stacks = { - value = var:seljuk_invasion_nomad_strength_score - multiply = fp3_seljuk_stack_massive_value - multiply = scope:victim_strength_modifier - } - } - men_at_arms = { - type = steppe_raiders - stacks = { - value = var:seljuk_invasion_nomad_strength_score - multiply = fp3_seljuk_stack_massive_value - multiply = scope:victim_strength_modifier - } - } - men_at_arms = { - type = heavy_horse_archers - stacks = { - value = var:seljuk_invasion_nomad_strength_score - multiply = fp3_seljuk_stack_massive_value - multiply = scope:victim_strength_modifier - } - } - - men_at_arms = { - type = onager - stacks = { - value = seljuk_invasion_nomad_strength_score_siege_weapon - multiply = fp3_seljuk_stack_monumental_value - multiply = scope:victim_strength_modifier - } - } - location = scope:spawn_location - war = scope:war - war_keep_on_attacker_victory = yes - uses_supply = no - save_scope_as = seljuk_nomad_horde - name = fp3_seljuk_horde_army_title - } - } - else = { - # Give base_level troops that don't replenish - spawn_army = { - levies = { - value = seljuk_invasion_nomad_strength_score_levy - multiply = 1 - } - men_at_arms = { - type = horse_archers - stacks = { - value = var:seljuk_invasion_nomad_strength_score - multiply = fp3_seljuk_stack_massive_value - multiply = scope:victim_strength_modifier - } - } - men_at_arms = { - type = light_horsemen - stacks = { - value = var:seljuk_invasion_nomad_strength_score - multiply = fp3_seljuk_stack_massive_value - multiply = scope:victim_strength_modifier - } - } - men_at_arms = { - type = bowmen - stacks = { - value = var:seljuk_invasion_nomad_strength_score - multiply = fp3_seljuk_stack_massive_value - multiply = scope:victim_strength_modifier - } - } - - men_at_arms = { - type = onager - stacks = { - value = seljuk_invasion_nomad_strength_score_siege_weapon - multiply = fp3_seljuk_stack_monumental_value - multiply = scope:victim_strength_modifier - } - } - location = scope:spawn_location - war = scope:war - war_keep_on_attacker_victory = yes - uses_supply = no - save_scope_as = seljuk_nomad_horde - name = fp3_seljuk_horde_army_title - } - } - } - } - scope:seljuk_nomad_horde ?= { assign_commander = scope:lead_seljuk } -} - -create_seljuk_army_at_peace_effect = { - # Give base_level troops that don't replenish - scope:lead_seljuk = { - # Give troops to attacker based on strength score counter - if = { - limit = { has_dlc_feature = tours_and_tournaments } - spawn_army = { - men_at_arms = { - type = nomadic_riders - stacks = { - value = seljuk_invasion_nomad_strength_score_levy - divide = 100 - } - } - men_at_arms = { - type = heavy_horse_archers - stacks = { - value = var:seljuk_invasion_nomad_strength_score - multiply = fp3_seljuk_stack_minor_value - multiply = scope:victim_strength_modifier - } - } - men_at_arms = { - type = nomad_lancers - stacks = { - value = var:seljuk_invasion_nomad_strength_score - multiply = fp3_seljuk_stack_minor_value - multiply = scope:victim_strength_modifier - } - } - men_at_arms = { - type = onager - stacks = seljuk_invasion_nomad_strength_score_siege_weapon - } - location = scope:spawn_location - origin = scope:spawn_location - save_scope_as = seljuk_nomad_horde - name = fp3_seljuk_horde_army_title - } - } - else = { - spawn_army = { - levies = seljuk_invasion_nomad_strength_score_levy - men_at_arms = { - type = horse_archers - stacks = var:seljuk_invasion_nomad_strength_score - } - men_at_arms = { - type = onager - stacks = seljuk_invasion_nomad_strength_score_siege_weapon - } - location = scope:spawn_location - origin = scope:spawn_location - uses_supply = no - save_scope_as = seljuk_nomad_horde - name = fp3_seljuk_horde_army_title - } - } - } -} - -increase_tax_collector_skill = { - switch = { - trigger = root.var:skill_to_increase - flag:stewardship = { add_stewardship_skill = 1 } - flag:intrigue = { add_intrigue_skill = 1 } - flag:diplomacy = { add_diplomacy_skill = 1 } - } -} diff --git a/N3OW/common/scripted_effects/01_ep1_court_artifact_creation_effects.txt b/N3OW/common/scripted_effects/01_ep1_court_artifact_creation_effects.txt deleted file mode 100644 index da211ce1..00000000 --- a/N3OW/common/scripted_effects/01_ep1_court_artifact_creation_effects.txt +++ /dev/null @@ -1,7002 +0,0 @@ -########################################## -# Court Artifact Creation and Decoration # -########################################## - -############### -# CHEST - -create_artifact_chest_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - $CARPENTER$ = { save_scope_as = carpenter } - hidden_effect_new_object = { - # Get artifact quality, wealth, and materials - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - - scope:owner = { - # Create the artifact - create_artifact = { - name = artifact_chest_name - creator = scope:carpenter - description = placeholder # Will be regenerated in the post-creation effects - visuals = chest - type = chest - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - #decaying = no - } - } - - scope:newly_created_artifact = { - get_artifact_feature_references_effect = yes - set_artifact_description = artifact_chest_description - set_variable = { - name = big_chest - value = yes - } - - add_scaled_artifact_modifier_grandeur_small_effect = yes - add_scaled_artifact_modifier_piety_effect = yes - if = { - limit = { - OR = { - rarity = famed - rarity = illustrious - } - } - add_scaled_artifact_modifier_dynasty_prestige_effect = yes - } - remove_artifact_modifier = artifact_placeholder_modifier - } - } -} - -create_artifact_cabinet_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - $CARPENTER$ = { save_scope_as = carpenter } - hidden_effect_new_object = { - # Get artifact quality, wealth, and materials - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - - # Create the artifact - # Indian cabinets are actually diwans! - if = { - limit = { - scope:carpenter = { artifact_use_indian_building_visuals_trigger = yes } - } - scope:owner = { - create_artifact = { - name = artifact_diwan_name - creator = scope:carpenter - description = placeholder # Will be regenerated in the post-creation effects - visuals = diwan - type = cabinet - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - #decaying = no - } - } - } - #Mena cabinets are actually tables! - else_if = { - limit = { - scope:carpenter = { - OR = { - artifact_use_mena_building_visuals_trigger = yes - artifact_use_iranian_building_visuals_trigger = yes - artifact_use_steppe_building_visuals_trigger = yes - } - } - } - scope:owner = { - create_artifact = { - name = artifact_table_name - creator = scope:carpenter - description = placeholder # Will be regenerated in the post-creation effects - visuals = table - type = cabinet - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - #decaying = no - } - } - } - else = { - scope:owner = { - create_artifact = { - name = artifact_cabinet_name - creator = scope:carpenter - description = placeholder # Will be regenerated in the post-creation effects - visuals = cabinet - type = cabinet - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - #decaying = no - } - } - } - scope:newly_created_artifact = { - get_artifact_feature_references_effect = yes - - add_scaled_artifact_modifier_grandeur_small_effect = yes - add_scaled_artifact_modifier_piety_effect = yes - if = { - limit = { - OR = { - rarity = famed - rarity = illustrious - } - } - add_scaled_artifact_modifier_dynasty_prestige_effect = yes - } - remove_artifact_modifier = artifact_placeholder_modifier - # Indian cabinets are actually diwans! - if = { - limit = { - scope:carpenter = { artifact_use_indian_building_visuals_trigger = yes } - } - set_artifact_description = artifact_diwan_description - } - else_if = { - limit = { - scope:carpenter = { - OR = { - artifact_use_mena_building_visuals_trigger = yes - artifact_use_iranian_building_visuals_trigger = yes - artifact_use_steppe_building_visuals_trigger = yes - } - } - } - set_artifact_description = artifact_table_description - } - else = { - set_variable = { - name = cabinet - value = yes - } - set_artifact_description = artifact_cabinet_description - } - } - } -} - -create_artifact_throne_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - $MAKER$ = { save_scope_as = maker } - hidden_effect_new_object = { - # Get artifact quality, wealth, and materials - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - - # Create the artifact - scope:owner = { - create_artifact = { - name = artifact_throne_name - description = placeholder # Will be regenerated in the post-creation effects - creator = scope:maker - visuals = throne - type = throne - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - #decaying = no - } - } - scope:newly_created_artifact = { - set_artifact_description = artifact_throne_description - - #Let's add modifiers! - add_scaled_artifact_modifier_prestige_effect = yes - if = { - limit = { rarity = illustrious } - add_scaled_artifact_modifier_majesty_effect = yes - add_scaled_artifact_modifier_rulership_effect = yes - } - else_if = { - limit = { rarity = famed } - add_scaled_artifact_modifier_majesty_effect = yes - } - - # All thrones have a chance to get some extra Grandeur - add_scaled_artifact_modifier_grandeur_big_effect = yes - remove_artifact_modifier = artifact_placeholder_modifier - } - } -} - - -############### -# TAPESTRY - -create_artifact_tapestry_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - $WEAVER$ = { save_scope_as = weaver } - - hidden_effect_new_object = { - # Get artifact quality, wealth, and materials - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - if = { #If the scene has been set in events we save it on the owner here so we can access it when choosing features - limit = { exists = scope:tapestry_scene } - scope:owner = { - set_variable = { - name = artifact_tapestry_scene - value = scope:tapestry_scene - days = 1 - } - } - } - # Fallback - else = { - random_list = { - 10 = { - scope:owner = { - set_variable = { - name = artifact_tapestry_scene - value = flag:geometric_patterns - days = 1 - } - } - } - 10 = { - scope:owner = { - set_variable = { - name = artifact_tapestry_scene - value = flag:garden - days = 1 - } - } - } - 10 = { - scope:owner = { - set_variable = { - name = artifact_tapestry_scene - value = flag:bucolic - days = 1 - } - } - } - } - } - # Create the artifact - scope:owner = { - if = { - limit = { - exists = scope:inspiration_owner - } - create_artifact = { - name = artifact_wall_tapestry_name - description = placeholder # Will be regenerated in the post-creation effects - creator = scope:weaver - visuals = tapestry - type = tapestry - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - #decaying = no - } - } - else_if = { - limit = { - exists = scope:adventurer - } - create_artifact = { - name = artifact_wall_tapestry_name - description = placeholder # Will be regenerated in the post-creation effects - creator = scope:adventurer - visuals = tapestry - type = tapestry - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - #decaying = no - history = { - location = scope:location - actor = scope:adventurer - recipient = root - type = discovered - } - } - } - else = { - create_artifact = { - name = artifact_wall_tapestry_name - description = placeholder # Will be regenerated in the post-creation effects - creator = scope:weaver - visuals = tapestry - type = tapestry - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - #decaying = no - } - } - } - scope:newly_created_artifact = { - set_artifact_description = artifact_wall_tapestry_description - # Set grandeur - add_scaled_artifact_modifier_grandeur_big_effect = yes - - if = { - limit = { - has_artifact_feature = tapestry_scene_religious - } - add_scaled_artifact_modifier_piety_effect = yes - } - else = { - add_scaled_artifact_modifier_majesty_effect = yes - } - - if = { - limit = { - OR = { - rarity = famed - rarity = illustrious - } - } - add_scaled_artifact_modifier_dynasty_prestige_effect = yes - } - remove_artifact_modifier = artifact_placeholder_modifier - } - } -} - - -############### -# HIDE - -#If the animal has been hunted we need to provide a location -get_animal_hunt_location_effect = { - if = { - limit = { - NOT = { exists = scope:location } - } - if = { - limit = { - exists = scope:owner.involved_activity - scope:owner.involved_activity = { has_activity_type = activity_hunt } - } - scope:owner.involved_activity.activity_location = { save_scope_as = location } - } - else = { - scope:owner = { - random_list = { - 30 = { #It's hunted in your own realm - trigger = { - any_sub_realm_county = { - exists = this - } - } - random_sub_realm_county = { - random_county_province = { save_scope_as = location } - } - } - 30 = { #It's hunted in a neighbors realm - trigger = { - highest_held_title_tier >= tier_county - any_neighboring_realm_same_rank_owner = { - exists = capital_county - } - } - random_neighboring_realm_same_rank_owner = { - limit = { - exists = capital_county - } - capital_county = { - random_county_province = { save_scope_as = location } - } - } - } - 1 = { # It's hunted in our current location (as a fallback if we're unlanded or only a baron). - trigger = { - OR = { - highest_held_title_tier < tier_county - is_landed = no - } - } - location.county = { - random_county_province = { save_scope_as = location } - } - } - } - } - } - } - scope:owner = { - if = { - limit = { - NOT = { has_variable = adventure_artifact_location } - } - set_variable = { - name = adventure_artifact_location - value = scope:location - days = 1 - } - } - if = { - limit = { - NOT = { has_variable = adventure_artifact_hunter } - exists = scope:creator - } - set_variable = { - name = adventure_artifact_hunter - value = scope:creator - days = 1 - } - } - else_if = { - limit = { - NOT = { has_variable = adventure_artifact_hunter } - } - set_variable = { - name = adventure_artifact_hunter - value = scope:owner - days = 1 - } - } - } -} - -create_artifact_animal_hide_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - $HUNTER$ = { save_scope_as = hunter } - save_scope_value_as = { name = legendary value = $LEGENDARY$ } - scope:owner = { - set_variable = { name = animal_type value = $ANIMAL$ days = 5 } - if = { - limit = { - OR = { - NOT = { exists = var:animal_type } - var:animal_type ?= flag:none - } - } - random_list = { - 8 = { - hunt_activity_standard_game_effect = { PROVINCE = scope:hunter.location HUNTER = scope:hunter } - } - 2 = { - hunt_activity_dangerous_game_effect = { PROVINCE = scope:hunter.location } - } - } - } - } - if = { - limit = { exists = scope:adventurer } - scope:adventurer = { save_scope_as = creator } - } - else = { - scope:hunter = { save_scope_as = creator } - } - hidden_effect_new_object = { - # Get artifact quality, wealth, and materials - animal_artifact_wealth_quality_effect = yes - get_animal_hunt_location_effect = yes - scope:location = { add_to_list = artifact_material_sources } - if = { - limit = { - OR = { - hunt_hide_big_trigger = { VARIABLE = scope:owner.var:animal_type } - AND = { - exists = scope:animal_hide_size - scope:animal_hide_size = flag:big - } - } - } - if = { - limit = { - NOT = { exists = scope:animal_hide_size } - } - save_scope_value_as = { name = animal_hide_size value = flag:big } - } - create_artifact = { - name = artifact_animal_hide_big_name - creator = scope:creator - description = placeholder - visuals = large_animal_hide - type = animal_hide_big - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - } - scope:newly_created_artifact = { - # Set grandeur - add_scaled_artifact_modifier_grandeur_big_effect = yes - # Set prestige - add_scaled_artifact_modifier_prestige_effect = yes - } - } - else = { - if = { - limit = { - NOT = { exists = scope:animal_hide_size } - } - save_scope_value_as = { name = animal_hide_size value = flag:small } - } - create_artifact = { - name = artifact_small_hide_name - creator = scope:creator - description = placeholder - visuals = small_animal_hide - type = animal_hide - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - } - scope:newly_created_artifact = { - if = { - limit = { - has_artifact_feature = animal_hide_type_cat - exists = scope:owner.var:story_cycle_cat_name - } - set_variable = { - name = pet_name - value = scope:owner.var:story_cycle_cat_name - } - } - else_if = { - limit = { - has_artifact_feature = animal_hide_type_dog - exists = scope:owner.var:story_cycle_dog_name - } - set_variable = { - name = pet_name - value = scope:owner.var:story_cycle_dog_name - } - } - # Set grandeur - add_scaled_artifact_modifier_grandeur_small_effect = yes - # Set prestige - add_scaled_artifact_modifier_minor_prestige_effect = yes - } - } - scope:newly_created_artifact = { - set_max_durability = 60 - set_variable = { - name = adventure_artifact_location - value = scope:owner.var:adventure_artifact_location - } - set_variable = { - name = adventure_artifact_hunter - value = scope:owner.var:adventure_artifact_hunter - } - if = { - limit = { - OR = { - rarity = famed - rarity = illustrious - } - } - add_scaled_artifact_modifier_dynasty_prestige_effect = yes - } - remove_artifact_modifier = artifact_placeholder_modifier - set_variable = { - name = animal_type - value = scope:owner.var:animal_type - } - set_variable = { - name = quality - value = scope:quality - } - set_variable = { - name = wealth - value = scope:wealth - } - hunt_animal_artifact_modifier_selection_effect = yes - if = { - limit = { scope:legendary = yes } - set_artifact_name = artifact_animal_hide_name_legendary - set_variable = { name = legendary } - add_scaled_artifact_modifier_majesty_effect = yes - add_scaled_artifact_modifier_combat_effect = yes - } - else_if = { - limit = { exists = scope:adventurer } - set_artifact_name = artifact_animal_hide_name_adventurer - } - else_if = { - limit = { exists = var:pet_name } - if = { - limit = { has_artifact_feature = animal_hide_type_cat } - set_artifact_name = artifact_animal_hide_name_cat - } - else_if = { - limit = { has_artifact_feature = animal_hide_type_dog } - set_artifact_name = artifact_animal_hide_name_dog - } - } - else_if = { - limit = { artifact_type = animal_hide_big } - set_artifact_name = artifact_animal_hide_big_name - } - else = { set_artifact_name = artifact_small_hide_name } - set_artifact_description = artifact_small_hide_description - } - scope:owner = { - remove_variable = adventure_artifact_location - remove_variable = adventure_artifact_hunter - } - } -} - -################## -# SKULL - -create_artifact_wall_skull_effect = { - $OWNER$ = { save_scope_as = owner } - $HUNTER$ = { save_scope_as = hunter } - save_scope_value_as = { name = legendary value = $LEGENDARY$ } - scope:owner = { - set_variable = { name = animal_type value = $ANIMAL$ days = 5 } - if = { - limit = { - OR = { - NOT = { exists = var:animal_type } - var:animal_type ?= flag:none - } - } - random_list = { - 8 = { - hunt_activity_standard_game_effect = { PROVINCE = scope:hunter.location HUNTER = scope:hunter } - } - 2 = { - hunt_activity_dangerous_game_effect = { PROVINCE = scope:hunter.location } - } - } - } - } - if = { - limit = { exists = scope:adventurer } - scope:adventurer = { save_scope_as = creator } - } - else = { - scope:hunter = { save_scope_as = creator } - } - hidden_effect_new_object = { - # Get artifact quality, location, and animal - animal_artifact_wealth_quality_effect = yes - get_animal_hunt_location_effect = yes - scope:location = { add_to_list = artifact_material_sources } - scope:owner = { - create_artifact = { - name = artifact_wall_skull_name - description = placeholder - creator = scope:creator - visuals = animal_trophy - type = animal_skull - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - } - } - scope:newly_created_artifact = { - set_max_durability = 60 - # Set grandeur - add_scaled_artifact_modifier_grandeur_small_effect = yes - # Set prestige - add_scaled_artifact_modifier_minor_prestige_effect = yes - if = { - limit = { - OR = { - rarity = famed - rarity = illustrious - } - } - add_scaled_artifact_modifier_dynasty_prestige_effect = yes - } - remove_artifact_modifier = artifact_placeholder_modifier - set_variable = { - name = animal_type - value = scope:owner.var:animal_type - } - set_variable = { - name = quality - value = scope:quality - } - set_variable = { - name = wealth - value = scope:wealth - } - hunt_animal_artifact_modifier_selection_effect = yes - if = { - limit = { scope:legendary = yes } - set_artifact_name = artifact_wall_skull_name_legendary - set_variable = { name = legendary } - add_scaled_artifact_modifier_majesty_effect = yes - add_scaled_artifact_modifier_combat_effect = yes - } - else_if = { - limit = { exists = scope:adventurer } - set_artifact_name = artifact_wall_skull_name_adventurer - } - else = { set_artifact_name = artifact_wall_skull_name } - set_artifact_description = artifact_wall_skull_description - } - scope:owner = { - remove_variable = adventure_artifact_location - remove_variable = adventure_artifact_hunter - } - } -} - -create_artifact_wall_narwhal_horn_effect = { - $OWNER$ = { save_scope_as = owner } - $HUNTER$ = { save_scope_as = hunter } - - hidden_effect_new_object = { - # Get artifact quality and wealth - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - scope:owner = { - set_variable = { - name = animal_type - value = flag:unicorn - days = 1 - } - if = { - limit = { exists = scope:adventurer } - scope:adventurer = { save_scope_as = creator } - } - else = { save_scope_as = creator } - } - scope:owner = { - if = { - limit = { - exists = scope:adventurer - } - create_artifact = { - name = artifact_wall_narwhal_horn_name - description = artifact_wall_narwhal_horn - visuals = animal_trophy - type = animal_skull - modifier = artifact_monthly_prestige_3_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - history = { - location = scope:location - actor = scope:adventurer - recipient = root - type = discovered - } - } - } - else = { - create_artifact = { - name = artifact_wall_narwhal_horn_name - description = artifact_wall_narwhal_horn - creator = scope:hunter - visuals = animal_trophy - type = animal_skull - modifier = artifact_monthly_prestige_3_modifier - wealth = scope:wealth - quality = scope:quality - #decaying = no - save_scope_as = newly_created_artifact - } - } - } - scope:newly_created_artifact = { - # Set grandeur - add_scaled_artifact_modifier_grandeur_big_effect = yes - # Set prestige - add_scaled_artifact_modifier_prestige_effect = yes - add_scaled_artifact_modifier_piety_effect = yes - # Extra for really good stuff - if = { - limit = { - OR = { - rarity = illustrious - rarity = famed - } - } - add_scaled_artifact_modifier_majesty_effect = yes - add_scaled_artifact_modifier_dynasty_prestige_effect = yes - } - remove_artifact_modifier = artifact_placeholder_modifier - save_scope_as = epic - } - } - scope:newly_created_artifact = { - if = { - limit = { scope:quality >= 66 } - add_artifact_modifier = artifact_court_grandeur_baseline_add_2_modifier - } - else_if = { - limit = { scope:quality >= 33 } - add_artifact_modifier = artifact_court_grandeur_baseline_add_1_modifier - } - - # Wealth determines prestige - if = { - limit = { scope:wealth >= 66 } - add_artifact_modifier = artifact_monthly_prestige_2_modifier - } - else_if = { - limit = { scope:wealth >= 33 } - add_artifact_modifier = artifact_placeholder_modifier - } - save_scope_as = epic - } -} - -############### -# ANIMAL TRINKET - -create_artifact_animal_trinket_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - $HUNTER$ = { save_scope_as = hunter } - save_scope_value_as = { name = legendary value = $LEGENDARY$ } - scope:owner = { - set_variable = { name = animal_type value = $ANIMAL$ days = 5 } - if = { - limit = { - OR = { - NOT = { exists = var:animal_type } - var:animal_type ?= flag:none - } - } - random_list = { - 8 = { - hunt_activity_standard_game_effect = { PROVINCE = scope:hunter.location HUNTER = scope:hunter } - } - 2 = { - hunt_activity_dangerous_game_effect = { PROVINCE = scope:hunter.location } - } - } - } - } - if = { - limit = { exists = scope:adventurer } - scope:adventurer = { save_scope_as = creator } - } - else = { - scope:hunter = { save_scope_as = creator } - } - hidden_effect_new_object = { - # Get artifact quality, wealth, materials, and decorations - animal_artifact_wealth_quality_effect = yes - get_animal_hunt_location_effect = yes - scope:location = { add_to_list = artifact_material_sources } - scope:owner = { - if = { - limit = { - OR = { - scope:owner.var:animal_type ?= flag:fox - scope:owner.var:animal_type ?= flag:cat - } - } - create_artifact = { - name = artifact_animal_trinket_name - creator = scope:hunter - description = placeholder - visuals = fox_tail - type = animal_trinket - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - } - } - else_if = { - limit = { - OR = { - scope:owner.var:animal_type ?= flag:bear - scope:owner.var:animal_type ?= flag:leopard - scope:owner.var:animal_type ?= flag:lion - scope:owner.var:animal_type ?= flag:tiger - scope:owner.var:animal_type ?= flag:wolf - scope:owner.var:animal_type ?= flag:lynx - scope:owner.var:animal_type ?= flag:wolf - scope:owner.var:animal_type ?= flag:dog - scope:owner.var:animal_type ?= flag:hyena - } - } - create_artifact = { - name = artifact_animal_trinket_name - creator = scope:hunter - description = placeholder - visuals = bear_paw - type = animal_trinket - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - } - } - else_if = { - limit = { - OR = { - scope:owner.var:animal_type ?= flag:aurochs - scope:owner.var:animal_type ?= flag:bison - scope:owner.var:animal_type ?= flag:boar - } - } - create_artifact = { - name = artifact_animal_trinket_name - creator = scope:hunter - description = placeholder - visuals = tusk - type = animal_trinket - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - } - } - else_if = { - limit = { - OR = { - scope:owner.var:animal_type ?= flag:hare - scope:owner.var:animal_type ?= flag:horse - scope:owner.var:animal_type ?= flag:unicorn - } - } - create_artifact = { - name = artifact_animal_trinket_name - creator = scope:hunter - description = placeholder - visuals = pouch - type = animal_trinket - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - } - } - else = { - create_artifact = { - name = artifact_animal_trinket_name - creator = scope:hunter - description = placeholder - visuals = animal_trinket - type = animal_trinket - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - } - } - } - scope:newly_created_artifact = { - set_max_durability = 60 - # Set prestige - add_scaled_artifact_modifier_minor_prestige_effect = yes - # Set stress loss - add_scaled_artifact_modifier_stress_gain_effect = yes - remove_artifact_modifier = artifact_placeholder_modifier - set_variable = { - name = animal_type - value = scope:owner.var:animal_type - } - set_variable = { - name = quality - value = scope:quality - } - set_variable = { - name = wealth - value = scope:wealth - } - hunt_animal_artifact_modifier_selection_effect = yes - if = { - limit = { scope:legendary = yes } - set_variable = { name = legendary } - add_scaled_artifact_modifier_majesty_effect = yes - add_scaled_artifact_modifier_combat_effect = yes - } - set_artifact_description = artifact_animal_trinket_description - } - scope:owner = { - remove_variable = adventure_artifact_location - remove_variable = adventure_artifact_hunter - } - } -} - -############### -# ANIMAL FEATHER - -create_artifact_bird_feather_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - $HUNTER$ = { save_scope_as = hunter } - scope:owner = { - set_variable = { name = animal_type value = $ANIMAL$ } - if = { - limit = { - OR = { - NOT = { exists = var:animal_type } - var:animal_type ?= flag:none - } - } - hunt_activity_falconry_game_effect = { PROVINCE = scope:hunter.location } - } - } - if = { - limit = { exists = scope:adventurer } - scope:adventurer = { save_scope_as = creator } - } - else = { - scope:hunter = { save_scope_as = creator } - } - hidden_effect_new_object = { - # Get artifact quality, wealth, materials, and decorations - animal_artifact_wealth_quality_effect = yes - get_animal_hunt_location_effect = yes - scope:location = { add_to_list = artifact_material_sources } - scope:owner = { - create_artifact = { - name = artifact_bird_feather_name - creator = scope:hunter - description = placeholder - visuals = bird_feather - type = bird_feather - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - } - } - scope:newly_created_artifact = { - if = { - limit = { - scope:owner.var:animal_type ?= flag:eagle - exists = scope:owner.var:story_cycle_eagle_name - } - set_variable = { - name = pet_name - value = scope:owner.var:story_cycle_eagle_name - } - set_artifact_name = artifact_animal_feather_name_eagle - set_artifact_description = artifact_bird_feather_pet_description - } - else = { - set_artifact_description = artifact_bird_feather_description - } - - set_max_durability = 60 - - # Set prestige - add_scaled_artifact_modifier_minor_prestige_effect = yes - # Set stress loss - add_scaled_artifact_modifier_stress_gain_effect = yes - remove_artifact_modifier = artifact_placeholder_modifier - - set_variable = { - name = animal_type - value = scope:owner.var:animal_type - } - set_variable = { - name = quality - value = scope:quality - } - set_variable = { - name = wealth - value = scope:wealth - } - } - scope:owner = { - remove_variable = adventure_artifact_location - remove_variable = adventure_artifact_hunter - remove_variable = animal_type - } - } -} - -############### -# BOX - -# Small box -create_artifact_box_small_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - $CARPENTER$ = { save_scope_as = carpenter } - hidden_effect_new_object = { - # Get artifact quality, wealth, and materials - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - if = { #IF we have set the location we use it for the materials - limit = { exists = scope:location } - scope:location = { add_to_list = artifact_material_sources } - } - - # Create the artifact - scope:owner = { - if = { - limit = { - exists = scope:adventurer - } - create_artifact = { - name = artifact_box_small_name - creator = scope:adventurer - description = placeholder - visuals = small_box - type = box - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - #decaying = no - history = { - location = scope:location - actor = scope:adventurer - recipient = root - type = discovered - } - } - } - else = { - create_artifact = { - name = artifact_box_small_name - creator = scope:carpenter - description = placeholder - visuals = small_box - type = box - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - #decaying = no - } - } - } - scope:newly_created_artifact = { - get_artifact_feature_references_effect = yes - set_artifact_description = artifact_box_small_description - - # Set grandeur - add_scaled_artifact_modifier_grandeur_small_effect = yes - add_scaled_artifact_modifier_piety_effect = yes - if = { - limit = { - OR = { - rarity = famed - rarity = illustrious - } - } - add_scaled_artifact_modifier_dynasty_prestige_effect = yes - } - remove_artifact_modifier = artifact_placeholder_modifier - } - } -} - -# Medium box -create_artifact_box_medium_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - $CARPENTER$ = { save_scope_as = carpenter } - hidden_effect_new_object = { - # Get artifact quality, wealth, and materials - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - if = { #IF we have set the location we use it for the materials - limit = { exists = scope:location } - scope:location = { add_to_list = artifact_material_sources } - } - - # Create the artifact - scope:owner = { - if = { - limit = { - exists = scope:adventurer - } - create_artifact = { - name = artifact_box_medium_name - creator = scope:adventurer - description = placeholder - visuals = medium_box - type = box - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - #decaying = no - history = { - location = scope:location - actor = scope:adventurer - recipient = root - type = discovered - } - } - } - else = { - create_artifact = { - name = artifact_box_medium_name - creator = scope:carpenter - description = placeholder - visuals = medium_box - type = box - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - #decaying = no - } - } - } - scope:newly_created_artifact = { - get_artifact_feature_references_effect = yes - set_artifact_description = artifact_box_medium_description - - # Set grandeur - add_scaled_artifact_modifier_grandeur_small_effect = yes - add_scaled_artifact_modifier_piety_effect = yes - if = { - limit = { - OR = { - rarity = famed - rarity = illustrious - } - } - add_scaled_artifact_modifier_dynasty_prestige_effect = yes - } - remove_artifact_modifier = artifact_placeholder_modifier - } - } -} - - - -############### -# GOBLET - -create_artifact_goblet_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - $SMITH$ = { save_scope_as = goldsmith } - - hidden_effect_new_object = { - # Get artifact quality, wealth, and materials - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - if = { #Any existing dummy character gets turned into the goldsmith - limit = { - exists = scope:dummy_gender - scope:goldsmith = scope:dummy_gender - } - clear_saved_scope = goldsmith - clear_saved_scope = dummy_gender - } - # Create the artifact - scope:owner = { - if = { - limit = { exists = scope:adventurer } - create_artifact = { - name = artifact_goblet_name - description = placeholder - visuals = goblet - type = goblet - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - #decaying = no - save_scope_as = newly_created_artifact - history = { - location = scope:location - actor = scope:adventurer - recipient = root - type = discovered - } - } - } - else_if = { - limit = { - scope:host ?= $OWNER$ - scope:activity ?= { has_activity_type = activity_tournament } - } - create_artifact = { - name = artifact_goblet_name - creator = scope:host - description = placeholder # Will be updated in the post-creation effects after decorations are assigned. - visuals = goblet - type = goblet - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - history = { - type = prize_created - recipient = scope:host - } - save_scope_as = newly_created_artifact - } - } - else_if = { - limit = { exists = scope:goldsmith } - create_artifact = { - name = artifact_goblet_name - creator = scope:goldsmith - description = placeholder - visuals = goblet - type = goblet - wealth = scope:wealth - quality = scope:quality - #decaying = no - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - } - } - else = { - create_artifact = { - name = artifact_goblet_name - description = placeholder - visuals = goblet - type = goblet - wealth = scope:wealth - quality = scope:quality - #decaying = no - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - history = { type = created_before_history } - } - } - } - scope:newly_created_artifact = { - set_artifact_description = artifact_goblet_description - - # Set grandeur - add_scaled_artifact_modifier_grandeur_small_effect = yes - - # Let's add another random effect to keep goblets interesting! - random_list = { - 10 = { - add_scaled_artifact_modifier_minor_prestige_effect = yes - } - 10 = { - add_scaled_artifact_modifier_majesty_effect = yes - } - 30 = { - trigger = { rarity = common } - # Common goblets have a chance to not get any extra modifiers - } - } - remove_artifact_modifier = artifact_placeholder_modifier - } - } -} - -create_artifact_wall_banner_effect = { - $OWNER$ = { save_scope_as = owner } - $CREATOR$ = { save_scope_as = creator } - $TARGET$ = { save_scope_as = target } #Can be a title, a house or a dynasty - - #This effect can be used to generate banners - either from battle or a character. - #For battle banners the variables epic_battle_location and epic_loser must be set. - #To generate a dynasty banner the variable banner_from_dynasty must be set - #To generate a house banner the variable banner_from_house must be set - #To generate a banner for a title no special variables need to be set - - hidden_effect_new_object = { - if = { - limit = { has_variable = epic_battle_location } - var:epic_battle_location = { save_scope_as = epic_battle_location } - remove_variable = epic_battle_location - } - if = { - limit = { has_variable = epic_loser } - var:epic_loser = { save_scope_as = epic_loser } - remove_variable = epic_loser - } - # Dynasty banner rarity determined by Dynasty Splendor - if = { - limit = { - scope:owner = { has_variable = banner_from_dynasty } - } - if = { - limit = { scope:owner.dynasty.dynasty_prestige_level = max_dynasty_prestige_level } - set_artifact_rarity_illustrious = yes - } - else_if = { - limit = { scope:owner.dynasty.dynasty_prestige_level >= high_dynasty_prestige_level } - set_artifact_rarity_famed = yes - } - else_if = { - limit = { scope:owner.dynasty.dynasty_prestige_level >= medium_dynasty_prestige_level } - set_artifact_rarity_masterwork = yes - } - else = { set_artifact_rarity_common = yes } - } - # Other banners use default rarity script - else = { - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - } - - scope:owner = { - if = { #Dynasty Banner - limit = { has_variable = banner_from_dynasty } - if = { #Startup Banner - limit = { has_variable = startup_banner } - create_artifact = { - name = artifact_wall_banner_dynasty_name - description = artifact_wall_banner_dynasty_description - visuals = banner - visuals_source = scope:target - template = dynasty_banner_template - type = wall_big - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - history = { - type = created - recipient = scope:owner - location = scope:owner.capital_province - } - } - remove_variable = startup_banner - } - else = { #Created Banner - create_artifact = { - name = artifact_wall_banner_dynasty_name - creator = scope:creator - description = artifact_wall_banner_dynasty_description - visuals = banner - visuals_source = scope:target - template = dynasty_banner_template - type = wall_big - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - } - } - scope:newly_created_artifact = { - set_variable = { # Tracks house - name = banner_dynasty - value = scope:target - } - set_variable = { # Tracks first owner - name = banner_commissioner - value = scope:owner - } - grant_banner_house_claim_effect = yes - set_artifact_description = artifact_wall_banner_dynasty_description # For commissioner flavor - } - remove_variable = banner_from_dynasty - } - else_if = { #House Banner - limit = { has_variable = banner_from_house } - if = { #Startup Banner - limit = { has_variable = startup_banner } - create_artifact = { - name = artifact_wall_banner_house_name - description = artifact_wall_banner_house_description - visuals = banner - visuals_source = scope:target - template = house_banner_template - type = wall_big - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - history = { - type = created - recipient = scope:owner - location = scope:owner.capital_province - } - } - remove_variable = startup_banner - } - else = { #Created Banner - create_artifact = { - name = artifact_wall_banner_house_name - creator = scope:creator - description = artifact_wall_banner_house_description - visuals = banner - visuals_source = scope:target - template = house_banner_template - type = wall_big - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - } - } - scope:newly_created_artifact = { - set_variable = { # Tracks house - name = banner_house - value = scope:target - } - } - remove_variable = banner_from_house - } - else_if = { # For banners looted after a battle - limit = { - exists = scope:epic_battle_location - exists = scope:epic_loser - } - create_artifact = { - name = artifact_wall_banner_battle_name - creator = scope:creator - description = artifact_wall_banner_battle_description - visuals = banner - visuals_source = scope:target - type = wall_big - modifier = artifact_placeholder_modifier - quality = conquered_banner_value - wealth = conquered_banner_value - decaying = no - save_scope_as = newly_created_artifact - history = { - location = scope:epic_battle_location - actor = scope:epic_loser - recipient = scope:owner - type = conquest - } - } - } - else = { #Royal Banner - create_artifact = { - name = artifact_wall_banner_royal_name - creator = scope:creator - description = artifact_wall_banner_royal_description - visuals = banner - visuals_source = scope:target - type = wall_big - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - } - } - } - - # Modifiers are completely randomized - Possible modifiers are based on the battle - scope:newly_created_artifact = { - add_scaled_artifact_modifier_grandeur_small_effect = yes - if = { - limit = { - exists = scope:epic_loser - } - random_list = { - pick = 2 - unique = yes - 10 = { # Knight Limit - random_list = { - 10 = { - add_artifact_modifier = artifact_knight_limit_1_modifier - } - 5 = { - add_artifact_modifier = artifact_knight_limit_2_modifier - } - } - } - 10 = { # Knight Effectiveness - random_list = { - 15 = { - add_artifact_modifier = artifact_knight_effectiveness_1_modifier - } - 10 = { - add_artifact_modifier = artifact_knight_effectiveness_2_modifier - } - 5 = { - add_artifact_modifier = artifact_knight_effectiveness_3_modifier - } - } - } - 10 = { # Levy Reinforcement Rate - random_list = { - 15 = { - add_artifact_modifier = artifact_levy_reinforcement_rate_1_modifier - } - 5 = { - add_artifact_modifier = artifact_levy_reinforcement_rate_2_modifier - } - } - } - 10 = { # Dread Gain - random_list = { - 15 = { - add_artifact_modifier = artifact_dread_gain_mult_1_modifier - } - 5 = { - add_artifact_modifier = artifact_dread_gain_mult_2_modifier - } - } - } - 10 = { # Dread Baseline - random_list = { - 20 = { - add_artifact_modifier = artifact_dread_baseline_add_1_modifier - } - 5 = { - add_artifact_modifier = artifact_dread_baseline_add_2_modifier - } - } - } - 10 = { # Prestige Bonus - You only get one, as we don't want these to stack too much - random_list = { - 10 = { # Monthly Prestige - random_list = { - 10 = { - add_artifact_modifier = artifact_monthly_prestige_1_modifier - } - 5 = { - add_artifact_modifier = artifact_monthly_prestige_2_modifier - } - } - } - 10 = { # Prestige per Knight - random_list = { - 10 = { - add_artifact_modifier = artifact_monthly_prestige_gain_per_knight_add_1_modifier - } - 5 = { - add_artifact_modifier = artifact_monthly_prestige_gain_per_knight_add_2_modifier - } - } - } - 10 = { # Prestige per Dread - random_list = { - 10 = { - add_artifact_modifier = artifact_monthly_prestige_gain_per_dread_add_1_modifier - } - 5 = { - add_artifact_modifier = artifact_monthly_prestige_gain_per_dread_add_2_modifier - } - } - } - } - } - 10 = { # Advantage vs other Faiths - trigger = { - exists = scope:epic_loser - exists = scope:owner - scope:epic_loser = { - faith != scope:owner.faith - } - } - random_list = { - 15 = { - add_artifact_modifier = artifact_tolerance_advantage_mod_2_modifier - } - 10 = { - add_artifact_modifier = artifact_tolerance_advantage_mod_3_modifier - } - 5 = { - add_artifact_modifier = artifact_tolerance_advantage_mod_4_modifier - } - } - } - 10 = { # Controlled Province Advantage - trigger = { - exists = scope:owner - exists = scope:epic_loser - exists = scope:epic_battle_location - scope:owner = { - any_character_war = { - is_defender = scope:owner - is_attacker = scope:epic_loser - } - any_realm_province = { - this = scope:epic_battle_location - } - } - } - random_list = { - 15 = { - add_artifact_modifier = artifact_controlled_province_advantage_1_modifier - } - 10 = { - add_artifact_modifier = artifact_controlled_province_advantage_2_modifier - } - 5 = { - add_artifact_modifier = artifact_controlled_province_advantage_3_modifier - } - } - } - # Chance to acquire an advantage bonus for the terrain the battle was fought in - 10 = { # Plains Advantage - trigger = { - exists = scope:epic_battle_location - scope:epic_battle_location = { - terrain = plains - } - } - random_list = { - 15 = { - add_artifact_modifier = artifact_plains_advantage_1_modifier - } - 10 = { - add_artifact_modifier = artifact_plains_advantage_2_modifier - } - 5 = { - add_artifact_modifier = artifact_plains_advantage_3_modifier - } - } - } - 10 = { # Farmlands Advantage - trigger = { - exists = scope:epic_battle_location - scope:epic_battle_location = { - terrain = farmlands - } - } - random_list = { - 15 = { - add_artifact_modifier = artifact_farmlands_advantage_1_modifier - } - 10 = { - add_artifact_modifier = artifact_farmlands_advantage_2_modifier - } - 5 = { - add_artifact_modifier = artifact_farmlands_advantage_3_modifier - } - } - } - 10 = { # Hills Advantage - trigger = { - exists = scope:epic_battle_location - scope:epic_battle_location = { - terrain = hills - } - } - random_list = { - 15 = { - add_artifact_modifier = artifact_hills_advantage_1_modifier - } - 10 = { - add_artifact_modifier = artifact_hills_advantage_2_modifier - } - 5 = { - add_artifact_modifier = artifact_hills_advantage_3_modifier - } - } - } - 10 = { # Mountains Advantage - trigger = { - exists = scope:epic_battle_location - scope:epic_battle_location = { - terrain = mountains - } - } - random_list = { - 15 = { - add_artifact_modifier = artifact_mountains_advantage_1_modifier - } - 10 = { - add_artifact_modifier = artifact_mountains_advantage_2_modifier - } - 5 = { - add_artifact_modifier = artifact_mountains_advantage_3_modifier - } - } - } - 10 = { # Desert Advantage - trigger = { - exists = scope:epic_battle_location - scope:epic_battle_location = { - terrain = desert - } - } - random_list = { - 15 = { - add_artifact_modifier = artifact_desert_advantage_1_modifier - } - 10 = { - add_artifact_modifier = artifact_desert_advantage_2_modifier - } - 5 = { - add_artifact_modifier = artifact_desert_advantage_3_modifier - } - } - } - 10 = { # Desert Mountains Advantage - trigger = { - exists = scope:epic_battle_location - scope:epic_battle_location = { - terrain = desert_mountains - } - } - random_list = { - 15 = { - add_artifact_modifier = artifact_desert_mountains_advantage_1_modifier - } - 10 = { - add_artifact_modifier = artifact_desert_mountains_advantage_2_modifier - } - 5 = { - add_artifact_modifier = artifact_desert_mountains_advantage_3_modifier - } - } - } - 10 = { # Oasis Advantage - trigger = { - exists = scope:epic_battle_location - scope:epic_battle_location = { - terrain = oasis - } - } - random_list = { - 15 = { - add_artifact_modifier = artifact_oasis_advantage_1_modifier - } - 10 = { - add_artifact_modifier = artifact_oasis_advantage_2_modifier - } - 5 = { - add_artifact_modifier = artifact_oasis_advantage_3_modifier - } - } - } - 10 = { # Jungle Advantage - trigger = { - exists = scope:epic_battle_location - scope:epic_battle_location = { - terrain = jungle - } - } - random_list = { - 15 = { - add_artifact_modifier = artifact_jungle_advantage_1_modifier - } - 10 = { - add_artifact_modifier = artifact_jungle_advantage_2_modifier - } - 5 = { - add_artifact_modifier = artifact_jungle_advantage_3_modifier - } - } - } - 10 = { # Forest Advantage - trigger = { - exists = scope:epic_battle_location - scope:epic_battle_location = { - terrain = forest - } - } - random_list = { - 15 = { - add_artifact_modifier = artifact_forest_advantage_1_modifier - } - 10 = { - add_artifact_modifier = artifact_forest_advantage_2_modifier - } - 5 = { - add_artifact_modifier = artifact_forest_advantage_3_modifier - } - } - } - 10 = { # Taiga Advantage - trigger = { - exists = scope:epic_battle_location - scope:epic_battle_location = { - terrain = taiga - } - } - random_list = { - 15 = { - add_artifact_modifier = artifact_taiga_advantage_1_modifier - } - 10 = { - add_artifact_modifier = artifact_taiga_advantage_2_modifier - } - 5 = { - add_artifact_modifier = artifact_taiga_advantage_3_modifier - } - } - } - 10 = { # Wetlands Advantage - trigger = { - exists = scope:epic_battle_location - scope:epic_battle_location = { - terrain = wetlands - } - } - random_list = { - 15 = { - add_artifact_modifier = artifact_wetlands_advantage_1_modifier - } - 10 = { - add_artifact_modifier = artifact_wetlands_advantage_2_modifier - } - 5 = { - add_artifact_modifier = artifact_wetlands_advantage_3_modifier - } - } - } - 10 = { # Steppe Advantage - trigger = { - exists = scope:epic_battle_location - scope:epic_battle_location = { - terrain = steppe - } - } - random_list = { - 15 = { - add_artifact_modifier = artifact_steppe_advantage_1_modifier - } - 10 = { - add_artifact_modifier = artifact_steppe_advantage_2_modifier - } - 5 = { - add_artifact_modifier = artifact_steppe_advantage_3_modifier - } - } - } - 10 = { # Floodplains Advantage - trigger = { - exists = scope:epic_battle_location - scope:epic_battle_location = { - terrain = floodplains - } - } - random_list = { - 15 = { - add_artifact_modifier = artifact_floodplains_advantage_1_modifier - } - 10 = { - add_artifact_modifier = artifact_floodplains_advantage_2_modifier - } - 5 = { - add_artifact_modifier = artifact_floodplains_advantage_3_modifier - } - } - } - 10 = { # Drylands Advantage - trigger = { - exists = scope:epic_battle_location - scope:epic_battle_location = { - terrain = drylands - } - } - random_list = { - 15 = { - add_artifact_modifier = artifact_drylands_advantage_1_modifier - } - 10 = { - add_artifact_modifier = artifact_drylands_advantage_2_modifier - } - 5 = { - add_artifact_modifier = artifact_drylands_advantage_3_modifier - } - } - } - # glory_hound_opinion - 10 = { - if = { - limit = { rarity = common } - add_artifact_modifier = artifact_glory_hound_vassal_opinion_1_modifier - } - else_if = { - limit = { rarity = masterwork } - add_artifact_modifier = artifact_glory_hound_vassal_opinion_2_modifier - } - else_if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_glory_hound_vassal_opinion_3_modifier - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_glory_hound_vassal_opinion_4_modifier - } - } - # glory_hound_levy_mult - 10 = { - if = { - limit = { rarity = common } - add_artifact_modifier = artifact_glory_hound_levy_contribution_mult_1_modifier - } - else_if = { - limit = { rarity = masterwork } - add_artifact_modifier = artifact_glory_hound_levy_contribution_mult_2_modifier - } - else_if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_glory_hound_levy_contribution_mult_3_modifier - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_glory_hound_levy_contribution_mult_4_modifier - } - } - # belligerent_opinion - 10 = { - if = { - limit = { rarity = common } - add_artifact_modifier = artifact_belligerent_vassal_opinion_1_modifier - } - else_if = { - limit = { rarity = masterwork } - add_artifact_modifier = artifact_belligerent_vassal_opinion_2_modifier - } - else_if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_belligerent_vassal_opinion_3_modifier - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_belligerent_vassal_opinion_4_modifier - } - } - # belligerent_levy_mult - 10 = { - if = { - limit = { rarity = common } - add_artifact_modifier = artifact_belligerent_levy_contribution_mult_1_modifier - } - else_if = { - limit = { rarity = masterwork } - add_artifact_modifier = artifact_belligerent_levy_contribution_mult_2_modifier - } - else_if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_belligerent_levy_contribution_mult_3_modifier - } - else_if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_belligerent_levy_contribution_mult_4_modifier - } - } - } - } - else = { - add_scaled_artifact_modifier_dynasty_prestige_effect = yes - add_scaled_artifact_modifier_prestige_effect = yes - add_scaled_artifact_modifier_rulership_effect = yes - } - remove_artifact_modifier = artifact_placeholder_modifier - } - } -} - -create_artifact_wall_shield_effect = { - $OWNER$ = { save_scope_as = owner } - $TARGET$ = { save_scope_as = target } - $CREATOR$ = { save_scope_as = smith } - - hidden_effect_new_object = { - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - - if = { - limit = { - scope:smith = { artifact_use_mediterranean_building_visuals_trigger = yes } - } - scope:owner = { - create_artifact = { - name = artifact_wall_shield_name - creator = scope:smith - description = artifact_wall_shield_description - visuals = wall_shield_medi - visuals_source = scope:target - type = wall_shield_special - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - #decaying = no - } - } - } - else = { - scope:owner = { - create_artifact = { - name = artifact_wall_shield_name - creator = scope:smith - description = artifact_wall_shield_description - visuals = wall_shield - visuals_source = scope:target - type = wall_shield - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - #decaying = no - } - } - } - scope:newly_created_artifact = { - add_scaled_artifact_modifier_grandeur_small_effect = yes - add_scaled_artifact_modifier_dynasty_prestige_effect = yes - if = { - limit = { - OR = { - rarity = famed - rarity = illustrious - } - } - add_scaled_artifact_modifier_minor_prestige_effect = yes - } - remove_artifact_modifier = artifact_placeholder_modifier - } - } -} - - -create_artifact_sculpture_effect = { - $OWNER$ = { save_scope_as = owner } - $SCULPTER$ = { save_scope_as = sculpter } - hidden_effect_new_object = { - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - if = { - limit = { - scope:owner = { is_female = yes } - } - save_scope_value_as = { - name = owner_fm - value = flag:female - } - } - else = { - save_scope_value_as = { - name = owner_fm - value = flag:male - } - } - - if = { - limit = { - OR = { - scope:sculpter = { - OR = { - artifact_use_mena_building_visuals_trigger = yes - artifact_use_iranian_building_visuals_trigger = yes - artifact_use_steppe_building_visuals_trigger = yes - } - } - scope:owner = { - faith = { - OR = { - has_doctrine = tenet_aniconism - religion = religion:islam_religion - } - } - } - } - } - scope:owner = { - create_artifact = { - name = artifact_sculpture_name - creator = scope:sculpter - description = placeholder - visuals = statue_mena - type = sculpture - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - #decaying = no - } - } - } - else = { - scope:owner = { - create_artifact = { - name = artifact_sculpture_name - creator = scope:sculpter - description = placeholder - visuals = statue - type = sculpture - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - #decaying = no - } - } - } - scope:newly_created_artifact = { - if = { - limit = { - has_artifact_feature = sculpture_material_wood - } - set_artifact_feature_group = generic_material_wood - } - #Description - if = { - limit = { - OR = { - scope:sculpter = { - OR = { - artifact_use_mena_building_visuals_trigger = yes - artifact_use_iranian_building_visuals_trigger = yes - artifact_use_steppe_building_visuals_trigger = yes - } - } - scope:owner = { #An owner who follows an aniconic faith will never want a statue that portrays a human - faith = { - OR = { - has_doctrine = tenet_aniconism - religion = religion:islam_religion - } - } - } - } - } - set_artifact_description = artifact_sculpture_animal_description #backup description if anti icons - } - else = { - set_artifact_description = artifact_sculpture_description #default description of person - } - add_scaled_artifact_modifier_grandeur_small_effect = yes - add_scaled_artifact_modifier_prestige_effect = yes - add_scaled_artifact_modifier_majesty_effect = yes - remove_artifact_modifier = artifact_placeholder_modifier - } - } -} - -create_artifact_pedestal_rock_effect = { - $OWNER$ = { save_scope_as = owner } - - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - - scope:owner = { - create_artifact = { - name = artifact_pedestal_rock_name - creator = scope:owner - description = artifact_pedestal_rock_description - visuals = rock - type = pedestal - modifier = artifact_monthly_piety_4_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - decaying = no - } - } - scope:newly_created_artifact = { - add_artifact_modifier = artifact_monthly_piety_gain_mult_2_modifier - add_artifact_modifier = artifact_stress_gain_1_modifier - } -} - -create_artifact_pedestal_pouch_effect = { - $OWNER$ = { save_scope_as = owner } - - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - - scope:owner = { - create_artifact = { - name = artifact_pedestal_pouch_name - creator = scope:owner - description = artifact_pedestal_pouch_description - visuals = pouch - type = pedestal - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - #decaying = no - } - } -} - -create_artifact_pedestal_scroll_effect = { - $OWNER$ = { save_scope_as = owner } - $WRITER$ = { save_scope_as = writer } - - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - - scope:owner = { - create_artifact = { - name = artifact_pedestal_scroll_name - creator = scope:writer - description = artifact_pedestal_scroll_description - visuals = scroll - type = pedestal - modifier = artifact_monthly_prestige_4_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - #decaying = no - } - } - scope:newly_created_artifact = { - add_artifact_modifier = artifact_stewardship_per_stress_level_2_modifier - add_artifact_modifier = artifact_parochial_vassal_opinion_3_modifier - } -} - -create_artifact_pedestal_religious_head_letter_effect = { - $OWNER$ = { save_scope_as = owner } - - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - - scope:owner = { - create_artifact = { - name = artifact_pedestal_religious_head_letter_name - creator = scope:owner - description = artifact_pedestal_religious_head_letter_description - visuals = scroll - type = pedestal - modifier = religious_head_letter_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - #decaying = no - } - } - - scope:newly_created_artifact = { - add_scaled_artifact_modifier_grandeur_small_effect = yes - add_scaled_artifact_modifier_piety_effect = yes - } -} - -#The crucifix should be preferred by non-aniconic Christian faiths -create_artifact_pedestal_crucifix_effect = { - $OWNER$ = { save_scope_as = owner } - - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - - scope:owner = { - create_artifact = { - name = artifact_pedestal_crucifix_name - creator = scope:owner - description = artifact_pedestal_crucifix_description - visuals = cross - type = pedestal - template = cross_template - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - #decaying = no - } - } - - scope:newly_created_artifact = { - add_scaled_artifact_modifier_devotion_effect = yes - add_scaled_artifact_modifier_grandeur_small_effect = yes - if = { - limit = { - OR = { - rarity = famed - rarity = illustrious - } - } - add_scaled_artifact_modifier_piety_effect = yes - } - remove_artifact_modifier = artifact_placeholder_modifier - } -} - -#The cross is for aniconic Christian faiths -create_artifact_pedestal_cross_effect = { - $OWNER$ = { save_scope_as = owner } - - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - - scope:owner = { - create_artifact = { - name = artifact_pedestal_cross_name - description = artifact_pedestal_cross_description - visuals = cross - type = pedestal - template = cross_template - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - } - } - - scope:newly_created_artifact = { - add_scaled_artifact_modifier_devotion_effect = yes - add_scaled_artifact_modifier_grandeur_small_effect = yes - if = { - limit = { - OR = { - rarity = famed - rarity = illustrious - } - } - add_scaled_artifact_modifier_piety_effect = yes - } - remove_artifact_modifier = artifact_placeholder_modifier - } -} - -create_artifact_pedestal_human_skull_effect = { - $OWNER$ = { save_scope_as = owner } - - $CREATOR$ = { save_scope_as = creator } - - $DESKULLED$ = { save_scope_as = killed } - - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - - scope:owner = { - create_artifact = { - name = artifact_pedestal_human_skull_name - creator = scope:creator - description = artifact_pedestal_human_skull_description - visuals = human_skull - type = pedestal - modifier = artifact_dread_gain_mult_1_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - #decaying = no - } - } - scope:newly_created_artifact = { - add_scaled_artifact_modifier_grandeur_small_effect = yes - add_scaled_artifact_modifier_minor_prestige_effect = yes - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_dread_baseline_add_2_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_dread_baseline_add_1_modifier - } - } -} - -create_artifact_pedestal_human_skull_specific_effect = { - $OWNER$ = { save_scope_as = owner } - - $DESKULLED$ = { save_scope_as = killed } - - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - - scope:owner = { - create_artifact = { - name = artifact_pedestal_human_skull_name - creator = scope:owner - description = artifact_pedestal_human_skull_specific_description - visuals = human_skull - type = miscellaneous - modifier = artifact_dread_baseline_add_1_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - } - } -} - -create_artifact_pedestal_diamond_effect = { - $OWNER$ = { save_scope_as = owner } - - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - - scope:owner = { - create_artifact = { - name = artifact_pedestal_massive_diamond_name - creator = scope:owner - description = artifact_pedestal_massive_diamond - visuals = diamond - type = pedestal - modifier = artifact_monthly_prestige_2_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - decaying = no - } - } - scope:newly_created_artifact = { - add_scaled_artifact_modifier_grandeur_big_effect = yes - add_scaled_artifact_modifier_prestige_effect = yes - } -} - -create_artifact_pedestal_gold_effect = { - $OWNER$ = { save_scope_as = owner } - - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - - scope:owner = { - create_artifact = { - name = artifact_pedestal_gold_nugget_name - description = artifact_pedestal_gold_nugget - creator = scope:owner - visuals = pouch - type = pedestal - #icon = pile of gold - modifier = artifact_monthly_prestige_2_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - decaying = no - } - } - - scope:newly_created_artifact = { - add_scaled_artifact_modifier_grandeur_small_effect = yes - add_2_scaled_artifact_modifier_majesty_effect = yes - } -} - - -################## -# Books - -#Effect used to influence a book-artifact's content quality -change_artifact_book_content_quality_effect = { - if = { - limit = { - $AMOUNT$ > 0 - } - custom_tooltip = change_artifact_book_content_quality_effect_gain - } - else_if = { - limit = { - $AMOUNT$ < 0 - } - custom_tooltip = change_artifact_book_content_quality_effect_loss - } - hidden_effect = { - if = { - limit = { - NOT = { - exists = var:book_content_quality - } - } - set_variable = { - name = book_content_quality - value = $AMOUNT$ - } - } - else = { - change_variable = { - name = book_content_quality - add = $AMOUNT$ - } - } - } -} - -# Effect used when a character becomes inspired to write a book -set_book_subject_effect = { - save_temporary_scope_value_as = { - name = allow_no_subject_option - value = $NO_SUBJECT$ - } - hidden_effect = { #If they haven't specified what they're gonna write about we decide it here (might still leave it up to the sponsor if allow_no_subject_option = yes!) - $BASE_SCOPE$ = { - if = { - limit = { - NOT = { exists = var:book_subject } - } - random_list = { #What do they want to write about? - 1 = { - modifier = { - add = 60 - has_education_martial_trigger = yes - } - modifier = { - add = 40 - book_subject_martial_trigger = yes - } - modifier = { - add = { #If they're good you get +, if they're shit you get - - value = average_skill_rating - subtract = martial - multiply = -5 - } - } - set_variable = { - name = book_subject - value = flag:martial - } - } - 1 = { - modifier = { - add = 60 - has_education_diplomacy_trigger = yes - } - modifier = { - add = { #If they're good you get +, if they're shit you get - - value = average_skill_rating - subtract = diplomacy - multiply = -5 - } - } - set_variable = { - name = book_subject - value = flag:diplomacy - } - } - 1 = { - modifier = { - add = 60 - has_education_stewardship_trigger = yes - } - modifier = { - add = { #If they're good you get +, if they're shit you get - - value = average_skill_rating - subtract = stewardship - multiply = -5 - } - } - set_variable = { - name = book_subject - value = flag:stewardship - } - } - 1 = { - modifier = { - add = 60 - has_education_intrigue_trigger = yes - } - modifier = { - add = { #If they're good you get +, if they're shit you get - - value = average_skill_rating - subtract = intrigue - multiply = -5 - } - } - set_variable = { - name = book_subject - value = flag:intrigue - } - } - 1 = { - modifier = { - add = 60 - has_education_learning_trigger = yes - } - modifier = { - add = { #If they're good you get +, if they're shit you get - - value = average_skill_rating - subtract = learning - multiply = -5 - } - } - set_variable = { - name = book_subject - value = flag:learning - } - } - 1 = { - modifier = { - add = 50 - book_subject_medicine_trigger = yes - } - modifier = { - add = 20 - is_witch_trigger = yes - } - modifier = { - add = { - value = learning - multiply = 2 - } - } - ai_value_modifier = { - ai_rationality = 0.25 - } - set_variable = { - name = book_subject - value = flag:medicine - } - } - 1 = { - trigger = { - is_witch_trigger = yes - } - modifier = { - add = 20 - book_subject_witch_trigger = yes - } - ai_value_modifier = { - ai_boldness = 0.75 - } - set_variable = { - name = book_subject - value = flag:witch - } - set_variable = { - name = book_subject_witch_scope - value = this - } - } - 40 = { - trigger = { - has_trait = lifestyle_reveler - } - ai_value_modifier = { - ai_compassion = 0.25 - } - set_variable = { - name = book_subject - value = flag:reveler - } - } - 40 = { - trigger = { - has_trait = lifestyle_blademaster - } - modifier = { - add = { - value = martial - multiply = 2 - } - } - set_variable = { - name = book_subject - value = flag:blademaster - } - } - 40 = { - trigger = { - has_trait = lifestyle_hunter - } - set_variable = { - name = book_subject - value = flag:hunter - } - } - 40 = { - trigger = { - has_trait = lifestyle_mystic - } - modifier = { - add = { - value = learning - multiply = 2 - } - } - set_variable = { - name = book_subject - value = flag:mystic - } - } - 40 = { - trigger = { - has_trait = lifestyle_herbalist - } - modifier = { - add = { - value = learning - multiply = 2 - } - } - set_variable = { - name = book_subject - value = flag:herbalist - } - } - 40 = { - trigger = { - has_trait = legend - } - modifier = { - add = { - value = martial - multiply = 2 - } - } - set_variable = { - name = book_subject - value = flag:legend - } - } - 1 = { - trigger = { - is_cannibal_trigger = yes - } - modifier = { - add = 30 - book_subject_cannibal_trigger = yes - } - ai_value_modifier = { - ai_boldness = 0.75 - } - set_variable = { - name = book_subject - value = flag:cannibal - } - } - 1 = { - modifier = { - add = 50 - book_subject_torturer_trigger = yes - } - compare_modifier = { - value = intrigue - multiplier = 0.5 - } - set_variable = { - name = book_subject - value = flag:torturer - } - } - 1 = { - trigger = { - is_deviant_trigger = yes - } - modifier = { - add = 30 - OR = { - has_trait = arrogant - has_trait = deviant - } - } - ai_value_modifier = { - ai_boldness = 0.75 - } - set_variable = { - name = book_subject - value = flag:deviant - } - } - 50 = { - trigger = { - has_trait = lunatic - } - ai_value_modifier = { - ai_boldness = 0.75 - } - set_variable = { - name = book_subject - value = flag:lunatic - } - } - 400 = { - trigger = { #Why are you sponsoring a kid to write?? - is_adult = no - } - set_variable = { - name = book_subject - value = flag:childhood - } - set_favorite_toy_effect = yes - } - 50 = { - trigger = { - book_subject_animals_trigger = yes - } - modifier = { #If a kid has a pet they're gonna wanna to write about it - add = 800 - is_adult = no - } - modifier = { - add = 75 - has_trait = lunatic - } - modifier = { - add = 50 - has_trait = intellect_bad - } - set_variable = { - name = book_subject - value = flag:animals - } - } - 50 = { #They don't care and you can decide! - trigger = { - scope:allow_no_subject_option = yes - } - modifier = { - add = 30 - has_personality_submissive_trigger = yes - } - ai_value_modifier = { - ai_boldness = -0.25 - ai_energy = -0.25 - } - } - } - - # FALLBACK: The previous list can return nothing if you're bad at all skills and have nothing special going on - if = { - limit = { - NOT = { exists = var:book_subject } - scope:allow_no_subject_option = no - } - random_list = { - 1 = { - modifier = { - add = 60 - has_education_martial_trigger = yes - } - modifier = { - add = 40 - OR = { - prowess >= high_skill_rating - has_trait = faith_warrior - has_trait = crusader_king - has_trait = viking - number_of_commander_traits >= 1 - } - } - modifier = { - add = { - value = martial - multiply = 2 - } - } - set_variable = { - name = book_subject - value = flag:martial - } - } - 1 = { - modifier = { - add = 60 - has_education_diplomacy_trigger = yes - } - modifier = { - add = { - value = diplomacy - multiply = 2 - } - } - set_variable = { - name = book_subject - value = flag:diplomacy - } - } - 1 = { - modifier = { - add = 60 - has_education_stewardship_trigger = yes - } - modifier = { - add = { - value = stewardship - multiply = 2 - } - } - set_variable = { - name = book_subject - value = flag:stewardship - } - } - 1 = { - modifier = { - add = 60 - has_education_intrigue_trigger = yes - } - modifier = { - add = { - value = intrigue - multiply = 2 - } - } - set_variable = { - name = book_subject - value = flag:intrigue - } - } - 1 = { - modifier = { - add = 60 - has_education_learning_trigger = yes - } - modifier = { - add = { - value = learning - multiply = 2 - } - } - set_variable = { - name = book_subject - value = flag:learning - } - } - } - } - } - } - } -} - - -# Get variables needed for the book -get_book_variables_effect = { - - scope:owner = { - # If we have a subject we save it as a variable on the owner so that we can access it when setting the subject-feature - if = { - limit = { - NOT = { scope:subject_is_set = flag:no } - } - set_variable = { - name = book_artifact_subject - value = scope:subject_is_set - days = 1 - } - } - else_if = { - limit = { - exists = scope:author - exists = scope:author.var:book_subject - } - set_variable = { - name = book_artifact_subject - value = scope:author.var:book_subject - days = 1 - } - } - - #If we have a topic we save it as a variable on the owner so that we can access it when setting the topic-feature - if = { - limit = { - NOT = { scope:topic_is_set = flag:no } - } - set_variable = { - name = book_artifact_topic - value = scope:topic_is_set - days = 1 - } - } - else_if = { - limit = { - exists = scope:author - exists = scope:author.var:book_topic - } - set_variable = { - name = book_artifact_topic - value = scope:author.var:book_topic - days = 1 - } - } - # If subject or topic is "no" we do nothing and let the feature system handle it - - # To save the topic category if it has been set in events - if = { - limit = { - exists = scope:author - exists = scope:author.var:book_topic_category - } - set_variable = { - name = book_topic_category - value = scope:author.var:book_topic_category - days = 1 - } - } - - # Save toy for childhood book loc (if it's a kid writing it will be the author who is a kid) - if = { - limit = { - exists = var:book_artifact_subject - var:book_artifact_subject = flag:childhood - } - if = { - limit = { - NOT = { exists = scope:author.var:child_toy_variable } - } - scope:author = { set_favorite_toy_effect = yes } - } - } - if = { #Is the book about a mystical animal you hunted? Then we need to save the animal as a variable so we can use the custom loc key in the loc - limit = { - exists = var:book_artifact_subject - var:book_artifact_subject = flag:mystical_animal - } - set_variable = { - name = animal_type - value = scope:owner.var:hunted_mystical_animal - days = 1 - } - } - # Witch - if = { - limit = { - exists = var:book_artifact_subject - var:book_artifact_subject = flag:witch - exists = scope:author.var:book_subject_witch_scope - } - set_variable = { - name = book_subject_witch_scope - value = scope:author.var:book_subject_witch_scope - days = 1 - } - } - # Soulmate - if = { - limit = { - exists = var:book_artifact_topic - var:book_artifact_topic = flag:soulmate #Check for relationship variable - } - if = { - limit = { - exists = scope:author - exists = scope:author.var:book_topic_relationship - } - set_variable = { - name = book_topic_relationship - value = scope:author.var:book_topic_relationship - days = 1 - } - } - else_if = { - limit = { - exists = var:book_topic_relationship - } - var:book_topic_relationship = { - save_scope_as = soulmate # We still save the scope here for use in events - } - } - } - # Relationship - if = { - limit = { - exists = var:book_artifact_topic - var:book_artifact_topic = flag:nemesis #Check for relationship variable - } - if = { - limit = { - exists = scope:author - exists = scope:author.var:book_topic_relationship - } - set_variable = { - name = book_topic_relationship - value = scope:author.var:book_topic_relationship - days = 1 - } - scope:author.var:book_topic_relationship = { - save_scope_as = nemesis # We still save the scope here for use in events - } - } - else_if = { - limit = { - exists = var:book_topic_relationship - } - set_variable = { - name = book_topic_relationship - value = scope:owner.var:book_topic_relationship - days = 1 - } - var:book_topic_relationship = { - save_scope_as = nemesis # We still save the scope here for use in events - } - } - } - # Unification - if = { - limit = { - exists = var:book_artifact_topic - var:book_artifact_topic = flag:unification - } - #Check for title variable - if = { - limit = { - exists = scope:author - exists = scope:author.var:book_topic_united_title - } - set_variable = { - name = relevant_title - value = scope:author.var:book_topic_united_title - days = 1 - } - } - else_if = { - limit = { - exists = var:book_topic_united_title - } - set_variable = { - name = relevant_title - value = scope:owner.var:book_topic_united_title - days = 1 - } - var:book_topic_united_title = { - save_scope_as = relevant_title - } - } - } - # Creation - if = { - limit = { - exists = var:book_artifact_topic - var:book_artifact_topic = flag:creation - } - #Check for title variable - if = { - limit = { - exists = scope:author - exists = scope:author.var:book_topic_created_title - } - set_variable = { - name = relevant_title - value = scope:author.var:book_topic_created_title - days = 1 - } - scope:author.var:book_topic_created_title = { - save_scope_as = relevant_title - } - } - else_if = { - limit = { - exists = var:book_topic_created_title - } - set_variable = { - name = relevant_title - value = scope:owner.var:book_topic_created_title - days = 1 - } - var:book_topic_created_title = { - save_scope_as = relevant_title - } - } - } - # Restoration - if = { - limit = { - exists = var:book_artifact_topic - var:book_artifact_topic = flag:restoration - } - #Check for title variable - if = { - limit = { - exists = scope:author - exists = scope:author.var:book_topic_restored_title - } - set_variable = { - name = relevant_title - value = scope:author.var:book_topic_restored_title - days = 1 - } - scope:author.var:book_topic_restored_title = { - save_scope_as = relevant_title - } - } - else_if = { - limit = { - exists = var:book_topic_restored_title - } - set_variable = { - name = relevant_title - value = scope:owner.var:book_topic_restored_title - days = 1 - } - var:book_topic_restored_title = { - save_scope_as = relevant_title - } - } - } - } -} - -# Here we save the content quality of the book; how well does the author understand/know the subject? This is separate from the artifact quality value since that's about the quality of the artifact itself, not the content of the text -get_book_content_quality_effect = { - $SKILL_BASE$ = { save_scope_as = skill_base } - save_scope_value_as = { - name = book_content_quality - value = { - # Choices in events etc. will affect the quality of the artifact you get - if = { - limit = { - exists = scope:skill_base.var:book_content_quality - } - add = { - value = scope:skill_base.var:book_content_quality - multiply = 10 - } - } - # Is it a lifestyle subject? Then it's good if the inspiration owner shares the lifestyle - if = { # medicine - limit = { - has_artifact_feature = book_subject_medicine - } - if = { - limit = { - scope:skill_base = { - has_trait = lifestyle_physician - } - } - add = 30 - } - if = { - limit = { - scope:skill_base = { - has_trait = lifestyle_mystic - } - } - add = 20 - } - if = { - limit = { - scope:skill_base = { - has_trait = lifestyle_herbalist - } - } - add = 20 - } - if = { - limit = { - scope:skill_base = { - is_witch_trigger = yes - } - } - add = 10 - } - } - if = { # reveler - limit = { - has_artifact_feature = book_subject_reveler - scope:skill_base = { - has_trait = lifestyle_reveler - } - } - add = 30 - } - if = { # blademaster - limit = { - has_artifact_feature = book_subject_blademaster - scope:skill_base = { - has_trait = lifestyle_blademaster - } - } - add = 30 - } - if = { # hunter - limit = { - has_artifact_feature = book_subject_hunter - scope:skill_base = { - has_trait = lifestyle_hunter - } - } - add = 30 - } - if = { # mystic - limit = { - has_artifact_feature = book_subject_mystic - scope:skill_base = { - has_trait = lifestyle_mystic - } - } - add = 30 - } - if = { # herbalist - limit = { - has_artifact_feature = book_subject_herbalist - scope:skill_base = { - has_trait = lifestyle_herbalist - } - } - add = 30 - } - if = { # cannibal - limit = { - has_artifact_feature = book_subject_cannibal - scope:skill_base = { - is_cannibal_trigger = yes - } - } - add = 30 - } - if = { # witch - limit = { - has_artifact_feature = book_subject_witch - scope:skill_base = { - is_witch_trigger = yes - } - } - add = 30 - } - if = { # deviant - limit = { - has_artifact_feature = book_subject_deviant - scope:skill_base = { - is_deviant_trigger = yes - } - } - add = 30 - } - if = { # lunatic - limit = { - has_artifact_feature = book_subject_lunatic - scope:skill_base = { - has_trait = lunatic - } - } - add = 30 - } - if = { # relationship - score based on the authors opinion of the subject - limit = { - has_artifact_feature = book_subject_relationship - scope:skill_base = { - save_temporary_opinion_value_as = { - name = opinion_of_subject - target = scope:owner.var:book_topic_relationship - } - } - } - add = { - value = scope:opinion_of_subject - min = 0 - max = 75 - } - } - if = { # relationship - boost if you're socially savvy - limit = { - has_artifact_feature = book_subject_relationship - scope:skill_base = { has_trait = gregarious } - } - add = 10 - } - # If it's about your actions related to unification/creation/restoration of a title then it's just naturally easier to make you look good - if = { - limit = { - OR = { - has_artifact_feature = book_subject_kingdom - has_artifact_feature = book_subject_empire - } - } - add = 50 - } - # The owner and inspiration owner's skills in the relevant subject, and education trait, affects the outcome - if = { - limit = { - has_artifact_feature = book_subject_martial - } - add = { #If they're good you get +, if they're shit you get - - value = average_skill_rating - subtract = scope:skill_base.martial - multiply = -6 - } - add = scope:owner.martial - scope:skill_base = { - if = { - limit = { - has_trait = education_martial_1 - } - add = 20 - } - else_if = { - limit = { - has_trait = education_martial_2 - } - add = 40 - } - else_if = { - limit = { - has_trait = education_martial_3 - } - add = 60 - } - } - } - else_if = { - limit = { - has_artifact_feature = book_subject_diplomacy - } - add = { #If they're good you get +, if they're shit you get - - value = average_skill_rating - subtract = scope:skill_base.diplomacy - multiply = -6 - } - add = scope:owner.diplomacy - scope:skill_base = { - if = { - limit = { - has_trait = education_diplomacy_1 - } - add = 20 - } - else_if = { - limit = { - has_trait = education_diplomacy_2 - } - add = 40 - } - else_if = { - limit = { - has_trait = education_diplomacy_3 - } - add = 60 - } - } - } - else_if = { - limit = { - has_artifact_feature = book_subject_stewardship - } - add = { #If they're good you get +, if they're shit you get - - value = average_skill_rating - subtract = scope:skill_base.stewardship - multiply = -6 - } - add = scope:owner.stewardship - scope:skill_base = { - if = { - limit = { - has_trait = education_stewardship_1 - } - add = 20 - } - else_if = { - limit = { - has_trait = education_stewardship_2 - } - add = 40 - } - else_if = { - limit = { - has_trait = education_stewardship_3 - } - add = 60 - } - } - } - else_if = { - limit = { - OR = { - has_artifact_feature = book_subject_intrigue - has_artifact_feature = book_subject_torturer - } - } - add = { #If they're good you get +, if they're shit you get - - value = average_skill_rating - subtract = scope:skill_base.intrigue - multiply = -6 - } - add = scope:owner.intrigue - scope:skill_base = { - if = { - limit = { - has_trait = education_intrigue_1 - } - add = 20 - } - else_if = { - limit = { - has_trait = education_intrigue_2 - } - add = 40 - } - else_if = { - limit = { - has_trait = education_intrigue_3 - } - add = 60 - } - } - } - else_if = { - limit = { - has_artifact_feature = book_subject_learning - } - add = { #If they're good you get +, if they're shit you get - - value = average_skill_rating - subtract = scope:skill_base.learning - multiply = -6 - } - add = scope:owner.learning - scope:skill_base = { - if = { - limit = { - has_trait = education_learning_1 - } - add = 20 - } - else_if = { - limit = { - has_trait = education_learning_2 - } - add = 40 - } - else_if = { - limit = { - has_trait = education_learning_3 - } - add = 60 - } - } - } - # The overall quality has an impact as well - add = { - value = scope:quality - multiply = 0.25 - } - } - } -} - -# CREATE A BOOK - -# -OWNER is always needed -# -CREATOR needs a scope, if you want no author specified you can use "random_dummy_gender_effect = yes" before the book effect and then scope:dummy_gender for author -# -SET_SUBJECT has to be a flag, and has to be one of the subjects defined as a "book_subject" feature. If you want no subject specified (it will then be set in the effect itself) use "flag:no" -# -SET_TOPIC has to be a flag, and has to be one of the topics defined as a "book_topic" feature. If you want no topic specified (it will then be set in the effect itself) use "flag:no". You have to also set the subject if you set the topic! - -# Example: -#random_dummy_gender_effect = yes -#create_artifact_book_effect = { -# OWNER = root -# CREATOR = scope:dummy_gender -# SET_SUBJECT = flag:intrigue -# SET_TOPIC = flag:no -#} -# This will give you a book with no known author about intrigue with a random topic. - -create_artifact_book_effect = { - $OWNER$ = { save_scope_as = owner } #Will always exist! - $CREATOR$ = { #Doesn't always exist - save_scope_as = author - } - save_temporary_scope_value_as = { - name = subject_is_set - value = $SET_SUBJECT$ - } - save_temporary_scope_value_as = { - name = topic_is_set - value = $SET_TOPIC$ - } - if = { - limit = { - exists = scope:dummy_gender - scope:author = scope:dummy_gender - } - clear_saved_scope = author - clear_saved_scope = dummy_gender - } - else = { #If we have an author we save them as a variable on the owner so that we can access them later on when setting the subject etc. - scope:owner = { - set_variable = { - name = book_artifact_author - value = scope:author - days = 1 - } - } - } - hidden_effect_new_object = { - # Get artifact quality and wealth - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - - - # To save the subject, topic, and other variables we'll need if it has been set in events or in the effect - get_book_variables_effect = yes - - if = { #Should this be a court artifact? - limit = { - has_royal_court = yes - has_dlc_feature = court_artifacts - NOT = { exists = scope:should_be_trinket } - } - if = { #Do we have an author? - limit = { - exists = scope:author - } - if = { #Is this author using Palm Leaf (indian) books? - limit = { - scope:author = { artifacts_use_indian_books_trigger = yes } - } - scope:owner = { - create_artifact = { - name = placeholder # Will be regenerated in the post-creation effects - creator = scope:author - description = placeholder # Will be regenerated in the post-creation effects - visuals = indian_book - type = book - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - #decaying = no - } - } - } - else = { #Codices/Non-Indian books - scope:owner = { - create_artifact = { - name = placeholder # Will be regenerated in the post-creation effects - creator = scope:author - description = placeholder # Will be regenerated in the post-creation effects - visuals = book - type = book - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - #decaying = no - } - } - } - } - else = { #We don't have an author - if = { - limit = { #Is this a palm leaf/indian book? - scope:owner = { artifacts_use_indian_books_trigger = yes } - } - scope:owner = { - create_artifact = { - name = placeholder # Will be regenerated in the post-creation effects - description = placeholder # Will be regenerated in the post-creation effects - visuals = indian_book - type = book - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - #decaying = no - } - } - } - else = { #This is a codex/non-indian book: - scope:owner = { - create_artifact = { - name = placeholder # Will be regenerated in the post-creation effects - description = placeholder # Will be regenerated in the post-creation effects - visuals = book - type = book - history = { type = created_before_history } # We don't know who wrote it - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - #decaying = no - } - } - } - } - } - else = { #This is a court artifact - if = { - limit = { - exists = scope:author #We have an author - } - if = { - limit = { - scope:author = { artifacts_use_indian_books_trigger = yes } - } - scope:owner = { - create_artifact = { - name = placeholder # Will be regenerated in the post-creation effects - creator = scope:author - description = placeholder # Will be regenerated in the post-creation effects - visuals = indian_book - type = journal - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - } - } - # Subject and cover material is set as a required feature for a book-type artifact, but for a miscellaneous-type it's an optional feature, so we need to set it here - scope:newly_created_artifact = { - set_artifact_feature_group = book_subject - set_artifact_feature_group = book_cover_material - } - } - else = { #This is a codex/non-indian book - scope:owner = { - create_artifact = { - name = placeholder # Will be regenerated in the post-creation effects - creator = scope:author - description = placeholder # Will be regenerated in the post-creation effects - visuals = book - type = journal - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - - } - } - # Subject and cover material is set as a required feature for a book-type artifact, but for a miscellaneous-type it's an optional feature, so we need to set it here - scope:newly_created_artifact = { - set_artifact_feature_group = book_subject - set_artifact_feature_group = book_cover_material - } - } - } - else = { #We don't have an author - if = { - limit = { #Is this a palm-leaf/indian book? - scope:owner = { artifacts_use_indian_books_trigger = yes } - } - scope:owner = { - create_artifact = { - name = placeholder # Will be regenerated in the post-creation effects - description = placeholder # Will be regenerated in the post-creation effects - visuals = indian_book - type = journal - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - } - } - # Subject and cover material is set as a required feature for a book-type artifact, but for a miscellaneous-type it's an optional feature, so we need to set it here - scope:newly_created_artifact = { - set_artifact_feature_group = book_subject - set_artifact_feature_group = book_cover_material - } - } - else = { #This isn't a palm leaf/indian book - scope:owner = { - create_artifact = { - name = placeholder # Will be regenerated in the post-creation effects - description = placeholder # Will be regenerated in the post-creation effects - visuals = book - type = journal - history = { type = created_before_history } # We don't know who wrote it - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - } - } - # Subject and cover material is set as a required feature for a book-type artifact, but for a miscellaneous-type it's an optional feature, so we need to set it here - scope:newly_created_artifact = { - set_artifact_feature_group = book_subject - set_artifact_feature_group = book_cover_material - } - } - } - } - - scope:newly_created_artifact = { - set_artifact_feature_group = book_topic - set_artifact_feature_group = book_title - set_artifact_feature_group = book_decoration - set_artifact_feature_group = decoration_pattern - get_artifact_feature_references_effect = yes - # Get quality of written content - if = { - limit = { - NOT = { exists = scope:author } - } - get_book_content_quality_effect = { SKILL_BASE = scope:owner } - } - else = { - get_book_content_quality_effect = { SKILL_BASE = scope:author } - } - # We save these values as variables on the owner so that we can access them deep in scopes in the desc-loc later on - scope:owner = { - set_variable = { - name = quality - value = scope:quality - } - set_variable = { - name = wealth - value = scope:wealth - } - set_variable = { - name = book_content_quality - value = scope:book_content_quality - } - } - # Generate the updated - final description for the book - set_artifact_description = artifact_book_description - # Generate the updated title - final title for the book - set_artifact_name = artifact_book_title - # Is the subject a lifestyle? - if = { - limit = { - has_artifact_feature = book_topic_stewardship_old_ledger - } - #add_artifact_modifier = artifact_monthly_stewardship_lifestyle_xp_1_modifier - remove_artifact_modifier = artifact_placeholder_modifier - flag_as_trash_artifact = yes - } - else_if = { - limit = { has_artifact_feature = book_subject_martial } - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_monthly_martial_lifestyle_xp_4_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_monthly_martial_lifestyle_xp_3_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_monthly_martial_lifestyle_xp_2_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_monthly_martial_lifestyle_xp_1_modifier - } - } - else_if = { - limit = { has_artifact_feature = book_subject_diplomacy } - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_monthly_diplomacy_lifestyle_xp_4_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_monthly_diplomacy_lifestyle_xp_3_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_monthly_diplomacy_lifestyle_xp_2_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_monthly_diplomacy_lifestyle_xp_1_modifier - } - } - else_if = { - limit = { has_artifact_feature = book_subject_stewardship } - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_monthly_stewardship_lifestyle_xp_4_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_monthly_stewardship_lifestyle_xp_3_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_monthly_stewardship_lifestyle_xp_2_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_monthly_stewardship_lifestyle_xp_1_modifier - } - } - else_if = { - limit = { has_artifact_feature = book_subject_learning } - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_monthly_learning_lifestyle_xp_4_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_monthly_learning_lifestyle_xp_3_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_monthly_learning_lifestyle_xp_2_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_monthly_learning_lifestyle_xp_1_modifier - } - } - else_if = { - limit = { - OR = { - has_artifact_feature = book_subject_intrigue - has_artifact_feature = book_subject_torturer - } - } - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_monthly_intrigue_lifestyle_xp_4_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_monthly_intrigue_lifestyle_xp_3_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_monthly_intrigue_lifestyle_xp_2_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_monthly_intrigue_lifestyle_xp_1_modifier - } - } - else_if = { - limit = { has_artifact_feature = book_subject_empire } - add_scaled_artifact_modifier_dynasty_prestige_effect = yes - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_short_reign_duration_mult_7_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_short_reign_duration_mult_5_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_short_reign_duration_mult_3_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_short_reign_duration_mult_1_modifier - } - add_artifact_modifier = artifact_dynasty_opinion_2_modifier - add_artifact_modifier = artifact_court_grandeur_baseline_add_1_modifier - } - else_if = { - limit = { has_artifact_feature = book_subject_kingdom } - add_scaled_artifact_modifier_dynasty_prestige_effect = yes - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_short_reign_duration_mult_7_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_short_reign_duration_mult_5_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_short_reign_duration_mult_3_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_short_reign_duration_mult_1_modifier - } - add_artifact_modifier = artifact_dynasty_opinion_2_modifier - add_artifact_modifier = artifact_court_grandeur_baseline_add_1_modifier - } - else_if = { - limit = { - OR = { - has_artifact_feature = book_subject_medicine - has_artifact_feature = book_subject_herbalist - } - } - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_health_gain_4_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_health_gain_3_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_health_gain_2_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_health_gain_1_modifier - } - } - else_if = { - limit = { has_artifact_feature = book_subject_reveler } - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_courtly_vassal_opinion_4_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_courtly_vassal_opinion_3_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_courtly_vassal_opinion_2_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_courtly_vassal_opinion_2_modifier - } - } - else_if = { - limit = { has_artifact_feature = book_subject_blademaster } - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_prowess_5_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_prowess_4_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_prowess_3_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_prowess_2_modifier - } - } - else_if = { - limit = { has_artifact_feature = book_subject_hunter } - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_prowess_4_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_prowess_3_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_prowess_2_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_prowess_1_modifier - } - add_artifact_modifier = artifact_stress_gain_1_modifier - } - else_if = { - limit = { has_artifact_feature = book_subject_mystic } - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_monthly_learning_lifestyle_xp_4_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_monthly_learning_lifestyle_xp_3_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_monthly_learning_lifestyle_xp_2_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_monthly_learning_lifestyle_xp_1_modifier - } - if = { - limit = { - NOT = { scope:owner.faith = { has_doctrine_parameter = witchcraft_accepted } } - } - add_artifact_modifier = artifact_clergy_opinion_penalty_2_modifier - } - } - else_if = { - limit = { has_artifact_feature = book_subject_lunatic } - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_stress_gain_4_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_stress_gain_3_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_stress_gain_2_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_stress_gain_1_modifier - } - } - else_if = { - limit = { has_artifact_feature = book_subject_relationship } - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_personal_scheme_phase_duration_add_10_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_personal_scheme_phase_duration_add_7_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_personal_scheme_phase_duration_add_5_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_personal_scheme_phase_duration_add_2_modifier - } - } - else_if = { - limit = { #Only for the controversial subjects if they're accepted - OR = { - AND = { - has_artifact_feature = book_subject_cannibal - NOT = { - trait_is_criminal_in_faith_trigger = { TRAIT = cannibal FAITH = scope:owner.faith GENDER_CHARACTER = scope:owner } - } - } - AND = { - has_artifact_feature = book_subject_witch - NOT = { - trait_is_criminal_in_faith_trigger = { TRAIT = witch FAITH = scope:owner.faith GENDER_CHARACTER = scope:owner } - } - } - AND = { - has_artifact_feature = book_subject_deviant - NOT = { - trait_is_criminal_in_faith_trigger = { TRAIT = deviant FAITH = scope:owner.faith GENDER_CHARACTER = scope:owner } - } - } - - } - } - add_scaled_artifact_modifier_prestige_effect = yes - } - if = { - limit = { - OR = { - has_artifact_feature = book_subject_family_epic - has_artifact_feature = book_subject_family_epic_great - } - } - remove_artifact_modifier = artifact_placeholder_modifier - add_artifact_modifier = artifact_monthly_prestige_add_2_modifier - if = { - limit = { - artifact_type = book - } - add_artifact_modifier = artifact_court_grandeur_baseline_add_1_modifier - } - else = { - add_artifact_modifier = artifact_monthly_prestige_2_modifier - } - if = { # Vassal Opinion - limit = { - scope:story = { has_variable = opinion_artifact } - } - if = { - limit = { rarity = illustrious } - add_artifact_modifier = artifact_parochial_vassal_opinion_3_modifier - add_artifact_modifier = artifact_courtly_vassal_opinion_4_modifier - } - else_if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_parochial_vassal_opinion_3_modifier - add_artifact_modifier = artifact_courtly_vassal_opinion_3_modifier - add_artifact_modifier = artifact_parochial_vassal_opinion_3_modifier - } - else_if = { - limit = { rarity = masterwork } - add_artifact_modifier = artifact_courtly_vassal_opinion_3_modifier - add_artifact_modifier = artifact_parochial_vassal_opinion_3_modifier - } - else_if = { - limit = { rarity = common } - add_artifact_modifier = artifact_courtly_vassal_opinion_1_modifier - add_artifact_modifier = artifact_parochial_vassal_opinion_1_modifier - add_artifact_modifier = artifact_courtly_vassal_opinion_1_modifier - add_artifact_modifier = artifact_parochial_vassal_opinion_1_modifier - } - } - if = { # Scheme Resistance - limit = { - scope:story = { has_variable = scheme_artifact } - } - if = { # 8 - limit = { rarity = illustrious } - add_artifact_modifier = artifact_scheme_resistance_add_2_modifier - add_artifact_modifier = artifact_scheme_resistance_add_2_modifier - add_artifact_modifier = artifact_scheme_resistance_add_2_modifier - add_artifact_modifier = artifact_scheme_resistance_add_2_modifier - } - else_if = { # 6 - limit = { rarity = famed } - add_artifact_modifier = artifact_scheme_resistance_add_2_modifier - add_artifact_modifier = artifact_scheme_resistance_add_2_modifier - add_artifact_modifier = artifact_scheme_resistance_add_2_modifier - } - else_if = { # 4 - limit = { rarity = masterwork } - add_artifact_modifier = artifact_scheme_resistance_add_2_modifier - add_artifact_modifier = artifact_scheme_resistance_add_2_modifier - } - else_if = { # 2 - limit = { rarity = common } - add_artifact_modifier = artifact_scheme_resistance_add_2_modifier - } - } - if = { # Controlled Province Advantage - limit = { - scope:story = { has_variable = advantage_artifact } - } - if = { # 10 - limit = { rarity = illustrious } - add_artifact_modifier = artifact_controlled_province_advantage_8_modifier - add_artifact_modifier = artifact_controlled_province_advantage_2_modifier - } - else_if = { # 8 - limit = { rarity = famed } - add_artifact_modifier = artifact_controlled_province_advantage_8_modifier - } - else_if = { # 6 - limit = { rarity = masterwork } - add_artifact_modifier = artifact_controlled_province_advantage_6_modifier - } - else_if = { # 4 - limit = { rarity = common } - add_artifact_modifier = artifact_controlled_province_advantage_4_modifier - } - } - if = { # Personal Scheme Success Chance - limit = { - scope:story = { has_variable = sway_artifact } - } - if = { # 10 - limit = { rarity = illustrious } - add_artifact_modifier = artifact_owned_personal_scheme_success_chance_add_12_modifier # 20 - add_artifact_modifier = artifact_owned_personal_scheme_success_chance_add_8_modifier - } - else_if = { - limit = { rarity = famed } - add_artifact_modifier = artifact_owned_personal_scheme_success_chance_add_8_modifier # 16 - add_artifact_modifier = artifact_owned_personal_scheme_success_chance_add_8_modifier - } - else_if = { - limit = { rarity = masterwork } - add_artifact_modifier = artifact_owned_personal_scheme_success_chance_add_12_modifier # 12 - } - else_if = { - limit = { rarity = common } - add_artifact_modifier = artifact_owned_personal_scheme_success_chance_add_8_modifier # 8 - } - } - if = { # Monthly Piety + Same Faith Domain Tax - limit = { - scope:story = { has_variable = piety_artifact } - } - if = { # 0.4 + 1 - limit = { rarity = illustrious } - add_artifact_modifier = artifact_monthly_piety_4_modifier # 0.4 - add_artifact_modifier = artifact_domain_tax_same_faith_mult_4_modifier # 1 - add_artifact_modifier = artifact_domain_tax_same_faith_mult_4_modifier - add_artifact_modifier = artifact_domain_tax_same_faith_mult_2_modifier - } - else_if = { # 0.3 + 0.8 - limit = { rarity = famed } - add_artifact_modifier = artifact_monthly_piety_3_modifier - add_artifact_modifier = artifact_domain_tax_same_faith_mult_4_modifier - add_artifact_modifier = artifact_domain_tax_same_faith_mult_4_modifier - } - else_if = { # 0.2 + 0.6 - limit = { rarity = masterwork } - add_artifact_modifier = artifact_monthly_piety_2_modifier - add_artifact_modifier = artifact_domain_tax_same_faith_mult_4_modifier - add_artifact_modifier = artifact_domain_tax_same_faith_mult_2_modifier - } - else_if = { # 0.1 + 0.4 - limit = { rarity = common } - add_artifact_modifier = artifact_monthly_piety_1_modifier - add_artifact_modifier = artifact_domain_tax_same_faith_mult_4_modifier - } - } - if = { - limit = { has_artifact_feature = book_subject_family_epic_great } - add_artifact_modifier = artifact_monthly_prestige_add_2_modifier #This is renown, can be combined with the renown option during making and adds up with the base renown added to all chronicles - } - #Small boost from perspectives: - - } - # Modifiers applied based on topic - if = { - limit = { - has_artifact_feature = book_topic_stewardship_old_ledger - } - add_artifact_modifier = artifact_monthly_stewardship_lifestyle_xp_1_modifier - remove_artifact_modifier = artifact_placeholder_modifier - } - if = { - limit = { - trigger_if = { - limit = { - exists = scope:topic - } - OR = { - scope:topic = flag:curse_sorcery - scope:topic = flag:poisons - } - } - trigger_else = { - OR = { - has_artifact_feature = book_topic_witch_curse_sorcery - has_artifact_feature = book_topic_intrigue_poisons - } - } - } - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_monthly_intrigue_lifestyle_xp_4_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_monthly_intrigue_lifestyle_xp_3_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_monthly_intrigue_lifestyle_xp_2_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_monthly_intrigue_lifestyle_xp_1_modifier - } - add_artifact_modifier = artifact_owned_hostile_scheme_success_chance_add_2_modifier - add_artifact_modifier = artifact_dread_gain_mult_1_modifier - } - else_if = { - limit = { - trigger_if = { - limit = { - exists = scope:topic - } - OR = { - scope:topic = flag:love_sorcery - scope:topic = flag:seduction - } - } - trigger_else = { - OR = { - has_artifact_feature = book_topic_witch_love_sorcery - has_artifact_feature = book_topic_intrigue_seduction - } - } - } - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_monthly_intrigue_lifestyle_xp_4_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_monthly_intrigue_lifestyle_xp_3_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_monthly_intrigue_lifestyle_xp_2_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_monthly_intrigue_lifestyle_xp_1_modifier - } - add_artifact_modifier = artifact_scheme_resistance_add_2_modifier - } - else_if = { - limit = { - trigger_if = { - limit = { - exists = scope:topic - } - scope:topic = flag:fertility - } - trigger_else = { - OR = { - has_artifact_feature = book_topic_intrigue_fertility - has_artifact_feature = book_topic_intrigue_the_art_of_love - } - } - } - - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_fertility_gain_4_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_fertility_gain_3_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_fertility_gain_2_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_fertility_gain_1_modifier - } - - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_monthly_intrigue_lifestyle_xp_4_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_monthly_intrigue_lifestyle_xp_3_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_monthly_intrigue_lifestyle_xp_2_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_monthly_intrigue_lifestyle_xp_1_modifier - } - } - - else_if = { - limit = { - trigger_if = { - limit = { - exists = scope:topic - } - scope:topic = flag:punishment - } - trigger_else = { - OR = { - has_artifact_feature = book_topic_intrigue_punishment - has_artifact_feature = book_topic_intrigue_punishment_not_torturer - } - } - } - add_artifact_modifier = artifact_monthly_intrigue_lifestyle_xp_2_modifier - add_artifact_modifier = artifact_stress_gain_2_modifier - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_dread_baseline_add_4_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_dread_baseline_add_3_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_dread_baseline_add_2_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_dread_baseline_add_1_modifier - } - } - else_if = { - limit = { - trigger_if = { - limit = { - exists = scope:topic - } - OR = { - scope:topic = flag:digest - scope:topic = flag:admin - } - } - trigger_else = { - OR = { - has_artifact_feature = book_topic_stewardship_digest - has_artifact_feature = book_topic_stewardship_admin - } - } - } - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_monthly_stewardship_lifestyle_xp_4_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_monthly_stewardship_lifestyle_xp_3_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_monthly_stewardship_lifestyle_xp_2_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_monthly_stewardship_lifestyle_xp_1_modifier - } - } - else_if = { - limit = { - trigger_if = { - limit = { - exists = scope:topic - } - scope:topic = flag:architect - } - trigger_else = { - has_artifact_feature = book_topic_stewardship_architect - } - } - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_build_time_4_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_build_time_3_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_build_time_2_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_build_time_1_modifier - } - } - else_if = { - limit = { - trigger_if = { - limit = { - exists = scope:topic - } - OR = { - scope:topic = flag:edda - scope:topic = flag:orkneyinga - } - } - trigger_else = { - OR = { - has_artifact_feature = book_topic_diplomacy_edda - has_artifact_feature = book_topic_diplomacy_orkneyinga - } - } - } - add_artifact_modifier = artifact_monthly_martial_lifestyle_xp_1_modifier - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_raid_speed_8_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_raid_speed_6_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_raid_speed_4_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_raid_speed_2_modifier - } - } - else_if = { - limit = { - trigger_if = { - limit = { - exists = scope:topic - } - scope:topic = flag:poetry - } - trigger_else = { - has_artifact_feature = book_topic_diplomacy_poetry - } - } - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_monthly_diplomacy_lifestyle_xp_4_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_monthly_diplomacy_lifestyle_xp_3_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_monthly_diplomacy_lifestyle_xp_2_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_monthly_diplomacy_lifestyle_xp_1_modifier - } - - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_owned_personal_scheme_success_chance_add_8_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_owned_personal_scheme_success_chance_add_6_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_owned_personal_scheme_success_chance_add_4_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_owned_personal_scheme_success_chance_add_2_modifier - } - } - else_if = { - limit = { - trigger_if = { - limit = { - exists = scope:topic - } - scope:topic = flag:jokes - } - trigger_else = { - has_artifact_feature = book_topic_diplomacy_jokes - } - } - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_monthly_diplomacy_lifestyle_xp_4_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_monthly_diplomacy_lifestyle_xp_3_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_monthly_diplomacy_lifestyle_xp_2_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_monthly_diplomacy_lifestyle_xp_1_modifier - } - - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_courtier_and_guest_opinion_7_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_courtier_and_guest_opinion_5_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_courtier_and_guest_opinion_3_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_courtier_and_guest_opinion_1_modifier - } - add_artifact_modifier = artifact_monthly_tyranny_2_modifier - } - else_if = { - limit = { - trigger_if = { - limit = { - exists = scope:topic - } - OR = { - scope:topic = flag:kalila - scope:topic = flag:hitopadesa - scope:topic = flag:speculum - } - } - trigger_else = { - OR = { - has_artifact_feature = book_topic_diplomacy_kalila - has_artifact_feature = book_topic_diplomacy_hitopadesa - has_artifact_feature = book_topic_stewardship_speculum - } - } - } - add_artifact_modifier = artifact_monthly_stewardship_lifestyle_xp_1_modifier - add_artifact_modifier = artifact_monthly_diplomacy_lifestyle_xp_1_modifier - } - else_if = { - limit = { - trigger_if = { - limit = { - exists = scope:topic - } - scope:topic = flag:cicero - } - trigger_else = { - has_artifact_feature = book_topic_diplomacy_cicero - } - } - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_monthly_diplomacy_lifestyle_xp_4_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_monthly_diplomacy_lifestyle_xp_3_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_monthly_diplomacy_lifestyle_xp_2_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_monthly_diplomacy_lifestyle_xp_1_modifier - } - add_artifact_modifier = artifact_diplomacy_1_modifier - } - else_if = { - limit = { - trigger_if = { - limit = { - exists = scope:topic - } - scope:topic = flag:dynasty - } - trigger_else = { - OR = { - has_artifact_feature = book_topic_diplomacy_dynasty - has_artifact_feature = book_topic_diplomacy_dynasty_big - } - } - } - add_artifact_modifier = artifact_monthly_diplomacy_lifestyle_xp_1_modifier - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_dynasty_opinion_7_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_dynasty_opinion_5_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_dynasty_opinion_3_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_dynasty_opinion_1_modifier - } - - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_monthly_prestige_add_8_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_monthly_prestige_add_6_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_monthly_prestige_add_4_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_monthly_prestige_add_2_modifier - } - } - else_if = { - limit = { - trigger_if = { - limit = { - exists = scope:topic - } - scope:topic = flag:duels - } - trigger_else = { - has_artifact_feature = book_topic_martial_duels - } - } - add_artifact_modifier = artifact_monthly_martial_lifestyle_xp_1_modifier - - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_prowess_8_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_prowess_6_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_prowess_4_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_prowess_2_modifier - } - } - else_if = { - limit = { - trigger_if = { - limit = { - exists = scope:topic - } - scope:topic = flag:chivalry - } - trigger_else = { - has_artifact_feature = book_topic_martial_chivalry - } - } - add_artifact_modifier = artifact_monthly_martial_lifestyle_xp_1_modifier - - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_attraction_opinion_4_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_attraction_opinion_3_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_attraction_opinion_2_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_attraction_opinion_1_modifier - } - } - else_if = { - limit = { - trigger_if = { - limit = { - exists = scope:topic - } - scope:topic = flag:military - } - trigger_else = { - has_artifact_feature = book_topic_martial_military - } - } - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_controlled_province_advantage_7_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_controlled_province_advantage_5_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_controlled_province_advantage_3_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_controlled_province_advantage_1_modifier - } - - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_monthly_martial_lifestyle_xp_4_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_monthly_martial_lifestyle_xp_3_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_monthly_martial_lifestyle_xp_2_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_monthly_martial_lifestyle_xp_1_modifier - } - } - else_if = { - limit = { - trigger_if = { - limit = { - exists = scope:topic - } - OR = { - scope:topic = flag:science - scope:topic = flag:aristotle - } - } - trigger_else = { - OR = { - has_artifact_feature = book_topic_medicine_science - has_artifact_feature = book_topic_medicine_science_big - has_artifact_feature = book_topic_learning_aristotle - has_artifact_feature = book_topic_learning_metaphysical_conundrums - has_artifact_feature = book_topic_learning_tome_collections - } - } - } - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_monthly_learning_lifestyle_xp_4_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_monthly_learning_lifestyle_xp_3_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_monthly_learning_lifestyle_xp_2_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_monthly_learning_lifestyle_xp_1_modifier - } - add_artifact_modifier = artifact_learning_1_modifier - } - else_if = { - limit = { - trigger_if = { - limit = { - exists = scope:topic - } - scope:topic = flag:artifact_book_topic_anatomy - } - trigger_else = { - OR = { - has_artifact_feature = book_topic_learning_anatomy - has_artifact_feature = book_topic_medicine_medicine - has_artifact_feature = book_topic_medicine_herbs - has_artifact_feature = book_topic_medicine_galen - } - } - } - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_health_gain_4_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_health_gain_3_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_health_gain_2_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_health_gain_1_modifier - } - add_artifact_modifier = artifact_learning_1_modifier - } - else_if = { - limit = { - trigger_if = { - limit = { - exists = scope:topic - } - OR = { - scope:topic = flag:religious - scope:topic = flag:prayers - scope:topic = flag:golden_legend - scope:topic = flag:hours - } - } - trigger_else = { - OR = { - has_artifact_feature = book_topic_learning_religious - has_artifact_feature = book_topic_learning_religious_big - has_artifact_feature = book_topic_learning_prayers - has_artifact_feature = book_topic_learning_hours - has_artifact_feature = book_topic_learning_golden_legend - has_artifact_feature = book_topic_learning_theological_treaties - } - } - } - add_scaled_artifact_modifier_devotion_effect = yes - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_monthly_piety_gain_mult_8_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_monthly_piety_gain_mult_6_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_monthly_piety_gain_mult_4_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_monthly_piety_gain_mult_2_modifier - } - } - else_if = { - limit = { - trigger_if = { - limit = { - exists = scope:topic - } - OR = { - scope:topic = flag:iliad - scope:topic = flag:mahabharata - scope:topic = flag:mufaddaliyat - } - } - trigger_else = { - OR = { - has_artifact_feature = book_topic_learning_iliad - has_artifact_feature = book_topic_learning_mahabharata - has_artifact_feature = book_topic_learning_mufaddaliyat - } - } - } - add_artifact_modifier = artifact_monthly_learning_lifestyle_xp_1_modifier - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_monthly_tyranny_7_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_monthly_tyranny_5_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_monthly_tyranny_3_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_monthly_tyranny_1_modifier - } - } - else_if = { - limit = { - trigger_if = { - limit = { - exists = scope:topic - } - scope:topic = flag:soulmate - } - trigger_else = { - has_artifact_feature = book_topic_soulmate - } - } - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_attraction_opinion_4_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_attraction_opinion_3_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_attraction_opinion_2_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_attraction_opinion_1_modifier - } - add_artifact_modifier = artifact_stress_gain_1_modifier - } - else_if = { - limit = { - trigger_if = { - limit = { - exists = scope:topic - } - scope:topic = flag:nemesis - } - trigger_else = { - has_artifact_feature = book_topic_nemesis - } - } - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_dread_gain_mult_4_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_dread_gain_mult_3_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_dread_gain_mult_2_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_dread_gain_mult_1_modifier - } - add_artifact_modifier = artifact_stress_gain_1_modifier - } - else_if = { - limit = { - trigger_if = { - limit = { - exists = scope:topic - } - OR = { - scope:topic = flag:animals_your_cat - scope:topic = flag:animals_your_dog - } - } - trigger_else = { - OR = { - has_artifact_feature = book_topic_animals_your_cat - has_artifact_feature = book_topic_animals_your_cat_no_name - has_artifact_feature = book_topic_animals_your_dog - has_artifact_feature = book_topic_animals_your_dog_no_name - has_artifact_feature = book_topic_animals_animals - } - } - } - add_scaled_artifact_modifier_prestige_effect = yes - add_artifact_modifier = artifact_stress_gain_1_modifier - } - else_if = { - limit = { - trigger_if = { - limit = { - exists = scope:topic - } - scope:topic = flag:childhood - } - trigger_else = { - OR = { - has_artifact_feature = book_topic_childhood_one - has_artifact_feature = book_topic_childhood_two - } - } - } - add_artifact_modifier = artifact_stress_gain_1_modifier - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_courtier_and_guest_opinion_6_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_courtier_and_guest_opinion_5_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_courtier_and_guest_opinion_3_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_courtier_and_guest_opinion_1_modifier - } - } - else_if = { - limit = { - trigger_if = { - limit = { - exists = scope:topic - } - scope:topic = flag:mercury - } - trigger_else = { - has_artifact_feature = book_topic_alchemy_mercury - } - } - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_clergy_opinion_7_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_clergy_opinion_5_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_clergy_opinion_3_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_clergy_opinion_1_modifier - } - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_monthly_learning_lifestyle_xp_4_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_monthly_learning_lifestyle_xp_3_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_monthly_learning_lifestyle_xp_2_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_monthly_learning_lifestyle_xp_1_modifier - } - add_artifact_modifier = artifact_monthly_prestige_2_modifier - } - else_if = { - limit = { - trigger_if = { - limit = { - exists = scope:topic - } - scope:topic = flag:arsenic - } - trigger_else = { - has_artifact_feature = book_topic_alchemy_arsenic - } - } - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_owned_hostile_scheme_success_chance_add_7_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_owned_hostile_scheme_success_chance_add_5_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_owned_hostile_scheme_success_chance_add_3_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_owned_hostile_scheme_success_chance_add_1_modifier - } - - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_dread_gain_mult_4_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_dread_gain_mult_3_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_dread_gain_mult_2_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_dread_gain_mult_1_modifier - } - add_artifact_modifier = artifact_monthly_learning_lifestyle_xp_1_modifier - } - else_if = { - limit = { - trigger_if = { - limit = { - exists = scope:topic - } - scope:topic = flag:gold - } - trigger_else = { - has_artifact_feature = book_topic_alchemy_gold - } - } - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_monthly_income_4_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_monthly_income_3_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_monthly_income_2_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_monthly_income_1_modifier - } - - add_scaled_artifact_modifier_prestige_effect = yes - - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_monthly_stewardship_lifestyle_xp_4_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_monthly_stewardship_lifestyle_xp_3_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_monthly_stewardship_lifestyle_xp_2_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_monthly_stewardship_lifestyle_xp_1_modifier - } - } - else_if = { - limit = { - trigger_if = { - limit = { - exists = scope:topic - } - scope:topic = flag:silver - } - trigger_else = { - has_artifact_feature = book_topic_alchemy_silver - } - } - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_monthly_income_4_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_monthly_income_3_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_monthly_income_2_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_monthly_income_1_modifier - } - - add_scaled_artifact_modifier_prestige_effect = yes - - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_monthly_stewardship_lifestyle_xp_4_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_monthly_stewardship_lifestyle_xp_3_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_monthly_stewardship_lifestyle_xp_2_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_monthly_stewardship_lifestyle_xp_1_modifier - } - } - else_if = { - limit = { - has_artifact_feature = book_subject_alchemy - } - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_monthly_learning_lifestyle_xp_4_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_monthly_learning_lifestyle_xp_3_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_monthly_learning_lifestyle_xp_2_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_monthly_learning_lifestyle_xp_1_modifier - } - add_scaled_artifact_modifier_prestige_effect = yes - add_artifact_modifier = artifact_learning_1_modifier - } - else_if = { - limit = { - has_artifact_feature = book_subject_language_manual - } - add_artifact_modifier = artifact_learn_language_scheme_phase_duration_add_1_modifier - remove_artifact_modifier = artifact_placeholder_modifier - } - else_if = { - limit = { - trigger_if = { - limit = { - exists = scope:topic - } - scope:topic = flag:martial_military_strategies - } - trigger_else = { - has_artifact_feature = book_topic_martial_military_strategies - } - } - - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_hard_casualty_modifier_3_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_hard_casualty_modifier_2_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_hard_casualty_modifier_1_modifier - } - - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_monthly_martial_lifestyle_xp_4_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_monthly_martial_lifestyle_xp_3_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_monthly_martial_lifestyle_xp_2_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_monthly_martial_lifestyle_xp_1_modifier - } - - } - else_if = { - limit = { - trigger_if = { - limit = { - exists = scope:topic - } - scope:topic = flag:martial_troop_compositions - } - trigger_else = { - has_artifact_feature = book_topic_martial_troop_compositions - } - } - - if = { - limit = { - rarity = illustrious - } - random_list = { - 50 = { add_artifact_modifier = artifact_heavy_cavalry_toughness_3_modifier } - 50 = { add_artifact_modifier = artifact_heavy_infantry_toughness_3_modifier } - } - } - else_if = { - limit = { - rarity = famed - } - random_list = { - 50 = { add_artifact_modifier = artifact_heavy_cavalry_toughness_2_modifier } - 50 = { add_artifact_modifier = artifact_heavy_infantry_toughness_2_modifier } - } - } - else_if = { - limit = { - rarity = masterwork - } - random_list = { - 50 = { add_artifact_modifier = artifact_heavy_cavalry_toughness_1_modifier } - 50 = { add_artifact_modifier = artifact_heavy_infantry_toughness_1_modifier } - } - } - - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_monthly_martial_lifestyle_xp_4_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_monthly_martial_lifestyle_xp_3_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_monthly_martial_lifestyle_xp_2_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_monthly_martial_lifestyle_xp_1_modifier - } - } - else_if = { - limit = { - trigger_if = { - limit = { - exists = scope:topic - } - scope:topic = flag:diplomacy_court_alliances - } - trigger_else = { - has_artifact_feature = book_topic_diplomacy_court_alliances - } - } - - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_monthly_diplomacy_lifestyle_xp_4_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_monthly_diplomacy_lifestyle_xp_3_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_monthly_diplomacy_lifestyle_xp_2_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_monthly_diplomacy_lifestyle_xp_1_modifier - } - - add_artifact_modifier = artifact_diplomacy_1_modifier - - } - else_if = { - limit = { - trigger_if = { - limit = { - exists = scope:topic - } - scope:topic = flag:diplomacy_court_politics - } - trigger_else = { - has_artifact_feature = book_topic_diplomacy_court_politics - } - } - - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_monthly_diplomacy_lifestyle_xp_4_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_monthly_diplomacy_lifestyle_xp_3_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_monthly_diplomacy_lifestyle_xp_2_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_monthly_diplomacy_lifestyle_xp_1_modifier - } - - - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_courtier_and_guest_opinion_3_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_courtier_and_guest_opinion_2_modifier - } - else_if = { - limit = { - OR = { - rarity = common - rarity = masterwork - } - } - add_artifact_modifier = artifact_courtier_and_guest_opinion_1_modifier - } - } - else_if = { - limit = { - trigger_if = { - limit = { - exists = scope:topic - } - scope:topic = flag:stewardship_trade_routes - } - trigger_else = { - has_artifact_feature = book_topic_stewardship_trade_routes - } - } - - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_development_growth_3_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_development_growth_2_modifier - } - else_if = { - limit = { - OR = { - rarity = common - rarity = masterwork - } - } - add_artifact_modifier = artifact_development_growth_1_modifier - } - - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_monthly_stewardship_lifestyle_xp_4_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_monthly_stewardship_lifestyle_xp_3_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_monthly_stewardship_lifestyle_xp_2_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_monthly_stewardship_lifestyle_xp_1_modifier - } - } - else_if = { - limit = { - trigger_if = { - limit = { - exists = scope:topic - } - scope:topic = flag:stewardship_best_practices_tax_collectors - } - trigger_else = { - has_artifact_feature = book_topic_stewardship_best_practices_tax_collectors - } - } - - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_domain_tax_mult_3_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_domain_tax_mult_2_modifier - } - } - else_if = { - limit = { - trigger_if = { - limit = { - exists = scope:topic - } - scope:topic = flag:diplomacy_art_of_feasting - } - trigger_else = { - has_artifact_feature = book_topic_diplomacy_art_of_feasting - } - } - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_courtier_and_guest_opinion_7_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_courtier_and_guest_opinion_5_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_courtier_and_guest_opinion_3_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_courtier_and_guest_opinion_1_modifier - } - } - else_if = { - limit = { - trigger_if = { - limit = { - exists = scope:topic - } - scope:topic = flag:stewardship_lawmaking - } - trigger_else = { - has_artifact_feature = book_topic_stewardship_lawmaking - } - } - - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_vassal_limit_4_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_vassal_limit_3_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_vassal_limit_2_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_vassal_limit_1_modifier - } - } - - - # Is the subject something weird? Then you'll get a penalty - if = { - limit = { - has_artifact_feature = book_subject_cannibal - } - if = { #We give a bigger boost here if it's illegal since they get nothing else - limit = { - trait_is_criminal_in_faith_trigger = { TRAIT = cannibal FAITH = root.faith GENDER_CHARACTER = root } - } - add_artifact_modifier = artifact_dread_baseline_add_2_modifier - add_artifact_modifier = artifact_vassal_opinion_penalty_1_modifier - } - else = { - add_artifact_modifier = artifact_dread_baseline_add_1_modifier - } - if = { - limit = { - trigger_if = { - limit = { - exists = scope:topic - } - scope:topic = flag:cannibal_recipes - } - trigger_else = { - has_artifact_feature = book_topic_cannibal_recipes - } - } - add_artifact_modifier = artifact_health_gain_1_modifier - } - else = { - add_artifact_modifier = artifact_stress_gain_1_modifier - } - } - if = { - limit = { - has_artifact_feature = book_subject_witch - } - if = { #We give a bigger boost here if it's illegal since they get nothing else - limit = { - trait_is_criminal_in_faith_trigger = { TRAIT = witch FAITH = root.faith GENDER_CHARACTER = root } - } - add_artifact_modifier = artifact_dread_gain_mult_2_modifier - add_artifact_modifier = artifact_monthly_learning_lifestyle_xp_2_modifier - add_artifact_modifier = artifact_clergy_opinion_penalty_2_modifier - } - else = { - add_artifact_modifier = artifact_monthly_learning_lifestyle_xp_1_modifier - } - } - if = { - limit = { - has_artifact_feature = book_subject_deviant - } - if = { #We give a bigger boost here if it's illegal since they get nothing else - limit = { - trait_is_criminal_in_faith_trigger = { TRAIT = deviant FAITH = root.faith GENDER_CHARACTER = root } - } - add_artifact_modifier = artifact_vassal_opinion_penalty_1_modifier - add_artifact_modifier = artifact_stress_gain_2_modifier - add_artifact_modifier = artifact_seduce_scheme_phase_duration_mult_1_modifier - } - else = { - add_artifact_modifier = artifact_stress_gain_1_modifier - add_artifact_modifier = artifact_seduce_scheme_phase_duration_mult_1_modifier - } - } - set_variable = { - name = quality - value = scope:quality - } - set_variable = { - name = wealth - value = scope:wealth - } - set_variable = { - name = book_content_quality - value = scope:book_content_quality - } - } - } - - #To clean out variables - if = { - limit = { - exists = scope:author - } - scope:author = { - if = { - limit = { - has_variable = book_subject - } - remove_variable = book_subject - } - if = { - limit = { - has_variable = book_topic - } - remove_variable = book_topic - } - if = { - limit = { - has_variable = book_topic_category - } - remove_variable = book_topic_category - } - if = { - limit = { - has_variable = book_content_quality - } - remove_variable = book_content_quality - } - } - } - scope:owner = { - if = { - limit = { has_variable = book_artifact_subject } - remove_variable = book_artifact_subject - } - if = { - limit = { has_variable = book_artifact_topic } - remove_variable = book_artifact_topic - } - if = { - limit = { has_variable = book_topic_category } - remove_variable = book_topic_category - } - if = { - limit = { - has_variable = book_topic_category - } - remove_variable = book_topic_category - } - if = { - limit = { - has_variable = book_content_quality - } - remove_variable = book_content_quality - } - } - - if = { - limit = { - exists = scope:should_be_trinket - } - clear_saved_scope = should_be_trinket - } -} - -create_artifact_pedestal_reliquary_christian_effect = { - $OWNER$ = { save_scope_as = owner } - - random_list = { - 20 = { - save_scope_value_as = { - name = christian_relic_name - value = flag:nail - } - } - 15 = { - save_scope_value_as = { - name = christian_relic_name - value = flag:thorn - } - } - 5 = { - save_scope_value_as = { - name = christian_relic_name - value = flag:sandals - } - } - 5 = { - save_scope_value_as = { - name = christian_relic_name - value = flag:girdle - } - } - 10 = { - save_scope_value_as = { - name = christian_relic_name - value = flag:skull - } - } - 10 = { - save_scope_value_as = { - name = christian_relic_name - value = flag:arm - } - } - 5 = { - save_scope_value_as = { - name = christian_relic_name - value = flag:loincloth - } - } - 20 = { - save_scope_value_as = { - name = christian_relic_name - value = flag:cross - } - } - 5 = { - save_scope_value_as = { - name = christian_relic_name - value = flag:crown - } - } - 5 = { - save_scope_value_as = { - name = christian_relic_name - value = flag:veronica - } - } - } - - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - - scope:owner = { - create_artifact = { - name = artifact_pedestal_reliquary_christian_name - creator = scope:owner - description = artifact_pedestal_reliquary_christian_description - visuals = reliquary - type = pedestal - template = christian_relic_template - modifier = artifact_monthly_piety_3_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - #decaying = no - } - } - - scope:newly_created_artifact = { - add_scaled_artifact_modifier_piety_effect = yes - add_scaled_artifact_modifier_devotion_effect = yes - add_scaled_artifact_modifier_grandeur_small_effect = yes - set_variable = { - name = relic - value = flag:christian - } - } -} - -create_artifact_pedestal_reliquary_islam_effect = { - $OWNER$ = { save_scope_as = owner } - - random_list = { - 20 = { - save_scope_value_as = { - name = islam_relic_name - value = flag:hair - } - } - 5 = { - save_scope_value_as = { - name = islam_relic_name - value = flag:cloak - } - } - 10 = { - save_scope_value_as = { - name = islam_relic_name - value = flag:hand - } - } - 5 = { - save_scope_value_as = { - name = islam_relic_name - value = flag:keys - } - } - 15 = { - save_scope_value_as = { - name = islam_relic_name - value = flag:tooth - } - } - 10 = { - save_scope_value_as = { - name = islam_relic_name - value = flag:seal - } - } - 5 = { - save_scope_value_as = { - name = islam_relic_name - value = flag:banner - } - } - } - - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - - scope:owner = { - create_artifact = { - name = artifact_pedestal_reliquary_islam_name - creator = scope:owner - description = artifact_pedestal_reliquary_islam_description - visuals = reliquary - type = pedestal - template = islam_relic_template - modifier = artifact_monthly_piety_3_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - #decaying = no - } - } - - scope:newly_created_artifact = { - add_scaled_artifact_modifier_piety_effect = yes - add_scaled_artifact_modifier_devotion_effect = yes - add_scaled_artifact_modifier_grandeur_small_effect = yes - set_variable = { - name = relic - value = flag:islamic - } - } -} - -create_artifact_pedestal_reliquary_buddhism_effect = { - $OWNER$ = { save_scope_as = owner } - - random_list = { - 15 = { - save_scope_value_as = { - name = buddhism_relic_name - value = flag:tooth - } - } - 15 = { - save_scope_value_as = { - name = buddhism_relic_name - value = flag:bone - } - } - 10 = { - save_scope_value_as = { - name = buddhism_relic_name - value = flag:robe - } - } - 5 = { - save_scope_value_as = { - name = buddhism_relic_name - value = flag:bowl - } - } - 5 = { - save_scope_value_as = { - name = buddhism_relic_name - value = flag:tongue - } - } - 10 = { - save_scope_value_as = { - name = buddhism_relic_name - value = flag:hair - } - } - 25 = { - save_scope_value_as = { - name = buddhism_relic_name - value = flag:sarira - } - } - 15 = { - save_scope_value_as = { - name = buddhism_relic_name - value = flag:bo - } - } - } - - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - - scope:owner = { - create_artifact = { - name = artifact_pedestal_reliquary_buddhism_name - creator = scope:owner - description = artifact_pedestal_reliquary_buddhism_description - visuals = reliquary - type = pedestal - template = buddhism_relic_template - modifier = artifact_monthly_piety_3_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - #decaying = no - } - } - - scope:newly_created_artifact = { - add_scaled_artifact_modifier_piety_effect = yes - add_scaled_artifact_modifier_devotion_effect = yes - add_scaled_artifact_modifier_grandeur_small_effect = yes - set_variable = { - name = relic - value = flag:buddhism - } - } -} - -create_artifact_pedestal_reliquary_judaism_effect = { - $OWNER$ = { save_scope_as = owner } - - random_list = { - 15 = { - save_scope_value_as = { - name = judaism_relic_name - value = flag:menorah - } - } - } - - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - - scope:owner = { - create_artifact = { - name = artifact_pedestal_reliquary_judaism_name - creator = scope:owner - description = artifact_pedestal_reliquary_judaism_description - visuals = reliquary - type = pedestal - template = judaism_relic_template - modifier = artifact_monthly_piety_3_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - #decaying = no - } - } - - scope:newly_created_artifact = { - add_scaled_artifact_modifier_piety_effect = yes - add_scaled_artifact_modifier_devotion_effect = yes - add_scaled_artifact_modifier_grandeur_small_effect = yes - save_scope_as = epic - set_variable = { - name = relic - value = flag:judaism - } - } -} - -create_artifact_sculpture_religious_effect = { - $OWNER$ = { save_scope_as = owner } - - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - - scope:owner = { - create_artifact = { - name = artifact_sculpture_religious_name - description = artifact_sculpture_religious_description - creator = scope:owner - visuals = statue - type = sculpture - template = religious_statue_template - modifier = artifact_monthly_piety_3_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - } - } - - scope:newly_created_artifact = { - set_variable = { # required to track equipability in template (based on dynamic religion) - name = statue_religion - value = scope:owner.religion - } - add_scaled_artifact_modifier_piety_effect = yes - add_scaled_artifact_modifier_devotion_effect = yes - add_scaled_artifact_modifier_grandeur_small_effect = yes - } -} - -create_artifact_sculpture_religious_christian_effect = { - $OWNER$ = { save_scope_as = owner } - - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - - scope:owner = { - create_artifact = { - name = artifact_sculpture_religious_christian_name - description = artifact_sculpture_religious_christian_description - visuals = statue - creator = scope:owner - type = sculpture - template = christian_relic_template - modifier = artifact_monthly_piety_3_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - } - } - - scope:newly_created_artifact = { - add_scaled_artifact_modifier_piety_effect = yes - add_scaled_artifact_modifier_devotion_effect = yes - add_scaled_artifact_modifier_grandeur_small_effect = yes - } -} - - - -# ALCHEMY - -# Panacea -create_artifact_panacea_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - $ALCHEMIST$ = { save_scope_as = alchemist } - hidden_effect_new_object = { - # Get artifact quality, wealth, and materials - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - if = { #If we have set the location we use it for the materials - limit = { exists = scope:location } - scope:location = { add_to_list = artifact_material_sources } - } - - scope:owner = { - # Create the artifact - create_artifact = { - name = artifact_panacea_name - description = placeholder - creator = scope:alchemist - visuals = small_box - type = panacea - modifier = artifact_negate_health_penalty_add_1_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - } - } - - scope:newly_created_artifact = { - get_artifact_feature_references_effect = yes - set_artifact_description = artifact_panacea_description - - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_negate_health_penalty_add_4_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_negate_health_penalty_add_3_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_negate_health_penalty_add_2_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_negate_health_penalty_add_1_modifier - } - add_scaled_artifact_modifier_prestige_effect = yes - } - } -} - - -# Elixir -create_artifact_elixir_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - $ALCHEMIST$ = { save_scope_as = alchemist } - hidden_effect_new_object = { - # Get artifact quality, wealth, and materials - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - - scope:owner = { - create_artifact = { - name = placeholder - description = placeholder - creator = scope:alchemist - visuals = flask - type = elixir - modifier = artifact_monthly_learning_lifestyle_xp_1_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - } - } - - scope:newly_created_artifact = { - get_artifact_feature_references_effect = yes - set_artifact_feature_group = elixir_type - set_artifact_name = artifact_elixir_name - set_artifact_description = artifact_elixir_description - - if = { # Strong health bonus for elixir of immortality - limit = { - has_artifact_feature = elixir_immortality - } - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_health_gain_4_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_health_gain_3_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_health_gain_2_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_health_penalty_1_modifier - } - } - else_if = { # Fertility bonus for elixir of youth - limit = { - has_artifact_feature = elixir_youth - } - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_fertility_gain_4_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_fertility_gain_3_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_fertility_gain_2_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_fertility_negative_modifier - } - } - else = { # Otherwise you get a small health boost - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_health_gain_2_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_health_gain_2_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_health_gain_1_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_health_gain_1_modifier - } - } - # Rarity determines prestige - add_scaled_artifact_modifier_minor_prestige_effect = yes - - set_variable = { - name = quality - value = scope:quality - } - set_variable = { - name = wealth - value = scope:wealth - } - } - } -} - - -# Philosopher's Stone -create_artifact_philosophers_stone_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - hidden_effect_new_object = { - # Get artifact quality, wealth, and materials - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - if = { #If we have set the location we use it for the materials - limit = { exists = scope:location } - scope:location = { add_to_list = artifact_material_sources } - } - - scope:owner = { - # Create the artifact - create_artifact = { - name = artifact_philosophers_stone_name - creator = scope:owner - description = placeholder - visuals = small_box - type = philosophers_stone - modifier = artifact_health_gain_1_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - } - } - - scope:newly_created_artifact = { - get_artifact_feature_references_effect = yes - set_artifact_description = artifact_philosophers_stone_description - - if = { - limit = { - rarity = illustrious - } - add_artifact_modifier = artifact_health_gain_4_modifier - } - else_if = { - limit = { - rarity = famed - } - add_artifact_modifier = artifact_health_gain_3_modifier - } - else_if = { - limit = { - rarity = masterwork - } - add_artifact_modifier = artifact_health_gain_2_modifier - } - else_if = { - limit = { - rarity = common - } - add_artifact_modifier = artifact_health_gain_1_modifier - } - add_scaled_artifact_modifier_scholarship_effect = yes - add_scaled_artifact_modifier_prestige_effect = yes - } - } -} - -create_artifact_poetry_effect = { - $OWNER$ = { save_scope_as = owner } - - hidden_effect_new_object = { - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - - scope:owner = { - create_artifact = { - name = artifact_poetry_name - creator = scope:owner - description = artifact_poetry_description - visuals = scroll - type = miscellaneous - modifier = artifact_monthly_minor_prestige_1_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - } - } - - scope:newly_created_artifact = { - add_scaled_artifact_modifier_minor_prestige_effect = yes - add_scaled_artifact_modifier_majesty_effect = yes - } - } -} diff --git a/N3OW/common/scripted_effects/01_ep1_court_event_effects.txt b/N3OW/common/scripted_effects/01_ep1_court_event_effects.txt deleted file mode 100644 index 2e83b219..00000000 --- a/N3OW/common/scripted_effects/01_ep1_court_event_effects.txt +++ /dev/null @@ -1,72 +0,0 @@ -################################################## -# Interactions -################################################## - -employed_booner_invalidation_effect = { - $LIEGE$ = { save_scope_as = liege } - $EMPLOYEE$ = { save_scope_as = employee } - scope:employee = { - if = { - limit = { exists = var:booner_target } - var:booner_target = { - save_scope_as = booner_target - scope:liege = { - send_interface_toast = { - type = event_toast_effect_bad - title = { - first_valid = { - triggered_desc = { - trigger = { scope:booner_target = scope:liege } - desc = employer_booner_invalidated_title - } - desc = employer_boon_target_invalidated_title - } - } - left_icon = scope:employee - right_icon = scope:booner_target - scope:booner_target = { - employed_booner_modifier_removal_effect = { POS = court_physician } - employed_booner_modifier_removal_effect = { POS = court_tutor } - employed_booner_modifier_removal_triple_effect = { POS = seneschal } - employed_booner_modifier_removal_effect = { POS = wet_nurse } - employed_booner_modifier_removal_triple_effect = { POS = high_almoner } - employed_booner_modifier_removal_effect = { POS = bodyguard } - employed_booner_modifier_removal_triple_effect = { POS = master_of_horse } - employed_booner_modifier_removal_triple_effect = { POS = travel_leader } - employed_booner_modifier_removal_effect = { POS = antiquarian } - employed_booner_modifier_removal_triple_effect = { POS = master_of_hunt } - employed_booner_modifier_removal_triple_effect = { POS = royal_architect } - employed_booner_modifier_removal_triple_effect = { POS = cupbearer } - employed_booner_modifier_removal_triple_effect = { POS = lady_in_waiting } - employed_booner_modifier_removal_triple_effect = { POS = food_taster } - } - } - } - } - remove_variable = booner_target - } - } - debug_log_scopes = yes -} - -employed_booner_modifier_removal_effect = { - if = { - limit = { has_character_modifier = employer_booner_$POS$_modifier } - remove_character_modifier = employer_booner_$POS$_modifier - } -} - -employed_booner_modifier_removal_triple_effect = { - if = { - limit = { has_character_modifier = employer_booner_$POS$_1_modifier } - remove_character_modifier = employer_booner_$POS$_1_modifier - } - else_if = { - limit = { has_character_modifier = employer_booner_$POS$_2_modifier } - remove_character_modifier = employer_booner_$POS$_2_modifier - } - else_if = { - limit = { has_character_modifier = employer_booner_$POS$_3_modifier } - remove_character_modifier = employer_booner_$POS$_3_modifier - } -} diff --git a/N3OW/common/scripted_effects/01_ep1_interaction_scripted_effects.txt b/N3OW/common/scripted_effects/01_ep1_interaction_scripted_effects.txt deleted file mode 100644 index f3108e88..00000000 --- a/N3OW/common/scripted_effects/01_ep1_interaction_scripted_effects.txt +++ /dev/null @@ -1,19 +0,0 @@ -################################################## -# Interactions -################################################## - -indebt_guest_interaction_accepted_effect = { - # Scope:actor gets a useable hook... - add_hook = { - type = threat_hook - target = scope:recipient - years = 10 - } - # ... & loses a modest amount of opinion for their evilness. - reverse_add_opinion = { - target = scope:recipient - modifier = blackmailing_me_opinion - } - # Even if you succeed, you burn a little CGV. - change_current_court_grandeur = miniscule_court_grandeur_loss -} diff --git a/N3OW/common/scripted_effects/01_exp1_historical_artifacts_creation_effect.txt b/N3OW/common/scripted_effects/01_exp1_historical_artifacts_creation_effect.txt deleted file mode 100644 index 01ebd165..00000000 --- a/N3OW/common/scripted_effects/01_exp1_historical_artifacts_creation_effect.txt +++ /dev/null @@ -1,5018 +0,0 @@ -# Historical Artifacts Creation # - -set_artifact_rarity_common = { - save_scope_value_as = { - name = quality - value = 15 - } - save_scope_value_as = { - name = wealth - value = 15 - } -} - -set_artifact_rarity_masterwork = { - save_scope_value_as = { - name = quality - value = 30 - } - save_scope_value_as = { - name = wealth - value = 30 - } -} - -set_artifact_rarity_famed = { - save_scope_value_as = { - name = quality - value = 70 - } - save_scope_value_as = { - name = wealth - value = 70 - } -} - -set_artifact_rarity_illustrious = { - save_scope_value_as = { - name = quality - value = 100 - } - save_scope_value_as = { - name = wealth - value = 100 - } -} - -create_artifact_pedestal_christian_relic_effect_hist = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - - # Identify which relic it is - random_list = { - 10 = { - save_scope_value_as = { - name = christian_relic_name - value = flag:nail - } - } - 10 = { - save_scope_value_as = { - name = christian_relic_name - value = flag:thorn - } - } - 10 = { - trigger = { - NOT = { - any_artifact = { - has_variable = christian_sandals - } - } - } - save_scope_value_as = { - name = christian_relic_name - value = flag:sandals - } - } - 10 = { - trigger = { - NOT = { - any_artifact = { - has_variable = christian_girdle - } - } - } - save_scope_value_as = { - name = christian_relic_name - value = flag:girdle - } - } - 10 = { - trigger = { - NOT = { - any_artifact = { - has_variable = christian_lance - } - } - } - save_scope_value_as = { - name = christian_relic_name - value = flag:lance - } - } - 10 = { - trigger = { - NOT = { - any_artifact = { - count > 5 - has_variable = christian_skull - } - } - } - save_scope_value_as = { - name = christian_relic_name - value = flag:skull - } - } - 10 = { - trigger = { - NOT = { - any_artifact = { - count > 5 - has_variable = christian_arm - } - } - } - save_scope_value_as = { - name = christian_relic_name - value = flag:arm - } - } - 10 = { - trigger = { - NOT = { - any_artifact = { - has_variable = christian_loincloth - } - } - } - save_scope_value_as = { - name = christian_relic_name - value = flag:loincloth - } - } - 10 = { - save_scope_value_as = { - name = christian_relic_name - value = flag:cross - } - } - 10 = { - trigger = { - NOT = { - any_artifact = { - has_variable = christian_crown - } - } - } - save_scope_value_as = { - name = christian_relic_name - value = flag:crown - } - } - 10 = { - trigger = { - NOT = { - any_artifact = { - has_variable = christian_veil - } - } - } - save_scope_value_as = { - name = christian_relic_name - value = flag:veronica - } - } - } - - # Create the artifact - if = { - limit = { - exists = scope:christian_relic_name - scope:christian_relic_name = flag:lance - } - set_artifact_rarity_illustrious = yes - create_artifact = { - name = artifact_pedestal_spear_destiny_name - description = artifact_pedestal_spear_destiny - type = pedestal - template = christian_artifact_template - visuals = pedestal_longinus - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - decaying = no - } - } - else_if = { - limit = { - exists = scope:christian_relic_name - OR = { - scope:christian_relic_name = flag:sandals - scope:christian_relic_name = flag:girdle - scope:christian_relic_name = flag:loincloth - scope:christian_relic_name = flag:crown - scope:christian_relic_name = flag:veronica - } - } - set_artifact_rarity_illustrious = yes - create_artifact = { - name = artifact_pedestal_reliquary_christian_name - description = artifact_pedestal_reliquary_christian_description - type = pedestal - wealth = scope:wealth - quality = scope:quality - template = christian_artifact_template - visuals = pedestal_christian_relic - history = { - type = created_before_history - } - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - } - } - else_if = { - limit = { - exists = scope:christian_relic_name - scope:christian_relic_name = flag:skull - } - create_artifact = { - name = artifact_pedestal_reliquary_christian_name - description = artifact_pedestal_reliquary_christian_description - type = pedestal - wealth = scope:wealth - quality = scope:quality - template = christian_artifact_template - visuals = human_skull - history = { - type = created_before_history - } - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - } - } - else = { - create_artifact = { - name = artifact_pedestal_reliquary_christian_name - description = artifact_pedestal_reliquary_christian_description - type = pedestal - wealth = scope:wealth - quality = scope:quality - template = christian_artifact_template - visuals = reliquary - history = { - type = created_before_history - } - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - } - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = { - name = relic - value = flag:christian - } - if = { - limit = { - exists = scope:christian_relic_name - scope:christian_relic_name = flag:veronica - } - set_variable = christian_veil - } - else_if = { - limit = { - exists = scope:christian_relic_name - scope:christian_relic_name = flag:crown - } - set_variable = christian_crown - } - else_if = { - limit = { - exists = scope:christian_relic_name - scope:christian_relic_name = flag:loincloth - } - set_variable = christian_loincloth - } - else_if = { - limit = { - exists = scope:christian_relic_name - scope:christian_relic_name = flag:lance - } - set_variable = christian_lance - } - else_if = { - limit = { - exists = scope:christian_relic_name - scope:christian_relic_name = flag:arm - } - set_variable = christian_arm - } - else_if = { - limit = { - exists = scope:christian_relic_name - scope:christian_relic_name = flag:sandals - } - set_variable = christian_sandals - } - else_if = { - limit = { - exists = scope:christian_relic_name - scope:christian_relic_name = flag:girdle - } - set_variable = christian_girdle - } - else_if = { - limit = { - exists = scope:christian_relic_name - scope:christian_relic_name = flag:skull - } - set_variable = christian_skull - } - add_scaled_artifact_modifier_piety_effect = yes - add_scaled_artifact_modifier_grandeur_small_effect = yes - if = { - limit = { - OR = { - rarity = famed - rarity = illustrious - } - } - add_2_scaled_artifact_modifier_devotion_effect = yes - - } - else = { - add_scaled_artifact_modifier_devotion_effect = yes - } - add_artifact_modifier = artifact_monthly_prestige_penalty_modifier #overwrite default creation modifier - save_scope_as = epic - } -} - -create_artifact_pedestal_islamic_relic_effect_hist = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - - # Identify which relic it is - random_list = { - 10 = { - save_scope_value_as = { - name = islam_relic_name - value = flag:hair - } - } - 10 = { - trigger = { - NOT = { - any_artifact = { - has_variable = islam_cloak - } - } - } - save_scope_value_as = { - name = islam_relic_name - value = flag:cloak - } - } - 10 = { - trigger = { - NOT = { - any_artifact = { - has_variable = islam_hand - } - } - } - save_scope_value_as = { - name = islam_relic_name - value = flag:hand - } - } - 10 = { - trigger = { - NOT = { - any_artifact = { - has_variable = islam_keys - } - } - } - save_scope_value_as = { - name = islam_relic_name - value = flag:keys - } - } - 10 = { - save_scope_value_as = { - name = islam_relic_name - value = flag:tooth - } - } - 10 = { - trigger = { - NOT = { - any_artifact = { - has_variable = islam_seal - } - } - } - save_scope_value_as = { - name = islam_relic_name - value = flag:seal - } - } - 10 = { - trigger = { - NOT = { - any_artifact = { - has_variable = islam_banner - } - } - } - save_scope_value_as = { - name = islam_relic_name - value = flag:banner - } - } - } - - # Create the artifact - if = { - limit = { - exists = scope:islam_relic_name - scope:islam_relic_name = flag:banner - } - set_artifact_rarity_illustrious = yes - create_artifact = { - name = artifact_banner_islam_name - description = artifact_banner_islam_description - type = wall_big - template = islam_artifact_template - visuals = banner_islam - visuals_source = title:d_shiite #Caliphate - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - } - } - else_if = { - limit = { - exists = scope:islam_relic_name - OR = { - scope:islam_relic_name = flag:cloak - scope:islam_relic_name = flag:hand - scope:islam_relic_name = flag:keys - scope:islam_relic_name = flag:seal - } - } - set_artifact_rarity_illustrious = yes - create_artifact = { - name = artifact_pedestal_reliquary_islam_name - description = artifact_pedestal_reliquary_islam_description - type = pedestal - template = islam_artifact_template - visuals = pedestal_islamic_relic - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - } - } - else = { - create_artifact = { - name = artifact_pedestal_reliquary_islam_name - description = artifact_pedestal_reliquary_islam_description - type = pedestal - template = islam_artifact_template - visuals = reliquary - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - } - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = { - name = relic - value = flag:islamic - } - add_scaled_artifact_modifier_piety_effect = yes - add_scaled_artifact_modifier_grandeur_small_effect = yes - if = { - limit = { - OR = { - rarity = famed - rarity = illustrious - } - } - add_2_scaled_artifact_modifier_devotion_effect = yes - - } - else = { - add_scaled_artifact_modifier_devotion_effect = yes - } - add_artifact_modifier = artifact_monthly_prestige_penalty_modifier #overwrite default creation modifier - if = { - limit = { - exists = scope:islam_relic_name - scope:islam_relic_name = flag:cloak - } - set_variable = islam_cloak - } - else_if = { - limit = { - exists = scope:islam_relic_name - scope:islam_relic_name = flag:seal - } - set_variable = islam_seal - } - else_if = { - limit = { - exists = scope:islam_relic_name - scope:islam_relic_name = flag:keys - } - set_variable = islam_keys - } - else_if = { - limit = { - exists = scope:islam_relic_name - scope:islam_relic_name = flag:hand - } - set_variable = islam_hand - } - else_if = { - limit = { - exists = scope:islam_relic_name - scope:islam_relic_name = flag:banner - } - set_variable = islam_banner - } - add_scaled_artifact_modifier_devotion_effect = yes - save_scope_as = epic - } -} - -create_artifact_pedestal_buddhism_relic_effect_hist = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - - # Identify which relic it is - random_list = { - 10 = { - save_scope_value_as = { - name = buddhism_relic_name - value = flag:tooth - } - } - 10 = { - save_scope_value_as = { - name = buddhism_relic_name - value = flag:bone - } - } - 10 = { - trigger = { - NOT = { - any_artifact = { - has_variable = buddhism_robe - } - } - } - save_scope_value_as = { - name = buddhism_relic_name - value = flag:robe - } - } - 10 = { - trigger = { - NOT = { - any_artifact = { - has_variable = buddhism_bowl - } - } - } - save_scope_value_as = { - name = buddhism_relic_name - value = flag:bowl - } - } - 10 = { - trigger = { - NOT = { - any_artifact = { - has_variable = buddhism_tongue - } - } - } - save_scope_value_as = { - name = buddhism_relic_name - value = flag:tongue - } - } - 10 = { - save_scope_value_as = { - name = buddhism_relic_name - value = flag:hair - } - } - 10 = { - save_scope_value_as = { - name = buddhism_relic_name - value = flag:sarira - } - } - 10 = { - save_scope_value_as = { - name = buddhism_relic_name - value = flag:bo - } - } - } - - # Create the artifact - if = { - limit = { - exists = scope:buddhism_relic_name - OR = { - scope:buddhism_relic_name = flag:robe - scope:buddhism_relic_name = flag:bowl - scope:buddhism_relic_name = flag:tongue - } - } - set_artifact_rarity_illustrious = yes - create_artifact = { - name = artifact_pedestal_reliquary_buddhism_name - description = artifact_pedestal_reliquary_buddhism_description - type = pedestal - template = buddhism_artifact_template - visuals = pedestal_buddhism_relic - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - } - } - else_if = { - limit = { - exists = scope:buddhism_relic_name - scope:buddhism_relic_name = flag:tooth - } - set_artifact_rarity_illustrious = yes - create_artifact = { - name = artifact_pedestal_reliquary_buddhism_name - description = artifact_pedestal_reliquary_buddhism_description - type = pedestal - template = buddhism_artifact_template - visuals = buddha_tooth - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - } - } - else = { - create_artifact = { - name = artifact_pedestal_reliquary_buddhism_name - description = artifact_pedestal_reliquary_buddhism_description - type = pedestal - template = buddhism_artifact_template - visuals = pedestal_buddhism_relic - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - } - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = { - name = relic - value = flag:buddhism - } - if = { - limit = { - exists = scope:buddhism_relic_name - scope:buddhism_relic_name = flag:tongue - } - set_variable = buddhism_tongue - } - else_if = { - limit = { - exists = scope:buddhism_relic_name - scope:buddhism_relic_name = flag:bowl - } - set_variable = buddhism_bowl - } - else_if = { - limit = { - exists = scope:buddhism_relic_name - scope:buddhism_relic_name = flag:robe - } - set_variable = buddhism_robe - } - add_scaled_artifact_modifier_piety_effect = yes - add_scaled_artifact_modifier_grandeur_small_effect = yes - if = { - limit = { - OR = { - rarity = famed - rarity = illustrious - } - } - add_2_scaled_artifact_modifier_devotion_effect = yes - - } - else = { - add_scaled_artifact_modifier_devotion_effect = yes - } - add_artifact_modifier = artifact_monthly_prestige_penalty_modifier #overwrite default creation modifier - save_scope_as = epic - } -} - -create_artifact_pedestal_branch_relic_zoroastr_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - set_artifact_rarity_illustrious = yes - - # Identify which relic it is - random_list = { - 10 = { - save_scope_value_as = { - name = branch_name - value = flag:haoma - } - } - 10 = { - save_scope_value_as = { - name = branch_name - value = flag:cypress - } - } - } - - # Create the artifact - create_artifact = { - name = artifact_pedestal_branch_name - description = artifact_pedestal_branch_description - type = pedestal - visuals = pedestal_branch_relic_zoroastr - wealth = scope:wealth - quality = scope:quality - template = branch_zoroastr_template - history = { - type = created_before_history - } - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = { - name = relic - value = flag:zoroastr - } - add_scaled_artifact_modifier_piety_effect = yes - add_scaled_artifact_modifier_grandeur_small_effect = yes - if = { - limit = { - OR = { - rarity = famed - rarity = illustrious - } - } - add_2_scaled_artifact_modifier_devotion_effect = yes - - } - else = { - add_scaled_artifact_modifier_devotion_effect = yes - } - add_artifact_modifier = artifact_monthly_prestige_penalty_modifier #overwrite default creation modifier - save_scope_as = epic - } -} - -create_artifact_pedestal_branch_relic_germanic_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - set_artifact_rarity_illustrious = yes - - # Identify which relic it is - random_list = { - 10 = { - save_scope_value_as = { - name = branch_name - value = flag:thor - } - } - 10 = { - save_scope_value_as = { - name = branch_name - value = flag:uppsala - } - } - } - - # Create the artifact - create_artifact = { - name = artifact_pedestal_branch_name - description = artifact_pedestal_branch_description - type = pedestal - template = branch_germanic_template - visuals = pedestal_branch_relic_germanic - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = { - name = relic - value = flag:germanic - } - add_scaled_artifact_modifier_piety_effect = yes - add_scaled_artifact_modifier_grandeur_small_effect = yes - if = { - limit = { - OR = { - rarity = famed - rarity = illustrious - } - } - add_2_scaled_artifact_modifier_devotion_effect = yes - - } - else = { - add_scaled_artifact_modifier_devotion_effect = yes - } - save_scope_as = epic - } -} - -create_artifact_pedestal_branch_relic_slavic_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - set_artifact_rarity_illustrious = yes - - save_scope_value_as = { - name = branch_name - value = flag:alatyr - } - - # Create the artifact - create_artifact = { - name = artifact_pedestal_branch_name - description = artifact_pedestal_branch_description - type = pedestal - template = branch_slavic_template - visuals = pedestal_branch_relic_slavic - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = { - name = relic - value = flag:slavic - } - add_scaled_artifact_modifier_piety_effect = yes - add_scaled_artifact_modifier_grandeur_small_effect = yes - if = { - limit = { - OR = { - rarity = famed - rarity = illustrious - } - } - add_2_scaled_artifact_modifier_devotion_effect = yes - - } - else = { - add_scaled_artifact_modifier_devotion_effect = yes - } - save_scope_as = epic - } -} - -create_artifact_pedestal_branch_relic_boog_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - set_artifact_rarity_illustrious = yes - - save_scope_value_as = { - name = branch_name - value = flag:somb - } - - # Create the artifact - create_artifact = { - name = artifact_pedestal_branch_name - description = artifact_pedestal_branch_description - type = pedestal - template = branch_boog_template - visuals = pedestal_branch_relic_boog - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = { - name = relic - value = flag:boog - } - add_scaled_artifact_modifier_piety_effect = yes - add_scaled_artifact_modifier_grandeur_small_effect = yes - if = { - limit = { - OR = { - rarity = famed - rarity = illustrious - } - } - add_2_scaled_artifact_modifier_devotion_effect = yes - - } - else = { - add_scaled_artifact_modifier_devotion_effect = yes - } - add_artifact_modifier = artifact_monthly_prestige_penalty_modifier #overwrite default creation modifier - save_scope_as = epic - } -} - -create_artifact_pedestal_branch_relic_hinduism_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - set_artifact_rarity_illustrious = yes - - save_scope_value_as = { - name = branch_name - value = flag:kalpavriksha - } - - # Create the artifact - create_artifact = { - name = artifact_pedestal_branch_name - description = artifact_pedestal_branch_description - type = pedestal - template = branch_hinduism_template - visuals = pedestal_branch_relic_hinduism - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = { - name = relic - value = flag:hinduism - } - add_scaled_artifact_modifier_piety_effect = yes - add_scaled_artifact_modifier_grandeur_small_effect = yes - if = { - limit = { - OR = { - rarity = famed - rarity = illustrious - } - } - add_2_scaled_artifact_modifier_devotion_effect = yes - - } - else = { - add_scaled_artifact_modifier_devotion_effect = yes - } - save_scope_as = epic - } -} - -create_artifact_pedestal_branch_relic_general_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - set_artifact_rarity_illustrious = yes - - save_scope_value_as = { - name = branch_name - value = flag:general - } - - # Create the artifact - create_artifact = { - name = artifact_pedestal_branch_name - description = artifact_pedestal_branch_description - type = pedestal - template = branch_general_template - visuals = pedestal_branch_relic_hinduism - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - } - - scope:newly_created_artifact = { - set_variable = { #This is needed to determine what religion the branch will work for. - name = relic_religion - value = $RELIGION$ - } - set_variable = { name = historical_unique_artifact value = yes } - add_scaled_artifact_modifier_piety_effect = yes - add_scaled_artifact_modifier_grandeur_small_effect = yes - if = { - limit = { - OR = { - rarity = famed - rarity = illustrious - } - } - add_2_scaled_artifact_modifier_devotion_effect = yes - - } - else = { - add_scaled_artifact_modifier_devotion_effect = yes - } - save_scope_as = epic - } -} - -#Common Artifacts - -create_artifact_excalibur_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_common = yes - - # Create the artifact - create_artifact = { - name = excalibur_name - description = excalibur_description - type = pedestal - visuals = excalibur - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = excalibur_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = excalibur - save_scope_as = epic - } -} - -create_artifact_edmund_head_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - name = edmund_head_name - description = edmund_head_description - type = pedestal - visuals = head - wealth = scope:wealth - quality = scope:quality - template = christian_relic_template - history = { - type = created - date = 869.11.20 - recipient = character:163064 #Eadmund the Martyr - location = province:1520 #Blything - } - modifier = edmund_head_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = edmund_head - add_scaled_artifact_modifier_devotion_effect = yes - set_variable = { - name = relic - value = flag:christian - } - save_scope_as = epic - add_artifact_history = { - type = given - date = 946.5.27 - recipient = character:33350 # Æthelstan - } - add_artifact_title_history = { - target = title:k_england - date = 955.11.24 - } - } -} - -create_artifact_makarakundala_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - - set_artifact_rarity_famed = yes - - # Create the artifact - create_artifact = { - name = artifact_makarakundala_name - description = artifact_makarakundala_description - type = pedestal - visuals = riches - wealth = scope:wealth - quality = scope:quality - template = general_unique_template - history = { - type = created_before_history - } - modifier = makarakundala_modifier - save_scope_as = newly_created_artifact - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = makarakundala - add_scaled_artifact_modifier_devotion_effect = yes - save_scope_as = epic - } -} - -#Masterwork Artifacts - -create_artifact_ibeji_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_masterwork = yes - - # Create the artifact - create_artifact = { - name = artifact_ibeji_name - description = artifact_ibeji_description - template = general_unique_template - type = pedestal - visuals = medium_box - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = ibeji_modifier - save_scope_as = newly_created_artifact - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = ibeji - add_scaled_artifact_modifier_devotion_effect = yes - save_scope_as = epic - } -} - -create_artifact_chinese_caligraphy_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_masterwork = yes - - # Create the artifact - create_artifact = { - type = pedestal - visuals = scroll - wealth = scope:wealth - template = general_unique_template - quality = scope:quality - history = { - type = created_before_history - } - modifier = caligraphy_modifier - save_scope_as = newly_created_artifact - name = artifact_chinese_caligraphy_name - description = artifact_chinese_caligraphy_description - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = chinese_caligraphy - add_2_scaled_artifact_modifier_rulership_effect = yes - save_scope_as = epic - } -} - -create_artifact_throne_charlemagne_effect = { #Create at start - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - name = artifact_throne_charlemagne_name - description = artifact_throne_charlemagne_description - type = throne_special - visuals = throne_charlemagne - wealth = scope:wealth - quality = scope:quality - template = throne_charlemagne_template - history = { - type = created - date = 800.12.25 - recipient = character:6392 #Karl I the Great - location = province:2092 #Aachen - } - modifier = throne_charlemagne_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = charlamagne_throne - # k_lotharingia history copied manually because it is destroyed before 1066 - add_artifact_history = { - type = inherited - date = 814.1.2 - recipient = character:90095 #Louis I - } - add_artifact_history = { - type = inherited - date = 817.1.1 - recipient = character:30227 #Lothair I - } - add_artifact_title_history = { - target = title:e_hre - date = 973.5.7 - } - add_scaled_artifact_modifier_majesty_effect = yes - add_scaled_artifact_modifier_rulership_effect = yes - save_scope_as = epic - save_scope_value_as = { - name = throne - value = yes - } - } -} - -create_artifact_throne_solomon_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - name = artifact_throne_solomon_name - description = artifact_throne_solomon_description - type = throne_special - visuals = throne_solomon - wealth = scope:wealth - quality = scope:quality - template = throne_solomon_template - history = { - type = created_before_history - } - modifier = throne_solomon_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = throne_of_solomon - save_scope_as = epic - add_scaled_artifact_modifier_majesty_effect = yes - add_scaled_artifact_modifier_rulership_effect = yes - add_scaled_artifact_modifier_devotion_effect = yes - save_scope_value_as = { - name = throne - value = yes - } - } -} - -create_artifact_byz_throne_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - name = artifact_byz_throne_name - description = artifact_byz_throne_description - type = throne_special - visuals = ep3_throne_of_solomon - wealth = scope:wealth - quality = scope:quality - template = byz_throne_template - history = { - type = created_before_history - } - modifier = byz_throne_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - #set_variable = byz_throne_of_solomon - save_scope_as = epic - save_scope_value_as = { - name = throne - value = yes - } - add_artifact_title_history = { - target = title:e_byzantium - date = 940.1.1 - } - } -} - -create_artifact_throne_scone_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - name = artifact_throne_stone_scone_name - description = artifact_throne_stone_scone - type = throne_special - visuals = throne_scone - wealth = scope:wealth - quality = scope:quality - template = throne_scone_template - history = { - type = created - date = 841.6.1 - recipient = character:6018 #Kenneth mac Ailpín - location = province:1742 #Scone - } - modifier = throne_scone_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = throne_scone - save_scope_as = epic - add_scaled_artifact_modifier_rulership_effect = yes - save_scope_value_as = { - name = throne - value = yes - } - add_artifact_title_history = { - target = title:k_scotland - date = 858.1.1 - } - } -} - -create_artifact_wall_banner_kaviani_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - name = artifact_wall_banner_kaviani_name - description = artifact_wall_banner_kaviani - type = wall_big - template = kaviani_template - visuals = banner - visuals_source = dynasty:jamshid - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = banner_kaviani_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = banner_kaviani - save_scope_as = epic - } -} - -create_artifact_sculpture_cabinet_pentapyrgion_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_masterwork = yes - - # Create the artifact - create_artifact = { - name = artifact_sculpture_cabinet_pentapyrgion_name - description = artifact_sculpture_cabinet_pentapyrgion_description - type = sculpture - visuals = sculpture_cabinet_pentapyrgion - template = pentapyrgion_template - wealth = scope:wealth - quality = scope:quality - history = { - type = created - date = 839.6.1 - recipient = character:70491 #Theophilos - location = province:496 #Constantinople - } - modifier = pentapyrgion_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - add_artifact_title_history = { - target = title:e_byzantium - date = 842.1.20 - } - save_scope_value_as = { - name = cupboard - value = yes - } - } -} - -create_artifact_monomachus_crown_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - - set_artifact_rarity_famed = yes - - # Create the artifact - create_artifact = { - name = monomachus_crown_name - description = monomachus_crown_description - template = crown_wearable_template - type = helmet - visuals = pedestal_justinian - wealth = scope:wealth - quality = scope:quality - history = { - type = created - date = 1042.6.11 - recipient = character:1726 #Konstantinos IX - location = province:496 #Constantinople - } - modifier = monomachus_crown_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - save_scope_as = epic - add_artifact_title_history = { - target = title:e_byzantium - date = 1055.1.11 - } - } -} - -create_artifact_ruyi_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_masterwork = yes - - # Create the artifact - create_artifact = { - name = artifact_ruyi_name - description = artifact_ruyi_description - type = pedestal - visuals = regalia_court - wealth = scope:wealth - quality = scope:quality - template = general_unique_template - history = { - type = created_before_history - } - modifier = ruyi_modifier - save_scope_as = newly_created_artifact - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = ruyi - save_scope_as = epic - } -} - -create_artifact_jewelled_danda_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_masterwork = yes - - # Create the artifact - create_artifact = { - name = artifact_jewelled_danda_name - description = artifact_jewelled_danda_description - type = regalia_simple - visuals = regalia - wealth = scope:wealth - quality = scope:quality - template = regalia_template - history = { - type = created_before_history - } - modifier = jewelled_danda_modifier - save_scope_as = newly_created_artifact - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - add_2_scaled_artifact_modifier_rulership_effect = yes - add_scaled_artifact_modifier_scholarship_effect = yes - set_variable = danda - save_scope_as = epic - } -} - -create_artifact_khanda_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_masterwork = yes - - # Create the artifact - create_artifact = { - name = artifact_khanda_name - description = artifact_khanda_description - template = branch_hinduism_template - type = pedestal - visuals = wall_khanda_sword - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = khanda_modifier - save_scope_as = newly_created_artifact - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = khanda - set_variable = { - name = relic - value = flag:hinduism - } - save_scope_as = epic - } -} - -create_artifact_dagger_of_rostam_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - name = artifact_dagger_of_rostam_name - description = artifact_dagger_of_rostam_description - type = pedestal - visuals = dagger_court - template = general_unique_template - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = rustam_dagger_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = dagger_of_rostam - save_scope_as = epic - } -} - -create_artifact_ascalon_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - name = artifact_spear_of_ascalon_name - description = artifact_spear_of_ascalon_description - type = pedestal - visuals = spear_court - template = general_unique_template - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = spear_ascalon_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = ascalon - set_variable = { - name = relic - value = flag:christian - } - save_scope_as = epic - } -} - -create_artifact_zomorrodnegar_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - name = artifact_zomorrodnegar_name - description = artifact_zomorrodnegar_description - type = pedestal - visuals = sword_court - template = general_unique_template - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = zomorrodnegar_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = zomorrodnegar - save_scope_as = epic - } -} - -create_artifact_kaves_apron_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - name = artifact_kaves_apron_name - description = artifact_kaves_apron_description - type = wall_big - visuals = banner - visuals_source = dynasty:jamshid - template = general_unique_template - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = kaves_apron_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = kaves_apron - save_scope_as = epic - } -} - -create_artifact_muhammads_epistles_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_masterwork = yes - - # Create the artifact - create_artifact = { - type = pedestal - visuals = scroll - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - template = islam_artifact_template - name = artifact_muhammads_epistles_name - description = artifact_muhammads_epistles_description - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = muhammads_epistles - add_scaled_artifact_modifier_devotion_effect = yes - add_scaled_artifact_modifier_combat_effect = yes - set_variable = { - name = relic - value = flag:islamic - } - save_scope_as = epic - } -} - -create_artifact_aruval_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_masterwork = yes - - # Create the artifact - create_artifact = { - name = artifact_aruval_name - description = artifact_aruval_description - type = pedestal - visuals = wall_khanda_sword - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - template = branch_hinduism_template - modifier = aruval_modifier - save_scope_as = newly_created_artifact - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = aruval - set_variable = { - name = relic - value = flag:hinduism - } - save_scope_as = epic - } -} - -create_artifact_navaratna_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_masterwork = yes - - # Create the artifact - create_artifact = { - name = artifact_navaratna_name - description = artifact_navaratna_description - visuals = necklace - type = necklace - wealth = scope:wealth - quality = scope:quality - template = general_unique_template - history = { - type = created_before_history - } - modifier = navaratna_modifier - save_scope_as = newly_created_artifact - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = navaratna - get_artifact_feature_references_effect = yes - save_scope_as = epic - } -} - -create_artifact_pedestal_ikenga_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_masterwork = yes - - # Create the artifact - create_artifact = { - name = artifact_ikenga_name - description = artifact_ikenga_description - type = pedestal - visuals = small_box - wealth = scope:wealth - quality = scope:quality - template = general_unique_template - history = { - type = created_before_history - } - modifier = ikenga_modifier - save_scope_as = newly_created_artifact - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = ikenga - save_scope_as = epic - } -} - -create_artifact_afarganyu_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - name = afarganyu_name - description = artifact_afarganyu_description - template = branch_zoroastr_template - type = urn - visuals = urn - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = afarganyu_modifier - save_scope_as = newly_created_artifact - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = { - name = relic - value = flag:zoroastr - } - save_scope_as = epic - } -} - -create_artifact_siddhachakra_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_masterwork = yes - - # Create the artifact - create_artifact = { - name = siddhachakra_name - description = artifact_siddhachakra_description - template = jainism_artifact_template - type = pedestal - visuals = scroll - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = siddhachakra_modifier - save_scope_as = newly_created_artifact - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = { - name = relic - value = flag:jainism - } - save_scope_as = epic - } -} - -create_artifact_staff_kakusandha_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - name = artifact_staff_kakusandha - description = artifact_staff_kakusandha_desc - type = pedestal - visuals = spear_court - wealth = scope:wealth - quality = scope:quality - template = buddhism_artifact_template - history = { - type = created_before_history - } - modifier = kakusandha_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = staff_kakusandha - set_variable = { - name = relic - value = flag:buddhism - } - save_scope_as = epic - } -} - -create_artifact_konagamana_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - name = water_filter_konagamana - description = water_filter_konagamana_desc - type = pedestal - visuals = scroll - wealth = scope:wealth - quality = scope:quality - template = buddhism_artifact_template - history = { - type = created_before_history - } - modifier = konagamana_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = konagamana - set_variable = { - name = relic - value = flag:buddhism - } - save_scope_as = epic - } -} - -create_artifact_robe_kassapa_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - name = robe_kassapa - description = robe_kassapa_desc - template = buddhism_artifact_template - type = pedestal - visuals = reliquary - wealth = scope:wealth - quality = scope:quality - template = buddhism_artifact_template - history = { - type = created_before_history - } - modifier = kassapa_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = kassapa - set_variable = { - name = relic - value = flag:buddhism - } - save_scope_as = epic - } -} - -#Famed Artifacts - -create_artifact_reichskrone_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - name = reichskrone_name - description = reichskrone_description - type = helmet - visuals = hre_crown - wealth = scope:wealth - quality = scope:quality - template = reichskrone_template - history = { - type = created - date = 962.1.1 - recipient = character:1282 #Otto I - location = province:2092 #Aachen - } - modifier = reichskrone_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = { - name = artifact_succession_title - value = title:e_hre - } - add_artifact_title_history = { - target = title:e_hre - date = 962.1.1 - } - set_variable = { - name = reichskrone - value = yes - } - save_scope_as = epic - } -} - -create_artifact_cintamani_hindu_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - - set_artifact_rarity_famed = yes - - # Create the artifact - create_artifact = { - name = artifact_cintamani_name - description = artifact_cintamani_hindu_description - type = pedestal - visuals = rock - wealth = scope:wealth - quality = scope:quality - template = branch_hinduism_template - history = { - type = created_before_history - } - modifier = cintamani_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = cintamani_hindu - set_variable = { - name = relic - value = flag:hinduism - } - } -} - -create_artifact_cintamani_buddhist_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - - set_artifact_rarity_famed = yes - - # Create the artifact - create_artifact = { - name = artifact_cintamani_name - description = artifact_cintamani_buddhist_description - type = pedestal - visuals = rock - wealth = scope:wealth - quality = scope:quality - template = buddhism_artifact_template - history = { - type = created_before_history - } - modifier = cintamani_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = cintamani_buddhist - set_variable = { - name = relic - value = flag:buddhism - } - } -} - -create_artifact_wall_banner_edessa_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - name = artifact_wall_big_edessa_name - description = artifact_wall_big_edessa - type = pedestal - visuals = reliquary - wealth = scope:wealth - quality = scope:quality - template = edessa_template - history = { - type = created_before_history - location = province:4869 #Edessa - } - modifier = banner_of_edessa_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = banner_edessa - set_variable = { - name = relic - value = flag:christian - } - save_scope_as = epic - } -} - -create_artifact_wall_cid_sword_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_famed = yes - - # Create the artifact - create_artifact = { - name = artifact_wall_cid_sword_name - description = artifact_wall_el_cids_sword - type = pedestal - visuals = wall_cid_sword - wealth = scope:wealth - quality = scope:quality - template = tizona_template - history = { - type = created_before_history - } - modifier = tizona_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - add_artifact_history = { - type = won_in_duel - date = 1097.1.1 - recipient = character:107590 #El Cid - } - set_variable = { name = historical_unique_artifact value = yes } - set_variable = sword_cid - save_scope_as = epic - } -} - -create_artifact_wall_muhammad_sword_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_famed = yes - - # Identify which sword it is - random_list = { - 10 = { - trigger = { - NOT = { - any_artifact = { - has_variable = sword_muhammad_aladb - } - } - } - save_scope_value_as = { - name = muhammad_sword_name - value = flag:aladb - } - } - 10 = { - trigger = { - NOT = { - any_artifact = { - has_variable = sword_muhammad_almathur - } - } - } - save_scope_value_as = { - name = muhammad_sword_name - value = flag:almathur - } - } - 10 = { - trigger = { - NOT = { - any_artifact = { - has_variable = sword_muhammad_arrasub - } - } - } - save_scope_value_as = { - name = muhammad_sword_name - value = flag:arrasub - } - } - 10 = { - trigger = { - NOT = { - any_artifact = { - has_variable = sword_muhammad_albattar - } - } - } - save_scope_value_as = { - name = muhammad_sword_name - value = flag:albattar - } - - } - 10 = { - trigger = { - NOT = { - any_artifact = { - has_variable = sword_muhammad_haft - } - } - } - save_scope_value_as = { - name = muhammad_sword_name - value = flag:haft - } - } - 10 = { - trigger = { - NOT = { - any_artifact = { - has_variable = sword_muhammad_qali - } - } - } - save_scope_value_as = { - name = muhammad_sword_name - value = flag:qali - } - } - 10 = { - trigger = { - NOT = { - any_artifact = { - has_variable = sword_muhammad_dhu - } - } - } - save_scope_value_as = { - name = muhammad_sword_name - value = flag:dhu - } - } - 10 = { - trigger = { - NOT = { - any_artifact = { - has_variable = sword_muhammad_mikhdham - } - } - } - save_scope_value_as = { - name = muhammad_sword_name - value = flag:mikhdham - } - } - 10 = { - trigger = { - NOT = { - any_artifact = { - has_variable = sword_muhammad_alqadib - } - } - } - save_scope_value_as = { - name = muhammad_sword_name - value = flag:alqadib - } - } - } - - # Create the artifact - create_artifact = { - name = artifact_wall_sword_muhammad_name - description = artifact_wall_sword_muhammad - type = pedestal - visuals = wall_muhammad_sword - wealth = scope:wealth - quality = scope:quality - template = muhammad_sword_template - history = { - type = created_before_history - } - modifier = muhammed_sword_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = sword_of_muhammad - save_scope_as = muhammad_sword - set_variable = { - name = relic - value = flag:islamic - } - random_list = { - pick = 2 - unique = yes - 10 = { - add_artifact_modifier = muhammed_sword_1_modifier - } - 10 = { - add_artifact_modifier = muhammed_sword_2_modifier - } - 10 = { - add_artifact_modifier = muhammed_sword_3_modifier - } - 10 = { - add_artifact_modifier = muhammed_sword_4_modifier - } - 10 = { - add_artifact_modifier = muhammed_sword_5_modifier - } - 10 = { - add_artifact_modifier = muhammed_sword_6_modifier - } - 10 = { - add_artifact_modifier = muhammed_sword_7_modifier - } - 10 = { - add_artifact_modifier = muhammed_sword_8_modifier - } - } - } - if = { - limit = { - scope:muhammad_sword_name = flag:aladb - } - scope:muhammad_sword = { - add_artifact_history = { - type = given - date = 624.3.13 - recipient = character:33922 #Muhammad the Prophet - } - set_variable = sword_muhammad_aladb - } - } - if = { - limit = { - scope:muhammad_sword_name = flag:almathur - } - scope:muhammad_sword = { - add_artifact_history = { - type = inherited - date = 570.6.1 - recipient = character:33922 #Muhammad the Prophet - } - set_variable = sword_muhammad_almathur - } - } - if = { - limit = { - scope:muhammad_sword_name = flag:arrasub - } - scope:muhammad_sword = { - add_artifact_history = { - type = inherited - date = 570.6.1 - recipient = character:33922 #Muhammad the Prophet - } - set_variable = sword_muhammad_arrasub - } - } - if = { - limit = { - OR = { - scope:muhammad_sword_name = flag:albattar - scope:muhammad_sword_name = flag:haft - scope:muhammad_sword_name = flag:qali - } - } - scope:muhammad_sword = { - add_artifact_history = { - type = conquest - date = 622.5.1 - recipient = character:33922 #Muhammad the Prophet - location = province:718 - } - if = { - limit = { scope:muhammad_sword_name = flag:albattar } - set_variable = sword_muhammad_albattar - } - else_if = { - limit = { scope:muhammad_sword_name = flag:haft } - set_variable = sword_muhammad_haft - } - else = { - set_variable = sword_muhammad_qali - } - } - } - if = { - limit = { - scope:muhammad_sword_name = flag:dhu - } - scope:muhammad_sword = { - add_artifact_history = { - type = conquest - date = 624.3.13 - recipient = character:33922 #Muhammad the Prophet - location = province:6210 #Al-Jar - } - set_variable = sword_muhammad_dhu - } - } - if = { - limit = { - scope:muhammad_sword_name = flag:mikhdham - } - scope:muhammad_sword = { - add_artifact_history = { - type = given - date = 610.1.1 - recipient = character:33922 #Muhammad the Prophet - } - set_variable = sword_muhammad_mikhdham - } - } - if = { - limit = { - scope:muhammad_sword_name = flag:alqadib - } - scope:muhammad_sword = { - add_artifact_history = { - type = given - date = 610.1.1 - recipient = character:33922 #Muhammad the Prophet - } - set_variable = sword_muhammad_alqadib - } - } - scope:muhammad_sword = { - save_scope_as = epic - } -} - -create_artifact_sword_goujian_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_illustrious = yes - - # Identify which sword it is - random_list = { - 10 = { - trigger = { - NOT = { - any_artifact = { - has_variable = sword_goujian_purity - } - } - } - save_scope_value_as = { - name = goujian_sword_name - value = flag:purity - } - } - 10 = { - trigger = { - NOT = { - any_artifact = { - has_variable = sword_goujian_refulgence - } - } - } - save_scope_value_as = { - name = goujian_sword_name - value = flag:refulgence - } - set_variable = sword_goujian_refulgence - } - 10 = { - #Nothing - } - } - - # Create the artifact - create_artifact = { - name = artifact_sword_goujian_name - description = artifact_sword_goujian - type = pedestal - visuals = tgp_sword_of_goujian - wealth = scope:wealth - quality = scope:quality - template = sword_goujian_template - history = { - type = created_before_history - } - modifier = goujian_sword_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = sword_of_goujian - save_scope_as = gujian_sword - random_list = { - pick = 2 - unique = yes - 10 = { - add_artifact_modifier = goujian_sword_1_modifier - } - 10 = { - add_artifact_modifier = goujian_sword_2_modifier - } - 10 = { - add_artifact_modifier = goujian_sword_3_modifier - } - 10 = { - add_artifact_modifier = goujian_sword_4_modifier - } - 10 = { - add_artifact_modifier = goujian_sword_5_modifier - } - 10 = { - add_artifact_modifier = goujian_sword_6_modifier - } - 10 = { - add_artifact_modifier = goujian_sword_7_modifier - } - 10 = { - add_artifact_modifier = goujian_sword_8_modifier - } - } - } - if = { - limit = { - exists = scope:goujian_sword_name - scope:goujian_sword_name = flag:refulgence - } - scope:gujian_sword = { - set_artifact_description = artifact_sword_goujian_refulgence - set_variable = sword_goujian_refulgence - } - } - if = { - limit = { - exists = scope:goujian_sword_name - scope:goujian_sword_name = flag:purity - } - scope:gujian_sword = { - set_artifact_description = artifact_sword_goujian_purity - set_variable = sword_goujian_purity - } - } - scope:gujian_sword = { - save_scope_as = epic - } -} - -create_artifact_sword_mmaagha_kamalu_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_famed = yes - - # Create the artifact - create_artifact = { - name = artifact_mmaagha_kamalu_name - description = artifact_mmaagha_kamalu_description - type = pedestal - visuals = sword_court - wealth = scope:wealth - quality = scope:quality - template = general_unique_template - history = { - type = created_before_history - } - modifier = mmaagha_kamalu_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = mmaagha_kamalu - save_scope_as = epic - } -} - -create_artifact_bronze_head_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_famed = yes - - # Create the artifact - create_artifact = { - name = artifact_bronze_head_name - description = artifact_bronze_head_description - type = pedestal - visuals = head - wealth = scope:wealth - quality = scope:quality - template = general_unique_template - history = { - type = created_before_history - } - modifier = bronze_head_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = bronze_head - save_scope_as = epic - } -} - -create_artifact_crystal_carving_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_famed = yes - - # Create the artifact - create_artifact = { - name = artifact_crystal_carving_name - description = artifact_crystal_carving_description - type = pedestal - visuals = riches - wealth = scope:wealth - quality = scope:quality - template = general_unique_template - history = { - type = created_before_history - } - modifier = crystal_carving_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = crystal_carving - save_scope_as = epic - } -} - -create_artifact_wall_sword_attila_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - name = artifact_wall_sword_attila_name - description = artifact_wall_sword_attila_description - type = pedestal - template = attila_template - visuals = wall_sword_attila - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = attila_sword_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = sword_attila - save_scope_as = epic - } -} - -create_artifact_pedestal_great_diamond_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_famed = yes - - # Create the artifact - create_artifact = { - name = artifact_pedestal_great_diamond_name - description = artifact_pedestal_great_diamond_description - type = pedestal - template = general_unique_template - visuals = diamond - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = great_diamond_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = great_diamond - save_scope_as = epic - } -} - -create_artifact_pedestal_al_jabal_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - name = artifact_pedestal_al_jabal_name - description = artifact_pedestal_al_jabal_description - type = pedestal - visuals = ring_court - template = general_unique_template - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = al_jabal_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = al_jabal - save_scope_as = epic - } -} - -create_artifact_pedestal_al_yatima_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - name = artifact_pedestal_al_yatima_name - description = artifact_pedestal_al_yatima_description - type = pedestal - visuals = diamond - template = general_unique_template - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = al_yatima_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = al_yatima - save_scope_as = epic - } -} - -create_artifact_pedestal_cup_jamshid_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - name = artifact_pedestal_jamshid_name - description = artifact_pedestal_cup_jamshid - type = pedestal - template = cup_jamshid_template - visuals = pedestal_cup_jamshid - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = cup_jamshid_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = cup_jamshid - save_scope_as = epic - } -} - -create_artifact_pedestal_crown_iron_effect = { #Create at start - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - name = artifact_pedestal_crown_iron_name - description = artifact_pedestal_crown_iron - type = pedestal - template = crown_iron_template - visuals = pedestal_crown_iron - wealth = scope:wealth - quality = scope:quality - history = { - type = created - date = 313.2.1 - recipient = character:70523 #Konstantinos I the Great - location = province:496 #Constantinople - } - modifier = iron_crown_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = iron_crown - add_artifact_history = { - type = given - date = 600.1.1 - actor = character:7893 - recipient = character:190171 - location = province:2475 - } - add_artifact_history = { - type = given - date = 774.7.10 - recipient = character:6392 - location = province:2475 - } - add_artifact_history = { - type = given - date = 781.1.1 - recipient = character:6394 - location = province:2475 - } - add_artifact_history = { - type = inherited - date = 810.1.1 - recipient = character:6396 - location = province:2475 - } - add_artifact_history = { - type = inherited - date = 818.4.17 - recipient = character:90095 - location = province:2475 - } - add_artifact_history = { - type = inherited - date = 887.1.1 - recipient = character:71901 - location = province:2475 - } - # k_italy history copied manually because it is destroyed before 1066 - add_artifact_history = { - type = inherited - date = 896.1.1 - recipient = character:167969 #Liutfrido - } - add_artifact_history = { - type = inherited - date = 905.3.1 - recipient = character:167970 #Gotofredo - } - add_artifact_history = { - type = inherited - date = 910.8.4 - recipient = character:167971 #Gausberto - } - add_artifact_history = { - type = inherited - date = 940.1.1 - recipient = character:167972 #Uberto - } - add_artifact_history = { - type = inherited - date = 941.11.1 - recipient = character:167973 #Adalberto - } - add_artifact_history = { - type = inherited - date = 967.1.1 - recipient = character:7727 #Aleramo Aleramicci - } - add_artifact_history = { - type = inherited - date = 991.1.1 - recipient = character:7728 #Ottone I - } - add_artifact_history = { - type = inherited - date = 991.6.1 - recipient = character:7729 #Guglielmo I - } - add_artifact_history = { - type = inherited - date = 941.11.1 - recipient = character:167973 #Adalberto - } - add_artifact_title_history = { - target = title:e_hre - date = 1039.2.4 - } - save_scope_as = epic - } -} - -create_artifact_nikephoros_crown_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_famed = yes - - # Create the artifact - create_artifact = { - name = nikephoros_crown_name - description = nikephoros_crown_description - type = pedestal - visuals = pedestal_justinian - template = justinian_template #Same as Justinian - wealth = scope:wealth - quality = scope:quality - history = { - type = created - date = 963.7.2 - recipient = character:1712 #Nikephoros Phokas - location = province:496 #Constantinople - } - modifier = nikephoros_crown_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = { - name = artifact_succession_title - value = title:e_byzantium - } - add_artifact_title_history = { - target = title:e_byzantium - date = 969.12.10 - } - } -} - -create_artifact_pedestal_shankha_conch_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_famed = yes - - # Create the artifact - create_artifact = { - name = artifact_shankha_conch_name - description = artifact_shankha_conch_description - template = branch_hinduism_template - type = pedestal - visuals = small_box - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = shankha_conch_modifier - save_scope_as = newly_created_artifact - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = conch - set_variable = { - name = relic - value = flag:hinduism - } - save_scope_as = epic - } -} - -create_artifact_skull_cap_charlemagne_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - name = skull_cap_charlemagne_name - description = skull_cap_charlemagne_description - template = general_unique_template - type = pedestal - visuals = head - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = skull_cap_charlemagne_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - } -} - -create_artifact_essen_crown_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - set_artifact_rarity_famed = yes - - # Create the artifact - create_artifact = { - name = essen_crown_name - description = essen_crown_description - type = pedestal - wealth = scope:wealth - quality = scope:quality - visuals = hre_crown - template = general_unique_template - history = { - type = created - date = 983.1.1 - recipient = character:1288 #Otto III - location = province:2677 #Essen - } - modifier = essen_crown_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - add_artifact_title_history = { - target = title:e_hre - date = 1002.1.23 - } - set_variable = { - name = artifact_succession_title - value = title:e_hre - } - } -} - -create_artifact_dhammapada_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_famed = yes - - # Create the artifact - create_artifact = { - name = dhammapada_name - description = dhammapada_description - type = book - visuals = indian_book - wealth = scope:wealth - quality = scope:quality - template = general_unique_template - history = { - type = created_before_history - } - modifier = dhammapada_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = dhammapada - save_scope_as = epic - } -} - -create_artifact_vinaya_pitaka_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_famed = yes - - # Create the artifact - create_artifact = { - name = vinaya_pitaka_name - description = vinaya_pitaka_description - type = book - visuals = indian_book - wealth = scope:wealth - quality = scope:quality - template = general_unique_template - history = { - type = created_before_history - } - modifier = vinaya_pitaka_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = vinaya_pitaka - save_scope_as = epic - } -} - -create_artifact_sutta_pitaka_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_famed = yes - - # Create the artifact - create_artifact = { - name = sutta_pitaka_name - description = sutta_pitaka_description - type = book - visuals = indian_book - wealth = scope:wealth - quality = scope:quality - template = general_unique_template - history = { - type = created_before_history - } - modifier = sutta_pitaka_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = sutta_pitaka - save_scope_as = epic - } -} - -create_artifact_abhidhamma_pitaka_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_famed = yes - - # Create the artifact - create_artifact = { - name = abhidhamma_pitaka_name - description = abhidhamma_pitaka_description - type = book - visuals = indian_book - wealth = scope:wealth - quality = scope:quality - template = general_unique_template - history = { - type = created_before_history - } - modifier = abhidhamma_pitaka_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = abhidhamma - save_scope_as = epic - } -} - -create_artifact_qadib_al_mulk_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - name = qadib_al_mulk_name - description = qadib_al_mulk_description - template = regalia_template - type = regalia - visuals = regalia - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - date = 670.1.1 #To order entries correctly - } - modifier = qadib_al_mulk_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = qadib_al_mulk - save_scope_as = epic - set_variable = { - name = artifact_succession_title - value = title:d_shiite #Caliphate - } - add_artifact_title_history = { - target = title:d_shiite #Caliphate - date = 881.1.1 - } - } -} - -create_artifact_al_dawat_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - name = al_dawat_name - description = al_dawat_description - template = general_unique_template - type = pedestal - visuals = small_box - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - date = 670.1.1 #To order entries correctly - } - modifier = al_dawat_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = al_dawat - set_variable = { - name = artifact_succession_title - value = title:d_shiite #Caliphate - } - save_scope_as = epic - add_artifact_title_history = { - target = title:d_shiite #Caliphate - date = 881.1.1 - } - } -} - -create_artifact_al_hafir_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - name = al_hafir_name - description = al_hafir_description - template = general_unique_template - type = pedestal - visuals = diamond - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - date = 670.1.1 #To order entries correctly - } - modifier = al_hafir_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = al_hafir - set_variable = { - name = artifact_succession_title - value = title:d_shiite #Caliphate - } - save_scope_as = epic - add_artifact_title_history = { - target = title:d_shiite #Caliphate - date = 881.1.1 - } - } -} - -create_artifact_al_sayf_al_khass_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - name = al_sayf_al_khass_name - description = al_sayf_al_khass_description - template = general_unique_template - type = pedestal - visuals = wall_muhammad_sword - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - date = 670.1.1 #To order entries correctly - } - modifier = al_sayf_al_khass_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = al_sayf_al_khass - save_scope_as = epic - set_variable = { - name = artifact_succession_title - value = title:d_shiite #Caliphate - } - add_artifact_title_history = { - target = title:d_shiite #Caliphate - date = 881.1.1 - } - } -} - -create_artifact_durendal_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_famed = yes - - # Create the artifact - create_artifact = { - name = artifact_durendal_name - description = artifact_durendal_description - template = general_unique_template - type = pedestal - visuals = wall_cid_sword - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = durendal_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = durendal - save_scope_as = epic - } -} - -create_artifact_nagelring_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_famed = yes - - # Create the artifact - create_artifact = { - name = artifact_nagelring_name - description = artifact_nagelring_description - template = general_unique_template - type = pedestal - visuals = wall_cid_sword - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = nagelring_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = nagelring - save_scope_as = epic - } -} - -create_artifact_szczerbiec_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - name = artifact_szczerbiec_name - description = artifact_szczerbiec_description - template = general_unique_template - type = pedestal - visuals = wall_szczerbiec_sword - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = szczerbiec_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = szczerbiec - save_scope_as = epic - } -} - -create_artifact_kladenets_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_famed = yes - - # Create the artifact - create_artifact = { - name = artifact_kladenets_name - description = artifact_kladenets_description - template = general_unique_template - type = pedestal - visuals = sword_court - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = kladenets_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = kladenets - save_scope_as = epic - } -} - -create_artifact_legbiter_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - name = artifact_legbiter_name - description = artifact_legbiter_description - template = general_unique_template - type = pedestal - visuals = sword_court - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = legbiter_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = legbiter - save_scope_as = epic - } -} - -create_artifact_quernbiter_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - name = artifact_quernbiter_name - description = artifact_quernbiter_description - template = general_unique_template - type = pedestal - visuals = sword_court - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = quernbiter_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = quernbiter - save_scope_as = epic - } -} - -create_artifact_dragvandil_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - name = artifact_dragvandil_name - description = artifact_dragvandil_description - template = general_unique_template - type = pedestal - visuals = sword_court - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = dragvandil_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = dragvandil - save_scope_as = epic - } -} - -create_artifact_curtana_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - name = artifact_curtana_name - description = artifact_curtana_description - template = general_unique_template - type = pedestal - visuals = sword_court - wealth = scope:wealth - quality = scope:quality - history = { - type = created - date = 1042.6.9 - recipient = character:114 #Eadward the Confessor - location = province:1527 #Lunden - } - modifier = curtana_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = curtana - save_scope_as = epic - add_artifact_title_history = { - target = title:k_england - date = 1066.1.5 - } - } -} - -create_colada_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_famed = yes - - # Create the artifact - create_artifact = { - name = artifact_colada_name - description = artifact_colada_description - template = general_unique_template - type = pedestal - visuals = sword_court - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = colada_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = colada - save_scope_as = epic - } -} - -create_artifact_angelicas_ring_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_famed = yes - - # Create the artifact - create_artifact = { - name = artifact_ring_angelica_name - description = artifact_ring_angelica_description - template = general_unique_template - type = pedestal - visuals = ring_court - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = angelicas_ring_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = angelica_ring - save_scope_as = epic - } -} - -create_artifact_olifant_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_famed = yes - - # Create the artifact - create_artifact = { - name = artifact_olifant_name - description = artifact_olifant_description - template = general_unique_template - type = pedestal - visuals = olifant_court - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = olifant_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = olifant - add_artifact_modifier = artifact_courtier_and_guest_opinion_4_modifier - add_artifact_modifier = artifact_court_grandeur_baseline_add_3_modifier - save_scope_as = epic - } -} - -create_artifact_aram_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_famed = yes - - # Create the artifact - create_artifact = { - name = artifact_aram_name - description = artifact_aram_description - template = general_unique_template - type = pedestal - visuals = spear_court - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = aram_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = aram - save_scope_as = epic - } -} - -create_artifact_sledovik_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - name = artifact_sledovik_name - description = artifact_sledovik_description - visuals = rock - type = pedestal - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - template = relic_finno_ugric_template - modifier = sledovik_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = { - name = relic - value = flag:finno_ugric_religion - } - add_artifact_modifier = artifact_court_grandeur_baseline_add_2_modifier - save_scope_as = epic - } -} - -create_artifact_kantele_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_famed = yes - - # Create the artifact - create_artifact = { - name = artifact_kantele_name - description = artifact_kantele_description - visuals = pedestal_david_harp - type = pedestal - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - template = relic_finno_ugric_template - modifier = kantele_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = kantele - set_variable = { - name = relic - value = flag:finno_ugric_religion - } - save_scope_as = epic - } -} - -#Illustrious Artifacts - -create_artifact_pedestal_david_harp_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - name = artifact_pedestal_david_harp_name - description = artifact_pedestal_david_harp - type = pedestal - template = david_harp_template - visuals = pedestal_david_harp - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - location = province:5965 #Jerusalem - } - modifier = david_harp_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = david_harp - save_scope_as = epic - } -} - -create_artifact_joyeuse_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - name = artifact_joyeuse_name - description = artifact_joyeuse_description - template = general_unique_template - type = pedestal - visuals = wall_cid_sword - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = joyeuse_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = joyeuse - save_scope_as = epic - } -} - -create_artifact_papal_tiara_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - name = papal_tiara_name - description = papal_tiara_description - template = papal_tiara_template - type = helmet - visuals = pope_tiara - wealth = scope:wealth - quality = scope:quality - history = { - type = created - date = 800.1.1 - recipient = character:7862 #Leo III - fictitious date, probably somewhere between the 8th and 9th centuries - location = province:2575 #Rome - } - modifier = artifact_monthly_piety_4_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = { - name = relic - value = flag:christian - } - set_variable = { - name = artifact_succession_title - value = title:k_papal_state - } - set_variable = { - name = pope_hat - value = yes - } - add_artifact_title_history = { - target = title:k_papal_state - date = 816.6.12 - } - add_artifact_modifier = artifact_monthly_learning_lifestyle_xp_2_modifier - } -} - -create_artifact_sculpture_ark_of_covenant_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - name = artifact_sculpture_ark_of_covenant_name - description = artifact_sculpture_ark_of_covenant_description - type = sculpture - template = ark_covenant_template - visuals = sculpture_ark_of_covenant - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = ark_of_covenant_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = ark_of_the_covenant - save_scope_as = epic - save_scope_value_as = { - name = ark_covenant - value = yes - } - } -} - -create_artifact_pedestal_koh_i_noor_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - name = artifact_pedestal_koh_i_noor_name - description = artifact_pedestal_koh_i_noor_description - template = general_unique_template - type = pedestal - visuals = diamond - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = koh_i_noor - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = koh_i_noor - save_scope_as = epic - } -} - -create_artifact_al_taj_crown_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - name = al_taj_crown_name - description = al_taj_crown_description - template = crown_wearable_template - type = helmet - visuals = al_taj_crown - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - date = 670.1.1 #To order entries correctly - } - modifier = al_taj_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = al_taj - save_scope_as = epic - set_variable = { - name = artifact_succession_title - value = title:d_shiite #Caliphate - } - add_artifact_title_history = { - target = title:d_shiite #Caliphate - date = 881.1.1 - } - } -} - -create_artifact_wall_banner_thankfulness_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - name = artifact_wall_banner_thankfulness_name - description = artifact_wall_banner_thankfulness_description - template = banner_thankfulness - type = wall_big - visuals = banner_islam - visuals_source = title:d_sunni - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - date = 670.1.1 #To order entries correctly - } - modifier = banner_thankfulness - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = banner_thankfulness - save_scope_as = epic - set_variable = { - name = artifact_succession_title - value = title:d_shiite #Caliphate - } - add_artifact_title_history = { - target = title:d_shiite #Caliphate - date = 881.1.1 - } - } -} - -create_artifact_arms_of_alexander_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - name = artifact_arms_of_alex_name - description = artifact_arms_of_alex_description - template = general_unique_template - type = pedestal - visuals = pedestal_alexander_armor - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = alexander_the_great_armor_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = arms_of_alex - save_scope_as = epic - } -} - -create_artifact_turquoise_throne_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - type = throne_special - template = general_unique_template - visuals = throne_turquoise - wealth = scope:wealth - quality = scope:quality - name = turquoise_throne_name - description = turquoise_throne_description - history = { - type = created_before_history - } - modifier = turquoise_throne_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = turquoise_throne - save_scope_as = epic - } -} - -create_artifact_peacock_throne_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - type = throne_special - template = general_unique_template - visuals = throne_peacock - wealth = scope:wealth - quality = scope:quality - name = peacock_throne_name - description = peacock_throne_description - history = { - type = created_before_history - } - modifier = peacock_throne_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = peacock_throne - save_scope_as = epic - } -} - -create_artifact_spear_of_the_prophet_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - name = artifact_spear_of_the_prophet_name - description = artifact_spear_of_the_prophet_description - type = pedestal - visuals = spear_court - template = islam_artifact_template - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = spear_prophet_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = spear_of_the_prophet - save_scope_as = epic - set_variable = { - name = artifact_succession_title - value = title:d_sunni - } - } -} - -create_artifact_mantle_of_the_prophet_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - name = artifact_mantle_of_the_prophet_islam_name - description = artifact_mantle_of_the_prophet_description - template = islam_artifact_template - type = regalia_simple - visuals = regalia - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = mantle_prophet_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = { - name = relic - value = flag:islamic - } - set_variable = mantle_of_prophet - save_scope_as = epic - set_variable = { - name = artifact_succession_title - value = title:d_sunni - } - } -} - -create_artifact_sculpture_babr_e_bayan_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - name = artifact_sculpture_armor_babr_name - description = artifact_sculpture_armor_babr - type = sculpture - template = babr_template - visuals = sculpture_babr_e_bayan - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = babr_e_bayan_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = babr_e_bayan - save_scope_as = epic - } -} - -create_artifact_pedestal_justinian_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - name = artifact_pedestal_crown_justinian_name - description = artifact_pedestal_crown_justinian - type = pedestal - template = justinian_template - visuals = pedestal_justinian - wealth = scope:wealth - quality = scope:quality - history = { - type = created - date = 527.4.1 - recipient = character:70512 #Justinian the Great - location = province:496 #Constantinople - } - modifier = justinian_crown_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = crown_of_justinian - add_artifact_title_history = { - target = title:e_byzantium - date = 565.11.14 - } - save_scope_as = epic - } -} - -create_artifact_statue_constantine_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_famed = yes - - # Create the artifact - create_artifact = { - name = artifact_statue_constantine_name - description = artifact_statue_constantine - type = sculpture - visuals = statue_constantine - wealth = scope:wealth - quality = scope:quality - template = statue_constantine_template - history = { - type = created - date = 330.1.1 - recipient = character:70523 #Constantine the Great - location = province:496 #Constantinople - } - modifier = statue_constantine_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = statue_constantine - save_scope_as = epic - add_artifact_title_history = { - target = title:e_byzantium - date = 330.1.1 - } - } -} - -create_artifact_tree_automa_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - name = artifact_tree_automa_name - description = artifact_tree_automa - type = pedestal - visuals = tree_automa - wealth = scope:wealth - quality = scope:quality - template = tree_automa_template - history = { - type = created_before_history - } - modifier = tree_automa_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - #set_variable = tree_automa - save_scope_as = epic - add_artifact_title_history = { - target = title:e_byzantium - date = 940.1.1 - } - } -} - -create_artifact_statue_four_tetrarchs_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - set_artifact_rarity_famed = yes - - # Create the artifact - create_artifact = { - name = artifact_statue_four_tetrarchs_name - description = artifact_statue_four_tetrarchs_desc - type = wall_small - visuals = statue_four_tetarchs - wealth = scope:wealth - quality = scope:quality - template = tree_automa_template - history = { - type = created_before_history - } - modifier = statue_four_tetrarchs_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - save_scope_as = epic - add_artifact_title_history = { - target = title:e_byzantium - date = 940.1.1 - } - } -} - -create_artifact_statue_roman_woman_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - set_artifact_rarity_famed = yes - - # Create the artifact - create_artifact = { - name = artifact_statue_roman_woman_name - description = artifact_statue_roman_woman_desc - type = sculpture - visuals = statue_roman_woman - wealth = scope:wealth - quality = scope:quality - template = statue_roman_woman_template - history = { - type = created_before_history - } - modifier = statue_roman_woman_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - save_scope_as = epic - add_artifact_title_history = { - target = title:e_byzantium - date = 940.1.1 - } - } -} - -create_artifact_hydraulic_organ_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - name = artifact_hydraulic_organ_name - description = artifact_hydraulic_organ_desc - type = sculpture - visuals = hydraulic_organ - wealth = scope:wealth - quality = scope:quality - template = hydraulic_organ_template - history = { - type = created_before_history - } - modifier = hydraulic_organ_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - save_scope_as = epic - add_artifact_title_history = { - target = title:e_byzantium - date = 940.1.1 - } - } -} - -create_artifact_heirloom_seal_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Get artifact quality and wealth - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - name = heirloom_seal.name - description = heirloom_seal.desc - creator = scope:owner - visuals = special_seal - type = seal_of_investiture_court - wealth = scope:wealth - quality = scope:quality - modifier = heirloom_seal_modifier - save_scope_as = newly_created_artifact - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = heirloom_seal - save_scope_as = epic - add_artifact_title_history = { - target = title:h_china - date = 1.1.1 #Actually 221 BCE - } - } -} - -create_artifact_military_classics_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_masterwork = yes - - # Create the artifact - create_artifact = { - name = artifact_military_classics_name - description = artifact_military_classics_description - type = book - visuals = book - wealth = scope:wealth - quality = scope:quality - template = general_unique_template - history = { - type = created_before_history - } - modifier = complete_essentials_for_the_military_classics - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = military_classics - add_artifact_title_history = { - target = title:h_china - date = 1044.1.1 - } - save_scope_as = epic - } -} - -create_artifact_eight_fold_chest_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - name = artifact_eight_fold_chest_name - description = artifact_eight_fold_chest_description - template = buddhism_relic_template - type = pedestal - visuals = small_box - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = eight_fold_chest_modifier - save_scope_as = newly_created_artifact - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = eight_fold_chest - set_variable = { - name = relic - value = flag:buddhism - } - add_artifact_title_history = { - target = title:h_china - date = 650.1.1 - } - save_scope_as = epic - } -} - - -create_artifact_chinese_armillary_sphere_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_famed = yes - - # Create the artifact - create_artifact = { - name = artifact_armillary_sphere_china_name - description = artifact_armillary_sphere_china_desc - type = scientific_apparatus - visuals = fp2_armillary_sphere - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = artifact_chinese_armillary_sphere - save_scope_as = newly_created_artifact - decaying = no - } - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = chinese_armillary_sphere - save_scope_as = epic - add_artifact_title_history = { - target = title:h_china - date = 125.1.1 - } - } -} - -create_artifact_pedestal_baekje_incense_burner_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_famed = yes - - # Create the artifact - create_artifact = { - name = artifact_pedestal_baekje_incense_burner_name - description = artifact_pedestal_baekje_incense_burner_description - type = pedestal - template = general_unique_template - visuals = incense_burner_artifact - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = insence_burner_modifier - save_scope_as = newly_created_artifact - decaying = no - } - - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - set_variable = baekje_incense_burner - save_scope_as = epic - } -} - -create_artifact_pedestal_sakanoue_sword_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_famed = yes - # Create the artifact - create_artifact = { - name = artifact_pedestal_sakanoue_sword_name - description = artifact_pedestal_sakanoue_sword_desc - type = pedestal - visuals = pedestal_sword_japan_single - wealth = scope:wealth - quality = scope:quality - history = { - type = created - date = 785.1.1 - recipient = character:japanese_sakanoue_1 # Sakanoue Tamuramaro - location = province:10603 # Kyoto - } - modifier = sakanoue_sword_modifier - save_scope_as = newly_created_artifact - decaying = no - } - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - add_artifact_history = { - type = given - date = 811.6.17 - recipient = character:japanese_yamato_26 # Emperor Saga - } - add_artifact_title_history = { - target = title:k_chrysanthemum_throne - date = 811.6.17 - } - } -} - -create_artifact_higekiri_sword_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_masterwork = yes - # Create the artifact - create_artifact = { - name = artifact_higekiri_sword_name - description = artifact_higekiri_sword_desc - type = sword - visuals = japanese_sword - wealth = scope:wealth - quality = scope:quality - history = { - type = created - date = 950.1.1 - recipient = character:japanese_minamoto_seiwa_3 # Minamoto Mitsunaka - location = province:10528 # Dazaifu (Chikuzen) - } - modifier = higekiri_sword_modifier - save_scope_as = newly_created_artifact - decaying = no - } - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - add_artifact_title_history = { - target = title:c_nf_minamoto_kawachi - date = 1021.1.1 - } - } -} - -create_artifact_hizamaru_sword_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_masterwork = yes - # Create the artifact - create_artifact = { - name = artifact_hizamaru_sword_name - description = artifact_hizamaru_sword_desc - type = sword - visuals = japanese_sword - wealth = scope:wealth - quality = scope:quality - history = { - type = created - date = 950.1.1 - recipient = character:japanese_minamoto_seiwa_3 # Minamoto Mitsunaka - location = province:10528 # Dazaifu (Chikuzen) - } - modifier = hizamaru_sword_modifier - save_scope_as = newly_created_artifact - decaying = no - } - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - } -} - -create_artifact_dojigiri_sword_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_masterwork = yes - # Create the artifact - create_artifact = { - name = artifact_dojigiri_sword_name - description = artifact_dojigiri_sword_desc - type = sword - visuals = japanese_sword - wealth = scope:wealth - quality = scope:quality - history = { - type = created - date = 880.1.1 - recipient = character:japanese_fujiwara_577 # Fujiwara Toshihito - location = province:10627 # Kume (Hoki) - } - modifier = dojigiri_sword_modifier - save_scope_as = newly_created_artifact - decaying = no - } - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - } -} - -create_artifact_mikazuki_munechika_sword_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_masterwork = yes - # Create the artifact - create_artifact = { - name = artifact_mikazuki_munechika_sword_name - description = artifact_mikazuki_munechika_sword_desc - type = sword - visuals = japanese_sword - wealth = scope:wealth - quality = scope:quality - history = { - type = created - date = 980.1.1 - recipient = character:japanese_fujiwara_84 # Kampaku Yoritada - location = province:10603 # Kyoto (Sanjo) - } - modifier = mikazuki_munechika_sword_modifier - save_scope_as = newly_created_artifact - decaying = no - } - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - } -} - -create_artifact_odenta_sword_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_masterwork = yes - # Create the artifact - create_artifact = { - name = artifact_odenta_sword_name - description = artifact_odenta_sword_desc - type = sword - visuals = japanese_sword - wealth = scope:wealth - quality = scope:quality - history = { - type = created - date = 1082.1.1 - recipient = character:japanese_fujiwara_84 # Kampaku Yoritada - location = province:10533 # Mii (Chikugo) - } - modifier = odenta_sword_modifier - save_scope_as = newly_created_artifact - decaying = no - } - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - } -} - -create_artifact_pedestal_hamayumi_bow_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_masterwork = yes - # Create the artifact - create_artifact = { - name = artifact_pedestal_hamayumi_bow_name - description = artifact_pedestal_hamayumi_bow_desc - type = pedestal - visuals = japan_bow - wealth = scope:wealth - quality = scope:quality - history = { - type = created - date = 1145.1.1 - recipient = character:japanese_minamoto_seiwa_59 # Minamoto Yorimasa - location = province:10603 # Kyoto - } - modifier = hamayumi_bow_modifier - save_scope_as = newly_created_artifact - } - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - add_artifact_history = { - type = given - date = 1150.1.1 - recipient = character:japanese_yamato_50 # Emperor Konoe - } - add_artifact_title_history = { - target = title:k_chrysanthemum_throne - date = 1150.1.1 - } - } -} - -create_artifact_pedestal_seven_branched_sword_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_illustrious = yes - # Create the artifact - create_artifact = { - name = artifact_pedestal_seven_branched_sword_name - description = artifact_pedestal_seven_branched_sword_desc - type = pedestal - visuals = seven_branched_sword_artifact - wealth = scope:wealth - quality = scope:quality - history = { type = created_before_history } - modifier = seven_branched_sword_modifier - save_scope_as = newly_created_artifact - decaying = no - } - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - add_artifact_history = { - type = given - date = 503.3.3 - recipient = character:japanese_yamato_192 # Emperor Keitai - } - add_artifact_title_history = { - target = title:k_chrysanthemum_throne - date = 503.3.3 - } - } -} - -create_artifact_pedestal_gyerimro_dagger_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_illustrious = yes - # Create the artifact - create_artifact = { - name = artifact_pedestal_gyerimro_dagger_name - description = artifact_pedestal_gyerimro_dagger_desc - type = pedestal - visuals = gyerimro_dagger_artifact - wealth = scope:wealth - quality = scope:quality - history = { type = created_before_history } - modifier = gyerimro_dagger_modifier - save_scope_as = newly_created_artifact - decaying = no - } - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - } -} - -create_artifact_karakawa_armor_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_famed = yes - # Create the artifact - create_artifact = { - name = artifact_karakawa_armor_name - description = artifact_karakawa_armor_desc - type = armor_brigandine - visuals = armor_japan - wealth = scope:wealth - quality = scope:quality - history = { type = created_before_history } - modifier = karakawa_armor_modifier - save_scope_as = newly_created_artifact - decaying = no - } - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - } -} - -create_artifact_nukemaru_sword_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_masterwork = yes - # Create the artifact - create_artifact = { - name = artifact_nukemaru_sword_name - description = artifact_nukemaru_sword_desc - type = sword - visuals = japanese_sword - wealth = scope:wealth - quality = scope:quality - history = { type = created_before_history } - modifier = nukemaru_sword_modifier - save_scope_as = newly_created_artifact - decaying = no - } - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - add_artifact_history = { - type = given - date = 1120.1.1 - recipient = character:japanese_taira_kanmu_32 # Tadamori - } - } -} - -create_artifact_kogarasumaru_sword_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_famed = yes - # Create the artifact - create_artifact = { - name = artifact_kogarasumaru_sword_name - description = artifact_kogarasumaru_sword_desc - type = sword - visuals = japanese_sword - wealth = scope:wealth - quality = scope:quality - history = { - type = created - date = 940.1.1 - recipient = character:japanese_yamato_35 # Suzaku - location = province:10603 # Kyoto - } - modifier = kogarasumaru_sword_modifier - save_scope_as = newly_created_artifact - decaying = no - } - scope:newly_created_artifact = { - set_variable = { name = historical_unique_artifact value = yes } - add_artifact_history = { - type = given - date = 945.1.1 - recipient = character:japanese_taira_kanmu_16 # Sadamori - } - } -} - diff --git a/N3OW/common/scripted_effects/02_dlc_ep1_decision_scripted_effects.txt b/N3OW/common/scripted_effects/02_dlc_ep1_decision_scripted_effects.txt deleted file mode 100644 index d2362d4e..00000000 --- a/N3OW/common/scripted_effects/02_dlc_ep1_decision_scripted_effects.txt +++ /dev/null @@ -1,37 +0,0 @@ -################################################## -# Court Grandeur -################################################## - -order_mass_eviction_decision_guests_only_effect = { - # Give us a neat tooltip. - show_as_tooltip = { - every_pool_guest = { - custom = custom.every_guest - move_to_pool = yes - } - } - # And actually do the moving. - hidden_effect = { - every_pool_guest = { select_and_move_to_pool_effect = yes } - } -} - -order_mass_eviction_decision_courtiers_&_guests_effect = { - # Give us a neat tooltip. - show_as_tooltip = { - every_courtier_or_guest = { - custom = custom.every_guest_and_unimportant_courtier - move_to_pool = yes - } - } - # And actually do the moving. - hidden_effect = { - every_pool_guest = { select_and_move_to_pool_effect = yes } - every_courtier = { - limit = { - order_mass_eviction_decision_evictable_courtier_trigger = yes - } - select_and_move_to_pool_effect = yes - } - } -} diff --git a/N3OW/common/scripted_effects/02_ep2_artifact_effects.txt b/N3OW/common/scripted_effects/02_ep2_artifact_effects.txt deleted file mode 100644 index d38bc9b3..00000000 --- a/N3OW/common/scripted_effects/02_ep2_artifact_effects.txt +++ /dev/null @@ -1,1364 +0,0 @@ -generate_romantic_trinket_effect = { - $OWNER$ = { save_scope_as = owner } #Will always exist! - random_list = { - 50 = { #lock of hair - create_artifact = { - name = lock_of_hair - description = lock_of_hair.desc - type = miscellaneous - visuals = medallion - modifier = artifact_seduce_scheme_phase_duration_mult_1_modifier - modifier = artifact_spouse_opinion_add_3_modifier - save_scope_as = romantic_trinket - wealth = 20 - quality = 20 - max_durability = 30 - generate_history = no - } - } - 50 = { #ribbon with house embrodery - create_artifact = { - name = house_ribbon - description = house_ribbon.desc - type = miscellaneous - visuals = pocket_fancy_case - modifier = artifact_monthly_dynasty_prestige_2_modifier - modifier = artifact_spouse_opinion_add_1_modifier - save_scope_as = romantic_trinket - wealth = 25 - quality = 25 - max_durability = 30 - generate_history = no - } - } - 50 = { #necklace with initials - create_artifact = { - name = initials_necklace - description = initials_necklace.desc - type = miscellaneous - visuals = necklace - modifier = artifact_monthly_prestige_2_modifier - modifier = artifact_spouse_opinion_add_3_modifier - save_scope_as = romantic_trinket - wealth = 40 - quality = 40 - max_durability = 30 - generate_history = no - } - } - 50 = { #brooch with marriage prayer - create_artifact = { - name = marriage_prayer_brooch - description = marriage_prayer_brooch.desc - type = miscellaneous - visuals = brooch - modifier = artifact_monthly_piety_2_modifier - modifier = artifact_spouse_opinion_add_3_modifier - save_scope_as = romantic_trinket - wealth = 35 - quality = 35 - max_durability = 30 - generate_history = no - } - } - 10 = { #wooden phallus - create_artifact = { - name = wooden_phallus - description = wooden_phallus.desc - type = miscellaneous - visuals = small_box - modifier = artifact_fertility_gain_2_modifier - modifier = artifact_spouse_opinion_add_4_modifier - save_scope_as = romantic_trinket - wealth = 20 - quality = 20 - max_durability = 30 - generate_history = no - } - } - } -} - -generate_tournament_trinket_effect = { - $TRINKET_RECEIVER$ = { save_scope_as = trinket_receiver } - $TRINKET_GIVER$ = { save_scope_as = trinket_giver } - - random_list = { - 50 = { # feather - create_artifact = { - name = feather_trinket - description = feather_trinket.desc - type = miscellaneous - visuals = bird_feather - modifier = artifact_courtly_vassal_opinion_3_modifier - modifier = artifact_attraction_opinion_2_modifier - save_scope_as = purchasable_trinket - wealth = 20 - quality = 20 - max_durability = 30 - generate_history = no - } - } - 50 = { # chess piece - create_artifact = { - name = chess_trinket - description = chess_trinket.desc - type = miscellaneous - visuals = pocket_figurine - modifier = artifact_monthly_dynasty_prestige_2_modifier - save_scope_as = purchasable_trinket - wealth = 25 - quality = 25 - max_durability = 30 - generate_history = no - } - } - 50 = { # ribbon - create_artifact = { - name = ribbon_trinket - description = ribbon_trinket.desc - type = miscellaneous - visuals = pocket_fancy_case - modifier = artifact_monthly_prestige_2_modifier - modifier = artifact_seduce_scheme_phase_duration_mult_1_modifier - save_scope_as = purchasable_trinket - wealth = 30 - quality = 30 - max_durability = 30 - generate_history = no - } - } - 50 = { # glass orb - create_artifact = { - name = glass_orb_trinket - description = glass_orb_trinket.desc - type = miscellaneous - visuals = flask - modifier = artifact_monthly_piety_2_modifier - save_scope_as = purchasable_trinket - wealth = 35 - quality = 35 - max_durability = 30 - generate_history = no - } - } - 50 = { # tapestry - create_artifact = { - name = tapestry_trinket - description = tapestry_trinket.desc - type = miscellaneous - visuals = tapestry - modifier = artifact_fertility_gain_2_modifier - save_scope_as = purchasable_trinket - wealth = 40 - quality = 40 - max_durability = 30 - generate_history = no - } - } - } -} - -generate_personalised_sword_effect = { - random_list = { - 5 = { - trigger = { - has_trait = brave - } - scope:artisanal_sword = { - add_artifact_modifier = artifact_prowess_4_modifier - } - } - 5 = { - trigger = { - has_trait = craven - } - scope:artisanal_sword = { - add_artifact_modifier = artifact_retreat_losses_4_modifier - } - } - 5 = { - trigger = { - has_trait = calm - } - scope:artisanal_sword = { - add_artifact_modifier = artifact_diplomacy_1_modifier - } - } - 5 = { - trigger = { - has_trait = wrathful - } - scope:artisanal_sword = { - add_artifact_modifier = artifact_pursue_efficiency_4_modifier - } - } - 5 = { - trigger = { - has_trait = chaste - } - scope:artisanal_sword = { - add_artifact_modifier = artifact_health_gain_2_modifier - } - } - 5 = { - trigger = { - has_trait = lustful - } - scope:artisanal_sword = { - add_artifact_modifier = artifact_seduce_scheme_phase_duration_add_4_modifier - } - } - 5 = { - trigger = { - has_trait = content - } - scope:artisanal_sword = { - add_artifact_modifier = artifact_courtier_and_guest_opinion_4_modifier - } - } - 5 = { - trigger = { - has_trait = ambitious - } - scope:artisanal_sword = { - add_artifact_modifier = artifact_owned_hostile_scheme_success_chance_add_4_modifier - } - } - 5 = { - trigger = { - has_trait = diligent - } - scope:artisanal_sword = { - add_artifact_modifier = artifact_development_growth_2_modifier - } - } - 5 = { - trigger = { - has_trait = lazy - } - scope:artisanal_sword = { - add_artifact_modifier = artifact_stress_gain_2_modifier - } - } - 5 = { - trigger = { - has_trait = fickle - } - scope:artisanal_sword = { - add_artifact_modifier = artifact_mercenary_hire_cost_mult_4_modifier - } - } - 5 = { - trigger = { - has_trait = stubborn - } - scope:artisanal_sword = { - add_artifact_modifier = artifact_stewardship_per_stress_level_2_modifier - } - } - 5 = { - trigger = { - has_trait = forgiving - } - scope:artisanal_sword = { - add_artifact_modifier = artifact_diplomacy_per_prestige_level_modifier - } - } - 5 = { - trigger = { - has_trait = vengeful - } - scope:artisanal_sword = { - add_artifact_modifier = artifact_intrigue_per_stress_level_2_modifier - } - } - 5 = { - trigger = { - has_trait = generous - } - scope:artisanal_sword = { - add_artifact_modifier = artifact_monthly_prestige_gain_per_happy_powerful_vassal_add_4_modifier - } - } - 5 = { - trigger = { - has_trait = greedy - } - scope:artisanal_sword = { - add_artifact_modifier = artifact_monthly_income_4_modifier - } - } - 5 = { - trigger = { - has_trait = gregarious - } - scope:artisanal_sword = { - add_artifact_modifier = artifact_befriend_scheme_phase_duration_add_4_modifier - } - } - 5 = { - trigger = { - has_trait = shy - } - scope:artisanal_sword = { - add_artifact_modifier = artifact_learning_per_stress_level_2_modifier - } - } - 5 = { - trigger = { - has_trait = honest - } - scope:artisanal_sword = { - add_artifact_modifier = artifact_short_reign_duration_mult_4_modifier - } - } - 5 = { - trigger = { - has_trait = deceitful - } - scope:artisanal_sword = { - add_artifact_modifier = artifact_intrigue_1_modifier - } - } - 5 = { - trigger = { - has_trait = humble - } - scope:artisanal_sword = { - add_artifact_modifier = artifact_powerful_vassal_opinion_4_modifier - } - } - 5 = { - trigger = { - has_trait = arrogant - } - scope:artisanal_sword = { - add_artifact_modifier = artifact_monthly_prestige_4_modifier - } - } - 5 = { - trigger = { - has_trait = just - } - scope:artisanal_sword = { - add_artifact_modifier = artifact_stewardship_1_modifier - } - } - 5 = { - trigger = { - has_trait = arbitrary - } - scope:artisanal_sword = { - add_artifact_modifier = artifact_tolerance_advantage_mod_4_modifier - } - } - 5 = { - trigger = { - has_trait = patient - } - scope:artisanal_sword = { - add_artifact_modifier = artifact_learning_1_modifier - } - } - 5 = { - trigger = { - has_trait = impatient - } - scope:artisanal_sword = { - add_artifact_modifier = artifact_scheme_resistance_add_2_modifier - } - } - 5 = { - trigger = { - has_trait = temperate - } - scope:artisanal_sword = { - add_artifact_modifier = artifact_levy_reinforcement_rate_2_modifier - } - } - 5 = { - trigger = { - has_trait = gluttonous - } - scope:artisanal_sword = { - add_artifact_modifier = artifact_fertility_gain_4_modifier - } - } - 5 = { - trigger = { - has_trait = trusting - } - scope:artisanal_sword = { - add_artifact_modifier = artifact_courtier_and_guest_opinion_4_modifier - } - } - 5 = { - trigger = { - has_trait = paranoid - } - scope:artisanal_sword = { - add_artifact_modifier = artifact_scheme_resistance_add_2_modifier - } - } - 5 = { - trigger = { - has_trait = zealous - } - scope:artisanal_sword = { - add_artifact_modifier = artifact_monthly_piety_4_modifier - } - } - 5 = { - trigger = { - has_trait = cynical - } - scope:artisanal_sword = { - add_artifact_modifier = artifact_different_faith_opinion_4_modifier - } - } - 5 = { - trigger = { - has_trait = compassionate - } - scope:artisanal_sword = { - add_artifact_modifier = artifact_general_opinion_1_modifier - } - } - 5 = { - trigger = { - has_trait = callous - } - scope:artisanal_sword = { - add_artifact_modifier = artifact_monthly_tyranny_4_modifier - } - } - 5 = { - trigger = { - has_trait = sadistic - } - scope:artisanal_sword = { - add_artifact_modifier = artifact_dread_gain_mult_4_modifier - } - } - } -} - -assign_sword_names_effect = { - random_list = { - 10 = { #Standard, male - trigger = { - NOT = { has_character_flag = sword_name_widowmaker } - is_female = no - } - add_character_flag = sword_name_widowmaker - } - 10 = { #Standard, female - trigger = { - NOT = { has_character_flag = sword_name_widowermaker } - is_female = yes - } - add_character_flag = sword_name_widowermaker - } - 10 = { #Standard - trigger = { - NOT = { has_character_flag = sword_name_slicer } - } - add_character_flag = sword_name_slicer - } - 10 = { #Standard - trigger = { - NOT = { has_character_flag = sword_name_dicer } - } - add_character_flag = sword_name_dicer - } - 10 = { #Standard - trigger = { - NOT = { has_character_flag = sword_name_kingsbane } - is_female = no - } - add_character_flag = sword_name_kingsbane - } - 10 = { #Standard - trigger = { - NOT = { has_character_flag = sword_name_queensbane } - is_female = yes - } - add_character_flag = sword_name_queensbane - } - - #TRAITS - 10 = { - trigger = { - NOT = { has_character_flag = sword_name_triumph } - has_trait = brave - } - add_character_flag = sword_name_triumph - } - 10 = { - trigger = { - NOT = { has_character_flag = sword_name_fears_bane } - has_trait = craven - } - add_character_flag = sword_name_fears_bane - } - 10 = { - trigger = { - NOT = { has_character_flag = sword_name_tranquility } - has_trait = calm - } - add_character_flag = sword_name_tranquility - } - 10 = { - trigger = { - NOT = { has_character_flag = sword_name_reaper } - has_trait = wrathful - } - add_character_flag = sword_name_reaper - } - 10 = { - trigger = { - NOT = { has_character_flag = sword_name_purity } - has_trait = chaste - } - add_character_flag = sword_name_purity - } - 10 = { - trigger = { - NOT = { has_character_flag = sword_name_beguiler } - has_trait = lustful - } - add_character_flag = sword_name_beguiler - } - 10 = { - trigger = { - NOT = { has_character_flag = sword_name_assurance } - has_trait = content - } - add_character_flag = sword_name_assurance - } - 10 = { - trigger = { - NOT = { has_character_flag = sword_name_fate } - has_trait = ambitious - } - add_character_flag = sword_name_fate - } - 10 = { - trigger = { - NOT = { has_character_flag = sword_name_grinder } - has_trait = diligent - } - add_character_flag = sword_name_grinder - } - 10 = { - trigger = { - NOT = { has_character_flag = sword_name_indolence } - has_trait = lazy - } - add_character_flag = sword_name_indolence - } - 10 = { - trigger = { - NOT = { has_character_flag = sword_name_quicksilver } - has_trait = fickle - } - add_character_flag = sword_name_quicksilver - } - 10 = { - trigger = { - NOT = { has_character_flag = sword_name_obstinate } - has_trait = stubborn - } - add_character_flag = sword_name_obstinate - } - 10 = { - trigger = { - NOT = { has_character_flag = sword_name_mercy } - has_trait = forgiving - } - add_character_flag = sword_name_mercy - } - 10 = { - trigger = { - NOT = { has_character_flag = sword_name_vengeance } - has_trait = vengeful - } - add_character_flag = sword_name_vengeance - } - 10 = { - trigger = { - NOT = { has_character_flag = sword_name_charity } - has_trait = generous - } - add_character_flag = sword_name_charity - } - 10 = { - trigger = { - NOT = { has_character_flag = sword_name_opulence } - has_trait = greedy - } - add_character_flag = sword_name_opulence - } - 10 = { - trigger = { - NOT = { has_character_flag = sword_name_amity } - has_trait = gregarious - } - add_character_flag = sword_name_amity - } - 10 = { - trigger = { - NOT = { has_character_flag = sword_name_solitude } - has_trait = shy - } - add_character_flag = sword_name_solitude - } - 10 = { - trigger = { - NOT = { has_character_flag = sword_name_candour } - has_trait = honest - } - add_character_flag = sword_name_candour - } - 10 = { - trigger = { - NOT = { has_character_flag = sword_name_deceiver } - has_trait = deceitful - } - add_character_flag = sword_name_deceiver - } - 10 = { - trigger = { - NOT = { has_character_flag = sword_name_humility } - has_trait = humble - } - add_character_flag = sword_name_humility - } - 10 = { - trigger = { - NOT = { has_character_flag = sword_name_glory } - has_trait = arrogant - } - add_character_flag = sword_name_glory - } - 10 = { - trigger = { - NOT = { has_character_flag = sword_name_justice } - has_trait = just - } - add_character_flag = sword_name_justice - } - 10 = { - trigger = { - NOT = { has_character_flag = sword_name_whimsy } - has_trait = arbitrary - } - add_character_flag = sword_name_whimsy - } - 10 = { - trigger = { - NOT = { has_character_flag = sword_name_serenity } - has_trait = patient - } - add_character_flag = sword_name_serenity - } - 10 = { - trigger = { - NOT = { has_character_flag = sword_name_ardent } - has_trait = impatient - } - add_character_flag = sword_name_ardent - } - 10 = { - trigger = { - NOT = { has_character_flag = sword_name_prudence } - has_trait = temperate - } - add_character_flag = sword_name_prudence - } - 10 = { - trigger = { - NOT = { has_character_flag = sword_name_devourer } - has_trait = gluttonous - } - add_character_flag = sword_name_devourer - } - 10 = { - trigger = { - NOT = { has_character_flag = sword_name_steadfast } - has_trait = trusting - } - add_character_flag = sword_name_steadfast - } - 10 = { - trigger = { - NOT = { has_character_flag = sword_name_safeguard } - has_trait = paranoid - } - add_character_flag = sword_name_safeguard - } - 10 = { - trigger = { - NOT = { has_character_flag = sword_name_faith } - has_trait = zealous - } - add_character_flag = sword_name_faith - } - 10 = { - trigger = { - NOT = { has_character_flag = sword_name_doubt } - has_trait = cynical - } - add_character_flag = sword_name_doubt - } - 10 = { - trigger = { - NOT = { has_character_flag = sword_name_clemency } - has_trait = compassionate - } - add_character_flag = sword_name_clemency - } - 10 = { - trigger = { - NOT = { has_character_flag = sword_name_malice } - has_trait = sadistic - } - add_character_flag = sword_name_malice - } - 10 = { - trigger = { - NOT = { has_character_flag = sword_name_desolation } - has_trait = callous - } - add_character_flag = sword_name_desolation - } - - # Non-Personality - 10 = { - trigger = { - NOT = { has_character_flag = sword_name_bloodletter } - has_trait = berserker - } - add_character_flag = sword_name_bloodletter - } - 10 = { - trigger = { - NOT = { has_character_flag = sword_name_fealty } - has_trait = loyal - } - add_character_flag = sword_name_fealty - } - 10 = { - trigger = { - NOT = { has_character_flag = sword_name_oathbreaker } - has_trait = disloyal - } - add_character_flag = sword_name_oathbreaker - } - 10 = { - trigger = { - NOT = { has_character_flag = sword_name_raconteur } - has_trait = lifestyle_poet - } - add_character_flag = sword_name_raconteur - } - - #CULTURE/FAITH - # From the Matter of France - 10 = { #The sword of Archbishop Turpin - trigger = { - NOT = { has_character_flag = sword_name_almace } - culture = { has_cultural_pillar = heritage_frankish } - } - add_character_flag = sword_name_almace - } - 10 = { #Oliver's sword - trigger = { - NOT = { has_character_flag = sword_name_hauteclere } - culture = { has_cultural_pillar = heritage_frankish } - } - add_character_flag = sword_name_hauteclere - } - 10 = { #Ganelon's Sword - trigger = { - NOT = { has_character_flag = sword_name_murgleis } - culture = { has_cultural_pillar = heritage_frankish } - has_trait = deceitful #C'est Ganelon, ce rat traître! - } - add_character_flag = sword_name_murgleis - } - 10 = { #Renaud de Montauban's sword - trigger = { - NOT = { has_character_flag = sword_name_flamberge } - culture = { has_cultural_pillar = heritage_frankish } - } - add_character_flag = sword_name_flamberge - } - - #From Arthurian myth - 10 = { #Lancelot's sword - trigger = { - NOT = { has_character_flag = sword_name_arondight } - OR = { - culture = { has_cultural_pillar = heritage_goidelic } - culture = { has_cultural_pillar = heritage_brythonic } - } - } - add_character_flag = sword_name_arondight - } - 10 = { #The sword Mordred stole and later killed Arthur with - trigger = { - NOT = { has_character_flag = sword_name_clarent } - has_trait = sadistic #lil bit of flavour - OR = { - culture = { has_cultural_pillar = heritage_goidelic } - culture = { has_cultural_pillar = heritage_brythonic } - } - } - add_character_flag = sword_name_clarent - } - 10 = { #Lancelot's dad's sword - trigger = { - NOT = { has_character_flag = sword_name_coreiseuse } - OR = { - culture = { has_cultural_pillar = heritage_goidelic } - culture = { has_cultural_pillar = heritage_brythonic } - } - } - add_character_flag = sword_name_coreiseuse - } - 10 = { #Gawain's sword - trigger = { - NOT = { has_character_flag = sword_name_galatine } - OR = { - culture = { has_cultural_pillar = heritage_goidelic } - culture = { has_cultural_pillar = heritage_brythonic } - } - } - add_character_flag = sword_name_galatine - } - - #General Mythical/Historical - 10 = { #From the Volsunga Saga - trigger = { - NOT = { has_character_flag = sword_name_gramr } - culture = { has_cultural_pillar = heritage_north_germanic } - } - add_character_flag = sword_name_gramr - } - 10 = { #From the Tyrfing Cycle - trigger = { - NOT = { has_character_flag = sword_name_tyrfing } - culture = { has_cultural_pillar = heritage_north_germanic } - } - add_character_flag = sword_name_tyrfing - } - 10 = { #Heime's sword - trigger = { - NOT = { has_character_flag = sword_name_blutgang } - culture = { has_cultural_pillar = heritage_north_germanic } - } - add_character_flag = sword_name_blutgang - } - 10 = { #The legendary sword given to the Prophet Muhammad - trigger = { - NOT = { has_character_flag = sword_name_zulfiqar } - has_religion = religion:islam_religion - } - add_character_flag = sword_name_zulfiqar - } - 10 = { #The sword that killed Medusa - trigger = { - NOT = { has_character_flag = sword_name_harpe } - culture = { has_cultural_pillar = heritage_byzantine } - } - add_character_flag = sword_name_harpe - } - 10 = { #Saint George's sword - trigger = { - NOT = { has_character_flag = sword_name_ascalon } - has_religion = religion:christianity_religion - } - add_character_flag = sword_name_ascalon - } - 10 = { #Brahma's sword - trigger = { - NOT = { has_character_flag = sword_name_asi } - has_religion = religion:hinduism_religion - } - add_character_flag = sword_name_asi - } - 10 = { #Fergus mac Róich's sword - trigger = { - NOT = { has_character_flag = sword_name_caladgolg } - culture = { has_cultural_pillar = heritage_goidelic } - } - add_character_flag = sword_name_caladgolg - } - 10 = { #The Answerer, Irish mythological sword - trigger = { - NOT = { has_character_flag = sword_name_fragarach } - culture = { has_cultural_pillar = heritage_goidelic } - } - add_character_flag = sword_name_fragarach - } - 10 = { #Ravana's sword, gifted by Shiva - trigger = { - NOT = { has_character_flag = sword_name_chandrahas } - has_religion = religion:hinduism_religion - } - add_character_flag = sword_name_chandrahas - } - 10 = { #Vishnu's sword - trigger = { - NOT = { has_character_flag = sword_name_nandaka } - has_religion = religion:hinduism_religion - } - add_character_flag = sword_name_nandaka - } - - #Just for fun - 5 = { - trigger = { - NOT = { has_character_flag = sword_name_old_pokey } - } - add_character_flag = sword_name_old_pokey - } - 5 = { #Arya Stark's sword - trigger = { # Lots of people name their swords - NOT = { has_character_flag = sword_name_needle } # Yeah, lots of... - } - add_character_flag = sword_name_needle - } - 5 = { - trigger = { - NOT = { has_character_flag = sword_name_stabitha } - } - add_character_flag = sword_name_stabitha - } - 5 = { #LOTR reference, because duh - trigger = { - NOT = { has_character_flag = sword_name_marsil } - } - add_character_flag = sword_name_marsil - } - } -} - -remove_sword_flags_effect = { - if = { - limit = { - has_character_flag = sword_name_widowmaker - } - remove_character_flag = sword_name_widowmaker - } - if = { - limit = { - has_character_flag = sword_name_widowermaker - } - remove_character_flag = sword_name_widowermaker - } - if = { - limit = { - has_character_flag = sword_name_slicer - } - remove_character_flag = sword_name_slicer - } - if = { - limit = { - has_character_flag = sword_name_dicer - } - remove_character_flag = sword_name_dicer - } - if = { - limit = { - has_character_flag = sword_name_kingsbane - } - remove_character_flag = sword_name_kingsbane - } - if = { - limit = { - has_character_flag = sword_name_queensbane - } - remove_character_flag = sword_name_queensbane - } - if = { - limit = { - has_character_flag = sword_name_almace - } - remove_character_flag = sword_name_almace - } - if = { - limit = { - has_character_flag = sword_name_hauteclere - } - remove_character_flag = sword_name_hauteclere - } - if = { - limit = { - has_character_flag = sword_name_murgleis - } - remove_character_flag = sword_name_murgleis - } - if = { - limit = { - has_character_flag = sword_name_flamberge - } - remove_character_flag = sword_name_flamberge - } - if = { - limit = { - has_character_flag = sword_name_arondight - } - remove_character_flag = sword_name_arondight - } - if = { - limit = { - has_character_flag = sword_name_clarent - } - remove_character_flag = sword_name_clarent - } - if = { - limit = { - has_character_flag = sword_name_coreiseuse - } - remove_character_flag = sword_name_coreiseuse - } - if = { - limit = { - has_character_flag = sword_name_galatine - } - remove_character_flag = sword_name_galatine - } - if = { - limit = { - has_character_flag = sword_name_gramr - } - remove_character_flag = sword_name_gramr - } - if = { - limit = { - has_character_flag = sword_name_tyrfing - } - remove_character_flag = sword_name_tyrfing - } - if = { - limit = { - has_character_flag = sword_name_zulfiqar - } - remove_character_flag = sword_name_zulfiqar - } - if = { - limit = { - has_character_flag = sword_name_harpe - } - remove_character_flag = sword_name_harpe - } - if = { - limit = { - has_character_flag = sword_name_ascalon - } - remove_character_flag = sword_name_ascalon - } - if = { - limit = { - has_character_flag = sword_name_asi - } - remove_character_flag = sword_name_asi - } - if = { - limit = { - has_character_flag = sword_name_caladgolg - } - remove_character_flag = sword_name_caladgolg - } - if = { - limit = { - has_character_flag = sword_name_fragarach - } - remove_character_flag = sword_name_fragarach - } - if = { - limit = { - has_character_flag = sword_name_chandrahas - } - remove_character_flag = sword_name_chandrahas - } - if = { - limit = { - has_character_flag = sword_name_nandaka - } - remove_character_flag = sword_name_nandaka - } - if = { - limit = { - has_character_flag = sword_name_old_pokey - } - remove_character_flag = sword_name_old_pokey - } - if = { - limit = { - has_character_flag = sword_name_needle - } - remove_character_flag = sword_name_needle - } - if = { - limit = { - has_character_flag = sword_name_stabitha - } - remove_character_flag = sword_name_stabitha - } - if = { - limit = { - has_character_flag = sword_name_marsil - } - remove_character_flag = sword_name_marsil - } - if = { - limit = { - has_character_flag = sword_name_kingsbane - } - remove_character_flag = sword_name_kingsbane - } - if = { - limit = { - has_character_flag = sword_name_queensbane - } - remove_character_flag = sword_name_queensbane - } - if = { - limit = { - has_character_flag = sword_name_triumph - } - remove_character_flag = sword_name_triumph - } - if = { - limit = { - has_character_flag = sword_name_fears_bane - } - remove_character_flag = sword_name_fears_bane - } - if = { - limit = { - has_character_flag = sword_name_tranquility - } - remove_character_flag = sword_name_tranquility - } - if = { - limit = { - has_character_flag = sword_name_reaper - } - remove_character_flag = sword_name_reaper - } - if = { - limit = { - has_character_flag = sword_name_purity - } - remove_character_flag = sword_name_purity - } - if = { - limit = { - has_character_flag = sword_name_beguiler - } - remove_character_flag = sword_name_beguiler - } - if = { - limit = { - has_character_flag = sword_name_assurance - } - remove_character_flag = sword_name_assurance - } - if = { - limit = { - has_character_flag = sword_name_fate - } - remove_character_flag = sword_name_fate - } - if = { - limit = { - has_character_flag = sword_name_grinder - } - remove_character_flag = sword_name_grinder - } - if = { - limit = { - has_character_flag = sword_name_indolence - } - remove_character_flag = sword_name_indolence - } - if = { - limit = { - has_character_flag = sword_name_quicksilver - } - remove_character_flag = sword_name_quicksilver - } - if = { - limit = { - has_character_flag = sword_name_steadfast - } - remove_character_flag = sword_name_steadfast - } - if = { - limit = { - has_character_flag = sword_name_mercy - } - remove_character_flag = sword_name_mercy - } - if = { - limit = { - has_character_flag = sword_name_vengeance - } - remove_character_flag = sword_name_vengeance - } - if = { - limit = { - has_character_flag = sword_name_charity - } - remove_character_flag = sword_name_charity - } - if = { - limit = { - has_character_flag = sword_name_opulence - } - remove_character_flag = sword_name_opulence - } - if = { - limit = { - has_character_flag = sword_name_amity - } - remove_character_flag = sword_name_amity - } - if = { - limit = { - has_character_flag = sword_name_solitude - } - remove_character_flag = sword_name_solitude - } - if = { - limit = { - has_character_flag = sword_name_candour - } - remove_character_flag = sword_name_candour - } - if = { - limit = { - has_character_flag = sword_name_deceiver - } - remove_character_flag = sword_name_deceiver - } - if = { - limit = { - has_character_flag = sword_name_humility - } - remove_character_flag = sword_name_humility - } - if = { - limit = { - has_character_flag = sword_name_glory - } - remove_character_flag = sword_name_glory - } - if = { - limit = { - has_character_flag = sword_name_justice - } - remove_character_flag = sword_name_justice - } - if = { - limit = { - has_character_flag = sword_name_whimsy - } - remove_character_flag = sword_name_whimsy - } - if = { - limit = { - has_character_flag = sword_name_serenity - } - remove_character_flag = sword_name_serenity - } - if = { - limit = { - has_character_flag = sword_name_ardent - } - remove_character_flag = sword_name_ardent - } - if = { - limit = { - has_character_flag = sword_name_prudence - } - remove_character_flag = sword_name_prudence - } - if = { - limit = { - has_character_flag = sword_name_devourer - } - remove_character_flag = sword_name_devourer - } - if = { - limit = { - has_character_flag = sword_name_steadfast - } - remove_character_flag = sword_name_steadfast - } - if = { - limit = { - has_character_flag = sword_name_safeguard - } - remove_character_flag = sword_name_safeguard - } - if = { - limit = { - has_character_flag = sword_name_faith - } - remove_character_flag = sword_name_faith - } - if = { - limit = { - has_character_flag = sword_name_doubt - } - remove_character_flag = sword_name_doubt - } - if = { - limit = { - has_character_flag = sword_name_clemency - } - remove_character_flag = sword_name_clemency - } - if = { - limit = { - has_character_flag = sword_name_malice - } - remove_character_flag = sword_name_malice - } - if = { - limit = { - has_character_flag = sword_name_desolation - } - remove_character_flag = sword_name_desolation - } - if = { - limit = { - has_character_flag = sword_name_bloodletter - } - remove_character_flag = sword_name_bloodletter - } - if = { - limit = { - has_character_flag = sword_name_fealty - } - remove_character_flag = sword_name_fealty - } - if = { - limit = { - has_character_flag = sword_name_oathbreaker - } - remove_character_flag = sword_name_oathbreaker - } - if = { - limit = { - has_character_flag = sword_name_raconteur - } - remove_character_flag = sword_name_raconteur - } -} diff --git a/N3OW/common/scripted_effects/03_bp1_haunted_by_ghosts_effects.txt b/N3OW/common/scripted_effects/03_bp1_haunted_by_ghosts_effects.txt deleted file mode 100644 index ca9f0341..00000000 --- a/N3OW/common/scripted_effects/03_bp1_haunted_by_ghosts_effects.txt +++ /dev/null @@ -1,77 +0,0 @@ -################################################## - -# Scripted effect to determine what sin you have and what virtue you should strive for -bp1_yearly_9026_determine_sin_and_virtue = { - if = { - limit = { - OR = { - has_trait = greedy - has_trait = gluttonous - has_trait = chaste - } - } - random_owned_story = { - type = story_being_visited_by_angry_ghosts - set_variable = { - name = trait_to_gain - value = 1 #generous - } - } - } - else_if = { - limit = { - OR = { - has_trait = murderer - any_secret = { - type = secret_murder - } - has_trait = wrathful - has_trait = vengeful - } - } - random_owned_story = { - type = story_being_visited_by_angry_ghosts - set_variable = { - name = trait_to_gain - value = 2 # forgiving - } - } - } - else = { - random_owned_story = { - type = story_being_visited_by_angry_ghosts - set_variable = { - name = trait_to_gain - value = 3 #compassionate - } - } - } -} - -# Increase good deeds and give a tooltip for it -bp1_increase_good_deeds = { - custom_tooltip = { - text = bp1_increase_good_deeds_tt - random_owned_story = { - type = story_being_visited_by_angry_ghosts - change_variable = { - name = good_deeds - add = 1 - } - } - } -} - -# Increase good deeds and give a tooltip for it -bp1_decrease_good_deeds = { - custom_tooltip = { - text = bp1_decrease_good_deeds_tt - random_owned_story = { - type = story_being_visited_by_angry_ghosts - change_variable = { - name = good_deeds - subtract = 1 - } - } - } -} diff --git a/N3OW/common/scripted_effects/03_bp1_scripted_effects.txt b/N3OW/common/scripted_effects/03_bp1_scripted_effects.txt deleted file mode 100644 index 962d7cb7..00000000 --- a/N3OW/common/scripted_effects/03_bp1_scripted_effects.txt +++ /dev/null @@ -1,1223 +0,0 @@ -##### FAMILY FEUD ##### - -### START EFFECTS ### - -# Start Feud, set variables, modifiers, relations, and stress -house_feud_start_effect = { - # Save scopes - $ACTOR$.house.house_head = { save_scope_as = starter_house_head } - $TARGET$.house.house_head = { save_scope_as = house_feud_rival } - $ATTACKER$ = { save_scope_as = house_feud_attacker } - $VICTIM$ = { save_scope_as = house_feud_victim } - # Save extra scopes if relevant - save_scope_value_as = { - name = house_feud_reason - value = flag:$REASON$ - } - if = { - limit = { - scope:house_feud_reason = flag:competing_claim - NOT = { exists = scope:house_feud_claim } - } - scope:house_feud_victim = { - ordered_claim = { - limit = { any_claimant = { this = scope:house_feud_attacker } } - order_by = tier - save_scope_as = house_feud_claim - } - } - } - if = { - limit = { - scope:starter_house_head.house != scope:house_feud_rival.house - house_relation_is_valid_to_start_trigger = { - HOUSE = scope:starter_house_head.house - OTHER_HOUSE = scope:house_feud_rival.house - } - } - # Save target House for reference - scope:starter_house_head ?= { - house = { - set_house_relation = { - target = scope:house_feud_rival.house - level = feud - description = house_relation_reason_feud_$REASON$ - save_scope_as = relation - } - } - scope:relation ?= { - set_variable = { - name = house_feud_cooldown - years = 25 - } - } - } - scope:starter_house_head ?= { - # Relations: Nemesis if already Rivals, else Rival - if = { - limit = { - has_relation_rival = scope:house_feud_rival - NOT = { has_relation_nemesis = scope:house_feud_rival } - can_set_relation_nemesis_trigger = { CHARACTER = scope:house_feud_rival } - } - set_relation_nemesis = { - reason = nemesis_house_feud - copy_reason = rival - target = scope:house_feud_rival - } - } - else_if = { - limit = { - NOT = { has_relation_rival = scope:house_feud_rival } - } - set_relation_rival = { - target = scope:house_feud_rival - reason = rival_house_feud_start_of_feud - } - } - # Stress - stress_impact = { vengeful = minor_stress_impact_loss } - house_feud_forgiving_stress_effect = yes - } - # Save reasons for reference - scope:relation = { - # Save Feud attacker - set_variable = { name = house_feud_attacker value = scope:house_feud_attacker } - # Save Feud victim - set_variable = { name = house_feud_victim value = scope:house_feud_victim } - set_variable = { name = house_feud_house_1 value = scope:house_feud_attacker.house } - set_variable = { name = house_feud_house_2 value = scope:house_feud_victim.house } - # Save Feud starters - set_variable = { name = house_feud_house_1_first_head value = scope:starter_house_head } - set_variable = { name = house_feud_house_2_first_head value = scope:house_feud_rival } - set_variable = { name = house_feud_house_1_score value = 0 } - set_variable = { name = house_feud_house_2_score value = 0 } - # Save start reason flavor - set_variable = { name = house_feud_reason value = flag:$REASON$ } - # Move starting score/save flavor if relevant - if = { - limit = { exists = var:house_feud_reason } - switch = { - trigger = var:house_feud_reason - flag:head_killed = { - change_variable = { name = house_feud_house_1_score add = house_feud_medium_counter_value } - } - flag:family_killed = { - change_variable = { name = house_feud_house_1_score add = house_feud_medium_counter_value } - } - flag:head_cuckolded = { - change_variable = { name = house_feud_house_1_score add = house_feud_minor_counter_value } - } - flag:family_cuckolded = { - change_variable = { name = house_feud_house_1_score add = house_feud_minor_counter_value } - } - flag:competing_claim = { - set_variable = { name = house_feud_title value = scope:house_feud_claim } - } - flag:head_tortured = { - if = { - limit = { - scope:house_feud_victim = { has_character_flag = house_feud_blinding_flag } - } - set_variable = { name = house_feud_reason value = flag:head_blinded } - } - else_if = { - limit = { - scope:house_feud_victim = { has_character_flag = house_feud_castration_flag } - } - set_variable = { name = house_feud_reason value = flag:head_castrated } - } - } - flag:family_tortured = { - if = { - limit = { - scope:house_feud_victim = { has_character_flag = house_feud_blinding_flag } - } - set_variable = { name = house_feud_reason value = flag:family_blinded } - } - else_if = { - limit = { - scope:house_feud_victim = { has_character_flag = house_feud_castration_flag } - } - set_variable = { name = house_feud_reason value = flag:family_castrated } - } - } - flag:head_cuckolded = { - if = { - limit = { NOT = { exists = scope:house_feud_spouse } } - scope:house_feud_victim = { random_spouse = { save_scope_as = house_feud_spouse } } - } - set_variable = { name = house_feud_spouse value = scope:house_feud_spouse } - } - flag:family_broke_gw_betrothal = { - if = { - limit = { scope:starter_house_head = scope:house_feud_victim } - set_variable = { name = house_feud_reason value = flag:head_broke_gw_betrothal } - } - } - } - } - # Invalidate exit - if = { - limit = { - NAND = { - exists = var:house_feud_house_1 - exists = var:house_feud_house_2 - exists = var:house_feud_house_1_first_head - exists = var:house_feud_house_2_first_head - exists = var:house_feud_house_1_score - exists = var:house_feud_house_2_score - exists = var:house_feud_reason - } - } - # Variable is missing! Ending story prematurely. - debug_log = "House Feud invalidated" - debug_log_scopes = yes - end_story = yes - } - # Inform House Members feud has started - every_relation_house = { - every_house_member = { - limit = { is_ai = no } - # Explanatory Tooltips - send_interface_message = { - type = house_feud_begins_message - left_icon = scope:starter_house_head - right_icon = scope:house_feud_rival - show_as_tooltip = { - scope:starter_house_head = { - #Show as tooltip does not require a reason - if = { - limit = { has_relation_nemesis = scope:house_feud_rival } - set_relation_nemesis = scope:house_feud_rival - } - else = { set_relation_rival = scope:house_feud_rival } - } - } - } - # deprecated - #trigger_event = { - # id = bp1_house_feud.0600 - # days = 5 - #} - } - } - } - ### MEMORY - scope:starter_house_head ?= { - create_character_memory = { - type = house_feud_started_memory - participants = { - house_head = scope:house_feud_rival - attacker = scope:house_feud_attacker - victim = scope:house_feud_victim - } - } - ordered_memory = { - limit = { - has_memory_type = house_feud_started_memory - any_memory_participant = { this = scope:house_feud_rival } - } - order_by = memory_creation_date - set_variable = { - name = house_feud_reason - value = scope:relation.var:house_feud_reason - } - if = { - limit = { exists = scope:relation.var:house_feud_title } - set_variable = { - name = house_feud_title - value = scope:relation.var:house_feud_title - } - } - if = { - limit = { exists = scope:relation.var:house_feud_spouse } - set_variable = { - name = house_feud_spouse - value = scope:relation.var:house_feud_spouse - } - } - } - } - } -} - -### END EFFECTS ### - -# End current Feud -#house_feud_end_story_effect = { -# # Explanatory tooltip -# custom_tooltip = house_feud_end_tt -# # End Story Cycle -# random_owned_story = { -# limit = { story_type = story_cycle_house_feud } -# end_story = yes -# } -#} - -# Clear up and set modifiers based on Feud score or fallback -#house_feud_end_modifier_effect = { -# if = { -# limit = { -# NOT = { exists = scope:story } -# exists = house.house_head -# house.house_head = { -# any_owned_story = { story_type = story_cycle_house_feud } -# } -# } -# house.house_head = { -# random_owned_story = { -# limit = { story_type = story_cycle_house_feud } -# save_scope_as = story -# } -# } -# } -# if = { -# limit = { exists = scope:story } -# scope:story = { -# if = { -# limit = { exists = var:house_feud_house.house_head } -# var:house_feud_house.house_head = { save_scope_as = house_feud_rival } -# } -# if = { -# limit = { -# exists = scope:house_feud_rival -# scope:house_feud_rival = { is_alive = yes } -# } -# story_owner = { -# # Remove Nemesis when ending Feud if relevant -# if = { -# limit = { has_relation_nemesis = scope:house_feud_rival } -# hidden_effect = { remove_relation_nemesis = scope:house_feud_rival } -# set_relation_rival = { -# target = scope:house_feud_rival -# reason = rival_house_feud_no_longer_nemesis -# } -# } -# # Otherwise remove Rival -# else_if = { -# limit = { has_relation_rival = scope:house_feud_rival } -# remove_relation_rival = scope:house_feud_rival -# } -# house = { -# every_house_member = { -# limit = { is_ai = yes } -# if = { -# limit = { has_relation_nemesis = scope:house_feud_rival } -# hidden_effect = { remove_relation_nemesis = scope:house_feud_rival } -# set_relation_rival = { -# target = scope:house_feud_rival -# reason = rival_house_feud_no_longer_nemesis -# } -# } -# # Otherwise remove Rival -# else_if = { -# limit = { has_relation_rival = scope:house_feud_rival } -# remove_relation_rival = scope:house_feud_rival -# } -# } -# } -# } -# } -# if = { -# limit = { -# exists = var:house_feud_death_counter -# exists = var:house_feud_kill_counter -# } -# # Reward modifiers based on score -# # If losing badly, worst modifier -# if = { -# limit = { house_feud_balance_value <= -3 } -# story_owner.house = { -# add_house_modifier = { -# modifier = house_feud_terrible_modifier -# years = 25 -# desc = house_feud_terrible_modifier_custom_desc -# } -# } -# } -# # If losing, bad modifier -# else_if = { -# limit = { house_feud_balance_value < -0.5 } -# story_owner.house = { -# add_house_modifier = { -# modifier = house_feud_bad_modifier -# years = 25 -# desc = house_feud_bad_modifier_custom_desc -# } -# } -# } -# # If similar, average modifier -# else_if = { -# limit = { -# house_feud_balance_value >= -0.5 -# house_feud_balance_value <= 0.5 -# } -# story_owner.house = { -# add_house_modifier = { -# modifier = house_feud_even_modifier -# years = 25 -# desc = house_feud_even_modifier_custom_desc -# } -# } -# } -# # If winning, decent modifier -# else_if = { -# limit = { -# house_feud_balance_value > 0.5 -# house_feud_balance_value < 3 -# } -# story_owner.house = { -# add_house_modifier = { -# modifier = house_feud_good_modifier -# years = 25 -# desc = house_feud_good_modifier_custom_desc -# } -# } -# } -# # If winning alot, good modifier -# else_if = { -# limit = { house_feud_balance_value >= 3 } -# story_owner.house = { -# add_house_modifier = { -# modifier = house_feud_excellent_modifier -# years = 25 -# desc = house_feud_excellent_modifier_custom_desc -# } -# } -# } -# story_owner.house = { -# custom_tooltip = house_reward_modifier_tt -# } -# } -# # Give good modifier as fallback or if Feud targets were wiped out -# else = { -# story_owner.house = { -# add_house_modifier = { -# modifier = house_feud_excellent_modifier -# years = 25 -# desc = house_feud_excellent_modifier_custom_desc -# } -# } -# } -# # Remove ongoing modifier -# story_owner.house = { remove_house_modifier = house_feud_story_modifier } -# } -# } -# custom_tooltip = house_feud_cooldown_tt -#} - -# Shared stress effect for Vengeful characters -house_feud_vengeful_stress_effect = { - stress_impact = { - vengeful = major_stress_impact_gain - arbitrary = medium_stress_impact_gain - wrathful = minor_stress_impact_gain - brave = minor_stress_impact_gain - ambitious = minor_stress_impact_gain - arrogant = minor_stress_impact_gain - } -} - -house_feud_forgiving_stress_effect = { - stress_impact = { - forgiving = major_stress_impact_gain - just = medium_stress_impact_gain - calm = minor_stress_impact_gain - craven = minor_stress_impact_gain - content = minor_stress_impact_gain - humble = minor_stress_impact_gain - } -} - - -### SCOPE EFFECTS ### - -# Save attacker and rival scopes for reference -house_feud_save_head_and_attacker_effect = { - house.house_head = { save_scope_as = house_feud_rival } - save_scope_as = house_feud_attacker -} - -### MESSAGE EFFECTS ### - -# Send Feud continued message to player House members on inheritance -#house_feud_send_continues_message_effect = { -# # Flag to block starting more than one Feud per lifetime in most cases (House Head cuckoldry and torture are exceptions) -# add_character_flag = had_house_feud_story -# house = { -# every_house_member = { -# limit = { is_ai = no } -# hidden_effect = { -# send_interface_message = { -# type = house_feud_continues_message -# left_icon = root -# right_icon = scope:house_feud_rival -# title = msg_house_feud_continues -# desc = msg_house_feud_continues_desc -# } -# } -# } -# } -#} - -### ACTION EFFECTS ### - -# Feud cuckoldry score and event effects -house_feud_lover_exposure_effect = { - hidden_effect = { - if = { - limit = { - has_bp1_dlc_trigger = yes - is_married = yes - any_spouse = { - exists = house.house_head - house.house_head ?= { - valid_for_feud_events_with_target_trigger = { TARGET = scope:sex_partner } - NOT = { - accepts_adultery_without_penalty_trigger = yes - } - } - } - } - # Save cheating spouse scope for reference - save_scope_as = house_feud_spouse - # Save cuckolder's scopes for reference - scope:sex_partner = { house_feud_save_head_and_attacker_effect = yes } - every_spouse = { - limit = { - house.house_head ?= { - valid_for_feud_events_with_target_trigger = { TARGET = scope:sex_partner } - } - } - # Save cuckolded spouse for reference - save_scope_as = house_feud_victim - house.house_head = { - # Chance for House Head to have option to start Feud - random = { - chance = 75 - modifier = { - add = 25 - has_trait = vengeful - } - modifier = { - add = -25 - has_trait = forgiving - } - modifier = { - add = -25 - has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:sex_partner } - } - # House Head version - if = { - limit = { is_spouse_of = scope:house_feud_spouse } - trigger_event = { - id = bp1_house_feud.0013 - days = { 5 15 } - } - } - # Close family version - else = { - trigger_event = { - id = bp1_house_feud.0014 - days = { 5 15 } - } - } - } - } - } - } - # Score and message effects - if = { - limit = { - exists = scope:sex_partner.house.house_head - any_spouse = { - save_temporary_scope_as = house_feud_cuckolded_temp_1 - scope:sex_partner = { - house_has_feud_relation_with_trigger = { TARGET = scope:house_feud_cuckolded_temp_1 } - } - save_temporary_scope_as = house_feud_cuckolded_temp_2 - } - } - scope:house_feud_cuckolded_temp_2 = { save_scope_as = house_feud_cuckolded } - scope:sex_partner.house = { - change_house_relation_feud_score_effect = { - TARGET = scope:house_feud_cuckolded.house - REASON = cuckolded - VALUE = house_feud_minor_counter_value - } - # If original Feud reason was cuckolding, fire revenge event for House Head - if = { - limit = { - any_house_relation = { - has_house_relation_level = feud - any_relation_house = { - NOT = { this = scope:sex_partner.house } - this = scope:house_feud_cuckolded.house - } - OR = { - var:house_feud_reason ?= flag:head_cuckolded - var:house_feud_reason ?= flag:family_cuckolded - } - var:house_feud_attacker ?= scope:house_feud_cuckolded - NOT = { exists = var:feud_avenged } - } - } - house_head = { - trigger_event = { id = bp1_house_feud.7003 days = 15 } - } - } - } - } - } -} - -# Feud torture score and event effects -house_feud_torture_event_effect = { - hidden_effect = { - # Tortured belongs to torturer's Houses's Feud target House - scope:actor.house ?= { - change_house_relation_feud_score_effect = { - TARGET = scope:recipient.house - REASON = torture - VALUE = house_feud_minor_counter_value - } - # If originial Feud reason was Torture, fire revenge event for House Head - if = { - limit = { - any_house_relation = { - has_house_relation_level = feud - OR = { - var:house_feud_victim.house ?= scope:actor.house - var:house_feud_reason ?= flag:head_tortured - var:house_feud_reason ?= flag:family_tortured - } - var:house_feud_attacker ?= scope:recipient - NOT = { exists = var:feud_avenged } - } - } - house_head = { - trigger_event = { id = bp1_house_feud.7002 days = 15 } - } - } - } - scope:recipient.house.house_head ?= { - # Chance for tortured House to start a Feud if eligible - if = { - limit = { - valid_for_feud_events_with_target_trigger = { TARGET = scope:actor } - } - random_list = { - # Give House Head option to start Feud - 25 = { - modifier = { - add = 25 - has_trait = vengeful - } - modifier = { - add = -25 - has_trait = forgiving - } - scope:actor = { house_feud_save_head_and_attacker_effect = yes } - scope:recipient = { - save_scope_as = house_feud_victim - house.house_head = { - if = { - limit = { this = scope:house_feud_victim } - trigger_event = { - id = bp1_house_feud.0010 # Version for tortured House Heads - days = { 5 15 } - } - } - else = { - trigger_event = { - id = bp1_house_feud.0011 # Version for tortured close family - days = { 5 15 } - } - } - } - } - } - # Clean up tortured's flags if no Feud started - 50 = { - scope:recipient = { - if = { - limit = { has_character_flag = house_feud_castration_flag } - remove_character_flag = house_feud_castration_flag - } - else_if = { - limit = { has_character_flag = house_feud_blinding_flag } - remove_character_flag = house_feud_blinding_flag - } - else_if = { - limit = { has_character_flag = house_feud_disfigured_flag } - remove_character_flag = house_feud_disfigured_flag - } - } - } - } - } - } - } -} - -set_war_memory_casus_belli_effect = { - save_scope_as = memory - scope:war = { - casus_belli = { - if = { - limit = { - any_target_title = { } - } - ordered_target_title = { - order_by = tier - save_scope_as = war_target - } - scope:memory = { - set_variable = { name = war_title value = scope:war_target } - } - } - if = { - limit = { exists = claimant } - claimant = { save_scope_as = war_claimant } - scope:memory = { - set_variable = { name = war_claimant value = scope:war_claimant } - } - } - } - scope:memory = { - set_variable = { - name = war_attacker - value = scope:war.primary_attacker - } - } - if = { # claim - limit = { - OR = { - using_cb = claim_cb - using_cb = claimant_faction_war - } - } - scope:memory = { - set_variable = { name = war_cb value = flag:war_memory_cb_claim } - } - } - else_if = { # conquest - limit = { - OR = { - using_cb = county_conquest_cb - using_cb = duchy_conquest_cb - using_cb = county_struggle_cb - using_cb = fp2_mediterranean_conquest_cb - using_cb = nomadic_conquest_cb - using_cb = nomadic_conquest_duchy_cb - using_cb = domination_cb - using_cb = de_jure_cb_nomadic - using_cb = japan_install_bloc_member_cb - using_cb = japan_soryo_conquest_county_landless_cb - using_cb = japan_soryo_conquest_county_cb - } - } - scope:memory = { - set_variable = { name = war_cb value = flag:war_memory_cb_conquest } - } - } - else_if = { # holy - limit = { - OR = { - using_cb = minor_religious_war - using_cb = religious_war - using_cb = major_religious_war - } - } - scope:memory = { - set_variable = { name = war_cb value = flag:war_memory_cb_holy_war } - set_variable = { name = war_faith value = scope:war.primary_defender.faith } - set_variable = { name = war_faith_attacker value = scope:war.primary_attacker.faith } - } - } - else_if = { # de jure - limit = { - OR = { - using_cb = de_jure_cb - using_cb = individual_county_de_jure_cb - using_cb = individual_duchy_de_jure_cb - using_cb = japan_imperial_reconquest_cb - } - } - scope:memory = { - set_variable = { name = war_cb value = flag:war_memory_cb_de_jure } - scope:war_target = { - ordered_this_title_or_de_jure_above = { - limit = { holder.top_liege = scope:war.primary_attacker } - order_by = tier - save_scope_as = war_liege - } - } - if = { - limit = { exists = scope:war_liege } - set_variable = { name = war_liege value = scope:war_liege } - } - } - } - else_if = { # invasion - limit = { - OR = { - using_cb = mpo_nomad_invasion_cb - using_cb = invasion_war - using_cb = clan_invasion_war - using_cb = mongol_invasion_war - using_cb = mongol_realm_invasion_war - using_cb = ep3_laamp_adventurer_county_invasion - using_cb = ep3_laamp_adventurer_duchy_invasion - using_cb = ep3_laamp_adventurer_kingdom_invasion - using_cb = ep3_laamp_adventurer_empire_invasion - using_cb = mpo_gok_onslaught_cb - using_cb = japan_imperial_expansion_cb - } - } - scope:memory = { - set_variable = { name = war_cb value = flag:war_memory_cb_invasion } - } - } - else_if = { # ghw - limit = { - OR = { - using_cb = undirected_great_holy_war - using_cb = directed_great_holy_war - } - } - scope:memory = { - set_variable = { name = war_cb value = flag:war_memory_cb_ghw } - set_variable = { name = war_faith value = scope:war.primary_defender.faith } - set_variable = { name = war_faith_attacker value = scope:war.primary_attacker.faith } - } - } - else_if = { # independence - limit = { - OR = { - using_cb = independence_war - using_cb = independence_faction_war - using_cb = tributary_independence_war - } - } - scope:memory = { - set_variable = { name = war_cb value = flag:war_memory_cb_independence } - } - } - else_if = { # artifact - limit = { - OR = { - using_cb = artifact_war - using_cb = reclaim_relic_artifact_war - } - } - scope:memory = { - set_variable = { name = war_cb value = flag:war_memory_cb_artifact } - } - } - else_if = { # populist - limit = { using_cb = populist_war } - scope:memory = { - set_variable = { name = war_cb value = flag:war_memory_cb_populist } - set_variable = { name = war_faith value = scope:war.primary_defender.faith } - set_variable = { name = war_culture value = scope:war.primary_defender.culture } - } - } - else_if = { # subjugation - limit = { - OR = { - using_cb = tribal_subjugation_cb - using_cb = make_tributary_cb - using_cb = retaliation_cb - } - } - scope:memory = { - set_variable = { name = war_cb value = flag:war_memory_cb_subjugation } - } - } - else_if = { # border - limit = { - OR = { - using_cb = fp2_border_raid - using_cb = sovereignty_cb - } - } - scope:memory = { - set_variable = { name = war_cb value = flag:war_memory_cb_border } - } - } - else_if = { # government - limit = { - OR = { - using_cb = japan_demand_administrative_cb - using_cb = japan_refused_ritsuryo_cb - using_cb = japan_establish_soryo_administration_cb - } - } - scope:memory = { - set_variable = { name = war_cb value = flag:war_memory_cb_government } - set_variable = { name = war_gov value = scope:war.primary_attacker.government_type } - } - } - else_if = { # bloc - limit = { - OR = { - using_cb = japan_bloc_war_cb - using_cb = japan_install_bloc_member_cb - } - } - scope:memory = { - set_variable = { name = war_cb value = flag:war_memory_cb_bloc } - set_variable = { name = war_bloc value = scope:war.primary_attacker.house.house_confederation } - } - } - else = { - switch = { - trigger = using_cb - liberty_faction_war = { # liberty - scope:memory = { - set_variable = { name = war_cb value = flag:war_memory_cb_liberty } - } - } - depose_war = { # depose - scope:memory = { - set_variable = { name = war_cb value = flag:war_memory_cb_depose } - } - } - refused_liege_demand_war = { # tyranny - scope:memory = { - set_variable = { name = war_cb value = flag:war_memory_cb_tyranny } - } - } - nation_fracturing_faction_war = { # fracture - scope:memory = { - set_variable = { name = war_cb value = flag:war_memory_cb_fracture } - } - } - ducal_conquest_cb = { # ducal conquest - scope:memory = { - set_variable = { name = war_cb value = flag:war_memory_cb_ducal_conquest } - } - } - imperial_reconquest_cb = { # imperial reconquest - scope:memory = { - set_variable = { name = war_cb value = flag:war_memory_cb_imperial_reconquest } - } - } - dismantle_holy_pretender_cb = { # holy pretender - scope:memory = { - set_variable = { name = war_cb value = flag:war_memory_cb_holy_pretender } - } - } - dismantle_byz_pretender_cb = { # byz pretender - scope:memory = { - set_variable = { name = war_cb value = flag:war_memory_cb_byz_pretender } - } - } - excommunication_war = { # excommunicate - scope:memory = { - set_variable = { name = war_cb value = flag:war_memory_cb_excommunicate } - } - } - flowery_war_cb = { # flower - scope:memory = { - set_variable = { name = war_cb value = flag:war_memory_cb_flower } - } - } - vassalization_cb = { - scope:memory = { - set_variable = { name = war_cb value = flag:war_memory_cb_vassalization } - } - } - fp1_varangian_adventurer_conquest = { - scope:memory = { - set_variable = { name = war_cb value = flag:war_memory_cb_varangian } - } - } - fp1_scandi_adventurer_conquest = { - scope:memory = { - set_variable = { name = war_cb value = flag:war_memory_cb_varangian } - } - } - fp2_expel_interloper = { - scope:memory = { - set_variable = { name = war_cb value = flag:war_memory_cb_expel } - } - } - diarch_vassalisation_cb = { - scope:memory = { - set_variable = { name = war_cb value = flag:war_memory_cb_vassalization } - } - } - remove_regent_cb = { - scope:memory = { - set_variable = { name = war_cb value = flag:war_memory_cb_regent } - } - } - norman_conquest_cb = { - scope:memory = { - set_variable = { name = war_cb value = flag:war_memory_cb_claim } - } - } - norwegian_invasion_cb = { - scope:memory = { - set_variable = { name = war_cb value = flag:war_memory_cb_claim } - } - } - hungarian_migration_cb = { - scope:memory = { - set_variable = { name = war_cb value = flag:war_memory_cb_invasion } - } - } - sons_of_lothbrok_invasion_cb = { - scope:memory = { - set_variable = { name = war_cb value = flag:war_memory_cb_invasion } - } - } - peasant_war = { - scope:memory = { - set_variable = { name = war_cb value = flag:war_memory_cb_peasant } - } - } - replace_ceremonial_regent_faction_war = { - scope:memory = { - set_variable = { name = war_cb value = flag:war_memory_cb_depose } - } - } - fallback = { - scope:memory = { - set_variable = { name = war_cb value = flag:war_memory_cb_fallback } - } - } - } - } - } - if = { # Error culler - limit = { - exists = scope:memory.var:war_cb - OR = { - scope:memory.var:war_cb = flag:war_memory_cb_fallback - scope:memory.var:war_cb = flag:war_memory_cb_holy_war - scope:memory.var:war_cb = flag:war_memory_cb_imperial_reconquest - scope:memory.var:war_cb = flag:war_memory_cb_conquest - scope:memory.var:war_cb = flag:war_memory_cb_claim - scope:memory.var:war_cb = flag:war_memory_cb_de_jure - scope:memory.var:war_cb = flag:war_memory_cb_ducal_conquest - scope:memory.var:war_cb = flag:war_memory_cb_holy_pretender - scope:memory.var:war_cb = flag:war_memory_cb_byz_pretender - scope:memory.var:war_cb = flag:war_memory_cb_invasion - scope:memory.var:war_cb = flag:war_memory_cb_independence - scope:memory.var:war_cb = flag:war_memory_cb_liberty - scope:memory.var:war_cb = flag:war_memory_cb_depose - scope:memory.var:war_cb = flag:war_memory_cb_fracture - scope:memory.var:war_cb = flag:war_memory_cb_excommunicate - scope:memory.var:war_cb = flag:war_memory_cb_flower - scope:memory.var:war_cb = flag:war_memory_cb_ghw - scope:memory.var:war_cb = flag:war_memory_cb_artifact - scope:memory.var:war_cb = flag:war_memory_cb_subjugation - scope:memory.var:war_cb = flag:war_memory_cb_vassalization - scope:memory.var:war_cb = flag:war_memory_cb_varangian - scope:memory.var:war_cb = flag:war_memory_cb_border - scope:memory.var:war_cb = flag:war_memory_cb_expel - scope:memory.var:war_cb = flag:war_memory_cb_regent - scope:memory.var:war_cb = flag:war_memory_cb_tyranny - scope:memory.var:war_cb = flag:war_memory_cb_government - scope:memory.var:war_cb = flag:war_memory_cb_bloc - } - } - } -} - -copy_war_memory_casus_belli_effect = { - if = { - limit = { exists = $MEMORY$.var:war_cb } - set_variable = { - name = war_cb - value = $MEMORY$.var:war_cb - } - if = { - limit = { exists = $MEMORY$.var:war_attacker } - set_variable = { - name = war_attacker - value = $MEMORY$.var:war_attacker - } - } - if = { - limit = { exists = $MEMORY$.var:war_title } - set_variable = { - name = war_title - value = $MEMORY$.var:war_title - } - } - if = { - limit = { exists = $MEMORY$.var:war_claimant } - set_variable = { - name = war_claimant - value = $MEMORY$.var:war_claimant - } - } - if = { - limit = { exists = $MEMORY$.var:war_faith } - set_variable = { - name = war_faith - value = $MEMORY$.var:war_faith - } - } - if = { - limit = { exists = $MEMORY$.var:war_culture } - set_variable = { - name = war_culture - value = $MEMORY$.var:war_culture - } - } - if = { - limit = { exists = $MEMORY$.var:war_faith_attacker } - set_variable = { - name = war_faith_attacker - value = $MEMORY$.var:war_faith_attacker - } - } - if = { - limit = { exists = $MEMORY$.var:war_liege } - set_variable = { - name = war_liege - value = $MEMORY$.var:war_liege - } - } - } - else = { - set_variable = { - name = war_cb - value = flag:war_memory_cb_fallback - } - } -} - -set_war_over_memory_casus_belli_effect = { - ordered_memory = { - limit = { - has_memory_type = $STANCE$_war - any_memory_participant = { this = scope:$OTHER$ } - } - order_by = memory_creation_date - save_scope_as = war_memory - } - ordered_memory = { - limit = { - has_memory_type = war_$OUTCOME$ - any_memory_participant = { this = scope:$SELF$ } - any_memory_participant = { this = scope:$OTHER$ } - } - order_by = memory_creation_date - copy_war_memory_casus_belli_effect = { MEMORY = scope:war_memory } - } -} - -house_feud_murder_effect = { - if = { - limit = { - has_bp1_dlc_trigger = yes - exists = $VICTIM$.house.house_head - exists = $MURDERER$.house.house_head - } - $VICTIM$ = { save_scope_as = house_feud_victim } - $MURDERER$ = { save_scope_as = house_feud_attacker } - scope:house_feud_victim = { - save_ongoing_house_relation_effect = { TARGET = scope:house_feud_attacker } - } - # Notifications - # Inform victim house that they have lost score - if = { - limit = { - # Victim's House is targeted by killer's House - scope:house_feud_victim = { - house_has_feud_relation_with_trigger = { TARGET = scope:house_feud_attacker } - } - } - scope:house_feud_attacker.house = { - change_house_relation_feud_score_effect = { - TARGET = scope:house_feud_victim.house - REASON = kill - VALUE = house_feud_medium_counter_value - } - } - scope:relation ?= { - if = { - limit = { - scope:house_feud_attacker.house = var:house_feud_house_1 - } - set_variable = { - name = house_feud_house_1_recent_kill - value = scope:house_feud_victim - months = 6 - } - } - else = { - set_variable = { - name = house_feud_house_2_recent_kill - value = scope:house_feud_victim - months = 6 - } - } - } - } - # Events - # Fire Feud start event for victim house - if = { - limit = { - scope:house_feud_victim.house.house_head ?= { - NOT = { - has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:house_feud_victim } - } - valid_for_feud_events_with_target_trigger = { TARGET = scope:house_feud_attacker } - } - } - scope:house_feud_attacker = { house_feud_save_head_and_attacker_effect = yes } - scope:house_feud_victim.house.house_head = { - random = { - chance = 25 - modifier = { - add = 25 - has_trait = vengeful - } - modifier = { - add = -25 - has_trait = forgiving - } - modifier = { - add = 25 - has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:house_feud_attacker } - } - trigger_event = { - id = bp1_house_feud.0005 - days = { 5 15 } - } - } - } - } - # Fire Feud revenge event for killer house - scope:house_feud_attacker.house = { - if = { - limit = { - any_house_relation = { - has_house_relation_level = feud - any_relation_house = { - NOT = { this = scope:house_feud_attacker.house } - this = scope:house_feud_victim.house - } - OR = { - var:house_feud_reason ?= flag:head_killed - var:house_feud_reason ?= flag:family_killed - } - var:house_feud_attacker ?= scope:house_feud_victim - NOT = { exists = var:feud_avenged } - } - } - house_head = { - trigger_event = { id = bp1_house_feud.7001 days = 15 } - } - } - } - } -} diff --git a/N3OW/common/scripted_effects/03_bp2_scripted_effects.txt b/N3OW/common/scripted_effects/03_bp2_scripted_effects.txt deleted file mode 100644 index 94404bf2..00000000 --- a/N3OW/common/scripted_effects/03_bp2_scripted_effects.txt +++ /dev/null @@ -1,1805 +0,0 @@ -# Scripted Effects for BP2 - -# Scripted effect to generate a list of relevant characters that might interact with a child -generate_characters_relevant_to_child_list = { - # Grab any family that's around - $CHILD$ = { - every_close_or_extended_family_member = { - limit = { is_relevant_to_child = yes } - add_to_list = relevant_characters_to_child_list - } - } - # Grab relevant court folks - $CHILD$.liege_or_court_owner = { - every_courtier_or_guest = { - limit = { - is_relevant_to_child = yes - } - add_to_list = relevant_characters_to_child_list - } - every_knight = { - limit = { - is_relevant_to_child = yes - } - add_to_list = relevant_characters_to_child_list - } - every_councillor = { - limit = { is_relevant_to_child = yes } - add_to_list = relevant_characters_to_child_list - } - every_court_position_holder = { - limit = { is_relevant_to_child = yes } - add_to_list = relevant_characters_to_child_list - } - } - $CHILD$ = { - every_courtier_or_guest = { - limit = { - is_relevant_to_child = yes - } - add_to_list = relevant_characters_to_child_list - } - every_knight = { - limit = { - is_relevant_to_child = yes - } - add_to_list = relevant_characters_to_child_list - } - every_councillor = { - limit = { is_relevant_to_child = yes } - add_to_list = relevant_characters_to_child_list - } - every_court_position_holder = { - limit = { is_relevant_to_child = yes } - add_to_list = relevant_characters_to_child_list - } - } -} - -# Grab random char relevant to a given child -grab_char_relevant_to_child = { - generate_characters_relevant_to_child_list = { CHILD = $CHILD$ } - random_in_list = { - list = relevant_characters_to_child_list - save_scope_as = $SCOPE_OUTPUT$ - } -} - -# Grab martial character relevant to a given child -grab_martial_char_relevant_to_child = { - generate_characters_relevant_to_child_list = { CHILD = $CHILD$ } - ordered_in_list = { - list = relevant_characters_to_child_list - order_by = { - value = 0 - add = martial - if = { - limit = { is_knight = yes } - add = 25 - } - if = { - limit = { has_court_position = bodyguard_court_position } - add = 20 - } - if = { - limit = { has_court_position = akolouthos_court_position } - add = 20 - } - if = { - limit = { has_court_position = master_of_hunt_court_position } - add = 10 - } - if = { - limit = { this = $CHILD$.liege_or_court_owner.cp:councillor_marshal } - add = 30 - } - if = { - limit = { is_close_or_extended_family_of = $CHILD$ } - add = 10 - } - } - save_scope_as = $SCOPE_OUTPUT$ - } -} - -# Grab learning character relevant to a given child -grab_learning_char_relevant_to_child = { - generate_characters_relevant_to_child_list = { CHILD = $CHILD$ } - ordered_in_list = { - list = relevant_characters_to_child_list - order_by = { - value = 0 - add = learning - if = { - limit = { has_court_position = court_physician_court_position } - add = 20 - } - if = { - limit = { has_court_position = court_tutor_court_position } - add = 20 - } - if = { - limit = { has_court_position = court_guru_court_position } - add = 20 - } - if = { - limit = { - exists = $CHILD$.liege_or_court_owner.cp:councillor_court_chaplain - this = $CHILD$.liege_or_court_owner.cp:councillor_court_chaplain - } - add = 30 - } - if = { - limit = { - $CHILD$ = { is_ruler = yes } - exists = $CHILD$.cp:councillor_court_chaplain - this = $CHILD$.cp:councillor_court_chaplain - } - add = 50 - } - if = { - limit = { is_close_or_extended_family_of = $CHILD$ } - add = 15 - } - } - save_scope_as = $SCOPE_OUTPUT$ - } -} - -adopt_cultural_fashion_culture_effect = { - if = { - limit = { - culture = { - NOT = { has_clothing_gfx = $CULTURE$_clothing_gfx } - } - scope:advanced_culture = { has_clothing_gfx = $CULTURE$_clothing_gfx } - } - set_variable = { - name = adopted_cultural_fashion - value = flag:$CULTURE$ - } - if = { - limit = { - exists = primary_heir - reverse_opinion = { target = primary_heir value >= 50 } - } - primary_heir ?= { - set_variable = { - name = adopted_cultural_fashion - value = flag:$CULTURE$ - } - custom_tooltip = bp2_yearly.6070.change_clothes_heir - } - } - else = { custom_tooltip = bp2_yearly.6070.change_clothes } - } -} - -adopt_cultural_fashion_effect = { - save_scope_as = culture_adopter - if = { - limit = { - NOT = { culture = { has_clothing_gfx = byzantine_clothing_gfx } } - scope:advanced_culture = { has_clothing_gfx = byzantine_clothing_gfx } - } - adopt_cultural_fashion_culture_effect = { CULTURE = byzantine } - } - else_if = { - limit = { - NOT = { culture = { has_clothing_gfx = indian_clothing_gfx } } - scope:advanced_culture = { has_clothing_gfx = indian_clothing_gfx } - } - adopt_cultural_fashion_culture_effect = { CULTURE = indian } - } - else_if = { - limit = { - NOT = { culture = { has_clothing_gfx = mena_clothing_gfx } } - scope:advanced_culture = { has_clothing_gfx = mena_clothing_gfx } - } - adopt_cultural_fashion_culture_effect = { CULTURE = mena } - } - else_if = { - limit = { - NOT = { culture = { has_clothing_gfx = african_clothing_gfx } } - scope:advanced_culture = { has_clothing_gfx = african_clothing_gfx } - } - adopt_cultural_fashion_culture_effect = { CULTURE = african } - } - else_if = { - limit = { - NOT = { culture = { has_clothing_gfx = northern_clothing_gfx } } - scope:advanced_culture = { has_clothing_gfx = northern_clothing_gfx } - } - adopt_cultural_fashion_culture_effect = { CULTURE = northern } - } - else_if = { - limit = { - NOT = { culture = { has_clothing_gfx = iberian_muslim_clothing_gfx } } - scope:advanced_culture = { has_clothing_gfx = iberian_muslim_clothing_gfx } - } - adopt_cultural_fashion_culture_effect = { CULTURE = iberian_muslim } - } - else_if = { - limit = { - NOT = { culture = { has_clothing_gfx = iberian_christian_clothing_gfx } } - scope:advanced_culture = { has_clothing_gfx = iberian_christian_clothing_gfx } - } - adopt_cultural_fashion_culture_effect = { CULTURE = iberian_christian } - } - else_if = { - limit = { - NOT = { culture = { has_clothing_gfx = mongol_clothing_gfx } } - scope:advanced_culture = { has_clothing_gfx = mongol_clothing_gfx } - } - adopt_cultural_fashion_culture_effect = { CULTURE = mongol } - } - else_if = { - limit = { - NOT = { culture = { has_clothing_gfx = fp1_norse_clothing_gfx } } - scope:advanced_culture = { has_clothing_gfx = fp1_norse_clothing_gfx } - } - adopt_cultural_fashion_culture_effect = { CULTURE = fp1_norse } - } - else_if = { - limit = { - NOT = { culture = { has_clothing_gfx = western_clothing_gfx } } - scope:advanced_culture = { has_clothing_gfx = western_clothing_gfx } - } - adopt_cultural_fashion_culture_effect = { CULTURE = western } - } - else_if = { - limit = { - NOT = { culture = { has_clothing_gfx = dde_hre_clothing_gfx } } - scope:advanced_culture = { has_clothing_gfx = dde_hre_clothing_gfx } - } - adopt_cultural_fashion_culture_effect = { CULTURE = dde_hre } - } - else_if = { - limit = { - NOT = { culture = { has_clothing_gfx = dde_abbasid_clothing_gfx } } - scope:advanced_culture = { has_clothing_gfx = dde_abbasid_clothing_gfx } - } - adopt_cultural_fashion_culture_effect = { CULTURE = dde_abbasid } - } - else_if = { - limit = { - NOT = { culture = { has_clothing_gfx = iranian_clothing_gfx } } - scope:advanced_culture = { has_clothing_gfx = iranian_clothing_gfx } - } - adopt_cultural_fashion_culture_effect = { CULTURE = iranian } - } - else_if = { - limit = { - NOT = { culture = { has_clothing_gfx = turkic_clothing_gfx } } - scope:advanced_culture = { has_clothing_gfx = turkic_clothing_gfx } - } - adopt_cultural_fashion_culture_effect = { CULTURE = turkic } - } - else_if = { - limit = { - NOT = { culture = { has_clothing_gfx = afr_berber_clothing_gfx } } - scope:advanced_culture = { has_clothing_gfx = afr_berber_clothing_gfx } - } - adopt_cultural_fashion_culture_effect = { CULTURE = afr_berber } - } - else_if = { - limit = { - NOT = { culture = { has_clothing_gfx = west_slavic_clothing_gfx } } - scope:advanced_culture = { has_clothing_gfx = west_slavic_clothing_gfx } - } - adopt_cultural_fashion_culture_effect = { CULTURE = west_slavic } - } - else_if = { - limit = { - NOT = { culture = { has_clothing_gfx = french_clothing_gfx } } - scope:advanced_culture = { has_clothing_gfx = french_clothing_gfx } - } - adopt_cultural_fashion_culture_effect = { CULTURE = french } - } - else_if = { - limit = { - NOT = { culture = { has_clothing_gfx = east_slavic_clothing_gfx } } - scope:advanced_culture = { has_clothing_gfx = east_slavic_clothing_gfx } - } - adopt_cultural_fashion_culture_effect = { CULTURE = east_slavic } - } - else_if = { - limit = { - NOT = { culture = { has_clothing_gfx = sami_clothing_gfx } } - scope:advanced_culture = { has_clothing_gfx = sami_clothing_gfx } - } - adopt_cultural_fashion_culture_effect = { CULTURE = sami } - } - else_if = { - limit = { - NOT = { culture = { has_clothing_gfx = ugro_permian_clothing_gfx } } - scope:advanced_culture = { has_clothing_gfx = ugro_permian_clothing_gfx } - } - adopt_cultural_fashion_culture_effect = { CULTURE = ugro_permian } - } - else_if = { - limit = { - NOT = { culture = { has_clothing_gfx = chinese_clothing_gfx } } - scope:advanced_culture = { has_clothing_gfx = chinese_clothing_gfx } - } - adopt_cultural_fashion_culture_effect = { CULTURE = chinese } - } - else_if = { - limit = { - NOT = { culture = { has_clothing_gfx = japanese_clothing_gfx } } - scope:advanced_culture = { has_clothing_gfx = japanese_clothing_gfx } - } - adopt_cultural_fashion_culture_effect = { CULTURE = japanese } - } - else_if = { - limit = { - NOT = { culture = { has_clothing_gfx = malay_clothing_gfx } } - scope:advanced_culture = { has_clothing_gfx = malay_clothing_gfx } - } - adopt_cultural_fashion_culture_effect = { CULTURE = malay } - } - else_if = { - limit = { - NOT = { culture = { has_clothing_gfx = southeast_asian_clothing_gfx } } - scope:advanced_culture = { has_clothing_gfx = southeast_asian_clothing_gfx } - } - adopt_cultural_fashion_culture_effect = { CULTURE = southeast_asian } - } - else_if = { - limit = { - NOT = { culture = { has_clothing_gfx = korean_clothing_gfx } } - scope:advanced_culture = { has_clothing_gfx = korean_clothing_gfx } - } - adopt_cultural_fashion_culture_effect = { CULTURE = korean } - } - else_if = { - limit = { - NOT = { culture = { has_clothing_gfx = papuan_clothing_gfx } } - scope:advanced_culture = { has_clothing_gfx = papuan_clothing_gfx } - } - adopt_cultural_fashion_culture_effect = { CULTURE = papuan } - } - else_if = { - limit = { - NOT = { culture = { has_clothing_gfx = viet_clothing_gfx } } - scope:advanced_culture = { has_clothing_gfx = viet_clothing_gfx } - } - adopt_cultural_fashion_culture_effect = { CULTURE = viet } - } - else_if = { - limit = { - NOT = { culture = { has_clothing_gfx = tai_clothing_gfx } } - scope:advanced_culture = { has_clothing_gfx = tai_clothing_gfx } - } - adopt_cultural_fashion_culture_effect = { CULTURE = tai } - } - else_if = { - limit = { - NOT = { culture = { has_clothing_gfx = ainu_clothing_gfx } } - scope:advanced_culture = { has_clothing_gfx = ainu_clothing_gfx } - } - adopt_cultural_fashion_culture_effect = { CULTURE = ainu } - } -} - -bp2_save_traditions_to_consider_effect = { - #Choose a category of tradition root is ready to reform and save a valid tradition from that category - random_list = { - 10 = { - trigger = { - AND = { - has_character_flag = foreign_realm_reforms - scope:advanced_culture = { - any_tradition = { - root = { - can_embrace_tradition = { - tradition = prev - } - } - has_tradition_category = realm - NOR = { - root = { - is_target_in_variable_list = { - name = rejected_traditions - target = prev - } - } - root.culture = { - has_cultural_tradition = prev - } - } - } - } - } - } - scope:advanced_culture = { - random_tradition = { - limit = { - root = { - can_embrace_tradition = { - tradition = prev - } - } - has_tradition_category = realm - NOR = { - root = { - is_target_in_variable_list = { - name = rejected_traditions - target = prev - } - } - root.culture = { - has_cultural_tradition = prev - } - } - } - save_scope_as = considered_tradition_1 - } - } - add_character_flag = considering_reform_realm - } - 10 = { - trigger = { - AND = { - has_character_flag = foreign_maa_reforms - scope:advanced_culture = { - any_tradition = { - root = { - can_embrace_tradition = { - tradition = prev - } - } - has_tradition_category = combat - NOR = { - root = { - is_target_in_variable_list = { - name = rejected_traditions - target = prev - } - } - root.culture = { - has_cultural_tradition = prev - } - } - } - } - } - } - scope:advanced_culture = { - random_tradition = { - limit = { - root = { - can_embrace_tradition = { - tradition = prev - } - } - has_tradition_category = combat - NOR = { - root = { - is_target_in_variable_list = { - name = rejected_traditions - target = prev - } - } - root.culture = { - has_cultural_tradition = prev - } - } - } - save_scope_as = considered_tradition_1 - } - } - add_character_flag = considering_reform_maa - } - 10 = { - trigger = { - AND = { - has_character_flag = foreign_social_reforms - scope:advanced_culture = { - any_tradition = { - root = { - can_embrace_tradition = { - tradition = prev - } - } - has_tradition_category = societal - NOR = { - root = { - is_target_in_variable_list = { - name = rejected_traditions - target = prev - } - } - root.culture = { - has_cultural_tradition = prev - } - } - } - } - } - } - scope:advanced_culture = { - random_tradition = { - limit = { - root = { - can_embrace_tradition = { - tradition = prev - } - } - has_tradition_category = societal - NOR = { - root = { - is_target_in_variable_list = { - name = rejected_traditions - target = prev - } - } - root.culture = { - has_cultural_tradition = prev - } - } - } - save_scope_as = considered_tradition_1 - } - } - add_character_flag = considering_reform_social - } - 10 = { - trigger = { - AND = { - has_character_flag = foreign_ritual_reforms - scope:advanced_culture = { - any_tradition = { - root = { - can_embrace_tradition = { - tradition = prev - } - } - has_tradition_category = ritual - NOR = { - root = { - is_target_in_variable_list = { - name = rejected_traditions - target = prev - } - } - root.culture = { - has_cultural_tradition = prev - } - } - } - } - } - } - scope:advanced_culture = { - random_tradition = { - limit = { - root = { - can_embrace_tradition = { - tradition = prev - } - } - has_tradition_category = ritual - NOR = { - root = { - is_target_in_variable_list = { - name = rejected_traditions - target = prev - } - } - root.culture = { - has_cultural_tradition = prev - } - } - } - save_scope_as = considered_tradition_1 - } - } - add_character_flag = considering_reform_ritual - } - 10 = { - trigger = { - AND = { - scope:advanced_culture = { - any_tradition = { - root = { - can_embrace_tradition = { - tradition = prev - } - } - has_tradition_category = regional - NOR = { - root = { - is_target_in_variable_list = { - name = rejected_traditions - target = prev - } - } - root.culture = { - has_cultural_tradition = prev - } - } - } - } - } - } - scope:advanced_culture = { - random_tradition = { - limit = { - root = { - can_embrace_tradition = { - tradition = prev - } - } - has_tradition_category = regional - NOR = { - root = { - is_target_in_variable_list = { - name = rejected_traditions - target = prev - } - } - root.culture = { - has_cultural_tradition = prev - } - } - } - save_scope_as = considered_tradition_1 - } - } - add_character_flag = considering_reform_regional - } - } - #PICK A SECOND - if = { - limit = { - scope:advanced_culture = { - any_tradition = { - root = { - can_embrace_tradition = { - tradition = prev - } - } - NOR = { - root = { - is_target_in_variable_list = { - name = rejected_traditions - target = prev - } - } - root.culture = { - has_cultural_tradition = prev - } - } - scope:considered_tradition_1 != this - } - } - } - random_list = { - 10 = { - trigger = { - AND = { - has_character_flag = foreign_realm_reforms - scope:advanced_culture = { - any_tradition = { - root = { - can_embrace_tradition = { - tradition = prev - } - } - has_tradition_category = realm - NOR = { - root = { - is_target_in_variable_list = { - name = rejected_traditions - target = prev - } - } - root.culture = { - has_cultural_tradition = prev - } - scope:considered_tradition_1 = this - } - } - } - } - } - scope:advanced_culture = { - random_tradition = { - limit = { - root = { - can_embrace_tradition = { - tradition = prev - } - } - has_tradition_category = realm - NOR = { - root = { - is_target_in_variable_list = { - name = rejected_traditions - target = prev - } - } - root.culture = { - has_cultural_tradition = prev - } - scope:considered_tradition_1 = this - } - } - save_scope_as = considered_tradition_2 - #this will be the overall flavor - } - } - } - 10 = { - trigger = { - AND = { - has_character_flag = foreign_maa_reforms - scope:advanced_culture = { - any_tradition = { - root = { - can_embrace_tradition = { - tradition = prev - } - } - has_tradition_category = combat - NOR = { - root = { - is_target_in_variable_list = { - name = rejected_traditions - target = prev - } - } - root.culture = { - has_cultural_tradition = prev - } - scope:considered_tradition_1 = this - } - } - } - } - } - scope:advanced_culture = { - random_tradition = { - limit = { - root = { - can_embrace_tradition = { - tradition = prev - } - } - has_tradition_category = combat - NOR = { - root = { - is_target_in_variable_list = { - name = rejected_traditions - target = prev - } - } - root.culture = { - has_cultural_tradition = prev - } - scope:considered_tradition_1 = this - } - } - save_scope_as = considered_tradition_2 - #this will be the overall flavor - } - } - } - 10 = { - trigger = { - AND = { - has_character_flag = foreign_social_reforms - scope:advanced_culture = { - any_tradition = { - root = { - can_embrace_tradition = { - tradition = prev - } - } - has_tradition_category = societal - NOR = { - root = { - is_target_in_variable_list = { - name = rejected_traditions - target = prev - } - } - root.culture = { - has_cultural_tradition = prev - } - scope:considered_tradition_1 = this - } - } - } - } - } - scope:advanced_culture = { - random_tradition = { - limit = { - root = { - can_embrace_tradition = { - tradition = prev - } - } - has_tradition_category = societal - NOR = { - root = { - is_target_in_variable_list = { - name = rejected_traditions - target = prev - } - } - root.culture = { - has_cultural_tradition = prev - } - scope:considered_tradition_1 = this - } - } - save_scope_as = considered_tradition_2 - #this will be the overall flavor - } - } - } - 10 = { - trigger = { - AND = { - has_character_flag = foreign_ritual_reforms - scope:advanced_culture = { - any_tradition = { - root = { - can_embrace_tradition = { - tradition = prev - } - } - has_tradition_category = ritual - NOR = { - root = { - is_target_in_variable_list = { - name = rejected_traditions - target = prev - } - } - root.culture = { - has_cultural_tradition = prev - } - scope:considered_tradition_1 = this - } - } - } - } - } - scope:advanced_culture = { - random_tradition = { - limit = { - root = { - can_embrace_tradition = { - tradition = prev - } - } - has_tradition_category = ritual - NOR = { - root = { - is_target_in_variable_list = { - name = rejected_traditions - target = prev - } - } - root.culture = { - has_cultural_tradition = prev - } - scope:considered_tradition_1 = this - } - } - save_scope_as = considered_tradition_2 - #this will be the overall flavor - } - } - } - 10 = { - trigger = { - AND = { - scope:advanced_culture = { - any_tradition = { - root = { - can_embrace_tradition = { - tradition = prev - } - } - has_tradition_category = regional - NOR = { - root = { - is_target_in_variable_list = { - name = rejected_traditions - target = prev - } - } - root.culture = { - has_cultural_tradition = prev - } - scope:considered_tradition_1 = this - } - } - } - } - } - scope:advanced_culture = { - random_tradition = { - limit = { - root = { - can_embrace_tradition = { - tradition = prev - } - } - has_tradition_category = regional - NOR = { - root = { - is_target_in_variable_list = { - name = rejected_traditions - target = prev - } - } - root.culture = { - has_cultural_tradition = prev - } - scope:considered_tradition_1 = this - } - } - save_scope_as = considered_tradition_2 - #this will be the overall flavor - } - } - } - } - } - # PICK A THIRD - if = { - limit = { - scope:advanced_culture = { - any_tradition = { - root = { - can_embrace_tradition = { - tradition = prev - } - } - NOR = { - root = { - is_target_in_variable_list = { - name = rejected_traditions - target = prev - } - } - root.culture = { - has_cultural_tradition = prev - } - } - NOT = { - scope:considered_tradition_1 = this - scope:considered_tradition_2 = this - } - } - } - } - random_list = { - 10 = { - trigger = { - AND = { - has_character_flag = foreign_realm_reforms - scope:advanced_culture = { - any_tradition = { - root = { - can_embrace_tradition = { - tradition = prev - } - } - has_tradition_category = realm - NOR = { - root = { - is_target_in_variable_list = { - name = rejected_traditions - target = prev - } - } - root.culture = { - has_cultural_tradition = prev - } - scope:considered_tradition_1 = this - scope:considered_tradition_2 = this - } - } - } - } - } - scope:advanced_culture = { - random_tradition = { - limit = { - root = { - can_embrace_tradition = { - tradition = prev - } - } - has_tradition_category = realm - NOR = { - root = { - is_target_in_variable_list = { - name = rejected_traditions - target = prev - } - } - root.culture = { - has_cultural_tradition = prev - } - scope:considered_tradition_1 = this - scope:considered_tradition_2 = this - } - } - save_scope_as = considered_tradition_3 - #this will be the overall flavor - } - } - } - 10 = { - trigger = { - AND = { - has_character_flag = foreign_maa_reforms - scope:advanced_culture = { - any_tradition = { - root = { - can_embrace_tradition = { - tradition = prev - } - } - has_tradition_category = combat - NOR = { - root = { - is_target_in_variable_list = { - name = rejected_traditions - target = prev - } - } - root.culture = { - has_cultural_tradition = prev - } - scope:considered_tradition_1 = this - scope:considered_tradition_2 = this - } - } - } - } - } - scope:advanced_culture = { - random_tradition = { - limit = { - root = { - can_embrace_tradition = { - tradition = prev - } - } - has_tradition_category = combat - NOR = { - root = { - is_target_in_variable_list = { - name = rejected_traditions - target = prev - } - } - root.culture = { - has_cultural_tradition = prev - } - scope:considered_tradition_1 = this - scope:considered_tradition_2 = this - } - } - save_scope_as = considered_tradition_3 - #this will be the overall flavor - } - } - } - 10 = { - trigger = { - AND = { - has_character_flag = foreign_social_reforms - scope:advanced_culture = { - any_tradition = { - root = { - can_embrace_tradition = { - tradition = prev - } - } - has_tradition_category = societal - NOR = { - root = { - is_target_in_variable_list = { - name = rejected_traditions - target = prev - } - } - root.culture = { - has_cultural_tradition = prev - } - scope:considered_tradition_1 = this - scope:considered_tradition_2 = this - } - } - } - } - } - scope:advanced_culture = { - random_tradition = { - limit = { - root = { - can_embrace_tradition = { - tradition = prev - } - } - has_tradition_category = societal - NOR = { - root = { - is_target_in_variable_list = { - name = rejected_traditions - target = prev - } - } - root.culture = { - has_cultural_tradition = prev - } - scope:considered_tradition_1 = this - scope:considered_tradition_2 = this - } - } - save_scope_as = considered_tradition_3 - #this will be the overall flavor - } - } - } - 10 = { - trigger = { - AND = { - has_character_flag = foreign_ritual_reforms - scope:advanced_culture = { - any_tradition = { - root = { - can_embrace_tradition = { - tradition = prev - } - } - has_tradition_category = ritual - NOR = { - root = { - is_target_in_variable_list = { - name = rejected_traditions - target = prev - } - } - root.culture = { - has_cultural_tradition = prev - } - scope:considered_tradition_1 = this - scope:considered_tradition_2 = this - } - } - } - } - } - scope:advanced_culture = { - random_tradition = { - limit = { - root = { - can_embrace_tradition = { - tradition = prev - } - } - has_tradition_category = ritual - NOR = { - root = { - is_target_in_variable_list = { - name = rejected_traditions - target = prev - } - } - root.culture = { - has_cultural_tradition = prev - } - scope:considered_tradition_1 = this - scope:considered_tradition_2 = this - } - } - save_scope_as = considered_tradition_3 - #this will be the overall flavor - } - } - } - 10 = { - trigger = { - AND = { - scope:advanced_culture = { - any_tradition = { - root = { - can_embrace_tradition = { - tradition = prev - } - } - has_tradition_category = regional - NOR = { - root = { - is_target_in_variable_list = { - name = rejected_traditions - target = prev - } - } - root.culture = { - has_cultural_tradition = prev - } - scope:considered_tradition_1 = this - scope:considered_tradition_2 = this - } - } - } - } - } - scope:advanced_culture = { - random_tradition = { - limit = { - root = { - can_embrace_tradition = { - tradition = prev - } - } - has_tradition_category = regional - NOR = { - root = { - is_target_in_variable_list = { - name = rejected_traditions - target = prev - } - } - root.culture = { - has_cultural_tradition = prev - } - scope:considered_tradition_1 = this - scope:considered_tradition_2 = this - } - } - save_scope_as = considered_tradition_3 - #this will be the overall flavor - } - } - } - } - } - #PICK FOURTH - if = { - limit = { - scope:advanced_culture = { - any_tradition = { - root = { - can_embrace_tradition = { - tradition = prev - } - } - NOR = { - root = { - is_target_in_variable_list = { - name = rejected_traditions - target = prev - } - } - root.culture = { - has_cultural_tradition = prev - } - } - NOT = { - scope:considered_tradition_1 = this - scope:considered_tradition_2 = this - scope:considered_tradition_3 = this - } - } - } - } - random_list = { - 10 = { - trigger = { - AND = { - has_character_flag = foreign_realm_reforms - scope:advanced_culture = { - any_tradition = { - root = { - can_embrace_tradition = { - tradition = prev - } - } - has_tradition_category = realm - NOR = { - root = { - is_target_in_variable_list = { - name = rejected_traditions - target = prev - } - } - root.culture = { - has_cultural_tradition = prev - } - scope:considered_tradition_1 = this - scope:considered_tradition_2 = this - scope:considered_tradition_3 = this - } - } - } - } - } - scope:advanced_culture = { - random_tradition = { - limit = { - root = { - can_embrace_tradition = { - tradition = prev - } - } - has_tradition_category = realm - NOR = { - root = { - is_target_in_variable_list = { - name = rejected_traditions - target = prev - } - } - root.culture = { - has_cultural_tradition = prev - } - scope:considered_tradition_1 = this - scope:considered_tradition_2 = this - scope:considered_tradition_3 = this - } - } - save_scope_as = considered_tradition_4 - #this will be the overall flavor - } - } - } - 10 = { - trigger = { - AND = { - has_character_flag = foreign_maa_reforms - scope:advanced_culture = { - any_tradition = { - root = { - can_embrace_tradition = { - tradition = prev - } - } - has_tradition_category = combat - NOR = { - root = { - is_target_in_variable_list = { - name = rejected_traditions - target = prev - } - } - root.culture = { - has_cultural_tradition = prev - } - scope:considered_tradition_1 = this - scope:considered_tradition_2 = this - scope:considered_tradition_3 = this - } - } - } - } - } - scope:advanced_culture = { - random_tradition = { - limit = { - root = { - can_embrace_tradition = { - tradition = prev - } - } - has_tradition_category = combat - NOR = { - root = { - is_target_in_variable_list = { - name = rejected_traditions - target = prev - } - } - root.culture = { - has_cultural_tradition = prev - } - scope:considered_tradition_1 = this - scope:considered_tradition_2 = this - scope:considered_tradition_3 = this - } - } - save_scope_as = considered_tradition_4 - #this will be the overall flavor - } - } - } - 10 = { - trigger = { - AND = { - has_character_flag = foreign_social_reforms - scope:advanced_culture = { - any_tradition = { - root = { - can_embrace_tradition = { - tradition = prev - } - } - has_tradition_category = societal - NOR = { - root = { - is_target_in_variable_list = { - name = rejected_traditions - target = prev - } - } - root.culture = { - has_cultural_tradition = prev - } - scope:considered_tradition_1 = this - scope:considered_tradition_2 = this - scope:considered_tradition_3 = this - } - } - } - } - } - scope:advanced_culture = { - random_tradition = { - limit = { - root = { - can_embrace_tradition = { - tradition = prev - } - } - has_tradition_category = societal - NOR = { - root = { - is_target_in_variable_list = { - name = rejected_traditions - target = prev - } - } - root.culture = { - has_cultural_tradition = prev - } - scope:considered_tradition_1 = this - scope:considered_tradition_2 = this - scope:considered_tradition_3 = this - } - } - save_scope_as = considered_tradition_4 - #this will be the overall flavor - } - } - } - 10 = { - trigger = { - AND = { - has_character_flag = foreign_ritual_reforms - scope:advanced_culture = { - any_tradition = { - root = { - can_embrace_tradition = { - tradition = prev - } - } - has_tradition_category = ritual - NOR = { - root = { - is_target_in_variable_list = { - name = rejected_traditions - target = prev - } - } - root.culture = { - has_cultural_tradition = prev - } - scope:considered_tradition_1 = this - scope:considered_tradition_2 = this - scope:considered_tradition_3 = this - } - } - } - } - } - scope:advanced_culture = { - random_tradition = { - limit = { - root = { - can_embrace_tradition = { - tradition = prev - } - } - has_tradition_category = ritual - NOR = { - root = { - is_target_in_variable_list = { - name = rejected_traditions - target = prev - } - } - root.culture = { - has_cultural_tradition = prev - } - scope:considered_tradition_1 = this - scope:considered_tradition_2 = this - scope:considered_tradition_3 = this - } - } - save_scope_as = considered_tradition_4 - #this will be the overall flavor - } - } - } - 10 = { - trigger = { - AND = { - scope:advanced_culture = { - any_tradition = { - root = { - can_embrace_tradition = { - tradition = prev - } - } - has_tradition_category = regional - NOR = { - root = { - is_target_in_variable_list = { - name = rejected_traditions - target = prev - } - } - root.culture = { - has_cultural_tradition = prev - } - scope:considered_tradition_1 = this - scope:considered_tradition_2 = this - scope:considered_tradition_3 = this - } - } - } - } - } - scope:advanced_culture = { - random_tradition = { - limit = { - root = { - can_embrace_tradition = { - tradition = prev - } - } - has_tradition_category = regional - NOR = { - root = { - is_target_in_variable_list = { - name = rejected_traditions - target = prev - } - } - root.culture = { - has_cultural_tradition = prev - } - scope:considered_tradition_1 = this - scope:considered_tradition_2 = this - scope:considered_tradition_3 = this - } - } - save_scope_as = considered_tradition_4 - #this will be the overall flavor - } - } - } - } - } -} - - -#Effect to start the story and show the right modifier -start_rock_story_cycle_effect = { - show_as_tooltip = { - add_character_modifier = { - modifier = rock_story_modifier - } - } - hidden_effect = { - create_story = story_cycle_pet_rock - } -} - -#Pick out name options to show -assign_name_options_rock_story_cycle_effect = { - random_list = { - 1 = { - trigger = { NOT = { has_character_flag = name_cliff } } - add_character_flag = name_cliff - } - 1 = { - trigger = { - NOT = { has_character_flag = name_sandy } - scope:story.var:rock_color = flag:sandy - } - add_character_flag = name_sandy - } - 1 = { - trigger = { NOT = { has_character_flag = name_rocky } } - add_character_flag = name_rocky - } - 1 = { - trigger = { NOT = { has_character_flag = name_crag } } - add_character_flag = name_crag - } - 1 = { - trigger = { NOT = { has_character_flag = name_flint } } - add_character_flag = name_flint - } - 1 = { - trigger = { NOT = { has_character_flag = name_gritty } } - add_character_flag = name_gritty - } - 1 = { - trigger = { NOT = { has_character_flag = name_rubble } } - add_character_flag = name_rubble - } - 1 = { - trigger = { NOT = { has_character_flag = name_tuff } } - add_character_flag = name_tuff - } - 1 = { - trigger = { NOT = { has_character_flag = name_roxanne } } - add_character_flag = name_roxanne - } - 1 = { - trigger = { NOT = { has_character_flag = name_rosetta } } - add_character_flag = name_rosetta - } - 1 = { - trigger = { NOT = { has_character_flag = name_chip } } - add_character_flag = name_chip - } - 1 = { - trigger = { NOT = { has_character_flag = name_fluffy } } - add_character_flag = name_fluffy - } - 1 = { - trigger = { NOT = { has_character_flag = name_sten } } - add_character_flag = name_sten - } - 1 = { - trigger = { NOT = { has_character_flag = name_barney } } - add_character_flag = name_barney - } - 1 = { - trigger = { NOT = { has_character_flag = name_ariadne } } - add_character_flag = name_ariadne - } - 1 = { - trigger = { NOT = { has_character_flag = name_dwayne } } - add_character_flag = name_dwayne - } - 1 = { - trigger = { NOT = { has_character_flag = name_potapczyk } } - add_character_flag = name_potapczyk - } - 1 = { - trigger = { NOT = { has_character_flag = name_gemma } } - add_character_flag = name_gemma - } - } -} - -#Assign the colour of your rock -assign_rock_color_effect = { - save_temporary_scope_value_as = { - name = rock_color - value = flag:$COLOR$ - } - if = { - limit = { scope:rock_color = flag:random } - hidden_effect = { - random_list = { - 50 = { - set_variable = { - name = rock_color - value = flag:brown - } - } - 50 = { - set_variable = { - name = rock_color - value = flag:gray - } - } - 50 = { - set_variable = { - name = rock_color - value = flag:black - } - } - 50 = { - set_variable = { - name = rock_color - value = flag:white - } - } - 50 = { - set_variable = { - name = rock_color - value = flag:sandy - } - } - } - } - } - else_if = { - limit = { - OR = { - scope:rock_color = flag:brown - scope:rock_color = flag:gray - scope:rock_color = flag:black - scope:rock_color = flag:white - scope:rock_color = flag:sandy - } - } - set_variable = { - name = rock_color - value = flag:$COLOR$ - } - } -} - -#Assign the gender of your rock -assign_rock_gender_effect = { - save_temporary_scope_value_as = { - name = gender - value = flag:$GENDER$ - } - if = { - limit = { scope:gender = flag:random } - hidden_effect = { - random_list = { - 50 = { - set_variable = { - name = rock_gender - value = flag:female - } - } - 50 = { - set_variable = { - name = rock_gender - value = flag:male - } - } - } - } - } - else_if = { - limit = { - OR = { - scope:gender = flag:male - scope:gender = flag:female - } - } - set_variable = { - name = rock_gender - value = flag:$GENDER$ - } - } -} - -#Remove everything related to the rock story -remove_rock_story_modifiers_effect = { - if = { - limit = { - has_character_modifier = rock_story_modifier - } - remove_character_modifier = rock_story_modifier - } -} - -remove_rock_name_effect = { - remove_variable = story_cycle_rock_name - remove_localized_text = story_cycle_rock_name -} - diff --git a/N3OW/common/scripted_effects/03_dlc_fp2_scripted_effects.txt b/N3OW/common/scripted_effects/03_dlc_fp2_scripted_effects.txt deleted file mode 100644 index 0192a8d1..00000000 --- a/N3OW/common/scripted_effects/03_dlc_fp2_scripted_effects.txt +++ /dev/null @@ -1,2161 +0,0 @@ -################################################## -# Decisions -################################################## - -##### Struggle Ending ##### - -### Common - -# Add all Involved cultures with counties to a list -fp2_struggle_ending_culture_list_effect = { - every_culture_global = { - limit = { - save_temporary_scope_as = this_culture - struggle:iberian_struggle = { is_culture_involved_in_struggle = scope:this_culture } - culture_number_of_counties > 0 - } - save_scope_as = culture_scope - add_to_global_variable_list = { - name = fp2_struggle_ending_culture_list - target = scope:culture_scope - } - } -} - -# Add all Involved independent rulers to a list -fp2_stuggle_ending_involved_list_effect = { - save_scope_as = struggle_ender - struggle:iberian_struggle = { - every_involved_ruler = { - limit = { - top_liege = this - primary_title = { is_mercenary_company = no } - } - add_to_list = struggle_involvees - } - } - # Add all involved cultures with counties to a list, for war checks - fp2_struggle_ending_culture_list_effect = yes - # Add all involved faiths with counties to a list, for marriage and holy war checks - fp2_struggle_ending_faith_list_effect = yes -} - -### Hostility - -# Add all Involved faiths with counties to a list -fp2_struggle_ending_faith_list_effect = { - every_religion_global = { - limit = { - any_faith = { - save_temporary_scope_as = this_faith - struggle:iberian_struggle = { is_faith_involved_in_struggle = scope:this_faith } - num_county_followers > 0 - } - } - every_faith = { - limit = { - struggle:iberian_struggle = { is_faith_involved_in_struggle = prev } - num_county_followers > 0 - } - save_scope_as = faith_scope - add_to_global_variable_list = { - name = fp2_struggle_ending_faith_list - target = scope:faith_scope - } - } - } -} - -# Set cultural acceptance between all Involved cultures -fp2_struggle_hostility_cultural_acceptance_effect = { - hidden_effect = { - while = { - limit = { - any_in_global_list = { - variable = fp2_struggle_ending_culture_list - NOT = { has_variable = fp2_struggle_hostility_flag } - } - } - ordered_in_global_list = { - variable = fp2_struggle_ending_culture_list - limit = { - NOT = { has_variable = fp2_struggle_hostility_flag } - } - order_by = culture_number_of_counties - save_scope_as = culture_scope - set_variable = fp2_struggle_hostility_flag # variable ensures acceptance is only lost once per couple - } - every_in_global_list = { - variable = fp2_struggle_ending_culture_list - limit = { - NOR = { - has_variable = fp2_struggle_hostility_flag - this = scope:culture_scope - } - } - change_cultural_acceptance = { - target = scope:culture_scope - value = fp2_struggle_hostility_culture_acceptance_value - desc = fp2_struggle_hostility_acceptance_tt - } - } - } - every_in_global_list = { - variable = fp2_struggle_ending_culture_list - remove_variable = fp2_struggle_hostility_flag - } - } -} - -# Set cultural acceptance between all Involved cultures -fp2_struggle_hostility_cultural_acceptance_large_effect = { - hidden_effect = { - while = { - limit = { - any_in_global_list = { - variable = fp2_struggle_ending_culture_list - NOT = { has_variable = fp2_struggle_hostility_flag } - } - } - ordered_in_global_list = { - variable = fp2_struggle_ending_culture_list - limit = { - NOT = { has_variable = fp2_struggle_hostility_flag } - } - order_by = culture_number_of_counties - save_scope_as = culture_scope - set_variable = fp2_struggle_hostility_flag # variable ensures acceptance is only lost once per couple - } - every_in_global_list = { - variable = fp2_struggle_ending_culture_list - limit = { - NOR = { - has_variable = fp2_struggle_hostility_flag - this = scope:culture_scope - } - } - change_cultural_acceptance = { - target = scope:culture_scope - value = fp2_struggle_hostility_culture_acceptance_value - desc = fp2_struggle_hostility_acceptance_tt - } - } - } - every_in_global_list = { - variable = fp2_struggle_ending_culture_list - remove_variable = fp2_struggle_hostility_flag - } - } -} - - -### Compromise - -# Creates a new de jure kingdom from a duchy -fp2_struggle_compromise_create_new_kingdom_effect = { - add_to_list = duchy_kingdom - create_dynamic_title = { - tier = kingdom - name = $TYPE$_CREATED_TITLE_NAME - } - scope:old_title = { - # Edge case for kingdoms which do not control their own capital duchy - if = { - limit = { - title_capital_county = de_jure_liege.title_capital_county - exists = de_jure_liege.holder - holder != de_jure_liege.holder - } - de_jure_liege = { - # So kingdom has a capital - set_capital_county = this.holder.capital_county - # So titles do not share CoAs - set_coa = this.holder.house - } - } - set_de_jure_liege_title = scope:new_title - } - scope:new_title = { - set_coa = $FETCH$ - set_color_from_title = $FETCH$ - set_capital_county = $FETCH$.title_capital_county - set_de_jure_liege_title = title:e_spain - } -} - -# Create new de jure kingdoms from relevant duchies -fp2_struggle_compromise_duchies_to_kingdoms_effect = { - hidden_effect = { - title:d_zaragoza = { add_to_list = titular_iberian_duchies } - title:e_spain = { - # Cycle through de jure duchies held by independent dukes - every_in_de_jure_hierarchy = { - # Prefer primary titles - limit = { - this = this.holder.primary_title - fp2_struggle_ending_compromise_independent_duchy_trigger = yes - } - # Then capital titles - alternative_limit = { - this.title_capital_county = this.kingdom.title_capital_county - fp2_struggle_ending_compromise_independent_duchy_trigger = yes - } - alternative_limit = { fp2_struggle_ending_compromise_independent_duchy_trigger = yes } - save_scope_as = old_title - fp2_struggle_compromise_create_new_kingdom_effect = { TYPE = NEW FETCH = scope:old_title } - } - # Cycle through titular duchies held by independent dukes (e.g. Zaragoza) - every_in_list = { - list = titular_iberian_duchies - save_scope_as = special_duchy - if = { - # Independent holder who controls at least 50% a de jure duchy, and no kingdom has the same as that duchy - limit = { fp2_struggle_ending_compromise_titular_trigger = yes } - title:e_spain = { - random_in_de_jure_hierarchy = { - limit = { - tier = tier_duchy - any_direct_de_jure_vassal_title = { - percent >= 0.5 - holder.top_liege = scope:special_duchy.holder - } - } - save_scope_as = old_title - } - } - fp2_struggle_compromise_create_new_kingdom_effect = { TYPE = SPECIAL FETCH = scope:special_duchy } - } - } - # Cycle through uncreated de jure duchies to split if needed (e.g. Coimbra) - every_in_de_jure_hierarchy = { - limit = { fp2_struggle_ending_compromise_split_duchy_trigger = yes } - save_scope_as = old_title - fp2_struggle_compromise_create_new_kingdom_effect = { TYPE = NEW FETCH = scope:old_title } - } - } - } -} - -# Moves duchies to another kingdom -fp2_struggle_compromise_transfer_duchies_effect = { - title:e_spain = { - while = { - limit = { - any_in_de_jure_hierarchy = { fp2_struggle_compromise_transfer_duchy_trigger = yes } - } - every_in_de_jure_hierarchy = { - limit = { fp2_struggle_compromise_transfer_duchy_trigger = yes } - add_to_list = transferred_duchies - # To ensure kingdom's capitals are always inside them - if = { - limit = { title_capital_county = kingdom.title_capital_county } - kingdom = { - save_scope_as = old_kingdom - if = { - limit = { - any_direct_de_jure_vassal_title = { - NOT = { is_in_list = transferred_duchies } - title_capital_county.kingdom = scope:old_kingdom - } - } - random_direct_de_jure_vassal_title = { - limit = { - NOT = { is_in_list = transferred_duchies } - title_capital_county.kingdom = scope:old_kingdom - } - title_capital_county = { save_scope_as = new_capital } - } - set_capital_county = scope:new_capital - } - } - } - if = { - limit = { title_capital_county.holder.top_liege.primary_title.tier = tier_kingdom } - set_de_jure_liege_title = title_capital_county.holder.top_liege.primary_title - } - else = { set_de_jure_liege_title = title_capital_county.holder.top_liege.capital_county.kingdom } - } - } - } -} - -# Creates a new de jure empire from a kingdom -fp2_struggle_compromise_create_new_empire_effect = { - add_to_list = kingdom_empire - save_scope_as = old_title - create_dynamic_title = { - tier = empire - name = NEW_CREATED_TITLE_NAME - } - scope:old_title = { set_de_jure_liege_title = scope:new_title } - scope:new_title = { - add_to_list = new_empire_list - set_coa = scope:old_title - set_color_from_title = scope:old_title - set_capital_county = scope:old_title.title_capital_county - } -} - -# Create new de jure empires from relevant kingdoms -fp2_struggle_compromise_kingdoms_to_empires_effect = { - hidden_effect = { - title:e_spain = { - every_in_de_jure_hierarchy = { - limit = { - tier = tier_kingdom - any_in_de_jure_hierarchy = { - count >= fp2_struggle_compromise_ending_minimal_empire_size - tier = tier_county - } - } - fp2_struggle_compromise_create_new_empire_effect = yes - } - } - } -} - -# Distribute remaining Kingdoms to neighboring empires -fp2_struggle_compromise_distribute_kingdoms_to_neighbouring_empires_effect = { - hidden_effect = { - title:e_spain = { - every_in_de_jure_hierarchy = { - limit = { tier = tier_kingdom } - save_scope_as = kingdom_to_distribute - random_title_to_title_neighboring_and_across_water_kingdom = { - limit = { # Prefer land borders - any_this_title_or_de_jure_above = { is_in_list = new_empire_list } - any_title_to_title_neighboring_kingdom = { this = scope:kingdom_to_distribute } - } - alternative_limit = { # Then sea borders - any_this_title_or_de_jure_above = { is_in_list = new_empire_list } - } - weight = { - modifier = { # Value one from Iberia for small empire - add = { - value = 2 - subtract = { - value = 0 - every_in_de_jure_hierarchy = { - add = 0.25 - } - } - min = 0 - } - any_in_de_jure_hierarchy = { - tier = tier_county - title_province = { geographical_region = world_europe_west_iberia } - } - } - modifier = { # Value smaller empire - add = { - value = 2 - subtract = { - value = 0 - every_in_de_jure_hierarchy = { - limit = { tier = tier_kingdom } - add = 0.5 - } - } - min = 0 - } - } - modifier = { # Value most shared borders - add = { - value = 0 - every_in_de_jure_hierarchy = { - limit = { - tier = tier_county - any_neighboring_county = { target_is_de_jure_liege_or_above = scope:kingdom_to_distribute } - } - add = 1 - } - min = 0 - } - } - } - add_to_list = transferred_kingdoms - scope:kingdom_to_distribute = { set_de_jure_liege_title = prev.de_jure_liege } - } - } - } - } -} - -fp2_struggle_compromise_distribute_the_actual_titles = { - struggle:iberian_struggle = { - create_title_and_vassal_change = { - type = granted - save_scope_as = change - } - every_involved_ruler = { - limit = { - save_temporary_scope_as = new_owner_temp - primary_title = { - tier = tier_duchy - de_jure_liege ?= { fp2_struggle_ending_compromise_create_title_trigger = yes } - } - } - save_scope_as = new_owner - primary_title.de_jure_liege = { - change_title_holder = { - holder = scope:new_owner - change = scope:change - } - add_to_list = assigned_title - } - } - every_involved_ruler = { - limit = { - save_temporary_scope_as = new_owner_temp - primary_title = { - tier = tier_kingdom - de_jure_liege ?= { fp2_struggle_ending_compromise_create_title_trigger = yes } - } - } - save_scope_as = new_owner - primary_title.de_jure_liege = { - change_title_holder = { - holder = scope:new_owner - change = scope:change - } - add_to_list = assigned_title - } - } - resolve_title_and_vassal_change = scope:change - } -} - -# Add house modifiers to Involved rulers; Didn't rename the key for localization cost reasons -fp2_struggle_compromise_modifier_rewards_effect = { - struggle:iberian_struggle = { - show_as_tooltip = { - every_involved_ruler = { - limit = { this = root } - custom = fp2_struggle_compromise_house_rewards_tt - fp2_struggle_compromise_modifier_rewards_personal_house_effect = yes - } - every_involved_ruler = { - limit = { this = root } - custom = fp2_struggle_compromise_defensive_rewards_tt - fp2_struggle_compromise_modifier_rewards_personal_county_effect = yes - } - } - hidden_effect = { - every_involved_ruler = { - limit = { - top_liege = this - primary_title = { is_mercenary_company = no } - exists = house - NOT = { - house = { has_house_modifier = fp2_struggle_compromise_house_reward_modifier } - } - } - fp2_struggle_compromise_modifier_rewards_personal_house_effect = yes - } - every_involved_ruler = { - limit = { - top_liege = this - primary_title = { is_mercenary_company = no } - } - fp2_struggle_compromise_modifier_rewards_personal_county_effect = yes - } - } - } -} - -# Add house modifiers to a single character (used in tooltips); -fp2_struggle_compromise_modifier_rewards_personal_house_effect = { - house = { - custom_tooltip = fp2_struggle_compromise_house_enforce_truce_rewards_tt - add_house_modifier = { - modifier = fp2_struggle_compromise_house_reward_modifier - } - } -} - -# Add county modifiers to a single character (used in tooltips) -fp2_struggle_compromise_modifier_rewards_personal_county_effect = { - capital_county = { - add_county_modifier = { - modifier = fp2_struggle_compromise_defensive_reward_modifier - } - } -} - -# Add truces between all Involved rulers -fp2_struggle_compromise_truce_effect = { - hidden_effect = { - if = { - limit = { - struggle:iberian_struggle = { - any_involved_ruler = { - count > 1 - top_liege = this - primary_title = { is_mercenary_company = no } - } - } - } - struggle:iberian_struggle = { - every_involved_ruler = { - limit = { - top_liege = this - primary_title = { is_mercenary_company = no } - } - add_to_list = fp2_struggle_compromise_truce_list - } - } - while = { - limit = { - any_in_list = { - list = fp2_struggle_compromise_truce_list - NOT = { has_variable = fp2_struggle_compromise_flag } - } - } - ordered_in_list = { - list = fp2_struggle_compromise_truce_list - limit = { - NOT = { has_variable = fp2_struggle_compromise_flag } - } - order_by = realm_size - save_scope_as = realm_scope - set_variable = fp2_struggle_compromise_flag # variable ensures truces are set only once per couple - } - every_in_list = { - list = fp2_struggle_compromise_truce_list - limit = { - NOR = { - has_variable = fp2_struggle_compromise_flag - this = scope:realm_scope - has_truce = scope:realm_scope - } - } - add_truce_both_ways = { - character = scope:realm_scope - days = 3650 - name = TRUCE_FP2_COMPROMISE - } - } - } - every_in_list = { - list = fp2_struggle_compromise_truce_list - remove_variable = fp2_struggle_compromise_flag - } - } - } -} - -### Conciliation - -# Add House modifiers to all Involved rulers -fp2_struggle_conciliation_modifier_rewards_effect = { - struggle:iberian_struggle = { - every_involved_ruler = { - limit = { this = root } - custom = fp2_struggle_compromise_house_rewards_tt - show_as_tooltip = { fp2_struggle_conciliation_modifier_rewards_personal_effect = yes } - } - every_involved_ruler = { - limit = { - top_liege = this - primary_title = { is_mercenary_company = no } - exists = house - NOT = { - house = { has_house_modifier = fp2_struggle_conciliation_house_reward_modifier } - } - } - hidden_effect = { fp2_struggle_conciliation_modifier_rewards_personal_effect = yes } - } - } -} - -# Add House modifier to a single character (used in tooltips) -fp2_struggle_conciliation_modifier_rewards_personal_effect = { - house = { - add_house_modifier = { - modifier = fp2_struggle_conciliation_house_reward_modifier - } - } -} - -# Add cultural acceptance between Involved cultures -fp2_struggle_conciliation_cultural_acceptance_effect = { - hidden_effect = { - while = { - limit = { - any_in_global_list = { - variable = fp2_struggle_ending_culture_list - NOT = { has_variable = fp2_struggle_conciliation_flag } - } - } - ordered_in_global_list = { - variable = fp2_struggle_ending_culture_list - limit = { - NOT = { has_variable = fp2_struggle_conciliation_flag } - } - order_by = culture_number_of_counties - save_scope_as = culture_scope - set_variable = fp2_struggle_conciliation_flag # variable ensures acceptance is only gained once per couple - } - every_in_global_list = { - variable = fp2_struggle_ending_culture_list - limit = { - NOR = { - has_variable = fp2_struggle_conciliation_flag - this = scope:culture_scope - } - } - change_cultural_acceptance = { - target = scope:culture_scope - value = fp2_struggle_conciliation_culture_acceptance_value - desc = fp2_struggle_conciliation_acceptance_tt - } - } - } - every_in_global_list = { - variable = fp2_struggle_ending_culture_list - remove_variable = fp2_struggle_conciliation_flag - } - } -} - -################################################## -# Interactions -################################################## - -synergise_friendship_interaction_bonus_individual_effect = { - $SENIOR_CHARACTER$ = { - # Diplomacy education. - if = { - limit = { has_trait = education_diplomacy } - add_character_modifier = fp2_single_synergy_diplomacy_modifier - $JUNIOR_CHARACTER$ = { add_character_modifier = fp2_single_synergy_diplomacy_modifier } - } - # Martial education. - if = { - limit = { has_trait = education_martial } - add_character_modifier = fp2_single_synergy_martial_modifier - $JUNIOR_CHARACTER$ = { add_character_modifier = fp2_single_synergy_martial_modifier } - } - # Stewardship education. - if = { - limit = { has_trait = education_stewardship } - add_character_modifier = fp2_single_synergy_stewardship_modifier - $JUNIOR_CHARACTER$ = { add_character_modifier = fp2_single_synergy_stewardship_modifier } - } - # Intrigue education. - if = { - limit = { has_trait = education_intrigue } - add_character_modifier = fp2_single_synergy_intrigue_modifier - $JUNIOR_CHARACTER$ = { add_character_modifier = fp2_single_synergy_intrigue_modifier } - } - # Learning education. - if = { - limit = { has_trait = education_learning } - add_character_modifier = fp2_single_synergy_learning_modifier - $JUNIOR_CHARACTER$ = { add_character_modifier = fp2_single_synergy_learning_modifier } - } - } -} - -# Being $SENIOR_CHARACTER$ doesn't actually do anything in this variant, just maintaining term parity with the other synergy effect. -synergise_friendship_interaction_bonus_combined_effect = { - $SENIOR_CHARACTER$ = { - # Diplomacy combi-synergies. - if = { - limit = { has_trait = education_diplomacy } - # Diplomacy-Diplomacy - if = { - limit = { - $JUNIOR_CHARACTER$ = { has_trait = education_diplomacy } - } - add_character_modifier = fp2_double_synergy_diplomacy_diplomacy_modifier - $JUNIOR_CHARACTER$ = { add_character_modifier = fp2_double_synergy_diplomacy_diplomacy_modifier } - } - # Diplomacy-Martial - if = { - limit = { - $JUNIOR_CHARACTER$ = { has_trait = education_martial } - } - add_character_modifier = fp2_double_synergy_diplomacy_martial_modifier - $JUNIOR_CHARACTER$ = { add_character_modifier = fp2_double_synergy_diplomacy_martial_modifier } - } - # Diplomacy-Stewardship - if = { - limit = { - $JUNIOR_CHARACTER$ = { has_trait = education_stewardship } - } - add_character_modifier = fp2_double_synergy_diplomacy_stewardship_modifier - $JUNIOR_CHARACTER$ = { add_character_modifier = fp2_double_synergy_diplomacy_stewardship_modifier } - } - # Diplomacy-Intrigue - if = { - limit = { - $JUNIOR_CHARACTER$ = { has_trait = education_intrigue } - } - add_character_modifier = fp2_double_synergy_diplomacy_intrigue_modifier - $JUNIOR_CHARACTER$ = { add_character_modifier = fp2_double_synergy_diplomacy_intrigue_modifier } - } - # Diplomacy-Learning - if = { - limit = { - $JUNIOR_CHARACTER$ = { has_trait = education_learning } - } - add_character_modifier = fp2_double_synergy_diplomacy_learning_modifier - $JUNIOR_CHARACTER$ = { add_character_modifier = fp2_double_synergy_diplomacy_learning_modifier } - } - } - # Martial combi-synergies. - if = { - limit = { has_trait = education_martial } - # Martial-Diplomacy - if = { - limit = { - $JUNIOR_CHARACTER$ = { has_trait = education_diplomacy } - } - add_character_modifier = fp2_double_synergy_martial_diplomacy_modifier - $JUNIOR_CHARACTER$ = { add_character_modifier = fp2_double_synergy_martial_diplomacy_modifier } - } - # Martial-Martial - if = { - limit = { - $JUNIOR_CHARACTER$ = { has_trait = education_martial } - } - add_character_modifier = fp2_double_synergy_martial_martial_modifier - $JUNIOR_CHARACTER$ = { add_character_modifier = fp2_double_synergy_martial_martial_modifier } - } - # Martial-Stewardship - if = { - limit = { - $JUNIOR_CHARACTER$ = { has_trait = education_stewardship } - } - add_character_modifier = fp2_double_synergy_martial_stewardship_modifier - $JUNIOR_CHARACTER$ = { add_character_modifier = fp2_double_synergy_martial_stewardship_modifier } - } - # Martial-Intrigue - if = { - limit = { - $JUNIOR_CHARACTER$ = { has_trait = education_intrigue } - } - add_character_modifier = fp2_double_synergy_martial_intrigue_modifier - $JUNIOR_CHARACTER$ = { add_character_modifier = fp2_double_synergy_martial_intrigue_modifier } - } - # Martial-Learning - if = { - limit = { - $JUNIOR_CHARACTER$ = { has_trait = education_learning } - } - add_character_modifier = fp2_double_synergy_martial_learning_modifier - $JUNIOR_CHARACTER$ = { add_character_modifier = fp2_double_synergy_martial_learning_modifier } - } - } - # Stewardship combi-synergies. - if = { - limit = { has_trait = education_stewardship } - # Stewardship-Diplomacy - if = { - limit = { - $JUNIOR_CHARACTER$ = { has_trait = education_diplomacy } - } - add_character_modifier = fp2_double_synergy_stewardship_diplomacy_modifier - $JUNIOR_CHARACTER$ = { add_character_modifier = fp2_double_synergy_stewardship_diplomacy_modifier } - } - # Stewardship-Martial - if = { - limit = { - $JUNIOR_CHARACTER$ = { has_trait = education_martial } - } - add_character_modifier = fp2_double_synergy_stewardship_martial_modifier - $JUNIOR_CHARACTER$ = { add_character_modifier = fp2_double_synergy_stewardship_martial_modifier } - } - # Stewardship-Stewardship - if = { - limit = { - $JUNIOR_CHARACTER$ = { has_trait = education_stewardship } - } - add_character_modifier = fp2_double_synergy_stewardship_stewardship_modifier - $JUNIOR_CHARACTER$ = { add_character_modifier = fp2_double_synergy_stewardship_stewardship_modifier } - } - # Stewardship-Intrigue - if = { - limit = { - $JUNIOR_CHARACTER$ = { has_trait = education_intrigue } - } - add_character_modifier = fp2_double_synergy_stewardship_intrigue_modifier - $JUNIOR_CHARACTER$ = { add_character_modifier = fp2_double_synergy_stewardship_intrigue_modifier } - } - # Stewardship-Learning - if = { - limit = { - $JUNIOR_CHARACTER$ = { has_trait = education_learning } - } - add_character_modifier = fp2_double_synergy_stewardship_learning_modifier - $JUNIOR_CHARACTER$ = { add_character_modifier = fp2_double_synergy_stewardship_learning_modifier } - } - } - # Intrigue combi-synergies. - if = { - limit = { has_trait = education_intrigue } - # Intrigue-Diplomacy - if = { - limit = { - $JUNIOR_CHARACTER$ = { has_trait = education_diplomacy } - } - add_character_modifier = fp2_double_synergy_intrigue_diplomacy_modifier - $JUNIOR_CHARACTER$ = { add_character_modifier = fp2_double_synergy_intrigue_diplomacy_modifier } - } - # Intrigue-Martial - if = { - limit = { - $JUNIOR_CHARACTER$ = { has_trait = education_martial } - } - add_character_modifier = fp2_double_synergy_intrigue_martial_modifier - $JUNIOR_CHARACTER$ = { add_character_modifier = fp2_double_synergy_intrigue_martial_modifier } - } - # Intrigue-Stewardship - if = { - limit = { - $JUNIOR_CHARACTER$ = { has_trait = education_stewardship } - } - add_character_modifier = fp2_double_synergy_intrigue_stewardship_modifier - $JUNIOR_CHARACTER$ = { add_character_modifier = fp2_double_synergy_intrigue_stewardship_modifier } - } - # Intrigue-Intrigue - if = { - limit = { - $JUNIOR_CHARACTER$ = { has_trait = education_intrigue } - } - add_character_modifier = fp2_double_synergy_intrigue_intrigue_modifier - $JUNIOR_CHARACTER$ = { add_character_modifier = fp2_double_synergy_intrigue_intrigue_modifier } - } - # Intrigue-Learning - if = { - limit = { - $JUNIOR_CHARACTER$ = { has_trait = education_learning } - } - add_character_modifier = fp2_double_synergy_intrigue_learning_modifier - $JUNIOR_CHARACTER$ = { add_character_modifier = fp2_double_synergy_intrigue_learning_modifier } - } - } - # Learning combi-synergies. - if = { - limit = { has_trait = education_learning } - # Learning-Diplomacy - if = { - limit = { - $JUNIOR_CHARACTER$ = { has_trait = education_diplomacy } - } - add_character_modifier = fp2_double_synergy_learning_diplomacy_modifier - $JUNIOR_CHARACTER$ = { add_character_modifier = fp2_double_synergy_learning_diplomacy_modifier } - } - # Learning-Martial - if = { - limit = { - $JUNIOR_CHARACTER$ = { has_trait = education_martial } - } - add_character_modifier = fp2_double_synergy_learning_martial_modifier - $JUNIOR_CHARACTER$ = { add_character_modifier = fp2_double_synergy_learning_martial_modifier } - } - # Learning-Stewardship - if = { - limit = { - $JUNIOR_CHARACTER$ = { has_trait = education_stewardship } - } - add_character_modifier = fp2_double_synergy_learning_stewardship_modifier - $JUNIOR_CHARACTER$ = { add_character_modifier = fp2_double_synergy_learning_stewardship_modifier } - } - # Learning-Intrigue - if = { - limit = { - $JUNIOR_CHARACTER$ = { has_trait = education_intrigue } - } - add_character_modifier = fp2_double_synergy_learning_intrigue_modifier - $JUNIOR_CHARACTER$ = { add_character_modifier = fp2_double_synergy_learning_intrigue_modifier } - } - # Learning-Learning - if = { - limit = { - $JUNIOR_CHARACTER$ = { has_trait = education_learning } - } - add_character_modifier = fp2_double_synergy_learning_learning_modifier - $JUNIOR_CHARACTER$ = { add_character_modifier = fp2_double_synergy_learning_learning_modifier } - } - } - } -} - -synergise_friendship_interaction_actual_effect = { - if = { - limit = { always = scope:synergy_bonus_actor } - synergise_friendship_interaction_bonus_individual_effect = { - SENIOR_CHARACTER = scope:actor - JUNIOR_CHARACTER = scope:recipient - } - } - if = { - limit = { always = scope:synergy_bonus_recipient } - synergise_friendship_interaction_bonus_individual_effect = { - SENIOR_CHARACTER = scope:recipient - JUNIOR_CHARACTER = scope:actor - } - } - if = { - limit = { always = scope:synergy_bonus_mixed } - synergise_friendship_interaction_bonus_combined_effect = { - SENIOR_CHARACTER = scope:actor - JUNIOR_CHARACTER = scope:recipient - } - } -} - -remove_every_best_friend_synergy_bonus_modifier_effect = { - if = { - limit = { has_character_modifier = fp2_single_synergy_diplomacy_modifier } - remove_character_modifier = fp2_single_synergy_diplomacy_modifier - } - if = { - limit = { has_character_modifier = fp2_single_synergy_martial_modifier } - remove_character_modifier = fp2_single_synergy_martial_modifier - } - if = { - limit = { has_character_modifier = fp2_single_synergy_stewardship_modifier } - remove_character_modifier = fp2_single_synergy_stewardship_modifier - } - if = { - limit = { has_character_modifier = fp2_single_synergy_intrigue_modifier } - remove_character_modifier = fp2_single_synergy_intrigue_modifier - } - if = { - limit = { has_character_modifier = fp2_single_synergy_learning_modifier } - remove_character_modifier = fp2_single_synergy_learning_modifier - } - if = { - limit = { has_character_modifier = fp2_double_synergy_diplomacy_diplomacy_modifier } - remove_character_modifier = fp2_double_synergy_diplomacy_diplomacy_modifier - } - if = { - limit = { has_character_modifier = fp2_double_synergy_diplomacy_martial_modifier } - remove_character_modifier = fp2_double_synergy_diplomacy_martial_modifier - } - if = { - limit = { has_character_modifier = fp2_double_synergy_diplomacy_stewardship_modifier } - remove_character_modifier = fp2_double_synergy_diplomacy_stewardship_modifier - } - if = { - limit = { has_character_modifier = fp2_double_synergy_diplomacy_intrigue_modifier } - remove_character_modifier = fp2_double_synergy_diplomacy_intrigue_modifier - } - if = { - limit = { has_character_modifier = fp2_double_synergy_diplomacy_learning_modifier } - remove_character_modifier = fp2_double_synergy_diplomacy_learning_modifier - } - if = { - limit = { has_character_modifier = fp2_double_synergy_martial_diplomacy_modifier } - remove_character_modifier = fp2_double_synergy_martial_diplomacy_modifier - } - if = { - limit = { has_character_modifier = fp2_double_synergy_martial_martial_modifier } - remove_character_modifier = fp2_double_synergy_martial_martial_modifier - } - if = { - limit = { has_character_modifier = fp2_double_synergy_martial_stewardship_modifier } - remove_character_modifier = fp2_double_synergy_martial_stewardship_modifier - } - if = { - limit = { has_character_modifier = fp2_double_synergy_martial_intrigue_modifier } - remove_character_modifier = fp2_double_synergy_martial_intrigue_modifier - } - if = { - limit = { has_character_modifier = fp2_double_synergy_martial_learning_modifier } - remove_character_modifier = fp2_double_synergy_martial_learning_modifier - } - if = { - limit = { has_character_modifier = fp2_double_synergy_stewardship_diplomacy_modifier } - remove_character_modifier = fp2_double_synergy_stewardship_diplomacy_modifier - } - if = { - limit = { has_character_modifier = fp2_double_synergy_stewardship_martial_modifier } - remove_character_modifier = fp2_double_synergy_stewardship_martial_modifier - } - if = { - limit = { has_character_modifier = fp2_double_synergy_stewardship_stewardship_modifier } - remove_character_modifier = fp2_double_synergy_stewardship_stewardship_modifier - } - if = { - limit = { has_character_modifier = fp2_double_synergy_stewardship_intrigue_modifier } - remove_character_modifier = fp2_double_synergy_stewardship_intrigue_modifier - } - if = { - limit = { has_character_modifier = fp2_double_synergy_stewardship_learning_modifier } - remove_character_modifier = fp2_double_synergy_stewardship_learning_modifier - } - if = { - limit = { has_character_modifier = fp2_double_synergy_intrigue_diplomacy_modifier } - remove_character_modifier = fp2_double_synergy_intrigue_diplomacy_modifier - } - if = { - limit = { has_character_modifier = fp2_double_synergy_intrigue_martial_modifier } - remove_character_modifier = fp2_double_synergy_intrigue_martial_modifier - } - if = { - limit = { has_character_modifier = fp2_double_synergy_intrigue_stewardship_modifier } - remove_character_modifier = fp2_double_synergy_intrigue_stewardship_modifier - } - if = { - limit = { has_character_modifier = fp2_double_synergy_intrigue_intrigue_modifier } - remove_character_modifier = fp2_double_synergy_intrigue_intrigue_modifier - } - if = { - limit = { has_character_modifier = fp2_double_synergy_intrigue_learning_modifier } - remove_character_modifier = fp2_double_synergy_intrigue_learning_modifier - } - if = { - limit = { has_character_modifier = fp2_double_synergy_learning_diplomacy_modifier } - remove_character_modifier = fp2_double_synergy_learning_diplomacy_modifier - } - if = { - limit = { has_character_modifier = fp2_double_synergy_learning_martial_modifier } - remove_character_modifier = fp2_double_synergy_learning_martial_modifier - } - if = { - limit = { has_character_modifier = fp2_double_synergy_learning_stewardship_modifier } - remove_character_modifier = fp2_double_synergy_learning_stewardship_modifier - } - if = { - limit = { has_character_modifier = fp2_double_synergy_learning_intrigue_modifier } - remove_character_modifier = fp2_double_synergy_learning_intrigue_modifier - } - if = { - limit = { has_character_modifier = fp2_double_synergy_learning_learning_modifier } - remove_character_modifier = fp2_double_synergy_learning_learning_modifier - } -} - -purchase_truce_interaction_work_out_truce_days_effect = { - if = { - limit = { always = scope:pt_sum_small } - add_truce_both_ways = { - character = $TARGET$ - days = purchase_truce_interaction_truce_days_small_value - name = TRUCE_PURCHASED - } - } - else_if = { - limit = { always = scope:pt_sum_large } - add_truce_both_ways = { - character = $TARGET$ - days = purchase_truce_interaction_truce_days_large_value - name = TRUCE_PURCHASED - } - } - else = { - add_truce_both_ways = { - character = $TARGET$ - days = purchase_truce_interaction_truce_days_medium_value - name = TRUCE_PURCHASED - } - } -} - -purchase_truce_interaction_work_out_purchase_cost_effect = { - scope:actor = { - # Small cost. - if = { - limit = { always = scope:pt_sum_small } - pay_short_term_gold = { - target = scope:recipient - gold = { - value = 0 - add = pt_sum_small_value - } - } - } - # Large cost. - else_if = { - limit = { always = scope:pt_sum_large } - pay_short_term_gold = { - target = scope:recipient - gold = { - value = 0 - add = pt_sum_large_value - } - } - } - # Medium cost; we do this last as a fallback. - else = { - pay_short_term_gold = { - target = scope:recipient - gold = { - value = 0 - add = pt_sum_medium_value - } - } - } - } -} - -purchase_truce_interaction_activate_catalyst_effect = { - if = { - limit = { - any_character_struggle = { - involvement = involved - activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { - CATALYST = catalyst_bought_important_truce - CHAR = scope:recipient - } - } - } - every_character_struggle = { - involvement = involved - limit = { - activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { - CATALYST = catalyst_bought_important_truce - CHAR = scope:recipient - } - } - activate_struggle_catalyst = { - catalyst = catalyst_bought_important_truce - character = scope:actor - } - } - } - - # Generic truce catalayst - if = { - limit = { - any_character_struggle = { - involvement = involved - activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { - CATALYST = catalyst_sign_truce_outside_war - CHAR = scope:recipient - } - } - } - every_character_struggle = { - involvement = involved - limit = { - activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { - CATALYST = catalyst_sign_truce_outside_war - CHAR = scope:recipient - } - } - activate_struggle_catalyst = { - catalyst = catalyst_sign_truce_outside_war - character = scope:actor - } - } - } -} - -clean_revolt_county_modifiers_from_faction_members_effect = { - every_faction_county_member = { - if = { - limit = { has_county_modifier = small_investment_in_revolt_modifier } - remove_county_modifier = small_investment_in_revolt_modifier - } - else_if = { - limit = { has_county_modifier = medium_investment_in_revolt_modifier } - remove_county_modifier = medium_investment_in_revolt_modifier - } - else_if = { - limit = { has_county_modifier = high_investment_in_revolt_modifier } - remove_county_modifier = high_investment_in_revolt_modifier - } - } -} - -generate_troops_from_revolt_county_modifiers_effect = { - if = { - limit = { - scope:attacker = { - joined_faction = { - any_faction_county_member = { - OR = { - has_county_modifier = small_investment_in_revolt_modifier - has_county_modifier = medium_investment_in_revolt_modifier - has_county_modifier = high_investment_in_revolt_modifier - } - } - } - } - } - scope:attacker = { - joined_faction = { - every_faction_county_member = { - limit = { - OR = { - has_county_modifier = small_investment_in_revolt_modifier - has_county_modifier = medium_investment_in_revolt_modifier - has_county_modifier = high_investment_in_revolt_modifier - } - } - - random_county_province = { - save_scope_as = chosen_location - } - scope:attacker = { - - set_variable = { - name = number_rebel_reinforcements - value = { - add = { - if = { - limit = { prev = { has_county_modifier = small_investment_in_revolt_modifier } } - add = 250 - } - if = { - limit = { prev = { has_county_modifier = medium_investment_in_revolt_modifier } } - add = 750 - } - if = { - limit = { prev = { has_county_modifier = high_investment_in_revolt_modifier } } - add = 2000 - } - } - } - } - - spawn_army = { - name = peasant_troops_name - levies = var:number_rebel_reinforcements - location = scope:chosen_location - war = scope:war - } - } - } - - clean_revolt_county_modifiers_from_faction_members_effect = yes - - } - } - - } -} - -fp2_contract_assistance_war_pay_effect = { - if = { - limit = { - has_fp2_dlc_trigger = yes - any_war_participant = { - has_variable = owed_contract_assistance_war - var:owed_contract_assistance_war = scope:war - } - } - every_war_participant = { - limit = { - has_variable = owed_contract_assistance_war - var:owed_contract_assistance_war = scope:war - } - remove_variable = owed_contract_assistance_war - save_scope_as = contract_assistance_helper - if = { - limit = { is_attacker_in_war = scope:war } - scope:war.primary_attacker = { save_scope_as = contract_assistance_hirer } - } - else = { - scope:war.primary_defender = { save_scope_as = contract_assistance_hirer } - } - if = { - limit = { - scope:war = { - war_contribution = { - target = scope:contract_assistance_helper - value >= scope:contract_assistance_helper.var:owed_contract_assistance_contribution - } - } - } - scope:contract_assistance_hirer = { - send_interface_message = { - type = event_gold_neutral - title = contract_assistance_war_msg_title - left_icon = scope:contract_assistance_helper - custom_tooltip = contract_assistance_war_msg_hirer_paid_desc - pay_short_term_gold = { - target = scope:contract_assistance_helper - gold = scope:contract_assistance_helper.var:owed_contract_assistance_gold - } - } - } - scope:contract_assistance_helper = { - send_interface_message = { - type = event_gold_good - title = contract_assistance_war_msg_title - left_icon = scope:contract_assistance_hirer - custom_tooltip = contract_assistance_war_msg_helper_paid_desc - show_as_tooltip = { - scope:contract_assistance_hirer = { - pay_short_term_gold = { - target = scope:contract_assistance_helper - gold = scope:contract_assistance_helper.var:owed_contract_assistance_gold - } - } - } - } - } - } - else = { - scope:contract_assistance_hirer = { - send_interface_message = { - type = event_gold_neutral - title = contract_assistance_war_msg_title - left_icon = scope:contract_assistance_helper - custom_tooltip = contract_assistance_war_msg_hirer_kept_desc - } - } - scope:contract_assistance_helper = { - add_character_flag = { - flag = fp2_contract_assistance_failure - years = 10 - } - send_interface_message = { - type = event_gold_bad - title = contract_assistance_war_msg_title - left_icon = scope:contract_assistance_hirer - custom_tooltip = contract_assistance_war_msg_helper_kept_desc - } - } - } - remove_variable = owed_contract_assistance_contribution - remove_variable = owed_contract_assistance_gold - } - } -} - -fp2_contract_assistance_invalidated_effect = { - if = { - limit = { - has_fp2_dlc_trigger = yes - any_war_participant = { - has_variable = owed_contract_assistance_war - var:owed_contract_assistance_war = scope:war - } - } - every_war_participant = { - limit = { - has_variable = owed_contract_assistance_war - var:owed_contract_assistance_war = scope:war - } - remove_variable = owed_contract_assistance_war - remove_variable = owed_contract_assistance_contribution - remove_variable = owed_contract_assistance_gold - save_scope_as = contract_assistance_helper - if = { - limit = { is_attacker_in_war = scope:war } - scope:war.primary_attacker = { save_scope_as = contract_assistance_hirer } - } - else = { - scope:war.primary_defender = { save_scope_as = contract_assistance_hirer } - } - scope:contract_assistance_hirer = { - send_interface_message = { - type = event_gold_neutral - title = contract_assistance_war_msg_title - left_icon = scope:contract_assistance_helper - custom_tooltip = contract_assistance_war_msg_hirer_invalidated_desc - } - } - scope:contract_assistance_helper = { - send_interface_message = { - type = event_gold_neutral - title = contract_assistance_war_msg_title - left_icon = scope:contract_assistance_hirer - custom_tooltip = contract_assistance_war_msg_helper_invalidated_desc - } - } - } - } -} - -invite_special_guest_to_activity_effect = { - if = { - limit = { - exists = var:special_guest - } - - var:special_guest = { - save_scope_as = the_special_guest - } - - save_scope_as = sender - - scope:the_special_guest = { - add_to_activity = scope:activity - - set_variable = { - name = booked_for_a_party - value = scope:sender - days = 20 - } - } - - remove_variable = special_guest - } -} - -################################################## -# Struggle -################################################## - -fp2_struggle_apply_ai_agenda_effect = { - # Apply effects - add_character_flag = { - flag = agenda_towards_$INTENT$ - } - root = { - change_variable = { - name = agents_for_$INTENT$ - add = 1 - } - } -} - -gifting_leads_towards_friendship_effect = { - if = { - # then verify the right struggle phase - limit = { - is_diff_faith_or_culture_trigger = { - CHAR = scope:actor - STATUS = involved - } - any_character_struggle = { - involvement = involved - has_struggle_phase_parameter = struggle_gifts_involved_diff_faith_culture_leads_to_friendship - } - } - progress_towards_friend_effect = { - REASON = friend_struggle_gift - CHARACTER = scope:actor - OPINION = 0 - } - } -} - -################################################## -# CBs -################################################## - - - -################################################## -# Yearlies -################################################## - -fp2_lyonese_monk_return_territories_effect = { - if = { - limit = { - scope:acolyte = { is_playable_character = yes } - } - create_title_and_vassal_change = { - type = granted - save_scope_as = change - } - scope:acolyte = { - every_held_title = { - title_tier >= county - change_title_holder = { - holder = scope:acolyte_host - change = scope:change - } - } - resolve_title_and_vassal_change = scope:change - } - } -} - -fp2_lyonese_monk_cancel_chain_effect = { - # Tidy up the story. - scope:story = { end_story = yes } - # Tidy up scope:acolyte. - ## We do this via some mild scope wizardry. - save_scope_value_as = { - name = remove_acolyte - value = flag:$REMOVAL$ - } - ## Either they sod off. - if = { - limit = { scope:remove_acolyte = flag:banished } - fp2_lyonese_monk_return_territories_effect = yes - scope:acolyte = { - move_to_pool = yes - silent_disappearance_effect = yes - } - } - ## Or they're killed during apprehension. - else_if = { - limit = { scope:remove_acolyte = flag:scuffle } - fp2_lyonese_monk_return_territories_effect = yes - scope:acolyte = { - custom_tooltip = fp2_lyonese_monk_cancel_chain_effect.tt - hidden_effect = { - death = { - death_reason = death_scuffle_with_soldiers - killer = scope:acolyte_host - } - } - } - } - ## Or else they're given to the Pope. - else_if = { - limit = { scope:remove_acolyte = flag:pope } - fp2_lyonese_monk_return_territories_effect = yes - # So we walk through the narrative... - scope:acolyte = { - if = { - limit = { is_playable_character = no } - select_and_move_to_pool_effect = yes - } - } - rightfully_imprison_character_effect = { - TARGET = scope:acolyte - IMPRISONER = scope:pope - } - scope:acolyte = { - hidden_effect = { - death = { - death_reason = death_dungeon - killer = scope:pope - } - } - } - } -} - -################################################## -# Legacies -################################################## - - - -################################################## -# Governments -################################################## - - - -################################################## -# Casus Belli -################################################## - -fp2_border_raid_damage_effect = { - change_county_control = fp2_border_raid_control_change_value - change_development_level = fp2_border_raid_development_change_value - if = { - limit = { exists = scope:raid_province } - show_as_tooltip = { destroy_random_building_effect = yes } - } - scope:attacker = { add_gold = fp2_border_raid_gold_change_value } -} - -################################################## -# Historical Artefacts -################################################## - -create_artifact_goblet_chalice_of_dona_urraca = { - $OWNER$ = { save_scope_as = owner } - set_artifact_rarity_famed = yes - scope:owner = { - create_artifact = { - name = fp2_chalice_dona_urraca - description = fp2_chalice_dona_urraca_desc - template = fp2_chalice_dona_urraca_template - type = miscellaneous_when_not_court - visuals = fp2_chalice_dona_urraca - wealth = scope:wealth - quality = scope:quality - modifier = chalice_of_dona_urraca_modifier - save_scope_as = newly_created_artifact - } - } - scope:newly_created_artifact = { - set_variable = { - name = dlc_potential_court_artefact - value = yes - } - set_variable = { - name = historical_unique_artifact - value = yes - } - set_variable = { - name = relic - value = flag:christian - } - } -} - -create_artifact_various_aquamanile_santiago = { - $OWNER$ = { save_scope_as = owner } - character:3206 = { save_scope_as = reforger } - set_artifact_rarity_illustrious = yes - scope:owner = { - create_artifact = { - name = fp2_santiago_aquamanile - description = fp2_santiago_aquamanile_desc - template = fp2_santiago_aquamanile_template - type = miscellaneous_when_not_court - visuals = fp2_santiago_aquamanile - wealth = scope:wealth - quality = scope:quality - modifier = former_bells_of_santiago_modifier - decaying = no - save_scope_as = newly_created_artifact - } - } - scope:newly_created_artifact = { - set_variable = { - name = dlc_potential_court_artefact - value = yes - } - set_variable = { - name = historical_unique_artifact - value = yes - } - set_variable = { - name = relic - value = flag:iberian_struggle - } - } -} - -create_artifact_various_bells_santiago = { - $OWNER$ = { save_scope_as = owner } - set_artifact_rarity_illustrious = yes - scope:owner = { - create_artifact = { - name = fp2_santiago_bells - description = fp2_santiago_bells_desc - template = fp2_santiago_bells_template - type = miscellaneous_when_not_court - visuals = fp2_santiago_bells - wealth = scope:wealth - quality = scope:quality - modifier = bells_of_santiago_modifier - decaying = no - save_scope_as = newly_created_artifact - } - } - scope:newly_created_artifact = { - set_variable = { - name = dlc_potential_court_artefact - value = yes - } - set_variable = { - name = historical_unique_artifact - value = yes - } - set_variable = { - name = relic - value = flag:iberian_struggle - } - } -} - -create_artifact_fp2_votive_crowns_effect = { - $OWNER$ = { save_scope_as = owner } - set_artifact_rarity_famed = yes - scope:owner = { - create_artifact = { - name = fp2_votive_crowns - description = fp2_votive_crowns_desc - template = crown_christian_relic_template - type = regalia - visuals = fp2_votive_crowns - wealth = scope:wealth - quality = scope:quality - modifier = votive_crown_modifier - save_scope_as = newly_created_artifact - } - } - scope:newly_created_artifact = { - set_variable = { - name = dlc_potential_court_artefact - value = yes - } - } -} - -################################################## -# Other Artefacts -################################################## - -create_artifact_fp2_armillary_sphere_core_effect = { - create_artifact = { - name = fp2_armillary_sphere - # Description will be regenerated in the post-creation effects, since we need to nab materials. - description = placeholder - creator = scope:maker - type = $TYPE$ - visuals = fp2_armillary_sphere - wealth = scope:wealth - quality = scope:quality - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - } -} - -create_artifact_fp2_armillary_sphere_effect = { - # Set up general scopes. - $OWNER$ = { save_scope_as = owner } - $MAKER$ = { save_scope_as = maker } - # Begin creating. - hidden_effect_new_object = { - # Get artifact quality, wealth, and materials. - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - # Create the artifact. - scope:owner = { - if = { - limit = { has_royal_court = yes } - create_artifact_fp2_armillary_sphere_core_effect = { TYPE = scientific_apparatus } - } - else = { - create_artifact_fp2_armillary_sphere_core_effect = { TYPE = miscellaneous_when_not_court } - } - } - scope:newly_created_artifact = { - # Flag this as something that can be reforged for free, if relevant. - if = { - limit = { - $OWNER$ = { has_royal_court = no } - } - set_variable = { - name = dlc_potential_court_artefact - value = yes - } - } - set_artifact_feature_group = generic_material_wood - set_artifact_feature_group = decoration_material_inlay - set_artifact_description = fp2_armillary_sphere_desc - # Let's add modifiers! - add_scaled_artifact_modifier_learning_lifestyle_xp_effect = yes - if = { - limit = { - OR = { - rarity = famed - rarity = illustrious - } - } - add_artifact_modifier = artifact_learning_per_prestige_level_modifier - } - add_scaled_artifact_modifier_grandeur_big_effect = yes - # Remove the placeholder. - remove_artifact_modifier = artifact_placeholder_modifier - } - } -} - -create_artifact_fp2_2p_chess_board_effect = { - $OWNER$ = { save_scope_as = owner } - set_artifact_rarity_common = yes - if = { - limit = { - location = { - bg_game_type_region_go_trigger = yes - } - } - create_artifact = { - name = tgp_go_board - description = tgp_go_board_desc - type = miscellaneous_when_not_court - visuals = go_board_game_artifact - wealth = scope:wealth - quality = scope:quality - modifier = artifact_stress_gain_2_modifier - save_scope_as = newly_created_artifact - } - } - else = { #Chess is the fallback - create_artifact = { - name = fp2_2p_chess_board - description = fp2_2p_chess_board_desc - type = miscellaneous_when_not_court - visuals = fp2_2p_chess_board - wealth = scope:wealth - quality = scope:quality - modifier = artifact_stress_gain_2_modifier - save_scope_as = newly_created_artifact - } - } - #Same followup modifiers: - scope:newly_created_artifact = { - # Flag this as something that can be reforged for free. - set_variable = { - name = dlc_potential_court_artefact - value = yes - } - # And used in board games. - set_variable = { - name = can_be_used_for_board_games - value = yes - } - hidden_effect = { add_artifact_modifier = artifact_befriend_scheme_phase_duration_add_2_modifier } - } -} - -create_artifact_fp2_4p_chess_board_effect = { - $OWNER$ = { save_scope_as = owner } - set_artifact_rarity_masterwork = yes - create_artifact = { - name = fp2_4p_chess_board - description = fp2_4p_chess_board_desc - type = miscellaneous_when_not_court - visuals = fp2_4p_chess_board - wealth = scope:wealth - quality = scope:quality - modifier = artifact_stress_gain_4_modifier - save_scope_as = newly_created_artifact - } - scope:newly_created_artifact = { - # Flag this as something that can be reforged for free. - set_variable = { - name = dlc_potential_court_artefact - value = yes - } - # And used in board games. - set_variable = { - name = can_be_used_for_board_games - value = yes - } - hidden_effect = { add_artifact_modifier = artifact_befriend_scheme_phase_duration_add_4_modifier } - } -} - -create_artifact_fp2_andalusian_aquamanile_core_effect = { - create_artifact = { - name = fp2_andalusian_aquamanile - # Description will be regenerated in the post-creation effects, since we need to nab materials. - description = placeholder - type = $TYPE$ - visuals = fp2_andalusian_aquamanile - wealth = scope:wealth - quality = scope:quality - modifier = artifact_negate_health_penalty_add_2_modifier - save_scope_as = newly_created_artifact - } -} - -create_artifact_fp2_andalusian_aquamanile_effect = { - # Set up general scopes. - $OWNER$ = { save_scope_as = owner } - $SMITH$ = { save_scope_as = maker } - # Begin creating. - hidden_effect_new_object = { - # Get artifact quality, wealth, and materials. - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - # Create the artifact. - scope:owner = { - if = { - limit = { has_royal_court = yes } - create_artifact_fp2_andalusian_aquamanile_core_effect = { TYPE = jug } - } - else = { - create_artifact_fp2_andalusian_aquamanile_core_effect = { TYPE = miscellaneous_when_not_court } - } - } - scope:newly_created_artifact = { - # Flag this as something that can be reforged for free, if relevant. - if = { - limit = { - $OWNER$ = { has_royal_court = no } - } - set_variable = { - name = dlc_potential_court_artefact - value = yes - } - } - set_artifact_feature_group = goblet_material - set_artifact_feature_group = decoration_material_inlay - set_artifact_description = fp2_andalusian_aquamanile_desc - # Let's add modifiers! - ## Illustrious gets to be very swanky. - if = { - limit = { rarity = illustrious } - add_2_scaled_artifact_modifier_devotion_effect = yes - add_scaled_artifact_modifier_grandeur_small_effect = yes - } - ## Common is a bit meh. - else_if = { - limit = { rarity = common } - add_scaled_artifact_modifier_devotion_effect = yes - } - ## Everything else is decent. - else = { add_2_scaled_artifact_modifier_devotion_effect = yes } - } - } -} - -fp2_enforce_truce_opinion_effect = { - if = { - limit = { scope:target.attacker_war_score >= fp2_enforce_truce_war_score_value } - reverse_add_opinion = { - target = scope:target.primary_attacker - modifier = fp2_enforced_truce_opinion - opinion = -20 - } - reverse_add_opinion = { - target = scope:target.primary_defender - modifier = fp2_enforced_truce_opinion - opinion = 20 - } - } - else_if = { - limit = { scope:target.defender_war_score >= fp2_enforce_truce_war_score_value } - reverse_add_opinion = { - target = scope:target.primary_defender - modifier = fp2_enforced_truce_opinion - opinion = -20 - } - reverse_add_opinion = { - target = scope:target.primary_attacker - modifier = fp2_enforced_truce_opinion - opinion = 20 - } - } - else = { - reverse_add_opinion = { - target = scope:target.primary_defender - modifier = fp2_enforced_truce_opinion - opinion = -10 - } - reverse_add_opinion = { - target = scope:target.primary_attacker - modifier = fp2_enforced_truce_opinion - opinion = -10 - } - } -} - -############################################################## -# Generic Scripted Effect: Get Lowest/Highest Player Skill -# By Hugo Cortell -################################ - -# (simplified for readability) - -get_lowest_player_skill_effect = { - save_scope_value_as = { - name = lowest_player_skill - value = flag:diplomacy - } - save_scope_value_as = { - name = lowest_player_skill_value - value = diplomacy - } - if = { - limit = { martial < scope:lowest_player_skill_value } - save_scope_value_as = { - name = lowest_player_skill - value = flag:martial - } - save_scope_value_as = { - name = lowest_player_skill_value - value = martial - } - } - if = { - limit = { stewardship < scope:lowest_player_skill_value } - save_scope_value_as = { - name = lowest_player_skill - value = flag:stewardship - } - save_scope_value_as = { - name = lowest_player_skill_value - value = stewardship - } - } - if = { - limit = { intrigue < scope:lowest_player_skill_value } - save_scope_value_as = { - name = lowest_player_skill - value = flag:intrigue - } - save_scope_value_as = { - name = lowest_player_skill_value - value = intrigue - } - } - if = { - limit = { learning < scope:lowest_player_skill_value } - save_scope_value_as = { - name = lowest_player_skill - value = flag:learning - } - save_scope_value_as = { - name = lowest_player_skill_value - value = learning - } - } -} - -get_highest_player_skill_effect = { - save_scope_value_as = { - name = highest_player_skill - value = flag:diplomacy - } - save_scope_value_as = { - name = highest_player_skill_value - value = diplomacy - } - if = { - limit = { martial > scope:highest_player_skill_value } - save_scope_value_as = { - name = highest_player_skill - value = flag:martial - } - save_scope_value_as = { - name = highest_player_skill_value - value = martial - } - } - if = { - limit = { stewardship > scope:highest_player_skill_value } - save_scope_value_as = { - name = highest_player_skill - value = flag:stewardship - } - save_scope_value_as = { - name = highest_player_skill_value - value = stewardship - } - } - if = { - limit = { intrigue > scope:highest_player_skill_value } - save_scope_value_as = { - name = highest_player_skill - value = flag:intrigue - } - save_scope_value_as = { - name = highest_player_skill_value - value = intrigue - } - } - if = { - limit = { learning > scope:highest_player_skill_value } - save_scope_value_as = { - name = highest_player_skill - value = flag:learning - } - save_scope_value_as = { - name = highest_player_skill_value - value = learning - } - } -} - -fp2_struggle_found_kingdom_toledo_empire_effect = { - create_title_and_vassal_change = { - type = created - save_scope_as = title_change - add_claim_on_loss = no - } - title:k_toledo = { - change_title_holder = { - holder = root - change = scope:title_change - } - } - resolve_title_and_vassal_change = scope:title_change - title:d_toledo = { add_to_list = kingdom_toledo_absorb_list } - if = { - limit = { NOT = { exists = scope:has_kingdom_toledo_absorb_list_been_created } } - ordered_held_title = { - title_tier = duchy - limit = { - is_titular = no - NOT = { this = title:d_toledo } - root = { completely_controls = prev } - any_title_to_title_neighboring_and_across_water_duchy = { this = title:d_toledo } - de_jure_liege = { - any_in_de_jure_hierarchy = { - count > 2 - tier = tier_duchy - } - } - } - order_by = { - value = 0 - every_de_jure_county = { - limit = { any_neighboring_county = { de_jure_liege = title:d_toledo } } - add = 1 - } - } - add_to_list = kingdom_toledo_absorb_list - } - } - every_in_list = { - list = kingdom_toledo_absorb_list - if = { - limit = { - exists = de_jure_liege.holder - de_jure_liege.holder != root - } - de_jure_liege.holder = { add_to_list = kingdom_toledo_opinion_list } - } - set_de_jure_liege_title = title:k_toledo - } - hidden_effect = { title:k_toledo = { set_de_jure_liege_title = title:e_spain } } - every_in_list = { - list = kingdom_toledo_opinion_list - limit = { is_ai = yes } - add_opinion = { - target = root - modifier = absorbed_de_jure_opinion - } - } - #Prestige - add_prestige = massive_prestige_gain - add_character_modifier = { - modifier = fp2_form_kingdom_toledo_modifier - years = 10 - } -} - -fp2_struggle_hostility_ender_effect = { - give_nickname = nick_the_conquistador -} - -fp2_struggle_compromise_ender_effect = { - give_nickname = nick_the_pragmatic - dynasty = { add_dynasty_prestige = 10000 } -} - -fp2_struggle_compromise_tooltip_effect = { - # De Jure Kingdoms will become De Jure Empires - custom_tooltip = struggle_compromise_duchy_transfer_tt - custom_tooltip = fp2_struggle_compromise_create_new_empires_tt - # RIP Hispania - custom_tooltip = fp2_struggle_compromise_destroy_hispania_tt - if = { - limit = { - struggle:iberian_struggle = { - any_involved_ruler = { - count > 1 - top_liege = this - primary_title = { is_mercenary_company = no } - } - } - # Every Involved ruler gets a 10 year truce with every other - custom_tooltip = fp2_struggle_compromise_truce_tt - } - } - custom_tooltip = fp2_struggle_compromise_war_cost_tt -} - -fp2_struggle_conciliation_ender_effect = { - give_nickname = nick_the_equitable - dynasty = { add_dynasty_prestige = 10000 } -} - -fp2_struggle_conciliation_tooltip_effect = { - # Hispania is available! - custom_tooltip = fp2_struggle_can_create_empire_of_hispania_tt - # All Involved cultures gain acceptance of each other - custom_tooltip = fp2_struggle_conciliation_culture_tt - # Interfaith marriage unlocked for Involved cultures - custom_tooltip = fp2_struggle_conciliation_marriage_unlocked_tt - # Declaring holy wars is perma-disabled for locals in the region - custom_tooltip = fp2_struggle_conciliation_holy_war_disabled_tt - # Involved cultures/faiths can offer to join defensive wars with outsiders targetting Iberia - custom_tooltip = fp2_struggle_conciliation_join_war_tt - # Caravanserai line of buildings unlocked for Iberia - custom_tooltip = fp2_struggle_conciliation_caravanserai_unlock_tt -} diff --git a/N3OW/common/scripted_effects/03_dlc_fp3_artifact_creation_effects.txt b/N3OW/common/scripted_effects/03_dlc_fp3_artifact_creation_effects.txt deleted file mode 100644 index b2ce4b76..00000000 --- a/N3OW/common/scripted_effects/03_dlc_fp3_artifact_creation_effects.txt +++ /dev/null @@ -1,436 +0,0 @@ -########################### -# Oxus Bracelet - -create_artifact_oxus_bracelet_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - name = artifact_oxus_bracelet_name - description = artifact_oxus_bracelet_description - type = pedestal - visuals = oxus_bracelet - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - } - - #if = { - # limit = { exists = scope:adventurer } - # create_artifact = { - # name = artifact_necklace_name - # description = placeholder #properly set later - # visuals = necklace - # type = necklace - # modifier = artifact_placeholder_modifier - # wealth = scope:wealth - # quality = scope:quality - # save_scope_as = newly_created_artifact - # history = { - # location = scope:location.title_province - # actor = scope:adventurer - # recipient = root - # type = given - # } - # } - #} - #else = { - # create_artifact = { - # name = artifact_necklace_name - # creator = scope:owner - # description = placeholder #properly set later - # visuals = necklace - # type = necklace - # modifier = artifact_placeholder_modifier - # wealth = scope:wealth - # quality = scope:quality - # save_scope_as = newly_created_artifact - # } - #} - - hidden_effect_new_object = { - scope:newly_created_artifact = { - remove_artifact_modifier = artifact_placeholder_modifier - - # Set some Prestige and Grandeur - add_scaled_artifact_modifier_prestige_effect = yes - add_scaled_artifact_modifier_grandeur_small_effect = yes - - # Let's add a random secondary effect - random_list = { - 35 = { - add_scaled_artifact_modifier_majesty_effect = yes - } - 35 = { - add_scaled_artifact_modifier_dynasty_prestige_effect = yes - } - 15 = { - add_2_scaled_artifact_modifier_majesty_effect = yes - } - 15 = { - add_scaled_artifact_modifier_attractiveness_effect = yes - } - } - } - } -} - -########################### -# Persian Drinking Vessel - -create_artifact_persian_drinking_vessel_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - $SMITH$ = { save_scope_as = goldsmith } - - hidden_effect_new_object = { - # Get artifact quality, wealth, and materials - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - - # Create the artifact - scope:owner = { - if = { - limit = { exists = scope:adventurer } - create_artifact = { - name = artifact_goblet_name - description = placeholder - visuals = persian_drinking_vessel - type = goblet - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - history = { - location = scope:location.title_province - actor = scope:adventurer - recipient = root - type = discovered - } - } - } - else = { - create_artifact = { - name = artifact_goblet_name - creator = scope:goldsmith - description = placeholder - visuals = persian_drinking_vessel - type = goblet - wealth = scope:wealth - quality = scope:quality - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - } - } - } - scope:newly_created_artifact = { - set_artifact_description = artifact_goblet_description - - # Set grandeur - add_scaled_artifact_modifier_grandeur_small_effect = yes - - # Let's add another random effect - random_list = { - 10 = { - add_scaled_artifact_modifier_minor_prestige_effect = yes - } - 10 = { - add_scaled_artifact_modifier_majesty_effect = yes - } - 30 = { - trigger = { rarity = common } - # Common goblets have a chance to not get any extra modifiers - } - } - remove_artifact_modifier = artifact_placeholder_modifier - } - } -} - -########################### -# Incense Burner Sculpture - -create_artifact_fp3_incense_burner_sculpture_effect_base = { - create_artifact = { - name = fp3_incense_burner_sculpture - # Description will be regenerated in the post-creation effects, since we need to nab materials. - description = placeholder - type = $TYPE$ - visuals = fp3_incense_burner_sculpture - wealth = scope:wealth - quality = scope:quality - modifier = artifact_negate_health_penalty_add_2_modifier - save_scope_as = newly_created_artifact - } -} - -create_artifact_fp3_incense_burner_sculpture_effect = { - # Set up general scopes. - $OWNER$ = { save_scope_as = owner } - $SMITH$ = { save_scope_as = maker } - # Begin creating. - hidden_effect_new_object = { - # Get artifact quality, wealth, and materials. - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - # Create the artifact. - scope:owner = { - if = { - limit = { has_royal_court = yes } - create_artifact_fp3_incense_burner_sculpture_effect_base = { TYPE = sculpture } - } - else = { - create_artifact_fp3_incense_burner_sculpture_effect_base = { TYPE = miscellaneous_when_not_court } - } - } - scope:newly_created_artifact = { - # Flag this as something that can be reforged for free, if relevant. - if = { - limit = { - $OWNER$ = { has_royal_court = no } - } - set_variable = { - name = dlc_potential_court_artefact - value = yes - } - } - set_artifact_feature_group = goblet_material - set_artifact_feature_group = decoration_material_inlay - set_artifact_description = fp3_incense_burner_sculpture_desc - # Let's add modifiers! - ## Illustrious gets to be very swanky. - if = { - limit = { rarity = illustrious } - add_scaled_artifact_modifier_prestige_effect = yes - add_scaled_artifact_modifier_grandeur_small_effect = yes - add_scaled_artifact_modifier_stress_gain_effect = yes - add_scaled_artifact_modifier_attractiveness_effect = yes - } - ## Famed - else_if = { - limit = { rarity = famed } - add_scaled_artifact_modifier_prestige_effect = yes - add_scaled_artifact_modifier_grandeur_small_effect = yes - add_scaled_artifact_modifier_stress_gain_effect = yes - } - ## Masterwork - else_if = { - limit = { rarity = masterwork } - add_scaled_artifact_modifier_prestige_effect = yes - add_scaled_artifact_modifier_stress_gain_effect = yes - } - ## Common - else_if = { - limit = { rarity = common } - add_scaled_artifact_modifier_stress_gain_effect = yes - } - } - } -} - - -########################### -# Sassanian Sword - -create_artifact_sassanian_sword_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - - random_list = { - 1 = { set_artifact_rarity_masterwork = yes } - 3 = { set_artifact_rarity_famed = yes } - 2 = { set_artifact_rarity_illustrious = yes } - } - - # Create the artifact - create_artifact = { - name = artifact_sassanian_sword_name - description = artifact_sassanian_sword_description - type = regalia - template = regalia_template - visuals = sassanian_sword - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - } - - hidden_effect_new_object = { - scope:newly_created_artifact = { - # Prestige modifier is scaled based on the Wealth of the artifact (opulence). - add_scaled_artifact_modifier_minor_prestige_effect = yes - - # Add a combat-related modifiers, 2 of them if it's famed. - if = { - limit = { - rarity = famed - } - add_2_scaled_artifact_modifier_combat_effect = yes - } - else = { - add_scaled_artifact_modifier_combat_effect = yes - } - - # Add a Majesty-related modifier based on the Quality of the artifact. - if = { - limit = { # Add a second Majesty-related modifier for high rarity artifacts. - OR = { - rarity = famed - rarity = illustrious - } - } - add_2_scaled_artifact_modifier_majesty_effect = yes - } - else = { - add_scaled_artifact_modifier_majesty_effect = yes - } - - add_scaled_artifact_modifier_attractiveness_effect = yes - - set_variable = { - name = quality - value = scope:quality - } - set_variable = { - name = wealth - value = scope:wealth - } - } - } -} - -create_artifact_illustrious_sassanian_sword_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - # Not really used, but if we don't set the scopes we get errors in the feature selection - set_artifact_rarity_illustrious = yes - - # Create the artifact - create_artifact = { - name = artifact_sassanian_sword_name - description = artifact_sassanian_sword_description - type = regalia - template = regalia_template - visuals = sassanian_sword - wealth = scope:wealth - quality = scope:quality - history = { - type = created_before_history - } - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - } - - hidden_effect_new_object = { - scope:newly_created_artifact = { - # Prestige modifier is scaled based on the Wealth of the artifact (opulence). - set_variable = sassanian_sword - add_scaled_artifact_modifier_minor_prestige_effect = yes - add_2_scaled_artifact_modifier_combat_effect = yes - add_2_scaled_artifact_modifier_majesty_effect = yes - add_scaled_artifact_modifier_attractiveness_effect = yes - - set_variable = { - name = quality - value = scope:quality - } - set_variable = { - name = wealth - value = scope:wealth - } - } - } -} - -########################### -# Ancient Drinking Vessel - -create_artifact_fp3_ancient_drinking_vessel_effect_base = { - create_artifact = { - name = fp3_ancient_drinking_vessel - description = placeholder - visuals = persian_drinking_vessel - type = $TYPE$ - wealth = scope:wealth - quality = scope:quality - #decaying = no - modifier = artifact_negate_health_penalty_add_2_modifier - save_scope_as = newly_created_artifact - history = { type = created_before_history } - } -} - -create_artifact_fp3_ancient_drinking_vessel_effect = { - # Set up general scopes. - $OWNER$ = { save_scope_as = owner } - # Begin creating. - hidden_effect_new_object = { - random_list = { - 1 = { set_artifact_rarity_illustrious = yes } - 2 = { set_artifact_rarity_famed = yes } - 3 = { set_artifact_rarity_masterwork = yes } - 1 = { set_artifact_rarity_common = yes } - } - # Create the artifact. - scope:owner = { - if = { - limit = { has_royal_court = yes } - create_artifact_fp3_ancient_drinking_vessel_effect_base = { TYPE = goblet } - } - else = { - create_artifact_fp3_ancient_drinking_vessel_effect_base = { TYPE = miscellaneous_when_not_court } - } - } - scope:newly_created_artifact = { - set_artifact_description = fp3_ancient_drinking_vessel_desc - # Flag this as something that can be reforged for free, if relevant. - if = { - limit = { - $OWNER$ = { has_royal_court = no } - } - set_variable = { - name = dlc_potential_court_artefact - value = yes - } - } - - # Let's add modifiers! - ## Illustrious gets to be very swanky. - if = { - limit = { rarity = illustrious } - add_scaled_artifact_modifier_prestige_effect = yes - add_scaled_artifact_modifier_stress_gain_effect = yes - add_scaled_artifact_modifier_attractiveness_effect = yes - } - ## Famed - else_if = { - limit = { rarity = famed } - add_scaled_artifact_modifier_prestige_effect = yes - add_scaled_artifact_modifier_stress_gain_effect = yes - } - ## Masterwork - else_if = { - limit = { rarity = masterwork } - add_scaled_artifact_modifier_prestige_effect = yes - add_scaled_artifact_modifier_stress_gain_effect = yes - } - ## Common - else_if = { - limit = { rarity = common } - add_scaled_artifact_modifier_stress_gain_effect = yes - } - } - } -} diff --git a/N3OW/common/scripted_effects/03_dlc_fp3_scripted_effects.txt b/N3OW/common/scripted_effects/03_dlc_fp3_scripted_effects.txt deleted file mode 100644 index cca8325a..00000000 --- a/N3OW/common/scripted_effects/03_dlc_fp3_scripted_effects.txt +++ /dev/null @@ -1,748 +0,0 @@ -claim_the_imamate_scripted_effect = { - # Create a HoF title & assign it appropriately. - if = { - limit = { - faith.religious_head != root - } - hidden_effect = { - # Are we Nizari? - if = { - limit = { faith = faith:nizari } - # Transfer the title. - create_title_and_vassal_change = { - type = created - save_scope_as = change - add_claim_on_loss = no - } - title:d_nizari = { - change_title_holder = { - holder = scope:founder - change = scope:change - } - } - resolve_title_and_vassal_change = scope:change - faith = { set_religious_head_title = title:d_nizari } - - # Set up the remaining bits'n'bobs. - if = { - limit = { - NOT = { has_realm_law = same_faith_succession_law } - } - add_realm_law_skip_effects = same_faith_succession_law - } - title:d_nizari = { add_title_law = temporal_head_of_faith_succession_law } - # Make it the HoF head. - } - # Are we Zayidi? - else_if = { - limit = { faith = faith:zayidi } - # Transfer the title. - create_title_and_vassal_change = { - type = created - save_scope_as = change - add_claim_on_loss = no - } - title:d_zayidi = { - change_title_holder = { - holder = scope:founder - change = scope:change - } - } - resolve_title_and_vassal_change = scope:change - faith = { set_religious_head_title = title:d_zayidi } - - # Set up the remaining bits'n'bobs. - if = { - limit = { - NOT = { has_realm_law = same_faith_succession_law } - } - add_realm_law_skip_effects = same_faith_succession_law - } - title:d_zayidi = { add_title_law = temporal_head_of_faith_succession_law } - # Make it the HoF head. - } - # Are we Twelvers? - else_if = { - limit = { faith = faith:imami } - # Transfer the title. - create_title_and_vassal_change = { - type = created - save_scope_as = change - add_claim_on_loss = no - } - title:d_imami = { - change_title_holder = { - holder = scope:founder - change = scope:change - } - } - resolve_title_and_vassal_change = scope:change - faith = { set_religious_head_title = title:d_imami } - - # Set up the remaining bits'n'bobs. - if = { - limit = { - NOT = { has_realm_law = same_faith_succession_law } - } - add_realm_law_skip_effects = same_faith_succession_law - } - title:d_imami = { add_title_law = temporal_head_of_faith_succession_law } - # Make it the HoF head. - } - # Are we Ismailis? - else_if = { - limit = { faith = faith:ismaili } - # Transfer the title. - create_title_and_vassal_change = { - type = created - save_scope_as = change - add_claim_on_loss = no - } - title:d_ismaili = { - change_title_holder = { - holder = scope:founder - change = scope:change - } - } - resolve_title_and_vassal_change = scope:change - faith = { set_religious_head_title = title:d_ismaili } - - # Set up the remaining bits'n'bobs. - if = { - limit = { - NOT = { has_realm_law = same_faith_succession_law } - } - add_realm_law_skip_effects = same_faith_succession_law - } - title:d_ismaili = { add_title_law = temporal_head_of_faith_succession_law } - # Make it the HoF head. - } - # If not, follow the usual flow. - else = { - set_up_dynamic_temporal_hof_title_effect = { NEW_HOLDER = scope:founder } - faith = { set_religious_head_title = scope:new_title } - } - } - custom_tooltip = appoint_a_righteous_caliph_decision.tt.you_become_caliph - } - dynasty = { - add_dynasty_modifier = { - modifier = fp3_light_of_the_walayah_modifier - years = 100 - } - # Also gain a large amount of dynasty prestige. - add_dynasty_prestige = 5000 - } -} - -avenge_the_battle_of_nahrawan_scripted_effect = { - - give_nickname = nick_the_avenger - add_character_modifier = { - modifier = fp3_azariqa_ascendancy_modifier - } - - add_prestige = massive_prestige_gain - - #Religious bonuses - add_piety = major_piety_gain - faith = { - change_fervor = { - value = medium_fervor_gain - desc = fervor_gain_avenged_battle_of_nahrawan - } - } - - if = { - limit = { - any_vassal_or_below = { - NOT = { - faith = { has_doctrine = muhammad_succession_muhakkima_doctrine } - } - is_ai = yes - capital_province ?= { - OR = { - geographical_region = world_middle_east - geographical_region = world_persian_empire - } - } - } - } - every_vassal_or_below = { - custom = every_non_muhakkima_vassal_middle_east - limit = { - NOT = { - faith = { has_doctrine = muhammad_succession_muhakkima_doctrine } - } - is_ai = yes - capital_province ?= { - OR = { - geographical_region = world_middle_east - geographical_region = world_persian_empire - } - } - } - random = { - chance = 25 - set_character_faith = scope:avenger.faith - } - } - } - - if = { - limit = { - any_realm_province = { - NOT = { - faith = { has_doctrine = muhammad_succession_muhakkima_doctrine } - } - OR = { - geographical_region = world_middle_east - geographical_region = world_persian_empire - } - } - } - every_realm_province = { - limit = { - NOT = { - faith = { has_doctrine = muhammad_succession_muhakkima_doctrine } - } - OR = { - geographical_region = world_middle_east - geographical_region = world_persian_empire - } - } - county = { - add_to_list = every_realm_county - } - } - - every_in_list = { - list = every_realm_county - custom = every_non_muhakkima_faith_county_middle_east - random = { - chance = 25 - custom_tooltip = every_non_avenger_faith_convert - hidden_effect = { set_county_faith = scope:avenger.faith } - } - } - } - - if = { - limit = { exists = scope:sunni_faith } - scope:sunni_faith = { - change_fervor = { - value = medium_fervor_loss - desc = fervor_loss_avenged_battle_of_nahrawan - } - } - } - if = { - limit = { exists = scope:shia_faith } - scope:shia_faith = { - change_fervor = { - value = medium_fervor_loss - desc = fervor_loss_avenged_battle_of_nahrawan - } - } - } -} - -promote_persian_scripture_scripted_effect = { - - if = { - limit = { - exists = faith.religious_head - this != faith.religious_head - } - custom_tooltip = fp3_promoted_scriptures_caliph_angry.tt - } - - add_character_modifier = { - modifier = fp3_promoted_persian_scripture_modifier - } - - if = { - limit = { is_ai = no } #this is so that we don't get AI converting Persia too quickly - custom_tooltip = fp3_promoted_scriptures_conversion_bonus.tt - } - - if = { - limit = { - faith = { has_doctrine = doctrine_pluralism_fundamentalist } - NOT = { - has_trait = cynical - has_trait = excommunicated - } - } - custom_tooltip = { - text = promote_persian_scripture_fundamentalist_stress - add_stress = promote_persian_scripture_fundamentalist_stress_value - } - } - - if = { - limit = { - any_realm_province = { - culture = { has_cultural_pillar = heritage_iranian } - OR = { - geographical_region = world_steppe_tarim - geographical_region = world_persian_empire - } - } - } - every_realm_province = { - limit = { - culture = { has_cultural_pillar = heritage_iranian } - OR = { - geographical_region = world_steppe_tarim - geographical_region = world_persian_empire - } - } - county = { - add_to_list = every_realm_county - } - } - - every_in_list = { - list = every_realm_county - custom = every_iranian_county - random = { - chance = 33 - add_county_modifier = { - modifier = fp3_persian_resurgence_county_modifier - years = 50 - } - } - } - } - - if = { - limit = { - any_vassal_or_below = { - is_ai = yes - OR = { - culture = { has_cultural_pillar = heritage_arabic } - AND = { - knows_language_of_culture = culture:levantine - OR = { - has_trait = zealous - has_trait = stubborn - has_trait = humble - } - } - } - } - } - every_vassal_or_below = { - custom = every_contrarian_vassal - limit = { - is_ai = yes - OR = { - culture = { has_cultural_pillar = heritage_arabic } - AND = { - knows_language_of_culture = culture:levantine - OR = { - has_trait = zealous - has_trait = stubborn - has_trait = humble - } - } - } - } - add_opinion = { - target = scope:persian_fanboy - modifier = fp3_disrespected_word_of_god_opinion - opinion = -30 - } - } - } -} - -read_name_in_friday_prayer_guts_become_supporter_effect = { - hidden_effect = { remove_trait = fp3_struggle_detractor } - add_trait_force_tooltip = fp3_struggle_supporter - add_character_modifier = { - modifier = fp3_displayed_pious_submission_to_caliph_modifier - years = 20 - } -} - -read_name_in_friday_prayer_guts_become_detractor_effect = { - hidden_effect = { remove_trait = fp3_struggle_supporter } - add_trait_force_tooltip = fp3_struggle_detractor - add_character_modifier = { - modifier = fp3_name_read_in_friday_prayer_modifier - years = 20 - } -} - -read_name_in_friday_prayer_guts_apply_sundry_changes_effect = { - # More like notoriety, but potato-potatoe. - if = { - limit = { - NOT = { exists = scope:prestige_gained } - } - add_prestige = medium_prestige_gain - } - # Are we getting an extra surcharge of stress? - if = { - limit = { fp3_name_read_in_friday_prayer_decision_liege_requirements_trigger = no } - add_stress = major_stress_gain - } - # Plus check who the current caliph is so we can see who you swore to. - set_variable = { - name = last_explicit_friday_prayer_caliph - value = title:d_sunni.holder - } -} - -read_name_in_friday_prayer_guts_apply_house_unity_changes_effect = { - # Twiddle with house unity a smidge. - ## We need to invert the triggers before the decision is taken, so we add a flag that'll only be applied when the effect runs. - add_character_flag = fp3_friday_prayer_twiddling_house_unity_force_correct_ui - ## Ok, now, what's the UI look like before the decision is taken? - ### Moving out of sync. - if = { - limit = { - NOT = { has_character_flag = fp3_friday_prayer_twiddling_house_unity_force_correct_ui } - exists = house.house_head - this != house.house_head - OR = { - AND = { - has_trait = fp3_struggle_supporter - house.house_head = { has_trait = fp3_struggle_supporter } - } - AND = { - has_trait = fp3_struggle_detractor - house.house_head = { has_trait = fp3_struggle_detractor } - } - } - } - add_clan_unity_interaction_effect = { - CHARACTER = root - TARGET = root.house.house_head - VALUE = major_unity_loss - DESC = clan_unity_name_read_in_friday_prayer_rebellious.desc - REVERSE_NON_HOUSE_TARGET = no - } - } - ### Moving into sync. - else_if = { - limit = { - NOT = { has_character_flag = fp3_friday_prayer_twiddling_house_unity_force_correct_ui } - exists = house.house_head - this != house.house_head - OR = { - AND = { - has_trait = fp3_struggle_detractor - house.house_head = { has_trait = fp3_struggle_supporter } - } - AND = { - has_trait = fp3_struggle_supporter - house.house_head = { has_trait = fp3_struggle_detractor } - } - } - } - add_clan_unity_interaction_effect = { - CHARACTER = root - TARGET = root.house.house_head - VALUE = medium_unity_gain - DESC = clan_unity_name_read_in_friday_prayer.desc - REVERSE_NON_HOUSE_TARGET = no - } - } - ## And what's it look like after? - ### Moving into sync. - if = { - limit = { - has_character_flag = fp3_friday_prayer_twiddling_house_unity_force_correct_ui - exists = house.house_head - this != house.house_head - OR = { - AND = { - has_trait = fp3_struggle_supporter - house.house_head = { has_trait = fp3_struggle_supporter } - } - AND = { - has_trait = fp3_struggle_detractor - house.house_head = { has_trait = fp3_struggle_detractor } - } - } - } - add_clan_unity_interaction_effect = { - CHARACTER = root - TARGET = root.house.house_head - VALUE = medium_unity_gain - DESC = clan_unity_name_read_in_friday_prayer.desc - REVERSE_NON_HOUSE_TARGET = no - } - } - ### Moving out of sync. - else_if = { - limit = { - has_character_flag = fp3_friday_prayer_twiddling_house_unity_force_correct_ui - exists = house.house_head - this != house.house_head - OR = { - AND = { - has_trait = fp3_struggle_detractor - house.house_head = { has_trait = fp3_struggle_supporter } - } - AND = { - has_trait = fp3_struggle_supporter - house.house_head = { has_trait = fp3_struggle_detractor } - } - } - } - add_clan_unity_interaction_effect = { - CHARACTER = root - TARGET = root.house.house_head - VALUE = major_unity_loss - DESC = clan_unity_name_read_in_friday_prayer_rebellious.desc - REVERSE_NON_HOUSE_TARGET = no - } - } - ## Aaaaand remove the very legitimate and not at all hacky flag we used to trick the tooltips into behaving. - remove_character_flag = fp3_friday_prayer_twiddling_house_unity_force_correct_ui -} - -read_name_in_friday_prayer_scripted_effect = { - # Apply the appropriate modifier. - ## Neutrals pick in the event. - if = { - limit = { - NOR = { - has_trait = fp3_struggle_supporter - has_trait = fp3_struggle_detractor - } - } - show_as_tooltip = { - random_list = { - # Become a supporter. - 100 = { - show_chance = no - desc = fp3_name_read_in_friday_prayer_decision.tt.become_supporter - read_name_in_friday_prayer_guts_become_supporter_effect = yes - } - # Become a detractor. - 100 = { - show_chance = no - desc = fp3_name_read_in_friday_prayer_decision.tt.become_detractor - read_name_in_friday_prayer_guts_become_detractor_effect = yes - } - } - } - } - ## Supporters become Detractors. - else_if = { - limit = { has_trait = fp3_struggle_supporter } - read_name_in_friday_prayer_guts_become_detractor_effect = yes - struggle:persian_struggle = { - every_involved_ruler = { - custom = custom.every_opposed_involved_struggle_ruler.supporter - limit = { - this != root - has_trait = fp3_struggle_supporter - } - add_opinion = { - target = root - modifier = turncoat_opinion - opinion = -40 - } - } - every_interloper_ruler = { - custom = custom.every_opposed_interloper_struggle_ruler.supporter - limit = { - this != root - has_trait = fp3_struggle_supporter - } - add_opinion = { - target = root - modifier = turncoat_opinion - opinion = -20 - } - } - } - } - ## Detractors become Supporters. - else_if = { - limit = { has_trait = fp3_struggle_detractor } - read_name_in_friday_prayer_guts_become_supporter_effect = yes - struggle:persian_struggle = { - every_involved_ruler = { - custom = custom.every_opposed_involved_struggle_ruler.detractor - limit = { - this != root - has_trait = fp3_struggle_detractor - } - add_opinion = { - target = root - modifier = turncoat_opinion - opinion = -40 - } - } - every_interloper_ruler = { - custom = custom.every_opposed_interloper_struggle_ruler.detractor - limit = { - this != root - has_trait = fp3_struggle_detractor - } - add_opinion = { - target = root - modifier = turncoat_opinion - opinion = -20 - } - } - } - } - # Finish things off. - read_name_in_friday_prayer_guts_apply_sundry_changes_effect = yes - read_name_in_friday_prayer_guts_apply_house_unity_changes_effect = yes -} - -favour_skilled_outsiders_decision_apply_opinions_effect = { - # Courtly vassals. - every_vassal = { - custom = favour_skilled_outsiders_decision.tt.upset_elites.courtly_non_heritage - limit = { favour_skilled_outsiders_decision_grab_courtlies_trigger = yes } - add_opinion = { - target = root - modifier = upset_elites_opinion - opinion = -40 - } - } - # Landless councillors. - every_councillor = { - custom = favour_skilled_outsiders_decision.tt.upset_elites.landless_councillor_non_heritage - limit = { favour_skilled_outsiders_decision_grab_landless_councillors_trigger = yes } - add_opinion = { - target = root - modifier = upset_elites_opinion - opinion = -30 - } - } - # Remaining vassals. - every_vassal = { - custom = favour_skilled_outsiders_decision.tt.upset_elites.non_courtly_non_heritage - limit = { favour_skilled_outsiders_decision_non_courtlies_trigger = yes } - add_opinion = { - target = root - modifier = upset_elites_opinion - opinion = -20 - } - } -} - -fp3_story_cycle_seljuks_invasion_events_grant_seljuks_land_effect = { - #to display proper reason in title history, as effect is used in both event and war cb - if = { - limit = { - exists = scope:war - } - create_title_and_vassal_change = { - type = conquest - save_scope_as = change - } - } - else = { - create_title_and_vassal_change = { - type = granted - save_scope_as = change - } - } - - show_as_tooltip = { # UI/UX - scope:fp3_seljuk_settle_target = { - change_title_holder = { - holder = scope:lead_seljuk - change = scope:change - } - } - } - hidden_effect = { - scope:fp3_seljuk_settle_target = { - change_title_holder = { - holder = scope:lead_seljuk - change = scope:change - } - every_de_jure_county = { - change_title_holder = { - holder = scope:lead_seljuk - change = scope:change - } - } - } - } - if = { - limit = { - highest_held_title_tier > tier_duchy - - } - send_interface_toast = { - type = event_toast_effect_good - title = east_europe.0030.t - left_icon = scope:lead_seljuk - right_icon = scope:fp3_seljuk_settle_target - - scope:lead_seljuk = { - change_liege = { - liege = scope:seljuk_victim - change = scope:change - } - } - } - } - - - resolve_title_and_vassal_change = scope:change - - # Give them an Alliance - scope:lead_seljuk = { - save_scope_as = recipient # for loc purposes - add_opinion = { - target = scope:seljuk_victim - modifier = event_negotiated_alliance_opinion - } - } - custom_tooltip = negotiate_alliance_effect_tooltip - create_alliance = { - target = scope:lead_seljuk - allied_through_owner = scope:seljuk_victim - allied_through_target = scope:lead_seljuk - } - - # Housekeeping for the lead seljuk fella - scope:lead_seljuk = { - add_character_flag = settled_seljuk - change_government = clan_government - } -} - -set_house_head_effect = { - $NEW_HEAD$ = { save_scope_as = new_head } - $OLD_HEAD$ = { - save_scope_as = old_head - if = { - limit = { - any_held_title = { is_noble_family_title = yes } - } - random_held_title = { - limit = { is_noble_family_title = yes } - save_scope_as = nf_title - } - } - } - create_title_and_vassal_change = { - type = granted - save_scope_as = change - add_claim_on_loss = no - } - scope:nf_title = { - change_title_holder_include_vassals = { - holder = scope:new_head - change = scope:change - } - } - resolve_title_and_vassal_change = scope:change - scope:new_head.house = { set_house_head = scope:new_head } -} diff --git a/N3OW/common/scripted_effects/04_dlc_ep2_tour_effects.txt b/N3OW/common/scripted_effects/04_dlc_ep2_tour_effects.txt deleted file mode 100644 index 88910944..00000000 --- a/N3OW/common/scripted_effects/04_dlc_ep2_tour_effects.txt +++ /dev/null @@ -1,808 +0,0 @@ -#Effects used in hunt events - - -##################################################################### -# EFFECT LIST -##################################################################### -# !!! Remember to add all new effects with a short description here !!! -# - -#select_root_vegetable_effect - scripted loc, gives you the name of a regionally appropriate vegetable -#tour_generic_arrival_effect - Generic effects that happen when you arrive at a vassal's holding, stress impacts -#tour_distribute_control - Decides how much control to give to counties within a stop_host's domain -#tour_monthly_pulse_effect - Fires on the monthly pulse for all phases - -###################################################################### -# EFFECTS -###################################################################### - - -#Used to find a local animal to hunt -#Note: Don't add more here without also revisiting artifact creation for Skulls and hides. -select_root_vegetable_effect = { - hidden_effect = { - if = { - limit = { - NOT = { exists = var:root_vegetable } - } - random_list = { - 10 = { - # they're everywhere - set_variable = { - name = root_vegetable - value = flag:onion - } - } - 20 = { - trigger = { province_has_vegetable_carrot_trigger = yes } - set_variable = { - name = root_vegetable - value = flag:carrot - } - } - 20 = { - trigger = { province_has_vegetable_parsnip_trigger = yes } - set_variable = { - name = root_vegetable - value = flag:parsnip - } - } - 20 = { - trigger = { province_has_vegetable_turnip_trigger = yes } - set_variable = { - name = root_vegetable - value = flag:turnip - } - } - 20 = { - trigger = { province_has_vegetable_yams_trigger = yes } - set_variable = { - name = root_vegetable - value = flag:yam - } - } - 20 = { - trigger = { province_has_vegetable_kokoro_trigger = yes } - set_variable = { - name = root_vegetable - value = flag:kokoro - } - } - 20 = { - trigger = { province_has_vegetable_ginger_trigger = yes } - set_variable = { - name = root_vegetable - value = flag:ginger - } - } - 20 = { - trigger = { province_has_vegetable_taro_trigger = yes } - set_variable = { - name = root_vegetable - value = flag:taro - } - } - 20 = { - trigger = { province_has_vegetable_daikon_radish_trigger = yes } - set_variable = { - name = root_vegetable - value = flag:daikon_radish - } - } - 20 = { - trigger = { province_has_vegetable_lotus_root_trigger = yes } - set_variable = { - name = root_vegetable - value = flag:lotus_root - } - } - 20 = { - trigger = { province_has_vegetable_burdock_root_trigger = yes } - set_variable = { - name = root_vegetable - value = flag:burdock_root - } - } - 20 = { - trigger = { province_has_vegetable_arrowroot_trigger = yes } - set_variable = { - name = root_vegetable - value = flag:arrowroot - } - } - } - } - } -} - -traveler_progress_point_gain_effect = { - if = { - limit = { - is_alive = yes - NOT = { exists = var:travel_provinces_traversed } - } - set_variable = { - name = travel_provinces_traversed - value = $CHANGE$ - } - } - else = { - change_variable = { - name = travel_provinces_traversed - add = $CHANGE$ - } - } - save_scope_value_as = { - name = travel_base_increase - value = $CHANGE$ - } - # Tooltips - if = { - limit = { has_trait = lifestyle_traveler } - if = { - limit = { scope:travel_base_increase <= 1 } - custom_tooltip = travel_progress_towards_trait_1_tt - } - else_if = { - limit = { scope:travel_base_increase = 2 } - custom_tooltip = travel_progress_towards_trait_2_tt - } - else = { custom_tooltip = travel_progress_towards_trait_3_tt } - } - else = { custom_tooltip = travel_progress_towards_trait_0_tt } - #Random chance of additional point to increase unpredictability - hidden_effect = { - random = { - chance = 50 - change_variable = { - name = travel_provinces_traversed - add = $RANDOM_CHANGE$ - } - } - } -} - -traveler_lifestyle_rank_up_check_effect = { - if = { - limit = { - NOT = { has_trait = lifestyle_traveler } - } - hidden_effect = { - random_list = { - 15 = { - modifier = { - add = 5 - exists = var:travel_provinces_traversed - var:travel_provinces_traversed >= traveler_rank_up_10_threshold - } - modifier = { - add = 5 - exists = var:travel_provinces_traversed - var:travel_provinces_traversed >= traveler_rank_up_9_threshold - } - modifier = { - add = 5 - exists = var:travel_provinces_traversed - var:travel_provinces_traversed >= traveler_rank_up_8_threshold - } - modifier = { - add = 5 - exists = var:travel_provinces_traversed - var:travel_provinces_traversed >= traveler_rank_up_7_threshold - } - modifier = { - add = 5 - exists = var:travel_provinces_traversed - var:travel_provinces_traversed >= traveler_rank_up_6_threshold - } - modifier = { - add = 5 - exists = var:travel_provinces_traversed - var:travel_provinces_traversed >= traveler_rank_up_5_threshold - } - modifier = { - add = 5 - exists = var:travel_provinces_traversed - var:travel_provinces_traversed >= traveler_rank_up_4_threshold - } - modifier = { - add = 5 - exists = var:travel_provinces_traversed - var:travel_provinces_traversed >= traveler_rank_up_3_threshold - } - modifier = { - add = 5 - exists = var:travel_provinces_traversed - var:travel_provinces_traversed >= traveler_rank_up_2_threshold - } - modifier = { - add = 5 - exists = var:travel_provinces_traversed - var:travel_provinces_traversed >= traveler_rank_up_1_threshold - } - trigger_event = { - id = travel_events.0050 - days = { 5 10 } - } - } - 85 = {} - } - } - } - else = { - send_interface_toast = { - title = travel_xp_gain_message - if = { - limit = { exists = var:travel_provinces_traversed } - if = { - limit = { var:travel_provinces_traversed >= traveler_rank_up_10_threshold } - add_trait_xp = { - trait = lifestyle_traveler - track = travel - value = 11 - } - } - else_if = { - limit = { var:travel_provinces_traversed >= traveler_rank_up_9_threshold } - add_trait_xp = { - trait = lifestyle_traveler - track = travel - value = 10 - } - } - else_if = { - limit = { var:travel_provinces_traversed >= traveler_rank_up_8_threshold } - add_trait_xp = { - trait = lifestyle_traveler - track = travel - value = 9 - } - } - else_if = { - limit = { var:travel_provinces_traversed >= traveler_rank_up_7_threshold } - add_trait_xp = { - trait = lifestyle_traveler - track = travel - value = 8 - } - } - else_if = { - limit = { var:travel_provinces_traversed >= traveler_rank_up_6_threshold } - add_trait_xp = { - trait = lifestyle_traveler - track = travel - value = 7 - } - } - else_if = { - limit = { var:travel_provinces_traversed >= traveler_rank_up_5_threshold } - add_trait_xp = { - trait = lifestyle_traveler - track = travel - value = 6 - } - } - else_if = { - limit = { var:travel_provinces_traversed >= traveler_rank_up_4_threshold } - add_trait_xp = { - trait = lifestyle_traveler - track = travel - value = 5 - } - } - else_if = { - limit = { var:travel_provinces_traversed >= traveler_rank_up_3_threshold } - add_trait_xp = { - trait = lifestyle_traveler - track = travel - value = 4 - } - } - else_if = { - limit = { var:travel_provinces_traversed >= traveler_rank_up_2_threshold } - add_trait_xp = { - trait = lifestyle_traveler - track = travel - value = 3 - } - } - else_if = { - limit = { var:travel_provinces_traversed >= traveler_rank_up_1_threshold } - add_trait_xp = { - trait = lifestyle_traveler - track = travel - value = 2 - } - } - else = { - add_trait_xp = { - trait = lifestyle_traveler - track = travel - value = 1 - } - } - } - } - } -} - -traveler_danger_xp_effect = { - if = { - limit = { has_trait = lifestyle_traveler } - if = { - limit = { - has_perk = journey_perk - } - add_trait_xp = { - trait = lifestyle_traveler - track = danger - value = { - integer_range = { - min = { - value = $MIN$ - add = 2 - } - max = { - value = $MAX$ - add = 2 - } - } - } - } - } - else = { - add_trait_xp = { - trait = lifestyle_traveler - track = danger - value = { - integer_range = { - min = $MIN$ - max = $MAX$ - } - } - } - } - } -} - -traveler_travel_xp_effect = { - if = { - limit = { has_trait = lifestyle_traveler } - if = { - limit = { - has_perk = journey_perk - } - add_trait_xp = { - trait = lifestyle_traveler - track = travel - value = { - integer_range = { - min = { - value = $MIN$ - add = 2 - } - max = { - value = $MAX$ - add = 2 - } - } - } - } - } - else = { - add_trait_xp = { - trait = lifestyle_traveler - track = travel - value = { - integer_range = { - min = $MIN$ - max = $MAX$ - } - } - } - } - } -} - -increase_tour_success_effect = { - if = { - limit = { - scope:activity = { - has_activity_option = { - category = special_type - option = tour_type_majesty - } - } - } - custom_tooltip = tour_becomes_more_majestic_tt - } - else_if = { - limit = { - scope:activity = { - has_activity_option = { - category = special_type - option = tour_type_taxation - } - } - } - custom_tooltip = tour_becomes_more_avaricious_tt - } - else_if = { - limit = { - scope:activity = { - has_activity_option = { - category = special_type - option = tour_type_intimidation - } - } - } - custom_tooltip = tour_becomes_more_intimidating_tt - } - scope:activity = { - change_variable = { - name = tour_success_var - add = { - value = $POINTS$ - multiply = 5 - } - } - } -} - -decrease_tour_success_effect = { - if = { - limit = { - scope:activity = { - has_activity_option = { - category = special_type - option = tour_type_majesty - } - } - } - custom_tooltip = tour_becomes_less_majestic_tt - } - else_if = { - limit = { - scope:activity = { - has_activity_option = { - category = special_type - option = tour_type_taxation - } - } - } - custom_tooltip = tour_becomes_less_avaricious_tt - } - else_if = { - limit = { - scope:activity = { - has_activity_option = { - category = special_type - option = tour_type_intimidation - } - } - } - custom_tooltip = tour_becomes_less_intimidating_tt - } - scope:activity = { - change_variable = { - name = tour_success_var - subtract = $POINTS$ - } - } -} - -tour_stop_host_effect = { - set_variable = { - name = stop_host - value = scope:host.location.county.holder - } - var:stop_host = { - # Remove character flag which prevents vassals to be visited from starting other activities - if = { - limit = { has_character_flag = being_visited_on_tour } - remove_character_flag = being_visited_on_tour - } - add_to_activity_without_travel = scope:activity - save_scope_as = stop_host_scope - scope:host = { - save_scope_as = visiting_liege - } - } - add_to_variable_list = { - name = tour_visited_vassals - target = var:stop_host - } -} - -tour_generic_arrival_effect = { - add_prestige = 50 - stress_impact = { - base = medium_stress_impact_loss - gregarious = minor_stress_impact_loss - arrogant = minor_stress_impact_loss - } -} - -show_tour_option_start_effect = { - if = { - limit = { - NAND = { - OR = { - involved_activity = { - has_activity_option = { - category = tour_luxuries - option = tour_luxuries_bad - } - } - involved_activity = { - has_activity_option = { - category = tour_luxuries - option = tour_luxuries_normal - } - } - } - involved_activity = { - has_activity_option = { - category = tour_entourage - option = tour_entourage_small - } - } - } - } - custom_tooltip = due_to_activity_options_tt - show_as_tooltip = { - add_prestige = { - value = 0 - if = { - limit = { - involved_activity = { - has_activity_option = { - category = tour_luxuries - option = tour_luxuries_good - } - } - } - add = 30 - } - else_if = { - limit = { - involved_activity = { - has_activity_option = { - category = tour_luxuries - option = tour_furniture_normal - } - } - } - add = medium_prestige_gain - } - else_if = { - limit = { - involved_activity = { - has_activity_option = { - category = tour_luxuries - option = tour_furniture_good - } - } - } - add = major_prestige_gain - } - if = { - limit = { - involved_activity = { - has_activity_option = { - category = tour_entourage - option = tour_entourage_normal - } - } - } - add = medium_prestige_gain - } - else_if = { - limit = { - involved_activity = { - has_activity_option = { - category = tour_entourage - option = tour_entourage_grand - } - } - } - add = major_prestige_gain - } - } - } - } -} - -tour_distribute_control = { - scope:activity = { - add_activity_log_entry = { - key = increased_control_log - tags = { good } - character = scope:visiting_liege - target = scope:stop_host_scope - show_in_conclusion = yes - if = { - limit = { - $CAPITAL$ > 0 - NOR = { # Do not apply if CAPITAL and HELD_COUNTIES are the same - $CAPITAL$ = $HELD_COUNTIES$ - $CAPITAL$ = $HELD_AND_VASSAL_COUNTIES$ - } - } - root.location.county = { change_county_control = $CAPITAL$ } - } - if = { # County titles held by your vassal and their vassals - limit = { - $HELD_AND_VASSAL_COUNTIES$ > 0 - } - if = { - limit = { - $CAPITAL$ = $HELD_AND_VASSAL_COUNTIES$ # Apply to capital if the values are the same - } - root.location.county.holder = { - every_sub_realm_county = { - custom = every_title_held_by_vassal_and_vassals - change_county_control = $HELD_AND_VASSAL_COUNTIES$ - } - } - } - else = { - root.location.county.holder = { - every_sub_realm_county = { - custom = every_title_held_by_vassal_and_vassals - limit = { - this != root.location.county - } - change_county_control = $HELD_AND_VASSAL_COUNTIES$ - } - } - } - } - else_if = { # Only apply if HELD_AND_VASSAL_COUNTIES is not applied, prevent double tooltips - limit = { - $HELD_COUNTIES$ > 0 - } - if = { - limit = { - $CAPITAL$ = $HELD_COUNTIES$ # Apply to capital if the values are the same - } - root.location.county.holder = { - every_held_title = { - custom = every_title_held_by_vassal - title_tier = county - change_county_control = $HELD_COUNTIES$ - } - } - } - else = { - root.location.county.holder = { - every_held_title = { - custom = every_title_held_by_vassal - limit = { - this != root.location.county - } - change_county_control = $HELD_COUNTIES$ - } - } - } - } - } - } -} - -tour_monthly_pulse_effect = { - scope:host = { - save_scope_as = visiting_liege - } - scope:activity.var:stop_host = { - save_scope_as = stop_host_scope - } - if = { - limit = { - scope:host = this - NOT = { - scope:activity = { exists = var:just_had_vassal_event } - } - } - set_variable = { - name = just_had_liege_event - value = yes - days = 3 - } - trigger_event = { - on_action = $ON_ACTION_POOL$_liege - } - } - else_if = { - limit = { - scope:activity.var:stop_host = this - NOT = { - scope:activity = { exists = var:just_had_liege_event } - } - } - set_variable = { - name = just_had_vassal_event - value = yes - days = 3 - } - trigger_event = { - on_action = $ON_ACTION_POOL$_vassal - } - } -} - -tour_progress_effect = { - # Progress the activity - if = { - limit = { - scope:activity = { exists = var:months_of_stop } - scope:activity = { var:months_of_stop >= 2 } - } - scope:host = { - save_scope_as = visiting_liege - location.province_owner ?= { - save_scope_as = stop_host_scope - if = { - limit = { has_character_flag = being_visited_on_tour } - remove_character_flag = being_visited_on_tour - } - } - } - trigger_event = tour_general.0510 - } - if = { - limit = { - scope:activity = { NOT = { exists = var:months_of_stop } } - } - scope:activity = { - set_variable = { - name = months_of_stop - value = 1 - } - } - } - else = { - scope:activity = { - change_variable = { - name = months_of_stop - add = 1 - } - } - } -} - -play_arrival_music_effect = { - if = { - limit = { - involved_activity.activity_location.culture = { has_graphical_india_culture_group_trigger = yes } - } - play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tours/ep2_event_grand_tour_set_india" - } - else_if = { - limit = { - involved_activity.activity_location.culture = { has_graphical_mena_culture_group_trigger = yes } - } - play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tours/ep2_event_grand_tour_set_mena" - } - else = { - play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tours/ep2_event_grand_tour_set_west" - } - if = { - limit = { - $WELCOME_LEVEL$ = welcome - } - play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tours/ep2_event_grand_tour_arrival_welcome" - } - else_if = { - limit = { - $WELCOME_LEVEL$ = neutral - } - play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tours/ep2_event_grand_tour_arrival_neutral" - } - else_if = { - limit = { - $WELCOME_LEVEL$ = suspicious - } - play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tours/ep2_event_grand_tour_arrival_suspicious" - } -} diff --git a/N3OW/common/scripted_effects/04_dlc_ep2_tournament_effects.txt b/N3OW/common/scripted_effects/04_dlc_ep2_tournament_effects.txt deleted file mode 100644 index 12e8be25..00000000 --- a/N3OW/common/scripted_effects/04_dlc_ep2_tournament_effects.txt +++ /dev/null @@ -1,9020 +0,0 @@ -########################### -########################### -##### CONTEST EFFECTS ##### -########################### -########################### - -######################### -##### SCORE EFFECTS ##### -######################### - -# Change score of a character for the current contest -# Used to increase/decrease chance of winning the contest based on event outcomes -activity_tournament_change_contestant_score_effect = { - save_scope_as = score_changee - if = { - limit = { - exists = scope:score_changee.involved_activity - is_participant_in_activity = scope:score_changee.involved_activity - scope:score_changee.involved_activity = { - any_guest_subset_current_phase = { - name = contestant - this = scope:score_changee - } - } - scope:score_changee = { activity_is_competing_trigger = yes } - } - if = { - limit = { exists = var:progress_to_victory } - save_scope_value_as = { - name = old_ptv - value = var:progress_to_victory - } - } - # Set score tracker - if = { - limit = { - NOT = { exists = var:progress_to_victory_score } - } - set_variable = { - name = progress_to_victory_score - value = { - value = contest_progress_$SCORE$_value - if = { - limit = { - scope:score_changee = { - is_ai = yes - NOR = { - liege.court_position:champion_court_position ?= this - involved_activity.special_guest:special_guest_champion ?= this - } - } - } - multiply = 0.5 - } - } - } - } - # Change existing score tracker - else = { - change_variable = { - name = progress_to_victory_score - add = { - value = contest_progress_$SCORE$_value - if = { - limit = { - scope:score_changee = { - is_ai = yes - NOR = { - liege.court_position:champion_court_position ?= this - involved_activity.special_guest:special_guest_champion ?= this - } - } - } - multiply = 0.5 - } - } - } - } - # Tooltip - custom_tooltip = contestant_score_$SCORE$_tt - # Update current PtV - if = { - limit = { has_activity_state = active } - if = { - limit = { - scope:score_changee.involved_activity = { activity_tournament_team_contest_trigger = yes } - } - scope:score_changee.involved_activity = { tournament_contest_update_team_ptv_effect = yes } - } - else = { - set_variable = { - name = progress_to_victory - value = progress_to_victory_active_contestant_value - } - } - } - else = { - set_variable = { - name = progress_to_victory - value = progress_to_victory_passive_contestant_value - } - } - # Toasts for qualification - if = { - limit = { - has_activity_state = passive - is_ai = no - } - if = { # No Longer Qualify - limit = { - exists = scope:old_ptv - scope:old_ptv >= scope:score_changee.involved_activity.var:progress_to_victory_threshold - var:progress_to_victory < scope:score_changee.involved_activity.var:progress_to_victory_threshold - } - send_interface_toast = { - title = tournament_unqualified_ptv_toast - left_icon = scope:score_changee - custom_tooltip = tournament_unqualified_ptv_tt - } - } - else_if = { # Now Qualify - limit = { - exists = scope:old_ptv - scope:old_ptv < scope:score_changee.involved_activity.var:progress_to_victory_threshold - var:progress_to_victory >= scope:score_changee.involved_activity.var:progress_to_victory_threshold - } - send_interface_toast = { - title = tournament_qualified_ptv_toast - left_icon = scope:score_changee - custom_tooltip = tournament_qualified_ptv_tt - } - } - } - } - else = { - if = { - limit = { exists = var:progress_to_victory } - remove_variable = progress_to_victory - } - if = { - limit = { exists = var:progress_to_victory_score } - remove_variable = progress_to_victory_score - } - if = { - limit = { exists = var:contest_aptitude } - remove_variable = contest_aptitude - } - } -} - -# Purge all tournament related variables -tournament_clear_contest_variables_effect = { - if = { - limit = { exists = var:progress_to_victory } - remove_variable = progress_to_victory - } - if = { - limit = { exists = var:progress_to_victory_score } - remove_variable = progress_to_victory_score - } - if = { - limit = { exists = var:contest_aptitude } - remove_variable = contest_aptitude - } - if = { - limit = { exists = var:mysterious_stranger_origin } - remove_variable = mysterious_stranger_origin - } - if = { - limit = { has_character_flag = resigned_contest_flag } - remove_character_flag = resigned_contest_flag - } - if = { - limit = { has_character_flag = horse_race_mysterious_stranger } - remove_character_flag = horse_race_mysterious_stranger - } - if = { - limit = { has_character_flag = contest_horse_race_war_horse } - remove_character_flag = contest_horse_race_war_horse - } - remove_character_flag = success_pivotal_flag - remove_character_flag = neutral_pivotal_flag - remove_character_flag = failure_pivotal_flag - if = { - limit = { exists = var:contest_qualified_match_wrestling } - remove_variable = contest_qualified_match_wrestling - } - if = { - limit = { exists = var:contest_semi_finalist_match_wrestling } - remove_variable = contest_semi_finalist_match_wrestling - } - if = { - limit = { exists = var:contest_finalist_match_wrestling } - remove_variable = contest_finalist_match_wrestling - } - if = { - limit = { exists = var:contest_qualified_match_duel } - remove_variable = contest_qualified_match_duel - } - if = { - limit = { exists = var:contest_semi_finalist_match_duel } - remove_variable = contest_semi_finalist_match_duel - } - if = { - limit = { exists = var:contest_finalist_match_duel } - remove_variable = contest_finalist_match_duel - } - if = { - limit = { exists = var:contest_qualified_match_joust } - remove_variable = contest_qualified_match_joust - } - if = { - limit = { exists = var:contest_semi_finalist_match_joust } - remove_variable = contest_semi_finalist_match_joust - } - if = { - limit = { exists = var:contest_finalist_match_joust } - remove_variable = contest_finalist_match_joust - } - if = { - limit = { exists = var:contest_qualified_match_board_game } - remove_variable = contest_qualified_match_board_game - } - if = { - limit = { exists = var:contest_semi_finalist_match_board_game } - remove_variable = contest_semi_finalist_match_board_game - } - if = { - limit = { exists = var:contest_finalist_match_board_game } - remove_variable = contest_finalist_match_board_game - } - if = { - limit = { exists = var:last_versus_match } - remove_variable = last_versus_match - } - if = { - limit = { exists = var:next_versus_match } - remove_variable = next_versus_match - } -} - -# Clean tournament only modifiers -tournament_clear_tournament_modifiers_effect = { - if = { - limit = { - any_character_artifact = { - has_artifact_modifier = artifact_tournament_sharpened_blade_modifier - } - } - every_character_artifact = { - remove_artifact_modifier = artifact_tournament_sharpened_blade_modifier - } - } -} - -# Purge all tournament related variables -tournament_clear_tournament_variables_effect = { - tournament_clear_contest_variables_effect = yes - if = { - limit = { exists = var:contest_versus_progress } - remove_variable = contest_versus_progress - } - if = { - limit = { exists = var:tournament_marriage_prize } - remove_variable = tournament_marriage_prize - } - if = { - limit = { has_character_flag = arrived_at_tournament_flag } - remove_character_flag = arrived_at_tournament_flag - } - if = { - limit = { has_character_modifier = tournament_melee_protector_modifier } - remove_character_modifier = tournament_melee_protector_modifier - } - if = { - limit = { has_character_flag = knows_mulan_flag } - remove_character_flag = knows_mulan_flag - } - if = { - limit = { has_character_flag = cloak_duelist_flag } - remove_character_flag = cloak_duelist_flag - } - if = { - limit = { exists = var:contest_horse_race_name } - remove_variable = contest_horse_race_name - } - if = { - limit = { exists = var:contest_horse_race_gender } - remove_variable = contest_horse_race_gender - } - if = { - limit = { exists = var:horse_race_jockey } - remove_variable = horse_race_jockey - } - clear_variable_list = tournament_favor_offers -} - -################# -### TEAM TYPE ### -################# - -# Examples: Melee, Horse Sport - -# Team contests divide competitors into two groups and compare them based on contest skills to determine winners - -# Sort competitors into 2 teams based on relationships and loyalties - on_start -tournament_contest_team_composition_effect = { - scope:activity = { - set_variable = { name = tournament_commenced } - # Players - every_guest_subset = { - name = contestant - phase = tournament_phase_$CONTEST$ - limit = { - OR = { - is_ai = no - AND = { - has_court_position = champion_court_position - liege = { is_ai = no } - } - } - tournament_contest_can_compete_trigger = yes - var:progress_to_victory >= scope:activity.var:progress_to_victory_threshold - } - add_tournament_contest_contestant_effect = { - CONTEST = $CONTEST$ - SKILL = $SKILL$ - PTV = progress_to_victory_active_contestant_value - } - } - # Filter relevant into entrants list - while = { - limit = { - any_guest_subset = { - name = qualified - phase = tournament_phase_$CONTEST$ - count < 20 - } - any_guest_subset = { - name = contestant - phase = tournament_phase_$CONTEST$ - tournament_contest_can_compete_trigger = yes - } - } - # Determine eligible contestants - ordered_guest_subset = { - name = contestant - phase = tournament_phase_$CONTEST$ - limit = { tournament_contest_can_compete_trigger = yes } - order_by = var:progress_to_victory - add_tournament_contest_contestant_effect = { - CONTEST = $CONTEST$ - SKILL = $SKILL$ - PTV = progress_to_victory_active_contestant_value - } - } - } - # Inform liege of prestige from qualified knights - tournament_liege_qualification_toast_effect = yes - # Pick first team alpha character - random_guest_subset = { - name = qualified - phase = tournament_phase_$CONTEST$ - limit = { this = scope:host } - alternative_limit = { - has_court_position = champion_court_position - liege = scope:host - } - alternative_limit = { is_playable_character = yes } - alternative_limit = { always = yes } - save_scope_as = new_list_member - scope:activity = { - add_to_guest_subset = { - name = team_alpha - target = scope:new_list_member - phase = tournament_phase_$CONTEST$ - } - } - save_scope_as = team_alpha_creator - } - # Pick first team beta character - random_guest_subset = { - name = qualified - phase = tournament_phase_$CONTEST$ - limit = { - is_playable_character = yes - has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:team_alpha_creator } - this != scope:team_alpha_creator - } - alternative_limit = { - is_playable_character = yes - this != scope:team_alpha_creator - } - alternative_limit = { - this != scope:team_alpha_creator - } - weight = { - base = 1 - modifier = { - factor = 10 - has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:team_alpha_creator } - } - modifier = { - factor = 10 - AND = { - scope:team_alpha_creator = { has_activity_intent = murder_attendee_intent } - this = scope:team_alpha_creator.intent_target - } - } - modifier = { - factor = 0.5 - liege = scope:team_alpha_creator - } - modifier = { - add = 1 - top_liege = this - } - modifier = { - add = 1 - primary_title.tier >= scope:team_alpha_creator.primary_title.tier - } - } - save_scope_as = new_list_member - scope:activity = { - add_to_guest_subset = { - name = team_beta - target = scope:new_list_member - phase = tournament_phase_$CONTEST$ - } - } - } - # Randomly distribute remaining competitors to teams - ordered_guest_subset = { - name = qualified - phase = tournament_phase_$CONTEST$ - limit = { - save_temporary_scope_as = new_list_member_temp - scope:activity = { - NOR = { - any_guest_subset_current_phase = { - name = team_alpha - this = scope:new_list_member_temp - } - any_guest_subset_current_phase = { - name = team_beta - this = scope:new_list_member_temp - } - } - } - } - order_by = { value = var:progress_to_victory } - max = 18 - check_range_bounds = no - save_scope_as = new_list_member - random_list = { # replace with more efficient script? - 10 = { - # Favor smaller team - activity_contest_team_size_modifier = { - SMALLER = alpha - LARGER = beta - } - # Relationships and loyalty - activity_contest_team_preference_modifier = { TEAM = alpha } - scope:activity = { - add_to_guest_subset = { - name = team_alpha - target = scope:new_list_member - phase = tournament_phase_$CONTEST$ - } - } - } - 10 = { - # Favor smaller team - activity_contest_team_size_modifier = { - SMALLER = beta - LARGER = alpha - } - # Relationships and loyalty - activity_contest_team_preference_modifier = { TEAM = beta } - scope:activity = { - add_to_guest_subset = { - name = team_beta - target = scope:new_list_member - phase = tournament_phase_$CONTEST$ - } - } - } - } - } - # Captains - random_guest_subset = { - name = team_alpha - weight = { - base = 1 - tournament_team_captain_modifier = yes - } - save_scope_as = alpha_captain - scope:activity = { - add_to_guest_subset = { - name = team_alpha_captain - target = scope:alpha_captain - } - } - } - random_guest_subset = { - name = team_beta - weight = { - base = 1 - tournament_team_captain_modifier = yes - } - save_scope_as = beta_captain - scope:activity = { - add_to_guest_subset = { - name = team_beta_captain - target = scope:beta_captain - } - } - } - # Update shared PtV values - tournament_contest_update_team_ptv_effect = yes - # Qualification ping - every_guest_subset = { - name = contestant - phase = tournament_phase_$CONTEST$ - if = { - limit = { - save_temporary_scope_as = new_list_member_temp - scope:activity = { - NOR = { - any_guest_subset_current_phase = { - name = team_alpha - this = scope:new_list_member_temp - } - any_guest_subset_current_phase = { - name = team_beta - this = scope:new_list_member_temp - } - } - } - } - save_scope_as = new_list_member - if = { - limit = { exists = var:contest_aptitude } - remove_variable = contest_aptitude - } - if = { - limit = { exists = var:progress_to_victory } - remove_variable = progress_to_victory - } - send_interface_toast = { - title = tournament_qualify_fail_title - left_icon = this - custom_tooltip = tournament_qualify_fail_desc - scope:activity = { - add_to_guest_subset = { - name = spectator - target = scope:new_list_member - phase = tournament_phase_$CONTEST$ - } - } - play_sound_effect = "event:/SFX/Events/Themes/sfx_event_theme_type_activity" - } - } - } - # Add Activity Log entry - add_activity_log_entry = { - key = tournament_contest_start_log - tags = { contest } - score = 20 - character = scope:host - } - # Fire starting event - every_attending_character = { - trigger_event = contest_events.0600 - } - } -} - -# Fire contest events with correct spacing -tournament_team_pulse_effect = { - scope:activity = { - every_guest_subset_current_phase = { - name = qualified - limit = { - exists = var:progress_to_victory - is_ai = no - } - trigger_event = { - on_action = contest_ongoing_event_$CONTEST$_setup_pulse - days = 1 - } - if = { - limit = { is_ai = no } - trigger_event = { - on_action = contest_ongoing_event_$CONTEST$_random_pulse - days = 7 - } - trigger_event = { - on_action = contest_ongoing_event_$CONTEST$_random_pulse - days = 14 - } - trigger_event = { - on_action = contest_ongoing_event_$CONTEST$_pivotal_pulse - days = 21 - } - } - else = { - trigger_event = { - on_action = contest_ongoing_event_$CONTEST$_ai_pulse - days = { 7 21 } - } - } - } - every_attending_character = { - limit = { - OR = { - is_in_guest_subset = { name = qualified } - is_ai = no - } - } - trigger_event = { - on_action = contest_ongoing_event_$CONTEST$_outcome_pulse - days = 25 - } - } - } -} - -# Set team ptv variables, which pool all team member's aptitude and score -tournament_contest_update_team_ptv_effect = { - set_variable = { - name = team_a_ptv - value = { - value = 25 - every_guest_subset_current_phase = { - name = team_alpha - limit = { exists = var:contest_aptitude } - add = { - value = var:contest_aptitude - divide = 10 - } - if = { - limit = { exists = var:progress_to_victory_score } - add = { - value = var:progress_to_victory_score - divide = 10 - } - } - } - } - } - set_variable = { - name = team_b_ptv - value = { - value = 25 - every_guest_subset_current_phase = { - name = team_beta - limit = { exists = var:contest_aptitude } - add = { - value = var:contest_aptitude - divide = 10 - } - if = { - limit = { exists = var:progress_to_victory_score } - add = { - value = var:progress_to_victory_score - divide = 10 - } - } - } - } - } - every_guest_subset_current_phase = { - name = team_alpha - set_variable = { - name = progress_to_victory - value = scope:activity.var:team_a_ptv - } - } - every_guest_subset_current_phase = { - name = team_beta - set_variable = { - name = progress_to_victory - value = scope:activity.var:team_b_ptv - } - } -} - -tournament_contest_winner_captain_effect = { - if = { # Original captain - limit = { - any_guest_subset = { - name = team_$WINNER$_captain - phase = tournament_phase_$CONTEST$ - is_alive = yes - } - } - random_guest_subset = { - name = team_$WINNER$_captain - phase = tournament_phase_$CONTEST$ - save_scope_as = contest_winner - } - } - else = { # New captain - random_guest_subset = { - name = winner - phase = tournament_phase_$CONTEST$ - limit = { is_alive = yes } - weight = { - base = 1 - tournament_team_captain_modifier = yes - } - save_scope_as = contest_winner - } - } - scope:activity = { - set_variable = { - name = melee_winner - value = scope:contest_winner - } - } - # Save losing captain - if = { - limit = { - any_guest_subset = { - name = team_$LOSER$_captain - phase = tournament_phase_$CONTEST$ - is_alive = yes - } - } - random_guest_subset = { - name = team_$LOSER$_captain - phase = tournament_phase_$CONTEST$ - save_scope_as = second_place - } - } - else = { - random_guest_subset = { - name = second_place - phase = tournament_phase_$CONTEST$ - limit = { is_alive = yes } - weight = { - base = 1 - tournament_team_captain_modifier = yes - } - save_scope_as = second_place - } - } -} - -# Determine winning team based on relative strength and event score - on_end -tournament_contest_team_winner_effect = { - # Achievement. - little_william_marshal_achievement_contest_end_effect = yes - scope:activity = { - tournament_contest_update_team_ptv_effect = yes - save_scope_value_as = { name = contest_complete value = flag:$CONTEST$ } - # Determine winning team - random_list = { - # ALPHA WINS - 1 = { - # Add all team member's contest ability - modifier = { add = var:team_a_ptv } - # More likely is this team's PtV is higher - modifier = { - var:team_a_ptv > var:team_b_ptv - factor = 2 - } - # If other team has less than half PtV of this team, this team wins win - modifier = { - progress_to_victory_fetch_team_a_half_value >= scope:activity.var:team_b_ptv - add = 1000 - } - every_guest_subset = { - name = team_alpha - phase = tournament_phase_$CONTEST$ - limit = { activity_tournament_valid_winner_trigger = yes } - save_scope_as = new_list_member - tournament_complete_win_contest_intent_effect = yes - scope:activity = { - add_to_guest_subset = { - name = winner - target = scope:new_list_member - phase = tournament_phase_$CONTEST$ - } - } - # Achievement. - little_william_marshal_achievement_contest_end_winner_effect = yes - } - every_guest_subset = { - name = team_beta - phase = tournament_phase_$CONTEST$ - limit = { activity_tournament_valid_winner_trigger = yes } - save_scope_as = new_list_member - scope:activity = { - add_to_guest_subset = { - name = second_place - target = scope:new_list_member - phase = tournament_phase_$CONTEST$ - } - } - } - # Save winning and losing captain - tournament_contest_winner_captain_effect = { - WINNER = alpha - LOSER = beta - CONTEST = melee - } - } - # BETA WINS - 1 = { - # Add all team member's contest ability - modifier = { add = var:team_b_ptv } - # More likely is this team's PtV is higher - modifier = { - var:team_b_ptv > var:team_a_ptv - factor = 2 - } - # If other team has less than half PtV of this team, this team wins win - modifier = { - progress_to_victory_fetch_team_b_half_value >= scope:activity.var:team_a_ptv - add = 1000 - } - every_guest_subset = { - name = team_beta - phase = tournament_phase_$CONTEST$ - limit = { activity_tournament_valid_winner_trigger = yes } - save_scope_as = new_list_member - tournament_complete_win_contest_intent_effect = yes - scope:activity = { - add_to_guest_subset = { - name = winner - target = scope:new_list_member - phase = tournament_phase_$CONTEST$ - } - } - # Achievement. - little_william_marshal_achievement_contest_end_winner_effect = yes - } - every_guest_subset = { - name = team_alpha - phase = tournament_phase_$CONTEST$ - limit = { activity_tournament_valid_winner_trigger = yes } - save_scope_as = new_list_member - scope:activity = { - add_to_guest_subset = { - name = second_place - target = scope:new_list_member - phase = tournament_phase_$CONTEST$ - } - } - } - # Save winning and losing captain - tournament_contest_winner_captain_effect = { - WINNER = beta - LOSER = alpha - CONTEST = melee - } - } - } - # Rewards - tournament_contest_team_rewards_effect = { CONTEST = $CONTEST$ } - # Add log entry - add_activity_log_entry = { - key = tournament_$CONTEST$_team_winner_log - tags = { winner contest } - score = 80 - show_in_conclusion = yes - character = scope:contest_winner - target = scope:second_place - - #Effect - show_as_tooltip = { - scope:contest_winner ?= { - # Prestige - tournament_team_winner_prestige_rewards_effect = yes - # Gold - tournament_team_winner_gold_rewards_effect = yes - # Trait - tournament_give_trait_effect = { CONTEST = $CONTEST$ } - # Modifier - add_character_modifier = { modifier = tournament_$CONTEST$_winner_modifier years = 5 } - } - } - } - # Fire host's prize award event - activity_host = { trigger_event = contest_events.0605 } - # Clear redundant variables - every_attending_character = { tournament_clear_contest_variables_effect = yes } - } -} - -################## -### TURNS TYPE ### -################## - -# Examples: Quintain, Archery, Recital -# Turn contests are determined by skill and event outcomes - -# Create competitor list and log entry -tournament_contest_turn_composition_effect = { - scope:activity = { - set_variable = { name = tournament_commenced } - # Players - every_guest_subset = { - name = contestant - phase = tournament_phase_$CONTEST$ - limit = { - OR = { - is_ai = no - AND = { - has_court_position = champion_court_position - liege = { is_ai = no } - } - } - tournament_contest_can_compete_trigger = yes - var:progress_to_victory >= scope:activity.var:progress_to_victory_threshold - } - add_tournament_contest_contestant_effect = { - CONTEST = $CONTEST$ - SKILL = $SKILL$ - PTV = progress_to_victory_active_contestant_value - } - } - # Filter relevant into entrants list - while = { - limit = { - any_guest_subset = { - name = qualified - phase = tournament_phase_$CONTEST$ - count < 7 - } - any_guest_subset_current_phase = { - name = contestant - tournament_contest_can_compete_trigger = yes - } - } - ordered_guest_subset = { - name = contestant - phase = tournament_phase_$CONTEST$ - limit = { tournament_contest_can_compete_trigger = yes } - order_by = var:progress_to_victory - add_tournament_contest_contestant_effect = { - CONTEST = $CONTEST$ - SKILL = $SKILL$ - PTV = progress_to_victory_active_contestant_value - } - } - } - hidden_effect = { - random_list = { - 3 = { - ordered_guest_subset = { - name = contestant - phase = tournament_phase_$CONTEST$ - limit = { tournament_contest_can_compete_trigger = yes } - order_by = var:progress_to_victory - add_tournament_contest_contestant_effect = { - CONTEST = $CONTEST$ - SKILL = $SKILL$ - PTV = progress_to_victory_active_contestant_value - } - } - } - 1 = { - trigger = { - NOT = { exists = var:mysterious_stranger_appeared } - any_attending_character = { - culture = { - any_culture_county = { - exists = faith - any_direct_de_jure_vassal_title = { exists = this } - } - } - } - any_attending_character = { count <= 240 } - } - tournament_mysterious_stranger_effect = { - CONTEST = $CONTEST$ - SKILL = $SKILL$ - } - } - } - } - # Add Activity Log entry - add_activity_log_entry = { - key = tournament_contest_start_log - tags = { contest } - score = 20 - character = scope:host - } - # Inform liege of prestige from qualified knights - tournament_liege_qualification_toast_effect = yes - # Qualification ping - every_guest_subset = { - name = contestant - phase = tournament_phase_$CONTEST$ - limit = { - save_temporary_scope_as = new_list_member - NOT = { - scope:activity = { - any_guest_subset_current_phase = { - name = qualified - this = scope:new_list_member - } - } - } - } - tournament_contest_qualification_failure_effect = yes - } - # Fire starting event - every_attending_character = { - trigger_event = contest_events.0700 - } - } -} - -# Fire turn events with correct spacing -tournament_turn_pulse_effect = { - scope:activity = { - every_guest_subset_current_phase = { - name = qualified - limit = { exists = var:progress_to_victory } - trigger_event = { - on_action = contest_ongoing_event_$CONTEST$_random_pulse - days = 7 - } - trigger_event = { - on_action = contest_ongoing_event_$CONTEST$_random_pulse - days = 14 - } - trigger_event = { - on_action = contest_ongoing_event_$CONTEST$_pivotal_pulse - days = 21 - } - } - every_attending_character = { - limit = { - OR = { - is_in_guest_subset = { name = qualified } - is_ai = no - } - } - # If competing yourself, it is from your perspective, otherwise find someone relevant - tournament_pivotal_contestant_scope_effect = yes - trigger_event = { - on_action = contest_ongoing_event_$CONTEST$_outcome_pulse - days = 25 - } - } - } -} - -# Determines first, second, and third place in turn based contests -tournament_contest_turn_winner_effect = { - # Achievement. - little_william_marshal_achievement_contest_end_effect = yes - scope:activity = { - every_guest_subset = { - name = qualified - set_variable = { - name = progress_to_victory - value = progress_to_victory_active_contestant_value - } - } - save_scope_value_as = { name = contest_complete value = flag:$CONTEST$ } - # Set winner if player - if = { - limit = { - any_guest_subset = { - name = qualified - phase = tournament_phase_$CONTEST$ - is_alive = yes - exists = var:contest_aptitude - exists = var:progress_to_victory - is_ai = no - save_temporary_scope_as = winner_temp - } - NOT = { - any_guest_subset = { - name = qualified - phase = tournament_phase_$CONTEST$ - is_alive = yes - exists = var:contest_aptitude - exists = var:progress_to_victory - var:progress_to_victory > scope:winner_temp.var:progress_to_victory - } - } - } - random_guest_subset = { - name = qualified - phase = tournament_phase_$CONTEST$ - limit = { - is_alive = yes - exists = var:contest_aptitude - exists = var:progress_to_victory - is_ai = no - save_temporary_scope_as = winner_temp - scope:activity = { - NOT = { - any_guest_subset = { - name = qualified - phase = tournament_phase_$CONTEST$ - is_alive = yes - exists = var:contest_aptitude - exists = var:progress_to_victory - var:progress_to_victory > scope:winner_temp.var:progress_to_victory - } - } - } - } - save_scope_as = contest_winner - } - } - # Determine winner - else = { - random_guest_subset = { - name = qualified - phase = tournament_phase_$CONTEST$ - limit = { - is_alive = yes - exists = var:contest_aptitude - exists = var:progress_to_victory - save_temporary_scope_as = winner_temp - } - weight = { - base = 1 - # Weights heavily on PtV, and major differences in score - tournament_contest_winner_determiner_modifier = { CHAR = scope:winner_temp CONTEST = $CONTEST$ } - } - save_scope_as = contest_winner - } - } - scope:contest_winner = { - tournament_complete_win_contest_intent_effect = yes - # Achievement. - little_william_marshal_achievement_contest_end_winner_effect = yes - } - # Determine second place - random_guest_subset = { - name = qualified - phase = tournament_phase_$CONTEST$ - limit = { - is_alive = yes - exists = var:contest_aptitude - exists = var:progress_to_victory - this != scope:contest_winner - save_temporary_scope_as = second_temp - } - weight = { - base = 1 - # Weights heavily on PtV, and major differences in score - tournament_contest_winner_determiner_modifier = { CHAR = scope:second_temp CONTEST = $CONTEST$ } - } - save_scope_as = second_place - } - # Determine third place - random_guest_subset = { - name = qualified - phase = tournament_phase_$CONTEST$ - limit = { - is_alive = yes - exists = var:contest_aptitude - exists = var:progress_to_victory - NOR = { - this = scope:contest_winner - this = scope:second_place - } - save_temporary_scope_as = third_temp - } - weight = { - base = 1 - # Weights heavily on PtV, and major differences in score - tournament_contest_winner_determiner_modifier = { CHAR = scope:third_temp CONTEST = $CONTEST$ } - } - save_scope_as = third_place - } - # Save all non-winner entrants so we can easily check if someone lost - every_guest_subset = { - name = qualified - phase = tournament_phase_$CONTEST$ - limit = { - exists = var:contest_aptitude - exists = var:progress_to_victory - this != scope:contest_winner - } - add_to_list = contest_losers - } - # Save winner - add_to_guest_subset = { - name = winner - target = scope:contest_winner - phase = tournament_phase_$CONTEST$ - } - # Save podium placements for reference - add_to_guest_subset = { - name = second_place - target = scope:second_place - phase = tournament_phase_$CONTEST$ - } - add_to_guest_subset = { - name = third_place - target = scope:third_place - phase = tournament_phase_$CONTEST$ - } - # Rewards - tournament_contest_rewards_effect = { CONTEST = $CONTEST$ } - # Fire host's prize award event - activity_host = { trigger_event = contest_events.0705 } - # Clear redundant variables - every_attending_character = { tournament_clear_contest_variables_effect = yes } - } -} - -################# -### RACE TYPE ### -################# - -# Turn contests are determined by skill and event outcomes - -# Create competitor list and log entry -tournament_contest_race_composition_effect = { - # Set up contest - scope:activity = { - set_variable = { name = tournament_commenced } - # Set flavor variant - if = { - limit = { - scope:host.culture = { has_cultural_pillar = heritage_arabic } - } - set_variable = { - name = contest_horse_race_variant - value = flag:maydan - } - } - else = { - set_variable = { - name = contest_horse_race_variant - value = flag:default - } - } - # Players - every_guest_subset = { - name = contestant - phase = tournament_phase_$CONTEST$ - limit = { - is_ai = no - tournament_contest_can_compete_trigger = yes - exists = var:progress_to_victory - var:progress_to_victory >= scope:activity.var:progress_to_victory_threshold - } - add_tournament_contest_contestant_effect = { - CONTEST = $CONTEST$ - SKILL = $SKILL$ - PTV = progress_to_victory_active_contestant_value - } - } - # Filter relevant into entrants list - while = { - limit = { - any_guest_subset = { - name = qualified - phase = tournament_phase_$CONTEST$ - count < 7 - } - any_guest_subset_current_phase = { - name = contestant - tournament_contest_can_compete_trigger = yes - } - } - ordered_guest_subset = { - name = contestant - phase = tournament_phase_$CONTEST$ - limit = { tournament_contest_can_compete_trigger = yes } - order_by = var:progress_to_victory - add_tournament_contest_contestant_effect = { - CONTEST = $CONTEST$ - SKILL = $SKILL$ - PTV = progress_to_victory_active_contestant_value - } - } - } - # Chance for mysterious stranger - hidden_effect = { - random_list = { - 3 = { - ordered_guest_subset = { - name = contestant - phase = tournament_phase_$CONTEST$ - limit = { tournament_contest_can_compete_race_trigger = yes } - order_by = var:progress_to_victory # to favor landed - add_tournament_contest_contestant_effect = { - CONTEST = $CONTEST$ - SKILL = $SKILL$ - PTV = progress_to_victory_active_contestant_value - } - } - } - 1 = { - trigger = { - NOT = { exists = var:mysterious_stranger_appeared } - any_guest_subset = { - name = contestant - phase = tournament_phase_$CONTEST$ - tournament_contest_can_compete_race_trigger = yes - } - } - random_guest_subset = { - name = contestant - phase = tournament_phase_$CONTEST$ - limit = { tournament_contest_can_compete_race_trigger = yes } - save_scope_as = mysterious_stranger - set_variable = { - name = mysterious_stranger_origin - value = scope:activity.activity_location.barony - } - add_character_flag = horse_race_mysterious_stranger - add_tournament_contest_contestant_effect = { - CONTEST = $CONTEST$ - SKILL = $SKILL$ - PTV = progress_to_victory_active_contestant_value - } - tournament_horse_race_fetch_horse_effect = yes - } - if = { - limit = { exists = scope:mysterious_stranger } - set_variable = { - name = mysterious_stranger_appeared - value = scope:mysterious_stranger - } - } - } - } - } - # Add Activity Log entry - add_activity_log_entry = { - key = tournament_contest_start_log - tags = { contest } - score = 20 - character = scope:host - } - # Inform liege of prestige from qualified knights - tournament_liege_qualification_toast_effect = yes - # Qualification ping - every_guest_subset = { - name = contestant - phase = tournament_phase_$CONTEST$ - limit = { - save_temporary_scope_as = new_list_member - NOT = { - scope:activity = { - any_guest_subset_current_phase = { - name = qualified - this = scope:new_list_member - } - } - } - } - tournament_contest_qualification_failure_effect = yes - } - # Fire starting event - every_attending_character = { - trigger_event = contest_events.0500 - } - } -} - -# Fire race events with correct spacing -tournament_race_pulse_effect = { - scope:activity = { - every_guest_subset_current_phase = { - name = qualified - limit = { exists = var:progress_to_victory } - trigger_event = { - on_action = contest_ongoing_event_$CONTEST$_random_pulse - days = 7 - } - trigger_event = { - on_action = contest_ongoing_event_$CONTEST$_random_pulse - days = 14 - } - trigger_event = { - on_action = contest_ongoing_event_$CONTEST$_pivotal_pulse - days = 21 - } - } - every_attending_character = { - limit = { - OR = { - is_in_guest_subset = { name = qualified } - is_ai = no - } - } - # If competing yourself, it is from your perspective, otherwise find someone relevant - tournament_pivotal_contestant_scope_effect = yes - trigger_event = { - on_action = contest_ongoing_event_$CONTEST$_outcome_pulse - days = 25 - } - } - } -} - -# Determines first, second, and third place in turn based contests -tournament_contest_race_winner_effect = { - # Achievement. - little_william_marshal_achievement_contest_end_effect = yes - scope:activity = { - every_guest_subset = { - name = qualified - phase = tournament_phase_$CONTEST$ - set_variable = { - name = progress_to_victory - value = progress_to_victory_active_contestant_value - } - } - save_scope_value_as = { name = contest_complete value = flag:$CONTEST$ } - # Set winner if player - if = { - limit = { - any_guest_subset = { - name = qualified - phase = tournament_phase_$CONTEST$ - is_alive = yes - exists = var:contest_aptitude - exists = var:progress_to_victory - is_ai = no - save_temporary_scope_as = winner_temp - } - NOT = { - any_guest_subset = { - name = qualified - phase = tournament_phase_$CONTEST$ - is_alive = yes - exists = var:contest_aptitude - exists = var:progress_to_victory - var:progress_to_victory > scope:winner_temp.var:progress_to_victory - } - } - } - random_guest_subset = { - name = qualified - phase = tournament_phase_$CONTEST$ - limit = { - is_alive = yes - exists = var:contest_aptitude - exists = var:progress_to_victory - is_ai = no - save_temporary_scope_as = winner_temp - scope:activity = { - NOT = { - any_guest_subset = { - name = qualified - phase = tournament_phase_$CONTEST$ - is_alive = yes - exists = var:contest_aptitude - exists = var:progress_to_victory - var:progress_to_victory > scope:winner_temp.var:progress_to_victory - } - } - } - } - save_scope_as = contest_winner - } - } - else = { - # Determine winner - random_guest_subset = { - name = qualified - phase = tournament_phase_$CONTEST$ - limit = { - is_alive = yes - exists = var:progress_to_victory - save_temporary_scope_as = winner_temp - } - weight = { - base = 1 - # Weights heavily on PtV, and major differences in score - tournament_contest_winner_determiner_modifier = { CHAR = scope:winner_temp CONTEST = $CONTEST$ } - } - save_scope_as = contest_winner - } - } - scope:contest_winner = { - tournament_horse_race_fetch_horse_effect = yes - tournament_complete_win_contest_intent_effect = yes - # Achievement. - little_william_marshal_achievement_contest_end_winner_effect = yes - } - # Determine second place - random_guest_subset = { - name = qualified - phase = tournament_phase_$CONTEST$ - limit = { - is_alive = yes - exists = var:progress_to_victory - this != scope:contest_winner - save_temporary_scope_as = second_temp - } - weight = { - base = 1 - # Weights heavily on PtV, and major differences in score - tournament_contest_winner_determiner_modifier = { CHAR = scope:second_temp CONTEST = $CONTEST$ } - } - save_scope_as = second_place - tournament_horse_race_fetch_horse_effect = yes - } - # Determine third place - random_guest_subset = { - name = qualified - phase = tournament_phase_$CONTEST$ - limit = { - is_alive = yes - exists = var:progress_to_victory - NOR = { - this = scope:contest_winner - this = scope:second_place - } - save_temporary_scope_as = third_temp - } - weight = { - base = 1 - # Weights heavily on PtV, and major differences in score - tournament_contest_winner_determiner_modifier = { CHAR = scope:third_temp CONTEST = $CONTEST$ } - } - save_scope_as = third_place - tournament_horse_race_fetch_horse_effect = yes - } - # Save all non-winner entrants so we can easily check if someone lost - every_guest_subset = { - name = qualified - phase = tournament_phase_$CONTEST$ - limit = { - this != scope:contest_winner - } - add_to_list = contest_losers - } - # Save winner and add to overall tracker - add_to_guest_subset = { - name = winner - target = scope:contest_winner - phase = tournament_phase_$CONTEST$ - } - # Save podium placements for reference - if = { - limit = { exists = scope:second_place } - add_to_guest_subset = { - name = second_place - target = scope:second_place - phase = tournament_phase_$CONTEST$ - } - } - if = { - limit = { exists = scope:third_place } - add_to_guest_subset = { - name = third_place - target = scope:third_place - phase = tournament_phase_$CONTEST$ - } - } - # Rewards - tournament_contest_rewards_effect = { CONTEST = $CONTEST$ } - # Fire host's prize award event - activity_host = { trigger_event = contest_events.0505 } - # Clear redundant variables - every_attending_character = { tournament_clear_contest_variables_effect = yes } - } -} - -################### -### VERSUS TYPE ### -################### - -# Examples: Jousting, Single Combat, Board Game -# Versus contests are won through a tournament table - -# Create versus contestant list and log entry - contest_$CONTEST$_potential -tournament_contest_versus_composition_effect = { - scope:activity = { - set_variable = { name = tournament_commenced } - if = { - limit = { exists = var:contest_versus_progress } - remove_variable = contest_versus_progress - } - # Players - every_guest_subset = { - name = contestant - phase = tournament_phase_$CONTEST$ - limit = { - OR = { - is_ai = no - AND = { - has_court_position = champion_court_position - liege = { is_ai = no } - } - } - tournament_contest_can_compete_trigger = yes - exists = var:progress_to_victory - var:progress_to_victory >= scope:activity.var:progress_to_victory_threshold - } - add_tournament_contest_contestant_effect = { - CONTEST = $CONTEST$ - SKILL = $SKILL$ - PTV = progress_to_victory_active_contestant_value - } - } - # Filter relevant into entrants list - while = { - limit = { - any_guest_subset = { - name = qualified - phase = tournament_phase_$CONTEST$ - count < 7 - } - any_guest_subset_current_phase = { - name = contestant - tournament_contest_can_compete_trigger = yes - } - } - ordered_guest_subset = { - name = contestant - phase = tournament_phase_$CONTEST$ - limit = { tournament_contest_can_compete_trigger = yes } - order_by = var:progress_to_victory - add_tournament_contest_contestant_effect = { - CONTEST = $CONTEST$ - SKILL = $SKILL$ - PTV = progress_to_victory_active_contestant_value - } - } - } - # Chance for a mysterious stranger - hidden_effect = { - random_list = { - 3 = { - ordered_guest_subset = { - name = contestant - phase = tournament_phase_$CONTEST$ - limit = { tournament_contest_can_compete_trigger = yes } - order_by = var:progress_to_victory - add_tournament_contest_contestant_effect = { - CONTEST = $CONTEST$ - SKILL = $SKILL$ - PTV = progress_to_victory_active_contestant_value - } - } - } - 1 = { - trigger = { - NOT = { exists = var:mysterious_stranger_appeared } - any_attending_character = { - culture = { - any_culture_county = { - exists = faith - any_direct_de_jure_vassal_title = { exists = this } - } - } - } - any_attending_character = { count <= 240 } - } - tournament_mysterious_stranger_effect = { - CONTEST = $CONTEST$ - SKILL = $SKILL$ - } - } - } - } - # Inform liege of prestige from qualified knights - tournament_liege_qualification_toast_effect = yes - # Save scopes for tournament tables - tournament_contest_versus_summary_scope_effect = yes - # Qualification ping - every_guest_subset = { - name = contestant - phase = tournament_phase_$CONTEST$ - limit = { - save_temporary_scope_as = new_list_member - NOT = { - scope:activity = { - any_guest_subset_current_phase = { - name = qualified - this = scope:new_list_member - } - } - } - } - tournament_contest_qualification_failure_effect = yes - } - # Add Activity Log entry - add_activity_log_entry = { - key = tournament_contest_start_log - tags = { contest } - score = 20 - character = scope:host - } - switch = { - trigger = has_current_phase - tournament_phase_joust = { - tournament_contest_versus_pulse_effect = { CONTEST = joust } - } - tournament_phase_duel = { - tournament_contest_versus_pulse_effect = { CONTEST = duel } - } - tournament_phase_wrestling = { - tournament_contest_versus_pulse_effect = { CONTEST = wrestling } - } - tournament_phase_board_game = { - tournament_contest_versus_pulse_effect = { CONTEST = board_game } - } - } - # Fire starting event - every_attending_character = { - trigger_event = contest_events.0800 - } - trigger_event = { - id = contest_events.0801 - days = 12 - } - trigger_event = { - id = contest_events.0801 - days = 19 - } - } -} - -# Pair opponents and fire summary event for current round -tournament_contest_versus_pulse_effect = { - scope:activity = { - if = { - limit = { - NOT = { exists = var:contest_versus_progress } - } - set_variable = { - name = contest_versus_progress - value = 0 - } - } - else = { - # Progress tournament stage tracker - change_variable = { - name = contest_versus_progress - add = 1 - } - } - # Resolve bouts for current stage (we use stage prior here to select from those who made it through) - switch = { - trigger = var:contest_versus_progress - 0 = { - tournament_contest_versus_pair_effect = { CONTEST = $CONTEST$ STAGE = qualified } - } - 1 = { - tournament_contest_versus_pair_effect = { CONTEST = $CONTEST$ STAGE = semi_finalist } - } - 2 = { - tournament_contest_versus_pair_effect = { CONTEST = $CONTEST$ STAGE = finalist } - } - } - # Save scopes for events - tournament_contest_versus_summary_scope_effect = yes - # Fire summary events - every_attending_character = { - limit = { - OR = { - is_in_guest_subset = { name = qualified } - is_ai = no - } - } - trigger_event = contest_events.0820 - trigger_event = { - on_action = tournament_intent_setup_events - days = 1 - } - } - } -} - -# Pair off versus contestants into bout matches -tournament_contest_versus_pair_effect = { - # Remove any event score gained in last round - every_guest_subset = { - name = $STAGE$ - phase = tournament_phase_$CONTEST$ - add_to_list = valid_contestants - set_variable = { - name = progress_to_victory - value = progress_to_victory_active_contestant_value - } - } - if = { - limit = { - any_guest_subset = { - name = $STAGE$ # e.g. quarter - phase = tournament_phase_$CONTEST$ - count < contest_versus_$STAGE$_count - } - } - debug_log = "Not enough versus contestants" - while = { - limit = { - any_guest_subset = { - name = $STAGE$ # e.g. quarter - phase = tournament_phase_$CONTEST$ - count < contest_versus_$STAGE$_count - } - } - if = { - limit = { - any_guest_subset = { - name = contestant - phase = tournament_phase_$CONTEST$ - save_temporary_scope_as = new_list_member - NOT = { - scope:activity = { - any_guest_subset_current_phase = { - name = $STAGE$ - this = scope:new_list_member - } - } - } - activity_is_valid_tournament_contestant = yes - } - } - random_guest_subset = { - name = contestant - phase = tournament_phase_$CONTEST$ - limit = { - save_temporary_scope_as = new_list_member - NOT = { - scope:activity = { - any_guest_subset_current_phase = { - name = $STAGE$ - this = scope:new_list_member - } - } - } - activity_is_valid_tournament_contestant = yes - } - save_scope_as = backup_contestant - } - } - else = { tournament_versus_create_contestant_fallback_effect = yes } - add_to_guest_subset = { - name = $STAGE$ - target = scope:backup_contestant - phase = tournament_phase_$CONTEST$ - } - } - } - # Pair remaining contestants - while = { - limit = { - any_guest_subset = { - name = $STAGE$ - phase = tournament_phase_$CONTEST$ - NOT = { has_variable = contest_$STAGE$_match_$CONTEST$ } - } - } - ordered_guest_subset = { - name = $STAGE$ - phase = tournament_phase_$CONTEST$ - limit = { - NOT = { has_variable = contest_$STAGE$_match_$CONTEST$ } - } - order_by = { - value = 50 - if = { - limit = { scope:activity = { has_current_phase = tournament_phase_joust } } - add = contest_horse_aptitude_value - } - else_if = { - limit = { scope:activity = { has_current_phase = tournament_phase_duel } } - add = contest_foot_aptitude_value - } - else_if = { - limit = { scope:activity = { has_current_phase = tournament_phase_board_game } } - add = contest_board_game_aptitude_value - } - else = { add = contest_pugilism_aptitude_value } - } - # Save pair of contestants - save_scope_as = versus_matchee - scope:activity = { - random_guest_subset = { - name = $STAGE$ - phase = tournament_phase_$CONTEST$ - limit = { - NOR = { - this = scope:versus_matchee - has_variable = contest_$STAGE$_match_$CONTEST$ - } - } - weight = { - base = 1 - # Prefer to leave rivalry matches later - modifier = { - factor = 0.5 - has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:versus_matchee } - } - # Prefer to leave player matches later - modifier = { - factor = 0.25 - is_ai = no - scope:versus_matchee = { is_ai = no } - } - # Prefer to leave stranger matches later - modifier = { - factor = 0.25 - is_ai = yes - scope:versus_matchee = { exists = var:mysterious_stranger_origin } - } - } - save_scope_as = versus_matcher - } - } - # Save stage matches for debug and fetching - if = { - limit = { scope:activity.var:contest_versus_progress = 2 } - set_variable = { - name = last_versus_match - value = var:contest_semi_finalist_match_$CONTEST$ - years = 1 - } - add_to_temporary_list = past_round_summary - } - else_if = { - limit = { scope:activity.var:contest_versus_progress = 1 } - set_variable = { - name = last_versus_match - value = var:contest_qualified_match_$CONTEST$ - years = 1 - } - add_to_temporary_list = past_round_summary - } - set_variable = { - name = contest_$STAGE$_match_$CONTEST$ - value = scope:versus_matcher - years = 1 - } - set_variable = { - name = next_versus_match - value = scope:versus_matcher - years = 1 - } - scope:versus_matcher = { - if = { - limit = { scope:activity.var:contest_versus_progress = 2 } - set_variable = { - name = last_versus_match - value = var:contest_semi_finalist_match_$CONTEST$ - years = 1 - } - add_to_temporary_list = past_round_summary - } - else_if = { - limit = { scope:activity.var:contest_versus_progress = 1 } - set_variable = { - name = last_versus_match - value = var:contest_qualified_match_$CONTEST$ - years = 1 - } - add_to_temporary_list = past_round_summary - } - set_variable = { - name = contest_$STAGE$_match_$CONTEST$ - value = scope:versus_matchee - years = 1 - } - set_variable = { - name = next_versus_match - value = scope:versus_matchee - years = 1 - } - add_to_temporary_list = past_round_summary - } - debug_log_scopes = yes - ### Resolve bouts - # AI only - if = { - limit = { - scope:versus_matchee = { is_ai = yes } - scope:versus_matcher = { is_ai = yes } - } - scope:versus_matchee = { - trigger_event = { - id = contest_events.0830 # Both AI - background script - days = 6 - } - } - } - # Player involvement - else = { - scope:versus_matchee = { - if = { - limit = { is_ai = no } - trigger_event = { - on_action = contest_bout_$CONTEST$_random_pulse - days = 2 - } - trigger_event = { - on_action = contest_bout_$CONTEST$_pivotal_pulse - days = 4 - } - } - } - scope:versus_matcher = { - if = { - limit = { is_ai = no } - trigger_event = { - on_action = contest_bout_$CONTEST$_random_pulse - days = 2 - } - trigger_event = { - on_action = contest_bout_$CONTEST$_pivotal_pulse - days = 4 - } - } - } - } - } - } -} - -# Save scopes of opponent based on bout stage -tournament_contest_versus_round_scope_effect = { - if = { - limit = { scope:activity.var:contest_versus_progress = 0 } - if = { - limit = { exists = var:contest_qualified_match_$CONTEST$ } - var:contest_qualified_match_$CONTEST$ = { save_scope_as = versus_contestant } - } - } - else_if = { - limit = { scope:activity.var:contest_versus_progress = 1 } - if = { - limit = { exists = var:contest_semi_finalist_match_$CONTEST$ } - var:contest_semi_finalist_match_$CONTEST$ = { save_scope_as = versus_contestant } - } - } - else = { - if = { - limit = { exists = var:contest_finalist_match_$CONTEST$ } - var:contest_finalist_match_$CONTEST$ = { save_scope_as = versus_contestant } - } - } -} - -tournament_contest_versus_match_scope_effect = { - scope:activity = { - switch = { - trigger = has_current_phase - tournament_phase_joust = { - $CHAR$ = { tournament_contest_versus_round_scope_effect = { CONTEST = joust } } - } - tournament_phase_wrestling = { - $CHAR$ = { tournament_contest_versus_round_scope_effect = { CONTEST = wrestling } } - } - tournament_phase_duel = { - $CHAR$ = { tournament_contest_versus_round_scope_effect = { CONTEST = duel } } - } - tournament_phase_board_game = { - $CHAR$ = { tournament_contest_versus_round_scope_effect = { CONTEST = board_game } } - } - } - } -} - -# Determine versus wound/death outcomes -tournament_contest_versus_battle_wound_effect = { - scope:contest_loser = { - if = { - limit = { exists = var:murder_sabotage_target } - random = { - chance = 50 - modifier = { - add = { - value = var:murder_sabotage_target - multiply = 15 - } - } - increase_wounds_effect = { REASON = contest_$CONTEST$_accident } - save_scope_as = sabotage_murder_wound - } - random = { - chance = 50 - modifier = { - add = { - value = var:murder_sabotage_target - multiply = 15 - } - } - add_character_flag = died_in_contest_flag - death = { - death_reason = death_contest_$CONTEST$_accident - killer = scope:contest_winner - } - save_scope_as = sabotage_murder_death - } - if = { - limit = { is_alive = yes } - remove_variable = murder_sabotage_target - } - } - else = { - random = { - chance = $WOUND_CHANCE$ - increase_wounds_effect = { REASON = contest_$CONTEST$_accident } - } - random = { - chance = $DEATH_CHANCE$ - add_character_flag = died_in_contest_flag - death = { - death_reason = death_contest_$CONTEST$_accident - killer = scope:contest_winner - } - } - } - } -} - -# Randomize versus bout outcome based on skill -tournament_contest_versus_battle_effect = { - save_temporary_scope_value_as = { - name = choose_winner - value = $CHOOSE_WINNER$ - } - save_temporary_scope_value_as = { - name = injury_chance - value = $INJURY_CHANCE$ - } - set_variable = { - name = progress_to_victory - value = progress_to_victory_active_contestant_value - } - var:next_versus_match = { - save_scope_as = next_versus_match - if = { - limit = { is_alive = yes } - set_variable = { - name = progress_to_victory - value = progress_to_victory_active_contestant_value - } - } - } - # Determine winner - if = { - limit = { scope:choose_winner = yes } - random_list = { - # ROOT WINS - 10 = { - trigger = { - is_alive = yes - save_temporary_scope_as = versus_matchee_temp - } - desc = tournament_contest_versus_battle_win_tt - modifier = { - exists = var:progress_to_victory_score - add = var:progress_to_victory_score - } - modifier = { - exists = var:contest_aptitude - add = { - value = var:contest_aptitude - divide = 2 - } - } - # Prefer unmatched rivals of players to not get knocked out - modifier = { - is_ai = yes - scope:next_versus_match = { is_ai = yes } - scope:activity = { - any_guest_subset = { - name = contestant - exists = var:progress_to_victory - this != scope:next_versus_match - is_ai = no - has_any_bad_relationship_with_character_trigger = { CHARACTER = root } - } - } - factor = 2 - } - modifier = { - has_variable = murder_sabotage_target - factor = 0.5 - } - # If aptitude is higher, more likely to win - modifier = { - exists = var:contest_aptitude - exists = scope:next_versus_match.var:contest_aptitude - var:contest_aptitude > scope:next_versus_match.var:contest_aptitude - factor = 2 - } - # If have at least double aptitude of other character, you win - modifier = { - exists = var:contest_aptitude - exists = scope:next_versus_match.var:contest_aptitude - contest_aptitude_fetch_half_value >= scope:next_versus_match.var:contest_aptitude - add = 1000 - } - show_chance = no - versus_contest_round_outcome_tooltip_effect = { - WINNER = root - LOSER = scope:next_versus_match - } - save_scope_as = contest_winner - scope:next_versus_match = { save_scope_as = contest_loser } - } - # VERSUS CONTESTANT WINS - 10 = { - desc = tournament_contest_versus_battle_lose_tt - trigger = { - scope:next_versus_match = { is_alive = yes } - } - modifier = { - exists = scope:next_versus_match.var:progress_to_victory_score - add = scope:next_versus_match.var:progress_to_victory_score - } - modifier = { - exists = scope:next_versus_match.var:contest_aptitude - add = { - value = scope:next_versus_match.var:contest_aptitude - divide = 2 - } - } - # Prefer unmatched rivals of players to not get knocked out - modifier = { - is_ai = yes - scope:next_versus_match = { is_ai = yes } - scope:activity = { - any_guest_subset = { - name = contestant - exists = var:progress_to_victory - this != root - is_ai = no - has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:next_versus_match } - } - } - factor = 2 - } - modifier = { - scope:next_versus_match = { has_variable = murder_sabotage_target } - factor = 0.5 - } - # If aptitude is higher, more likely to win - modifier = { - exists = scope:next_versus_match.var:contest_aptitude - exists = var:contest_aptitude - scope:next_versus_match.var:contest_aptitude > root.var:contest_aptitude - factor = 2 - } - # If they have at least double your aptitude, they win - modifier = { - exists = scope:next_versus_match.var:progress_to_victory - scope:next_versus_match.progress_to_victory_fetch_half_value >= root.var:progress_to_victory - add = 1000 - } - show_chance = no - versus_contest_round_outcome_tooltip_effect = { - WINNER = scope:next_versus_match - LOSER = root - } - scope:next_versus_match = { save_scope_as = contest_winner } - save_scope_as = contest_loser - } - } - } - if = { - limit = { - exists = scope:contest_winner.var:contest_aptitude - exists = scope:contest_loser.var:contest_aptitude - } - save_scope_value_as = { - name = score_difference - value = { - value = scope:contest_winner.var:contest_aptitude - subtract = scope:contest_loser.var:contest_aptitude - } - } - } - # Save contest winner and add activity log entry - scope:activity = { - switch = { - trigger = scope:activity.var:contest_versus_progress - 0 = { - add_to_guest_subset = { - name = semi_finalist - target = scope:contest_winner - phase = tournament_phase_$CONTEST$ - } - add_activity_log_entry = { - key = tournament_bout_quarter_log - tags = { bout contest } - score = 10 - character = scope:contest_winner - target = scope:contest_loser - } - } - 1 = { - add_to_guest_subset = { - name = finalist - target = scope:contest_winner - phase = tournament_phase_$CONTEST$ - } - add_activity_log_entry = { - key = tournament_bout_semi_log - tags = { bout contest } - score = 10 - character = scope:contest_winner - target = scope:contest_loser - } - } - 2 = { - add_to_guest_subset = { - name = winner - target = scope:contest_winner - phase = tournament_phase_$CONTEST$ - } - scope:contest_winner = { - set_variable = { - name = progress_to_victory - value = 100 - } - } - add_to_guest_subset = { - name = second_place - target = scope:contest_loser - phase = tournament_phase_$CONTEST$ - } - } - } - } - # Chance of injuries - if = { - limit = { scope:injury_chance ?= yes } - scope:activity = { - switch = { - trigger = has_current_phase - tournament_phase_joust = { - scope:contest_winner = { - set_variable = { - name = contest_aptitude - value = contest_horse_aptitude_value - } - } - tournament_contest_versus_battle_wound_effect = { - WOUND_CHANCE = 30 - DEATH_CHANCE = 5 - CONTEST = joust - } - } - tournament_phase_wrestling = { - scope:contest_winner = { - set_variable = { - name = contest_aptitude - value = contest_pugilism_aptitude_value - } - } - tournament_contest_versus_battle_wound_effect = { - WOUND_CHANCE = 10 - DEATH_CHANCE = 1 - CONTEST = wrestling - } - } - tournament_phase_duel = { - scope:contest_winner = { - set_variable = { - name = contest_aptitude - value = contest_foot_aptitude_value - } - } - tournament_contest_versus_battle_wound_effect = { - WOUND_CHANCE = 20 - DEATH_CHANCE = 3 - CONTEST = duel - } - } - tournament_phase_board_game = { - scope:contest_winner = { - set_variable = { - name = contest_aptitude - value = contest_board_game_aptitude_value - } - } - tournament_contest_versus_battle_wound_effect = { - WOUND_CHANCE = 5 - DEATH_CHANCE = 1 - CONTEST = board_game - } - } - } - } - } - scope:contest_winner = { - if = { - limit = { - scope:activity = { - any_guest_subset_current_phase = { - name = winner - this = scope:contest_winner - } - } - } - set_variable = { - name = progress_to_victory - value = 100 - } - } - else = { - set_variable = { - name = progress_to_victory - value = progress_to_victory_active_contestant_value - } - } - } - scope:contest_loser = { - if = { - limit = { is_alive = yes } - remove_variable = contest_aptitude - remove_variable = progress_to_victory - } - } - # Consequences for sabotage murder - if = { - limit = { - OR = { - exists = scope:sabotage_murder_wound - exists = scope:sabotage_murder_death - } - } - switch = { - trigger = exists - scope:sabotage_murder_wound = { - attempted_murder_opinion_effect = { VICTIM = scope:contest_loser MURDERER = scope:contest_winner } - } - scope:sabotage_murder_death = { - murder_opinion_effect = { VICTIM = scope:contest_loser MURDERER = scope:contest_winner } - } - } - if = { - limit = { - scope:host = { - is_alive = yes - is_ai = yes - this = scope:contest_loser - } - } - random = { - chance = 50 - modifier = { - add = 25 - has_trait = vengeful - } - modifier = { - add = 25 - has_trait = wrathful - } - modifier = { - add = -25 - has_trait = forgiving - } - rightfully_imprison_character_effect = { - TARGET = scope:contest_winner - IMPRISONER = scope:host - } - } - } - } - scope:contest_winner = { - save_scope_as = pivotal_contestant - trigger_event = { on_action = contest_bout_$CONTEST$_outcome_pulse } - } - scope:contest_loser = { - save_scope_as = pivotal_contestant - trigger_event = { on_action = contest_bout_$CONTEST$_outcome_pulse } - } - scope:activity = { - # Quarter and semi finals only show pivotals to contestants, and pertinent bout pings to everyone else - if = { - limit = { var:contest_versus_progress < 2 } - tournament_contest_versus_pertinent_update_effect = yes - } - # Everyone sees final pivotals - else = { - every_attending_character = { - limit = { - NOR = { - this = scope:contest_winner - this = scope:contest_loser - } - is_ai = no - } - # If competing yourself, it is from your perspective, otherwise find someone relevant - tournament_pivotal_contestant_scope_effect = yes - trigger_event = { on_action = contest_bout_$CONTEST$_outcome_pulse } - } - } - } -} - -tournament_contest_versus_pertinent_update_effect = { - scope:activity = { - every_attending_character = { - limit = { - is_ai = no - NOR = { - this = scope:contest_winner - this = scope:contest_loser - AND = { - exists = scope:wrathful_contestant - this = scope:wrathful_contestant - } - AND = { - exists = scope:wrathful_victim - this = scope:wrathful_victim - } - } - # First round only notify people who care - trigger_if = { - limit = { scope:activity.var:contest_versus_progress < 1 } - OR = { - # Scripted Relation - has_any_scripted_relation = scope:contest_winner - has_any_scripted_relation = scope:contest_loser - # Close Family - is_close_family_of = scope:contest_winner - is_close_family_of = scope:contest_loser - # Spouses - is_consort_of = scope:contest_winner - is_consort_of = scope:contest_loser - # Host - scope:host = scope:contest_winner - scope:host = scope:contest_loser - # Champion Liege - court_position:champion_court_position ?= scope:contest_winner - court_position:champion_court_position ?= scope:contest_loser - # Knights - any_acclaimed_knight = { this = scope:contest_winner } - any_acclaimed_knight = { this = scope:contest_loser } - # Intent Target - trigger_if = { - limit = { exists = intent_target } - OR = { - intent_target = scope:contest_winner - intent_target = scope:contest_loser - } - } - } - } - } - trigger_event = contest_events.0810 - } - } -} - -# Set round participants after resignations -tournament_contest_versus_resignation_effect = { - $RESIGNER$ = { save_scope_as = resign_target } - scope:resign_target = { - save_scope_as = contest_loser - remove_variable = contest_aptitude - add_character_flag = { - flag = resigned_contest_flag - months = 2 - } - } - scope:activity = { - switch = { - trigger = var:contest_versus_progress - 0 = { - scope:resign_target.var:contest_qualified_match_$CONTEST$ = { save_scope_as = resign_match } - add_to_guest_subset = { - name = semi_finalist - target = scope:resign_match - phase = tournament_phase_$CONTEST$ - } - } - 1 = { - scope:resign_target.var:contest_semi_finalist_match_$CONTEST$ = { save_scope_as = resign_match } - add_to_guest_subset = { - name = finalist - target = scope:resign_match - phase = tournament_phase_$CONTEST$ - } - } - 2 = { - scope:resign_target.var:contest_finalist_match_$CONTEST$ = { save_scope_as = resign_match } - add_to_guest_subset = { - name = winner - target = scope:resign_match - phase = tournament_phase_$CONTEST$ - } - add_to_guest_subset = { - name = second_place - target = scope:resign_target - phase = tournament_phase_$CONTEST$ - } - } - } - } - scope:resign_match = { - save_scope_as = contest_winner - remove_variable = contest_aptitude - set_variable = { - name = contest_aptitude - value = contest_$SKILL$_aptitude_value - } - } - scope:activity = { - add_activity_log_entry = { - key = tournament_resigned_versus_log - tags = { contestant removal } - score = 25 - character = scope:contest_loser - target = scope:contest_winner - - # Effect - versus_contest_resignation_tooltip_effect = { - RESIGNER = scope:resign_target - WINNER = scope:resign_match - } - } - every_attending_character = { - limit = { - is_ai = no - NOR = { - this = scope:contest_winner - this = scope:contest_loser - } - } - trigger_event = { - id = contest_events.0825 - days = 1 - } - } - } -} - -# Set round participants after disqualifications -tournament_contest_versus_disqualification_effect = { - $DISQUALIFIED$ = { save_scope_as = disqualify_target } - $MATCH$ = { save_scope_as = disqualify_match } - scope:disqualify_target = { - save_scope_as = contest_loser - remove_variable = contest_aptitude - remove_variable = progress_to_victory - add_character_flag = { - flag = disqualified_contest_flag - months = 2 - } - } - scope:disqualify_match = { - save_scope_as = contest_winner - remove_variable = contest_aptitude - set_variable = { - name = contest_aptitude - value = contest_$SKILL$_aptitude_value - } - set_variable = { - name = progress_to_victory - value = progress_to_victory_active_contestant_value - } - } - scope:activity = { - switch = { - trigger = var:contest_versus_progress - 0 = { - add_to_guest_subset = { - name = semi_finalist - target = scope:disqualify_match - phase = tournament_phase_$CONTEST$ - } - } - 1 = { - add_to_guest_subset = { - name = finalist - target = scope:disqualify_match - phase = tournament_phase_$CONTEST$ - } - } - 2 = { - add_to_guest_subset = { - name = winner - target = scope:disqualify_match - phase = tournament_phase_$CONTEST$ - } - } - } - add_activity_log_entry = { - key = tournament_disqualified_log - score = 50 - tags = { contestant removal } - character = scope:contest_loser - target = scope:host - - # Effect - scope:contest_loser = { - if ={ - limit = { scope:activity.var:contest_versus_progress = 2 } - custom_description = { - text = tournament_contest_disqualify_win_tt - subject = scope:disqualify_match # WINNER - object = scope:disqualify_target # DISQUALIFIED - } - } - else = { - custom_description = { - text = tournament_contest_disqualify_round_tt - subject = scope:disqualify_match # WINNER - object = scope:disqualify_target # DISQUALIFIED - } - } - if = { - limit = { is_ai = yes } - add_opinion = { - target = scope:host - modifier = tournament_disqualified_opinion - opinion = -15 - } - } - } - } - every_attending_character = { - limit = { - is_ai = no - trigger_if = { - limit = { exists = scope:contest_winner } - this != scope:contest_winner - } - trigger_if = { - limit = { exists = scope:contest_loser } - this != scope:contest_loser - } - } - trigger_event = contest_events.0826 - } - } -} - -# Disqualify qualified contestant from contest -tournament_contest_disqualification_effect = { - $DISQUALIFIED$ = { save_scope_as = disqualify_target } - scope:disqualify_target = { - remove_variable = contest_aptitude - remove_variable = progress_to_victory - add_character_flag = { - flag = disqualified_contest_flag - months = 2 - } - } - custom_description = { - text = tournament_contest_disqualify_tt - subject = $DISQUALIFIED$ - } -} - -# Swap determined winner and loser -tournament_contest_versus_swap_winner_loser_effect = { - switch = { - trigger = scope:activity.var:contest_versus_progress - 0 = { - remove_from_guest_subset = { - name = semi_finalist - target = scope:contest_winner - phase = tournament_phase_$CONTEST$ - } - add_to_guest_subset = { - name = semi_finalist - target = scope:contest_loser - phase = tournament_phase_$CONTEST$ - } - } - 1 = { - remove_from_guest_subset = { - name = finalist - target = scope:contest_winner - phase = tournament_phase_$CONTEST$ - } - add_to_guest_subset = { - name = finalist - target = scope:contest_loser - phase = tournament_phase_$CONTEST$ - } - } - 2 = { - remove_from_guest_subset = { - name = winner - target = scope:contest_winner - phase = tournament_phase_$CONTEST$ - } - add_to_guest_subset = { - name = winner - target = scope:contest_loser - phase = tournament_phase_$CONTEST$ - } - remove_from_guest_subset = { - name = second_place - target = scope:contest_loser - phase = tournament_phase_$CONTEST$ - } - add_to_guest_subset = { - name = second_place - target = scope:contest_winner - phase = tournament_phase_$CONTEST$ - } - } - } - scope:contest_winner = { - remove_variable = contest_aptitude - remove_variable = progress_to_victory - save_scope_as = disqualify_target - } - scope:contest_loser = { - set_variable = { - name = progress_to_victory - value = progress_to_victory_active_contestant_value - } - set_variable = { - name = contest_aptitude - value = contest_$SKILL$_aptitude_value - } - } - versus_contest_disqualification_tooltip_effect = { - WINNER = scope:contest_loser - DISQUALIFIED = scope:contest_winner - } -} - -# Replace qualified contestant for another - versus version -tournament_contest_versus_replace_qualifier_effect = { - $NEW_CONTESTANT$ = { save_scope_as = new_contestant } - $OLD_CONTESTANT$ = { save_scope_as = old_contestant } - if = { - limit = { - NOT = { exists = scope:activity.var:contest_versus_progress } - } - remove_from_guest_subset = { - name = qualified - target = scope:old_contestant - phase = tournament_phase_$CONTEST$ - } - add_to_guest_subset = { - name = spectator - target = scope:old_contestant - phase = tournament_phase_$CONTEST$ - } - add_to_guest_subset = { - name = qualified - target = scope:new_contestant - phase = tournament_phase_$CONTEST$ - } - } - else = { - switch = { - trigger = scope:activity.var:contest_versus_progress - 0 = { - remove_from_guest_subset = { - name = qualified - target = scope:old_contestant - phase = tournament_phase_$CONTEST$ - } - add_to_guest_subset = { - name = spectator - target = scope:old_contestant - phase = tournament_phase_$CONTEST$ - } - add_to_guest_subset = { - name = qualified - target = scope:new_contestant - phase = tournament_phase_$CONTEST$ - } - scope:new_contestant = { - set_variable = { - name = contest_qualified_match_$CONTEST$ - value = scope:old_contestant.var:contest_qualified_match_$CONTEST$ - years = 1 - } - } - scope:old_contestant = { remove_variable = contest_qualified_match_$CONTEST$ } - } - 1 = { - remove_from_guest_subset = { - name = semi_finalist - target = scope:old_contestant - phase = tournament_phase_$CONTEST$ - } - add_to_guest_subset = { - name = spectator - target = scope:old_contestant - phase = tournament_phase_$CONTEST$ - } - add_to_guest_subset = { - name = semi_finalist - target = scope:new_contestant - phase = tournament_phase_$CONTEST$ - } - scope:new_contestant = { - set_variable = { - name = contest_semi_finalist_match_$CONTEST$ - value = scope:old_contestant.var:contest_qualified_match_$CONTEST$ - years = 1 - } - } - scope:old_contestant = { remove_variable = contest_semi_finalist_match_$CONTEST$ } - } - 2 = { - remove_from_guest_subset = { - name = finalist - target = scope:old_contestant - phase = tournament_phase_$CONTEST$ - } - add_to_guest_subset = { - name = spectator - target = scope:old_contestant - phase = tournament_phase_$CONTEST$ - } - add_to_guest_subset = { - name = finalist - target = scope:new_contestant - phase = tournament_phase_$CONTEST$ - } - scope:new_contestant = { - set_variable = { - name = contest_finalist_match_$CONTEST$ - value = scope:old_contestant.var:contest_qualified_match_$CONTEST$ - years = 1 - } - } - scope:old_contestant = { remove_variable = contest_finalist_match_$CONTEST$ } - } - } - } - scope:old_contestant = { - remove_variable = contest_aptitude - remove_variable = progress_to_victory - save_scope_as = disqualify_target - } - scope:new_contestant = { - tournament_set_current_aptitude_variable_effect = yes - set_variable = { - name = progress_to_victory - value = progress_to_victory_active_contestant_value - } - } - scope:activity = { - every_attending_character = { - limit = { is_ai = no } - send_interface_toast = { - title = tournament_qualifier_replaced_toast - left_icon = scope:old_contestant - right_icon = scope:new_contestant - custom_description = { - text = tournament_contest_replaced_tt - subject = scope:new_contestant # REPLACER - object = scope:old_contestant # REPLACED - } - } - } - } -} - -# Save scopes for round summary events -tournament_contest_versus_summary_scope_effect = { - if = { - limit = { exists = var:contest_versus_progress } - switch = { - trigger = var:contest_versus_progress - 1 = { # Semi finalists - ordered_guest_subset_current_phase = { - name = semi_finalist - limit = { - NOR = { - scope:contest_summary_1 ?= this - scope:contest_summary_2 ?= this - scope:contest_summary_3 ?= this - } - } - max = 4 - check_range_bounds = no - order_by = primary_title.tier - if = { - limit = { NOT = { exists = scope:contest_summary_1 } } - save_scope_as = contest_summary_1 - } - else_if = { - limit = { NOT = { exists = scope:contest_summary_2 } } - save_scope_as = contest_summary_2 - } - else_if = { - limit = { NOT = { exists = scope:contest_summary_3 } } - save_scope_as = contest_summary_3 - } - else = { save_scope_as = contest_summary_4 } - } - } - 2 = { # Finalist - ordered_guest_subset_current_phase = { - name = finalist - limit = { - NOT = { scope:contest_summary_1 ?= this } - } - max = 2 - check_range_bounds = no - order_by = primary_title.tier - if = { - limit = { NOT = { exists = scope:contest_summary_1 } } - save_scope_as = contest_summary_1 - } - else = { save_scope_as = contest_summary_2 } - } - } - } - } -} - -# Save winner and second place scopes, award prizes, and fire ping events -tournament_contest_versus_winner_effect = { - # Achievement. - little_william_marshal_achievement_contest_end_effect = yes - scope:activity = { - save_scope_value_as = { name = contest_complete value = flag:$CONTEST$ } - # Save winner and add to overall winner tracker - random_guest_subset = { - name = winner - phase = tournament_phase_$CONTEST$ - save_scope_as = contest_winner - tournament_complete_win_contest_intent_effect = yes - # Achievement. - little_william_marshal_achievement_contest_end_winner_effect = yes - } - # Save other finalist as second place - random_guest_subset = { - name = second_place - phase = tournament_phase_$CONTEST$ - save_scope_as = second_place - } - if = { - limit = { - NOT = { exists = scope:second_place } - } - scope:contest_winner.var:next_versus_match ?= { save_scope_as = second_place } - } - # Save all non-winner entrants so we can easily check if someone lost - every_guest_subset = { - name = qualified - phase = tournament_phase_$CONTEST$ - limit = { - NOT = { scope:contest_winner ?= this } - } - add_to_list = contest_losers - } - # Rewards - tournament_contest_rewards_effect = { CONTEST = $CONTEST$ } - # Fire host's prize award event - activity_host = { trigger_event = contest_events.0805 } - # Clear redundant variables - remove_variable = contest_versus_progress - every_attending_character = { tournament_clear_contest_variables_effect = yes } - } -} - -# List correct wound status for versus contests -tournament_wounded_or_dead_contest_effect = { - scope:activity = { - switch = { - trigger = has_current_phase - tournament_phase_joust = { - scope:contest_loser = { - tournament_wounded_or_dead_tooltip_effect = { CONTEST = joust } - } - } - tournament_phase_wrestling = { - scope:contest_loser = { - tournament_wounded_or_dead_tooltip_effect = { CONTEST = wrestling } - } - } - tournament_phase_duel = { - scope:contest_loser = { - tournament_wounded_or_dead_tooltip_effect = { CONTEST = duel } - } - } - tournament_phase_board_game = { - scope:contest_loser = { - tournament_wounded_or_dead_tooltip_effect = { CONTEST = board_game } - } - } - } - } -} - -# Save versus matched contestant's scopes -contest_versus_player_vs_ai_scope_effect = { - if = { - limit = { this = scope:versus_matchee } - scope:versus_matcher = { save_scope_as = versus_contestant } - } - else = { - scope:versus_matchee = { save_scope_as = versus_contestant } - } -} - -# Fallback for replacing dead versus contestant with a fresh one -tournament_versus_qualifier_death_effect = { - if = { - limit = { - involved_activity ?= { - has_activity_type = activity_tournament - OR = { - has_current_phase = tournament_phase_duel - has_current_phase = tournament_phase_wrestling - has_current_phase = tournament_phase_board_game - has_current_phase = tournament_phase_joust - } - any_guest_subset_current_phase = { name = qualified this = root } - } - NOT = { has_character_flag = died_in_contest_flag } - } - save_scope_as = dead_contestant - var:next_versus_match = { save_scope_as = versus_match } - involved_activity = { - save_scope_as = activity - if = { - limit = { - scope:versus_match = { is_in_guest_subset = { name = finalist } } - } - tournament_versus_dead_qualifier_effect = { SUBSET = winner } - } - else_if = { - limit = { - scope:versus_match = { is_in_guest_subset = { name = semi_finalist } } - } - tournament_versus_dead_qualifier_effect = { SUBSET = finalist } - } - else = { - tournament_versus_dead_qualifier_effect = { SUBSET = semi_finalist } - } - } - every_player = { - limit = { is_participant_in_activity = scope:activity } - send_interface_toast = { - title = tournament_qualifier_dies_toast - left_icon = scope:dead_contestant - right_icon = scope:versus_contestant - custom_tooltip = tournament_quailfier_dies_tt - } - } - } -} - -# Used to add new qualifiers to correct versus subset -tournament_versus_new_qualifier_effect = { - switch = { - trigger = has_current_phase - tournament_phase_duel = { - add_to_guest_subset = { - name = $SUBSET$ - phase = tournament_phase_duel - target = scope:new_qualifier - } - } - tournament_phase_wrestling = { - add_to_guest_subset = { - name = $SUBSET$ - phase = tournament_phase_wrestling - target = scope:new_qualifier - } - } - tournament_phase_board_game = { - add_to_guest_subset = { - name = $SUBSET$ - phase = tournament_phase_board_game - target = scope:new_qualifier - } - } - tournament_phase_joust = { - add_to_guest_subset = { - name = $SUBSET$ - phase = tournament_phase_joust - target = scope:new_qualifier - } - } - } -} - -tournament_versus_dead_qualifier_effect = { - switch = { - trigger = has_current_phase - tournament_phase_duel = { - add_to_guest_subset = { - name = $SUBSET$ - phase = tournament_phase_duel - target = scope:versus_match - } - } - tournament_phase_wrestling = { - add_to_guest_subset = { - name = $SUBSET$ - phase = tournament_phase_wrestling - target = scope:versus_match - } - } - tournament_phase_board_game = { - add_to_guest_subset = { - name = $SUBSET$ - phase = tournament_phase_board_game - target = scope:versus_match - } - } - tournament_phase_joust = { - add_to_guest_subset = { - name = $SUBSET$ - phase = tournament_phase_joust - target = scope:versus_match - } - } - } -} - -########################### -### MYSTERIOUS STRANGER ### -########################### - -# Create a mysterious stranger contestant -tournament_mysterious_stranger_effect = { - random_attending_character = { - culture = { save_scope_as = attending_culture } - } - scope:attending_culture = { - random_culture_county = { - faith = { save_scope_as = attending_faith } - random_direct_de_jure_vassal_title = { save_scope_as = attending_barony } - } - } - create_character = { - template = tournament_$SKILL$_character - location = scope:activity.activity_location - faith = scope:attending_faith - culture = scope:attending_culture - dynasty = none - save_scope_as = mysterious_stranger - } - scope:mysterious_stranger = { - set_variable = { - name = mysterious_stranger_origin - value = scope:attending_barony - } - set_variable = { - name = contest_aptitude - value = contest_$SKILL$_aptitude_value - } - add_to_activity = scope:activity - } - add_activity_log_entry = { - key = contest_mysterious_stranger_log - tags = { contestant } - score = 25 - character = scope:mysterious_stranger - - # Effect - show_as_tooltip = { - scope:mysterious_stranger = { add_to_activity = scope:activity } - } - } - add_to_guest_subset = { - name = qualified - target = scope:mysterious_stranger - phase = tournament_phase_$CONTEST$ - } - set_variable = mysterious_stranger_appeared -} - -############## -### WAGERS ### -############## - -# Find scopes for possible wagers -tournament_generate_wager_scope_effect = { - # Top contestant - for maths - ordered_guest_subset_current_phase = { - name = qualified - limit = { - NOT = { exists = var:mysterious_stranger_origin } - } - order_by = var:contest_aptitude - save_scope_as = wager_top_contestant - tournament_horse_race_fetch_horse_effect = yes - } - save_scope_value_as = { - name = wager_diff_value - value = { - add = scope:wager_top_contestant.var:contest_aptitude - divide = 2 - } - } - # Bottom contestant - for maths - ordered_guest_subset_current_phase = { - name = qualified - order_by = { - value = 0 - subtract = var:contest_aptitude - } - save_scope_as = wager_bottom_contestant - tournament_horse_race_fetch_horse_effect = yes - } - # Champion contestant - if = { - limit = { - scope:wagerer = { employs_court_position = champion_court_position } - any_guest_subset_current_phase = { - name = qualified - has_court_position = champion_court_position - liege = scope:wagerer - NOR = { - this = scope:wager_top_contestant - this = scope:wager_bottom_contestant - } - } - } - random_guest_subset_current_phase = { - name = qualified - limit = { - has_court_position = champion_court_position - liege = scope:wagerer - NOR = { - this = scope:wager_top_contestant - this = scope:wager_bottom_contestant - } - } - save_scope_as = wager_champion_contestant - if = { - limit = { - scope:activity = { has_current_phase = tournament_phase_horse_race } - } - tournament_horse_race_fetch_horse_effect = yes - } - } - } - # Flavor contestant - if = { - limit = { - any_guest_subset_current_phase = { - name = qualified - OR = { - has_any_good_relationship_with_character_trigger = { CHARACTER = root } - is_child_of = root - is_spouse_of = root - } - NOR = { - this = scope:wager_top_contestant - AND = { - exists = scope:wager_champion_contestant - this = scope:wager_champion_contestant - } - } - } - } - ordered_guest_subset_current_phase = { - name = qualified - limit = { - OR = { - has_any_good_relationship_with_character_trigger = { CHARACTER = root } - is_child_of = root - is_spouse_of = root - } - NOR = { - this = scope:wager_top_contestant - AND = { - exists = scope:wager_champion_contestant - this = scope:wager_champion_contestant - } - } - } - order_by = var:contest_aptitude - save_scope_as = wager_flavor_contestant - if = { - limit = { - scope:activity = { has_current_phase = tournament_phase_horse_race } - } - tournament_horse_race_fetch_horse_effect = yes - } - } - } - # Underdog contestant - if = { - limit = { - any_guest_subset_current_phase = { - name = qualified - NOR = { - exists = var:mysterious_stranger_origin - this = scope:wager_top_contestant - AND = { - exists = scope:wager_flavor_contestant - this = scope:wager_flavor_contestant - } - AND = { - exists = scope:wager_champion_contestant - this = scope:wager_champion_contestant - } - trigger_if = { - limit = { exists = scope:wager_flavor_contestant } - this = scope:wager_flavor_contestant - } - } - contest_aptitude_fetch_value <= tournament_wager_diff_value - } - } - random_guest_subset_current_phase = { - name = qualified - limit = { - NOR = { - exists = var:mysterious_stranger_origin - this = scope:wager_top_contestant - AND = { - exists = scope:wager_flavor_contestant - this = scope:wager_flavor_contestant - } - AND = { - exists = scope:wager_champion_contestant - this = scope:wager_champion_contestant - } - trigger_if = { - limit = { exists = scope:wager_flavor_contestant } - this = scope:wager_flavor_contestant - } - } - contest_aptitude_fetch_value <= tournament_wager_diff_value - } - weight = { - base = 1 - modifier = { - factor = 0.1 - this = root - } - } - save_scope_as = wager_underdog_contestant - if = { - limit = { - scope:activity = { has_current_phase = tournament_phase_horse_race } - } - tournament_horse_race_fetch_horse_effect = yes - } - } - } - # Second favourite - else_if = { - limit = { - NOT = { exists = scope:wager_underdog_contestant } - any_guest_subset_current_phase = { - name = qualified - NOR = { - this = scope:wager_top_contestant - exists = var:mysterious_stranger_origin - AND = { - exists = scope:wager_flavor_contestant - this = scope:wager_flavor_contestant - } - AND = { - exists = scope:wager_champion_contestant - this = scope:wager_champion_contestant - } - } - } - } - ordered_guest_subset_current_phase = { - name = qualified - limit = { - NOR = { - this = scope:wager_top_contestant - exists = var:mysterious_stranger_origin - AND = { - exists = scope:wager_flavor_contestant - this = scope:wager_flavor_contestant - } - } - } - order_by = var:contest_aptitude - save_scope_as = wager_second_contestant - if = { - limit = { - scope:activity = { has_current_phase = tournament_phase_horse_race } - } - tournament_horse_race_fetch_horse_effect = yes - } - } - } - # Mysterious stranger - if = { - limit = { - any_guest_subset_current_phase = { - name = qualified - exists = var:mysterious_stranger_origin - } - } - random_guest_subset_current_phase = { - name = qualified - limit = { exists = var:mysterious_stranger_origin } - save_scope_as = mysterious_stranger - if = { - limit = { - scope:activity = { has_current_phase = tournament_phase_horse_race } - } - tournament_horse_race_fetch_horse_effect = yes - } - } - } -} - -# Info and payout for won/lost wager -tournament_contest_wager_effect = { - if = { - limit = { - exists = var:tournament_wager_target - exists = var:tournament_wager_payout - } - var:tournament_wager_target = { save_scope_as = wager_target } - if = { - limit = { scope:wager_target = scope:contest_winner } - if = { - limit = { - scope:contest_complete ?= flag:horse_race - exists = scope:wager_target.var:contest_horse_race_name - } - custom_tooltip = wager_won_horse_tooltip - } - else = { custom_tooltip = wager_won_tooltip } - add_gold = var:tournament_wager_payout - } - else = { - if = { - limit = { - scope:contest_complete ?= flag:horse_race - exists = scope:wager_target.var:contest_horse_race_name - } - custom_tooltip = wager_lost_horse_tooltip - } - else = { custom_tooltip = wager_lost_tooltip } - } - remove_variable = tournament_wager_stake - remove_variable = tournament_wager_target - remove_variable = tournament_wager_payout - } -} - -# Tooltips for current status of placed wager -tournament_contest_wager_info_effect = { - if = { - limit = { - exists = var:tournament_wager_target - exists = var:tournament_wager_payout - } - var:tournament_wager_target = { save_scope_as = wager_target } - if = { - limit = { - scope:activity = { activity_tournament_versus_contest_trigger = yes } - } - switch = { - trigger = var:tournament_wager_target - scope:contest_loser = { custom_tooltip = wager_lost_tooltip } - scope:contest_winner = { custom_tooltip = wager_valid_tooltip } - } - } - else = { - if = { - limit = { - var:tournament_wager_target = { exists = var:contest_aptitude } - } - if = { - limit = { - scope:activity = { has_current_phase = tournament_phase_horse_race } - } - custom_tooltip = wager_valid_horse_tooltip - } - else = { custom_tooltip = wager_valid_tooltip } - } - else = { - if = { - limit = { - scope:activity = { has_current_phase = tournament_phase_horse_race } - } - custom_tooltip = wager_lost_horse_tooltip - } - else = { custom_tooltip = wager_lost_tooltip } - } - } - } -} - -# Place wager on a contestant -tournament_place_wager_effect = { - $CONTENDER$ = { save_scope_as = wager_target } - set_variable = { - name = tournament_wager_stake - value = tiny_gold_value - } - set_variable = { - name = tournament_wager_payout - value = tournament_wager_payout_value - } - set_variable = { - name = tournament_wager_target - value = scope:wager_target - } - scope:activity = { - add_activity_log_entry = { - key = tournament_placed_wager_log - tags = { wager } - score = 25 - character = root - target = scope:wager_target - - # Effects - root = { remove_short_term_gold = tiny_gold_value } - } - } - if = { - limit = { - scope:activity = { has_current_phase = tournament_phase_horse_race } - } - custom_tooltip = tournament_events.1000.horse_winnings_tt - } - else = { custom_tooltip = tournament_events.1000.winnings_tt } -} - -# Stress impact for betting on someone other than yourself -tournament_bet_on_other_stress_effect = { - if = { - limit = { exists = var:contest_aptitude } - stress_impact = { - arrogant = minor_stress_impact_gain - } - } - stress_impact = { - greedy = minor_stress_impact_gain - profligate = minor_stress_impact_loss - } -} - -# Info on potential effects for breaking islamic gambling laws -tournament_contest_maysir_tooltip_effect = { - if = { - limit = { - religion = religion:islam_religion - scope:activity = { - NOR = { - has_current_phase = tournament_phase_archery - has_current_phase = tournament_phase_horse_race - } - } - } - custom_description = { text = ep2_tournament_maysir_tt } - } -} - -# Effects for muslims breaking islamic gambling laws -tournament_contest_maysir_effect = { - if = { - limit = { - religion = religion:islam_religion - scope:activity = { - NOR = { - has_current_phase = tournament_phase_archery - has_current_phase = tournament_phase_horse_race - } - } - } - custom_description = { text = ep2_tournament_maysir_tt } - add_piety = medium_piety_loss - stress_impact = { - zealous = medium_stress_impact_gain - } - } -} - -############## -### PRIZES ### -############## - -# Create a prize artifact relevant to the current contest type -tournament_contest_generate_prize_effect = { - save_scope_value_as = { - name = contest_type - value = flag:$CONTEST$ - } - hidden_effect = { random_dummy_gender_effect = yes } - scope:activity = { - ### Combined wealth and quality determines tier - # 50-129 Masterwork - # 130-179 Famed - # 180+ Illustrious - save_scope_value_as = { - name = wealth - value = { - value = 0 - # Activity prize options - if = { # Common only - limit = { has_activity_option = { category = tournament_option_prizes option = tournament_prizes_bad } } - add = { 1 24 } - } - else_if = { # Common or Masterwork - often Masterwork - limit = { has_activity_option = { category = tournament_option_prizes option = tournament_prizes_normal } } - add = { 15 64 } - } - else_if = { # Masterwork or Famed - often Masterwork - limit = { has_activity_option = { category = tournament_option_prizes option = tournament_prizes_good } } - add = { 35 89 } - } - else_if = { # Masterwork, Famed, or Illustrious - often Famed - limit = { has_activity_option = { category = tournament_option_prizes option = tournament_prizes_very_good } } - add = { 60 105 } - } - else_if = { # Famed or Illustrious - 50/50 split - limit = { has_activity_option = { category = tournament_option_prizes option = tournament_prizes_splendid } } - add = { 69 111 } - } - } - } - save_scope_value_as = { - name = quality - value = { - value = 0 - # Activity prize options - if = { # Common only - limit = { has_activity_option = { category = tournament_option_prizes option = tournament_prizes_bad } } - add = { 1 24 } - } - else_if = { # Common or Masterwork - often Masterwork - limit = { has_activity_option = { category = tournament_option_prizes option = tournament_prizes_normal } } - add = { 15 64 } - } - else_if = { # Masterwork or Famed - often Masterwork - limit = { has_activity_option = { category = tournament_option_prizes option = tournament_prizes_good } } - add = { 35 89 } - } - else_if = { # Masterwork, Famed, or Illustrious - often Famed - limit = { has_activity_option = { category = tournament_option_prizes option = tournament_prizes_very_good } } - add = { 60 105 } - } - else_if = { # Famed or Illustrious - 50/50 split - limit = { has_activity_option = { category = tournament_option_prizes option = tournament_prizes_splendid } } - add = { 69 111 } - } - } - } - } - random_list = { - 15 = { # Armor - trigger = { - OR = { - scope:contest_type = flag:duel - scope:contest_type = flag:joust - scope:contest_type = flag:melee - } - } - create_artifact_armor_effect = { - OWNER = scope:host - CREATOR = scope:dummy_gender - SET_ARMOR_TYPE = flag:no - } - if = { - limit = { exists = scope:newly_created_artifact } - scope:newly_created_artifact = { set_artifact_name = tournament_prize_armor_name } - } - } - 15 = { # Weapon - trigger = { - OR = { - scope:contest_type = flag:duel - scope:contest_type = flag:joust - scope:contest_type = flag:melee - } - } - create_artifact_weapon_effect = { - OWNER = scope:host - CREATOR = scope:dummy_gender - SET_WEAPON_TYPE = flag:no - } - if = { - limit = { exists = scope:newly_created_artifact } - scope:newly_created_artifact = { set_artifact_name = tournament_prize_weapon_name } - } - } - 15 = { # Bow - trigger = { scope:contest_type = flag:archery } - create_artifact_bow_effect = { - OWNER = scope:host - CREATOR = scope:dummy_gender - SET_BOW_TYPE = flag:no - } - if = { - limit = { exists = scope:newly_created_artifact } - scope:newly_created_artifact = { set_artifact_name = tournament_prize_bow_name } - } - } - 5 = { # Ring - create_artifact_ring_effect = { - OWNER = scope:host - SMITH = scope:dummy_gender - } - if = { - limit = { exists = scope:newly_created_artifact } - scope:newly_created_artifact = { set_artifact_name = tournament_prize_ring_name } - } - } - 5 = { # Necklace - trigger = { - scope:host.culture = { has_cultural_era_or_later = culture_era_early_medieval } - } - if = { - limit = { - scope:$CONTEST$_winner = { has_royal_court = yes } - } - create_artifact_necklace_pedestal_effect = { - OWNER = scope:host - SMITH = scope:dummy_gender - } - } - else = { - create_artifact_necklace_effect = { - OWNER = scope:host - SMITH = scope:dummy_gender - } - } - if = { - limit = { exists = scope:newly_created_artifact } - scope:newly_created_artifact = { set_artifact_name = tournament_prize_necklace_name } - } - } - 5 = { # Brooch - if = { - limit = { - scope:$CONTEST$_winner = { has_royal_court = yes } - } - create_artifact_brooch_pedestal_effect = { - OWNER = scope:host - SMITH = scope:dummy_gender - } - } - else = { - create_artifact_brooch_effect = { - OWNER = scope:host - SMITH = scope:dummy_gender - } - } - if = { - limit = { exists = scope:newly_created_artifact } - scope:newly_created_artifact = { set_artifact_name = tournament_prize_brooch_name } - } - } - 5 = { # Goblet - trigger = { - scope:$CONTEST$_winner = { has_royal_court = yes } - scope:host.culture = { has_cultural_era_or_later = culture_era_early_medieval } - } - create_artifact_goblet_effect = { - OWNER = scope:host - SMITH = scope:dummy_gender - } - if = { - limit = { exists = scope:newly_created_artifact } - scope:newly_created_artifact = { set_artifact_name = tournament_prize_goblet_name } - } - } - 5 = { # Bowl - trigger = { - scope:$CONTEST$_winner = { has_royal_court = yes } - scope:host.culture = { has_cultural_era_or_later = culture_era_early_medieval } - } - create_artifact_bowl_effect = { - OWNER = scope:host - SMITH = scope:dummy_gender - } - if = { - limit = { exists = scope:newly_created_artifact } - scope:newly_created_artifact = { set_artifact_name = tournament_prize_bowl_name } - } - } - 5 = { # Urn - trigger = { - scope:$CONTEST$_winner = { has_royal_court = yes } - scope:host.culture = { has_cultural_era_or_later = culture_era_early_medieval } - } - create_artifact_urn_effect = { - OWNER = scope:host - POTTER = scope:dummy_gender - } - if = { - limit = { exists = scope:newly_created_artifact } - scope:newly_created_artifact = { set_artifact_name = tournament_prize_urn_name } - } - } - 5 = { # Statuette - trigger = { - scope:contest_type = flag:joust - scope:$CONTEST$_winner = { has_royal_court = yes } - scope:host.culture = { has_cultural_era_or_later = culture_era_high_medieval } - } - hidden_effect_new_object = { - # Get artifact quality, wealth, materials, and decorations - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - create_artifact = { - name = tournament_prize_statuette_name - creator = scope:host - description = placeholder # Will be regenerated in the post-creation effects - type = pedestal - visuals = statuette - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - history = { - type = prize_created - recipient = scope:host - } - save_scope_as = newly_created_artifact - } - scope:newly_created_artifact = { - set_artifact_description = artifact_statuette_description - # Add artifact modifiers - add_scaled_artifact_modifier_grandeur_small_effect = yes - add_scaled_artifact_modifier_minor_prestige_effect = yes - if = { - limit = { - OR = { - rarity = famed - rarity = illustrious - } - } - add_scaled_artifact_modifier_majesty_effect = yes - } - } - } - } - 5 = { # Wine Tun - trigger = { - scope:$CONTEST$_winner = { - has_royal_court = yes - drinks_alcohol_trigger = yes - } - scope:host = { - drinks_alcohol_trigger = yes - culture = { has_cultural_era_or_later = culture_era_high_medieval } - } - } - hidden_effect_new_object = { - # Get artifact quality, wealth, materials, and decorations - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - create_artifact = { - name = tournament_prize_tun_barrel_name - creator = scope:host - description = placeholder # Will be regenerated in the post-creation effects - type = tun_barrel - visuals = tun_barrel - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - history = { - type = prize_created - recipient = scope:host - } - save_scope_as = newly_created_artifact - } - scope:newly_created_artifact = { - set_artifact_description = artifact_tun_barrel_description - # Add artifact modifiers - add_scaled_artifact_modifier_grandeur_small_effect = yes - add_scaled_artifact_modifier_minor_prestige_effect = yes - if = { - limit = { - OR = { - rarity = famed - rarity = illustrious - } - } - add_scaled_artifact_modifier_rulership_effect = yes - } - } - } - } - 5 = { # Scepter - trigger = { - scope:host.culture = { has_cultural_era_or_later = culture_era_high_medieval } - } - if = { - limit = { - scope:$CONTEST$_winner = { has_royal_court = yes } - } - hidden_effect_new_object = { - # Get artifact quality, wealth, materials, and decorations - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - create_artifact = { - name = tournament_prize_scepter_name - creator = scope:host - description = placeholder # Will be regenerated in the post-creation effects - type = scepter_pedestal - visuals = scepter_pedestal - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - history = { - type = prize_created - recipient = scope:host - } - save_scope_as = newly_created_artifact - } - scope:newly_created_artifact = { - set_artifact_description = artifact_scepter_description - # Add artifact modifiers - add_scaled_artifact_modifier_minor_prestige_effect = yes - add_scaled_artifact_modifier_grandeur_small_effect = yes - if = { - limit = { - OR = { - rarity = famed - rarity = illustrious - } - } - add_scaled_artifact_modifier_rulership_effect = yes - } - } - } - } - else = { - hidden_effect_new_object = { - # Get artifact quality, wealth, materials, and decorations - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - create_artifact = { - name = tournament_prize_scepter_name - creator = scope:host - description = placeholder # Will be regenerated in the post-creation effects - type = miscellaneous - visuals = regalia - template = regalia_template - modifier = artifact_placeholder_modifier - wealth = scope:wealth - quality = scope:quality - history = { - type = prize_created - recipient = scope:host - } - save_scope_as = newly_created_artifact - } - scope:newly_created_artifact = { - set_artifact_description = artifact_scepter_description - # Add artifact modifiers - add_scaled_artifact_modifier_minor_prestige_effect = yes - add_scaled_artifact_modifier_grandeur_small_effect = yes - if = { - limit = { - OR = { - rarity = famed - rarity = illustrious - } - } - add_scaled_artifact_modifier_rulership_effect = yes - } - } - } - } - } - } - if = { - limit = { exists = scope:newly_created_artifact } - scope:newly_created_artifact = { - if = { - limit = { - rarity = famed - } - random = { - chance = 50 - add_scaled_artifact_modifier_combat_effect = yes - } - } - else_if = { - limit = { - rarity = illustrious - } - add_scaled_artifact_modifier_combat_effect = yes - } - } - scope:$CONTEST$_winner = { - save_scope_as = contest_winner - send_interface_toast = { - type = toast_tournament_contest_reward - title = tournament_contest_reward_toast_title - left_icon = scope:newly_created_artifact - } - } - scope:newly_created_artifact = { - save_scope_as = $CONTEST$_prize - add_to_list = contest_prizes - if = { - limit = { scope:host = scope:contest_winner } - set_artifact_description = tournament_prize_host_desc_$CONTEST$ - } - else = { set_artifact_description = tournament_prize_desc_$CONTEST$ } - set_variable = suppress_artifact_notifications - scope:activity = { - add_activity_log_entry = { - key = tournament_$CONTEST$_prize_log - character = scope:host - target = scope:$CONTEST$_winner - artifact = scope:$CONTEST$_prize - show_in_conclusion = yes - - # EFFECT - scope:$CONTEST$_prize = { - set_owner = { - target = scope:$CONTEST$_winner - history = { - type = prize_awarded - actor = scope:host - recipient = scope:$CONTEST$_winner - } - } - } - } - } - remove_variable = suppress_artifact_notifications - } - } -} - -# Create an armor prize -tournament_contest_armor_prize_effect = { - create_artifact = { - name = tournament_prize_armor_name - creator = scope:host - description = placeholder # Will be regenerated in the post-creation effects - type = armor_$TYPE$ - visuals = armor - modifier = artifact_prowess_1_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - history = { - type = prize_created - recipient = scope:host - } - } -} - -# Create a weapon prize -tournament_contest_weapon_prize_effect = { - create_artifact = { - name = tournament_prize_weapon_name - creator = scope:host - description = placeholder # Will be regenerated in the post-creation effects - visuals = $VISUALS$ - type = $TYPE$ - modifier = artifact_prowess_1_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - history = { - type = prize_created - recipient = scope:host - } - } -} - -# Create a bow prize -tournament_contest_bow_prize_effect = { - create_artifact = { - name = tournament_prize_bow_name - creator = scope:host - description = placeholder # Will be regenerated in the post-creation effects - visuals = $TYPE$ - type = $TYPE$ - modifier = artifact_prowess_1_modifier - wealth = scope:wealth - quality = scope:quality - save_scope_as = newly_created_artifact - history = { - type = prize_created - recipient = scope:host - } - } -} - -tournament_contest_rewards_give_liege_prestige_effect = { - if = { - limit = { tournament_is_knightly_entourage_character_trigger = yes } - # Now, we distribute the sum. - hidden_effect = { - # Save for loc. - save_scope_as = winner - liege = { - # Save for loc. - save_scope_as = winner_liege - # Distribute prestige. - add_prestige = scope:host.$AMOUNT$ - } - } - # And remember to tell everyone about it. - custom_tooltip = $TOOLTIP$ - } -} - -tournament_contest_rewards_split_prize_money_with_liege_effect = { - if = { - limit = { tournament_is_knightly_entourage_character_trigger = yes } - # Grab scopes for loc. - save_scope_as = winner - liege = { save_scope_as = winner_liege } - # If they love you, they give you all the cash. - if = { - limit = { - opinion = { - target = scope:winner_liege - value >= very_high_positive_opinion - } - } - custom_tooltip = tournament_landless_knight_liege_rewards.tt.tournament_gold.knight_loves_liege - pay_short_term_gold = { - target = scope:winner_liege - gold = $AMOUNT$ - } - } - # If they like you, they give you most of it. - if = { - limit = { - opinion = { - target = scope:winner_liege - value >= medium_positive_opinion - } - } - custom_tooltip = tournament_landless_knight_liege_rewards.tt.tournament_gold.knight_likes_liege - pay_short_term_gold = { - target = scope:winner_liege - gold = { - value = $AMOUNT$ - multiply = 0.75 - } - } - } - # If they're neutral to dislike, they split it 50:50. - if = { - limit = { - opinion = { - target = scope:winner_liege - value >= high_negative_opinion - } - } - custom_tooltip = tournament_landless_knight_liege_rewards.tt.tournament_gold.knight_accepts_liege - pay_short_term_gold = { - target = scope:winner_liege - gold = { - value = $AMOUNT$ - multiply = 0.5 - } - } - } - # If they _really_ hate you, they refuse to give anything. - else = { custom_tooltip = tournament_landless_knight_liege_rewards.tt.tournament_gold.knight_hates_liege } - } -} - -tournament_winner_prestige_rewards_effect = { - if = { - limit = { scope:activity.num_phases > 4 } - add_prestige = scope:host.massive_prestige_value - if = { - limit = { exists = dynasty } - dynasty = { add_dynasty_prestige = scope:host.minor_dynasty_prestige_gain } - } - # If appropriate, give the winner's liege a reward too. - tournament_contest_rewards_give_liege_prestige_effect = { - AMOUNT = tournament_first_place_reward_prestige_major_value - TOOLTIP = tournament_landless_knight_liege_rewards.tt.tournament_first_place_reward_prestige_major - } - } - else_if = { - limit = { scope:activity.num_phases > 3 } - add_prestige = scope:host.major_prestige_value - # If appropriate, give the winner's liege a reward too. - tournament_contest_rewards_give_liege_prestige_effect = { - AMOUNT = tournament_first_place_reward_prestige_medium_value - TOOLTIP = tournament_landless_knight_liege_rewards.tt.tournament_first_place_reward_prestige_medium - } - } - else = { - add_prestige = scope:host.medium_prestige_value - # If appropriate, give the winner's liege a reward too. - tournament_contest_rewards_give_liege_prestige_effect = { - AMOUNT = tournament_first_place_reward_prestige_minor_value - TOOLTIP = tournament_landless_knight_liege_rewards.tt.tournament_first_place_reward_prestige_minor - } - } -} - -tournament_winner_gold_rewards_effect = { - if = { - limit = { - scope:activity = { - has_activity_option = { - category = tournament_option_prizes - option = tournament_prizes_good - } - } - } - add_gold = scope:host.medium_gold_value - tournament_contest_rewards_split_prize_money_with_liege_effect = { AMOUNT = medium_gold_value } - } - else_if = { - limit = { - scope:activity = { - has_activity_option = { - category = tournament_option_prizes - option = tournament_prizes_normal - } - } - } - add_gold = scope:host.minor_gold_value - tournament_contest_rewards_split_prize_money_with_liege_effect = { AMOUNT = minor_gold_value } - } - else = { - add_gold = scope:host.tiny_gold_value - tournament_contest_rewards_split_prize_money_with_liege_effect = { AMOUNT = tiny_gold_value } - } -} - -tournament_second_prestige_rewards_effect = { - if = { - limit = { scope:activity.num_phases > 4 } - add_prestige = scope:host.major_prestige_value - # If appropriate, give the winner's liege a reward too. - tournament_contest_rewards_give_liege_prestige_effect = { - AMOUNT = tournament_second_place_reward_prestige_major_value - TOOLTIP = tournament_landless_knight_liege_rewards.tt.tournament_second_place_reward_prestige_major - } - } - else_if = { - limit = { scope:activity.num_phases > 3 } - add_prestige = scope:host.medium_prestige_value - # If appropriate, give the winner's liege a reward too. - tournament_contest_rewards_give_liege_prestige_effect = { - AMOUNT = tournament_second_place_reward_prestige_medium_value - TOOLTIP = tournament_landless_knight_liege_rewards.tt.tournament_second_place_reward_prestige_medium - } - } - else = { - add_prestige = scope:host.minor_prestige_value - # If appropriate, give the winner's liege a reward too. - tournament_contest_rewards_give_liege_prestige_effect = { - AMOUNT = tournament_second_place_reward_prestige_minor_value - TOOLTIP = tournament_landless_knight_liege_rewards.tt.tournament_second_place_reward_prestige_minor - } - } -} - -tournament_second_gold_rewards_effect = { - if = { - limit = { - scope:activity = { - has_activity_option = { - category = tournament_option_prizes - option = tournament_prizes_good - } - } - } - add_gold = scope:host.minor_gold_value - tournament_contest_rewards_split_prize_money_with_liege_effect = { AMOUNT = minor_gold_value } - } - else_if = { - limit = { - scope:activity = { - has_activity_option = { - category = tournament_option_prizes - option = tournament_prizes_normal - } - } - } - add_gold = scope:host.tiny_gold_value - tournament_contest_rewards_split_prize_money_with_liege_effect = { AMOUNT = tiny_gold_value } - } -} - -tournament_third_prestige_rewards_effect = { - if = { - limit = { scope:activity.num_phases > 4 } - add_prestige = scope:host.medium_prestige_value - # If appropriate, give the winner's liege a reward too. - tournament_contest_rewards_give_liege_prestige_effect = { - AMOUNT = tournament_third_place_reward_prestige_major_value - TOOLTIP = tournament_landless_knight_liege_rewards.tt.tournament_third_place_reward_prestige_major - } - } - else_if = { - limit = { scope:activity.num_phases > 3 } - add_prestige = scope:host.minor_prestige_value - # If appropriate, give the winner's liege a reward too. - tournament_contest_rewards_give_liege_prestige_effect = { - AMOUNT = tournament_third_place_reward_prestige_medium_value - TOOLTIP = tournament_landless_knight_liege_rewards.tt.tournament_third_place_reward_prestige_medium - } - } - else = { add_prestige = scope:host.miniscule_prestige_value } -} - -tournament_third_gold_rewards_effect = { - if = { - limit = { - scope:activity = { - has_activity_option = { - category = tournament_option_prizes - option = tournament_prizes_good - } - } - } - add_gold = scope:host.tiny_gold_value - tournament_contest_rewards_split_prize_money_with_liege_effect = { AMOUNT = tiny_gold_value } - } -} - -tournament_contest_rewards_effect = { - scope:activity = { - random_guest_subset = { - name = winner - phase = tournament_phase_$CONTEST$ - save_scope_as = contest_winner - add_to_list = awarded_contestants - scope:activity = { - add_activity_log_entry = { - key = tournament_$CONTEST$_winner_log - tags = { winner contest } - score = 80 - show_in_conclusion = yes - character = scope:contest_winner - - # EFFECT - scope:contest_winner ?= { - # Prestige - tournament_winner_prestige_rewards_effect = yes - # Gold - tournament_winner_gold_rewards_effect = yes - # Trait - tournament_give_trait_effect = { CONTEST = $CONTEST$ } - # Modifier - add_character_modifier = { modifier = tournament_$CONTEST$_winner_modifier years = 5 } - } - } - } - #Memory - create_character_memory = { - type = tournament_won_contest_memory - - participants = { - contestant = this - host = scope:host - } - } - ordered_memory = { - memory_type = tournament_won_contest_memory - order_by = memory_creation_date - set_variable = { - name = contest_type - value = flag:tournament_phase_$CONTEST$ - } - } - add_to_list = awarded_contestants - custom_tooltip = contest_winner_ceremony_tt - } - # Second Place - random_guest_subset = { - name = second_place - phase = tournament_phase_$CONTEST$ - # Prestige - tournament_second_prestige_rewards_effect = yes - # Gold - tournament_second_gold_rewards_effect = yes - # Trait - tournament_give_trait_effect = { CONTEST = $CONTEST$ } - add_character_modifier = { modifier = tournament_$CONTEST$_participant_modifier years = 5 } - add_to_list = awarded_contestants - } - # Third place - random_guest_subset = { - name = third_place - phase = tournament_phase_$CONTEST$ - # Prestige - tournament_third_prestige_rewards_effect = yes - # Gold - tournament_third_gold_rewards_effect = yes - # Trait - tournament_give_trait_effect = { CONTEST = $CONTEST$ } - add_character_modifier = { modifier = tournament_$CONTEST$_participant_modifier years = 5 } - add_to_list = awarded_contestants - } - # Other competitors - every_guest_subset = { - name = qualified - phase = tournament_phase_$CONTEST$ - custom = contest_individual_losers_tt - limit = { - NOT = { is_in_list = awarded_contestants } - } - tournament_give_trait_effect = { CONTEST = $CONTEST$ } - add_character_modifier = { modifier = tournament_$CONTEST$_participant_modifier years = 5 } - } - } -} - -tournament_team_winner_prestige_rewards_effect = { - if = { - limit = { scope:activity.num_phases > 4 } - add_prestige = scope:host.major_prestige_value - # If appropriate, give the winner's liege a reward too. - tournament_contest_rewards_give_liege_prestige_effect = { - AMOUNT = tournament_team_winner_reward_prestige_major_value - TOOLTIP = tournament_landless_knight_liege_rewards.tt.tournament_team_winner_reward_prestige_major - } - } - else_if = { - limit = { scope:activity.num_phases > 3 } - add_prestige = scope:host.medium_prestige_value - # If appropriate, give the winner's liege a reward too. - tournament_contest_rewards_give_liege_prestige_effect = { - AMOUNT = tournament_team_winner_reward_prestige_medium_value - TOOLTIP = tournament_landless_knight_liege_rewards.tt.tournament_team_winner_reward_prestige_medium - } - } - else = { - add_prestige = scope:host.minor_prestige_value - # If appropriate, give the winner's liege a reward too. - tournament_contest_rewards_give_liege_prestige_effect = { - AMOUNT = tournament_team_winner_reward_prestige_minor_value - TOOLTIP = tournament_landless_knight_liege_rewards.tt.tournament_team_winner_reward_prestige_minor - } - } -} - -tournament_team_winner_gold_rewards_effect = { - if = { - limit = { - scope:activity = { - has_activity_option = { - category = tournament_option_prizes - option = tournament_prizes_good - } - } - } - add_gold = scope:host.minor_gold_value - tournament_contest_rewards_split_prize_money_with_liege_effect = { AMOUNT = minor_gold_value } - } - else_if = { - limit = { - scope:activity = { - has_activity_option = { - category = tournament_option_prizes - option = tournament_prizes_normal - } - } - } - add_gold = scope:host.tiny_gold_value - tournament_contest_rewards_split_prize_money_with_liege_effect = { AMOUNT = tiny_gold_value } - } -} - -tournament_team_loser_prestige_rewards_effect = { - if = { - limit = { scope:activity.num_phases > 4 } - add_prestige = scope:host.medium_prestige_value - # If appropriate, give the winner's liege a reward too. - tournament_contest_rewards_give_liege_prestige_effect = { - AMOUNT = tournament_team_loser_reward_prestige_major_value - TOOLTIP = tournament_landless_knight_liege_rewards.tt.tournament_team_loser_reward_prestige_major - } - } - else_if = { - limit = { scope:activity.num_phases > 3 } - add_prestige = scope:host.minor_prestige_value - # If appropriate, give the winner's liege a reward too. - tournament_contest_rewards_give_liege_prestige_effect = { - AMOUNT = tournament_team_loser_reward_prestige_medium_value - TOOLTIP = tournament_landless_knight_liege_rewards.tt.tournament_team_loser_reward_prestige_medium - } - } - else = { add_prestige = scope:host.miniscule_prestige_value } -} - -tournament_contest_team_rewards_effect = { - scope:activity = { - every_guest_subset = { - name = winner - phase = tournament_phase_$CONTEST$ - custom = contest_team_winners_tt - # Prestige - tournament_team_winner_prestige_rewards_effect = yes - # Gold - tournament_team_winner_gold_rewards_effect = yes - # Trait - tournament_give_trait_effect = { CONTEST = $CONTEST$ } - # Modifier - add_character_modifier = { modifier = tournament_$CONTEST$_winner_modifier years = 5 } - # Memory - create_character_memory = { - type = tournament_won_contest_memory - - participants = { - contestant = this - host = scope:host - } - } - ordered_memory = { - memory_type = tournament_won_contest_memory - order_by = memory_creation_date - set_variable = { - name = contest_type - value = flag:tournament_phase_$CONTEST$ - } - } - add_to_list = contest_winners - } - random_guest_subset = { - name = winner - phase = tournament_phase_$CONTEST$ - limit = { - scope:activity.var:melee_winner ?= this - is_alive = yes - } - alternative_limit = { is_alive = yes } - weight = { - base = 1 - tournament_team_captain_modifier = yes - } - save_scope_as = contest_winner - custom_tooltip = contest_winner_ceremony_tt - } - # Losers - every_guest_subset = { - name = second_place - phase = tournament_phase_$CONTEST$ - custom = contest_team_losers_tt - # Prestige - tournament_team_loser_prestige_rewards_effect = yes - # Trait - tournament_give_trait_effect = { CONTEST = $CONTEST$ } - # Modifier - add_character_modifier = { modifier = tournament_$CONTEST$_participant_modifier years = 5 } - add_to_list = contest_losers - } - } -} - -################### -### PAS D'ARMES ### -################### - -# Create token trophy taken from non-martial, e.g. scarf - -# Token -create_artifact_pas_darmes_token_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - select_local_animal_effect = { TYPE = any } # Save scope to limit possible animals: any/big/small/dangerous/harmless/prowling - save_scope_as = owner - } - $WINNER$ = { save_scope_as = winner } - hidden_effect_new_object = { - # Get artifact quality, wealth, and materials - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - if = { #If we have set the location we use it for the materials - limit = { exists = scope:location } - scope:location = { add_to_list = artifact_material_sources } - } - scope:winner = { - # Create the artifact - create_artifact = { - name = artifact_pas_darmes_token_name - creator = scope:owner - description = placeholder - visuals = small_box - type = pas_darmes_token - modifier = artifact_monthly_prestige_add_1_modifier - wealth = scope:wealth - quality = scope:quality - max_durability = 5 - save_scope_as = newly_created_artifact - history = { - #type = pas_darmes_yielded - type = given - location = scope:location - actor = scope:owner - recipient = scope:winner - } - } - } - scope:newly_created_artifact = { - set_variable = { - name = token_owner - value = scope:owner - } - set_artifact_feature_group = decoration_pattern - set_artifact_feature_group = generic_material_cloth - set_artifact_description = artifact_pas_darmes_token_description - switch = { - trigger = rarity - illustrious = { add_artifact_modifier = artifact_monthly_prestige_add_4_modifier } - famed = { add_artifact_modifier = artifact_monthly_prestige_add_3_modifier } - masterwork = { add_artifact_modifier = artifact_monthly_prestige_add_2_modifier } - common = { add_artifact_modifier = artifact_monthly_prestige_add_1_modifier } - } - add_scaled_artifact_modifier_attractiveness_effect = yes - set_variable = { - name = quality - value = scope:quality - } - set_variable = { - name = wealth - value = scope:wealth - } - } - scope:owner = { remove_variable = animal_type } - } -} - -# Create spurs trophy taken from victory -create_artifact_pas_darmes_spurs_effect = { - # Get the character the artifact is being made for. - $WINNER$ = { - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - save_scope_as = winner - } - $LOSER$ = { save_scope_as = owner } - hidden_effect_new_object = { - # Get artifact quality, wealth, and materials - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - if = { #If we have set the location we use it for the materials - limit = { exists = scope:location } - scope:location = { add_to_list = artifact_material_sources } - } - scope:winner = { - # Create the artifact - create_artifact = { - name = artifact_pas_darmes_spurs_name - creator = scope:owner - description = placeholder - visuals = small_box - type = pas_darmes_spurs - modifier = artifact_monthly_prestige_add_1_modifier - wealth = scope:wealth - quality = scope:quality - max_durability = 30 - save_scope_as = newly_created_artifact - history = { - #type = pas_darmes_won - type = given - location = scope:location - actor = scope:owner - recipient = scope:winner - } - } - } - scope:newly_created_artifact = { - set_variable = { - name = token_owner - value = scope:owner - } - get_artifact_feature_references_effect = yes - set_artifact_description = artifact_pas_darmes_spurs_description - switch = { - trigger = rarity - illustrious = { add_artifact_modifier = artifact_monthly_prestige_add_4_modifier } - famed = { add_artifact_modifier = artifact_monthly_prestige_add_3_modifier } - masterwork = { add_artifact_modifier = artifact_monthly_prestige_add_2_modifier } - common = { add_artifact_modifier = artifact_monthly_prestige_add_1_modifier } - } - add_scaled_artifact_modifier_attractiveness_effect = yes - add_scaled_artifact_modifier_combat_effect = yes - set_variable = { - name = quality - value = scope:quality - } - set_variable = { - name = wealth - value = scope:wealth - } - } - } -} - -# Create favor given to favorite contestant, e.g. handkerchief -create_artifact_tournament_favor_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - save_scope_as = owner - } - $RECIPIENT$ = { save_scope_as = recipient } - hidden_effect_new_object = { - # Get artifact quality, wealth, and materials - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - scope:activity.activity_location = { add_to_list = artifact_material_sources } - scope:recipient = { - # Create the artifact - create_artifact = { - name = artifact_tournament_favor_name - creator = scope:owner - description = placeholder - visuals = small_box - type = tournament_favor - modifier = artifact_monthly_prestige_add_1_modifier - wealth = scope:wealth - quality = scope:quality - max_durability = 10 - save_scope_as = newly_created_artifact - history = { - type = given - location = scope:activity.activity_location - recipient = scope:recipient - } - } - } - scope:newly_created_artifact = { - flag_as_trash_artifact = yes - set_variable = { - name = favor_giver - value = scope:owner - } - get_artifact_feature_references_effect = yes - set_artifact_description = artifact_tournament_favor_description - switch = { - trigger = rarity - illustrious = { add_artifact_modifier = artifact_monthly_prestige_add_4_modifier } - famed = { add_artifact_modifier = artifact_monthly_prestige_add_3_modifier } - masterwork = { add_artifact_modifier = artifact_monthly_prestige_add_2_modifier } - common = { add_artifact_modifier = artifact_monthly_prestige_add_1_modifier } - } - add_scaled_artifact_modifier_attractiveness_effect = yes - } - } -} - -################## -### HORSE RACE ### -################## - -# Fetch a randomized horse name -tournament_horse_race_fetch_horse_effect = { - save_temporary_scope_as = horse_owner - if = { - limit = { - OR = { - NOT = { exists = var:contest_horse_race_name } - NOT = { exists = var:contest_horse_race_gender } - } - } - hidden_effect = { - while = { - limit = { - OR = { - NOT = { exists = var:contest_horse_race_name } - # Stop multiple horses with same name - scope:activity = { - any_guest_subset = { - name = contestant - exists = var:contest_horse_race_name - this != scope:horse_owner - var:contest_horse_race_name = scope:horse_owner.var:contest_horse_race_name - } - } - } - } - random_list = { - ## FAITH - # BUDDHISM - 300 = { # Kanthaka - Siddhartha's - trigger = { religion = religion:buddhism_religion } - set_variable = { name = contest_horse_race_name value = flag:kanthaka } - } - # GODS/SAINTS - 150 = { - trigger = { - NOT = { - religion = { is_in_family = rf_abrahamic } - } - } - modifier = { - factor = 2 - faith = { has_doctrine = unreformed_faith_doctrine } - } - random_list = { - 5 = { set_variable = { name = contest_horse_race_name value = flag:faith_fate_god } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:faith_knowledge_god } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:faith_night_god } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:faith_trickster_god } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:faith_war_god } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:faith_water_god } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:faith_wealth_god } } - } - } - # HINDUISM - 300 = { - trigger = { religion = religion:hinduism_religion } - random_list = { - 5 = { # Dadhi-krā - Dawn - set_variable = { name = contest_horse_race_name value = flag:dadhi_kra } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { # Devadatta - Vishnu's - set_variable = { name = contest_horse_race_name value = flag:devadatta } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { # Dyaus Pita - Sky Father - set_variable = { name = contest_horse_race_name value = flag:dyauspitar } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { # Keshi - Kalki's - set_variable = { name = contest_horse_race_name value = flag:keshi } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { # Uhchaihshravas - Horse King - set_variable = { name = contest_horse_race_name value = flag:uchchaihshravas } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - } - } - # ISLAM - 300 = { - trigger = { religion = religion:islam_religion } - random_list = { - 5 = { # Abbayan - Muhammad's mares - set_variable = { name = contest_horse_race_name value = flag:abbayan } - set_variable = { name = contest_horse_race_gender value = flag:female } - } - 5 = { # al-Murtajiz - Muhammad's stallions - set_variable = { name = contest_horse_race_name value = flag:al_murtajiz } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { # al-Sakb - Muhammad's stallions - set_variable = { name = contest_horse_race_name value = flag:al_sakb } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { # al-Ya'sub - Muhammad's stallions - set_variable = { name = contest_horse_race_name value = flag:al_yasub } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { set_variable = { name = contest_horse_race_name value = flag:buraq } } # Buraq - Islam - 5 = { # Habdan - Muhammad's mares - set_variable = { name = contest_horse_race_name value = flag:hadban } - set_variable = { name = contest_horse_race_gender value = flag:female } - } - 5 = { # Haizum - Gabriel's - set_variable = { name = contest_horse_race_name value = flag:haizum } - set_variable = { name = contest_horse_race_gender value = flag:female } - } - 5 = { # Hamdani - Muhammad's mares - set_variable = { name = contest_horse_race_name value = flag:hamdani } - set_variable = { name = contest_horse_race_gender value = flag:female } - } - 5 = { # Kuhaylan - Muhammad's mares - set_variable = { name = contest_horse_race_name value = flag:kuhaylan } - set_variable = { name = contest_horse_race_gender value = flag:female } - } - 5 = { # Lihaf - Muhammad's stallions - set_variable = { name = contest_horse_race_name value = flag:lihaf } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { # Lizaz - Muhammad's stallions - set_variable = { name = contest_horse_race_name value = flag:lizaz } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { # Seqlawi - Muhammad's mares - set_variable = { name = contest_horse_race_name value = flag:seqlawi } - set_variable = { name = contest_horse_race_gender value = flag:female } - } - 5 = { # Zuljanah - Husayn ibn Ali's - set_variable = { name = contest_horse_race_name value = flag:zuljanah } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - } - } - # NORSE - 300 = { - trigger = { religion = religion:germanic_religion } - random_list = { - 5 = { # Alsviðr - Sól's - set_variable = { name = contest_horse_race_name value = flag:alsvidr } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { # Árvakr - Sól's - set_variable = { name = contest_horse_race_name value = flag:arvakr } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { # Falhófnir - Yggdrasil - set_variable = { name = contest_horse_race_name value = flag:falhofnir } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { # Glad - Yggdrasil - set_variable = { name = contest_horse_race_name value = flag:glad } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { # Glær - Yggdrasil - set_variable = { name = contest_horse_race_name value = flag:glaer } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { # Gulltoppr - Heimdallr's - set_variable = { name = contest_horse_race_name value = flag:gulltoppr } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { # Hófvarpnir - Gná's - set_variable = { name = contest_horse_race_name value = flag:hofvarpnir } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { # Hrímfaxi - Nótt's - set_variable = { name = contest_horse_race_name value = flag:hrimfaxi } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { # # Skinfaxi - Dagur's - set_variable = { name = contest_horse_race_name value = flag:skinfaxi } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { # Sleipnir - Odin's - set_variable = { name = contest_horse_race_name value = flag:sleipnir } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { # Svaðilfari - Sleipnir father - set_variable = { name = contest_horse_race_name value = flag:svadilfari } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - } - } - ## CULTURE - # ARABIC - 300 = { - trigger = { - culture = { - any_parent_culture_or_above = { has_cultural_pillar = heritage_arabic } - } - } - random_list = { - 5 = { # al-Dinari - Arabian horse father - set_variable = { name = contest_horse_race_name value = flag:al_dinari } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { # al-Hujays - Arabian horse father - set_variable = { name = contest_horse_race_name value = flag:al_hujays } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { # al-Ward - Arabian horse father - set_variable = { name = contest_horse_race_name value = flag:al_ward } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { # A'waj - Arabian horse father - set_variable = { name = contest_horse_race_name value = flag:awaj } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { # Dhi al-'Uqqal - Arabian horse father - set_variable = { name = contest_horse_race_name value = flag:dhi_al_uqqal } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { # Sabal - Arabian horse mother - set_variable = { name = contest_horse_race_name value = flag:sabal } - set_variable = { name = contest_horse_race_gender value = flag:female } - } - 5 = { # Zad al-Rakib - Arabian horse father - set_variable = { name = contest_horse_race_name value = flag:zad_al_rakib } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - } - } - # BRYTHONIC - 300 = { - trigger = { - culture = { - any_parent_culture_or_above = { has_cultural_pillar = heritage_brythonic } - } - } - random_list = { - 5 = { # Gringolet - Sir Gawain's - set_variable = { name = contest_horse_race_name value = flag:gringolet } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { # Hengroen - King Arthur's - set_variable = { name = contest_horse_race_name value = flag:hengroen } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { # Llamrei - King Arthur's - set_variable = { name = contest_horse_race_name value = flag:llamrei } - set_variable = { name = contest_horse_race_gender value = flag:female } - } - 5 = { # Morvarc’h - Breton - set_variable = { name = contest_horse_race_name value = flag:morvarch } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - } - } - # CHINESE - 300 = { - trigger = { - culture = { - any_parent_culture_or_above = { has_cultural_pillar = heritage_chinese } - } - } - random_list = { - 5 = { # Red Hare/Chi Tu - Lü Bu's - set_variable = { name = contest_horse_race_name value = flag:red_hare } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { set_variable = { name = contest_horse_race_name value = flag:typhoon } } # Typhoon - } - } - # FRANKISH - 300 = { - trigger = { - culture = { - any_parent_culture_or_above = { has_cultural_pillar = heritage_frankish } - } - } - random_list = { - 5 = { # Baucent - Guillaume d'Orange's - set_variable = { name = contest_horse_race_name value = flag:baucent } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { # Bayard - Chansons de gestes - set_variable = { name = contest_horse_race_name value = flag:bayard } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { # Sorel - Gerin's - set_variable = { name = contest_horse_race_name value = flag:sorel } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { # Tencendur - Charlemagne's - set_variable = { name = contest_horse_race_name value = flag:tencendur } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { # Veillantif - Roland's - set_variable = { name = contest_horse_race_name value = flag:veillantif } - set_variable = { name = contest_horse_race_gender value = flag:female } - } - } - } - # GRECO-ROMAN - 300 = { - trigger = { - culture = { - any_parent_culture_or_above = { - OR = { - has_cultural_pillar = heritage_byzantine - has_cultural_pillar = heritage_latin - } - } - } - } - random_list = { - 5 = { # Arion - Iliad - set_variable = { name = contest_horse_race_name value = flag:arion } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { # Asturcus - Caesar's - set_variable = { name = contest_horse_race_name value = flag:asturcus } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { # Balius - Achilles' - set_variable = { name = contest_horse_race_name value = flag:balius } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { # Boreas - North Wind - set_variable = { name = contest_horse_race_name value = flag:boreas } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { # Bucephalus - Megas Alexandros' - set_variable = { name = contest_horse_race_name value = flag:bucephalus } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { # Caesar - Emperor - set_variable = { name = contest_horse_race_name value = flag:caesar } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { # Chiron - Centaur - set_variable = { name = contest_horse_race_name value = flag:chiron } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { # Epona - goddess - set_variable = { name = contest_horse_race_name value = flag:epona } - set_variable = { name = contest_horse_race_gender value = flag:female } - } - 5 = { # Equuleus - Hippe - set_variable = { name = contest_horse_race_name value = flag:equuleus } - set_variable = { name = contest_horse_race_gender value = flag:female } - } - 5 = { # Hippocampus - Poseidon's - set_variable = { name = contest_horse_race_name value = flag:hippocampus } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { set_variable = { name = contest_horse_race_name value = flag:incitatus } } # Incitatus - Caligula's - 5 = { set_variable = { name = contest_horse_race_name value = flag:notus } } # Notus - South Wind - 5 = { # Pedasos - Achilles' - set_variable = { name = contest_horse_race_name value = flag:pedasos } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { # Pegasus - Bellerophon's - set_variable = { name = contest_horse_race_name value = flag:pegasus } - set_variable = { name = contest_horse_race_gender value = flag:female } - } - 5 = { # Rhaebus - Mezentius' - set_variable = { name = contest_horse_race_name value = flag:rhaebus } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { set_variable = { name = contest_horse_race_name value = flag:seianian } } # Seianian - Gnaeus Seius' - 5 = { set_variable = { name = contest_horse_race_name value = flag:sterope } } # Sterope - Helios' - 5 = { # Xanthos - Achilles' - set_variable = { name = contest_horse_race_name value = flag:xanthos } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { set_variable = { name = contest_horse_race_name value = flag:zephryus } } # Zephyrus - West Wind - } - } - # GOIDELIC - 300 = { - trigger = { - culture = { - any_parent_culture_or_above = { has_cultural_pillar = heritage_goidelic } - } - } - random_list = { - 5 = { # Dub Sainglend - Cúchulainn's - set_variable = { name = contest_horse_race_name value = flag:dub_sainglend } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { # Embarr - Lugh Lamh-fada's - set_variable = { name = contest_horse_race_name value = flag:enbarr } - set_variable = { name = contest_horse_race_gender value = flag:female } - } - 5 = { # Kelpie - mythological - set_variable = { name = contest_horse_race_name value = flag:kelpie } - set_variable = { name = contest_horse_race_gender value = flag:female } - } - 5 = { # Liath Macha - Cúchulainn's - set_variable = { name = contest_horse_race_name value = flag:liath_macha } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - } - } - # IBERIAN - 300 = { - trigger = { - culture = { has_cultural_pillar = language_iberian } - } - random_list = { - 5 = { # Altivo - El Dorado - set_variable = { name = contest_horse_race_name value = flag:altivo } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { # Babieca - El Cid's - set_variable = { name = contest_horse_race_name value = flag:babieca } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { # Rocinante - Don Quixote's - set_variable = { name = contest_horse_race_name value = flag:rocinante } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { - set_variable = { name = contest_horse_race_name value = flag:tornado } - } - } - } - # INDO-ARYAN - 300 = { - trigger = { - culture = { has_cultural_pillar = heritage_indo_aryan } - } - random_list = { - 5 = { # Pratap's - set_variable = { name = contest_horse_race_name value = flag:atak } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { # Pratap's - set_variable = { name = contest_horse_race_name value = flag:chetak } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { # Ranjit's - set_variable = { name = contest_horse_race_name value = flag:laili } - set_variable = { name = contest_horse_race_gender value = flag:female } - } - 5 = { # Pratap's - set_variable = { name = contest_horse_race_name value = flag:natak } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - } - } - # MONGOLIC - 300 = { - trigger = { - culture = { - any_parent_culture_or_above = { has_cultural_pillar = heritage_mongolic } - } - } - random_list = { - 5 = { set_variable = { name = contest_horse_race_name value = flag:aranjagaan } } # Aranjagaan - Jangar's - 5 = { set_variable = { name = contest_horse_race_name value = flag:oyomaa } } # Oyomaa - Jangar's - 5 = { set_variable = { name = contest_horse_race_name value = flag:tolin_khul } } # Tolin Khul - folk song - } - } - # PERSIAN - 300 = { - trigger = { - culture = { - any_parent_culture_or_above = { has_cultural_pillar = heritage_iranian } - } - } - random_list = { - 5 = { # Rahbar (Leader) - Akbar's - set_variable = { name = contest_horse_race_name value = flag:rahbar } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { # Rakhsh - Rostam's - set_variable = { name = contest_horse_race_name value = flag:rakhsh } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - } - } - # SCANDINAVIAN - 300 = { - trigger = { - culture = { - any_parent_culture_or_above = { has_cultural_pillar = heritage_north_germanic } - } - } - random_list = { - 5 = { - # Grani - Sigurd's - set_variable = { name = contest_horse_race_name value = flag:grani } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - } - } - # SLAVIC - 300 = { - trigger = { - culture = { - any_parent_culture_or_above = { has_cultural_pillar = heritage_east_slavic } - } - } - random_list = { - 5 = { # Sivko-Burko - Ivan the Fool's - set_variable = { name = contest_horse_race_name value = flag:sivko_burko } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { - set_variable = { name = contest_horse_race_name value = flag:sivko } - } - 5 = { - set_variable = { name = contest_horse_race_name value = flag:burko } - } - } - } - # TURKIC - 300 = { - trigger = { - culture = { - any_parent_culture_or_above = { has_cultural_pillar = heritage_turkic } - } - } - random_list = { - 5 = { # G'irot - Koroghlu's - set_variable = { name = contest_horse_race_name value = flag:girot } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { # Tulpar - mythological - set_variable = { name = contest_horse_race_name value = flag:tulpar } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - } - } - ## COLOR/NOUN - 300 = { - modifier = { # Mongol's prefer color/marking names - factor = 2 - culture = { has_cultural_pillar = heritage_mongolic } - } - random_list = { - # COLOR - 5 = { set_variable = { name = contest_horse_race_name value = flag:bay } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:black } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:blue } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:brindle } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:buckskin } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:chestnut } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:cloud } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:cream } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:crimson } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:dapple } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:dawn } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:dun } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:dusk } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:flaxen } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:flame } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:frost } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:golden } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:gray } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:leopard } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:milk } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:night } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:pearl } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:red } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:roan } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:rose } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:ruby } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:scarlet } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:shade } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:shadow } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:shining } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:silk } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:silver } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:smoke } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:snow } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:sorrel } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:sun } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:tawny } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:yellow } } - } - random = { - chance = 50 - random_list = { - 5 = { set_variable = { name = contest_horse_race_name_2 value = flag:blaze } } - 5 = { set_variable = { name = contest_horse_race_name_2 value = flag:coat } } - 5 = { set_variable = { name = contest_horse_race_name_2 value = flag:dash } } - 5 = { set_variable = { name = contest_horse_race_name_2 value = flag:face } } - 5 = { set_variable = { name = contest_horse_race_name_2 value = flag:feet } } - 5 = { set_variable = { name = contest_horse_race_name_2 value = flag:foot } } - 5 = { set_variable = { name = contest_horse_race_name_2 value = flag:hair } } - 5 = { set_variable = { name = contest_horse_race_name_2 value = flag:hide } } - 5 = { set_variable = { name = contest_horse_race_name_2 value = flag:hoof } } - 5 = { set_variable = { name = contest_horse_race_name_2 value = flag:hooves } } - 5 = { set_variable = { name = contest_horse_race_name_2 value = flag:mane } } - 5 = { set_variable = { name = contest_horse_race_name_2 value = flag:mottle } } - 5 = { set_variable = { name = contest_horse_race_name_2 value = flag:socks } } - 5 = { set_variable = { name = contest_horse_race_name_2 value = flag:speckles } } - 5 = { set_variable = { name = contest_horse_race_name_2 value = flag:spots } } - 5 = { set_variable = { name = contest_horse_race_name_2 value = flag:star } } - 5 = { set_variable = { name = contest_horse_race_name_2 value = flag:steed } } - 5 = { set_variable = { name = contest_horse_race_name_2 value = flag:stockings } } - 5 = { set_variable = { name = contest_horse_race_name_2 value = flag:streak } } - 5 = { set_variable = { name = contest_horse_race_name_2 value = flag:stripe } } - 5 = { set_variable = { name = contest_horse_race_name_2 value = flag:tail } } - } - } - } - # ADJECTIVE/NOUN - 300 = { - # ADJECTIVE - random_list = { - 5 = { set_variable = { name = contest_horse_race_name value = flag:brave } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:brisk } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:fleet } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:long } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:speed } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:storm } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:swift } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:thunder } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:wave } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:wind } } - } - random = { - chance = 50 - random_list = { - 5 = { set_variable = { name = contest_horse_race_name_2 value = flag:bolt } } - 5 = { set_variable = { name = contest_horse_race_name_2 value = flag:bound } } - 5 = { set_variable = { name = contest_horse_race_name_2 value = flag:dart } } - 5 = { set_variable = { name = contest_horse_race_name_2 value = flag:dash } } - 5 = { set_variable = { name = contest_horse_race_name_2 value = flag:feet } } - 5 = { set_variable = { name = contest_horse_race_name_2 value = flag:foot } } - 5 = { set_variable = { name = contest_horse_race_name_2 value = flag:hocks } } - 5 = { set_variable = { name = contest_horse_race_name_2 value = flag:hoof } } - 5 = { set_variable = { name = contest_horse_race_name_2 value = flag:hooves } } - 5 = { set_variable = { name = contest_horse_race_name_2 value = flag:rush } } - 5 = { set_variable = { name = contest_horse_race_name_2 value = flag:sprint } } - 5 = { set_variable = { name = contest_horse_race_name_2 value = flag:steed } } - 5 = { set_variable = { name = contest_horse_race_name_2 value = flag:step } } - 5 = { set_variable = { name = contest_horse_race_name_2 value = flag:stride } } - 5 = { set_variable = { name = contest_horse_race_name_2 value = flag:streak } } - } - } - } - ## NOUN/LONG ADJECTIVE - 300 = { - random_list = { - 25 = { - trigger = { - faith = { has_doctrine = tenet_monasticism } - } - set_variable = { name = contest_horse_race_name value = flag:abbess } - set_variable = { name = contest_horse_race_gender value = flag:female } - } - 25 = { - trigger = { - faith = { has_doctrine = tenet_monasticism } - } - set_variable = { name = contest_horse_race_name value = flag:abbot } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 25 = { set_variable = { name = contest_horse_race_name value = flag:adamant } } - 25 = { set_variable = { name = contest_horse_race_name value = flag:agile } } - 25 = { set_variable = { name = contest_horse_race_name value = flag:charger } } - 25 = { set_variable = { name = contest_horse_race_name value = flag:chaser } } - 25 = { - modifier = { - add = 75 - government_has_flag = government_is_tribal - } - set_variable = { name = contest_horse_race_name value = flag:chieftain } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 25 = { - modifier = { - add = 75 - government_has_flag = government_is_tribal - } - set_variable = { name = contest_horse_race_name value = flag:chieftess } - set_variable = { name = contest_horse_race_gender value = flag:female } - } - 25 = { set_variable = { name = contest_horse_race_name value = flag:cyclone } } - 25 = { set_variable = { name = contest_horse_race_name value = flag:deluge } } - 25 = { set_variable = { name = contest_horse_race_name value = flag:downpour } } - 25 = { set_variable = { name = contest_horse_race_name value = flag:endurance } } - 25 = { set_variable = { name = contest_horse_race_name value = flag:faithful } } - 25 = { set_variable = { name = contest_horse_race_name value = flag:flash } } - 25 = { set_variable = { name = contest_horse_race_name value = flag:forthright } } - 25 = { set_variable = { name = contest_horse_race_name value = flag:fury } } - 25 = { set_variable = { name = contest_horse_race_name value = flag:gale } } - 25 = { set_variable = { name = contest_horse_race_name value = flag:hare } } - 25 = { set_variable = { name = contest_horse_race_name value = flag:haste } } - 25 = { set_variable = { name = contest_horse_race_name value = flag:intrepid } } - 25 = { - trigger = { - NOT = { government_has_flag = government_is_tribal } - } - set_variable = { name = contest_horse_race_name value = flag:lady } - set_variable = { name = contest_horse_race_gender value = flag:female } - } - 25 = { set_variable = { name = contest_horse_race_name value = flag:leader } } - 25 = { set_variable = { name = contest_horse_race_name value = flag:lightning } } - 25 = { - trigger = { - NOT = { government_has_flag = government_is_tribal } - } - set_variable = { name = contest_horse_race_name value = flag:lord } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 25 = { set_variable = { name = contest_horse_race_name value = flag:lucky } } - 25 = { set_variable = { name = contest_horse_race_name value = flag:majesty } } - 25 = { set_variable = { name = contest_horse_race_name value = flag:mule } } - 25 = { set_variable = { name = contest_horse_race_name value = flag:plucky } } - 25 = { set_variable = { name = contest_horse_race_name value = flag:prancer } } - 25 = { set_variable = { name = contest_horse_race_name value = flag:pride } } - 25 = { - trigger = { - NOT = { government_has_flag = government_is_tribal } - } - set_variable = { name = contest_horse_race_name value = flag:prince } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 25 = { - trigger = { - NOT = { government_has_flag = government_is_tribal } - } - set_variable = { name = contest_horse_race_name value = flag:princess } - set_variable = { name = contest_horse_race_gender value = flag:female } - } - 25 = { set_variable = { name = contest_horse_race_name value = flag:rapid } } - 25 = { set_variable = { name = contest_horse_race_name value = flag:resolute } } - 25 = { - trigger = { - NOT = { government_has_flag = government_is_tribal } - } - set_variable = { name = contest_horse_race_name value = flag:seneschal } - } - 25 = { set_variable = { name = contest_horse_race_name value = flag:snowflake } } - 25 = { set_variable = { name = contest_horse_race_name value = flag:spirit } } - 25 = { set_variable = { name = contest_horse_race_name value = flag:steadfast } } - 25 = { set_variable = { name = contest_horse_race_name value = flag:sunlight } } - 25 = { set_variable = { name = contest_horse_race_name value = flag:tenacity } } - 25 = { set_variable = { name = contest_horse_race_name value = flag:tempest } } - 25 = { set_variable = { name = contest_horse_race_name value = flag:thunderclap } } - 25 = { set_variable = { name = contest_horse_race_name value = flag:unwavering } } - 25 = { set_variable = { name = contest_horse_race_name value = flag:whirlwind } } - 25 = { set_variable = { name = contest_horse_race_name value = flag:winner } } - # GENDER - 25 = { - trigger = { - NOT = { government_has_flag = government_is_tribal } - } - random_list = { - 5 = { - trigger = { - OR = { - religion = religion:germanic_religion - culture = { has_cultural_pillar = heritage_north_germanic } - } - faith = { has_doctrine = tenet_warmonger } - } - set_variable = { name = contest_horse_race_name value = flag:berserker } - } - 5 = { - trigger = { - faith = { has_doctrine_parameter = great_holy_wars_active } - } - set_variable = { name = contest_horse_race_name value = flag:crusader } - } - 5 = { - set_variable = { name = contest_horse_race_name value = flag:commander } - } - 5 = { - set_variable = { name = contest_horse_race_name value = flag:marshal } - } - 5 = { - set_variable = { name = contest_horse_race_name value = flag:varangian } - } - } - random_list = { - 5 = { - trigger = { - culture = { - OR = { - has_cultural_pillar = martial_custom_female_only - has_cultural_pillar = martial_custom_equal - } - } - } - set_variable = { name = contest_horse_race_gender value = flag:female } - } - 5 = { - trigger = { - culture = { - OR = { - has_cultural_pillar = martial_custom_male_only - has_cultural_pillar = martial_custom_equal - } - } - } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - } - } - } - } - ## FETCH - 300 = { - random_list = { - 100 = { - trigger = { is_playable_character = yes } - random_list = { - 25 = { set_variable = { name = contest_horse_race_name value = flag:capital_name } } - 25 = { set_variable = { name = contest_horse_race_name value = flag:capital_empire } } - 25 = { set_variable = { name = contest_horse_race_name value = flag:capital_pride } } - 25 = { set_variable = { name = contest_horse_race_name value = flag:capital_county } } - } - } - 25 = { set_variable = { name = contest_horse_race_name value = flag:culture_knight } } - 25 = { set_variable = { name = contest_horse_race_name value = flag:culture_lightning } } - 25 = { set_variable = { name = contest_horse_race_name value = flag:culture_thunder } } - 25 = { set_variable = { name = contest_horse_race_name value = flag:faith_adherent } } - 25 = { set_variable = { name = contest_horse_race_name value = flag:faith_afterlife } } - 25 = { - trigger = { - faith = { - OR = { - has_doctrine = doctrine_clerical_gender_female_only - has_doctrine = doctrine_clerical_gender_either - } - } - } - set_variable = { name = contest_horse_race_name value = flag:faith_bishop_female } - set_variable = { name = contest_horse_race_gender value = flag:female } - } - 25 = { - trigger = { - faith = { - OR = { - has_doctrine = doctrine_clerical_gender_male_only - has_doctrine = doctrine_clerical_gender_either - } - } - } - set_variable = { name = contest_horse_race_name value = flag:faith_bishop_male } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 25 = { - trigger = { - faith = { has_doctrine_parameter = great_holy_wars_active } - } - set_variable = { name = contest_horse_race_name value = flag:faith_crusade } - } - 25 = { - set_variable = { name = contest_horse_race_name value = flag:faith_devotee_female } - set_variable = { name = contest_horse_race_gender value = flag:female } - } - 25 = { - set_variable = { name = contest_horse_race_name value = flag:faith_devotee_male } - - } - 25 = { set_variable = { name = contest_horse_race_name value = flag:faith_divine_realm } } - 10 = { - trigger = { - faith = { - NOT = { has_doctrine = doctrine_no_head } - } - } - set_variable = { name = contest_horse_race_name value = flag:faith_pope } - if = { - limit = { - faith = { has_doctrine = doctrine_clerical_gender_male_only } - } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - else_if = { - limit = { - faith = { has_doctrine = doctrine_clerical_gender_female_only } - } - set_variable = { name = contest_horse_race_gender value = flag:female } - } - } - 25 = { - set_variable = { name = contest_horse_race_name value = flag:faith_priest_female } - set_variable = { name = contest_horse_race_gender value = flag:female } - } - 25 = { - set_variable = { name = contest_horse_race_name value = flag:faith_priest_male } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 25 = { set_variable = { name = contest_horse_race_name value = flag:faith_symbol } } - 25 = { - trigger = { - this != root.top_liege - } - set_variable = { name = contest_horse_race_name value = flag:liege_title } - } - 25 = { - trigger = { - this != root.top_liege - } - set_variable = { name = contest_horse_race_name value = flag:liege_title_name } - } - 25 = { - trigger = { is_playable_character = yes } - set_variable = { name = contest_horse_race_name value = flag:owner_title } - } - 25 = { - trigger = { is_playable_character = yes } - set_variable = { name = contest_horse_race_name value = flag:title_name } - } - ## TRAITS - 25 = { - trigger = { - NOT = { - faith = { has_doctrine_parameter = forbidden_from_pilgrimage } - } - } - set_variable = { name = contest_horse_race_name value = flag:pilgrim } - } - } - } - ## EASTER EGGS - 50 = { - random_list = { - 5 = { # Arkle - trigger = { title:c_sutherland.holder.top_liege = root.top_liege } - set_variable = { name = contest_horse_race_name value = flag:arkle } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { - trigger = { - culture = { has_cultural_pillar = language_french } - } - modifier = { - factor = 2 - has_trait = drunkard - } - modifier = { - factor = 2 - has_trait = arrogant - } - modifier = { - factor = 2 - has_trait = depressed - } - set_variable = { name = contest_horse_race_name value = flag:beaujacques } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 1 = { set_variable = { name = contest_horse_race_name value = flag:big_dog } } - 1 = { set_variable = { name = contest_horse_race_name value = flag:big_honse } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:binky } } - 5 = { # Black Beauty - set_variable = { name = contest_horse_race_name value = flag:black_beauty } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { - set_variable = { name = contest_horse_race_name value = flag:boxer } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { - set_variable = { name = contest_horse_race_name value = flag:brego } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { # Secretariat - set_variable = { name = contest_horse_race_name value = flag:chancery } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { set_variable = { name = contest_horse_race_name value = flag:clip_clop } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:cloppy } } - 5 = { # Wellington's - trigger = { - culture = { has_cultural_pillar = heritage_west_germanic } - } - set_variable = { name = contest_horse_race_name value = flag:copenhagen } - set_variable = { name = contest_horse_race_gender value = flag:female } - } - 5 = { - set_variable = { name = contest_horse_race_name value = flag:donkey } - set_variable = { name = contest_horse_race_gender value = flag:female } - } - 5 = { # Desert Orchid - set_variable = { name = contest_horse_race_name value = flag:desert_orchid } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { - set_variable = { name = contest_horse_race_name value = flag:dustkicker } - } - 5 = { # Enable - set_variable = { name = contest_horse_race_name value = flag:facilitate } - set_variable = { name = contest_horse_race_gender value = flag:female } - } - 5 = { # Frankel - trigger = { - culture = { has_cultural_pillar = language_high_german } - } - set_variable = { name = contest_horse_race_name value = flag:frenkel } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { # Man o' War - set_variable = { name = contest_horse_race_name value = flag:galley } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { set_variable = { name = contest_horse_race_name value = flag:glitterhoof } } - 1 = { set_variable = { name = contest_horse_race_name value = flag:gymer } } - 1 = { set_variable = { name = contest_horse_race_name value = flag:hoarse } } - 1 = { set_variable = { name = contest_horse_race_name value = flag:honse } } - 1 = { set_variable = { name = contest_horse_race_name value = flag:horsey } } - 1 = { set_variable = { name = contest_horse_race_name value = flag:jerry } } - 5 = { - trigger = { religion = religion:christianity_religion } - set_variable = { name = contest_horse_race_name value = flag:joseph } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { - trigger = { - culture = { - OR = { - has_cultural_pillar = heritage_chinese - has_cultural_pillar = heritage_mongolic - } - } - } - set_variable = { name = contest_horse_race_name value = flag:khan } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { - trigger = { - culture = { has_cultural_pillar = heritage_north_germanic } - } - set_variable = { name = contest_horse_race_name value = flag:kjekk } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 1 = { set_variable = { name = contest_horse_race_name value = flag:lord_pepper_iii } } - 5 = { # Napoleon's - trigger = { - culture = { - OR = { - has_cultural_pillar = heritage_frankish - has_cultural_pillar = heritage_latin - } - } - } - set_variable = { name = contest_horse_race_name value = flag:marengo } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { - set_variable = { name = contest_horse_race_name value = flag:marshal_neigh } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { - trigger = { - culture = { - OR = { - has_cultural_pillar = heritage_byzantine - has_cultural_pillar = heritage_latin - } - } - } - set_variable = { name = contest_horse_race_name value = flag:maximus } - } - 5 = { # Seabiscuit - set_variable = { name = contest_horse_race_name value = flag:oceancracker } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { set_variable = { name = contest_horse_race_name value = flag:pebbles } } - 5 = { - trigger = { - culture = { - any_parent_culture_or_above = { has_cultural_pillar = language_anglic } - any_parent_culture_or_above = { has_cultural_pillar = language_brythonic } - } - } - set_variable = { name = contest_horse_race_name value = flag:pringle } - } - 5 = { # Galileo - trigger = { - culture = { - OR = { - has_cultural_pillar = heritage_arabic - has_cultural_pillar = heritage_byzantine - has_cultural_pillar = heritage_latin - } - } - } - set_variable = { name = contest_horse_race_name value = flag:ptolemy } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { # Red Rum - trigger = { - NOT = { - faith = { trait_is_sin = drunkard } - } - } - set_variable = { name = contest_horse_race_name value = flag:red_wine } - set_variable = { name = contest_horse_race_gender value = flag:male } - } - 5 = { set_variable = { name = contest_horse_race_name value = flag:roach } } - 1 = { set_variable = { name = contest_horse_race_name value = flag:sir_whinny } } - 1 = { set_variable = { name = contest_horse_race_name value = flag:sir_horsington } } - 5 = { set_variable = { name = contest_horse_race_name value = flag:torrent } } - } - } - } - # GENDER - if = { - limit = { - NOT = { exists = var:contest_horse_race_gender } - } - random_list = { - 5 = { set_variable = { name = contest_horse_race_gender value = flag:female } } - 5 = { set_variable = { name = contest_horse_race_gender value = flag:male } } - } - } - } - } - } -} - -############################ -### RECURRING CHARACTERS ### -############################ - -try_to_create_recurring_character_effect = { - hidden_effect = { - if = { - limit = { - # We want exactly one player. - calc_true_if = { - amount = 1 - is_ai = no - $CHARACTER$ = { is_ai = no } - } - # With only a few recurring characters per tourney. - ## Currently, set this to 1 to try and make them more generally memorable. - ### If we start messing with event weight multipliers based on this, then we might want to increase it, so split things up a bit more. - num_of_relation_activity_recurrer < 1 - NOT = { has_relation_activity_recurrer = $CHARACTER$ } - } - set_relation_activity_recurrer = $CHARACTER$ - # Debug stuff. - ## Disabled; decomment it if you want to see who gets grabbed. - #if = { - #limit = { is_ai = no } - #add_to_variable_list = { - #name = recurring_characters - #target = $CHARACTER$ - #} - #} - #else = { - #save_temporary_scope_as = ai_temp - #$CHARACTER$ = { - #add_to_variable_list = { - #name = recurring_characters - #target = scope:ai_temp - #} - #} - #} - } - } -} - -clean_up_recurring_characters_effect = { - hidden_effect = { - save_temporary_scope_as = player_temp - every_relation = { - type = activity_recurrer - remove_relation_activity_recurrer = scope:player_temp - } - } -} - -# Award XP in relevant tourney trait tracks -disburse_xp_and_liege_prestige_effect = { - # XP - if = { - limit = { has_trait = tourney_participant } - # Bow - if = { - limit = { exists = scope:archery_winner } - add_trait_xp = { - trait = tourney_participant - track = bow - value = { - value = 0 - if = { - limit = { scope:archery_winner ?= this } - add = tournament_hastiludes_xp_gain_massive_value - } - else = { add = tournament_hastiludes_xp_gain_medium_value } - } - } - } - # Horse - if = { - limit = { - OR = { - exists = scope:melee_winner - exists = scope:joust_winner - exists = scope:horse_race_winner - } - } - add_trait_xp = { - trait = tourney_participant - track = horse - value = { - value = 0 - if = { # Melee - limit = { - scope:activity = { - any_guest_subset = { name = qualified phase = tournament_phase_melee this = root } - } - } - if = { - limit = { - scope:activity = { - any_guest_subset = { name = winner phase = tournament_phase_melee this = root } - } - } - add = tournament_hastiludes_xp_gain_medium_value - } - else = { add = tournament_hastiludes_xp_gain_minor_value } - } - if = { # Joust - limit = { - scope:activity = { - any_guest_subset = { name = qualified phase = tournament_phase_joust this = root - } - } - } - if = { - limit = { scope:joust_winner ?= this } - add = tournament_hastiludes_xp_gain_massive_value - } - else = { add = tournament_hastiludes_xp_gain_medium_value } - } - if = { # Horse Race - limit = { - scope:activity = { - any_guest_subset = { name = qualified phase = tournament_phase_horse_race this = root } - } - } - if = { - limit = { scope:horse_race_winner ?= this } - add = tournament_hastiludes_xp_gain_massive_value - } - else = { add = tournament_hastiludes_xp_gain_medium_value } - } - } - } - } - # Foot - if = { - limit = { - OR = { - exists = scope:melee_winner - exists = scope:duel_winner - exists = scope:wrestling_winner - } - } - add_trait_xp = { - trait = tourney_participant - track = foot - value = { - value = 0 - if = { # Melee - limit = { - scope:activity = { - any_guest_subset = { name = qualified phase = tournament_phase_melee this = root } - } - } - if = { - limit = { - scope:activity = { - any_guest_subset = { name = winner phase = tournament_phase_melee this = root } - } - } - add = tournament_hastiludes_xp_gain_medium_value - } - else = { add = tournament_hastiludes_xp_gain_minor_value } - } - if = { # Duel - limit = { - scope:activity = { - any_guest_subset = { name = qualified phase = tournament_phase_duel this = root } - } - } - if = { - limit = { scope:duel_winner ?= this } - add = tournament_hastiludes_xp_gain_massive_value - } - else = { add = tournament_hastiludes_xp_gain_medium_value } - } - if = { # Wrestling - limit = { - scope:activity = { - any_guest_subset = { name = qualified phase = tournament_phase_wrestling this = root } - } - } - if = { - limit = { scope:wrestling_winner ?= this } - add = tournament_hastiludes_xp_gain_massive_value - } - else = { add = tournament_hastiludes_xp_gain_medium_value } - } - } - } - } - # Wit - if = { - limit = { - OR = { - exists = scope:board_game_winner - exists = scope:recital_winner - } - } - add_trait_xp = { - trait = tourney_participant - track = wit - value = { - value = 0 - if = { # Board Game - limit = { - scope:activity = { - any_guest_subset = { name = qualified phase = tournament_phase_board_game this = root } - } - } - if = { - limit = { scope:board_game_winner ?= this } - add = tournament_hastiludes_xp_gain_massive_value - } - else = { add = tournament_hastiludes_xp_gain_medium_value } - } - if = { # Recital - limit = { - scope:activity = { - any_guest_subset = { name = qualified phase = tournament_phase_recital this = root } - } - } - if = { - limit = { scope:recital_winner ?= this } - add = tournament_hastiludes_xp_gain_massive_value - } - else = { add = tournament_hastiludes_xp_gain_medium_value } - } - } - } - } - # Poets - if = { - limit = { - exists = scope:recital_winner - } - if = { - limit = { - has_trait = lifestyle_poet - } - add_trait_xp = { - trait = lifestyle_poet - value = { - value = 0 - if = { - limit = { - scope:activity = { - any_guest_subset = { name = qualified phase = tournament_phase_recital this = root } - } - } - if = { - limit = { scope:recital_winner ?= this } - add = tournament_hastiludes_xp_gain_massive_value - } - else = { add = tournament_hastiludes_xp_gain_medium_value } - } - } - } - } - } - } - # Liege Prestige - if = { - limit = { - OR = { - AND = { - exists = scope:archery_winner - OR = { - root.court_position:champion_court_position ?= scope:archery_winner - scope:archery_winner = { is_knight_of = root } - } - } - AND = { - exists = scope:recital_winner - OR = { - root.court_position:champion_court_position ?= scope:recital_winner - scope:recital_winner = { is_knight_of = root } - } - } - AND = { - exists = scope:joust_winner - OR = { - root.court_position:champion_court_position ?= scope:joust_winner - scope:joust_winner = { is_knight_of = root } - } - } - AND = { - exists = scope:wrestling_winner - OR = { - root.court_position:champion_court_position ?= scope:wrestling_winner - scope:wrestling_winner = { is_knight_of = root } - } - } - AND = { - exists = scope:duel_winner - OR = { - root.court_position:champion_court_position ?= scope:duel_winner - scope:duel_winner = { is_knight_of = root } - } - } - AND = { - exists = scope:board_game_winner - OR = { - root.court_position:champion_court_position ?= scope:board_game_winner - scope:board_game_winner = { is_knight_of = root } - } - } - AND = { - exists = scope:horse_race_winner - OR = { - root.court_position:champion_court_position ?= scope:horse_race_winner - scope:horse_race_winner = { is_knight_of = root } - } - } - AND = { - exists = scope:melee_winner - OR = { - root.court_position:champion_court_position ?= scope:melee_winner - scope:melee_winner = { is_knight_of = root } - } - } - } - } - add_prestige = { - value = 0 - if = { - limit = { exists = scope:archery_winner } - if = { - limit = { root.court_position:champion_court_position ?= scope:archery_winner } - add = medium_prestige_value - } - else_if = { - limit = { scope:archery_winner = { is_knight_of = root } } - add = minor_prestige_value - } - } - else_if = { - limit = { exists = scope:recital_winner } - if = { - limit = { root.court_position:champion_court_position ?= scope:recital_winner } - add = medium_prestige_value - } - else_if = { - limit = { scope:recital_winner = { is_knight_of = root } } - add = minor_prestige_value - } - } - else_if = { - limit = { exists = scope:joust_winner } - if = { - limit = { root.court_position:champion_court_position ?= scope:joust_winner } - add = medium_prestige_value - } - else_if = { - limit = { scope:joust_winner = { is_knight_of = root } } - add = minor_prestige_value - } - } - else_if = { - limit = { exists = scope:wrestling_winner } - if = { - limit = { root.court_position:champion_court_position ?= scope:wrestling_winner } - add = medium_prestige_value - } - else_if = { - limit = { scope:wrestling_winner = { is_knight_of = root } } - add = minor_prestige_value - } - } - else_if = { - limit = { exists = scope:duel_winner } - if = { - limit = { root.court_position:champion_court_position ?= scope:duel_winner } - add = medium_prestige_value - } - else_if = { - limit = { scope:duel_winner = { is_knight_of = root } } - add = minor_prestige_value - } - } - else_if = { - limit = { exists = scope:board_game_winner } - if = { - limit = { root.court_position:champion_court_position ?= scope:board_game_winner } - add = medium_prestige_value - } - else_if = { - limit = { scope:board_game_winner = { is_knight_of = root } } - add = minor_prestige_value - } - } - else_if = { - limit = { exists = scope:horse_race_winner } - if = { - limit = { root.court_position:champion_court_position ?= scope:horse_race_winner } - add = medium_prestige_value - } - else_if = { - limit = { scope:horse_race_winner = { is_knight_of = root } } - add = minor_prestige_value - } - } - else_if = { - limit = { exists = scope:melee_winner } - if = { - limit = { root.court_position:champion_court_position ?= scope:melee_winner } - add = minor_prestige_value - } - else_if = { - limit = { scope:melee_winner = { is_knight_of = root } } - add = miniscule_prestige_value - } - } - } - } -} - -########################### -### PROGRESS TO VICTORY ### -########################### - -# Update PtV and aptitude, used on passive pulse to keep values up to date before contest begins -set_passive_contest_aptitude_and_progress_effect = { - if = { - limit = { - OR = { - AND = { - activity_is_valid_tournament_contestant = yes - activity_tournament_race_contest_trigger = no - } - AND = { - is_playable_character = yes - activity_tournament_race_contest_trigger = yes - } - } - } - if = { # Foot - limit = { - scope:activity = { - OR = { - has_current_phase = tournament_phase_melee - has_current_phase = tournament_phase_duel - } - } - } - set_variable = { name = contest_aptitude value = contest_foot_aptitude_value } - } - else_if = { # Horse - limit = { - scope:activity = { has_current_phase = tournament_phase_joust } - } - set_variable = { name = contest_aptitude value = contest_horse_aptitude_value } - } - else_if = { # Pugilism - limit = { - scope:activity = { has_current_phase = tournament_phase_wrestling } - } - set_variable = { name = contest_aptitude value = contest_pugilism_aptitude_value } - } - else_if = { # Archery - limit = { - scope:activity = { has_current_phase = tournament_phase_archery } - } - set_variable = { name = contest_aptitude value = contest_archery_aptitude_value } - } - else_if = { # Recital - limit = { - scope:activity = { has_current_phase = tournament_phase_recital } - } - set_variable = { name = contest_aptitude value = contest_recital_aptitude_value } - } - else_if = { # Board Game - limit = { - scope:activity = { has_current_phase = tournament_phase_board_game } - } - set_variable = { name = contest_aptitude value = contest_board_game_aptitude_value } - } - else_if = { # Horse Race - limit = { - scope:activity = { has_current_phase = tournament_phase_horse_race } - } - set_variable = { name = contest_aptitude value = contest_horse_race_aptitude_value } - } - - #Have you taken the Prowess Training decision? - if = { - limit = { - has_character_modifier = tournament_training_decision_modifier - activity_tournament_prowess_contest_trigger = yes - } - set_variable = { - name = progress_to_victory - value = { - value = progress_to_victory_passive_contestant_value - add = 20 - } - } - } - set_variable = { - name = progress_to_victory - value = progress_to_victory_passive_contestant_value - } - } - else = { remove_variable = progress_to_victory } -} - -############## -### SHARED ### -############## - -# Save champion, if they exist -tournament_contest_champion_scope_effect = { - if = { - limit = { employs_court_position = champion_court_position } - random_court_position_holder = { - limit = { has_court_position = champion_court_position } - save_scope_as = contest_champion - } - } -} - -# Randomly wound attendees effect -contest_wound_attendees_effect = { - custom_tooltip = { - text = contest_wound_attendees_effect - while = { - count = 12 - random_guest_subset = { - name = contestant - limit = { - NOT = { is_in_list = wounded_attendees } - OR = { - this = root - is_ai = yes - } - } - add_to_list = wounded_attendees - increase_wounds_no_death_effect = { REASON = fight } - } - } - } -} - -# Randomly wound attendees unrelated to root effect -contest_wound_non_root_attendees_effect = { - custom_tooltip = { - text = contest_wound_non_root_attendees_effect - while = { - count = 9 - random_guest_subset = { - name = contestant - limit = { - NOR = { - is_in_list = wounded_attendees - is_ai = no - this = root - is_courtier_of = root - is_knight_of = root - } - } - add_to_list = wounded_attendees - increase_wounds_no_death_effect = { REASON = fight } - } - } - } -} - -# Randomly wound combatants unrelated to root effect -tournament_wound_non_root_combatants_effect = { - custom_tooltip = { - text = tournament_wound_non_root_combatants_effect - while = { - count = 4 - random_guest_subset = { - name = contestant - limit = { - is_healthy = yes - highest_held_title_tier < tier_county - NOR = { - is_in_list = wounded_attendees - is_ai = no - this = root - is_courtier_of = root - is_knight_of = root - is_close_or_extended_family_of = root - reverse_opinion = { - target = root - value >= 25 - } - } - } - add_to_list = wounded_combatants - increase_wounds_no_death_effect = { REASON = fight } - } - } - } -} - -# Tournament reward tooltips -tournament_display_rewards_effect = { - show_as_tooltip = { - switch = { - trigger = scope:contest_complete - flag:joust = { - tournament_contest_rewards_effect = { CONTEST = joust } - } - flag:wrestling = { - tournament_contest_rewards_effect = { CONTEST = wrestling } - } - flag:duel = { - tournament_contest_rewards_effect = { CONTEST = duel } - } - flag:board_game = { - tournament_contest_rewards_effect = { CONTEST = board_game } - } - flag:melee = { - tournament_contest_team_rewards_effect = { CONTEST = melee } - } - flag:horse_race = { - tournament_contest_rewards_effect = { CONTEST = horse_race } - } - flag:archery = { - tournament_contest_rewards_effect = { CONTEST = archery } - } - flag:recital = { - tournament_contest_rewards_effect = { CONTEST = recital } - } - } - } -} - -# Notify of arrival of intent target at tournament -activity_intent_target_arrival_notification_effect = { - if = { - limit = { - NOT = { - capital_province ?= scope:activity.activity_location - } - NAND = { - is_playable_character = no - exists = liege.capital_province - liege.capital_province = scope:activity.activity_location - } - save_temporary_scope_as = intent_target_temp - scope:activity = { - any_attending_character = { - intent_target ?= scope:intent_target_temp - } - } - } - save_scope_as = intent_targetee - scope:activity = { - every_attending_character = { - limit = { - intent_target ?= scope:intent_targetee - } - save_scope_as = intent_targeter - send_interface_message = { - title = activity_intent_target_arrival_title - left_icon = scope:intent_targetee - custom_tooltip = activity_intent_target_arrival_desc - } - } - } - } -} - -# Add contestant as qualified and notify -add_tournament_contest_contestant_effect = { - save_scope_as = new_list_member - # Add to subset - scope:activity = { - add_to_guest_subset = { - name = qualified - target = scope:new_list_member - phase = tournament_phase_$CONTEST$ - } - } - # Update stats - set_variable = { - name = contest_aptitude - value = contest_$SKILL$_aptitude_value - } - set_variable = { - name = progress_to_victory - value = $PTV$ - } - # Toast - if = { - limit = { - scope:activity = { has_current_phase = tournament_phase_horse_race } - } - send_interface_toast = { - title = tournament_qualify_title - left_icon = scope:new_list_member - custom_tooltip = tournament_qualify_race_desc - play_sound_effect = "event:/SFX/Events/Themes/sfx_event_theme_type_martial" - } - } - else = { - send_interface_toast = { - title = tournament_qualify_title - left_icon = scope:new_list_member - custom_tooltip = tournament_qualify_desc - add_prestige = minor_prestige_gain - play_sound_effect = "event:/SFX/Events/Themes/sfx_event_theme_type_martial" - } - if = { - limit = { - OR = { - this = scope:activity.special_guest:special_guest_champion - has_court_position = champion_court_position - is_knight = yes - } - } - liege = { - add_to_list = qualification_liege_list - add_to_variable_list = { - name = qualified_knights - target = scope:new_list_member - } - } - } - } -} - -# Notify of failure to qualify for a contest -tournament_contest_qualification_failure_effect = { - if = { - limit = { exists = var:contest_aptitude } - remove_variable = contest_aptitude - } - if = { - limit = { exists = var:progress_to_victory } - remove_variable = progress_to_victory - } - # RACE - if = { - limit = { - scope:activity = { has_current_phase = tournament_phase_horse_race } - } - send_interface_toast = { - title = tournament_qualify_fail_title - custom_tooltip = tournament_qualify_fail_race_desc - } - } - # VERSUS/TURN - else = { - send_interface_toast = { - title = tournament_qualify_fail_title - left_icon = root - custom_tooltip = tournament_qualify_fail_desc - } - if = { - limit = { - OR = { - this = scope:activity.special_guest:special_guest_champion - has_court_position = champion_court_position - } - liege = { - is_ai = no - is_participant_in_activity = scope:activity - } - } - save_scope_as = contest_champion - liege = { - send_interface_toast = { - title = tournament_champion_qualify_fail_title - left_icon = scope:contest_champion - custom_tooltip = tournament_champion_qualify_fail_desc - } - } - } - } -} - -# Save a random contestant on the opposite team -contest_team_save_enemy_member_effect = { - scope:activity = { - if = { - limit = { - any_guest_subset_current_phase = { - name = team_alpha - this = root - } - } - random_guest_subset_current_phase = { - name = team_beta - limit = { - is_alive = yes - is_ai = yes - } - save_scope_as = $SCOPE$ - } - } - else = { - random_guest_subset_current_phase = { - name = team_beta - limit = { - is_alive = yes - is_ai = yes - } - save_scope_as = $SCOPE$ - } - } - } -} - -# Hand out Tourney Participant trait -tournament_give_trait_effect = { - if = { - limit = { - save_temporary_scope_as = new_list_member - scope:activity ?= { - any_guest_subset = { - name = qualified - phase = tournament_phase_$CONTEST$ - this = scope:new_list_member - } - } - NOT = { has_trait = tourney_participant } - } - hidden_effect = { - random = { - chance = 50 - modifier = { - is_ai = no - add = 50 - } - modifier = { - scope:contest_winner ?= this - add = 100 - } - modifier = { - scope:activity ?= { - any_guest_subset = { - name = winner - phase = tournament_phase_$CONTEST$ - this = root - } - } - add = 50 - } - modifier = { - scope:activity ?= { - any_guest_subset = { - name = second_place - phase = tournament_phase_$CONTEST$ - this = root - } - } - add = 30 - } - modifier = { - scope:activity ?= { - any_guest_subset = { - name = third_place - phase = tournament_phase_$CONTEST$ - this = root - } - } - add = 15 - } - add_trait = tourney_participant - } - } - if = { - limit = { has_trait = tourney_participant } - show_as_tooltip = { add_trait = tourney_participant } - } - } -} - -# Replace qualified contestant for another -tournament_contest_replace_qualifier_effect = { - $NEW_CONTESTANT$ = { save_scope_as = new_contestant } - $OLD_CONTESTANT$ = { save_scope_as = old_contestant } - remove_from_guest_subset = { - name = qualified - target = scope:old_contestant - phase = tournament_phase_$CONTEST$ - } - add_to_guest_subset = { - name = spectator - target = scope:old_contestant - phase = tournament_phase_$CONTEST$ - } - add_to_guest_subset = { - name = qualified - target = scope:new_contestant - phase = tournament_phase_$CONTEST$ - } - scope:old_contestant = { - remove_variable = contest_aptitude - remove_variable = progress_to_victory - save_scope_as = disqualify_target - } - scope:new_contestant = { - tournament_set_current_aptitude_variable_effect = yes - set_variable = { - name = progress_to_victory - value = progress_to_victory_active_contestant_value - } - } - scope:activity = { - every_attending_character = { - limit = { is_ai = no } - send_interface_toast = { - title = tournament_qualifier_replaced_toast - left_icon = scope:old_contestant - right_icon = scope:new_contestant - custom_description = { - text = tournament_contest_replaced_tt - subject = scope:new_contestant # REPLACER - object = scope:old_contestant # REPLACED - } - } - } - } -} - -# Withdraw character from a contest they have qualified from -tournament_contest_withdraw_effect = { - $CHARACTER$ = { save_scope_as = withdrawer } - scope:withdrawer = { remove_variable = contest_aptitude } - custom_description = { - text = tournament_contest_withdraw_tt - subject = scope:withdrawer - } -} - -# Knock qualified contestant out of a contest -tournament_contest_knocked_out_effect = { - $CHARACTER$ = { save_scope_as = withdrawer } - scope:withdrawer = { - remove_variable = contest_aptitude - involved_activity = { - remove_from_guest_subset = { - name = qualified - target = scope:withdrawer - } - } - } - custom_description = { - text = tournament_contest_knocked_tt - subject = scope:withdrawer - } -} - -# List correct wound status tooltip -tournament_wounded_or_dead_tooltip_effect = { - show_as_tooltip = { - if = { - limit = { is_alive = no } - death = { - death_reason = death_contest_$CONTEST$_accident - killer = scope:contest_winner - } - } - else_if = { - limit = { has_character_flag = agency_wound } - switch = { - trigger = has_trait - wounded_1 = { add_trait_force_tooltip = wounded_1 } - wounded_2 = { add_trait_force_tooltip = wounded_2 } - wounded_3 = { add_trait_force_tooltip = wounded_3 } - } - } - } -} - -# Potentially make wandering knight appear in tournament -chance_for_knight_appearance_effect = { - if = { - limit = { - NOT = { exists = scope:activity.var:tournament_commenced } - scope:activity = { - any_attending_character = { - count < 240 #Max is 250, we are leaving some open space. - } - } - } - random = { - chance = 50 - every_realm_county = { - if = { - limit = { - save_temporary_scope_as = potential_county - NOT = { - any_in_list = { - list = pool_counties - duchy = scope:potential_county.duchy - } - } - } - add_to_temporary_list = pool_counties - } - } - every_in_list = { - list = pool_counties - save_temporary_scope_as = pool_county - every_pool_character = { - province = scope:pool_county.title_province - limit = { - prowess >= 12 #make sure this matches the tooltip of the decision and all the 12s below - guest_knight_candidate_trigger = { HOST = scope:host } - is_available = yes - NOT = { exists = involved_activity } - } - add_to_temporary_list = potential_knights - } - } - #Randomize a good knight from the realm pool characters - random_in_list = { - list = potential_knights - limit = { is_alive = yes } - weight = { - base = 1 - modifier = { - add = { - value = prowess - subtract = 12 - multiply = 5 - } - } - } - save_scope_as = knight - } - #If no one was found, make one - if = { - limit = { - NOT = { exists = scope:knight } - } - create_character = { - location = root.capital_province - template = pool_repopulate_prowess - prowess = { 12 15 } - save_scope_as = knight - } - } - #Cultural Traditions - if = { - limit = { - scope:host.culture = { has_cultural_parameter = better_knights_from_decision } - } - hidden_effect = { - scope:knight = { - blademaster_lifestyle_rank_up_effect = yes - knight_increase_prowess_chance_effect = yes - knight_increase_prowess_chance_effect = yes - } - } - } - #Add knight to court - scope:host = { - send_interface_message = { - type = msg_tournament_knight_arrives - title = tournament_knight_appeared_title - left_icon = scope:knight - scope:knight = { - hidden_effect = { - add_to_activity = scope:activity - set_location = scope:activity.activity_location - set_passive_contest_aptitude_and_progress_effect = yes - } - } - custom_tooltip = tournament_knight_appeared_tt - } - } - } - } -} - -# Set aptitude variable based on the current contest type -tournament_set_current_aptitude_variable_effect = { - set_variable = { - name = 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 } - } - } -} - -# Replace qualified contestant with another -tournament_replace_qualifier_scope_effect = { - # For events replacing a contestant - scope:activity = { - if = { - limit = { - NOT = { exists = var:contest_aptitude } - } - random_guest_subset_current_phase = { - name = qualified - limit = { - is_ai = yes - NOT = { - liege ?= { is_ai = no } - liege.court_position:champion_court_position ?= this - } - NOT = { root.court_position:champion_court_position ?= this } - NOT = { - any_relation = { - type = lover - type = friend - type = rival - is_participant_in_activity = scope:activity - is_ai = no - } - } - } - weight = { - base = 1 - modifier = { - add = 50 - var:contest_aptitude < root.contest_current_contest_aptitude_value - } - modifier = { # Try to exclude mysterious strangers - add = -100 - exists = var:mysterious_stranger_origin - } - modifier = { # Try to exclude own knights - add = -25 - OR = { - is_knight_of = root - liege ?= { is_ai = no } - } - } - } - save_scope_as = replaced_contestant - } - if = { - limit = { - any_guest_subset_current_phase = { - name = qualified - has_relation_rival = root - } - } - random_guest_subset_current_phase = { - name = qualified - limit = { has_relation_rival = root } - save_scope_as = rival_contestant - } - } - } - } - if = { - limit = { exists = var:contest_aptitude } - scope:activity = { - ordered_guest_subset_current_phase = { - name = contestant - limit = { - save_temporary_scope_as = new_list_member - NOR = { - scope:activity = { - any_guest_subset_current_phase = { - name = qualified - this = scope:new_list_member - } - } - } - activity_is_valid_tournament_contestant = yes - } - order_by = contest_current_contest_aptitude_value - save_scope_as = new_contestant - } - } - } - else = { save_scope_as = new_contestant } -} - -# Save relevant scopes for start of contest events -tournament_contest_start_portrait_effect = { - if = { - limit = { - intent_target ?= { is_alive = yes } - } - intent_target = { save_scope_as = intent_scope } - } - tournament_contest_champion_scope_effect = yes - if = { - limit = { exists = scope:marriage_prize } - scope:marriage_prize = { save_scope_as = portrait_scope } - } - else_if = { - limit = { - exists = scope:mysterious_stranger - NAND = { - exists = scope:versus_contestant - scope:versus_contestant = scope:mysterious_stranger - } - } - scope:mysterious_stranger = { save_scope_as = portrait_scope } - } - else_if = { - limit = { exists = scope:contest_champion } - scope:contest_champion = { save_scope_as = portrait_scope } - } - scope:activity = { - ordered_guest_subset_current_phase = { - name = qualified - limit = { - NAND = { exists = scope:contest_summary_1 this = scope:contest_summary_1 } - NAND = { exists = scope:contest_summary_2 this = scope:contest_summary_2 } - NAND = { exists = scope:contest_summary_3 this = scope:contest_summary_3 } - NAND = { exists = scope:contest_summary_4 this = scope:contest_summary_4 } - NAND = { exists = scope:contest_summary_5 this = scope:contest_summary_5 } - NAND = { exists = scope:contest_summary_6 this = scope:contest_summary_6 } - NAND = { exists = scope:contest_summary_7 this = scope:contest_summary_7 } - } - max = 8 - check_range_bounds = no - order_by = primary_title.tier - if = { - limit = { NOT = { exists = scope:contest_summary_1 } } - save_scope_as = contest_summary_1 - } - else_if = { - limit = { NOT = { exists = scope:contest_summary_2 } } - save_scope_as = contest_summary_2 - } - else_if = { - limit = { NOT = { exists = scope:contest_summary_3 } } - save_scope_as = contest_summary_3 - } - else_if = { - limit = { NOT = { exists = scope:contest_summary_4 } } - save_scope_as = contest_summary_4 - } - else_if = { - limit = { NOT = { exists = scope:contest_summary_5 } } - save_scope_as = contest_summary_5 - } - else_if = { - limit = { NOT = { exists = scope:contest_summary_6 } } - save_scope_as = contest_summary_6 - } - else_if = { - limit = { NOT = { exists = scope:contest_summary_7 } } - save_scope_as = contest_summary_7 - } - else = { save_scope_as = contest_summary_8 } - } - } - tournament_contest_versus_match_scope_effect = { CHAR = root } -} - -# Save relevant scopes for end of contest events -tournament_contest_end_portrait_effect = { - tournament_contest_champion_scope_effect = yes - if = { - limit = { - OR = { - scope:contest_winner ?= this - involved_activity = { - any_guest_subset_current_phase = { name = winner this = root } - } - } - exists = scope:contest_loser - } - scope:contest_loser = { save_scope_as = contest_portrait } - } - else_if = { - limit = { - OR = { - scope:contest_winner ?= this - involved_activity = { - any_guest_subset_current_phase = { name = winner this = root } - } - } - exists = scope:second_place - } - scope:second_place = { save_scope_as = contest_portrait } - } - else_if = { - limit = { - OR = { - scope:contest_loser ?= this - NOT = { - involved_activity = { - any_guest_subset_current_phase = { name = winner this = root } - } - } - } - exists = scope:contest_winner - } - scope:contest_winner = { save_scope_as = contest_portrait } - } -} - -# Accidentally kill a character, inform other attendees, and track total number of accidents -tournament_accidental_death_effect = { - scope:activity = { - if = { - limit = { exists = scope:accident_killer } - add_activity_log_entry = { - key = tournament_accident_killer_log - tags = { contestant death bad } - score = 25 - character = scope:accident_victim - target = scope:accident_killer - } - scope:accident_victim = { - death = { - death_reason = death_contest_melee_accident - killer = scope:accident_killer - } - } - } - else = { - add_activity_log_entry = { - key = tournament_accident_log - tags = { contestant death bad } - score = 25 - character = scope:accident_victim - } - scope:accident_victim = { - death = { death_reason = death_contest_melee_accident } - } - } - every_attending_character = { - if = { - limit = { - OR = { - has_any_scripted_relation = scope:accident_victim - is_close_family_of = scope:accident_victim - is_consort_of = scope:accident_victim - AND = { - this = scope:accident_victim.liege - tier_difference = { - target = scope:accident_victim - value <= 1 - } - } - liege = scope:accident_victim - } - } - trigger_event = tournament_events.0701 - } - else = { - send_interface_message = { - type = event_death_bad - title = tournament_accident_death_msg_title - left_icon = scope:accident_victim - show_as_tooltip = { - if = { - limit = { exists = scope:accident_killer } - scope:accident_victim = { - death = { - death_reason = death_contest_melee_accident - killer = scope:accident_killer - } - } - } - else = { - scope:accident_victim = { - death = { death_reason = death_contest_melee_accident } - } - } - } - } - } - } - # For making sure there are not obscene numbers of accidents - if = { - limit = { exists = var:accident_death_count } - change_variable = { - name = accident_death_count - add = 1 - } - } - else = { - set_variable = { - name = accident_death_count - value = 1 - } - } - } -} - -tournament_versus_create_contestant_fallback_effect = { - scope:activity = { - random_attending_character = { - culture = { save_scope_as = attending_culture } - } - scope:attending_culture = { - random_culture_county = { - faith = { save_scope_as = attending_faith } - random_direct_de_jure_vassal_title = { save_scope_as = attending_barony } - } - } - if = { - limit = { has_current_phase = tournament_phase_joust } - create_character = { - template = tournament_horse_character - location = scope:activity.activity_location - faith = scope:attending_faith - culture = scope:attending_culture - dynasty = none - save_scope_as = backup_contestant - } - scope:backup_contestant = { - add_to_activity = scope:activity - } - } - else_if = { - limit = { has_current_phase = tournament_phase_board_game } - create_character = { - template = tournament_board_game_character - location = scope:activity.activity_location - faith = scope:attending_faith - culture = scope:attending_culture - dynasty = none - save_scope_as = backup_contestant - } - scope:backup_contestant = { - add_to_activity = scope:activity - } - } - else_if = { - limit = { has_current_phase = tournament_phase_wrestling } - create_character = { - template = tournament_pugilism_character - location = scope:activity.activity_location - faith = scope:attending_faith - culture = scope:attending_culture - dynasty = none - save_scope_as = backup_contestant - } - scope:backup_contestant = { - add_to_activity = scope:activity - } - } - else = { - create_character = { - template = tournament_foot_character - location = scope:activity.activity_location - faith = scope:attending_faith - culture = scope:attending_culture - dynasty = none - save_scope_as = backup_contestant - } - scope:backup_contestant = { - add_to_activity = scope:activity - } - } - } -} - -tournament_complete_win_contest_intent_effect = { - if = { - limit = { - has_activity_intent = win_contest_intent - NOT = { has_completed_activity_intent = win_contest_intent } - } - send_interface_toast = { - title = activity_intent_complete_toast - left_icon = this - complete_activity_intent = yes - if = { - limit = { - NOT = { - involved_activity = { has_current_phase = tournament_phase_melee } - } - } - stress_impact = { base = medium_stress_impact_loss } - } - else = { - stress_impact = { base = minor_stress_impact_loss } - } - } - } -} - -tournament_add_contestant_or_spectator_effect = { - save_scope_as = new_arrival - if = { - limit = { - NOR = { - is_in_guest_subset = { name = contestant } - is_in_guest_subset = { name = spectator } - } - } - if = { - limit = { activity_is_valid_tournament_contestant = yes } - involved_activity = { - add_to_guest_subset = { name = contestant target = scope:new_arrival } - } - } - else = { - involved_activity = { - add_to_guest_subset = { name = spectator target = scope:new_arrival } - } - } - } -} - -tournament_add_as_spectator_effect = { - save_temporary_scope_as = new_arrival - if = { - limit = { - NOR = { - is_in_guest_subset = { name = qualified } - is_in_guest_subset = { name = spectator } - } - } - involved_activity = { - add_to_guest_subset = { name = spectator target = scope:new_arrival } - } - } -} - -tournament_choose_jockey_effect = { - save_scope_as = chosen_jockey - if = { - limit = { - NOT = { is_participant_in_activity = scope:activity } - } - hidden_effect = { add_to_activity = scope:activity } - scope:activity = { - add_to_guest_subset = { name = spectator target = scope:chosen_jockey } - } - } - every_in_list = { - list = potential_jockeys - limit = { - NOR = { - this = scope:chosen_jockey - this = root - has_character_flag = generated_jockey - } - } - add_opinion = { - target = root - modifier = disappointed_opinion - opinion = -10 - } - } - root = { - set_variable = { - name = horse_race_jockey - value = scope:chosen_jockey - } - } -} - -tournament_liege_qualification_toast_effect = { - every_in_list = { - list = qualification_liege_list - save_scope_as = qualification_liege - # Save number below 2 for toast - set_variable = { - name = qualified_knights_count - value = { - value = 0 - scope:qualification_liege = { - every_in_list = { - variable = qualified_knights - limit = { - NOR = { - has_court_position = champion_court_position - scope:qualification_liege.court_position:champion_court_position ?= this - } - } - add = 1 - } - } - } - days = 1 - } - # If champion qualified - if = { - limit = { - any_in_list = { - variable = qualified_knights - OR = { - has_court_position = champion_court_position - scope:qualification_liege.court_position:champion_court_position ?= this - } - } - } - random_in_list = { - variable = qualified_knights - limit = { - OR = { - has_court_position = champion_court_position - scope:qualification_liege.court_position:champion_court_position ?= this - } - } - save_scope_as = contest_champion - } - } - if = { - limit = { - any_in_list = { - variable = qualified_knights - NOT = { scope:contest_champion ?= this } - } - } - random_in_list = { - variable = qualified_knights - limit = { - NOT = { scope:contest_champion ?= this } - is_of_major_interest_trigger = { CHARACTER = scope:qualification_liege } - } - alternative_limit = { - NOT = { scope:contest_champion ?= this } - is_of_minor_interest_trigger = { CHARACTER = scope:qualification_liege } - } - alternative_limit = { - NOT = { scope:contest_champion ?= this } - } - save_scope_as = knight_1 - } - } - if = { - limit = { - NOT = { exists = scope:contest_champion } - any_in_list = { - variable = qualified_knights - NOT = { scope:knight_1 ?= this } - } - } - random_in_list = { - variable = qualified_knights - limit = { - NOT = { scope:knight_1 ?= this } - is_of_major_interest_trigger = { CHARACTER = scope:qualification_liege } - } - alternative_limit = { - NOT = { scope:knight_1 ?= this } - is_of_minor_interest_trigger = { CHARACTER = scope:qualification_liege } - } - alternative_limit = { - NOT = { scope:knight_1 ?= this } - } - save_scope_as = knight_2 - } - } - if = { # Champion + knights - limit = { - exists = scope:contest_champion - exists = scope:knight_1 - } - send_interface_toast = { - type = toast_tournament_qualification_champion - title = tournament_champion_qualify_multi_title - left_icon = scope:contest_champion - right_icon = scope:knight_1 - custom_tooltip = tournament_champion_qualify_multi_desc - add_prestige = { - value = { # Knights - value = miniscule_prestige_gain - multiply = var:qualified_knights_count - } - add = minor_prestige_gain # Champion - } - } - } - else_if = { # Champion - limit = { exists = scope:contest_champion } - send_interface_toast = { - type = toast_tournament_qualification_champion - title = tournament_champion_qualify_title - left_icon = scope:contest_champion - right_icon = scope:knight_1 - custom_tooltip = tournament_champion_qualify_desc - add_prestige = minor_prestige_gain # Champion - } - } - else_if = { # 2 or more knights - limit = { exists = scope:knight_2 } - send_interface_toast = { - type = toast_tournament_qualification_knight - title = tournament_knight_qualify_multi_title - left_icon = scope:knight_1 - right_icon = scope:knight_2 - custom_tooltip = tournament_knight_qualify_multi_desc - add_prestige = { - value = { # Knights - value = miniscule_prestige_gain - multiply = var:qualified_knights_count - } - } - } - } - else_if = { # 1 knight - limit = { exists = scope:knight_1 } - send_interface_toast = { - type = toast_tournament_qualification_knight - title = tournament_knight_qualify_title - left_icon = scope:knight_1 - custom_tooltip = tournament_knight_qualify_desc - add_prestige = { - value = { # Knight - value = miniscule_prestige_gain - multiply = var:qualified_knights_count - } - } - } - } - clear_variable_list = qualified_knights - } -} - -# Save winner scopes for summary event -tournament_save_contest_winner_scopes_effect = { - scope:activity ?= { - if = { - limit = { - any_guest_subset = { - name = winner - phase = tournament_phase_melee - is_alive = yes - } - } - random_guest_subset = { - name = winner - phase = tournament_phase_melee - limit = { - scope:activity.var:melee_winner ?= this - is_alive = yes - } - alternative_limit = { is_alive = yes } - weight = { - base = 1 - tournament_team_captain_modifier = yes - } - save_scope_as = melee_winner - } - set_variable = { - name = melee_winner - value = scope:melee_winner - } - } - if = { - limit = { - any_guest_subset = { name = winner phase = tournament_phase_archery } - } - random_guest_subset = { - name = winner - phase = tournament_phase_archery - save_scope_as = archery_winner - } - set_variable = { - name = archery_winner - value = scope:archery_winner - } - } - if = { - limit = { - any_guest_subset = { name = winner phase = tournament_phase_horse_race } - } - random_guest_subset = { - name = winner - phase = tournament_phase_horse_race - save_scope_as = horse_race_winner - } - set_variable = { - name = horse_race_winner - value = scope:horse_race_winner - } - } - if = { - limit = { - any_guest_subset = { name = winner phase = tournament_phase_recital } - } - random_guest_subset = { - name = winner phase = tournament_phase_recital - save_scope_as = recital_winner - } - set_variable = { - name = recital_winner - value = scope:recital_winner - } - } - if = { - limit = { - any_guest_subset = { name = winner phase = tournament_phase_joust } - } - random_guest_subset = { - name = winner - phase = tournament_phase_joust - save_scope_as = joust_winner - } - set_variable = { - name = joust_winner - value = scope:joust_winner - } - } - if = { - limit = { - any_guest_subset = { name = winner phase = tournament_phase_wrestling } - } - random_guest_subset = { - name = winner - phase = tournament_phase_wrestling - save_scope_as = wrestling_winner - } - set_variable = { - name = wrestling_winner - value = scope:wrestling_winner - } - } - if = { - limit = { - any_guest_subset = { name = winner phase = tournament_phase_duel } - } - random_guest_subset = { - name = winner phase = tournament_phase_duel - save_scope_as = duel_winner - } - set_variable = { - name = duel_winner - value = scope:duel_winner - } - } - if = { - limit = { - any_guest_subset = { name = winner phase = tournament_phase_board_game } - } - random_guest_subset = { - name = winner - phase = tournament_phase_board_game - save_scope_as = board_game_winner - } - set_variable = { - name = board_game_winner - value = scope:board_game_winner - } - } - } -} - -# Award prize artifacts to all contest winners -tournament_disburse_contest_prize_effect = { - if = { - limit = { exists = scope:duel_winner } - tournament_contest_generate_prize_effect = { CONTEST = duel } - } - if = { - limit = { exists = scope:joust_winner } - tournament_contest_generate_prize_effect = { CONTEST = joust } - } - if = { - limit = { exists = scope:wrestling_winner } - tournament_contest_generate_prize_effect = { CONTEST = wrestling } - } - if = { - limit = { exists = scope:board_game_winner } - tournament_contest_generate_prize_effect = { CONTEST = board_game } - } - if = { - limit = { exists = scope:archery_winner } - tournament_contest_generate_prize_effect = { CONTEST = archery } - } - if = { - limit = { exists = scope:recital_winner } - tournament_contest_generate_prize_effect = { CONTEST = recital } - } - if = { - limit = { exists = scope:horse_race_winner } - tournament_contest_generate_prize_effect = { CONTEST = horse_race } - } - if = { - limit = { exists = scope:melee_winner } - tournament_contest_generate_prize_effect = { CONTEST = melee } - } -} - -# Show tooltips for prize awards -tournament_disburse_contest_prize_tooltip_effect = { - if = { - limit = { exists = scope:duel_prize } - show_as_tooltip = { - scope:duel_prize = { - set_owner = { target = scope:duel_winner } - } - } - } - if = { - limit = { exists = scope:joust_prize } - show_as_tooltip = { - scope:joust_prize = { - set_owner = { target = scope:joust_winner } - } - } - } - if = { - limit = { exists = scope:wrestling_prize } - show_as_tooltip = { - scope:wrestling_prize = { - set_owner = { target = scope:wrestling_winner } - } - } - } - if = { - limit = { exists = scope:board_game_prize } - show_as_tooltip = { - scope:board_game_prize = { - set_owner = { target = scope:board_game_winner } - } - } - } - if = { - limit = { exists = scope:archery_prize } - show_as_tooltip = { - scope:archery_prize = { - set_owner = { target = scope:archery_winner } - } - } - } - if = { - limit = { exists = scope:recital_prize } - show_as_tooltip = { - scope:recital_prize = { - set_owner = { target = scope:recital_winner } - } - } - } - if = { - limit = { exists = scope:horse_race_prize } - show_as_tooltip = { - scope:horse_race_prize = { - set_owner = { target = scope:horse_race_winner } - } - } - } - if = { - limit = { exists = scope:melee_prize } - show_as_tooltip = { - scope:melee_prize = { - set_owner = { target = scope:melee_winner } - } - } - } -} - -# Save pivotal contestant perspective scope, root or someone important to you -tournament_pivotal_contestant_scope_effect = { - if = { - limit = { - trigger_if = { - limit = { - scope:activity = { - activity_tournament_versus_contest_trigger = yes - var:contest_versus_progress ?= 2 - } - } - is_in_guest_subset = { name = finalist } - } - trigger_else_if = { - limit = { - scope:activity = { - activity_tournament_versus_contest_trigger = yes - var:contest_versus_progress ?= 1 - } - } - is_in_guest_subset = { name = semi_finalist } - } - trigger_else = { - is_in_guest_subset = { name = qualified } - } - } - save_scope_as = pivotal_contestant - } - # Otherwise, find someone you care about to frame the event - else = { - # Filter out anyone who is no longer a valid contestant - scope:activity = { - every_guest_subset_current_phase = { - name = qualified - limit = { - trigger_if = { - limit = { scope:activity.var:contest_versus_progress ?= 2 } - is_in_guest_subset = { name = finalist } - } - trigger_else_if = { - limit = { scope:activity.var:contest_versus_progress ?= 1 } - is_in_guest_subset = { name = semi_finalist } - } - trigger_else = { always = yes } - this != root - } - add_to_list = potential_pivotal_contestants - } - } - # Randomly select the most relevant character possible - random_in_list = { - list = potential_pivotal_contestants - # Intent Targets - limit = { root.intent_target ?= this } - # Wager Targets - alternative_limit = { root.var:tournament_wager_target ?= this } - # Relations - alternative_limit = { has_relation_to = root } - # Champions - alternative_limit = { root.court_position:champion_court_position ?= this } - # Children - alternative_limit = { is_child_of = root } - # Spouses - alternative_limit = { is_consort_of = root } - # Close Family - alternative_limit = { is_close_family_of = root } - # Liege - alternative_limit = { root.liege ?= this } - # Powerful Vassals - alternative_limit = { is_powerful_vassal_of = root } - # Vassals - alternative_limit = { is_vassal_of = root } - # Knights - alternative_limit = { is_knight_of = root } - # Extended Family - alternative_limit = { is_extended_family_of = root } - # Courtiers - alternative_limit = { is_courtier_of = root } - # Other - alternative_limit = { always = yes } - weight = { - base = 1 - opinion_modifier = { - who = root - opinion_target = this - } - modifier = { add = var:progress_to_victory } - } - save_scope_as = pivotal_contestant - } - } - if = { - limit = { - exists = scope:contest_winner - exists = scope:contest_loser - } - if = { - limit = { scope:pivotal_contestant = scope:contest_winner } - scope:contest_loser = { save_scope_as = other_contestant } - } - else = { - scope:contest_winner = { save_scope_as = other_contestant } - } - } -} - -# Save values for determining overall progress in a contest -tournament_pivotal_ptv_value_effect = { - if = { - limit = { exists = scope:pivotal_contestant.var:progress_to_victory } - scope:activity = { - ordered_guest_subset_current_phase = { - name = qualified - limit = { exists = var:progress_to_victory } - order_by = var:progress_to_victory - save_scope_as = best_contestant - } - ordered_guest_subset_current_phase = { - name = qualified - limit = { exists = var:progress_to_victory } - order_by = { - value = 0 - subtract = var:progress_to_victory - } - save_scope_as = worst_contestant - } - } - save_scope_value_as = { - name = best_worst_diff - value = { - value = scope:best_contestant.var:progress_to_victory - subtract = scope:worst_contestant.var:progress_to_victory - } - } - save_scope_value_as = { - name = ptv_half_way - value = { - value = scope:worst_contestant.var:progress_to_victory - add = { - value = scope:best_worst_diff - divide = 2 - } - } - } - save_scope_value_as = { - name = pivotal_best_diff - value = { - value = scope:pivotal_contestant.var:progress_to_victory - subtract = scope:best_contestant.var:progress_to_victory - } - } - save_scope_value_as = { - name = pivotal_worst_diff - value = { - value = scope:pivotal_contestant.var:progress_to_victory - subtract = scope:worst_contestant.var:progress_to_victory - } - } - } -} - -# Save values for determining overall progress in a contest -tournament_pivotal_ptv_versus_value_effect = { - save_scope_value_as = { - name = pivotal_diff - value = { - value = scope:pivotal_contestant.character_chance_of_victory - subtract = scope:versus_contestant.character_chance_of_victory - } - } -} - -tournament_pivotal_flavor_variable_effect = { - set_variable = { - name = contest_$CONTEST$_flavor - value = $ID$ - months = 1 - } -} - -tournament_pivotal_duel_effect = { - save_scope_value_as = { - name = no_change_chance - value = $NO_CHANGE_CHANCE$ - } - save_scope_as = contestant - remove_character_flag = success_pivotal_flag - remove_character_flag = neutral_pivotal_flag - remove_character_flag = failure_pivotal_flag - $DUELIST$ = { save_scope_as = duelist } # used if a proxy's skills are tested, e.g. a jockey - scope:duelist = { - duel = { - skills = { $SKILL_1$ $SKILL_2$ } - value = decent_skill_rating - 10 = { - compare_modifier = { - value = scope:duel_value - multiplier = 3.5 - min = 5 - } - tournament_horse_contest_trait_pivotal_modifier = yes - tournament_foot_contest_trait_pivotal_modifier = yes - tournament_wit_contest_trait_pivotal_modifier = yes - tournament_bow_contest_trait_pivotal_modifier = yes - scope:contestant = { - activity_tournament_change_contestant_score_effect = { SCORE = increase_$INCREASE$ } - add_character_flag = success_pivotal_flag - } - } - 10 = { - trigger = { scope:no_change_chance = yes } - scope:contestant = { add_character_flag = neutral_pivotal_flag } - } - 10 = { - compare_modifier = { - value = scope:duel_value - multiplier = -3.5 - min = 5 - } - scope:contestant = { - activity_tournament_change_contestant_score_effect = { SCORE = decrease_$DECREASE$ } - add_character_flag = failure_pivotal_flag - } - } - } - } -} - -tournament_pivotal_duel_single_skill_effect = { - save_scope_value_as = { - name = no_change_chance - value = $NO_CHANGE_CHANCE$ - } - save_scope_as = contestant - $DUELIST$ = { save_scope_as = duelist } # used if a proxy's skills are tested, e.g. a jockey - scope:duelist = { - duel = { - skill = $SKILL_1$ - value = decent_skill_rating - 10 = { - compare_modifier = { - value = scope:duel_value - multiplier = 3.5 - min = 5 - } - tournament_horse_contest_trait_pivotal_modifier = yes - tournament_foot_contest_trait_pivotal_modifier = yes - tournament_wit_contest_trait_pivotal_modifier = yes - tournament_bow_contest_trait_pivotal_modifier = yes - scope:contestant = { - activity_tournament_change_contestant_score_effect = { SCORE = increase_$INCREASE$ } - add_character_flag = success_pivotal_flag - } - } - 50 = { - trigger = { scope:no_change_chance = yes } - scope:contestant = { add_character_flag = neutral_pivotal_flag } - } - 10 = { - compare_modifier = { - value = scope:duel_value - multiplier = -3.5 - min = 5 - } - scope:contestant = { - activity_tournament_change_contestant_score_effect = { SCORE = decrease_$DECREASE$ } - add_character_flag = failure_pivotal_flag - } - } - } - } -} - -versus_tyrannical_disqualification_effect = { - scope:contest_winner = { save_scope_as = tyrannical_disqualification_target } - scope:activity = { - add_activity_log_entry = { - key = contest_tyrannical_disqualification_log - score = 50 - tags = { contestant removal } - character = scope:contest_loser - target = scope:contest_winner - - # Effects - scope:contest_loser = { - add_tyranny = minor_tyranny_gain - add_prestige = minor_prestige_loss - add_character_modifier = { - modifier = tournament_tyrannical_disqualification_modifier - years = 5 - } - reverse_add_opinion = { - target = scope:contest_winner - modifier = tournament_tyrannical_disqualification_opinion - opinion = -15 - } - } - } - switch = { - trigger = has_current_phase - # Joust - tournament_phase_joust = { - tournament_contest_versus_swap_winner_loser_effect = { CONTEST = joust SKILL = horse } - } - # Wrestling - tournament_phase_wrestling = { - tournament_contest_versus_swap_winner_loser_effect = { CONTEST = wrestling SKILL = pugilism } - } - # Duel - tournament_phase_duel = { - tournament_contest_versus_swap_winner_loser_effect = { CONTEST = duel SKILL = foot } - } - # Board Game - tournament_phase_board_game = { - tournament_contest_versus_swap_winner_loser_effect = { CONTEST = board_game SKILL = board_game } - } - } - } - stress_impact = { - just = medium_stress_impact_gain - humble = medium_stress_impact_gain - } -} - -#ADD RANDOM HASTILUDES SKILL LEVELS -# with some mighty stacks of modifiers to make them culturally appropriate -add_random_tourney_participant_level_effect = { - if = { - limit = { - has_trait = tourney_participant - } - random_list = { - 40 = { } - # FOOT XP - 15 = { - add_trait_xp = { - trait = tourney_participant - track = foot - value = 20 - } - modifier = { - add = 40 - culture = { - OR = { - has_cultural_tradition = tradition_fp1_coastal_warriors - has_cultural_tradition = tradition_stand_and_fight - has_cultural_tradition = tradition_druzhina - has_cultural_tradition = tradition_futuwaa - has_cultural_tradition = tradition_garuda_warriors - has_cultural_tradition = tradition_himalayan_settlers - has_cultural_tradition = tradition_khadga_puja - has_cultural_tradition = tradition_mountaineer_ruralism - has_cultural_tradition = tradition_hird - } - } - } - modifier = { - add = 20 - culture = { - OR = { - has_cultural_tradition = tradition_metal_craftsmanship - has_cultural_tradition = tradition_roman_legacy - has_cultural_tradition = tradition_mountain_homes - has_cultural_tradition = tradition_polders - has_cultural_tradition = tradition_republican_legacy - has_cultural_tradition = tradition_formation_fighting - has_cultural_tradition = tradition_fp1_trials_by_combat - has_cultural_tradition = tradition_fp1_performative_honour - has_cultural_tradition = tradition_caucasian_wolves - has_cultural_tradition = tradition_ep3_audacious_cadets - has_cultural_tradition = tradition_mobile_guards - has_cultural_tradition = tradition_mountain_herding - has_cultural_tradition = tradition_horn_mountain_skirmishing - has_cultural_tradition = tradition_mubarizuns - has_cultural_tradition = tradition_burman_royal_army - has_cultural_tradition = tradition_upland_skirmishing - } - } - } - modifier = { - add = -20 - culture = { - OR = { - has_cultural_tradition = tradition_frugal_armorsmiths - has_cultural_tradition = tradition_strength_in_numbers - } - } - } - modifier = { - add = -25 - prowess <= 8 - } - } - 10 = { - add_trait_xp = { - trait = tourney_participant - track = foot - value = 50 - } - modifier = { - add = 30 - culture = { - OR = { - has_cultural_tradition = tradition_fp1_coastal_warriors - has_cultural_tradition = tradition_stand_and_fight - has_cultural_tradition = tradition_druzhina - has_cultural_tradition = tradition_futuwaa - has_cultural_tradition = tradition_garuda_warriors - has_cultural_tradition = tradition_himalayan_settlers - has_cultural_tradition = tradition_khadga_puja - has_cultural_tradition = tradition_mountaineer_ruralism - has_cultural_tradition = tradition_hird - } - } - } - modifier = { - add = 15 - culture = { - OR = { - has_cultural_tradition = tradition_metal_craftsmanship - has_cultural_tradition = tradition_roman_legacy - has_cultural_tradition = tradition_mountain_homes - has_cultural_tradition = tradition_polders - has_cultural_tradition = tradition_republican_legacy - has_cultural_tradition = tradition_formation_fighting - has_cultural_tradition = tradition_fp1_trials_by_combat - has_cultural_tradition = tradition_fp1_performative_honour - has_cultural_tradition = tradition_caucasian_wolves - has_cultural_tradition = tradition_ep3_audacious_cadets - has_cultural_tradition = tradition_mobile_guards - has_cultural_tradition = tradition_mountain_herding - has_cultural_tradition = tradition_horn_mountain_skirmishing - has_cultural_tradition = tradition_mubarizuns - has_cultural_tradition = tradition_burman_royal_army - has_cultural_tradition = tradition_upland_skirmishing - } - } - } - modifier = { - add = -20 - culture = { - OR = { - has_cultural_tradition = tradition_frugal_armorsmiths - has_cultural_tradition = tradition_strength_in_numbers - } - } - } - modifier = { - add = -25 - prowess <= 8 - } - } - 5 = { - add_trait_xp = { - trait = tourney_participant - track = foot - value = 80 - } - modifier = { - add = 20 - culture = { - OR = { - has_cultural_tradition = tradition_fp1_coastal_warriors - has_cultural_tradition = tradition_stand_and_fight - has_cultural_tradition = tradition_druzhina - has_cultural_tradition = tradition_futuwaa - has_cultural_tradition = tradition_garuda_warriors - has_cultural_tradition = tradition_himalayan_settlers - has_cultural_tradition = tradition_khadga_puja - has_cultural_tradition = tradition_mountaineer_ruralism - has_cultural_tradition = tradition_hird - } - } - } - modifier = { - add = 10 - culture = { - OR = { - has_cultural_tradition = tradition_metal_craftsmanship - has_cultural_tradition = tradition_roman_legacy - has_cultural_tradition = tradition_mountain_homes - has_cultural_tradition = tradition_polders - has_cultural_tradition = tradition_republican_legacy - has_cultural_tradition = tradition_formation_fighting - has_cultural_tradition = tradition_fp1_trials_by_combat - has_cultural_tradition = tradition_fp1_performative_honour - has_cultural_tradition = tradition_caucasian_wolves - has_cultural_tradition = tradition_ep3_audacious_cadets - has_cultural_tradition = tradition_mobile_guards - has_cultural_tradition = tradition_mountain_herding - has_cultural_tradition = tradition_horn_mountain_skirmishing - has_cultural_tradition = tradition_mubarizuns - has_cultural_tradition = tradition_burman_royal_army - has_cultural_tradition = tradition_upland_skirmishing - } - } - } - modifier = { - add = -15 - culture = { - OR = { - has_cultural_tradition = tradition_frugal_armorsmiths - has_cultural_tradition = tradition_strength_in_numbers - } - } - } - modifier = { - add = -25 - prowess <= 8 - } - } - # HORSE XP - 15 = { - add_trait_xp = { - trait = tourney_participant - track = horse - value = 20 - } - modifier = { - add = 40 - culture = { - OR = { - has_cultural_tradition = tradition_roman_legacy - has_cultural_tradition = tradition_horse_breeder - has_cultural_tradition = tradition_chivalry - has_cultural_tradition = tradition_desert_ribat - has_cultural_tradition = tradition_desert_nomads - has_cultural_tradition = tradition_horse_lords - has_cultural_tradition = tradition_hussar - has_cultural_tradition = tradition_saharan_nomads - has_cultural_tradition = tradition_ep3_indomitable_azatani - has_cultural_tradition = tradition_ep3_imperial_tagmata - } - } - } - modifier = { - add = 20 - culture = { - OR = { - has_cultural_tradition = tradition_dryland_dwellers - has_cultural_tradition = tradition_pastoralists - has_cultural_tradition = tradition_hit_and_run - has_cultural_tradition = tradition_hunters - has_cultural_tradition = tradition_caucasian_wolves - has_cultural_tradition = tradition_ep3_audacious_cadets - has_cultural_tradition = tradition_chanson_de_geste - has_cultural_tradition = tradition_burman_royal_army - has_cultural_tradition = tradition_sacred_hunts - has_cultural_tradition = tradition_lords_of_the_elephant - } - } - } - modifier = { - add = -20 - prowess <= 4 - } - } - 10 = { - add_trait_xp = { - trait = tourney_participant - track = horse - value = 50 - } - modifier = { - add = 30 - culture = { - OR = { - has_cultural_tradition = tradition_roman_legacy - has_cultural_tradition = tradition_horse_breeder - has_cultural_tradition = tradition_chivalry - has_cultural_tradition = tradition_desert_ribat - has_cultural_tradition = tradition_desert_nomads - has_cultural_tradition = tradition_horse_lords - has_cultural_tradition = tradition_hussar - has_cultural_tradition = tradition_lords_of_the_elephant - has_cultural_tradition = tradition_saharan_nomads - has_cultural_tradition = tradition_ep3_indomitable_azatani - has_cultural_tradition = tradition_ep3_imperial_tagmata - } - } - } - modifier = { - add = 15 - culture = { - OR = { - has_cultural_tradition = tradition_dryland_dwellers - has_cultural_tradition = tradition_pastoralists - has_cultural_tradition = tradition_hit_and_run - has_cultural_tradition = tradition_hunters - has_cultural_tradition = tradition_caucasian_wolves - has_cultural_tradition = tradition_ep3_audacious_cadets - has_cultural_tradition = tradition_chanson_de_geste - has_cultural_tradition = tradition_burman_royal_army - has_cultural_tradition = tradition_sacred_hunts - } - } - } - modifier = { - add = -20 - prowess <= 4 - } - } - 5 = { - add_trait_xp = { - trait = tourney_participant - track = horse - value = 80 - } - modifier = { - add = 20 - culture = { - OR = { - has_cultural_tradition = tradition_roman_legacy - has_cultural_tradition = tradition_horse_breeder - has_cultural_tradition = tradition_chivalry - has_cultural_tradition = tradition_desert_ribat - has_cultural_tradition = tradition_desert_nomads - has_cultural_tradition = tradition_horse_lords - has_cultural_tradition = tradition_hussar - has_cultural_tradition = tradition_lords_of_the_elephant - has_cultural_tradition = tradition_saharan_nomads - has_cultural_tradition = tradition_ep3_indomitable_azatani - has_cultural_tradition = tradition_ep3_imperial_tagmata - } - } - } - modifier = { - add = 10 - culture = { - OR = { - has_cultural_tradition = tradition_dryland_dwellers - has_cultural_tradition = tradition_pastoralists - has_cultural_tradition = tradition_hit_and_run - has_cultural_tradition = tradition_hunters - has_cultural_tradition = tradition_caucasian_wolves - has_cultural_tradition = tradition_ep3_audacious_cadets - has_cultural_tradition = tradition_chanson_de_geste - has_cultural_tradition = tradition_burman_royal_army - has_cultural_tradition = tradition_sacred_hunts - } - } - } - modifier = { - add = -20 - prowess <= 4 - } - } - # WIT XP - 10 = { - add_trait_xp = { - trait = tourney_participant - track = wit - value = 20 - } - modifier = { - add = 45 - culture = { - OR = { - has_cultural_tradition = tradition_astute_diplomats - has_cultural_tradition = tradition_welcoming - has_cultural_parameter = poet_trait_gives_bonuses - has_cultural_tradition = tradition_storytellers - has_cultural_tradition = tradition_fp1_northern_stories - has_cultural_tradition = tradition_fp2_strategy_gamers - has_cultural_tradition = tradition_chanson_de_geste - } - } - } - modifier = { - add = -25 - diplomacy <= 10 - learning <= 10 - } - modifier = { - add = 20 - OR = { - diplomacy >= 15 - learning >= 15 - } - } - modifier = { - add = 25 - culture = { - OR = { - has_cultural_tradition = tradition_esteemed_hospitality - has_cultural_tradition = tradition_forbearing - has_cultural_tradition = tradition_life_is_just_a_joke - has_cultural_tradition = tradition_chivalry - has_cultural_tradition = tradition_philosopher_culture - has_cultural_tradition = tradition_music_theory - has_cultural_tradition = tradition_things - } - } - } - } - 5 = { - add_trait_xp = { - trait = tourney_participant - track = wit - value = 50 - } - modifier = { - add = 35 - culture = { - OR = { - has_cultural_tradition = tradition_astute_diplomats - has_cultural_tradition = tradition_welcoming - has_cultural_parameter = poet_trait_gives_bonuses - has_cultural_tradition = tradition_storytellers - has_cultural_tradition = tradition_fp1_northern_stories - has_cultural_tradition = tradition_fp2_strategy_gamers - has_cultural_tradition = tradition_chanson_de_geste - } - } - } - modifier = { - add = 20 - culture = { - OR = { - has_cultural_tradition = tradition_esteemed_hospitality - has_cultural_tradition = tradition_forbearing - has_cultural_tradition = tradition_life_is_just_a_joke - has_cultural_tradition = tradition_chivalry - has_cultural_tradition = tradition_philosopher_culture - has_cultural_tradition = tradition_music_theory - has_cultural_tradition = tradition_things - } - } - } - modifier = { - add = -25 - diplomacy <= 10 - learning <= 10 - } - modifier = { - add = 20 - OR = { - diplomacy >= 15 - learning >= 15 - } - } - } - 5 = { - add_trait_xp = { - trait = tourney_participant - track = wit - value = 80 - } - modifier = { - add = 20 - culture = { - OR = { - has_cultural_tradition = tradition_astute_diplomats - has_cultural_tradition = tradition_welcoming - has_cultural_parameter = poet_trait_gives_bonuses - has_cultural_tradition = tradition_storytellers - has_cultural_tradition = tradition_fp1_northern_stories - has_cultural_tradition = tradition_fp2_strategy_gamers - has_cultural_tradition = tradition_chanson_de_geste - } - } - } - modifier = { - add = 10 - culture = { - OR = { - has_cultural_tradition = tradition_esteemed_hospitality - has_cultural_tradition = tradition_forbearing - has_cultural_tradition = tradition_life_is_just_a_joke - has_cultural_tradition = tradition_chivalry - has_cultural_tradition = tradition_philosopher_culture - has_cultural_tradition = tradition_music_theory - has_cultural_tradition = tradition_things - } - } - } - modifier = { - add = -25 - diplomacy <= 10 - learning <= 10 - } - modifier = { - add = 20 - OR = { - diplomacy >= 15 - learning >= 15 - } - } - } - # BOW XP - 10 = { - add_trait_xp = { - trait = tourney_participant - track = bow - value = 20 - } - modifier = { - add = 45 - culture = { - OR = { - has_cultural_tradition = tradition_adaptive_skirmishing - has_cultural_tradition = tradition_hunters - has_cultural_tradition = tradition_bush_hunting - has_cultural_tradition = tradition_forest_wardens - has_cultural_tradition = tradition_horse_lords - has_cultural_tradition = tradition_land_of_the_bow - has_cultural_tradition = tradition_longbow_competitions - } - } - } - modifier = { - add = 25 - culture = { - OR = { - has_cultural_tradition = tradition_forest_folk - has_cultural_tradition = tradition_jungle_dwellers - has_cultural_tradition = tradition_polders - has_cultural_tradition = tradition_fp1_coastal_warriors - has_cultural_tradition = tradition_formation_fighting - has_cultural_tradition = tradition_hit_and_run - has_cultural_tradition = tradition_sacred_hunts - has_cultural_tradition = tradition_mobile_guards - has_cultural_tradition = tradition_mountain_herding - has_cultural_tradition = tradition_horn_mountain_skirmishing - has_cultural_tradition = tradition_upland_skirmishing - } - } - } - modifier = { - factor = 0 - OR = { - has_trait = blind - has_trait = maimed - } - } - modifier = { - add = 15 - has_trait = lifestyle_hunter - } - } - 5 = { - add_trait_xp = { - trait = tourney_participant - track = bow - value = 50 - } - modifier = { - add = 35 - culture = { - OR = { - has_cultural_tradition = tradition_adaptive_skirmishing - has_cultural_tradition = tradition_hunters - has_cultural_tradition = tradition_bush_hunting - has_cultural_tradition = tradition_forest_wardens - has_cultural_tradition = tradition_horse_lords - has_cultural_tradition = tradition_land_of_the_bow - } - } - } - modifier = { - add = 15 - culture = { - OR = { - has_cultural_tradition = tradition_forest_folk - has_cultural_tradition = tradition_jungle_dwellers - has_cultural_tradition = tradition_polders - has_cultural_tradition = tradition_fp1_coastal_warriors - has_cultural_tradition = tradition_formation_fighting - has_cultural_tradition = tradition_hit_and_run - has_cultural_tradition = tradition_sacred_hunts - has_cultural_tradition = tradition_mobile_guards - has_cultural_tradition = tradition_mountain_herding - has_cultural_tradition = tradition_horn_mountain_skirmishing - has_cultural_tradition = tradition_upland_skirmishing - has_cultural_tradition = tradition_longbow_competitions - } - } - } - modifier = { - add = 15 - has_trait = lifestyle_hunter - } - modifier = { - factor = 0 - OR = { - has_trait = blind - has_trait = maimed - } - } - } - 5 = { - add_trait_xp = { - trait = tourney_participant - track = bow - value = 80 - } - modifier = { - add = 20 - culture = { - OR = { - has_cultural_tradition = tradition_adaptive_skirmishing - has_cultural_tradition = tradition_hunters - has_cultural_tradition = tradition_bush_hunting - has_cultural_tradition = tradition_forest_wardens - has_cultural_tradition = tradition_horse_lords - has_cultural_tradition = tradition_land_of_the_bow - } - } - } - modifier = { - add = 10 - culture = { - OR = { - has_cultural_tradition = tradition_forest_folk - has_cultural_tradition = tradition_jungle_dwellers - has_cultural_tradition = tradition_polders - has_cultural_tradition = tradition_fp1_coastal_warriors - has_cultural_tradition = tradition_formation_fighting - has_cultural_tradition = tradition_hit_and_run - has_cultural_tradition = tradition_sacred_hunts - has_cultural_tradition = tradition_mobile_guards - has_cultural_tradition = tradition_mountain_herding - has_cultural_tradition = tradition_horn_mountain_skirmishing - has_cultural_tradition = tradition_upland_skirmishing - has_cultural_tradition = tradition_longbow_competitions - } - } - } - modifier = { - add = 15 - has_trait = lifestyle_hunter - } - modifier = { - factor = 0 - OR = { - has_trait = blind - has_trait = maimed - } - } - } - } - random_list = { - 60 = { } - 10 = { - add_trait_xp = { - trait = tourney_participant - track = foot - value = 20 - } - } - 10 = { - add_trait_xp = { - trait = tourney_participant - track = bow - value = 20 - } - } - 10 = { - add_trait_xp = { - trait = tourney_participant - track = horse - value = 20 - } - } - 10 = { - add_trait_xp = { - trait = tourney_participant - track = wit - value = 20 - } - } - } - } -} - -versus_contest_round_outcome_tooltip_effect = { - if = { - limit = { scope:activity.var:contest_versus_progress = 2 } - custom_description = { - text = tournament_contest_round_win_tt - subject = $WINNER$ - object = $LOSER$ - } - } - else = { - custom_description = { - text = tournament_contest_round_tt - subject = $WINNER$ - object = $LOSER$ - } - } -} - -versus_contest_disqualification_tooltip_effect = { - if = { - limit = { scope:activity.var:contest_versus_progress = 2 } - custom_description = { - text = tournament_contest_disqualify_win_tt - subject = $WINNER$ - object = $DISQUALIFIED$ - } - } - else = { - custom_description = { - text = tournament_contest_disqualify_round_tt - subject = $WINNER$ - object = $DISQUALIFIED$ - } - } -} - -versus_contest_resignation_tooltip_effect = { - if = { - limit = { scope:activity.var:contest_versus_progress = 2 } - custom_description = { - text = tournament_contest_resign_win_tt - subject = $WINNER$ - object = $RESIGNER$ - } - } - else = { - custom_description = { - text = tournament_contest_resign_round_tt - subject = $WINNER$ - object = $RESIGNER$ - } - } -} - -versus_force_concession_effect = { - reverse_add_opinion = { - target = scope:versus_contestant - modifier = tournament_bribed_replacement_opinion - opinion = -10 - } - scope:versus_contestant = { - remove_variable = progress_to_victory - remove_variable = contest_aptitude - } - scope:activity = { - switch = { - trigger = var:contest_versus_progress - 0 = { - add_to_guest_subset = { name = semi_finalist target = root } - } - 1 = { - add_to_guest_subset = { name = finalist target = root } - } - 2 = { - add_to_guest_subset = { name = winner target = root } - } - } - } - versus_contest_resignation_tooltip_effect = { - RESIGNER = scope:versus_contestant - WINNER = root - } - stress_impact = { - just = miniscule_stress_impact_gain - humble = miniscule_stress_impact_gain - content = miniscule_stress_impact_gain - diligent = miniscule_stress_impact_gain - } -} - -little_william_marshal_achievement_contest_end_effect = { - if = { - limit = { - exists = global_var:started_little_william_marshal_achievement - scope:activity = { - any_attending_character = { - is_ai = no - } - } - } - # Increment overall contest tally. - change_global_variable = { - name = started_little_william_marshal_achievement - add = 1 - } - } -} - -little_william_marshal_achievement_contest_end_winner_effect = { - if = { - limit = { - exists = global_var:started_little_william_marshal_achievement - is_ai = no - } - change_global_variable = { - name = little_william_marshal_achievement_tally - add = 1 - } - } -} diff --git a/N3OW/common/scripted_effects/04_dlc_ep2_wedding_effects.txt b/N3OW/common/scripted_effects/04_dlc_ep2_wedding_effects.txt deleted file mode 100644 index 3b89bc07..00000000 --- a/N3OW/common/scripted_effects/04_dlc_ep2_wedding_effects.txt +++ /dev/null @@ -1,149 +0,0 @@ -# Create the grand wedding variables between the two characters, they must already have been betrothed by the code hook in the marry -# interaction or by manually setting a betrothal. For manual betrothal setting prefer using create_grand_wedding_betrothal. -# SPOUSE_1 = First spouse character -# SPOUSE_2 = Second spouse character -# HOST = Character promising to host the grand wedding -set_grand_wedding_betrothal_variables = { - $SPOUSE_1$ = { - set_variable = { name = promised_grand_wedding_by value = $HOST$ } - save_scope_as = spouse_1 - } - $SPOUSE_2$ = { - set_variable = { name = promised_grand_wedding_by value = $HOST$ } - save_scope_as = spouse_2 - } - $HOST$ = { - set_variable = { - name = promised_grand_wedding_marriage_countdown - value = $SPOUSE_1$ - years = grand_wedding_timeout - } - set_variable = { - name = promised_grand_wedding_to - value = $PROMISEE$ - } - # Notification that the countdown has expired (one day before, to avoid getting the variable deleted before we have used it) - trigger_event = { - id = ep2_wedding.0001 - days = grand_wedding_timeout_notification - } - } -} - -# Recreate the variables setup if the host dies and is replaced -wedding_update_hosting_variable_effect = { - if = { - limit = { - scope:spouse_1 = { has_variable = promised_grand_wedding_by } - } - scope:spouse_1 = { - remove_variable = promised_grand_wedding_by - set_variable = { name = promised_grand_wedding_by value = scope:new_host } - } - } - if = { - limit = { - scope:spouse_2 = { has_variable = promised_grand_wedding_by } - } - scope:spouse_2 = { - remove_variable = promised_grand_wedding_by - set_variable = { name = promised_grand_wedding_by value = scope:new_host } - } - } - if = { - limit = { - scope:host = { has_variable = promised_grand_wedding_marriage_countdown } - } - scope:new_host = { - set_variable = { - name = promised_grand_wedding_marriage_countdown - value = scope:spouse_1 - years = grand_wedding_timeout - } - } - } -} - -# Crease a betrothal between SPOUSE_1 and SPOUSE_2 with HOST promising to host a grand wedding -# SPOUSE_1 = First spouse character -# SPOUSE_2 = Second spouse character -# HOST = Character promising to host the grand wedding -create_grand_wedding_betrothal = { - if = { - limit = { - $SPOUSE_1$ = { - is_female = yes - } - } - $SPOUSE_1$ = { - create_betrothal_matrilineal = $SPOUSE_2$ - } - } - else = { - $SPOUSE_1$ = { - create_betrothal = $SPOUSE_2$ - } - } - - set_grand_wedding_betrothal_variables = { - SPOUSE_1 = $SPOUSE_1$ - SPOUSE_2 = $SPOUSE_2$ - HOST = $HOST$ - PROMISEE = $PROMISEE$ - } -} - -# Wedding Options on_start -wedding_normal_option_effect = { - scope:host = { - if = { - limit = { - any_vassal = { - OR = { - has_vassal_stance = parochial - has_vassal_stance = zealot - } - } - } - every_vassal = { - limit = { - OR = { - has_vassal_stance = parochial - has_vassal_stance = zealot - } - } - add_opinion = { - target = scope:host - modifier = wedding_balanced_option_opinion - } - } - } - } -} - -wedding_good_option_effect = { - scope:host = { - if = { - limit = { - any_vassal = { - OR = { - has_vassal_stance = courtly - has_vassal_stance = glory_hound - } - } - } - every_vassal = { - limit = { - OR = { - has_vassal_stance = courtly - has_vassal_stance = glory_hound - } - } - add_opinion = { - target = scope:host - modifier = wedding_good_option_opinion - } - } - } - } -} diff --git a/N3OW/common/scripted_effects/05_bp2_hostage_effects.txt b/N3OW/common/scripted_effects/05_bp2_hostage_effects.txt deleted file mode 100644 index f7ba278c..00000000 --- a/N3OW/common/scripted_effects/05_bp2_hostage_effects.txt +++ /dev/null @@ -1,840 +0,0 @@ - -################################################## -# Effects related to the hostage system - -# Execute that hostage -bp2_execute_hostage_effect = { - scope:hostage = { save_scope_as = victim } - scope:hostage_warden = { save_scope_as = executioner } - scope:executioner = { - # Dread - add_dread = minor_dread_gain - #Kinslaying - add_kinslayer_trait_or_nothing_effect = { VICTIM = scope:victim } - } - show_as_tooltip = { - # Kill hostage - scope:victim = { - death = { - death_reason = death_hostage_execution - killer = scope:executioner - } - } - } - # Cancel truce - scope:executioner = { - if = { - limit = { - OR = { - NOT = { has_variable = recently_executed_hostage } - NOT = { has_variable = recently_executed_hostage_home_court } - } - } - set_variable = { - name = recently_executed_hostage - value = scope:hostage - years = 1 - } - set_variable = { - name = recently_executed_hostage_home_court - value = scope:hostage_home_court - years = 1 - } - } - } - # Opinion - scope:victim = { - # Victim's family & spouse hates executioner - every_close_family_member = { - limit = { this != scope:executioner } - add_to_temporary_list = victim_family_list - } - every_spouse = { - limit = { this != scope:executioner } - add_to_temporary_list = victim_family_list - } - if = { - limit = { - any_in_list = { list = victim_family_list count > 0 } - } - every_in_list = { - list = victim_family_list - custom = all_close_family_and_spouses - limit = { - NOR = { - this = scope:hostage_home_court - this = scope:executioner - } - } - add_opinion = { - target = scope:executioner - modifier = executed_close_family - } - } - } - # Victim's dynasty hates executioner - if = { - limit = { - exists = dynasty - exists = scope:executioner.dynasty - dynasty != scope:executioner.dynasty - } - dynasty = { - every_dynasty_member = { - limit = { - NOR = { - this = scope:executioner - this = scope:victim - is_in_list = victim_family_list - } - } - custom = all_dynasty_members - add_to_temporary_list = victim_dynasty_list - add_opinion = { - target = scope:executioner - modifier = executed_dynasty_member - } - } - } - } - # Victim's friends and lovers - every_relation = { - type = friend - type = lover - limit = { - NOR = { - this = scope:executioner - this = scope:victim - is_in_list = victim_family_list - is_in_list = victim_dynasty_list - } - } - custom = all_friends_and_lovers - add_opinion = { - target = scope:executioner - modifier = executed_close_relation_opinion - } - } - } - # Stress - scope:executioner = { - if = { - limit = { - NOT = { has_trait = sadistic } - scope:victim = { - OR = { - is_child_of = scope:executioner - is_grandchild_of = scope:executioner - is_great_grandchild_of = scope:executioner - } - } - } - stress_impact = { - base = minor_stress_impact_gain - compassionate = massive_stress_impact_gain - forgiving = major_stress_impact_gain - generous = minor_stress_impact_gain - family_first = minor_stress_impact_gain - } - } - else_if = { - limit = { - NOT = { has_trait = sadistic } - scope:victim = { - OR = { - has_relation_friend = scope:executioner - has_relation_lover = scope:executioner - } - } - } - stress_impact = { - base = medium_stress_impact_gain - compassionate = massive_stress_impact_gain - forgiving = major_stress_impact_gain - generous = medium_stress_impact_gain - trusting = minor_stress_impact_gain - content = minor_stress_impact_gain - } - } - else = { - stress_impact = { - sadistic = medium_stress_impact_loss - compassionate = medium_stress_impact_gain - forgiving = minor_stress_impact_gain - generous = minor_stress_impact_gain - } - } - } - # Actually kill the hostage once effects are run - hidden_effect = { - scope:hostage_home_court = { - send_interface_toast = { - title = hostage_executed_toast - left_icon = scope:hostage - right_icon = scope:executioner - scope:victim = { - show_as_tooltip = { - death = { - death_reason = death_hostage_execution - killer = scope:executioner - } - } - } - } - } - scope:executioner = { - send_interface_toast = { - title = hostage_executed_toast - left_icon = scope:hostage - right_icon = scope:hostage_home_court - scope:victim = { - death = { - death_reason = death_hostage_execution - killer = scope:executioner - } - } - } - } - } -} - -bp2_return_hostage_effect = { - # Put hostage return at top of tooltip - show_as_tooltip = { - $HOSTAGE$ = { return_hostage = yes } - } - $HOSTAGE$.warden ?= { - if = { - limit = { - OR = { - bp2_warden_title_tier_lower_trigger = { WARDEN = $HOSTAGE$.warden HOME_COURT = $HOSTAGE$.home_court } - bp2_warden_dynasty_renown_lower_trigger = { WARDEN = $HOSTAGE$.warden HOME_COURT = $HOSTAGE$.home_court } - } - } - if = { - limit = { - $HOSTAGE$.warden.faith ?= { - faith_hostility_level = { - target = $HOSTAGE$.home_court.faith - value >= faith_hostile_level - } - } - } - custom_tooltip = hostage_prestige_piety_renown_income_loss_tt - } - else = { custom_tooltip = hostage_prestige_renown_income_loss_tt } - } - else = { custom_tooltip = hostage_prestige_income_loss_tt } - if = { - limit = { - $HOSTAGE$.home_court ?= { - NOR = { - any_warden_hostage = { home_court = $HOSTAGE$.warden } - OR = { - has_truce = $HOSTAGE$.warden - is_allied_to = $HOSTAGE$.warden - } - } - } - } - if = { - limit = { - NOT = { exists = scope:actor } - NOT = { exists = scope:recipient } - } - $HOSTAGE$.home_court = { save_scope_as = actor } - $HOSTAGE$.warden = { save_scope_as = recipient } - } - custom_tooltip = hostage_truce_ending_tt - } - } - $HOSTAGE$ = { - if = { - limit = { - hostage_duration = { years < 1 } - } - set_variable = { - name = short_hostage_duration - years = 10 - value = $HOSTAGE$.warden - } - } - else_if = { - limit = { - hostage_duration = { years >= 5 } - } - set_variable = { - name = long_hostage_duration - years = 10 - value = $HOSTAGE$.warden - } - } - else = { - set_variable = { - name = hostage_duration - years = 10 - value = $HOSTAGE$.warden - } - } - if = { - limit = { - exists = $HOSTAGE$.warden.capital_province - } - $HOSTAGE$.warden.capital_province = { save_scope_as = starting_location } - } - else_if = { - limit = { - exists = $HOSTAGE$.warden.location - } - $HOSTAGE$.warden.location = { save_scope_as = starting_location } - } - if = { - limit = { is_ruler = yes } - capital_province = { save_scope_as = destination_province } - } - else_if = { - limit = { exists = $HOSTAGE$.home_court.capital_province } - $HOSTAGE$.home_court ?= { - save_scope_as = home_court - capital_province = { save_scope_as = destination_province } - } - } - else_if = { - limit = { exists = $HOSTAGE$.home_court.location } - $HOSTAGE$.home_court.location = { save_scope_as = destination_province } - } - else = { - $HOSTAGE$.location = { save_scope_as = destination_province } - } - # Actually return hostage last - hidden_effect = { - if = { - limit = { is_hostage = yes } - return_hostage = yes - } - if = { - limit = { - exists = scope:destination_province - exists = scope:starting_location - } - set_location = scope:starting_location - start_travel_plan = { - players_use_planner = no - destination = scope:destination_province - on_start_on_action = on_hostage_depart_for_home_court - on_travel_planner_cancel_on_action = on_hostage_depart_travel_planner_exit - on_arrival_on_action = on_hostage_arrive_at_home_court - on_arrival_destinations = last - return_trip = no # One way - } - } - else = { - set_location = scope:destination_province - } - } - } -} - -bp2_return_hostage_no_travel_effect = { - # Put hostage return at top of tooltip - show_as_tooltip = { - $HOSTAGE$ = { return_hostage = yes } - } - $HOSTAGE$.warden ?= { - if = { - limit = { - OR = { - bp2_warden_title_tier_lower_trigger = { WARDEN = $HOSTAGE$.warden HOME_COURT = $HOSTAGE$.home_court } - bp2_warden_dynasty_renown_lower_trigger = { WARDEN = $HOSTAGE$.warden HOME_COURT = $HOSTAGE$.home_court } - } - } - if = { - limit = { - $HOSTAGE$.warden.faith ?= { - faith_hostility_level = { - target = $HOSTAGE$.home_court.faith - value >= faith_hostile_level - } - } - } - custom_tooltip = hostage_prestige_piety_renown_income_loss_tt - } - else = { custom_tooltip = hostage_prestige_renown_income_loss_tt } - } - else = { custom_tooltip = hostage_prestige_income_loss_tt } - if = { - limit = { - $HOSTAGE$.home_court ?= { - NOR = { - any_warden_hostage = { home_court = $HOSTAGE$.warden } - OR = { - has_truce = $HOSTAGE$.warden - is_allied_to = $HOSTAGE$.warden - } - } - } - } - custom_tooltip = hostage_truce_ending_tt - } - } - $HOSTAGE$ = { - if = { - limit = { - hostage_duration = { years < 1 } - } - set_variable = { - name = short_hostage_duration - years = 10 - value = $HOSTAGE$.warden - } - } - else_if = { - limit = { - hostage_duration = { years >= 5 } - } - set_variable = { - name = long_hostage_duration - years = 10 - value = $HOSTAGE$.warden - } - } - else = { - set_variable = { - name = hostage_duration - years = 10 - value = $HOSTAGE$.warden - } - } - # Actually return hostage last - hidden_effect = { - if = { - limit = { is_hostage = yes } - return_hostage = yes - } - } - } -} - -bp2_send_hostage_two_way_tooltip_effect = { - scope:hostage_sender_1 = { - if = { - limit = { has_truce = scope:hostage_sender_1 } - custom_tooltip = hostage_existing_truce_two_way_1_tt - } - } - scope:hostage_sender_2 = { - if = { - limit = { has_truce = scope:hostage_sender_1 } - custom_tooltip = hostage_existing_truce_two_way_2_tt - } - } -} - -hostage_depart_effect = { - $HOSTAGE$ ?= { - # Remove guardian if relevant - if = { - limit = { - any_relation = { type = guardian } - } - every_relation = { - type = guardian - save_scope_as = current_guardian_scope - remove_guardian_effect = { - GUARDIAN = scope:current_guardian_scope - WARD = $HOSTAGE$ - RETURN_WARD = no - HIDE_OPINION = yes - } - } - } - else_if = { - limit = { - any_relation = { type = ward } - } - every_relation = { - type = ward - save_scope_as = current_ward_scope - remove_guardian_effect = { - GUARDIAN = $HOSTAGE$ - WARD = scope:current_ward_scope - RETURN_WARD = yes - HIDE_OPINION = yes - } - } - } - hidden_effect = { - $HOME_COURT$ = { - send_interface_toast = { - title = hostage_departs_title - left_icon = $HOSTAGE$ - right_icon = $WARDEN$ - # Departure info - $HOSTAGE$ = { - custom_description = { - text = hostage_leaves_home_tt - subject = $HOSTAGE$ - object = $WARDEN$ - } - } - } - } - # Toast for recipient - $WARDEN$ = { - send_interface_toast = { - title = hostage_departs_title - left_icon = $HOSTAGE$ - right_icon = $HOME_COURT$ - # Departure info - $HOSTAGE$ = { - custom_description = { - text = hostage_leaves_home_tt - subject = $HOSTAGE$ - object = $WARDEN$ - } - } - } - } - } - show_as_tooltip = { - $WARDEN$ = { take_hostage = $HOSTAGE$ } - } - if = { - limit = { - OR = { - bp2_warden_title_tier_lower_trigger = { WARDEN = $WARDEN$ HOME_COURT = $HOME_COURT$ } - bp2_warden_dynasty_renown_lower_trigger = { WARDEN = $WARDEN$ HOME_COURT = $HOME_COURT$ } - } - } - if = { - limit = { - $WARDEN$.faith = { - faith_hostility_level = { - target = $HOME_COURT$.faith - value >= faith_hostile_level - } - } - } - custom_description = { - text = hostage_prestige_piety_renown_income_tt - subject = $WARDEN$ - } - custom_description_no_bullet = { - text = hostage_faith_hostility_tt - subject = $WARDEN$ - object = $HOME_COURT$ - } - if = { - limit = { - bp2_warden_dynasty_renown_lower_trigger = { WARDEN = $WARDEN$ HOME_COURT = $HOME_COURT$ } - } - custom_description_no_bullet = { - text = warden_lower_dynasty_renown_tt - subject = $WARDEN$ - object = $HOME_COURT$ - } - } - if = { - limit = { - bp2_warden_title_tier_lower_trigger = { WARDEN = $WARDEN$ HOME_COURT = $HOME_COURT$ } - } - custom_description_no_bullet = { - text = warden_lower_title_tier_tt - subject = $WARDEN$ - object = $HOME_COURT$ - } - } - } - else = { - custom_description = { - text = hostage_prestige_renown_income_tt - subject = $WARDEN$ - } - if = { - limit = { - bp2_warden_dynasty_renown_lower_trigger = { WARDEN = $WARDEN$ HOME_COURT = $HOME_COURT$ } - } - custom_description_no_bullet = { - text = warden_lower_dynasty_renown_tt - subject = $WARDEN$ - object = $HOME_COURT$ - } - } - if = { - limit = { - bp2_warden_title_tier_lower_trigger = { WARDEN = $WARDEN$ HOME_COURT = $HOME_COURT$ } - } - custom_description_no_bullet = { - text = warden_lower_title_tier_tt - subject = $WARDEN$ - object = $HOME_COURT$ - } - } - } - } - else = { - custom_description = { - text = hostage_prestige_income_tt - subject = $WARDEN$ - } - } - remove_character_flag = under_offer_as_hostage_flag - set_variable = { - name = hostage_travelling_to_warden - value = $WARDEN$ - years = 2 - } - start_travel_plan = { - destination = $WARDEN$.capital_province - on_start_on_action = on_hostage_depart_for_warden - on_travel_planner_cancel_on_action = on_hostage_depart_travel_planner_exit - on_arrival_on_action = on_hostage_arrive_at_warden - on_arrival_destinations = last - return_trip = no # One way - } - } -} - -# Invalidate travelling hostages -hostage_travel_invalidation_effect = { - if = { - limit = { - exists = var:hostage_travelling_to_warden - OR = { - var:hostage_travelling_to_warden = { - OR = { - # Warden dies (flag:warden) - is_alive = no - # Warden loses lands (flag:warden) - is_playable_character = no - # War - AND = { - exists = root.liege - is_at_war_with = root.liege - } - } - } - # Hostage is jailed (flag:imprisoner) - is_imprisoned = yes - # Hostage becomes landed (flag:ruler) - is_playable_character = yes - # No longer important to home court (flag:invalid) - trigger_if = { - limit = { exists = liege } - NOR = { - is_child_of = liege - is_grandchild_of = liege - is_sibling_of = liege - is_nibling_of = liege - } - } - trigger_else = { - # Home court no longer landed (flag:home_court) - NOT = { exists = liege } - } - } - } - save_scope_as = hostage - if = { - limit = { exists = liege } - liege = { save_scope_as = home_court } - } - var:hostage_travelling_to_warden = { - send_interface_toast = { - title = hostage_invalidated_during_travel_title - left_icon = scope:hostage - right_icon = scope:home_court - show_as_tooltip = { - scope:hostage = { return_hostage = yes } - } - } - } - scope:home_court ?= { - send_interface_toast = { - title = hostage_invalidated_during_travel_title - left_icon = scope:hostage - right_icon = scope:hostage.var:hostage_travelling_to_warden - scope:hostage = { - show_as_tooltip = { return_hostage = yes } - current_travel_plan = { - if = { - limit = { can_cancel = yes } - cancel_travel_plan = yes - } - } - set_location_to_default = yes - } - } - } - if = { - limit = { is_alive = yes } - remove_variable = hostage_travelling_to_warden - } - debug_log = "Hostage invalidated during travel" - debug_log_scopes = yes - } -} - -# Invalidate travelling wards -ward_travel_invalidation_effect = { - if = { - limit = { - exists = var:ward_travelling_to_guardian - OR = { - # Ward is imprisoned - is_imprisoned = yes - # Ward has guardian already - any_relation = { type = guardian } - is_playable_character = yes - - var:ward_travelling_to_guardian = { - is_alive = no - # Guardian is jailed - is_imprisoned = yes - # Guardian has wards already - num_of_relation_ward >= 2 - } - NOT = { exists = var:ward_travelling_to_guardian } - NOT = { exists = var:character_making_education_request } - } - } - var:ward_travelling_to_guardian ?= { save_scope_as = guardian } - save_scope_as = ward - if = { - limit = { exists = liege } - liege = { - save_scope_as = ward_liege - send_interface_toast = { - title = ward_invalidated_during_travel_title - left_icon = scope:ward - right_icon = scope:guardian - show_as_tooltip = { - scope:ward = { remove_relation_guardian = scope:guardian } - } - } - } - } - scope:guardian ?= { - send_interface_toast = { - title = ward_invalidated_during_travel_title - left_icon = scope:ward - right_icon = scope:ward_liege - scope:ward = { - show_as_tooltip = { remove_relation_guardian = scope:guardian } - current_travel_plan = { - if = { - limit = { can_cancel = yes } - cancel_travel_plan = yes - } - } - set_location_to_default = yes - } - } - if = { - limit = { is_alive = yes } - remove_variable = guardian_waiting_for_ward - } - } - if = { - limit = { is_alive = yes } - remove_variable = ward_travelling_to_guardian - remove_variable = character_making_education_request - } - debug_log = "Ward invalidated during travel" - debug_log_scopes = yes - } -} - -# Invalidate travelling guardians -guardian_travel_invalidation_effect = { - if = { - limit = { - exists = var:guardian_travelling_to_ward - OR = { - # Guardian is imprisoned - is_imprisoned = yes - - # Guardian has wards already - num_of_relation_ward >= 2 - is_playable_character = yes - - var:guardian_travelling_to_ward = { - is_alive = no - # Ward is jailed - is_imprisoned = yes - # Ward has a guardian already - any_relation = { type = guardian } - } - NOT = { exists = var:guardian_travelling_to_ward } - } - } - var:guardian_travelling_to_ward ?= { save_scope_as = ward } - save_scope_as = guardian - scope:ward ?= { - if = { - limit = { exists = liege } - liege = { - save_scope_as = ward_liege - send_interface_toast = { - title = ward_invalidated_during_travel_title - left_icon = scope:guardian - right_icon = scope:ward - show_as_tooltip = { - scope:guardian = { remove_relation_ward = scope:ward } - } - } - } - } - send_interface_toast = { - title = guardian_invalidated_during_travel_title - left_icon = scope:guardian - scope:guardian = { - show_as_tooltip = { remove_relation_ward = scope:ward } - current_travel_plan = { - if = { - limit = { can_cancel = yes } - cancel_travel_plan = yes - } - } - set_location_to_default = yes - } - } - if = { - limit = { is_alive = yes } - remove_variable = character_making_education_request - remove_variable = ward_waiting_for_guardian - } - } - if = { - limit = { is_alive = yes } - remove_variable = guardian_travelling_to_ward - } - debug_log = "Guardian invalidated during travel" - debug_log_scopes = yes - } -} - -bp2_hostage_war_end_tooltip_effect = { - show_as_tooltip = { - scope:attacker = { - every_close_family_member = { - limit = { var:hostage_travelling_to_warden ?= scope:defender } - custom_description = { - text = hostage_leaves_home_tt - subject = this - object = scope:defender - } - } - } - scope:defender = { - every_close_family_member = { - limit = { var:hostage_travelling_to_warden ?= scope:attacker } - custom_description = { - text = hostage_leaves_home_tt - subject = this - object = scope:attacker - } - } - } - } -} diff --git a/N3OW/common/scripted_effects/05_dlc_bp2_effects.txt b/N3OW/common/scripted_effects/05_dlc_bp2_effects.txt deleted file mode 100644 index 6cb09bff..00000000 --- a/N3OW/common/scripted_effects/05_dlc_bp2_effects.txt +++ /dev/null @@ -1,1466 +0,0 @@ -#Placeholder hostage effect -take_hostage = { - add_visiting_courtier = $HOSTAGE$ -} - -#Adult Education rewards effects -#Account for the state of our variables, apply flags that are resolved in disburse_adult_education_reward_effect -resolve_adult_education_success_reward_effect = { - involved_activity ?= { - #Perfect studies - 75-100 - if = { - limit = { var:activity_special_type_progression >= 75 } - scope:host = { - add_character_flag = perfect_studies_reward - if = { #100% from 1 to 2 - limit = { has_level_1_education_trait_trigger = yes } - add_character_flag = increase_education_level_1 - } - else_if = { #100% chance from 2 to 3 - limit = { has_level_2_education_trait_trigger = yes } - add_character_flag = increase_education_level_2 - } - else_if = { #85% chance from 3 to 4 - limit = { has_level_3_education_trait_trigger = yes } - random = { - chance = 85 - add_character_flag = increase_education_level_3 - } - } - else_if = { #60% chance from 4 to 5 - limit = { has_level_4_education_trait_trigger = yes } - random = { - chance = 60 - modifier = { - involved_activity = { - has_activity_option = { - category = adult_education_option_books - option = adult_education_books_normal - } - } - add = 5 - } - add_character_flag = increase_education_level_4 - } - } - } - } - #High-end studies - 50-75 - else_if = { - limit = { - var:activity_special_type_progression < 75 - var:activity_special_type_progression >= 50 - } - scope:host = { - add_character_flag = high_studies_reward - if = { #100% from 1 to 2 - limit = { has_level_1_education_trait_trigger = yes } - add_character_flag = increase_education_level_1 - } - else_if = { #85% from 2 to 3 - limit = { has_level_2_education_trait_trigger = yes } - random = { - chance = 85 - add_character_flag = increase_education_level_2 - } - } - else_if = { #65% from 3 to 4 - limit = { has_level_3_education_trait_trigger = yes } - random = { - chance = 65 - add_character_flag = increase_education_level_3 - } - } - else_if = { #40% chance from 4 to 5 - limit = { has_level_4_education_trait_trigger = yes } - random = { - chance = 40 - modifier = { - involved_activity = { - has_activity_option = { - category = adult_education_option_books - option = adult_education_books_normal - } - } - add = 5 - } - add_character_flag = increase_education_level_4 - } - } - } - } - #OK studies - 25-50 - else_if = { - limit = { - var:activity_special_type_progression < 50 - var:activity_special_type_progression >= 25 - } - scope:host = { - add_character_flag = mid_studies_reward - if = { #85% from 1 to 2 - limit = { has_level_1_education_trait_trigger = yes } - random = { - chance = 85 - add_character_flag = increase_education_level_1 - } - } - else_if = { #65% from 2 to 3 - limit = { has_level_2_education_trait_trigger = yes } - random = { - chance = 65 - add_character_flag = increase_education_level_2 - } - } - else_if = { #40% from 3 to 4 - limit = { has_level_3_education_trait_trigger = yes } - random = { - chance = 40 - add_character_flag = increase_education_level_3 - } - } - else_if = { #15% chance from 4 to 5 - limit = { has_level_4_education_trait_trigger = yes } - random = { - chance = 15 - modifier = { - involved_activity = { - has_activity_option = { - category = adult_education_option_books - option = adult_education_books_normal - } - } - add = 5 - } - add_character_flag = increase_education_level_4 - } - } - } - } - #Lousy studies - 0-25 - else = { - scope:host = { - add_character_flag = low_studies_reward - if = { #65% from 1 to 2 - limit = { has_level_1_education_trait_trigger = yes } - random = { - chance = 65 - add_character_flag = increase_education_level_1 - } - } - else_if = { #40% from 2 to 3 - limit = { has_level_2_education_trait_trigger = yes } - random = { - chance = 40 - add_character_flag = increase_education_level_2 - } - } - else_if = { #15% from 3 to 4 - limit = { has_level_3_education_trait_trigger = yes } - random = { - chance = 15 - add_character_flag = increase_education_level_3 - } - } - } - } - if = { - limit = { - activity_location = { - is_province_valid_confucian_education_trigger = yes - } - } - scope:host = { - if = { - limit = { - NOT = { has_trait = confucian_education } - } - add_trait = confucian_education - add_trait_xp = { - trait = confucian_education - value = { - value = scope:activity.var:activity_special_type_progression - multiply = { - value = 0 - if = { - limit = { - scope:host = { - has_activity_intent = study_hard_intent - } - } - add = 0.25 - } - if = { - limit = { - scope:activity = { - has_activity_option = { - category = adult_education_option_books - option = adult_education_books_good - } - } - } - add = 0.25 - } - } - round = yes - } - } - } - else = { - add_trait_xp = { - trait = confucian_education - value = { - value = scope:activity.var:activity_special_type_progression - multiply = { - value = 0 - if = { - limit = { - scope:host = { - has_activity_intent = study_hard_intent - } - } - add = 0.35 - } - if = { - limit = { - scope:activity = { - has_activity_option = { - category = adult_education_option_books - option = adult_education_books_good - } - } - } - add = 0.35 - } - } - round = yes - } - } - } - } - } - } -} - -adult_education_completed_log_entry_effect = { - involved_activity = { - add_activity_log_entry = { - key = adult_education_studies_completed_log - tags = { completed } - score = 100 - show_in_conclusion = yes - character = root - #Effects - root = { - disburse_adult_education_reward_effect = yes - } - } - } -} - -add_relevant_lifestyle_perk_point_effect = { - if = { - limit = { - has_trait = education_diplomacy - } - add_diplomacy_lifestyle_perk_points = $NUMBER$ - } - else_if = { - limit = { - has_trait = education_martial - } - add_martial_lifestyle_perk_points = $NUMBER$ - } - else_if = { - limit = { - has_trait = education_stewardship - } - add_stewardship_lifestyle_perk_points = $NUMBER$ - } - else_if = { - limit = { - has_trait = education_intrigue - } - add_intrigue_lifestyle_perk_points = $NUMBER$ - } - else_if = { - limit = { - has_trait = education_learning - } - add_learning_lifestyle_perk_points = $NUMBER$ - } -} - -disburse_adult_education_reward_effect = { - switch = { # Hand out education traits - trigger = has_character_flag - increase_education_level_1 = { - increase_education_level_1_effect = yes - remove_character_flag = increase_education_level_1 - } - increase_education_level_2 = { - increase_education_level_2_effect = yes - remove_character_flag = increase_education_level_2 - } - increase_education_level_3 = { - increase_education_level_3_effect = yes - remove_character_flag = increase_education_level_3 - } - increase_education_level_4 = { - increase_education_level_4_effect = yes - remove_character_flag = increase_education_level_4 - } - } - switch = { # Hand out lifestyle perks/xp - trigger = has_character_flag - perfect_studies_reward = { - add_relevant_lifestyle_perk_point_effect = { NUMBER = 3 } - remove_character_flag = perfect_studies_reward - } - high_studies_reward = { - add_relevant_lifestyle_perk_point_effect = { NUMBER = 2 } - remove_character_flag = high_studies_reward - } - mid_studies_reward = { - add_relevant_lifestyle_perk_point_effect = { NUMBER = 1 } - remove_character_flag = mid_studies_reward - } - low_studies_reward = { - bp2_lifestyle_xp_gain_per_type_effect = { VALUE = major } - remove_character_flag = low_studies_reward - } - } - # Options rewards - if = { - limit = { - scope:activity = { - has_activity_option = { - category = adult_education_option_books - option = adult_education_books_good - } - } - has_dlc_feature = royal_court - scope:host = { has_royal_court = yes } - } - custom_tooltip = adult_education_books_good_reward - hidden_effect = { - random_dummy_gender_effect = yes - create_artifact_book_effect = { - OWNER = scope:host - CREATOR = scope:dummy_gender - SET_SUBJECT = flag:no - SET_TOPIC = flag:no - } - hidden_effect_new_object = { - scope:newly_created_artifact = { - set_artifact_rarity = illustrious - } - } - scope:activity = { - add_to_variable_list = { - name = artifact_rewards - target = scope:newly_created_artifact - } - } - } - } - else_if = { - limit = { - scope:activity = { - has_activity_option = { - category = adult_education_option_books - option = adult_education_books_good - } - } - } - custom_tooltip = adult_education_books_good_reward - hidden_effect = { - save_temporary_scope_value_as = { - name = should_be_trinket - value = yes - } - random_dummy_gender_effect = yes - save_scope_value_as = { - name = quality - value = 50 - } - save_scope_value_as = { - name = wealth - value = 50 - } - create_artifact_book_effect = { - OWNER = scope:host - CREATOR = scope:dummy_gender - SET_SUBJECT = flag:no - SET_TOPIC = flag:no - } - hidden_effect_new_object = { - scope:newly_created_artifact = { - set_artifact_rarity = illustrious - } - } - scope:activity = { - add_to_variable_list = { - name = artifact_rewards - target = scope:newly_created_artifact - } - } - } - if = { - limit = { - has_trait = education_diplomacy - } - add_diplomacy_skill = 1 - } - else_if = { - limit = { - has_trait = education_martial - } - add_martial_skill = 1 - } - else_if = { - limit = { - has_trait = education_stewardship - } - add_stewardship_skill = 1 - } - else_if = { - limit = { - has_trait = education_intrigue - } - add_intrigue_skill = 1 - } - else_if = { - limit = { - has_trait = education_learning - } - add_learning_skill = 1 - } - } - else_if = { - limit = { - scope:activity = { - has_activity_option = { - category = adult_education_option_books - option = adult_education_books_normal - } - } - } - if = { - limit = { - has_trait = education_diplomacy - } - add_diplomacy_skill = 1 - } - else_if = { - limit = { - has_trait = education_martial - } - add_martial_skill = 1 - } - else_if = { - limit = { - has_trait = education_stewardship - } - add_stewardship_skill = 1 - } - else_if = { - limit = { - has_trait = education_intrigue - } - add_intrigue_skill = 1 - } - else_if = { - limit = { - has_trait = education_learning - } - add_learning_skill = 1 - } - } -} - -increase_education_level_1_type_effect = { - hidden_effect = { remove_trait = education_$TYPE$_1 } - add_trait_force_tooltip = education_$TYPE$_2 - scope:activity = { - add_to_variable_list = { - name = trait_rewards - target = trait:education_$TYPE$_2 - } - } -} - -increase_education_level_2_type_effect = { - hidden_effect = { remove_trait = education_$TYPE$_2 } - add_trait_force_tooltip = education_$TYPE$_3 - scope:activity = { - add_to_variable_list = { - name = trait_rewards - target = trait:education_$TYPE$_3 - } - } -} - -increase_education_level_3_type_effect = { - hidden_effect = { remove_trait = education_$TYPE$_3 } - add_trait_force_tooltip = education_$TYPE$_4 - scope:activity = { - add_to_variable_list = { - name = trait_rewards - target = trait:education_$TYPE$_4 - } - } -} - -increase_education_level_4_type_effect = { - hidden_effect = { remove_trait = education_$TYPE$_4 } - add_trait_force_tooltip = education_$TYPE$_5 - scope:activity = { - add_to_variable_list = { - name = trait_rewards - target = trait:education_$TYPE$_5 - } - } -} - -increase_education_level_1_effect = { - if = { - limit = { has_trait = education_diplomacy } - increase_education_level_1_type_effect = { TYPE = diplomacy } - } - else_if = { - limit = { has_trait = education_martial } - increase_education_level_1_type_effect = { TYPE = martial } - } - else_if = { - limit = { has_trait = education_stewardship } - increase_education_level_1_type_effect = { TYPE = stewardship } - } - else_if = { - limit = { has_trait = education_intrigue } - increase_education_level_1_type_effect = { TYPE = intrigue } - } - else_if = { - limit = { has_trait = education_learning } - increase_education_level_1_type_effect = { TYPE = learning } - } -} - -increase_education_level_2_effect = { - if = { - limit = { has_trait = education_diplomacy } - increase_education_level_2_type_effect = { TYPE = diplomacy } - } - else_if = { - limit = { has_trait = education_martial } - increase_education_level_2_type_effect = { TYPE = martial } - } - else_if = { - limit = { has_trait = education_stewardship } - increase_education_level_2_type_effect = { TYPE = stewardship } - } - else_if = { - limit = { has_trait = education_intrigue } - increase_education_level_2_type_effect = { TYPE = intrigue } - } - else_if = { - limit = { has_trait = education_learning } - increase_education_level_2_type_effect = { TYPE = learning } - } -} - -increase_education_level_3_effect = { - if = { - limit = { has_trait = education_diplomacy } - increase_education_level_3_type_effect = { TYPE = diplomacy } - } - else_if = { - limit = { has_trait = education_martial } - increase_education_level_3_type_effect = { TYPE = martial } - } - else_if = { - limit = { has_trait = education_stewardship } - increase_education_level_3_type_effect = { TYPE = stewardship } - } - else_if = { - limit = { has_trait = education_intrigue } - increase_education_level_3_type_effect = { TYPE = intrigue } - } - else_if = { - limit = { has_trait = education_learning } - increase_education_level_3_type_effect = { TYPE = learning } - } -} - -increase_education_level_4_effect = { - if = { - limit = { has_trait = education_diplomacy } - increase_education_level_4_type_effect = { TYPE = diplomacy } - } - else_if = { - limit = { has_trait = education_martial } - increase_education_level_4_type_effect = { TYPE = martial } - } - else_if = { - limit = { has_trait = education_stewardship } - increase_education_level_4_type_effect = { TYPE = stewardship } - } - else_if = { - limit = { has_trait = education_intrigue } - increase_education_level_4_type_effect = { TYPE = intrigue } - } - else_if = { - limit = { has_trait = education_learning } - increase_education_level_4_type_effect = { TYPE = learning } - } -} - -bp2_lifestyle_xp_gain_per_type_effect = { - if = { - limit = { - has_trait = education_diplomacy - } - add_diplomacy_lifestyle_xp = $VALUE$_lifestyle_xp - } - else_if = { - limit = { - has_trait = education_martial - } - add_martial_lifestyle_xp = $VALUE$_lifestyle_xp - } - else_if = { - limit = { - has_trait = education_stewardship - } - add_stewardship_lifestyle_xp = $VALUE$_lifestyle_xp - } - else_if = { - limit = { - has_trait = education_intrigue - } - add_intrigue_lifestyle_xp = $VALUE$_lifestyle_xp - } - else_if = { - limit = { - has_trait = education_learning - } - add_learning_lifestyle_xp = $VALUE$_lifestyle_xp - } -} - -bp2_goliards_potential_shenanigans_effect = { - custom_tooltip = goliardic_shenanigans_effect_tt - hidden_effect = { - random_list = { - 10 = { - modifier = { - has_diplomacy_lifestyle_trait_trigger = yes - add = 5 - } - send_interface_toast = { - title = $TITLE_VALUE$ - left_icon = root - add_diplomacy_skill = 1 - } - } - 10 = { - modifier = { - has_intrigue_lifestyle_trait_trigger = yes - add = 5 - } - send_interface_toast = { - title = $TITLE_VALUE$ - left_icon = root - add_intrigue_skill = 1 - } - } - 10 = { - send_interface_toast = { - title = $TITLE_VALUE$ - left_icon = root - add_prowess_skill = 1 - } - } - 15 = { - trigger = { - is_eunuch_trigger = no - NOR = { - has_trait = lovers_pox - has_trait = early_great_pox - has_trait = great_pox - has_trait = celibate - has_character_flag = immune_to_disease - } - can_contract_disease_trigger = { DISEASE = lovers_pox } - } - send_interface_toast = { - title = $TITLE_VALUE$ - left_icon = root - contract_disease_effect = { DISEASE = lovers_pox TREATMENT_EVENT = no } - } - } - 15 = { - send_interface_toast = { - title = $TITLE_VALUE$ - left_icon = root - increase_wounds_no_death_effect = { REASON = fight } - } - } - 10 = { - trigger = { - NOT = { has_trait = lifestyle_poet } - } - send_interface_toast = { - title = $TITLE_VALUE$ - left_icon = root - add_trait = lifestyle_poet - } - } - 10 = { - send_interface_toast = { - title = $TITLE_VALUE$ - left_icon = root - if = { - limit = { has_trait = lifestyle_blademaster } - add_trait_xp = { - trait = lifestyle_blademaster - value = 5 - } - } - else = { add_trait = lifestyle_blademaster } - } - } - 5 = { - trigger = { - NOT = { has_trait = drunkard } - drinks_alcohol_trigger = yes - } - send_interface_toast = { - title = $TITLE_VALUE$ - left_icon = root - add_trait = drunkard - } - } - 5 = { - trigger = { can_be_hashishiyah = yes } - send_interface_toast = { - title = $TITLE_VALUE$ - left_icon = root - add_trait = hashishiyah - } - } - 10 = { - send_interface_toast = { - title = $TITLE_VALUE$ - left_icon = root - bp2_lifestyle_xp_gain_per_type_effect = { VALUE = medium } - } - } - 10 = { - trigger = { - has_trait = tourney_participant - } - add_trait_xp = { - trait = tourney_participant - track = wit - value = 5 - } - } - } - } -} - -# Set up a University Teacher -bp2_university_teacher_setup = { - scope:activity.activity_location = { save_scope_as = location } - if = { - limit = { - scope:activity = { - NOT = { - any_attending_character = { - has_character_flag = teacher_1 - } - } - } - } - if = { - limit = { - any_pool_character = { - province = scope:location - is_available_healthy_ai_adult = yes - OR = { - has_character_flag = teacher_1 - has_character_flag = teacher_2 - } - } - } - random_pool_character = { - province = scope:location - limit = { - is_available_healthy_ai_adult = yes - OR = { - has_character_flag = teacher_1 - has_character_flag = teacher_2 - } - } - save_scope_as = teacher_1 - } - } - else_if = { - limit = { - any_pool_character = { - province = scope:location - is_available_adult_education_teacher = yes - } - } - random_pool_character = { - province = scope:location - limit = { - is_available_adult_education_teacher = yes - } - save_scope_as = teacher_1 - } - } - else = { - create_character = { - template = adult_education_teacher - dynasty = none - location = scope:location - save_scope_as = teacher_1 - after_creation = { - add_character_flag = created - } - } - } - scope:teacher_1 = { - if = { - limit = { - has_character_flag = teacher_2 - } - remove_character_flag = teacher_2 - } - if = { - limit = { - has_character_flag = student_1 - } - remove_character_flag = student_1 - } - if = { - limit = { - has_character_flag = student_2 - } - remove_character_flag = student_2 - } - add_to_activity = scope:activity - add_character_flag = teacher_1 - } - } - if = { - limit = { - scope:activity = { - NOT = { - any_attending_character = { - has_character_flag = teacher_2 - } - } - } - } - if = { - limit = { - any_pool_character = { - province = scope:location - is_available_healthy_ai_adult = yes - OR = { - has_character_flag = teacher_1 - has_character_flag = teacher_2 - } - trigger_if = { - limit = { exists = scope:teacher_1 } - this != scope:teacher_1 - } - } - } - random_pool_character = { - province = scope:location - limit = { - is_available_healthy_ai_adult = yes - OR = { - has_character_flag = teacher_1 - has_character_flag = teacher_2 - } - trigger_if = { - limit = { exists = scope:teacher_1 } - this != scope:teacher_1 - } - } - save_scope_as = teacher_2 - } - } - else_if = { - limit = { - any_pool_character = { - province = scope:location - is_available_adult_education_teacher = yes - trigger_if = { - limit = { exists = scope:teacher_1 } - this != scope:teacher_1 - } - } - } - random_pool_character = { - province = scope:location - limit = { - is_available_adult_education_teacher = yes - trigger_if = { - limit = { exists = scope:teacher_1 } - this != scope:teacher_1 - } - } - save_scope_as = teacher_2 - } - } - else = { - create_character = { - template = adult_education_teacher - dynasty = none - location = scope:location - save_scope_as = teacher_2 - after_creation = { - add_character_flag = created - } - } - } - scope:teacher_2 = { - if = { - limit = { - has_character_flag = teacher_1 - } - remove_character_flag = teacher_1 - } - if = { - limit = { - has_character_flag = student_1 - } - remove_character_flag = student_1 - } - if = { - limit = { - has_character_flag = student_2 - } - remove_character_flag = student_2 - } - add_to_activity = scope:activity - add_character_flag = teacher_2 - } - } -} - -# Set up a University student -bp2_university_student_setup = { - scope:activity.activity_location = { save_scope_as = location } - if = { - limit = { - NOT = { - scope:activity = { - any_attending_character = { - has_character_flag = student_1 - } - } - } - } - if = { - limit = { - any_pool_character = { - province = scope:location - is_available_healthy_ai_adult = yes - NOT = { - exists = involved_activity - } - exists = this - } - } - random_pool_character = { - province = scope:location - limit = { - is_available_healthy_ai_adult = yes - NOT = { - exists = involved_activity - } - } - save_scope_as = student_1 - } - } - else = { - create_character = { - template = adult_education_student - dynasty = none - location = scope:location - save_scope_as = student_1 - after_creation = { - add_character_flag = created - } - } - scope:student_1 = { - add_character_flag = generated_character_uni - } - } - scope:student_1 = { - if = { - limit = { - has_character_flag = teacher_1 - } - remove_character_flag = teacher_1 - } - if = { - limit = { - has_character_flag = teacher_2 - } - remove_character_flag = teacher_2 - } - if = { - limit = { - has_character_flag = student_2 - } - remove_character_flag = student_2 - } - add_to_activity = scope:activity - add_character_flag = student_1 - } - } - - if = { - limit = { - NOT = { - scope:activity = { - any_attending_character = { - has_character_flag = student_2 - } - } - } - } - if = { - limit = { - any_pool_character = { - province = scope:location - is_available_healthy_ai_adult = yes - NOT = { - exists = involved_activity - } - exists = this - } - } - random_pool_character = { - province = scope:location - limit = { - is_available_healthy_ai_adult = yes - NOT = { - exists = involved_activity - } - } - save_scope_as = student_2 - } - } - else = { - create_character = { - template = adult_education_student - dynasty = none - location = scope:location - save_scope_as = student_2 - after_creation = { - add_character_flag = created - } - } - scope:student_2 = { - add_character_flag = generated_character_uni - } - } - scope:student_2 = { - if = { - limit = { - has_character_flag = teacher_1 - } - remove_character_flag = teacher_1 - } - if = { - limit = { - has_character_flag = teacher_2 - } - remove_character_flag = teacher_2 - } - if = { - limit = { - has_character_flag = student_1 - } - remove_character_flag = student_1 - } - add_to_activity = scope:activity - add_character_flag = student_2 - } - } -} - -# Adoption effect -adopt_effect = { - $ADOPTER$ = { - adopt = $CHILD$ - $CHILD$ = { - set_house = $ADOPTER$.house - # Remove bastard traits - if = { - limit = { - has_any_bastard_trait_trigger = yes - } - remove_all_bastard_traits = yes - } - } - # Parochial vassals hate this - if = { - limit = { - NOR = { - has_game_rule = adoption_always_allowed - culture = { has_cultural_parameter = allows_adoption } - } - } - every_vassal = { - custom = every_courtly_vassal_actor - vassal_stance = courtly - add_opinion = { - modifier = angry_opinion - opinion = -20 - target = $ADOPTER$ - } - } - } - # Zealous vassals *hate* you adopting a heretic - if = { - limit = { - faith = { - faith_hostility_level = { - target = $CHILD$.faith - value >= faith_evil_level - } - } - } - every_vassal = { - custom = every_zealot_vassal_actor - vassal_stance = zealot - add_opinion = { - modifier = angry_opinion - opinion = -25 - target = $ADOPTER$ - } - } - } - else_if = { - limit = { - faith = { - faith_hostility_level = { - target = $CHILD$.faith - value >= faith_hostile_level - } - } - } - every_vassal = { - custom = every_zealot_vassal_actor - vassal_stance = zealot - add_opinion = { - modifier = angry_opinion - opinion = -20 - target = $ADOPTER$ - } - } - } - else_if = { - limit = { - faith = { - faith_hostility_level = { - target = $CHILD$.faith - value >= faith_astray_level - } - } - } - every_vassal = { - custom = every_zealot_vassal_actor - vassal_stance = zealot - add_opinion = { - modifier = angry_opinion - opinion = -10 - target = $ADOPTER$ - } - } - } - # Minority vassals *love* you adopting a foreigner - if = { - limit = { - OR = { - faith = { - faith_hostility_level = { - target = $CHILD$.faith - value >= faith_astray_level - } - } - NOT = { culture = $CHILD$.culture } - } - } - every_vassal = { - custom = every_minority_vassal_actor - vassal_stance = minority - add_opinion = { - modifier = respect_opinion - opinion = 25 - target = $ADOPTER$ - } - } - } - # Your other children hate this - every_child = { - custom = every_non_content_child - add_opinion = { - modifier = angry_opinion - opinion = -20 - target = $ADOPTER$ - } - } - # Player heirs *hate* you adopting someone to be your new heir - if = { - limit = { - exists = player_heir - OR = { - player_heir.age < $CHILD$.age - player_heir = { has_trait = ambitious } - } - NOT = { - player_heir = { has_trait = humble } - player_heir = { has_trait = content } - player_heir = { has_trait = forgiving } - } - } - player_heir = { - progress_towards_rival_effect = { - CHARACTER = $ADOPTER$ - REASON = rival_adopted_another_heir - OPINION = default_rival_opinion - } - set_relation_rival = { - target = $CHILD$ - reason = rival_stole_my_throne - } - } - } - } - #adopted child should travel to new parent - $CHILD$ = { - if = { - limit = { exists = $ADOPTER$.capital_province } # Ward heads to landed Guardian - $ADOPTER$.capital_province = { save_scope_as = destination_province } - } - else_if = { # Ward heads to Guardian's host - limit = { exists = $ADOPTER$.host.capital_province } - $ADOPTER$.host.capital_province = { save_scope_as = destination_province } - } - else = { - $ADOPTER$.location = { save_scope_as = destination_province } - } - save_scope_as = adoptee - $ADOPTER$ = { - save_scope_as = adopter - } - if = { - limit = { - any_relation = { - type = guardian - NOT = { this = $ADOPTER$ } - } - } - random_relation = { - type = guardian - limit = { NOT = { this = $ADOPTER$ } } - save_scope_as = old_guardian - } - remove_guardian_effect = { - GUARDIAN = scope:old_guardian - WARD = scope:adoptee - RETURN_WARD = no - HIDE_OPINION = no - } - } - if = { - limit = { NOT = { scope:destination_province = $CHILD$.location } } - set_variable = { - name = adoptee_travelling_to_adopter - years = 2 - value = scope:adopter - } - start_travel_plan = { - destination = scope:destination_province - on_start_on_action = on_adoptee_depart_for_adopter - on_travel_planner_cancel_on_action = on_adoptee_depart_travel_planner_exit - on_arrival_on_action = on_adoptee_arrive_at_adopter - on_arrival_destinations = last - return_trip = no # One way - } - custom_tooltip = adoptee_leaves_for_adopter_tt - } - if = { - limit = { - $ADOPTER$ = { - has_blood_brother = yes - any_relation = { - type = blood_brother - NOT = { - is_close_family_of = $CHILD$ - } - } - } - } - $ADOPTER$ = { - random_relation = { - type = blood_brother - save_scope_as = other_blood_brother - } - } - mpo_blood_brother_new_family_member_opinion_effect = yes - } - } -} - -# Adventurer Adoption effect -adventurer_adopt_effect = { - $ADOPTER$ = { - hidden_effect = { adopt = $CHILD$ } - $CHILD$ = { - hidden_effect = { - set_house = $ADOPTER$.house - found_cadet_house_decision_effect = { - CHARACTER = scope:recipient - PRESTIGE = 0 - } - } - custom_tooltip = adventurer_adoption_child_tt - # Remove bastard traits - if = { - limit = { - has_any_bastard_trait_trigger = yes - } - remove_all_bastard_traits = yes - } - # Remove disinherited if you're the house head. - if = { - limit = { - $ADOPTER$.house.house_head = $ADOPTER$ - has_trait = disinherited - } - remove_trait = disinherited - } - } - # Your other children hate this - every_child = { - custom = every_non_content_child - add_opinion = { - modifier = angry_opinion - opinion = -20 - target = $ADOPTER$ - } - } - # Player heirs *hate* you adopting someone to be your new heir - if = { - limit = { - exists = player_heir - OR = { - player_heir.age < $CHILD$.age - player_heir = { has_trait = ambitious } - } - NOR = { - player_heir = { has_trait = humble } - player_heir = { has_trait = content } - player_heir = { has_trait = forgiving } - } - } - player_heir = { - progress_towards_rival_effect = { - CHARACTER = $ADOPTER$ - REASON = rival_adopted_another_heir - OPINION = default_rival_opinion - } - set_relation_rival = { - target = $CHILD$ - reason = rival_stole_my_throne - } - } - } - } - #adopted child should travel to new parent - $CHILD$ = { - if = { - limit = { exists = $ADOPTER$.capital_province } # Ward heads to landed Guardian - $ADOPTER$.capital_province = { save_scope_as = destination_province } - } - else_if = { # Ward heads to Guardian's host - limit = { exists = $ADOPTER$.host.capital_province } - $ADOPTER$.host.capital_province = { save_scope_as = destination_province } - } - else = { - $ADOPTER$.location = { save_scope_as = destination_province } - } - save_scope_as = adoptee - $ADOPTER$ = { - save_scope_as = adopter - } - if = { - limit = { - any_relation = { - type = guardian - NOT = { this = $ADOPTER$ } - } - } - random_relation = { - type = guardian - limit = { NOT = { this = $ADOPTER$ } } - save_scope_as = old_guardian - } - remove_guardian_effect = { - GUARDIAN = scope:old_guardian - WARD = scope:adoptee - RETURN_WARD = no - HIDE_OPINION = no - } - } - if = { - limit = { NOT = { scope:destination_province = $CHILD$.location } } - set_variable = { - name = adoptee_travelling_to_adopter - years = 2 - value = scope:adopter - } - start_travel_plan = { - destination = scope:destination_province - on_start_on_action = on_adoptee_depart_for_adopter - on_travel_planner_cancel_on_action = on_adoptee_depart_travel_planner_exit - on_arrival_on_action = on_adoptee_arrive_at_adopter - on_arrival_destinations = last - return_trip = no # One way - } - custom_tooltip = adoptee_leaves_for_adopter_tt - } - #Enters into blood brotherhood family bond - if = { - limit = { - $ADOPTER$ = { - has_blood_brother = yes - any_relation = { - type = blood_brother - NOT = { - is_close_family_of = $CHILD$ - } - } - } - } - $ADOPTER$ = { - random_relation = { - type = blood_brother - save_scope_as = other_blood_brother - } - } - mpo_blood_brother_new_family_member_opinion_effect = yes - } - } -} diff --git a/N3OW/common/scripted_effects/05_dlc_fp3_scripted_effects.txt b/N3OW/common/scripted_effects/05_dlc_fp3_scripted_effects.txt deleted file mode 100644 index ccf5b590..00000000 --- a/N3OW/common/scripted_effects/05_dlc_fp3_scripted_effects.txt +++ /dev/null @@ -1,1268 +0,0 @@ -################################################## -# Struggle & Struggle Decisions -################################################## - -##### Struggle Ending ##### -fp3_end_persian_struggle_effect = { - if = { - limit = { - exists = title:e_arabia.holder - title:e_arabia.holder = { has_character_modifier = fp3_struggle_caliph_super_suspicious_modifier } - } - title:e_arabia.holder = { remove_character_modifier = fp3_struggle_caliph_super_suspicious_modifier } - } - - every_in_global_list = { # We de-flag chars (surprisingly performance friendly, from all possible options) - variable = fp3_intro_flag_character_list - if = { - limit = { has_character_flag = fp3_struggle_intro_event_flag } # Since only alive chars have flags, we don't need to check for anything else - remove_character_flag = fp3_struggle_intro_event_flag - } - } - - # Global variable tracking. - ## For usage in councillor tasks. - set_global_variable = { - name = fp3_struggle_ending - value = $FLAG$ - } - ## For debug purposes. - if = { - limit = { gather_debug_variables_for_persian_struggle_trigger = yes } - increment_global_variable_effect = { - VAL = current_year - VAR = sp_end_date - } - } - - every_player = { - limit = { fp3_does_this_player_care_about_the_persian_struggle = yes } # Needs to be checked before the struggle ends due to race condition issues - add_to_list = player_to_notify # Making a list so stuff is tiggered after the struggle ends, to make extra sure I don't break anything. - } - - every_in_list = { # Then we *actually* notify palyers, making sure the struggle has already ended - list = player_to_notify - limit = { - this != root - } - trigger_event = $EVENT$ - } - struggle:persian_struggle ?= { end_struggle = $ENDING$ } -} - -#### MISC STRUGGLE ENDING(s) STUFF #### -fp3_ending_effects_assertion = { - # Save Sunni caliph or previous one as scope:struggle_liege - fp3_save_sunni_caliph_or_previous_effect = yes - - dynasty ?= { add_dynasty_prestige = 10000 } - - if = { - limit = { - NOT = { title:e_arabia.holder.dynasty ?= dynasty } - } - title:e_arabia.holder.dynasty ?= { add_dynasty_prestige = 10000 } - } - - custom_tooltip = fp3_struggle_assertion_subjugation_expanded_tt - custom_tooltip = fp3_struggle_assertion_caliphal_muslim_faction_protection_tt - - hidden_effect = { - destroy_title = title:e_persia - title:d_sunni = { - set_variable = { - name = dar_al_islam - value = yes - } - } - house = { - set_variable = { - name = subjugations_expanded - value = yes - } - } - title:e_arabia.holder.house = { - set_variable = { - name = subjugations_expanded - value = yes - } - } - } - - struggle:persian_struggle = { - title:e_arabia.holder = { - add_prestige = 5000 - custom_tooltip = fp3_struggle_assertion_caliph_detractor_tt - # Destroy Persia, make each of its kingdoms a de jure part of the Caliph's central title (assuming he still has an empire) - custom_tooltip = { - text = fp3_struggle_assertion_arabia_absorb_persia_swing_rewards_tt - title:e_persia = { - every_in_de_jure_hierarchy = { - limit = { tier = tier_kingdom } - set_de_jure_liege_title = title:e_arabia - } - } - } - # transfer the supporter trait to the next generation while detractors fade away - custom_tooltip = { - text = fp3_struggle_assertion_transfer_supporter_to_next_gen_tt - struggle:persian_struggle = { - every_involved_ruler = { - limit = { - has_trait = fp3_struggle_supporter - NOT = { - primary_title = { is_mercenary_company = yes } - } - } - every_child = { - if = { - limit = { - NOR = { - has_trait = fp3_struggle_supporter - primary_title ?= { is_mercenary_company = yes } - } - } - if = { - limit = { has_trait = fp3_struggle_detractor } - remove_trait = fp3_struggle_detractor - } - add_trait = fp3_struggle_supporter - } - } - } - - every_interloper_ruler = { - limit = { - has_trait = fp3_struggle_supporter - NOT = { - primary_title = { is_mercenary_company = yes } - } - } - every_child = { - if = { - limit = { - NOR = { - has_trait = fp3_struggle_supporter - primary_title ?= { is_mercenary_company = yes } - } - } - if = { - limit = { has_trait = fp3_struggle_detractor } - remove_trait = fp3_struggle_detractor - } - add_trait = fp3_struggle_supporter - } - } - } - } - } - custom_tooltip = fp3_struggle_persia_ending_assertion_faction_reluctance_tt - } - hidden_effect = { - every_involved_ruler = { - limit = { has_trait = fp3_struggle_detractor } - custom = every_detractor - title:e_arabia.holder = { - add_opinion = { - modifier = caliphal_authority - target = prev - } - } - } - } - # Vassalize supporters - every_involved_ruler = { - limit = { - top_liege = this - OR = { - has_trait = fp3_struggle_supporter - scope:struggle_liege = { - has_hook_of_type = { - target = prev - type = caliphal_submission_hook - } - } - } - NOR = { - this = scope:struggle_liege - primary_title = { is_mercenary_company = yes } - } - } - custom = fp3_struggle_assertion_vassalization_rewards_tt - create_title_and_vassal_change = { - type = swear_fealty - save_scope_as = change - add_claim_on_loss = no - } - change_liege = { - liege = scope:struggle_liege - change = scope:change - } - resolve_title_and_vassal_change = scope:change - } - # Involved event - every_involved_ruler = { - limit = { this != root } - trigger_event = fp3_struggle.0072 - } - # Interloper event - every_interloper_ruler = { - limit = { this != root } - trigger_event = fp3_struggle.0072 - } - } - - faith = { - change_fervor = { - value = 50 - desc = fervor_gain_strengthen_caliphate - } - # Propagate the Caliph's Faith in the struggle region - custom_tooltip = { - text = fp3_struggle_assertion_spread_faith_through_struggle_region_tt - struggle:persian_struggle = { - every_involved_county = { - limit = { - faith != root.faith - } - random = { - chance = fp3_strengthen_caliphate_ending_conversion_chance_percent_value - set_county_faith = root.faith - } - } - - every_involved_ruler = { - limit = { - NOR = { - faith = root.faith - primary_title = { is_mercenary_company = yes } - } - } - random = { - chance = fp3_strengthen_caliphate_ending_conversion_chance_percent_value - set_character_faith = root.faith - } - } - } - } - # Sunni faiths gets a bonus for the rest of the game converting other counties - custom_tooltip = { - text = struggle_persia_ending_assertion_boost_sunni_county_conversion_tt - set_global_variable = { - name = fp3_struggle_ending_assertion_school - value = flag:sunni - } - } - } - - if = { - limit = { is_ai = no } - add_character_flag = { - flag = fp3_abassid_strong_achievement_unlocked - years = 4 - } - } -} - -fp3_struggle_ending_shia_caliphate_effects = { - ### CHARACTER - give_nickname = nick_the_righteous_caliph - - create_title_and_vassal_change = { - type = created - save_scope_as = title_change - add_claim_on_loss = no - } - title:e_persia = { - change_title_holder = { - holder = root - change = scope:title_change - } - save_scope_as = title_e_persia - } - resolve_title_and_vassal_change = scope:title_change - - save_scope_as = founder - claim_the_imamate_scripted_effect = yes - add_piety = 5000 - - ### FAITH - faith = { - change_fervor = { - value = 50 - desc = fervor_gain_shia_caliphate - } - if = { - limit = { has_doctrine = muhammad_succession_muhakkima_doctrine } - # Muhakkima faiths gets a bonus for the rest of the game converting other counties - custom_tooltip = { - text = struggle_persia_ending_assertion_boost_muhakkima_county_conversion_tt - set_global_variable = { - name = fp3_struggle_ending_assertion_school - value = flag:muhakkima - } - } - } - else_if = { - limit = { has_doctrine = muhammad_succession_zandaqa_doctrine } - # Zandaqa faiths gets a bonus for the rest of the game converting other counties - custom_tooltip = { - text = struggle_persia_ending_assertion_boost_zandaqa_county_conversion_tt - set_global_variable = { - name = fp3_struggle_ending_assertion_school - value = flag:zandaqa - } - } - } - else_if = { - limit = { has_doctrine = muhammad_succession_sunni_doctrine } - # Sunni faiths gets a bonus for the rest of the game converting other counties - custom_tooltip = { - text = struggle_persia_ending_assertion_boost_sunni_county_conversion_tt - set_global_variable = { - name = fp3_struggle_ending_assertion_school - value = flag:sunni - } - } - } - else = { - # Shia faiths gets a bonus for the rest of the game converting other counties - custom_tooltip = { - text = struggle_persia_ending_assertion_boost_shia_county_conversion_tt - set_global_variable = { - name = fp3_struggle_ending_assertion_school - value = flag:shia - } - } - } - # Propagate the Caliph's Faith in the struggle region - custom_tooltip = { - text = fp3_struggle_ending_shia_caliphate_spread_faith_through_struggle_region_tt - struggle:persian_struggle = { - every_involved_county = { - limit = { - faith != root.faith - } - random = { - chance = fp3_shia_caliphate_ending_conversion_chance_percent_value - set_county_faith = root.faith - } - } - every_involved_ruler = { - limit = { - NOR = { - faith = root.faith - primary_title = { is_mercenary_company = yes } - } - } - random = { - chance = fp3_shia_caliphate_ending_conversion_chance_percent_value - set_character_faith = root.faith - } - } - } - } - } - - if = { - limit = { is_ai = no } - add_character_flag = { - flag = fp3_challenger_caliphate_achievement_unlocked - years = 4 - } - } -} - -fp3_struggle_ending_vassalize_caliph_effects = { - - # We vassalize the caliph, their vassals might use the confusion to declare independence - create_title_and_vassal_change = { # Note: do not attempt to simulate faction logic, it is too volatile - type = usurped - save_scope_as = change - } - title:e_arabia.holder = { - every_vassal = { - add_to_list = vassals_to_transfer - } - add_to_list = vassals_to_transfer - } - title:e_arabia = { - change_title_holder_include_vassals = { - holder = root - change = scope:change - } - save_scope_as = title_e_arabia - } - title:d_sunni.holder = { - change_liege = { - liege = root - change = scope:change - } - } - hidden_effect = { - every_in_list = { - list = vassals_to_transfer - limit = { - root != liege - } - change_liege = { - liege = root - change = scope:change - } - } - } - - resolve_title_and_vassal_change = scope:change - - dynasty ?= { - add_dynasty_prestige = 5000 - } - - give_nickname = nick_the_caliph_protector - - add_prestige = 5000 - - # Unlocks permanent bonuses: - house = { - custom_tooltip = fp3_struggle_request_honorary_title_interactions_rewards_tt - custom_tooltip = fp3_struggle_request_unity_interference_interactions_rewards_tt - } - - if = { - limit = { is_ai = no } - add_character_flag = { - flag = fp3_vassalize_the_caliph_achievement_unlocked - years = 4 - } - } -} - -#### REMOVE CONTRACT COOLDOWN #### -fp3_remove_vassal_contract_cooldown_for_tension_effect = { - if = { - limit = { is_struggle_phase = struggle_persia_phase_stabilisation } - every_involved_ruler = { - remove_interaction_cooldown = liege_modify_vassal_contract_interaction - remove_interaction_cooldown = vassal_modify_vassal_contract_interaction - remove_interaction_cooldown = ai_only_liege_modify_vassal_contract_interaction - remove_interaction_cooldown = ai_only_vassal_modify_vassal_contract_interaction - } - } -} - -fp3_struggle_apply_independent_vassalage_catalyst_effect = { - $NEW_LIEGE$ = { - # Involved characters vassalising an independent involved ruler. - if = { - limit = { - any_character_struggle = { - involvement = involved - activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { - CATALYST = catalyst_vassalize_independent_ruler - CHAR = $NEW_VASSAL$ - } - } - } - every_character_struggle = { - involvement = involved - limit = { - activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { - CATALYST = catalyst_vassalize_independent_ruler - CHAR = $NEW_VASSAL$ - } - } - activate_struggle_catalyst = { - catalyst = catalyst_vassalize_independent_ruler - character = $NEW_LIEGE$ - } - log_debug_variable_for_persian_struggle_effect = { VAR = stabil_catalyst_vassalize_independent_ruler } - } - } - } -} - -fp3_struggle_apply_supporter_detractor_war_won_catalysts_effect = { - # During the Persian Struggle, a supporter wins any war in the region. - ## Unfair wars. - if = { - limit = { - has_trait = fp3_struggle_supporter - # Scope:attacker won? - trigger_if = { - limit = { - scope:winner = scope:attacker - exists = scope:war.var:struggle_defender_tier - } - highest_held_title_tier > scope:war.var:struggle_defender_tier - } - # Else, scope:defender won. - trigger_if = { - limit = { - scope:winner = scope:defender - exists = scope:war.var:struggle_attacker_tier - } - highest_held_title_tier > scope:war.var:struggle_attacker_tier - } - any_character_struggle = { - involvement = involved - activate_struggle_catalyst_warfare_check_attacker_involvement_trigger = { - CATALYST = catalyst_supporter_win_unfair_war_within_the_region - VAR_SCOPE = scope:war - INVOLVEMENT = involved - } - } - } - every_character_struggle = { - involvement = involved - limit = { - activate_struggle_catalyst_warfare_check_attacker_involvement_trigger = { - CATALYST = catalyst_supporter_win_unfair_war_within_the_region - VAR_SCOPE = scope:war - INVOLVEMENT = involved - } - } - activate_struggle_catalyst = { - catalyst = catalyst_supporter_win_unfair_war_within_the_region - character = scope:winner - } - scope:war = { set_variable = used_for_struggle_catalyst_on_war_ended } - log_debug_variable_for_persian_struggle_effect = { VAR = stabil_catalyst_supporter_win_unfair_war_within_the_region } - } - } - ## Fair wars. - else_if = { - limit = { - has_trait = fp3_struggle_supporter - # Scope:attacker won? - trigger_if = { - limit = { - scope:winner = scope:attacker - exists = scope:war.var:struggle_defender_tier - } - highest_held_title_tier <= scope:war.var:struggle_defender_tier - } - # Else, scope:defender won. - trigger_if = { - limit = { - scope:winner = scope:defender - exists = scope:war.var:struggle_attacker_tier - } - highest_held_title_tier <= scope:war.var:struggle_attacker_tier - } - scope:war = { - NOT = { has_variable = used_for_struggle_catalyst_on_war_ended } - } - any_character_struggle = { - involvement = involved - activate_struggle_catalyst_warfare_check_attacker_involvement_trigger = { - CATALYST = catalyst_supporter_win_fair_war_within_the_region - VAR_SCOPE = scope:war - INVOLVEMENT = involved - } - } - } - every_character_struggle = { - involvement = involved - limit = { - activate_struggle_catalyst_warfare_check_attacker_involvement_trigger = { - CATALYST = catalyst_supporter_win_fair_war_within_the_region - VAR_SCOPE = scope:war - INVOLVEMENT = involved - } - } - activate_struggle_catalyst = { - catalyst = catalyst_supporter_win_fair_war_within_the_region - character = scope:winner - } - scope:war = { set_variable = used_for_struggle_catalyst_on_war_ended } - log_debug_variable_for_persian_struggle_effect = { VAR = stabil_catalyst_supporter_win_fair_war_within_the_region } - } - } - # During the Persian Struggle, a detractor wins any war in the region. - ## Unfair wars. - else_if = { - limit = { - has_trait = fp3_struggle_detractor - # Scope:attacker won? - trigger_if = { - limit = { - scope:winner = scope:attacker - exists = scope:war.var:struggle_defender_tier - } - highest_held_title_tier > scope:war.var:struggle_defender_tier - } - # Else, scope:defender won. - trigger_if = { - limit = { - scope:winner = scope:defender - exists = scope:war.var:struggle_attacker_tier - } - highest_held_title_tier > scope:war.var:struggle_attacker_tier - } - scope:war = { - NOT = { has_variable = used_for_struggle_catalyst_on_war_ended } - } - any_character_struggle = { - involvement = involved - activate_struggle_catalyst_warfare_check_attacker_involvement_trigger = { - CATALYST = catalyst_detractor_win_unfair_war_within_the_region - VAR_SCOPE = scope:war - INVOLVEMENT = involved - } - } - } - every_character_struggle = { - involvement = involved - limit = { - activate_struggle_catalyst_warfare_check_attacker_involvement_trigger = { - CATALYST = catalyst_detractor_win_unfair_war_within_the_region - VAR_SCOPE = scope:war - INVOLVEMENT = involved - } - } - activate_struggle_catalyst = { - catalyst = catalyst_detractor_win_unfair_war_within_the_region - character = scope:winner - } - scope:war = { set_variable = used_for_struggle_catalyst_on_war_ended } - log_debug_variable_for_persian_struggle_effect = { VAR = unrest_catalyst_detractor_win_unfair_war_within_the_region } - } - } - ## Fair wars. - else_if = { - limit = { - has_trait = fp3_struggle_detractor - # Scope:attacker won? - trigger_if = { - limit = { - scope:winner = scope:attacker - exists = scope:war.var:struggle_defender_tier - } - highest_held_title_tier <= scope:war.var:struggle_defender_tier - } - # Else, scope:defender won. - trigger_if = { - limit = { - scope:winner = scope:defender - exists = scope:war.var:struggle_attacker_tier - } - highest_held_title_tier <= scope:war.var:struggle_attacker_tier - } - any_character_struggle = { - involvement = involved - activate_struggle_catalyst_warfare_check_attacker_involvement_trigger = { - CATALYST = catalyst_detractor_win_fair_war_within_the_region - VAR_SCOPE = scope:war - INVOLVEMENT = involved - } - } - } - every_character_struggle = { - involvement = involved - limit = { - activate_struggle_catalyst_warfare_check_attacker_involvement_trigger = { - CATALYST = catalyst_detractor_win_fair_war_within_the_region - VAR_SCOPE = scope:war - INVOLVEMENT = involved - } - } - activate_struggle_catalyst = { - catalyst = catalyst_detractor_win_fair_war_within_the_region - character = scope:winner - } - scope:war = { set_variable = used_for_struggle_catalyst_on_war_ended } - log_debug_variable_for_persian_struggle_effect = { VAR = unrest_catalyst_detractor_win_fair_war_within_the_region } - } - } -} - -################################### -# MISC Effects -################################### -remove_any_education_traits_effect = { # Looks ugly but performance is better than with an IF check - remove_trait = education_martial_1 - remove_trait = education_martial_2 - remove_trait = education_martial_3 - remove_trait = education_martial_4 - remove_trait = education_martial_prowess_1 - remove_trait = education_martial_prowess_2 - remove_trait = education_martial_prowess_3 - remove_trait = education_martial_prowess_4 - remove_trait = education_learning_1 - remove_trait = education_learning_2 - remove_trait = education_learning_3 - remove_trait = education_learning_4 - remove_trait = education_intrigue_1 - remove_trait = education_intrigue_2 - remove_trait = education_intrigue_3 - remove_trait = education_intrigue_4 - remove_trait = education_stewardship_1 - remove_trait = education_stewardship_2 - remove_trait = education_stewardship_3 - remove_trait = education_stewardship_4 - remove_trait = education_diplomacy_1 - remove_trait = education_diplomacy_2 - remove_trait = education_diplomacy_3 - remove_trait = education_diplomacy_4 -} - -fp3_struggle_ending_concession_effects = { - # All the involved independent rulers get a white peace - custom_tooltip = { - text = fp3_concession_white_peace_tt - struggle:persian_struggle = { - every_involved_ruler = { - limit = { - top_liege = this - NOT = { - primary_title = { is_mercenary_company = yes } - } - } - save_scope_as = peace_target - scope:peace_target = { - every_primary_war_enemy = { - limit = { - top_liege = this - NOT = { - primary_title = { is_mercenary_company = yes } - } - fp3_character_any_involvement_persian_struggle_trigger = yes - } - every_character_war = { - limit = { - OR = { - primary_attacker = scope:peace_target - primary_defender = scope:peace_target - } - } - end_war = white_peace - } - } - } - } - } - - # Silk Road bonus towards prosperity if and when Persia's turmoil comes to an end - tgp_silk_road_iranian_intermezzo_ending_effect = yes - } - - # All the involved independent rulers gain truces with each other - custom_tooltip = { - text = fp3_concession_truce_tt - struggle:persian_struggle = { - every_involved_ruler = { - limit = { - top_liege = this - NOT = { - primary_title = { is_mercenary_company = yes } - } - } - save_scope_as = first_truce - every_character_struggle = { - limit = { is_struggle_type = persian_struggle } - every_involved_ruler = { - limit = { - NOR = { - this = scope:first_truce - primary_title = { is_mercenary_company = yes } - } - top_liege = this - } - add_truce_both_ways = { - character = scope:first_truce - days = 18250 - name = fp3_concession_truce_reason - } - } - } - } - } - } - - # All involved rulers, independent or not, lose all their claims - custom_tooltip = { - text = fp3_concession_lose_claim_tt - struggle:persian_struggle = { - every_involved_ruler = { - save_scope_as = claim_loser - every_claim = { - scope:claim_loser = { remove_claim = prev } - } - } - } - } - - custom_tooltip = { - text = fp3_concession_rebuilding_efforts_tt - struggle:persian_struggle = { - every_involved_ruler = { - limit = { - has_trait = fp3_struggle_supporter - is_house_head = yes - NOT = { - primary_title = { is_mercenary_company = yes } - } - } - house ?= { - add_house_modifier = { - modifier = fp3_house_modifier_rebuilding_efforts - years = fp3_house_modifier_concession_ending_duration - } - } - } - } - } - - custom_tooltip = { - text = fp3_concession_frontier_ambitions_tt - struggle:persian_struggle = { - every_involved_ruler = { - limit = { - has_trait = fp3_struggle_detractor - is_house_head = yes - NOT = { - primary_title = { is_mercenary_company = yes } - } - } - house ?= { - add_house_modifier = { - modifier = fp3_house_modifier_frontier_ambitions - years = fp3_house_modifier_concession_ending_duration - } - } - } - } - } -} - - - # Strong independent iranian ruler becomes persian emperor, frees all the iranian subjects and has an easier time vassalizing and or converting them -fp3_struggle_rekindle_iran_effects = { - give_nickname = nick_the_rekindler_of_iran - create_title_and_vassal_change = { - type = created - save_scope_as = title_change - add_claim_on_loss = no - } - title:e_persia = { - change_title_holder = { - holder = root - change = scope:title_change - } - save_scope_as = title_e_persia - } - resolve_title_and_vassal_change = scope:title_change - - custom_tooltip = fp3_event_troops_reformer_effect_tt - hidden_effect = { - spawn_army = { - name = persian_warriors - men_at_arms = { - type = asawira - stacks = 5 - } - men_at_arms = { - type = ayyar - stacks = 10 - } - location = this.capital_province - uses_supply = yes - inheritable = yes - } - spawn_army = { - name = persian_warriors - men_at_arms = { - type = asawira - stacks = 5 - } - men_at_arms = { - type = ayyar - stacks = 10 - } - location = this.capital_province - uses_supply = yes - inheritable = yes - } - } - add_prestige = 5000 - - # increase the religious conversion demand and offer vassalage acceptance for this character - dynasty = { - add_dynasty_modifier = { modifier = fp3_rekindler_of_iran_modifier } - custom_tooltip = fp3_rekindler_of_iran_modifier_vassalization_effect_tt - custom_tooltip = fp3_rekindler_of_iran_modifier_conversion_effect_tt - add_dynasty_prestige = 10000 - } - - if = { - limit = { - scope:struggle_persia_ending_rekindle_iran_decision_option_secret_faith = yes - } - set_character_faith_with_conversion = secret_faith - hidden_effect = { - remove_character_secret_faith = yes - } - } - - faith = { - custom_tooltip = { - text = fp3_iranian_faith_for_rekindle_persia_spread_to_fellow_iranians_tt - struggle:persian_struggle = { - every_involved_county = { - limit = { - culture = { has_cultural_pillar = heritage_iranian } - faith != scope:propagated_faith - } - random = { - chance = fp3_iranian_faith_for_rekindle_persia_conversion_chance_percent_value - set_county_faith = scope:propagated_faith - } - } - every_involved_ruler = { - limit = { - culture = { has_cultural_pillar = heritage_iranian } - faith != scope:propagated_faith - NOT = { - primary_title = { is_mercenary_company = yes } - } - } - random = { - chance = fp3_iranian_faith_for_rekindle_persia_conversion_chance_percent_value - set_character_faith = scope:propagated_faith - } - } - } - } - } - - struggle:persian_struggle = { - every_involved_ruler = { - limit = { culture = { has_cultural_pillar = heritage_iranian } } - # Add a character modifiers for the Iranian to help them rise! - custom = fp3_flame_of_iran_modifier_effect_tt - add_character_modifier = { modifier = fp3_flame_of_iran_modifier } - custom_tooltip = fp3_flame_of_iran_independence_effect_tt - custom_tooltip = fp3_event_troops_effect_tt - hidden_effect = { - spawn_army = { - name = persian_warriors - men_at_arms = { - type = asawira - stacks = 2 - } - location = this.capital_province - uses_supply = yes - inheritable = yes - } - spawn_army = { - name = persian_warriors - men_at_arms = { - type = ayyar - stacks = 4 - } - location = this.capital_province - uses_supply = yes - inheritable = yes - } - spawn_army = { - name = persian_warriors - men_at_arms = { - type = tawashi - stacks = 2 - } - location = this.capital_province - uses_supply = yes - inheritable = yes - } - spawn_army = { - name = persian_warriors - men_at_arms = { - type = zupin_warrior - stacks = 4 - } - location = this.capital_province - uses_supply = yes - inheritable = yes - } - spawn_army = { - name = persian_warriors - men_at_arms = { - type = tarkhan - stacks = 2 - } - location = this.capital_province - uses_supply = yes - inheritable = yes - } - if = { - limit = { - top_liege != this - NOT = { - liege.culture = { has_cultural_pillar = heritage_iranian } - } - } - create_title_and_vassal_change = { - type = independency - save_scope_as = change - add_claim_on_loss = yes - } - becomes_independent = { - change = scope:change - } - resolve_title_and_vassal_change = scope:change - } - } - } - } - - culture = { - # increase the cultural acceptance for every iranian culture with the rekindler of iran's culture - custom_tooltip = { - text = fp3_rekindle_iran_cultural_acceptance_tt - every_culture_global = { - limit = { - has_cultural_pillar = heritage_iranian - this != root.culture - } - change_cultural_acceptance = { - target = root.culture - value = 100 - desc = fp3_rekindle_iran_cultural_acceptance_tt - } - } - } - - custom_tooltip = struggle_persia_ending_rekindle_iran_easier_to_convert_culture_tt - } - - if = { - limit = { is_ai = no } - add_character_flag = { - flag = fp3_rekindle_iran_achievement_unlocked - years = 4 - } - } -} - -fp3_sundered_caliphate_effects = { - save_scope_as = sunderer - # Save Sunni caliph or previous one as scope:struggle_liege - fp3_save_sunni_caliph_or_previous_effect = yes - - add_prestige = massive_prestige_gain - house ?= { - add_house_modifier = { - modifier = fp3_house_modifier_destroyed_the_caliphate - years = fp3_house_modifier_sunder_caliphate_duration - } - } - - scope:the_caliph = { - add_opinion = { - target = scope:sunderer - modifier = fp3_sundered_caliphate_opinion - opinion = -75 - } - # This is here to make effect order pretty - every_vassal = { - custom = fp3_sunder_the_caliphate_same_faith_vassal_tt - limit = { faith = scope:sunderer.faith } - # vassals from same religion as root gains opinion and give hook - save_scope_as = same_faith_caliph_vassal - add_opinion = { - target = scope:sunderer - modifier = fp3_sundered_caliphate_opinion - opinion = 25 - } - custom_tooltip = { - text = fp3_sunder_the_caliphate_same_faith_vassal_hook_tt - if = { - limit = { - scope:sunderer = { - can_add_hook = { - type = favor_hook - target = scope:same_faith_caliph_vassal - } - } - } - scope:sunderer = { - add_hook_no_toast = { - type = favor_hook - target = scope:same_faith_caliph_vassal - } - } - } - } - } - every_vassal = { - custom = fp3_sunder_the_caliphate_hostile_faith_vassal_tt - limit = { - faith != root.faith - faith = { - faith_hostility_level = { - target = scope:the_caliph.faith - value >= religious_cb_enabled_hostility_level - } - } - } - # vassals with faith hostile to caliph gains opinion - add_opinion = { - target = scope:sunderer - modifier = fp3_sundered_caliphate_opinion - opinion = 25 - } - } - custom_tooltip = destroys_caliph_titles_caliph_tt - if = { - limit = {title:e_arabia.holder = scope:the_caliph } - custom_tooltip = destroys_caliph_titles_arabia_tt - } - } - - # Notify players about the fall of the Caliphate - hidden_effect = { - every_player = { - limit = { - OR = { - is_vassal_of = scope:the_caliph - fp3_character_involved_in_struggle_trigger = yes - this = scope:the_caliph - } - this != scope:sunderer - } - trigger_event = fp3_struggle.0192 - } - scope:the_caliph = { - destroy_title = title:d_sunni - if = { - limit = { has_title = title:e_arabia } - destroy_title = title:e_arabia - } - } - } -} - -fp3_struggle_catalysts_for_activities_effect = { - scope:activity = { - if = { - limit = { - any_special_guest = { - always = yes - } - } - random_special_guest = { - save_scope_as = special_honorary_guest - } - } - } - if = { - limit = { - this = scope:host - scope:special_honorary_guest ?= { is_alive = yes } - scope:host = { - is_alive = yes - any_character_struggle = { - involvement = involved - activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { - CATALYST = catalyst_invite_involved_as_honorary_guests_to_feast_hunt - CHAR = scope:special_honorary_guest - } - } - } - } - scope:host = { - every_character_struggle = { - involvement = involved - limit = { phase_has_catalyst = catalyst_invite_involved_as_honorary_guests_to_feast_hunt } - activate_struggle_catalyst = { - catalyst = catalyst_invite_involved_as_honorary_guests_to_feast_hunt - character = scope:host - } - log_debug_variable_for_persian_struggle_effect = { VAR = stabil_catalyst_invite_involved_as_honorary_guests_to_feast_hunt } - } - } - } -} - -fp3_challenge_house_head_duel_challenger_win_prestige_effect = { - scope:house_challenger = { add_prestige = medium_prestige_gain } -} - -fp3_challenge_house_head_duel_challenger_win_house_effect = { - scope:house_challenger.house = { set_house_head = scope:house_challenger } - scope:house_challenger = { - custom_tooltip = { - text = fp3_challenge_house_head_recent_cooldown_tt - add_character_flag = { - flag = fp3_challenge_house_head_recent_flag - years = 3 - } - } - } -} - -fp3_challenge_house_head_duel_challenger_loss_effect = { - scope:house_challenger = { - if = { - limit = { is_alive = yes } - add_prestige = medium_prestige_loss - } - } - scope:house_head = { - add_prestige = medium_piety_value - if = { - limit = { - scope:house_challenger = { is_alive = yes } - } - add_hook_no_toast = { - type = trial_by_combat_hook - target = scope:house_challenger - } - } - custom_tooltip = { - text = fp3_challenge_house_head_recent_cooldown_tt - add_character_flag = { - flag = fp3_challenge_house_head_recent_flag - years = 3 - } - } - } -} - -# Saves Sunni holder, or the last one -fp3_save_sunni_caliph_or_previous_effect = { - if = { - limit = { exists = title:d_sunni.holder } - title:d_sunni.holder = { save_scope_as = struggle_liege } - } - else = { - title:d_sunni.previous_holder = { save_scope_as = struggle_liege } - } -} - -fp3_struggle_apply_catalyst_interloper_uninvolved_gain_struggle_titles = { - if = { - limit = { - scope:war = { - var:struggle_scope_defender ?= struggle:persian_struggle - var:struggle_involvement_defender ?= flag:involved - } - scope:attacker = { - OR = { - fp3_character_uninvolved_in_struggle_trigger = yes - fp3_character_interloper_in_struggle_trigger = yes - } - } - struggle:persian_struggle = { - phase_has_catalyst = catalyst_interloper_uninvolved_gain_struggle_titles - } - } - struggle:persian_struggle = { - activate_struggle_catalyst = { - catalyst = catalyst_interloper_uninvolved_gain_struggle_titles - character = scope:attacker - } - log_debug_variable_for_persian_struggle_effect = { VAR = concession_catalyst_interloper_uninvolved_gain_struggle_titles } - } - } -} diff --git a/N3OW/common/scripted_effects/06_dlc_ce1_epidemics_effects.txt b/N3OW/common/scripted_effects/06_dlc_ce1_epidemics_effects.txt deleted file mode 100644 index f55e46a0..00000000 --- a/N3OW/common/scripted_effects/06_dlc_ce1_epidemics_effects.txt +++ /dev/null @@ -1,924 +0,0 @@ -#grab_epidemic_disease_effect -#remove_isolated_capital_modifiers_effect - -#grabs your most important epidemic disease and saves it as a scope -#refer to it in loc as [disease_scope.GetNameNoTooltip( GetPlayer )|l] -grab_epidemic_disease_effect = { - if = { - limit = { has_trait = typhus } - trait:typhus = { save_scope_as = disease_scope } - } - else_if = { - limit = { has_trait = measles } - trait:measles = { save_scope_as = disease_scope } - } - else_if = { - limit = { has_trait = bubonic_plague } - trait:bubonic_plague = { save_scope_as = disease_scope } - } - else_if = { - limit = { has_trait = dysentery } - trait:dysentery = { save_scope_as = disease_scope } - } - else_if = { - limit = { has_trait = consumption } - trait:consumption = { save_scope_as = disease_scope } - } - else_if = { - limit = { has_trait = smallpox } - trait:smallpox = { save_scope_as = disease_scope } - } - else = { trait:ergotism = { save_scope_as = disease_scope } } -} - -# Sends a notification event to the relevant people when a province is infected -notify_holders_and_above = { - save_scope_as = infected_county - if = { - limit = { - # Just so we don't fire multiple alerts for the Black Death - scope:infected_county = { - NOT = { - any_county_province_epidemic = { - intensity = apocalyptic - epidemic_type = epidemic_type:bubonic_plague - } - } - } - } - if = { - limit = { - scope:infected_county = { - any_county_province_epidemic = { - intensity = apocalyptic - NOT = { epidemic_type = epidemic_type:bubonic_plague } - } - } - } - holder.top_liege = { - trigger_event = epidemic_events.1101 - every_vassal_or_below = { #Toast notif - limit = { - is_ai = no - NOT = { - is_target_in_variable_list = { - name = plagues_notified - target = scope:epidemic - } - } - } - add_to_variable_list = { - name = plagues_notified - target = scope:epidemic - } - send_interface_toast = { - type = msg_epidemic_outbreak - title = epidemic_events.alert_title - left_icon = scope:infected_county - custom_tooltip = epidemic_events.alert_description - } - } - } - holder = { - if = { - limit = { - is_ai = no - notified_of_plague_trigger = no - } - trigger_event = epidemic_events.1101 - } - every_liege_or_above = { - limit = { - is_ai = no - notified_of_plague_trigger = no - } - trigger_event = epidemic_events.1101 - } - every_vassal_or_below = { - limit = { - is_ai = no - notified_of_plague_trigger = no - } - trigger_event = epidemic_events.1101 - } - } - } - else_if = { - # If it's minor we send you a toast unless it's in your domain - limit = { - scope:infected_county = { - any_county_province_epidemic = { - NOR = { - epidemic_type = epidemic_type:bubonic_plague - outbreak_intensity >= major - } - } - holder = { - this != top_liege - } - } - } - if = { - limit = { - holder.top_liege = { - notified_of_plague_trigger = no - } - } - holder.top_liege = { - send_interface_toast = { - type = msg_epidemic_outbreak - title = epidemic_events.alert_title - left_icon = scope:infected_county - custom_tooltip = epidemic_events.alert_description - } - add_to_variable_list = { - name = plagues_notified - target = scope:epidemic - } - every_vassal_or_below = { #Toast notif - limit = { - is_ai = no - this != scope:infected_county.holder - notified_of_plague_trigger = no - } - add_to_variable_list = { - name = plagues_notified - target = scope:epidemic - } - send_interface_toast = { - type = msg_epidemic_outbreak - title = epidemic_events.alert_title - left_icon = scope:infected_county - custom_tooltip = epidemic_events.alert_description - } - } - } - } - if = { - limit = { - holder = { - is_ai = no - notified_of_plague_trigger = no - } - } - holder = { - trigger_event = epidemic_events.1100 - every_liege_or_above = { - limit = { - is_ai = no - notified_of_plague_trigger = no - } - send_interface_toast = { - type = msg_epidemic_outbreak - title = epidemic_events.alert_title - left_icon = scope:infected_county - custom_tooltip = epidemic_events.alert_description - } - } - every_vassal_or_below = { - limit = { - is_ai = no - notified_of_plague_trigger = no - } - send_interface_toast = { - type = msg_epidemic_outbreak - title = epidemic_events.alert_title - left_icon = scope:infected_county - custom_tooltip = epidemic_events.alert_description - } - } - } - } - } - else = { # If Major or Apocalyptic but not the Black Death - holder.top_liege = { - trigger_event = epidemic_events.1100 - every_vassal_or_below = { #Toast notif - limit = { - is_ai = no - notified_of_plague_trigger = no - } - add_to_variable_list = { - name = plagues_notified - target = scope:epidemic - } - send_interface_toast = { - type = msg_epidemic_outbreak - title = epidemic_events.alert_title - left_icon = scope:infected_county - custom_tooltip = epidemic_events.alert_description - } - } - } - holder = { - if = { - limit = { - is_ai = no - notified_of_plague_trigger = no - } - trigger_event = epidemic_events.1100 - } - every_liege_or_above = { - limit = { - is_ai = no - NOT = { - is_target_in_variable_list = { - name = plagues_notified - target = scope:epidemic - } - } - } - trigger_event = epidemic_events.1100 - } - every_vassal_or_below = { - limit = { - is_ai = no - notified_of_plague_trigger = no - } - trigger_event = epidemic_events.1100 - } - } - } - } -} -# Start Black Death event chain -start_black_death_chain_effect = { - holder ?= { - save_scope_as = black_death_holder - } - every_ruler = { - if = { - limit = { - is_ai = no - in_diplomatic_range = scope:black_death_holder - NOT = { - any_owned_story = { - type = story_cycle_black_death - } - } - } - trigger_event = epidemic_events.5999 - } - every_liege_or_above = { - limit = { - is_ai = no - in_diplomatic_range = scope:black_death_holder - NOT = { - any_owned_story = { - type = story_cycle_black_death - } - } - } - trigger_event = epidemic_events.5999 - } - } -} - -# Grabs a courtier who would plausibly be superstitious -get_superstitious_courtier_effect = { - if = { - limit = { - any_courtier_or_guest = { - is_available_adult = yes - OR = { - learning <= mediocre_skill_rating - has_trait = intellect_bad - has_trait = dull - has_character_modifier = bp1_superstition_modifier - } - } - } - random_courtier_or_guest = { - limit = { - is_available_adult = yes - OR = { - learning <= mediocre_skill_rating - has_trait = intellect_bad - has_trait = dull - has_character_modifier = bp1_superstition_modifier - } - } - save_scope_as = superstitious_courtier - } - } - else = { - random_courtier_or_guest = { - limit = { - is_available_adult = yes - } - save_scope_as = superstitious_courtier - } - } -} - -get_random_realm_epidemic = { - random_sub_realm_county = { - limit = { - any_county_province_epidemic = { outbreak_intensity >= $INTENSITY$ } - } - weight = { - base = 1 - modifier = { - add = 750 - has_province_with_epidemic = { intensity >= apocalyptic } - } - modifier = { - add = 5 - has_province_with_epidemic = { intensity >= major } - } - } - random_county_province = { - limit = { - any_province_epidemic = { - outbreak_intensity >= $INTENSITY$ - } - } - weight = { - base = 1 - modifier = { - add = 750 - any_province_epidemic = { - intensity >= apocalyptic - } - } - modifier = { - add = 5 - any_province_epidemic = { - intensity >= major - } - } - } - random_province_epidemic = { - limit = { - outbreak_intensity >= $INTENSITY$ - } - weight = { - base = 1 - modifier = { - add = 750 - outbreak_intensity >= apocalyptic - } - modifier = { - add = 5 - outbreak_intensity >= major - } - } - save_scope_as = epidemic_scope - } - } - } -} - -get_random_nearby_realm_epidemic = { - random_sub_realm_county = { - limit = { - any_county_province = { - OR = { - county.holder = root - squared_distance = { - target = root.capital_province - value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). - } - } - any_province_epidemic = { - outbreak_intensity >= $INTENSITY$ - } - } - } - weight = { - base = 1 - modifier = { - add = 750 - has_province_with_epidemic = { intensity >= apocalyptic } - } - modifier = { - add = 5 - has_province_with_epidemic = { intensity >= major } - } - } - random_county_province = { - limit = { - any_province_epidemic = { - outbreak_intensity >= $INTENSITY$ - } - } - weight = { - base = 1 - modifier = { - add = 750 - any_province_epidemic = { - intensity >= apocalyptic - } - } - modifier = { - add = 5 - any_province_epidemic = { - intensity >= major - } - } - } - random_province_epidemic = { - limit = { - outbreak_intensity >= $INTENSITY$ - } - weight = { - base = 1 - modifier = { - add = 750 - outbreak_intensity >= apocalyptic - } - modifier = { - add = 5 - outbreak_intensity >= major - } - } - save_scope_as = epidemic_scope - } - } - } -} - -# Epidemic treatment effect -epidemic_prevention_effect = { - $PHYSICIAN$ = { save_scope_as = physician } - # Apply prevention - if = { - limit = { - $PREVENTION_LEVEL$ = 1 - } - custom_tooltip = minor_epidemic_treatment.tt - hidden_effect = { - # OUTCOME RANDOMIZATION - random_list = { - 70 = { # Success - modifier = { - factor = scope:physician.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) - } - trigger_event = { id = physician_epidemic_events.1021 days = { 3 14 } } #Safe prevention sucess - } - 30 = { # Failure - trigger_event = { id = physician_epidemic_events.1022 days = { 3 14 } } #Safe prevention failure - } - } - } - } - if = { - limit = { - $PREVENTION_LEVEL$ = 2 - } - custom_tooltip = moderate_epidemic_treatment.tt - # OUTCOME RANDOMIZATION - hidden_effect = { - random_list = { - 1 = { #Success - modifier = { - scope:physician = { - learning >= mediocre_skill_rating - learning < medium_skill_rating - } - factor = 2 - } - modifier = { - scope:physician = { - learning >= medium_skill_rating - learning < decent_skill_rating - } - factor = 4 - } - modifier = { - scope:physician = { - learning >= decent_skill_rating - learning < high_skill_rating - } - factor = 7 - } - modifier = { - scope:physician = { - learning >= high_skill_rating - } - factor = 10 - } - modifier = { - scope:physician = { has_trait = lifestyle_physician } - factor = 2 - } - modifier = { - scope:physician = { - has_trait = lifestyle_physician - has_trait_xp = { - trait = lifestyle_physician - value >= 50 - } - } - factor = 5 - } - modifier = { - scope:physician = { - has_trait = lifestyle_physician - has_trait_xp = { - trait = lifestyle_physician - value >= 100 - } - } - factor = 5 - } - trigger_event = { id = physician_epidemic_events.1023 days = { 3 14 } } #success - } - 10 = { #Failure - trigger_event = { id = physician_epidemic_events.1024 days = { 3 14 } } #Failure - } - } - } - } - if = { - limit = { - $PREVENTION_LEVEL$ = 3 - } - custom_tooltip = mystic_epidemic_treatment.tt - # OUTCOME RANDOMIZATION - hidden_effect = { - random_list = { - 1 = { #Success - modifier = { - scope:physician = { - learning >= mediocre_skill_rating - learning < medium_skill_rating - } - factor = 2 - } - modifier = { - scope:physician = { - learning >= medium_skill_rating - learning < decent_skill_rating - } - factor = 4 - } - modifier = { - scope:physician = { - learning >= decent_skill_rating - learning < high_skill_rating - } - factor = 7 - } - modifier = { - scope:physician = { - learning >= high_skill_rating - } - factor = 10 - } - modifier = { - scope:physician = { has_trait = lifestyle_mystic } - factor = 2 - } - modifier = { - scope:physician = { - has_trait = lifestyle_mystic - has_trait_xp = { - trait = lifestyle_mystic - value >= 50 - } - } - factor = 5 - } - modifier = { - scope:physician = { - has_trait = lifestyle_mystic - has_trait_xp = { - trait = lifestyle_mystic - value >= 50 - } - } - factor = 5 - } - - #Critical or normal success? - random_list = { - 1 = { - modifier = { - scope:physician = { has_trait = lifestyle_physician } - factor = 1.5 - } - modifier = { - scope:physician = { - has_trait = lifestyle_physician - has_trait_xp = { - trait = lifestyle_physician - value >= 50 - } - } - factor = 2 - } - modifier = { - scope:physician = { - has_trait = lifestyle_physician - has_trait_xp = { - trait = lifestyle_physician - value >= 50 - } - } - factor = 3 - } - trigger_event = { id = physician_epidemic_events.1025 days = { 3 14 } } #Critical success - } - 5 = { - trigger_event = { id = physician_epidemic_events.1023 days = { 3 14 } } #Normal success - } - } - } - 10 = { #Failure - #Critical or normal failure? - random_list = { - 1 = { - trigger_event = { id = physician_epidemic_events.1026 days = { 3 14 } } #Critical failure - } - 5 = { - trigger_event = { id = physician_epidemic_events.1024 days = { 3 14 } } #Failure - } - } - } - } - } - } -} - -remove_isolated_capital_modifiers_effect = { - if = { - limit = { - has_county_modifier = isolate_capital_decision_modifier - NOT = { - any_county_province = { - this != root - any_province_epidemic = { - this = scope:epidemic - } - } - } - } - remove_county_modifier = isolate_capital_decision_modifier - } - if = { - limit = { - holder.top_liege = { - any_sub_realm_county = { has_county_modifier = isolate_capital_decision_modifier } - } - holder.top_liege = { - NOT = { - any_sub_realm_county = { - any_county_province = { - this != root - any_province_epidemic = { - this = scope:epidemic - } - } - } - } - } - } - holder.top_liege = { - every_sub_realm_county = { - limit = { - has_county_modifier = isolate_capital_decision_modifier - } - remove_county_modifier = isolate_capital_decision_modifier - } - } - } -} - -give_epidemic_immunity = { - if = { - limit = { - $EPIDEMIC$.epidemic_type.epidemic_trait = trait:measles - } - add_character_flag = measles_immunity - } - if = { - limit = { - $EPIDEMIC$.epidemic_type.epidemic_trait = trait:bubonic_plague - } - add_character_flag = bubonic_immunity - } - add_to_variable_list = { - name = immunised_plagues - target = $EPIDEMIC$ - } -} - -add_plague_county_modifiers = { - if = { - limit = { - any_sub_realm_county = { - development_level >= 30 - } - } - show_as_tooltip = { # Show as tooltip to reduce tooltip size - every_sub_realm_county = { - custom = shattered_by_plague_tt - add_county_modifier = { - modifier = shattered_by_plague - years = 10 - } - } - } - } - if = { - limit = { - any_sub_realm_county = { - AND = { - development_level >= 20 - development_level < 30 - } - } - } - show_as_tooltip = { # Show as tooltip to reduce tooltip size - every_sub_realm_county = { - custom = ravaged_by_plague_tt - add_county_modifier = { - modifier = ravaged_by_plague - years = 10 - } - } - } - } - if = { - limit = { - any_sub_realm_county = { - AND = { - development_level >= 15 - development_level < 20 - } - } - } - show_as_tooltip = { # Show as tooltip to reduce tooltip size - every_sub_realm_county = { - custom = blighted_by_plague_tt - add_county_modifier = { - modifier = blighted_by_plague - years = 10 - } - } - } - } - if = { - limit = { - any_sub_realm_county = { - AND = { - development_level >= 10 - development_level < 15 - } - } - } - show_as_tooltip = { # Show as tooltip to reduce tooltip size - every_sub_realm_county = { - custom = struck_by_plague_tt - add_county_modifier = { - modifier = struck_by_plague - years = 10 - } - } - } - } - hidden_effect = { - every_sub_realm_county = { - if = { # Refresh the modifier for new plagues - limit = { - has_county_modifier = struck_by_plague - } - remove_county_modifier = struck_by_plague - } - else_if = { - limit = { - has_county_modifier = blighted_by_plague - } - remove_county_modifier = blighted_by_plague - } - else_if = { - limit = { - has_county_modifier = ravaged_by_plague - } - remove_county_modifier = ravaged_by_plague - } - else_if = { - limit = { - has_county_modifier = shattered_by_plague - } - remove_county_modifier = shattered_by_plague - } - } - every_sub_realm_county = { - limit = { - development_level >= 30 - } - add_county_modifier = { - modifier = shattered_by_plague - years = 10 - } - } - every_sub_realm_county = { - limit = { - AND = { - development_level >= 20 - development_level < 30 - } - } - add_county_modifier = { - modifier = ravaged_by_plague - years = 10 - } - } - every_sub_realm_county = { - limit = { - AND = { - development_level >= 15 - development_level < 20 - } - } - add_county_modifier = { - modifier = blighted_by_plague - years = 10 - } - } - every_sub_realm_county = { - limit = { - AND = { - development_level >= 10 - development_level < 15 - } - } - add_county_modifier = { - modifier = struck_by_plague - years = 10 - } - } - } -} - -plague_recovery_event_effect = { - scope:epidemic = { save_scope_as = epidemic } - county.holder.liege = { - add_to_variable_list = { - name = formerly_infected_counties - target = root.county - years = 10 - } - if = { - limit = { - any_sub_realm_county = { - any_county_province = { - count = 1 - any_province_epidemic = { - count = 1 - } - } - } - } - trigger_event = { - id = epidemic_events.0110 - days = 1 - } - } - } -} - -cant_touch_this_achievement_effect = { - if = { - limit = { - county.holder = { - OR = { - this = { is_ai = no } - any_liege_or_above = { is_ai = no } - } - } - epidemic_resistance >= 100 - } - county.holder = { - add_achievement_global_variable_effect = { - VARIABLE = ce1_cant_touch_this_achievement_unlocked - VALUE = yes - } - } - } -} - -# this = county to apply to -# scope:epidemic = epidemic infecting -# BASE = how much to apply by default for this epidemic type -apply_infection_development_loss = { - save_temporary_scope_value_as = { - name = base_loss - value = $BASE$ - } - change_development_progress_with_overflow = epidemic_development_loss_value -} - -apply_infection_fertility_loss = { - save_temporary_scope_value_as = { - name = base_loss - value = $BASE$ - } - change_county_fertility = epidemic_fertility_loss_value -} diff --git a/N3OW/common/scripted_effects/06_dlc_ce1_leg_b_effects.txt b/N3OW/common/scripted_effects/06_dlc_ce1_leg_b_effects.txt deleted file mode 100644 index 5571aa50..00000000 --- a/N3OW/common/scripted_effects/06_dlc_ce1_leg_b_effects.txt +++ /dev/null @@ -1,903 +0,0 @@ -# get_building_name_effect - assigns a randomised name to your legendary building - -get_building_name_effect = { - random_list = { - 10 = { - trigger = { - scope:legendary_province = { has_building = legendary_shrine } - NOT = { - has_character_flag = shrine_of_highgod - } - } - if = { - limit = { is_ai = yes } - set_variable = { - name = leg_b_name - value = flag:shrine_of_highgod - } - } - else = { - add_character_flag = shrine_of_highgod - } - } - 10 = { - trigger = { - scope:legendary_province = { has_building = legendary_shrine } - NOT = { - has_character_flag = province_shrine - } - } - if = { - limit = { is_ai = yes } - set_variable = { - name = leg_b_name - value = flag:province_shrine - } - } - else = { - add_character_flag = province_shrine - } - } - 10 = { - trigger = { - scope:legendary_province = { has_building = legendary_shrine } - NOT = { - has_character_flag = shrine_of_healthgod - } - } - if = { - limit = { is_ai = yes } - set_variable = { - name = leg_b_name - value = flag:shrine_of_healthgod - } - } - else = { - add_character_flag = shrine_of_healthgod - } - } - 10 = { - trigger = { - scope:legendary_province = { has_building = legendary_shrine } - NOT = { - has_character_flag = shrine_of_fertilitygod - } - } - if = { - limit = { is_ai = yes } - set_variable = { - name = leg_b_name - value = flag:shrine_of_fertilitygod - } - } - else = { - add_character_flag = shrine_of_fertilitygod - } - } - 10 = { - trigger = { - scope:legendary_province = { has_building = legendary_shrine } - NOT = { - has_character_flag = shrine_of_wealthgod - } - } - if = { - limit = { is_ai = yes } - set_variable = { - name = leg_b_name - value = flag:shrine_of_wealthgod - } - } - else = { - add_character_flag = shrine_of_wealthgod - } - } - 10 = { - trigger = { - scope:legendary_province = { has_building = legendary_shrine } - NOT = { - has_character_flag = shrine_of_wisdom - } - } - if = { - limit = { is_ai = yes } - set_variable = { - name = leg_b_name - value = flag:shrine_of_wisdom - } - } - else = { - add_character_flag = shrine_of_wisdom - } - } - 10 = { - trigger = { - scope:legendary_province = { has_building = legendary_shrine } - NOT = { - has_character_flag = shrine_of_courage - } - } - if = { - limit = { is_ai = yes } - set_variable = { - name = leg_b_name - value = flag:shrine_of_courage - } - } - else = { - add_character_flag = shrine_of_courage - } - } - 10 = { - trigger = { - scope:legendary_province = { has_building = legendary_shrine } - NOT = { - has_character_flag = wargods_rest - } - } - if = { - limit = { is_ai = yes } - set_variable = { - name = leg_b_name - value = flag:wargods_rest - } - } - else = { - add_character_flag = wargods_rest - } - } - 10 = { - trigger = { - scope:legendary_province = { has_building = legendary_shrine } - scope:legendary_province = { exists = var:legendary_figure } - NOT = { - has_character_flag = figures_mount - } - } - if = { - limit = { is_ai = yes } - set_variable = { - name = leg_b_name - value = flag:figures_mount - } - } - else = { - add_character_flag = figures_mount - } - } - 10 = { - trigger = { - scope:legendary_province = { has_building = legendary_shrine } - scope:legendary_province = { exists = var:legendary_figure } - NOT = { - has_character_flag = figures_temple - } - } - if = { - limit = { is_ai = yes } - set_variable = { - name = leg_b_name - value = flag:figures_temple - } - } - else = { - add_character_flag = figures_temple - } - } - 10 = { - trigger = { - scope:legendary_province = { has_building = legendary_shrine } - scope:legendary_province = { exists = var:legendary_figure } - NOT = { - has_character_flag = figures_shrine - } - } - if = { - limit = { is_ai = yes } - set_variable = { - name = leg_b_name - value = flag:figures_shrine - } - } - else = { - add_character_flag = figures_shrine - } - } - 10 = { - trigger = { - scope:legendary_province = { has_building = legendary_shrine } - scope:legendary_province = { exists = var:legendary_figure } - NOT = { - has_character_flag = figures_rest - } - } - if = { - limit = { is_ai = yes } - set_variable = { - name = leg_b_name - value = flag:figures_rest - } - } - else = { - add_character_flag = figures_rest - } - } - 10 = { - trigger = { - scope:legendary_province = { has_building = legendary_shrine } - scope:legendary_province = { exists = var:legendary_figure } - NOT = { - has_character_flag = figure_at_province - } - } - if = { - limit = { is_ai = yes } - set_variable = { - name = leg_b_name - value = flag:figure_at_province - } - } - else = { - add_character_flag = figure_at_province - } - } - 10 = { - trigger = { - scope:legendary_province = { has_building = legendary_palace } - OR = { - is_female = yes - any_spouse = { is_female = yes } - } - NOT = { - has_character_flag = queens_palace - } - } - if = { - limit = { is_ai = yes } - set_variable = { - name = leg_b_name - value = flag:queens_palace - } - } - else = { - add_character_flag = queens_palace - } - } - 10 = { - trigger = { - scope:legendary_province = { has_building = legendary_palace } - OR = { - is_male = yes - any_spouse = { is_male = yes } - } - NOT = { - has_character_flag = kings_palace - } - } - if = { - limit = { is_ai = yes } - set_variable = { - name = leg_b_name - value = flag:kings_palace - } - } - else = { - add_character_flag = kings_palace - } - } - 10 = { - trigger = { - scope:legendary_province = { has_building = legendary_palace } - NOT = { - has_character_flag = province_hall - } - } - if = { - limit = { is_ai = yes } - set_variable = { - name = leg_b_name - value = flag:province_hall - } - } - else = { - add_character_flag = province_hall - } - } - 10 = { - trigger = { - scope:legendary_province = { has_building = legendary_palace } - scope:legendary_province = { exists = var:legendary_figure } - NOT = { - has_character_flag = dynasty_hall - } - } - if = { - limit = { is_ai = yes } - set_variable = { - name = leg_b_name - value = flag:dynasty_hall - } - } - else = { - add_character_flag = dynasty_hall - } - } - 10 = { - trigger = { - scope:legendary_province = { has_building = legendary_palace } - scope:legendary_province = { exists = var:legendary_figure } - NOT = { - has_character_flag = dynasty_house - } - } - if = { - limit = { is_ai = yes } - set_variable = { - name = leg_b_name - value = flag:dynasty_house - } - } - else = { - add_character_flag = dynasty_house - } - } - 10 = { - trigger = { - scope:legendary_province = { has_building = legendary_palace } - scope:legendary_province = { exists = var:legendary_figure } - NOT = { - has_character_flag = figures_manor - } - } - if = { - limit = { is_ai = yes } - set_variable = { - name = leg_b_name - value = flag:figures_manor - } - } - else = { - add_character_flag = figures_manor - } - } - 10 = { - trigger = { - scope:legendary_province = { has_building = legendary_palace } - scope:legendary_province = { exists = var:legendary_figure } - NOT = { - has_character_flag = location_house - } - } - if = { - limit = { is_ai = yes } - set_variable = { - name = leg_b_name - value = flag:location_house - } - } - else = { - add_character_flag = location_house - } - } - 10 = { - trigger = { - scope:legendary_province = { has_building = legendary_statue } - scope:legendary_province = { exists = var:legendary_figure } - NOT = { - has_character_flag = figures_glory - } - } - if = { - limit = { is_ai = yes } - set_variable = { - name = leg_b_name - value = flag:figures_glory - } - } - else = { - add_character_flag = figures_glory - } - } - 10 = { - trigger = { - scope:legendary_province = { has_building = legendary_statue } - scope:legendary_province = { exists = var:legendary_figure } - NOT = { - has_character_flag = figure_at_province - } - } - if = { - limit = { is_ai = yes } - set_variable = { - name = leg_b_name - value = flag:figure_at_province - } - } - else = { - add_character_flag = figure_at_province - } - } - 10 = { - trigger = { - scope:legendary_province = { has_building = legendary_statue } - scope:legendary_province = { exists = var:legendary_figure } - NOT = { - has_character_flag = great_statue_of_figure - } - } - if = { - limit = { is_ai = yes } - set_variable = { - name = leg_b_name - value = flag:great_statue_of_figure - } - } - else = { - add_character_flag = great_statue_of_figure - } - } - 10 = { - trigger = { - scope:legendary_province = { has_building = legendary_statue } - NOT = { - has_character_flag = hero_of_province - } - } - if = { - limit = { is_ai = yes } - set_variable = { - name = leg_b_name - value = flag:hero_of_province - } - } - else = { - add_character_flag = hero_of_province - } - } - 10 = { - trigger = { - scope:legendary_province = { has_building = legendary_statue } - NOT = { - has_character_flag = great_statue_at_province - } - } - if = { - limit = { is_ai = yes } - set_variable = { - name = leg_b_name - value = flag:great_statue_at_province - } - } - else = { - add_character_flag = great_statue_at_province - } - } - 10 = { - trigger = { - scope:legendary_province = { has_building = legendary_statue } - NOT = { - has_character_flag = heros_honor - } - } - if = { - limit = { is_ai = yes } - set_variable = { - name = leg_b_name - value = flag:heros_honor - } - } - else = { - add_character_flag = heros_honor - } - } - 10 = { - trigger = { - scope:legendary_province = { has_building = legendary_watchtower } - NOT = { - has_character_flag = great_tower_of_province - } - } - if = { - limit = { is_ai = yes } - set_variable = { - name = leg_b_name - value = flag:great_tower_of_province - } - } - else = { - add_character_flag = great_tower_of_province - } - } - 10 = { - trigger = { - scope:legendary_province = { has_building = legendary_watchtower } - NOT = { - has_character_flag = province_watchtower - } - } - if = { - limit = { is_ai = yes } - set_variable = { - name = leg_b_name - value = flag:province_watchtower - } - } - else = { - add_character_flag = province_watchtower - } - } - 10 = { - trigger = { - scope:legendary_province = { has_building = legendary_watchtower } - NOT = { - has_character_flag = province_castle - } - } - if = { - limit = { is_ai = yes } - set_variable = { - name = leg_b_name - value = flag:province_castle - } - } - else = { - add_character_flag = province_castle - } - } - 10 = { - trigger = { - scope:legendary_province = { has_building = legendary_watchtower } - scope:legendary_province = { exists = var:legendary_figure } - NOT = { - has_character_flag = figures_tower - } - } - if = { - limit = { is_ai = yes } - set_variable = { - name = leg_b_name - value = flag:figures_tower - } - } - else = { - add_character_flag = figures_tower - } - } - 10 = { - trigger = { - scope:legendary_province = { has_building = legendary_watchtower } - scope:legendary_province = { exists = var:legendary_figure } - NOT = { - has_character_flag = dynasty_tower - } - } - if = { - limit = { is_ai = yes } - set_variable = { - name = leg_b_name - value = flag:dynasty_tower - } - } - else = { - add_character_flag = dynasty_tower - } - } - 10 = { - trigger = { - scope:legendary_province = { has_building = legendary_hunting_lodge } - NOT = { - has_character_flag = province_lodge - } - } - if = { - limit = { is_ai = yes } - set_variable = { - name = leg_b_name - value = flag:province_lodge - } - } - else = { - add_character_flag = province_lodge - } - } - 10 = { - trigger = { - scope:legendary_province = { has_building = legendary_hunting_lodge } - NOT = { - has_character_flag = great_lodge_of_province - } - } - if = { - limit = { is_ai = yes } - set_variable = { - name = leg_b_name - value = flag:great_lodge_of_province - } - } - else = { - add_character_flag = great_lodge_of_province - } - } - 10 = { - trigger = { - scope:legendary_province = { has_building = legendary_hunting_lodge } - NOT = { - has_character_flag = lodge_of_wargod - } - } - if = { - limit = { is_ai = yes } - set_variable = { - name = leg_b_name - value = flag:lodge_of_wargod - } - } - else = { - add_character_flag = lodge_of_wargod - } - } - 10 = { - trigger = { - scope:legendary_province = { has_building = legendary_hunting_lodge } - scope:legendary_province = { exists = var:legendary_figure } - NOT = { - has_character_flag = figures_lodge - } - } - if = { - limit = { is_ai = yes } - set_variable = { - name = leg_b_name - value = flag:figures_lodge - } - } - else = { - add_character_flag = figures_lodge - } - } - 10 = { - trigger = { - scope:legendary_province = { has_building = legendary_hunting_lodge } - scope:legendary_province = { exists = var:legendary_figure } - NOT = { - has_character_flag = dynasty_lodge - } - } - if = { - limit = { is_ai = yes } - set_variable = { - name = leg_b_name - value = flag:dynasty_lodge - } - } - else = { - add_character_flag = dynasty_lodge - } - } - } -} - -legendary_building_0001_cleanup = { - if = { - limit = { - has_character_flag = shrine_of_highgod - } - remove_character_flag = shrine_of_highgod - } - if = { - limit = { - has_character_flag = province_shrine - } - remove_character_flag = province_shrine - } - if = { - limit = { - has_character_flag = shrine_of_healthgod - } - remove_character_flag = shrine_of_healthgod - } - if = { - limit = { - has_character_flag = shrine_of_fertilitygod - } - remove_character_flag = shrine_of_fertilitygod - } - if = { - limit = { - has_character_flag = shrine_of_wealthgod - } - remove_character_flag = shrine_of_wealthgod - } - if = { - limit = { - has_character_flag = shrine_of_wisdom - } - remove_character_flag = shrine_of_wisdom - } - if = { - limit = { - has_character_flag = shrine_of_courage - } - remove_character_flag = shrine_of_courage - } - if = { - limit = { - has_character_flag = wargods_rest - } - remove_character_flag = wargods_rest - } - if = { - limit = { - has_character_flag = figures_mount - } - remove_character_flag = figures_mount - } - if = { - limit = { - has_character_flag = figures_temple - } - remove_character_flag = figures_temple - } - if = { - limit = { - has_character_flag = figures_shrine - } - remove_character_flag = figures_shrine - } - if = { - limit = { - has_character_flag = figures_rest - } - remove_character_flag = figures_rest - } - if = { - limit = { - has_character_flag = figure_at_province - } - remove_character_flag = figure_at_province - } - if = { - limit = { - has_character_flag = queens_palace - } - remove_character_flag = queens_palace - } - if = { - limit = { - has_character_flag = kings_palace - } - remove_character_flag = kings_palace - } - if = { - limit = { - has_character_flag = province_hall - } - remove_character_flag = province_hall - } - if = { - limit = { - has_character_flag = dynasty_hall - } - remove_character_flag = dynasty_hall - } - if = { - limit = { - has_character_flag = dynasty_house - } - remove_character_flag = dynasty_house - } - if = { - limit = { - has_character_flag = figures_manor - } - remove_character_flag = figures_manor - } - if = { - limit = { - has_character_flag = location_house - } - remove_character_flag = location_house - } - if = { - limit = { - has_character_flag = figures_glory - } - remove_character_flag = figures_glory - } - if = { - limit = { - has_character_flag = figure_at_province - } - remove_character_flag = figure_at_province - } - if = { - limit = { - has_character_flag = great_statue_of_figure - } - remove_character_flag = great_statue_of_figure - } - if = { - limit = { - has_character_flag = hero_of_province - } - remove_character_flag = hero_of_province - } - if = { - limit = { - has_character_flag = great_statue_at_province - } - remove_character_flag = great_statue_at_province - } - if = { - limit = { - has_character_flag = heros_honor - } - remove_character_flag = heros_honor - } - if = { - limit = { - has_character_flag = great_tower_of_province - } - remove_character_flag = great_tower_of_province - } - if = { - limit = { - has_character_flag = province_watchtower - } - remove_character_flag = province_watchtower - } - if = { - limit = { - has_character_flag = province_castle - } - remove_character_flag = province_castle - } - if = { - limit = { - has_character_flag = figures_tower - } - remove_character_flag = figures_tower - } - if = { - limit = { - has_character_flag = dynasty_tower - } - remove_character_flag = dynasty_tower - } - if = { - limit = { - has_character_flag = province_lodge - } - remove_character_flag = province_lodge - } - if = { - limit = { - has_character_flag = great_lodge_of_province - } - remove_character_flag = great_lodge_of_province - } - if = { - limit = { - has_character_flag = lodge_of_wargod - } - remove_character_flag = lodge_of_wargod - } - if = { - limit = { - has_character_flag = figures_lodge - } - remove_character_flag = figures_lodge - } - if = { - limit = { - has_character_flag = dynasty_lodge - } - remove_character_flag = dynasty_lodge - } - if = { - limit = { - exists = var:leg_b_name - } - remove_variable = leg_b_name - } -} diff --git a/N3OW/common/scripted_effects/06_dlc_ce1_legend_effects.txt b/N3OW/common/scripted_effects/06_dlc_ce1_legend_effects.txt deleted file mode 100644 index 7900fedf..00000000 --- a/N3OW/common/scripted_effects/06_dlc_ce1_legend_effects.txt +++ /dev/null @@ -1,3024 +0,0 @@ -#grab_appropriate_chronicler_effect -#grab_appropriate_bard_feast_effect - this one doesn't check if they're available, so it can be used in activities -#grab_appropriate_bard_effect - this one checks if they're available -#grab_mythical_founder_effect -#disburse_hunt_legend_seeds -#change_legend_quality_effect - This adjusts the quality of a legend using an invisible progress bar that goes from 0-100. When it hits 100, the legend increases one step in quality, if it dips below 0, the legend loses one step in quality -#legend_completion_quality_flag_effect -#legend_ending_rewards_heroic_effect -#legend_ending_rewards_holy_effect -#legend_ending_rewards_legitimizing_effect -#legend_completion_type_flag_effect -#get_appropriate_ancient_people - this looks for regionally appropriate ancient people for you to lay claim to -# get_appropriate_exotic_location - Atlantis, Vinland, places of dubious historicity -# generate_godly_descent_seed_support_effect - create a godly descent seed based on loc keys -# generate_religion_descent_effect - generate a godly descent seed based on scopes -# balancing_legend_global_var_effect -# send_interface_message_legend_notification_effect -# send_interface_toast_legend_notification_effect -# create_swan_knight_legend_seed_effect - -grab_appropriate_chronicler_effect = { - if = { #If the culture would have relied on poets for this we grab them first - limit = { - OR = { - culture = { - OR = { - has_cultural_tradition = tradition_fp1_northern_stories - has_cultural_parameter = poet_trait_gives_bonuses - has_cultural_tradition = tradition_storytellers - has_cultural_tradition = tradition_chanson_de_geste - } - } - faith = { - trait_is_virtue = lifestyle_poet - } - } - any_court_position_holder = { - type = court_poet_court_position - is_available_ai_adult = yes - } - } - random_court_position_holder = { - type = court_poet_court_position - limit = { - is_available_ai_adult = yes - } - save_scope_as = chronicler - } - } - else_if = { #Otherwise we go for the Chronicler first - limit = { - any_court_position_holder = { - type = chronicler_court_position - is_available_ai_adult = yes - } - } - random_court_position_holder = { - type = chronicler_court_position - limit = { - is_available_ai_adult = yes - } - save_scope_as = chronicler - } - } - else_if = { - limit = { - any_court_position_holder = { - type = court_poet_court_position - is_available_ai_adult = yes - } - } - random_court_position_holder = { - type = court_poet_court_position - limit = { - is_available_ai_adult = yes - } - save_scope_as = chronicler - } - } - else_if = { - limit = { - any_court_position_holder = { - type = court_musician_court_position - is_available_ai_adult = yes - } - } - random_court_position_holder = { - type = court_musician_court_position - limit = { - is_available_ai_adult = yes - } - save_scope_as = chronicler - } - } - else = { - ordered_courtier = { - limit = { - this != root - is_available_ai_adult = yes - } - order_by = { - value = diplomacy - if = { - limit = { - OR = { - has_trait = lifestyle_poet - has_trait = journaller - } - } - add = 10 - } - if = { - limit = { is_spouse_of = root } - add = -2 - } - } - save_scope_as = chronicler - } - } -} - -grab_appropriate_bard_feast_effect = { - if = { - limit = { - employs_court_position = court_musician_court_position - scope:activity = { - any_attending_character = { - employer = root - has_court_position = court_musician_court_position - is_physically_able_ai_adult = yes - } - } - } - scope:activity = { - random_attending_character = { - limit = { - employer = root - has_court_position = court_musician_court_position - is_physically_able_ai_adult = yes - } - save_scope_as = bard - } - } - } - else_if = { - limit = { - employs_court_position = court_poet_court_position - scope:activity = { - any_attending_character = { - employer = root - has_court_position = court_poet_court_position - is_physically_able_ai_adult = yes - } - } - } - scope:activity = { - random_attending_character = { - limit = { - employer = root - has_court_position = court_poet_court_position - is_physically_able_ai_adult = yes - } - save_scope_as = bard - } - } - } - else_if = { - limit = { - scope:activity = { - any_attending_character = { - OR = { - is_vassal_of = root - is_courtier_of = root - } - this != root - NOT = { is_spouse_of = root } - NOT = { is_child_of = root } - NOT = { is_councillor_of = root } - is_physically_able_ai_adult = yes - } - } - } - scope:activity = { - ordered_attending_character = { - limit = { - OR = { - is_vassal_of = root - is_courtier_of = root - } - this != root - NOT = { is_spouse_of = root } - NOT = { is_child_of = root } - is_physically_able_ai_adult = yes - } - order_by = { - value = diplomacy - if = { - limit = { - has_trait = lifestyle_poet - } - add = 10 - } - if = { - limit = { - has_trait = journaller - } - add = 5 - } - } - } - save_scope_as = bard - } - } - else = { - create_character = { - template = bard_template - dynasty = none - location = root.location - gender_female_chance = root_faith_dominant_gender_female_chance - save_scope_as = bard - } - } -} - -grab_appropriate_bard_effect = { - if = { - limit = { - employs_court_position = court_musician_court_position - any_court_position_holder = { - type = court_musician_court_position - is_available_healthy_ai_adult = yes - } - } - random_court_position_holder = { - type = court_musician_court_position - limit = { is_available_healthy_ai_adult = yes } - save_scope_as = bard - } - } - else_if = { - limit = { - employs_court_position = court_poet_court_position - any_court_position_holder = { - type = court_poet_court_position - is_available_healthy_ai_adult = yes - } - } - random_court_position_holder = { - type = court_poet_court_position - limit = { is_available_healthy_ai_adult = yes } - save_scope_as = bard - } - } - else_if = { - limit = { - any_courtier = { - this != root - NOT = { is_spouse_of = root } - NOT = { is_child_of = root } - NOT = { is_councillor_of = root } - is_available_healthy_ai_adult = yes - } - } - ordered_courtier = { - limit = { - this != root - NOT = { is_spouse_of = root } - NOT = { is_child_of = root } - NOT = { is_councillor_of = root } - is_available_healthy_ai_adult = yes - } - order_by = { - value = diplomacy - if = { - limit = { - has_trait = lifestyle_poet - } - add = 10 - } - if = { - limit = { - has_trait = journaller - } - add = 5 - } - } - save_scope_as = bard - } - } - else = { - create_character = { - template = bard_template - dynasty = none - location = root.location - gender_female_chance = root_faith_dominant_gender_female_chance - save_scope_as = bard - } - } -} - -grab_mythical_founder_effect = { - hidden_effect = { - if = { - limit = { - NOT = { exists = var:mythical_ancestor_var } - } - random_list = { - 10 = { # Charles Martell - trigger = { - AND = { - OR = { - root.primary_title = title:k_france - root.primary_title = title:e_france - } - current_date > 1000.1.1 - } - } - set_variable = { name = mythical_ancestor_var value = flag:charles_martell } - } - 10 = { # Alexander the Great - trigger = { - OR = { - root.primary_title = title:k_thessalonika - root.primary_title = title:k_hellas - root.primary_title = title:k_egypt - AND = { - OR = { - root.primary_title = title:k_persia - root.primary_title = title:e_persia - } - NOR = { - root.faith.religion = religion:islam_religion - root.faith.religion = religion:zoroastrianism_religion - } - } - root.primary_title = title:k_anatolia - } - } - set_variable = { name = mythical_ancestor_var value = flag:alexander } - } - 10 = { # Lech - trigger = { - root.primary_title = title:k_poland - } - set_variable = { name = mythical_ancestor_var value = flag:lech } - } - 10 = { # Czech - trigger = { - OR = { - root.primary_title = title:k_bohemia - root.primary_title = title:d_bohemia - } - } - set_variable = { name = mythical_ancestor_var value = flag:czech } - } - 10 = { # Rus - trigger = { - OR = { - root.primary_title = title:k_white_rus - root.primary_title = title:k_ruthenia - root.primary_title = title:e_russia - } - } - set_variable = { name = mythical_ancestor_var value = flag:rus } - } - 10 = { # King Arthur - trigger = { - OR = { - root.primary_title = title:k_wales - root.primary_title = title:k_cornwall - root.primary_title = title:k_england - root.primary_title = title:e_britannia - } - } - set_variable = { name = mythical_ancestor_var value = flag:arthur } - } - 10 = { # Corineus - trigger = { - root.primary_title = title:k_cornwall - } - modifier = { - current_date < 1000.1.1 - factor = 3 - } - set_variable = { name = mythical_ancestor_var value = flag:corineus } - } - 10 = { # Magnus Maximus - trigger = { - root.primary_title = title:k_wales - } - modifier = { - current_date < 1000.1.1 - factor = 3 - } - set_variable = { name = mythical_ancestor_var value = flag:magnus_maximus } - } - 30 = { # Brutus of Troy, we want this to be the default for the Brits - trigger = { - OR = { - root.primary_title = title:k_england - root.primary_title = title:e_britannia - } - } - set_variable = { name = mythical_ancestor_var value = flag:brutus } - } - 10 = { # Aeneas of Troy - trigger = { - OR = { - #Used in the Roman de Brut - root.primary_title = title:k_england - root.primary_title = title:e_britannia - #Also used by the house of Tosny - root.primary_title = title:d_normandy - capital_province = { geographical_region = world_europe_west_britannia } - #And of course used in Rome - root.primary_title = title:k_italy - root.primary_title = title:k_romagna - root.primary_title = title:k_sardinia - root.primary_title = title:e_italy - root = { - is_roman_emperor_primary_title_excluding_byzantium_trigger = yes - } - } - } - set_variable = { name = mythical_ancestor_var value = flag:aeneas } - } - 10 = { # Scota - trigger = { - OR = { # Gaels - root.primary_title = title:k_scotland - root.primary_title = title:k_ireland - } - current_date > 1100.1.1 - } - modifier = { - root.primary_title = title:k_scotland - factor = 3 - } - set_variable = { name = mythical_ancestor_var value = flag:scota } - } - 10 = { # Romulus - trigger = { - OR = { - root.primary_title = title:k_italy - root.primary_title = title:k_romagna - root.primary_title = title:k_sardinia - root.primary_title = title:e_italy - root = { is_roman_emperor_primary_title_excluding_byzantium_trigger = yes } - } - } - set_variable = { name = mythical_ancestor_var value = flag:romulus } - } - 10 = { # Numa Pompilius - trigger = { - OR = { - root.primary_title = title:k_italy - root.primary_title = title:k_romagna - root.primary_title = title:k_sardinia - root.primary_title = title:e_italy - root = { is_roman_emperor_primary_title_excluding_byzantium_trigger = yes } - } - } - set_variable = { name = mythical_ancestor_var value = flag:numa } - } - 10 = { # Belisarius - trigger = { - OR = { - root.primary_title = title:k_italy - root.primary_title = title:k_romagna - root.primary_title = title:k_sardinia - root.primary_title = title:e_italy - root = { is_roman_emperor_primary_title_excluding_byzantium_trigger = yes } - } - } - set_variable = { name = mythical_ancestor_var value = flag:belisarius } - } - 10 = { # Ardashir - trigger = { - OR = { - root.primary_title = title:k_persia - root.primary_title = title:e_persia - } - } - set_variable = { name = mythical_ancestor_var value = flag:ardashir } - } - 10 = { # Pharaohs - trigger = { - root.primary_title = title:k_egypt - NOT = { religion = religion:islam_religion } - } - set_variable = { name = mythical_ancestor_var value = flag:pharaohs } - } - 10 = { # Visigothic Kings - trigger = { - OR = { - root.primary_title = title:k_castille - root.primary_title = title:k_leon - root.primary_title = title:d_galicia - root.primary_title = title:k_aragon - root.primary_title = title:k_navarra - root.primary_title = title:k_andalusia - root.primary_title = title:k_portugal - root.primary_title = title:e_spain - } - NOT = { religion = religion:islam_religion } - } - set_variable = { name = mythical_ancestor_var value = flag:visigothic_kings } - } - 10 = { # Abd al-Rahman - trigger = { - OR = { - root.primary_title = title:k_castille - root.primary_title = title:k_aragon - root.primary_title = title:k_navarra - root.primary_title = title:k_andalusia - root.primary_title = title:k_portugal - root.primary_title = title:e_spain - } - religion = religion:islam_religion - } - set_variable = { name = mythical_ancestor_var value = flag:abd_al_rahman } - } - 10 = { # Zenobia - trigger = { - OR = { - root.primary_title = title:k_syria - root.primary_title = title:k_mesopotamia - } - NOT = { religion = religion:islam_religion } - } - set_variable = { name = mythical_ancestor_var value = flag:zenobia } - } - 10 = { # King Solomon - trigger = { - root.primary_title.title_capital_county.title_province = { - geographical_region = ghw_region_ethiopia - } - root.faith.religion = religion:christianity_religion - } - set_variable = { name = mythical_ancestor_var value = flag:solomon } - } - 10 = { # Conan Meriadoc - trigger = { - root.culture = culture:breton - NOR = { # used to distinguish themselves from the French - root.primary_title = title:k_france - root.primary_title = title:e_france - } - } - set_variable = { name = mythical_ancestor_var value = flag:conan_meriadoc } - } - 10 = { # Pishdadian Dynasty - trigger = { - OR = { - root.primary_title = title:k_persia - root.primary_title = title:e_persia - } - OR = { - root.faith.religion = religion:islam_religion - root.faith.religion = religion:zoroastrianism_religion - } - } - set_variable = { name = mythical_ancestor_var value = flag:pishdadian } - } - 10 = { # Chościsko - trigger = { - OR = { - root.primary_title = title:k_poland - root.primary_title = title:d_lesser_poland - AND = { - root.primary_title.title_capital_county.title_province = { - geographical_region = ghw_region_poland - } - faith.religion = faith:slavic_pagan.religion - } - } - } - set_variable = { name = mythical_ancestor_var value = flag:choscisko } - } - 10 = { # Arsacids - trigger = { - OR = { - root.primary_title = title:k_armenia - root.primary_title = title:k_armenian_principality - root.primary_title = title:e_armenia - } - } - set_variable = { name = mythical_ancestor_var value = flag:arsacids } - } - 10 = { # King David - trigger = { - OR = { - root.primary_title = title:k_georgia - root.primary_title = title:d_georgia - } - root.faith.religion = religion:christianity_religion - } - set_variable = { name = mythical_ancestor_var value = flag:david } - } - 10 = { # Karkota Naga - trigger = { - root.primary_title = title:k_kashmir - } - set_variable = { name = mythical_ancestor_var value = flag:naga } - } - 10 = { # God Brahman - trigger = { - root.culture = culture:tamil - OR = { #Lands held by the Pallavas - root.primary_title = title:d_tondai_nadu - root.primary_title = title:c_kanchipuram - root.primary_title = title:k_tamilakam - root.primary_title = title:c_muluvagil - } - } - set_variable = { name = mythical_ancestor_var value = flag:brahman } - } - 10 = { # Odin - trigger = { - root.faith = faith:norse_pagan - OR = { - root.primary_title = title:k_norway - root.primary_title = title:k_sweden - root.primary_title = title:d_iceland - root.primary_title = title:k_denmark - } - } - set_variable = { name = mythical_ancestor_var value = flag:odin } - } - 10 = { # Ragnar Lodbrok - trigger = { - OR = { - root.primary_title = title:k_norway - root.primary_title = title:k_sweden - root.primary_title = title:d_iceland - root.primary_title = title:k_denmark - } - } - set_variable = { name = mythical_ancestor_var value = flag:ragnar } - } - 10 = { # Brunhild - trigger = { - OR = { - root.primary_title = title:k_norway - root.primary_title = title:k_sweden - root.primary_title = title:d_iceland - root.primary_title = title:k_denmark - } - } - modifier = { - is_female = yes - factor = 5 - } - set_variable = { name = mythical_ancestor_var value = flag:brunhild } - } - 10 = { # Eremon - trigger = { - OR = { - root.primary_title = title:k_ireland - root.primary_title = title:d_connacht - root.primary_title = title:d_ulster - root.primary_title = title:c_ailech - root.primary_title = title:c_oriel - root.primary_title = title:c_breifne - root.primary_title = title:c_athlone - } - } - modifier = { - OR = { - root.primary_title = title:d_connacht - root.primary_title = title:d_ulster - root.primary_title = title:c_ailech - root.primary_title = title:c_oriel - root.primary_title = title:c_breifne - root.primary_title = title:c_athlone - } - factor = 3 - } - set_variable = { name = mythical_ancestor_var value = flag:eremon } - } - 10 = { # Eber - trigger = { - OR = { - root.primary_title = title:k_ireland - root.primary_title = title:d_munster - root.primary_title = title:c_ossory - root.primary_title = title:d_leinster - root.primary_title = title:c_desmond - } - } - modifier = { - OR = { - root.primary_title = title:d_munster - root.primary_title = title:c_ossory - root.primary_title = title:d_leinster - root.primary_title = title:c_desmond - } - factor = 3 - } - set_variable = { name = mythical_ancestor_var value = flag:eber } - } - 10 = { # Genghis Khan - trigger = { - root.culture = { has_cultural_pillar = heritage_mongolic } - current_date > 1228.1.1 - } - set_variable = { name = mythical_ancestor_var value = flag:genghis } - } - 10 = { # Emperor Constantine - trigger = { - OR = { - root.primary_title = title:c_byzantion - root.primary_title = title:e_byzantium - } - } - set_variable = { name = mythical_ancestor_var value = flag:constantine } - } - 10 = { # Emperor Justinian - trigger = { - OR = { - root.primary_title = title:c_byzantion - root.primary_title = title:e_byzantium - } - } - set_variable = { name = mythical_ancestor_var value = flag:justinian } - } - 5 = { # Melusine - trigger = { - OR = { - AND = { - has_trait = eccentric - capital_province = { geographical_region = world_europe_west } - } - #Used by the house of Anjou/Plantagenet - root.primary_title = title:c_anjou - root.primary_title = title:d_anjou - #Started in Lusignan - root.primary_title = title:d_poitou - } - current_date > 1060.1.1 - } - modifier = { #The first Plantagenets go crazy over her - OR = { - root.primary_title = title:c_anjou - root.primary_title = title:d_anjou - root.primary_title = title:d_poitou - } - current_date > 1060.1.1 - current_date < 1200.1.1 - factor = 5 - } - set_variable = { name = mythical_ancestor_var value = flag:melusine } - } - 1 = { # Fallback, only triggered when necessary - set_variable = { name = mythical_ancestor_var value = flag:fallback } - } - } - } - } -} - -disburse_hunt_legend_seeds = { - if = { - limit = { - is_ruler = yes - has_dlc_feature = legends - NOT = { has_game_rule = historical_legends_only } - } - if = { - limit = { - scope:activity.var:animal_type = flag:dragon - } - create_legend_seed = { - type = heroic - quality = famed - chronicle = beast_slayer - properties = { - beast = flag:dragon - location = root.location - } - } - } - else_if = { - limit = { - scope:activity.var:animal_type = flag:unicorn - } - create_legend_seed = { - type = heroic - quality = famed - chronicle = beast_slayer - properties = { - beast = flag:unicorn - location = root.location - } - } - } - else_if = { - limit = { - scope:activity.var:animal_type = flag:bear - } - random = { - chance = 50 - create_legend_seed = { - type = heroic - quality = famed - chronicle = beast_slayer - properties = { - beast = flag:bear - location = root.location - } - } - } - } - else_if = { - limit = { - OR = { - scope:activity.var:animal_type = flag:tiger - scope:activity.var:animal_type = flag:lion - scope:activity.var:animal_type = flag:leopard - } - } - random = { - chance = 30 - create_legend_seed = { - type = heroic - quality = famed - chronicle = beast_slayer - properties = { - beast = flag:ferocious_beast - location = root.location - } - } - } - } - } -} - -# Has to be run on the legend itself -change_legend_quality_effect = { - # Firstly, do I exist and if not, set me - if = { - limit = { - NOT = { exists = var:legend_quality_progress } - } - if = { - limit = { - $VALUE$ <= major_legend_quality_decrease - } - custom_tooltip = major_legend_quality_decrease_tt - set_variable = { - name = legend_quality_progress - value = $VALUE$ - } - } - else_if = { - limit = { - $VALUE$ <= medium_legend_quality_decrease - } - custom_tooltip = medium_legend_quality_decrease_tt - set_variable = { - name = legend_quality_progress - value = $VALUE$ - } - } - else_if = { - limit = { - $VALUE$ < 0 - } - custom_tooltip = minor_legend_quality_decrease_tt - set_variable = { - name = legend_quality_progress - value = $VALUE$ - } - } - else_if = { - limit = { - $VALUE$ >= major_legend_quality_increase - } - custom_tooltip = major_legend_quality_increase_tt - set_variable = { - name = legend_quality_progress - value = $VALUE$ - } - } - else_if = { - limit = { - $VALUE$ >= medium_legend_quality_increase - } - custom_tooltip = medium_legend_quality_increase_tt - set_variable = { - name = legend_quality_progress - value = $VALUE$ - } - } - else_if = { - limit = { - $VALUE$ > 0 - } - custom_tooltip = minor_legend_quality_increase_tt - set_variable = { - name = legend_quality_progress - value = $VALUE$ - } - } - else = { - set_variable = { - name = legend_quality_progress - value = 0 - } - } - } - # Otherwise, check if the progress is going to go over 100 and if so, cap at 100 - else_if = { - limit = { - exists = var:legend_quality_progress - 100 <= { - value = var:legend_quality_progress - add = $VALUE$ - } - } - set_variable = { - name = legend_quality_progress - value = 100 - } - } - # Otherwise, check if the progress is going to go below 0 and if so, cap at 0 - else_if = { - limit = { - exists = var:legend_quality_progress - 0 >= { - value = var:legend_quality_progress - add = $VALUE$ - } - } - set_variable = { - name = legend_quality_progress - value = 0 - } - } - # Otherwise, just apply the mathematics - else = { - if = { - limit = { - $VALUE$ <= major_legend_quality_decrease - } - custom_tooltip = major_legend_quality_decrease_tt - change_variable = { - name = legend_quality_progress - add = $VALUE$ - } - } - else_if = { - limit = { - $VALUE$ <= medium_legend_quality_decrease - } - custom_tooltip = medium_legend_quality_decrease_tt - change_variable = { - name = legend_quality_progress - add = $VALUE$ - } - } - else_if = { - limit = { - $VALUE$ < 0 - } - custom_tooltip = minor_legend_quality_decrease_tt - change_variable = { - name = legend_quality_progress - add = $VALUE$ - } - } - else_if = { - limit = { - $VALUE$ >= major_legend_quality_increase - } - custom_tooltip = major_legend_quality_increase_tt - change_variable = { - name = legend_quality_progress - add = $VALUE$ - } - } - else_if = { - limit = { - $VALUE$ >= medium_legend_quality_increase - } - custom_tooltip = medium_legend_quality_increase_tt - change_variable = { - name = legend_quality_progress - add = $VALUE$ - } - } - else_if = { - limit = { - $VALUE$ > 0 - } - custom_tooltip = minor_legend_quality_increase_tt - change_variable = { - name = legend_quality_progress - add = $VALUE$ - } - } - } -} - -#Rewards for Famed Legends -legend_ending_rewards_famed_heroic_effect = { - add_legitimacy = medium_legitimacy_gain - if = { - limit = { exists = promoted_legend } - set_variable = finished_famed_legend_var - set_variable = finished_heroic_legend_var - } -} - -legend_ending_rewards_famed_holy_effect = { - add_legitimacy = medium_legitimacy_gain - if = { - limit = { exists = promoted_legend } - set_variable = finished_famed_legend_var - set_variable = finished_holy_legend_var - } -} - -legend_ending_rewards_famed_legitimizing_effect = { - add_legitimacy = { - value = medium_legitimacy_gain - multiply = 2 - } - if = { - limit = { exists = promoted_legend } - set_variable = finished_famed_legend_var - set_variable = finished_legitimizing_legend_var - } -} - -#Rewards for Illustrious Legends -legend_ending_rewards_illustrious_heroic_effect = { - add_legitimacy = major_legitimacy_gain - if = { - limit = { exists = promoted_legend } - set_variable = finished_illustrious_legend_var - set_variable = finished_heroic_legend_var - } -} - -legend_ending_rewards_illustrious_holy_effect = { - add_legitimacy = major_legitimacy_gain - if = { - limit = { exists = promoted_legend } - set_variable = finished_illustrious_legend_var - set_variable = finished_holy_legend_var - } -} - -legend_ending_rewards_illustrious_legitimizing_effect = { - add_legitimacy = { - value = major_legitimacy_gain - multiply = 2 - } - if = { - limit = { exists = promoted_legend } - set_variable = finished_illustrious_legend_var - set_variable = finished_legitimizing_legend_var - } -} - -#Rewards for Mythical Legends -legend_ending_rewards_mythical_heroic_effect = { - add_legitimacy = massive_legitimacy_gain - # Chance to become a Living Legend - if = { - limit = { - dynasty ?= { - ce1_heroic_track_perks >= 4 - } - } - add_trait = legend - } - if = { - limit = { exists = promoted_legend } - set_variable = finished_mythical_legend_var - set_variable = finished_heroic_legend_var - } -} - -legend_ending_rewards_mythical_holy_effect = { - add_legitimacy = massive_legitimacy_gain - # Chance to become a Saint - if = { - limit = { - dynasty ?= { - ce1_heroic_track_perks >= 3 - } - } - add_trait = saint - if = { - limit = { NOT = { has_global_variable = num_of_saints_var } } - set_global_variable = { - name = num_of_saints_var - value = 1 - } - } - else = { - change_global_variable = { - name = num_of_saints_var - add = 1 - } - } - if = { - limit = { is_ai = no } - add_achievement_global_variable_effect = { - VARIABLE = ce1_canonized_achievement_unlocked - VALUE = yes - } - } - } - if = { - limit = { exists = promoted_legend } - set_variable = finished_mythical_legend_var - set_variable = finished_holy_legend_var - } -} - -legend_ending_rewards_mythical_legitimizing_effect = { - add_legitimacy = { - value = massive_legitimacy_gain - multiply = 2 - } - if = { - limit = { exists = promoted_legend } - set_variable = finished_mythical_legend_var - set_variable = finished_legitimizing_legend_var - } -} - -#We clean out the notification variables -remove_legend_notification_variables_effect = { - every_player = { - limit = { - exists = var:legend_alerted_var - var:legend_alerted_var = promoted_legend - } - remove_variable = legend_alerted_var - } -} - -#Rewards for all Heroic Legends -legend_ending_rewards_heroic_effect = { - # Legitimacy gain based on Legend Protagonist - disburse_legend_protagonist_legitimacy_effect = yes - # Available decision - custom_tooltip = legend_ending_decision_tt - hidden_effect = { - create_character_memory = { - type = ce1_completed_my_heroic_legend - participants = { - owner = root - protagonist = scope:legend_protagonist - } - } - } -} - -#Rewards for all Legitimizing Legends -legend_ending_rewards_legitimizing_effect = { - # Legitimacy gain based on Legend Protagonist - disburse_legend_protagonist_legitimacy_effect = yes - # We let you diverge if it's an Ancient People legend - if = { - limit = { - exists = scope:legendary_culture - has_dlc_feature = diverge_culture # Don't mislead players who don't have access to divergence - } - custom_tooltip = { - text = can_select_legendary_culture_pillars_tt - set_variable = { - name = legendary_culture - value = scope:legendary_culture - } - } - } - if = { #Roman Heritage legend without a Roman Empire - limit = { - scope:title_claim = title:h_roman_empire - NOT = { - exists = global_var:flag_restored_roman_empire - } - } - title:d_latium.empire = { #Italy - add_to_list = roman_heritage_claims - } - title:d_tunis.kingdom = { #North Africa - add_to_list = roman_heritage_claims - } - title:d_thrace.empire = { #Byz - add_to_list = roman_heritage_claims - } - title:d_alexandria.kingdom = { #Egypt - add_to_list = roman_heritage_claims - } - title:d_antioch.kingdom = { #Syria - add_to_list = roman_heritage_claims - } - title:d_palestine.kingdom = { #Palestine - add_to_list = roman_heritage_claims - } - custom_tooltip = { - text = legend_title_does_not_exist_sub_realm_claims_given_tt - } - hidden_effect = { - every_in_list = { - list = roman_heritage_claims - - if = { - limit = { - exists = this.holder - this.holder != root - } - root = { - add_pressed_claim = prev - add_to_variable_list = { - name = legendary_claims - target = prev - } - } - } - else_if = { - limit = { - this.tier > tier_county - } - hidden_effect = { - legend_distribute_claims_in_de_jure = yes - } - } - } - } - - } - else_if = { - limit = { - exists = scope:title_claim.holder - scope:title_claim.holder != root - } - add_pressed_claim = scope:title_claim - add_to_variable_list = { - name = legendary_claims - target = scope:title_claim - } - } - else_if = { - limit = { - scope:title_claim.tier > tier_county - } - custom_tooltip = { - text = legend_title_does_not_exist_sub_realm_claims_given_tt - } - hidden_effect = { - scope:title_claim = { - legend_distribute_claims_in_de_jure = yes - } - } - } - # Available decision - custom_tooltip = legend_ending_decision_tt - promoted_legend ?= { set_variable = finished_legend_var } - hidden_effect = { - create_character_memory = { - type = ce1_completed_my_legitimizing_legend - participants = { - owner = root - protagonist = scope:legend_protagonist - } - } - } -} - -legend_distribute_claims_in_de_jure = { - every_direct_de_jure_vassal_title = { - if = { - limit = { - exists = holder - } - root = { - add_pressed_claim = prev - add_to_variable_list = { - name = legendary_claims - target = prev - } - } - } - else_if = { - limit = { - this.tier > tier_county - } - every_direct_de_jure_vassal_title = { - if = { - limit = { - exists = holder - } - root = { - add_unpressed_claim = prev - add_to_variable_list = { - name = legendary_claims - target = prev - } - } - } - else_if = { - limit = { - this.tier > tier_county - } - every_direct_de_jure_vassal_title = { - if = { - limit = { - exists = holder - } - root = { - add_unpressed_claim = prev - add_to_variable_list = { - name = legendary_claims - target = prev - } - } - } - } - } - } - } - } -} - -#Rewards for all Holy Legends -legend_ending_rewards_holy_effect = { - # Legitimacy gain based on Legend Protagonist - disburse_legend_protagonist_legitimacy_effect = yes - # Available decision - custom_tooltip = legend_ending_decision_tt - promoted_legend ?= { set_variable = finished_legend_var } - hidden_effect = { - create_character_memory = { - type = ce1_completed_my_holy_legend - participants = { - owner = root - protagonist = scope:legend_protagonist - } - } - } -} - -# Achievements for legends -legend_ending_achievements_effect = { - if = { - limit = { - exists = promoted_legend - } - if = { # If you have the legend of Scota - limit = { - is_ai = no - promoted_legend ?= { - has_legend_chronicle = ancient_people - legend_property:culture ?= culture:ancient_egyptian - legend_property:title ?= title:k_scotland - legend_property:original_region ?= geographical_region:ghw_region_egypt_et_al - } - } - add_achievement_global_variable_effect = { - VARIABLE = ce1_the_pharaoh_islands_achievement_unlocked - VALUE = yes - } - } - if = { - limit = { is_ai = no } - add_achievement_global_variable_effect = { - VARIABLE = ce1_legendary_achievement_unlocked - VALUE = yes - } - } - if = { # If you finish your ancestor's legend - limit = { - is_ai = no - has_variable = ce1_neverending_story_achievement_possible - promoted_legend = { has_variable = ce1_neverending_story_achievement_possible_legend } - } - add_achievement_global_variable_effect = { - VARIABLE = ce1_neverending_story_achievement_unlocked - VALUE = yes - } - } - if = { # If you finish a mythical legend as a count - limit = { - is_ai = no - highest_held_title_tier = tier_county - promoted_legend = { legend_quality = mythical } - } - add_achievement_global_variable_effect = { - VARIABLE = ce1_local_legend_achievement_unlocked - VALUE = yes - } - } - } -} - -get_appropriate_ancient_people = { - random_list = { - 999 = { - trigger = { - religion = { is_in_family = rf_abrahamic } - NOT = { culture = culture:hebrew } - } - set_variable = { - name = original_region - value = geographical_region:israel_region - years = 1 - } - culture:hebrew = { save_scope_as = ancient_culture } - } - 999 = { - trigger = { - OR = { - root.culture = { - OR = { - culture_overlaps_geographical_region = world_europe - culture_overlaps_geographical_region = world_africa - culture_overlaps_geographical_region = world_asia_minor - } - } - culture = culture:egyptian - culture = culture:scottish - } - NOT = { culture = culture:ancient_egyptian } - } - set_variable = { - name = original_region - value = geographical_region:ghw_region_egypt_et_al - years = 1 - } - culture:ancient_egyptian = { save_scope_as = ancient_culture } - } - 999 = { - trigger = { - OR = { - root.culture = { - OR = { - culture_overlaps_geographical_region = world_steppe - culture_overlaps_geographical_region = custom_carpathia - } - } - culture = { has_cultural_pillar = heritage_turkic } - culture = { has_cultural_pillar = heritage_mongolic } - culture = { has_cultural_pillar = heritage_magyar } - } - NOT = { culture = culture:hunnic } - } - set_variable = { - name = original_region - value = geographical_region:world_steppe_west - years = 1 - } - culture:hunnic = { save_scope_as = ancient_culture } - } - 999 = { - trigger = { - OR = { - root.culture = { - culture_overlaps_geographical_region = world_europe - } - culture = { has_cultural_pillar = heritage_iberian } - culture = { has_cultural_pillar = heritage_north_germanic } - } - NOT = { culture = culture:gothic } - } - set_variable = { - name = original_region - value = geographical_region:world_steppe_west - years = 1 - } - culture:gothic = { save_scope_as = ancient_culture } - } - 999 = { - trigger = { - OR = { - root.culture = { - OR = { - culture_overlaps_geographical_region = world_asia_minor - culture_overlaps_geographical_region = world_middle_east - } - } - } - NOT = { culture = culture:persian } - } - set_variable = { - name = original_region - value = geographical_region:world_middle_east_persia - years = 1 - } - culture:persian = { save_scope_as = ancient_culture } - } - 999 = { - trigger = { - OR = { - root.culture = { - OR = { - culture_overlaps_geographical_region = world_europe - culture_overlaps_geographical_region = world_asia_minor - culture_overlaps_geographical_region = world_middle_east - culture_overlaps_geographical_region = world_africa_north - } - } - } - NOT = { culture = culture:trojan } - } - set_variable = { - name = original_region - value = geographical_region:troy_region - years = 1 - } - culture:trojan = { save_scope_as = ancient_culture } - } - 999 = { - trigger = { - OR = { - root.culture = { - OR = { - culture_overlaps_geographical_region = world_europe - culture_overlaps_geographical_region = world_asia_minor - culture_overlaps_geographical_region = world_middle_east - culture_overlaps_geographical_region = world_africa_north - culture_overlaps_geographical_region = world_india - culture_overlaps_geographical_region = world_steppe_tarim - } - } - } - NOT = { culture = culture:macedonian } - } - set_variable = { - name = original_region - value = geographical_region:world_europe_south_east - years = 1 - } - culture:macedonian = { save_scope_as = ancient_culture } - } - 999 = { - trigger = { - OR = { - root.culture = { - culture_overlaps_geographical_region = custom_roman_full_borders - } - religion = religion:hellenism_religion - religion = { - AND = { - is_in_family = rf_abrahamic - NOT = { this = religion:judaism_religion } - } - } - } - NOT = { culture = culture:roman } - } - set_variable = { - name = original_region - value = geographical_region:custom_roman_full_borders - years = 1 - } - culture:roman = { save_scope_as = ancient_culture } - } - 1 = { # Roman (fallback, placeholder) - set_variable = { - name = original_region - value = geographical_region:custom_roman_full_borders - years = 1 - } - culture:roman = { save_scope_as = ancient_culture } - } - } -} - -get_appropriate_exotic_location = { - random_list = { - 999 = { # Atlantis, must care about Greek stuff - trigger = { - OR = { - religion = { is_in_family = rf_abrahamic } - religion = religion:hellenism_religion - culture = { has_cultural_pillar = heritage_byzantine } - culture = { has_cultural_pillar = heritage_ancient_greek } - culture = { has_cultural_pillar = heritage_latin } - } - } - save_scope_value_as = { - name = exotic_location - value = flag:atlantis - } - } - 999 = { # Olympus, must care about Greek stuff - trigger = { - OR = { - religion = { is_in_family = rf_abrahamic } - religion = religion:hellenism_religion - culture = { has_cultural_pillar = heritage_byzantine } - culture = { has_cultural_pillar = heritage_ancient_greek } - culture = { has_cultural_pillar = heritage_latin } - } - } - save_scope_value_as = { - name = exotic_location - value = flag:olympus - } - } - 999 = { # India, must be faraway - trigger = { - NOT = { - any_character_to_title_neighboring_and_across_water_county = { - title_province = { geographical_region = world_india } - } - } - } - save_scope_value_as = { - name = exotic_location - value = flag:hindustan - } - } - 999 = { # Vinland, must be into vikings and adventures and all that - trigger = { - OR = { - religion = religion:germanic_religion - culture = { has_cultural_pillar = heritage_north_germanic } - culture = { has_innovation = innovation_varangian_adventurers } - } - } - save_scope_value_as = { - name = exotic_location - value = flag:vinland - } - } - 999 = { # Sunset invasion memes - trigger = { - OR = { - religion = religion:germanic_religion - culture = { has_cultural_pillar = heritage_north_germanic } - culture = { has_innovation = innovation_varangian_adventurers } - } - } - save_scope_value_as = { - name = exotic_location - value = flag:sunset_empire - } - } - 999 = { # Kingdom of Prester John, must be a Christian who doesn't know about Copts - trigger = { - religion = religion:christianity_religion - NOT = { - any_character_to_title_neighboring_and_across_water_county = { - holder = { faith = faith:coptic } - } - } - NOT = { # Prester John isn't exciting if Egypt is Christian - title:k_egypt = { - holder ?= { religion = religion:christianity_religion } - } - } - } - save_scope_value_as = { - name = exotic_location - value = flag:prester_john_kingdom - } - } - 999 = { # Albion, Christians in Jerusalem were way way into Arthurian myth - trigger = { - religion = religion:christianity_religion - capital_county = { - title_province = { geographical_region = world_middle_east } - } - } - save_scope_value_as = { - name = exotic_location - value = flag:albion - } - } - 999 = { # Himavanta, legendary forest in the himalayas - trigger = { - OR = { - capital_county = { - title_province = { - OR = { - geographical_region = world_india - geographical_region = world_tibet - geographical_region = world_burma - geographical_region = world_asia_china - } - } - } - culture = { culture_overlaps_geographical_region = world_india } - culture = { culture_overlaps_geographical_region = world_tibet } - culture = { culture_overlaps_geographical_region = world_burma } - culture = { culture_overlaps_geographical_region = world_asia_china } - } - } - save_scope_value_as = { - name = exotic_location - value = flag:himavanta - } - } - 999 = { # Mahishmati, lost city - trigger = { - OR = { - capital_county = { - title_province = { geographical_region = world_india } - } - culture = { culture_overlaps_geographical_region = world_india } - } - } - save_scope_value_as = { - name = exotic_location - value = flag:mahishmati - } - } - 999 = { # Kumari Kandam, lost continent - trigger = { - culture = { - has_cultural_pillar = heritage_dravidian - } - } - save_scope_value_as = { - name = exotic_location - value = flag:kumari_kandam - } - } - 999 = { # Beyul, hidden valleys - trigger = { - OR = { - capital_county.title_province = { - OR = { - geographical_region = world_tibet - geographical_region = world_asia_china - } - } - culture = { culture_overlaps_geographical_region = world_tibet } - culture = { culture_overlaps_geographical_region = world_asia_china } - } - } - save_scope_value_as = { - name = exotic_location - value = flag:beyul - } - } - 999 = { # Bald Mountain, slavic witchy mountain - trigger = { - OR = { - culture_has_slavic_heritage_pillar_trigger = yes - religion = religion:slavic_religion - } - } - save_scope_value_as = { - name = exotic_location - value = flag:bald_mountain - } - } - 999 = { # Irum, lost city in the Quran - trigger = { - religion = religion:islam_religion - } - save_scope_value_as = { - name = exotic_location - value = flag:irum - } - } - 1 = { # China (fallback) - save_scope_value_as = { - name = exotic_location - value = flag:china - } - } - } -} - -# Generates a legend seed that just points to a loc key by combining FAITH with GOD (example, FAITH = germanic + GOD = high_god will result in germanic_high_god_name and localise to "Odin") -generate_godly_descent_seed_support_effect = { - create_legend_seed = { - type = holy - quality = famed - chronicle = godly_descent - properties = { - god = flag:$FAITH$_$GOD$_name - title = root.primary_title - } - } -} - -# Runs the above effect based on an actual RELIGION that you feed into it, for example feeding Root.Religion into RELIGION will cause it to generate your religion's god loc keys -generate_religion_descent_effect = { - if = { - limit = { - $RELIGION$ = religion:akom_religion - } - generate_godly_descent_seed_support_effect = { - FAITH = akom - GOD = $GOD$ - } - } - else_if = { - limit = { - $RELIGION$ = religion:baltic_religion - } - generate_godly_descent_seed_support_effect = { - FAITH = baltic - GOD = $GOD$ - } - } - else_if = { - limit = { - $RELIGION$ = religion:basque_religion - } - generate_godly_descent_seed_support_effect = { - FAITH = basque - GOD = $GOD$ - } - } - else_if = { - limit = { - $RELIGION$ = religion:bon_religion - } - generate_godly_descent_seed_support_effect = { - FAITH = bon - GOD = $GOD$ - } - } - else_if = { - limit = { - $RELIGION$ = religion:buddhism_religion - } - generate_godly_descent_seed_support_effect = { - FAITH = buddhism - GOD = $GOD$ - } - } - else_if = { - limit = { - $RELIGION$ = religion:tani_religion - } - generate_godly_descent_seed_support_effect = { - FAITH = tani - GOD = $GOD$ - } - } - else_if = { - limit = { - $RELIGION$ = religion:dualism_religion - } - generate_godly_descent_seed_support_effect = { - FAITH = dualism - GOD = $GOD$ - } - } - else_if = { - limit = { - $RELIGION$ = religion:finno_ugric_religion - } - generate_godly_descent_seed_support_effect = { - FAITH = finno_ugric - GOD = $GOD$ - } - } - else_if = { - limit = { - $RELIGION$ = religion:germanic_religion - } - generate_godly_descent_seed_support_effect = { - FAITH = germanic - GOD = $GOD$ - } - } - else_if = { - limit = { - $RELIGION$ = religion:hellenism_religion - } - generate_godly_descent_seed_support_effect = { - FAITH = hellenism - GOD = $GOD$ - } - } - else_if = { - limit = { - $RELIGION$ = religion:hinduism_religion - } - generate_godly_descent_seed_support_effect = { - FAITH = hinduism - GOD = $GOD$ - } - } - else_if = { - limit = { - $RELIGION$ = religion:jainism_religion - } - generate_godly_descent_seed_support_effect = { - FAITH = jainism - GOD = $GOD$ - } - } - else_if = { - limit = { - $RELIGION$ = religion:kushitism_religion - } - generate_godly_descent_seed_support_effect = { - FAITH = kushitism - GOD = $GOD$ - } - } - else_if = { - limit = { - $RELIGION$ = religion:magyar_religion - } - generate_godly_descent_seed_support_effect = { - FAITH = magyar - GOD = $GOD$ - } - } - else_if = { - limit = { - $RELIGION$ = religion:mundhum_religion - } - generate_godly_descent_seed_support_effect = { - FAITH = mundhumism - GOD = $GOD$ - } - } - else_if = { - limit = { - $RELIGION$ = religion:north_african_religion - } - generate_godly_descent_seed_support_effect = { - FAITH = acham - GOD = $GOD$ - } - } - else_if = { - limit = { - $RELIGION$ = religion:qiangic_religion - } - generate_godly_descent_seed_support_effect = { - FAITH = qiangic - GOD = $GOD$ - } - } - else_if = { - limit = { - $RELIGION$ = religion:siberian_religion - } - generate_godly_descent_seed_support_effect = { - FAITH = siberian - GOD = $GOD$ - } - } - else_if = { - limit = { - $RELIGION$ = religion:slavic_religion - } - generate_godly_descent_seed_support_effect = { - FAITH = slavic - GOD = $GOD$ - } - } - else_if = { - limit = { - $RELIGION$ = religion:taoism_religion - } - generate_godly_descent_seed_support_effect = { - FAITH = taoism - GOD = $GOD$ - } - } - else_if = { - limit = { - $RELIGION$ = religion:tengrism_religion - } - generate_godly_descent_seed_support_effect = { - FAITH = tengrism - GOD = $GOD$ - } - } - else_if = { - limit = { - $RELIGION$ = religion:waaqism_religion - } - generate_godly_descent_seed_support_effect = { - FAITH = waaqism - GOD = $GOD$ - } - } - else_if = { - limit = { - $RELIGION$ = religion:west_african_religion - } - generate_godly_descent_seed_support_effect = { - FAITH = west_african - GOD = $GOD$ - } - } - else_if = { - limit = { - $RELIGION$ = religion:west_african_bori_religion - } - generate_godly_descent_seed_support_effect = { - FAITH = west_african_bori - GOD = $GOD$ - } - } - else_if = { - limit = { - $RELIGION$ = religion:west_african_orisha_religion - } - generate_godly_descent_seed_support_effect = { - FAITH = west_african_orisha - GOD = $GOD$ - } - } - else_if = { - limit = { - $RELIGION$ = religion:west_african_roog_religion - } - generate_godly_descent_seed_support_effect = { - FAITH = west_african_roog - GOD = $GOD$ - } - } - else_if = { - limit = { - $RELIGION$ = religion:yazidi_religion - } - generate_godly_descent_seed_support_effect = { - FAITH = yazidi - GOD = $GOD$ - } - } - else_if = { - limit = { - $RELIGION$ = religion:zoroastrianism_religion - } - generate_godly_descent_seed_support_effect = { - FAITH = zoroastrianism - GOD = $GOD$ - } - } - else_if = { - limit = { - $RELIGION$ = religion:zunism_religion - } - generate_godly_descent_seed_support_effect = { - FAITH = zunism - GOD = $GOD$ - } - } - else = { # Generic Pagan, fallback - generate_godly_descent_seed_support_effect = { - FAITH = paganism - GOD = $GOD$ - } - } -} - -# Mythical Legends guaranteed access to Legendary Buildings - -give_legendary_building_mythical_holy_tooltip_effect = { - if = { - limit = { - OR = { - root = { - locale_valid_for_legendary_buildings = yes - } - capital_province = { has_special_building_slot = no } - any_sub_realm_barony = { - title_province = { has_special_building_slot = no } - } - } - } - give_legendary_building_location_holy_effect = yes - } - set_variable = { - name = legendary_reward_location - value = scope:legendary_locale - } - set_variable = { - name = legendary_figure - value = scope:protagonist - } -} - -give_legendary_building_mythical_heroic_tooltip_effect = { - if = { - limit = { - OR = { - root = { - locale_valid_for_legendary_buildings = yes - } - capital_province = { has_special_building_slot = no } - any_sub_realm_barony = { - title_province = { has_special_building_slot = no } - } - } - } - give_legendary_building_location_heroic_effect = yes - } - set_variable = { - name = legendary_reward_location - value = scope:legendary_locale - } - set_variable = { - name = legendary_figure - value = scope:protagonist - } -} - -give_legendary_building_mythical_legitimizing_tooltip_effect = { - if = { - limit = { - OR = { - root = { - locale_valid_for_legendary_buildings = yes - } - capital_province = { has_special_building_slot = no } - any_sub_realm_barony = { - title_province = { has_special_building_slot = no } - } - } - } - give_legendary_building_location_legitimizing_effect = yes - } - set_variable = { - name = legendary_reward_location - value = scope:legendary_locale - } - set_variable = { - name = legendary_figure - value = scope:protagonist - } -} - -# Famed/Illustrious have a 50% chance - -give_legendary_building_holy_tooltip_effect = { #50% chance - # Chance to get legendary building - if = { - limit = { - OR = { - root = { - locale_valid_for_legendary_buildings = yes - } - capital_province = { has_special_building_slot = no } - any_sub_realm_barony = { - title_province = { has_special_building_slot = no } - } - } - } - random = { - chance = { - value = 50 - } - give_legendary_building_location_holy_effect = yes - } - } - set_variable = { - name = legendary_reward_location - value = scope:legendary_locale - } - set_variable = { - name = legendary_figure - value = scope:protagonist - } -} - -give_legendary_building_heroic_tooltip_effect = { #50% chance - # Chance to get legendary building - if = { - limit = { - OR = { - root = { - locale_valid_for_legendary_buildings = yes - } - capital_province = { has_special_building_slot = no } - any_sub_realm_barony = { - title_province = { has_special_building_slot = no } - } - } - } - random = { - chance = { - value = 50 - } - give_legendary_building_location_heroic_effect = yes - set_variable = { - name = legendary_reward_location - value = scope:legendary_locale - } - set_variable = { - name = legendary_figure - value = scope:protagonist - } - } - } -} - -give_legendary_building_legitimizing_tooltip_effect = { #50% chance - # Chance to get legendary building - if = { - limit = { - OR = { - root = { - locale_valid_for_legendary_buildings = yes - } - capital_province = { has_special_building_slot = no } - any_sub_realm_barony = { - title_province = { has_special_building_slot = no } - } - } - } - random = { - chance = { - value = 50 - } - give_legendary_building_location_legitimizing_effect = yes - } - } - set_variable = { - name = legendary_reward_location - value = scope:legendary_locale - } - set_variable = { - name = legendary_figure - value = scope:protagonist - } -} - -give_legendary_building_location_standard_effect = { - if = { # Prioritize the location of the legend if possible - limit = { - root = { - locale_valid_for_legendary_buildings = yes - } - } - scope:location = { save_scope_as = legendary_locale } - } - else_if = { # Otherwise, get the capital - limit = { - capital_province = { has_special_building_slot = no } - } - capital_province = { save_scope_as = legendary_locale } - } - else_if = { # Otherwise, prioritize a title you hold directly - limit = { - any_held_title = { - title_tier = county - title_province = { has_special_building_slot = no } - } - } - random_held_title = { - title_tier = county - limit = { - title_province = { has_special_building_slot = no } - } - title_province = { save_scope_as = legendary_locale } - } - } - else_if = { #Otherwise, prioritize a barony that you hold directly - limit = { - any_held_title = { - title_tier = barony - title_province = { - has_special_building_slot = no - } - } - } - random_held_title = { - title_tier = barony - limit = { - title_province = { - has_special_building_slot = no - } - } - title_province = { - save_scope_as = legendary_locale - } - } - - } - else_if = { # Otherwise, prioritize a barony within a title you hold - limit = { - any_held_title = { - title_tier = county - any_county_province = { has_special_building_slot = no } - } - } - random_held_title = { - title_tier = county - limit = { - any_county_province = { has_special_building_slot = no } - } - random_county_province = { - limit = { - has_special_building_slot = no - } - save_scope_as = legendary_locale - } - } - } - else_if = { # Find a feudal barony... - limit = { - any_sub_realm_barony = { - title_province = { - has_special_building_slot = no - has_holding_type = castle_holding - } - } - } - random_sub_realm_barony = { - limit = { - title_province = { - has_special_building_slot = no - has_holding_type = castle_holding - } - } - title_province = { save_scope_as = legendary_locale } - } - } - else_if = { # Find a province with a holding - limit = { - any_sub_realm_barony = { - title_province = { - has_special_building_slot = no - has_holding = yes - } - } - } - random_sub_realm_barony = { - limit = { - title_province = { - has_special_building_slot = no - has_holding = yes - } - } - title_province = { save_scope_as = legendary_locale } - } - } - else = { # Final fallback, just any barony in your realm - random_sub_realm_barony = { - title_province = { save_scope_as = legendary_locale } - } - } - if = { - limit = { - OR = { - exists = scope:beast - has_trait_xp = { - trait = lifestyle_hunter - track = hunter - value >= 62 - } - has_trait_xp = { - trait = lifestyle_hunter - track = falconer - value >= 62 - } - culture ?= { - has_cultural_parameter = always_unlock_legendary_hunting_lodge - } - } - } - custom_tooltip = { - text = can_build_legendary_hunting_lodge_tt - add_character_flag = legendary_hunting_lodge_flag - } - } - if = { - limit = { - dynasty ?= { ce1_heroic_track_perks >= 5 } - } - custom_tooltip = { - text = can_build_legendary_watchtower_tt - add_character_flag = legendary_watchtower_flag - } - } -} - -give_legendary_building_location_holy_effect = { - give_legendary_building_location_standard_effect = yes - custom_tooltip = { - text = can_build_legendary_shrine_tt - add_character_flag = legendary_shrine_flag - } -} - -give_legendary_building_location_heroic_effect = { - give_legendary_building_location_standard_effect = yes - custom_tooltip = { - text = can_build_legendary_statue_tt - add_character_flag = legendary_statue_flag - } -} - -give_legendary_building_location_legitimizing_effect = { - give_legendary_building_location_standard_effect = yes - custom_tooltip = { - text = can_build_legendary_palace_tt - add_character_flag = legendary_palace_flag - } -} - -legend_seed_new_title_effect = { - if = { - limit = { has_dlc_feature = legends } - create_legend_seed = { - type = heroic - quality = famed - chronicle = new_title - properties = { - title = root.primary_title - founder = root - } - } - } -} - -legend_seed_great_deed_dynasty_effect = { - if = { - limit = { has_dlc_feature = legends } - if = { - limit = { - highest_held_title_tier < tier_hegemony - } - create_legend_seed = { - type = legitimizing - quality = famed - chronicle = great_deed_dynasty - properties = { - dynasty = root.dynasty - founder = root - title = root.primary_title.empire - } - } - } - else = { - create_legend_seed = { - type = legitimizing - quality = famed - chronicle = great_deed_dynasty - properties = { - dynasty = root.dynasty - founder = root - title = root.primary_title - } - } - } - } -} - -legend_seed_great_deed_region_effect = { - if = { - limit = { has_dlc_feature = legends } - create_legend_seed = { - type = heroic - quality = famed - chronicle = great_deed_region - properties = { - legend_region = $REGION$ - founder = root - } - } - } -} - -legend_seed_great_deed_title_effect = { - if = { - limit = { has_dlc_feature = legends } - create_legend_seed = { - type = heroic - quality = famed - chronicle = great_deed_title - properties = { - title = $TITLE$ - founder = root - } - } - } -} - -legend_seed_great_deed_faith_effect = { - if = { - limit = { has_dlc_feature = legends } - create_legend_seed = { - type = holy - quality = famed - chronicle = great_deed_faith - properties = { - founder = root - antagonist = $ANTAGONIST$ - old_faith = $OLD_FAITH$ - new_faith = root.faith - } - } - } -} - -legend_seed_struggle_ended_effect = { - if = { - limit = { has_dlc_feature = legends } - create_legend_seed = { - type = heroic - quality = famed - chronicle = struggle_ended - properties = { - founder = root - culture = root.culture - struggle = $STRUGGLE$ - struggle_ending = $STRUGGLE_ENDING$ - } - } - } -} - -mark_historical_legend_as_done = { - if = { # Dynastic legacy - limit = { - legend_property:founder ?= legend_owner.house.house_founder - legend_property:dynasty ?= legend_owner.dynasty - legend_property:title ?= legend_owner.primary_title - } - legend_owner.dynasty = { - set_variable = { - name = dynasty_legend_used - value = yes - } - } - } - if = { # Arthur - limit = { - legend_property:ancestor ?= character:159835 - legend_property:title ?= title:k_england - } - set_global_variable = { - name = king_arthur_legend - value = yes - } - } - else_if = { # Carolingian - limit = { - legend_property:ancestor ?= character:6392 - legend_property:title ?= title:e_france - } - set_global_variable = { - name = carolingian_legend - value = yes - } - } - else_if = { # the_wheelwright - limit = { - legend_property:ancestor ?= character:82233 - } - set_global_variable = { - name = the_wheelwright_legend - value = yes - } - } - else_if = { # cadell - limit = { - legend_property:ancestor ?= character:159058 - } - set_global_variable = { - name = cadell_legend - value = yes - } - } - else_if = { # sons_of_rurik - limit = { - legend_property:ancestor ?= character:40605 - } - set_global_variable = { - name = sons_of_rurik_legend - value = yes - } - } - else_if = { # el_cid - limit = { - legend_property:ancestor ?= character:107590 - } - set_global_variable = { - name = el_cid_legend - value = yes - } - } - else_if = { # peasant_emperor - limit = { - legend_property:ancestor ?= character:1700 - } - set_global_variable = { - name = peasant_emperor_legend - value = yes - } - } - else_if = { # premysl - limit = { - legend_property:ancestor ?= character:168345 - } - set_global_variable = { - name = premysl_legend - value = yes - } - } - else_if = { # borjigin - limit = { - legend_property:ancestor ?= character:303250 - } - set_global_variable = { - name = borjigin_legend - value = yes - } - } - else_if = { # the_red_hand - limit = { - legend_property:ancestor ?= character:7255 - } - set_global_variable = { - name = the_red_hand_legend - value = yes - } - } - else_if = { # yazdagird_iii - limit = { - legend_property:ancestor ?= character:180637 - } - set_global_variable = { - name = yazdagird_iii_legend - value = yes - } - } - else_if = { # bahram_gur - limit = { - legend_property:ancestor ?= character:180645 - } - set_global_variable = { - name = bahram_gur_legend - value = yes - } - } - else_if = { # saman_khudah - limit = { - legend_property:ancestor ?= character:188637 - } - set_global_variable = { - name = saman_khudah_legend - value = yes - } - } - else_if = { # saman_khudah - limit = { - legend_property:ancestor ?= character:163109 - } - set_global_variable = { - name = ragnarr_legend - value = yes - } - } - else_if = { - limit = { - legend_property:ancestor_flag ?= flag:vercingetorix - } - set_global_variable = { - name = vercingetorix_legend - value = yes - } - } - else_if = { - limit = { - legend_property:ancestor_flag ?= flag:afrasiyab - } - set_global_variable = { - name = afrasiyab_legend - value = yes - } - } - else_if = { - limit = { - legend_property:culture ?= culture:hebrew - legend_property:title ?= title:k_georgia - legend_property:original_region ?= geographical_region:world_middle_east_jerusalem - } - set_global_variable = { - name = sons_of_david_legend - value = yes - } - } - else_if = { - limit = { - legend_property:ancestor_flag ?= flag:magi - } - set_global_variable = { - name = magi_descendant_legend - value = yes - } - } - else_if = { - limit = { - legend_property:culture ?= culture:gothic - legend_property:title ?= title:e_spain - legend_property:original_region ?= geographical_region:world_steppe_west - } - set_global_variable = { - name = gothic_kings_legend - value = yes - } - } - else_if = { - limit = { - legend_property:culture ?= culture:trojan - legend_property:title ?= title:e_britannia - legend_property:original_region ?= geographical_region:troy_region - } - set_global_variable = { - name = new_troy_london_legend - value = yes - } - } - else_if = { - limit = { - legend_property:culture ?= culture:trojan - legend_property:title ?= title:c_cornwall - legend_property:original_region ?= geographical_region:troy_region - } - set_global_variable = { - name = corineus_legend - value = yes - } - } - else_if = { - limit = { - legend_property:culture ?= culture:ancient_egyptian - legend_property:title ?= title:k_scotland - legend_property:original_region ?= geographical_region:ghw_region_egypt_et_al - } - set_global_variable = { - name = scota_legend - value = yes - } - } - else_if = { - limit = { - legend_property:culture ?= culture:hebrew - legend_property:title ?= title:e_abyssinia - legend_property:original_region ?= geographical_region:ghw_region_jerusalem - } - set_global_variable = { - name = menelik_i_legend - value = yes - } - } - else_if = { - limit = { - legend_property:culture ?= culture:hebrew - legend_property:title ?= title:e_abyssinia - legend_property:original_region ?= geographical_region:israel_region - } - set_global_variable = { - name = kings_of_semien_legend - value = yes - } - } - else_if = { - limit = { - legend_property:culture ?= culture:roman - legend_property:original_region ?= geographical_region:custom_roman_full_borders - } - set_global_variable = { - name = roman_heritage_legend - value = yes - } - } - else_if = { - limit = { - legend_property:culture ?= culture:hunnic - legend_property:title ?= title:e_caspian-pontic_steppe - legend_property:original_region ?= geographical_region:world_steppe_west - } - set_global_variable = { - name = hunnic_heritage_legend - value = yes - } - } - else_if = { - limit = { - legend_property:ancestor ?= character:7627 - } - set_global_variable = { - name = alfred_of_wessex_legend - value = yes - } - } - else_if = { - limit = { - legend_property:ancestor ?= character:168130 - } - set_global_variable = { - name = william_gellones_legend - value = yes - } - } - else_if = { - limit = { - legend_property:ancestor ?= character:99 - } - set_global_variable = { - name = edward_the_martyr_legend - value = yes - } - } - else_if = { - limit = { - legend_property:ancestor_flag ?= flag:noah - } - set_global_variable = { - name = sceafa_legend - value = yes - } - } - else_if = { - limit = { - legend_property:ancestor_flag ?= flag:shibi_chakravarti - } - set_global_variable = { - name = shibi_chakravarti_legend - value = yes - } - } - else_if = { - limit = { - legend_property:beast ?= flag:naga - } - set_global_variable = { - name = naga_descent_legend - value = yes - } - } - else_if = { - limit = { - legend_property:beast ?= flag:dragon - } - set_global_variable = { - name = pyusawhti_legend - value = yes - } - } - else_if = { - limit = { - legend_property:god ?= flag:germanic_high_god_name - legend_property:title ?= title:k_norway - } - set_global_variable = { - name = hieros_gamos_skirnismal_legend - value = yes - } - } - else_if = { - limit = { - legend_property:god ?= flag:hinduism_high_god_name - legend_property:title ?= title:e_deccan - } - set_global_variable = { - name = descendants_of_brahman_legend - value = yes - } - } -} - -legend_seed_struggle_ending_effect = { - create_legend_seed = { - type = heroic - quality = famed - chronicle = struggle_conclusion - properties = { - struggle_ender = $ENDER$ - struggle = flag:$STRUGGLE$ - } - } -} - -balancing_legend_global_var_effect = { - if = { - limit = { - NOT = { has_global_variable = legend_count_var } - } - set_global_variable = { - name = legend_count_var - value = 1 - } - } - else = { - change_global_variable = { - name = legend_count_var - add = 1 - } - } -} - -gain_heroic_legend_seed_tooltip_effect = { - if = { - limit = { - has_dlc_feature = legends - } - custom_tooltip = gain_heroic_legend_seed.tt - } -} - -gain_holy_legend_seed_tooltip_effect = { - if = { - limit = { - has_dlc_feature = legends - } - custom_tooltip = gain_holy_legend_seed.tt - } -} - -gain_legitimizing_legend_seed_tooltip_effect = { - if = { - limit = { - has_dlc_feature = legends - } - custom_tooltip = gain_legitimizing_legend_seed.tt - } -} - -send_interface_message_legend_notification_effect = { - county = { save_scope_as = spread_county } - scope:legend = { save_scope_as = spread_legend } - county.holder = { - set_variable = { - name = legend_alerted_var - value = scope:legend - } - send_interface_message = { - type = event_generic_good_text - title = legend_spread_notification_title - desc = legend_spread_notification_desc - - right_icon = scope:spread_county - } - } -} - -send_interface_toast_legend_notification_effect = { - county = { save_scope_as = spread_county } - scope:legend = { save_scope_as = spread_legend } - county.holder = { - set_variable = { - name = legend_alerted_var - value = scope:legend - } - send_interface_toast = { - title = legend_spread_notification_title - custom_tooltip = legend_spread_notification_desc - left_icon = scope:spread_county - } - } -} - -create_swan_knight_legend_seed_effect = { - if = { - limit = { - location = { - geographical_region = world_europe - } - } - create_legend_seed = { - type = heroic - quality = famed - chronicle = swan_knight - properties = { - friendly_animal = flag:swan - } - } - } - else_if = { - limit = { - location = { - OR = { - geographical_region = world_india - geographical_region = world_burma - geographical_region = ghw_region_caucasus - geographical_region = world_asia_china - geographical_region = world_asia_japan - geographical_region = world_asia_korea - geographical_region = world_asia_southeast - } - } - } - create_legend_seed = { - type = heroic - quality = famed - chronicle = swan_knight - properties = { - friendly_animal = flag:tiger - } - } - } - else_if = { - limit = { - location = { - geographical_region = world_africa - } - } - create_legend_seed = { - type = heroic - quality = famed - chronicle = swan_knight - properties = { - friendly_animal = flag:lion - } - } - } - else = { - create_legend_seed = { - type = heroic - quality = famed - chronicle = swan_knight - properties = { - friendly_animal = flag:hart - } - } - } -} diff --git a/N3OW/common/scripted_effects/06_dlc_ce1_legitimacy_effects.txt b/N3OW/common/scripted_effects/06_dlc_ce1_legitimacy_effects.txt deleted file mode 100644 index 04dc03e6..00000000 --- a/N3OW/common/scripted_effects/06_dlc_ce1_legitimacy_effects.txt +++ /dev/null @@ -1,556 +0,0 @@ -###################### -# Legitimacy -###################### - -#standard_activity_participation_legitimacy_effect -#legendary_hunt_participation_legitimacy_effect -#grand_activity_participation_legitimacy_effect -#war_end_legitimacy_effect -#faction_war_end_legitimacy_effect -#faction_accept_demand_legitimacy_effect -#excommunication_legitimacy_effect -#hostile_scheme_exposure_legitimacy_effect -#epidemic_outbreak_legitimacy_effect -#epidemic_endemic_capital_legitimacy_effect -#disburse_legend_protagonist_legitimacy_effect -#base_legitimacy_intent_reward - Give a small amount of legitimacy, just in case players didn't get any events relating to it - -add_legitimacy_effect = { - if = { - limit = { is_valid_for_legitimacy_change = yes } - add_legitimacy = $LEGITIMACY$ - } -} - -# LEGITIMACY GAIN FOR STANDARD ACTIVITY PARTICIPATION -standard_activity_participation_legitimacy_effect = { - if = { - limit = { is_valid_for_legitimacy_change = yes } - if = { - limit = { - this = scope:host - } - add_legitimacy = minor_legitimacy_gain - } - else = { - add_legitimacy = miniscule_legitimacy_gain - } - } -} - -# LEGITIMACY GAIN FOR PILGRIMAGE ACTIVITY PARTICIPATION -pilgrimage_activity_participation_legitimacy_effect = { - if = { - limit = { is_valid_for_legitimacy_change = yes } - if = { - limit = { - this = scope:host - dynasty ?= { - has_dynasty_perk = tgp_sea_legacy_1 - } - } - add_legitimacy = tgp_legitimacy_from_pilgrimage - } - else_if = { - limit = { - this = scope:host - } - add_legitimacy = minor_legitimacy_gain - } - else = { - add_legitimacy = miniscule_legitimacy_gain - } - } -} - -# LEGITIMACY GAIN FOR LEGENDARY HUNT PARTICIPATION -legendary_hunt_participation_legitimacy_effect = { - if = { - limit = { is_valid_for_legitimacy_change = yes } - if = { - limit = { - this = scope:host - } - add_legitimacy = major_legitimacy_gain - } - else = { - add_legitimacy = medium_legitimacy_gain - } - } -} - -# LEGITIMACY GAIN FOR GRAND ACTIVITY PARTICIPATION -grand_activity_participation_legitimacy_effect = { - if = { - limit = { is_valid_for_legitimacy_change = yes } - if = { - limit = { - scope:activity = { - has_activity_type = activity_tour - has_activity_option = { - category = special_type - option = tour_type_majesty - } - } - } - add_legitimacy = major_legitimacy_gain - } - else_if = { - limit = { - this = scope:host - } - add_legitimacy = medium_legitimacy_gain - } - else = { - add_legitimacy = minor_legitimacy_gain - } - } -} - -# LEGITIMACY GAIN FOR WINNING A WAR -add_legitimacy_attacker_victory_effect = { - war_end_legitimacy_effect = { - WINNER = scope:attacker - LOSER = scope:defender - } -} - -add_legitimacy_attacker_defeat_effect = { - war_end_legitimacy_effect = { - WINNER = scope:defender - LOSER = scope:attacker - } -} - -war_end_legitimacy_effect = { - # Special rewards for Temüjin vs Jamukha - if = { - limit = { - scope:attacker = { - OR = { - this = character:125501 - this = character:mpo_mongol_1 - } - has_variable = temujin_jamukha_war_var - } - scope:defender = { - OR = { - this = character:125501 - this = character:mpo_mongol_1 - } - } - } - scope:attacker = { - add_legitimacy = 500 - } - } - else = { - if = { - limit = { - any_in_list = { list = target_titles } - } - ordered_in_list = { - list = target_titles - order_by = tier - save_scope_as = target_title - save_scope_value_as = { - name = title_tier_minus_1 - value = { - value = scope:target_title.tier - subtract = 1 - } - } - } - } - $WINNER$ = { - if = { - limit = { - is_valid_for_legitimacy_change = yes - primary_title.tier <= $LOSER$.primary_title.tier - } - send_interface_toast = { - type = msg_legitimacy_gain - title = legitimacy_gain_toast - left_icon = $WINNER$ - right_icon = $LOSER$ - - add_legitimacy = { - value = { - value = 0 - - if = { # You get a lot of Legitimacy for punching above your weight - limit = { # Specially if you are a Duke/Count against an Emperor - OR = { - primary_title.tier = tier_county - primary_title.tier = tier_duchy - } - $LOSER$.primary_title.tier = tier_empire - } - value = 200 - } - else_if = { # Or a Count against a King - limit = { - primary_title.tier = tier_county - $LOSER$.primary_title.tier = tier_kingdom - } - value = 150 - } - else_if = { # Or a Count vs a Duke - limit = { - primary_title.tier = tier_county - $LOSER$.primary_title.tier = tier_duchy - } - value = 100 - } - else_if = { # Or a Duke vs a King - limit = { - primary_title.tier = tier_duchy - $LOSER$.primary_title.tier = tier_kingdom - } - value = 100 - } - else_if = { # Or King vs Emperor - limit = { - primary_title.tier = tier_kingdom - $LOSER$.primary_title.tier = tier_empire - } - value = 100 - } - else_if = { # Special Legitimacy gain for same tier - limit = { - primary_title.tier = $LOSER$.primary_title.tier - } - value = 50 - } - } - - if = { # We give you extra Legitimacy for Religious Wars - limit = { - root.war ?= { - OR = { - using_cb = minor_religious_war - using_cb = religious_war - } - } - } - multiply = 2 - } - else_if = { # And even more for Holy Wars - limit = { - root.war ?= { - OR = { - using_cb = major_religious_war - using_cb = undirected_great_holy_war - using_cb = directed_great_holy_war - } - } - } - multiply = 3 - } - - if = { # We give you extra Legitimacy for special On Start Wars - limit = { - root.war ?= { - OR = { - using_cb = norman_conquest_cb - using_cb = norwegian_invasion_cb - using_cb = sons_of_lothbrok_invasion_cb - } - } - } - multiply = 4 - } - - if = { # And we 50% increase whatever you have if you are a nomad - limit = { - government_has_flag = government_is_nomadic - } - multiply = 1.5 - } - } - } - } - # Special extra Legitimacy gain for Byzantine rulers since their procedence didn't matter as much, to prevent them from always having 0 Legitimacy basically - hidden_effect = { - if = { - limit = { - exists = scope:target_title - scope:target_title = title:e_byzantium - $WINNER$ = { is_valid_for_legitimacy_change = yes } - } - add_legitimacy = 1000 - } - } - } - } -} - -# LEGITIMACY FOR LOSING A FACTION WAR -faction_war_end_defeat_legitimacy_effect = { - scope:attacker = { - if = { - limit = { is_valid_for_legitimacy_change = yes } - send_interface_toast = { - type = msg_legitimacy_gain - title = legitimacy_gain_toast - left_icon = scope:attacker - right_icon = scope:defender - add_legitimacy = minor_legitimacy_gain - } - } - } - scope:defender = { - if = { - limit = { - is_valid_for_legitimacy_change = yes - #prevent China from falling into Chaos when the Hegemony is claimed by not removing the legitimacy - scope:attacker = { - NAND = { - is_leading_faction_type = claimant_faction - joined_faction.special_title = title:h_china - } - } - } - if = { - limit = { - scope:attacker = { - OR = { - is_leading_faction_type = peasant_faction - is_leading_faction_type = claimant_faction - is_leading_faction_type = populist_faction - } - } - } - send_interface_toast = { - type = event_toast_effect_bad - title = legitimacy_loss_toast - left_icon = scope:defender - right_icon = scope:attacker - add_legitimacy = major_legitimacy_loss - } - } - else = { - send_interface_toast = { - type = event_toast_effect_bad - title = legitimacy_loss_toast - left_icon = scope:defender - right_icon = scope:attacker - if = { - limit = { - has_nomadic_legitimacy = yes - } - add_legitimacy = { - value = medium_legitimacy_loss - multiply = 2 - } - } - else = { - add_legitimacy = medium_legitimacy_loss - } - } - } - } - } -} - -# LEGITIMACY FOR WINNING A FACTION WAR -faction_war_end_victory_legitimacy_effect = { - scope:defender = { - if = { - limit = { is_valid_for_legitimacy_change = yes } - send_interface_toast = { - type = msg_legitimacy_gain - title = legitimacy_gain_toast - left_icon = scope:attacker - right_icon = scope:defender - add_legitimacy = minor_legitimacy_gain - } - } - } -} - -# LEGITIMACY LOSS FOR ACCEPTING FACTION DEMANDS -faction_accept_demand_legitimacy_effect = { - if = { - limit = { is_valid_for_legitimacy_change = yes } - add_legitimacy = minor_legitimacy_loss - } -} - -# LEGITIMACY LOSS FROM EXCOMMUNICATION -excommunication_legitimacy_effect = { - if = { - limit = { is_valid_for_legitimacy_change = yes } - send_interface_toast = { - type = msg_legitimacy_loss - title = legitimacy_loss_toast - left_icon = scope:target_character - right_icon = scope:requesting_character - add_legitimacy = major_legitimacy_loss - } - } -} - -# LEGITIMACY LOSS FROM HOSTILE SCHEME EXPOSURE -hostile_scheme_exposure_legitimacy_effect = { - if = { - limit = { is_valid_for_legitimacy_change = yes } - add_legitimacy = minor_legitimacy_loss - } -} - -# LEGITIMACY LOSS FROM EPIDEMIC OUTBREAK -epidemic_outbreak_legitimacy_effect = { - save_scope_as = epidemic - $PROVINCE$.county.holder = { - save_scope_as = outbreak_top_liege - if = { - limit = { is_valid_for_legitimacy_change = yes } - if = { - limit = { - scope:epidemic = { outbreak_intensity = major } - } - add_legitimacy = { - value = miniscule_legitimacy_loss - multiply = $PROVINCE$.county.holder.primary_title.tier - } - } - else_if = { - limit = { - scope:epidemic = { outbreak_intensity = apocalyptic } - } - add_legitimacy = { - value = minor_legitimacy_loss - multiply = $PROVINCE$.county.holder.primary_title.tier - } - } - } - } -} - -# LEGITIMACY LOSS FROM EPIDEMIC OUTBREAK -epidemic_endemic_capital_legitimacy_effect = { - save_scope_as = endemic_capital - province_owner = { - if = { - limit = { is_valid_for_legitimacy_change = yes } - send_interface_toast = { - type = msg_legitimacy_loss - title = legitimacy_loss_toast - left_icon = scope:endemic_capital.province_owner - right_icon = scope:endemic_capital.barony - custom_tooltip = legitimacy_loss_endemic_capital_tt - add_legitimacy = miniscule_legitimacy_loss - } - } - } -} - -base_legitimacy_intent_reward = { - if = { - limit = { - has_activity_intent = legitimacy_intent - } - add_legitimacy = minor_legitimacy_gain - } -} - -# Achievements -claim_title_achievement_effect = { - if = { - limit = { - is_ai = no - scope:actor.legitimacy_level >= scope:recipient.legitimacy_level - } - add_achievement_global_variable_effect = { - VARIABLE = ce1_upward_mobility_achievement_unlocked - VALUE = yes - } - } -} - -# Legitimacy Protagonist gain from Legends -disburse_legend_protagonist_legitimacy_effect = { - # Legitimacy gain based on Protagonist - if = { - limit = { - scope:protagonist = { - this != root # The legend owner - num_virtuous_traits >= 3 - } - } - custom_tooltip = { - text = legend_protagonist_legitimacy_major_tt - add_legitimacy = major_legitimacy_gain - } - } - else_if = { - limit = { - scope:protagonist = { - this != root # The legend owner - num_virtuous_traits >= 2 - } - } - custom_tooltip = { - text = legend_protagonist_legitimacy_medium_tt - add_legitimacy = medium_legitimacy_gain - } - } - else_if = { - limit = { - scope:protagonist = { - this != root # The legend owner - num_virtuous_traits >= 1 - } - } - custom_tooltip = { - text = legend_protagonist_legitimacy_minor_tt - add_legitimacy = minor_legitimacy_gain - } - } - else_if = { # No Virtuous traits but at least you didn't choose yourself - limit = { - scope:protagonist = { - this != root - } - } - custom_tooltip = { - text = legend_protagonist_legitimacy_miniscule_tt - add_legitimacy = miniscule_legitimacy_gain - } - } -} - - -#Add legitimacy sans displaying levels -add_minor_legitimacy_no_tier_effect = { - save_scope_as = legitimacy_gainer - custom_tooltip = { - text = minor_legitimacy_gain_no_tier_tt - add_legitimacy = minor_legitimacy_gain - } -} - -add_medium_legitimacy_no_tier_effect = { - save_scope_as = legitimacy_gainer - custom_tooltip = { - text = medium_legitimacy_gain_no_tier_tt - add_legitimacy = medium_legitimacy_gain - } -} - -add_major_legitimacy_no_tier_effect = { - save_scope_as = legitimacy_gainer - custom_tooltip = { - text = major_legitimacy_gain_no_tier_tt - add_legitimacy = major_legitimacy_gain - } -} - -add_massive_legitimacy_no_tier_effect = { - save_scope_as = legitimacy_gainer - custom_tooltip = { - text = massive_legitimacy_gain_no_tier_tt - add_legitimacy = massive_legitimacy_gain - } -} diff --git a/N3OW/common/scripted_effects/07_dlc_ep3_scripted_effects.txt b/N3OW/common/scripted_effects/07_dlc_ep3_scripted_effects.txt deleted file mode 100644 index f5ec2df1..00000000 --- a/N3OW/common/scripted_effects/07_dlc_ep3_scripted_effects.txt +++ /dev/null @@ -1,12900 +0,0 @@ -################################################## -# Laamps -################################################## - -create_landless_adventurer_title_history_effect = { - holder ?= { - if = { - limit = { - NOT = { has_realm_law = landless_adventurer_succession_law } - } - add_realm_law = landless_adventurer_succession_law - } - } -} - -create_landless_adventurer_title_effect = { - save_scope_as = new_landless_adventurer - if = { - limit = { - exists = house - } - house = { save_scope_as = new_landless_adventurer_house } - } - if = { - limit = { - exists = location - } - location = { save_scope_as = new_landless_adventurer_location } - } - save_scope_value_as = { - name = adventurer_creation_reason - value = $REASON$ - } - $FLAVOR_CHAR$ = { save_scope_as = adventurer_flavor_char } - hidden_effect = { - random_list = { - 1000 = { - trigger = { - scope:warrior_youth ?= scope:new_landless_adventurer - } - create_adventurer_title = { - name = adventurer_name_free_warriors - holder = scope:new_landless_adventurer - article = DEFAULT_TITLE_NAME_ARTICLE - save_scope_as = new_title - } - } - 1000 = { - trigger = { - scope:warrior_youth ?= scope:new_landless_adventurer - age <= 20 - exists = scope:host.house - } - create_adventurer_title = { - name = adventurer_name_youths - holder = scope:new_landless_adventurer - article = DEFAULT_TITLE_NAME_ARTICLE - save_scope_as = new_title - } - } - 10 = { - create_adventurer_title = { - name = adventurer_name_001 - holder = scope:new_landless_adventurer - article = DEFAULT_TITLE_NAME_ARTICLE - save_scope_as = new_title - } - } - 10 = { - trigger = { - exists = scope:new_landless_adventurer_house - } - create_adventurer_title = { - name = adventurer_name_002 - holder = scope:new_landless_adventurer - article = DEFAULT_TITLE_NAME_ARTICLE - save_scope_as = new_title - } - } - 10 = { - create_adventurer_title = { - name = adventurer_name_003 - holder = scope:new_landless_adventurer - article = DEFAULT_TITLE_NAME_ARTICLE - save_scope_as = new_title - } - } - 10 = { - create_adventurer_title = { - name = adventurer_name_004 - holder = scope:new_landless_adventurer - article = DEFAULT_TITLE_NAME_ARTICLE - save_scope_as = new_title - } - } - 10 = { - trigger = { - NOT = { - scope:new_landless_adventurer.culture = culture:kurdish - } - } - create_adventurer_title = { - name = adventurer_name_005 - holder = scope:new_landless_adventurer - article = DEFAULT_TITLE_NAME_ARTICLE - save_scope_as = new_title - } - } - 10 = { - create_adventurer_title = { - name = adventurer_name_006 - holder = scope:new_landless_adventurer - article = DEFAULT_TITLE_NAME_ARTICLE - save_scope_as = new_title - } - } - 10 = { - create_adventurer_title = { - name = adventurer_name_007 - holder = scope:new_landless_adventurer - article = DEFAULT_TITLE_NAME_ARTICLE - save_scope_as = new_title - } - } - 10 = { - trigger = { - exists = scope:new_landless_adventurer_house - } - create_adventurer_title = { - name = adventurer_name_008 - holder = scope:new_landless_adventurer - save_scope_as = new_title - } - } - 10 = { - create_adventurer_title = { - name = adventurer_name_009 - holder = scope:new_landless_adventurer - article = DEFAULT_TITLE_NAME_ARTICLE - save_scope_as = new_title - } - } - 7 = { - trigger = { - exists = scope:new_landless_adventurer_location - } - create_adventurer_title = { - name = adventurer_name_010 - holder = scope:new_landless_adventurer - article = DEFAULT_TITLE_NAME_ARTICLE - save_scope_as = new_title - } - } - 7 = { - trigger = { - exists = scope:new_landless_adventurer_location - } - create_adventurer_title = { - name = adventurer_name_011 - holder = scope:new_landless_adventurer - article = DEFAULT_TITLE_NAME_ARTICLE - save_scope_as = new_title - } - } - 7 = { - trigger = { - exists = scope:new_landless_adventurer_location - } - create_adventurer_title = { - name = adventurer_name_012 - holder = scope:new_landless_adventurer - article = DEFAULT_TITLE_NAME_ARTICLE - save_scope_as = new_title - } - } - 7 = { - trigger = { - scope:new_landless_adventurer.ai_zeal > 0 - } - create_adventurer_title = { - name = adventurer_name_013 - holder = scope:new_landless_adventurer - article = DEFAULT_TITLE_NAME_ARTICLE - save_scope_as = new_title - } - } - 7 = { - trigger = { - scope:new_landless_adventurer.ai_zeal > 0 - } - create_adventurer_title = { - name = adventurer_name_014 - holder = scope:new_landless_adventurer - article = DEFAULT_TITLE_NAME_ARTICLE - save_scope_as = new_title - } - } - 7 = { - trigger = { - scope:new_landless_adventurer.ai_zeal > 0 - } - create_adventurer_title = { - name = adventurer_name_015 - holder = scope:new_landless_adventurer - article = DEFAULT_TITLE_NAME_ARTICLE - save_scope_as = new_title - } - } - 7 = { - trigger = { - OR = { - has_martial_lifestyle_trait_trigger = yes - ai_boldness >= medium_positive_ai_value - has_trait = education_martial_prowess_1 - has_trait = education_martial_prowess_2 - has_trait = education_martial_prowess_3 - has_trait = education_martial_prowess_4 - has_education_martial_trigger = yes - } - } - create_adventurer_title = { - name = adventurer_name_016 - holder = scope:new_landless_adventurer - article = DEFAULT_TITLE_NAME_ARTICLE - save_scope_as = new_title - } - } - 7 = { - trigger = { - OR = { - has_martial_lifestyle_trait_trigger = yes - has_trait = lifestyle_blademaster - has_trait = education_martial_prowess_1 - has_trait = education_martial_prowess_2 - has_trait = education_martial_prowess_3 - has_trait = education_martial_prowess_4 - has_education_martial_trigger = yes - } - } - create_adventurer_title = { - name = adventurer_name_017 - holder = scope:new_landless_adventurer - article = DEFAULT_TITLE_NAME_ARTICLE - save_scope_as = new_title - } - } - 7 = { - trigger = { - scope:new_landless_adventurer.ai_zeal > medium_negative_ai_value - scope:new_landless_adventurer.ai_boldness >= 0 - NOT = { - scope:new_landless_adventurer = { - faith.religion = religion:west_african_bori_religion - } - } - } - create_adventurer_title = { - name = adventurer_name_018 - holder = scope:new_landless_adventurer - article = DEFAULT_TITLE_NAME_ARTICLE - save_scope_as = new_title - } - } - 7 = { - trigger = { - scope:new_landless_adventurer.ai_zeal > medium_negative_ai_value - scope:new_landless_adventurer.ai_greed >= 0 - NOT = { - scope:new_landless_adventurer = { - faith.religion = religion:west_african_bori_religion - } - } - } - create_adventurer_title = { - name = adventurer_name_019 - holder = scope:new_landless_adventurer - article = DEFAULT_TITLE_NAME_ARTICLE - save_scope_as = new_title - } - } - 7 = { - trigger = { - scope:new_landless_adventurer.ai_zeal > medium_negative_ai_value - scope:new_landless_adventurer.ai_compassion >= 0 - NOT = { - scope:new_landless_adventurer = { - faith.religion = religion:west_african_bori_religion - } - } - } - create_adventurer_title = { - name = adventurer_name_020 - holder = scope:new_landless_adventurer - article = DEFAULT_TITLE_NAME_ARTICLE - save_scope_as = new_title - } - } - 7 = { - trigger = { - exists = scope:new_landless_adventurer_location.county - } - scope:new_landless_adventurer_location.county = { - save_scope_as = new_landless_adventurer_county - } - create_adventurer_title = { - name = adventurer_name_021 - holder = scope:new_landless_adventurer - article = DEFAULT_TITLE_NAME_ARTICLE - save_scope_as = new_title - } - } - 7 = { - create_adventurer_title = { - name = adventurer_name_022 - holder = scope:new_landless_adventurer - article = DEFAULT_TITLE_NAME_ARTICLE - save_scope_as = new_title - } - } - 10 = { - trigger = { - exists = scope:new_landless_adventurer_house - } - create_adventurer_title = { - name = adventurer_name_023 - holder = scope:new_landless_adventurer - article = DEFAULT_TITLE_NAME_ARTICLE - save_scope_as = new_title - } - } - 10 = { - trigger = { - scope:new_landless_adventurer.ai_zeal > medium_negative_ai_value - scope:new_landless_adventurer.ai_rationality >= 0 - #Many names using Allah already - NOT = { - scope:new_landless_adventurer = { - faith.religion = religion:islam_religion - } - } - } - create_adventurer_title = { - name = adventurer_name_024 - holder = scope:new_landless_adventurer - article = DEFAULT_TITLE_NAME_ARTICLE - save_scope_as = new_title - } - } - 7 = { - trigger = { - scope:new_landless_adventurer.ai_zeal < low_negative_ai_value - scope:new_landless_adventurer.ai_compassion < medium_negative_ai_value - } - create_adventurer_title = { - name = adventurer_name_025 - holder = scope:new_landless_adventurer - article = DEFAULT_TITLE_NAME_ARTICLE - save_scope_as = new_title - } - } - 10 = { - create_adventurer_title = { - name = adventurer_name_0026 - holder = scope:new_landless_adventurer - save_scope_as = new_title - } - } - 5 = { - trigger = { - exists = scope:new_landless_adventurer.culture - OR = { - has_martial_lifestyle_trait_trigger = yes - ai_boldness >= medium_positive_ai_value - has_trait = education_martial_prowess_1 - has_trait = education_martial_prowess_2 - has_trait = education_martial_prowess_3 - has_trait = education_martial_prowess_4 - has_education_martial_trigger = yes - } - } - create_adventurer_title = { - name = adventurer_name_0027 - holder = scope:new_landless_adventurer - article = DEFAULT_TITLE_NAME_ARTICLE - save_scope_as = new_title - } - } - } - - scope:new_title ?= { - create_landless_adventurer_title_history_effect = yes - set_variable = { - name = adventurer_creation_reason - value = scope:adventurer_creation_reason - } - set_variable = { - name = adventurer_flavor_char - value = scope:adventurer_flavor_char - } - } - - scope:new_title = { save_scope_as = new_landless_adventurer_title } - scope:new_landless_adventurer = { - if = { - limit = { - NOT = { has_government = landless_adventurer_government } - } - change_government = landless_adventurer_government - } - if = { - limit = { - NOT = { has_realm_law = landless_adventurer_succession_law } - } - add_realm_law = landless_adventurer_succession_law - } - if = { - limit = { - has_realm_law = crown_authority_0 - } - remove_realm_law = crown_authority_0 - } - domicile = { change_provisions = starting_provisions_value } - } - every_player = { - limit = { - NOR = { - root ?= this - this = scope:new_landless_adventurer - } - OR = { - # Either they're important to us. - is_close_or_extended_family_of = scope:new_landless_adventurer - is_consort_of = scope:new_landless_adventurer - has_important_relationship_with_character_trigger = { CHARACTER = scope:new_landless_adventurer } - # Or they're just close enough. - AND = { - capital_province = { "squared_distance(scope:new_landless_adventurer.location)" <= squared_distance_medium } - OR = { - top_liege = root.top_liege - any_neighboring_and_across_water_top_liege_realm_owner = { this = root.top_liege } - } - } - } - } - send_interface_message = { - type = msg_landless_adventurer_nearby - title = nearby_landless_adventurer_created_message_title - left_icon = scope:new_landless_adventurer - right_icon = scope:adventurer_flavor_char - switch = { - trigger = scope:adventurer_creation_reason - flag:conquest = { custom_tooltip = nearby_landless_adventurer_created_message_conquest_tt } - flag:deposition = { custom_tooltip = nearby_landless_adventurer_created_message_deposition_tt } - flag:succession = { custom_tooltip = nearby_landless_adventurer_created_message_succession_tt } - flag:exile = { custom_tooltip = nearby_landless_adventurer_created_message_exile_tt } - flag:voluntary = { custom_tooltip = nearby_landless_adventurer_created_message_voluntary_tt } - flag:revocation = { custom_tooltip = nearby_landless_adventurer_created_message_revocation_tt } - flag:runaway_allowed = { custom_tooltip = nearby_landless_adventurer_created_message_runaway_allowed_tt } - flag:runaway_forbidden = { custom_tooltip = nearby_landless_adventurer_created_message_runaway_forbidden_tt } - flag:wanderer = { custom_tooltip = nearby_landless_adventurer_created_message_wanderer_tt } - flag:eradicate = { custom_tooltip = nearby_landless_adventurer_created_message_eradicate_tt } - fallback = { custom_tooltip = nearby_landless_adventurer_created_message_fallback_tt } - } - } - } - } - custom_tooltip = laamp_become_adventurer_tt - if = { - limit = { - OR = { - scope:adventurer_creation_reason = flag:deposition - scope:adventurer_creation_reason = flag:conquest - scope:adventurer_creation_reason = flag:exile - } - NOT = { this = scope:adventurer_flavor_char } - } - add_opinion = { - target = scope:adventurer_flavor_char - modifier = demanded_eviction_opinion - } - remove_laamp_from_exiled_county_automatically_effect = { - PROVINCE = scope:new_landless_adventurer.location - LAAMP = scope:new_landless_adventurer - } - save_scope_value_as = { - name = expelled - value = yes - } - } - hidden_effect = { - if = { - limit = { - scope:new_landless_adventurer = { - is_ai = no - } - NOT = { exists = scope:expelled } - } - populate_location_with_contracts_effect = { - AREA_CHAR = scope:new_landless_adventurer - AMOUNT = 3 - } - } - scope:new_landless_adventurer = { - every_councillor = { - if = { - limit = { - NOR = { - has_council_position = councillor_court_chaplain - has_council_position = councillor_spouse - } - } - scope:new_landless_adventurer = { - fire_councillor = prev - } - remove_opinion = { - modifier = fired_from_council_opinion - target = scope:new_landless_adventurer - } - } - else_if = { - limit = { - NOR = { - is_close_or_extended_family_of = scope:new_landless_adventurer - has_relation_lover = scope:new_landless_adventurer - has_relation_friend = scope:new_landless_adventurer - is_consort_of = scope:new_landless_adventurer - has_council_position = councillor_spouse - } - } - death = { - death_reason = death_vanished - } - } - } - every_courtier = { - limit = { - NOR = { - is_close_or_extended_family_of = scope:new_landless_adventurer - has_relation_lover = scope:new_landless_adventurer - has_relation_friend = scope:new_landless_adventurer - is_consort_of = scope:new_landless_adventurer - } - } - move_to_pool = yes - } - # Give us a couple of starting chars if we're almost completely bereft. - if = { - limit = { - any_courtier = { count <= 2 } - } - trigger_event = { - id = ep3_laamps.1001 - weeks = { 2 6 } - } - } - } - trigger_event = { id = misc.0001 days = 1 } - local_arbitration_boon_change_purpose_effect = yes - } - add_to_global_variable_list = { - name = laamps_tally - target = scope:new_landless_adventurer.primary_title - } - set_variable = flavourise_camp_purpose_wanderers -} - -destroy_landless_title_no_dlc_effect = { - if = { - limit = { - NOT = { has_dlc_feature = roads_to_power } - game_start_date = $DATE$ - } - holder = { destroy_title = prev } - } -} - -set_landless_government_effect = { - if = { - limit = { - has_dlc_feature = roads_to_power - } - change_government = landless_adventurer_government - } -} - -disburse_knight_errant_decision_rewards_effect = { - add_trait = knight_errant - house = { - add_house_modifier = { - modifier = ep3_knight_of_the_swan_house_modifier - } - } - custom_tooltip = knight_errant_decision_armor_tt - if = { - limit = { has_dlc_feature = legends } - create_swan_knight_legend_seed_effect = yes - } - if = { - limit = { has_character_modifier = bandit_king_modifier } - remove_character_modifier = bandit_king_modifier - } -} - -laamp_game_over_option_effect = { - add_internal_flag = dangerous - custom_tooltip = laamp_game_over_tt - if = { - limit = { exists = scope:new_landless_adventurer_title } - hidden_effect = { destroy_title = scope:new_landless_adventurer_title } - } -} - -destroy_laamp_effect = { - $ADVENTURER$ = { - save_scope_as = the_adventurer - # If we weren't an adventurer before, make us one. - if = { - limit = { - NOT = { has_trait = adventurer } - } - add_trait = adventurer - } - hidden_effect = { - every_courtier = { - set_variable = { - name = former_camp_leader - value = scope:the_adventurer - } - add_trait = adventurer_follower - } - } - custom_tooltip = { - text = destroy_laamp_effect.tt.domicile_liquidated - laamp_clear_domicile_buildings_effect = yes - } - # Contacts have opinions™ about you. - ## Be they good. - every_contact = { - limit = { - opinion = { - target = scope:the_adventurer - value >= 1 - } - } - custom = custom.every_contact_with_positive_opinion - add_opinion = { - target = scope:the_adventurer - modifier = pleased_former_contact_opinion - opinion = 30 - } - hidden_effect = { - if = { - limit = { - can_set_relation_potential_friend_trigger = { CHARACTER = scope:the_adventurer } - } - set_relation_potential_friend = scope:the_adventurer - } - } - } - ## Or bad. - every_contact = { - limit = { - opinion = { - target = scope:the_adventurer - value < 1 - } - } - # And neutral but _eh_. - custom = custom.every_contact_with_negative_opinion - add_opinion = { - target = scope:the_adventurer - modifier = frustrated_former_contact_opinion - opinion = -30 - } - hidden_effect = { - if = { - limit = { - can_set_relation_potential_rival_trigger = { CHARACTER = scope:the_adventurer } - } - set_relation_potential_rival = scope:the_adventurer - } - } - } - # Destroy your main title. - every_held_title = { - limit = { has_variable = adventurer_creation_reason } - save_scope_as = landless_adventurer_title - scope:the_adventurer = { destroy_title = scope:landless_adventurer_title } - } - # Ironically, we only want to use this effect if you're _not_ admin — it'll reset you nicely to the best government for you, but if you're admin, you should stay admin. - if = { - limit = { - NOR = { - government_has_flag = government_is_administrative - government_has_flag = government_is_nomadic - government_has_flag = government_is_steppe_admin - government_has_flag = government_is_wanua - government_has_flag = government_is_mandala - government_has_flag = government_is_celestial - government_has_flag = government_is_meritocratic - government_has_flag = japan_feudal_government - } - } - admin_government_reset_effect = yes #this only contains Clan, Tribal, Nomadic and Feudal - } - # Clean up story no-movement flags. - remove_character_flag = laamp_stay_same_kingdom - } -} - -create_landless_adventurer_title_tooltip_effect = { - show_as_tooltip = { - custom_tooltip = laamp_become_adventurer_tt - if = { - limit = { exists = scope:new_landless_adventurer_title} - show_as_tooltip = { get_title = scope:new_landless_adventurer_title } - } - } -} - -find_playable_relatives_effect = { - if = { - limit = { - any_close_family_member = { playable_relative_trigger = yes } - } - ordered_close_family_member = { - limit = { playable_relative_trigger = yes } - order_by = highest_held_title_tier - max = 3 - check_range_bounds = no - if = { - limit = { exists = scope:alt_2 } - save_scope_as = alt_3 - } - else_if = { - limit = { exists = scope:alt_1 } - save_scope_as = alt_2 - } - else = { save_scope_as = alt_1 } - } - } -} - -laamp_switch_playable_character_effect = { - set_player_character = $NEW_CHARACTER$ - hidden_effect = { - if = { - limit = { exists = scope:new_landless_adventurer_title } - destroy_title = scope:new_landless_adventurer_title - } - } -} - -ep3_become_landed_save_liege_effect = { - $TITLE_GIVER$ = { save_scope_as = ruler } - save_scope_value_as = { - name = override_independence_logic - value = $ALWAYS_INDEPENDENT$ - } - if = { - limit = { scope:override_independence_logic = yes } - # Do nothing, we're just here to block subsequent checks. - } - else_if = { - limit = { - scope:ruler = { top_liege != this } - any_in_list = { - list = $TITLE_LIST$ - tier = scope:ruler.highest_held_title_tier - } - NOT = { - any_in_list = { - list = $TITLE_LIST$ - tier > scope:ruler.highest_held_title_tier - } - } - } - scope:ruler.liege = { save_scope_as = new_liege } - } - else_if = { - limit = { - NOT = { - any_in_list = { - list = $TITLE_LIST$ - tier >= scope:ruler.highest_held_title_tier - } - } - } - scope:ruler = { save_scope_as = new_liege } - } -} - -ep3_become_landed_transfer_no_ennobled_modifier_effect = { - destroy_laamp_effect = { ADVENTURER = $TITLE_RECEIVER$ } - $TITLE_RECEIVER$ = { - set_variable = { - name = ascended_throne_reason - value = $REASON$ - weeks = 1 - } - } - create_title_and_vassal_change = { - type = $TYPE$ - add_claim_on_loss = yes - save_scope_as = title_change - } - ordered_in_list = { - list = $TITLE_LIST$ - limit = { - is_landless_type_title = no - is_noble_family_title = no - } - order_by = tier - save_scope_as = new_primary_title - } - ordered_in_list = { - list = $TITLE_LIST$ - limit = { - exists = holder - is_landless_type_title = no - is_noble_family_title = no - } - holder = { - save_scope_as = old_holder - switch = { - trigger = government_has_flag - government_is_administrative = { - save_scope_value_as = { name = old_government value = flag:admin } - } - government_is_clan = { - save_scope_value_as = { name = old_government value = flag:clan } - } - government_is_tribal = { - save_scope_value_as = { name = old_government value = flag:tribal } - } - government_is_nomadic = { - save_scope_value_as = { name = old_government value = flag:nomad } - } - } - } - } - every_in_list = { - list = $TITLE_LIST$ - limit = { - is_leased_out = no - is_landless_type_title = no - is_head_of_faith = no - } - change_title_holder_include_vassals = { - holder = $TITLE_RECEIVER$ - change = scope:title_change - take_baronies = no - } - } - ordered_in_list = { - list = $TITLE_LIST$ - order_by = tier - save_scope_as = new_primary_title - } - resolve_title_and_vassal_change = scope:title_change - # Change liege - create_title_and_vassal_change = { - type = $TYPE$ - add_claim_on_loss = yes - save_scope_as = title_change2 - } - if = { - limit = { exists = scope:new_liege } - $TITLE_RECEIVER$ = { - change_liege = { - liege = scope:new_liege - change = scope:title_change2 - } - } - } - resolve_title_and_vassal_change = scope:title_change2 - $TITLE_RECEIVER$ = { - # Change our government according to the government of our liege. - ## Nomad. - if = { - limit = { - OR = { - government_has_flag = government_is_nomadic - scope:new_liege ?= { government_has_flag = government_is_nomadic } - scope:old_government ?= flag:nomad - scope:new_capital.capital_province = { - OR = { - has_holding_type = nomad_holding - has_holding_type = herder_holding - } - } - } - } - change_government = nomad_government - } - ## Administrative. - else_if = { - limit = { - OR = { - scope:new_liege ?= { government_has_flag = government_is_administrative } - scope:old_government ?= flag:admin - } - } - change_government = administrative_government - } - ## Clan. - else_if = { - limit = { - ep3_is_clan_inclined_trigger = yes - OR = { - scope:new_liege ?= { government_has_flag = government_is_clan } - scope:old_government ?= flag:clan - } - } - change_government = clan_government - } - ## Tribal. - else_if = { - limit = { - OR = { - scope:new_liege ?= { government_has_flag = government_is_tribal } - scope:old_government ?= flag:tribal - } - } - change_government = tribal_government - } - ## Else feudal. - else = { change_government = feudal_government } - } -} - -ep3_become_landed_transfer_effect = { - $TITLE_RECEIVER$ = { - if = { - limit = { character:90028 ?= this } - custom_tooltip = ep3_story_cycle_harrying.3053.b.tt - add_character_flag = hereward_settled_flag - } - set_variable = { - name = ascended_throne_reason - value = $REASON$ - weeks = 1 - } - save_scope_value_as = { - name = ascended_throne_value - value = $REASON$ - } - } - create_title_and_vassal_change = { - type = $TYPE$ - add_claim_on_loss = yes - save_scope_as = title_change - } - scope:target.holder ?= { - save_scope_as = old_holder - switch = { - trigger = government_has_flag - government_is_administrative = { - save_scope_value_as = { name = old_government value = flag:admin } - } - government_is_clan = { - save_scope_value_as = { name = old_government value = flag:clan } - } - government_is_tribal = { - save_scope_value_as = { name = old_government value = flag:tribal } - } - government_is_wanua = { - save_scope_value_as = { name = old_government value = flag:wanua } - } - government_is_nomadic = { - save_scope_value_as = { name = old_government value = flag:nomad } - } - government_is_celestial = { - save_scope_value_as = { name = old_government value = flag:admin } - } - government_is_steppe_admin = { - save_scope_value_as = { name = old_government value = flag:admin } - } - government_is_meritocratic = { - save_scope_value_as = { name = old_government value = flag:admin } - } - government_is_japan_administrative = { - save_scope_value_as = { name = old_government value = flag:admin } - } - government_is_japan_feudal = { - save_scope_value_as = { name = old_government value = flag:japan_feudal } - } - government_is_mandala = { - save_scope_value_as = { name = old_government value = flag:mandala } - } - } - } - every_in_list = { - list = $TITLE_LIST$ - limit = { - is_leased_out = no - is_landless_type_title = no - is_head_of_faith = no - tier >= tier_county - } - change_title_holder_include_vassals = { - holder = $TITLE_RECEIVER$ - change = scope:title_change - take_baronies = no - } - } - ordered_in_list = { - list = $TITLE_LIST$ - order_by = tier - save_scope_as = new_primary_title - } - if = { - limit = { - NOT = { exists = scope:new_capital } - } - ordered_in_list = { - list = $TITLE_LIST$ - limit = { tier = tier_county } - order_by = development_level - save_scope_as = new_capital - } - } - if = { - limit = { has_character_flag = special_laamp_char } - resolve_title_and_vassal_change = scope:title_change - # Then we resolve vassalage separately, so that we can lock in tiers. - create_title_and_vassal_change = { - type = $TYPE$ - add_claim_on_loss = yes - save_scope_as = title_change - } - } - if = { - limit = { - exists = scope:new_liege - trigger_if = { - limit = { - exists = scope:ascended_throne_value - } - NOT = { scope:ascended_throne_value = flag:conquest } - } - } - $TITLE_RECEIVER$ = { - change_liege = { - liege = scope:new_liege - change = scope:title_change - } - } - } - else_if = { - limit = { top_liege != this } - becomes_independent = { change = scope:title_change } - } - resolve_title_and_vassal_change = scope:title_change - $TITLE_RECEIVER$ = { - # Change our government according to the government of our liege. - ## Nomad. - if = { - limit = { - OR = { - government_has_flag = government_is_nomadic - scope:new_liege ?= { government_has_flag = government_is_nomadic } - scope:old_government ?= flag:nomad - scope:new_capital.title_province = { - OR = { - has_holding_type = nomad_holding - has_holding_type = herder_holding - } - } - } - } - change_government = nomad_government - } - ## Administrative. - ## Celestial. - ## Steppe admin. - ## Meritocratic. - ## Soryo. - else_if = { - limit = { - OR = { - scope:new_liege ?= { government_allows = administrative } - scope:old_government ?= flag:admin - } - } - change_to_administrative_effect = yes - } - ## Clan. - else_if = { - limit = { - OR = { - scope:new_liege ?= { government_has_flag = government_is_clan } - scope:old_government ?= flag:clan - AND = { - ep3_is_clan_inclined_trigger = yes - top_liege = this - } - } - } - change_government = clan_government - } - ## Tribal. - else_if = { - limit = { - OR = { - scope:new_liege ?= { government_has_flag = government_is_tribal } - scope:old_government ?= flag:tribal - } - } - change_government = tribal_government - } - ## Wanua. - else_if = { - limit = { - OR = { - scope:new_liege ?= { government_has_flag = government_is_wanua } - scope:old_government ?= flag:wanua - } - } - change_government = wanua_government - } - ## Ritsuryo. - else_if = { - limit = { - OR = { - scope:new_liege ?= { government_has_flag = government_is_japan_feudal } - scope:old_government ?= flag:japan_feudal - } - } - change_government = japan_feudal_government - } - ## Mandala. - else_if = { - limit = { - OR = { - scope:new_liege ?= { government_has_flag = government_is_mandala } - scope:old_government ?= flag:mandala - } - } - change_government = mandala_government - } - ## Else feudal. - else = { change_government = feudal_government } - if = { - limit = { - calc_true_if = { - amount = 3 - prestige_level <= 3 - scope:new_capital.culture ?= { - NOR = { - $TITLE_RECEIVER$.culture ?= this - $TITLE_RECEIVER$.primary_spouse.culture ?= this - $TITLE_RECEIVER$.primary_heir.culture ?= this - } - } - scope:new_capital.faith != faith - } - } - custom_tooltip = ep3_ennobled_adventurer_modifier_reason_3 - add_character_modifier = { - modifier = ep3_ennobled_adventurer_modifier_3 - years = 30 - } - custom_tooltip = ep3_ennobled_adventurer_modifier_rules - } - else_if = { - limit = { - calc_true_if = { - amount = 2 - prestige_level <= 3 - scope:new_capital.culture ?= { - NOR = { - $TITLE_RECEIVER$.culture ?= this - $TITLE_RECEIVER$.primary_spouse.culture ?= this - $TITLE_RECEIVER$.primary_heir.culture ?= this - } - } - scope:new_capital.faith != faith - } - } - custom_tooltip = ep3_ennobled_adventurer_modifier_reason_2 - add_character_modifier = { - modifier = ep3_ennobled_adventurer_modifier_2 - years = 20 - } - custom_tooltip = ep3_ennobled_adventurer_modifier_rules - } - else_if = { - limit = { - calc_true_if = { - amount = 1 - prestige_level <= 3 - scope:new_capital.culture ?= { - NOR = { - $TITLE_RECEIVER$.culture ?= this - $TITLE_RECEIVER$.primary_spouse.culture ?= this - $TITLE_RECEIVER$.primary_heir.culture ?= this - } - } - scope:new_capital.faith != faith - } - } - custom_tooltip = ep3_ennobled_adventurer_modifier_reason_1 - add_character_modifier = { - modifier = ep3_ennobled_adventurer_modifier_1 - years = 10 - } - custom_tooltip = ep3_ennobled_adventurer_modifier_rules - } - } - destroy_laamp_effect = { ADVENTURER = $TITLE_RECEIVER$ } -} - -ep3_become_landed_cleanup_effect = { - if = { - limit = { - exists = scope:supporter - highest_held_title_tier < scope:supporter.highest_held_title_tier - } - create_title_and_vassal_change = { - type = swear_fealty - save_scope_as = change - add_claim_on_loss = no - } - change_liege = { - liege = scope:supporter - change = scope:change - } - resolve_title_and_vassal_change = scope:change - # Message for nearby rulers - create_landed_ruler_message_effect = { - LANDED = scope:attacker - FLAVOR_CHAR = scope:supporter - FLAVOR_TITLE = scope:attacker.primary_title - REASON = flag:conquest_support - } - } - else = { - if = { - limit = { - top_liege != this - NOT = { exists = scope:new_liege } - } - create_title_and_vassal_change = { - type = conquest - save_scope_as = change - add_claim_on_loss = no - } - becomes_independent = { change = scope:change } - resolve_title_and_vassal_change = scope:change - } - # Message for nearby rulers - create_landed_ruler_message_effect = { - LANDED = scope:attacker - FLAVOR_CHAR = scope:defender - FLAVOR_TITLE = scope:attacker.primary_title - REASON = flag:conquest - } - } -} - -ep3_become_landed_warning_effect = { - $TITLE$ = { save_scope_as = title } - $TITLE_RECEIVER$ = { custom_tooltip = seize_realm_warning } -} - -purchase_land_interaction_effect = { - # scope:actor = adventurer - # scope:recipient = seller - # purchased_titles = titles - - hidden_effect = { - scope:actor = { - if = { - limit = { character:90028 ?= this } - add_character_flag = hereward_settled_flag - } - if = { - limit = { - NOT = { has_trait = adventurer } - } - add_trait = adventurer - } - every_courtier = { - set_variable = { - name = former_camp_leader - value = scope:actor - } - add_trait = adventurer_follower - } - } - } - - # Determine hierarchy - ep3_become_landed_save_liege_effect = { - TITLE_GIVER = scope:recipient - ALWAYS_INDEPENDENT = no - TITLE_LIST = purchased_titles - } - # Purchase land specific - scope:actor = { - show_as_tooltip = { - pay_short_term_gold = { - gold = scope:purchase_land_cost - target = scope:recipient - } - } - } - # Resolve title, liege, government changes - ep3_become_landed_transfer_effect = { - TITLE_RECEIVER = scope:actor - TITLE_LIST = purchased_titles - TYPE = granted - REASON = flag:purchased - } - # Extra purchase land specific - scope:actor = { - stress_impact = { - greedy = minor_stress_impact_gain - lazy = minor_stress_impact_loss - } - } - # Effects on land giver - scope:recipient = { add_legitimacy = scope:purchase_land_legitimacy_cost } - # Messages for nearby players - create_landed_ruler_message_effect = { - LANDED = scope:actor - FLAVOR_CHAR = scope:recipient - FLAVOR_TITLE = scope:target - REASON = flag:purchased - } - # Hook - if = { - limit = { scope:offer_hook = yes } - scope:recipient = { - add_hook = { - type = obligation_hook - target = scope:actor - } - } - } -} - -purchase_land_interaction_shortened_effect = { - scope:actor = { - if = { - limit = { character:90028 ?= this } - custom_tooltip = ep3_story_cycle_harrying.3053.b.tt - add_character_flag = hereward_settled_flag - } - show_as_tooltip = { - pay_short_term_gold = { - gold = scope:purchase_land_cost - target = scope:recipient - } - } - hidden_effect = { - scope:recipient = { add_gold = scope:purchase_land_cost } - } - } - scope:actor = { - stress_impact = { - humble = minor_stress_impact_gain - lazy = minor_stress_impact_loss - } - if = { - limit = { - scope:target.tier = tier_duchy - } - custom_tooltip = purchase_land_interaction_shortened_effect_duchy_desc - } - else = { - custom_tooltip = purchase_land_interaction_shortened_effect_county_desc - } - if = { - limit = { - scope:target.tier = tier_duchy - } - scope:target.title_capital_county = { - save_scope_as = new_primary_title - } - } - else = { - scope:target = { - save_scope_as = new_primary_title - } - } - if = { - limit = { - calc_true_if = { - amount = 3 - prestige_level <= 3 - OR = { - scope:new_primary_title.culture != culture - primary_spouse ?= { - culture != scope:new_primary_title.culture - } - primary_heir ?= { - culture != scope:new_primary_title.culture - } - } - scope:new_primary_title.faith != faith - } - } - custom_tooltip = ep3_ennobled_adventurer_modifier_reason_3 - add_character_modifier = { - modifier = ep3_ennobled_adventurer_modifier_3 - years = 30 - } - custom_tooltip = ep3_ennobled_adventurer_modifier_rules - } - else_if = { - limit = { - calc_true_if = { - amount = 2 - prestige_level <= 3 - OR = { - scope:new_primary_title.culture != culture - primary_spouse ?= { - culture != scope:new_primary_title.culture - } - primary_heir ?= { - culture != scope:new_primary_title.culture - } - } - scope:new_primary_title.faith != faith - - } - } - custom_tooltip = ep3_ennobled_adventurer_modifier_reason_2 - add_character_modifier = { - modifier = ep3_ennobled_adventurer_modifier_2 - years = 20 - } - custom_tooltip = ep3_ennobled_adventurer_modifier_rules - } - else_if = { - limit = { - calc_true_if = { - amount = 1 - prestige_level <= 3 - OR = { - scope:new_primary_title.culture != culture - primary_spouse ?= { - culture != scope:new_primary_title.culture - } - primary_heir ?= { - culture != scope:new_primary_title.culture - } - } - scope:new_primary_title.faith != faith - - } - } - custom_tooltip = ep3_ennobled_adventurer_modifier_reason_1 - add_character_modifier = { - modifier = ep3_ennobled_adventurer_modifier_1 - years = 10 - } - custom_tooltip = ep3_ennobled_adventurer_modifier_rules - } - - } -} - -procure_estate_interaction_effect = { - if = { - limit = { scope:piety_option = yes } - if = { - limit = { faith != scope:recipient.faith } - set_character_faith = scope:recipient.faith - add_character_flag = { - flag = procure_estate_conversion - months = 1 - } - } - scope:recipient = { - add_piety = { - value = procure_estate_interaction_cost_base_piety - multiply = 0.5 - } - } - } - else_if = { - limit = { scope:gold_option = yes } - show_as_tooltip = { - pay_short_term_gold = { - target = scope:recipient - gold = procure_estate_interaction_cost_base_gold - } - } - hidden_effect = { - scope:recipient = { add_gold = procure_estate_interaction_cost_base_gold } - } - } - else_if = { - limit = { scope:hook = yes } - scope:recipient = { - add_hook = { - target = scope:actor - type = favor_hook - } - } - } - else = { - scope:recipient = { - add_prestige = { - value = procure_estate_interaction_cost_base_prestige - multiply = 0.25 - } - } - } - scope:recipient = { change_influence = medium_influence_loss } - #Scope:actor becomes ladmin - scope:actor = { - if = { - limit = { - scope:actor.house ?= { - any_house_member = { - any_held_title = { is_noble_family_title = yes } - top_liege = scope:recipient.top_liege - } - } - } - found_cadet_house_decision_effect = { - CHARACTER = scope:actor - PRESTIGE = major_prestige_gain - } - } - # Note our courtiers so that they don't escape. - every_courtier = { add_to_list = courtiers_list } - # Change liege - destroy_laamp_effect = { ADVENTURER = scope:actor } - hidden_effect = { - scope:recipient.top_liege = { - add_courtier = scope:actor - return_to_court = yes - } - } - create_noble_family_effect = { GOVERNMENT_GIVER = scope:recipient } - hidden_effect = { - # Return any escaped courtiers. - every_in_list = { - list = courtiers_list - limit = { - NOT = { liege_or_court_owner = scope:actor } - } - scope:actor = { add_courtier = prev } - } - # And boot any new autogenned arrivals. - every_courtier = { - limit = { - is_lowborn = yes - NOR = { - is_in_list = courtiers_list - is_close_or_extended_family_of = scope:actor - is_consort_of = scope:actor - has_important_relationship_trigger = { CHARACTER = scope:actor } - } - } - silent_disappearance_effect = yes - } - } - create_title_and_vassal_change = { - type = swear_fealty - add_claim_on_loss = no - save_scope_as = title_change - } - change_liege = { - liege = scope:recipient.top_liege - change = scope:title_change - } - resolve_title_and_vassal_change = scope:title_change - hidden_effect = { - domicile ?= { - if = { - limit = { - NOT = { domicile_location = scope:recipient.capital_province } - } - move_domicile = scope:recipient.capital_province - } - } - } - add_character_modifier = { - modifier = ep3_administrative_outsider_modifier - years = 15 - } - } - scope:recipient.top_liege = { - if = { - limit = { - is_ai = no - } - send_interface_message = { - type = msg_landless_adventurer_nearby - title = procure_estate_message_title - left_icon = scope:actor - right_icon = scope:recipient - custom_tooltip = procure_estate_message_tt - } - } - every_vassal_or_below = { - limit = { - is_ai = no - NOT = { this = scope:actor } - } - send_interface_message = { - type = msg_landless_adventurer_nearby - title = procure_estate_message_title - left_icon = scope:actor - right_icon = scope:recipient - custom_tooltip = procure_estate_message_tt - } - } - } -} - -negotiate_settlement_interaction_effect = { - # scope:actor = offerer - # scope:recipient = adventurer - # offered_titles = titles - - hidden_effect = { - scope:recipient = { - if = { - limit = { - NOT = { has_trait = adventurer } - } - add_trait = adventurer - } - every_courtier = { - set_variable = { - name = former_camp_leader - value = scope:recipient - } - add_trait = adventurer_follower - } - } - } - - # Determine hierarchy - ep3_become_landed_save_liege_effect = { - TITLE_GIVER = scope:actor - ALWAYS_INDEPENDENT = no - TITLE_LIST = offered_titles - } - # Negotiate settlement specific - scope:recipient = { - # End relevant wars - every_character_war = { - limit = { - OR = { - primary_attacker = scope:recipient - primary_defender = scope:recipient - } - } - end_war = white_peace - } - # Remove from relevant wars - every_character_war = { - limit = { - NOR = { - primary_attacker = scope:recipient - primary_defender = scope:recipient - } - any_war_defender = { - OR = { - this = scope:actor - this.top_liege = scope:actor.top_liege - } - } - } - remove_participant = scope:recipient - } - } - # Resolve title, liege, government changes - ep3_become_landed_transfer_effect = { - TITLE_RECEIVER = scope:recipient - TITLE_LIST = offered_titles - TYPE = granted - REASON = flag:negotiated - } - # Effects on land giver - scope:actor = { - add_legitimacy = scope:negotiate_settlement_legitimacy_cost - stress_impact = { - greedy = minor_stress_impact_gain - vengeful = minor_stress_impact_gain - } - } - # Messages for nearby players - create_landed_ruler_message_effect = { - LANDED = scope:recipient - FLAVOR_CHAR = scope:actor - FLAVOR_TITLE = scope:new_primary_title - REASON = flag:negotiated - } - # And, just in case it's failed, make sure that we've vassalised our new friend. - hidden_effect = { - if = { - limit = { - scope:recipient = { - highest_held_title_tier < scope:actor.highest_held_title_tier - top_liege = this - } - } - create_title_and_vassal_change = { - type = swear_fealty - save_scope_as = change - } - scope:recipient = { - change_liege = { - liege = scope:actor - change = scope:change - } - } - resolve_title_and_vassal_change = scope:change - } - } -} - -create_landed_ruler_message_effect = { - hidden_effect = { - $LANDED$ = { save_scope_as = landed } - $FLAVOR_CHAR$ = { save_scope_as = landed_flavor_char } - $FLAVOR_TITLE$ = { save_scope_as = landed_flavor_title } - save_scope_value_as = { - name = landed_creation_reason - value = $REASON$ - } - every_player = { - limit = { - NOR = { - this = scope:landed - this = scope:landed_flavor_char - } - top_liege = scope:landed.top_liege - } - send_interface_message = { - type = msg_landless_adventurer_nearby - title = nearby_landed_ruler_created_message_title - left_icon = scope:landed - right_icon = scope:landed_flavor_char - switch = { - trigger = scope:landed_creation_reason - flag:purchased = { custom_tooltip = nearby_landed_ruler_created_message_purchased_tt } - flag:negotiated = { custom_tooltip = nearby_landed_ruler_created_message_negotiated_tt } - flag:conquest_supporter = { custom_tooltip = nearby_landed_ruler_created_message_conquest_support_tt } - flag:conquest = { custom_tooltip = nearby_landed_ruler_created_message_conquest_tt } - flag:seize_realm = { custom_tooltip = nearby_landed_ruler_created_message_seize_realm_tt } - flag:culture_champion = { custom_tooltip = nearby_landed_ruler_created_message_culture_champion_tt } - fallback = { custom_tooltip = nearby_landed_ruler_created_message_fallback_tt } - } - } - } - } -} - -conquest_supporter_memory_variable_effect = { - set_variable = { - name = ascended_throne_reason - value = flag:conquest_supporter - weeks = 1 - } - set_variable = { - name = ascended_throne_extra - value = scope:supporter - weeks = 1 - } -} - -ep3_laamp_supporter_invalidated_effect = { - if = { - limit = { exists = var:adventurer_invasion_supporter } - save_scope_as = adventurer - var:adventurer_invasion_supporter ?= { save_scope_as = supporter } - var:adventurer_invasion_target ?= { save_scope_as = target } - } - else_if = { - limit = { exists = var:adventurer_invasion_supportee } - var:adventurer_invasion_supportee ?= { save_scope_as = adventurer } - var:adventurer_invasion_target ?= { save_scope_as = target } - save_scope_as = supporter - } - if = { - limit = { - exists = scope:adventurer - exists = scope:supporter - exists = scope:target - } - scope:adventurer ?= { - send_interface_message = { - type = event_landless_adventurer_neutral - title = ep3_laamp_sponsor_invalidated_title - left_icon = scope:supporter - right_icon = scope:target - remove_variable = adventurer_invasion_supporter - remove_variable = adventurer_invasion_target - custom_tooltip = ep3_laamp_sponsor_invalidated_adventurer - } - } - scope:supporter ?= { - send_interface_message = { - type = event_landless_adventurer_neutral - title = ep3_laamp_sponsor_invalidated_title - left_icon = scope:attacker - right_icon = scope:target - remove_variable = adventurer_invasion_supportee - remove_variable = adventurer_invasion_target - custom_tooltip = ep3_laamp_sponsor_invalidated_supporter - if = { - limit = { exists = var:adventurer_invasion_join_war } - set_variable = { - name = adventurer_invasion_join_war - value = scope:actor - years = 5 - } - } - if = { - limit = { exists = var:adventurer_invasion_request_soldiers } - set_variable = { - name = adventurer_invasion_request_soldiers - value = scope:actor - years = 5 - } - } - } - } - } -} - -ep3_laamp_support_variable_cleanup_effect = { - if = { - limit = { exists = var:adventurer_invasion_supporter } - save_scope_as = adventurer - var:adventurer_invasion_supporter ?= { save_scope_as = supporter } - var:adventurer_invasion_target ?= { save_scope_as = target } - } - else_if = { - limit = { exists = var:adventurer_invasion_supportee } - var:adventurer_invasion_supportee ?= { save_scope_as = adventurer } - var:adventurer_invasion_target ?= { save_scope_as = target } - save_scope_as = supporter - } - scope:adventurer ?= { - remove_variable = adventurer_invasion_supporter - remove_variable = adventurer_invasion_target - } - scope:supporter ?= { - remove_variable = adventurer_invasion_supportee - remove_variable = adventurer_invasion_target - } -} - -seize_realm_scheme_success_effect = { - # scope:target = ruler - # scope:owner = adventurer - - hidden_effect = { - scope:owner = { - if = { - limit = { - NOT = { has_trait = adventurer } - } - add_trait = adventurer - } - every_courtier = { - set_variable = { - name = former_camp_leader - value = scope:owner - } - add_trait = adventurer_follower - } - } - } - - scope:target = { - save_scope_as = background_dungeon_scope - save_scope_as = background_courtyard_scope - save_scope_as = background_throne_room_scope - every_held_title = { - limit = { - is_leased_out = no - is_landless_type_title = no - is_head_of_faith = no - } - add_to_list = seized_titles - } - ordered_in_list = { - list = seized_titles - order_by = tier - save_scope_as = realm_title - } - } - # Determine independent vassals - adventurer_realm_destabilisation_list_effect = { - TITLE_GIVER = scope:target - TITLE_RECEIVER = scope:owner - TITLE = scope:target.primary_title - } - # Determine hierarchy - ep3_become_landed_save_liege_effect = { - TITLE_GIVER = scope:target - ALWAYS_INDEPENDENT = no - TITLE_LIST = seized_titles - } - # Resolve title, liege, government changes - ep3_become_landed_transfer_effect = { - TITLE_RECEIVER = scope:owner - TITLE_LIST = seized_titles - TYPE = usurped - REASON = flag:seize_realm - } - # Old ruler's fate - if = { - limit = { exists = scope:death } - scope:target = { - death = { death_reason = death_fight } - } - } - else_if = { - limit = { exists = scope:imprison } - scope:target = { add_character_flag = was_abducted_block_notification_event } - rightfully_imprison_character_less_verbose_effect = { - TARGET = scope:target - IMPRISONER = scope:owner - } - } - add_clan_unity_interaction_effect = { - CHARACTER = scope:owner - TARGET = scope:target - VALUE = medium_unity_loss - DESC = clan_unity_seize_realm_attempted.desc - REVERSE_NON_HOUSE_TARGET = no - } - successful_seize_realm_opinion_effect = { - VICTIM = scope:target - PLOTTER = scope:owner - } - # Vassals break away - adventurer_realm_destabilisation_transfer_effect = { - TITLE_RECEIVER = scope:owner - TITLE_GIVER = scope:target - TITLE = scope:realm_title - TITLE_LIST = seized_titles - } - # Messages for nearby players - create_landed_ruler_message_effect = { - LANDED = scope:owner - FLAVOR_CHAR = scope:target - FLAVOR_TITLE = scope:realm_title - REASON = flag:seize_realm - } - scope:owner = { - create_character_memory = { - type = seized_realm_memory - participants = { deposed = scope:target } - } - ordered_memory = { - memory_type = seized_realm_memory - order_by = memory_creation_date - if = { - limit = { - NOT = { exists = var:realm } - } - set_variable = { - name = realm - value = scope:realm_title - } - } - } - } - scope:target = { - create_character_memory = { - type = realm_seized_memory - participants = { deposer = scope:owner } - } - ordered_memory = { - memory_type = realm_seized_memory - order_by = memory_creation_date - if = { - limit = { - NOT = { exists = var:realm } - } - set_variable = { - name = realm - value = scope:realm_title - } - } - } - } -} - -seize_realm_scheme_failure_effect = { - scope:scheme = { end_scheme = yes } - #Add Watchful Modifier to the target - scope:target = { - save_scope_as = background_dungeon_scope - save_scope_as = background_courtyard_scope - save_scope_as = background_throne_room_scope - ordered_held_title = { - limit = { - is_leased_out = no - is_landless_type_title = no - is_head_of_faith = no - } - order_by = tier - save_scope_as = realm_title - } - show_as_tooltip = { - add_character_modifier = { - modifier = watchful_modifier - days = watchful_modifier_duration - } - } - } - # Old ruler's fate - if = { - limit = { exists = scope:death } - scope:owner = { - death = { death_reason = death_fight } - } - } - else = { - scope:owner = { - create_character_memory = { - type = seized_realm_failed_memory - participants = { deposed = scope:target } - } - ordered_memory = { - memory_type = seized_realm_failed_memory - order_by = memory_creation_date - if = { - limit = { - NOT = { exists = var:realm } - } - set_variable = { - name = realm - value = scope:realm_title - } - } - } - } - if = { - limit = { exists = scope:imprison } - scope:owner = { add_character_flag = was_abducted_block_notification_event } - rightfully_imprison_character_less_verbose_effect = { - TARGET = scope:owner - IMPRISONER = scope:target - } - hidden_effect = { change_prison_type = dungeon } - } - } - attempted_seize_realm_opinion_effect = { - VICTIM = scope:target - PLOTTER = scope:owner - } - # If we're a clan this affects unity - add_clan_unity_interaction_effect = { - CHARACTER = scope:owner - TARGET = scope:target - VALUE = medium_unity_loss - DESC = clan_unity_seize_realm_attempted.desc - REVERSE_NON_HOUSE_TARGET = no - } - scope:target = { - create_character_memory = { - type = realm_seized_failed_memory - participants = { deposer = scope:owner } - } - ordered_memory = { - memory_type = realm_seized_failed_memory - order_by = memory_creation_date - if = { - limit = { - NOT = { exists = var:realm } - } - set_variable = { - name = realm - value = scope:realm_title - } - } - } - } -} - -successful_seize_realm_opinion_effect = { - $VICTIM$ = { - if = { - limit = { is_alive = yes } - add_opinion = { - target = $PLOTTER$ - modifier = seized_my_realm_crime - } - set_relation_rival = { - target = scope:owner - reason = rival_seized_realm_reason - } - } - every_spouse = { - limit = { - NOR = { - this = $PLOTTER$ - is_spouse_of = $PLOTTER$ - is_close_family_of = $PLOTTER$ - } - } - add_to_temporary_list = close_family_seize_realm_opinion_list - } - every_close_family_member = { - limit = { - NOR = { - this = $PLOTTER$ - is_spouse_of = $PLOTTER$ - is_close_family_of = $PLOTTER$ - } - } - add_to_temporary_list = close_family_seize_realm_opinion_list - } - every_in_list = { - list = close_family_seize_realm_opinion_list - custom = all_close_family_and_spouses - add_opinion = { - target = $PLOTTER$ - modifier = seized_close_family_realm_crime - } - } - } -} - -attempted_seize_realm_opinion_effect = { - $VICTIM$ = { - if = { - limit = { is_alive = yes } - add_opinion = { - target = $PLOTTER$ - modifier = attempted_to_seize_my_realm_crime - } - } - every_spouse = { - limit = { NOT = { this = $PLOTTER$ } } - add_to_temporary_list = close_family_seize_realm_opinion_list - } - every_close_family_member = { - limit = { NOT = { this = $PLOTTER$ } } - add_to_temporary_list = close_family_seize_realm_opinion_list - } - - if = { - limit = { - any_in_list = { list = close_family_seize_realm_opinion_list } - } - every_in_list = { - list = close_family_seize_realm_opinion_list - custom = all_close_family_and_spouses - add_opinion = { - target = $PLOTTER$ - modifier = attempted_to_seize_realm_close_family_crime - } - } - } - - } -} - -adventurer_realm_destabilisation_list_effect = { - $TITLE_RECEIVER$ = { save_scope_as = adventurer } - $TITLE$ = { save_scope_as = title } - $TITLE_GIVER$ = { - save_scope_as = ruler - # Determine vassal sentiment - calculated before ruler change - hidden_effect = { - every_vassal = { - limit = { - highest_held_title_tier >= tier_county - save_temporary_scope_as = vassal_temp - # Only vassals who will not *still* be de jure vassals of the title loser via other titles - trigger_if = { - limit = { - $TITLE_GIVER$ = { - any_held_title = { - tier >= scope:title.tier - this != scope:title - } - } - } - any_held_title = { - target_is_de_jure_liege_or_above = scope:title - } - } - trigger_if = { - limit = { - government_allows = administrative - } - scope:title = { - OR = { - AND = { - scope:ruler.primary_title.tier = tier_kingdom - tier < tier_kingdom - } - tier < tier_empire - } - } - } - } - # Calculate how likely are they to not become your vassal - random = { - chance = 0 - ### FAITH/CULTURE - modifier = { # Cultural acceptance differences - add = { - value = "culture.cultural_acceptance(scope:adventurer.culture)" - subtract = 100 - abs = yes - divide = 5 - } - culture = { - this != scope:adventurer.culture - cultural_acceptance = { - target = scope:adventurer.culture - value < 50 - } - OR = { - this = scope:ruler.culture - "cultural_acceptance(scope:ruler.culture)" > "cultural_acceptance(scope:adventurer.culture)" - } - } - } - modifier = { # Zealous of other faiths more likely - add = { - value = ai_zeal - multiply = 0.15 - multiply = "scope:vassal_temp.faith.faith_hostility_level(scope:adventurer.faith)" - max = 25 - } - ai_zeal > low_positive_zeal - faith = { - this != scope:adventurer.faith - "faith_hostility_level(scope:adventurer.faith)" > 0 - } - } - modifier = { # Theocatic Vassals of different faith more likely - factor = 2 - has_government = theocracy_government - faith != scope:adventurer.faith - } - ### DISTANCE - modifier = { # Distant vassals more likely - add = { - value = 0 - add = scope:distance - if = { - limit = { scope:distance >= squared_distance_medium } - add = scope:distance - multiply = 0.0001 - } - max = 25 - } - "capital_county.squared_distance(scope:ruler.capital_county)" >= squared_distance_medium - capital_county = { - save_temporary_scope_value_as = { - name = distance - value = "squared_distance(scope:ruler.capital_county)" - } - } - } - ### PERSONALITY - ai_value_modifier = { - ai_boldness = 0.15 - ai_energy = 0.15 - ai_greed = 0.15 - ai_honor = -0.15 - } - ### OPINION - opinion_modifier = { # More likely if dislikes adventurer - opinion_target = scope:adventurer - multiplier = -0.25 - } - opinion_modifier = { # More likely if liked old ruler - opinion_target = scope:ruler - multiplier = 0.1 - } - ### STRENGTH - modifier = { # Small vassals less likely - add = -15 - tier_difference = { - target = scope:ruler - value <= -2 - } - } - modifier = { - add = -25 - realm_size < tiny_realm_size - } - modifier = { # Powerful vassals more likely - factor = 1.25 - is_powerful_vassal = yes - } - modifier = { # Powerful vassals more likely - add = { - value = highest_held_title_tier - multiply = 5 - } - } - ### RELEVANCE - modifier = { # Fringe vassals more likely - factor = 1.25 - any_sub_realm_county = { - any_neighboring_county = { holder.top_liege != scope:ruler } - } - } - modifier = { # Core vassals less likely - factor = 0.75 - scope:ruler.capital_county.kingdom = { - any_de_jure_county = { this = scope:vassal_temp.capital_county } - } - } - ### FAMILY - modifier = { # Relatives of deposed more likely - factor = 1.1 - is_close_family_of = scope:ruler - NOT = { is_close_family_of = scope:adventurer } - } - modifier = { # Dynasts of deposed more likely - factor = 1.1 - dynasty ?= { - this = scope:ruler.dynasty - this != scope:adventurer.dynasty - } - } - modifier = { # Relatives of adventurer less likely - factor = 0.75 - is_close_family_of = scope:adventurer - NOT = { is_close_family_of = scope:ruler } - } - modifier = { # Dynasts of adventurer less likely - factor = 0.75 - dynasty ?= { - this = scope:adventurer.dynasty - this != scope:ruler.dynasty - } - } - ### HOOKS - modifier = { - factor = 0 - scope:adventurer = { has_hook = scope:vassal_temp } - } - modifier = { - factor = 2 - scope:ruler = { has_hook = scope:vassal_temp } - } - ### TIER - modifier = { - factor = 1.5 - scope:ruler.primary_title.tier = tier_empire - } - modifier = { - factor = 1.25 - scope:ruler.primary_title.tier = tier_kingdom - } - max = 95 - add_to_list = independent_vassals - } - } - # Save heirs for claimant wars - scope:title = { - every_title_heir = { - limit = { - save_temporary_scope_as = heir_temp - scope:title = { - place_in_line_of_succession = { - target = scope:heir_temp - value <= 5 - } - } - } - add_to_list = heirs - } - } - } - } -} - -adventurer_realm_destabilisation_civil_war_effect = { - $TITLE_GIVER$ = { save_scope_as = ruler } - $TITLE_RECEIVER$ = { save_scope_as = adventurer } - $TITLE$ = { save_scope_as = title } - if = { - limit = { - any_in_list = { list = independent_vassals } - } - scope:ruler = { - if = { - limit = { is_alive = yes } - save_scope_as = claimant - } - else_if = { - limit = { - any_in_list = { list = heirs } - } - random_in_list = { - list = heirs - limit = { has_strong_claim_on = scope:realm } - alternative_limit = { has_weak_claim_on = scope:realm } - weight = { - base = 1 - modifier = { add = age } - } - save_scope_as = claimant - } - } - else_if = { - limit = { - scope:title = { - any_claimant = { - this != scope:adventurer - } - } - } - scope:title = { - random_claimant = { - limit = { has_strong_claim_on = scope:realm } - alternative_limit = { has_weak_claim_on = scope:realm } - weight = { - base = 1 - modifier = { add = age } - } - save_scope_as = claimant - } - } - } - else = { - ordered_in_list = { - list = independent_vassals - order_by = max_military_strength - save_scope_as = claimant - } - } - } - # Vassals Breakaway - ordered_in_list = { - list = independent_vassals - limit = { - can_create_faction = { - type = claimant_faction - target = scope:adventurer - } - } - order_by = max_military_strength - save_scope_as = revolt_leader - create_faction = { - type = claimant_faction - target = scope:adventurer - } - joined_faction = { - save_scope_as = faction - set_special_character = scope:claimant - set_special_title = scope:realm - } - } - every_in_list = { - list = independent_vassals - limit = { - this != scope:revolt_leader - can_join_faction = scope:faction - } - join_faction = scope:faction - } - scope:faction = { - faction_start_war = { title = scope:realm } - } - } -} - -adventurer_realm_destabilisation_transfer_effect = { - $TITLE_RECEIVER$ = { save_scope_as = adventurer } - $TITLE_GIVER$ = { save_scope_as = ruler } - $TITLE$ = { save_scope_as = title } - if = { - limit = { - any_in_list = { list = independent_vassals } - } - # Vassals Breakaway - create_title_and_vassal_change = { - type = independency - add_claim_on_loss = yes - save_scope_as = change - } - hidden_effect = { - every_in_list = { - list = independent_vassals - save_temporary_scope_as = vassal_temp - if = { - limit = { - scope:adventurer = { top_liege = this } - scope:ruler = { - NOT = { - any_held_title = { - this != scope:title - any_in_de_jure_hierarchy = { this = scope:vassal_temp.primary_title } - } - } - } - } - becomes_independent = { change = scope:change } - } - else_if = { - limit = { - scope:ruler = { - NOT = { - any_held_title = { - this != scope:title - any_in_de_jure_hierarchy = { this = scope:vassal_temp.primary_title } - } - } - } - } - change_liege = { - liege = scope:adventurer.liege - change = scope:change - } - } - add_opinion = { - modifier = seized_lieges_realm_crime - target = scope:adventurer - } - } - } - resolve_title_and_vassal_change = scope:change - } - create_title_and_vassal_change = { - type = conquest - add_claim_on_loss = yes - save_scope_as = change - } - hidden_effect = { - every_in_list = { - list = $TITLE_LIST$ - limit = { tier >= tier_county } - custom_tooltip = CONQUEST_CB_TITLE - every_in_de_jure_hierarchy = { - continue = { tier >= tier_duchy } - limit = { - tier >= tier_county - holder ?= { - OR = { - this = scope:ruler - target_is_liege_or_above = scope:ruler - } - } - } - save_temporary_scope_as = title_temp - if = { - limit = { - holder != scope:adventurer - OR = { - holder = scope:ruler - holder.highest_held_title_tier >= scope:title.tier - scope:adventurer = { has_claim_on = scope:title_temp } - } - } - add_to_temporary_list = titles_taken - } - else = { - holder = { - if = { - limit = { - liege = scope:ruler - NOT = { is_in_list = independent_vassals } - } - add_to_temporary_list = vassals_taken - } - } - } - } - } - } - hidden_effect = { - every_in_list = { - list = vassals_taken - change_liege = { - liege = scope:adventurer - change = scope:change - } - } - } - resolve_title_and_vassal_change = scope:change -} - -player_adventurer_contract_generation_on_domicile_moved_effect = { - if = { - limit = { player_adventurer_sufficient_distance_for_contract_spawn_trigger = yes } - save_temporary_scope_as = char_temp - if = { # Explorers - limit = { has_realm_law = camp_purpose_explorers } - populate_task_contracts_for_area = { - location = scope:char_temp.location - amount = 1 - group = { laamp_contracts_transport_group } - } - } - else_if = { # Mercenaries - limit = { has_realm_law = camp_purpose_mercenaries } - populate_task_contracts_for_area = { - location = scope:char_temp.location - amount = 1 - group = { laamp_contracts_war_group } - } - ordered_independent_ruler = { - limit = { - in_diplomatic_range = scope:char_temp - scope:char_temp = { - can_create_task_contract = { - type_name = laamp_join_war_contract - employer = prev - } - } - } - order_by = { - value = 0 - subtract = "capital_county.squared_distance(scope:char_temp.domicile.domicile_location)" - } - ordered_character_war = { - limit = { - ep3_adventurer_mercenary_war_trigger = { - EMPLOYER = prev - LAAMP = scope:char_temp - } - } - order_by = war_total_participants_current_strength_value - primary_defender ?= { save_scope_as = defender } - primary_attacker ?= { save_scope_as = attacker } - save_scope_as = war - scope:char_temp = { - spawn_join_war_contracts_effect = { - WAR = scope:war - LAAMP = scope:char_temp - ATTACKER = scope:attacker - DEFENDER = scope:defender - } - } - } - } - debug_log = "WAR_1" - debug_log_scopes = yes - } - populate_location_with_contracts_effect = { - AREA_CHAR = scope:char_temp - AMOUNT = 3 - } - # Log that we visited this place. - add_to_variable_list = { - name = laamp_recently_visited_kingdoms - target = scope:kingdom_temp - years = 5 - } - } -} - -player_adventurer_contract_generation_on_wait_in_place_effect = { - if = { - limit = { player_adventurer_sufficient_distance_for_contract_spawn_trigger = yes } - # Track where we are. - set_variable = { - name = contract_passive_spawn_location - value = location.kingdom - } - # Reset the tally. - set_variable = { - name = contract_passive_spawn_tally - value = 0 - } - # Queue up an additional contract. - trigger_event = { - id = ep3_laamps.9981 - months = { 4 6 } - } - } -} - -contract_passive_spawn_effect = { - #count how many contracts you already have - every_character_task_contract = { - add_to_list = num_of_contracts_before - } - # G'is a contract. - populate_location_with_contracts_effect = { - AREA_CHAR = root - AMOUNT = $SPAWN_CONTRACTS$ - } - #count them again to see if the effect above spawned something - every_character_task_contract = { - add_to_list = num_of_contracts_after - } - set_local_variable = { - name = current_value - value = list_size:num_of_contracts_before - } - # Make sure we don't get too many of them just sitting in one place. - while = { - limit = { - local_var:current_value < list_size:num_of_contracts_after - } - increment_variable_effect = { - VAR = contract_passive_spawn_tally - VAL = 1 - } - change_local_variable = { - name = current_value - add = 1 - } - } -} - -#spawns a valid task contract for a landless adventurer -# root = landless adventurer -# TASK_CONTRACT_TYPE = type name of a task contract you want to spawn -# SPAWN_POINT = where you want the task contract to appear on the map -laamp_spawn_valid_task_contract = { - $SPAWN_POINT$ = { - save_scope_as = spawn_location - } - random_ruler = { - limit = { - root = { - can_create_task_contract = { - type_name = $TASK_CONTRACT_TYPE$ - employer = prev - } - } - } - save_scope_as = employer - } - create_task_contract = { - task_contract_type = $TASK_CONTRACT_TYPE$ - task_contract_tier = scope:employer.task_contract_tier_value - location = scope:spawn_location - task_contract_employer = scope:employer - } -} - -points_of_interest_tracker_effect = { - if = { - limit = { - government_has_flag = government_is_landless_adventurer - location = { - save_temporary_scope_as = province_temp - OR = { - # Building flags - has_any_point_of_interest_flag = yes - # Capitals - AND = { - province_owner.top_liege.capital_province ?= this - province_owner.top_liege ?= { highest_held_title_tier >= tier_kingdom } - } - # Grand Cities - this = province:4828 #Baghdad - this = province:2575 #Rome - this = province:496 #Constantinople - # Points of interest - this = province:747 # Halikarnassos - this = province:6053 # Alexandria - # Legend stuff - any_legend = { - legend_owner.capital_province ?= scope:province_temp - OR = { - legend_quality = illustrious - legend_quality = mythical - } - } - } - } - } - if = { - limit = { - NOT = { - has_variable = poi_visited - } - } - set_variable = { - name = poi_visited - value = 1 - } - } - else = { - change_variable = { - name = poi_visited - add = 1 - } - } - } -} - -zealous_missionary_conversion_effect = { - if = { - limit = { - exists = location.barony.holder - government_has_flag = government_is_landless_adventurer - has_character_flag = zealous_missionary_timer - location.county ?= { hasan_evangelize_province_trigger = yes } - } - trigger_event = ep3_laamp_decision_event.1103 - } -} - -war_contracts_completed_tracker_effect = { - if = { - limit = { - government_has_flag = government_is_landless_adventurer - has_variable = war_contract_tracker - } - change_variable = { - name = war_contract_tracker - add = 1 - } - } - else_if = { - limit = { - government_has_flag = government_is_landless_adventurer - } - set_variable = { - name = war_contract_tracker - value = 1 - } - } -} - -bandit_king_maa_spawn_effect = { - - save_scope_as = bandit_king - if = { - limit = { - has_character_modifier = bandit_king_modifier - } - set_variable = { - name = maa_number - value = 1 - } - if = { - limit = { - scope:extra_reward ?= flag:yes - } - change_variable = { - name = maa_number - add = 2 - } - } - if = { - limit = { - calc_true_if = { - amount >= 4 - has_trait_xp = { - trait = gallowsbait - track = bandit - value >= 60 - } - has_trait_xp = { - trait = gallowsbait - track = marauder - value >= 60 - } - has_trait_xp = { - trait = gallowsbait - track = poacher - value >= 60 - } - has_trait_xp = { - trait = gallowsbait - track = thief - value >= 60 - } - has_trait_xp = { - trait = gallowsbait - track = trickster - value >= 60 - } - } - } - change_variable = { - name = maa_number - add = 2 - } - } - else_if = { - limit = { - calc_true_if = { - amount >= 2 - has_trait_xp = { - trait = gallowsbait - track = bandit - value >= 60 - } - has_trait_xp = { - trait = gallowsbait - track = marauder - value >= 60 - } - has_trait_xp = { - trait = gallowsbait - track = poacher - value >= 60 - } - has_trait_xp = { - trait = gallowsbait - track = thief - value >= 60 - } - has_trait_xp = { - trait = gallowsbait - track = trickster - value >= 60 - } - } - } - change_variable = { - name = maa_number - add = 1 - } - } - else_if = { - limit = { - OR = { - has_trait_xp = { - trait = gallowsbait - track = bandit - value >= 60 - } - has_trait_xp = { - trait = gallowsbait - track = marauder - value >= 60 - } - has_trait_xp = { - trait = gallowsbait - track = poacher - value >= 60 - } - has_trait_xp = { - trait = gallowsbait - track = thief - value >= 60 - } - has_trait_xp = { - trait = gallowsbait - track = trickster - value >= 60 - } - } - } - change_variable = { - name = maa_number - add = 1 - } - } - custom_tooltip = bandit_king_maa_spawn_effect_desc #otherwise the tooltip looks crazy - hidden_effect = { - random_list = { - 1 = { - spawn_army = { - men_at_arms = { - type = maa_poachers - stacks = var:maa_number - } - inheritable = no - uses_supply = yes - location = scope:bandit_king.location - name = ep3_poachers_army - } - spawn_army = { - men_at_arms = { - type = maa_thieves - stacks = var:maa_number - } - inheritable = no - uses_supply = yes - location = scope:bandit_king.location - name = ep3_bandits_army - } - } - 1 = { - spawn_army = { - men_at_arms = { - type = maa_bandits - stacks = var:maa_number - } - inheritable = no - uses_supply = yes - location = scope:bandit_king.location - name = ep3_bandits_army - } - spawn_army = { - men_at_arms = { - type = maa_thieves - stacks = var:maa_number - } - inheritable = no - uses_supply = yes - location = scope:bandit_king.location - name = ep3_bandits_army - } - } - } - } - } -} - -absolve_crusaders_of_gallowsbait_effect = { - if = { - limit = { - has_trait_xp = { - trait = gallowsbait - track = bandit - value >= 1 - } - } - add_trait_xp = { - trait = gallowsbait - track = bandit - value = crusader_absolution_xp_removed_per_track_value - } - } - if = { - limit = { - has_trait_xp = { - trait = gallowsbait - track = trickster - value >= 1 - } - } - add_trait_xp = { - trait = gallowsbait - track = trickster - value = crusader_absolution_xp_removed_per_track_value - } - } - if = { - limit = { - has_trait_xp = { - trait = gallowsbait - track = thief - value >= 1 - } - } - add_trait_xp = { - trait = gallowsbait - track = thief - value = crusader_absolution_xp_removed_per_track_value - } - } - if = { - limit = { - has_trait_xp = { - trait = gallowsbait - track = poacher - value >= 1 - } - } - add_trait_xp = { - trait = gallowsbait - track = poacher - value = crusader_absolution_xp_removed_per_track_value - } - } - if = { - limit = { - has_trait_xp = { - trait = gallowsbait - track = marauder - value >= 1 - } - } - add_trait_xp = { - trait = gallowsbait - track = marauder - value = crusader_absolution_xp_removed_per_track_value - } - } - if = { - limit = { - has_trait_xp = { - trait = gallowsbait - track = bandit - value <= crusader_absolution_min_xp_to_remove_trait_value - } - has_trait_xp = { - trait = gallowsbait - track = trickster - value <= crusader_absolution_min_xp_to_remove_trait_value - } - has_trait_xp = { - trait = gallowsbait - track = thief - value <= crusader_absolution_min_xp_to_remove_trait_value - } - has_trait_xp = { - trait = gallowsbait - track = poacher - value <= crusader_absolution_min_xp_to_remove_trait_value - } - has_trait_xp = { - trait = gallowsbait - track = marauder - value <= crusader_absolution_min_xp_to_remove_trait_value - } - } - remove_trait = gallowsbait - } -} - -temporarily_lock_visit_settlement_effect = { - set_variable = { - name = ep3_laamp_decision_1000_is_visiting - days = visit_settlement_lock_days - } -} - -################################################## -# Admin Government -################################################## - -torture_grants_influence_effect = { - if = { - limit = { - domicile ?= { has_domicile_parameter = estate_torture_grants_influence } - } - change_influence = medium_influence_gain - } -} - -create_noble_family_effect = { - debug_log = create_noble_family_title - save_scope_as = new_noble_family_holder - $GOVERNMENT_GIVER$ = { save_scope_as = government_giver } - hidden_effect = { # NF can only be held by house heads - if = { # Start by checking that we are not the house head already - limit = { - house ?= { house_head != scope:new_noble_family_holder } - } - if = { # If not, let's see if it would be reasonable to become house head... - limit = { - house.house_head ?= { - top_liege = scope:new_noble_family_holder.top_liege - OR = { - is_ruler = no - primary_title.tier <= tier_county - } - is_ai = yes # Don't steal house head from a player - } - } - house = { set_house_head = scope:new_noble_family_holder } - } - else = { # ... Otherwise, we create a cadet branch - create_cadet_branch = {} - } - } - } - scope:government_giver = { - if = { - limit = { - scope:new_noble_family_holder = { - NOT = { - any_held_title = { is_noble_family_title = yes } - } - } - } - switch = { - trigger = has_government - japan_administrative_government = { # Japan has count level NFs - scope:new_noble_family_holder = { - give_noble_family_title = { - name = noble_family_name - tier = county - article = DEFAULT_TITLE_NAME_ARTICLE - government = japan_administrative_government - save_scope_as = new_title - } - } - } - japan_feudal_government = { # Japan has count level NFs - scope:new_noble_family_holder = { - give_noble_family_title = { - name = noble_family_name - tier = county - article = DEFAULT_TITLE_NAME_ARTICLE - government = japan_feudal_government - save_scope_as = new_title - } - } - } - celestial_government = { # China has different government - scope:new_noble_family_holder = { - give_noble_family_title = { - name = noble_family_name - tier = county - article = DEFAULT_TITLE_NAME_ARTICLE - government = celestial_government - save_scope_as = new_title - } - trigger_event = { - id = tgp_china_career.0001 - days = { 2 5 } - } - } - } - meritocratic_government = { # Meritocratic has different government - scope:new_noble_family_holder = { - give_noble_family_title = { - name = noble_family_name - tier = county - article = DEFAULT_TITLE_NAME_ARTICLE - government = meritocratic_government - save_scope_as = new_title - } - } - } - steppe_admin_government = { # Steppe Admin has different government - scope:new_noble_family_holder = { - give_noble_family_title = { - name = noble_family_name - tier = county - article = DEFAULT_TITLE_NAME_ARTICLE - government = steppe_admin_government - save_scope_as = new_title - } - } - } - fallback = { - scope:new_noble_family_holder = { - give_noble_family_title = { - name = noble_family_name - tier = duchy - article = DEFAULT_TITLE_NAME_ARTICLE - government = administrative_government - save_scope_as = new_title - } - } - } - } - } - scope:new_title.holder ?= { - save_scope_as = noble_family_head - scope:new_title = { set_coa = scope:noble_family_head.house } - } - custom_description = { text = create_noble_family_tt } - - #Notifications - every_player = { - limit = { - top_liege = scope:new_noble_family_holder.top_liege - this != scope:new_noble_family_holder - # China has hundreds of Noble Families, it gets spammy - NOT = { government_allows = merit } - } - trigger_event = { - id = ep3_emperor_yearly.2410 - days = 1 - } - } - } - - debug_log_scopes = yes -} - -increase_governance_effect = { - # VALUE - The amount of XP added to the Governor trait/increased chance to gain the Governor trait - save_scope_value_as = { - name = governor_xp_gain - value = { - value = $VALUE$ - if = { - limit = { - exists = scope:task_contract - } - multiply = governance_task_contract_tier_value - - if = { - limit = { - $VALUE$ > 0 - domicile ?= { has_domicile_parameter = estate_governor_trait_xp_bonus_for_contracts } - } - multiply = { - value = 1 - add = estate_governance_contract_bonus_value - } - } - } - } - } - # Double-check if you have the governor trait - If not, let's make sure you get it - if = { - limit = { - NOT = { has_trait = governor } - is_governor = yes - } - add_trait = governor - } - # If you have the trait, let's increase your XP for it - else_if = { - limit = { - has_trait = governor - } - add_trait_xp = { - trait = governor - value = scope:governor_xp_gain - } - } -} - -spawn_governance_contract_effect = { - save_scope_as = governor - # Select the Contract Tier (somewhat randomized, based on your experience as a governor) - random_list = { - 30 = { - save_scope_value_as = { - name = governance_task_contract_tier - value = define:NTaskContract|LOW_TASK_CONTRACT_TIER - } - } - 20 = { - save_scope_value_as = { - name = governance_task_contract_tier - value = define:NTaskContract|MEDIUM_TASK_CONTRACT_TIER - } - - modifier = { - add = 10 - has_trait = governor - } - modifier = { - add = 10 - has_trait = governor - has_trait_xp = { - trait = governor - value >= 40 - } - } - } - 10 = { - save_scope_value_as = { - name = governance_task_contract_tier - value = define:NTaskContract|HIGH_TASK_CONTRACT_TIER - } - - modifier = { - add = 10 - has_trait = governor - } - modifier = { - add = 10 - has_trait = governor - has_trait_xp = { - trait = governor - value >= 40 - } - } - modifier = { - add = 20 - has_trait = governor - has_trait_xp = { - trait = governor - value >= 80 - } - } - } - } - - # Select which contract to create - trigger_event = { - on_action = spawn_admin_governance_contract_on_action - } - - play_sound_effect = "event:/DLC/EP3/SFX/Stingers/Byzantine_Flavor/ep3_mx_sting_byzantineflavor_become_governor" -} - -manage_new_governance_contract_effect = { - if = { - limit = { exists = scope:target_province } - if = { - limit = { - NOT = { has_character_flag = admin_governance_frequency_cooldown } - } - add_character_flag = { flag = admin_governance_frequency_cooldown years = 6 } - } - send_interface_message = { - type = msg_governance_contracts - title = msg_governance_contract_appear.t - desc = msg_governance_contract_appear.desc - right_icon = scope:target_province.county - } - } - if = { - limit = { - is_ai = yes - exists = scope:new_governance_issue - } - accept_task_contract = scope:new_governance_issue - } -} - -generate_governance_outcome_effect = { - # INFO: We use this effect to randomize the options you get when doing a governor contract. - # $OPTIONS$ is the number of options the event has - Never use less than four, and try to have six if possible. - - # Unlock a bonus option if you have enough exp in the Governor trait - We do this here (and not in the option) to avoid blocking the option due to exp decay (if game is unpaused). - if = { - limit = { - has_trait = governor - has_trait_xp = { - trait = governor - value >= 50 - } - } - save_scope_as = governance_option_a - } - - # Check if you have the Governor trait - if = { - limit = { # If you have the trait with at least rank 1, we generate an extra option. - has_trait = governor - has_trait_xp = { - trait = governor - value >= 25 - } - } - save_scope_value_as = { name = governance_number_of_options value = 3 } - } - else = { # Otherwise, you only get two base options. - save_scope_value_as = { name = governance_number_of_options value = 2 } - } - - # Generate the options - set_local_variable = { - name = current_value - value = 0 - } - while = { - limit = { - local_var:current_value < scope:governance_number_of_options - } - random_list = { - # There is no option A, as A should be unlocked for having the Governor trait at rank 2 (which is done in the corresponding event) - 20 = { - trigger = { - NOT = { exists = scope:governance_option_b } - } - save_scope_value_as = { - name = governance_option_b - value = yes - } - change_local_variable = { - name = current_value - add = 1 - } - } - 20 = { - trigger = { - NOT = { exists = scope:governance_option_c } - } - save_scope_value_as = { - name = governance_option_c - value = yes - } - change_local_variable = { - name = current_value - add = 1 - } - } - 20 = { - trigger = { - NOT = { exists = scope:governance_option_d } - } - save_scope_value_as = { - name = governance_option_d - value = yes - } - change_local_variable = { - name = current_value - add = 1 - } - } - 20 = { - trigger = { - NOT = { exists = scope:governance_option_e } - $OPTIONS$ >= 5 - } - save_scope_value_as = { - name = governance_option_e - value = yes - } - change_local_variable = { - name = current_value - add = 1 - } - } - 20 = { - trigger = { - NOT = { exists = scope:governance_option_f } - $OPTIONS$ >= 6 - } - save_scope_value_as = { - name = governance_option_f - value = yes - } - change_local_variable = { - name = current_value - add = 1 - } - } - } - } -} - -remove_other_eparch_modifiers_effect = { - hidden_effect = { # No need to show this - # Let's check for the county opinion modifier first - scope:liege ?= { - # We check and scope to all counties to make sure we remove any stray modifiers in case the capital is moved, etc. - if = { - limit = { - any_realm_county = { - any_county_province = { - has_province_modifier = ep3_eparch_county_opinion_modifier - } - } - } - every_realm_county = { - limit = { - any_county_province = { - has_province_modifier = ep3_eparch_county_opinion_modifier - } - } - every_county_province = { - limit = { - has_province_modifier = ep3_eparch_county_opinion_modifier - } - remove_province_modifier = ep3_eparch_county_opinion_modifier - } - } - } - } - - # Next is the troop modifier - scope:liege ?= { - # We check and scope to all counties to make sure we remove any stray modifiers in case the capital is moved, etc. - if = { - limit = { - any_realm_county = { - any_county_province = { - has_province_modifier = ep3_eparch_troops_modifier - } - } - } - every_realm_county = { - limit = { - any_county_province = { - has_province_modifier = ep3_eparch_troops_modifier - } - } - every_county_province = { - limit = { - has_province_modifier = ep3_eparch_troops_modifier - } - remove_province_modifier = ep3_eparch_troops_modifier - } - } - } - } - - # Next is the county control modifier - scope:liege ?= { - # We check and scope to all counties to make sure we remove any stray modifiers in case the capital is moved, etc. - if = { - limit = { - any_realm_county = { - any_county_province = { - has_province_modifier = ep3_eparch_control_modifier - } - } - } - every_realm_county = { - limit = { - any_county_province = { - has_province_modifier = ep3_eparch_control_modifier - } - } - every_county_province = { - limit = { - has_province_modifier = ep3_eparch_control_modifier - } - remove_province_modifier = ep3_eparch_control_modifier - } - } - } - } - - # And finally, the development modifier - scope:liege ?= { - # We check and scope to all counties to make sure we remove any stray modifiers in case the capital is moved, etc. - if = { - limit = { - any_realm_county = { - any_county_province = { - has_province_modifier = ep3_eparch_development_modifier - } - } - } - every_realm_county = { - limit = { - any_county_province = { - has_province_modifier = ep3_eparch_development_modifier - } - } - every_county_province = { - limit = { - has_province_modifier = ep3_eparch_development_modifier - } - remove_province_modifier = ep3_eparch_development_modifier - } - } - } - } - } -} - -eparch_neglecting_duty_effect = { - custom_tooltip = { - text = eparch_neglecting_duty_warning_tt - - # We check if you have neglected duties in the past - if = { - limit = { - exists = var:eparch_neglecting_duty - } - # If you have, let's first increase the variable - change_variable = { name = eparch_neglecting_duty add = 5 } - - # Then check if the liege notices and decide to take action - random = { - chance = { - # Base value - Increases with each neglecting action - value = var:eparch_neglecting_duty - - # Add the difference in intrigue skill - add = { - value = liege.intrigue - subtract = intrigue - } - - # Add the difference in influence level - add = { - value = liege.influence_level - subtract = influence_level - multiply = 5 - } - - # Lower the chance if you belong to a powerful or dominant family - if = { - limit = { - house ?= { is_powerful_family = yes } - } - subtract = 10 - } - if = { - limit = { - house ?= { is_dominant_family = yes } - } - subtract = 20 - } - - min = 5 - max = 90 - } - - # The liege have noticed - We reduce the variable slightly as a result (but never below 0) - if = { - limit = { - exists = var:eparch_neglecting_duty - var:eparch_neglecting_duty >= 20 - } - change_variable = { name = eparch_neglecting_duty subtract = 20 } - } - else = { - set_variable = { name = eparch_neglecting_duty value = 0 } - } - - liege = { - trigger_event = { id = ep3_eparch_event.9000 days = { 10 90 } } - } - } - } - else = { # If you haven't, we'll set the variable and give you a free pass (you only get it for your very first time though) - set_variable = { name = eparch_neglecting_duty value = 0 } - } - } -} - -add_influence_attacker_victory_effect = { - scope:attacker = { - if = { - limit = { government_has_flag = government_has_influence } - change_influence = major_influence_gain - } - } -} - -add_influence_attacker_defeat_effect = { - scope:defender = { - if = { - limit = { government_has_flag = government_has_influence } - change_influence = medium_influence_gain - } - } -} - -admin_change_government_effect = { - # Make sure you only use this effect on characters you are sure should change government! Since we don't do any extended triggers here. - # For a consistent behaviour, this effect is based on "convert_whole_realm_to_feudalism_effect" - - # First, let's see if the character only has their noble family title - then we don't bother changing their government - # We only destroy the family title to make sure it doesn't linger - if = { - limit = { - is_landed = no - any_held_title = { - is_noble_family_title = yes - } - NOT = { - any_held_title = { - is_noble_family_title = no - } - } - } - every_held_title = { - limit = { - is_noble_family_title = yes - } - save_temporary_scope_as = family_title - prev = { destroy_title = scope:family_title } - } - } - - # If not, let's change the government type - # If liege has clan - Become clan! - else_if = { - limit = { - top_liege != this - OR = { - liege = { government_has_flag = government_is_clan } - AND = { - liege = { government_has_flag = government_is_tribal } - religion = religion:islam_religion - } - } - } - change_government = clan_government - } - # If liege has japanese feudal - Become japanese feudal! - else_if = { - limit = { - is_independent_ruler = no - OR = { - liege = { government_has_flag = government_is_japan_feudal } - AND = { - liege = { government_has_flag = government_is_japan_feudal } - NOT = { religion = religion:islam_religion } - } - } - } - change_government = japan_feudal_government - } - # If liege has feudal - Become feudal! - else_if = { - limit = { - top_liege != this - OR = { - liege = { government_has_flag = government_is_feudal } - AND = { - liege = { government_has_flag = government_is_tribal } - NOT = { religion = religion:islam_religion } - } - } - } - change_government = feudal_government - } - # If you're an independent Muslim ruler - Become clan! - else_if = { - limit = { - top_liege = this - faith = { religion_tag = islam_religion } - } - change_government = clan_government - } - # If you're an independent ruler with anything else - Become feudal! - else = { change_government = feudal_government } - - # Finally, let's double-check and see if there are any remaining family titles we should destroy - if = { - limit = { - any_held_title = { - is_noble_family_title = yes - } - } - every_held_title = { - limit = { - is_noble_family_title = yes - } - save_temporary_scope_as = family_title - prev = { destroy_title = scope:family_title } - } - } -} - -################################################## -# Dynasty Legacy: Bureaucracy -################################################## - -ep3_dynasty_legacy_add_legitimacy_effect = { - scope:activity = { - if = { - limit = { - scope:host = { - government_allows = administrative - OR = { - dynasty = { has_dynasty_perk = ep3_administrative_legacy_3 } - top_participant_group:dynastic_cycle ?= { - participant_group_type = conservative_movement - } - } - } - # Does the activity location have a domicile owned by a house member - # Does that domicile have the Reception Hall building - activity_location = { - any_province_domicile = { - owner = { house ?= scope:host.house } - OR = { - has_domicile_building_or_higher = reception_hall_01 - has_domicile_building_or_higher = east_asian_estate_reception_hall_01 - } - } - } - } - activity_location = { - random_province_domicile = { - limit = { - owner = { house ?= scope:host.house } - OR = { - has_domicile_building_or_higher = reception_hall_01 - has_domicile_building_or_higher = east_asian_estate_reception_hall_01 - } - } - owner = { save_scope_as = reception_hall_owner } - } - } - scope:host = { - house = { - if = { - limit = { - NOT = { - has_variable = ep3_legacy_legitimacy_counter - } - } - # Set the initial value - set_variable = { - name = ep3_legacy_legitimacy_counter - value = 10 - } - } - else = { - change_variable = { - name = ep3_legacy_legitimacy_counter - add = 10 - } - } - } - if = { - limit = { - primary_title.tier = tier_empire - } - send_interface_toast = { - type = event_toast_effect_good - title = ep3_dynasty_legacy_gain_legitimacy_effect_title - left_icon = scope:host - right_icon = scope:host.primary_title - add_legitimacy = 10 - } - } - else = { - house = { - every_house_member = { - limit = { is_ai = no } - send_interface_message = { - type = event_generic_good_text - title = ep3_dynasty_legacy_add_legitimacy_effect_title - desc = ep3_dynasty_legacy_add_legitimacy_effect_desc - left_icon = scope:host - right_icon = house - } - } - } - } - } - } - } -} - -################################################## -# Byzantium -################################################## - -remove_a_criminal_trait_in_faith_effect = { - $CHARACTER$ = { - if = { - limit = { - has_trait = adulterer - trait_is_criminal_in_faith_trigger = { TRAIT = adulterer FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } - } - remove_trait = adulterer - } - else_if = { - limit = { - has_trait = fornicator - trait_is_criminal_in_faith_trigger = { TRAIT = fornicator FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } - } - remove_trait = fornicator - } - else_if = { - limit = { - has_trait = sodomite - trait_is_criminal_in_faith_trigger = { TRAIT = sodomite FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } - } - remove_trait = sodomite - } - else_if = { - limit = { - has_trait = deviant - trait_is_criminal_in_faith_trigger = { TRAIT = deviant FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } - } - remove_trait = deviant - } - else_if = { - limit = { - has_trait = kinslayer_3 - trait_is_criminal_in_faith_trigger = { TRAIT = kinslayer_3 FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } - } - remove_trait = kinslayer_3 - } - else_if = { - limit = { - has_trait = kinslayer_2 - trait_is_criminal_in_faith_trigger = { TRAIT = kinslayer_2 FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } - } - remove_trait = kinslayer_2 - } - else_if = { - limit = { - has_trait = kinslayer_1 - trait_is_criminal_in_faith_trigger = { TRAIT = kinslayer_1 FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } - } - remove_trait = kinslayer_1 - } - else_if = { - limit = { - has_trait = witch - trait_is_criminal_in_faith_trigger = { TRAIT = witch FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } - } - remove_trait = witch - } - else_if = { - limit = { - has_trait = cannibal - trait_is_criminal_in_faith_trigger = { TRAIT = cannibal FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } - } - remove_trait = cannibal - } - else_if = { - limit = { - has_trait = incestuous - trait_is_criminal_in_faith_trigger = { TRAIT = incestuous FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } - } - remove_trait = incestuous - } - } -} - -################################################## -# Chariot Races -################################################## - -gather_charioteers_effect = { - scope:activity = { - random_list = { - 50 = { - set_variable = { - name = num_blues - value = 2 - } - } - 50 = { - set_variable = { - name = num_blues - value = 3 - } - } - } - random_list = { - 50 = { - set_variable = { - name = num_greens - value = 2 - } - } - 50 = { - set_variable = { - name = num_greens - value = 3 - } - } - } - random_list = { - 50 = { - set_variable = { - name = num_whites - value = 2 - } - } - 50 = { - set_variable = { - name = num_whites - value = 3 - } - } - } - random_list = { - 50 = { - set_variable = { - name = num_reds - value = 2 - } - } - 50 = { - set_variable = { - name = num_reds - value = 3 - } - } - } - - ordered_attending_character = { - order_by = chariot_ordering_value - max = 12 - check_range_bounds = no - save_temporary_scope_as = temp_character - if = { - limit = { - OR = { - has_court_position = charioteer_court_position - trigger_if = { - limit = { - available_charioteers_spots_trigger = { TEAM = green } - } - has_trait = charioteer_green - } - trigger_if = { - limit = { - available_charioteers_spots_trigger = { TEAM = blue } - } - has_trait = charioteer_blue - } - trigger_if = { - limit = { - available_charioteers_spots_trigger = { TEAM = red } - } - has_trait = charioteer_red - } - trigger_if = { - limit = { - available_charioteers_spots_trigger = { TEAM = white } - } - has_trait = charioteer_white - } - } - } - scope:activity = { - add_to_guest_subset = { - name = charioteers - target = scope:temp_character - } - } - } - } - - # Finalize the list of charioteers - chariot_racers_setup_effect = { TEAM = green } - chariot_racers_setup_effect = { TEAM = blue } - chariot_racers_setup_effect = { TEAM = red } - chariot_racers_setup_effect = { TEAM = white } - # And filter everyone remaining to spectators. - every_attending_character = { - limit = { - NOT = { - is_in_guest_subset = { name = charioteers } - } - } - save_scope_as = temp_character - scope:activity = { - add_to_guest_subset = { - name = spectators - target = scope:temp_character - } - } - } - } -} - -chariot_racers_setup_effect = { # If you need to create additional racers - while = { - count = 5 - limit = { - available_charioteers_spots_trigger = { TEAM = $TEAM$ } - } - create_character = { - template = charioteer_template - employer = scope:activity.activity_host - save_scope_as = temp_charioteer - } - scope:temp_charioteer = { - add_trait = charioteer_$TEAM$ - add_trait_xp = { - trait = charioteer_$TEAM$ - value = { 5 50 } - } - add_to_activity = scope:activity - } - scope:activity = { - add_to_guest_subset = { - name = charioteers - target = scope:temp_charioteer - } - } - } -} - -# Each character is assigned Odds to Win, Odds to Place, and Odds to Show -# Win: come in first place -# Place: come in first or second place -# Show: come in first, second, or third place -calculate_chariot_race_odds_effect = { - calculate_chariot_odds_to_win_effect = yes - calculate_chariot_odds_to_place_effect = yes - calculate_chariot_odds_to_show_effect = yes -} - -# Odds are represented in the format A:B, where A is the number of ways/opportunities a character has to succeed, and B represents how many ways/opportunities they have to fail -# These same calculations are done for the teams overall -# Individual odds are saved on the individual character -# Team odds are saved on the activity scope -calculate_chariot_odds_to_win_effect = { - scope:activity = { - ### INDIVIDUAL ODDS - # Set odds to win - set_variable = { - name = total_chance_win - value = 0 - } - # Set odds_win_a (number of ways to win) - every_guest_subset = { - name = charioteers - set_variable = { - name = odds_win_a - value = charioteer_chance_to_win - } - scope:activity = { - change_variable = { - name = total_chance_win - add = { - value = prev.charioteer_chance_to_win - min = 1 - } - } - } - } - # set odds_win_b (number of ways to lose) - every_guest_subset = { - name = charioteers - set_variable = { - name = odds_win_b - value = { - value = scope:activity.var:total_chance_win - subtract = var:odds_win_a - min = 1 - } - } - } - - # Calc percent chance to win - every_guest_subset = { - name = charioteers - set_variable = { - name = percent_chance_to_win - value = { - add = var:odds_win_a - divide = { - value = 0 - add = var:odds_win_a - add = var:odds_win_b - } - multiply = 100 - min = 1 - max = 99 - } - } - } - ########## - - ### TEAM ODDS - # For each of the 4 teams, we calculate their odds to win/place/show. These variables are saved on the activity - # BLUES - # Initialize variables - set_variable = { - name = blue_odds_win_a - value = 0 - } - set_variable = { - name = blue_odds_win_b - value = 0 - } - - # Account for each team member - every_guest_subset = { - name = charioteers - limit = { has_trait = charioteer_blue } - scope:activity = { - change_variable = { - name = blue_odds_win_a - add = { - value = prev.var:odds_win_a - min = 1 - } - } - } - } - # Set the B variable based on the total amount of chance - the opporutnity for success - change_variable = { - name = blue_odds_win_b - add = { - value = var:total_chance_win - subtract = var:blue_odds_win_a - min = 1 - } - } - # Calculate the percentage chance of success for readability - set_variable = { - name = blue_percent_chance_to_win - value = { - add = var:blue_odds_win_a - divide = { - value = 0 - add = var:blue_odds_win_a - add = var:blue_odds_win_b - } - multiply = 100 - min = 1 - max = 99 - } - } - - # GREENS - # Initialize variables - set_variable = { - name = green_odds_win_a - value = 0 - } - set_variable = { - name = green_odds_win_b - value = 0 - } - - # Account for each team member - every_guest_subset = { - name = charioteers - limit = { has_trait = charioteer_green } - scope:activity = { - change_variable = { - name = green_odds_win_a - add = { - value = prev.var:odds_win_a - min = 1 - } - } - } - } - # Set the B variable based on the total amount of chance - the opporutnity for success - change_variable = { - name = green_odds_win_b - add = { - value = var:total_chance_win - subtract = var:green_odds_win_a - min = 1 - } - } - # Calculate the percentage chance of success for readability - set_variable = { - name = green_percent_chance_to_win - value = { - add = var:green_odds_win_a - divide = { - value = 0 - add = var:green_odds_win_a - add = var:green_odds_win_b - } - multiply = 100 - min = 1 - max = 99 - } - } - - # WHITES - # Initialize variables - set_variable = { - name = white_odds_win_a - value = 0 - } - set_variable = { - name = white_odds_win_b - value = 0 - } - - # Account for each team member - every_guest_subset = { - name = charioteers - limit = { has_trait = charioteer_white } - scope:activity = { - change_variable = { - name = white_odds_win_a - add = { - value = prev.var:odds_win_a - min = 1 - } - } - } - } - # Set the B variable based on the total amount of chance - the opporutnity for success - change_variable = { - name = white_odds_win_b - add = { - value = var:total_chance_win - subtract = var:white_odds_win_a - min = 1 - } - } - # Calculate the percentage chance of success for readability - set_variable = { - name = white_percent_chance_to_win - value = { - add = var:white_odds_win_a - divide = { - value = 0 - add = var:white_odds_win_a - add = var:white_odds_win_b - } - multiply = 100 - min = 1 - max = 99 - } - } - - # REDS - # Initialize variables - set_variable = { - name = red_odds_win_a - value = 0 - } - set_variable = { - name = red_odds_win_b - value = 0 - } - - # Account for each team member - every_guest_subset = { - name = charioteers - limit = { has_trait = charioteer_red } - scope:activity = { - change_variable = { - name = red_odds_win_a - add = { - value = prev.var:odds_win_a - min = 1 - } - } - } - } - # Set the B variable based on the total amount of chance - the opporutnity for success - change_variable = { - name = red_odds_win_b - add = { - value = var:total_chance_win - subtract = var:red_odds_win_a - min = 1 - } - } - # Calculate the percentage chance of success for readability - set_variable = { - name = red_percent_chance_to_win - value = { - add = var:red_odds_win_a - divide = { - value = 0 - add = var:red_odds_win_a - add = var:red_odds_win_b - } - multiply = 100 - min = 1 - max = 99 - } - } - } -} - -calculate_chariot_odds_to_place_effect = { - scope:activity = { - ### INDIVIDUAL ODDS - # Set odds to place - set_variable = { - name = total_chance_place - value = 0 - } - every_guest_subset = { - name = charioteers - set_variable = { - name = odds_place_a - value = { - value = charioteer_chance_to_win - multiply = 2 - } - } - scope:activity = { - change_variable = { - name = total_chance_place - add = { - value = prev.charioteer_chance_to_win - min = 1 - } - } - } - } - every_guest_subset = { - name = charioteers - set_variable = { - name = odds_place_b - value = { - value = scope:activity.var:total_chance_place - subtract = var:odds_place_a - min = 1 - } - } - } - - # Calc percent chance to win - every_guest_subset = { - name = charioteers - set_variable = { - name = percent_chance_to_place - value = { - add = var:odds_place_a - divide = { - value = 0 - add = var:odds_place_a - add = var:odds_place_b - } - multiply = 100 - min = 1 - max = 99 - } - } - } - ########## - - ### TEAM ODDS - # For each of the 4 teams, we calculate their odds to win/place/show. These variables are saved on the activity - # Initialize variables - set_variable = { - name = blue_odds_place_a - value = 0 - } - set_variable = { - name = blue_odds_place_b - value = 0 - } - - # Account for each team member - every_guest_subset = { - name = charioteers - limit = { has_trait = charioteer_blue } - scope:activity = { - change_variable = { - name = blue_odds_place_a - add = { - value = prev.var:odds_place_a - min = 1 - } - } - } - } - # Set the B variable based on the total amount of chance - the opporutnity for success - change_variable = { - name = blue_odds_place_b - add = { - value = var:total_chance_place - subtract = var:blue_odds_place_a - min = 1 - } - } - # Calculate the percentage chance of success for readability - set_variable = { - name = blue_percent_chance_to_place - value = { - add = var:blue_odds_place_a - divide = { - value = 0 - add = var:blue_odds_place_a - add = var:blue_odds_place_b - } - multiply = 100 - min = 1 - max = 99 - } - } - - # GREENS - # Initialize variables - set_variable = { - name = green_odds_place_a - value = 0 - } - set_variable = { - name = green_odds_place_b - value = 0 - } - - # Account for each team member - every_guest_subset = { - name = charioteers - limit = { has_trait = charioteer_green } - scope:activity = { - change_variable = { - name = green_odds_place_a - add = { - value = prev.var:odds_place_a - min = 1 - } - } - } - } - # Set the B variable based on the total amount of chance - the opporutnity for success - change_variable = { - name = green_odds_place_b - add = { - value = var:total_chance_place - subtract = var:green_odds_place_a - min = 1 - } - } - # Calculate the percentage chance of success for readability - set_variable = { - name = green_percent_chance_to_place - value = { - add = var:green_odds_place_a - divide = { - value = 0 - add = var:green_odds_place_a - add = var:green_odds_place_b - } - multiply = 100 - min = 1 - max = 99 - } - } - - # WHITES - # Initialize variables - set_variable = { - name = white_odds_place_a - value = 0 - } - set_variable = { - name = white_odds_place_b - value = 0 - } - - # Account for each team member - every_guest_subset = { - name = charioteers - limit = { has_trait = charioteer_white } - scope:activity = { - change_variable = { - name = white_odds_place_a - add = { - value = prev.var:odds_place_a - min = 1 - } - } - } - } - # Set the B variable based on the total amount of chance - the opporutnity for success - change_variable = { - name = white_odds_place_b - add = { - value = var:total_chance_place - subtract = var:white_odds_place_a - min = 1 - } - } - # Calculate the percentage chance of success for readability - set_variable = { - name = white_percent_chance_to_place - value = { - add = var:white_odds_place_a - divide = { - value = 0 - add = var:white_odds_place_a - add = var:white_odds_place_b - } - multiply = 100 - min = 1 - max = 99 - } - } - - - # REDS - # Initialize variables - set_variable = { - name = red_odds_place_a - value = 0 - } - set_variable = { - name = red_odds_place_b - value = 0 - } - - # Account for each team member - every_guest_subset = { - name = charioteers - limit = { has_trait = charioteer_red } - scope:activity = { - change_variable = { - name = red_odds_place_a - add = { - value = prev.var:odds_place_a - min = 1 - } - } - } - } - # Set the B variable based on the total amount of chance - the opporutnity for success - change_variable = { - name = red_odds_place_b - add = { - value = var:total_chance_place - subtract = var:red_odds_place_a - min = 1 - } - } - # Calculate the percentage chance of success for readability - set_variable = { - name = red_percent_chance_to_place - value = { - add = var:red_odds_place_a - divide = { - value = 0 - add = var:red_odds_place_a - add = var:red_odds_place_b - } - multiply = 100 - min = 1 - max = 99 - } - } - } -} - -calculate_chariot_odds_to_show_effect = { - scope:activity = { - ### INDIVIDUAL ODDS - # Set odds to show - set_variable = { - name = total_chance_show - value = 0 - } - every_guest_subset = { - name = charioteers - set_variable = { - name = odds_show_a - value = { - value = charioteer_chance_to_win - multiply = 3 - min = 1 - } - } - scope:activity = { - change_variable = { - name = total_chance_show - add = { - value = prev.charioteer_chance_to_win - min = 1 - } - } - } - } - every_guest_subset = { - name = charioteers - set_variable = { - name = odds_show_b - value = { - value = scope:activity.var:total_chance_show - subtract = var:odds_show_a - min = 1 - } - } - } - - # Calc percent chance to show - every_guest_subset = { - name = charioteers - set_variable = { - name = percent_chance_to_show - value = { - add = var:odds_show_a - divide = { - value = var:odds_show_a - add = scope:activity.var:total_chance_show - } - multiply = 100 - min = 1 - max = 99 - } - } - } - ########## - - ### TEAM ODDS - # For each of the 4 teams, we calculate their odds to win/place/show. These variables are saved on the activity - # BLUES - # Initialize variables - set_variable = { - name = blue_odds_show_a - value = 0 - } - set_variable = { - name = blue_odds_show_b - value = 0 - } - - # Account for each team member - every_guest_subset = { - name = charioteers - limit = { has_trait = charioteer_blue } - scope:activity = { - change_variable = { - name = blue_odds_show_a - add = { - value = prev.var:odds_show_a - min = 1 - } - } - } - } - # Set the B variable based on the total amount of chance - the opporutnity for success - change_variable = { - name = blue_odds_show_b - add = { - value = var:total_chance_show - subtract = var:blue_odds_show_a - min = 1 - } - } - # Calculate the percentage chance of success for readability - set_variable = { - name = blue_percent_chance_to_show - value = { - add = var:blue_odds_show_a - divide = { - value = 0 - add = var:blue_odds_show_a - add = var:blue_odds_show_b - } - multiply = 100 - min = 1 - max = 99 - } - } - - # GREENS - # Initialize variables - set_variable = { - name = green_odds_show_a - value = 0 - } - set_variable = { - name = green_odds_show_b - value = 0 - } - - # Account for each team member - every_guest_subset = { - name = charioteers - limit = { has_trait = charioteer_green } - scope:activity = { - change_variable = { - name = green_odds_show_a - add = { - value = prev.var:odds_show_a - min = 1 - } - } - } - } - # Set the B variable based on the total amount of chance - the opporutnity for success - change_variable = { - name = green_odds_show_b - add = { - value = var:total_chance_show - subtract = var:green_odds_show_a - min = 1 - } - } - # Calculate the percentage chance of success for readability - set_variable = { - name = green_percent_chance_to_show - value = { - add = var:green_odds_show_a - divide = { - value = 0 - add = var:green_odds_show_a - add = var:green_odds_show_b - } - multiply = 100 - min = 1 - max = 99 - } - } - - # WHITES - # Initialize variables - set_variable = { - name = white_odds_show_a - value = 0 - } - set_variable = { - name = white_odds_show_b - value = 0 - } - - # Account for each team member - every_guest_subset = { - name = charioteers - limit = { has_trait = charioteer_white } - scope:activity = { - change_variable = { - name = white_odds_show_a - add = { - value = prev.var:odds_show_a - min = 1 - } - } - } - } - # Set the B variable based on the total amount of chance - the opporutnity for success - change_variable = { - name = white_odds_show_b - add = { - value = var:total_chance_show - subtract = var:white_odds_show_a - min = 1 - } - } - # Calculate the percentage chance of success for readability - set_variable = { - name = white_percent_chance_to_show - value = { - add = var:white_odds_show_a - divide = { - value = 0 - add = var:white_odds_show_a - add = var:white_odds_show_b - } - multiply = 100 - min = 1 - max = 99 - } - } - - # REDS - # Initialize variables - set_variable = { - name = red_odds_show_a - value = 0 - } - set_variable = { - name = red_odds_show_b - value = 0 - } - - # Account for each team member - every_guest_subset = { - name = charioteers - limit = { has_trait = charioteer_red } - scope:activity = { - change_variable = { - name = red_odds_show_a - add = { - value = prev.var:odds_show_a - min = 1 - } - } - } - } - # Set the B variable based on the total amount of chance - the opporutnity for success - change_variable = { - name = red_odds_show_b - add = { - value = var:total_chance_show - subtract = var:red_odds_show_a - min = 1 - } - } - # Calculate the percentage chance of success for readability - set_variable = { - name = red_percent_chance_to_show - value = { - add = var:red_odds_show_a - divide = { - value = 0 - add = var:red_odds_show_a - add = var:red_odds_show_b - } - multiply = 100 - min = 1 - max = 99 - } - } - } -} - -calculate_chariot_payout_effect = { - scope:activity = { - every_guest_subset = { - name = charioteers - set_variable = { - name = win_payout - value = { - add = var:odds_win_b - subtract = { - value = var:odds_win_b - multiply = 0.3 - } - save_temporary_value_as = temp_val - subtract = { - value = scope:temp_val - multiply = bookkeeper_small_commission_value - round = yes - } - divide = var:odds_win_a - add = 1 - min = 1.1 - } - } - set_variable = { - name = place_payout - value = { - add = var:odds_place_b - subtract = { - value = var:odds_place_b - multiply = 0.3 - } - save_temporary_value_as = temp_val - subtract = { - value = scope:temp_val - multiply = bookkeeper_medium_commission_value - round = yes - } - divide = var:odds_place_a - add = 1 - min = 1.1 - } - } - set_variable = { - name = show_payout - value = { - add = var:odds_show_b - subtract = { - value = var:odds_show_b - multiply = 0.3 - } - save_temporary_value_as = temp_val - subtract = { - value = scope:temp_val - multiply = bookkeeper_large_commission_value - round = yes - } - divide = var:odds_show_a - add = 1 - min = 1.1 - } - } - } - set_variable = { - name = blue_win_payout - value = { - add = var:blue_odds_win_b - subtract = { - value = var:blue_odds_win_b - multiply = bookkeeper_small_commission_value - round = yes - } - divide = var:blue_odds_win_a - add = 1 - min = 1.1 - } - } - set_variable = { - name = blue_place_payout - value = { - add = var:blue_odds_place_b - subtract = { - value = var:blue_odds_place_b - multiply = bookkeeper_medium_commission_value - round = yes - } - divide = var:blue_odds_place_a - add = 1 - min = 1.1 - } - } - set_variable = { - name = blue_show_payout - value = { - add = var:blue_odds_show_b - subtract = { - value = var:blue_odds_show_b - multiply = bookkeeper_large_commission_value - round = yes - } - divide = var:blue_odds_show_a - add = 1 - min = 1.1 - } - } - - set_variable = { - name = green_win_payout - value = { - add = var:green_odds_win_b - subtract = { - value = var:green_odds_win_b - multiply = bookkeeper_small_commission_value - round = yes - } - divide = var:green_odds_win_a - add = 1 - min = 1.1 - } - } - set_variable = { - name = green_place_payout - value = { - add = var:green_odds_place_b - subtract = { - value = var:green_odds_place_b - multiply = bookkeeper_medium_commission_value - round = yes - } - divide = var:green_odds_place_a - add = 1 - min = 1.1 - } - } - set_variable = { - name = green_show_payout - value = { - add = var:green_odds_show_b - subtract = { - value = var:green_odds_show_b - multiply = bookkeeper_large_commission_value - round = yes - } - divide = var:green_odds_show_a - add = 1 - min = 1.1 - } - } - - set_variable = { - name = white_win_payout - value = { - add = var:white_odds_win_b - subtract = { - value = var:white_odds_win_b - multiply = bookkeeper_small_commission_value - round = yes - } - divide = var:white_odds_win_a - add = 1 - min = 1.1 - } - } - set_variable = { - name = white_place_payout - value = { - add = var:white_odds_place_b - subtract = { - value = var:white_odds_place_b - multiply = bookkeeper_medium_commission_value - round = yes - } - divide = var:white_odds_place_a - add = 1 - min = 1.1 - } - } - set_variable = { - name = white_show_payout - value = { - add = var:white_odds_show_b - subtract = { - value = var:white_odds_show_b - multiply = bookkeeper_large_commission_value - round = yes - } - divide = var:white_odds_show_a - add = 1 - min = 1.1 - } - } - - set_variable = { - name = red_win_payout - value = { - add = var:red_odds_win_b - subtract = { - value = var:red_odds_win_b - multiply = bookkeeper_small_commission_value - round = yes - } - divide = var:red_odds_win_a - add = 1 - min = 1.1 - } - } - set_variable = { - name = red_place_payout - value = { - add = var:red_odds_place_b - subtract = { - value = var:red_odds_place_b - multiply = bookkeeper_medium_commission_value - round = yes - } - divide = var:red_odds_place_a - add = 1 - min = 1.1 - } - } - set_variable = { - name = red_show_payout - value = { - add = var:red_odds_show_b - subtract = { - value = var:red_odds_show_b - multiply = bookkeeper_large_commission_value - round = yes - } - divide = var:red_odds_show_a - add = 1 - min = 1.1 - } - } - - } -} - -set_or_increment_lucky_better_variable = { - if = { - limit = { - NOT = { has_variable = lucky_bet_counter } - } - set_variable = { - name = lucky_bet_counter - value = 1 - } - } - else = { - change_variable = { - name = lucky_bet_counter - add = 1 - } - if = { - limit = { - var:lucky_bet_counter >= 5 - has_any_nickname = no - } - send_interface_toast = { - # works for our purposes "New Nickname" - title = sell_titles_nickname_gained - left_icon = this - give_nickname = nick_the_lucky - } - } - } -} - -disburse_chariot_race_activity_host_rewards = { - scope:activity = { - add_activity_log_entry = { - key = chariot_race_host_rewards - score = 100 - show_in_conclusion = yes - character = root - location = root.location - - root = { - # Some base influence - change_influence = medium_influence_gain - # Extra influence rewards for having a successful wager - if = { - limit = { - has_character_flag = successful_bet - has_variable = wager_type - } - switch = { - trigger = var:wager_type - flag:win = { - change_influence = medium_influence_gain - } - flag:place = { - change_influence = minor_influence_gain - } - flag:show = { - change_influence = miniscule_influence_gain - } - } - } - - # Rewards for employing a charioteer who wins/places/shows - if = { - limit = { employs_court_position = charioteer_court_position } - if = { - limit = { - any_court_position_holder = { - type = charioteer_court_position - scope:activity.var:first_place ?= this - } - } - change_influence = monumental_influence_gain - } - else_if = { - limit = { - any_court_position_holder = { - type = charioteer_court_position - scope:activity.var:second_place ?= this - } - } - change_influence = massive_influence_gain - } - else_if = { - limit = { - any_court_position_holder = { - type = charioteer_court_position - scope:activity.var:third_place ?= this - } - } - change_influence = major_influence_gain - } - } - - #Legitimacy and popular opinion for how fancy your chariot races were - if = { - limit = { - scope:activity = { - has_activity_option = { - category = chariot_option_entertainment - option = chariot_entertainment_bad - } - } - } - if = { - limit = { - scope:host.capital_county = { - county_opinion > 0 - } - } - add_legitimacy = miniscule_legitimacy_gain - if = { - limit = { has_activity_intent = reduce_stress_intent } - stress_impact = { - base = major_stress_loss - athletic = miniscule_stress_loss - gregarious = miniscule_stress_loss - } - } - custom_tooltip = chariot_race_reward_high_county_opinion_tt - } - else_if = { - limit = { - scope:host.capital_county = { - county_opinion <= -50 - } - } - add_legitimacy = 5 - if = { - limit = { has_activity_intent = reduce_stress_intent } - stress_impact = { - base = medium_stress_loss - athletic = miniscule_stress_loss - gregarious = miniscule_stress_loss - } - } - custom_tooltip = chariot_race_reward_low_county_opinion_tt - } - else = { - add_legitimacy = 10 - } - } - else_if = { - limit = { - scope:activity = { - has_activity_option = { - category = chariot_option_entertainment - option = chariot_entertainment_normal - } - } - } - if = { - limit = { - scope:host.capital_county = { - county_opinion > 0 - } - } - add_legitimacy = minor_legitimacy_gain - if = { - limit = { has_activity_intent = reduce_stress_intent } - stress_impact = { - base = massive_stress_loss - athletic = miniscule_stress_loss - gregarious = miniscule_stress_loss - } - } - capital_county = { - change_county_control = miniscule_county_control_gain - } - - custom_tooltip = chariot_race_reward_high_county_opinion_tt - } - else_if = { - limit = { - scope:host.capital_county = { - county_opinion <= -50 - } - } - add_legitimacy = 10 - if = { - limit = { has_activity_intent = reduce_stress_intent } - stress_impact = { - base = major_stress_loss - athletic = miniscule_stress_loss - gregarious = miniscule_stress_loss - } - } - custom_tooltip = chariot_race_reward_low_county_opinion_tt - } - else = { - add_legitimacy = miniscule_legitimacy_gain - } - scope:host.capital_county = { - add_county_modifier = { - modifier = ep3_chariot_race_weak_appeasement_modifier - years = 10 - } - } - } - else_if = { - limit = { - scope:activity = { - has_activity_option = { - category = chariot_option_entertainment - option = chariot_entertainment_good - } - } - } - if = { - limit = { - scope:host.capital_county = { - county_opinion > 0 - } - } - add_legitimacy = medium_legitimacy_gain - if = { - limit = { has_activity_intent = reduce_stress_intent } - stress_impact = { - base = monumental_stress_loss - athletic = miniscule_stress_loss - gregarious = miniscule_stress_loss - } - } - capital_county = { - change_county_control = minor_county_control_gain - } - custom_tooltip = chariot_race_reward_high_county_opinion_tt - } - else_if = { - limit = { - scope:host.capital_county = { - county_opinion <= -50 - } - } - add_legitimacy = miniscule_legitimacy_gain - if = { - limit = { has_activity_intent = reduce_stress_intent } - stress_impact = { - base = miniscule_stress_loss - athletic = massive_stress_loss - gregarious = miniscule_stress_loss - } - } - custom_tooltip = chariot_race_reward_low_county_opinion_tt - } - else = { - add_legitimacy = minor_legitimacy_gain - } - scope:host.capital_county = { - add_county_modifier = { - modifier = ep3_chariot_race_strong_appeasement_modifier - years = 10 - } - } - } - } - } - } -} - -disburse_chariot_race_activity_spectator_rewards = { - # Some smaller amounts of Influence rewards for having a successful wager - if = { - limit = { - has_character_flag = successful_bet - has_variable = wager_type - } - switch = { - trigger = var:wager_type - flag:win = { - change_influence = medium_influence_gain - } - flag:place = { - change_influence = minor_influence_gain - } - flag:show = { - change_influence = miniscule_influence_gain - } - } - } - - # Rewards for employing a charioteer who wins/places/shows - # You get more influence if your charioteer is successful - if = { - limit = { - any_court_position_holder = { - type = charioteer_court_position - scope:activity.var:first_place ?= this - } - } - change_influence = monumental_influence_gain - if = { - limit = { has_activity_intent = reduce_stress_intent } - stress_impact = { - base = monumental_stress_loss - athletic = miniscule_stress_loss - gregarious = miniscule_stress_loss - } - } - } - else_if = { - limit = { - any_court_position_holder = { - type = charioteer_court_position - scope:activity.var:second_place ?= this - } - } - change_influence = massive_influence_gain - if = { - limit = { has_activity_intent = reduce_stress_intent } - stress_impact = { - base = massive_stress_loss - athletic = miniscule_stress_loss - gregarious = miniscule_stress_loss - } - } - } - else_if = { - limit = { - any_court_position_holder = { - type = charioteer_court_position - scope:activity.var:third_place ?= this - } - } - change_influence = major_influence_gain - if = { - limit = { has_activity_intent = reduce_stress_intent } - stress_impact = { - base = massive_stress_loss - athletic = miniscule_stress_loss - gregarious = miniscule_stress_loss - } - } - } - else_if = { - limit = { has_activity_intent = reduce_stress_intent } - stress_impact = { - base = miniscule_stress_loss - athletic = major_stress_loss - gregarious = miniscule_stress_loss - } - } -} - -disburse_chariot_race_activity_charioteer_rewards = { - # Give them some xp based on place finished - if = { - limit = { this = scope:activity.var:first_place } - scope:activity = { - add_activity_log_entry = { - key = charioteer_gained_trait_xp_key - score = 110 - character = scope:activity.var:first_place - scope:activity.var:first_place = { - distribute_charioteer_trait_xp_effect = { VALUE = 15 } } - } - } - } - else_if = { - limit = { this = scope:activity.var:second_place } - scope:activity = { - add_activity_log_entry = { - key = charioteer_gained_trait_xp_key - score = 110 - character = scope:activity.var:second_place - scope:activity.var:second_place = { distribute_charioteer_trait_xp_effect = { VALUE = 12 } } - } - } - } - else_if = { - limit = { this = scope:activity.var:third_place } - scope:activity = { - add_activity_log_entry = { - key = charioteer_gained_trait_xp_key - score = 110 - character = scope:activity.var:third_place - scope:activity.var:third_place = { distribute_charioteer_trait_xp_effect = { VALUE = 8 } } - } - } - } - else = { - scope:activity = { - add_activity_log_entry = { - key = charioteer_gained_trait_xp_key - score = 110 - character = prev - prev = { distribute_charioteer_trait_xp_effect = { VALUE = 3 } } - } - } - } -} - -# Used to show how much a character gets from a successful wager in end of the race event chariot_race.0600 -individual_chariot_race_payout_effect = { - save_scope_as = current_gambler - if = { - limit = { - var:wager_type ?= flag:win - var:wager_target ?= scope:activity.var:first_place - } - add_gold = { - value = scope:current_gambler.var:wager_value - multiply = scope:activity.var:first_place.var:win_payout - max = scope:current_gambler.monumental_gold_value - } - } - else_if = { - limit = { - var:wager_type ?= flag:place - OR = { - var:wager_target ?= scope:activity.var:first_place - var:wager_target ?= scope:activity.var:second_place - } - } - add_gold = { - value = scope:current_gambler.var:wager_value - multiply = scope:activity.var:second_place.var:place_payout - max = scope:current_gambler.monumental_gold_value - } - } - else_if = { - limit = { - var:wager_type ?= flag:show - OR = { - var:wager_target ?= scope:activity.var:first_place - var:wager_target ?= scope:activity.var:second_place - var:wager_target ?= scope:activity.var:third_place - } - } - add_gold = { - value = scope:current_gambler.var:wager_value - multiply = scope:activity.var:third_place.var:show_payout - max = scope:current_gambler.monumental_gold_value - } - } - # Handle team based bets - else_if = { - limit = { - var:wager_type ?= flag:win - var:wager_target ?= scope:current_gambler - } - switch = { - trigger = var:wager_team - flag:blues = { - if = { - limit = { scope:activity.var:first_place = { has_trait = charioteer_blue } } - add_gold = { - value = scope:current_gambler.var:wager_value - multiply = scope:activity.var:blue_win_payout - max = scope:current_gambler.monumental_gold_value - } - } - } - flag:greens = { - if = { - limit = { scope:activity.var:first_place = { has_trait = charioteer_green } } - add_gold = { - value = scope:current_gambler.var:wager_value - multiply = scope:activity.var:green_win_payout - max = scope:current_gambler.monumental_gold_value - } - } - } - flag:whites = { - if = { - limit = { scope:activity.var:first_place = { has_trait = charioteer_white } } - add_gold = { - value = scope:current_gambler.var:wager_value - multiply = scope:activity.var:white_win_payout - max = scope:current_gambler.monumental_gold_value - } - } - } - flag:reds = { - if = { - limit = { scope:activity.var:first_place = { has_trait = charioteer_red } } - add_gold = { - value = scope:current_gambler.var:wager_value - multiply = scope:activity.var:red_win_payout - max = scope:current_gambler.monumental_gold_value - } - } - } - } - } - else_if = { - limit = { - var:wager_type ?= flag:place - var:wager_target ?= scope:current_gambler - } - switch = { - trigger = var:wager_team - flag:blues = { - if = { - limit = { - OR = { - scope:activity.var:first_place = { has_trait = charioteer_blue } - scope:activity.var:second_place = { has_trait = charioteer_blue } - } - } - add_gold = { - value = scope:current_gambler.var:wager_value - multiply = scope:activity.var:blue_place_payout - max = scope:current_gambler.monumental_gold_value - } - } - } - flag:greens = { - if = { - limit = { - OR = { - scope:activity.var:first_place = { has_trait = charioteer_green } - scope:activity.var:second_place = { has_trait = charioteer_green } - } - } - add_gold = { - value = scope:current_gambler.var:wager_value - multiply = scope:activity.var:green_place_payout - max = scope:current_gambler.monumental_gold_value - } - } - } - flag:whites = { - if = { - limit = { - OR = { - scope:activity.var:first_place = { has_trait = charioteer_white } - scope:activity.var:second_place = { has_trait = charioteer_white } - } - } - add_gold = { - value = scope:current_gambler.var:wager_value - multiply = scope:activity.var:white_place_payout - max = scope:current_gambler.monumental_gold_value - } - } - } - flag:reds = { - if = { - limit = { - OR = { - scope:activity.var:first_place = { has_trait = charioteer_red } - scope:activity.var:second_place = { has_trait = charioteer_red } - } - } - add_gold = { - value = scope:current_gambler.var:wager_value - multiply = scope:activity.var:red_place_payout - max = scope:current_gambler.monumental_gold_value - } - } - } - } - } - else_if = { - limit = { - var:wager_type ?= flag:show - var:wager_target ?= scope:current_gambler - } - switch = { - trigger = var:wager_team - flag:blues = { - if = { - limit = { - OR = { - scope:activity.var:first_place = { has_trait = charioteer_blue } - scope:activity.var:second_place = { has_trait = charioteer_blue } - scope:activity.var:third_place = { has_trait = charioteer_blue } - } - } - add_gold = { - value = scope:current_gambler.var:wager_value - multiply = scope:activity.var:blue_show_payout - max = scope:current_gambler.monumental_gold_value - } - } - } - flag:greens = { - if = { - limit = { - OR = { - scope:activity.var:first_place = { has_trait = charioteer_green } - scope:activity.var:second_place = { has_trait = charioteer_green } - scope:activity.var:third_place = { has_trait = charioteer_green } - } - } - add_gold = { - value = scope:current_gambler.var:wager_value - multiply = scope:activity.var:green_show_payout - max = scope:current_gambler.monumental_gold_value - } - } - } - flag:whites = { - if = { - limit = { - OR = { - scope:activity.var:first_place = { has_trait = charioteer_white } - scope:activity.var:second_place = { has_trait = charioteer_white } - scope:activity.var:third_place = { has_trait = charioteer_white } - } - } - add_gold = { - value = scope:current_gambler.var:wager_value - multiply = scope:activity.var:white_show_payout - max = scope:current_gambler.monumental_gold_value - } - } - } - flag:reds = { - if = { - limit = { - OR = { - scope:activity.var:first_place = { has_trait = charioteer_red } - scope:activity.var:second_place = { has_trait = charioteer_red } - scope:activity.var:third_place = { has_trait = charioteer_red } - } - } - add_gold = { - value = scope:current_gambler.var:wager_value - multiply = scope:activity.var:red_show_payout - max = scope:current_gambler.monumental_gold_value - } - } - } - } - } - else_if = { - limit = { has_variable = wager_value } - custom_tooltip = chariot_race_lost_bet_tt - } -} - -chariot_race_payout_effect = { - scope:activity = { - every_guest_subset = { - name = spectators - save_scope_as = current_gambler - if = { - limit = { - var:wager_type ?= flag:win - var:wager_target ?= scope:activity.var:first_place - } - set_or_increment_lucky_better_variable = yes - add_character_flag = successful_bet - scope:activity = { - add_activity_log_entry = { - key = chariot_race_betting_char_outcome_key - score = 100 - show_in_conclusion = yes - character = scope:current_gambler - scope:current_gambler = { - add_gold = { - value = scope:current_gambler.var:wager_value - multiply = scope:activity.var:first_place.var:win_payout - max = scope:current_gambler.monumental_gold_value - } - } - change_variable = { - name = chariot_race_pot - subtract = { - value = scope:current_gambler.var:wager_value - multiply = scope:activity.var:first_place.var:win_payout - } - } - } - } - } - else_if = { - limit = { - var:wager_type ?= flag:place - OR = { - var:wager_target ?= scope:activity.var:first_place - var:wager_target ?= scope:activity.var:second_place - } - } - set_or_increment_lucky_better_variable = yes - add_character_flag = successful_bet - scope:activity = { - add_activity_log_entry = { - key = chariot_race_betting_char_outcome_key - score = 100 - show_in_conclusion = yes - character = scope:current_gambler - scope:current_gambler = { - add_gold = { - value = scope:current_gambler.var:wager_value - multiply = scope:activity.var:second_place.var:place_payout - max = scope:current_gambler.monumental_gold_value - } - } - change_variable = { - name = chariot_race_pot - subtract = { - value = scope:current_gambler.var:wager_value - multiply = scope:activity.var:second_place.var:place_payout - } - } - } - } - } - else_if = { - limit = { - var:wager_type ?= flag:show - OR = { - var:wager_target ?= scope:activity.var:first_place - var:wager_target ?= scope:activity.var:second_place - var:wager_target ?= scope:activity.var:third_place - } - } - set_or_increment_lucky_better_variable = yes - add_character_flag = successful_bet - scope:activity = { - add_activity_log_entry = { - key = chariot_race_betting_char_outcome_key - score = 100 - show_in_conclusion = yes - character = scope:current_gambler - scope:current_gambler = { - add_gold = { - value = scope:current_gambler.var:wager_value - multiply = scope:activity.var:third_place.var:show_payout - max = scope:current_gambler.monumental_gold_value - } - } - change_variable = { - name = chariot_race_pot - subtract = { - value = scope:current_gambler.var:wager_value - multiply = scope:activity.var:third_place.var:show_payout - } - } - } - } - } - # Handle team based bets - else_if = { - limit = { - var:wager_type ?= flag:win - var:wager_target ?= this - } - switch = { - trigger = var:wager_team - flag:blues = { - if = { - limit = { scope:activity.var:first_place = { has_trait = charioteer_blue } } - set_or_increment_lucky_better_variable = yes - add_character_flag = successful_bet - scope:activity = { - add_activity_log_entry = { - key = chariot_race_betting_team_outcome_key - score = 100 - show_in_conclusion = yes - character = scope:current_gambler - scope:current_gambler = { - add_gold = { - value = scope:current_gambler.var:wager_value - multiply = scope:activity.var:blue_win_payout - max = scope:current_gambler.monumental_gold_value - } - } - change_variable = { - name = chariot_race_pot - subtract = { - value = scope:current_gambler.var:wager_value - multiply = scope:activity.var:blue_win_payout - } - } - } - } - } - } - flag:greens = { - if = { - limit = { scope:activity.var:first_place = { has_trait = charioteer_green } } - set_or_increment_lucky_better_variable = yes - add_character_flag = successful_bet - scope:activity = { - add_activity_log_entry = { - key = chariot_race_betting_team_outcome_key - score = 100 - show_in_conclusion = yes - character = scope:current_gambler - scope:current_gambler = { - add_gold = { - value = scope:current_gambler.var:wager_value - multiply = scope:activity.var:green_win_payout - max = scope:current_gambler.monumental_gold_value - } - } - change_variable = { - name = chariot_race_pot - subtract = { - value = scope:current_gambler.var:wager_value - multiply = scope:activity.var:green_win_payout - } - } - } - } - } - } - flag:whites = { - if = { - limit = { scope:activity.var:first_place = { has_trait = charioteer_white } } - set_or_increment_lucky_better_variable = yes - add_character_flag = successful_bet - scope:activity = { - add_activity_log_entry = { - key = chariot_race_betting_team_outcome_key - score = 100 - show_in_conclusion = yes - character = scope:current_gambler - scope:current_gambler = { - add_gold = { - value = scope:current_gambler.var:wager_value - multiply = scope:activity.var:white_win_payout - max = scope:current_gambler.monumental_gold_value - } - } - change_variable = { - name = chariot_race_pot - subtract = { - value = scope:current_gambler.var:wager_value - multiply = scope:activity.var:white_win_payout - } - } - } - } - } - } - flag:reds = { - if = { - limit = { scope:activity.var:first_place = { has_trait = charioteer_red } } - set_or_increment_lucky_better_variable = yes - add_character_flag = successful_bet - scope:activity = { - add_activity_log_entry = { - key = chariot_race_betting_team_outcome_key - score = 100 - show_in_conclusion = yes - character = scope:current_gambler - scope:current_gambler = { - add_gold = { - value = scope:current_gambler.var:wager_value - multiply = scope:activity.var:red_win_payout - max = scope:current_gambler.monumental_gold_value - } - } - change_variable = { - name = chariot_race_pot - subtract = { - value = scope:current_gambler.var:wager_value - multiply = scope:activity.var:red_win_payout - } - } - } - } - } - } - } - } - else_if = { - limit = { - var:wager_type ?= flag:place - var:wager_target ?= this - } - switch = { - trigger = var:wager_team - flag:blues = { - if = { - limit = { - OR = { - scope:activity.var:first_place = { has_trait = charioteer_blue } - scope:activity.var:second_place = { has_trait = charioteer_blue } - } - } - set_or_increment_lucky_better_variable = yes - add_character_flag = successful_bet - scope:activity = { - add_activity_log_entry = { - key = chariot_race_betting_team_outcome_key - score = 100 - show_in_conclusion = yes - character = scope:current_gambler - scope:current_gambler = { - add_gold = { - value = scope:current_gambler.var:wager_value - multiply = scope:activity.var:blue_place_payout - max = scope:current_gambler.monumental_gold_value - } - } - change_variable = { - name = chariot_race_pot - subtract = { - value = scope:current_gambler.var:wager_value - multiply = scope:activity.var:blue_place_payout - } - } - } - } - } - } - flag:greens = { - if = { - limit = { - OR = { - scope:activity.var:first_place = { has_trait = charioteer_green } - scope:activity.var:second_place = { has_trait = charioteer_green } - } - } - set_or_increment_lucky_better_variable = yes - add_character_flag = successful_bet - scope:activity = { - add_activity_log_entry = { - key = chariot_race_betting_team_outcome_key - score = 100 - show_in_conclusion = yes - character = scope:current_gambler - scope:current_gambler = { - add_gold = { - value = scope:current_gambler.var:wager_value - multiply = scope:activity.var:green_place_payout - max = scope:current_gambler.monumental_gold_value - } - } - change_variable = { - name = chariot_race_pot - subtract = { - value = scope:current_gambler.var:wager_value - multiply = scope:activity.var:green_place_payout - } - } - } - } - } - } - flag:whites = { - if = { - limit = { - OR = { - scope:activity.var:first_place = { has_trait = charioteer_white } - scope:activity.var:second_place = { has_trait = charioteer_white } - } - } - set_or_increment_lucky_better_variable = yes - add_character_flag = successful_bet - scope:activity = { - add_activity_log_entry = { - key = chariot_race_betting_team_outcome_key - score = 100 - show_in_conclusion = yes - character = scope:current_gambler - scope:current_gambler = { - add_gold = { - value = scope:current_gambler.var:wager_value - multiply = scope:activity.var:white_place_payout - max = scope:current_gambler.monumental_gold_value - } - } - change_variable = { - name = chariot_race_pot - subtract = { - value = scope:current_gambler.var:wager_value - multiply = scope:activity.var:white_place_payout - } - } - } - } - } - } - flag:reds = { - if = { - limit = { - OR = { - scope:activity.var:first_place = { has_trait = charioteer_red } - scope:activity.var:second_place = { has_trait = charioteer_red } - } - } - set_or_increment_lucky_better_variable = yes - add_character_flag = successful_bet - scope:activity = { - add_activity_log_entry = { - key = chariot_race_betting_team_outcome_key - score = 100 - show_in_conclusion = yes - character = scope:current_gambler - scope:current_gambler = { - add_gold = { - value = scope:current_gambler.var:wager_value - multiply = scope:activity.var:red_place_payout - max = scope:current_gambler.monumental_gold_value - } - } - change_variable = { - name = chariot_race_pot - subtract = { - value = scope:current_gambler.var:wager_value - multiply = scope:activity.var:red_place_payout - } - } - } - } - } - } - } - } - else_if = { - limit = { - var:wager_type ?= flag:show - var:wager_target ?= this - } - switch = { - trigger = var:wager_team - flag:blues = { - if = { - limit = { - OR = { - scope:activity.var:first_place = { has_trait = charioteer_blue } - scope:activity.var:second_place = { has_trait = charioteer_blue } - scope:activity.var:third_place = { has_trait = charioteer_blue } - } - } - set_or_increment_lucky_better_variable = yes - add_character_flag = successful_bet - scope:activity = { - add_activity_log_entry = { - key = chariot_race_betting_team_outcome_key - score = 100 - show_in_conclusion = yes - character = scope:current_gambler - scope:current_gambler = { - add_gold = { - value = scope:current_gambler.var:wager_value - multiply = scope:activity.var:blue_show_payout - max = scope:current_gambler.monumental_gold_value - } - } - change_variable = { - name = chariot_race_pot - subtract = { - value = scope:current_gambler.var:wager_value - multiply = scope:activity.var:blue_show_payout - } - } - } - } - } - } - flag:greens = { - if = { - limit = { - OR = { - scope:activity.var:first_place = { has_trait = charioteer_green } - scope:activity.var:second_place = { has_trait = charioteer_green } - scope:activity.var:third_place = { has_trait = charioteer_green } - } - } - set_or_increment_lucky_better_variable = yes - add_character_flag = successful_bet - scope:activity = { - add_activity_log_entry = { - key = chariot_race_betting_team_outcome_key - score = 100 - show_in_conclusion = yes - character = scope:current_gambler - scope:current_gambler = { - add_gold = { - value = scope:current_gambler.var:wager_value - multiply = scope:activity.var:green_show_payout - max = scope:current_gambler.monumental_gold_value - } - } - change_variable = { - name = chariot_race_pot - subtract = { - value = scope:current_gambler.var:wager_value - multiply = scope:activity.var:green_show_payout - } - } - } - } - } - } - flag:whites = { - if = { - limit = { - OR = { - scope:activity.var:first_place = { has_trait = charioteer_white } - scope:activity.var:second_place = { has_trait = charioteer_white } - scope:activity.var:third_place = { has_trait = charioteer_white } - } - } - set_or_increment_lucky_better_variable = yes - add_character_flag = successful_bet - scope:activity = { - add_activity_log_entry = { - key = chariot_race_betting_team_outcome_key - score = 100 - show_in_conclusion = yes - character = scope:current_gambler - scope:current_gambler = { - add_gold = { - value = scope:current_gambler.var:wager_value - multiply = scope:activity.var:white_show_payout - max = scope:current_gambler.monumental_gold_value - } - } - change_variable = { - name = chariot_race_pot - subtract = { - value = scope:current_gambler.var:wager_value - multiply = scope:activity.var:white_show_payout - } - } - } - } - } - } - flag:reds = { - if = { - limit = { - OR = { - scope:activity.var:first_place = { has_trait = charioteer_red } - scope:activity.var:second_place = { has_trait = charioteer_red } - scope:activity.var:third_place = { has_trait = charioteer_red } - } - } - set_or_increment_lucky_better_variable = yes - add_character_flag = successful_bet - scope:activity = { - add_activity_log_entry = { - key = chariot_race_betting_team_outcome_key - score = 100 - show_in_conclusion = yes - character = scope:current_gambler - scope:current_gambler = { - add_gold = { - value = scope:current_gambler.var:wager_value - multiply = scope:activity.var:red_show_payout - max = scope:current_gambler.monumental_gold_value - } - } - change_variable = { - name = chariot_race_pot - subtract = { - value = scope:current_gambler.var:wager_value - multiply = scope:activity.var:red_show_payout - } - } - } - } - } - } - } - } - } - } -} - -clear_placement_variables_effect = { - switch = { - trigger = has_variable - first_place = { remove_variable = first_place } - second_place = { remove_variable = second_place } - third_place = { remove_variable = third_place } - fourth_place = { remove_variable = fourth_place } - fifth_place = { remove_variable = fifth_place } - sixth_place = { remove_variable = sixth_place } - seventh_place = { remove_variable = seventh_place } - eighth_place = { remove_variable = eighth_place } - ninth_place = { remove_variable = ninth_place } - tenth_place = { remove_variable = tenth_place } - eleventh_place = { remove_variable = eleventh_place } - twelfth_place = { remove_variable = twelfth_place } - } -} - -chariot_race_remove_variables_effect = { - scope:activity = { - # Clean up variables we used for calculations on both Charioteers and Spectators - every_guest_subset = { - name = charioteers - remove_variable = odds_win_a - remove_variable = odds_win_b - remove_variable = odds_place_a - remove_variable = odds_place_b - remove_variable = odds_show_a - remove_variable = odds_show_b - remove_variable = percent_chance_to_win - remove_variable = percent_chance_to_place - remove_variable = percent_chance_to_show - remove_variable = win_payout - remove_variable = place_payout - remove_variable = show_payout - remove_variable = current_place_in_race - } - every_guest_subset = { - name = spectators - remove_variable = wager_team - remove_variable = wager_type - remove_variable = wager_target - remove_variable = wager_value - if = { - limit = { has_character_flag = successful_bet } - remove_character_flag = successful_bet - } - } - # Really for error suppression only since variables saved on activities are destroyed when the activity is over - switch = { - trigger = has_variable - blue_percent_chance_to_win = { remove_variable = blue_percent_chance_to_win } - blue_percent_chance_to_show = { remove_variable = blue_percent_chance_to_show } - blue_percent_chance_to_place = { remove_variable = blue_percent_chance_to_place } - green_percent_chance_to_win = { remove_variable = green_percent_chance_to_win } - green_percent_chance_to_place = { remove_variable = green_percent_chance_to_place } - green_percent_chance_to_show = { remove_variable = green_percent_chance_to_show } - white_percent_chance_to_place = { remove_variable = white_percent_chance_to_place } - white_percent_chance_to_win = { remove_variable = white_percent_chance_to_win } - white_percent_chance_to_show = { remove_variable = white_percent_chance_to_show } - red_percent_chance_to_win = { remove_variable = red_percent_chance_to_win } - red_percent_chance_to_place = { remove_variable = red_percent_chance_to_place } - red_percent_chance_to_show = { remove_variable = red_percent_chance_to_show } - dead_charioteers = { remove_variable = dead_charioteers } - } - clear_placement_variables_effect = yes - } -} - -advance_place_in_ranking_effect = { - $NEW_LEADING_CHAR$ = { save_scope_as = char_advanced } - $NEW_TRAILING_CHAR$ = { save_scope_as = char_passed } - scope:char_advanced = { - change_variable = { - name = chariot_race_victory_score - add = { - value = scope:char_passed.var:chariot_race_victory_score - subtract = scope:char_advanced.var:chariot_race_victory_score - add = 1 - } - } - - } - scope:activity = { update_chariot_race_standings_effect = yes } -} - -# Use this effect to update the current standings of the race based on each charioteer's victory score -update_chariot_race_standings_effect = { - scope:activity = { - # Ensure we have dead characters saved for the gui - if = { - limit = { - has_variable = first_place - var:first_place = { is_alive = no } - } - add_to_variable_list = { - name = dead_charioteers - target = var:first_place - } - } - else_if = { - limit = { - has_variable = second_place - var:second_place = { is_alive = no } - } - add_to_variable_list = { - name = dead_charioteers - target = var:second_place - } - } - else_if = { - limit = { - has_variable = third_place - var:third_place = { is_alive = no } - } - add_to_variable_list = { - name = dead_charioteers - target = var:third_place - } - } - else_if = { - limit = { - has_variable = fourth_place - var:fourth_place = { is_alive = no } - } - add_to_variable_list = { - name = dead_charioteers - target = var:fourth_place - } - } - else_if = { - limit = { - has_variable = fifth_place - var:fifth_place = { is_alive = no } - } - add_to_variable_list = { - name = dead_charioteers - target = var:fifth_place - } - } - else_if = { - limit = { - has_variable = sixth_place - var:sixth_place = { is_alive = no } - } - add_to_variable_list = { - name = dead_charioteers - target = var:sixth_place - } - } - else_if = { - limit = { - has_variable = seventh_place - var:seventh_place = { is_alive = no } - } - add_to_variable_list = { - name = dead_charioteers - target = var:seventh_place - } - } - else_if = { - limit = { - has_variable = eighth_place - var:eighth_place = { is_alive = no } - } - add_to_variable_list = { - name = dead_charioteers - target = var:eighth_place - } - } - else_if = { - limit = { - has_variable = ninth_place - var:ninth_place = { is_alive = no } - } - add_to_variable_list = { - name = dead_charioteers - target = var:ninth_place - } - } - else_if = { - limit = { - has_variable = tenth_place - var:tenth_place = { is_alive = no } - } - add_to_variable_list = { - name = dead_charioteers - target = var:tenth_place - } - } - else_if = { - limit = { - has_variable = eleventh_place - var:eleventh_place = { is_alive = no } - } - add_to_variable_list = { - name = dead_charioteers - target = var:eleventh_place - } - } - else_if = { - limit = { - has_variable = twelfth_place - var:twelfth_place = { is_alive = no } - } - add_to_variable_list = { - name = dead_charioteers - target = var:twelfth_place - } - } - # Clear the variables so we get rid of any dead characters - clear_placement_variables_effect = yes - # Get a count of how many living charioteers we have - set_variable = { - name = num_charioteers - value = 0 - } - # Iterate over the list of charioteers and save each as a variable according to their place - ordered_guest_subset = { - name = charioteers - order_by = charioteer_victory_score_value - max = 12 - check_range_bounds = no - limit = { is_alive = yes } - save_temporary_scope_as = current_charioteer - # increment variable - scope:activity = { - change_variable = { - name = num_charioteers - add = 1 - } - } - if = { - limit = { has_variable = current_place_in_race } - remove_variable = current_place_in_race - } - # scripted effect to set variable based on current count (num_charioteers) - assign_charioteer_to_place_variable_effect = yes - } - } -} - -# Used in update_chariot_race_standings_effect to set variables on both the activity and the individual charioteers -assign_charioteer_to_place_variable_effect = { - scope:activity = { - switch = { - trigger = var:num_charioteers - 1 = { - set_variable = { - name = first_place - value = scope:current_charioteer - } - scope:current_charioteer = { - set_variable = { - name = current_place_in_race - value = 1 - } - } - } - 2 = { - set_variable = { - name = second_place - value = scope:current_charioteer - } - scope:current_charioteer = { - set_variable = { - name = current_place_in_race - value = 2 - } - } - } - 3 = { - set_variable = { - name = third_place - value = scope:current_charioteer - } - scope:current_charioteer = { - set_variable = { - name = current_place_in_race - value = 3 - } - } - } - 4 = { - set_variable = { - name = fourth_place - value = scope:current_charioteer - } - scope:current_charioteer = { - set_variable = { - name = current_place_in_race - value = 4 - } - } - } - 5 = { - set_variable = { - name = fifth_place - value = scope:current_charioteer - } - scope:current_charioteer = { - set_variable = { - name = current_place_in_race - value = 5 - } - } - } - 6 = { - set_variable = { - name = sixth_place - value = scope:current_charioteer - } - scope:current_charioteer = { - set_variable = { - name = current_place_in_race - value = 6 - } - } - } - 7 = { - set_variable = { - name = seventh_place - value = scope:current_charioteer - } - scope:current_charioteer = { - set_variable = { - name = current_place_in_race - value = 7 - } - } - } - 8 = { - set_variable = { - name = eighth_place - value = scope:current_charioteer - } - scope:current_charioteer = { - set_variable = { - name = current_place_in_race - value = 8 - } - } - } - 9 = { - set_variable = { - name = ninth_place - value = scope:current_charioteer - } - scope:current_charioteer = { - set_variable = { - name = current_place_in_race - value = 9 - } - } - } - 10 = { - set_variable = { - name = tenth_place - value = scope:current_charioteer - } - scope:current_charioteer = { - set_variable = { - name = current_place_in_race - value = 10 - } - } - } - 11 = { - set_variable = { - name = eleventh_place - value = scope:current_charioteer - } - scope:current_charioteer = { - set_variable = { - name = current_place_in_race - value = 11 - } - } - } - 12 = { - set_variable = { - name = twelfth_place - value = scope:current_charioteer - } - scope:current_charioteer = { - set_variable = { - name = current_place_in_race - value = 12 - } - } - } - } - } -} - -distribute_charioteer_trait_xp_effect = { - switch = { - trigger = has_trait - charioteer_blue = { - if = { - limit = { has_court_position = charioteer_court_position } - employer = { - send_interface_toast = { - title = charioteer_trait_xp_gain_message - left_icon = prev - prev = { - add_trait_xp = { - trait = charioteer_blue - value = $VALUE$ - } - } - } - } - } - else = { - add_trait_xp = { - trait = charioteer_blue - value = $VALUE$ - } - } - } - charioteer_green = { - if = { - limit = { has_court_position = charioteer_court_position } - employer = { - send_interface_toast = { - title = charioteer_trait_xp_gain_message - left_icon = prev - prev = { - add_trait_xp = { - trait = charioteer_green - value = $VALUE$ - } - } - } - } - } - else = { - add_trait_xp = { - trait = charioteer_green - value = $VALUE$ - } - } - } - charioteer_white = { - if = { - limit = { has_court_position = charioteer_court_position } - employer = { - send_interface_toast = { - title = charioteer_trait_xp_gain_message - left_icon = prev - prev = { - add_trait_xp = { - trait = charioteer_white - value = $VALUE$ - } - } - } - } - } - else = { - add_trait_xp = { - trait = charioteer_white - value = $VALUE$ - } - } - } - charioteer_red = { - if = { - limit = { has_court_position = charioteer_court_position } - employer = { - send_interface_toast = { - title = charioteer_trait_xp_gain_message - left_icon = prev - prev = { - add_trait_xp = { - trait = charioteer_red - value = $VALUE$ - } - } - } - } - } - else = { - add_trait_xp = { - trait = charioteer_red - value = $VALUE$ - } - } - } - } -} - -remove_dead_charioteer_from_race = { - scope:activity = { - add_to_variable_list = { - name = dead_charioteers - target = prev - } - } -} - -### END CHARIOT RACE - -ep3_send_akolouthos_message_loyal = { - send_interface_message = { - type = msg_akolouthos_steels_varangians - title = ep3_akolouthos_events.1000 - desc = ep3_akolouthos_events.1000_loyal_notification_tooltip - - left_icon = scope:trait_getter - scope:trait_getter = { - add_trait = loyal - add_opinion = { - target = root - modifier = loyalty_opinion - opinion = 40 - } - } - custom_tooltip = akolouthos_effect_tooltip - } -} - -ep3_send_akolouthos_message_varangian = { - send_interface_message = { - type = msg_akolouthos_steels_varangians - title = ep3_akolouthos_events.1000 - desc = ep3_akolouthos_events.1000_varangian_notification_tooltip - - left_icon = scope:trait_getter - scope:trait_getter = { - add_trait = varangian - add_opinion = { - target = root - modifier = loyalty_opinion - opinion = 40 - } - } - custom_tooltip = akolouthos_effect_tooltip - } -} - -ep3_palace_looting_random_malus_effect = { - if = { - limit = { - has_character_flag = malus_court_grandeur - var:varangian_regiments >= 7 - } - change_current_court_grandeur = massive_court_grandeur_loss - } - else_if = { - limit = { - has_character_flag = malus_court_grandeur - var:varangian_regiments >= 4 - } - change_current_court_grandeur = major_court_grandeur_loss - } - else_if = { - limit = { - has_character_flag = malus_court_grandeur - } - change_current_court_grandeur = medium_court_grandeur_loss - } - if = { - limit = { - has_character_flag = malus_broken_artifact - } - scope:broken_artifact = { - add_durability = -40 - } - } - if = { - limit = { - has_character_flag = malus_stolen_artifact - } - destroy_artifact = scope:stolen_artifact - } -} - -ep3_child_castration_effect = { - add_trait = beardless_eunuch - torture_memory_effect = { - VICTIM = scope:recipient - TORTURER = scope:actor - TYPE = castrated_beardless - } - #Eunuch bonus effects - custom_tooltip = castration_increased_aptitude - if = { - limit = { - scope:actor = { - is_landed_or_landless_administrative = yes - } - } - custom_tooltip = castration_governor_efficiency - } - #might get hurt - custom_tooltip = castration_wounded_chance - hidden_effect = { - random_list = { - 5 = { - add_character_modifier = { - modifier = brutal_castration_modifier - years = 5 - } - } - 5 = { - modifier = { - add = 5 - employs_court_position = court_physician_court_position - } - modifier = { - add = 5 - employs_court_position = court_physician_court_position - court_position:court_physician_court_position = { - aptitude = { - court_position = court_physician_court_position - value >= 1 - } - } - } - modifier = { - add = 10 - employs_court_position = court_physician_court_position - court_position:court_physician_court_position = { - aptitude = { - court_position = court_physician_court_position - value >= 2 - } - } - } - modifier = { - add = 10 - employs_court_position = court_physician_court_position - court_position:court_physician_court_position = { - aptitude = { - court_position = court_physician_court_position - value >= 3 - } - } - } - modifier = { - add = 10 - employs_court_position = court_physician_court_position - court_position:court_physician_court_position = { - aptitude = { - court_position = court_physician_court_position - value >= 4 - } - } - } - } - } - } -} - -ep3_youth_castration_effect = { - add_trait = eunuch_1 - torture_memory_effect = { - VICTIM = scope:recipient - TORTURER = scope:actor - TYPE = castrated - } - #eunuch bonus effects - custom_tooltip = castration_increased_aptitude - if = { - limit = { - scope:actor = { - is_landed_or_landless_administrative = yes - } - } - custom_tooltip = castration_governor_efficiency - } - #might get wounded - custom_tooltip = castration_wounded_chance - hidden_effect = { - random_list = { - 10 = { - add_character_modifier = { - modifier = brutal_castration_modifier - years = 5 - } - } - 5 = { - modifier = { - add = 5 - employs_court_position = court_physician_court_position - } - modifier = { - add = 5 - employs_court_position = court_physician_court_position - court_position:court_physician_court_position = { - aptitude = { - court_position = court_physician_court_position - value >= 1 - } - } - } - modifier = { - add = 10 - employs_court_position = court_physician_court_position - court_position:court_physician_court_position = { - aptitude = { - court_position = court_physician_court_position - value >= 2 - } - } - } - modifier = { - add = 10 - employs_court_position = court_physician_court_position - court_position:court_physician_court_position = { - aptitude = { - court_position = court_physician_court_position - value >= 3 - } - } - } - modifier = { - add = 10 - employs_court_position = court_physician_court_position - court_position:court_physician_court_position = { - aptitude = { - court_position = court_physician_court_position - value >= 4 - } - } - } - } - } - } -} - -ep3_greek_fire_success_effect = { - scope:invading_commander = { - add_character_modifier = { - modifier = ravaged_by_greek_fire_modifier - years = 1 - } - add_stress = major_stress_impact_gain - } - scope:army = { - deplete_army_by_percentage = 0.9 - } - scope:invading_commander = { - custom_tooltip = two_knights_killed_tooltip - hidden_effect = { - scope:knight_1 ?= { - death = { - death_reason = death_greek_fire - killer = scope:city_defender - } - } - scope:knight_2 ?= { - death = { - death_reason = death_greek_fire - killer = scope:city_defender - } - } - } - custom_tooltip = three_knights_killed_tooltip - hidden_effect = { - scope:knight_3 ?= { - increase_wounds_effect = { REASON = greek_fire } - } - scope:knight_4 ?= { - increase_wounds_effect = { REASON = greek_fire } - } - scope:knight_5 ?= { - increase_wounds_effect = { REASON = greek_fire } - } - } - } - -} - -ep3_greek_fire_fail_effect = { - scope:invading_commander = { - add_character_modifier = { - modifier = assaulted_by_greek_fire_modifier - years = 1 - } - add_stress = medium_stress_impact_gain - } - scope:knight_1 ?= { - death = { - death_reason = death_greek_fire - killer = scope:city_defender - } - } - scope:army = { - deplete_army_by_percentage = 0.4 - } - scope:invading_commander = { - custom_tooltip = two_knights_wounded_tooltip - hidden_effect = { - scope:knight_2 ?= { - increase_wounds_effect = { REASON = greek_fire } - } - scope:knight_3 ?= { - increase_wounds_effect = { REASON = greek_fire } - } - } - } -} - -ep3_greek_fire_crit_fail_effect = { - scope:invading_commander = { - add_character_modifier = { - modifier = assaulted_by_greek_fire_modifier - years = 1 - } - } - scope:army = { - deplete_army_by_percentage = 0.1 - } - scope:invading_commander = { - custom_tooltip = two_knights_wounded_tooltip - hidden_effect = { - scope:knight_1 ?= { - increase_wounds_effect = { REASON = greek_fire } - } - scope:knight_2 ?= { - increase_wounds_effect = { REASON = greek_fire } - } - } - } - - root.capital_county = { - add_county_modifier = { - modifier = defenders_immolated_modifier - years = 10 - } - } - #You lose the greek fire fleet modifier - title:c_byzantion = { - remove_county_modifier = defensive_fire_dromons_modifier - } -} - -save_traveler_culture_effect = { - random_culture_global = { - limit = { - exists = culture_head - this != root.culture - } - save_scope_as = traveler_culture - } - #save second culture - random_culture_global = { - limit = { - exists = culture_head - this != root.culture - OR = { - AND = { - culture_overlaps_geographical_region = world_europe - scope:traveler_culture = { culture_overlaps_geographical_region = world_europe } - } - AND = { - culture_overlaps_geographical_region = world_asia_minor - scope:traveler_culture = { culture_overlaps_geographical_region = world_europe } - } - AND = { - culture_overlaps_geographical_region = world_europe - scope:traveler_culture = { culture_overlaps_geographical_region = world_asia_minor } - } - AND = { - culture_overlaps_geographical_region = world_asia_minor - scope:traveler_culture = { culture_overlaps_geographical_region = world_asia_minor } - } - AND = { - culture_overlaps_geographical_region = world_asia_minor - scope:traveler_culture = { culture_overlaps_geographical_region = world_middle_east } - } - AND = { - culture_overlaps_geographical_region = world_middle_east - scope:traveler_culture = { culture_overlaps_geographical_region = world_asia_minor } - } - AND = { - culture_overlaps_geographical_region = world_middle_east - scope:traveler_culture = { culture_overlaps_geographical_region = world_middle_east } - } - AND = { - culture_overlaps_geographical_region = world_africa - scope:traveler_culture = { culture_overlaps_geographical_region = world_africa } - } - AND = { - culture_overlaps_geographical_region = world_steppe - scope:traveler_culture = { culture_overlaps_geographical_region = world_steppe } - } - AND = { - culture_overlaps_geographical_region = world_tibet - scope:traveler_culture = { culture_overlaps_geographical_region = world_tibet } - } - AND = { - culture_overlaps_geographical_region = world_tibet - scope:traveler_culture = { culture_overlaps_geographical_region = world_india} - } - AND = { - culture_overlaps_geographical_region = world_india - scope:traveler_culture = { culture_overlaps_geographical_region = world_tibet } - } - AND = { - culture_overlaps_geographical_region = world_india - scope:traveler_culture = { culture_overlaps_geographical_region = world_india } - } - AND = { - culture_overlaps_geographical_region = world_burma - scope:traveler_culture = { culture_overlaps_geographical_region = world_india } - } - AND = { - culture_overlaps_geographical_region = world_india - scope:traveler_culture = { culture_overlaps_geographical_region = world_burma } - } - AND = { - culture_overlaps_geographical_region = world_tibet - scope:traveler_culture = { culture_overlaps_geographical_region = world_burma } - } - AND = { - culture_overlaps_geographical_region = world_burma - scope:traveler_culture = { culture_overlaps_geographical_region = world_tibet } - } - AND = { - culture_overlaps_geographical_region = world_tibet - scope:traveler_culture = { culture_overlaps_geographical_region = world_asia_china } - } - AND = { - culture_overlaps_geographical_region = world_asia_china - scope:traveler_culture = { culture_overlaps_geographical_region = world_asia_china } - } - AND = { - culture_overlaps_geographical_region = world_asia_china - scope:traveler_culture = { culture_overlaps_geographical_region = world_asia_southeast } - } - AND = { - culture_overlaps_geographical_region = world_asia_china - scope:traveler_culture = { culture_overlaps_geographical_region = world_asia_korea } - } - AND = { - culture_overlaps_geographical_region = world_asia_china - scope:traveler_culture = { culture_overlaps_geographical_region = world_asia_japan } - } - AND = { - culture_overlaps_geographical_region = world_asia_korea - scope:traveler_culture = { culture_overlaps_geographical_region = world_asia_china } - } - AND = { - culture_overlaps_geographical_region = world_asia_korea - scope:traveler_culture = { culture_overlaps_geographical_region = world_asia_japan } - } - AND = { - culture_overlaps_geographical_region = world_asia_korea - scope:traveler_culture = { culture_overlaps_geographical_region = world_asia_korea } - } - AND = { - culture_overlaps_geographical_region = world_asia_japan - scope:traveler_culture = { culture_overlaps_geographical_region = world_asia_japan } - } - AND = { - culture_overlaps_geographical_region = world_asia_japan - scope:traveler_culture = { culture_overlaps_geographical_region = world_asia_china } - } - AND = { - culture_overlaps_geographical_region = world_asia_japan - scope:traveler_culture = { culture_overlaps_geographical_region = world_asia_korea } - } - } - cultural_acceptance = { - target = scope:traveler_culture - value >= 5 - } - } - alternative_limit = { - this = root.culture - } - save_scope_as = traveler_culture_2 - } -} -ep3_ai_castration_effect = { - random = { - chance = 50 - add_trait = beardless_eunuch - random_list = { - 5 = { - add_character_modifier = { - modifier = brutal_castration_modifier - years = 5 - } - } - 5 = {} - 5 = { - trigger = { - liege ?= { employs_court_position = court_physician_court_position } - } - modifier = { - add = 5 - liege.court_position:court_physician_court_position = { - aptitude = { - court_position = court_physician_court_position - value >= 1 - } - } - } - modifier = { - add = 10 - liege.court_position:court_physician_court_position = { - aptitude = { - court_position = court_physician_court_position - value >= 2 - } - } - } - modifier = { - add = 10 - liege.court_position:court_physician_court_position = { - aptitude = { - court_position = court_physician_court_position - value >= 3 - } - } - } - modifier = { - add = 10 - liege.court_position:court_physician_court_position = { - aptitude = { - court_position = court_physician_court_position - value >= 4 - } - } - } - } - } - } -} - -ep3_story_cycle_admin_eunuch_upgrade_modifier_effect = { - save_scope_value_as = { - name = modifier_type - value = flag:$TYPE$ - } - switch = { - trigger = has_character_modifier - admin_eunuch_$TYPE$_1_modifier = { - hidden_effect = { remove_character_modifier = admin_eunuch_$TYPE$_1_modifier } - add_character_modifier = admin_eunuch_$TYPE$_2_modifier - } - admin_eunuch_$TYPE$_2_modifier = { - hidden_effect = { remove_character_modifier = admin_eunuch_$TYPE$_2_modifier } - add_character_modifier = admin_eunuch_$TYPE$_3_modifier - } - admin_eunuch_$TYPE$_3_modifier = { - hidden_effect = { remove_character_modifier = admin_eunuch_$TYPE$_3_modifier } - add_character_modifier = admin_eunuch_$TYPE$_4_modifier - } - admin_eunuch_$TYPE$_4_modifier = { - hidden_effect = { remove_character_modifier = admin_eunuch_$TYPE$_4_modifier } - add_character_modifier = admin_eunuch_$TYPE$_5_modifier - } - admin_eunuch_$TYPE$_5_modifier = { - hidden_effect = { remove_character_modifier = admin_eunuch_$TYPE$_5_modifier } - add_character_modifier = admin_eunuch_$TYPE$_6_modifier - } - admin_eunuch_$TYPE$_6_modifier = { - hidden_effect = { remove_character_modifier = admin_eunuch_$TYPE$_6_modifier } - add_character_modifier = admin_eunuch_$TYPE$_7_modifier - } - admin_eunuch_$TYPE$_7_modifier = { - hidden_effect = { remove_character_modifier = admin_eunuch_$TYPE$_7_modifier } - add_character_modifier = admin_eunuch_$TYPE$_8_modifier - } - admin_eunuch_$TYPE$_8_modifier = { - if = { - limit = { - scope:modifier_type = flag:eunuch - NOT = { has_hook = top_liege } - } - add_hook = { - type = influence_hook - target = top_liege - } - } - else_if = { - limit = { - scope:modifier_type = flag:eunuch - NOT = { has_strong_hook = top_liege } - } - remove_hook = { target = top_liege } - add_hook = { - type = strong_influence_hook - target = top_liege - } - } - else = { change_influence = medium_influence_gain } - } - fallback = { add_character_modifier = admin_eunuch_$TYPE$_4_modifier } - } -} - -ep3_story_cycle_admin_eunuch_matching_modifier_effect = { - $FIRST$ = { - switch = { - trigger = has_character_modifier - admin_eunuch_$FIRST_TYPE$_1_modifier = { - $SECOND$ = { add_character_modifier = admin_eunuch_$SECOND_TYPE$_1_modifier } - } - admin_eunuch_$FIRST_TYPE$_2_modifier = { - $SECOND$ = { add_character_modifier = admin_eunuch_$SECOND_TYPE$_2_modifier } - } - admin_eunuch_$FIRST_TYPE$_3_modifier = { - $SECOND$ = { add_character_modifier = admin_eunuch_$SECOND_TYPE$_3_modifier } - } - admin_eunuch_$FIRST_TYPE$_4_modifier = { - $SECOND$ = { add_character_modifier = admin_eunuch_$SECOND_TYPE$_4_modifier } - } - admin_eunuch_$FIRST_TYPE$_5_modifier = { - $SECOND$ = { add_character_modifier = admin_eunuch_$SECOND_TYPE$_5_modifier } - } - admin_eunuch_$FIRST_TYPE$_6_modifier = { - $SECOND$ = { add_character_modifier = admin_eunuch_$SECOND_TYPE$_6_modifier } - } - admin_eunuch_$FIRST_TYPE$_7_modifier = { - $SECOND$ = { add_character_modifier = admin_eunuch_$SECOND_TYPE$_7_modifier } - } - admin_eunuch_$FIRST_TYPE$_8_modifier = { - $SECOND$ = { add_character_modifier = admin_eunuch_$SECOND_TYPE$_8_modifier } - } - } - } -} - -ep3_story_cycle_admin_eunuch_downgrade_modifier_effect = { - save_scope_value_as = { - name = modifier_type - value = flag:$TYPE$ - } - switch = { - trigger = has_character_modifier - admin_eunuch_$TYPE$_1_modifier = { - if = { - limit = { scope:modifier_type = flag:eunuch } - progress_towards_rival_effect = { - REASON = rival_admin_eunuch - CHARACTER = top_liege - OPINION = default_rival_opinion - } - } - else = { change_influence = medium_influence_loss } - } - admin_eunuch_$TYPE$_2_modifier = { - hidden_effect = { remove_character_modifier = admin_eunuch_$TYPE$_2_modifier } - add_character_modifier = admin_eunuch_$TYPE$_1_modifier - if = { # Harder to say no the further you go - limit = { scope:modifier_type = flag:liege } - change_influence = miniscule_influence_loss - } - } - admin_eunuch_$TYPE$_3_modifier = { - hidden_effect = { remove_character_modifier = admin_eunuch_$TYPE$_3_modifier } - add_character_modifier = admin_eunuch_$TYPE$_2_modifier - if = { # Harder to say no the further you go - limit = { scope:modifier_type = flag:liege } - change_influence = miniscule_influence_loss - } - } - admin_eunuch_$TYPE$_4_modifier = { - hidden_effect = { remove_character_modifier = admin_eunuch_$TYPE$_4_modifier } - add_character_modifier = admin_eunuch_$TYPE$_3_modifier - if = { # Harder to say no the further you go - limit = { scope:modifier_type = flag:liege } - change_influence = minor_influence_loss - } - } - admin_eunuch_$TYPE$_5_modifier = { - hidden_effect = { remove_character_modifier = admin_eunuch_$TYPE$_5_modifier } - add_character_modifier = admin_eunuch_$TYPE$_4_modifier - if = { # Harder to say no the further you go - limit = { scope:modifier_type = flag:liege } - change_influence = minor_influence_loss - } - } - admin_eunuch_$TYPE$_6_modifier = { - hidden_effect = { remove_character_modifier = admin_eunuch_$TYPE$_6_modifier } - add_character_modifier = admin_eunuch_$TYPE$_5_modifier - if = { # Harder to say no the further you go - limit = { scope:modifier_type = flag:liege } - change_influence = medium_influence_loss - } - } - admin_eunuch_$TYPE$_7_modifier = { - hidden_effect = { remove_character_modifier = admin_eunuch_$TYPE$_7_modifier } - add_character_modifier = admin_eunuch_$TYPE$_6_modifier - if = { # Harder to say no the further you go - limit = { scope:modifier_type = flag:liege } - change_influence = medium_influence_loss - } - } - admin_eunuch_$TYPE$_8_modifier = { - hidden_effect = { remove_character_modifier = admin_eunuch_$TYPE$_8_modifier } - add_character_modifier = admin_eunuch_$TYPE$_7_modifier - if = { # Harder to say no the further you go - limit = { scope:modifier_type = flag:liege } - change_influence = major_influence_loss - } - } - fallback = { add_character_modifier = admin_eunuch_$TYPE$_3_modifier } - } -} - -ep3_story_cycle_admin_eunuch_clear_modifier_effect = { - switch = { - trigger = has_character_modifier - admin_eunuch_$TYPE$_1_modifier = { remove_character_modifier = admin_eunuch_$TYPE$_1_modifier } - admin_eunuch_$TYPE$_2_modifier = { remove_character_modifier = admin_eunuch_$TYPE$_2_modifier } - admin_eunuch_$TYPE$_3_modifier = { remove_character_modifier = admin_eunuch_$TYPE$_3_modifier } - admin_eunuch_$TYPE$_4_modifier = { remove_character_modifier = admin_eunuch_$TYPE$_4_modifier } - admin_eunuch_$TYPE$_5_modifier = { remove_character_modifier = admin_eunuch_$TYPE$_5_modifier } - admin_eunuch_$TYPE$_6_modifier = { remove_character_modifier = admin_eunuch_$TYPE$_6_modifier } - admin_eunuch_$TYPE$_7_modifier = { remove_character_modifier = admin_eunuch_$TYPE$_7_modifier } - admin_eunuch_$TYPE$_8_modifier = { remove_character_modifier = admin_eunuch_$TYPE$_8_modifier } - } -} - -ep3_give_eunuch_effect = { - $TAKER$ = { - add_courtier = $EUNUCH$ - } - $GIVER$ = { - change_influence = { - value = 100 - add = $EUNUCH$.sum_of_all_skills_value - if = { - limit = { - $EUNUCH$ = { has_trait = beardless_eunuch } - } - multiply = 1.5 - } - } - } -} - -################################################## -# Misc -################################################## - -# Picks a random valid maa type for OWNER to create -ep3_pick_random_maa_regiment_effect = { - save_temporary_scope_value_as = { - name = include_basic_maa - value = $INCLUDE_BASIC_MAA$ - } - save_temporary_scope_value_as = { - name = include_siege_maa - value = $INCLUDE_SIEGE_MAA$ - } - $OWNER$ = { - random_list = { - 1 = { - trigger = { - scope:include_basic_maa = yes - } - save_scope_value_as = { - name = maa_to_create - value = flag:light_footmen - } - } - 1 = { - trigger = { - scope:include_basic_maa = yes - } - save_scope_value_as = { - name = maa_to_create - value = flag:bowmen - } - } - 1 = { - trigger = { - scope:include_basic_maa = yes - } - save_scope_value_as = { - name = maa_to_create - value = flag:light_horsemen - } - } - 1 = { - trigger = { - scope:include_basic_maa = yes - } - save_scope_value_as = { - name = maa_to_create - value = flag:pikemen_unit - } - } - # TRIBAL - 1 = { - trigger = { - culture = { has_innovation = innovation_elephantry } - } - save_scope_value_as = { - name = maa_to_create - value = flag:war_elephant - } - } - 1 = { - trigger = { - culture = { has_innovation = innovation_war_camels } - } - save_scope_value_as = { - name = maa_to_create - value = flag:camel_rider - } - } - 1 = { - trigger = { - culture = { has_innovation = innovation_arched_saddle } - } - save_scope_value_as = { - name = maa_to_create - value = flag:armored_horsemen - } - } - 1 = { - trigger = { - culture = { has_innovation = innovation_catapult } - scope:include_siege_maa = yes - } - save_scope_value_as = { - name = maa_to_create - value = flag:onager - } - } - # EARLY - 1 = { - trigger = { - culture = { has_innovation = innovation_quilted_armor } - } - save_scope_value_as = { - name = maa_to_create - value = flag:armored_footmen - } - } - 1 = { - trigger = { - culture = { has_innovation = innovation_mangonel } - scope:include_siege_maa = yes - } - save_scope_value_as = { - name = maa_to_create - value = flag:mangonel - } - } - # HIGH - 1 = { - trigger = { - culture = { has_innovation = innovation_trebuchet } - scope:include_siege_maa = yes - } - save_scope_value_as = { - name = maa_to_create - value = flag:trebuchet - } - } - 1 = { - trigger = { - culture = { has_innovation = innovation_advanced_bowmaking } - } - save_scope_value_as = { - name = maa_to_create - value = flag:crossbowmen - } - } - # LATE - 1 = { - trigger = { - culture = { has_innovation = innovation_gunpowder } - scope:include_siege_maa = yes - } - save_scope_value_as = { - name = maa_to_create - value = flag:bombard - } - } - # CULTURAL INNOVATIONS - 1 = { - trigger = { - culture = { has_innovation = innovation_bamboo_bows } - } - save_scope_value_as = { - name = maa_to_create - value = flag:paiks - } - } - 1 = { - trigger = { - culture = { has_innovation = innovation_zweihanders } - } - save_scope_value_as = { - name = maa_to_create - value = flag:landsknecht - } - } - 1 = { - trigger = { - culture = { has_innovation = innovation_adaptive_militia } - } - save_scope_value_as = { - name = maa_to_create - value = flag:goedendag - } - } - 1 = { - trigger = { - culture = { has_innovation = innovation_valets } - } - save_scope_value_as = { - name = maa_to_create - value = flag:gendarme - } - } - 1 = { - trigger = { - culture = { has_innovation = innovation_pike_columns } - } - save_scope_value_as = { - name = maa_to_create - value = flag:picchieri - } - } - 1 = { - trigger = { - culture = { has_innovation = innovation_legionnaires } - } - save_scope_value_as = { - name = maa_to_create - value = flag:praetorian - } - } - 1 = { - trigger = { - culture = { has_innovation = innovation_desert_tactics } - } - save_scope_value_as = { - name = maa_to_create - value = flag:chasseur - } - } - 1 = { - trigger = { - culture = { has_innovation = innovation_caballeros } - } - save_scope_value_as = { - name = maa_to_create - value = flag:caballero - } - } - 1 = { - trigger = { - culture = { has_innovation = innovation_hobbies } - } - save_scope_value_as = { - name = maa_to_create - value = flag:hobelar - } - } - 1 = { - trigger = { - culture = { has_innovation = innovation_rectilinear_schiltron } - } - save_scope_value_as = { - name = maa_to_create - value = flag:schiltron - } - } - 1 = { - trigger = { - culture = { has_innovation = innovation_sahel_horsemen } - } - save_scope_value_as = { - name = maa_to_create - value = flag:sahel_horsemen - } - } - 1 = { - trigger = { - culture = { has_innovation = innovation_sarawit } - } - save_scope_value_as = { - name = maa_to_create - value = flag:sarawit - } - } - 1 = { - trigger = { - culture = { has_innovation = innovation_repeating_crossbow } - } - save_scope_value_as = { - name = maa_to_create - value = flag:shenbigong - } - } - 1 = { - trigger = { - culture = { has_innovation = innovation_pole_vault } - } - save_scope_value_as = { - name = maa_to_create - value = flag:guanch_vaulter - } - } - 1 = { - trigger = { - culture = { has_cultural_parameter = unlock_maa_huscarls } - } - save_scope_value_as = { - name = maa_to_create - value = flag:huscarl - } - } - 1 = { - trigger = { - culture = { has_cultural_parameter = unlock_maa_longbowmen } - } - save_scope_value_as = { - name = maa_to_create - value = flag:longbowmen - } - } - 1 = { - trigger = { - culture = { has_cultural_parameter = unlock_maa_monaspa } - } - save_scope_value_as = { - name = maa_to_create - value = flag:monaspa - } - } - 1 = { - trigger = { - culture = { has_cultural_parameter = unlock_maa_cataphract } - } - save_scope_value_as = { - name = maa_to_create - value = flag:cataphract - } - } - 1 = { - trigger = { - culture = { has_cultural_parameter = unlock_maa_metsanvartija } - } - save_scope_value_as = { - name = maa_to_create - value = flag:metsanvartija - } - } - 1 = { - trigger = { - culture = { has_cultural_parameter = unlock_maa_maturkan_warriors } - } - save_scope_value_as = { - name = maa_to_create - value = flag:maturkan_warriors - } - } - 1 = { - trigger = { - OR = { - culture = { culture_has_archer_cavalry_maa = yes } - mpo_can_recruit_nomad_maa_trigger = yes - } - } - save_scope_value_as = { - name = maa_to_create - value = flag:horse_archers - } - } - 1 = { - trigger = { - culture = { has_cultural_parameter = unlock_maa_ayyar } - } - save_scope_value_as = { - name = maa_to_create - value = flag:ayyar - } - } - 1 = { - trigger = { - culture = { has_cultural_parameter = unlock_maa_mubarizun } - } - save_scope_value_as = { - name = maa_to_create - value = flag:mubarizun - } - } - 1 = { - trigger = { - culture = { has_cultural_parameter = unlock_maa_mulaththamun } - } - save_scope_value_as = { - name = maa_to_create - value = flag:mulaththamun - } - } - 1 = { - trigger = { - culture = { has_cultural_parameter = unlock_maa_archers_of_the_nile } - } - save_scope_value_as = { - name = maa_to_create - value = flag:archers_of_the_nile - } - } - 1 = { - trigger = { - culture = { has_cultural_parameter = unlock_maa_druzhina } - } - save_scope_value_as = { - name = maa_to_create - value = flag:druzhina - } - } - 1 = { - trigger = { - culture = { has_cultural_parameter = unlock_maa_hussar } - } - save_scope_value_as = { - name = maa_to_create - value = flag:hussar - } - } - 1 = { - trigger = { - culture = { has_cultural_parameter = unlock_maa_horn_warrior } - } - save_scope_value_as = { - name = maa_to_create - value = flag:horn_warrior - } - } - 1 = { - trigger = { - culture = { has_cultural_parameter = unlock_maa_bush_hunter } - } - save_scope_value_as = { - name = maa_to_create - value = flag:bush_hunter - } - } - 1 = { - trigger = { - culture = { has_cultural_parameter = unlock_maa_shomer } - } - save_scope_value_as = { - name = maa_to_create - value = flag:shomer - } - } - 1 = { - trigger = { - culture = { has_cultural_parameter = unlock_maa_garudas } - } - save_scope_value_as = { - name = maa_to_create - value = flag:garudas - } - } - 1 = { - trigger = { - culture = { has_cultural_parameter = unlock_maa_khandayat } - } - save_scope_value_as = { - name = maa_to_create - value = flag:khandayat - } - } - 1 = { - trigger = { - culture = { has_cultural_parameter = unlock_maa_mountaineer } - } - save_scope_value_as = { - name = maa_to_create - value = flag:mountaineer - } - } - 1 = { - trigger = { - culture = { has_cultural_parameter = unlock_maa_guinea_warrior } - } - save_scope_value_as = { - name = maa_to_create - value = flag:guinea_warrior - } - } - 1 = { - trigger = { - culture = { has_cultural_parameter = unlock_maa_abudrar } - } - save_scope_value_as = { - name = maa_to_create - value = flag:abudrar - } - } - 1 = { - trigger = { - culture = { has_cultural_parameter = unlock_maa_zbrojnosh } - } - save_scope_value_as = { - name = maa_to_create - value = flag:zbrojnosh - } - } - 1 = { - trigger = { - culture = { has_cultural_parameter = unlock_maa_palace_guards } - } - save_scope_value_as = { - name = maa_to_create - value = flag:palace_guards - } - } - 1 = { - trigger = { - dynasty ?= { - has_dynasty_perk = fp3_khvarenah_legacy_4 - } - } - save_scope_value_as = { - name = maa_to_create - value = flag:asawira - } - } - 1 = { - trigger = { - culture = { has_cultural_parameter = unlock_maa_tarkhan } - } - save_scope_value_as = { - name = maa_to_create - value = flag:tarkhan - } - } - 1 = { - trigger = { - culture = { has_cultural_parameter = unlock_maa_zupin_warrior } - } - save_scope_value_as = { - name = maa_to_create - value = flag:zupin_warrior - } - } - 1 = { - trigger = { - culture = { has_cultural_parameter = unlock_maa_tawashi } - } - save_scope_value_as = { - name = maa_to_create - value = flag:tawashi - } - } - 1 = { - trigger = { - dynasty ?= { - has_dynasty_perk = warfare_legacy_5 - } - } - save_scope_value_as = { - name = maa_to_create - value = flag:house_guard - } - } - 1 = { - trigger = { - any_active_accolade = { - primary_type = { - this = accolade_type:archer_attribute - } - accolade_rank >= 3 - } - } - save_scope_value_as = { - name = maa_to_create - value = flag:accolade_maa_archers - } - } - 1 = { - trigger = { - any_active_accolade = { - primary_type = { - this = accolade_type:skirmisher_attribute - } - accolade_rank >= 3 - } - } - save_scope_value_as = { - name = maa_to_create - value = flag:accolade_maa_skirmishers - } - } - 1 = { - trigger = { - any_active_accolade = { - primary_type = { - this = accolade_type:pike_attribute - } - accolade_rank >= 3 - } - } - save_scope_value_as = { - name = maa_to_create - value = flag:accolade_maa_pikes - } - } - 1 = { - trigger = { - any_active_accolade = { - primary_type = { - this = accolade_type:outrider_attribute - } - accolade_rank >= 3 - } - } - save_scope_value_as = { - name = maa_to_create - value = flag:accolade_maa_outriders - } - } - 1 = { - trigger = { - any_active_accolade = { - primary_type = { - this = accolade_type:vanguard_attribute - } - accolade_rank >= 3 - } - } - save_scope_value_as = { - name = maa_to_create - value = flag:accolade_maa_vanguards - } - } - 1 = { - trigger = { - any_active_accolade = { - primary_type = { - this = accolade_type:lancer_attribute - } - accolade_rank >= 3 - } - } - save_scope_value_as = { - name = maa_to_create - value = flag:accolade_maa_lancers - } - } - 1 = { - trigger = { - any_active_accolade = { - primary_type = { - this = accolade_type:crossbowmen_attribute - } - accolade_rank >= 3 - } - } - save_scope_value_as = { - name = maa_to_create - value = flag:accolade_maa_crossbowers - } - } - 1 = { - trigger = { - any_active_accolade = { - primary_type = { - this = accolade_type:camelry_attribute - } - accolade_rank >= 3 - } - } - save_scope_value_as = { - name = maa_to_create - value = flag:accolade_maa_cameliers - } - } - 1 = { - trigger = { - any_active_accolade = { - primary_type = { - this = accolade_type:elephantry_attribute - } - accolade_rank >= 3 - } - } - save_scope_value_as = { - name = maa_to_create - value = flag:accolade_maa_elephantiers - } - } - 1 = { - trigger = { - any_active_accolade = { - primary_type = { - this = accolade_type:horse_archer_attribute - } - accolade_rank >= 3 - } - } - save_scope_value_as = { - name = maa_to_create - value = flag:accolade_maa_horse_archers - } - } - 1 = { - trigger = { - culture = { has_cultural_parameter = unlock_maa_vigmen } - } - save_scope_value_as = { - name = maa_to_create - value = flag:vigmen - } - } - 1 = { - trigger = { - culture = { has_cultural_parameter = unlock_maa_bondi } - } - save_scope_value_as = { - name = maa_to_create - value = flag:bondi - } - } - 1 = { - trigger = { - culture = { has_cultural_parameter = unlock_maa_varangian_veterans } - } - save_scope_value_as = { - name = maa_to_create - value = flag:varangian_veterans - } - } - 1 = { - trigger = { - culture = { has_cultural_parameter = unlock_maa_ayrudzi } - } - save_scope_value_as = { - name = maa_to_create - value = flag:ayrudzi - } - } - 1 = { - trigger = { - mpo_can_recruit_nomad_maa_trigger = yes - } - save_scope_value_as = { - name = maa_to_create - value = flag:steppe_raiders - } - } - 1 = { - trigger = { - culture = { has_cultural_parameter = unlock_maa_conrois } - } - save_scope_value_as = { - name = maa_to_create - value = flag:conrois - } - } - 1 = { - trigger = { - culture = { has_cultural_parameter = unlock_maa_akritai } - } - save_scope_value_as = { - name = maa_to_create - value = flag:akritai - } - } - 1 = { - trigger = { - culture = { has_cultural_parameter = unlock_maa_ballistrai } - } - save_scope_value_as = { - name = maa_to_create - value = flag:ballistrai - } - } - 1 = { - trigger = { - culture = { has_cultural_parameter = unlock_maa_skoutatoi } - } - save_scope_value_as = { - name = maa_to_create - value = flag:skoutatoi - } - } - 1 = { - trigger = { - exists = scope:title - scope:title = title:e_byzantium - } - save_scope_value_as = { - name = maa_to_create - value = flag:varangian_guards - } - } - 1 = { - trigger = { - domicile ?= { has_domicile_parameter = camp_unlocks_handpicked_faithful_maa_type } - } - save_scope_value_as = { - name = maa_to_create - value = flag:handpicked_faithful - } - } - } - } - #in case you don't fullfil any criteria just pick a random default maa - if = { - limit = { - NOT = { exists = scope:maa_to_create } - } - random_list = { - 1 = { - save_scope_value_as = { - name = maa_to_create - value = flag:light_footmen - } - } - 1 = { - save_scope_value_as = { - name = maa_to_create - value = flag:bowmen - } - } - 1 = { - save_scope_value_as = { - name = maa_to_create - value = flag:light_horsemen - } - } - 1 = { - save_scope_value_as = { - name = maa_to_create - value = flag:pikemen_unit - } - } - } - } -} - -# creates the maa type for OWNER of SIZE set by the above -ep3_create_random_maa_regiment_effect = { - $OWNER$ = { - switch = { - trigger = scope:maa_to_create - flag:light_footmen = { - create_maa_or_upgrade_regiment_effect = { - TYPE = light_footmen - SIZE = $SIZE$ - } - } - flag:bowmen = { - create_maa_or_upgrade_regiment_effect = { - TYPE = bowmen - SIZE = $SIZE$ - } - } - flag:light_horsemen = { - create_maa_or_upgrade_regiment_effect = { - TYPE = light_horsemen - SIZE = $SIZE$ - } - } - flag:pikemen_unit = { - create_maa_or_upgrade_regiment_effect = { - TYPE = pikemen_unit - SIZE = $SIZE$ - } - } - flag:war_elephant = { - create_maa_or_upgrade_regiment_effect = { - TYPE = war_elephant - SIZE = $SIZE$ - } - } - flag:camel_rider = { - create_maa_or_upgrade_regiment_effect = { - TYPE = camel_rider - SIZE = $SIZE$ - } - } - flag:armored_horsemen = { - create_maa_or_upgrade_regiment_effect = { - TYPE = armored_horsemen - SIZE = $SIZE$ - } - } - flag:onager = { - create_maa_or_upgrade_regiment_effect = { - TYPE = onager - SIZE = $SIZE$ - } - } - flag:armored_footmen = { - create_maa_or_upgrade_regiment_effect = { - TYPE = armored_footmen - SIZE = $SIZE$ - } - } - flag:mangonel = { - create_maa_or_upgrade_regiment_effect = { - TYPE = mangonel - SIZE = $SIZE$ - } - } - flag:trebuchet = { - create_maa_or_upgrade_regiment_effect = { - TYPE = trebuchet - SIZE = $SIZE$ - } - } - flag:crossbowmen = { - create_maa_or_upgrade_regiment_effect = { - TYPE = crossbowmen - SIZE = $SIZE$ - } - } - flag:bombard = { - create_maa_or_upgrade_regiment_effect = { - TYPE = bombard - SIZE = $SIZE$ - } - } - flag:paiks = { - create_maa_or_upgrade_regiment_effect = { - TYPE = paiks - SIZE = $SIZE$ - } - } - flag:landsknecht = { - create_maa_or_upgrade_regiment_effect = { - TYPE = landsknecht - SIZE = $SIZE$ - } - } - flag:goedendag = { - create_maa_or_upgrade_regiment_effect = { - TYPE = goedendag - SIZE = $SIZE$ - } - } - flag:gendarme = { - create_maa_or_upgrade_regiment_effect = { - TYPE = gendarme - SIZE = $SIZE$ - } - } - flag:picchieri = { - create_maa_or_upgrade_regiment_effect = { - TYPE = picchieri - SIZE = $SIZE$ - } - } - flag:praetorian = { - create_maa_or_upgrade_regiment_effect = { - TYPE = praetorian - SIZE = $SIZE$ - } - } - flag:chasseur = { - create_maa_or_upgrade_regiment_effect = { - TYPE = chasseur - SIZE = $SIZE$ - } - } - flag:caballero = { - create_maa_or_upgrade_regiment_effect = { - TYPE = caballero - SIZE = $SIZE$ - } - } - flag:hobelar = { - create_maa_or_upgrade_regiment_effect = { - TYPE = hobelar - SIZE = $SIZE$ - } - } - flag:schiltron = { - create_maa_or_upgrade_regiment_effect = { - TYPE = schiltron - SIZE = $SIZE$ - } - } - flag:sahel_horsemen = { - create_maa_or_upgrade_regiment_effect = { - TYPE = sahel_horsemen - SIZE = $SIZE$ - } - } - flag:sarawit = { - create_maa_or_upgrade_regiment_effect = { - TYPE = sarawit - SIZE = $SIZE$ - } - } - flag:shenbigong = { - create_maa_or_upgrade_regiment_effect = { - TYPE = shenbigong - SIZE = $SIZE$ - } - } - flag:guanch_vaulter = { - create_maa_or_upgrade_regiment_effect = { - TYPE = guanch_vaulter - SIZE = $SIZE$ - } - } - flag:huscarl = { - create_maa_or_upgrade_regiment_effect = { - TYPE = huscarl - SIZE = $SIZE$ - } - } - flag:longbowmen = { - create_maa_or_upgrade_regiment_effect = { - TYPE = longbowmen - SIZE = $SIZE$ - } - } - flag:monaspa = { - create_maa_or_upgrade_regiment_effect = { - TYPE = monaspa - SIZE = $SIZE$ - } - } - flag:cataphract = { - create_maa_or_upgrade_regiment_effect = { - TYPE = cataphract - SIZE = $SIZE$ - } - } - flag:metsanvartija = { - create_maa_or_upgrade_regiment_effect = { - TYPE = metsanvartija - SIZE = $SIZE$ - } - } - flag:maturkan_warriors = { - create_maa_or_upgrade_regiment_effect = { - TYPE = maturkan_warriors - SIZE = $SIZE$ - } - } - flag:horse_archers = { - create_maa_or_upgrade_regiment_effect = { - TYPE = horse_archers - SIZE = $SIZE$ - } - } - flag:ayyar = { - create_maa_or_upgrade_regiment_effect = { - TYPE = ayyar - SIZE = $SIZE$ - } - } - flag:mubarizun = { - create_maa_or_upgrade_regiment_effect = { - TYPE = mubarizun - SIZE = $SIZE$ - } - } - flag:mulaththamun = { - create_maa_or_upgrade_regiment_effect = { - TYPE = mulaththamun - SIZE = $SIZE$ - } - } - flag:archers_of_the_nile = { - create_maa_or_upgrade_regiment_effect = { - TYPE = archers_of_the_nile - SIZE = $SIZE$ - } - } - flag:druzhina = { - create_maa_or_upgrade_regiment_effect = { - TYPE = druzhina - SIZE = $SIZE$ - } - } - flag:hussar = { - create_maa_or_upgrade_regiment_effect = { - TYPE = hussar - SIZE = $SIZE$ - } - } - flag:horn_warrior = { - create_maa_or_upgrade_regiment_effect = { - TYPE = horn_warrior - SIZE = $SIZE$ - } - } - flag:bush_hunter = { - create_maa_or_upgrade_regiment_effect = { - TYPE = bush_hunter - SIZE = $SIZE$ - } - } - flag:shomer = { - create_maa_or_upgrade_regiment_effect = { - TYPE = shomer - SIZE = $SIZE$ - } - } - flag:garudas = { - create_maa_or_upgrade_regiment_effect = { - TYPE = garudas - SIZE = $SIZE$ - } - } - flag:khandayat = { - create_maa_or_upgrade_regiment_effect = { - TYPE = khandayat - SIZE = $SIZE$ - } - } - flag:mountaineer = { - create_maa_or_upgrade_regiment_effect = { - TYPE = mountaineer - SIZE = $SIZE$ - } - } - flag:guinea_warrior = { - create_maa_or_upgrade_regiment_effect = { - TYPE = guinea_warrior - SIZE = $SIZE$ - } - } - flag:abudrar = { - create_maa_or_upgrade_regiment_effect = { - TYPE = abudrar - SIZE = $SIZE$ - } - } - flag:zbrojnosh = { - create_maa_or_upgrade_regiment_effect = { - TYPE = zbrojnosh - SIZE = $SIZE$ - } - } - flag:palace_guards = { - create_maa_or_upgrade_regiment_effect = { - TYPE = palace_guards - SIZE = $SIZE$ - } - } - flag:asawira = { - create_maa_or_upgrade_regiment_effect = { - TYPE = asawira - SIZE = $SIZE$ - } - } - flag:tarkhan = { - create_maa_or_upgrade_regiment_effect = { - TYPE = tarkhan - SIZE = $SIZE$ - } - } - flag:zupin_warrior = { - create_maa_or_upgrade_regiment_effect = { - TYPE = zupin_warrior - SIZE = $SIZE$ - } - } - flag:tawashi = { - create_maa_or_upgrade_regiment_effect = { - TYPE = tawashi - SIZE = $SIZE$ - } - } - flag:house_guard = { - create_maa_or_upgrade_regiment_effect = { - TYPE = house_guard - SIZE = $SIZE$ - } - } - flag:accolade_maa_archers = { - create_maa_or_upgrade_regiment_effect = { - TYPE = accolade_maa_archers - SIZE = $SIZE$ - } - } - flag:accolade_maa_skirmishers = { - create_maa_or_upgrade_regiment_effect = { - TYPE = accolade_maa_skirmishers - SIZE = $SIZE$ - } - } - flag:accolade_maa_pikes = { - create_maa_or_upgrade_regiment_effect = { - TYPE = accolade_maa_pikes - SIZE = $SIZE$ - } - } - flag:accolade_maa_outriders = { - create_maa_or_upgrade_regiment_effect = { - TYPE = accolade_maa_outriders - SIZE = $SIZE$ - } - } - flag:accolade_maa_vanguards = { - create_maa_or_upgrade_regiment_effect = { - TYPE = accolade_maa_vanguards - SIZE = $SIZE$ - } - } - flag:accolade_maa_lancers = { - create_maa_or_upgrade_regiment_effect = { - TYPE = accolade_maa_lancers - SIZE = $SIZE$ - } - } - flag:accolade_maa_crossbowers = { - create_maa_or_upgrade_regiment_effect = { - TYPE = accolade_maa_crossbowers - SIZE = $SIZE$ - } - } - flag:accolade_maa_cameliers = { - create_maa_or_upgrade_regiment_effect = { - TYPE = accolade_maa_cameliers - SIZE = $SIZE$ - } - } - flag:accolade_maa_elephantiers = { - create_maa_or_upgrade_regiment_effect = { - TYPE = accolade_maa_elephantiers - SIZE = $SIZE$ - } - } - flag:accolade_maa_horse_archers = { - create_maa_or_upgrade_regiment_effect = { - TYPE = accolade_maa_horse_archers - SIZE = $SIZE$ - } - } - flag:vigmen = { - create_maa_or_upgrade_regiment_effect = { - TYPE = vigmen - SIZE = $SIZE$ - } - } - flag:bondi = { - create_maa_or_upgrade_regiment_effect = { - TYPE = bondi - SIZE = $SIZE$ - } - } - flag:varangian_veterans = { - create_maa_or_upgrade_regiment_effect = { - TYPE = varangian_veterans - SIZE = $SIZE$ - } - } - flag:ayrudzi = { - create_maa_or_upgrade_regiment_effect = { - TYPE = ayrudzi - SIZE = $SIZE$ - } - } - flag:steppe_raiders = { - create_maa_or_upgrade_regiment_effect = { - TYPE = steppe_raiders - SIZE = $SIZE$ - } - } - flag:conrois = { - create_maa_or_upgrade_regiment_effect = { - TYPE = conrois - SIZE = $SIZE$ - } - } - flag:akritai = { - create_maa_or_upgrade_regiment_effect = { - TYPE = akritai - SIZE = $SIZE$ - } - } - flag:ballistrai = { - create_maa_or_upgrade_regiment_effect = { - TYPE = ballistrai - SIZE = $SIZE$ - } - } - flag:skoutatoi = { - create_maa_or_upgrade_regiment_effect = { - TYPE = skoutatoi - SIZE = $SIZE$ - } - } - flag:varangian_guards = { - create_maa_or_upgrade_regiment_effect = { - TYPE = varangian_guards - SIZE = $SIZE$ - } - } - flag:handpicked_faithful = { - create_maa_or_upgrade_regiment_effect = { - TYPE = handpicked_faithful - SIZE = $SIZE$ - } - } - } - } -} - -create_maa_or_upgrade_regiment_effect = { - if = { - limit = { - any_maa_regiment = { - is_maa_type = $TYPE$ - can_upgrade_maa = yes - } - } - random_maa_regiment = { - limit = { - is_maa_type = $TYPE$ - can_upgrade_maa = yes - } - change_maa_regiment_size = $SIZE$ - } - } - else = { - create_maa_regiment = { - type = $TYPE$ - check_can_recruit = no - size = $SIZE$ - } - } -} - -ep3_missionary_effect = { - # Same religion or unreformed or Hasan, convert to the preacher's faith - if = { - limit = { - OR = { - $LOCATION$.religion = $PREACHER$.religion - $LOCATION$.faith = { has_doctrine_parameter = unreformed } - character:41702 ?= $PREACHER$ - } - } - $LOCATION$ = { - set_county_faith = $PREACHER$.faith - } - } - # Preacher is Gnostic, convert the locals to a regionally appropriate form of Gnosticism - else_if = { - limit = { - $PREACHER$.faith = { - OR = { - has_doctrine = tenet_gnosticism - has_doctrine = special_doctrine_is_gnostic_faith - } - } - $LOCATION$.religion = { - any_faith = { - has_doctrine = tenet_gnosticism - } - } - } - $LOCATION$ = { - religion = { - random_faith = { - limit = { - OR = { - has_doctrine = tenet_gnosticism - has_doctrine = special_doctrine_is_gnostic_faith - } - } - $LOCATION$ = { set_county_faith = prev } - } - } - } - } - # Otherwise, reduce popular opinion - else = { - $LOCATION$ = { - add_county_modifier = { - modifier = ep3_religious_doubts - years = 15 - } - } - } -} -ep3_hasan_missionary_effect = { - ep3_hasan_advance_radicalism = yes - ep3_missionary_effect = { - PREACHER = $PREACHER$ - LOCATION = $LOCATION$ - } -} -ep3_hasan_advance_radicalism = { - if = { - limit = { - any_owned_story = { - type = story_hasan - } - } - custom_tooltip = { - text = advance_to_the_assassins_tt - random_owned_story = { - type = story_hasan - if = { - limit = { - exists = var:radical_points - } - change_variable = { - name = radical_points - add = 1 - } - } - else = { - set_variable = { - name = radical_points - value = 1 - } - } - } - } - } -} -hasan_sabbah_ignite_decision_effect = { - if = { - limit = { - hasan_sabbah_event_troops_value <= 1000 - } - spawn_army = { - name = hasan_fanatics - men_at_arms = { - type = asawira - stacks = 1 - } - levies = hasan_sabbah_event_troops_value - inheritable = yes - location = root.domicile.domicile_location - war_keep_on_attacker_victory = yes - } - spawn_army = { - name = hasan_fanatics - men_at_arms = { - type = asawira - stacks = 1 - } - levies = hasan_sabbah_event_troops_value - inheritable = yes - location = root.domicile.domicile_location - war_keep_on_attacker_victory = yes - } - spawn_army = { - name = hasan_fanatics - men_at_arms = { - type = ayyar - stacks = 1 - } - levies = hasan_sabbah_event_troops_value - inheritable = yes - location = root.domicile.domicile_location - war_keep_on_attacker_victory = yes - } - spawn_army = { - name = hasan_fanatics - men_at_arms = { - type = ayyar - stacks = 1 - } - levies = hasan_sabbah_event_troops_value - inheritable = yes - location = root.domicile.domicile_location - war_keep_on_attacker_victory = yes - } - spawn_army = { - name = hasan_fanatics - men_at_arms = { - type = ayyar - stacks = 1 - } - levies = hasan_sabbah_event_troops_value - inheritable = yes - location = root.domicile.domicile_location - war_keep_on_attacker_victory = yes - } - } - else_if = { - limit = { - hasan_sabbah_event_troops_value <= 2000 - } - spawn_army = { - name = hasan_fanatics - men_at_arms = { - type = asawira - stacks = 1 - } - men_at_arms = { - type = ayyar - stacks = 1 - } - levies = hasan_sabbah_event_troops_value - inheritable = yes - location = root.domicile.domicile_location - war_keep_on_attacker_victory = yes - } - spawn_army = { - name = hasan_fanatics - men_at_arms = { - type = asawira - stacks = 1 - } - men_at_arms = { - type = ayyar - stacks = 1 - } - levies = hasan_sabbah_event_troops_value - inheritable = yes - location = root.domicile.domicile_location - war_keep_on_attacker_victory = yes - } - spawn_army = { - name = hasan_fanatics - men_at_arms = { - type = asawira - stacks = 1 - } - men_at_arms = { - type = ayyar - stacks = 1 - } - levies = hasan_sabbah_event_troops_value - inheritable = yes - location = root.domicile.domicile_location - war_keep_on_attacker_victory = yes - } - spawn_army = { - name = hasan_fanatics - men_at_arms = { - type = asawira - stacks = 1 - } - men_at_arms = { - type = ayyar - stacks = 1 - } - levies = hasan_sabbah_event_troops_value - inheritable = yes - location = root.domicile.domicile_location - war_keep_on_attacker_victory = yes - } - spawn_army = { - name = hasan_fanatics - men_at_arms = { - type = ayyar - stacks = 2 - } - levies = hasan_sabbah_event_troops_value - inheritable = yes - location = root.domicile.domicile_location - war_keep_on_attacker_victory = yes - } - } - else_if = { - limit = { - hasan_sabbah_event_troops_value <= 3000 - } - spawn_army = { - name = hasan_fanatics - men_at_arms = { - type = asawira - stacks = 1 - } - men_at_arms = { - type = ayyar - stacks = 2 - } - levies = hasan_sabbah_event_troops_value - inheritable = yes - location = root.domicile.domicile_location - war_keep_on_attacker_victory = yes - } - spawn_army = { - name = hasan_fanatics - men_at_arms = { - type = asawira - stacks = 1 - } - men_at_arms = { - type = ayyar - stacks = 2 - } - levies = hasan_sabbah_event_troops_value - inheritable = yes - location = root.domicile.domicile_location - war_keep_on_attacker_victory = yes - } - spawn_army = { - name = hasan_fanatics - men_at_arms = { - type = asawira - stacks = 1 - } - men_at_arms = { - type = ayyar - stacks = 2 - } - levies = hasan_sabbah_event_troops_value - inheritable = yes - location = root.domicile.domicile_location - war_keep_on_attacker_victory = yes - } - spawn_army = { - name = hasan_fanatics - men_at_arms = { - type = asawira - stacks = 1 - } - men_at_arms = { - type = ayyar - stacks = 2 - } - levies = hasan_sabbah_event_troops_value - inheritable = yes - location = root.domicile.domicile_location - war_keep_on_attacker_victory = yes - } - spawn_army = { - name = hasan_fanatics - men_at_arms = { - type = asawira - stacks = 1 - } - men_at_arms = { - type = ayyar - stacks = 2 - } - levies = hasan_sabbah_event_troops_value - inheritable = yes - location = root.domicile.domicile_location - war_keep_on_attacker_victory = yes - } - } - else_if = { - limit = { - hasan_sabbah_event_troops_value > 3000 - } - spawn_army = { - name = hasan_fanatics - men_at_arms = { - type = asawira - stacks = 2 - } - men_at_arms = { - type = ayyar - stacks = 2 - } - levies = hasan_sabbah_event_troops_value - inheritable = yes - location = root.domicile.domicile_location - war_keep_on_attacker_victory = yes - } - spawn_army = { - name = hasan_fanatics - men_at_arms = { - type = asawira - stacks = 2 - } - men_at_arms = { - type = ayyar - stacks = 2 - } - levies = hasan_sabbah_event_troops_value - inheritable = yes - location = root.domicile.domicile_location - war_keep_on_attacker_victory = yes - } - spawn_army = { - name = hasan_fanatics - men_at_arms = { - type = asawira - stacks = 2 - } - men_at_arms = { - type = ayyar - stacks = 2 - } - levies = hasan_sabbah_event_troops_value - inheritable = yes - location = root.domicile.domicile_location - war_keep_on_attacker_victory = yes - } - spawn_army = { - name = hasan_fanatics - men_at_arms = { - type = asawira - stacks = 2 - } - men_at_arms = { - type = ayyar - stacks = 2 - } - levies = hasan_sabbah_event_troops_value - inheritable = yes - location = root.domicile.domicile_location - war_keep_on_attacker_victory = yes - } - spawn_army = { - name = hasan_fanatics - men_at_arms = { - type = asawira - stacks = 2 - } - men_at_arms = { - type = ayyar - stacks = 2 - } - levies = hasan_sabbah_event_troops_value - inheritable = yes - location = root.domicile.domicile_location - war_keep_on_attacker_victory = yes - } - } - start_war = { - cb = ep3_hasan_assassin_war - target = root.location.county.holder.top_liege - target_title = root.location.county.holder.top_liege.primary_title - } -} -hasan_sabbah_end_war = { - # Offer Hasan the opportunity to become landed - hidden_effect = { - if = { - limit = { - $SELJUK$ = { - any_sub_realm_barony = { - title_province = { has_building_or_higher = alamut_castle_01 } - } - } - } - $SELJUK$ = { - random_sub_realm_barony = { - limit = { - title_province = { has_building_or_higher = alamut_castle_01 } - } - county = { - save_scope_as = hasan_home - } - } - } - } - else_if = { - limit = { - $SELJUK$ = { - any_sub_realm_county = { - faith = $HASAN$.faith - holder = { is_ai = yes } - } - } - } - $SELJUK$ = { - random_sub_realm_county = { - limit = { - faith = $HASAN$.faith - holder = { is_ai = yes } - } - save_scope_as = hasan_home - } - } - } - else = { - $SELJUK$ = { - random_sub_realm_county = { - limit = { - holder = { is_ai = yes } - } - save_scope_as = hasan_home - } - } - } - $HASAN$ = { - if = { - limit = { - any_owned_story = { - type = story_hasan - exists = var:preferred_caliph - } - } - random_owned_story = { - type = story_hasan - var:preferred_caliph = { save_scope_as = caliph } - } - } - trigger_event = { - id = hasan_sabbah.1050 - } - if = { - limit = { - is_ai = no - } - add_achievement_global_variable_effect = { - VARIABLE = finished_the_old_man_of_the_mountain_achievement - VALUE = yes - } - } - } - } - create_title_and_vassal_change = { - type = independency - save_scope_as = change - } - $HASAN$ = { - add_prestige = medium_prestige_value - } - $SELJUK$ = { - add_prestige = { - value = medium_prestige_value - multiply = -1 - } - - every_vassal = { - limit = { - highest_held_title_tier > tier_barony - } - change_liege_or_become_independent = { - CHANGE = scope:change - VASSAL = this - } - } - - every_vassal = { - limit = { is_ai = no } - send_interface_toast = { - type = msg_gained_independence - title = liege_primary_title_dissolution - desc = liege_primary_title_dissolution_desc - left_icon = $SELJUK$ - } - } - } - resolve_title_and_vassal_change = scope:change - $SELJUK$ = { - every_held_title = { - limit = { - tier >= tier_duchy - is_head_of_faith = no - NOT = { this = $SELJUK$.capital_county.duchy } - } - add_to_temporary_list = titles_to_destroy - } - } - every_in_list = { - list = titles_to_destroy - $HASAN$ = { - destroy_title = prev - } - } - $SELJUK$ = { - if = { - limit = { - government_has_flag = government_is_administrative - } - admin_government_reset_effect = yes - } - } - # LEGITIMACY FROM LOSING FACTION WAR - faction_war_end_defeat_legitimacy_effect = yes - # End Hasan's story cycle - hidden_effect = { - $HASAN$ = { - if = { - limit = { - any_owned_story = { - type = story_hasan - } - } - random_owned_story = { - type = story_hasan - end_story = yes - } - } - } - } -} - -reinforce_soldiers_regiment_effect = { - save_scope_as = laamp_temp - # For the value. - save_temporary_scope_as = actor - custom_tooltip = { - text = reinforce_soldiers_effect_tt - every_maa_regiment = { - limit = { maa_regiments_valid_for_cheap_reinforcement_trigger = yes } - change_maa_troops_count = reinforce_soldiers_regiment_soldiers_value - } - } -} - -refill_maa_with_provisions_effect = { - save_scope_as = laamp_temp - while = { - limit = { - scope:actor.domicile.provisions > 0 - any_maa_regiment = { - maa_regiments_valid_to_refill_trigger = yes - } - } - random_maa_regiment = { - limit = { - maa_regiments_valid_to_refill_trigger = yes - } - save_scope_as = maa_scope - save_scope_value_as = { - name = current_provisions_max_value_scope - value = scope:actor.domicile.provisions - } - scope:actor.domicile ?= { - change_provisions = { - value = { - add = scope:maa_scope.replenishable_troops_value - divide = provision_refill_value - max = scope:current_provisions_max_value_scope - multiply = -1 - } - } - } - change_maa_troops_count = replenishable_troops_with_provisions_value - } - } -} - -refill_maa_with_gold_effect = { - save_scope_as = laamp_temp - while = { - limit = { - scope:actor.gold > 0 - any_maa_regiment = { - maa_regiments_valid_to_refill_trigger = yes - } - } - random_maa_regiment = { - limit = { - maa_regiments_valid_to_refill_trigger = yes - } - save_scope_as = maa_scope - save_scope_value_as = { - name = current_gold_max_value_scope - value = scope:actor.gold - } - scope:actor = { - remove_short_term_gold = { - add = scope:maa_scope.replenishable_troops_value - divide = gold_refill_value - max = scope:current_gold_max_value_scope - } - } - change_maa_troops_count = replenishable_troops_with_gold_value - } - } -} - -admin_government_reset_effect = { - if = { - limit = { is_landed = yes } # error suppression - ### NOMADIC - if = { - limit = { - OR = { - government_has_flag = government_is_nomadic - capital_province = { - OR = { - has_holding_type = nomad_holding - has_holding_type = herder_holding - } - } - } - } - change_government = nomad_government - } - ### TRIBAL - are all of your holdings Tribal? - if = { - limit = { - NOT = { - any_held_title = { - trigger_if = { - limit = { tier <= tier_county } - title_province ?= { - NOT = { has_holding_type = tribal_holding } - } - } - trigger_else = { - title_capital_county.title_province ?= { - NOT = { has_holding_type = tribal_holding } - } - } - } - } - } - change_government = tribal_government - } - ### CLAN - are you a Muslim or from a Clan culture? - else_if = { - limit = { - OR = { - faith = { religion_tag = islam_religion } - culture = { - OR = { - has_cultural_pillar = heritage_arabic - has_cultural_pillar = heritage_iranian - has_cultural_pillar = heritage_turkic - } - } - } - } - change_government = clan_government - } - ### FEUDAL - fallback playable case - else = { change_government = feudal_government } - } -} - -create_basic_peasant_effect = { - create_character = { - template = peasant_character - location = root.location - dynasty = none - culture = root.location.culture - faith = root.location.faith - gender_female_chance = 50 - after_creation = { - set_to_lowborn = yes - } - save_scope_as = peasant - } -} - -fire_governor_long_war_response_events = { - if = { - limit = { - scope:defender = { - government_has_flag = government_is_administrative - top_liege = this - any_vassal = { - is_governor = yes - NOR = { - this = scope:attacker - is_allied_to = scope:attacker - } - } - } - } - scope:defender = { - random_vassal = { - limit = { - is_governor = yes - NOR = { - this = scope:attacker - is_allied_to = scope:attacker - } - } - save_scope_as = def_governor_1 - trigger_event = { - id = ep3_governor_yearly.3010 - months = 24 - } - } - } - scope:defender = { - random_vassal = { - limit = { - is_governor = yes - NOR = { - this = scope:attacker - is_allied_to = scope:attacker - this = scope:def_governor_1 - } - } - save_scope_as = def_governor_2 - trigger_event = { - id = ep3_governor_yearly.3010 - months = 28 - } - } - } - scope:defender = { - random_vassal = { - limit = { - is_governor = yes - NOR = { - this = scope:attacker - is_allied_to = scope:attacker - this = scope:def_governor_1 - this = scope:def_governor_2 - } - } - save_scope_as = def_governor_3 - trigger_event = { - id = ep3_governor_yearly.3010 - months = 32 - } - } - } - scope:defender = { - random_vassal = { - limit = { - is_governor = yes - NOR = { - this = scope:attacker - is_allied_to = scope:attacker - this = scope:def_governor_1 - this = scope:def_governor_2 - this = scope:def_governor_3 - } - } - save_scope_as = def_governor_4 - trigger_event = { - id = ep3_governor_yearly.3010 - months = 36 - } - } - } - scope:defender = { - random_vassal = { - limit = { - is_governor = yes - NOR = { - this = scope:attacker - is_allied_to = scope:attacker - this = scope:def_governor_1 - this = scope:def_governor_2 - this = scope:def_governor_3 - this = scope:def_governor_4 - } - } - save_scope_as = def_governor_5 - trigger_event = { - id = ep3_governor_yearly.3010 - months = 42 - } - } - } - scope:defender = { - random_vassal = { - limit = { - is_governor = yes - NOR = { - this = scope:attacker - is_allied_to = scope:attacker - this = scope:def_governor_1 - this = scope:def_governor_2 - this = scope:def_governor_3 - this = scope:def_governor_4 - this = scope:def_governor_5 - } - } - save_scope_as = def_governor_6 - trigger_event = { - id = ep3_governor_yearly.3010 - months = 54 - } - } - } - } - if = { - limit = { - scope:attacker = { - government_has_flag = government_is_administrative - top_liege = this - any_vassal = { - is_governor = yes - NOR = { - this = scope:defender - is_allied_to = scope:defender - } - } - } - } - scope:attacker = { - random_vassal = { - limit = { - is_governor = yes - NOR = { - this = scope:defender - is_allied_to = scope:defender - } - } - save_scope_as = att_governor_1 - trigger_event = { - id = ep3_governor_yearly.3010 - months = 24 - } - } - } - scope:attacker = { - random_vassal = { - limit = { - is_governor = yes - NOR = { - this = scope:defender - is_allied_to = scope:defender - this = scope:att_governor_1 - } - } - save_scope_as = att_governor_2 - trigger_event = { - id = ep3_governor_yearly.3010 - months = 28 - } - } - } - scope:attacker = { - random_vassal = { - limit = { - is_governor = yes - NOR = { - this = scope:defender - is_allied_to = scope:defender - this = scope:att_governor_1 - this = scope:att_governor_2 - } - } - save_scope_as = att_governor_3 - trigger_event = { - id = ep3_governor_yearly.3010 - months = 32 - } - } - } - scope:attacker = { - random_vassal = { - limit = { - is_governor = yes - NOR = { - this = scope:defender - is_allied_to = scope:defender - this = scope:att_governor_1 - this = scope:att_governor_2 - this = scope:att_governor_3 - } - } - save_scope_as = att_governor_4 - trigger_event = { - id = ep3_governor_yearly.3010 - months = 36 - } - } - } - scope:attacker = { - random_vassal = { - limit = { - is_governor = yes - NOR = { - this = scope:defender - is_allied_to = scope:defender - this = scope:att_governor_1 - this = scope:att_governor_2 - this = scope:att_governor_3 - this = scope:att_governor_4 - } - } - save_scope_as = att_governor_5 - trigger_event = { - id = ep3_governor_yearly.3010 - months = 42 - } - } - } - scope:attacker = { - random_vassal = { - limit = { - is_governor = yes - NOR = { - this = scope:defender - is_allied_to = scope:defender - this = scope:att_governor_1 - this = scope:att_governor_2 - this = scope:att_governor_3 - this = scope:att_governor_4 - this = scope:att_governor_5 - } - } - save_scope_as = att_governor_6 - trigger_event = { - id = ep3_governor_yearly.3010 - months = 54 - } - } - } - } -} - -ep3_governor_yearly_3010_war_aid_effect = { - if = { - limit = { - scope:emperor = { - is_defender_in_war = scope:war - } - } - scope:war = { - add_defender = scope:governor - } - } - else = { - scope:war = { - add_attacker = scope:governor - } - - } - if = { - limit = { - root = scope:emperor - } - hidden_effect = { - reverse_add_opinion = { - target = scope:emperor - opinion = 20 - modifier = grateful_opinion - } - } - } - else = { - reverse_add_opinion = { - target = scope:emperor - opinion = 20 - modifier = grateful_opinion - } - } - pay_short_term_gold = { - target = scope:emperor - gold = medium_gold_value - } - if = { - limit = { - can_add_hook = { - target = scope:emperor - type = favor_hook - } - } - add_hook = { - target = scope:emperor - type = favor_hook - } - } - else = { - change_influence = major_influence_gain - } -} -ep3_admin_war_aftermath_effect = { - scope:war = { - if = { - limit = { - any_war_participant = { - is_landed = yes - government_has_flag = government_is_administrative - } - } - every_war_participant = { - limit = { - is_landed = yes - government_has_flag = government_is_administrative - } - primary_title = { - set_variable = { - name = admin_war_aftermath_var - years = 5 - } - } - } - } - } -} - -state_faith_conversion_add_piety_effect = { - if = { - limit = { - scope:actor = { - top_liege = { government_allows = state_faith } - faith = top_liege.primary_title.state_faith - } - scope:recipient.top_liege = { government_allows = state_faith } - } - scope:actor = { - add_piety = medium_piety_gain - } - } -} - -state_faith_refuse_conversion_add_piety_effect = { - if = { - limit = { - scope:actor.top_liege = { government_allows = state_faith } - scope:recipient = { - top_liege = { government_allows = state_faith } - faith = top_liege.primary_title.state_faith - } - } - scope:recipient = { add_piety = medium_piety_gain } - } -} - -# EP3 Laamp possibility warning -ep3_war_loss_adventurer_tt_effect = { - save_scope_as = war_loser - if = { - limit = { - has_ep3_dlc_trigger = yes - NOT = { - any_held_title = { - OR = { - is_landless_type_title = yes - is_noble_family_title = yes - } - } - } - trigger_if = { - limit = { any_in_list = { list = target_titles } } - OR = { - # You are losing all your counties and have no vassals to steal from - AND = { - any_held_county = { - count = all - OR = { - is_in_list = target_titles - target_is_de_jure_liege_or_above = scope:war_loser.primary_title - } - } - any_vassal = { - count = 0 - highest_held_title_tier >= tier_county - } - } - # You are losing all your held titles - any_held_title = { - count = all - OR = { - is_in_list = target_titles - target_is_de_jure_liege_or_above = scope:war_loser.primary_title - } - } - } - } - } - custom_tooltip = laamp_may_become_adventurer_tt - } -} - -add_randomised_double_moon_modifier_effect = { - hidden_effect = { - scope:double_moon_book = { - random_list = { - 1 = { - add_artifact_modifier = artifact_prowess_2_modifier - set_artifact_description = double_moon_tome_desc_1 - } - 1 = { - add_artifact_modifier = artifact_knight_effectiveness_4_modifier - set_artifact_description = double_moon_tome_desc_2 - } - 1 = { - add_artifact_modifier = artifact_stewardship_1_modifier - set_artifact_description = double_moon_tome_desc_3 - } - 1 = { - add_artifact_modifier = artifact_diplomacy_1_modifier - set_artifact_description = double_moon_tome_desc_4 - } - 1 = { - add_artifact_modifier = artifact_health_gain_1_modifier - set_artifact_description = double_moon_tome_desc_5 - } - 1 = { - add_artifact_modifier = artifact_monthly_minor_prestige_3_modifier - set_artifact_description = double_moon_tome_desc_6 - } - 1 = { - add_artifact_modifier = artifact_monthly_prestige_3_modifier - set_artifact_description = double_moon_tome_desc_7 - } - 1 = { - add_artifact_modifier = artifact_dynasty_opinion_2_modifier - set_artifact_description = double_moon_tome_desc_8 - } - 1 = { - add_artifact_modifier = artifact_learn_language_scheme_phase_duration_add_2_modifier - set_artifact_description = double_moon_tome_desc_9 - } - 1 = { - add_artifact_modifier = artifact_diplomacy_per_prestige_level_modifier - set_artifact_description = double_moon_tome_desc_10 - } - 1 = { - add_artifact_modifier = artifact_mercenary_hire_cost_mult_2_modifier - set_artifact_description = double_moon_tome_desc_11 - } - 1 = { - add_artifact_modifier = artifact_general_opinion_1_modifier - set_artifact_description = double_moon_tome_desc_12 - } - 1 = { - add_artifact_modifier = artifact_independent_ruler_opinion_2_modifier - set_artifact_description = double_moon_tome_desc_13 - } - 1 = { - add_artifact_modifier = artifact_clergy_opinion_2_modifier - set_artifact_description = double_moon_tome_desc_14 - } - } - } - } -} - -random_rain_snow_chance_effect = { - random_list = { - 10 = { # Snow - trigger = { - location = { - OR = { - has_province_modifier = winter_mild_modifier - has_province_modifier = winter_normal_modifier - has_province_modifier = winter_harsh_modifier - } - } - } - save_scope_as = snow_day - } - 10 = { # Rain - trigger = { - location = { - NOR = { - has_province_modifier = winter_mild_modifier - has_province_modifier = winter_normal_modifier - has_province_modifier = winter_harsh_modifier - } - } - } - modifier = { - factor = 1.02 - location.county = { is_riverside_county = yes } - } - modifier = { - factor = 0.05 - location = { - OR = { - terrain = desert - terrain = drylands - terrain = desert_mountains - terrain = oasis - - } - } - } - save_scope_as = rain_day - } - 10 = {} # No rain - } -} - -governor_resignation_title_transfer_effect = { - save_scope_as = resigner - top_liege = { save_scope_as = emperor } - force_step_down_landed_titles = yes -} - -boost_governor_efficiency_success_effect = { - scope:actor = { - send_interface_toast = { - type = event_toast_effect_good - title = boost_efficiency_success_desc - left_icon = scope:recipient - - scope:recipient ?= { - send_interface_toast = { - type = event_toast_effect_good - title = boost_efficiency_success_desc - left_icon = scope:actor - if = { - limit = { has_character_modifier = ep3_damage_efficiency_modifier } - remove_character_modifier = ep3_damage_efficiency_modifier - if = { - limit = { var:ep3_governor_efficiency_stack = 1 } - remove_variable = ep3_governor_efficiency_stack - } - else = { - change_variable = { - name = ep3_governor_efficiency_stack - add = -1 - } - } - } - else = { - add_character_modifier = { - modifier = ep3_boost_efficiency_modifier - years = 10 - } - if = { - limit = { has_variable = ep3_governor_efficiency_stack } - set_variable = { - name = ep3_governor_efficiency_stack - value = { - value = scope:recipient.var:ep3_governor_efficiency_stack - add = 1 - max = 5 - } - years = 10 - } - } - else = { - set_variable = { - name = ep3_governor_efficiency_stack - value = 1 - years = 10 - } - } - } - if = { - limit = { - opinion = { - target = scope:actor - value >= 15 - } - } - scope:actor = { - progress_towards_friend_effect = { - REASON = friend_boosted_gov_efficiency - CHARACTER = scope:recipient - OPINION = default_friend_opinion - } - } - } - else_if = { - limit = { is_ai = yes } - add_opinion = { - target = scope:actor - modifier = boosted_efficiency_opinion - } - } - } - } - # Merit based realm gain some merit for improving others - if = { - limit = { - government_allows = merit - } - change_merit = medium_merit_gain - } - } - } -} - -boost_governor_efficiency_duel_effect = { - scope:actor = { - duel = { - skill = $SKILL$ - value = mediocre_skill_rating - 10 = { - compare_modifier = { - value = scope:duel_value - multiplier = 1.5 - min = -49 - } - min = 2 - desc = boost_efficiency_success_desc - send_interface_toast = { - type = event_toast_effect_good - title = boost_efficiency_success_desc - left_icon = scope:recipient - boost_governor_efficiency_success_effect = yes - } - } - 10 = { - compare_modifier = { - value = scope:duel_value - multiplier = -1.5 - min = -49 - } - min = 2 - desc = boost_efficiency_failure_desc - send_interface_toast = { - type = event_toast_text_bad - title = boost_efficiency_failure_desc - left_icon = scope:recipient - desc = NO_EFFECT - } - } - } - } -} - -damage_governor_efficiency_success_effect = { - scope:recipient ?= { - send_interface_toast = { - type = event_toast_effect_bad - title = damage_efficiency_success_desc - left_icon = scope:actor - if = { - limit = { has_character_modifier = ep3_boost_efficiency_modifier } - remove_character_modifier = ep3_boost_efficiency_modifier - if = { - limit = { var:ep3_governor_efficiency_stack = 1 } - remove_variable = ep3_governor_efficiency_stack - } - else = { - change_variable = { - name = ep3_governor_efficiency_stack - add = -1 - } - } - } - else = { - add_character_modifier = { - modifier = ep3_damage_efficiency_modifier - years = 10 - } - if = { - limit = { has_variable = ep3_governor_efficiency_stack } - set_variable = { - name = ep3_governor_efficiency_stack - value = { - value = scope:recipient.var:ep3_governor_efficiency_stack - add = 1 - max = 5 - } - years = 10 - } - } - else = { - set_variable = { - name = ep3_governor_efficiency_stack - value = 1 - years = 10 - } - } - } - if = { - limit = { is_ai = yes } - add_opinion = { - target = scope:actor - modifier = damaged_efficiency_opinion - } - } - } - } -} - -damage_governor_efficiency_duel_effect = { - scope:actor = { - duel = { - skill = $SKILL$ - value = mediocre_skill_rating - 10 = { - compare_modifier = { - value = scope:duel_value - multiplier = 1.5 - min = -49 - } - min = 2 - desc = damage_efficiency_success_desc - send_interface_toast = { - type = event_toast_effect_good - title = damage_efficiency_success_desc - left_icon = scope:recipient - damage_governor_efficiency_success_effect = yes - } - } - 10 = { - compare_modifier = { - value = scope:duel_value - multiplier = -1.5 - min = -49 - } - min = 2 - desc = damage_efficiency_failure_desc - send_interface_toast = { - type = event_toast_text_bad - title = damage_efficiency_success_desc - left_icon = scope:recipient - desc = NO_EFFECT - } - } - } - } -} - -# NF Adoption effect -noble_family_adoption_effect = { - $ADOPTEE$ = { - if = { - limit = { - exists = house.house_head - } - house.house_head = { #We do this first, otherwise house head will already mean someone else. - add_opinion = { - modifier = adopted_my_house_member_opinion - opinion = -25 - target = $ADOPTER$ - } - if = { - limit = { - has_hook_of_type = { - type = house_head_hook - target = $ADOPTEE$ - } - } - remove_hook = { - type = house_head_hook - target = $ADOPTEE$ - } - } - } - } - } - $ADOPTER$ = { - if = { - limit = { scope:gold = yes } - pay_short_term_gold = { - target = $ADOPTEE$ - gold = $ADOPTER$.minor_gold_value - } - } - if = { - limit = { scope:hook = yes } - use_hook = $ADOPTEE$ - } - $ADOPTEE$ = { set_house = $ADOPTER$.house } - # Zealous vassals *hate* you adopting a heretic - house = { - every_house_member = { - custom = every_zealot_house_member_tt - limit = { - ai_zeal >= medium_positive_ai_value - faith = { faith_hostility_level = { target = $ADOPTEE$.faith value >= faith_astray_level } } - NOT = { this = $ADOPTER$ } - } - add_opinion = { - modifier = adopted_new_house_member_opinion - opinion = -20 - target = $ADOPTER$ - } - } - every_house_member = { - custom = every_close_family_house_member_tt - limit = { - NOT = { this = $ADOPTER$ } - is_close_family_of = $ADOPTER$ - NAND = { - ai_zeal >= medium_positive_ai_value - faith = { faith_hostility_level = { target = $ADOPTEE$.faith value >= faith_astray_level } } - } - } - add_opinion = { - modifier = adopted_new_house_member_opinion - opinion = -10 - target = $ADOPTER$ - } - } - } - } - $ADOPTEE$ = { - #adopted should travel - if = { - limit = { exists = $ADOPTER$.capital_province } - $ADOPTER$.capital_province = { save_scope_as = destination_province } - } - else_if = { - limit = { exists = $ADOPTER$.host.capital_province } - $ADOPTER$.host.capital_province = { save_scope_as = destination_province } - } - else_if = { - limit = { exists = $ADOPTER$.domicile.domicile_location } - $ADOPTER$.domicile.domicile_location = { save_scope_as = destination_province } - } - else = { - $ADOPTER$.location = { save_scope_as = destination_province } - } - save_scope_as = adoptee - $ADOPTER$ = { save_scope_as = adopter } - if = { - limit = { - any_relation = { - type = guardian - NOT = { this = $ADOPTER$ } - } - } - random_relation = { - type = guardian - limit = { NOT = { this = $ADOPTER$ } } - save_scope_as = old_guardian - } - remove_guardian_effect = { - GUARDIAN = scope:old_guardian - WARD = scope:adoptee - RETURN_WARD = no - HIDE_OPINION = no - } - } - if = { - limit = { NOT = { scope:destination_province = $ADOPTEE$.location } } - set_variable = { - name = adoptee_travelling_to_adopter - years = 2 - value = scope:adopter - } - start_travel_plan = { - destination = scope:destination_province - on_start_on_action = on_adoptee_depart_for_adopter - on_travel_planner_cancel_on_action = on_adoptee_depart_travel_planner_exit - on_arrival_on_action = on_adoptee_arrive_at_adopter - on_arrival_destinations = last - return_trip = no # One way - } - custom_tooltip = adoptee_leaves_for_adopter_tt - } - else_if = { - limit = { - $ADOPTER$ = { - NOT = { is_in_the_same_court_as = $ADOPTEE$ } - } - } - $ADOPTER$ = { add_courtier = $ADOPTEE$ } - } - #No final else, in this situation they are already in the right location and the right court. - } -} - -# Create icon artifacts -## Court Artifact - Large -create_artifact_court_icon_large_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - $PAINTER$ = { save_scope_as = painter } - - hidden_effect_new_object = { - # Get artifact quality, wealth, and materials - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - # Create the artifact - scope:owner = { - if = { - limit = { - exists = scope:inspiration_owner - } - create_artifact = { - name = artifact_wall_court_icon_large_name - description = placeholder # Will be regenerated in the post-creation effects - creator = scope:painter - visuals = icon_court_large - type = wall_big - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - } - } - else_if = { - limit = { - exists = scope:adventurer - } - create_artifact = { - name = artifact_wall_court_icon_large_name - description = placeholder # Will be regenerated in the post-creation effects - creator = scope:adventurer - visuals = icon_court_large - type = wall_big - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - history = { - location = scope:location - actor = scope:adventurer - recipient = root - type = discovered - } - } - } - else = { - create_artifact = { - name = artifact_wall_court_icon_large_name - description = placeholder # Will be regenerated in the post-creation effects - creator = scope:painter - visuals = icon_court_large - type = wall_big - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - } - } - } - scope:newly_created_artifact = { - set_artifact_description = artifact_wall_court_icon_large_description - # Set piety - add_2_scaled_artifact_modifier_devotion_effect = yes - - if = { - limit = { - OR = { - rarity = famed - rarity = illustrious - } - } - add_scaled_artifact_modifier_dynasty_prestige_effect = yes - } - remove_artifact_modifier = artifact_placeholder_modifier - } - } -} - -## Court Artifact - Small -create_artifact_court_icon_small_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - $PAINTER$ = { save_scope_as = painter } - - hidden_effect_new_object = { - # Get artifact quality, wealth, and materials - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - # Create the artifact - scope:owner = { - if = { - limit = { - exists = scope:inspiration_owner - } - create_artifact = { - name = artifact_wall_court_icon_small_name - description = placeholder # Will be regenerated in the post-creation effects - creator = scope:painter - visuals = icon_court_small - type = wall_small - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - } - } - else_if = { - limit = { - exists = scope:adventurer - } - create_artifact = { - name = artifact_wall_court_icon_small_name - description = placeholder # Will be regenerated in the post-creation effects - creator = scope:adventurer - visuals = icon_court_small - type = wall_small - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - history = { - location = scope:location - actor = scope:adventurer - recipient = root - type = discovered - } - } - } - else = { - create_artifact = { - name = artifact_wall_court_icon_small_name - description = placeholder # Will be regenerated in the post-creation effects - creator = scope:painter - visuals = icon_court_small - type = wall_small - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - } - } - } - scope:newly_created_artifact = { - set_artifact_description = artifact_wall_court_icon_small_description - # Set piety - add_2_scaled_artifact_modifier_devotion_effect = yes - - if = { - limit = { - OR = { - rarity = famed - rarity = illustrious - } - } - add_scaled_artifact_modifier_dynasty_prestige_effect = yes - } - remove_artifact_modifier = artifact_placeholder_modifier - } - } -} - -## Trinket Artifact -create_artifact_trinket_icon_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - $PAINTER$ = { save_scope_as = painter } - - hidden_effect_new_object = { - # Get artifact quality, wealth, and materials - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - # Create the artifact - scope:owner = { - if = { - limit = { - exists = scope:inspiration_owner - } - create_artifact = { - name = artifact_trinket_icon_name - description = placeholder # Will be regenerated in the post-creation effects - creator = scope:painter - visuals = trinket_icon - type = miscellaneous - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - } - } - else_if = { - limit = { - exists = scope:adventurer - } - create_artifact = { - name = artifact_trinket_icon_name - description = placeholder # Will be regenerated in the post-creation effects - creator = scope:adventurer - visuals = icon_court_small - type = miscellaneous - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - history = { - location = scope:location - actor = scope:adventurer - recipient = root - type = discovered - } - } - } - else = { - create_artifact = { - name = artifact_trinket_icon_name - description = placeholder # Will be regenerated in the post-creation effects - creator = scope:painter - visuals = trinket_icon - type = miscellaneous - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - } - } - } - scope:newly_created_artifact = { - set_artifact_description = artifact_trinket_icon_description - # Set piety - add_scaled_artifact_modifier_piety_effect = yes - - if = { - limit = { - OR = { - rarity = famed - rarity = illustrious - } - } - add_scaled_artifact_modifier_learning_lifestyle_xp_effect = yes - } - remove_artifact_modifier = artifact_placeholder_modifier - } - } -} - -## Trinket Artifact -create_artifact_trinket_icon_ancient_effect = { - # Get the character the artifact is being made for. - $OWNER$ = { save_scope_as = owner } - - hidden_effect_new_object = { - # Get artifact quality, wealth, and materials - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - # Create the artifact - scope:owner = { - create_artifact = { - name = artifact_trinket_icon_name - description = placeholder # Will be regenerated in the post-creation effects - visuals = trinket_icon - type = miscellaneous - modifier = artifact_placeholder_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - history = { type = created_before_history } - } - } - scope:newly_created_artifact = { - set_artifact_description = artifact_trinket_icon_description - # Set piety - add_scaled_artifact_modifier_piety_effect = yes - - if = { - limit = { - OR = { - rarity = famed - rarity = illustrious - } - } - add_scaled_artifact_modifier_learning_lifestyle_xp_effect = yes - } - remove_artifact_modifier = artifact_placeholder_modifier - } - } -} -# Scheme bonuses from being the emperor, or member of a dominant/powerful family -ep3_actor_scheme_modifier_effect = { - scope:new_scheme ?= { - # Emperor enjoys a significant bonus to all admin related schemes - if = { - limit = { scope:actor = scope:actor.top_liege } - add_scheme_modifier = { type = admin_emperor_scheme_modifier } - } - # Dominant and Powerful Families enjoys a decent bonus to all admin related schemes - else_if = { - limit = { - scope:actor.house ?= { is_dominant_family = yes } - } - add_scheme_modifier = { type = admin_dominant_family_scheme_modifier } - } - else_if = { - limit = { - scope:actor.house ?= { is_powerful_family = yes } - } - add_scheme_modifier = { type = admin_powerful_family_scheme_modifier } - } - } -} - -#Complete war group task contracts, used in war_on_actions -war_task_contracts_completion_effect = { - #Join War Contract and Help Claimant Contract - scope:war = { - if = { - limit = { - any_war_participant = { - any_character_active_contract = { - OR = { - AND = { - has_task_contract_type = laamp_join_war_contract - var:task_contract_war ?= scope:war - } - AND = { - has_task_contract_type = laamp_help_claimant_contract - task_contract_employer = scope:war.primary_attacker - } - } - save_temporary_scope_as = relevant_contract - } - } - } - scope:relevant_contract = { - if = { - limit = { - scope:war = { - war_contribution = { - target = scope:relevant_contract.task_contract_taker - value > 0 - } - } - } - complete_task_contract = success_standard - } - else = { - complete_task_contract = failure_standard - } - } - } - if = { - limit = { - primary_attacker = { - has_variable = valuable_prisoners - } - } - primary_attacker = { - remove_variable = valuable_prisoners - } - } - if = { - limit = { - primary_defender = { - has_variable = valuable_prisoners - } - } - primary_defender = { - remove_variable = valuable_prisoners - } - } - if = { - limit = { - using_civil_war_cb_trigger = yes - any_war_participant = { - any_character_active_contract = { - task_contract_type = laamp_join_faction_contract - task_contract_employer = { - is_participant_in_war = scope:war - } - } - } - } - every_war_participant = { - every_character_active_contract = { - task_contract_type = laamp_join_faction_contract - limit = { - task_contract_employer = { - is_participant_in_war = scope:war - } - } - if = { - limit = { - task_contract_taker = scope:winner - } - complete_task_contract = success_standard - } - else = { - complete_task_contract = failure_standard - } - } - } - } - } -} - -#If a landless adventurer was hired as a mercenary and contributed in a war they get paid, used in war_on_actions, relevant flag set by hire_laamp_mercenaries_interaction or ep3_interactions_events.0112 -laamp_as_mercenary_payout_effect = { - scope:war = { - if = { - limit = { - any_war_participant = { - has_character_flag = joined_as_mercenary - is_attacker_in_war = scope:war - NOT = { is_leader_in_war = scope:war } - OR = { - has_raised_armies = yes - scope:war = { - war_contribution = { - target = prev - value > 0 - } - } - } - } - } - every_war_participant = { - limit = { - has_character_flag = joined_as_mercenary - is_attacker_in_war = scope:war - NOT = { is_leader_in_war = scope:war } - OR = { - has_raised_armies = yes - scope:war = { - war_contribution = { - target = prev - value > 0 - } - } - } - } - add_to_list = laamp_mercenaries - remove_character_flag = joined_as_mercenary - } - primary_attacker = { - save_scope_as = employer - trigger_event = { - id = ep3_interactions_events.0121 - days = { 3 7 } - } - } - every_in_list = { - list = laamp_mercenaries - scope:employer = { - remove_list_variable = { - name = hired_mercenaries - target = prev - } - } - } - } - if = { - limit = { - any_war_participant = { - has_character_flag = joined_as_mercenary - is_defender_in_war = scope:war - NOT = { is_leader_in_war = scope:war } - OR = { - has_raised_armies = yes - scope:war = { - war_contribution = { - target = prev - value > 0 - } - } - } - } - } - every_war_participant = { - limit = { - has_character_flag = joined_as_mercenary - is_defender_in_war = scope:war - NOT = { is_leader_in_war = scope:war } - OR = { - has_raised_armies = yes - scope:war = { - war_contribution = { - target = prev - value > 0 - } - } - } - } - add_to_list = laamp_mercenaries - remove_character_flag = joined_as_mercenary - } - primary_defender = { - save_scope_as = employer - trigger_event = { - id = ep3_interactions_events.0121 - days = { 3 7 } - } - } - every_in_list = { - list = laamp_mercenaries - scope:employer = { - remove_list_variable = { - name = hired_mercenaries - target = prev - } - } - } - } - } -} - -laamp_as_mercenary_payout_tooltip_effect = { - save_scope_as = war - show_as_tooltip = { - scope:defender = { - if = { - limit = { - exists = scope:war - any_war_ally = { - has_government = landless_adventurer_government - OR = { - any_character_active_contract = { - has_task_contract_type = laamp_join_war_contract - var:task_contract_war ?= scope:war - } - AND = { - has_variable = owed_contract_assistance_gold - var:owed_contract_assistance_war ?= scope:war - } - has_variable = joined_as_mercenary - } - } - } - every_war_ally = { - if = { - limit = { - has_government = landless_adventurer_government - } - save_scope_as = laamp_temp - save_scope_as = actor - save_scope_value_as = { - name = war_contribution_value - value = "scope:war.war_contribution(scope:laamp_temp)" - } - if = { - limit = { - any_character_active_contract = { - has_task_contract_type = laamp_join_war_contract - var:task_contract_war = scope:war - } - } - every_character_active_contract = { - limit = { - has_task_contract_type = laamp_join_war_contract - var:task_contract_war = scope:war - } - show_as_tooltip = { - task_contract_employer = { - save_scope_as = employer - custom_tooltip = ep3_join_war_payment_tt - pay_short_term_gold = { - target = scope:laamp_temp - gold = ep3_hire_laamp_mercs_payment_value - } - } - } - } - } - if = { - limit = { - has_variable = joined_as_mercenary - scope:defender = { - is_target_in_variable_list = { - name = hired_mercenaries - target = scope:laamp_temp - } - } - } - scope:defender = { - save_scope_as = employer - custom_tooltip = ep3_hire_laamp_mercs_payment_tt - pay_short_term_gold = { - target = scope:laamp_temp - gold = ep3_hire_laamp_mercs_payment_value - } - } - } - if = { - limit = { - has_variable = owed_contract_assistance_gold - var:owed_contract_assistance_war ?= scope:war - } - save_scope_as = contract_assistance_helper - scope:defender = { - save_scope_as = recipient - custom_tooltip = contract_assistance_interaction_condition_tt - pay_short_term_gold = { - target = scope:actor - gold = scope:actor.var:owed_contract_assistance_gold - } - } - } - } - } - } - } - scope:attacker = { - if = { - limit = { - exists = scope:war - any_war_ally = { - has_government = landless_adventurer_government - OR = { - any_character_active_contract = { - has_task_contract_type = laamp_join_war_contract - var:task_contract_war = scope:war - } - AND = { - has_variable = owed_contract_assistance_gold - var:owed_contract_assistance_war ?= scope:war - } - has_variable = joined_as_mercenary - } - } - } - every_war_ally = { - if = { - limit = { - has_government = landless_adventurer_government - } - save_scope_as = laamp_temp - save_scope_as = actor - save_scope_value_as = { - name = war_contribution_value - value = "scope:war.war_contribution(scope:laamp_temp)" - } - if = { - limit = { - any_character_active_contract = { - has_task_contract_type = laamp_join_war_contract - var:task_contract_war = scope:war - } - } - every_character_active_contract = { - limit = { - has_task_contract_type = laamp_join_war_contract - var:task_contract_war = scope:war - } - show_as_tooltip = { - task_contract_employer = { - save_scope_as = employer - custom_tooltip = ep3_hire_laamp_mercs_payment_tt - pay_short_term_gold = { - target = scope:laamp_temp - gold = ep3_hire_laamp_mercs_payment_value - } - } - } - } - } - if = { - limit = { - has_variable = joined_as_mercenary - scope:attacker = { - is_target_in_variable_list = { - name = hired_mercenaries - target = scope:laamp_temp - } - } - } - scope:attacker = { - save_scope_as = employer - custom_tooltip = ep3_hire_laamp_mercs_payment_tt - pay_short_term_gold = { - target = scope:laamp_temp - gold = ep3_hire_laamp_mercs_payment_value - } - } - } - if = { - limit = { - has_variable = owed_contract_assistance_gold - var:owed_contract_assistance_war ?= scope:war - } - save_scope_as = contract_assistance_helper - scope:attacker = { - custom_tooltip = contract_assistance_interaction_condition_tt - pay_short_term_gold = { - target = scope:actor - gold = scope:actor.var:owed_contract_assistance_gold - } - } - } - } - } - } - } - } -} - -chariot_race_sow_discord_strong_response_effect = { - if = { - limit = { - root = { - this = scope:host - } - } - scope:host = { - capital_county = { - change_county_control = { - value = -3 - multiply = scope:activity.var:counter_chant_count - } - } - custom_tooltip = counter_chants_strong_modifier_tooltip - hidden_effect = { - scope:activity = { - every_in_list = { - variable = counter_chanters - scope:host = { - capital_county = { - add_county_modifier = { - modifier = strong_sow_discord_modifier - years = 10 - } - } - } - } - } - } - } - } - else = { - scope:host = { - capital_county = { - add_county_modifier = { - modifier = strong_sow_discord_modifier - years = 10 - } - change_county_control = -3 - } - } - } -} -chariot_race_sow_discord_weak_response_effect = { - if = { - limit = { - root = { - this = scope:host - } - } - scope:host = { - custom_tooltip = counter_chants_weak_modifier_tooltip - hidden_effect = { - scope:activity = { - every_in_list = { - variable = counter_chanters - scope:host = { - capital_county = { - add_county_modifier = { - modifier = weak_sow_discord_modifier - years = 10 - } - } - } - } - } - } - } - } - else = { - scope:host = { - capital_county = { - add_county_modifier = { - modifier = weak_sow_discord_modifier - years = 10 - } - } - } - } -} -chariot_race_sow_discord_normal_response_effect = { - if = { - limit = { - root = { - this = scope:host - } - } - scope:host = { - capital_county = { - change_county_control = { - value = -1 - multiply = scope:activity.var:counter_chant_count - } - } - custom_tooltip = counter_chants_normal_modifier_tooltip - hidden_effect = { - scope:activity = { - every_in_list = { - variable = counter_chanters - scope:host = { - capital_county = { - add_county_modifier = { - modifier = normal_sow_discord_modifier - years = 10 - } - } - } - } - } - } - } - } - else = { - scope:host = { - capital_county = { - add_county_modifier = { - modifier = normal_sow_discord_modifier - years = 10 - } - custom_tooltip = modifier_stacking_chariot_tooltip - change_county_control = -1 - } - } - } -} - -############# -# Camp Party -############# - -camp_party_completed_log_entry_effect = { - involved_activity = { - add_activity_log_entry = { - key = camp_party_completed_log_entry_effect - tags = { completed } - score = 100 - show_in_conclusion = yes - character = root - #Effects - root = { - disburse_camp_party_reward_effect = yes - } - } - } -} - -disburse_camp_party_reward_effect = { - involved_activity ?= { - ###Non-progression linked - #Drinks - scope:host = { - #For highest level drinks - if = { - limit = { - involved_activity = { - has_activity_option = { - category = camp_party_option_drinks - option = camp_party_drinks_abundant - } - } - } - add_character_modifier = { - modifier = ep3_master_of_ceremonies - years = 3 - } - } - - #For any level of drinks - #Opinion - if = { - limit = { - involved_activity = { - OR = { - has_activity_option = { - category = camp_party_option_drinks - option = camp_party_drinks_abundant - } - has_activity_option = { - category = camp_party_option_drinks - option = camp_party_drinks_adequate - } - } - } - } - involved_activity = { - every_attending_character = { - limit = { - this != scope:host - } - custom = every_attending_guest - add_opinion = { - modifier = feast_life_of_the_party_opinion - target = scope:host - opinion = 35 - } - } - } - } - - # Reveler Trait - if = { - limit = { - involved_activity = { - OR = { - has_activity_option = { - category = camp_party_option_drinks - option = camp_party_drinks_abundant - } - has_activity_option = { - category = camp_party_option_drinks - option = camp_party_drinks_adequate - } - } - } - } - if = { - limit = { - NOT = { - has_trait = lifestyle_reveler - } - } - add_trait = lifestyle_reveler - } - add_trait_xp = { - trait = lifestyle_reveler - value = { - integer_range = { - min = small_lifestyle_random_xp_low - max = small_lifestyle_random_xp_high - } - } - } - } - } - - #100 Carousing - if = { - limit = { var:activity_special_type_progression >= 100 } - - #Stress Loss - every_attending_character = { - custom = every_attending_guest - add_stress = -150 - } - - #Host effects - scope:host = { - hidden_effect = { - domicile = { - random_list = { - 1 = { - trigger = { - has_domicile_building_or_higher = camp_main_01 - NOT = { has_domicile_building = camp_main_04 } - } - switch = { - trigger = has_domicile_building - camp_main_01 = { add_domicile_building = camp_main_02 } - camp_main_02 = { add_domicile_building = camp_main_03 } - camp_main_03 = { add_domicile_building = camp_main_04 } - } - } - 1 = { - trigger = { - has_domicile_building_or_higher = supply_tent_01 - NOT = { has_domicile_building = supply_tent_06 } - } - switch = { - trigger = has_domicile_building - supply_tent_01 = { add_domicile_building = supply_tent_02 } - supply_tent_02 = { add_domicile_building = supply_tent_03 } - supply_tent_03 = { add_domicile_building = supply_tent_04 } - supply_tent_04 = { add_domicile_building = supply_tent_05 } - supply_tent_05 = { add_domicile_building = supply_tent_06 } - } - } - 1 = { - trigger = { - has_domicile_building_or_higher = barber_tent_01 - NOT = { has_domicile_building = barber_tent_06 } - } - switch = { - trigger = has_domicile_building - barber_tent_01 = { add_domicile_building = barber_tent_02 } - barber_tent_02 = { add_domicile_building = barber_tent_03 } - barber_tent_03 = { add_domicile_building = barber_tent_04 } - barber_tent_04 = { add_domicile_building = barber_tent_05 } - barber_tent_05 = { add_domicile_building = barber_tent_06 } - } - } - 1 = { - trigger = { - has_domicile_building_or_higher = baggage_train_01 - NOT = { has_domicile_building = baggage_train_06 } - } - switch = { - trigger = has_domicile_building - baggage_train_01 = { add_domicile_building = baggage_train_02 } - baggage_train_02 = { add_domicile_building = baggage_train_03 } - baggage_train_03 = { add_domicile_building = baggage_train_04 } - baggage_train_04 = { add_domicile_building = baggage_train_05 } - baggage_train_05 = { add_domicile_building = baggage_train_06 } - } - } - 1 = { - trigger = { - has_domicile_building_or_higher = camp_fire_01 - NOT = { has_domicile_building = camp_fire_06 } - } - switch = { - trigger = has_domicile_building - camp_fire_01 = { add_domicile_building = camp_fire_02 } - camp_fire_02 = { add_domicile_building = camp_fire_03 } - camp_fire_03 = { add_domicile_building = camp_fire_04 } - camp_fire_04 = { add_domicile_building = camp_fire_05 } - camp_fire_05 = { add_domicile_building = camp_fire_06 } - } - } - 1 = { - trigger = { - has_domicile_building_or_higher = proving_grounds_01 - NOT = { has_domicile_building = proving_grounds_06 } - } - switch = { - trigger = has_domicile_building - proving_grounds_01 = { add_domicile_building = proving_grounds_02 } - proving_grounds_02 = { add_domicile_building = proving_grounds_03 } - proving_grounds_03 = { add_domicile_building = proving_grounds_04 } - proving_grounds_04 = { add_domicile_building = proving_grounds_05 } - proving_grounds_05 = { add_domicile_building = proving_grounds_06 } - } - } - 1 = { - trigger = { - has_domicile_building_or_higher = camp_perimeter_01 - NOT = { has_domicile_building = camp_perimeter_06 } - } - switch = { - trigger = has_domicile_building - camp_perimeter_01 = { add_domicile_building = camp_perimeter_02 } - camp_perimeter_02 = { add_domicile_building = camp_perimeter_03 } - camp_perimeter_03 = { add_domicile_building = camp_perimeter_04 } - camp_perimeter_04 = { add_domicile_building = camp_perimeter_05 } - camp_perimeter_05 = { add_domicile_building = camp_perimeter_06 } - } - } - } - } - } - - custom_tooltip = activity_camp_party_reward_upgrade_building - - custom_tooltip = camp_party_100_contracts_get - - hidden_effect = { - contract_passive_spawn_effect = { - SPAWN_CONTRACTS = 2 - } - } - - #Provisions - domicile = { - change_provisions = massive_provisions_gain - } - - #Lifestyle XP - bp2_lifestyle_xp_gain_per_type_effect = { VALUE = major } - - add_character_flag = { - flag = better_recruitment_visit_holding_flag - years = 1 - } - } - } - - #75+ Carousing - else_if = { - limit = { - var:activity_special_type_progression < 100 - var:activity_special_type_progression >= 75 - } - - #Stress Loss - every_attending_character = { - custom = every_attending_guest - add_stress = -100 - } - - #Contract spawn & flag assign - scope:host = { - custom_tooltip = camp_party_75_contracts_get - - hidden_effect = { - contract_passive_spawn_effect = { - SPAWN_CONTRACTS = 1 - } - } - - #Provisions - domicile = { - change_provisions = major_provisions_gain - } - - #Lifestyle XP - bp2_lifestyle_xp_gain_per_type_effect = { VALUE = medium } - - add_character_flag = { - flag = better_recruitment_visit_holding_flag - years = 1 - } - } - } - #50+ Carousing - else_if = { - limit = { - var:activity_special_type_progression < 75 - var:activity_special_type_progression >= 50 - } - - #Stress Loss - every_attending_character = { - custom = every_attending_guest - add_stress = -75 - } - - #Contract spawn and flag assign - scope:host = { - #Provisions - domicile = { - change_provisions = medium_provisions_gain - } - - #Lifestyle XP - bp2_lifestyle_xp_gain_per_type_effect = { VALUE = minor } - - add_character_flag = { - flag = better_recruitment_visit_holding_flag - years = 1 - } - } - } - #25+ Carousing - else = { - #Stress Loss - every_attending_character = { - custom = every_attending_guest - add_stress = -50 - } - - scope:host = { - add_character_flag = { - flag = cheaper_provisions_visit_holding_flag - years = 1 - } - } - } - - scope:host = { - if = { - limit = { - has_activity_intent = fireside_chat_intent - } - hidden_effect = { - remove_character_modifier = ep3_fireside_chat_modifier_3 - remove_character_modifier = ep3_fireside_chat_modifier_2 - remove_character_modifier = ep3_fireside_chat_modifier_1 - } - if = { - limit = { - involved_activity = { - any_attending_character = { - count >= 4 - OR = { - has_character_modifier = ep3_fireside_chat_diplomacy - has_character_modifier = ep3_fireside_chat_learning - has_character_modifier = ep3_fireside_chat_intrigue - has_character_modifier = ep3_fireside_chat_stewardship - has_character_modifier = ep3_fireside_chat_martial - } - } - } - } - add_character_modifier = { - modifier = ep3_fireside_chat_modifier_3 - years = 10 - } - } - else_if = { - limit = { - involved_activity = { - any_attending_character = { - count >= 2 - OR = { - has_character_modifier = ep3_fireside_chat_diplomacy - has_character_modifier = ep3_fireside_chat_learning - has_character_modifier = ep3_fireside_chat_intrigue - has_character_modifier = ep3_fireside_chat_stewardship - has_character_modifier = ep3_fireside_chat_martial - } - } - } - } - add_character_modifier = { - modifier = ep3_fireside_chat_modifier_2 - years = 10 - } - } - else = { - add_character_modifier = { - modifier = ep3_fireside_chat_modifier_1 - years = 10 - } - } - } - } - } -} - -ep3_camp_party_visit_holding_skills_boost = { - add_diplomacy_skill = { 1 3 } - add_martial_skill = { 1 3 } - add_stewardship_skill = { 1 3 } - add_intrigue_skill = { 1 3 } - add_learning_skill = { 1 3 } -} - -#Setting up the Fens as a pseudo-custom region -ep3_the_fens_list_effect = { - province:1525 = { add_to_list = the_fens } #b_lynn - province:1534 = { add_to_list = the_fens } #b_cambridgeshire - province:1535 = { add_to_list = the_fens } #b_radfield - province:1536 = { add_to_list = the_fens } #b_papworth - province:1537 = { add_to_list = the_fens } #b_ely - province:1541 = { add_to_list = the_fens } #b_hurstingstone - province:1542 = { add_to_list = the_fens } #b_norman_cross - province:1584 = { add_to_list = the_fens } #b_stamford - province:1585 = { add_to_list = the_fens } #b_boston - province:1601 = { add_to_list = the_fens } #b_peterborough -} - -#Used for setting up the Harrying of the North widget for events -#Requires use of ep3_harrying_widget_clear_effect in the 'after' as well -ep3_harrying_widget_setup_effect = { - global_var:harrying_of_the_north = { save_scope_as = story } - ## First, identify our widget character. - save_scope_as = scope_character - ## Then transfer over some suitable variables for the UI. - set_variable = { - name = pacification_gui - value = scope:story.var:pacification - } - set_variable = { - name = resistance_gui - value = scope:story.var:resistance - } -} - -#Increase pacification -ep3_increase_pacification_effect = { - save_scope_as = origin_char - scope:story = { - change_variable = { - name = pacification - add = $AMOUNT$ - } - } - set_variable = { - name = pacification_gui - value = scope:story.var:pacification - } - if = { #Display in red if Anglo-Saxon - limit = { - culture = culture:anglo_saxon - } - custom_tooltip = ep3_increase_pacification_effect_tt_negative - } - else = { #Otherwise in green - custom_tooltip = ep3_increase_pacification_effect_tt_positive - } - - if = { - limit = { - exists = scope:story.var:ruler_england - } - scope:story.var:ruler_england = { - send_interface_message = { - type = msg_pacification_rise - title = harrying.notification_pacification_rise - desc = harrying_pacification_rise - } - } - } - - if = { - limit = { - character:90028 = { - is_alive = yes - NOT = { - has_character_flag = hereward_settled_flag - } - } - } - character:90028 = { - send_interface_message = { - type = msg_pacification_rise - title = harrying.notification_pacification_rise - desc = harrying_pacification_rise - } - } - } - - if = { - limit = { - scope:story.var:ruler_england = { - any_vassal = { - culture = culture:anglo_saxon - } - } - } - scope:story.var:ruler_england = { - every_vassal = { - limit = { - culture = culture:anglo_saxon - } - send_interface_message = { - type = msg_pacification_rise - title = harrying.notification_pacification_rise - desc = harrying_pacification_rise - } - } - } - } -} - -#Increase pacification - large -ep3_increase_pacification_large_effect = { - save_scope_as = origin_char - scope:story = { - change_variable = { - name = pacification - add = 2 - } - } - set_variable = { - name = pacification_gui - value = scope:story.var:pacification - } - if = { #Display in red if Anglo-Saxon - limit = { - culture = culture:anglo_saxon - } - custom_tooltip = ep3_increase_pacification_effect_tt_negative_large - } - else = { #Otherwise in green - custom_tooltip = ep3_increase_pacification_effect_tt_positive_large - } - - if = { - limit = { - exists = scope:story.var:ruler_england - } - scope:story.var:ruler_england = { - send_interface_message = { - type = msg_pacification_rise - title = harrying.notification_pacification_rise - desc = harrying_pacification_rise - } - } - } - - if = { - limit = { - character:90028 = { - is_alive = yes - NOT = { - has_character_flag = hereward_settled_flag - } - } - } - character:90028 = { - send_interface_message = { - type = msg_pacification_rise - title = harrying.notification_pacification_rise - desc = harrying_pacification_rise - } - } - } - - if = { - limit = { - scope:story.var:ruler_england = { - any_vassal = { - culture = culture:anglo_saxon - } - } - } - scope:story.var:ruler_england = { - every_vassal = { - limit = { - culture = culture:anglo_saxon - } - send_interface_message = { - type = msg_pacification_rise - title = harrying.notification_pacification_rise - desc = harrying_pacification_rise - } - } - } - } -} - -#Increase resistance -ep3_increase_resistance_effect = { - save_scope_as = origin_char - scope:story = { - change_variable = { - name = resistance - add = $AMOUNT$ - } - } - set_variable = { - name = resistance_gui - value = scope:story.var:resistance - } - if = { #Display in green if Anglo-Saxon - limit = { - culture = culture:anglo_saxon - } - custom_tooltip = ep3_increase_resistance_effect_tt_positive - } - else = { #Otherwise in green - custom_tooltip = ep3_increase_resistance_effect_tt_negative - } - - if = { - limit = { - exists = scope:story.var:ruler_england - } - scope:story.var:ruler_england = { - send_interface_message = { - type = msg_resistance_rise - title = harrying.notification_resistance_rise - desc = harrying_resistance_rise - } - } - } - - if = { - limit = { - character:90028 = { - is_alive = yes - NOT = { - has_character_flag = hereward_settled_flag - } - } - } - character:90028 = { - send_interface_message = { - type = msg_resistance_rise - title = harrying.notification_resistance_rise - desc = harrying_resistance_rise - } - } - } - - if = { - limit = { - scope:story.var:ruler_england = { - any_vassal = { - culture = culture:anglo_saxon - } - } - } - scope:story.var:ruler_england = { - every_vassal = { - limit = { - culture = culture:anglo_saxon - } - send_interface_message = { - type = msg_resistance_rise - title = harrying.notification_resistance_rise - desc = harrying_resistance_rise - } - } - } - } -} - -#Increase resistance - large -ep3_increase_resistance_large_effect = { - save_scope_as = origin_char - scope:story = { - change_variable = { - name = resistance - add = 2 - } - } - set_variable = { - name = resistance_gui - value = scope:story.var:resistance - } - if = { #Display in green if Anglo-Saxon - limit = { - culture = culture:anglo_saxon - } - custom_tooltip = ep3_increase_resistance_effect_tt_positive_large - } - else = { #Otherwise in green - custom_tooltip = ep3_increase_resistance_effect_tt_negative_large - } - - if = { - limit = { - exists = scope:story.var:ruler_england - } - scope:story.var:ruler_england = { - send_interface_message = { - type = msg_resistance_rise - title = harrying.notification_resistance_rise - desc = harrying_resistance_rise - } - } - } - - if = { - limit = { - character:90028 = { - is_alive = yes - NOT = { - has_character_flag = hereward_settled_flag - } - } - } - character:90028 = { - send_interface_message = { - type = msg_resistance_rise - title = harrying.notification_resistance_rise - desc = harrying_resistance_rise - } - } - } - - if = { - limit = { - scope:story.var:ruler_england = { - any_vassal = { - culture = culture:anglo_saxon - } - } - } - scope:story.var:ruler_england = { - random_vassal = { - limit = { - culture = culture:anglo_saxon - } - send_interface_message = { - type = msg_resistance_rise - title = harrying.notification_resistance_rise - desc = harrying_resistance_rise - } - } - } - } -} - -#Decrease pacification -ep3_decrease_pacification_effect = { - save_scope_as = origin_char - if = { - limit = { scope:story.var:pacification != 0 } - scope:story = { - change_variable = { - name = pacification - add = -1 - } - } - set_variable = { - name = pacification_gui - value = scope:story.var:pacification - } - if = { #Display in green if Anglo-Saxon - limit = { - culture = culture:anglo_saxon - } - custom_tooltip = ep3_decrease_pacification_effect_tt_positive - } - else = { #Otherwise in green - custom_tooltip = ep3_decrease_pacification_effect_tt_negative - } - - if = { - limit = { - exists = scope:story.var:ruler_england - } - scope:story.var:ruler_england = { - send_interface_message = { - type = msg_pacification_falls - title = harrying.notification_pacification_fall - desc = harrying_pacification_fall - } - } - } - - if = { - limit = { - character:90028 = { - is_alive = yes - NOT = { - has_character_flag = hereward_settled_flag - } - } - } - character:90028 = { - send_interface_message = { - type = msg_pacification_falls - title = harrying.notification_pacification_fall - desc = harrying_pacification_fall - } - } - } - - if = { - limit = { - scope:story.var:ruler_england = { - any_vassal = { - culture = culture:anglo_saxon - } - } - } - scope:story.var:ruler_england = { - every_vassal = { - limit = { - culture = culture:anglo_saxon - } - send_interface_message = { - type = msg_pacification_falls - title = harrying.notification_pacification_fall - desc = harrying_pacification_fall - } - } - } - } - } -} - -#Decrease resistance -ep3_decrease_resistance_effect = { - save_scope_as = origin_char - if = { - limit = { scope:story.var:pacification != 0 } - scope:story = { - change_variable = { - name = resistance - add = -1 - } - } - set_variable = { - name = resistance_gui - value = scope:story.var:resistance - } - if = { #Display in red if Anglo-Saxon - limit = { - culture = culture:anglo_saxon - } - custom_tooltip = ep3_decrease_resistance_effect_tt_negative - } - else = { #Otherwise in green - custom_tooltip = ep3_decrease_resistance_effect_tt_positive - } - - if = { - limit = { - exists = scope:story.var:ruler_england - } - scope:story.var:ruler_england = { - send_interface_message = { - type = msg_resistance_falls - title = harrying.notification_resistance_fall - desc = harrying_resistance_fall - } - } - } - - if = { - limit = { - character:90028 = { - is_alive = yes - NOT = { - has_character_flag = hereward_settled_flag - } - } - } - character:90028 = { - send_interface_message = { - type = msg_resistance_falls - title = harrying.notification_resistance_fall - desc = harrying_resistance_fall - } - } - } - - if = { - limit = { - scope:story.var:ruler_england = { - any_vassal = { - culture = culture:anglo_saxon - } - } - } - scope:story.var:ruler_england = { - every_vassal = { - limit = { - culture = culture:anglo_saxon - } - send_interface_message = { - type = msg_resistance_falls - title = harrying.notification_resistance_fall - desc = harrying_resistance_fall - } - } - } - } - } -} - -#Used for clearing widget data from the participants -ep3_harrying_widget_clear_effect = { - remove_variable = pacification_gui - remove_variable = resistance_gui -} - -# Effect for handling players and AI continuing as landless if deposed -# Should be used over the standard effect in most cases (except barons/unlanded AI etc.) -# DEPOSER should be whoever has caused the deposal - faction leader, ultimatum giver, etc. -depose_effect = { - show_as_tooltip = { depose = yes } - save_scope_as = allow_imprisoned_landless - if = { - limit = { is_valid_for_laampdom = yes } - custom_tooltip = laamp_may_become_adventurer_tt - } - set_variable = { - name = deposed_primary_title - value = primary_title - months = 1 - } - # Maintenance scopes - save_scope_as = defender - $DEPOSER$ = { - save_scope_as = attacker - save_scope_as = winner - } - # ACH crown laws reset - if = { - limit = { - has_variable = crowned_king_var - } - remove_variable = crowned_king_var - if = { - limit = { - NOT = { has_game_rule = coronation_laws_off } - OR = { - has_realm_law = crowned_king - has_realm_law = crowned_emperor - } - } - add_realm_law_skip_effects = uncrowned - } - } - if = { - limit = { - has_variable = crowned_emperor_var - } - remove_variable = crowned_emperor_var - if = { - limit = { - NOT = { has_game_rule = coronation_laws_off } - OR = { - has_realm_law = crowned_king - has_realm_law = crowned_emperor - } - } - add_realm_law_skip_effects = uncrowned - } - } - every_held_title = { add_to_list = target_titles } - trigger_event = ep3_laamps.0002 -} - -# Effect for handling players and AI continuing as landless if banished -# Should be used over the standard effect in most cases (except barons/unlanded AI etc.) -# BANISHER should be whoever has caused the banishment - imprisoner, ultimatum giver, etc. -banish_effect = { - show_as_tooltip = { banish = yes } - save_scope_as = allow_imprisoned_landless - if = { - limit = { is_valid_for_laampdom = yes } - custom_tooltip = laamp_may_become_adventurer_tt - } - $BANISHER$ = { save_scope_as = banisher } - trigger_event = ep3_laamps.0021 -} - -#Used for setting up the Peasant Leader widget for events -#Requires use of ep3_peasant_leader_widget_clear_effect in the 'after' as well -ep3_peasant_leader_widget_setup_effect = { - set_variable = { - name = support_gui - value = scope:task_contract.var:support - } - set_variable = { - name = control_gui - value = scope:task_contract.var:control - } - set_variable = { - name = num_of_corrupt_counties_gui - value = scope:task_contract.var:num_of_corrupt_counties - } -} -#Increase support -ep3_increase_peasant_support_effect = { - scope:task_contract = { - change_variable = { - name = support - add = 1 - } - add_to_variable_list = { - name = supported_counties - target = scope:corrupt_province.county - } - } - custom_tooltip = ep3_support_peasants_effect_tt - scope:task_contract.var:task_contract_councillor_liege ?= { - send_interface_message = { - type = msg_peasant_supported - title = msg_peasant_supported.title - desc = msg_peasant_supported.desc - } - } - scope:task_contract.var:task_contract_councillor ?= { - send_interface_message = { - type = msg_peasant_supported - title = msg_peasant_supported.title - desc = msg_peasant_supported.desc - } - } -} -#Increase control -ep3_increase_peasant_control_effect = { - scope:task_contract = { - change_variable = { - name = control - add = 1 - } - } - custom_tooltip = ep3_control_peasants_effect_tt - scope:task_contract.var:task_contract_councillor_liege ?= { - send_interface_message = { - type = msg_peasant_controlled - title = msg_peasant_controlled.title - desc = msg_peasant_controlled.desc - } - } - scope:task_contract.var:task_contract_councillor ?= { - send_interface_message = { - type = msg_peasant_controlled - title = msg_peasant_controlled.title - desc = msg_peasant_controlled.desc - } - } -} -#Used for clearing widget data from the participants -ep3_peasant_leader_widget_clear_effect = { - remove_variable = support_gui - remove_variable = control_gui - remove_variable = num_of_corrupt_counties_gui -} - -ep3_join_faction_war_effect = { - # Use hook/pay gold - scope:actor = { - if = { - limit = { - scope:hook = yes - has_hook = scope:recipient - } - use_hook = scope:recipient - } - if = { - limit = { scope:gold = yes } - pay_short_term_gold = { - gold = scope:actor.medium_gold_value - target = scope:recipient - } - } - } - # Gain some influence - scope:recipient = { - change_influence = 75 - # Remove from existing faction if swapping - if = { - limit = { exists = joined_faction } - leave_faction = joined_faction - } - if = { - limit = { target_is_liege_or_above = scope:secondary_recipient } - add_faction_cooldown_effect = { YEARS = 5 } - } - remove_character_flag = under_offer_join_faction_war_flag - } - scope:actor.joined_faction.faction_war = { - if = { - limit = { is_defender = scope:actor } - add_defender = scope:recipient - } - else = { add_attacker = scope:recipient } - } -} - -ep3_switch_faction_war_sides_effect = { - scope:actor = { - if = { - limit = { - scope:hook = yes - has_hook = scope:recipient - } - use_hook = scope:recipient - } - if = { - limit = { scope:gold = yes } - pay_short_term_gold = { - gold = scope:actor.medium_gold_value - target = scope:recipient - } - } - } - scope:recipient = { - change_influence = 150 - # Remove from existing faction if swapping - if = { - limit = { exists = joined_faction } - leave_faction = joined_faction - } - if = { - limit = { target_is_liege_or_above = scope:secondary_recipient } - add_faction_cooldown_effect = { YEARS = 5 } - } - } - scope:actor = { - every_character_war = { - limit = { ep3_switch_faction_war_sides_war_trigger = yes } - hidden_effect = { remove_participant = scope:recipient } - if = { - limit = { is_defender = scope:actor } - add_defender = scope:recipient - hidden_effect = { - primary_attacker = { - add_opinion = { - target = scope:recipient - modifier = betrayed_me_opinion - opinion = -25 - } - } - } - } - else = { - add_attacker = scope:recipient - primary_defender = { - hidden_effect = { - add_opinion = { - target = scope:recipient - modifier = betrayed_me_opinion - opinion = -25 - } - } - } - } - } - } - scope:recipient = { custom_tooltip = ep3_switch_faction_war_sides_cooldown_effect_tt } -} - -ep3_raid_insight_effect = { - add_character_modifier = { - modifier = raid_insight_$TYPE$ - years = 5 - } -} - -# Set up titles in the new realm. -# Determine potential breakaways -ep3_landless_invasion_titles_taken_effect = { - # Determine independent vassals - adventurer_realm_destabilisation_list_effect = { - TITLE_RECEIVER = $TITLE_RECEIVER$ - TITLE_GIVER = $TITLE_GIVER$ - TITLE = $TITLE$ - } - # Determine hierarchy - ep3_become_landed_save_liege_effect = { - TITLE_GIVER = $TITLE_GIVER$ - ALWAYS_INDEPENDENT = yes - TITLE_LIST = $TITLE_LIST$ - } - # Resolve title, liege, government changes - ep3_become_landed_transfer_effect = { - TITLE_RECEIVER = $TITLE_RECEIVER$ - TITLE_LIST = $TITLE_LIST$ - TYPE = conquest - REASON = flag:conquest - } - # Vassals break away - adventurer_realm_destabilisation_transfer_effect = { - TITLE = $TITLE$ - TITLE_RECEIVER = $TITLE_RECEIVER$ - TITLE_GIVER = $TITLE_GIVER$ - TITLE_LIST = $TITLE_LIST$ - } -} - -governor_contract_invalidated_message_effect = { - task_contract_taker ?= { - save_scope_as = task_contract_character - send_interface_message = { - type = event_generic_bad_with_text - title = admin_contract_invalidated_title - left_icon = scope:task_contract_character - desc = admin_contract_invalidated_desc - - current_travel_plan ?= { - if = { - limit = { can_cancel = yes } - cancel_travel_plan = yes - } - } - } - } -} - -assign_favourite_child_effect = { - $ACTOR$ = { - random_relation = { - type = favorite_child - save_scope_as = current_favorite - } - send_interface_toast = { - title = choose_favorite_interaction_notification - left_icon = $ACTOR$ - right_icon = $RECIPIENT$ - if = { - limit = { - exists = scope:current_favorite - } - remove_relation_favorite_child = scope:current_favorite - scope:current_favorite = { - add_opinion = { - target = $ACTOR$ - modifier = no_more_favorite_opinion - } - } - } - set_relation_favorite_child = { reason = favorite_child_chosen target = $RECIPIENT$ } - $RECIPIENT$ = { - add_opinion = { - target = $ACTOR$ - modifier = made_favorite_opinion - } - } - custom_tooltip = choose_favorite_interaction_notification.tt - } - hidden_effect = { - every_close_or_extended_family_member = { - limit = { - NOT = { this = $RECIPIENT$ } - OR = { - is_child_of = $ACTOR$ - is_grandchild_of = $ACTOR$ - is_great_grandchild_of = $ACTOR$ - } - } - add_opinion = { - target = $ACTOR$ - modifier = has_favorite_opinion - } - add_opinion = { - target = $RECIPIENT$ - modifier = is_favorite_opinion - } - } - } - } -} - -add_random_internal_estate_building = { - random_list = { - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = servants_quarters_01 } - } - add_domicile_building = servants_quarters_01 - if = { - limit = { has_domicile_building = estate_main_03 } - add_domicile_building = servants_quarters_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = library_01 } - } - add_domicile_building = library_01 - if = { - limit = { has_domicile_building = estate_main_03 } - add_domicile_building = library_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = bath_01 } - } - add_domicile_building = bath_01 - if = { - limit = { has_domicile_building = estate_main_03 } - add_domicile_building = bath_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = courtyard_01 } - } - add_domicile_building = courtyard_01 - if = { - limit = { has_domicile_building = estate_main_03 } - add_domicile_building = courtyard_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = prison_01 } - } - add_domicile_building = prison_01 - if = { - limit = { has_domicile_building = estate_main_03 } - add_domicile_building = prison_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = living_quarters_01 } - } - add_domicile_building = living_quarters_01 - if = { - limit = { has_domicile_building = estate_main_03 } - add_domicile_building = living_quarters_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = trophy_room_01 } - } - add_domicile_building = trophy_room_01 - if = { - limit = { has_domicile_building = estate_main_03 } - add_domicile_building = trophy_room_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = office_01 } - } - add_domicile_building = office_01 - if = { - limit = { has_domicile_building = estate_main_03 } - add_domicile_building = office_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = guest_room_01 } - } - add_domicile_building = guest_room_01 - if = { - limit = { has_domicile_building = estate_main_03 } - add_domicile_building = guest_room_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = wine_cellar_01 } - } - add_domicile_building = wine_cellar_01 - if = { - limit = { has_domicile_building = estate_main_03 } - add_domicile_building = wine_cellar_02 - } - } - } -} - -fill_external_estate_building_effect = { - switch = { - trigger = has_domicile_building_or_higher - estate_main_05 = { - while = { - limit = { free_external_domicile_building_slots >= 1 } - add_random_external_estate_building = yes - } - } - estate_main_04 = { - while = { - limit = { free_external_domicile_building_slots >= 2 } - add_random_external_estate_building = yes - } - } - estate_main_03 = { - while = { - limit = { free_external_domicile_building_slots >= 3 } - add_random_external_estate_building = yes - } - } - estate_main_02 = { - while = { - limit = { free_external_domicile_building_slots >= 4 } - add_random_external_estate_building = yes - } - } - estate_main_01 = { - while = { - limit = { free_external_domicile_building_slots >= 5 } - add_random_external_estate_building = yes - } - } - } -} - -add_random_external_estate_building = { - if = { - limit = { - free_external_domicile_building_slots >= 1 - } - random_list = { - 10 = { - trigger = { - NOR = { - has_domicile_building_or_higher = temple_small_01 - owner = { - government_has_flag = government_is_celestial - } - } - } - add_domicile_building = temple_small_01 - if = { - limit = { has_domicile_building = estate_main_03 } - add_domicile_building = temple_small_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = barracks_01 } - } - add_domicile_building = barracks_01 - if = { - limit = { has_domicile_building = estate_main_03 } - add_domicile_building = barracks_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = watchtower_01 } - } - add_domicile_building = watchtower_01 - if = { - limit = { has_domicile_building = estate_main_03 } - add_domicile_building = watchtower_02 - } - } - 10 = { - trigger = { - NOR = { - has_domicile_building_or_higher = vineyard_01 - owner.culture ?= { - has_innovation = innovation_champa_rice - } - } - } - add_domicile_building = vineyard_01 - if = { - limit = { has_domicile_building = estate_main_03 } - add_domicile_building = vineyard_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = guardhouse_01 } - } - add_domicile_building = guardhouse_01 - if = { - limit = { has_domicile_building = estate_main_03 } - add_domicile_building = guardhouse_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = garden_01 } - } - add_domicile_building = garden_01 - if = { - limit = { has_domicile_building = estate_main_03 } - add_domicile_building = garden_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = storage_01 } - } - add_domicile_building = storage_01 - if = { - limit = { has_domicile_building = estate_main_03 } - add_domicile_building = storage_02 - } - } - 10 = { - trigger = { - NOR = { - has_domicile_building_or_higher = grain_field_01 - owner.culture ?= { - has_innovation = innovation_champa_rice - } - } - } - add_domicile_building = grain_field_01 - if = { - limit = { has_domicile_building = estate_main_03 } - add_domicile_building = grain_field_02 - } - } - 10 = { - trigger = { - NOT = { - has_domicile_building_or_higher = rice_field_01 - } - owner.culture ?= { - has_innovation = innovation_champa_rice - } - } - add_domicile_building = rice_field_01 - if = { - limit = { has_domicile_building = estate_main_03 } - add_domicile_building = rice_field_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = stable_01 } - } - add_domicile_building = stable_01 - if = { - limit = { has_domicile_building = estate_main_03 } - add_domicile_building = stable_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = workshop_01 } - } - add_domicile_building = workshop_01 - if = { - limit = { has_domicile_building = estate_main_03 } - add_domicile_building = workshop_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = market_01 } - } - add_domicile_building = market_01 - if = { - limit = { has_domicile_building = estate_main_03 } - add_domicile_building = market_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = grazing_land_01 } - } - add_domicile_building = grazing_land_01 - if = { - limit = { has_domicile_building = estate_main_03 } - add_domicile_building = grazing_land_02 - } - } - 10 = { - trigger = { - NOR = { - has_domicile_building_or_higher = olive_01 - owner.culture ?= { - has_innovation = innovation_champa_rice - } - } - } - add_domicile_building = olive_01 - if = { - limit = { has_domicile_building = estate_main_03 } - add_domicile_building = olive_02 - } - } - } - } -} - -estate_newly_built_grain_field_effect = { - scope:owner = { - if = { - limit = { - is_alive = yes - years_from_game_start >= 1 - } - random = { - chance = 75 - add_character_flag = { - flag = domicile_new_built_grain_field - months = 1 - } - trigger_event = { - id = ep3_governor_yearly.3001 - days = 5 - } - } - } - } -} diff --git a/N3OW/common/scripted_effects/07_dlc_ep3_story_cycle_adventurer_ai_scripted_effects.txt b/N3OW/common/scripted_effects/07_dlc_ep3_story_cycle_adventurer_ai_scripted_effects.txt deleted file mode 100644 index a108fa74..00000000 --- a/N3OW/common/scripted_effects/07_dlc_ep3_story_cycle_adventurer_ai_scripted_effects.txt +++ /dev/null @@ -1,1844 +0,0 @@ - -################################################## -# AI Contract Story Effects - -ep3_adventurer_ai_contract_find_next_employer_effect = { - save_scope_as = story - # Save previous employer for easy reference - var:previous_employer ?= { save_scope_as = previous_employer } - # Save current employer for easy reference - var:active_employer ?= { save_scope_as = current_employer } - # Find next employer in active de jure kingdom - var:active_kingdom = { - random_de_jure_county_holder = { - limit = { - save_temporary_scope_as = new_employer_temp - NOR = { - scope:story = { - is_target_in_variable_list = { - name = recent_employers - target = scope:new_employer_temp - } - } - is_at_war_with = scope:story.story_owner - has_imprisonment_reason = scope:story.story_owner - has_execute_reason = scope:story.story_owner - has_banish_reason = scope:story.story_owner - any_liege_or_above = { - OR = { - has_imprisonment_reason = scope:story.story_owner - has_execute_reason = scope:story.story_owner - has_banish_reason = scope:story.story_owner - is_at_war_with = scope:story.story_owner - } - } - } - } - weight = { - base = 1 - # Prefer higher ranked employers - modifier = { add = highest_held_title_tier } - # Prefer same culture employers - modifier = { - culture = { has_same_culture_heritage = scope:story.story_owner.culture } - factor = 1.5 - } - # Prefer same faith employers - modifier = { - faith = scope:story.story_owner.faith - factor = 1.5 - } - # Prefer same faith employers - modifier = { - religion = scope:story.story_owner.religion - factor = 1.5 - } - # Prefer new employers - modifier = { - scope:previous_employer ?= scope:new_employer_temp - factor = 0.25 - } - modifier = { - scope:current_employer ?= scope:new_employer_temp - factor = 0.25 - } - # Mercenary - modifier = { - scope:story.story_owner = { - has_realm_law = camp_purpose_mercenaries - NOR = { - has_relation_rival = scope:new_employer_temp - scope:new_employer_temp = { - any_war_enemy = { - OR = { - is_consort_of = scope:story.story_owner - is_close_family_of = scope:story.story_owner - is_allied_to = scope:story.story_owner - has_relation_friend = scope:story.story_owner - } - } - } - } - can_create_task_contract = { - type_name = laamp_join_war_contract - employer = scope:new_employer_temp - } - } - factor = 2 - } - } - # Save new employer - save_scope_as = new_employer - } - } - if = { - limit = { exists = scope:new_employer } - if = { # Save previous employer for checks and debugging - limit = { exists = scope:current_employer } - set_variable = { - name = previous_employer - value = scope:current_employer - } - add_to_variable_list = { - name = recent_employers - target = scope:current_employer - years = 2 - } - } - set_variable = { # Save active employer - name = active_employer - value = scope:new_employer - } - set_variable = { # Reset remaining contracts counter - name = remaining_contract_counter - value = { - integer_range = { - min = ep3_adventurer_ai_contracts_per_employer_min_value - max = ep3_adventurer_ai_contracts_per_employer_max_value - } - } - } - change_variable = { # Change remaining employer counter - name = remaining_employer_counter - add = -1 - } - story_owner = { # Travel to or create contract - if = { # Travel - limit = { location != scope:new_employer.capital_province } - save_scope_value_as = { # Approx provisions for journey - name = lammp_travel_provisions - value = { - value = "location.squared_distance(scope:new_employer.capital_province)" - divide = 300 - } - } - domicile = { # the AI doesn't have to know how to use provisions efficiently, so just add a couple so that they don't suicide - if = { - limit = { provisions < scope:lammp_travel_provisions } - change_provisions = scope:lammp_travel_provisions - } - } - start_travel_plan = { - destination = scope:new_employer.capital_province - travel_with_domicile = yes - return_trip = no - on_arrival_on_action = on_adventurer_ai_new_employer_arrival - on_arrival_destinations = last - } - } - else = { - trigger_event = { on_action = on_adventurer_ai_new_employer_arrival } - } - } - } - else = { # Find a new kingdom if noone would hire you - set_variable = { - name = remaining_contract_counter - value = 0 - } - set_variable = { - name = remaining_employer_counter - value = 0 - } - } - story_owner = { - domicile = { # the AI doesn't have to know how to use provisions efficiently, so just add a couple so that they don't suicide - if = { - limit = { provisions < max_provisions } - change_provisions = max_provisions - } - } - } -} - -ep3_adventurer_ai_contract_find_next_contract_effect = { - save_scope_as = story - story_owner = { - location.barony.de_jure_liege.holder ?= { save_scope_as = new_employer } - # Create new contract - if = { - limit = { exists = scope:new_employer } - if = { # Mercenaries - limit = { - has_realm_law = camp_purpose_mercenaries - NOR = { - has_relation_rival = scope:new_employer - scope:new_employer = { - any_war_enemy = { - OR = { - is_consort_of = scope:story.story_owner - is_close_family_of = scope:story.story_owner - is_allied_to = scope:story.story_owner - has_relation_friend = scope:story.story_owner - } - } - } - } - can_create_task_contract = { - type_name = laamp_join_war_contract - employer = scope:new_employer - } - } - create_task_contract = { - task_contract_type = laamp_join_war_contract - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - else = { - random_list = { - ### DIPLOMACY - 10 = { - trigger = { - can_create_task_contract = { - type_name = laamp_base_0001 - employer = scope:new_employer - } - } - modifier = { - diplomacy != 0 - factor = diplomacy - } - create_task_contract = { - task_contract_type = laamp_base_0001 - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - 10 = { - trigger = { - can_create_task_contract = { - type_name = laamp_base_0011 - employer = scope:new_employer - } - } - modifier = { - diplomacy != 0 - factor = diplomacy - } - create_task_contract = { - task_contract_type = laamp_base_0011 - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - 10 = { - trigger = { - can_create_task_contract = { - type_name = laamp_base_0021 - employer = scope:new_employer - } - } - modifier = { - diplomacy != 0 - factor = diplomacy - } - create_task_contract = { - task_contract_type = laamp_base_0021 - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - 10 = { - trigger = { - can_create_task_contract = { - type_name = laamp_base_0031 - employer = scope:new_employer - } - } - modifier = { - diplomacy != 0 - factor = diplomacy - } - create_task_contract = { - task_contract_type = laamp_base_0031 - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - 10 = { - trigger = { - can_create_task_contract = { - type_name = laamp_base_0041 - employer = scope:new_employer - } - } - modifier = { - diplomacy != 0 - factor = diplomacy - } - create_task_contract = { - task_contract_type = laamp_base_0041 - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - ### MARTIAL - 10 = { - trigger = { - can_create_task_contract = { - type_name = laamp_base_1011 - employer = scope:new_employer - } - } - modifier = { - martial != 0 - factor = martial - } - create_task_contract = { - task_contract_type = laamp_base_1011 - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - #deprecated contract - 0 = { - trigger = { - can_create_task_contract = { - type_name = laamp_base_1021 - employer = scope:new_employer - } - } - modifier = { - martial != 0 - factor = martial - } - create_task_contract = { - task_contract_type = laamp_base_1021 - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - #deprecated contract - 0 = { - trigger = { - can_create_task_contract = { - type_name = laamp_base_1031 - employer = scope:new_employer - } - } - modifier = { - martial != 0 - factor = martial - } - create_task_contract = { - task_contract_type = laamp_base_1031 - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - 10 = { - trigger = { - can_create_task_contract = { - type_name = laamp_base_1041 - employer = scope:new_employer - } - } - modifier = { - martial != 0 - factor = martial - } - create_task_contract = { - task_contract_type = laamp_base_1041 - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - ### STEWARDSHIP - 10 = { - trigger = { - can_create_task_contract = { - type_name = laamp_base_2001 - employer = scope:new_employer - } - } - modifier = { - stewardship != 0 - factor = stewardship - } - create_task_contract = { - task_contract_type = laamp_base_2001 - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - 10 = { - trigger = { - can_create_task_contract = { - type_name = laamp_base_2011 - employer = scope:new_employer - } - } - modifier = { - stewardship != 0 - factor = stewardship - } - create_task_contract = { - task_contract_type = laamp_base_2011 - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - 10 = { - trigger = { - can_create_task_contract = { - type_name = laamp_base_2021 - employer = scope:new_employer - } - } - modifier = { - stewardship != 0 - factor = stewardship - } - create_task_contract = { - task_contract_type = laamp_base_2021 - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - 10 = { - trigger = { - can_create_task_contract = { - type_name = laamp_base_2031 - employer = scope:new_employer - } - } - modifier = { - stewardship != 0 - factor = stewardship - } - create_task_contract = { - task_contract_type = laamp_base_2031 - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - 10 = { - trigger = { - can_create_task_contract = { - type_name = laamp_base_2041 - employer = scope:new_employer - } - } - modifier = { - stewardship != 0 - factor = stewardship - } - create_task_contract = { - task_contract_type = laamp_base_2041 - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - ### INTRIGUE - 10 = { - trigger = { - can_create_task_contract = { - type_name = laamp_base_3001 - employer = scope:new_employer - } - } - modifier = { - intrigue != 0 - factor = intrigue - } - create_task_contract = { - task_contract_type = laamp_base_3001 - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - 10 = { - trigger = { - can_create_task_contract = { - type_name = laamp_base_3011 - employer = scope:new_employer - } - } - modifier = { - intrigue != 0 - factor = intrigue - } - create_task_contract = { - task_contract_type = laamp_base_3011 - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - 10 = { - trigger = { - can_create_task_contract = { - type_name = laamp_base_3021 - employer = scope:new_employer - } - } - modifier = { - intrigue != 0 - factor = intrigue - } - create_task_contract = { - task_contract_type = laamp_base_3021 - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - 10 = { - trigger = { - can_create_task_contract = { - type_name = laamp_base_3031 - employer = scope:new_employer - } - } - modifier = { - intrigue != 0 - factor = intrigue - } - create_task_contract = { - task_contract_type = laamp_base_3031 - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - 10 = { - trigger = { - can_create_task_contract = { - type_name = laamp_base_3041 - employer = scope:new_employer - } - } - modifier = { - intrigue != 0 - factor = intrigue - } - create_task_contract = { - task_contract_type = laamp_base_3041 - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - ### LEARNING - 10 = { - trigger = { - can_create_task_contract = { - type_name = laamp_base_4001 - employer = scope:new_employer - } - } - modifier = { - learning != 0 - factor = learning - } - create_task_contract = { - task_contract_type = laamp_base_4001 - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - 10 = { - trigger = { - can_create_task_contract = { - type_name = laamp_base_4011 - employer = scope:new_employer - } - } - modifier = { - learning != 0 - factor = learning - } - create_task_contract = { - task_contract_type = laamp_base_4011 - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - 10 = { - trigger = { - can_create_task_contract = { - type_name = laamp_base_4021 - employer = scope:new_employer - } - } - modifier = { - learning != 0 - factor = learning - } - create_task_contract = { - task_contract_type = laamp_base_4021 - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - 10 = { - trigger = { - can_create_task_contract = { - type_name = laamp_base_4031 - employer = scope:new_employer - } - } - modifier = { - learning != 0 - factor = learning - } - create_task_contract = { - task_contract_type = laamp_base_4031 - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - 10 = { - trigger = { - can_create_task_contract = { - type_name = laamp_base_4041 - employer = scope:new_employer - } - } - modifier = { - learning != 0 - factor = learning - } - create_task_contract = { - task_contract_type = laamp_base_4041 - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - ### PROWESS - #deprecated contract - 0 = { - trigger = { - can_create_task_contract = { - type_name = laamp_base_5001 - employer = scope:new_employer - } - } - modifier = { - prowess != 0 - factor = prowess - } - create_task_contract = { - task_contract_type = laamp_base_5001 - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - #deprecated contract - 0 = { - trigger = { - can_create_task_contract = { - type_name = laamp_base_5011 - employer = scope:new_employer - } - } - modifier = { - prowess != 0 - factor = prowess - } - create_task_contract = { - task_contract_type = laamp_base_5011 - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - #deprecated contract - 0 = { - trigger = { - can_create_task_contract = { - type_name = laamp_base_5021 - employer = scope:new_employer - } - } - modifier = { - prowess != 0 - factor = prowess - } - create_task_contract = { - task_contract_type = laamp_base_5021 - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - 10 = { - trigger = { - can_create_task_contract = { - type_name = laamp_base_5031 - employer = scope:new_employer - } - } - modifier = { - prowess != 0 - factor = prowess - } - create_task_contract = { - task_contract_type = laamp_base_5031 - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - #deprecated contract - 0 = { - trigger = { - can_create_task_contract = { - type_name = laamp_base_5041 - employer = scope:new_employer - } - } - modifier = { - prowess != 0 - factor = prowess - } - create_task_contract = { - task_contract_type = laamp_base_5041 - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - # JUSTICAR - 10 = { - trigger = { - can_create_task_contract = { - type_name = laamp_base_6001 - employer = scope:new_employer - } - } - modifier = { - prowess != 0 - factor = prowess - } - create_task_contract = { - task_contract_type = laamp_base_6001 - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - 10 = { - trigger = { - can_create_task_contract = { - type_name = laamp_base_6021 - employer = scope:new_employer - } - } - modifier = { - diplomacy != 0 - factor = diplomacy - } - create_task_contract = { - task_contract_type = laamp_base_6021 - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - 10 = { - trigger = { - can_create_task_contract = { - type_name = laamp_base_6031 - employer = scope:new_employer - } - } - modifier = { - prowess != 0 - factor = prowess - } - create_task_contract = { - task_contract_type = laamp_base_6031 - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - # EXTRA - 10 = { - trigger = { - can_create_task_contract = { - type_name = laamp_boost_legitimacy_contract - employer = scope:new_employer - } - } - modifier = { - diplomacy != 0 - factor = diplomacy - } - create_task_contract = { - task_contract_type = laamp_boost_legitimacy_contract - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - 10 = { - trigger = { - can_create_task_contract = { - type_name = laamp_rid_councillor_contract - employer = scope:new_employer - } - } - modifier = { - martial != 0 - factor = martial - } - create_task_contract = { - task_contract_type = laamp_rid_councillor_contract - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - 10 = { - trigger = { - can_create_task_contract = { - type_name = laamp_gain_wanderer_contract - employer = scope:new_employer - } - } - modifier = { - martial != 0 - factor = martial - } - create_task_contract = { - task_contract_type = laamp_gain_wanderer_contract - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - 10 = { - trigger = { - can_create_task_contract = { - type_name = laamp_find_secret_contract - employer = scope:new_employer - } - } - modifier = { - intrigue != 0 - factor = intrigue - } - create_task_contract = { - task_contract_type = laamp_find_secret_contract - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - 10 = { - trigger = { - can_create_task_contract = { - type_name = laamp_eliminate_heir_contract - employer = scope:new_employer - } - } - modifier = { - intrigue != 0 - factor = intrigue - } - create_task_contract = { - task_contract_type = laamp_eliminate_heir_contract - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - 250 = { - trigger = { - can_create_task_contract = { - type_name = laamp_steal_artifact_contract - employer = scope:new_employer - } - } - create_task_contract = { - task_contract_type = laamp_steal_artifact_contract - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - 250 = { - trigger = { - can_create_task_contract = { - type_name = laamp_construction_contract - employer = scope:new_employer - } - } - create_task_contract = { - task_contract_type = laamp_construction_contract - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - 250 = { - trigger = { - can_create_task_contract = { - type_name = laamp_cultural_minority_contract - employer = scope:new_employer - } - } - create_task_contract = { - task_contract_type = laamp_cultural_minority_contract - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - 250 = { - trigger = { - can_create_task_contract = { - type_name = laamp_religious_minority_contract - employer = scope:new_employer - } - } - create_task_contract = { - task_contract_type = laamp_religious_minority_contract - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - 250 = { - trigger = { - can_create_task_contract = { - type_name = laamp_prison_break_contract - employer = scope:new_employer - } - } - create_task_contract = { - task_contract_type = laamp_prison_break_contract - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - 250 = { - trigger = { - can_create_task_contract = { - type_name = laamp_join_faction_contract - employer = scope:new_employer - } - } - create_task_contract = { - task_contract_type = laamp_join_faction_contract - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - 250 = { - trigger = { - can_create_task_contract = { - type_name = laamp_help_faith_conversion_contract - employer = scope:new_employer - } - } - create_task_contract = { - task_contract_type = laamp_help_faith_conversion_contract - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - 250 = { - trigger = { - can_create_task_contract = { - type_name = laamp_fight_faith_conversion_contract - employer = scope:new_employer - } - } - create_task_contract = { - task_contract_type = laamp_fight_faith_conversion_contract - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - 250 = { - trigger = { - can_create_task_contract = { - type_name = laamp_help_find_secrets_contract - employer = scope:new_employer - } - } - create_task_contract = { - task_contract_type = laamp_help_find_secrets_contract - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - 250 = { - trigger = { - can_create_task_contract = { - type_name = laamp_help_fabricate_claim_contract - employer = scope:new_employer - } - } - create_task_contract = { - task_contract_type = laamp_help_fabricate_claim_contract - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - 250 = { - trigger = { - can_create_task_contract = { - type_name = laamp_help_increase_control_contract - employer = scope:new_employer - } - } - create_task_contract = { - task_contract_type = laamp_help_increase_control_contract - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - # MERCENARY - 500 = { - trigger = { - has_realm_law = camp_purpose_mercenaries - can_create_task_contract = { - type_name = laamp_raid_contract - employer = scope:new_employer - } - } - create_task_contract = { - task_contract_type = laamp_raid_contract - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - 500 = { - trigger = { - has_realm_law = camp_purpose_mercenaries - can_create_task_contract = { - type_name = laamp_join_war_contract - employer = scope:new_employer - } - } - create_task_contract = { - task_contract_type = laamp_join_war_contract - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - 500 = { - trigger = { - has_realm_law = camp_purpose_mercenaries - can_create_task_contract = { - type_name = laamp_help_claimant_contract - employer = scope:new_employer - } - } - create_task_contract = { - task_contract_type = laamp_help_claimant_contract - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - 500 = { - trigger = { - has_realm_law = camp_purpose_legitimists - can_create_task_contract = { - type_name = laamp_legitimist_support_contract - employer = scope:new_employer - } - } - create_task_contract = { - task_contract_type = laamp_legitimist_support_contract - task_contract_tier = scope:new_employer.task_contract_tier_value - location = scope:new_employer.capital_province - task_contract_employer = scope:new_employer - } - } - } - } - # Save contract - random_available_task_contract = { save_scope_as = contract } - } - } - # Take contract - if = { - limit = { exists = scope:contract } - # Save active employer - if = { - limit = { NOT = { exists = scope:story.var:active_employer } } - set_variable = { - name = active_employer - value = scope:new_employer - } - } - story_owner = { accept_task_contract = scope:contract } - # Save contract for debugging for easy reference - set_variable = { - name = active_contract - value = scope:contract - } - } - # Change remaining contract counter - change_variable = { - name = remaining_contract_counter - add = -1 - } -} - -ep3_adventurer_ai_contract_find_next_kingdom_effect = { - save_scope_as = story - # Save previous kingdom for easy reference - var:previous_kingdom ?= { save_scope_as = previous_kingdom } - # Find de jure kingdom neighboring active kingdom - var:active_kingdom ?= { - save_scope_as = current_kingdom - # If we've pre-scripted story content, stay in our current kingdom. - if = { - limit = { - scope:story.story_owner = { has_character_flag = laamp_stay_same_kingdom } - } - save_scope_as = new_kingdom - } - # If we're an explorer, go further afield. - else_if = { - limit = { - scope:story.story_owner = { - OR = { - has_realm_law = camp_purpose_explorers - #Normans gonna Norman - AND = { - culture = { has_cultural_parameter = much_more_likely_to_be_laamps } - #But not all of them... - ai_boldness >= high_positive_ai_value - ai_energy >= high_positive_ai_value - } - #Vikings gonna Viking - AND = { - culture = { - has_cultural_parameter = more_likely_to_be_laamps - has_cultural_parameter = unlock_maa_varangian_veterans - } - religion = { is_in_family = rf_pagan } - #But not all of them... - ai_greed >= 0 - } - } - } - } - empire = { - random_title_to_title_neighboring_and_across_water_empire = { - weight = { - base = 1 - ep3_adventurer_ai_contract_find_next_kingdom_modifier = { ADVENTURER = scope:story.story_owner } - } - random_in_de_jure_hierarchy = { - continue = { tier > tier_kingdom } - limit = { tier = tier_kingdom } - weight = { - base = 1 - ep3_adventurer_ai_contract_find_next_kingdom_modifier = { ADVENTURER = scope:story.story_owner } - } - save_scope_as = new_kingdom - } - } - } - } - # Otherwise, we're not, so stay at home. - else = { - random_title_to_title_neighboring_and_across_water_kingdom = { - limit = { - save_temporary_scope_as = new_kingdom_temp - NOT = { # Prefer variety - scope:story = { - is_target_in_variable_list = { - name = recent_kingdoms - target = scope:new_kingdom_temp - } - } - } - any_title_to_title_neighboring_kingdom = { this = scope:current_kingdom } # Prefer to not sail - } - alternative_limit = { - any_title_to_title_neighboring_kingdom = { this = scope:current_kingdom } # Prefer to not sail - } - alternative_limit = { always = yes } - weight = { - base = 1 - # Prefer to stay around the same general area - modifier = { - scope:previous_kingdom ?= this - factor = 2 - } - modifier = { - scope:previous_kingdom.empire ?= this.empire - factor = 2 - } - modifier = { - scope:current_kingdom.empire ?= this.empire - factor = 2 - } - ep3_adventurer_ai_contract_find_next_kingdom_modifier = { ADVENTURER = scope:story.story_owner } - } - save_scope_as = new_kingdom - } - } - } - if = { - limit = { - NOT = { exists = scope:new_kingdom } - } - story_owner.location.empire ?= { - random_direct_de_jure_vassal_title = { - limit = { - this != scope:current_kingdom - } - alternative_limit = { always = yes } - weight = { - base = 1 - # Prefer to stay around the same general area - modifier = { - scope:previous_kingdom ?= this - factor = 2 - } - modifier = { - scope:previous_kingdom.empire ?= this.empire - factor = 2 - } - modifier = { - scope:current_kingdom.empire ?= this.empire - factor = 2 - } - ep3_adventurer_ai_contract_find_next_kingdom_modifier = { ADVENTURER = scope:story.story_owner } - } - save_scope_as = new_kingdom - } - } - } - else_if = { - limit = { - NOT = { exists = scope:new_kingdom } - } - random_empire = { - limit = { - is_landless_type_title = no - any_direct_de_jure_vassal_title = { is_landless_type_title = no } - } - random_direct_de_jure_vassal_title = { - limit = { - this != scope:current_kingdom - is_landless_type_title = no - } - alternative_limit = { is_landless_type_title = no } - weight = { - base = 1 - # Prefer to stay around the same general area - modifier = { - scope:previous_kingdom ?= this - factor = 2 - } - modifier = { - scope:previous_kingdom.empire ?= this.empire - factor = 2 - } - modifier = { - scope:current_kingdom.empire ?= this.empire - factor = 2 - } - ep3_adventurer_ai_contract_find_next_kingdom_modifier = { ADVENTURER = scope:story.story_owner } - } - save_scope_as = new_kingdom - } - } - } - if = { - limit = { exists = scope:new_kingdom } - # Save previous kingdom for checks and debugging - set_variable = { - name = previous_kingdom - value = scope:current_kingdom - } - add_to_variable_list = { - name = recent_kingdoms - target = scope:current_kingdom - years = 2 - } - # Save active kingdom - set_variable = { - name = active_kingdom - value = scope:new_kingdom - } - # Reset contract counter - set_variable = { - name = remaining_contract_counter - value = { - integer_range = { - min = ep3_adventurer_ai_contracts_per_employer_min_value - max = ep3_adventurer_ai_contracts_per_employer_max_value - } - } - } - # Reset employer counter - set_variable = { - name = remaining_employer_counter - value = { - integer_range = { - min = ep3_adventurer_ai_employers_per_kingdom_min_value - max = ep3_adventurer_ai_employers_per_kingdom_max_value - } - } - } - # Edge case logic for Hereward. - scope:new_kingdom = { - if = { - limit = { - character:90028 ?= scope:story.story_owner - this = scope:current_kingdom - } - random_list = { - 1 = { - trigger = { - NOT = { province:1525 = scope:story.story_owner.domicile.domicile_location } - } - province:1525 = { save_scope_as = destination_province } - } - 1 = { - trigger = { - NOT = { province:1534 = scope:story.story_owner.domicile.domicile_location } - } - province:1534 = { save_scope_as = destination_province } - } - 1 = { - trigger = { - NOT = { province:1535 = scope:story.story_owner.domicile.domicile_location } - } - province:1535 = { save_scope_as = destination_province } - } - 1 = { - trigger = { - NOT = { province:1536 = scope:story.story_owner.domicile.domicile_location } - } - province:1536 = { save_scope_as = destination_province } - } - 1000 = { - trigger = { - NOT = { province:1537 = scope:story.story_owner.domicile.domicile_location } - } - province:1537 = { save_scope_as = destination_province } - } - 1 = { - trigger = { - NOT = { province:1541 = scope:story.story_owner.domicile.domicile_location } - } - province:1541 = { save_scope_as = destination_province } - } - 1 = { - trigger = { - NOT = { province:1542 = scope:story.story_owner.domicile.domicile_location } - } - province:1542 = { save_scope_as = destination_province } - } - 1 = { - trigger = { - NOT = { province:1584 = scope:story.story_owner.domicile.domicile_location } - } - province:1584 = { save_scope_as = destination_province } - } - 1 = { - trigger = { - NOT = { province:1585 = scope:story.story_owner.domicile.domicile_location } - } - province:1585 = { save_scope_as = destination_province } - } - 1 = { - trigger = { - NOT = { province:1601 = scope:story.story_owner.domicile.domicile_location } - } - province:1601 = { save_scope_as = destination_province } - } - } - } - else_if = { - limit = { this = scope:current_kingdom } - random_de_jure_county = { - limit = { - title_province != scope:story.story_owner.domicile.domicile_location - } - title_province = { save_scope_as = destination_province } - } - } - else = { - title_capital_county.title_province = { save_scope_as = destination_province } - } - } - # Travel - story_owner = { - domicile = { # the AI doesn't have to know how to use provisions efficiently, so just add a couple so that they don't suicide - if = { - limit = { provisions < max_provisions } - change_provisions = max_provisions - } - } - start_travel_plan = { - destination = scope:destination_province - travel_with_domicile = yes - return_trip = no - on_arrival_on_action = on_adventurer_ai_new_kingdom_arrival - on_arrival_destinations = last - } - } - } - story_owner = { - # Military Upgrades - if = { - limit = { - is_at_war = no - OR = { - has_realm_law = camp_purpose_mercenaries - has_realm_law = camp_purpose_brigands - has_realm_law = camp_purpose_legitimists - } - } - while = { - count = 5 - random_maa_regiment = { - limit = { maa_current_troops_count < maa_max_troops_count } - change_maa_troops_count = replenishable_troops_value - } - } - random_maa_regiment = { - limit = { can_upgrade_maa = yes } - change_maa_regiment_size = { - size = 1 - reinforce = yes - } - } - if = { - limit = { - OR = { - has_realm_law = camp_purpose_mercenaries - has_realm_law = camp_purpose_legitimists - } - } - random_maa_regiment = { - limit = { can_upgrade_maa = yes } - change_maa_regiment_size = { - size = 1 - reinforce = yes - } - } - } - if = { - limit = { has_realm_law = camp_purpose_mercenaries } - random_maa_regiment = { - limit = { can_upgrade_maa = yes } - change_maa_regiment_size = { - size = 1 - reinforce = yes - } - } - } - } - } -} - -# Move adventurer to the war target, if necessary -# ADVENTURER = character -# WAR_TARGET = character -ep3_adventurer_ai_war_travel_effect = { - $ADVENTURER$.domicile.domicile_location = { save_scope_as = current_location } # Since passed scopes can't be used in square_distance - $WAR_TARGET$ = { # Find closest neighboring realm, and its closest county, to you, and go there - ordered_neighboring_and_across_water_top_liege_realm_owner = { - limit = { - # Always prefer not across water, but allow it in edge cases - save_temporary_scope_as = war_neighbour_temp - $WAR_TARGET$ = { - any_neighboring_top_liege_realm_owner = { this = scope:war_neighbour_temp } - } - } - alternative_limit = { always = yes } - order_by = { - value = 0 - subtract = "capital_county.squared_distance(scope:current_location)" - } - save_scope_as = war_neighbour - ordered_sub_realm_county = { - limit = { - any_neighboring_county = { - holder ?= { - OR = { - this = $WAR_TARGET$ - target_is_liege_or_above = $WAR_TARGET$ - } - } - } - } - order_by = { - value = 0 - subtract = "title_province.squared_distance(scope:current_location)" - } - save_scope_as = war_stage - } - } - } - save_scope_value_as = { # Approx provisions for journey - name = lammp_travel_provisions - value = { - value = "scope:current_location.squared_distance(scope:war_stage.title_province)" - divide = 300 - } - } - $ADVENTURER$ = { - domicile = { # the AI doesn't have to know how to use provisions efficiently, so just add a couple so that they don't suicide - if = { - limit = { provisions < scope:lammp_travel_provisions } - change_provisions = scope:lammp_travel_provisions - } - } - start_travel_plan = { - destination = scope:war_stage.title_province - travel_with_domicile = yes - players_use_planner = no - return_trip = no - on_arrival_destinations = all - on_arrival_on_action = on_adventurer_ai_war_target_arrival - } - } -} - -# Adventurer declares war on target, if possible -# ADVENTURER = character -# WAR_TARGET = character -ep3_adventurer_ai_war_declare_effect = { - $ADVENTURER$ = { - if = { - limit = { has_realm_law = camp_purpose_legitimists } - if = { - limit = { - $WAR_TARGET$ = { - ep3_adventurer_ai_valid_legitimist_target_trigger = { ADVENTURER = $ADVENTURER$ } - } - } - ordered_claim = { - limit = { - tier >= tier_kingdom - holder = $WAR_TARGET$ - } - order_by = tier - save_scope_as = claim - } - start_war = { - target = $WAR_TARGET$ - casus_belli = claim_cb - claimant = $ADVENTURER$ - target_title = scope:claim - } - } - } - else_if = { - limit = { - has_cb_on = { - target = $WAR_TARGET$ - casus_belli = ep3_laamp_adventurer_empire_invasion - } - } - start_war = { - target = $WAR_TARGET$ - casus_belli = ep3_laamp_adventurer_empire_invasion - } - } - else_if = { - limit = { - has_cb_on = { - target = $WAR_TARGET$ - casus_belli = ep3_laamp_adventurer_kingdom_invasion - } - } - start_war = { - target = $WAR_TARGET$ - casus_belli = ep3_laamp_adventurer_kingdom_invasion - } - } - else_if = { - limit = { - has_cb_on = { - target = $WAR_TARGET$ - casus_belli = ep3_laamp_adventurer_duchy_invasion - } - } - $WAR_TARGET$ = { # Grab an appropriate Duchy - random_sub_realm_duchy = { - limit = { - any_in_de_jure_hierarchy = { # At least 2 counties - continue = { tier > tier_county } - count >= 2 - tier = tier_county - holder ?= { - OR = { - this = $WAR_TARGET$ - is_vassal_or_below_of = $WAR_TARGET$ - } - } - } - any_in_de_jure_hierarchy = { # And either coastal or bordering another realm (otherwise it'll look u g l y) - continue = { tier > tier_county } - tier = tier_county - holder ?= { - OR = { - this = $WAR_TARGET$ - is_vassal_or_below_of = $WAR_TARGET$ - } - } - OR = { - is_coastal_county = yes - any_neighboring_county = { - NOT = { - holder.top_liege = $WAR_TARGET$.top_liege - } - } - } - } - } - save_scope_as = target_title - } - } - start_war = { - target = $WAR_TARGET$ - casus_belli = ep3_laamp_adventurer_duchy_invasion - target_title = scope:target_title - } - } - else = { - $WAR_TARGET$ = { # Grab an appropriate Duchy - random_sub_realm_county = { - limit = { - OR = { - is_coastal_county = yes - any_neighboring_county = { - NOT = { - holder.top_liege = $WAR_TARGET$.top_liege - } - } - } - } - save_scope_as = target_title - } - } - start_war = { - target = $WAR_TARGET$ - casus_belli = ep3_laamp_adventurer_county_invasion - target_title = scope:target_title - } - } - } -} - -# Find a target for adventurer to attack -ep3_adventurer_ai_war_find_target_effect = { - save_scope_as = story - set_variable = { - name = remaining_contract_counter - value = 0 - } - set_variable = { - name = remaining_employer_counter - value = 0 - } - story_owner.domicile.domicile_location = { save_scope_as = current_location } - if = { - limit = { - story_owner = { - has_realm_law = camp_purpose_legitimists - any_claim = { - holder = { - ep3_adventurer_ai_valid_legitimist_target_trigger = { ADVENTURER = scope:story.story_owner } - } - } - } - } - story_owner = { - ordered_claim = { - limit = { - holder = { - ep3_adventurer_ai_valid_legitimist_target_trigger = { ADVENTURER = scope:story.story_owner } - } - } - order_by = tier - holder = { save_scope_as = war_target } - } - } - } - else = { - every_independent_ruler = { - limit = { - ep3_adventurer_ai_valid_war_target_trigger = { ADVENTURER = scope:story.story_owner } - } - add_to_list = potential_war_targets - } - random_in_list = { - list = potential_war_targets - limit = { - save_temporary_scope_as = war_target_temp - scope:story.story_owner = { - any_claim = { - holder ?= scope:war_target_temp - target_is_de_jure_liege_or_above = scope:war_target_temp.primary_title - } - } - } - alternative_limit = { - primary_title = { - any_in_de_facto_hierarchy = { - tier = tier_empire - save_temporary_scope_as = war_target_title_temp - } - } - scope:story.story_owner = { - can_declare_war = { - defender = scope:war_target_temp - casus_belli = ep3_laamp_adventurer_empire_invasion - target_titles = { scope:war_target_title_temp } - } - } - } - alternative_limit = { - primary_title = { - any_in_de_facto_hierarchy = { - tier = tier_kingdom - save_temporary_scope_as = war_target_title_temp - } - } - scope:story.story_owner = { - can_declare_war = { - defender = scope:war_target_temp - casus_belli = ep3_laamp_adventurer_kingdom_invasion - target_titles = { scope:war_target_title_temp } - } - } - } - alternative_limit = { - primary_title = { - any_in_de_facto_hierarchy = { - tier = tier_duchy - save_temporary_scope_as = war_target_title_temp - } - } - scope:story.story_owner = { - can_declare_war = { - defender = scope:war_target_temp - casus_belli = ep3_laamp_adventurer_duchy_invasion - target_titles = { scope:war_target_title_temp } - } - } - } - alternative_limit = { - any_sub_realm_county = { - count >= 1 - save_temporary_scope_as = war_target_title_temp - } - } - weight = { - base = 10000 - modifier = { - add = { - value = current_strength_with_allies_value - multiply = -2 - } - } - modifier = { - is_at_war = yes - add = 250 - } - modifier = { - add = { - value = "capital_county.squared_distance(scope:story.story_owner.domicile.domicile_location)" - multiply = -1 - } - } - modifier = { - add = { - value = "reverse_opinion(scope:story.story_owner)" - multiply = 2 - } - } - modifier = { - scope:story.story_owner = { - any_claim = { - holder ?= { - OR = { - this = scope:war_target_temp - target_is_liege_or_above = scope:war_target_temp - } - } - } - } - add = 500 - } - } - save_scope_as = war_target - } - } - if = { - limit = { exists = scope:war_target } - set_variable = { # Save war target - name = war_target_realm - value = scope:war_target.primary_title - months = 6 - } - set_variable = { # Save travel/declare attempts count to safeguard against loops - name = war_target_attempts - value = 0 - } - story_owner = { - trigger_event = { on_action = on_adventurer_ai_war_target_arrival } - } - } -} diff --git a/N3OW/common/scripted_effects/07_frankokratia_scripted_effects.txt b/N3OW/common/scripted_effects/07_frankokratia_scripted_effects.txt deleted file mode 100644 index 7d30cd1d..00000000 --- a/N3OW/common/scripted_effects/07_frankokratia_scripted_effects.txt +++ /dev/null @@ -1,7028 +0,0 @@ -ep3_frankokratia_save_financier_effect = { - #Start with Venice, then any Italian republic - title:e_italy = { - random_in_de_jure_hierarchy = { - limit = { - this = title:k_venice - title:k_venice.holder = { - ep3_frankokratia_financier_trigger = yes - government_has_flag = government_is_republic - } - } - alternative_limit = { - NOT = { this = title:k_venice } - holder ?= { - highest_held_title_tier >= tier_county - government_has_flag = government_is_republic - ep3_frankokratia_financier_trigger = yes - } - } - holder = { save_scope_as = financier } - } - } - #A Sicilian coastal republic - if = { - limit = { - NOT = { exists = scope:financier } - } - title:k_sicily = { - random_in_de_jure_hierarchy = { - limit = { - holder ?= { - highest_held_title_tier >= tier_county - government_has_flag = government_is_republic - ep3_frankokratia_financier_trigger = yes - } - } - holder = { save_scope_as = financier } - } - } - } - #A Croatian coastal republic - if = { - limit = { - NOT = { exists = scope:financier } - } - title:k_croatia = { - random_in_de_jure_hierarchy = { - limit = { - holder ?= { - highest_held_title_tier >= tier_county - government_has_flag = government_is_republic - ep3_frankokratia_financier_trigger = yes - } - } - holder = { save_scope_as = financier } - } - } - } - #A Burgundian coastal republic - if = { - limit = { - NOT = { exists = scope:financier } - } - title:k_burgundy = { - random_in_de_jure_hierarchy = { - limit = { - holder ?= { - highest_held_title_tier >= tier_county - government_has_flag = government_is_republic - ep3_frankokratia_financier_trigger = yes - } - } - holder = { save_scope_as = financier } - } - } - } - #An Aquitainian coastal republic - if = { - limit = { - NOT = { exists = scope:financier } - } - title:k_aquitaine = { - random_in_de_jure_hierarchy = { - limit = { - holder ?= { - highest_held_title_tier >= tier_county - government_has_flag = government_is_republic - ep3_frankokratia_financier_trigger = yes - } - } - holder = { save_scope_as = financier } - } - } - } - #An Iberian coastal republic - if = { - limit = { - NOT = { exists = scope:financier } - } - title:e_spain = { - random_in_de_jure_hierarchy = { - limit = { - holder ?= { - highest_held_title_tier >= tier_county - government_has_flag = government_is_republic - ep3_frankokratia_financier_trigger = yes - } - } - holder = { save_scope_as = financier } - } - } - } - #A wealthy Italian ruler - if = { - limit = { - NOT = { exists = scope:financier } - } - title:e_italy = { - random_in_de_jure_hierarchy = { - limit = { - holder ?= { - highest_held_title_tier >= tier_county - highest_held_title_tier < tier_empire - ep3_frankokratia_financier_trigger = yes - } - } - holder = { save_scope_as = financier } - } - } - } - #A wealthy Sicilian ruler - if = { - limit = { - NOT = { exists = scope:financier } - } - title:k_sicily = { - random_in_de_jure_hierarchy = { - limit = { - holder ?= { - highest_held_title_tier >= tier_county - highest_held_title_tier < tier_empire - ep3_frankokratia_financier_trigger = yes - } - } - holder = { save_scope_as = financier } - } - } - } - #A wealthy Croatian ruler - if = { - limit = { - NOT = { exists = scope:financier } - } - title:k_croatia = { - random_in_de_jure_hierarchy = { - limit = { - holder ?= { - highest_held_title_tier >= tier_county - highest_held_title_tier < tier_empire - ep3_frankokratia_financier_trigger = yes - } - } - holder = { save_scope_as = financier } - } - } - } - #Make sure they have enough money to be a financier - hidden_effect = { - scope:financier = { - add_gold = 500 - } - } -} - -ep3_frankokratia_story_setup_save_vars_effect = { - #save variables for the story - set_variable = { - name = ghw_sponsor - value = scope:ghw_sponsor - } - set_variable = { - name = financier_title - value = scope:financier.primary_title - } - set_variable = { - name = byz_emperor - value = scope:byz_emperor - } - set_variable = { - name = byz_claimant - value = scope:byz_claimant - } - scope:byz_claimant = { - add_character_flag = byz_claimant_flag - } -} - -ep3_frankokratia_remove_pledged_attackers_effect = { - global_var:byz_claimant_champion ?= { - #save neeeded scopes - save_scope_as = byz_claimant_champion - random_owned_story = { - type = frankokratia_story - limit = { - exists = var:byz_claimant - } - var:byz_claimant = { - save_scope_as = byz_claimant - } - } - #Start war - start_war = { - casus_belli = crusading_claim_cb - target = title:e_byzantium.holder - claimant = scope:byz_claimant - target_title = title:e_byzantium - } - random_character_war = { - limit = { using_cb = crusading_claim_cb } - save_scope_as = frankokratia_war - } - #Add the claimant if they can join - if = { - limit = { - scope:byz_claimant = { is_ruler = yes } - } - scope:frankokratia_war = { - add_attacker = scope:byz_claimant - } - } - } - #Remove from GHW - if = { - limit = { - has_pledged_attacker = scope:byz_claimant_champion - } - unpledge_attacker = scope:byz_claimant_champion - } - if = { - limit = { - has_pledged_attacker = scope:byz_claimant - } - unpledge_attacker = scope:byz_claimant - } - #Redirected Crusader Fluff event - scope:byz_claimant_champion = { - trigger_event = ep3_frankokratia_events.0030 - } - #Do the same for all committed rulers - every_pledged_attacker = { - limit = { - has_character_flag = joining_frankokratia - this != root.faith.religious_head - } - #Unpledge from GHW - faith.great_holy_war = { - unpledge_attacker = prev - } - #ADD TO WAR - scope:frankokratia_war = { - add_attacker = prev - } - #Redirected Crusader Fluff event - trigger_event = ep3_frankokratia_events.0030 - } - scope:byz_claimant_champion = { - random_owned_story = { - type = frankokratia_story - if = { - limit = { - global_var:financier_title.holder ?= { - NOT = { - any_character_war = { - using_cb = crusading_claim_cb - } - } - } - } - scope:frankokratia_war = { - add_attacker = global_var:financier_title.holder - } - } - every_in_list = { - variable = frankokratia_leaders - limit = { - NOT = { - any_character_war = { - using_cb = crusading_claim_cb - } - } - is_ruler = yes - is_alive = yes - } - scope:frankokratia_war = { - add_attacker = prev - } - #Redirected Crusader Fluff event - trigger_event = ep3_frankokratia_events.0030 - } - } - } -} - -ep3_frankokratia_save_financier_sate_lands_effect = { - if = { - limit = { - any_realm_county = { - duchy = title:d_istria - NOT = { is_in_list = financier_sate_titles } - } - OR = { - #The duchy can be created - NOT = { exists = title:d_istria.holder } - #The duchy can be taken - title:d_istria.holder = { - is_vassal_or_below_of = title:e_byzantium.holder - is_ai = yes - NOT = { is_powerful_vassal_of = title:e_byzantium.holder } - NOT = { is_at_war_with = title:e_byzantium.holder } - } - } - } - title:d_istria = { save_scope_as = financier_sate_reward } - } - else_if = { - limit = { - any_realm_county = { - duchy = title:d_ragusa - NOT = { is_in_list = financier_sate_titles } - } - OR = { - #The duchy can be created - NOT = { exists = title:d_ragusa.holder } - #The duchy can be taken - title:d_ragusa.holder = { - is_vassal_or_below_of = title:e_byzantium.holder - is_ai = yes - NOT = { is_powerful_vassal_of = title:e_byzantium.holder } - NOT = { is_at_war_with = title:e_byzantium.holder } - } - } - } - title:d_dalmatia = { - save_scope_as = financier_sate_reward_duchy - add_to_list = financier_sate_titles - } - } - else_if = { - limit = { - any_realm_county = { - duchy = title:d_dalmatia - NOT = { is_in_list = financier_sate_titles } - } - OR = { - #The duchy can be created - NOT = { exists = title:d_dalmatia.holder } - #The duchy can be taken - title:d_dalmatia.holder = { - is_vassal_or_below_of = title:e_byzantium.holder - is_ai = yes - NOT = { is_powerful_vassal_of = title:e_byzantium.holder } - NOT = { is_at_war_with = title:e_byzantium.holder } - } - } - } - title:d_dalmatia = { - save_scope_as = financier_sate_reward_duchy - add_to_list = financier_sate_titles - } - } - else_if = { - limit = { - any_realm_county = { - duchy = title:d_cephalonia - NOT = { is_in_list = financier_sate_titles } - } - OR = { - #The duchy can be created - NOT = { exists = title:d_cephalonia.holder } - #The duchy can be taken - title:d_cephalonia.holder = { - is_vassal_or_below_of = title:e_byzantium.holder - is_ai = yes - NOT = { is_powerful_vassal_of = title:e_byzantium.holder } - NOT = { is_at_war_with = title:e_byzantium.holder } - } - } - } - title:d_cephalonia = { - save_scope_as = financier_sate_reward_duchy - add_to_list = financier_sate_titles - } - } - else_if = { - limit = { - any_realm_county = { - duchy = title:d_krete - NOT = { is_in_list = financier_sate_titles } - } - OR = { - #The duchy can be created - NOT = { exists = title:d_krete.holder } - #The duchy can be taken - title:d_krete.holder = { - is_vassal_or_below_of = title:e_byzantium.holder - is_ai = yes - NOT = { is_powerful_vassal_of = title:e_byzantium.holder } - NOT = { is_at_war_with = title:e_byzantium.holder } - } - } - } - title:d_krete = { - save_scope_as = financier_sate_reward_duchy - add_to_list = financier_sate_titles - } - } - else_if = { - limit = { - any_realm_county = { - duchy = title:d_cyprus - NOT = { is_in_list = financier_sate_titles } - } - OR = { - #The duchy can be created - NOT = { exists = title:d_cyprus.holder } - #The duchy can be taken - title:d_krete.holder = { - is_vassal_or_below_of = title:e_byzantium.holder - is_ai = yes - NOT = { is_powerful_vassal_of = title:e_byzantium.holder } - NOT = { is_at_war_with = title:e_byzantium.holder } - } - } - } - title:d_cyprus = { - save_scope_as = financier_sate_reward_duchy - add_to_list = financier_sate_titles - } - } - else_if = { - limit = { - any_realm_county = { - duchy = title:d_crimea - NOT = { is_in_list = financier_sate_titles } - } - OR = { - #The duchy can be created - NOT = { exists = title:d_crimea.holder } - #The duchy can be taken - title:d_crimea.holder = { - is_vassal_or_below_of = title:e_byzantium.holder - is_ai = yes - NOT = { is_powerful_vassal_of = title:e_byzantium.holder } - NOT = { is_at_war_with = title:e_byzantium.holder } - } - } - } - title:d_crimea = { - save_scope_as = financier_sate_reward_duchy - add_to_list = financier_sate_titles - } - } - #Moving on to counties they'd be interested in - else_if = { - limit = { - any_realm_county = { - NOT = { is_in_list = financier_sate_titles } - duchy = title:d_istria - has_coastal_province = yes - holder = { - is_ai = yes - NOT = { is_at_war_with = title:e_byzantium.holder } - } - } - } - random_realm_county = { - limit = { - NOT = { is_in_list = financier_sate_titles } - duchy = title:d_istria - has_coastal_province = yes - holder = { - is_ai = yes - NOT = { is_at_war_with = title:e_byzantium.holder } - } - } - save_scope_as = financier_sate_reward_county_1 - add_to_list = financier_sate_titles - } - } - else_if = { - limit = { - any_realm_county = { - NOT = { is_in_list = financier_sate_titles } - duchy = title:d_ragusa - has_coastal_province = yes - holder = { - is_ai = yes - NOT = { is_at_war_with = title:e_byzantium.holder } - } - } - } - random_realm_county = { - limit = { - NOT = { is_in_list = financier_sate_titles } - duchy = title:d_ragusa - has_coastal_province = yes - holder = { - is_ai = yes - NOT = { is_at_war_with = title:e_byzantium.holder } - } - } - if = { - limit = { exists = scope:financier_sate_reward_county_1 } - save_scope_as = financier_sate_reward_county_2 - } - else = { save_scope_as = financier_sate_reward_county_1 } - add_to_list = financier_sate_titles - } - } - else_if = { - limit = { - any_realm_county = { - NOT = { is_in_list = financier_sate_titles } - duchy = title:d_dalmatia - has_coastal_province = yes - holder = { - is_ai = yes - NOT = { is_at_war_with = title:e_byzantium.holder } - } - } - } - random_realm_county = { - limit = { - NOT = { is_in_list = financier_sate_titles } - duchy = title:d_dalmatia - has_coastal_province = yes - holder = { - is_ai = yes - NOT = { is_at_war_with = title:e_byzantium.holder } - } - } - if = { - limit = { exists = scope:financier_sate_reward_county_1 } - save_scope_as = financier_sate_reward_county_2 - } - else = { save_scope_as = financier_sate_reward_county_1 } - add_to_list = financier_sate_titles - } - } - else_if = { - limit = { - any_realm_county = { - NOT = { is_in_list = financier_sate_titles } - duchy = title:d_cephalonia - has_coastal_province = yes - holder = { - is_ai = yes - NOT = { is_at_war_with = title:e_byzantium.holder } - } - } - } - random_realm_county = { - limit = { - NOT = { is_in_list = financier_sate_titles } - duchy = title:d_cephalonia - has_coastal_province = yes - holder = { - is_ai = yes - NOT = { is_at_war_with = title:e_byzantium.holder } - } - } - if = { - limit = { exists = scope:financier_sate_reward_county_1 } - save_scope_as = financier_sate_reward_county_2 - } - else = { save_scope_as = financier_sate_reward_county_1 } - add_to_list = financier_sate_titles - } - } - else_if = { - limit = { - any_realm_county = { - NOT = { is_in_list = financier_sate_titles } - duchy = title:d_krete - has_coastal_province = yes - holder = { - is_ai = yes - NOT = { is_at_war_with = title:e_byzantium.holder } - } - } - } - random_realm_county = { - limit = { - NOT = { is_in_list = financier_sate_titles } - duchy = title:d_krete - has_coastal_province = yes - holder = { - is_ai = yes - NOT = { is_at_war_with = title:e_byzantium.holder } - } - } - if = { - limit = { exists = scope:financier_sate_reward_county_1 } - save_scope_as = financier_sate_reward_county_2 - } - else = { save_scope_as = financier_sate_reward_county_1 } - add_to_list = financier_sate_titles - } - } - - else_if = { - limit = { - any_realm_county = { - NOT = { is_in_list = financier_sate_titles } - duchy = title:d_cyprus - has_coastal_province = yes - holder = { - is_ai = yes - NOT = { is_at_war_with = title:e_byzantium.holder } - } - } - } - random_realm_county = { - limit = { - NOT = { is_in_list = financier_sate_titles } - duchy = title:d_cyprus - has_coastal_province = yes - holder = { - is_ai = yes - NOT = { is_at_war_with = title:e_byzantium.holder } - } - } - if = { - limit = { exists = scope:financier_sate_reward_county_1 } - save_scope_as = financier_sate_reward_county_2 - } - else = { save_scope_as = financier_sate_reward_county_1 } - add_to_list = financier_sate_titles - } - } - else_if = { - limit = { - any_realm_county = { - NOT = { is_in_list = financier_sate_titles } - duchy = title:d_crimea - has_coastal_province = yes - holder = { - is_ai = yes - NOT = { is_at_war_with = title:e_byzantium.holder } - } - } - } - random_realm_county = { - limit = { - NOT = { is_in_list = financier_sate_titles } - duchy = title:d_crimea - has_coastal_province = yes - holder = { - is_ai = yes - NOT = { is_at_war_with = title:e_byzantium.holder } - } - } - if = { - limit = { exists = scope:financier_sate_reward_county_1 } - save_scope_as = financier_sate_reward_county_2 - } - else = { save_scope_as = financier_sate_reward_county_1 } - add_to_list = financier_sate_titles - } - } - #Specific counties of interest - else_if = { - limit = { - any_realm_county = { - NOT = { is_in_list = financier_sate_titles } - this = title:c_zadar - holder = { - is_ai = yes - NOT = { is_at_war_with = title:e_byzantium.holder } - } - } - } - random_realm_county = { - limit = { - NOT = { is_in_list = financier_sate_titles } - this = title:c_zadar - holder = { - is_ai = yes - NOT = { is_at_war_with = title:e_byzantium.holder } - } - } - if = { - limit = { exists = scope:financier_sate_reward_county_1 } - save_scope_as = financier_sate_reward_county_2 - } - else = { save_scope_as = financier_sate_reward_county_1 } - add_to_list = financier_sate_titles - } - } - else_if = { - limit = { - any_realm_county = { - NOT = { is_in_list = financier_sate_titles } - this = title:c_cherso - holder = { - is_ai = yes - NOT = { is_at_war_with = title:e_byzantium.holder } - } - } - } - random_realm_county = { - limit = { - NOT = { is_in_list = financier_sate_titles } - this = title:c_cherso - holder = { - is_ai = yes - NOT = { is_at_war_with = title:e_byzantium.holder } - } - } - if = { - limit = { exists = scope:financier_sate_reward_county_1 } - save_scope_as = financier_sate_reward_county_2 - } - else = { save_scope_as = financier_sate_reward_county_1 } - add_to_list = financier_sate_titles - } - } - else_if = { - limit = { - any_realm_county = { - NOT = { is_in_list = financier_sate_titles } - this = title:c_dyrrachion - holder = { - is_ai = yes - NOT = { is_at_war_with = title:e_byzantium.holder } - } - } - } - random_realm_county = { - limit = { - NOT = { is_in_list = financier_sate_titles } - this = title:c_dyrrachion - holder = { - is_ai = yes - NOT = { is_at_war_with = title:e_byzantium.holder } - } - } - if = { - limit = { exists = scope:financier_sate_reward_county_1 } - save_scope_as = financier_sate_reward_county_2 - } - else = { save_scope_as = financier_sate_reward_county_1 } - add_to_list = financier_sate_titles - } - } - else_if = { - limit = { - any_realm_county = { - NOT = { is_in_list = financier_sate_titles } - this = title:c_euboea - holder = { - is_ai = yes - NOT = { is_at_war_with = title:e_byzantium.holder } - } - } - } - random_realm_county = { - limit = { - NOT = { is_in_list = financier_sate_titles } - this = title:c_euboea - holder = { - is_ai = yes - NOT = { is_at_war_with = title:e_byzantium.holder } - } - } - if = { - limit = { exists = scope:financier_sate_reward_county_1 } - save_scope_as = financier_sate_reward_county_2 - } - else = { save_scope_as = financier_sate_reward_county_1 } - add_to_list = financier_sate_titles - } - } - else_if = { - limit = { - any_realm_county = { - NOT = { is_in_list = financier_sate_titles } - this = title:c_messenia - holder = { - is_ai = yes - NOT = { is_at_war_with = title:e_byzantium.holder } - } - } - } - random_realm_county = { - limit = { - NOT = { is_in_list = financier_sate_titles } - this = title:c_messenia - holder = { - is_ai = yes - NOT = { is_at_war_with = title:e_byzantium.holder } - } - } - if = { - limit = { exists = scope:financier_sate_reward_county_1 } - save_scope_as = financier_sate_reward_county_2 - } - else = { save_scope_as = financier_sate_reward_county_1 } - add_to_list = financier_sate_titles - } - } - #Grab any coastal county - else_if = { - limit = { - any_realm_county = { - NOT = { is_in_list = financier_sate_titles } - has_coastal_province = yes - holder = { - is_ai = yes - NOT = { is_at_war_with = title:e_byzantium.holder } - } - } - } - random_realm_county = { - limit = { - NOT = { is_in_list = financier_sate_titles } - has_coastal_province = yes - holder = { - is_ai = yes - NOT = { - is_at_war_with = title:e_byzantium.holder - } - } - } - if = { - limit = { exists = scope:financier_sate_reward_county_1 } - save_scope_as = financier_sate_reward_county_2 - } - else = { save_scope_as = financier_sate_reward_county_1 } - add_to_list = financier_sate_titles - } - } - - #IF we got a duchy, add all the valid counties in it to the list - if = { - limit = { - exists = scope:financier_sate_reward_duchy - } - every_realm_county = { - limit = { - duchy = scope:financier_sate_reward_duchy - holder = { - is_ai = yes - OR = { - this = title:e_byzantium.holder - NOT = { - is_at_war_with = title:e_byzantium.holder - } - } - } - } - add_to_list = financier_sate_titles - } - } -} - -ep3_frankokratia_give_financier_sate_lands_effect = { - #If there's a duchy to give, give all titles in it - if = { - limit = { - exists = scope:financier_sate_reward_duchy - } - create_title_and_vassal_change = { - type = granted - save_scope_as = title_change - add_claim_on_loss = yes - } - every_in_list = { - list = financier_sate_titles - change_title_holder = { - holder = scope:financier - change = scope:title_change - take_baronies = yes - } - } - resolve_title_and_vassal_change = scope:title_change - } - else = { - create_title_and_vassal_change = { - type = granted - save_scope_as = title_change - add_claim_on_loss = yes - } - scope:financier_sate_reward_county_1 = { - change_title_holder = { - holder = scope:financier - change = scope:title_change - take_baronies = yes - } - } - if = { - limit = { - exists = scope:financier_sate_reward_county_2 - } - scope:financier_sate_reward_county_2 = { - change_title_holder = { - holder = scope:financier - change = scope:title_change - take_baronies = yes - } - } - } - resolve_title_and_vassal_change = scope:title_change - } -} - -ep3_frankokratia_gather_governor_funds_effect = { - if = { - limit = { - any_vassal = { - is_governor = yes - NOT = { is_at_war_with = title:e_byzantium.holder } - } - } - every_vassal = { - limit = { - is_governor = yes - NOT = { is_at_war_with = title:e_byzantium.holder } - } - hidden_effect = { - pay_short_term_gold = { - target = title:e_byzantium.holder - gold = 150 - } - } - add_to_list = paying_off_crusaders - } - } - else_if = { - limit = { - any_vassal = { - is_governor = no - NOT = { is_at_war_with = title:e_byzantium.holder } - } - } - every_vassal = { - limit = { - is_governor = no - NOT = { is_at_war_with = title:e_byzantium.holder } - } - hidden_effect = { - pay_short_term_gold = { - target = title:e_byzantium.holder - gold = 50 - } - } - add_to_list = paying_off_crusaders - } - } - scope:attacker = { - random_owned_story = { - type = frankokratia_story - save_scope_as = frankokratia_story - } - } - save_scope_value_as = { - name = crusader_payoff_total - value = scope:attacker.pay_off_crusaders_value - } - save_scope_value_as = { - name = payoff_per_crusader - value = { - value = 0 - add = scope:crusader_payoff_total - divide = { - value = 1 - scope:frankokratia_story = { - every_in_list = { - variable = frankokratia_leaders - limit = { - this != scope:attacker - } - add = 1 - } - } - subtract = 1 - min = 1 - } - } - } -} - -ep3_frankokratia_capital_sacking_effect = { - custom_tooltip = latin_empire_creation_tooltip - custom_tooltip = latin_empire_land_distribution_tooltip - add_dread = massive_dread_gain - custom_tooltip = { - text = every_crusader_gets_paid_sacking - add_short_term_gold = ep3_sacking_byz_capital_payoff_value - } - custom_tooltip = byzantine_empire_destroyed_tooltip - - hidden_effect = { - scope:frankokratia_story = { - every_in_list = { - variable = frankokratia_leaders - limit = { - this != scope:attacker - } - add_dread = medium_dread_gain - } - } - } - - scope:claimant.capital_county = { - change_county_control = -100 - if = { - limit = { - scope:claimant.capital_county = { - development_level >= 90 - } - } - change_development_level = -20 - } - else_if = { - limit = { - scope:claimant.capital_county = { - development_level >= 60 - } - } - change_development_level = -15 - } - else_if = { - limit = { - scope:claimant.capital_county = { - development_level >= 40 - } - } - change_development_level = -10 - } - else = { - change_development_level = -5 - } - custom_tooltip = byz_capital_building_destroyed_tooltip - } - scope:claimant.primary_title = { - state_faith = { - change_fervor = { - value = major_fervor_value - desc = imperial_capital_sacked_fervor_gain - } - } - } - - hidden_effect = { - scope:claimant.capital_province = { - destroy_random_building_variable_effect = yes - destroy_random_building_effect = yes - } - scope:claimant.capital_province = { - destroy_random_building_variable_effect = yes - destroy_random_building_effect = yes - } - scope:claimant.capital_province = { - destroy_random_building_variable_effect = yes - destroy_random_building_effect = yes - } - } - - faith:catholic = { - change_fervor = { - value = medium_fervor_loss - desc = imperial_capital_sacked_fervor_gain - } - } - hidden_effect = { - if = { - limit = { - NOT = { - culture = { - this = scope:claimant.capital_county.culture - } - } - } - culture = { - change_cultural_acceptance = { - target = scope:claimant.capital_county.culture - value = massive_cultural_acceptance_loss - desc = sacked_imperial_capital_cultural_acceptance - } - } - } - if = { - limit = { - NOR = { - scope:financier.culture = { - this = root.culture - } - scope:financier.culture = { - this = scope:claimant.capital_county.culture - } - } - } - scope:financier.culture = { - change_cultural_acceptance = { - target = scope:claimant.capital_county.culture - value = massive_cultural_acceptance_loss - desc = sacked_imperial_capital_cultural_acceptance - } - } - } - } - hidden_effect = { - #Destroy emperor's personal MaA - scope:claimant = { - if = { - limit = { - any_maa_regiment = { - is_title_maa_regiment = no - is_maa_type = cataphract - } - } - random_maa_regiment = { - limit = { - is_title_maa_regiment = no - is_maa_type = cataphract - } - destroy_maa_regiment = yes - } - } - else_if = { - limit = { - any_maa_regiment = { - is_title_maa_regiment = no - } - } - random_maa_regiment = { - limit = { - is_title_maa_regiment = no - } - destroy_maa_regiment = yes - } - } - } - } - if = { - limit = { - is_allied_to = scope:claimant - } - break_alliance = scope:claimant - } - - add_trait = despoiler_of_byzantium - custom_tooltip = frankokratia_leaders_gain_despoiler_trait - hidden_effect = { - scope:frankokratia_story = { - every_in_list = { - variable = frankokratia_leaders - limit = { - this != scope:attacker - } - add_trait = despoiler_of_byzantium - } - } - } - trigger_event = ep3_frankokratia_events.0042 -} - -ep3_frankokratia_kill_byzantines_effect = { - #Byzantines (and misc locals) are slaughtered in the taking of the city - title:e_byzantium.holder = { - #Courtiers of emperor - every_courtier_or_guest = { - limit = { - NOT = { - any_heir_title = { - holder ?= { - this = global_var:byz_claimant_champion - } - } - } - } - add_to_list = byz_civilians - } - #Local pool characters - every_pool_character = { - province = title:e_byzantium.holder.capital_province - limit = { - NOT = { - any_heir_title = { - holder ?= { - this = global_var:byz_claimant_champion - } - } - } - } - add_to_list = byz_civilians - } - #ai landless house heads in the capital - every_vassal = { - limit = { - is_ai = yes - is_landless_administrative = yes - domicile ?= { - domicile_location.county = { - this = title:e_byzantium.holder.capital_county - } - } - } - add_to_list = byz_civilians - } - #Courtiers of landless house heads in the capital - every_vassal = { - limit = { - is_landless_administrative = yes - domicile ?= { - domicile_location.county = { - this = title:e_byzantium.holder.capital_county - } - } - } - every_courtier_or_guest = { - limit = { - NOT = { - any_heir_title = { - holder ?= { - this = global_var:byz_claimant_champion - } - } - } - } - add_to_list = byz_civilians - } - } - } - ordered_in_list = { - order_by = { - value = 1 - #I suppose they would probably try to avoid killing Catholics... if possible - if = { - limit = { - NOR = { - faith = faith:catholic - this = scope:defender - is_close_family_of = scope:defender - } - } - add = 1 - } - } - list = byz_civilians - max = { - value = list_size:byz_civilians - divide = 3 - } - add_to_global_variable_list = { - name = slaughtered_byzantines_list - target = this - days = 30 - } - } - set_global_variable = { - name = slaughtered_byzantines - value = { - value = 0 - every_in_global_list = { - variable = slaughtered_byzantines_list - add = 1 - } - } - days = 30 - } - - #Let everyone know this happened - scope:frankokratia_story = { - every_in_list = { - variable = frankokratia_leaders - limit = { - is_ai = no - } - add_to_list = byz_slaughter_recipients - } - } - title:e_byzantium.holder = { - if = { - limit = { - is_ai = no - } - add_to_list = byz_slaughter_recipients - } - every_vassal_or_below = { - limit = { - is_ai = no - } - add_to_list = byz_slaughter_recipients - } - } - every_in_list = { - list = byz_slaughter_recipients - trigger_event = ep3_frankokratia_events.0046 - } - - hidden_effect = { - every_in_global_list = { - variable = slaughtered_byzantines_list - death = { - death_reason = death_frankokratia_sacking - } - } - } -} - -ep3_frankokratia_paying_off_latins_effect = { - #If crusader state exists - all troops go to crusader king and crusaders get piety - if = { - limit = { - scope:frankokratia_story = { - has_variable = crusader_kingdom - exists = var:crusader_kingdom.holder - var:crusader_kingdom.holder = { - faith = scope:attacker.faith - NOR = { - is_at_war_with = scope:attacker - is_at_war_with = scope:claimant - } - } - } - } - scope:frankokratia_story = { - var:crusader_kingdom.holder = { - save_scope_as = crusader_king - } - } - scope:crusader_king = { - spawn_army = { - name = ep3_frankokratia_reward_army_name - uses_supply = yes - levies = 3400 - men_at_arms = { - type = cataphract - stacks = ep3_byz_regiments_ck_value - } - location = scope:claimant.capital_province - } - } - scope:attacker = { - add_piety = massive_piety_gain - } - if = { - limit = { - scope:attacker = { - has_trait = excommunicated - } - } - scope:attacker = { remove_trait = excommunicated } - } - custom_tooltip = frankokratia_leaders_lose_excommunicated - } - else = { - scope:attacker = { - add_piety = major_piety_gain - spawn_army = { - name = ep3_frankokratia_reward_army_name - uses_supply = yes - levies = ep3_byz_reward_levy_size_value - men_at_arms = { - type = cataphract - stacks = ep3_byz_regiments_gained_value - } - location = scope:claimant.capital_province - inheritable = no - } - custom_tooltip = frankokratia_leaders_gain_identical_force - } - } - if = { - limit = { - exists = scope:financier_sate_reward_duchy - } - show_as_tooltip = { - create_title_and_vassal_change = { - type = granted - save_scope_as = title_change - add_claim_on_loss = yes - } - scope:financier_sate_reward_duchy = { - change_title_holder = { - holder = scope:financier - change = scope:title_change - take_baronies = yes - } - } - resolve_title_and_vassal_change = scope:title_change - } - hidden_effect = { - title:e_byzantium.holder = { - ep3_frankokratia_give_financier_sate_lands_effect = yes - } - } - } - else_if = { - limit = { - exists = scope:financier_sate_reward_county_1 - } - title:e_byzantium.holder = { - ep3_frankokratia_give_financier_sate_lands_effect = yes - } - } - add_legitimacy = major_legitimacy_loss - add_tyranny = massive_tyranny_gain - - add_character_modifier = { - modifier = bent_before_crusaders_modifier - years = 10 - } - #Army transfer - Emperor loses MaA regiments - if = { - limit = { - exists = scope:regiment_2 - } - custom_tooltip = 2_byzantine_regiments_given_over_tooltip - hidden_effect = { - scope:regiment_1 = { destroy_maa_regiment = yes } - } - } - else_if = { - limit = { - exists = scope:regiment_1 - } - custom_tooltip = 1_byzantine_regiment_given_over_tooltip - hidden_effect = { - scope:regiment_1 = { destroy_maa_regiment = yes } - scope:regiment_2 = { destroy_maa_regiment = yes } - } - } - - capital_county = { - add_county_modifier = { - modifier = crippled_by_imperial_debt_modifier - years = 25 - } - } - - # Show how much gold is paid out to every crusader - ep3_frankokratia_gather_governor_funds_effect = yes - custom_tooltip = { - text = every_crusader_gets_paid - scope:frankokratia_story = { - every_in_list = { - variable = frankokratia_leaders - scope:claimant = { - pay_short_term_gold = { - target = prev - gold = scope:payoff_per_crusader - } - } - } - } - } -} - -ep3_frankokratia_designate_latin_empire_effect = { - #GO FOR CONSTANTINOPLE/THESSALONIKA AS CAPITAL KINGDOM FIRST - if = { - limit = { - title:e_byzantium.holder = { - any_realm_county = { - this = title:c_byzantion - } - } - title:c_byzantion.holder = { - is_ai = yes - OR = { - this = title:e_byzantium.holder - NOT = { - is_at_war_with = title:e_byzantium.holder - } - } - } - } - title:c_byzantion = { save_scope_as = latin_capital } - title:b_constantinople = { - save_scope_as = latin_capital_barony - } - #Try to save thessalonika as the most natural capital kingdom - if = { - limit = { - title:k_thessalonika = { - ep3_frankokratia_latin_kingdom_available_trigger = yes - } - } - title:k_thessalonika = { save_scope_as = latin_kingdom_1 } - } - #Start going through other capital kingdoms in order of logic - they really should have one - else_if = { - limit = { - title:k_nikaea = { - ep3_frankokratia_latin_kingdom_available_trigger = yes - } - } - title:k_nikaea = { save_scope_as = latin_kingdom_1 } - } - else_if = { - limit = { - title:k_hellas = { - ep3_frankokratia_latin_kingdom_available_trigger = yes - } - } - title:k_hellas = { save_scope_as = latin_kingdom_1 } - } - else_if = { - limit = { - title:k_bulgaria = { - ep3_frankokratia_latin_kingdom_available_trigger = yes - } - } - title:k_bulgaria = { save_scope_as = latin_kingdom_1 } - } - else_if = { - limit = { - title:e_byzantium = { - any_in_de_jure_hierarchy = { - tier = tier_kingdom - ep3_frankokratia_latin_kingdom_available_trigger = yes - any_de_jure_county = { - is_coastal_county = yes - } - } - } - } - title:e_byzantium = { - random_in_de_jure_hierarchy = { - limit = { - tier = tier_kingdom - ep3_frankokratia_latin_kingdom_available_trigger = yes - any_de_jure_county = { - is_coastal_county = yes - } - } - save_scope_as = latin_kingdom_1 - } - } - } - else_if = { - limit = { - NOT = { exists = scope:latin_kingdom_1 } - } - title:e_byzantium = { - random_in_de_jure_hierarchy = { - limit = { - tier = tier_kingdom - ep3_frankokratia_latin_kingdom_available_trigger = yes - } - save_scope_as = latin_kingdom_1 - } - } - } - #The latins also took Hellas, first prio - if = { - limit = { - title:e_byzantium.holder = { - any_realm_county = { - kingdom = title:k_hellas - title:k_hellas = { - this != scope:latin_kingdom_1 - ep3_frankokratia_latin_kingdom_available_trigger = yes - } - } - } - } - title:k_hellas = { save_scope_as = latin_kingdom_2 } - } - #The latins had a short-lived attempt at ruling southern Bulgaria - else_if = { - limit = { - title:e_byzantium.holder = { - any_realm_county = { - kingdom = title:k_bulgaria - title:k_bulgaria = { - this != scope:latin_kingdom_1 - ep3_frankokratia_latin_kingdom_available_trigger = yes - } - } - } - } - title:k_bulgaria = { save_scope_as = latin_kingdom_2 } - } - #Krete, why not - else_if = { - limit = { - title:e_byzantium.holder = { - any_realm_county = { - kingdom = title:k_krete - title:k_krete = { - this != scope:latin_kingdom_1 - ep3_frankokratia_latin_kingdom_available_trigger = yes - } - } - } - } - title:k_krete = { save_scope_as = latin_kingdom_2 } - } - #The latins had some of Nikaea I guess - else_if = { - limit = { - title:e_byzantium.holder = { - any_realm_county = { - kingdom = title:k_nikaea - title:k_nikaea = { - this != scope:latin_kingdom_1 - ep3_frankokratia_latin_kingdom_available_trigger = yes - } - } - } - } - title:k_nikaea = { save_scope_as = latin_kingdom_2 } - } - #Cyprus, why not - else_if = { - limit = { - title:e_byzantium.holder = { - any_realm_county = { - kingdom = title:k_cyprus - title:k_cyprus = { - this != scope:latin_kingdom_1 - ep3_frankokratia_latin_kingdom_available_trigger = yes - } - } - } - } - title:k_cyprus = { save_scope_as = latin_kingdom_2 } - } - } - #NO CONSTANTINOPLE - WHATEVER THE IMPERIAL CAPITAL IS - else = { - title:e_byzantium.holder.capital_county = { - save_scope_as = latin_capital - } - title:e_byzantium.holder.capital_barony = { - save_scope_as = latin_capital_barony - } - #Is the kingdom available as capital kingdom? - if = { - limit = { - scope:latin_capital.kingdom = { - ep3_frankokratia_latin_kingdom_available_trigger = yes - } - } - scope:latin_capital.kingdom = { save_scope_as = latin_kingdom_1 } - } - #Is any neighboring kingdom available to be capital? - else_if = { - limit = { - title:e_byzantium = { - any_in_de_jure_hierarchy = { - tier = tier_kingdom - ep3_frankokratia_latin_kingdom_available_trigger = yes - any_de_jure_county = { - #Belongs to the empire - OR = { - holder = { - this = title:e_byzantium.holder - } - holder = { - is_vassal_or_below_of = title:e_byzantium.holder - NOT = { - is_at_war_with = title:e_byzantium.holder - } - } - } - #Neighbours main kingdom - any_neighboring_county = { - kingdom = scope:latin_capital.kingdom - } - } - } - } - } - title:e_byzantium = { - random_in_de_jure_hierarchy = { - limit = { - tier = tier_kingdom - OR = { - NOT = { exists = holder } - holder = { - this = title:e_byzantium.holder - } - } - any_de_jure_county = { - #Belongs to the empire - OR = { - holder = title:e_byzantium.holder - holder = { - is_vassal_or_below_of = title:e_byzantium.holder - NOT = { - is_at_war_with = title:e_byzantium.holder - } - } - } - #Neighbours main kingdom - any_neighboring_county = { - kingdom = scope:latin_capital.kingdom - } - } - } - save_scope_as = latin_kingdom_1 - } - } - } - #Need to start looking at random capital kingdoms - else_if = { - limit = { - title:e_byzantium = { - any_in_de_jure_hierarchy = { - tier = tier_kingdom - ep3_frankokratia_latin_kingdom_available_trigger = yes - any_de_jure_county = { - is_coastal_county = yes - } - } - } - } - title:e_byzantium = { - random_in_de_jure_hierarchy = { - limit = { - tier = tier_kingdom - ep3_frankokratia_latin_kingdom_available_trigger = yes - any_de_jure_county = { - is_coastal_county = yes - } - } - save_scope_as = latin_kingdom_1 - } - } - } - else_if = { - limit = { - NOT = { exists = scope:latin_kingdom_1 } - } - title:e_byzantium = { - random_in_de_jure_hierarchy = { - limit = { - tier = tier_kingdom - ep3_frankokratia_latin_kingdom_available_trigger = yes - } - save_scope_as = latin_kingdom_1 - } - } - } - #Give a random neighboring kingdom as a second one - if = { - limit = { - title:e_byzantium = { - any_in_de_jure_hierarchy = { - tier = tier_kingdom - this != scope:latin_kingdom_1 - ep3_frankokratia_latin_kingdom_available_trigger = yes - any_de_jure_county = { - #Belongs to the empire - OR = { - holder = { - this = title:e_byzantium.holder - } - holder = { - is_vassal_or_below_of = title:e_byzantium.holder - NOT = { - is_at_war_with = title:e_byzantium.holder - } - } - } - #Neighbours main kingdom - any_neighboring_county = { - kingdom = scope:latin_kingdom_1 - } - } - } - } - } - title:e_byzantium = { - random_in_de_jure_hierarchy = { - limit = { - tier = tier_kingdom - this != scope:latin_kingdom_1 - ep3_frankokratia_latin_kingdom_available_trigger = yes - any_de_jure_county = { - #Belongs to the empire - OR = { - holder = { - this = title:e_byzantium.holder - } - holder = { - is_vassal_or_below_of = title:e_byzantium.holder - NOT = { - is_at_war_with = title:e_byzantium.holder - } - } - } - #Neighbours main kingdom - any_neighboring_county = { - kingdom = scope:latin_kingdom_1 - } - } - } - save_scope_as = latin_kingdom_2 - } - } - } - } - scope:latin_capital = { - add_to_list = latin_emperor_titles - } - scope:latin_kingdom_1 ?= { - add_to_list = latin_emperor_titles - set_global_variable = { - name = latin_kingdom_1 - value = scope:latin_kingdom_1 - days = 60 - } - } - scope:latin_kingdom_2 ?= { - add_to_list = latin_emperor_titles - set_global_variable = { - name = latin_kingdom_2 - value = scope:latin_kingdom_2 - days = 60 - } - } - title:e_latin_empire = { - add_to_list = latin_emperor_titles - } -} - -ep3_latin_empire_designate_financier_lands_effect = { - #First, give aegean islands counties - title:e_byzantium.holder = { - if = { - limit = { - scope:latin_capital.kingdom = { - this = title:k_thessalonika - } - any_realm_county = { - NOT = { is_in_list = financier_sate_titles } - duchy = title:d_aegean_islands - holder = { - is_ai = yes - NOT = { - is_at_war_with = title:e_byzantium.holder - } - } - } - } - title:d_aegean_islands = { - save_scope_as = financier_latin_emp_duchy - } - } - #Not possible? Give them counties from a duchy with a coastal province in the latin kingdom - else_if = { - limit = { - any_realm_county = { - NOR = { - is_in_list = financier_sate_titles - this = scope:latin_capital - } - kingdom = scope:latin_capital.kingdom - has_coastal_province = yes - holder = { - is_ai = yes - NOT = { - is_at_war_with = title:e_byzantium.holder - } - } - } - } - random_realm_county = { - limit = { - NOR = { - is_in_list = financier_sate_titles - this = scope:latin_capital - } - kingdom = scope:latin_capital.kingdom - has_coastal_province = yes - holder = { - is_ai = yes - NOT = { - is_at_war_with = title:e_byzantium.holder - } - } - } - duchy = { save_scope_as = financier_latin_emp_duchy } - } - } - #Not possible? Give them counties from a duchy with a coastal province that borders the latin kingdom - else_if = { - limit = { - any_realm_county = { - any_neighboring_county = { - kingdom = scope:latin_capital.kingdom - } - NOR = { - is_in_list = financier_sate_titles - this = scope:latin_capital - } - has_coastal_province = yes - holder = { - is_ai = yes - NOT = { - is_at_war_with = title:e_byzantium.holder - } - } - } - } - random_realm_county = { - limit = { - NOR = { - is_in_list = financier_sate_titles - this = scope:latin_capital - } - any_neighboring_county = { - kingdom = scope:latin_capital.kingdom - } - has_coastal_province = yes - holder = { - is_ai = yes - NOT = { - is_at_war_with = title:e_byzantium.holder - } - } - } - duchy = { save_scope_as = financier_latin_emp_duchy } - } - } - #Not possible? Run the sate rewards effect again and add more to that list - else = { - ep3_frankokratia_save_financier_sate_lands_effect = yes - } - - #Give all counties in the duchy - if = { - limit = { - exists = scope:financier_latin_emp_duchy - } - every_realm_county = { - limit = { - duchy = scope:financier_latin_emp_duchy - holder = { - is_ai = yes - NOT = { - is_at_war_with = title:e_byzantium.holder - } - } - } - add_to_list = financier_latin_emp_titles - } - } - #Give the duchy the financier's counties are in, if possible - if = { - limit = { - scope:financier_latin_emp_duchy ?= { - NOT = { is_in_list = financier_sate_titles } - OR = { - NOT = { exists = holder } - holder = { - is_ai = yes - NOT = { - is_at_war_with = title:e_byzantium.holder - } - OR = { - this = title:e_byzantium.holder - is_vassal_or_below_of = title:e_byzantium.holder - } - } - } - } - } - scope:financier_latin_emp_duchy = { - add_to_list = financier_latin_emp_titles - } - } - #GIVE THE SATE REWARD TITLES as well as the prior stuff - every_in_list = { - list = financier_sate_titles - add_to_list = financier_latin_emp_titles - } - } -} - -ep3_frankokratia_grant_latin_empire_effect = { - #Make it less likely frankokratia will happen again - set_global_variable = { - name = frankokratia_occurred - value = current_date - } - scope:latin_capital.kingdom = { - every_de_jure_county = { - limit = { - this != scope:latin_capital - holder = { - OR = { - this = title:e_byzantium.holder - AND = { - is_ai = yes - is_vassal_or_below_of = title:e_byzantium.holder - NOT = { - is_at_war_with = title:e_byzantium.holder - } - } - } - this != scope:financier - } - } - add_to_list = latin_emperor_titles - } - } - scope:latin_capital = { - if = { - limit = { - duchy = { - OR = { - NOT = { exists = holder } - holder = { - is_ai = yes - OR = { - is_vassal_or_below_of = title:e_byzantium.holder - this = title:e_byzantium.holder - } - NOT = { - is_at_war_with = title:e_byzantium.holder - } - } - } - } - } - duchy = { - add_to_list = latin_emperor_titles - } - } - } - show_as_tooltip = { - create_title_and_vassal_change = { - type = granted - save_scope_as = title_change - add_claim_on_loss = yes - } - every_in_list = { - list = latin_emperor_titles - limit = { - tier > tier_county - } - change_title_holder = { - holder = scope:latin_emperor - change = scope:title_change - } - } - resolve_title_and_vassal_change = scope:title_change - } - hidden_effect = { - #Titles for emperor - create_title_and_vassal_change = { - type = created - save_scope_as = title_change - add_claim_on_loss = yes - } - every_in_list = { - list = latin_emperor_titles - change_title_holder = { - holder = scope:latin_emperor - change = scope:title_change - } - } - resolve_title_and_vassal_change = scope:title_change - } - scope:latin_emperor = { - #Gains Latin Empire special troops - if = { - limit = { - scope:frankokratia_story = { - any_in_list = { - variable = frankokratia_leaders - culture = { - has_cultural_parameter = unlock_maa_conrois - } - } - any_in_list = { - variable = frankokratia_leaders - culture = { - has_innovation = innovation_advanced_bowmaking - } - } - } - } - spawn_army = { - name = ep3_latin_emp_army_name - uses_supply = yes - inheritable = yes - levies = latin_emp_army_levies_value - men_at_arms = { - type = conrois - stacks = latin_emp_army_maa_value - } - men_at_arms = { - type = crossbowmen - stacks = latin_emp_army_maa_value - } - location = scope:latin_capital_barony.title_province - } - } - else_if = { - limit = { - scope:frankokratia_story = { - any_in_list = { - variable = frankokratia_leaders - culture = { - has_cultural_parameter = unlock_maa_conrois - } - } - any_in_list = { - variable = frankokratia_leaders - culture = { - has_innovation = innovation_quilted_armor - } - } - } - - } - spawn_army = { - name = ep3_latin_emp_army_name - uses_supply = yes - inheritable = yes - levies = latin_emp_army_levies_value - men_at_arms = { - type = conrois - stacks = latin_emp_army_maa_value - } - men_at_arms = { - type = armored_footmen - stacks = latin_emp_army_maa_value - } - location = scope:latin_capital_barony.title_province - } - } - else_if = { - limit = { - scope:frankokratia_story = { - any_in_list = { - variable = frankokratia_leaders - culture = { - has_cultural_parameter = unlock_maa_conrois - } - } - } - } - spawn_army = { - name = ep3_latin_emp_army_name - uses_supply = yes - inheritable = yes - levies = latin_emp_army_levies_value - men_at_arms = { - type = conrois - stacks = latin_emp_army_maa_value - } - men_at_arms = { - type = pikemen_unit - stacks = latin_emp_army_maa_value - } - location = scope:latin_capital_barony.title_province - } - } - else_if = { - limit = { - scope:frankokratia_story = { - any_in_list = { - variable = frankokratia_leaders - culture = { - has_innovation = innovation_arched_saddle - } - } - any_in_list = { - variable = frankokratia_leaders - culture = { - has_innovation = innovation_advanced_bowmaking - } - } - } - } - spawn_army = { - name = ep3_latin_emp_army_name - uses_supply = yes - inheritable = yes - levies = latin_emp_army_levies_value - men_at_arms = { - type = armored_horsemen - stacks = latin_emp_army_maa_value - } - men_at_arms = { - type = crossbowmen - stacks = latin_emp_army_maa_value - } - location = scope:latin_capital_barony.title_province - } - } - else_if = { - limit = { - scope:frankokratia_story = { - any_in_list = { - variable = frankokratia_leaders - culture = { - has_innovation = innovation_arched_saddle - } - } - any_in_list = { - variable = frankokratia_leaders - culture = { - has_innovation = innovation_quilted_armor - } - } - } - } - spawn_army = { - name = ep3_latin_emp_army_name - uses_supply = yes - inheritable = yes - levies = latin_emp_army_levies_value - men_at_arms = { - type = armored_horsemen - stacks = latin_emp_army_maa_value - } - men_at_arms = { - type = armored_footmen - stacks = latin_emp_army_maa_value - } - location = scope:latin_capital_barony.title_province - } - } - else_if = { - limit = { - scope:frankokratia_story = { - any_in_list = { - variable = frankokratia_leaders - culture = { - has_innovation = innovation_arched_saddle - } - } - } - } - spawn_army = { - name = ep3_latin_emp_army_name - uses_supply = yes - inheritable = yes - levies = latin_emp_army_levies_value - men_at_arms = { - type = armored_horsemen - stacks = latin_emp_army_maa_value - } - men_at_arms = { - type = pikemen_unit - stacks = latin_emp_army_maa_value - } - location = scope:latin_capital_barony.title_province - } - } - else_if = { - limit = { - scope:frankokratia_story = { - any_in_list = { - variable = frankokratia_leaders - culture = { - has_innovation = innovation_quilted_armor - } - } - any_in_list = { - variable = frankokratia_leaders - culture = { - has_innovation = innovation_advanced_bowmaking - } - } - } - } - spawn_army = { - name = ep3_latin_emp_army_name - uses_supply = yes - inheritable = yes - levies = latin_emp_army_levies_value - men_at_arms = { - type = armored_footmen - stacks = latin_emp_army_maa_value - } - men_at_arms = { - type = crossbowmen - stacks = latin_emp_army_maa_value - } - location = scope:latin_capital_barony.title_province - } - } - else_if = { - limit = { - scope:frankokratia_story = { - any_in_list = { - variable = frankokratia_leaders - culture = { - has_innovation = innovation_quilted_armor - } - } - } - } - spawn_army = { - name = ep3_latin_emp_army_name - uses_supply = yes - inheritable = yes - levies = latin_emp_army_levies_value - men_at_arms = { - type = armored_footmen - stacks = latin_emp_army_maa_value - } - men_at_arms = { - type = light_horsemen - stacks = latin_emp_army_maa_value - } - location = scope:latin_capital_barony.title_province - } - } - else_if = { - limit = { - scope:frankokratia_story = { - any_in_list = { - variable = frankokratia_leaders - culture = { - has_innovation = innovation_advanced_bowmaking - } - } - } - } - spawn_army = { - name = ep3_latin_emp_army_name - uses_supply = yes - inheritable = yes - levies = latin_emp_army_levies_value - men_at_arms = { - type = crossbowmen - stacks = latin_emp_army_maa_value - } - men_at_arms = { - type = light_horsemen - stacks = latin_emp_army_maa_value - } - location = scope:latin_capital_barony.title_province - } - } - else = { - spawn_army = { - name = ep3_latin_emp_army_name - uses_supply = yes - inheritable = yes - levies = latin_emp_army_levies_value - men_at_arms = { - type = light_horsemen - stacks = latin_emp_army_maa_value - } - men_at_arms = { - type = pikemen_unit - stacks = latin_emp_army_maa_value - } - location = scope:latin_capital_barony.title_province - } - } - } - #Change succession law? - scope:latin_emperor = { - add_realm_law = crown_authority_2 - } - #Stop this admin stuff - if = { - limit = { - scope:latin_emperor = { - government_has_flag = government_is_administrative - } - } - scope:latin_emperor = { - change_government = feudal_government - } - } -} - -ep3_frankokratia_clear_old_lands_change_capital_effect = { - if = { - limit = { - ep3_frankokratia_discard_old_lands_trigger = yes - exists = scope:latin_kingdom_1 - exists = scope:latin_kingdom_2 - this = scope:latin_empire_receiver - } - custom_tooltip = old_titles_vassals_emp_beneficiary_2_kings_tooltip - } - else_if = { - limit = { - ep3_frankokratia_discard_old_lands_trigger = yes - exists = scope:latin_kingdom_1 - this = scope:latin_empire_receiver - } - custom_tooltip = old_titles_vassals_emp_beneficiary_1_king_tooltip - } - else_if = { - limit = { - this = scope:latin_empire_receiver - } - custom_tooltip = old_titles_vassals_emp_beneficiary_no_king_tooltip - } - else = { - custom_tooltip = old_titles_vassals_lord_beneficiary_tooltip - } - if = { - limit = { - this != scope:latin_empire_receiver - } - scope:beneficiary = { - save_scope_as = old_title_gainer - } - } - else = { - scope:emp_beneficiary = { - save_scope_as = old_title_gainer - } - } - hidden_effect = { - if = { - limit = { - OR = { - any_in_list = { - list = root_old_vassals - count >= 1 - } - any_in_list = { - list = root_old_titles - count >= 1 - } - } - } - #Remove all of character's other titles - pass to heir? - create_title_and_vassal_change = { - type = granted - save_scope_as = change - add_claim_on_loss = no - } - every_in_list = { - list = root_old_vassals - change_liege = { - liege = scope:old_title_gainer - change = scope:change - } - } - every_in_list = { - list = root_old_titles - change_title_holder = { - holder = scope:old_title_gainer - change = scope:change - } - } - resolve_title_and_vassal_change = scope:change - #Need to give titles back to their former liege - if = { - limit = { - has_variable = old_liege - } - var:old_liege = { - save_scope_as = old_liege - } - scope:old_title_gainer = { - create_title_and_vassal_change = { - type = granted - save_scope_as = change - add_claim_on_loss = no - } - change_liege = { - liege = scope:old_liege - change = scope:change - } - resolve_title_and_vassal_change = scope:change - } - } - ##Or need to make titles independent - else_if = { - limit = { - scope:old_title_gainer = { - highest_held_title_tier < tier_empire - } - } - scope:old_title_gainer = { - create_title_and_vassal_change = { - type = independency - save_scope_as = change - add_claim_on_loss = no - } - becomes_independent = { change = scope:change } - resolve_title_and_vassal_change = scope:change - } - } - } - if = { - limit = { - any_realm_county = { - this = title:c_byzantion - } - capital_county = { - NOT = { - this = title:c_byzantion - } - } - } - set_realm_capital = title:c_byzantion - } - } -} - -ep3_frankokratia_distribute_lands_to_crusaders_effect = { - - #save a list of all titles there are to give out - #Counties in latin kingdom - every_in_list = { - list = latin_emperor_titles - limit = { - NOR = { - this = scope:latin_capital - #Don't give out financier's lands, unless financier is latin emp - holder = { - this = scope:financier - this != scope:latin_emperor - } - this = title:c_byzantion - } - tier = tier_county - NOT = { - duchy = { - holder = scope:latin_emperor - } - } - } - add_to_list = available_latin_kingdom_counties - add_to_list = available_latin_emp_counties - } - #Counties on border with latin capital - scope:latin_emperor = { - every_realm_county = { - limit = { - this = scope:latin_capital - } - every_neighboring_county = { - limit = { - OR = { - holder = title:e_byzantium.holder - holder = { - is_ai = yes - is_vassal_or_below_of = title:e_byzantium.holder - NOT = { - is_at_war_with = title:e_byzantium.holder - } - } - } - } - add_to_list = available_latin_neighbor_counties - add_to_list = available_latin_emp_counties - } - } - } - #Border counties belonging to kingdom owned by latin emperor - if = { - limit = { - exists = scope:latin_kingdom_2 - } - scope:latin_emperor = { - every_realm_county = { - every_neighboring_county = { - limit = { - kingdom = scope:latin_kingdom_2 - OR = { - holder = title:e_byzantium.holder - holder = { - is_ai = yes - is_vassal_or_below_of = title:e_byzantium.holder - NOT = { - is_at_war_with = title:e_byzantium.holder - } - } - } - } - add_to_list = available_latin_neighbor_counties - add_to_list = available_latin_emp_counties - } - } - } - } - - ##Save duchies in the latin emp that can be given out - if = { - limit = { - any_in_list = { - list = available_latin_kingdom_counties - duchy = { - OR = { - NOT = { exists = holder } - holder = title:e_byzantium.holder - holder = { - is_ai = yes - is_vassal_or_below_of = title:e_byzantium.holder - NOT = { - is_at_war_with = title:e_byzantium.holder - } - } - } - } - } - } - every_in_list = { - list = available_latin_kingdom_counties - limit = { - duchy = { - OR = { - NOT = { exists = holder } - holder = title:e_byzantium.holder - holder = { - is_ai = yes - is_vassal_or_below_of = title:e_byzantium.holder - NOT = { - is_at_war_with = title:e_byzantium.holder - } - } - NOT = { - holder = { - this = scope:financier - this != scope:latin_emperor - } - } - } - } - } - duchy = { - add_to_list = available_latin_kingdom_duchies - add_to_list = available_latin_emp_duchies - } - } - } - #Save neighboring duchies that can be given out - if = { - limit = { - any_in_list = { - list = available_latin_neighbor_counties - duchy = { - OR = { - NOT = { exists = holder } - holder = title:e_byzantium.holder - holder = { - is_ai = yes - is_vassal_or_below_of = title:e_byzantium.holder - NOT = { - is_at_war_with = title:e_byzantium.holder - } - } - } - } - } - } - every_in_list = { - list = available_latin_neighbor_counties - limit = { - duchy = { - OR = { - NOT = { exists = holder } - holder = title:e_byzantium.holder - holder = { - is_ai = yes - is_vassal_or_below_of = title:e_byzantium.holder - NOT = { - is_at_war_with = title:e_byzantium.holder - } - } - NOT = { - holder = { - this = scope:financier - this != scope:latin_emperor - } - } - } - } - } - duchy = { - add_to_list = available_latin_neighbor_duchies - add_to_list = available_latin_emp_duchies - } - } - } - - while = { - limit = { - #Ends when counties or empire duchies (which should all have empire counties) are out - OR = { - any_in_list = { - list = available_latin_kingdom_counties - count >= 1 - } - any_in_list = { - list = available_latin_emp_duchies - count >= 1 - } - } - } - if = { - limit = { - scope:frankokratia_story = { - any_in_list = { - variable = frankokratia_leaders - is_ruler = yes - NOR = { - is_in_list = designated_latin_emp_titles - this = scope:financier - this = scope:latin_empire_receiver - } - } - } - } - #Save player first - if = { - limit = { - scope:frankokratia_story = { - any_in_list = { - variable = frankokratia_leaders - is_ruler = yes - is_ai = no - NOR = { - is_in_list = designated_latin_emp_titles - this = scope:financier - this = scope:latin_empire_receiver - } - } - } - } - #Grant duchy and county to strongest player - scope:frankokratia_story = { - ordered_in_list = { - variable = frankokratia_leaders - order_by = max_military_strength - limit = { - is_ruler = yes - is_ai = no - NOR = { - is_in_list = designated_latin_emp_titles - this = scope:financier - this = scope:latin_empire_receiver - } - } - add_to_list = designated_latin_emp_titles - save_scope_as = latin_title_candidate - } - } - } - #save AI - else = { - scope:frankokratia_story = { - ordered_in_list = { - variable = frankokratia_leaders - order_by = max_military_strength - limit = { - is_ruler = yes - NOR = { - is_in_list = designated_latin_emp_titles - this = scope:financier - this = scope:latin_empire_receiver - } - } - add_to_list = designated_latin_emp_titles - save_scope_as = latin_title_candidate - } - } - } - #Save titles they're getting - - #Give them a latin kingdom duchy and county - if = { - limit = { - any_in_list = { - list = available_latin_kingdom_duchies - count >= 1 - } - } - random_in_list = { - list = available_latin_kingdom_duchies - remove_from_list = available_latin_kingdom_duchies - remove_from_list = available_latin_emp_duchies - save_scope_as = duchy_to_grant - title_capital_county = { save_scope_as = duchy_capital } - } - random_in_list = { - list = available_latin_kingdom_counties - save_temporary_scope_as = county_temp - limit = { - this = scope:duchy_capital - } - alternative_limit = { - duchy = scope:duchy_to_grant - } - remove_from_list = available_latin_kingdom_counties - remove_from_list = available_latin_emp_counties - save_scope_as = county_to_grant - } - scope:latin_title_candidate = { - #Set the variable so it can be granted when character gets event - set_variable = { - name = latin_duchy - value = scope:duchy_to_grant - } - set_variable = { - name = latin_county - value = scope:county_to_grant - } - } - } - #Give them a neighboring county and duchy - else_if = { - limit = { - any_in_list = { - list = available_latin_neighbor_duchies - count >= 1 - } - } - random_in_list = { - list = available_latin_neighbor_duchies - remove_from_list = available_latin_neighbor_duchies - remove_from_list = available_latin_emp_duchies - save_scope_as = duchy_to_grant - title_capital_county = { save_scope_as = duchy_capital } - } - random_in_list = { - list = available_latin_neighbor_counties - save_temporary_scope_as = county_temp - limit = { - duchy = scope:duchy_to_grant - } - remove_from_list = available_latin_neighbor_counties - remove_from_list = available_latin_emp_counties - save_scope_as = county_to_grant - } - scope:latin_title_candidate = { - #Set the variable so it can be granted when character gets event - set_variable = { - name = latin_duchy - value = scope:duchy_to_grant - } - set_variable = { - name = latin_county - value = scope:county_to_grant - } - } - } - #Give them a latin kingdom county - else = { - random_in_list = { - list = available_latin_kingdom_counties - remove_from_list = available_latin_kingdom_counties - remove_from_list = available_latin_emp_counties - save_scope_as = county_to_grant - } - scope:latin_title_candidate = { - #Set the variable so it can be granted when character gets event - set_variable = { - name = latin_county - value = scope:county_to_grant - } - } - } - } - #No one is left to give titles to - end this - else = { - every_in_list = { - list = available_latin_emp_counties - remove_from_list = available_latin_emp_counties - if = { - limit = { is_in_list = available_latin_kingdom_counties } - remove_from_list = available_latin_kingdom_counties - } - if = { - limit = { is_in_list = available_latin_neighbor_counties } - remove_from_list = available_latin_neighbor_counties - } - if = { - limit = { is_in_list = available_latin_emp_counties } - remove_from_list = available_latin_emp_counties - } - } - } - - - #Grant county to strongest player - - #Grant duchy and county to strongest ai - #Grant county to strongest ai - #Order them by military strength? - #Start with every county that isn't capital in kingdom of latin emp goes to a crusader - #Any bordering counties in other kingdom latins have - #Any additional bordering counties, as needed until ll crusaders get one - #Any coastal county in empire - - #Save flag that removes them from this process - - #Add to beneficiary titles list - } -} - -ep3_frankokratia_grant_latin_lands_effect = { - root = { - var:latin_county = { - add_to_list = my_latin_titles - } - if = { - limit = { - has_variable = latin_duchy - } - var:latin_duchy = { - add_to_list = my_latin_titles - } - destroy_title = var:latin_duchy - } - } - - - create_title_and_vassal_change = { - type = granted - save_scope_as = title_change - } - every_in_list = { - list = my_latin_titles - change_title_holder = { - holder = scope:latin_title_gainer - change = scope:title_change - } - } - scope:latin_title_gainer = { - change_liege = { - liege = scope:latin_emperor - change = scope:title_change - } - } - resolve_title_and_vassal_change = scope:title_change - - - #Remove so this doesn't cause title stealing - every_in_list = { - list = my_latin_titles - remove_from_list = my_latin_titles - } - - - #Make sure they're feudal - if = { - limit = { - scope:latin_empire_receiver = { - this = scope:financier - } - } - if = { - limit = { - OR = { - religion = religion:islam_religion - culture = { has_cultural_pillar = heritage_iranian } - culture = { has_cultural_pillar = heritage_turkic } - culture = { has_cultural_pillar = heritage_arabic } - } - } - scope:latin_title_gainer = { change_government = clan_government } - } - else = { - scope:latin_title_gainer = { change_government = feudal_government } - } - } -} - -ep3_latin_empire_grant_financier_lands_effect = { - add_to_list = gained_latin_emp_titles - #Title switch - create_title_and_vassal_change = { - type = conquest - save_scope_as = title_change - add_claim_on_loss = yes - } - every_in_list = { - list = financier_latin_emp_titles - change_title_holder = { - holder = scope:financier - change = scope:title_change - take_baronies = yes - } - } - - resolve_title_and_vassal_change = scope:title_change -} - -ep3_frankokratia_pick_emperor_beneficiary_effect = { - save_scope_as = frankokratia_crusader - #SET FIRST emp_beneficiary VARIABLE - #Dominant gender close family - random_close_family_member = { - limit = { - ep3_frankokratia_beneficiary_trigger = yes - ep3_frankokratia_beneficiary_gender_trigger = yes - dynasty = scope:frankokratia_crusader.dynasty - } - scope:frankokratia_crusader = { - set_variable = { - name = emp_beneficiary - value = prev - } - } - } - #Dominant gender house member - if = { - limit = { - NOT = { has_variable = emp_beneficiary } - } - house = { - random_house_member = { - limit = { - ep3_frankokratia_beneficiary_trigger = yes - ep3_frankokratia_beneficiary_gender_trigger = yes - } - scope:frankokratia_crusader = { - set_variable = { - name = emp_beneficiary - value = prev - } - } - } - } - } - #Dominant gender dynasty member - if = { - limit = { - NOT = { has_variable = emp_beneficiary } - } - dynasty = { - random_dynasty_member = { - limit = { - ep3_frankokratia_beneficiary_trigger = yes - ep3_frankokratia_beneficiary_gender_trigger = yes - } - scope:frankokratia_crusader = { - set_variable = { - name = emp_beneficiary - value = prev - } - } - } - } - } - #Close family any gender - if = { - limit = { - NOT = { has_variable = emp_beneficiary } - } - random_close_family_member = { - limit = { - ep3_frankokratia_beneficiary_trigger = yes - ep3_frankokratia_beneficiary_gender_soft_trigger = yes - } - scope:frankokratia_crusader = { - set_variable = { - name = emp_beneficiary - value = prev - } - } - } - } - #dynasty member any gender - if = { - limit = { - NOT = { has_variable = emp_beneficiary } - } - dynasty = { - random_dynasty_member = { - limit = { - ep3_frankokratia_beneficiary_trigger = yes - ep3_frankokratia_beneficiary_gender_soft_trigger = yes - } - scope:frankokratia_crusader = { - set_variable = { - name = emp_beneficiary - value = prev - } - } - } - } - } - #Same culture dominant gender courtier - if = { - limit = { - NOT = { has_variable = emp_beneficiary } - } - random_courtier_or_guest = { - limit = { - ep3_frankokratia_beneficiary_trigger = yes - culture = scope:frankokratia_crusader.culture - ep3_frankokratia_beneficiary_gender_trigger = yes - } - scope:frankokratia_crusader = { - set_variable = { - name = emp_beneficiary - value = prev - } - } - } - } - #any courtier - if = { - limit = { - NOT = { has_variable = emp_beneficiary } - } - random_courtier_or_guest = { - limit = { - ep3_frankokratia_beneficiary_trigger = yes - culture = scope:frankokratia_crusader.culture - ep3_frankokratia_beneficiary_gender_soft_trigger = yes - } - scope:frankokratia_crusader = { - set_variable = { - name = emp_beneficiary - value = prev - } - } - } - } - #pool character - if = { - limit = { - NOT = { has_variable = emp_beneficiary } - } - random_pool_character = { - province = scope:frankokratia_crusader.capital_province - limit = { - ep3_frankokratia_beneficiary_trigger = yes - } - scope:frankokratia_crusader = { - set_variable = { - name = emp_beneficiary - value = prev - } - } - } - } - if = { - limit = { - NOT = { has_variable = emp_beneficiary } - } - #Create character - create_character = { - location = scope:claimant.location - template = ep3_frankokratia_crusader_template - faith = scope:frankokratia_crusader.faith - culture = scope:frankokratia_crusader.culture - save_scope_as = new_latin_lord - } - scope:frankokratia_crusader = { - set_variable = { - name = emp_beneficiary - value = scope:new_latin_lord - } - } - } - var:emp_beneficiary = { save_scope_as = emp_beneficiary } - - #SET SECOND emp_beneficiary VARIABLE - ##Dominant gender close family - random_close_family_member = { - limit = { - ep3_frankokratia_beneficiary_trigger = yes - ep3_frankokratia_beneficiary_gender_trigger = yes - dynasty = scope:frankokratia_crusader.dynasty - this != scope:emp_beneficiary - } - scope:frankokratia_crusader = { - set_variable = { - name = emp_beneficiary_2 - value = prev - } - } - } - #Dominant gender house member - if = { - limit = { - NOT = { has_variable = emp_beneficiary_2 } - } - house = { - random_house_member = { - limit = { - ep3_frankokratia_beneficiary_trigger = yes - ep3_frankokratia_beneficiary_gender_trigger = yes - this != scope:emp_beneficiary - } - scope:frankokratia_crusader = { - set_variable = { - name = emp_beneficiary_2 - value = prev - } - } - } - } - } - #Dominant gender dynasty member - if = { - limit = { - NOT = { has_variable = emp_beneficiary_2 } - } - dynasty = { - random_dynasty_member = { - limit = { - ep3_frankokratia_beneficiary_trigger = yes - ep3_frankokratia_beneficiary_gender_trigger = yes - this != scope:emp_beneficiary - } - scope:frankokratia_crusader = { - set_variable = { - name = emp_beneficiary_2 - value = prev - } - } - } - } - } - #Close family any gender - if = { - limit = { - NOT = { has_variable = emp_beneficiary_2 } - } - random_close_family_member = { - limit = { - ep3_frankokratia_beneficiary_trigger = yes - ep3_frankokratia_beneficiary_gender_soft_trigger = yes - this != scope:emp_beneficiary - } - scope:frankokratia_crusader = { - set_variable = { - name = emp_beneficiary_2 - value = prev - } - } - } - } - #dynasty member any gender - if = { - limit = { - NOT = { has_variable = emp_beneficiary_2 } - } - dynasty = { - random_dynasty_member = { - limit = { - ep3_frankokratia_beneficiary_trigger = yes - ep3_frankokratia_beneficiary_gender_soft_trigger = yes - this != scope:emp_beneficiary - } - scope:frankokratia_crusader = { - set_variable = { - name = emp_beneficiary_2 - value = prev - } - } - } - } - } - #Same culture dominant gender courtier - if = { - limit = { - NOT = { has_variable = emp_beneficiary_2 } - } - random_courtier_or_guest = { - limit = { - ep3_frankokratia_beneficiary_trigger = yes - culture = scope:frankokratia_crusader.culture - ep3_frankokratia_beneficiary_gender_trigger = yes - this != scope:emp_beneficiary - } - scope:frankokratia_crusader = { - set_variable = { - name = emp_beneficiary_2 - value = prev - } - } - } - } - #any courtier - if = { - limit = { - NOT = { has_variable = emp_beneficiary_2 } - } - random_courtier_or_guest = { - limit = { - ep3_frankokratia_beneficiary_trigger = yes - culture = scope:frankokratia_crusader.culture - ep3_frankokratia_beneficiary_gender_soft_trigger = yes - this != scope:emp_beneficiary - } - scope:frankokratia_crusader = { - set_variable = { - name = emp_beneficiary_2 - value = prev - } - } - } - } - #pool character - if = { - limit = { - NOT = { has_variable = emp_beneficiary_2 } - } - random_pool_character = { - province = scope:frankokratia_crusader.capital_province - limit = { - ep3_frankokratia_beneficiary_trigger = yes - this != scope:emp_beneficiary - } - scope:frankokratia_crusader = { - set_variable = { - name = emp_beneficiary_2 - value = prev - } - } - } - } - if = { - limit = { - has_variable = emp_beneficiary_2 - } - var:emp_beneficiary_2 = { save_scope_as = emp_beneficiary_2 } - } - - if = { - limit = { - has_variable = emp_beneficiary_2 - } - #SET THIRD emp_beneficiary VARIABLE - ##Dominant gender close family - random_close_family_member = { - limit = { - ep3_frankokratia_beneficiary_trigger = yes - ep3_frankokratia_beneficiary_gender_trigger = yes - dynasty = scope:frankokratia_crusader.dynasty - NOR = { - this = scope:emp_beneficiary - this = scope:emp_beneficiary_2 - } - } - scope:frankokratia_crusader = { - set_variable = { - name = emp_beneficiary_3 - value = prev - } - } - } - #Dominant gender house member - if = { - limit = { - NOT = { has_variable = emp_beneficiary_3 } - } - house = { - random_house_member = { - limit = { - ep3_frankokratia_beneficiary_trigger = yes - ep3_frankokratia_beneficiary_gender_trigger = yes - NOR = { - this = scope:emp_beneficiary - this = scope:emp_beneficiary_2 - } - } - scope:frankokratia_crusader = { - set_variable = { - name = emp_beneficiary_3 - value = prev - } - } - } - } - - } - #Dominant gender dynasty member - if = { - limit = { - NOT = { has_variable = emp_beneficiary_3 } - } - dynasty = { - random_dynasty_member = { - limit = { - ep3_frankokratia_beneficiary_trigger = yes - ep3_frankokratia_beneficiary_gender_trigger = yes - NOR = { - this = scope:emp_beneficiary - this = scope:emp_beneficiary_2 - } - } - scope:frankokratia_crusader = { - set_variable = { - name = emp_beneficiary_3 - value = prev - } - } - } - } - } - #Close family any gender - if = { - limit = { - NOT = { has_variable = emp_beneficiary_3 } - } - random_close_family_member = { - limit = { - ep3_frankokratia_beneficiary_trigger = yes - ep3_frankokratia_beneficiary_gender_soft_trigger = yes - NOR = { - this = scope:emp_beneficiary - this = scope:emp_beneficiary_2 - } - } - scope:frankokratia_crusader = { - set_variable = { - name = emp_beneficiary_3 - value = prev - } - } - } - } - #dynasty member any gender - if = { - limit = { - NOT = { has_variable = emp_beneficiary_3 } - } - dynasty = { - random_dynasty_member = { - limit = { - ep3_frankokratia_beneficiary_trigger = yes - ep3_frankokratia_beneficiary_gender_soft_trigger = yes - NOR = { - this = scope:emp_beneficiary - this = scope:emp_beneficiary_2 - } - } - scope:frankokratia_crusader = { - set_variable = { - name = emp_beneficiary_3 - value = prev - } - } - } - } - } - #Same culture dominant gender courtier - if = { - limit = { - NOT = { has_variable = emp_beneficiary_3 } - } - random_courtier_or_guest = { - limit = { - ep3_frankokratia_beneficiary_trigger = yes - culture = scope:frankokratia_crusader.culture - ep3_frankokratia_beneficiary_gender_trigger = yes - NOR = { - this = scope:emp_beneficiary - this = scope:emp_beneficiary_2 - } - } - scope:frankokratia_crusader = { - set_variable = { - name = emp_beneficiary_3 - value = prev - } - } - } - } - #any courtier - if = { - limit = { - NOT = { has_variable = emp_beneficiary_3 } - } - random_courtier_or_guest = { - limit = { - ep3_frankokratia_beneficiary_trigger = yes - culture = scope:frankokratia_crusader.culture - ep3_frankokratia_beneficiary_gender_soft_trigger = yes - NOR = { - this = scope:emp_beneficiary - this = scope:emp_beneficiary_2 - } - } - scope:frankokratia_crusader = { - set_variable = { - name = emp_beneficiary_3 - value = prev - } - } - } - } - #pool character - if = { - limit = { - NOT = { has_variable = emp_beneficiary_3 } - } - random_pool_character = { - province = scope:frankokratia_crusader.capital_province - limit = { - ep3_frankokratia_beneficiary_trigger = yes - NOR = { - this = scope:emp_beneficiary - this = scope:emp_beneficiary_2 - } - } - scope:frankokratia_crusader = { - set_variable = { - name = emp_beneficiary_3 - value = prev - } - } - } - } - if = { - limit = { - has_variable = emp_beneficiary_3 - } - var:emp_beneficiary_3 = { save_scope_as = emp_beneficiary_3 } - } - } -} - -ep3_frankokratia_pick_crusader_beneficiary_effect = { - save_scope_as = frankokratia_crusader - #SET FIRST BENEFICIARY VARIABLE - #Dominant gender close family - random_close_family_member = { - limit = { - ep3_frankokratia_beneficiary_trigger = yes - ep3_frankokratia_beneficiary_gender_trigger = yes - dynasty = scope:frankokratia_crusader.dynasty - } - scope:frankokratia_crusader = { - set_variable = { - name = beneficiary - value = prev - } - } - } - #Dominant gender house member - if = { - limit = { - NOT = { has_variable = beneficiary } - } - house ?= { - random_house_member = { - limit = { - ep3_frankokratia_beneficiary_trigger = yes - ep3_frankokratia_beneficiary_gender_trigger = yes - } - scope:frankokratia_crusader = { - set_variable = { - name = beneficiary - value = prev - } - } - } - } - - } - #Dominant gender dynasty member - if = { - limit = { - NOT = { has_variable = beneficiary } - } - dynasty ?= { - random_dynasty_member = { - limit = { - ep3_frankokratia_beneficiary_trigger = yes - ep3_frankokratia_beneficiary_gender_trigger = yes - } - scope:frankokratia_crusader = { - set_variable = { - name = beneficiary - value = prev - } - } - } - } - } - #Close family any gender - if = { - limit = { - NOT = { has_variable = beneficiary } - } - random_close_family_member = { - limit = { - ep3_frankokratia_beneficiary_trigger = yes - ep3_frankokratia_beneficiary_gender_soft_trigger = yes - } - scope:frankokratia_crusader = { - set_variable = { - name = beneficiary - value = prev - } - } - } - } - #dynasty member any gender - if = { - limit = { - NOT = { has_variable = beneficiary } - } - dynasty ?= { - random_dynasty_member = { - limit = { - ep3_frankokratia_beneficiary_trigger = yes - ep3_frankokratia_beneficiary_gender_soft_trigger = yes - } - scope:frankokratia_crusader = { - set_variable = { - name = beneficiary - value = prev - } - } - } - } - } - #Same culture dominant gender courtier - if = { - limit = { - NOT = { has_variable = beneficiary } - } - random_courtier_or_guest = { - limit = { - ep3_frankokratia_beneficiary_trigger = yes - culture = scope:frankokratia_crusader.culture - ep3_frankokratia_beneficiary_gender_trigger = yes - } - scope:frankokratia_crusader = { - set_variable = { - name = beneficiary - value = prev - } - } - } - } - #any courtier - if = { - limit = { - NOT = { has_variable = beneficiary } - } - random_courtier_or_guest = { - limit = { - ep3_frankokratia_beneficiary_trigger = yes - culture = scope:frankokratia_crusader.culture - ep3_frankokratia_beneficiary_gender_soft_trigger = yes - } - scope:frankokratia_crusader = { - set_variable = { - name = beneficiary - value = prev - } - } - } - } - #pool character - if = { - limit = { - NOT = { has_variable = beneficiary } - } - random_pool_character = { - province = scope:frankokratia_crusader.capital_province - limit = { - ep3_frankokratia_beneficiary_trigger = yes - } - scope:frankokratia_crusader = { - set_variable = { - name = beneficiary - value = prev - } - } - } - } - if = { - limit = { - NOT = { has_variable = beneficiary } - } - #Create character - create_character = { - location = scope:latin_emperor.location - template = ep3_frankokratia_crusader_template - faith = scope:frankokratia_crusader.faith - culture = scope:frankokratia_crusader.culture - save_scope_as = new_latin_lord - } - scope:frankokratia_crusader = { - set_variable = { - name = beneficiary - value = scope:new_latin_lord - } - } - } - - - #SET SECOND BENEFICIARY VARIABLE - ##Dominant gender close family - random_close_family_member = { - limit = { - ep3_frankokratia_beneficiary_trigger = yes - ep3_frankokratia_beneficiary_gender_trigger = yes - dynasty = scope:frankokratia_crusader.dynasty - this != scope:frankokratia_crusader.var:beneficiary - } - scope:frankokratia_crusader = { - set_variable = { - name = beneficiary_2 - value = prev - } - } - } - #Dominant gender house member - if = { - limit = { - NOT = { has_variable = beneficiary_2 } - } - house ?= { - random_house_member = { - limit = { - ep3_frankokratia_beneficiary_trigger = yes - ep3_frankokratia_beneficiary_gender_trigger = yes - this != scope:frankokratia_crusader.var:beneficiary - } - scope:frankokratia_crusader = { - set_variable = { - name = beneficiary_2 - value = prev - } - } - } - } - } - #Dominant gender dynasty member - if = { - limit = { - NOT = { has_variable = beneficiary_2 } - } - dynasty ?= { - random_dynasty_member = { - limit = { - ep3_frankokratia_beneficiary_trigger = yes - ep3_frankokratia_beneficiary_gender_trigger = yes - this != scope:frankokratia_crusader.var:beneficiary - } - scope:frankokratia_crusader = { - set_variable = { - name = beneficiary_2 - value = prev - } - } - } - } - } - #Close family any gender - if = { - limit = { - NOT = { has_variable = beneficiary_2 } - } - random_close_family_member = { - limit = { - ep3_frankokratia_beneficiary_trigger = yes - ep3_frankokratia_beneficiary_gender_soft_trigger = yes - this != scope:frankokratia_crusader.var:beneficiary - } - scope:frankokratia_crusader = { - set_variable = { - name = beneficiary_2 - value = prev - } - } - } - } - #dynasty member any gender - if = { - limit = { - NOT = { has_variable = beneficiary_2 } - } - dynasty ?= { - random_dynasty_member = { - limit = { - ep3_frankokratia_beneficiary_trigger = yes - ep3_frankokratia_beneficiary_gender_soft_trigger = yes - this != scope:frankokratia_crusader.var:beneficiary - } - scope:frankokratia_crusader = { - set_variable = { - name = beneficiary_2 - value = prev - } - } - } - } - } - #Same culture dominant gender courtier - if = { - limit = { - NOT = { has_variable = beneficiary_2 } - } - random_courtier_or_guest = { - limit = { - ep3_frankokratia_beneficiary_trigger = yes - culture = scope:frankokratia_crusader.culture - ep3_frankokratia_beneficiary_gender_trigger = yes - this != scope:frankokratia_crusader.var:beneficiary - } - scope:frankokratia_crusader = { - set_variable = { - name = beneficiary_2 - value = prev - } - } - } - } - #any courtier - if = { - limit = { - NOT = { has_variable = beneficiary_2 } - } - random_courtier_or_guest = { - limit = { - ep3_frankokratia_beneficiary_trigger = yes - culture = scope:frankokratia_crusader.culture - ep3_frankokratia_beneficiary_gender_soft_trigger = yes - this != scope:frankokratia_crusader.var:beneficiary - } - scope:frankokratia_crusader = { - set_variable = { - name = beneficiary_2 - value = prev - } - } - } - } - #pool character - if = { - limit = { - NOT = { has_variable = beneficiary_2 } - } - random_pool_character = { - province = scope:frankokratia_crusader.capital_province - limit = { - ep3_frankokratia_beneficiary_trigger = yes - this != scope:frankokratia_crusader.var:beneficiary - } - scope:frankokratia_crusader = { - set_variable = { - name = beneficiary_2 - value = prev - } - } - } - } - if = { - limit = { - has_variable = beneficiary_2 - } - #SET THIRD BENEFICIARY VARIABLE - ##Dominant gender close family - random_close_family_member = { - limit = { - ep3_frankokratia_beneficiary_trigger = yes - ep3_frankokratia_beneficiary_gender_trigger = yes - dynasty = scope:frankokratia_crusader.dynasty - NOR = { - this = scope:frankokratia_crusader.var:beneficiary - this = scope:frankokratia_crusader.var:beneficiary_2 - } - } - scope:frankokratia_crusader = { - set_variable = { - name = beneficiary_3 - value = prev - } - } - }#Dominant gender house member - if = { - limit = { - NOT = { has_variable = beneficiary_3 } - } - house ?= { - random_house_member = { - limit = { - ep3_frankokratia_beneficiary_trigger = yes - ep3_frankokratia_beneficiary_gender_trigger = yes - NOR = { - this = scope:frankokratia_crusader.var:beneficiary - this = scope:frankokratia_crusader.var:beneficiary_2 - } - } - scope:frankokratia_crusader = { - set_variable = { - name = beneficiary_3 - value = prev - } - } - } - } - - } - #Dominant gender dynasty member - if = { - limit = { - NOT = { has_variable = beneficiary_3 } - } - dynasty ?= { - random_dynasty_member = { - limit = { - ep3_frankokratia_beneficiary_trigger = yes - ep3_frankokratia_beneficiary_gender_trigger = yes - NOR = { - this = scope:frankokratia_crusader.var:beneficiary - this = scope:frankokratia_crusader.var:beneficiary_2 - } - } - scope:frankokratia_crusader = { - set_variable = { - name = beneficiary_3 - value = prev - } - } - } - } - } - #Close family any gender - if = { - limit = { - NOT = { has_variable = beneficiary_3 } - } - random_close_family_member = { - limit = { - ep3_frankokratia_beneficiary_trigger = yes - ep3_frankokratia_beneficiary_gender_soft_trigger = yes - NOR = { - this = scope:frankokratia_crusader.var:beneficiary - this = scope:frankokratia_crusader.var:beneficiary_2 - } - } - scope:frankokratia_crusader = { - set_variable = { - name = beneficiary_3 - value = prev - } - } - } - } - #dynasty member any gender - if = { - limit = { - NOT = { has_variable = beneficiary_3 } - } - dynasty ?= { - random_dynasty_member = { - limit = { - ep3_frankokratia_beneficiary_trigger = yes - ep3_frankokratia_beneficiary_gender_soft_trigger = yes - NOR = { - this = scope:frankokratia_crusader.var:beneficiary - this = scope:frankokratia_crusader.var:beneficiary_2 - } - } - scope:frankokratia_crusader = { - set_variable = { - name = beneficiary_3 - value = prev - } - } - } - } - } - #Same culture dominant gender courtier - if = { - limit = { - NOT = { has_variable = beneficiary_3 } - } - random_courtier_or_guest = { - limit = { - ep3_frankokratia_beneficiary_trigger = yes - culture = scope:frankokratia_crusader.culture - ep3_frankokratia_beneficiary_gender_trigger = yes - NOR = { - this = scope:frankokratia_crusader.var:beneficiary - this = scope:frankokratia_crusader.var:beneficiary_2 - } - } - scope:frankokratia_crusader = { - set_variable = { - name = beneficiary_3 - value = prev - } - } - } - } - #any courtier - if = { - limit = { - NOT = { has_variable = beneficiary_3 } - } - random_courtier_or_guest = { - limit = { - ep3_frankokratia_beneficiary_trigger = yes - culture = scope:frankokratia_crusader.culture - ep3_frankokratia_beneficiary_gender_soft_trigger = yes - NOR = { - this = scope:frankokratia_crusader.var:beneficiary - this = scope:frankokratia_crusader.var:beneficiary_2 - } - } - scope:frankokratia_crusader = { - set_variable = { - name = beneficiary_3 - value = prev - } - } - } - } - #pool character - if = { - limit = { - NOT = { has_variable = beneficiary_3 } - } - random_pool_character = { - province = scope:frankokratia_crusader.capital_province - limit = { - ep3_frankokratia_beneficiary_trigger = yes - NOR = { - this = scope:frankokratia_crusader.var:beneficiary - this = scope:frankokratia_crusader.var:beneficiary_2 - } - } - scope:frankokratia_crusader = { - set_variable = { - name = beneficiary_3 - value = prev - } - } - } - } - } -} - -ep3_frankokratia_form_byzantine_kingdoms_effect = { - every_vassal = { - limit = { - is_landless_ruler = yes - is_ai = yes - highest_held_title_tier < tier_kingdom - - } - add_to_list = byz_landless - } - every_vassal = { - limit = { - is_ai = yes - is_landed = yes - NOT = { - government_has_flag = government_is_theocracy - } - } - add_to_list = byz_vassals - } - #Create player kings and kings for players - every_vassal_or_below = { - limit = { - OR = { - has_variable = frankokratia_becoming_king - AND = { - has_variable = frankokratia_gaining_vassal - highest_held_title_tier < tier_kingdom - capital_county = { - kingdom = { - NOT = { - exists = holder - } - } - } - highest_held_title_tier >= tier_duchy - #Must be free of any liege that isn't the emperor - NOT = { - liege = { - highest_held_title_tier < tier_empire - } - } - OR = { - is_powerful_vassal_of = title:e_byzantium.holder - house ?= { is_powerful_family = yes } - #Let's just always let Nikaea do this, they special - capital_county = { - kingdom = title:k_nikaea - NOT = { - exists = title:k_nikaea.holder - } - } - } - } - } - } - save_scope_as = player_byz_king - capital_county.kingdom = { - save_scope_as = player_byz_kingdom - } - create_character_memory = { - type = frankokratia_byz_independent_memory - } - create_title_and_vassal_change = { - type = created - save_scope_as = change - add_claim_on_loss = no - } - scope:player_byz_kingdom = { - change_title_holder = { - holder = scope:player_byz_king - change = scope:change - } - } - resolve_title_and_vassal_change = scope:change - } - #Move players under their kings - every_vassal = { - limit = { - has_variable = frankokratia_gaining_vassal - var:frankokratia_gaining_vassal = { - NOT = { - is_vassal_or_below_of = prev - } - } - } - save_scope_as = new_daddy - var:frankokratia_gaining_vassal = { - create_title_and_vassal_change = { - type = granted - save_scope_as = change - add_claim_on_loss = no - } - change_liege = { - liege = scope:new_daddy - change = scope:change - } - resolve_title_and_vassal_change = scope:change - } - } - #Make players independent - every_vassal_or_below = { - limit = { - has_variable = frankokratia_independent - NOT = { - liege = title:e_byzantium.holder - } - } - if = { - limit = { - OR = { - religion = religion:islam_religion - culture = { has_cultural_pillar = heritage_iranian } - culture = { has_cultural_pillar = heritage_turkic } - culture = { has_cultural_pillar = heritage_arabic } - } - highest_held_title_tier < tier_kingdom - - } - change_government = clan_government - } - else_if = { - limit = { - highest_held_title_tier < tier_kingdom - } - change_government = feudal_government - } - create_character_memory = { - type = frankokratia_byz_independent_memory - } - create_title_and_vassal_change = { - type = independency - save_scope_as = change - } - becomes_independent = { change = scope:change } - resolve_title_and_vassal_change = scope:change - } - - #Get every available kingdom that has a duke's capital in it - if = { - limit = { - any_realm_county = { - empire = title:e_byzantium - kingdom = { - NOR = { - exists = holder - AND = { - exists = scope:latin_kingdom_1 - this = scope:latin_kingdom_1 - } - AND = { - exists = scope:latin_kingdom_2 - this = scope:latin_kingdom_2 - } - is_in_list = available_byz_kingdoms - } - } - save_temporary_scope_as = county_temp - holder.capital_county = scope:county_temp - holder = { - is_ai = yes - highest_held_title_tier >= tier_duchy - OR = { - is_powerful_vassal_of = title:e_byzantium.holder - house ?= { is_powerful_family = yes } - #If people in e_byz are weak, make sure nikaea is still created - AND = { - NOT = { - any_in_list = { - list = byz_vassals - count = 3 - highest_held_title_tier >= tier_duchy - capital_county = { - kingdom = { - this = { is_in_list = available_byz_kingdoms } - NOT = { exists = holder } - } - } - OR = { - house = { is_powerful_family = yes } - is_powerful_vassal_of = title:e_byzantium.holder - } - } - } - capital_county = { - kingdom = title:k_nikaea - NOT = { - exists = title:k_nikaea.holder - } - } - } - - } - } - } - } - every_realm_county = { - limit = { - empire = title:e_byzantium - kingdom = { - NOR = { - exists = holder - AND = { - exists = scope:latin_kingdom_1 - this = scope:latin_kingdom_1 - } - AND = { - exists = scope:latin_kingdom_2 - this = scope:latin_kingdom_2 - } - is_in_list = available_byz_kingdoms - } - } - save_temporary_scope_as = county_temp - - holder.capital_county = scope:county_temp - holder = { - is_ai = yes - highest_held_title_tier >= tier_duchy - OR = { - is_powerful_vassal_of = title:e_byzantium.holder - house = { is_powerful_family = yes } - #If people in e_byz are weak, make sure nikaea is still created - AND = { - NOT = { - any_in_list = { - list = byz_vassals - count = 3 - highest_held_title_tier >= tier_duchy - capital_county = { - kingdom = { - this = { is_in_list = available_byz_kingdoms } - NOT = { exists = holder } - } - } - OR = { - house = { is_powerful_family = yes } - is_powerful_vassal_of = title:e_byzantium.holder - } - } - } - capital_county = { - kingdom = title:k_nikaea - NOT = { - exists = title:k_nikaea.holder - } - } - } - } - } - } - kingdom = { - add_to_list = available_byz_kingdoms - } - } - } - - #Assign new kingdoms - if = { - limit = { - any_in_list = { - list = available_byz_kingdoms - tier = tier_kingdom - } - } - while = { - limit = { - any_in_list = { - list = available_byz_kingdoms - NOT = { exists = holder } - } - } - ordered_in_list = { - list = byz_vassals - order_by = max_military_strength - limit = { - capital_county = { - kingdom = { - this = { is_in_list = available_byz_kingdoms } - NOT = { exists = holder } - } - } - highest_held_title_tier >= tier_duchy - OR = { - is_powerful_vassal_of = title:e_byzantium.holder - house = { is_powerful_family = yes } - #If people in e_byz are weak, make sure nikaea is still created - AND = { - NOT = { - any_in_list = { - list = byz_vassals - count = 3 - highest_held_title_tier >= tier_duchy - capital_county = { - kingdom = { - this = { is_in_list = available_byz_kingdoms } - NOT = { exists = holder } - } - } - OR = { - house = { is_powerful_family = yes } - is_powerful_vassal_of = title:e_byzantium.holder - } - } - } - capital_county = { - kingdom = title:k_nikaea - NOT = { - exists = title:k_nikaea.holder - } - } - } - } - } - create_character_memory = { - type = frankokratia_byz_independent_memory - } - save_scope_as = new_byz_king - capital_county.kingdom = { - save_scope_as = new_byz_kingdom - } - create_title_and_vassal_change = { - type = created - save_scope_as = change - add_claim_on_loss = no - } - scope:new_byz_kingdom = { - change_title_holder = { - holder = scope:new_byz_king - change = scope:change - } - } - resolve_title_and_vassal_change = scope:change - } - } - } - #Move de jure neighbour vassals into kingdoms - if = { - limit = { - any_vassal = { - is_in_list = byz_vassals - highest_held_title_tier <= tier_duchy - government_has_flag = government_is_administrative - OR = { - ai_boldness <= medium_negative_ai_value - ai_honor >= medium_positive_ai_value - ai_energy <= medium_negative_ai_value - has_trait = loyal - } - capital_county = { - save_temporary_scope_as = prime_title - kingdom.holder ?= { - OR = { - is_in_list = byz_vassals - this = title:e_byzantium.holder - } - } - } - #One of heir counties borders the king's personal counties - any_sub_realm_county = { - any_neighboring_county = { - holder = { - OR = { - this = scope:prime_title.kingdom.holder - any_liege_or_above = { - this = scope:prime_title.kingdom.holder - } - } - } - } - } - } - } - while = { - limit = { - any_vassal = { - is_in_list = byz_vassals - highest_held_title_tier <= tier_duchy - government_has_flag = government_is_administrative - OR = { - ai_boldness <= medium_negative_ai_value - ai_honor >= medium_positive_ai_value - ai_energy <= medium_negative_ai_value - has_trait = loyal - } - capital_county = { - save_temporary_scope_as = prime_title - kingdom.holder ?= { - OR = { - is_in_list = byz_vassals - this = title:e_byzantium.holder - } - } - } - any_sub_realm_county = { - any_neighboring_county = { - holder = { - OR = { - this = scope:prime_title.kingdom.holder - any_liege_or_above = { - this = scope:prime_title.kingdom.holder - } - } - } - } - } - } - } - random_in_list = { - list = byz_vassals - limit = { - is_in_list = byz_vassals - highest_held_title_tier <= tier_duchy - government_has_flag = government_is_administrative - OR = { - ai_boldness <= medium_negative_ai_value - ai_honor >= medium_positive_ai_value - ai_energy <= medium_negative_ai_value - has_trait = loyal - } - capital_county = { - save_temporary_scope_as = prime_title - kingdom.holder ?= { - OR = { - is_in_list = byz_vassals - this = title:e_byzantium.holder - } - } - } - any_sub_realm_county = { - any_neighboring_county = { - holder = { - OR = { - this = scope:prime_title.kingdom.holder - any_liege_or_above = { - this = scope:prime_title.kingdom.holder - } - } - } - } - } - } - save_scope_as = vassalizing_vassal - random_in_list = { - list = byz_vassals - limit = { - is_in_list = byz_vassals - any_held_title = { - title_tier = kingdom - any_de_jure_county = { - save_temporary_scope_as = county_temp - scope:vassalizing_vassal.capital_county = { - this = scope:county_temp - } - } - } - } - save_scope_as = new_liege - } - create_title_and_vassal_change = { - type = granted - save_scope_as = change - add_claim_on_loss = no - } - change_liege = { - liege = scope:new_liege - change = scope:change - } - resolve_title_and_vassal_change = scope:change - } - } - } - #Move landless into kingdoms - if = { - limit = { - any_vassal = { - is_in_list = byz_landless - } - any_vassal = { - highest_held_title_tier >= tier_kingdom - government_has_flag = government_is_administrative - } - } - while = { - limit = { - any_in_list = { - list = byz_landless - exists = house - has_domicile = yes - } - } - if = { - limit = { - any_in_list = { - list = byz_landless - house ?= { - any_house_member = { - any_held_title = { - title_tier = kingdom - } - highest_held_title_tier >= tier_kingdom - government_has_flag = government_is_administrative - } - } - } - } - random_in_list = { - list = byz_landless - limit = { - house ?= { - any_house_member = { - any_held_title = { - title_tier = kingdom - } - highest_held_title_tier >= tier_kingdom - government_has_flag = government_is_administrative - } - } - } - house = { - random_house_member = { - limit = { - any_held_title = { - title_tier = kingdom - } - highest_held_title_tier >= tier_kingdom - government_has_flag = government_is_administrative - } - save_scope_as = new_byz_liege - } - } - create_title_and_vassal_change = { - type = granted - save_scope_as = change - add_claim_on_loss = no - } - change_liege = { - liege = scope:new_byz_liege - change = scope:change - } - resolve_title_and_vassal_change = scope:change - remove_from_list = byz_landless - if = { - limit = { - has_domicile = yes - } - domicile = { - move_domicile = scope:new_byz_liege.capital_province - } - } - } - } - else_if = { - limit = { - any_in_list = { - list = byz_landless - has_domicile = yes - domicile.domicile_location = { - kingdom = { - holder ?= { - government_has_flag = government_is_administrative - liege = title:e_byzantium.holder - } - } - } - } - } - random_in_list = { - list = byz_landless - limit = { - has_domicile = yes - domicile.domicile_location = { - kingdom = { - holder ?= { - government_has_flag = government_is_administrative - liege = title:e_byzantium.holder - } - } - } - } - domicile.domicile_location = { - kingdom = { - holder = { - save_scope_as = new_byz_liege - } - } - } - create_title_and_vassal_change = { - type = granted - save_scope_as = change - add_claim_on_loss = no - } - change_liege = { - liege = scope:new_byz_liege - change = scope:change - } - resolve_title_and_vassal_change = scope:change - remove_from_list = byz_landless - if = { - limit = { - has_domicile = yes - } - domicile = { - move_domicile = scope:new_byz_liege.capital_province - } - } - } - } - else = { - random_in_list = { - list = byz_landless - title:e_byzantium.holder = { - random_vassal = { - limit = { - highest_held_title_tier >= tier_kingdom - government_has_flag = government_is_administrative - } - save_scope_as = new_byz_liege - } - } - create_title_and_vassal_change = { - type = granted - save_scope_as = change - add_claim_on_loss = no - } - change_liege = { - liege = scope:new_byz_liege - change = scope:change - } - resolve_title_and_vassal_change = scope:change - remove_from_list = byz_landless - if = { - limit = { - has_domicile = yes - } - domicile = { - move_domicile = scope:new_byz_liege.capital_province - } - } - } - } - } - } - - #Make admin kings house heads if they ain't - every_vassal = { - limit = { - highest_held_title_tier = tier_kingdom - government_has_flag = government_is_administrative - exists = house - save_temporary_scope_as = house_king - house.house_head = { - #Not already house head - this != scope:house_king - highest_held_title_tier < tier_kingdom - #Only remove player house head status if they're in the realm - OR = { - is_ai = yes - top_liege = scope:house_king.liege - } - } - #If there's more than one king of their house, they are the strongest - NOT = { - house = { - any_house_member = { - highest_held_title_tier = tier_kingdom - government_has_flag = government_is_administrative - max_military_strength > scope:house_king.max_military_strength - } - } - } - } - house = { - set_house_head = prev - } - domicile = { - move_domicile = prev.capital_province - } - } - - #Make governor house heads to save noble families being destroyed - every_vassal = { - limit = { - highest_held_title_tier = tier_kingdom - } - every_vassal_or_below = { - limit = { - highest_held_title_tier >= tier_county - government_has_flag = government_is_administrative - exists = house - save_temporary_scope_as = house_chud - house.house_head = { - #Not already house head - this != scope:house_chud - government_has_flag = government_is_administrative - highest_held_title_tier < tier_kingdom - #Only remove player house head status if they're in the realm - OR = { - is_ai = yes - liege ?= scope:house_chud.top_liege - } - #Liege is the Byzantine emperor - liege ?= { - top_liege = this - } - #If there's more than one admin survivor of their house, they are the strongest - NOT = { - house = { - any_house_member = { - OR = { - highest_held_title_tier = tier_kingdom - AND = { - liege ?= { - highest_held_title_tier = tier_kingdom - } - max_military_strength > scope:house_chud.max_military_strength - } - } - government_has_flag = government_is_administrative - } - } - } - } - } - house = { - set_house_head = prev - } - domicile = { - move_domicile = prev.capital_province - } - } - } - - #Switch anyone not under a king to feudal - every_vassal_or_below = { - limit = { - is_landed = yes - government_has_flag = government_is_administrative - highest_held_title_tier < tier_kingdom - OR = { - liege = { - highest_held_title_tier < tier_kingdom - } - liege = title:e_byzantium.holder - } - } - if = { - limit = { - OR = { - religion = religion:islam_religion - culture = { has_cultural_pillar = heritage_iranian } - culture = { has_cultural_pillar = heritage_turkic } - culture = { has_cultural_pillar = heritage_arabic } - } - } - change_government = clan_government - } - else = { - change_government = feudal_government - } - } -} - -ep3_frankokratia_byzantine_independence_effect = { - every_vassal_or_below = { - limit = { - is_landed = yes - is_ai = yes - highest_held_title_tier < tier_kingdom - highest_held_title_tier >= tier_county - liege = { - save_temporary_scope_as = temp_byz_liege - } - OR = { - #They have a strong reason and the last piece is personality - AND = { - ai_boldness > high_negative_ai_value - ai_honor < high_positive_ai_value - ai_energy > high_negative_ai_value - OR = { - trigger_if = { - limit = { - liege ?= { - government_has_flag = government_is_administrative - } - } - NOT = { - government_has_flag = government_is_administrative - } - } - liege = { - governor_efficiency < 0.7 - } - culture = { - this != scope:temp_byz_liege.culture - } - faith = { - this != scope:temp_byz_liege.faith - } - opinion = { - target = liege - value <= -50 - } - #They are not de jure to the liege - NOT = { - primary_title = { - target_is_de_jure_liege_or_above = scope:temp_byz_liege.primary_title - } - } - } - } - #Their only reason is an inclination - AND = { - ai_boldness >= low_positive_ai_value - ai_honor <= low_negative_ai_value - ai_energy >= low_positive_ai_value - OR = { - liege = { - influence_level <= 2 - } - opinion = { - target = liege - value <= -25 - } - liege = { - governor_efficiency < 0.85 - } - } - } - } - NOR = { - has_trait = loyal - opinion = { - target = liege - value >= 80 - } - liege = { - influence_level >= 4 - } - liege = { - governor_efficiency >= 1.4 - } - } - } - if = { - limit = { - OR = { - religion = religion:islam_religion - culture = { has_cultural_pillar = heritage_iranian } - culture = { has_cultural_pillar = heritage_turkic } - culture = { has_cultural_pillar = heritage_arabic } - } - highest_held_title_tier < tier_kingdom - - } - change_government = clan_government - } - else_if = { - limit = { - highest_held_title_tier < tier_kingdom - } - change_government = feudal_government - } - create_character_memory = { - type = frankokratia_byz_independent_memory - } - create_title_and_vassal_change = { - type = independency - save_scope_as = change - } - becomes_independent = { change = scope:change } - resolve_title_and_vassal_change = scope:change - } -} - -ep3_frankokratia_vassalize_latin_counts_effect = { - #Move de jure neighbour vassals into kingdoms - if = { - limit = { - #Duchy titles have been assigned - any_vassal = { - highest_held_title_tier = tier_duchy - } - #At least one count is under the duchy - any_vassal = { - highest_held_title_tier = tier_county - primary_title.duchy = { - holder ?= { - is_vassal_of = scope:latin_emperor - } - } - } - } - every_vassal = { - limit = { - highest_held_title_tier = tier_county - primary_title.duchy = { - holder ?= { - is_vassal_of = scope:latin_emperor - } - } - } - add_to_list = counts_to_distribute - } - while = { - limit = { - any_vassal = { - is_in_list = counts_to_distribute - } - } - random_in_list = { - list = counts_to_distribute - save_scope_as = vassalizing_vassal - primary_title.duchy.holder = { - save_scope_as = new_liege - } - create_title_and_vassal_change = { - type = granted - save_scope_as = change - add_claim_on_loss = no - } - change_liege = { - liege = scope:new_liege - change = scope:change - } - resolve_title_and_vassal_change = scope:change - } - } - } - #Give out leftover counties - if = { - limit = { - any_held_title = { - title_tier = county - duchy = { - holder ?= { - is_vassal_or_below_of = scope:latin_emperor - } - } - } - } - while = { - limit = { - any_held_title = { - title_tier = county - duchy = { - holder ?= { - is_vassal_or_below_of = scope:latin_emperor - } - } - } - } - random_held_title = { - title_tier = county - limit = { - duchy = { - holder ?= { - is_vassal_or_below_of = scope:latin_emperor - } - } - } - duchy.holder = { - save_scope_as = latin_vassal - } - save_scope_as = county_to_grant - } - create_title_and_vassal_change = { - type = granted - save_scope_as = title_change - } - scope:county_to_grant = { - change_title_holder = { - holder = scope:latin_vassal - change = scope:title_change - } - } - resolve_title_and_vassal_change = scope:title_change - } - } -} - -ep3_frankokratia_end_story_effect = { - global_var:byz_claimant_champion = { - remove_character_modifier = prepared_for_daring_deeds_modifier - remove_character_flag = pope_condemned_crusader_claim - remove_character_flag = pope_endorsed_crusader_claim - random_owned_story = { - type = frankokratia_story - var:claimant ?= { - hidden_effect = { - remove_character_modifier = eager_for_empire_modifier - remove_character_flag = swore_to_convert_byz_catholic - remove_character_flag = paying_off_latins - remove_character_flag = ep3_frankokratia_events.0041_succeeded_duel - } - } - every_in_list = { - variable = frankokratia_leaders - hidden_effect = { - remove_character_modifier = grand_crusader_fleet_modifier - remove_character_flag = joining_frankokratia - remove_character_flag = had_event_frankokratia_0020 - remove_character_flag = dont_send_general_event_franko - remove_variable = old_liege - remove_variable = latin_county - remove_variable = emp_beneficiary - remove_variable = emp_beneficiary_2 - remove_variable = emp_beneficiary_3 - remove_variable = beneficiary - remove_variable = beneficiary_2 - remove_variable = beneficiary_3 - remove_variable = latin_duchy - clear_variable_list = lost_titles - } - } - end_story = yes - } - remove_global_variable = byz_claimant_champion - remove_global_variable = financier_title - remove_global_variable = slaughtered_byzantines - remove_global_variable = latin_kingdom_1 - remove_global_variable = latin_kingdom_2 - clear_global_variable_list = slaughtered_byzantines_list - } -} - -greek_anarchy_army_spawn_effect = { - random_list = { - 5 = { - trigger = { - OR = { - culture = { - has_cultural_parameter = unlock_maa_cataphract - } - scope:defender = { - any_realm_county = { - culture = { - has_cultural_parameter = unlock_maa_cataphract - } - } - } - scope:defender = { - culture = { - has_cultural_parameter = unlock_maa_cataphract - } - } - } - } - #Cool heavy cav should be less likely for petty wars - modifier = { - NOT = { - scope:defender = { - highest_held_title_tier >= tier_kingdom - } - } - add = -4 - } - if = { - limit = { - scope:defender = { - culture = { - has_cultural_parameter = unlock_maa_cataphract - } - } - } - scope:defender.culture = { save_scope_as = army_culture } - } - else_if = { - limit = { - scope:defender = { - any_realm_county = { - culture = { - has_cultural_parameter = unlock_maa_cataphract - } - } - } - } - scope:defender = { - random_realm_county = { - limit = { - culture = { - has_cultural_parameter = unlock_maa_cataphract - } - } - culture = { save_scope_as = army_culture } - } - } - } - else = { - culture = { - save_scope_as = army_culture - } - } - spawn_army = { - name = greek_anarchy_war_greek_army_name - uses_supply = yes - inheritable = no - levies = greek_anarchy_army_levy_value - men_at_arms = { - type = cataphract - stacks = greek_anarchy_army_heavy_cav_value - } - location = scope:attacker.capital_province - } - } - 4 = { - trigger = { - OR = { - culture = { - has_cultural_parameter = unlock_maa_ballistrai - } - scope:defender = { - culture = { - has_cultural_parameter = unlock_maa_ballistrai - } - } - scope:defender = { - any_realm_county = { - culture = { - has_cultural_parameter = unlock_maa_ballistrai - } - } - } - } - } - if = { - limit = { - scope:defender = { - culture = { - has_cultural_parameter = unlock_maa_ballistrai - } - } - } - scope:defender.culture = { save_scope_as = army_culture } - } - else_if = { - limit = { - scope:defender = { - any_realm_county = { - culture = { - has_cultural_parameter = unlock_maa_ballistrai - } - } - } - } - scope:defender = { - random_realm_county = { - limit = { - culture = { - has_cultural_parameter = unlock_maa_ballistrai - } - } - culture = { save_scope_as = army_culture } - } - } - } - else = { - culture = { - save_scope_as = army_culture - } - } - spawn_army = { - name = greek_anarchy_war_greek_army_name - uses_supply = yes - inheritable = no - levies = greek_anarchy_army_levy_value - men_at_arms = { - type = ballistrai - stacks = greek_anarchy_army_maa_value - } - location = scope:attacker.capital_province - } - } - 4 = { - trigger = { - OR = { - culture = { - has_cultural_parameter = unlock_maa_skoutatoi - } - scope:defender = { - any_realm_county = { - culture = { - has_cultural_parameter = unlock_maa_skoutatoi - } - } - } - scope:defender = { - culture = { - has_cultural_parameter = unlock_maa_skoutatoi - } - } - } - } - if = { - limit = { - scope:defender = { - culture = { - has_cultural_parameter = unlock_maa_skoutatoi - } - } - } - scope:defender.culture = { save_scope_as = army_culture } - } - else_if = { - limit = { - scope:defender = { - any_realm_county = { - culture = { - has_cultural_parameter = unlock_maa_skoutatoi - } - } - } - } - scope:defender = { - random_realm_county = { - limit = { - culture = { - has_cultural_parameter = unlock_maa_skoutatoi - } - } - culture = { save_scope_as = army_culture } - } - } - } - else = { - culture = { - save_scope_as = army_culture - } - } - spawn_army = { - name = greek_anarchy_war_greek_army_name - uses_supply = yes - inheritable = no - levies = greek_anarchy_army_levy_value - men_at_arms = { - type = skoutatoi - stacks = greek_anarchy_army_maa_value - } - location = scope:attacker.capital_province - } - } - 4 = { - trigger = { - OR = { - culture = { - has_cultural_parameter = unlock_maa_akritai - } - scope:defender = { - any_realm_county = { - culture = { - has_cultural_parameter = unlock_maa_akritai - } - county_has_province_with_terrain = { - terrain = mountains - } - } - } - scope:defender = { - culture = { - has_cultural_parameter = unlock_maa_akritai - } - } - } - } - if = { - limit = { - scope:defender = { - culture = { - has_cultural_parameter = unlock_maa_akritai - } - } - } - scope:defender.culture = { save_scope_as = army_culture } - } - else_if = { - limit = { - scope:defender = { - any_realm_county = { - culture = { - has_cultural_parameter = unlock_maa_akritai - } - } - } - } - scope:defender = { - random_realm_county = { - limit = { - culture = { - has_cultural_parameter = unlock_maa_akritai - } - } - culture = { save_scope_as = army_culture } - } - } - } - else = { - culture = { - save_scope_as = army_culture - } - } - spawn_army = { - name = greek_anarchy_war_greek_army_name - uses_supply = yes - inheritable = no - levies = greek_anarchy_army_levy_value - men_at_arms = { - type = akritai - stacks = greek_anarchy_army_weak_maa_value - } - location = scope:attacker.capital_province - } - } - #Armenians - 10 = { - trigger = { - OR = { - culture = { - has_cultural_parameter = unlock_maa_ayrudzi - } - scope:defender = { - culture = { - has_cultural_parameter = unlock_maa_ayrudzi - } - } - scope:defender = { - any_realm_county = { - culture = { - has_cultural_parameter = unlock_maa_ayrudzi - } - } - } - } - } - if = { - limit = { - scope:defender = { - culture = { - has_cultural_parameter = unlock_maa_ayrudzi - } - } - } - scope:defender.culture = { save_scope_as = army_culture } - } - else_if = { - limit = { - scope:defender = { - any_realm_county = { - culture = { - has_cultural_parameter = unlock_maa_ayrudzi - } - } - } - } - scope:defender = { - random_realm_county = { - limit = { - culture = { - has_cultural_parameter = unlock_maa_ayrudzi - } - } - culture = { save_scope_as = army_culture } - } - } - } - else = { - culture = { - save_scope_as = army_culture - } - } - spawn_army = { - name = greek_anarchy_war_neighbor_army_name - uses_supply = yes - inheritable = no - levies = greek_anarchy_army_levy_value - men_at_arms = { - type = ayrudzi - stacks = greek_anarchy_army_maa_value - } - location = scope:attacker.capital_province - } - } - #Georgians - 10 = { - trigger = { - OR = { - culture = { - has_cultural_parameter = unlock_maa_monaspa - } - scope:defender = { - culture = { - has_cultural_parameter = unlock_maa_monaspa - } - } - scope:defender = { - any_realm_county = { - culture = { - has_cultural_parameter = unlock_maa_monaspa - } - } - } - } - } - if = { - limit = { - scope:defender = { - culture = { - has_cultural_parameter = unlock_maa_monaspa - } - } - } - scope:defender.culture = { save_scope_as = army_culture } - } - else_if = { - limit = { - scope:defender = { - any_realm_county = { - culture = { - has_cultural_parameter = unlock_maa_monaspa - } - } - } - } - scope:defender = { - random_realm_county = { - limit = { - culture = { - has_cultural_parameter = unlock_maa_monaspa - } - } - culture = { save_scope_as = army_culture } - } - } - } - else = { - culture = { - save_scope_as = army_culture - } - } - spawn_army = { - name = greek_anarchy_war_neighbor_army_name - uses_supply = yes - inheritable = no - levies = greek_anarchy_army_levy_value - men_at_arms = { - type = monaspa - stacks = greek_anarchy_army_heavy_cav_value - } - location = scope:attacker.capital_province - } - } - #Cataphract archers - 10 = { - trigger = { - OR = { - culture = { - has_cultural_parameter = unlock_maa_cataphract_archers - } - scope:defender = { - culture = { - has_cultural_parameter = unlock_maa_cataphract_archers - } - } - scope:defender = { - any_realm_county = { - culture = { - has_cultural_parameter = unlock_maa_cataphract_archers - } - } - } - } - } - if = { - limit = { - scope:defender = { - culture = { - has_cultural_parameter = unlock_maa_cataphract_archers - } - } - } - scope:defender.culture = { save_scope_as = army_culture } - } - else_if = { - limit = { - scope:defender = { - any_realm_county = { - culture = { - has_cultural_parameter = unlock_maa_cataphract_archers - } - } - } - } - scope:defender = { - random_realm_county = { - limit = { - culture = { - has_cultural_parameter = unlock_maa_cataphract_archers - } - } - culture = { save_scope_as = army_culture } - } - } - } - else = { - culture = { - save_scope_as = army_culture - } - } - spawn_army = { - name = greek_anarchy_war_neighbor_army_name - uses_supply = yes - inheritable = no - levies = greek_anarchy_army_levy_value - men_at_arms = { - type = cataphract_archers - stacks = greek_anarchy_army_heavy_cav_value - } - location = scope:attacker.capital_province - } - } - #Konni folk get konni - 10 = { - trigger = { - OR = { - culture = { - has_cultural_parameter = unlock_maa_hussar - } - scope:defender = { - culture = { - has_cultural_parameter = unlock_maa_hussar - } - } - scope:defender = { - any_realm_county = { - culture = { - has_cultural_parameter = unlock_maa_hussar - } - } - } - } - } - if = { - limit = { - scope:defender = { - culture = { - has_cultural_parameter = unlock_maa_hussar - } - } - } - scope:defender.culture = { save_scope_as = army_culture } - } - else_if = { - limit = { - scope:defender = { - any_realm_county = { - culture = { - has_cultural_parameter = unlock_maa_hussar - } - } - } - } - scope:defender = { - random_realm_county = { - limit = { - culture = { - has_cultural_parameter = unlock_maa_hussar - } - } - culture = { save_scope_as = army_culture } - } - } - } - else = { - culture = { - save_scope_as = army_culture - } - } - spawn_army = { - name = greek_anarchy_war_neighbor_army_name - uses_supply = yes - inheritable = no - levies = greek_anarchy_army_levy_value - men_at_arms = { - type = hussar - stacks = greek_anarchy_army_maa_value - } - location = scope:attacker.capital_province - } - } - #Varangians - 10 = { - trigger = { - OR = { - culture = { - has_cultural_parameter = unlock_maa_varangian_veterans - } - culture = { - this = culture:greek - } - culture = { - any_parent_culture_or_above = { - this = culture:greek - } - } - scope:defender = { - culture = { - has_cultural_parameter = unlock_maa_varangian_veterans - } - } - scope:defender = { - any_realm_county = { - culture = { - has_cultural_parameter = unlock_maa_varangian_veterans - } - } - } - } - } - modifier = { - OR = { - culture = { - this = culture:greek - } - culture = { - any_parent_culture_or_above = { - this = culture:greek - } - } - } - highest_held_title_tier <= tier_duchy - add = -8 - } - spawn_army = { - name = greek_anarchy_war_generic_army_name_2 - uses_supply = yes - inheritable = no - levies = greek_anarchy_army_levy_value - men_at_arms = { - type = varangian_veterans - stacks = greek_anarchy_army_maa_value - } - location = scope:attacker.capital_province - } - } - #Horse archers - 7 = { - trigger = { - OR = { - culture = { - culture_has_archer_cavalry_maa = yes - } - scope:defender = { - any_realm_county = { - culture = { - culture_has_archer_cavalry_maa = yes - } - } - } - scope:defender = { - any_vassal = { - OR = { - culture = { culture_has_archer_cavalry_maa = yes } - mpo_can_recruit_nomad_maa_trigger = yes - } - } - } - scope:defender = { - OR = { - culture = { culture_has_archer_cavalry_maa = yes } - mpo_can_recruit_nomad_maa_trigger = yes - } - } - } - } - if = { - limit = { - scope:defender = { - any_realm_county = { - culture = { - culture_has_archer_cavalry_maa = yes - } - } - } - } - scope:defender = { - random_realm_county = { - limit = { - culture = { - culture_has_archer_cavalry_maa = yes - } - } - culture = { save_scope_as = army_culture } - } - } - } - else_if = { - limit = { - scope:defender = { - OR = { - culture = { culture_has_archer_cavalry_maa = yes } - mpo_can_recruit_nomad_maa_trigger = yes - } - } - } - scope:defender = { - culture = { - save_scope_as = army_culture - } - } - } - else_if = { - limit = { - scope:defender = { - any_vassal = { - OR = { - culture = { culture_has_archer_cavalry_maa = yes } - mpo_can_recruit_nomad_maa_trigger = yes - } - } - } - } - scope:defender = { - random_vassal = { - limit = { - OR = { - culture = { culture_has_archer_cavalry_maa = yes } - mpo_can_recruit_nomad_maa_trigger = yes - } - } - culture = { save_scope_as = army_culture } - } - } - } - else = { - culture = { - save_scope_as = army_culture - } - } - spawn_army = { - name = greek_anarchy_war_nomad_army_name - uses_supply = yes - inheritable = no - levies = greek_anarchy_army_levy_value - men_at_arms = { - type = horse_archers - stacks = greek_anarchy_army_maa_value - } - location = scope:attacker.capital_province - } - } - #Crossbowmen - 2 = { - trigger = { - OR = { - culture = { - OR = { - has_innovation = innovation_advanced_bowmaking - has_innovation = innovation_repeating_crossbow - } - } - scope:defender = { - any_realm_county = { - culture = { - OR = { - has_innovation = innovation_advanced_bowmaking - has_innovation = innovation_repeating_crossbow - } - } - } - } - } - } - spawn_army = { - name = greek_anarchy_war_generic_army_name_2 - uses_supply = yes - inheritable = no - levies = greek_anarchy_army_levy_value - men_at_arms = { - type = crossbowmen - stacks = greek_anarchy_army_maa_value - } - location = scope:attacker.capital_province - } - } - #Norman knights - 2 = { - trigger = { - OR = { - culture = { - has_cultural_parameter = unlock_maa_conrois - } - top_liege = { - any_vassal = { - highest_held_title_tier >= tier_county - culture = { - has_cultural_parameter = unlock_maa_conrois - } - } - } - any_realm_county = { - culture = { - has_cultural_parameter = unlock_maa_conrois - } - } - #Normans should be just runnin' wild - culture:norman = { - exists = culture_head - has_cultural_parameter = unlock_maa_conrois - } - } - } - modifier = { - OR = { - culture = { - has_cultural_parameter = unlock_maa_conrois - } - top_liege = { - any_vassal = { - highest_held_title_tier >= tier_county - culture = { - has_cultural_parameter = unlock_maa_conrois - } - } - } - any_realm_county = { - culture = { - has_cultural_parameter = unlock_maa_conrois - } - } - } - add = 18 - } - if = { - limit = { - culture = { - has_cultural_parameter = unlock_maa_conrois - } - } - culture = { - save_scope_as = army_culture - } - } - else_if = { - limit = { - top_liege = { - any_vassal = { - culture = { - has_cultural_parameter = unlock_maa_conrois - } - } - } - } - top_liege = { - random_vassal = { - limit = { - culture = { - has_cultural_parameter = unlock_maa_conrois - } - } - culture = { - save_scope_as = army_culture - } - } - } - } - else_if = { - limit = { - any_realm_county = { - culture = { - has_cultural_parameter = unlock_maa_conrois - } - } - } - random_realm_county = { - limit = { - culture = { - has_cultural_parameter = unlock_maa_conrois - } - } - culture = { - save_scope_as = army_culture - } - } - } - else = { - culture:norman = { - save_scope_as = army_culture - } - } - spawn_army = { - name = greek_anarchy_war_crusaders_army_name - uses_supply = yes - inheritable = no - levies = greek_anarchy_army_levy_value - men_at_arms = { - type = conrois - stacks = greek_anarchy_army_heavy_cav_value - } - location = scope:attacker.capital_province - } - } - #Longbowmen - 10 = { - trigger = { - OR = { - culture = { - has_cultural_parameter = unlock_maa_longbowmen - } - top_liege = { - any_vassal = { - highest_held_title_tier >= tier_county - culture = { - has_cultural_parameter = unlock_maa_longbowmen - } - } - } - any_realm_county = { - culture = { - has_cultural_parameter = unlock_maa_longbowmen - } - } - } - } - if = { - limit = { - culture = { - has_cultural_parameter = unlock_maa_longbowmen - } - } - culture = { - save_scope_as = army_culture - } - } - else_if = { - limit = { - top_liege = { - any_vassal = { - culture = { - has_cultural_parameter = unlock_maa_longbowmen - } - } - } - } - top_liege = { - random_vassal = { - limit = { - culture = { - has_cultural_parameter = unlock_maa_longbowmen - } - } - culture = { - save_scope_as = army_culture - } - } - } - } - else = { - random_realm_county = { - limit = { - culture = { - has_cultural_parameter = unlock_maa_longbowmen - } - } - culture = { - save_scope_as = army_culture - } - } - } - spawn_army = { - name = greek_anarchy_war_crusaders_army_name - uses_supply = yes - inheritable = no - levies = greek_anarchy_army_levy_value - men_at_arms = { - type = longbowmen - stacks = greek_anarchy_army_maa_value - } - location = scope:attacker.capital_province - } - } - #Picchieri - 10 = { - trigger = { - OR = { - culture = { - has_innovation = innovation_pike_columns - } - top_liege = { - any_vassal = { - highest_held_title_tier >= tier_county - culture = { - has_innovation = innovation_pike_columns - } - } - } - any_realm_county = { - culture = { - has_innovation = innovation_pike_columns - } - } - } - } - if = { - limit = { - culture = { - has_innovation = innovation_pike_columns - } - } - culture = { - save_scope_as = army_culture - } - } - else_if = { - limit = { - top_liege = { - any_vassal = { - culture = { - has_innovation = innovation_pike_columns - } - } - } - } - top_liege = { - random_vassal = { - limit = { - culture = { - has_innovation = innovation_pike_columns - } - } - culture = { - save_scope_as = army_culture - } - } - } - } - else = { - random_realm_county = { - limit = { - culture = { - has_innovation = innovation_pike_columns - } - } - culture = { - save_scope_as = army_culture - } - } - } - spawn_army = { - name = greek_anarchy_war_crusaders_army_name - uses_supply = yes - inheritable = no - levies = greek_anarchy_army_levy_value - men_at_arms = { - type = picchieri - stacks = greek_anarchy_army_maa_value - } - location = scope:attacker.capital_province - } - } - #Goedendag - 10 = { - trigger = { - OR = { - culture = { - has_innovation = innovation_adaptive_militia - } - top_liege = { - any_vassal = { - highest_held_title_tier >= tier_county - culture = { - has_innovation = innovation_adaptive_militia - } - } - } - any_realm_county = { - culture = { - has_innovation = innovation_adaptive_militia - } - } - } - } - if = { - limit = { - culture = { - has_innovation = innovation_adaptive_militia - } - } - culture = { - save_scope_as = army_culture - } - } - else_if = { - limit = { - top_liege = { - any_vassal = { - culture = { - has_innovation = innovation_adaptive_militia - } - } - } - } - top_liege = { - random_vassal = { - limit = { - culture = { - has_innovation = innovation_adaptive_militia - } - } - culture = { - save_scope_as = army_culture - } - } - } - } - else = { - random_realm_county = { - limit = { - culture = { - has_innovation = innovation_adaptive_militia - } - } - culture = { - save_scope_as = army_culture - } - } - } - spawn_army = { - name = greek_anarchy_war_crusaders_army_name - uses_supply = yes - inheritable = no - levies = greek_anarchy_army_levy_value - men_at_arms = { - type = goedendag - stacks = greek_anarchy_army_weak_maa_value - } - location = scope:attacker.capital_province - } - } - #Caballeros - 10 = { - trigger = { - OR = { - culture = { - has_innovation = innovation_caballeros - } - top_liege = { - any_vassal = { - highest_held_title_tier >= tier_county - culture = { - has_innovation = innovation_caballeros - } - } - } - any_realm_county = { - culture = { - has_innovation = innovation_caballeros - } - } - } - } - if = { - limit = { - culture = { - has_innovation = innovation_caballeros - } - } - culture = { - save_scope_as = army_culture - } - } - else_if = { - limit = { - top_liege = { - any_vassal = { - culture = { - has_innovation = innovation_caballeros - } - } - } - } - top_liege = { - random_vassal = { - limit = { - culture = { - has_innovation = innovation_caballeros - } - } - culture = { - save_scope_as = army_culture - } - } - } - } - else = { - random_realm_county = { - limit = { - culture = { - has_innovation = innovation_caballeros - } - } - culture = { - save_scope_as = army_culture - } - } - } - spawn_army = { - name = greek_anarchy_war_crusaders_army_name - uses_supply = yes - inheritable = no - levies = greek_anarchy_army_levy_value - men_at_arms = { - type = caballero - stacks = greek_anarchy_army_maa_value - } - location = scope:attacker.capital_province - } - } - #Hobbies - 10 = { - trigger = { - OR = { - culture = { - has_innovation = innovation_hobbies - } - top_liege = { - any_vassal = { - highest_held_title_tier >= tier_county - culture = { - has_innovation = innovation_hobbies - } - } - } - any_realm_county = { - culture = { - has_innovation = innovation_hobbies - } - } - } - } - if = { - limit = { - culture = { - has_innovation = innovation_hobbies - } - } - culture = { - save_scope_as = army_culture - } - } - else_if = { - limit = { - top_liege = { - any_vassal = { - culture = { - has_innovation = innovation_hobbies - } - } - } - } - top_liege = { - random_vassal = { - limit = { - culture = { - has_innovation = innovation_hobbies - } - } - culture = { - save_scope_as = army_culture - } - } - } - } - else = { - random_realm_county = { - limit = { - culture = { - has_innovation = innovation_hobbies - } - } - culture = { - save_scope_as = army_culture - } - } - } - spawn_army = { - name = greek_anarchy_war_crusaders_army_name - uses_supply = yes - inheritable = no - levies = greek_anarchy_army_levy_value - men_at_arms = { - type = hobelar - stacks = greek_anarchy_army_maa_value - } - location = scope:attacker.capital_province - } - } - #Schiltron - 10 = { - trigger = { - OR = { - culture = { - has_innovation = innovation_rectilinear_schiltron - } - top_liege = { - any_vassal = { - highest_held_title_tier >= tier_county - culture = { - has_innovation = innovation_rectilinear_schiltron - } - } - } - any_realm_county = { - culture = { - has_innovation = innovation_rectilinear_schiltron - } - } - } - } - if = { - limit = { - culture = { - has_innovation = innovation_rectilinear_schiltron - } - } - culture = { - save_scope_as = army_culture - } - } - else_if = { - limit = { - top_liege = { - any_vassal = { - culture = { - has_innovation = innovation_rectilinear_schiltron - } - } - } - } - top_liege = { - random_vassal = { - limit = { - culture = { - has_innovation = innovation_rectilinear_schiltron - } - } - culture = { - save_scope_as = army_culture - } - } - } - } - else = { - random_realm_county = { - limit = { - culture = { - has_innovation = innovation_rectilinear_schiltron - } - } - culture = { - save_scope_as = army_culture - } - } - } - spawn_army = { - name = greek_anarchy_war_crusaders_army_name - uses_supply = yes - inheritable = no - levies = greek_anarchy_army_levy_value - men_at_arms = { - type = schiltron - stacks = greek_anarchy_army_maa_value - } - location = scope:attacker.capital_province - } - } - #Valets - 10 = { - trigger = { - OR = { - culture = { - has_innovation = innovation_valets - } - top_liege = { - any_vassal = { - highest_held_title_tier >= tier_county - culture = { - has_innovation = innovation_valets - } - } - } - any_realm_county = { - culture = { - has_innovation = innovation_valets - } - } - } - scope:defender = { - highest_held_title_tier >= tier_kingdom - } - } - if = { - limit = { - culture = { - has_innovation = innovation_valets - } - } - culture = { - save_scope_as = army_culture - } - } - else_if = { - limit = { - top_liege = { - any_vassal = { - culture = { - has_innovation = innovation_valets - } - } - } - } - top_liege = { - random_vassal = { - limit = { - culture = { - has_innovation = innovation_valets - } - } - culture = { - save_scope_as = army_culture - } - } - } - } - else = { - random_realm_county = { - limit = { - culture = { - has_innovation = innovation_valets - } - } - culture = { - save_scope_as = army_culture - } - } - } - spawn_army = { - name = greek_anarchy_war_crusaders_army_name - uses_supply = yes - inheritable = no - levies = greek_anarchy_army_levy_value - men_at_arms = { - type = gendarme - stacks = greek_anarchy_army_heavy_cav_value - } - location = scope:attacker.capital_province - } - } - #landsknecht - 10 = { - trigger = { - OR = { - culture = { - has_innovation = innovation_zweihanders - } - top_liege = { - any_vassal = { - highest_held_title_tier >= tier_county - culture = { - has_innovation = innovation_zweihanders - } - } - } - any_realm_county = { - culture = { - has_innovation = innovation_zweihanders - } - } - } - } - if = { - limit = { - culture = { - has_innovation = innovation_zweihanders - } - } - culture = { - save_scope_as = army_culture - } - } - else_if = { - limit = { - top_liege = { - any_vassal = { - culture = { - has_innovation = innovation_zweihanders - } - } - } - } - top_liege = { - random_vassal = { - limit = { - culture = { - has_innovation = innovation_zweihanders - } - } - culture = { - save_scope_as = army_culture - } - } - } - } - else = { - random_realm_county = { - limit = { - culture = { - has_innovation = innovation_zweihanders - } - } - culture = { - save_scope_as = army_culture - } - } - } - spawn_army = { - name = greek_anarchy_war_crusaders_army_name - uses_supply = yes - inheritable = no - levies = greek_anarchy_army_levy_value - men_at_arms = { - type = landsknecht - stacks = greek_anarchy_army_maa_value - } - location = scope:attacker.capital_province - } - } - #Huscarls - 10 = { - trigger = { - OR = { - culture = { - has_cultural_parameter = unlock_maa_huscarls - } - top_liege = { - any_vassal = { - highest_held_title_tier >= tier_county - culture = { - has_cultural_parameter = unlock_maa_huscarls - } - } - } - any_realm_county = { - culture = { - has_cultural_parameter = unlock_maa_huscarls - } - } - } - } - if = { - limit = { - culture = { - has_cultural_parameter = unlock_maa_huscarls - } - } - culture = { - save_scope_as = army_culture - } - } - else_if = { - limit = { - top_liege = { - any_vassal = { - culture = { - has_cultural_parameter = unlock_maa_huscarls - } - } - } - } - top_liege = { - random_vassal = { - limit = { - culture = { - has_cultural_parameter = unlock_maa_huscarls - } - } - culture = { - save_scope_as = army_culture - } - } - } - } - else = { - random_realm_county = { - limit = { - culture = { - has_cultural_parameter = unlock_maa_huscarls - } - } - culture = { - save_scope_as = army_culture - } - } - } - spawn_army = { - name = greek_anarchy_war_crusaders_army_name - uses_supply = yes - inheritable = no - levies = greek_anarchy_army_levy_value - men_at_arms = { - type = huscarl - stacks = greek_anarchy_army_maa_value - } - location = scope:attacker.capital_province - } - } - #Camels - 5 = { - trigger = { - OR = { - culture = { - has_innovation = innovation_war_camels - } - scope:defender = { - any_realm_county = { - culture = { - has_innovation = innovation_war_camels - } - county_has_province_with_terrain = { - terrain = drylands - terrain = desert - } - } - } - } - } - if = { - limit = { - scope:defender = { - any_realm_county = { - culture = { - has_innovation = innovation_war_camels - } - county_has_province_with_terrain = { - terrain = drylands - terrain = desert - } - } - } - } - scope:defender = { - random_realm_county = { - limit = { - culture = { - has_innovation = innovation_war_camels - } - county_has_province_with_terrain = { - terrain = drylands - terrain = desert - } - } - culture = { - save_scope_as = army_culture - } - } - } - } - else = { - culture = { - save_scope_as = army_culture - } - } - spawn_army = { - name = greek_anarchy_war_nomad_army_name - uses_supply = yes - inheritable = no - levies = greek_anarchy_army_levy_value - men_at_arms = { - type = camel_rider - stacks = greek_anarchy_army_maa_value - } - location = scope:attacker.capital_province - } - } - #Heavy cav - 4 = { - trigger = { - OR = { - culture = { - has_innovation = innovation_arched_saddle - } - scope:defender = { - culture = { - has_innovation = innovation_arched_saddle - } - } - scope:defender = { - any_realm_county = { - culture = { - has_innovation = innovation_arched_saddle - } - } - } - } - scope:defender = { - highest_held_title_tier >= tier_kingdom - } - } - spawn_army = { - name = greek_anarchy_war_generic_army_name_2 - inheritable = no - uses_supply = yes - levies = greek_anarchy_army_levy_value - men_at_arms = { - type = armored_horsemen - stacks = greek_anarchy_army_heavy_cav_value - } - location = scope:attacker.capital_province - } - } - #Heavy Infantry - 1 = { - trigger = { - OR = { - culture = { - has_innovation = innovation_quilted_armor - } - scope:defender = { - culture = { - has_innovation = innovation_quilted_armor - } - } - scope:defender = { - any_realm_county = { - culture = { - has_innovation = innovation_quilted_armor - } - } - } - } - } - spawn_army = { - name = greek_anarchy_war_generic_army_name_2 - inheritable = no - uses_supply = yes - levies = greek_anarchy_army_levy_value - men_at_arms = { - type = armored_footmen - stacks = greek_anarchy_army_maa_value - } - location = scope:attacker.capital_province - } - } - #Pikemen - 2 = { - trigger = { - scope:defender = { - any_realm_county = { - county_has_province_with_terrain = { - terrain = mountains - } - } - } - } - spawn_army = { - name = greek_anarchy_war_generic_army_name_2 - inheritable = no - uses_supply = yes - levies = greek_anarchy_army_levy_value - men_at_arms = { - type = pikemen_unit - stacks = greek_anarchy_army_maa_value - } - location = scope:attacker.capital_province - } - } - #Archers - 2 = { - trigger = { - scope:defender = { - any_realm_county = { - county_has_province_with_terrain = { - terrain = forest - } - } - } - } - spawn_army = { - name = greek_anarchy_war_generic_army_name_2 - inheritable = no - uses_supply = yes - levies = greek_anarchy_army_levy_value - men_at_arms = { - type = bowmen - stacks = greek_anarchy_army_maa_value - } - location = scope:attacker.capital_province - } - } - #Light Horsemen - 1 = { - spawn_army = { - name = greek_anarchy_war_generic_army_name_2 - inheritable = no - uses_supply = yes - levies = greek_anarchy_army_levy_value - men_at_arms = { - type = light_horsemen - stacks = greek_anarchy_army_maa_value - } - location = scope:attacker.capital_province - } - } - #Light Footmen - 1 = { - spawn_army = { - name = greek_anarchy_war_generic_army_name_2 - inheritable = no - uses_supply = yes - levies = greek_anarchy_army_levy_value - men_at_arms = { - type = light_footmen - stacks = greek_anarchy_army_weak_maa_value - } - location = scope:attacker.capital_province - } - } - } -} - -expunge_latin_dominion_effect = { - if = { - limit = { - OR = { - ep3_orthodox_faith_trigger = yes - faith = faith:hellenic_pagan - } - } - add_character_modifier = { - modifier = ascendant_byz_reclaimant_ortho_modifier - years = 20 - } - } - else = { - add_character_modifier = { - modifier = ascendant_byz_reclaimant_modifier - years = 20 - } - } -} - -frankokratia_latin_emp_end_msg_effect = { - save_scope_as = latin_emp - faith = { - every_faith_ruler = { - limit = { - is_ai = no - NOT = { - has_character_flag = had_ep3_frankokratia_events_0100 - } - } - add_to_list = latin_destroyed_recipients - } - } - title:e_latin_empire = { - every_in_de_jure_hierarchy = { - if = { - limit = { - holder ?= { - is_ai = no - NOR = { - is_in_list = latin_destroyed_recipients - has_character_flag = had_ep3_frankokratia_events_0100 - } - } - } - holder = { - add_to_list = latin_destroyed_recipients - } - } - } - } - title:e_byzantium = { - every_in_de_jure_hierarchy = { - if = { - limit = { - holder ?= { - is_ai = no - NOR = { - is_in_list = latin_destroyed_recipients - has_character_flag = had_ep3_frankokratia_events_0100 - } - } - } - holder = { - add_to_list = latin_destroyed_recipients - } - } - } - } - if = { - limit = { - #Notification looks weird if it's Byzantine empire no longer being a Latin - NOT = { - any_held_title = { - this = title:e_byzantium - } - } - } - every_in_list = { - list = latin_destroyed_recipients - limit = { - this != root - } - trigger_event = ep3_frankokratia_events.0100 - } - #Trigger one day after for root, switch the titles - if = { - limit = { - NOT = { - has_character_flag = had_ep3_frankokratia_events_0100 - } - } - trigger_event = { - id = ep3_frankokratia_events.0100 - days = 1 - } - } - } -} - -frankokratia_remove__war_leader_var_effect = { - if = { - limit = { - any_character_war = { - using_cb = crusading_claim_cb - any_war_participant = { - this = scope:recipient - } - any_war_attacker = { - any_owned_story = { - type = frankokratia_story - any_in_list = { - variable = frankokratia_leaders - this = scope:actor - } - } - } - } - } - random_character_war = { - limit = { - any_war_participant = { - any_owned_story = { - type = frankokratia_story - any_in_list = { - variable = frankokratia_leaders - this = scope:actor - } - } - } - } - random_war_participant = { - limit = { - any_owned_story = { - type = frankokratia_story - any_in_list = { - variable = frankokratia_leaders - this = scope:actor - } - } - } - random_owned_story = { - type = frankokratia_story - limit = { - any_in_list = { - variable = frankokratia_leaders - this = scope:actor - } - } - remove_list_variable = { - name = frankokratia_leaders - target = scope:actor - } - } - } - } - } -} diff --git a/N3OW/common/scripted_effects/08_bp3_effects.txt b/N3OW/common/scripted_effects/08_bp3_effects.txt deleted file mode 100644 index d44a6b65..00000000 --- a/N3OW/common/scripted_effects/08_bp3_effects.txt +++ /dev/null @@ -1,1360 +0,0 @@ -wandering_lifestyle_exp_post_travel_effect = { - if = { - limit = { - is_ai = no - has_bp3_dlc_trigger = yes - exists = current_travel_plan - } - add_wanderer_lifestyle_xp = 5 - } -} - -inspection_success_chance_change_effect = { - scope:activity = { - if = { - limit = { - NOT = { exists = var:inspection_success_chance_event } - } - set_variable = { name = inspection_success_chance_event value = 0 } - } - change_variable = { - name = inspection_success_chance_event - add = inspection_activity_success_$CHANGE$_value - } - set_variable = { - name = inspection_success_chance - value = inspection_success_chance_value - } - } - custom_tooltip = inspection_activity_success_$CHANGE$_tt -} - -inspection_success_chance_change_focus_effect = { - if = { - limit = { - has_variable = inspection_activity_$FOCUS$_focus - } - inspection_success_chance_change_effect = { - CHANGE = $CHANGE$ - } - } -} - -inspection_success_chance_change_not_focus_effect = { - if = { - limit = { - NOT = { has_variable = inspection_activity_$FOCUS$_focus } - } - inspection_success_chance_change_effect = { - CHANGE = $CHANGE$ - } - } -} - -inspection_claim_effects = { - if = { - limit = { - $ACTOR$ = { - NOT = { has_claim_on = $TARGET$ } - } - } - $ACTOR$ = { add_$TYPE$_claim = $TARGET$ } - } -} - -inspection_fighting_guilds_effect = { - scope:city_province = { - random_list = { - 10 = { # Millers Guild (Watermills) - trigger = { - trigger_if = { - limit = { - has_variable = fighting_guilds_option_1 - } - NOT = { var:fighting_guilds_option_1 = 1 } - } - building_watermills_requirement_terrain = yes - culture = { - has_innovation = innovation_windmills - } - NOT = { has_building_or_higher = watermills_01 } - } - set_variable = { - name = fighting_guilds_option_$VALUE$ - value = 1 - } - } - 10 = { # Bakers Guild (Windmills) - trigger = { - trigger_if = { - limit = { - has_variable = fighting_guilds_option_1 - } - NOT = { var:fighting_guilds_option_1 = 2 } - } - building_windmills_requirement_terrain = yes - culture = { - has_innovation = innovation_windmills - } - NOT = { has_building_or_higher = windmills_01 } - } - set_variable = { - name = fighting_guilds_option_$VALUE$ - value = 2 - } - } - 10 = { # Fishmongers Guild (Port) - trigger = { - trigger_if = { - limit = { - has_variable = fighting_guilds_option_1 - } - NOT = { var:fighting_guilds_option_1 = 3 } - } - building_common_tradeport_requirement_terrain = yes - NOT = { has_building_or_higher = common_tradeport_01 } - } - set_variable = { - name = fighting_guilds_option_$VALUE$ - value = 3 - } - } - 10 = { # Shoemakers/Tanners/Tailors/Weavers Guild (Cattle Pastures) - trigger = { - trigger_if = { - limit = { - has_variable = fighting_guilds_option_1 - } - NOR = { - var:fighting_guilds_option_1 = 4 - var:fighting_guilds_option_1 = 5 - var:fighting_guilds_option_1 = 6 - var:fighting_guilds_option_1 = 7 - } - } - building_pastures_requirement_terrain = yes - NOT = { has_building_or_higher = pastures_01 } - } - random_list = { - 10 = { - set_variable = { - name = fighting_guilds_option_$VALUE$ - value = 4 - } - } - 10 = { - set_variable = { - name = fighting_guilds_option_$VALUE$ - value = 5 - } - } - 10 = { - set_variable = { - name = fighting_guilds_option_$VALUE$ - value = 6 - } - } - 10 = { - set_variable = { - name = fighting_guilds_option_$VALUE$ - value = 7 - } - } - } - } - 10 = { # Butchers/Furriers/Skinners Guild (Hunting Grounds) - trigger = { - trigger_if = { - limit = { - has_variable = fighting_guilds_option_1 - } - NOR = { - var:fighting_guilds_option_1 = 8 - var:fighting_guilds_option_1 = 9 - var:fighting_guilds_option_1 = 10 - } - } - building_hunting_grounds_requirement_terrain = yes - NOT = { has_building_or_higher = hunting_grounds_01 } - } - random_list = { - 10 = { - set_variable = { - name = fighting_guilds_option_$VALUE$ - value = 8 - } - } - 10 = { - set_variable = { - name = fighting_guilds_option_$VALUE$ - value = 9 - } - } - 10 = { - set_variable = { - name = fighting_guilds_option_$VALUE$ - value = 10 - } - } - } - } - 10 = { # Vintners Guild (Orchards) - trigger = { - trigger_if = { - limit = { - has_variable = fighting_guilds_option_1 - } - NOT = { var:fighting_guilds_option_1 = 11 } - } - building_orchards_requirement_terrain = yes - NOT = { has_building_or_higher = orchards_01 } - } - set_variable = { - name = fighting_guilds_option_$VALUE$ - value = 11 - } - } - 10 = { # Carpenters Guild (Logging Camps) - trigger = { - trigger_if = { - limit = { - has_variable = fighting_guilds_option_1 - } - NOT = { var:fighting_guilds_option_1 = 12 } - } - building_logging_camps_requirement_terrain = yes - NOT = { has_building_or_higher = logging_camps_01 } - } - set_variable = { - name = fighting_guilds_option_$VALUE$ - value = 12 - } - } - 10 = { # Masons/Miners Guild (Quarries) - trigger = { - trigger_if = { - limit = { - has_variable = fighting_guilds_option_1 - } - NOR = { - var:fighting_guilds_option_1 = 13 - var:fighting_guilds_option_1 = 14 - } - } - building_quarries_requirement_terrain = yes - NOT = { has_building_or_higher = quarries_01 } - } - random_list = { - 10 = { - set_variable = { - name = fighting_guilds_option_$VALUE$ - value = 13 - } - } - 10 = { - set_variable = { - name = fighting_guilds_option_$VALUE$ - value = 14 - } - } - } - } - 10 = { # Blacksmiths Guild (Blacksmith) - trigger = { - trigger_if = { - limit = { - has_variable = fighting_guilds_option_1 - } - NOT = { var:fighting_guilds_option_1 = 15 } - } - building_smiths_requirement_terrain = yes - NOT = { has_building_or_higher = smiths_01 } - } - set_variable = { - name = fighting_guilds_option_$VALUE$ - value = 15 - } - } - 10 = { # Saddlers Guild (Stables) - trigger = { - trigger_if = { - limit = { - has_variable = fighting_guilds_option_1 - } - NOT = { var:fighting_guilds_option_1 = 16 } - } - building_stables_requirement_terrain = yes - NOT = { has_building_or_higher = stables_01 } - } - set_variable = { - name = fighting_guilds_option_$VALUE$ - value = 16 - } - } - 10 = { # Merchants Guild (Guild Halls) - trigger = { - trigger_if = { - limit = { - has_variable = fighting_guilds_option_1 - } - NOT = { var:fighting_guilds_option_1 = 17 } - } - has_building_or_higher = city_01 - NOT = { has_building_or_higher = guild_halls_01 } - } - set_variable = { - name = fighting_guilds_option_$VALUE$ - value = 17 - } - } - 10 = { # Physicians/Pharmacists Guild (Hospices) - trigger = { - trigger_if = { - limit = { - has_variable = fighting_guilds_option_1 - } - NOR = { - var:fighting_guilds_option_1 = 18 - var:fighting_guilds_option_1 = 19 - } - } - NOT = { has_building_or_higher = hospices_01 } - } - random_list = { - 10 = { - set_variable = { - name = fighting_guilds_option_$VALUE$ - value = 18 - } - } - 10 = { - set_variable = { - name = fighting_guilds_option_$VALUE$ - value = 19 - } - } - } - } - 10 = { # Toolmakers Guild (Workshops) - trigger = { - trigger_if = { - limit = { - has_variable = fighting_guilds_option_1 - } - NOT = { var:fighting_guilds_option_1 = 20 } - } - building_workshops_requirement_terrain = yes - culture = { - has_innovation = innovation_advanced_bowmaking - } - NOT = { has_building_or_higher = workshops_01 } - } - set_variable = { - name = fighting_guilds_option_$VALUE$ - value = 20 - } - } - 1 = { # Fallback - Innkeepers Guild - trigger = { - trigger_if = { - limit = { - has_variable = fighting_guilds_option_1 - } - NOT = { var:fighting_guilds_option_1 = 21 } - } - NOT = { has_province_modifier = inspection_fighting_guilds_innkeepers_guild_modifier } - } - set_variable = { - name = fighting_guilds_option_$VALUE$ - value = 21 - } - } - 1 = { # Fallback - Artists Guild - trigger = { - trigger_if = { - limit = { - has_variable = fighting_guilds_option_1 - } - NOT = { var:fighting_guilds_option_1 = 22 } - } - NOT = { has_province_modifier = inspection_fighting_guilds_artists_guild_modifier } - } - set_variable = { - name = fighting_guilds_option_$VALUE$ - value = 22 - } - } - } - } -} - -inspection_fighting_guilds_setup_reward_effect = { - switch = { - trigger = var:fighting_guilds_option_$VALUE$ - 1 = { add_building = watermills_01 } - 2 = { add_building = windmills_01 } - 3 = { add_building = common_tradeport_01 } - 4 = { add_building = pastures_01 } - 5 = { add_building = pastures_01 } - 6 = { add_building = pastures_01 } - 7 = { add_building = pastures_01 } - 8 = { add_building = hunting_grounds_01 } - 9 = { add_building = hunting_grounds_01 } - 10 = { add_building = hunting_grounds_01 } - 11 = { add_building = orchards_01 } - 12 = { add_building = logging_camps_01 } - 13 = { add_building = quarries_01 } - 14 = { add_building = quarries_01 } - 15 = { add_building = smiths_01 } - 16 = { add_building = stables_01 } - 17 = { add_building = guild_halls_01 } - 18 = { add_building = hospices_01 } - 19 = { add_building = hospices_01 } - 20 = { add_building = workshops_01 } - 21 = { - scope:city_province = { - add_province_modifier = inspection_fighting_guilds_innkeepers_guild_modifier - } - } - 22 = { - scope:city_province = { - add_province_modifier = inspection_fighting_guilds_artists_guild_modifier - } - } - } -} - -inspection_survey_intent_development = { - if = { - limit = { - has_activity_intent = survey_learning_intent - } - capital_county = { - change_development_progress_with_overflow = $VALUE$ - } - } -} - -inspection_survey_intent_control = { - if = { - limit = { - has_activity_intent = survey_learning_intent - capital_county = { county_control < 100 } - } - capital_county = { - change_county_control = $VALUE$ - } - } - else = { - inspection_survey_intent_development = { VALUE = $VALUE$ } - } -} - -inspection_survey_intent_county_modifier = { - if = { - limit = { - has_activity_intent = survey_learning_intent - capital_county = { - NOT = { has_county_modifier = $MODIFIER$ } - } - } - capital_county = { - add_county_modifier = { - modifier = $MODIFIER$ - years = 5 - } - } - } - else = { - inspection_survey_intent_development = { VALUE = 5 } - } -} - -inspection_survey_intent_province_modifier = { - if = { - limit = { - has_activity_intent = survey_learning_intent - capital_barony.title_province = { - NOT = { has_province_modifier = $MODIFIER$ } - } - } - capital_barony.title_province = { - add_province_modifier = { - modifier = $MODIFIER$ - years = 5 - } - } - } - else = { - inspection_survey_intent_development = { VALUE = 5 } - } -} - -inspection_survey_local_message_county_modifier = { - hidden_effect = { - if = { - limit = { - scope:province.county.holder != scope:host - } - scope:province.county.holder = { - send_interface_message = { - type = send_interface_$TYPE$ - title = bp3_survey_liege_intervention - - show_as_tooltip = { - scope:province.county = { - add_county_modifier = { - modifier = $MODIFIER$ - years = $YEARS$ - } - } - } - } - } - } - } -} - -inspection_survey_local_message_province_modifier = { - hidden_effect = { - if = { - limit = { - scope:province.county.holder != scope:host - } - scope:province.county.holder = { - send_interface_message = { - type = send_interface_$TYPE$ - title = bp3_survey_liege_intervention - - show_as_tooltip = { - scope:province = { - add_province_modifier = { - modifier = $MODIFIER$ - years = $YEARS$ - } - } - } - } - } - } - } -} - -inspection_survey_local_message_permanent_province_modifier = { - hidden_effect = { - if = { - limit = { - scope:province.county.holder != scope:host - } - scope:province.county.holder = { - send_interface_message = { - type = send_interface_$TYPE$ - title = bp3_survey_liege_intervention - - show_as_tooltip = { - scope:province = { - add_province_modifier = $MODIFIER$ - } - } - } - } - } - } -} - -inspection_survey_local_message_specific_location_province_modifier = { - hidden_effect = { - if = { - limit = { - county.holder != scope:host - } - save_scope_as = saved_province - county.holder = { - send_interface_message = { - type = send_interface_$TYPE$ - title = bp3_survey_liege_intervention - - show_as_tooltip = { - scope:saved_province = { - add_province_modifier = { - modifier = $MODIFIER$ - years = $YEARS$ - } - } - } - } - } - } - } -} - -court_brewmaster_assign_modifier_positive_effect = { - send_interface_message = { - type = send_interface_message_good - title = experimental_brew_title - right_icon = root - - add_character_modifier = { - modifier = experimental_brew_$MODIFIER$_modifier - months = 6 - } - } -} - -brewery_counter_effect = { - county = { - if = { - limit = { - has_variable = brewery_counter_var - NOT = { - any_county_province = { - has_building_or_higher = breweries_01 - } - } - } - remove_variable = brewery_counter_var - } - else_if = { - limit = { - NOT = { has_variable = brewery_counter_var } - any_county_province = { has_building_or_higher = breweries_01 } - } - set_variable = { - name = brewery_counter_var - value = current_year - } - } - } -} - -brewery_counter_start_effect = { - if = { - limit = { - has_building_or_higher = breweries_01 - } - county = { - set_variable = { - name = brewery_counter_var - value = { - value = current_year - subtract = { integer_range = { min = 1 max = 80 } } - } - } - } - } -} - -souvenirs_aplenty_gallowsbait_effect = { - send_interface_message = { - type = event_generic_good - title = souvenirs_aplenty_perk_name - left_icon = root - - add_gold = 25 - add_trait_xp = { - trait = gallowsbait - track = $TRACK$ - value = 5 - } - } -} - -landless_inspector_assign_terrain_effect = { - if = { - limit = { - has_perk = no_stone_unturned_perk - government_has_flag = government_is_landless_adventurer - } - add_character_modifier = landless_inspector_$TERRAIN$_tier_3_modifier - } - else_if = { - limit = { - has_perk = no_stone_unturned_perk - government_has_flag = government_is_nomadic - } - add_character_modifier = nomadic_inspector_$TERRAIN$_tier_3_modifier - } - else_if = { - limit = { - has_perk = local_inspection_perk - government_has_flag = government_is_landless_adventurer - } - add_character_modifier = landless_inspector_$TERRAIN$_tier_2_modifier - } - else_if = { - limit = { - has_perk = local_inspection_perk - government_has_flag = government_is_nomadic - } - add_character_modifier = nomadic_inspector_$TERRAIN$_tier_2_modifier - } - else_if = { - limit = { - has_perk = mustering_the_troops_perk - } - add_character_modifier = landless_inspector_$TERRAIN$_tier_1_modifier - } - else = { - landless_inspector_remove_terrain_effect = yes - } -} - -landless_inspector_upgrade_terrain_tier_effect = { - landless_inspector_upgrade_terrain_tier_extrapolated_effect = { TERRAIN = woodlands} - landless_inspector_upgrade_terrain_tier_extrapolated_effect = { TERRAIN = highlands} - landless_inspector_upgrade_terrain_tier_extrapolated_effect = { TERRAIN = lowlands } - landless_inspector_upgrade_terrain_tier_extrapolated_effect = { TERRAIN = drylands } -} - -landless_inspector_upgrade_terrain_tier_extrapolated_effect = { - if = { - limit = { - has_character_modifier = landless_inspector_$TERRAIN$_tier_2_modifier - has_perk = no_stone_unturned_perk - government_has_flag = government_is_landless_adventurer - } - remove_character_modifier = landless_inspector_$TERRAIN$_tier_2_modifier - add_character_modifier = landless_inspector_$TERRAIN$_tier_3_modifier - } - else_if = { - limit = { - has_character_modifier = landless_inspector_$TERRAIN$_tier_1_modifier - has_perk = local_inspection_perk - government_has_flag = government_is_landless_adventurer - } - remove_character_modifier = landless_inspector_$TERRAIN$_tier_1_modifier - add_character_modifier = landless_inspector_$TERRAIN$_tier_2_modifier - } - if = { - limit = { - has_character_modifier = nomadic_inspector_$TERRAIN$_tier_2_modifier - has_perk = no_stone_unturned_perk - government_has_flag = government_is_nomadic - } - remove_character_modifier = nomadic_inspector_$TERRAIN$_tier_2_modifier - add_character_modifier = nomadic_inspector_$TERRAIN$_tier_3_modifier - } - else_if = { - limit = { - has_character_modifier = landless_inspector_$TERRAIN$_tier_1_modifier - has_perk = local_inspection_perk - government_has_flag = government_is_nomadic - } - remove_character_modifier = landless_inspector_$TERRAIN$_tier_1_modifier - add_character_modifier = nomadic_inspector_$TERRAIN$_tier_2_modifier - } -} - -landless_inspector_remove_terrain_effect = { - hidden_effect = { - landless_inspector_remove_terrain_extrapolated_effect = { TERRAIN = woodlands } - landless_inspector_remove_terrain_extrapolated_effect = { TERRAIN = highlands } - landless_inspector_remove_terrain_extrapolated_effect = { TERRAIN = lowlands } - landless_inspector_remove_terrain_extrapolated_effect = { TERRAIN = drylands } - } -} - -landless_inspector_remove_master_terrain_effect = { - hidden_effect = { - remove_character_modifier = master_terrain_forest_modifier - remove_character_modifier = master_terrain_jungle_modifier - remove_character_modifier = master_terrain_taiga_modifier - remove_character_modifier = master_terrain_wetlands_modifier - - remove_character_modifier = master_terrain_mountains_modifier - remove_character_modifier = master_terrain_hills_modifier - remove_character_modifier = master_terrain_desert_mountains_modifier - - remove_character_modifier = master_terrain_plains_modifier - remove_character_modifier = master_terrain_steppe_modifier - remove_character_modifier = master_terrain_farmlands_modifier - remove_character_modifier = master_terrain_floodplains_modifier - - remove_character_modifier = master_terrain_drylands_modifier - remove_character_modifier = master_terrain_desert_modifier - remove_character_modifier = master_terrain_oasis_modifier - } -} - -landless_inspector_remove_terrain_extrapolated_effect = { - remove_character_modifier = nomadic_inspector_$TERRAIN$_tier_3_modifier - remove_character_modifier = nomadic_inspector_$TERRAIN$_tier_2_modifier - remove_character_modifier = landless_inspector_$TERRAIN$_tier_3_modifier - remove_character_modifier = landless_inspector_$TERRAIN$_tier_2_modifier - remove_character_modifier = landless_inspector_$TERRAIN$_tier_1_modifier -} - -local_arbitration_boon_logic_purpose_effect = { - hidden_effect = { - if = { - limit = { - has_perk = local_arbitration_perk - } - if = { - limit = { - has_realm_law = camp_purpose_wanderers - } - add_character_modifier = landless_local_arbitration_wanderers_modifier - } - else_if = { - limit = { - has_realm_law = camp_purpose_mercenaries - } - add_character_modifier = landless_local_arbitration_mercenaries_modifier - } - else_if = { - limit = { - has_realm_law = camp_purpose_scholars - } - add_character_modifier = landless_local_arbitration_scholars_modifier - } - else_if = { - limit = { - has_realm_law = camp_purpose_explorers - } - add_character_modifier = landless_local_arbitration_explorers_modifier - } - else_if = { - limit = { - has_realm_law = camp_purpose_brigands - } - add_character_modifier = landless_local_arbitration_brigands_modifier - } - else_if = { - limit = { - has_realm_law = camp_purpose_legitimists - } - add_character_modifier = landless_local_arbitration_legitimists_modifier - } - else_if = { - limit = { - has_government = landless_adventurer_government - } - add_character_modifier = landless_local_arbitration_wanderers_modifier - } - } - } -} - -local_arbitration_boon_change_purpose_effect = { - hidden_effect = { - local_arbitration_boon_remove_purpose_effect = yes - - local_arbitration_boon_logic_purpose_effect = yes - } -} - -local_arbitration_boon_set_purpose_effect = { - hidden_effect = { - local_arbitration_boon_remove_purpose_effect = yes - - if = { - limit = { - has_perk = local_arbitration_perk - } - add_character_modifier = $MODIFIER$ - } - } -} - -local_arbitration_boon_remove_purpose_effect = { - remove_character_modifier = landless_local_arbitration_wanderers_modifier - remove_character_modifier = landless_local_arbitration_mercenaries_modifier - remove_character_modifier = landless_local_arbitration_scholars_modifier - remove_character_modifier = landless_local_arbitration_explorers_modifier - remove_character_modifier = landless_local_arbitration_brigands_modifier - remove_character_modifier = landless_local_arbitration_legitimists_modifier -} - -remove_all_landless_inspector_modifiers = { - hidden_effect = { - local_arbitration_boon_remove_purpose_effect = yes - landless_inspector_remove_terrain_effect = yes - landless_inspector_remove_master_terrain_effect = yes - } -} - -landless_inspector_cleanup_modifier = { - if = { - limit = { - has_perk = mustering_the_troops_perk - } - if = { - limit = { - NOR = { - government_has_flag = government_is_nomadic - is_landless_adventurer = yes - } - } - remove_all_landless_inspector_modifiers = yes - } - } -} - -landless_inspector_master_terrain_effect = { - hidden_effect = { - add_character_modifier = master_terrain_$TERRAIN$_modifier - } - custom_tooltip = master_terrain_custom_tooltip_$TERRAIN$ - custom_description = { - text = personal_touch_3_effect - } -} - -merge_aquitaine_effect = { - title:$PRIMARY$ = { - save_scope_as = rightful_title - every_in_de_jure_hierarchy = { - custom = merge_aquitaine_decision_vassal_$TEXT$ - limit = { - tier < tier_kingdom - } - holder ?= { - if = { - limit = { - NOR = { - is_in_list = merge_aquitaine_list - this = root - } - } - add_opinion = { - modifier = rightful_king_opinion - target = root - opinion = 20 - } - add_to_temporary_list = merge_aquitaine_list - } - } - custom_tooltip = merge_aquitaine_opinion - } - } - title:$SECONDARY$ = { - save_scope_as = destroyed_title - every_in_de_jure_hierarchy = { - custom = merge_aquitane_culture_tooltip_$TEXT$ - limit = { - tier = tier_county - } - hidden_effect = { - culture ?= { - if = { - limit = { - NOR = { - is_in_list = merge_aquitaine_list - this = root.culture - any_parent_culture_or_above = { this = root.culture } - } - } - change_cultural_acceptance = { - target = root.culture - value = -25 - desc = cultural_acceptance_merge_aquitaine - } - add_to_list = merge_aquitaine_list - } - } - } - custom_tooltip = merge_aquitaine_culture_tooltip - } - every_in_de_jure_hierarchy = { - custom = merge_aquitaine_decision_tooltip_$TEXT$ - limit = { - tier = tier_duchy - } - hidden_effect = { set_de_jure_liege_title = title:$PRIMARY$ } - custom_tooltip = merge_aquitaine_decision_tooltip_2_$TEXT$ - } - } - destroy_title = title:$SECONDARY$ -} - -hire_for_court_position_journey_effect = { - hidden_effect = { - $CHARACTER$ = { - add_to_court_and_entourage_effect = yes - } - if = { - limit = { - any_court_position_holder = { - type = $COURT_POSITION$_court_position - } - } - random_court_position_holder = { - type = $COURT_POSITION$_court_position - save_scope_as = current_holder - } - } - } - - show_as_tooltip = { - if = { - limit = { - is_valid_to_hire_court_position_type = $COURT_POSITION$_court_position - trigger_if = { - limit = { - exists = scope:current_holder - } - $CHARACTER$.aptitude:$COURT_POSITION$_court_position > scope:current_holder.aptitude:$COURT_POSITION$_court_position - } - } - appoint_court_position = { - recipient = $CHARACTER$ - court_position = $COURT_POSITION$_court_position - } - custom_tooltip = will_have_excellent_aptitude - } - else = { - $CHARACTER$ = { - add_to_court_and_entourage_effect = yes - } - } - } - - if = { - limit = { - is_valid_to_hire_court_position_type = $COURT_POSITION$_court_position - OR = { - NOT = { exists = scope:current_holder } - trigger_if = { - limit = { - has_character_flag = bodyguard_flag - } - any_court_position_holder = { - type = bodyguard_court_position - count <= 1 - } - } - } - } - employ_character_as_position_in_current_scope_court_effect = { - CHARACTER = $CHARACTER$ - POSITION = $COURT_POSITION$ - } - } - else_if = { - limit = { - exists = scope:current_holder - $CHARACTER$.aptitude:$COURT_POSITION$_court_position > scope:current_holder.aptitude:$COURT_POSITION$_court_position - } - add_character_flag = temporary_court_position_cost_removal - replace_court_position = { - recipient = $CHARACTER$ - holder = scope:current_holder - court_position = $COURT_POSITION$_court_position - } - remove_character_flag = temporary_court_position_cost_removal - } - - if = { - limit = { - has_activity_intent = journey_curiosity_intent - } - add_hook = { - type = strong_obligation_hook - target = $CHARACTER$ - } - custom_tooltip = obligation_hook_tt - } -} - -hire_for_court_position_journey_laamp_replacement_effect = { - show_as_tooltip = { - if = { - limit = { - is_valid_to_hire_court_position_type = $COURT_POSITION$_court_position - } - appoint_court_position = { - recipient = $CHARACTER$ - court_position = $COURT_POSITION$_court_position - } - custom_tooltip = will_have_excellent_aptitude - } - else_if = { - limit = { - is_valid_to_hire_court_position_type = $LAAMP_POSITION$_camp_officer - } - appoint_court_position = { - recipient = $CHARACTER$ - court_position = $LAAMP_POSITION$_camp_officer - } - custom_tooltip = will_have_excellent_aptitude - } - else = { - $CHARACTER$ = { - add_to_court_and_entourage_effect = yes - } - } - } - - hidden_effect = { - $CHARACTER$ = { - add_to_court_and_entourage_effect = yes - } - } - - if = { - limit = { - is_valid_to_hire_court_position_type = $COURT_POSITION$_court_position - NOT = { exists = scope:current_holder } - } - employ_character_as_position_in_current_scope_court_effect = { - CHARACTER = $CHARACTER$ - POSITION = $COURT_POSITION$ - } - } - else_if = { - limit = { - is_valid_to_hire_court_position_type = $LAAMP_POSITION$_camp_officer - NOT = { exists = scope:current_holder } - } - employ_character_as_position_in_current_scope_camp_effect = { - CHARACTER = $CHARACTER$ - POSITION = $LAAMP_POSITION$ - } - } - else_if = { - limit = { - is_valid_to_hire_court_position_type = $COURT_POSITION$_court_position - exists = scope:current_holder - $CHARACTER$.aptitude:$COURT_POSITION$_court_position > scope:current_holder.aptitude:$COURT_POSITION$_court_position - } - add_character_flag = temporary_court_position_cost_removal - replace_court_position = { - recipient = $CHARACTER$ - holder = scope:current_holder - court_position = $COURT_POSITION$_court_position - } - remove_character_flag = temporary_court_position_cost_removal - } - else_if = { - limit = { - is_valid_to_hire_court_position_type = $LAAMP_POSITION$_camp_officer - exists = scope:current_holder - $CHARACTER$.aptitude:$LAAMP_POSITION$_camp_officer > scope:current_holder.aptitude:$LAAMP_POSITION$_camp_officer - } - add_character_flag = temporary_court_position_cost_removal - replace_court_position = { - recipient = $CHARACTER$ - holder = scope:current_holder - court_position = $LAAMP_POSITION$_camp_officer - } - remove_character_flag = temporary_court_position_cost_removal - } - - add_hook = { - type = strong_obligation_hook - target = $CHARACTER$ - } - custom_tooltip = obligation_hook_tt -} - -hire_for_two_court_position_journey_laamp_replacement_effect = { - show_as_tooltip = { - if = { - limit = { - is_valid_to_hire_court_position_type = $COURT_POSITION$_court_position - } - appoint_court_position = { - recipient = $CHARACTER$ - court_position = $COURT_POSITION$_court_position - } - custom_tooltip = will_have_excellent_aptitude - } - else_if = { - limit = { - is_valid_to_hire_court_position_type = $COURT_POSITION_2$_court_position - } - appoint_court_position = { - recipient = $CHARACTER$ - court_position = $COURT_POSITION_2$_court_position - } - custom_tooltip = will_have_excellent_aptitude - } - else_if = { - limit = { - is_valid_to_hire_court_position_type = $LAAMP_POSITION$_camp_officer - } - appoint_court_position = { - recipient = $CHARACTER$ - court_position = $LAAMP_POSITION$_camp_officer - } - custom_tooltip = will_have_excellent_aptitude - } - } - - hidden_effect = { - $CHARACTER$ = { - add_to_court_and_entourage_effect = yes - } - } - - if = { - limit = { - is_valid_to_hire_court_position_type = $COURT_POSITION$_court_position - NOT = { exists = scope:current_holder } - } - employ_character_as_position_in_current_scope_court_effect = { - CHARACTER = $CHARACTER$ - POSITION = $COURT_POSITION$ - } - } - else_if = { - limit = { - is_valid_to_hire_court_position_type = $COURT_POSITION_2$_court_position - NOT = { exists = scope:current_holder } - } - employ_character_as_position_in_current_scope_court_effect = { - CHARACTER = $CHARACTER$ - POSITION = $COURT_POSITION_2$ - } - } - else_if = { - limit = { - is_valid_to_hire_court_position_type = $LAAMP_POSITION$_camp_officer - NOT = { exists = scope:current_holder } - } - employ_character_as_position_in_current_scope_camp_effect = { - CHARACTER = $CHARACTER$ - POSITION = $LAAMP_POSITION$ - } - } - else_if = { - limit = { - is_valid_to_hire_court_position_type = $COURT_POSITION$_court_position - exists = scope:current_holder - $CHARACTER$.aptitude:$COURT_POSITION$_court_position > scope:current_holder.aptitude:$COURT_POSITION$_court_position - } - add_character_flag = temporary_court_position_cost_removal - replace_court_position = { - recipient = $CHARACTER$ - holder = scope:current_holder - court_position = $COURT_POSITION$_court_position - } - remove_character_flag = temporary_court_position_cost_removal - } - else_if = { - limit = { - is_valid_to_hire_court_position_type = $COURT_POSITION_2$_court_position - exists = scope:current_holder - $CHARACTER$.aptitude:$COURT_POSITION_2$_court_position > scope:current_holder.aptitude:$COURT_POSITION_2$_court_position - } - add_character_flag = temporary_court_position_cost_removal - replace_court_position = { - recipient = $CHARACTER$ - holder = scope:current_holder - court_position = $COURT_POSITION_2$_court_position - } - remove_character_flag = temporary_court_position_cost_removal - } - else_if = { - limit = { - is_valid_to_hire_court_position_type = $LAAMP_POSITION$_camp_officer - exists = scope:current_holder - $CHARACTER$.aptitude:$LAAMP_POSITION$_camp_officer > scope:current_holder.aptitude:$LAAMP_POSITION$_camp_officer - } - add_character_flag = temporary_court_position_cost_removal - replace_court_position = { - recipient = $CHARACTER$ - holder = scope:current_holder - court_position = $LAAMP_POSITION$_camp_officer - } - remove_character_flag = temporary_court_position_cost_removal - } - - add_hook = { - type = strong_obligation_hook - target = $CHARACTER$ - } - custom_tooltip = obligation_hook_tt -} - -hire_for_court_position_journey_laamp_replacement_effect_2 = { - show_as_tooltip = { - if = { - limit = { - is_valid_to_hire_court_position_type = $COURT_POSITION$_court_position - } - appoint_court_position = { - recipient = $CHARACTER$ - court_position = $COURT_POSITION$_court_position - } - custom_tooltip = will_have_excellent_aptitude - } - else_if = { - limit = { - is_valid_to_hire_court_position_type = $LAAMP_POSITION$_camp_officer - } - appoint_court_position = { - recipient = $CHARACTER$ - court_position = $LAAMP_POSITION$_camp_officer - } - custom_tooltip = will_have_excellent_aptitude - } - else = { - $CHARACTER$ = { - add_to_court_and_entourage_effect = yes - } - } - } - - hidden_effect = { - $CHARACTER$ = { - add_to_court_and_entourage_effect = yes - } - } - - if = { - limit = { - is_valid_to_hire_court_position_type = $COURT_POSITION$_court_position - NOT = { exists = scope:current_holder_2 } - } - employ_character_as_position_in_current_scope_court_effect = { - CHARACTER = $CHARACTER$ - POSITION = $COURT_POSITION$ - } - } - else_if = { - limit = { - is_valid_to_hire_court_position_type = $LAAMP_POSITION$_camp_officer - NOT = { exists = scope:current_holder_2 } - } - employ_character_as_position_in_current_scope_camp_effect = { - CHARACTER = $CHARACTER$ - POSITION = $LAAMP_POSITION$ - } - } - else_if = { - limit = { - is_valid_to_hire_court_position_type = $COURT_POSITION$_court_position - exists = scope:current_holder_2 - $CHARACTER$.aptitude:$COURT_POSITION$_court_position > scope:current_holder_2.aptitude:$COURT_POSITION$_court_position - } - add_character_flag = temporary_court_position_cost_removal - replace_court_position = { - recipient = $CHARACTER$ - holder = scope:current_holder_2 - court_position = $COURT_POSITION$_court_position - } - remove_character_flag = temporary_court_position_cost_removal - } - else_if = { - limit = { - is_valid_to_hire_court_position_type = $LAAMP_POSITION$_camp_officer - exists = scope:current_holder_2 - $CHARACTER$.aptitude:$LAAMP_POSITION$_camp_officer > scope:current_holder_2.aptitude:$LAAMP_POSITION$_camp_officer - } - add_character_flag = temporary_court_position_cost_removal - replace_court_position = { - recipient = $CHARACTER$ - holder = scope:current_holder_2 - court_position = $LAAMP_POSITION$_camp_officer - } - remove_character_flag = temporary_court_position_cost_removal - } - - add_hook = { - type = strong_obligation_hook - target = $CHARACTER$ - } - custom_tooltip = obligation_hook_tt -} diff --git a/N3OW/common/scripted_effects/09_dlc_mpo_scripted_effects.txt b/N3OW/common/scripted_effects/09_dlc_mpo_scripted_effects.txt deleted file mode 100644 index 6dddeaff..00000000 --- a/N3OW/common/scripted_effects/09_dlc_mpo_scripted_effects.txt +++ /dev/null @@ -1,6572 +0,0 @@ -# Used in the Migration flow -# Requires: -# scope:actor - the character recieving the title -# scope:target_title - the title in question -creating_kingdom_empire_title_effect = { - save_scope_as = old_title - - if = { - limit = { - scope:target_title.tier = tier_kingdom - } - create_dynamic_title = { - tier = kingdom - name = NEW_CREATED_TITLE_NAME - } - } - else_if = { - limit = { - scope:target_title.tier = tier_empire - } - create_dynamic_title = { - tier = empire - name = NEW_CREATED_TITLE_NAME - } - } - - create_title_and_vassal_change = { - type = created - save_scope_as = change - add_claim_on_loss = no - } - - scope:new_title = { - add_to_list = creating_new_titles - } - - every_in_list = { - list = creating_new_titles - change_title_holder = { - holder = scope:old_holder - change = scope:change - } - } - - resolve_title_and_vassal_change = scope:change - - scope:new_title = { - set_coa = scope:old_title - set_color_from_title = scope:old_title - set_capital_county = scope:old_title.title_capital_county - } - - scope:old_holder = { set_primary_title_to = scope:new_title } -} - -migration_find_fitting_title_effect = { - save_scope_as = old_holder - if = { # If they are losing all their core lands, but it's not their main title, we'll just move them into one of their vassal lands - limit = { - scope:old_holder = { - NOT = { - any_held_county = { - exists = duchy - NOT = { target_is_de_jure_liege_or_above = scope:target_title } - } - } - any_vassal = { - any_held_county = { - exists = duchy - NOT = { target_is_de_jure_liege_or_above = scope:target_title } - } - } - } - NOT = { scope:target_title = scope:old_holder.primary_title } - } - create_title_and_vassal_change = { - type = revoked - save_scope_as = change - } - scope:old_holder = { - ordered_vassal = { - limit = { - any_held_county = { - exists = duchy - NOT = { target_is_de_jure_liege_or_above = scope:target_title } - } - } - order_by = { - value = 1 - if = { - limit = { - government_has_flag = government_is_herder - } - add = 500 - } - subtract = domicile.herd - } - ordered_held_county = { - limit = { - exists = duchy - NOT = { target_is_de_jure_liege_or_above = scope:target_title } - } - order_by = { - value = 1 - add = county_fertility - } - change_title_holder = { - holder = scope:old_holder - change = scope:change - } - } - } - } - resolve_title_and_vassal_change = scope:change - } - if = { # If it is their primary title, we try to find a fitting replacement for them - limit = { - scope:target_title = scope:old_holder.primary_title - } - if = { # For kingdoms and empires, we simply make a dynamic title for one of their leftover titles - limit = { - scope:target_title.tier > tier_duchy - scope:old_holder = { - any_realm_county = { - holder = scope:old_holder - NOT = { target_is_de_jure_liege_or_above = scope:target_title } - } - } - } - scope:old_holder = { - random_realm_county = { - limit = { - holder = scope:old_holder - NOT = { target_is_de_jure_liege_or_above = scope:target_title } - } - creating_kingdom_empire_title_effect = yes - } - } - } - else_if = { # For duchies, we try to find a fitting title, first by checking if they have an uncreated title to one of their lands - limit = { - scope:target_title.holder = scope:old_holder - scope:target_title.tier = tier_duchy - scope:old_holder.capital_province.duchy = { - is_title_created = no - } - } - create_title_and_vassal_change = { - type = granted - save_scope_as = change2 - } - scope:old_holder.capital_province.duchy ?= { - change_title_holder = { - holder = scope:old_holder - change = scope:change2 - } - } - resolve_title_and_vassal_change = scope:change2 - } - else_if = { # Or if one of their vassals do - limit = { - scope:target_title = { - tier = tier_duchy - any_direct_de_facto_vassal_title = { - duchy ?= { is_title_created = no } - } - } - } - create_title_and_vassal_change = { - type = granted - save_scope_as = change2 - } - scope:target_title = { - random_direct_de_facto_vassal_title = { - limit = { - duchy ?= { is_title_created = no } - } - save_scope_as = old_holder_new_capital - duchy ?= { - add_to_list = title_change - } - } - } - scope:old_holder_new_capital.duchy ?= { - if = { - limit = { - any_de_jure_county = { - holder ?= { government_has_flag = government_is_herder } - holder.liege ?= scope:old_holder - } - } - random_de_jure_county = { - limit = { - holder ?= { government_has_flag = government_is_herder } - holder.liege ?= scope:old_holder - } - add_to_list = title_change - } - } - else_if = { - limit = { - any_de_jure_county = { - holder.liege ?= scope:old_holder - } - } - random_de_jure_county = { - limit = { - holder.liege ?= scope:old_holder - } - add_to_list = title_change - } - } - } - every_in_list = { - list = title_change - change_title_holder = { - holder = scope:old_holder - change = scope:change2 - } - } - resolve_title_and_vassal_change = scope:change2 - } - } -} - -migration_settle_down_obedient_vassal_effect = { - scope:actor = { - ordered_in_list = { - variable = obedient_vassals - order_by = { - value = 1 - domicile ?= { - add = herd - } - } - limit = { - is_landed = no - } - save_scope_as = current_vassal - add_to_list = settled_vassal - } - remove_list_variable = { - name = obedient_vassals - target = scope:current_vassal - } - } - change_title_holder = { - holder = scope:current_vassal - change = scope:change4 - } - set_variable = { - name = migration_previous_culture - years = 5 - value = culture - } - set_county_culture = scope:current_vassal.domicile.domicile_culture - set_county_faith = scope:current_vassal.domicile.domicile_faith - scope:current_vassal = { - change_liege = { - liege = scope:actor - change = scope:change4 - } - } -} - -migration_fitting_vassal_lands_effect = { - if = { - limit = { - scope:target_title.tier >= tier_$UPPER_TIER$ - any_in_list = { - variable = obedient_vassals - count >= 1 - } - } - while = { - limit = { - any_realm_county = { - NOR = { - $LOWER_TIER$ = scope:actor.capital_province.$LOWER_TIER$ - holder = { is_in_list = settled_vassal } - } - } - any_in_list = { - variable = obedient_vassals - count >= 1 - } - } - create_title_and_vassal_change = { - type = granted - save_scope_as = change4 - } - ordered_realm_county = { - limit = { - NOR = { - $LOWER_TIER$ = scope:actor.capital_province.$LOWER_TIER$ - holder = { is_in_list = settled_vassal } - } - } - order_by = { - value = 1 - every_de_jure_county = { add = 50 } - $LOWER_TIER$.title_capital_county = { add = county_fertility } - if = { - limit = { - this = $LOWER_TIER$.title_capital_county - } - add = 500 - } - } - migration_settle_down_obedient_vassal_effect = yes - $LOWER_TIER$ = { - if = { - limit = { - OR = { - is_title_created = no - holder ?= { - NOT = { is_in_list = settled_vassal } - OR = { - liege = scope:actor - top_liege = scope:actor - } - } - } - } - change_title_holder = { - holder = scope:current_vassal - change = scope:change4 - } - } - } - } - resolve_title_and_vassal_change = scope:change4 - } - } -} - -migration_message_effect = { - save_scope_as = old_holder - every_neighboring_top_liege_realm_owner = { add_to_temporary_list = old_holder_neighbours } - # Messages for Self - send_interface_message = { - type = msg_migration_into_realm - title = msg_migration_into_realm_title - desc = msg_migration_into_realm_desc - left_icon = scope:actor - right_icon = scope:target_title - } - if = { - limit = { is_tributary = yes } - # Messages for Suzerains and fellow Tributaries - suzerain = { - save_temporary_scope_as = suzerain_temp - add_to_temporary_list = old_holder_suzerain # for debugging - send_interface_message = { - type = msg_migration_into_realm - title = msg_migration_into_realm_tributary_title - desc = msg_migration_into_realm_tributary_desc - left_icon = scope:actor - right_icon = scope:old_holder - } - every_player = { - limit = { - is_tributary_of = scope:suzerain_temp - NOT = { this = scope:old_holder } # Self - } - send_interface_message = { - type = msg_migration_into_realm - title = msg_migration_into_realm_fellow_tributary_title - desc = msg_migration_into_realm_fellow_tributary_desc - left_icon = scope:actor - right_icon = scope:old_holder - } - } - clear_saved_scope = suzerain_temp - } - } - else_if = { - limit = { is_independent_ruler = no } - # Messages for Lieges and fellow Vassals - top_liege = { - save_temporary_scope_as = top_liege_temp - add_to_temporary_list = old_holder_top_liege # for debugging - send_interface_message = { - type = msg_migration_into_realm - title = msg_migration_into_realm_vassal_title - desc = msg_migration_into_realm_vassal_desc - left_icon = scope:actor - right_icon = scope:old_holder - } - every_player = { - limit = { - is_vassal_of = scope:top_liege_temp - NOT = { this = scope:old_holder } # Self - } - send_interface_message = { - type = msg_migration_into_realm - title = msg_migration_into_realm_fellow_vassal_title - desc = msg_migration_into_realm_fellow_vassal_desc - left_icon = scope:actor - right_icon = scope:old_holder - } - } - } - clear_saved_scope = top_liege_temp - } - # Messages for Vassals - every_player = { - limit = { is_vassal_of = scope:old_holder } - send_interface_message = { - type = msg_migration_into_realm - title = msg_migration_into_realm_tributary_title - desc = msg_migration_into_realm_tributary_desc - left_icon = scope:actor - right_icon = scope:old_holder - } - } - # Messages for Tributaries - every_player = { - limit = { is_tributary_of = scope:old_holder } - send_interface_message = { - type = msg_migration_into_realm - title = msg_migration_into_suzerain_title - desc = msg_migration_into_suzerain_desc - left_icon = scope:actor - right_icon = scope:old_holder - } - } - # Messages for Neighbours - every_player = { - limit = { - is_in_list = old_holder_neighbours - NOR = { # Exclude all those who have already had a message - this = scope:actor - is_in_list = old_holder # Self - is_in_list = old_holder_suzerain # Suzerains - suzerain = { is_in_list = old_holder_suzerain } # Fellow Tributaries - is_in_list = old_holder_top_liege # Lieges - top_liege = { is_in_list = old_holder_top_liege } # Fellow Vassals - is_vassal_of = scope:old_holder # Vassals - is_tributary_of = scope:old_holder # Tributaries - var:migration_neighbour_cooldown ?= scope:actor # Avoid duplicates - } - } - set_variable = { - name = migration_neighbour_cooldown - value = scope:actor - days = 1 - } - send_interface_message = { - type = msg_migration_into_neighbour - title = msg_migration_into_neighbour_title - desc = msg_migration_into_neighbour_desc - left_icon = scope:actor - right_icon = scope:old_holder.top_liege - } - } - clear_saved_scope = old_holder -} - -migration_title_and_vassal_change_effect = { - scope:domain ?= { - if = { - limit = { - tier = tier_county - } - holder = { - add_to_list = old_holder - } - } - else = { - every_de_jure_county_holder = { - limit = { - is_independent_ruler = yes - } - add_to_list = old_holder - } - } - } - scope:target_title.holder ?= { - add_to_list = old_holder - } - - # Change 1: The old holder will attempt to create a new title for their lands, if they are losing their primary title - every_in_list = { - list = old_holder - # Inform relevant people - migration_message_effect = yes - # Run effects - migration_find_fitting_title_effect = yes - } - - # Change 2: Hand out titles to actor - create_title_and_vassal_change = { - type = migration - save_scope_as = change1 - add_claim_on_loss = yes - } - scope:target_title ?= { - change_title_holder = { - holder = scope:actor - change = scope:change1 - } - } - if = { - limit = { - NOT = { scope:domain = scope:target_title } - } - scope:domain = { - change_title_holder = { - holder = scope:actor - change = scope:change1 - } - } - } - if = { - limit = { - scope:domain.tier = tier_duchy - } - scope:domain = { - every_de_jure_county = { - change_title_holder = { - holder = scope:actor - change = scope:change1 - } - } - } - } - if = { - limit = { - scope:target_title.tier >= tier_kingdom - } - scope:target_title ?= { - every_de_jure_county_holder = { - limit = { - OR = { - any_in_list = { - list = old_holder - this = prev - } - this = scope:recipient - AND = { - scope:recipient = this.liege - any_held_county = { - exists = duchy - NOT = { target_is_de_jure_liege_or_above = scope:target_title } - } - } - } - } - change_title_holder = { - holder = scope:actor - change = scope:change1 - } - } - } - scope:target_title = { - every_de_jure_county_holder = { - limit = { - OR = { - any_in_list = { - list = old_holder - NOT = { this = prev } - this = prev.liege - } - AND = { - NOT = { this = scope:recipient } - scope:recipient = this.liege - } - } - NOT = { this = scope:actor } - } - add_to_list = new_vassals - } - } - } - every_in_list = { - list = new_vassals - change_liege = { - liege = scope:actor - change = scope:change1 - } - } - resolve_title_and_vassal_change = scope:change1 - - # Change 3: Free vassals who don't belong in the new title - scope:actor = { - every_vassal = { - limit = { - NOT = { - any_held_county = { - target_is_de_jure_liege_or_above = scope:target_title - } - } - } - create_title_and_vassal_change = { - type = independency - save_scope_as = change - } - becomes_independent = { - change = scope:change - } - resolve_title_and_vassal_change = scope:change - } - } - - # Change 4: Destroy top title of a nomad who doesn't have any land anymore - every_in_list = { - list = old_holder - if = { - limit = { - NOT = { - any_held_title = { - tier = tier_county - exists = duchy - } - } - any_held_title = { - tier >= tier_county - is_landless_type_title = no - } - } - every_held_title = { - limit = { - tier >= tier_county - is_landless_type_title = no - } - prev = { destroy_title = prev } - } - } - } - - # Change 5: Settle down previously obedient vassals in new lands - scope:actor = { - if = { - limit = { - any_in_list = { - variable = obedient_vassals - count >= 1 - } - } - # Empire solution - migration_fitting_vassal_lands_effect = { - UPPER_TIER = empire - LOWER_TIER = kingdom - } - # Kingdom solution - migration_fitting_vassal_lands_effect = { - UPPER_TIER = kingdom - LOWER_TIER = duchy - } - # Duchy solution - if = { - limit = { - scope:target_title.tier >= tier_duchy - domain_limit_available < 0 - any_in_list = { - variable = obedient_vassals - count >= 1 - } - } - while = { - limit = { - domain_limit_available < 0 - any_in_list = { - variable = obedient_vassals - count >= 1 - } - any_held_county = { - exists = duchy - NOT = { this = scope:actor.capital_province.county } - } - } - create_title_and_vassal_change = { - type = granted - save_scope_as = change4 - } - ordered_held_county = { - limit = { - exists = duchy - NOT = { this = scope:actor.capital_province.county } - } - order_by = { - value = 1 - if = { - limit = { - NOT = { - any_neighboring_county = { - this = scope:actor.capital_province.county - } - } - } - add = 100 - } - } - migration_settle_down_obedient_vassal_effect = yes - } - resolve_title_and_vassal_change = scope:change4 - } - } - # Clean up liege setup - create_title_and_vassal_change = { - type = granted - save_scope_as = change4 - } - every_vassal = { - limit = { - exists = primary_title.de_jure_liege.holder - } - change_liege = { - liege = primary_title.de_jure_liege.holder - change = scope:change4 - } - } - resolve_title_and_vassal_change = scope:change4 - } - } - - # Change 6: If you cannot find land for your old obedient vassals, just destroy their camp and make them a part of your court - scope:actor = { - every_in_list = { - variable = obedient_vassals - limit = { - is_landed = no - } - save_scope_as = current_vassal - every_courtier_or_guest = { - set_employer = scope:actor - } - destroy_title = primary_title - root = { - remove_list_variable = { - name = obedient_vassals - target = scope:current_vassal - } - } - set_employer = scope:actor - } - } - - # Change 7: Move domiciles so they are in the right provinces - every_in_list = { - list = old_holder - domicile ?= { move_domicile = prev.capital_province } - every_vassal = { - domicile ?= { move_domicile = prev.capital_province } - } - } - scope:actor = { - domicile ?= { move_domicile = prev.capital_province } - every_vassal = { - domicile ?= { move_domicile = prev.capital_province } - } - } - - # Change 8: If for some reason you have any vassals who are still your subjects, but don't hold land, they will become independent - scope:actor = { - every_vassal = { - limit = { - NOT = { - any_held_county = { - exists = duchy - } - } - } - create_title_and_vassal_change = { - type = independency - save_scope_as = change - } - becomes_independent = { - change = scope:change - } - resolve_title_and_vassal_change = scope:change - } - } - - # Inform nearby peeps - every_player = { - limit = { - NOR = { - this = scope:actor - is_in_list = old_holder_suzerain - suzerain = { is_in_list = old_holder_suzerain } - is_in_list = old_holder_top_liege - top_liege = { is_in_list = old_holder_top_liege } - } - is_in_list = old_holder_neighbours - } - } - - # Debugging - if = { - limit = { debug_only = yes } - debug_log = "Migration completed" - debug_log_scopes = yes - } -} - -migration_set_obedient_vassal_effect = { - create_title_and_vassal_change = { - type = migration - save_scope_as = change - } - every_realm_county = { - limit = { - holder = scope:current_vassal - is_nomad_title = no - is_noble_family_title = no - } - create_character = { - template = herder_character - faith = scope:current_vassal.domicile.domicile_faith - culture = scope:current_vassal.domicile.domicile_culture - location = scope:current_vassal.primary_title.title_capital_county.title_province - save_scope_as = herder_character - after_creation = { - remove_character_flag = peasant_outfit - add_to_list = government_change - } - } - change_title_holder = { - holder = scope:herder_character - change = scope:change - } - title_province = { - if = { - limit = { - has_holding_type = nomad_holding - } - set_holding_type = herder_holding - } - } - } - resolve_title_and_vassal_change = scope:change - every_held_title = { - limit = { - tier >= tier_duchy - } - prev = { destroy_title = prev } - } - - every_in_list = { - list = government_change - change_government = herder_government - remove_from_list = government_change - } - - scope:actor = { - add_to_variable_list = { - name = obedient_vassals - target = scope:current_vassal - } - } -} - -offer_confederation_accepter_effect = { - if = { - limit = { - scope:actor = { - is_confederation_member = no - } - } - custom_tooltip = create_confederation_recipient_tt - } - else = { - custom_tooltip = join_confederation_recipient_tt - } - custom_tooltip = confederation_defensive_wars_tt - custom_tooltip = unlock_leave_confederation_interaction_tt -} - -confederation_realm_transfer_effect = { - save_scope_as = transfer_liege - every_vassal = { - limit = { - highest_held_title_tier >= tier_county - primary_title = { - NOT = { - any_this_title_or_de_jure_above = { - holder = scope:transfer_liege - } - } - } - } - add_to_list = vassals_to_transfer - } - add_to_list = vassals_to_transfer - create_title_and_vassal_change = { - type = granted - save_scope_as = change_3 - add_claim_on_loss = no - } - primary_title = { - change_title_holder = { - holder = $CHARACTER$ - change = scope:change_3 - } - } - resolve_title_and_vassal_change = scope:change_3 - - every_in_list = { - custom = custom.every_non_de_jure_vassal - list = vassals_to_transfer - create_title_and_vassal_change = { - type = swear_fealty - save_scope_as = change_4 - } - change_liege = { - liege = $CHARACTER$ - change = scope:change_4 - } - resolve_title_and_vassal_change = scope:change_4 - } -} - -mpo_mongol_recovered_head_content_effect = { - if = { - limit = { - any_side_participant = { - has_variable = beheaded_warrior - is_ruler = yes - } - } - every_side_participant = { - limit = { - has_variable = beheaded_warrior - is_ruler = yes - } - save_scope_as = beheaded_liege - random_list = { - 1 = { - trigger = { - is_alive = yes - is_imprisoned = no - } - modifier = { - OR = { - is_consort_of = var:beheaded_warrior - is_close_family_of = var:beheaded_warrior - } - add = 20 - } - modifier = { - has_variable = beheaded_warrior_powerful_vassal - add = 1 - } - trigger_event = { - id = mpo_nomad_events.1001 - days = 1 - } - add_character_flag = { - flag = beheaded_warrior_cooldown - years = 2 - } - } - 4 = { - modifier = { - OR = { - has_multiple_players = yes - is_ai = yes - } - factor = 2 - } - remove_variable = beheaded_warrior - remove_variable = beheaded_warrior_foe - remove_variable = beheaded_warrior_councillor - remove_variable = beheaded_warrior_powerful_vassal - remove_variable = beheaded_warrior_accolade - remove_variable = beheaded_warrior_location - } - } - } - } -} - -mpo_beheaded_warrior_artifact_creation_effect = { - #Important character to an emperor - high tier artifact - if = { - limit = { - highest_held_title_tier >= tier_empire - mpo_important_beheaded_warrior_trigger = yes - } - random_list = { - 2 = { - trigger = { - scope:beheaded_warrior = { - is_close_family_of = root - } - } - create_artifact = { - name = warriors_head_artifact - description = kin_head_artifact_desc - rarity = famed - type = miscellaneous - modifier = kin_head_modifier_tier_3 - decaying = yes - template = mpo_severed_head_template - visuals = pocket_severed_head - creator = scope:beheaded_warrior - save_scope_as = head_artifact - } - scope:head_artifact = { - add_scaled_artifact_modifier_dynasty_prestige_effect = yes - } - } - 1 = { - trigger = { - has_variable = beheaded_warrior_accolade - } - create_artifact = { - name = warriors_head_artifact - description = accolade_head_artifact_desc - rarity = famed - type = miscellaneous - modifier = accolade_head_modifier_tier_3 - decaying = yes - template = mpo_severed_head_template - visuals = pocket_severed_head - creator = scope:beheaded_warrior - save_scope_as = head_artifact - } - } - 1 = { - create_artifact = { - name = warriors_head_artifact - description = warriors_head_artifact_desc - rarity = famed - type = miscellaneous - modifier = warriors_head_modifier_tier_3 - decaying = yes - template = mpo_severed_head_template - visuals = pocket_severed_head - creator = scope:beheaded_warrior - save_scope_as = head_artifact - } - } - 1 = { - create_artifact = { - name = warriors_head_artifact - description = warriors_head_artifact_desc - rarity = famed - type = miscellaneous - modifier = warriors_head_modifier_tier_3_alt - decaying = yes - template = mpo_severed_head_template - visuals = pocket_severed_head - creator = scope:beheaded_warrior - save_scope_as = head_artifact - } - } - 1 = { - create_artifact = { - name = warriors_head_artifact - description = warriors_head_artifact_desc - rarity = famed - type = miscellaneous - modifier = warriors_head_modifier_tier_3_alt_2 - decaying = yes - template = mpo_severed_head_template - visuals = pocket_severed_head - creator = scope:beheaded_warrior - save_scope_as = head_artifact - } - } - 1 = { - create_artifact = { - name = warriors_head_artifact - description = warriors_head_artifact_desc - rarity = famed - type = miscellaneous - modifier = warriors_head_modifier_tier_3_alt_3 - decaying = yes - template = mpo_severed_head_template - visuals = pocket_severed_head - creator = scope:beheaded_warrior - save_scope_as = head_artifact - } - } - } - } - #Mid-tier character - else_if = { - limit = { - OR = { - highest_held_title_tier >= tier_empire - AND = { - highest_held_title_tier >= tier_kingdom - mpo_important_beheaded_warrior_trigger = yes - } - } - } - random_list = { - 2 = { - trigger = { - scope:beheaded_warrior = { - is_close_family_of = root - } - } - create_artifact = { - name = warriors_head_artifact - description = kin_head_artifact_desc - rarity = masterwork - type = miscellaneous - modifier = kin_head_modifier_tier_2 - decaying = yes - template = mpo_severed_head_template - visuals = pocket_severed_head - creator = scope:beheaded_warrior - save_scope_as = head_artifact - } - scope:head_artifact = { - add_scaled_artifact_modifier_dynasty_prestige_effect = yes - } - } - 1 = { - trigger = { - has_variable = beheaded_warrior_accolade - } - create_artifact = { - name = warriors_head_artifact - description = accolade_head_artifact_desc - rarity = masterwork - type = miscellaneous - modifier = accolade_head_modifier_tier_2 - decaying = yes - template = mpo_severed_head_template - visuals = pocket_severed_head - creator = scope:beheaded_warrior - save_scope_as = head_artifact - } - } - 1 = { - create_artifact = { - name = warriors_head_artifact - description = warriors_head_artifact_desc - rarity = masterwork - type = miscellaneous - modifier = warriors_head_modifier_tier_2 - decaying = yes - template = mpo_severed_head_template - visuals = pocket_severed_head - creator = scope:beheaded_warrior - save_scope_as = head_artifact - } - } - 1 = { - create_artifact = { - name = warriors_head_artifact - description = warriors_head_artifact_desc - rarity = masterwork - type = miscellaneous - modifier = warriors_head_modifier_tier_2_alt - decaying = yes - template = mpo_severed_head_template - visuals = pocket_severed_head - creator = scope:beheaded_warrior - save_scope_as = head_artifact - } - } - 1 = { - create_artifact = { - name = warriors_head_artifact - description = warriors_head_artifact_desc - rarity = masterwork - type = miscellaneous - modifier = warriors_head_modifier_tier_2_alt_2 - decaying = yes - template = mpo_severed_head_template - visuals = pocket_severed_head - creator = scope:beheaded_warrior - save_scope_as = head_artifact - } - } - 1 = { - create_artifact = { - name = warriors_head_artifact - description = warriors_head_artifact_desc - rarity = masterwork - type = miscellaneous - modifier = warriors_head_modifier_tier_2_alt_3 - decaying = yes - template = mpo_severed_head_template - visuals = pocket_severed_head - creator = scope:beheaded_warrior - save_scope_as = head_artifact - } - } - } - } - #Low tier character - else = { - random_list = { - 2 = { - trigger = { - scope:beheaded_warrior = { - is_close_family_of = root - } - } - create_artifact = { - name = warriors_head_artifact - description = kin_head_artifact_desc - rarity = common - type = miscellaneous - modifier = kin_head_modifier_tier_1 - decaying = yes - template = mpo_severed_head_template - visuals = pocket_severed_head - creator = scope:beheaded_warrior - save_scope_as = head_artifact - } - scope:head_artifact = { - add_scaled_artifact_modifier_dynasty_prestige_effect = yes - } - } - 1 = { - trigger = { - has_variable = beheaded_warrior_accolade - } - create_artifact = { - name = warriors_head_artifact - description = accolade_head_artifact_desc - rarity = common - type = miscellaneous - modifier = accolade_head_modifier_tier_1 - decaying = yes - template = mpo_severed_head_template - visuals = pocket_severed_head - creator = scope:beheaded_warrior - save_scope_as = head_artifact - } - } - 1 = { - create_artifact = { - name = warriors_head_artifact - description = warriors_head_artifact_desc - rarity = common - type = miscellaneous - modifier = warriors_head_modifier_tier_1 - decaying = yes - template = mpo_severed_head_template - visuals = pocket_severed_head - creator = scope:beheaded_warrior - save_scope_as = head_artifact - } - } - 1 = { - create_artifact = { - name = warriors_head_artifact - description = warriors_head_artifact_desc - rarity = common - type = miscellaneous - modifier = warriors_head_modifier_tier_1_alt - decaying = yes - template = mpo_severed_head_template - visuals = pocket_severed_head - creator = scope:beheaded_warrior - save_scope_as = head_artifact - } - } - 1 = { - create_artifact = { - name = warriors_head_artifact - description = warriors_head_artifact_desc - rarity = common - type = miscellaneous - modifier = warriors_head_modifier_tier_1_alt_2 - decaying = yes - template = mpo_severed_head_template - visuals = pocket_severed_head - creator = scope:beheaded_warrior - save_scope_as = head_artifact - } - } - 1 = { - create_artifact = { - name = warriors_head_artifact - description = warriors_head_artifact_desc - rarity = common - type = miscellaneous - modifier = warriors_head_modifier_tier_1_alt_3 - decaying = yes - template = mpo_severed_head_template - visuals = pocket_severed_head - creator = scope:beheaded_warrior - save_scope_as = head_artifact - } - } - } - } - save_scope_as = owner - hidden_effect = { - scope:head_artifact = { - add_scaled_artifact_modifier_combat_effect = yes - set_max_durability = 50 - } - } -} - -mpo_execution_head_artifact_creation_effect = { - save_scope_as = owner - #This is an emperor's head - if = { - limit = { - has_character_flag = execution_head_illustrious_flag - } - create_artifact = { - name = executed_head_artifact - description = executed_head_emperor_artifact_desc - rarity = illustrious - type = miscellaneous - modifier = artifact_monthly_prestige_gain_per_dread_add_4_modifier - decaying = yes - template = mpo_severed_head_template - visuals = pocket_severed_head - creator = scope:victim - save_scope_as = head_artifact - } - } - else = { - create_artifact = { - name = executed_head_artifact - description = executed_head_king_artifact_desc - rarity = famed - type = miscellaneous - modifier = artifact_monthly_prestige_gain_per_dread_add_3_modifier - decaying = yes - template = mpo_severed_head_template - visuals = pocket_severed_head - creator = scope:victim - save_scope_as = head_artifact - } - } - if = { - limit = { - scope:head_artifact = { - NOT = { - artifact_owner = { - this = root - } - } - } - } - scope:head_artifact = { - set_owner = root - } - } - - random_list = { - 4 = { - trigger = { - OR = { - is_at_war_with = scope:headless_heir - is_causing_raid_hostility_towards = scope:headless_heir - } - } - scope:head_artifact = { - add_2_scaled_artifact_modifier_combat_effect = yes - } - } - 1 = { - trigger = { - scope:headless_heir = { - government_has_flag = government_is_nomadic - } - } - scope:head_artifact = { - add_scaled_artifact_modifier_archer_cavalry_damage_add_effect = yes - add_scaled_artifact_modifier_minor_prestige_effect = yes - } - } - 1 = { - trigger = { - OR = { - scope:victim.faith = { - NOT = { - this = root.faith - } - } - scope:victim = { - has_trait = zealous - } - scope:victim = { - has_trait = pilgrim - } - scope:headless_heir.primary_title = { - is_head_of_faith = yes - } - } - } - scope:head_artifact = { - add_scaled_artifact_modifier_piety_effect = yes - } - scope:head_artifact = { - add_scaled_artifact_modifier_devotion_effect = yes - } - } - 1 = { - trigger = { - OR = { - scope:victim.faith = { - NOT = { - this = root.faith - } - } - scope:victim = { - has_trait = zealous - } - scope:victim = { - has_trait = pilgrim - } - scope:headless_heir.primary_title = { - is_head_of_faith = yes - } - } - } - scope:head_artifact = { - add_2_scaled_artifact_modifier_devotion_effect = yes - } - } - 1 = { - scope:head_artifact = { - add_scaled_artifact_modifier_grandeur_big_effect = yes - } - } - 1 = { - scope:head_artifact = { - add_2_scaled_artifact_modifier_majesty_effect = yes - } - } - 1 = { - trigger = { - scope:victim = { - OR = { - has_trait = education_stewardship_4 - has_trait = education_stewardship_5 - has_trait = administrator - has_trait = avaricious - has_trait = architect - stewardship >= very_high_skill_rating - } - } - } - scope:head_artifact = { - add_2_scaled_artifact_modifier_rulership_effect = yes - } - } - 1 = { - trigger = { - exists = root.dynasty - NOT = { - scope:victim.dynasty ?= { - this = root.dynasty - } - } - } - scope:head_artifact = { - add_scaled_artifact_modifier_dynasty_prestige_effect = yes - add_scaled_artifact_modifier_hire_mercenary_effect = yes - } - } - } - hidden_effect = { - scope:head_artifact = { - set_max_durability = 50 - } - } -} - -### PAIZA ### - -ai_paiza_giveaway_effect = { - random_courtier = { - limit = { - NOT = { - any_character_artifact = { - scope:artifact.var:paiza_patron ?= root - } - } - } - mpo_create_paiza_artifact_effect = { - PATRON = root - GRANTEE = this - } - } - random_vassal = { - limit = { - NOT = { - any_character_artifact = { - scope:artifact.var:paiza_patron ?= root - } - } - } - mpo_create_paiza_artifact_effect = { - PATRON = root - GRANTEE = this - } - } -} - -mpo_find_suitable_merchant_effect = { - random_list = { - 1 = { #Merv - trigger = { - title:c_bukhara = { - development_level >= 30 - NOT = { - holder.top_liege = { - government_has_flag = government_is_nomadic - } - } - } - } - modifier = { - add = title:c_bukhara.development_level - } - title:b_bukhara = { - save_scope_as = merchant_origin - } - } - 1 = { #Nishapur - trigger = { - title:c_nishapur = { - development_level >= 30 - NOT = { - holder.top_liege = { - government_has_flag = government_is_nomadic - } - } - } - } - modifier = { - add = title:c_nishapur.development_level - } - title:b_nishapur = { - save_scope_as = merchant_origin - } - } - 1 = { #Khotan - trigger = { - title:c_khotan = { - development_level >= 30 - NOT = { - holder.top_liege = { - government_has_flag = government_is_nomadic - } - } - } - } - modifier = { - add = title:c_khotan.development_level - } - title:b_khotan = { - save_scope_as = merchant_origin - } - } - 1 = { #Wroclaw - trigger = { - title:c_breslau = { - development_level >= 30 - NOT = { - holder.top_liege = { - government_has_flag = government_is_nomadic - } - } - } - } - modifier = { - add = title:c_breslau.development_level - } - title:b_breslau = { - save_scope_as = merchant_origin - } - } - 1 = { #Krakow - trigger = { - title:c_krakowska = { - development_level >= 30 - NOT = { - holder.top_liege = { - government_has_flag = government_is_nomadic - } - } - } - } - modifier = { - add = title:c_krakowska.development_level - } - title:b_krakow = { - save_scope_as = merchant_origin - } - } - 1 = { #Novgorod - trigger = { - title:c_novgorod = { - development_level >= 30 - NOT = { - holder.top_liege = { - government_has_flag = government_is_nomadic - } - } - } - } - modifier = { - add = title:c_novgorod.development_level - } - title:b_novgorod = { - save_scope_as = merchant_origin - } - } - 1 = { #Kyiv - trigger = { - title:c_kiev = { - development_level >= 30 - NOT = { - holder.top_liege = { - government_has_flag = government_is_nomadic - } - } - } - } - modifier = { - add = title:c_kiev.development_level - } - title:b_kiev = { - save_scope_as = merchant_origin - } - } - 1 = { #Baghdad - trigger = { - title:c_baghdad = { - development_level >= 30 - NOT = { - holder.top_liege = { - government_has_flag = government_is_nomadic - } - } - } - } - modifier = { - add = title:c_baghdad.development_level - } - title:b_baghdad = { - save_scope_as = merchant_origin - } - } - 1 = { #Pisa - trigger = { - title:c_pisa = { - development_level >= 30 - NOT = { - holder.top_liege = { - government_has_flag = government_is_nomadic - } - } - } - } - modifier = { - add = title:c_pisa.development_level - } - title:b_pisa = { - save_scope_as = merchant_origin - } - } - 1 = { #Venice - trigger = { - title:c_baghdad = { - development_level >= 30 - NOT = { - holder.top_liege = { - government_has_flag = government_is_nomadic - } - } - } - } - modifier = { - add = title:c_baghdad.development_level - } - title:b_baghdad = { - save_scope_as = merchant_origin - } - } - 1 = { #Cairo - trigger = { - title:c_cairo = { - development_level >= 30 - NOT = { - holder.top_liege = { - government_has_flag = government_is_nomadic - } - } - } - } - modifier = { - add = title:c_cairo.development_level - } - title:b_cairo = { - save_scope_as = merchant_origin - } - } - 1 = { #Genua - trigger = { - title:c_genoa = { - development_level >= 30 - NOT = { - holder.top_liege = { - government_has_flag = government_is_nomadic - } - } - } - } - modifier = { - add = title:c_genoa.development_level - } - title:b_genoa = { - save_scope_as = merchant_origin - } - } - 1 = { #Constantinople - #something has to be in constantinople - modifier = { - add = title:c_byzantion.development_level - } - title:b_constantinople = { - save_scope_as = merchant_origin - } - } - } - hidden_effect = { - scope:merchant_origin.county = { - save_scope_as = merchant_county - } - create_character = { - location = scope:merchant_origin.county.title_province - template = foreign_merchant_template - save_scope_as = paiza_merchant - } - scope:paiza_merchant = { - add_gold = { - value = root.tiny_gold_value - multiply = 21.37 - } - } - } -} - -#scope:patron is the creator -#scope:receiver is who gets it -mpo_create_paiza_artifact_effect = { - $PATRON$ = { - save_scope_as = patron - } - $GRANTEE$ = { - save_scope_as = grantee - } - save_scope_value_as = { - name = wealth - value = { - value = 20 - multiply = { - value = scope:patron.primary_title.tier - add = scope:patron.dominance_value - } - } - } - save_scope_value_as = { - name = quality - value = { - value = 20 - multiply = { - value = scope:patron.primary_title.tier - add = scope:patron.dominance_value - } - } - } - scope:grantee = { - create_artifact = { - name = paiza_artifact_title - type = miscellaneous - template = paiza_artifact_template - creator = scope:patron - description = paiza_artifact_desc - visuals = paiza - wealth = scope:wealth - quality = scope:quality - modifier = artifact_steppe_danger_travel_high_modifier - modifier = artifact_steppe_advantage_2_modifier - save_scope_as = created_paiza - } - } - scope:created_paiza = { - set_variable = { - name = paiza_patron - value = scope:patron - } - } -} - - -mpo_paiza_innovation_reward_effect = { - switch = { - trigger = has_domicile_parameter - nomad_yurt_increased_innovation_paiza_lvl_1 = { - root = { - add_character_modifier = { - modifier = mpo_fascination_leap_modifier - years = 4 - } - } - } - nomad_yurt_increased_innovation_paiza_lvl_2 = { - root = { - add_character_modifier = { - modifier = mpo_fascination_leap_modifier - years = 6 - } - if = { - limit = { - culture = { - can_get_innovation_from = scope:merchant_origin.county.culture - } - } - culture = { - get_random_innovation_from = scope:merchant_origin.county.culture - } - } - } - } - nomad_yurt_increased_innovation_paiza_lvl_3 = { - root = { - add_character_modifier = { - modifier = mpo_fascination_leap_modifier - years = 8 - } - if = { - limit = { - culture = { - can_get_innovation_from = scope:merchant_origin.county.culture - } - } - culture = { - get_random_innovation_from = scope:merchant_origin.county.culture - } - } - if = { - limit = { - culture = { - can_get_innovation_from = scope:merchant_origin.county.culture - } - } - culture = { - get_random_innovation_from = scope:merchant_origin.county.culture - } - } - } - } - } - - root = { - if = { - limit = { - NOT = { - domicile ?= { has_domicile_building_or_higher = innovation_yurt_02 } - } - } - add_character_modifier = { - modifier = mpo_fascination_leap_modifier - years = 2 - } - } - } - -} - - -mpo_paiza_deal_grade_effect = { - if = { - limit = { - has_character_flag = established_paiza_system - } - set_variable = { - name = trade_gold_value - value = { - value = scope:paiza_merchant.var:paiza_gold_invested - multiply = 0.4 - } - } - } - else = { - set_variable = { - name = trade_gold_value - value = { - value = scope:paiza_merchant.var:paiza_gold_invested - multiply = 0.2 - } - } - } - - set_variable = { - name = trade_gold_percent - value = 1 - } - change_variable = { - name = trade_gold_percent - add = { - add = scope:paiza_merchant.sum_of_all_skills_value - multiply = 0.01 - max = 4 - min = 0 - } - } - #custom_tooltip = paiza_merchant_skill_gold_percent - domicile ?= { - switch = { - trigger = has_domicile_parameter - nomad_yurt_paiza_more_gold_lvl_1 = { - custom_tooltip = paiza_yurt_gold_percent_1 - root = { - change_variable = { - name = trade_gold_percent - add = 0.05 - } - } - } - nomad_yurt_paiza_more_gold_lvl_2 = { - custom_tooltip = paiza_yurt_gold_percent_2 - root = { - change_variable = { - name = trade_gold_percent - add = 0.1 - } - } - } - nomad_yurt_paiza_more_gold_lvl_3 = { - custom_tooltip = paiza_yurt_gold_percent_3 - root = { - change_variable = { - name = trade_gold_percent - add = 0.2 - } - } - } - } - } - change_variable = { - name = trade_gold_value - multiply = root.var:trade_gold_percent - } -} - - -mpo_yurts_paiza_bonuses_tooltip_effect = { - if = { - limit = { - domicile ?= { - OR = { - has_domicile_building_or_higher = fertility_trade_yurt_01 - has_domicile_building_or_higher = herd_trade_yurt_01 - has_domicile_building_or_higher = knight_trade_yurt_01 - has_domicile_building_or_higher = merchant_yurt_01 - has_domicile_building_or_higher = char_trade_yurt_01 - } - } - } - custom_tooltip = yurt_paiza_bonuses_generic - } - - domicile ?= { - if = { - limit = { - has_domicile_building_or_higher = fertility_trade_yurt_01 - } - switch = { - trigger = has_domicile_parameter - nomad_yurt_paiza_fertility_gain_lvl_1 = { custom_tooltip = nomad_yurt_paiza_fertility_gain_lvl_1_tooltip } - nomad_yurt_paiza_fertility_gain_lvl_2 = { custom_tooltip = nomad_yurt_paiza_fertility_gain_lvl_2_tooltip } - nomad_yurt_paiza_fertility_gain_lvl_3 = { custom_tooltip = nomad_yurt_paiza_fertility_gain_lvl_3_tooltip } - } - } - if = { - limit = { - has_domicile_building_or_higher = herd_trade_yurt_01 - } - switch = { - trigger = has_domicile_parameter - nomad_yurt_paiza_herd_gain_lvl_1 = { custom_tooltip = nomad_yurt_paiza_herd_gain_lvl_1_tooltip } - nomad_yurt_paiza_herd_gain_lvl_2 = { custom_tooltip = nomad_yurt_paiza_herd_gain_lvl_2_tooltip } - nomad_yurt_paiza_herd_gain_lvl_3 = { custom_tooltip = nomad_yurt_paiza_herd_gain_lvl_3_tooltip } - } - } - if = { - limit = { - has_domicile_building_or_higher = knight_trade_yurt_01 - } - switch = { - trigger = has_domicile_parameter - nomad_yurt_paiza_maa_gain_lvl_1 = { custom_tooltip = nomad_yurt_paiza_maa_gain_lvl_1_tooltip } - nomad_yurt_paiza_maa_gain_lvl_2 = { custom_tooltip = nomad_yurt_paiza_maa_gain_lvl_2_tooltip } - nomad_yurt_paiza_maa_gain_lvl_3 = { custom_tooltip = nomad_yurt_paiza_maa_gain_lvl_3_tooltip } - } - } - if = { - limit = { - has_domicile_building_or_higher = merchant_yurt_01 - } - switch = { - trigger = has_domicile_parameter - nomad_yurt_paiza_more_gold_lvl_1 = { custom_tooltip = nomad_yurt_paiza_more_gold_lvl_1_tooltip } - nomad_yurt_paiza_more_gold_lvl_2 = { custom_tooltip = nomad_yurt_paiza_more_gold_lvl_2_tooltip } - nomad_yurt_paiza_more_gold_lvl_3 = { custom_tooltip = nomad_yurt_paiza_more_gold_lvl_3_tooltip } - } - } - if = { - limit = { - has_domicile_building_or_higher = char_trade_yurt_01 - } - switch = { - trigger = has_domicile_parameter - nomad_yurt_paiza_char_gain_lvl_1 = { custom_tooltip = nomad_yurt_paiza_char_gain_lvl_1_tooltip } - nomad_yurt_paiza_char_gain_lvl_2 = { custom_tooltip = nomad_yurt_paiza_char_gain_lvl_2_tooltip } - nomad_yurt_paiza_char_gain_lvl_3 = { custom_tooltip = nomad_yurt_paiza_char_gain_lvl_3_tooltip } - } - } - } -} - -mpo_yurts_paiza_bonuses_effect = { - if = { - limit = { - domicile ?= { - OR = { - has_domicile_building_or_higher = fertility_trade_yurt_01 - has_domicile_building_or_higher = herd_trade_yurt_01 - has_domicile_building_or_higher = knight_trade_yurt_01 - has_domicile_building_or_higher = merchant_yurt_01 - has_domicile_building_or_higher = char_trade_yurt_01 - } - } - } - custom_tooltip = yurt_paiza_bonuses_generic - } - domicile ?= { - if = { - limit = { - has_domicile_building_or_higher = fertility_trade_yurt_01 - } - switch = { - trigger = has_domicile_parameter - nomad_yurt_paiza_fertility_gain_lvl_1 = { - root = { - every_held_county = { - limit = { - uses_county_fertility = yes - } - add_county_modifier = { - modifier = paiza_fertility_modifier_1 - years = 2 - } - } - } - } - nomad_yurt_paiza_fertility_gain_lvl_2 = { - root = { - every_held_county = { - limit = { - uses_county_fertility = yes - } - add_county_modifier = { - modifier = paiza_fertility_modifier_2 - years = 4 - } - } - } - } - nomad_yurt_paiza_fertility_gain_lvl_3 = { - root = { - every_held_county = { - limit = { - uses_county_fertility = yes - } - add_county_modifier = { - modifier = paiza_fertility_modifier_3 - years = 6 - } - } - } - } - } - } - if = { - limit = { - has_domicile_building_or_higher = herd_trade_yurt_01 - } - switch = { - trigger = has_domicile_parameter - nomad_yurt_paiza_herd_gain_lvl_1= { - change_herd = { - value = root.var:trade_gold_value - multiply = 0.05 - } - } - nomad_yurt_paiza_herd_gain_lvl_2 = { - change_herd = { - value = root.var:trade_gold_value - multiply = 0.05 - } - } - nomad_yurt_paiza_herd_gain_lvl_3 = { - change_herd = { - value = root.var:trade_gold_value - multiply = 0.2 - } - } - } - } - if = { - limit = { - has_domicile_building_or_higher = knight_trade_yurt_01 - } - switch = { - trigger = has_domicile_parameter - nomad_yurt_paiza_maa_gain_lvl_1 = { - root = { - spawn_army = { - name = paiza_troops - men_at_arms = { - type = accolade_maa_archers - stacks = 1 - } - location = root.location - origin = scope:merchant_origin - inheritable = yes - } - } - } - nomad_yurt_paiza_maa_gain_lvl_2 = { - root = { - spawn_army = { - name = paiza_troops - men_at_arms = { - type = accolade_maa_archers - stacks = 4 - } - location = root.location - origin = scope:merchant_origin - inheritable = yes - } - } - } - nomad_yurt_paiza_maa_gain_lvl_3 = { - root = { - spawn_army = { - name = paiza_troops - men_at_arms = { - type = accolade_maa_archers - stacks = 4 - } - men_at_arms = { - type = accolade_maa_vanguards - stacks = 4 - } - location = root.location - origin = scope:merchant_origin - inheritable = yes - } - } - } - } - } - if = { - limit = { - has_domicile_building_or_higher = char_trade_yurt_01 - } - switch = { - trigger = has_domicile_parameter - nomad_yurt_paiza_char_gain_lvl_1 = { - root = { - hidden_effect = { - create_character = { - location = root.location - culture = scope:merchant_origin.county.culture - faith = scope:merchant_origin.county.faith - gender_female_chance = 50 - template = peasant_character - save_scope_as = yurt_merchant_char - } - scope:yurt_merchant_char = { - add_trait = lifestyle_traveler - } - } - add_courtier = scope:yurt_merchant_char - } - } - nomad_yurt_paiza_char_gain_lvl_2 = { - root = { - hidden_effect = { - create_character = { - location = root.location - culture = scope:merchant_origin.county.culture - faith = scope:merchant_origin.county.faith - gender_female_chance = 50 - template = merchant_template - save_scope_as = yurt_merchant_char - } - scope:yurt_merchant_char = { - add_trait = lifestyle_traveler - } - } - add_courtier = scope:yurt_merchant_char - } - } - nomad_yurt_paiza_char_gain_lvl_3 = { - root = { - hidden_effect = { - create_character = { - location = root.location - culture = scope:merchant_origin.county.culture - faith = scope:merchant_origin.county.faith - gender_female_chance = 50 - template = merchant_template - save_scope_as = yurt_merchant_char - } - scope:yurt_merchant_char = { - add_random_skill_point_effect = yes - add_random_skill_point_effect = yes - add_random_skill_point_effect = yes - add_random_skill_point_effect = yes - add_random_skill_point_effect = yes - add_random_skill_point_effect = yes - random_list = { - 1 = { add_trait = avaricious } - 1 = { add_trait = diplomat } - 1 = { add_trait = overseer } - } - add_trait = lifestyle_traveler - } - } - add_courtier = scope:yurt_merchant_char - } - } - } - } - } -} - -mpo_paiza_improve_maa_smol_effect = { - add_character_modifier = mpo_paiza_improve_maa_modifier - add_character_flag = paiza_metal_trade_yurt_flag - domicile ?= { - switch = { - trigger = has_domicile_building - paiza_metal_trade_yurt_01 = { - add_domicile_building = paiza_metal_trade_yurt_02 - } - paiza_metal_trade_yurt_02 = { - add_domicile_building = paiza_metal_trade_yurt_03 - } - paiza_metal_trade_yurt_03 = { - custom_tooltip = paiza_metal_yurt_smol_block - } - } - if = { - limit = { - NOT = { - has_domicile_building_or_higher = paiza_metal_trade_yurt_01 - } - } - add_domicile_building = paiza_metal_trade_yurt_01 - } - } - remove_character_flag = paiza_metal_trade_yurt_flag -} - -mpo_paiza_improve_maa_effect = { - add_character_modifier = mpo_paiza_improve_maa_modifier - add_character_flag = paiza_metal_trade_yurt_flag - domicile ?= { - switch = { - trigger = has_domicile_building - paiza_metal_trade_yurt_01 = { - add_domicile_building = paiza_metal_trade_yurt_02 - } - paiza_metal_trade_yurt_02 = { - add_domicile_building = paiza_metal_trade_yurt_03 - } - paiza_metal_trade_yurt_03 = { - add_domicile_building = paiza_metal_trade_yurt_04 - } - paiza_metal_trade_yurt_04 = { - add_domicile_building = paiza_metal_trade_yurt_05 - } - paiza_metal_trade_yurt_05 = { - add_domicile_building = paiza_metal_trade_yurt_06 - } - } - if = { - limit = { - NOT = { - has_domicile_building_or_higher = paiza_metal_trade_yurt_01 - } - } - add_domicile_building = paiza_metal_trade_yurt_01 - } - } - remove_character_flag = paiza_metal_trade_yurt_flag -} - -mpo_paiza_abuse_counter_effect = { - $PAIZA_PATRON$ = { save_scope_as = paiza_patron } - $PAIZA_ABUSER$ = { save_scope_as = paiza_abuser } - if = { - limit = { - scope:paiza_patron = { - is_ai = no - } - } - custom_tooltip = mpo_paiza_abuse_counter_effect.random - scope:paiza_patron = { - trigger_event = { - id = mpo_decisions_events.0112 - days = { 1 4 } - } - } - } - else = { - if = { - limit = { - NOT = { - exists = var:paiza_abuse_stance - } - } - custom_tooltip = mpo_paiza_abuse_counter_effect.indifferent - set_variable = { - name = paiza_abuse_stance - value = flag:indifferent - } - } - else_if = { - limit = { - exists = var:paiza_abuse_stance - } - switch = { - trigger = var:paiza_abuse_stance - flag:angry = { - custom_tooltip = mpo_paiza_abuse_counter_effect.angry - random_list = { - 90 = { - modifier = { - add = mpo_paiza_abuse_khan_reaction_value - } - custom_tooltip = mpo_paiza_abuse_counter_effect.khan_reaction_action - trigger_event = { - id = mpo_decisions_events.0111 - days = { 21 37 } - } - } - 10 = { - custom_tooltip = mpo_paiza_abuse_counter_effect.khan_reaction_angry - } - } - } - flag:annoyed = { - custom_tooltip = mpo_paiza_abuse_counter_effect.annoyed - random_list = { - 40 = { - modifier = { - add = mpo_paiza_abuse_khan_reaction_value - } - custom_tooltip = mpo_paiza_abuse_counter_effect.khan_reaction_action - trigger_event = { - id = mpo_decisions_events.0111 - days = { 21 37 } - } - } - 40 = { - custom_tooltip = mpo_paiza_abuse_counter_effect.khan_reaction_angry - modifier = { - add = { - value = mpo_paiza_abuse_khan_reaction_value - divide = 2 - } - } - set_variable = { - name = paiza_abuse_stance - value = flag:angry - } - } - 20 = { - custom_tooltip = mpo_paiza_abuse_counter_effect.khan_reaction_annoyed - } - } - } - flag:indifferent = { - custom_tooltip = mpo_paiza_abuse_counter_effect.indifferent - random_list = { - 20 = { - custom_tooltip = mpo_paiza_abuse_counter_effect.annoyed - modifier = { - add = { - value = mpo_paiza_abuse_khan_reaction_value - divide = 2 - } - } - set_variable = { - name = paiza_abuse_stance - value = flag:annoyed - } - } - 80 = { - custom_tooltip = mpo_paiza_abuse_counter_effect.indifferent - } - } - } - } - } - } - trigger_event = { - id = mpo_decisions_events.0098 - days = { 4 8 } - } -} - -mpo_decisions_events_friend_fail_effect = { - random_list = { - 4 = { - trigger = { - scope:friendship_target = { - is_ai = yes - } - OR = { - any_child = { - NOR = { - this = scope:friendship_target - this = scope:heir - has_relation_friend = scope:friendship_target - has_relation_best_friend = scope:friendship_target - has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:friendship_target } - is_at_war_with = scope:friendship_target - } - is_imprisoned = no - is_incapable = no - is_courtier_of = root - age >= 6 - } - any_sibling = { - NOR = { - this = scope:friendship_target - this = scope:heir - has_relation_friend = scope:friendship_target - has_relation_best_friend = scope:friendship_target - has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:friendship_target } - is_at_war_with = scope:friendship_target - } - is_imprisoned = no - is_incapable = no - is_courtier_of = root - age >= 6 - } - } - } - random_child = { - limit = { - NOR = { - this = scope:friendship_target - this = scope:heir - has_relation_friend = scope:friendship_target - has_relation_best_friend = scope:friendship_target - has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:friendship_target } - is_at_war_with = scope:friendship_target - } - is_imprisoned = no - is_incapable = no - is_courtier_of = root - age >= 6 - } - save_scope_as = accidental_friend - } - if = { - limit = { - NOT = { - exists = scope:accidental_friend - } - } - random_sibling = { - limit = { - NOR = { - this = scope:friendship_target - this = scope:heir - has_relation_friend = scope:friendship_target - has_relation_best_friend = scope:friendship_target - has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:friendship_target } - is_at_war_with = scope:friendship_target - } - is_imprisoned = no - is_incapable = no - is_courtier_of = root - age >= 6 - } - save_scope_as = accidental_friend - } - } - scope:friendship_target = { - set_relation_friend = { - target = root - reason = friend_accidental_introduction - } - } - } - 2 = { - trigger = { - scope:friendship_target = { - is_ai = yes - } - scope:friendship_target = { - NOR = { - has_relation_friend = scope:friendship_target - has_relation_best_friend = scope:friendship_target - has_any_bad_relationship_with_character_trigger = { CHARACTER = root } - } - } - } - scope:friendship_target = { - set_relation_friend = { - target = root - reason = friend_accidental_introduction - } - } - } - 1 = { - scope:friendship_target = { - add_opinion = { - modifier = charmed_opinion - target = root - opinion = 30 - } - } - } - 2 = { - trigger = { - culture = { - NOT = { - this = scope:friendship_target.culture - } - cultural_acceptance = { - target = scope:friendship_target.culture - value < 100 - } - } - } - culture = { - change_cultural_acceptance = { - target = scope:friendship_target.culture - value = minor_cultural_acceptance_gain - desc = cultural_acceptance_friendly_visit - } - } - if = { - limit = { - scope:heir.culture = { - NOR = { - this = scope:friendship_target.culture - this = root.culture - } - cultural_acceptance = { - target = scope:friendship_target.culture - value < 100 - } - } - } - scope:heir.culture = { - change_cultural_acceptance = { - target = scope:friendship_target.culture - value = minor_cultural_acceptance_gain - desc = cultural_acceptance_friendly_visit - } - } - } - } - 1 = { - trigger = { - scope:friendship_target = { - is_ai = yes - } - scope:friendship_target = { - short_term_gold >= minor_gold_value - - } - } - scope:friendship_target = { - pay_short_term_gold = { - target = scope:heir - gold = minor_gold_value - } - } - scope:heir = { - add_opinion = { - target = scope:friendship_target - modifier = gift_opinion - opinion = 25 - } - } - } - 1 = { - trigger = { - scope:friendship_target = { - is_ai = yes - government_has_flag = government_is_nomadic - exists = domicile - domicile.herd >= domicile.minor_herd_value - } - government_has_flag = government_is_nomadic - } - pay_herd = { - target = root - value = domicile.minor_herd_value - } - add_opinion = { - target = scope:friendship_target - modifier = gift_opinion - opinion = 25 - } - } - 1 = { - trigger = { - scope:friendship_target = { - has_lifestyle = diplomacy_lifestyle - } - } - scope:heir = { - add_diplomacy_skill = 1 - add_diplomacy_lifestyle_xp = minor_lifestyle_xp - } - } - 1 = { - trigger = { - scope:friendship_target = { - has_lifestyle = martial_lifestyle - } - } - scope:heir = { - add_martial_skill = 1 - add_martial_lifestyle_xp = minor_lifestyle_xp - } - } - 1 = { - trigger = { - scope:friendship_target = { - has_lifestyle = stewardship_lifestyle - } - } - scope:heir = { - add_stewardship_skill = 1 - add_stewardship_lifestyle_xp = minor_lifestyle_xp - } - } - 1 = { - trigger = { - scope:friendship_target = { - has_lifestyle = intrigue_lifestyle - } - } - scope:heir = { - add_intrigue_skill = 1 - add_intrigue_lifestyle_xp = minor_lifestyle_xp - } - } - 1 = { - trigger = { - scope:friendship_target = { - has_lifestyle = learning_lifestyle - } - } - scope:heir = { - add_learning_skill = 1 - add_learning_lifestyle_xp = minor_lifestyle_xp - } - } - 1 = { - trigger = { - OR = { - stress > 0 - scope:heir = { - stress > 0 - } - } - } - add_stress = minor_stress_impact_loss - scope:heir = { - add_stress = medium_stress_impact_loss - } - } - } -} - -mpo_heir_lifestyle_xp_gain_effect = { - if = { - limit = { - scope:lifestyle_trait = { - OR = { - this = trait:lifestyle_physician - this = trait:lifestyle_mystic - this = trait:lifestyle_blademaster - this = trait:lifestyle_reveler - } - } - } - scope:heir = { - add_trait_xp = { - trait = scope:lifestyle_trait - value = 30 - } - } - } - else_if = { - limit = { - scope:lifestyle_trait = { - this = trait:lifestyle_hunter - } - } - scope:heir = { - add_trait_xp = { - trait = lifestyle_hunter - track = hunter - value = 15 - } - } - scope:heir = { - add_trait_xp = { - trait = lifestyle_hunter - track = falconer - value = 15 - } - } - } - else_if = { - limit = { - scope:lifestyle_trait = { - this = trait:lifestyle_traveler - } - } - scope:heir = { - add_trait_xp = { - trait = lifestyle_traveler - track = travel - value = 15 - } - } - scope:heir = { - add_trait_xp = { - trait = lifestyle_traveler - track = danger - value = 15 - } - } - } - else_if = { - limit = { - scope:lifestyle_trait = { - this = trait:lifestyle_herbalist - } - scope:heir = { - NOT = { - has_trait = lifestyle_physician - } - } - } - scope:heir = { - add_trait = lifestyle_physician - } - } - else_if = { - limit = { - scope:lifestyle_trait = { - this = trait:lifestyle_herbalist - } - scope:heir = { - has_trait = lifestyle_physician - } - } - scope:heir = { - add_trait_xp = { - trait = lifestyle_physician - value = 30 - } - } - } - else_if = { - limit = { - scope:lifestyle_trait = { - this = trait:lifestyle_poet - } - } - scope:heir = { - add_diplomacy_skill = 1 - add_diplomacy_lifestyle_xp = medium_lifestyle_xp - } - } - else_if = { - limit = { - scope:lifestyle_trait = { - this = trait:lifestyle_gardener - } - scope:heir = { - NOT = { - has_trait = lifestyle_herbalist - } - } - } - scope:heir = { - add_trait = lifestyle_herbalist - } - } - else_if = { - limit = { - scope:lifestyle_trait = { - this = trait:lifestyle_gardener - } - scope:heir = { - has_trait = lifestyle_herbalist - } - } - scope:heir = { - add_stewardship_skill = 1 - add_diplomacy_lifestyle_xp = medium_lifestyle_xp - } - } - else_if = { - limit = { - scope:lifestyle_trait = { - this = trait:drunkard - } - scope:heir = { - has_trait = lifestyle_reveler - } - } - scope:heir = { - add_trait = lifestyle_reveler - } - } - else_if = { - limit = { - scope:lifestyle_trait = { - this = trait:drunkard - } - scope:heir = { - has_trait = lifestyle_reveler - } - } - scope:heir = { - add_trait_xp = { - trait = lifestyle_reveler - value = 30 - } - } - } - else_if = { - limit = { - scope:lifestyle_trait = { - this = trait:hashishiyah - } - scope:heir = { - NOT = { - has_trait = lifestyle_herbalist - } - } - } - scope:heir = { - add_trait = lifestyle_herbalist - } - } - else_if = { - limit = { - scope:lifestyle_trait = { - this = trait:hashishiyah - } - scope:heir = { - has_trait = lifestyle_reveler - } - } - scope:heir = { - add_trait = lifestyle_reveler - } - } - else_if = { - limit = { - scope:lifestyle_trait = { - this = trait:hashishiyah - } - scope:heir = { - has_trait = lifestyle_reveler - } - } - scope:heir = { - add_trait_xp = { - trait = lifestyle_reveler - value = 30 - } - } - } -} - -mpo_heir_hastiluder_xp_gain_effect = { - random_list = { - 1 = { - trigger = { - scope:friendship_target = { - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 50 - } - } - scope:heir = { - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 50 - } - } - } - scope:heir = { - add_trait_xp = { - trait = tourney_participant - track = foot - value = 35 - } - } - } - 1 = { - trigger = { - scope:friendship_target = { - has_trait_xp = { - trait = tourney_participant - track = horse - value >= 50 - } - } - scope:heir = { - has_trait_xp = { - trait = tourney_participant - track = horse - value >= 50 - } - } - } - scope:heir = { - add_trait_xp = { - trait = tourney_participant - track = horse - value = 35 - } - } - } - 1 = { - trigger = { - scope:friendship_target = { - has_trait_xp = { - trait = tourney_participant - track = bow - value >= 50 - } - } - scope:heir = { - has_trait_xp = { - trait = tourney_participant - track = bow - value >= 50 - } - } - } - scope:heir = { - add_trait_xp = { - trait = tourney_participant - track = bow - value = 35 - } - } - } - 1 = { - trigger = { - scope:friendship_target = { - has_trait_xp = { - trait = tourney_participant - track = wit - value >= 50 - } - } - scope:heir = { - has_trait_xp = { - trait = tourney_participant - track = wit - value >= 50 - } - } - } - scope:heir = { - add_trait_xp = { - trait = tourney_participant - track = wit - value = 35 - } - } - } - } -} - -mpo_target_lifestyle_xp_gain_effect = { - if = { - limit = { - scope:lifestyle_trait = { - OR = { - this = trait:lifestyle_physician - this = trait:lifestyle_mystic - this = trait:lifestyle_blademaster - this = trait:lifestyle_reveler - } - } - } - scope:friendship_target = { - add_trait_xp = { - trait = scope:lifestyle_trait - value = 20 - } - } - } - else_if = { - limit = { - scope:lifestyle_trait = { - this = trait:lifestyle_hunter - } - } - scope:friendship_target = { - add_trait_xp = { - trait = lifestyle_hunter - track = hunter - value = 10 - } - } - scope:friendship_target = { - add_trait_xp = { - trait = lifestyle_hunter - track = falconer - value = 10 - } - } - } - else_if = { - limit = { - scope:lifestyle_trait = { - this = trait:lifestyle_traveler - } - } - scope:friendship_target = { - add_trait_xp = { - trait = lifestyle_traveler - track = travel - value = 10 - } - } - scope:friendship_target = { - add_trait_xp = { - trait = lifestyle_traveler - track = danger - value = 10 - } - } - } - else_if = { - limit = { - scope:lifestyle_trait = { - this = trait:lifestyle_herbalist - } - scope:heir = { - has_trait = lifestyle_physician - } - } - scope:friendship_target = { - add_trait_xp = { - trait = lifestyle_physician - value = 20 - } - } - } - else_if = { - limit = { - scope:lifestyle_trait = { - this = trait:lifestyle_poet - } - } - scope:friendship_target = { - add_diplomacy_lifestyle_xp = medium_lifestyle_xp - } - } - else_if = { - limit = { - scope:lifestyle_trait = { - this = trait:lifestyle_gardener - } - scope:heir = { - has_trait = lifestyle_herbalist - } - } - scope:friendship_target = { - add_diplomacy_lifestyle_xp = medium_lifestyle_xp - } - } - else_if = { - limit = { - scope:lifestyle_trait = { - this = trait:drunkard - } - scope:heir = { - has_trait = lifestyle_reveler - } - } - scope:friendship_target = { - add_trait_xp = { - trait = lifestyle_reveler - value = 20 - } - } - } - else_if = { - limit = { - scope:lifestyle_trait = { - this = trait:hashishiyah - } - scope:heir = { - has_trait = lifestyle_reveler - } - } - scope:friendship_target = { - add_trait_xp = { - trait = lifestyle_reveler - value = 20 - } - } - } - else = { - scope:friendship_target = { - add_stress = medium_stress_loss - } - } -} - -mpo_target_hastiluder_xp_gain_effect = { - random_list = { - 1 = { - trigger = { - scope:friendship_target = { - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 50 - } - } - scope:heir = { - has_trait_xp = { - trait = tourney_participant - track = foot - value >= 50 - } - } - } - scope:friendship_target = { - add_trait_xp = { - trait = tourney_participant - track = foot - value = 20 - } - } - } - 1 = { - trigger = { - scope:friendship_target = { - has_trait_xp = { - trait = tourney_participant - track = horse - value >= 50 - } - } - scope:heir = { - has_trait_xp = { - trait = tourney_participant - track = horse - value >= 50 - } - } - } - scope:friendship_target = { - add_trait_xp = { - trait = tourney_participant - track = horse - value = 20 - } - } - } - 1 = { - trigger = { - scope:friendship_target = { - has_trait_xp = { - trait = tourney_participant - track = bow - value >= 50 - } - } - scope:heir = { - has_trait_xp = { - trait = tourney_participant - track = bow - value >= 50 - } - } - } - scope:friendship_target = { - add_trait_xp = { - trait = tourney_participant - track = bow - value = 20 - } - } - } - 1 = { - trigger = { - scope:friendship_target = { - has_trait_xp = { - trait = tourney_participant - track = wit - value >= 50 - } - } - scope:heir = { - has_trait_xp = { - trait = tourney_participant - track = wit - value >= 50 - } - } - } - scope:friendship_target = { - add_trait_xp = { - trait = tourney_participant - track = wit - value = 20 - } - } - } - } -} - -nomad_domicile_refund_effect = { - #Domicile buildings give cash refund - if = { - limit = { - has_domicile = yes - } - save_scope_as = former_nomad - custom_tooltip = nomad_domicile_buildings_converted - hidden_effect = { - add_gold = { - value = { - value = medium_gold_value - switch = { - trigger = domicile.num_domicile_buildings - 7 = { multiply = 7 } - 6 = { multiply = 6 } - 5 = { multiply = 5 } - 4 = { multiply = 4 } - 3 = { multiply = 3 } - 2 = { multiply = 2 } - } - } - } - } - } -} - -nomad_convert_people_to_tribe_effect = { - change_government = tribal_government - - #Winning a cool war to get this government should mean high authority - if = { - limit = { - exists = scope:overrunner - this = scope:overrunner - } - add_realm_law = tribal_authority_2 - } -} - -nomad_convert_people_to_clan_effect = { - change_government = clan_government - - #Start off crown authorities. - if = { - limit = { - NOT = { has_realm_law = crown_authority_1 } - } - add_realm_law_skip_effects = crown_authority_1 - } -} - -nomad_convert_people_to_feudal_effect = { - change_government = feudal_government - - #Start off crown authorities. - if = { - limit = { - NOT = { has_realm_law = crown_authority_1 } - } - add_realm_law_skip_effects = crown_authority_1 - } -} - -mpo_overrunning_vassal_title_distribution_effect = { - every_held_title = { - limit = { - tier = tier_county - any_this_title_or_de_jure_above = { - tier = tier_duchy - NOT = { - this = scope:new_capital_duchy - } - } - } - add_to_list = overrun_counties - } - scope:target = { - every_direct_de_jure_vassal_title = { - limit = { - tier = tier_duchy - NOT = { - this = scope:new_capital_duchy - } - any_de_jure_county = { - count >= 2 - holder = scope:attacker - } - OR = { - NOT = { exists = holder } - holder.top_liege = scope:defender - holder.top_liege = scope:attacker - } - } - add_to_list = overrun_duchies - } - } - #Distribute all counties - while = { - limit = { - any_in_list = { - list = overrun_counties - holder = scope:attacker - } - any_in_list = { - list = potential_overrunning_vassals - NOT = { - has_character_flag = got_overrun_title - } - } - } - #Is a duchy available? - if = { - limit = { - any_in_list = { - list = overrun_duchies - any_de_jure_county = { - holder = scope:attacker - } - } - } - #Grant biggest duchy available - if = { - limit = { - any_in_list = { - list = overrun_duchies - #Forgive me for how stupid this is - any_de_jure_county = { - count >= 5 - holder = scope:attacker - } - } - } - random_in_list = { - list = overrun_duchies - limit = { - any_de_jure_county = { - count >= 5 - holder = scope:attacker - } - } - save_scope_as = duchy_to_grant - } - } - else_if = { - limit = { - any_in_list = { - list = overrun_duchies - #Forgive me for how stupid this is - any_de_jure_county = { - count >= 4 - holder = scope:attacker - } - } - } - random_in_list = { - list = overrun_duchies - limit = { - any_de_jure_county = { - count >= 4 - holder = scope:attacker - } - } - save_scope_as = duchy_to_grant - } - } - else_if = { - limit = { - any_in_list = { - list = overrun_duchies - #Forgive me for how stupid this is - any_de_jure_county = { - count >= 3 - holder = scope:attacker - } - } - } - random_in_list = { - list = overrun_duchies - limit = { - any_de_jure_county = { - count >= 3 - holder = scope:attacker - } - } - save_scope_as = duchy_to_grant - } - } - else = { - random_in_list = { - list = overrun_duchies - save_scope_as = duchy_to_grant - } - } - #Choose best county - scope:duchy_to_grant = { - if = { - limit = { - title_capital_county = { - holder = scope:attacker - } - } - title_capital_county = { - save_scope_as = title_to_grant - } - } - else = { - ordered_de_jure_county = { - order_by = development_level - limit = { - holder = scope:attacker - } - save_scope_as = title_to_grant - } - } - } - } - #Counts - else = { - ordered_in_list = { - order_by = development_level - list = overrun_counties - save_scope_as = title_to_grant - } - } - #Choose a vassal - ordered_in_list = { - list = potential_overrunning_vassals - limit = { - NOT = { - has_character_flag = got_overrun_title - } - } - order_by = max_military_strength - save_scope_as = title_gainer - #Add character flag - they should be done - add_character_flag = got_overrun_title - - #tributaries go - hidden_effect = { - every_tributary = { - custom = custom.every_tributary - end_tributary = yes - } - } - - #Give up nomadic titles - if = { - limit = { - NOT = { - scope:title_to_grant = { - any_county_province = { - OR = { - has_holding_type = nomad_holding - has_holding_type = herder_holding - } - } - } - } - } - mpo_overrunning_ending_nomadism_effect = yes - } - #Nomads should still move - else = { - hidden_effect = { - give_domain_to_herders = yes - } - } - } - scope:title_gainer = { - create_title_and_vassal_change = { - type = granted - save_scope_as = title_change - } - scope:title_to_grant = { - change_title_holder = { - holder = scope:title_gainer - change = scope:title_change - } - } - resolve_title_and_vassal_change = scope:title_change - #Add duchy if they're getting one - if = { - limit = { - exists = scope:duchy_to_grant - } - create_title_and_vassal_change = { - type = granted - save_scope_as = title_change - } - scope:duchy_to_grant = { - change_title_holder = { - holder = scope:title_gainer - change = scope:title_change - } - } - resolve_title_and_vassal_change = scope:title_change - } - #If they got a duchy, can bring over an existing vassal as a vassal - if = { - limit = { - exists = scope:duchy_to_grant - scope:duchy_to_grant = { - any_de_jure_county = { - holder = scope:attacker - is_in_list = overrun_counties - } - } - any_vassal = { - highest_held_title_tier >= tier_county - NOT = { - any_held_title = { - kingdom = scope:target - } - } - mpo_overrunning_willing_vassal_trigger = yes - } - } - scope:duchy_to_grant = { - random_de_jure_county = { - limit = { - holder = scope:attacker - is_in_list = overrun_counties - } - save_scope_as = undervassal_county - } - } - ordered_vassal = { - order_by = max_military_strength - limit = { - highest_held_title_tier >= tier_county - NOT = { - any_held_title = { - kingdom = scope:target - } - } - mpo_overrunning_willing_vassal_trigger = yes - } - save_scope_as = undervassal - - #Give up nomadic titles - if = { - limit = { - NOT = { - scope:undervassal_county = { - any_county_province = { - OR = { - has_holding_type = nomad_holding - has_holding_type = herder_holding - } - } - } - } - } - mpo_overrunning_ending_nomadism_effect = yes - } - #Nomads should still move - else = { - hidden_effect = { - give_domain_to_herders = yes - } - } - #Change government to match attacker - scope:undervassal = { - if = { - limit = { - scope:title_to_grant = { - any_county_province = { - OR = { - has_holding_type = nomad_holding - has_holding_type = herder_holding - } - } - } - } - #Do nothing, they're still nomadic - } - else_if = { - limit = { - scope:undervassal_county = { - any_county_province = { - has_holding_type = tribal_holding - } - } - } - nomad_convert_people_to_tribe_effect = yes - } - else_if = { - limit = { - scope:undervassal = { - OR = { - #Personal reasons to go clan - faith.religion = religion:islam_religion - culture ?= { - OR = { - has_cultural_pillar = heritage_arabic - has_cultural_pillar = heritage_iranian - } - } - #county and liege are clan - AND = { - scope:title_to_grant = { - OR = { - faith.religion = religion:islam_religion - culture = { - OR = { - has_cultural_pillar = heritage_arabic - has_cultural_pillar = heritage_iranian - } - } - } - } - scope:attacker = { - government_has_flag = government_is_clan - } - } - } - } - } - nomad_convert_people_to_clan_effect = yes - } - else = { - nomad_convert_people_to_feudal_effect = yes - } - } - #Have to re-add them as a vassal probably - create_title_and_vassal_change = { - type = granted - save_scope_as = change - add_claim_on_loss = no - } - change_liege = { - liege = scope:undervassal_county.duchy.holder - change = scope:change - } - resolve_title_and_vassal_change = scope:change - - #Give them their county - create_title_and_vassal_change = { - type = granted - save_scope_as = title_change_2 - } - scope:title_to_grant = { - change_title_holder = { - holder = scope:undervassal - change = scope:title_change_2 - } - } - resolve_title_and_vassal_change = scope:title_change_2 - } - } - } - #Change government - scope:attacker = { - if = { - limit = { - scope:title_to_grant = { - any_county_province = { - OR = { - has_holding_type = nomad_holding - has_holding_type = herder_holding - } - } - } - } - #Do nothing, they're still nomadic - } - else_if = { - limit = { - scope:title_to_grant = { - any_county_province = { - has_holding_type = tribal_holding - } - } - } - scope:title_gainer = { - nomad_convert_people_to_tribe_effect = yes - } - } - else_if = { - limit = { - scope:title_gainer = { - OR = { - #Personal reasons to go clan - faith.religion = religion:islam_religion - culture = { - OR = { - has_cultural_pillar = heritage_arabic - has_cultural_pillar = heritage_iranian - } - } - #county and liege are clan - AND = { - scope:title_to_grant = { - OR = { - faith.religion = religion:islam_religion - culture = { - OR = { - has_cultural_pillar = heritage_arabic - has_cultural_pillar = heritage_iranian - } - } - } - } - scope:attacker = { - government_has_flag = government_is_clan - } - } - } - } - } - scope:title_gainer = { - nomad_convert_people_to_clan_effect = yes - } - } - else = { - scope:title_gainer = { - nomad_convert_people_to_feudal_effect = yes - } - } - } - - #Have to re-add them as a vassal probably - scope:title_gainer = { - if = { - limit = { - NOT = { - liege = scope:attacker - } - } - create_title_and_vassal_change = { - type = granted - save_scope_as = change - add_claim_on_loss = no - } - change_liege = { - liege = scope:attacker - change = scope:change - } - resolve_title_and_vassal_change = scope:change - } - } - - #Remove chosen titles from list - scope:duchy_to_grant ?= { - remove_from_list = overrun_duchies - } - scope:title_to_grant = { - remove_from_list = overrun_counties - } - scope:undervassal_county ?= { - remove_from_list = overrun_counties - } - if = { - limit = { - exists = scope:duchy_to_grant - } - clear_saved_scope = duchy_to_grant - } - } - #ASSIGN VASSALS TO DUKES - every_vassal = { - limit = { - highest_held_title_tier = tier_county - primary_title = { - kingdom = scope:target - any_this_title_or_de_jure_above = { - tier = tier_duchy - exists = holder - NOT = { - holder = scope:attacker - } - holder.top_liege = scope:attacker - } - } - } - #Have to re-add them as a vassal probably - create_title_and_vassal_change = { - type = granted - save_scope_as = change - add_claim_on_loss = no - } - change_liege = { - liege = primary_title.duchy.holder - change = scope:change - } - resolve_title_and_vassal_change = scope:change - } - - #GIVE DUKES THE REST OF THEIR COUNTIES FROM ATTACKER - every_held_title = { - limit = { - tier = tier_county - kingdom = scope:target - any_this_title_or_de_jure_above = { - tier = tier_duchy - exists = holder - NOT = { - holder = scope:attacker - } - holder = { - is_vassal_or_below_of = scope:attacker - } - } - } - scope:attacker = { - create_title_and_vassal_change = { - type = granted - save_scope_as = title_change - } - } - change_title_holder = { - holder = duchy.holder - change = scope:title_change - } - scope:attacker = { - resolve_title_and_vassal_change = scope:title_change - } - } - #Get rid of this now-useless flag - every_vassal = { - limit = { - has_character_flag = got_overrun_title - } - remove_character_flag = got_overrun_title - } -} - -mpo_overrunning_ending_nomadism_effect = { - #Wrap up being a nomad - nomad_domicile_refund_effect = yes - nomad_convert_herds_to_gold_special_troops_effect = yes - hidden_effect = { - give_domain_to_herders = yes - } -} - -nomad_convert_herds_to_gold_special_troops_effect = { - save_scope_as = former_nomad - custom_tooltip = gold_army_for_herd_tt - hidden_effect = { - if = { - limit = { - domicile.herd >= 50 - } - save_scope_as = army_getter - add_gold = { - value = domicile.herd - multiply = 0.3 - min = 100 - max = 10000 - } - spawn_army = { - levies = 200 - men_at_arms = { - type = horse_archers - men = { value = domicile.herd multiply = 0.02 min = 100 max = 10000 } - } - men_at_arms = { - type = steppe_raiders - men = { value = domicile.herd multiply = 0.01 min = 100 max = 10000 } - } - men_at_arms = { - type = nomad_lancers - men = { value = domicile.herd multiply = 0.01 min = 100 max = 10000 } - } - men_at_arms = { - type = nomadic_riders - men = { value = domicile.herd multiply = 0.1 min = 100 max = 10000 } - } - location = capital_province - inheritable = yes - uses_supply = yes - name = former_nomad_army_name - } - } - } -} - -set_throatsinging_style_effect = { - random_list = { - 10 = { - modifier = { - add = 10 - is_female = yes - } - set_variable = { - name = throatsinging_style - value = flag:sygyt - } - } - 10 = { - set_variable = { - name = throatsinging_style - value = flag:hoomei - } - } - 10 = { - set_variable = { - name = throatsinging_style - value = flag:kargyraa - } - } - } - set_variable = { - name = throatsinging_practice - value = 1 - } -} - -mpo_dominance_scaled_minor_gold_gain = { - if = { - limit = { - OR = { - has_realm_law = nomadic_authority_4 - has_realm_law = nomadic_authority_5 - } - } - add_gold = massive_gold_value - } - if = { - limit = { - has_realm_law = nomadic_authority_3 - } - add_gold = major_gold_value - } - if = { - limit = { - has_realm_law = nomadic_authority_2 - } - add_gold = medium_gold_value - } - if = { - limit = { - has_realm_law = nomadic_authority_1 - } - add_gold = minor_gold_value - } -} - -mpo_decisions_events_0500_effect = { - custom_tooltip = { - text = mpo_decisions_events_0500_effect_vassal_tt - every_vassal = { - limit = { - NOT = { - is_obedient_to = root - } - } - add_opinion = { - target = root - modifier = obedience_opinion - } - } - } - custom_tooltip = { - text = mpo_decisions_events_0500_effect_courtier_tt - every_courtier = { - limit = { - NOR = { - is_obedient_to = root - has_obedience_reason = root - } - } - add_opinion = { - target = root - modifier = obedience_opinion - } - } - } - custom_tooltip = { - text = mpo_desperate_stance_invasion_cb_enable_var_tt - set_variable = mpo_desperate_stance_invasion_cb_enable_var - } -} - -mpo_dominance_scaled_miniscule_gold_gain = { - if = { - limit = { - OR = { - has_realm_law = nomadic_authority_4 - has_realm_law = nomadic_authority_5 - } - } - add_gold = major_gold_value - } - if = { - limit = { - has_realm_law = nomadic_authority_3 - } - add_gold = medium_gold_value - } - if = { - limit = { - has_realm_law = nomadic_authority_2 - } - add_gold = minor_gold_value - } - if = { - limit = { - has_realm_law = nomadic_authority_1 - } - add_gold = miniscule_gold_value - } -} - -mpo_save_potential_blood_brother_war_allies_effect = { - scope:war = { - if = { - limit = { - any_war_attacker = { - count >= 2 - mpo_valid_for_blood_brotherhood_trigger = yes - } - } - #Lord forgive me for this script - every_war_attacker = { - limit = { - mpo_valid_for_blood_brotherhood_trigger = yes - } - add_to_list = attacker_war_allies_list - - } - while = { - limit = { - any_war_attacker = { - is_in_list = attacker_war_allies_list - } - } - random_war_attacker = { - limit = { - is_in_list = attacker_war_allies_list - } - save_scope_as = current_ally - } - every_war_attacker = { - limit = { - mpo_valid_for_blood_brotherhood_trigger = yes - NOT = { - this = scope:current_ally - } - } - add_to_variable_list = { - name = former_war_allies - target = scope:current_ally - years = 10 - } - } - scope:current_ally = { - remove_from_list = attacker_war_allies_list - } - clear_saved_scope = current_ally - } - } - if = { - limit = { - any_war_defender = { - count >= 2 - mpo_valid_for_blood_brotherhood_trigger = yes - } - } - every_war_defender = { - limit = { - mpo_valid_for_blood_brotherhood_trigger = yes - } - add_to_list = defender_war_allies_list - } - while = { - limit = { - any_war_defender = { - is_in_list = defender_war_allies_list - } - } - random_war_defender = { - limit = { - is_in_list = defender_war_allies_list - } - save_scope_as = current_ally - } - every_war_defender = { - limit = { - mpo_valid_for_blood_brotherhood_trigger = yes - NOT = { - this = scope:current_ally - } - } - add_to_variable_list = { - name = former_war_allies - target = scope:current_ally - years = 10 - } - } - scope:current_ally = { - remove_from_list = defender_war_allies_list - } - clear_saved_scope = current_ally - } - } - } -} - -mpo_blood_brother_new_family_member_opinion_effect = { - hidden_effect = { - #Add blood brother close family opinion to actor's family - save_scope_as = new_kin - scope:other_blood_brother = { - add_to_list = other_blood_brother_family - add_character_flag = unhandled_family - every_child = { - add_to_list = other_blood_brother_family - add_character_flag = unhandled_family - } - primary_spouse ?= { - add_to_list = other_blood_brother_family - add_character_flag = unhandled_family - } - } - #Save other family on new kin - while = { - limit = { - any_in_list = { - list = other_blood_brother_family - has_character_flag = unhandled_family - } - } - random_in_list = { - list = other_blood_brother_family - limit = { - has_character_flag = unhandled_family - } - save_scope_as = other_blood_brother_picked_family - remove_character_flag = unhandled_family - } - scope:other_blood_brother_picked_family = { - add_opinion = { - target = scope:new_kin - modifier = blood_brother_close_family_opinion - } - reverse_add_opinion = { - target = scope:new_kin - modifier = blood_brother_close_family_opinion - } - } - clear_saved_scope = other_blood_brother_picked_family - } - } -} - -mpo_blood_brother_remove_family_opinion_effect = { - hidden_effect = { - #Add blood brother close family opinion to actor's family - save_scope_as = former_kin - scope:other_blood_brother = { - add_to_list = other_blood_brother_family - add_character_flag = unhandled_family - every_child = { - add_to_list = other_blood_brother_family - add_character_flag = unhandled_family - } - primary_spouse ?= { - add_to_list = other_blood_brother_family - add_character_flag = unhandled_family - } - } - #Remove other family on former kin - while = { - limit = { - any_in_list = { - list = other_blood_brother_family - has_character_flag = unhandled_family - } - } - random_in_list = { - list = other_blood_brother_family - limit = { - has_character_flag = unhandled_family - } - save_scope_as = other_blood_brother_picked_family - remove_character_flag = unhandled_family - } - scope:other_blood_brother_picked_family = { - remove_opinion = { - target = scope:former_kin - modifier = blood_brother_close_family_opinion - } - scope:former_kin = { - remove_opinion = { - target = scope:other_blood_brother_picked_family - modifier = blood_brother_close_family_opinion - } - } - } - clear_saved_scope = other_blood_brother_picked_family - } - } -} - -mpo_blood_brother_tooltip_actor_effect = { - show_as_tooltip = { - set_relation_blood_brother = scope:recipient - } - custom_tooltip = blood_brother_alliance_actor_alliance_past_tt - custom_tooltip = blood_brother_actor_gains_hook_past_tt - custom_tooltip = blood_brother_actor_recipient_hook_past_tt -} -mpo_blood_brother_tooltip_recipient_effect = { - show_as_tooltip = { set_relation_blood_brother = scope:actor } - custom_tooltip = blood_brother_alliance_recipient_alliance_past_tt - custom_tooltip = blood_brother_recipient_gains_hook_past_tt - custom_tooltip = blood_brother_recipient_actor_hook_past_tt -} -make_blood_brother_save_common_enemy_effect = { - save_temporary_scope_as = blood_brother_temp - #DUKES OR HIGHER - #Nemeses and rivals - if = { - limit = { - any_relation = { - type = nemesis - mpo_blood_brother_common_enemy_sub_trigger = yes - mpo_ideal_common_foe_trigger = yes - } - } - ordered_relation = { - order_by = max_military_strength - type = nemesis - limit = { - mpo_blood_brother_common_enemy_sub_trigger = yes - mpo_ideal_common_foe_trigger = yes - } - save_scope_as = shared_foe - } - } - else_if = { - limit = { - any_relation = { - type = rival - mpo_blood_brother_common_enemy_sub_trigger = yes - mpo_ideal_common_foe_trigger = yes - } - } - ordered_relation = { - order_by = max_military_strength - type = rival - limit = { - mpo_blood_brother_common_enemy_sub_trigger = yes - mpo_ideal_common_foe_trigger = yes - } - save_scope_as = shared_foe - } - } - #You have a house feud against someone recipient is also opposed to - else_if = { - limit = { - exists = house.house_head - exists = scope:recipient.house - NOT = { - house = scope:recipient.house - } - house = { - any_house_relation = { - has_house_relation_level = feud - any_relation_house = { - house_head = { - mpo_blood_brother_common_enemy_sub_trigger = yes - mpo_ideal_common_foe_trigger = yes - } - } - } - } - } - house = { - random_house_relation = { - limit = { - has_house_relation_level = feud - any_relation_house = { - house_head = { - mpo_blood_brother_common_enemy_sub_trigger = yes - mpo_ideal_common_foe_trigger = yes - } - } - } - random_relation_house = { - limit = { - house_head = { - mpo_blood_brother_common_enemy_sub_trigger = yes - mpo_ideal_common_foe_trigger = yes - } - } - house_head = { save_scope_as = shared_foe } - } - } - } - } - #In faction against someone recipient is opposed to - else_if = { - limit = { - liege ?= { - any_targeting_faction = { - any_faction_member = { - this = scope:actor - } - } - mpo_blood_brother_common_enemy_sub_trigger = yes - mpo_ideal_common_foe_trigger = yes - } - } - liege = { - save_scope_as = shared_foe - } - } - #You are at war with someone that recipient is also opposed to - else_if = { - limit = { - any_war_enemy = { - NOT = { has_variable = rebel_leader_peasants } - any_character_war = { - is_war_leader = prev - is_war_leader = scope:actor - } - mpo_blood_brother_common_enemy_sub_trigger = yes - mpo_ideal_common_foe_trigger = yes - } - } - ordered_war_enemy = { - order_by = max_military_strength - limit = { - NOT = { has_variable = rebel_leader_peasants } - any_character_war = { - is_war_leader = prev - is_war_leader = scope:actor - } - mpo_blood_brother_common_enemy_sub_trigger = yes - mpo_ideal_common_foe_trigger = yes - } - save_scope_as = shared_foe - } - } - #You have a faction member that recipient is also opposed to - else_if = { - limit = { - any_targeting_faction = { - any_faction_member = { - mpo_blood_brother_common_enemy_sub_trigger = yes - mpo_ideal_common_foe_trigger = yes - } - } - } - random_targeting_faction = { - ordered_faction_member = { - order_by = max_military_strength - limit = { - mpo_blood_brother_common_enemy_sub_trigger = yes - mpo_ideal_common_foe_trigger = yes - } - save_scope_as = shared_foe - } - } - } - #You are a title claimant against someone recipient don't like - else_if = { - limit = { - any_claim = { - exists = holder - NOT = { - scope:recipient = { has_claim_on = prev } - } - holder = { - mpo_blood_brother_common_enemy_sub_trigger = yes - mpo_ideal_common_foe_trigger = yes - } - } - } - ordered_claim = { - order_by = tier - limit = { - exists = holder - NOT = { - scope:recipient = { has_claim_on = prev } - } - holder = { - mpo_blood_brother_common_enemy_sub_trigger = yes - mpo_ideal_common_foe_trigger = yes - } - } - holder = { - save_scope_as = shared_foe - } - } - } - #You have a title claimant that recipient is also opposed to - else_if = { - limit = { - any_held_title = { - NOT = { - scope:recipient = { - has_claim_on = prev - } - } - any_claimant = { - mpo_blood_brother_common_enemy_sub_trigger = yes - mpo_ideal_common_foe_trigger = yes - } - } - } - ordered_held_title = { - order_by = tier - limit = { - NOT = { - scope:recipient = { - has_claim_on = prev - } - } - any_claimant = { - mpo_blood_brother_common_enemy_sub_trigger = yes - mpo_ideal_common_foe_trigger = yes - } - } - ordered_claimant = { - order_by = current_military_strength - limit = { - mpo_blood_brother_common_enemy_sub_trigger = yes - mpo_ideal_common_foe_trigger = yes - } - save_scope_as = shared_foe - } - } - } - - #ANYONE IS FINE - - #Nemeses and rivals - else_if = { - limit = { - any_relation = { - type = nemesis - mpo_blood_brother_common_enemy_sub_trigger = yes - } - } - ordered_relation = { - order_by = max_military_strength - type = nemesis - limit = { mpo_blood_brother_common_enemy_sub_trigger = yes } - save_scope_as = shared_foe - } - } - else_if = { - limit = { - any_relation = { - type = rival - mpo_blood_brother_common_enemy_sub_trigger = yes - } - } - ordered_relation = { - order_by = max_military_strength - type = rival - limit = { mpo_blood_brother_common_enemy_sub_trigger = yes } - save_scope_as = shared_foe - } - } - #You have a house feud against someone recipient is also opposed to - else_if = { - limit = { - - exists = house.house_head - exists = scope:recipient.house - NOT = { - house = scope:recipient.house - } - house = { - any_house_relation = { - has_house_relation_level = feud - any_relation_house = { - house_head = { mpo_blood_brother_common_enemy_sub_trigger = yes } - } - } - } - } - house = { - random_house_relation = { - limit = { - has_house_relation_level = feud - any_relation_house = { - house_head = { mpo_blood_brother_common_enemy_sub_trigger = yes } - } - } - random_relation_house = { - limit = { - house_head = { mpo_blood_brother_common_enemy_sub_trigger = yes } - } - house_head = { save_scope_as = shared_foe } - } - } - } - } - #In faction against someone recipient is opposed to - else_if = { - limit = { - liege ?= { - any_targeting_faction = { - any_faction_member = { - this = scope:actor - } - } - mpo_blood_brother_common_enemy_sub_trigger = yes - } - } - liege = { - save_scope_as = shared_foe - } - } - #You are at war with someone that recipient is also opposed to - else_if = { - limit = { - any_war_enemy = { - NOT = { has_variable = rebel_leader_peasants } - any_character_war = { - is_war_leader = prev - is_war_leader = scope:actor - } - mpo_blood_brother_common_enemy_sub_trigger = yes - } - } - ordered_war_enemy = { - order_by = max_military_strength - limit = { - NOT = { has_variable = rebel_leader_peasants } - any_character_war = { - is_war_leader = prev - is_war_leader = scope:actor - } - mpo_blood_brother_common_enemy_sub_trigger = yes - } - save_scope_as = shared_foe - } - } - #You have a faction member that recipient is also opposed to - else_if = { - limit = { - any_targeting_faction = { - any_faction_member = { - mpo_blood_brother_common_enemy_sub_trigger = yes - } - } - } - random_targeting_faction = { - ordered_faction_member = { - order_by = max_military_strength - limit = { - mpo_blood_brother_common_enemy_sub_trigger = yes - } - save_scope_as = shared_foe - } - } - } - #You are a title claimant against someone recipient don't like - else_if = { - limit = { - any_claim = { - exists = holder - NOT = { - scope:recipient = { has_claim_on = prev } - } - holder = { - mpo_blood_brother_common_enemy_sub_trigger = yes - } - } - } - ordered_claim = { - order_by = tier - limit = { - exists = holder - NOT = { - scope:recipient = { has_claim_on = prev } - } - holder = { - mpo_blood_brother_common_enemy_sub_trigger = yes - } - } - holder = { - save_scope_as = shared_foe - } - } - } - #You have a title claimant that recipient is also opposed to - else_if = { - limit = { - any_held_title = { - NOT = { - scope:recipient = { - has_claim_on = prev - } - } - any_claimant = { - mpo_blood_brother_common_enemy_sub_trigger = yes - } - } - } - ordered_held_title = { - order_by = tier - limit = { - NOT = { - scope:recipient = { - has_claim_on = prev - } - } - any_claimant = { - mpo_blood_brother_common_enemy_sub_trigger = yes - } - } - ordered_claimant = { - order_by = current_military_strength - limit = { - mpo_blood_brother_common_enemy_sub_trigger = yes - mpo_ideal_common_foe_trigger = yes - } - save_scope_as = shared_foe - } - } - } -} - -mpo_remove_blood_brother_modifiers_effect = { - remove_character_modifier = blood_brother_foe_modifier - remove_character_modifier = blood_brother_august_modifier - remove_character_modifier = blood_brother_august_nomadic_modifier - remove_character_modifier = blood_brother_warrior_modifier - remove_character_modifier = blood_brother_clever_modifier - remove_character_modifier = blood_brother_clever_nomadic_modifier - remove_character_modifier = blood_brother_loving_modifier - if = { - limit = { - has_variable = blood_brother_foe - } - remove_variable = blood_brother_foe - } - if = { - limit = { - any_relation = { - type = blood_brother - } - } - every_relation = { - type = blood_brother - - remove_character_modifier = blood_brother_foe_modifier - remove_character_modifier = blood_brother_august_modifier - remove_character_modifier = blood_brother_august_nomadic_modifier - remove_character_modifier = blood_brother_warrior_modifier - remove_character_modifier = blood_brother_clever_modifier - remove_character_modifier = blood_brother_clever_nomadic_modifier - remove_character_modifier = blood_brother_loving_modifier - if = { - limit = { - has_variable = blood_brother_foe - } - remove_variable = blood_brother_foe - } - } - } -} - -refill_maa_with_herd_effect = { - save_scope_as = nomad_temp - while = { - limit = { - scope:actor.domicile.herd > 0 - any_maa_regiment = { - maa_regiments_valid_to_refill_trigger = yes - } - } - random_maa_regiment = { - limit = { - maa_regiments_valid_to_refill_trigger = yes - } - save_scope_as = maa_scope - save_scope_value_as = { - name = current_herd_max_value_scope - value = scope:actor.domicile.herd - } - scope:actor.domicile ?= { - change_herd = { - value = { - add = scope:maa_scope.replenishable_troops_value - divide = herd_refill_value - max = scope:current_herd_max_value_scope - multiply = -1 - } - } - } - change_maa_troops_count = replenishable_troops_with_herd_value - } - } -} - -end_blood_brotherhood_effect = { - if = { - limit = { - has_relation_blood_brother = $TARGET$ - } - remove_relation_blood_brother = $TARGET$ - } -} - -make_obedient_recipient_to_actor_effect = { - if = { - limit = { - scope:recipient = { - obedience_target = scope:actor - NOT = { is_obedient_to = scope:actor } - } - } - scope:recipient = { - add_opinion = { - target = scope:actor - modifier = obedience_opinion - } - } - } -} - -lower_dominance_level_effect = { - switch = { - trigger = has_realm_law - nomadic_authority_1 = { - # Nothing happens - } - nomadic_authority_2 = { - remove_realm_law = nomadic_authority_2 - add_realm_law = nomadic_authority_1 - } - nomadic_authority_3 = { - remove_realm_law = nomadic_authority_3 - add_realm_law = nomadic_authority_2 - } - nomadic_authority_4 = { - remove_realm_law = nomadic_authority_4 - add_realm_law = nomadic_authority_3 - } - } - set_variable = { - name = nomadic_authority_cooldown - years = 5 - } -} - -adopt_nomadic_ways_decision_effect = { - change_government = nomad_government - custom_tooltip = adopt_nomadic_ways_decision_title_tt - custom_tooltip = adopt_nomadic_ways_decision_herd_tt - if = { - limit = { NOT = { has_trait = nomadic_philosophy } } - add_trait_force_tooltip = nomadic_philosophy - } -} - -# Different effect as we cannot access the Herder scope in the preview -adopt_nomadic_ways_decision_event_effect = { - add_character_flag = { - flag = domicile_culture_and_faith_check - days = 1 - } - set_variable = { - name = previous_provisions - value = root.domicile.provisions - } - change_government = nomad_government - location.county = { save_scope_as = title } - create_title_and_vassal_change = { - type = granted - save_scope_as = change - add_claim_on_loss = no - } - scope:title = { - change_title_holder = { - holder = root - change = scope:change - } - } - resolve_title_and_vassal_change = scope:change - # We give you 25% of your provisions as Herd - custom_tooltip = adopt_nomadic_ways_decision_herd_tt - domicile = { - change_herd = { - value = root.var:previous_provisions - multiply = 0.25 - } - } - if = { - limit = { NOT = { has_trait = nomadic_philosophy } } - add_trait = nomadic_philosophy - } -} - -mpo_confederation_join_defensive_war_effect = { - scope:defender.confederation = { - every_confederation_member = { - limit = { - highest_held_title_tier >= tier_county - NOR = { - is_at_war_with = scope:defender - is_allied_to = scope:attacker - is_imprisoned_by = scope:defender - is_imprisoned_by = scope:attacker - is_defender_in_war = scope:war - is_attacker_in_war = scope:war - } - } - scope:war = { - add_defender = prev - } - } - } -} - -confederation_migration_notification_effect = { - confederation ?= { - every_confederation_member = { - limit = { - NOT = { - this = scope:actor - } - } - send_interface_message = { - type = msg_broken_confederation - title = msg_broken_confederation_migration - desc = msg_broken_confederation_migration_desc - left_icon = scope:actor - } - } - } - send_interface_message = { - type = msg_broken_confederation - title = msg_broken_confederation_migration_root - desc = msg_broken_confederation_migration_root_desc - left_icon = confederation - } - add_character_flag = { - flag = migrating_from_confederation - months = 1 - } -} - -summon_three_fair_courtiers_effect = { - save_scope_as = root_scope - create_character = { - employer = scope:root_scope - template = $NOMAD_TEMPLATE_CHARACTER$ - faith = root.location.faith - culture = root.location.culture - save_scope_as = new_commander - } - if = { # Error suppression - limit = { - exists = scope:new_commander - } - scope:new_commander = { - assign_random_nickname_effect = yes - add_character_flag = { - flag = blocked_from_leaving - years = 25 - } - } - if = { - limit = { - scope:new_commander = { - NOT = { - is_courtier_of = scope:root_scope - } - } - } - add_courtier = scope:new_commander - } - send_interface_message = { - title = nomad_character_recruited.t - left_icon = scope:new_commander - custom_tooltip = commander_recruited.desc - } - } -} - -mpo_war_vassal_tributary_effect = { - create_title_and_vassal_change = { - type = conquest - save_scope_as = change - add_claim_on_loss = yes - } - - every_in_list = { - list = target_titles - if = { - limit = { - tier >= tier_county - } - every_de_jure_county = { - limit = { - holder = { - OR = { - this = scope:defender - top_liege = scope:defender - top_suzerain ?= scope:defender - } - } - } - holder ?= { - add_to_list = target_holder - } - add_to_list = target_titles - } - } - - holder ?= { - add_to_list = target_holder - save_scope_as = temp_de_jure_liege - } - add_hook_from_temp_de_jure_liege_to_attacker = yes - } - - every_in_list = { - list = target_titles - add_to_list = prestige_gain_list - } - - ordered_in_list = { - list = target_titles - order_by = tier - max = 1 - save_scope_as = war_goal_title - } - - every_in_list = { - list = target_holder - save_scope_as = current_target_holder - if = { - limit = { - NOT = { - any_held_county = { - exists = duchy - NOT = { is_in_list = target_titles } - } - } - NOR = { - this = scope:attacker - top_liege = scope:attacker - top_suzerain ?= scope:attacker - } - highest_held_title_tier <= scope:war_goal_title.tier - } - if = { - limit = { - NOR = { - this = scope:attacker - top_liege = scope:attacker - top_suzerain ?= scope:attacker - } - scope:attacker = { - vassal_count >= vassal_limit - } - } - start_tributary_from_war_effect = { - TRIBUTARY = scope:defender - SUZERAIN = scope:attacker - WAR = $WAR$ - } - #If you tributarize a confederate, they leave their confederation - if = { - limit = { - scope:defender = { - is_confederation_member = yes - } - } - scope:defender.confederation = { - remove_confederation_member = scope:defender - } - } - } - else_if = { - limit = { - NOR = { - this = scope:attacker - top_liege = scope:attacker - top_suzerain ?= scope:attacker - } - } - change_liege = { - liege = scope:attacker - change = scope:change - } - } - every_in_list = { - list = target_titles - limit = { - holder ?= { this = scope:current_target_holder } - } - remove_from_list = target_titles - } - } - } - - every_in_list = { - list = target_titles - limit = { - OR = { - NOT = { exists = holder } - holder ?= { - NOR = { - this = scope:attacker - any_liege_or_above = { this = scope:attacker } - top_suzerain ?= scope:attacker - } - } - } - } - change_title_holder = { - holder = scope:attacker - change = scope:change - } - remove_from_list = target_titles - } - - save_scope_value_as = { - name = cb_prestige_factor - value = { - value = 0 - every_in_list = { - list = prestige_gain_list - add = 50 - } - } - } - - scope:attacker = { - add_prestige = scope:cb_prestige_factor - } - resolve_title_and_vassal_change = scope:change - - scope:target_title = { - every_de_jure_county = { - limit = { - holder = { - government_has_flag = government_is_herder - is_tributary = no - } - } - hidden_effect = { - start_tributary_from_war_effect = { - TRIBUTARY = holder - SUZERAIN = scope:attacker - WAR = $WAR$ - } - } - } - if = { - limit = { - NOT = { target_is_de_jure_liege_or_above = scope:attacker.primary_title } - NOT = { - any_de_jure_county = { - holder = { - NOR = { - top_liege = scope:attacker - top_suzerain ?= scope:attacker - } - } - } - } - } - set_de_jure_liege_title = scope:attacker.primary_title - } - } - - every_in_list = { - list = target_holder - if = { - limit = { - NOT = { - any_held_title = { - exists = duchy - } - } - highest_held_title_tier > tier_county - } - every_held_title = { - limit = { - tier >= tier_county - } - scope:defender = { - destroy_title = prev - } - } - } - } -} - -#Called from game start on action -#inside domicile scope -add_random_yurt_external_building_effect = { - random_list = { - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = herd_welfare_yurt_01 } - } - add_domicile_building = herd_welfare_yurt_01 - } - 1 = { - trigger = { - NOT = { has_domicile_building_or_higher = character_warfare_yurt_01 } - } - add_domicile_building = character_warfare_yurt_01 - } - 1 = { - trigger = { - NOT = { has_domicile_building_or_higher = mass_warfare_yurt_01 } - } - add_domicile_building = mass_warfare_yurt_01 - } - 1 = { - trigger = { - NOT = { has_domicile_building_or_higher = court_yurt_01 } - } - add_domicile_building = court_yurt_01 - } - 1 = { - trigger = { - NOT = { has_domicile_building_or_higher = family_yurt_01 } - } - add_domicile_building = family_yurt_01 - } - 1 = { - trigger = { - NOT = { has_domicile_building_or_higher = mystical_yurt_01 } - } - add_domicile_building = mystical_yurt_01 - } - } -} - -#Called from game start on action -#Limited to lvl 3 to offer more variety and prevent startup errors -#inside domicile scope -upgrade_random_yurt_external_building_effect = { - random_list = { - 10 = { - trigger = { - has_domicile_building_or_higher = herd_welfare_yurt_01 - NOT = { - has_domicile_building_or_higher = herd_welfare_yurt_03 - } - } - switch = { - trigger = has_domicile_building - herd_welfare_yurt_01 = { add_domicile_building = herd_welfare_yurt_02 } - herd_welfare_yurt_02 = { add_domicile_building = herd_welfare_yurt_03 } - } - } - 1 = { - trigger = { - has_domicile_building_or_higher = character_warfare_yurt_01 - NOT = { - has_domicile_building_or_higher = character_warfare_yurt_03 - } - } - switch = { - trigger = has_domicile_building - character_warfare_yurt_01 = { add_domicile_building = character_warfare_yurt_02 } - character_warfare_yurt_02 = { add_domicile_building = character_warfare_yurt_03 } - } - } - 1 = { - trigger = { - has_domicile_building_or_higher = mass_warfare_yurt_01 - NOT = { - has_domicile_building_or_higher = mass_warfare_yurt_03 - } - } - switch = { - trigger = has_domicile_building - mass_warfare_yurt_01 = { add_domicile_building = mass_warfare_yurt_02 } - mass_warfare_yurt_02 = { add_domicile_building = mass_warfare_yurt_03 } - } - } - 1 = { - trigger = { - has_domicile_building_or_higher = court_yurt_01 - NOT = { - has_domicile_building_or_higher = court_yurt_03 - } - } - switch = { - trigger = has_domicile_building - court_yurt_01 = { add_domicile_building = court_yurt_02 } - court_yurt_02 = { add_domicile_building = court_yurt_03 } - } - } - 1 = { - trigger = { - has_domicile_building_or_higher = family_yurt_01 - NOT = { - has_domicile_building_or_higher = family_yurt_03 - } - } - switch = { - trigger = has_domicile_building - family_yurt_01 = { add_domicile_building = family_yurt_02 } - family_yurt_02 = { add_domicile_building = family_yurt_03 } - } - } - 1 = { - trigger = { - has_domicile_building_or_higher = mystical_yurt_01 - NOT = { - has_domicile_building_or_higher = mystical_yurt_03 - } - } - switch = { - trigger = has_domicile_building - mystical_yurt_01 = { add_domicile_building = mystical_yurt_02 } - mystical_yurt_02 = { add_domicile_building = mystical_yurt_03 } - } - } - } -} - -#Used to distribute the Dynasty of Many Khans dynasty_court_yurt_06 reward -#Called from yearly_on_action -#root is character -mpo_yearly_dynasty_of_many_khans_effect = { - if = { - limit = { - this = dynasty.dynast - dynasty = { - has_dynasty_modifier = dynasty_of_many_crowns_nomad - } - domicile ?= { - has_domicile_parameter = nomad_yurt_dynasty_many_khans - } - } - send_interface_toast = { - type = event_toast_effect_good - title = dynasty_many_khans_yearly_tt - set_variable = { - name = temp_dynn_prestige - value = 1 - } - dynasty = { - every_dynasty_member = { - limit = { - primary_title.tier >= tier_kingdom - } - root = { - change_variable = { - name = temp_dynn_prestige - add = minor_dynasty_prestige_gain - } - } - } - add_dynasty_prestige = root.var:temp_dynn_prestige - } - remove_variable = temp_dynn_prestige - } - } -} - -#Used to distribute yurt domicile rewards -#Called from yearly_on_action -#inside domicile scope -#root is the character -mpo_yearly_yurt_rewards_effect = { - if = { - limit = { - has_domicile_building_or_higher = hostage_ward_yurt_01 - } - switch = { - trigger = has_domicile_parameter - nomad_yurt_hostage_bonus_lvl_1 = { - hostage_ward_yurt_effect = { - CHANCE = 2 - } - } - nomad_yurt_hostage_bonus_lvl_2 = { - hostage_ward_yurt_effect = { - CHANCE = 3 - } - } - nomad_yurt_hostage_bonus_lvl_3 = { - hostage_ward_yurt_effect = { - CHANCE = 5 - } - } - } - } - if = { - limit = { - has_domicile_building_or_higher = language_yurt_01 - } - switch = { - trigger = has_domicile_parameter - nomad_yurt_yearly_bonus_per_language_lvl_1 = { - language_yurt_effect = { - CHANCE = 0.5 - } - } - nomad_yurt_yearly_bonus_per_language_lvl_2 = { - language_yurt_effect = { - CHANCE = 1 - } - } - nomad_yurt_yearly_bonus_per_language_lvl_3 = { - language_yurt_effect = { - CHANCE = 2 - } - } - } - } - if = { - limit = { - has_domicile_building_or_higher = omen_yurt_01 - } - } - switch = { - trigger = has_domicile_parameter - nomad_yurt_children_bonus_per_piety_lvl_1 = { - omen_yurt_effect = { - CHANCE = 0.5 - } - } - nomad_yurt_children_bonus_per_piety_lvl_2 = { - omen_yurt_effect = { - CHANCE = 1 - } - } - nomad_yurt_children_bonus_per_piety_lvl_3 = { - omen_yurt_effect = { - CHANCE = 2 - } - } - } - if = { - limit = { - has_domicile_building_or_higher = friend_yurt_01 - } - switch = { - trigger = has_domicile_parameter - nomad_yurt_friend_bonus_lvl_1 = { - friend_yurt_effect = { - CHANCE = 1 - } - } - nomad_yurt_friend_bonus_lvl_2= { - friend_yurt_effect = { - CHANCE = 2 - } - } - nomad_yurt_friend_bonus_lvl_3 = { - friend_yurt_effect = { - CHANCE = 3 - } - } - } - } - if = { - limit = { - has_domicile_building_or_higher = better_children_yurt_01 - } - switch = { - trigger = has_domicile_parameter - nomad_yurt_better_children_lvl_1 = { - better_children_yurt_effect = { - CHANCE = 5 - } - } - nomad_yurt_better_children_lvl_2 = { - better_children_yurt_effect = { - CHANCE = 10 - } - } - nomad_yurt_better_children_lvl_3 = { - better_children_yurt_effect = { - CHANCE = 15 - } - } - } - } - if = { - limit = { - has_domicile_building_or_higher = dynasty_court_yurt_01 - } - switch = { - trigger = has_domicile_parameter - nomad_yurt_same_dynasty_bonus_lvl_1 = { - dynasty_court_yurt_effect = { - CHANCE = 1 - } - } - nomad_yurt_same_dynasty_bonus_lvl_2 = { - dynasty_court_yurt_effect = { - CHANCE = 2 - } - } - nomad_yurt_same_dynasty_bonus_lvl_3 = { - dynasty_court_yurt_effect = { - CHANCE = 3 - } - } - } - } - if = { - limit = { - has_domicile_building_or_higher = culture_court_yurt_01 - } - switch = { - trigger = has_domicile_parameter - nomad_yurt_many_cultures_bonus_lvl_1 = { - culture_court_yurt_effect = { - CHANCE = 1 - PERCENT = 5 - } - } - nomad_yurt_many_cultures_bonus_lvl_2 = { - culture_court_yurt_effect = { - CHANCE = 2 - PERCENT = 5 - } - } - nomad_yurt_many_cultures_bonus_lvl_3 = { - culture_court_yurt_effect = { - CHANCE = 2 - PERCENT = 10 - } - } - } - } - if = { - limit = { - has_domicile_building_or_higher = fertility_mystical_yurt_01 - } - switch = { - trigger = has_domicile_parameter - nomad_yurt_herd_per_piety_fertility_mystical_lvl_1 = { - fertility_mystical_yurt_effect = { - CHANCE = 1 - PERCENT = 5 - } - } - nomad_yurt_herd_per_piety_fertility_mystical_lvl_2 = { - fertility_mystical_yurt_effect = { - CHANCE = 2 - PERCENT = 5 - } - } - nomad_yurt_herd_per_piety_fertility_mystical_lvl_3 = { - fertility_mystical_yurt_effect = { - CHANCE = 2 - PERCENT = 10 - } - } - } - } - if = { - limit = { - has_domicile_building_or_higher = knight_mystical_yurt_01 - } - switch = { - trigger = has_domicile_parameter - knight_skill_increase_per_piety_lvl_1 = { - knight_mystical_yurt_effect = { - CHANCE = 1 - PROWESS = 1 - } - } - knight_skill_increase_per_piety_lvl_2 = { - knight_mystical_yurt_effect = { - CHANCE = 2 - PROWESS = 1 - } - } - knight_skill_increase_per_piety_lvl_3 = { - knight_mystical_yurt_effect = { - CHANCE = 2 - PROWESS = 2 - } - } - } - } -} - -hostage_ward_yurt_effect = { - root = { - every_courtier = { - limit = { - is_hostage_of = root - } - add_to_list = temp_yurt_hostages - } - } - random = { - chance = { - value = "list_size(temp_yurt_hostages)" - multiply = $CHANCE$ - min = 0 - } - root = { - random_courtier = { - limit = { - is_hostage_of = root - } - save_scope_as = yurt_hostage - } - random_relation = { - type = ward - save_scope_as = yurt_ward - } - if = { - limit = { - exists = scope:yurt_ward - } - send_interface_message = { - title = hostage_ward_yurt_effect_tt - desc = hostage_ward_yurt_effect_desc - left_icon = scope:yurt_ward - right_icon = scope:yurt_hostage - scope:yurt_ward = { - random_list = { - 1 = { add_diplomacy_skill = 1 } - 1 = { add_stewardship_skill = 1 } - 1 = { add_intrigue_skill = 1 } - 1 = { add_learning_skill = 1 } - 1 = { add_martial_skill = 1 } - } - } - scope:yurt_hostage = { - increase_wounds_no_death_effect = { REASON = beaten } - } - root = { - add_prestige = 200 - } - } - } - } - } -} -language_yurt_effect = { - random = { - chance = { - value = root.num_of_known_languages - multiply = $CHANCE$ - min = 0 - } - root = { - send_interface_message = { - title = language_yurt_effect_tt - desc = language_yurt_effect_desc - left_icon = root - random_list = { - 1 = { add_diplomacy_skill = 1 } - 1 = { add_stewardship_skill = 1 } - 1 = { add_intrigue_skill = 1 } - 1 = { add_learning_skill = 1 } - 1 = { add_martial_skill = 1 } - } - } - } - } -} -de_jure_shifting_effect = { - while = { - count = 25 - limit = { - OR = { - any_realm_de_jure_$LOWER_TIER$ = { - mpo_de_jure_shifting_triggers = { UPPER_TIER = $UPPER_TIER$ } - } - any_tributary = { - highest_held_title_tier < root.highest_held_title_tier - any_realm_de_jure_$LOWER_TIER$ = { - mpo_de_jure_shifting_triggers = { UPPER_TIER = $UPPER_TIER$ } - } - } - } - } - random_realm_de_jure_$LOWER_TIER$ = { - limit = { - mpo_de_jure_shifting_triggers = { UPPER_TIER = $UPPER_TIER$ } - } - set_de_jure_liege_title = root.primary_title - add_to_list = de_jure_shifted_title - } - random_tributary = { - limit = { - highest_held_title_tier < root.highest_held_title_tier - any_realm_de_jure_$LOWER_TIER$ = { - mpo_de_jure_shifting_triggers = { UPPER_TIER = $UPPER_TIER$ } - } - } - random_realm_de_jure_$LOWER_TIER$ = { - limit = { - mpo_de_jure_shifting_triggers = { UPPER_TIER = $UPPER_TIER$ } - } - set_de_jure_liege_title = root.primary_title - add_to_list = de_jure_shifted_title - } - } - } - while = { - count = 25 - limit = { - list_size = { - name = de_jure_shifted_title - value >= 1 - } - } - root = { - send_interface_message = { - type = msg_mpo_de_jure_shifting - title = msg_mpo_de_jure_shifting - left_icon = root - ordered_in_list = { - order_by = { - value = 1 - } - max = 3 - list = de_jure_shifted_title - show_as_tooltip = { - set_de_jure_liege_title = root.primary_title - } - remove_from_list = de_jure_shifted_title - } - } - } - } -} - -omen_yurt_effect = { - random = { - chance = { - value = root.piety_level - multiply = $CHANCE$ - min = 0 - } - root = { - random_child = { - save_scope_as = improved_child - } - if = { - limit = { - exists = scope:improved_child - } - send_interface_message = { - title = omen_yurt_effect_tt - desc = omen_yurt_effect_desc - left_icon = scope:improved_child - scope:improved_knight = { - random_list = { - 1 = { add_diplomacy_skill = 1 } - 1 = { add_stewardship_skill = 1 } - 1 = { add_intrigue_skill = 1 } - 1 = { add_learning_skill = 1 } - 1 = { add_martial_skill = 1 } - } - } - } - } - } - } -} - -friend_yurt_effect = { - root = { - every_relation = { - type = friend - add_to_list = temp_yurt_friends - } - } - random = { - chance = { - value = "list_size(temp_yurt_friends)" - multiply = $CHANCE$ - min = 0 - } - root = { - random_relation = { - type = friend - save_scope_as = yurt_friend - } - send_interface_message = { - title = friend_yurt_effect_tt - desc = friend_yurt_effect_desc - left_icon = scope:yurt_friend - scope:yurt_friend = { - random_list = { - 1 = { add_diplomacy_skill = 1 } - 1 = { add_stewardship_skill = 1 } - 1 = { add_intrigue_skill = 1 } - 1 = { add_learning_skill = 1 } - 1 = { add_martial_skill = 1 } - } - } - root = { - random_list = { - 1 = { add_diplomacy_skill = 1 } - 1 = { add_stewardship_skill = 1 } - 1 = { add_intrigue_skill = 1 } - 1 = { add_learning_skill = 1 } - 1 = { add_martial_skill = 1 } - } - } - } - } - } -} - -better_children_yurt_effect = { - random = { - chance = $CHANCE$ - root = { - random_heir = { - limit = { - age < 17 - } - save_scope_as = yurt_heir - } - if = { - limit = { - exists = scope:yurt_heir - } - } - send_interface_message = { - title = better_children_yurt_effect_tt - desc = better_children_yurt_effect_desc - left_icon = scope:yurt_heir - scope:yurt_heir = { - random_list = { - 1 = { add_diplomacy_skill = 1 } - 1 = { add_stewardship_skill = 1 } - 1 = { add_intrigue_skill = 1 } - 1 = { add_learning_skill = 1 } - 1 = { add_martial_skill = 1 } - } - } - } - } - } -} - -dynasty_court_yurt_effect = { - root = { - every_councillor = { - limit = { - is_kurultai_trigger = yes - dynasty = root.dynasty - } - add_to_temporary_list = yurt_kurultai_list - } - } - random = { - chance = { - value = "list_size(yurt_kurultai_list)" - multiply = $CHANCE$ - min = 0 - } - root = { - send_interface_message = { - title = dynasty_court_yurt_effect_tt - desc = dynasty_court_yurt_effect_desc - domicile ?= { - change_herd = { - value = max_herd - multiply = 0.1 - } - } - } - } - } -} - -culture_court_yurt_effect = { - root = { - every_tributary = { - culture = { add_to_temporary_list = yurt_culture_list } - } - every_vassal = { - culture = { add_to_temporary_list = yurt_culture_list } - } - } - - random = { - chance = { - value = "list_size(yurt_culture_list)" - multiply = $CHANCE$ - min = 0 - } - root = { - send_interface_message = { - title = culture_court_yurt_effect_tt - desc = culture_court_yurt_effect_desc - domicile ?= { - change_herd = { - value = max_herd - multiply = 0.01 - multiply = $PERCENT$ - } - } - } - } - } -} - -knight_mystical_yurt_effect = { - random = { - chance = { - value = root.piety_level - multiply = $CHANCE$ - min = 0 - } - root = { - random_knight = { - save_scope_as = improved_knight - } - if = { - limit = { - exists = scope:improved_knight - } - send_interface_message = { - title = knight_mystical_yurt_effect_tt - desc = knight_mystical_yurt_effect_desc - left_icon = scope:improved_knight - scope:improved_knight = { - add_prowess_skill = $PROWESS$ - } - } - } - } - } -} - -fertility_mystical_yurt_effect = { - random = { - chance = { - value = root.piety_level - multiply = $CHANCE$ - min = 0 - } - root = { - send_interface_message = { - title = fertility_mystical_yurt_effect_tt - desc = fertility_mystical_yurt_effect_desc - domicile ?= { - change_herd = { - value = max_herd - multiply = 0.01 - multiply = $PERCENT$ - } - } - } - } - } -} - -clean_up_ai_nomad_effect = { - save_temporary_scope_as = nomad_capital_ruler - if = { - limit = { - is_ai = yes - is_at_war = no - domicile.herd < 500 - is_landed = no - any_held_title = { - exists = title_domicile - NOT = { exists = var:player_domicile_title } - } - is_imprisoned = no - OR = { - is_independent_ruler = yes - liege ?= { is_ai = yes } - } - is_migrating = no - NOT = { exists = involved_activity } - } - domicile.domicile_location = { save_scope_as = place_to_stay } - if = { - limit = { - location = scope:place_to_stay - } - add_to_list = movers - } - every_courtier = { - limit = { - location = scope:place_to_stay - } - add_to_list = movers - } - every_held_title = { - limit = { - exists = title_domicile - NOT = { exists = var:player_domicile_title } - } - scope:nomad_capital_ruler = { destroy_title = prev } - } - every_in_list = { - list = movers - limit = { - is_imprisoned = no - NOR = { - this = scope:nomad_capital_ruler - is_in_pool_at = scope:place_to_stay - } - } - move_to_pool_at = scope:place_to_stay - } - - random = { - chance = { - value = 20 - if = { - limit = { - any_player = { - OR = { - is_close_or_extended_family_of = scope:nomad_capital_ruler - is_consort_of = scope:nomad_capital_ruler - has_important_relationship_with_character_trigger = { CHARACTER = scope:nomad_capital_ruler } - is_allied_in_war = scope:nomad_capital_ruler - is_allied_to = scope:nomad_capital_ruler - is_at_war_with = scope:nomad_capital_ruler - } - } - } - add = 80 - } - } - if = { - limit = { - has_dlc_feature = roads_to_power - is_physically_able_adult = yes - exists = location.county - ai_can_valid_to_create_laamp_trigger = yes - } - create_landless_adventurer_title_effect = { - REASON = flag:voluntary - FLAVOR_CHAR = root - } - every_in_list = { - list = movers - limit = { - NOR = { - this = scope:nomad_capital_ruler - is_courtier_of = scope:nomad_capital_ruler - is_in_pool_at = scope:place_to_stay - } - } - move_to_pool_at = scope:place_to_stay - } - if = { - limit = { - NOT = { - exists = global_var:nomad_adventurer_spawn - } - } - set_global_variable = { - name = nomad_adventurer_spawn - value = 1 - } - } - else = { - change_global_variable = { - name = nomad_adventurer_spawn - add = 1 - } - } - } - } - - if = { - limit = { - scope:nomad_capital_ruler = { - is_ruler = no - } - } - every_in_list = { - list = movers - limit = { - is_imprisoned = no - this = scope:nomad_capital_ruler - NOT = { - is_in_pool_at = scope:place_to_stay - } - } - move_to_pool_at = scope:place_to_stay - } - } - } -} - -expanding_steppe_effect = { - switch = { - trigger = yes - # West - scope:ghw_region_anatolia = { - expanding_steppe_add_region_effect = { - SUB_REGION = west - REGION = ghw_region_anatolia - } - tgp_silk_road_expand_steppe_effect = { SUB_REGION = occident } - } - scope:custom_eastern_balkans = { - expanding_steppe_add_region_effect = { - SUB_REGION = west - REGION = custom_eastern_balkans - } - } - scope:ghw_region_northern_russia = { - expanding_steppe_add_region_effect = { - SUB_REGION = west - REGION = ghw_region_northern_russia - } - } - scope:ghw_region_southern_russia = { - expanding_steppe_add_region_effect = { - SUB_REGION = west - REGION = ghw_region_southern_russia - } - } - scope:custom_hungary = { - expanding_steppe_add_region_effect = { - SUB_REGION = west - REGION = custom_hungary - } - } - scope:ghw_region_poland = { - expanding_steppe_add_region_effect = { - SUB_REGION = west - REGION = ghw_region_poland - } - } - scope:ghw_region_baltic = { - expanding_steppe_add_region_effect = { - SUB_REGION = west - REGION = ghw_region_baltic - } - } - scope:dlc_mpo_steppe_caucasus_expansion = { - expanding_steppe_add_region_effect = { - SUB_REGION = west - REGION = dlc_mpo_steppe_caucasus_expansion - } - tgp_silk_road_expand_steppe_effect = { SUB_REGION = transcaspia } - tgp_silk_road_expand_steppe_effect = { SUB_REGION = occident } - } - # Central - scope:world_transoxiana = { - expanding_steppe_add_region_effect = { - SUB_REGION = central - REGION = world_transoxiana - } - tgp_silk_road_expand_steppe_effect = { SUB_REGION = transcaspia } - tgp_silk_road_expand_steppe_effect = { SUB_REGION = central_asia } - tgp_silk_road_expand_steppe_effect = { SUB_REGION = occident } - } - scope:world_khorasan = { - expanding_steppe_add_region_effect = { - SUB_REGION = central - REGION = world_khorasan - } - tgp_silk_road_expand_steppe_effect = { SUB_REGION = central_asia } - tgp_silk_road_expand_steppe_effect = { SUB_REGION = occident } - } - scope:dlc_mpo_steppe_persia_expansion = { - expanding_steppe_add_region_effect = { - SUB_REGION = central - REGION = dlc_mpo_steppe_persia_expansion - } - tgp_silk_road_expand_steppe_effect = { SUB_REGION = occident } - } - scope:dlc_mpo_steppe_siberia_further_expansion = { - expanding_steppe_add_region_effect = { - SUB_REGION = central - REGION = dlc_mpo_steppe_siberia_further_expansion - } - } - # East - scope:world_steppe_tarim = { - expanding_steppe_add_region_effect = { - SUB_REGION = east - REGION = world_steppe_tarim - } - tgp_silk_road_expand_steppe_effect = { SUB_REGION = central_asia } - tgp_silk_road_expand_steppe_effect = { SUB_REGION = transcaspia } - tgp_silk_road_expand_steppe_effect = { SUB_REGION = occident } - } - } -} - -expanding_steppe_add_region_effect = { - situation:the_great_steppe = { - situation_sub_region:steppe_$SUB_REGION$ = { - add_geographical_region = $REGION$ - } - } -} - -nomadic_heir_cleanup_realm_effect = { - if = { - limit = { - is_landed = yes - } - create_title_and_vassal_change = { - type = granted - save_scope_as = change - } - if = { - limit = { - exists = liege - } - liege = { - save_scope_as = old_liege - } - } - create_character = { - location = $CLEANUP_SCOPE_CHAR$.location - template = nomadic_chieftain_character - save_scope_as = inheritor_char - } - every_held_title = { - limit = { - is_landless_type_title = no - } - change_title_holder = { - holder = scope:inheritor_char - change = scope:change - } - } - resolve_title_and_vassal_change = scope:change - if = { - limit = { - exists = scope:old_liege - } - scope:inheritor_char = { - create_title_and_vassal_change = { - type = swear_fealty - save_scope_as = change - } - scope:recipient = { - change_liege = { - liege = scope:old_liege - change = scope:change - } - } - resolve_title_and_vassal_change = scope:change - } - } - } - if = { - limit = { - top_liege != $CLEANUP_SCOPE_CHAR$ - } - create_title_and_vassal_change = { - type = independency - save_scope_as = going_independent - add_claim_on_loss = no - } - becomes_independent = { - change = scope:going_independent - } - resolve_title_and_vassal_change = scope:going_independent - } -} - -nomadic_realm_split_effect = { - $ORIGINAL_REALM_HOLDER$ = { - save_scope_as = root_scope - } - $NEW_RULER$ = { - save_scope_as = new_ruler_scope - } - primary_title = { - every_in_de_jure_hierarchy = { - limit = { - tier = tier_county - holder.top_liege = scope:root_scope - } - add_to_list = de_jure_realm_counties_of_primary - add_to_list = combined_counties_of_primary - } - every_in_de_jure_hierarchy = { - limit = { - tier = tier_county - holder.top_liege != scope:root_scope - } - add_to_list = de_jure_realm_counties_of_primary_outside_realm - } - every_in_de_jure_hierarchy = { - limit = { - tier = tier_county - } - add_to_list = de_jure_realm_counties_of_primary_combined - } - every_in_de_facto_hierarchy = { - limit = { - tier = tier_county - holder.top_liege ?= scope:root_scope - NOT = { is_in_list = de_jure_realm_counties_of_primary } - } - add_to_list = de_facto_realm_counties_of_primary - add_to_list = combined_counties_of_primary - } - } - # Pick a suitable capital County, as far away from your capital as possible - ordered_in_list = { - list = de_jure_realm_counties_of_primary - limit = { - NOT = { - this = scope:root_scope.capital_county - } - } - order_by = { - value = "title_province.squared_distance(scope:root_scope.capital_province)" - } - save_scope_as = new_capital - } - - # Mark the capital duchy - scope:new_ruler_scope = { - scope:new_capital = { - add_to_list = counties_given_to_sibling - } - scope:new_capital.duchy = { - save_scope_as = capital_duchy - add_to_list = duchies_given_to_sibling - add_to_list = duchies_to_de_jure_shift - if = { - limit = { - holder.top_liege = scope:root_scope - holder.primary_title.tier < tier_kingdom - } - holder = { - add_to_list = rulers_transferred - } - } - every_in_de_jure_hierarchy = { - limit = { - is_in_list = combined_counties_of_primary - } - add_to_list = capital_duchy_counties - if = { - limit = { - NOT = { - is_in_list = counties_given_to_sibling - } - } - add_to_list = counties_given_to_sibling - } - if = { - limit = { - holder.top_liege = scope:root_scope - holder.primary_title.tier < tier_kingdom - } - holder = { - add_to_list = rulers_transferred - } - } - } - } - # Expand in a 'ring' first - scope:new_capital.duchy = { - every_title_to_title_neighboring_duchy = { - limit = { - any_in_de_jure_hierarchy = { - OR = { - is_in_list = de_jure_realm_counties_of_primary - is_in_list = de_jure_realm_counties_of_primary_outside_realm - } - } - } - add_to_list = duchies_to_de_jure_shift - if = { - limit = { - any_in_de_jure_hierarchy = { - is_in_list = de_jure_realm_counties_of_primary - } - } - add_to_list = duchies_given_to_sibling - if = { - limit = { - holder = { - top_liege = scope:root_scope - primary_title.tier < tier_kingdom - NOT = { is_in_list = rulers_transferred } - } - } - holder = { - add_to_list = rulers_transferred - } - } - every_in_de_jure_hierarchy = { - limit = { - is_in_list = de_jure_realm_counties_of_primary - } - add_to_list = counties_given_to_sibling - if = { - limit = { - holder = { - top_liege = scope:root_scope - primary_title.tier < tier_kingdom - NOT = { is_in_list = rulers_transferred } - } - } - holder = { - add_to_list = rulers_transferred - } - } - } - every_in_de_jure_hierarchy = { - limit = { - NOT = { is_in_list = de_jure_realm_counties_of_primary } - } - add_to_list = counties_de_jure_shifted_to_sibling - } - } - } - } - while = { - count = 50 - limit = { - "list_size(counties_given_to_sibling)" < { - value = "list_size(de_jure_realm_counties_of_primary)" - multiply = $SPLIT_VALUE$ - } - } - ordered_in_list = { - list = de_jure_realm_counties_of_primary_combined - limit = { - NOR = { - duchy = scope:root_scope.capital_county.duchy - duchy = { is_in_list = duchies_to_de_jure_shift } - is_in_list = counties_given_to_sibling - } - any_neighboring_county = { - OR = { - is_in_list = counties_given_to_sibling - duchy = { is_in_list = duchies_to_de_jure_shift } - } - } - } - order_by = { - value = "title_province.squared_distance(scope:root_scope.capital_province)" - } - duchy = { - add_to_list = duchies_to_de_jure_shift - if = { - limit = { - any_in_de_jure_hierarchy = { - is_in_list = de_jure_realm_counties_of_primary - } - } - add_to_list = duchies_given_to_sibling - if = { - limit = { - holder = { - top_liege = scope:root_scope - primary_title.tier < tier_kingdom - NOT = { is_in_list = rulers_transferred } - } - } - holder = { - add_to_list = rulers_transferred - } - } - every_in_de_jure_hierarchy = { - limit = { - is_in_list = de_jure_realm_counties_of_primary - } - add_to_list = counties_given_to_sibling - if = { - limit = { - holder = { - top_liege = scope:root_scope - primary_title.tier < tier_kingdom - NOT = { is_in_list = rulers_transferred } - } - } - holder = { - add_to_list = rulers_transferred - } - } - } - every_in_de_jure_hierarchy = { - limit = { - NOT = { is_in_list = de_jure_realm_counties_of_primary } - } - add_to_list = counties_de_jure_shifted_to_sibling - } - } - } - } - } - - # Hand out the titles properly - create_title_and_vassal_change = { - type = swear_fealty - add_claim_on_loss = yes - save_scope_as = change - } - - # Give capital + capital duchy - scope:capital_duchy = { - change_title_holder = { - holder = scope:new_ruler_scope - change = scope:change - } - } - every_in_list = { - list = capital_duchy_counties - change_title_holder = { - holder = scope:new_ruler_scope - change = scope:change - } - } - - # Form a new kingdom - save_scope_as = founder - scope:capital_duchy = { - save_scope_as = old_title - } - create_dynamic_title = { - tier = kingdom - name = NEW_CREATED_TITLE_NAME - } - scope:new_title = { - save_scope_as = new_kingdom_title - change_title_holder = { - holder = scope:new_ruler_scope - change = scope:change - } - generate_coa = yes - set_de_jure_liege_title = scope:root_scope.primary_title.empire - } - - # Do everything else - every_in_list = { - list = counties_given_to_sibling - if = { - limit = { - holder = { - NOT = { - this = scope:new_ruler_scope - } - OR = { - this = scope:root_scope - primary_title.tier >= tier_kingdom - } - } - } - change_title_holder = { - holder = scope:new_ruler_scope - change = scope:change - } - } - if = { - limit = { - NOT = { - this = scope:new_ruler_scope - } - holder = { - liege = scope:root_scope - primary_title.tier < tier_kingdom - } - } - holder = { - change_liege = { - liege = scope:new_ruler_scope - change = scope:change - } - } - } - } - - resolve_title_and_vassal_change = scope:change - - every_in_list = { - list = duchies_to_de_jure_shift - set_de_jure_liege_title = scope:new_kingdom_title - } - } -} - -mpo_abuse_authority_county_effect = { - location.duchy = { - every_de_jure_county = { - limit = { - county_ready_for_abuse_trigger = yes - } - change_county_fertility = -100 - change_county_control = -40 - add_county_modifier = { - modifier = mpo_paiza_abused_county_modifier - years = 4 - } - add_to_temporary_list = counties_to_abuse - } - every_de_jure_county = { - limit = { - county_ready_for_abuse_trigger = yes - } - holder = { - add_opinion = { - modifier = angry_opinion - target = root - opinion = -30 - } - } - } - every_de_jure_county = { - limit = { - county_ready_for_abuse_trigger = yes - } - custom = custom.mpo_resources_gained_abuse - root.domicile ?= { - change_herd = medium_herd_value - } - root = { - add_gold = medium_gold_value - add_prestige = medium_prestige_value - } - } - } -} diff --git a/N3OW/common/scripted_effects/09_mpo_greatest_of_khans_effects.txt b/N3OW/common/scripted_effects/09_mpo_greatest_of_khans_effects.txt deleted file mode 100644 index 018f65aa..00000000 --- a/N3OW/common/scripted_effects/09_mpo_greatest_of_khans_effects.txt +++ /dev/null @@ -1,8649 +0,0 @@ -# Form the actual Mongol Empire... -form_the_greatest_khan_empire_effect = { - save_scope_as = gok - - hidden_effect = { - if = { - limit = { - culture = culture:mongol - } - #Create the title - create_title_and_vassal_change = { - type = created - save_scope_as = title_change - add_claim_on_loss = no - } - - title:e_mongol_empire = { - change_title_holder = { - holder = scope:gok - change = scope:title_change - } - save_scope_as = gok_title - } - resolve_title_and_vassal_change = scope:title_change - - assert_if = { - limit = { NOT = { exists = title:e_mongol_empire } } - text = "Mongol Empire title was not created!" - } - } - else = { - #You never know if they've switched government in the meantime just to ruin this whole thing... - if = { - limit = { - government_has_flag = government_is_nomadic - exists = domicile - } - create_dynamic_title = { - tier = empire - name = GREATEST_OF_KHANS_TITLE_DOMICILE_NAME - adj = GREATEST_OF_KHANS_TITLE_DOMICILE_NAME_ADJ - article = article_CONFEDERATION_CULTURE_NAME - } - scope:new_title = { - save_scope_as = gok_title - } - } - else = { - create_dynamic_title = { - tier = empire - name = GREATEST_OF_KHANS_TITLE_NAME - adj = GREATEST_OF_KHANS_TITLE_NAME_ADJ - article = article_CONFEDERATION_CULTURE_NAME - } - scope:new_title = { - save_scope_as = gok_title - } - } - - scope:gok_title = { - set_color_from_title = root.capital_county - set_definitive_form = yes - set_can_be_named_after_dynasty = no - set_can_use_nomadic_naming = no - } - - create_title_and_vassal_change = { - type = created - save_scope_as = change - add_claim_on_loss = no - } - scope:gok_title = { - change_title_holder = { - holder = root - change = scope:change - } - } - resolve_title_and_vassal_change = scope:change - scope:gok_title = { - if = { - limit = { - exists = root.house - } - set_coa = root.house - } - else = { - generate_coa = yes - } - } - assert_if = { - limit = { NOT = { exists = scope:gok_title } } - text = "Greatest of Khan's title was not created!" - } - } - - if = { - limit = { NOT = { has_realm_law = single_heir_succession_kurultai_law } } - add_realm_law_skip_effects = single_heir_succession_kurultai_law - } - - set_primary_title_to = scope:gok_title - every_held_title = { - limit = { - tier = tier_empire - NOT = { this = scope:gok_title } - } - scope:gok = { - destroy_title = prev - } - } - if = { - limit = { - exists = capital_county.empire - capital_county.empire = { - NOT = { - exists = holder - } - } - } - capital_county.empire = { - save_scope_as = old_gok_empire - every_in_de_jure_hierarchy = { - limit = { - tier = tier_kingdom - } - set_de_jure_liege_title = scope:gok_title - } - } - } - } - - - spawn_gok_troops_effect = yes - - set_global_variable = { - name = mongol_empire_has_spawned - value = yes - } -} - -spawn_gok_troops_effect = { - #Cultural MaA armies - random_list = { - #Mangudai armies - 2 = { - trigger = { - trigger_if = { - limit = { - exists = domicile.domicile_culture - } - domicile.domicile_culture = { - has_cultural_parameter = unlock_maa_mangudai - } - } - trigger_else = { - culture = { - has_cultural_parameter = unlock_maa_mangudai - } - } - } - spawn_army = { - uses_supply = no - inheritable = yes - name = gok_event_troops - men_at_arms = { - type = nomadic_riders - stacks = gok_nomadic_riders_large_value - } - men_at_arms = { - type = mangudai - stacks = gok_maa_largish_value - } - men_at_arms = { - type = mangudai - stacks = gok_maa_largish_value - } - men_at_arms = { - type = steppe_raiders - stacks = gok_maa_largish_value - } - men_at_arms = { - type = nomad_lancers - stacks = gok_maa_smallish_value - } - location = capital_province - origin = capital_province - } - spawn_army = { - uses_supply = no - inheritable = yes - name = gok_event_troops - men_at_arms = { - type = nomadic_riders - stacks = gok_nomadic_riders_large_value - } - men_at_arms = { - type = mangudai - stacks = gok_maa_largish_value - } - men_at_arms = { - type = mangudai - stacks = gok_maa_largish_value - } - men_at_arms = { - type = steppe_raiders - stacks = gok_maa_largish_value - } - men_at_arms = { - type = nomad_lancers - stacks = gok_maa_smallish_value - } - location = capital_province - origin = capital_province - } - } - #Cataphract archers armies - 2 = { - trigger = { - trigger_if = { - limit = { - exists = domicile.domicile_culture - } - domicile.domicile_culture = { - has_cultural_parameter = unlock_maa_cataphract_archers - } - } - trigger_else = { - culture = { - has_cultural_parameter = unlock_maa_cataphract_archers - } - } - } - spawn_army = { - uses_supply = no - inheritable = yes - name = gok_event_troops - men_at_arms = { - type = nomadic_riders - stacks = gok_nomadic_riders_large_value - } - men_at_arms = { - type = cataphract_archers - stacks = gok_maa_smallish_value - } - men_at_arms = { - type = cataphract_archers - stacks = gok_maa_smallish_value - } - men_at_arms = { - type = steppe_raiders - stacks = gok_maa_largish_value - } - men_at_arms = { - type = nomad_lancers - stacks = gok_maa_smallish_value - } - location = capital_province - origin = capital_province - } - spawn_army = { - uses_supply = no - inheritable = yes - name = gok_event_troops - men_at_arms = { - type = nomadic_riders - stacks = gok_nomadic_riders_large_value - } - men_at_arms = { - type = cataphract_archers - stacks = gok_maa_smallish_value - } - men_at_arms = { - type = cataphract_archers - stacks = gok_maa_smallish_value - } - men_at_arms = { - type = steppe_raiders - stacks = gok_maa_largish_value - } - men_at_arms = { - type = nomad_lancers - stacks = gok_maa_smallish_value - } - location = capital_province - origin = capital_province - } - } - #Maturkan warriors armies - 1 = { - trigger = { - trigger_if = { - limit = { - exists = domicile.domicile_culture - } - domicile.domicile_culture = { - has_cultural_parameter = unlock_maa_maturkan_warriors - } - } - trigger_else = { - culture = { - has_cultural_parameter = unlock_maa_maturkan_warriors - } - } - - } - spawn_army = { - uses_supply = no - inheritable = yes - name = gok_event_troops - men_at_arms = { - type = nomadic_riders - stacks = gok_nomadic_riders_large_value - } - men_at_arms = { - type = horse_archers - stacks = gok_maa_medium_value - } - men_at_arms = { - type = maturkan_warriors - stacks = gok_maa_large_value - } - men_at_arms = { - type = steppe_raiders - stacks = gok_maa_medium_value - } - men_at_arms = { - type = nomad_lancers - stacks = gok_maa_smallish_value - } - location = capital_province - origin = capital_province - } - spawn_army = { - uses_supply = no - inheritable = yes - name = gok_event_troops - men_at_arms = { - type = nomadic_riders - stacks = gok_nomadic_riders_large_value - } - men_at_arms = { - type = horse_archers - stacks = gok_maa_medium_value - } - men_at_arms = { - type = maturkan_warriors - stacks = gok_maa_large_value - } - men_at_arms = { - type = steppe_raiders - stacks = gok_maa_medium_value - } - men_at_arms = { - type = nomad_lancers - stacks = gok_maa_smallish_value - } - location = capital_province - origin = capital_province - } - } - #Mulathamun - 2 = { - trigger = { - trigger_if = { - limit = { - exists = domicile.domicile_culture - } - domicile.domicile_culture = { - has_cultural_parameter = unlock_maa_mulaththamun - } - } - trigger_else = { - culture = { - has_cultural_parameter = unlock_maa_mulaththamun - } - } - } - spawn_army = { - uses_supply = no - inheritable = yes - name = gok_event_troops - men_at_arms = { - type = nomadic_riders - stacks = gok_nomadic_riders_large_value - } - men_at_arms = { - type = horse_archers - stacks = gok_maa_largish_value - } - men_at_arms = { - type = mulaththamun - stacks = gok_maa_largish_value - } - men_at_arms = { - type = mulaththamun - stacks = gok_maa_largish_value - } - men_at_arms = { - type = nomad_lancers - stacks = gok_maa_smallish_value - } - location = capital_province - origin = capital_province - } - spawn_army = { - uses_supply = no - inheritable = yes - name = gok_event_troops - men_at_arms = { - type = nomadic_riders - stacks = gok_nomadic_riders_large_value - } - men_at_arms = { - type = horse_archers - stacks = gok_maa_largish_value - } - men_at_arms = { - type = mulaththamun - stacks = gok_maa_largish_value - } - men_at_arms = { - type = mulaththamun - stacks = gok_maa_largish_value - } - men_at_arms = { - type = nomad_lancers - stacks = gok_maa_smallish_value - } - location = capital_province - origin = capital_province - } - } - #Camel cavalry - 1 = { - trigger = { - trigger_if = { - limit = { - exists = domicile.domicile_culture - } - domicile.domicile_culture = { - has_innovation = innovation_war_camels - } - } - trigger_else = { - culture = { - has_innovation = innovation_war_camels - } - } - } - spawn_army = { - uses_supply = no - inheritable = yes - name = gok_event_troops - men_at_arms = { - type = nomadic_riders - stacks = gok_nomadic_riders_large_value - } - men_at_arms = { - type = horse_archers - stacks = gok_maa_largish_value - } - men_at_arms = { - type = camel_rider - stacks = gok_maa_large_value - } - men_at_arms = { - type = steppe_raiders - stacks = gok_maa_medium_value - } - men_at_arms = { - type = nomad_lancers - stacks = gok_maa_smallish_value - } - location = capital_province - origin = capital_province - } - spawn_army = { - uses_supply = no - inheritable = yes - name = gok_event_troops - men_at_arms = { - type = nomadic_riders - stacks = gok_nomadic_riders_large_value - } - men_at_arms = { - type = horse_archers - stacks = gok_maa_largish_value - } - men_at_arms = { - type = camel_rider - stacks = gok_maa_large_value - } - men_at_arms = { - type = steppe_raiders - stacks = gok_maa_medium_value - } - men_at_arms = { - type = nomad_lancers - stacks = gok_maa_smallish_value - } - location = capital_province - origin = capital_province - } - } - #Generic fallback - 1 = { - trigger = { - trigger_if = { - limit = { - exists = domicile.domicile_culture - } - domicile.domicile_culture = { - NOR = { - has_cultural_parameter = unlock_maa_mangudai - has_cultural_parameter = unlock_maa_cataphract_archers - has_cultural_parameter = unlock_maa_maturkan_warriors - has_cultural_parameter = unlock_maa_mulaththamun - has_innovation = innovation_war_camels - } - } - } - trigger_else = { - culture = { - NOR = { - has_cultural_parameter = unlock_maa_mangudai - has_cultural_parameter = unlock_maa_cataphract_archers - has_cultural_parameter = unlock_maa_maturkan_warriors - has_cultural_parameter = unlock_maa_mulaththamun - has_innovation = innovation_war_camels - } - } - } - } - spawn_army = { - uses_supply = no - inheritable = yes - name = gok_event_troops - men_at_arms = { - type = nomadic_riders - stacks = gok_nomadic_riders_large_value - } - men_at_arms = { - type = horse_archers - stacks = gok_maa_largish_value - } - men_at_arms = { - type = heavy_horse_archers - stacks = gok_maa_medium_value - } - men_at_arms = { - type = steppe_raiders - stacks = gok_maa_largish_value - } - men_at_arms = { - type = nomad_lancers - stacks = gok_maa_smallish_value - } - location = capital_province - origin = capital_province - } - spawn_army = { - uses_supply = no - inheritable = yes - name = gok_event_troops - men_at_arms = { - type = nomadic_riders - stacks = gok_nomadic_riders_large_value - } - men_at_arms = { - type = horse_archers - stacks = gok_maa_largish_value - } - men_at_arms = { - type = heavy_horse_archers - stacks = gok_maa_medium_value - } - men_at_arms = { - type = steppe_raiders - stacks = gok_maa_largish_value - } - men_at_arms = { - type = nomad_lancers - stacks = gok_maa_smallish_value - } - location = capital_province - origin = capital_province - } - } - } - #Siege weapon armies - #Bombards - if = { - limit = { - OR = { - any_maa_regiment = { - is_maa_type = bombard - } - trigger_if = { - limit = { - exists = domicile.domicile_culture - } - domicile.domicile_culture = { - has_innovation = innovation_gunpowder - } - } - culture = { - has_innovation = innovation_gunpowder - } - #Any neighbor - any_land_neighboring_realm_with_tributaries_owner = { - culture = { - has_innovation = innovation_gunpowder - } - } - #Any culture in same empire as realm - any_culture_global = { - any_culture_empire = { - any_de_jure_county = { - OR = { - holder.top_suzerain = root - holder.top_liege = root - } - } - } - has_innovation = innovation_gunpowder - } - } - } - spawn_army = { - uses_supply = no - inheritable = yes - name = gok_event_troops - men_at_arms = { - type = nomadic_riders - stacks = gok_nomadic_riders_small_value - } - men_at_arms = { - type = horse_archers - stacks = gok_maa_medium_value - } - men_at_arms = { - type = heavy_horse_archers - stacks = gok_maa_smallish_value - } - men_at_arms = { - type = steppe_raiders - stacks = gok_maa_medium_value - } - men_at_arms = { - type = nomad_lancers - stacks = gok_maa_small_value - } - men_at_arms = { - type = bombard - stacks = gok_maa_smallish_value - } - men_at_arms = { - type = bombard - stacks = gok_maa_smallish_value - } - location = capital_province - origin = capital_province - } - spawn_army = { - uses_supply = no - inheritable = yes - name = gok_event_troops - men_at_arms = { - type = nomadic_riders - stacks = gok_nomadic_riders_small_value - } - men_at_arms = { - type = horse_archers - stacks = gok_maa_medium_value - } - men_at_arms = { - type = heavy_horse_archers - stacks = gok_maa_smallish_value - } - men_at_arms = { - type = steppe_raiders - stacks = gok_maa_medium_value - } - men_at_arms = { - type = nomad_lancers - stacks = gok_maa_small_value - } - men_at_arms = { - type = bombard - stacks = gok_maa_smallish_value - } - men_at_arms = { - type = bombard - stacks = gok_maa_smallish_value - } - location = capital_province - origin = capital_province - } - } - #Trebuchets - else_if = { - limit = { - OR = { - any_maa_regiment = { - is_maa_type = trebuchet - } - trigger_if = { - limit = { - exists = domicile.domicile_culture - } - domicile.domicile_culture = { - has_innovation = innovation_trebuchet - } - } - culture = { - has_innovation = innovation_trebuchet - } - #Any neighbor - any_land_neighboring_realm_with_tributaries_owner = { - culture = { - has_innovation = innovation_trebuchet - } - } - #Any culture in same kingdom as realm - any_culture_global = { - any_culture_kingdom = { - any_de_jure_county = { - OR = { - holder.top_suzerain = root - holder.top_liege = root - } - } - } - has_innovation = innovation_trebuchet - } - } - } - spawn_army = { - uses_supply = no - inheritable = yes - name = gok_event_troops - men_at_arms = { - type = nomadic_riders - stacks = gok_nomadic_riders_small_value - } - men_at_arms = { - type = horse_archers - stacks = gok_maa_medium_value - } - men_at_arms = { - type = heavy_horse_archers - stacks = gok_maa_smallish_value - } - men_at_arms = { - type = steppe_raiders - stacks = gok_maa_medium_value - } - men_at_arms = { - type = nomad_lancers - stacks = gok_maa_small_value - } - men_at_arms = { - type = trebuchet - stacks = gok_maa_smallish_value - } - men_at_arms = { - type = trebuchet - stacks = gok_maa_smallish_value - } - location = capital_province - origin = capital_province - } - spawn_army = { - uses_supply = no - inheritable = yes - name = gok_event_troops - men_at_arms = { - type = nomadic_riders - stacks = gok_nomadic_riders_small_value - } - men_at_arms = { - type = horse_archers - stacks = gok_maa_medium_value - } - men_at_arms = { - type = heavy_horse_archers - stacks = gok_maa_smallish_value - } - men_at_arms = { - type = steppe_raiders - stacks = gok_maa_medium_value - } - men_at_arms = { - type = nomad_lancers - stacks = gok_maa_small_value - } - men_at_arms = { - type = trebuchet - stacks = gok_maa_smallish_value - } - men_at_arms = { - type = trebuchet - stacks = gok_maa_smallish_value - } - location = capital_province - origin = capital_province - } - } - #Mangonels - else_if = { - limit = { - OR = { - any_maa_regiment = { - is_maa_type = mangonel - } - trigger_if = { - limit = { - exists = domicile.domicile_culture - } - domicile.domicile_culture = { - has_innovation = innovation_mangonel - } - } - culture = { - has_innovation = innovation_mangonel - } - #Any neighbor - any_land_neighboring_realm_with_tributaries_owner = { - culture = { - has_innovation = innovation_mangonel - } - } - #Any culture in same kingdom as realm - any_culture_global = { - any_culture_kingdom = { - any_de_jure_county = { - OR = { - holder.top_suzerain = root - holder.top_liege = root - } - } - } - has_innovation = innovation_mangonel - } - } - } - spawn_army = { - uses_supply = no - inheritable = yes - name = gok_event_troops - men_at_arms = { - type = nomadic_riders - stacks = gok_nomadic_riders_small_value - } - men_at_arms = { - type = horse_archers - stacks = gok_maa_medium_value - } - men_at_arms = { - type = heavy_horse_archers - stacks = gok_maa_smallish_value - } - men_at_arms = { - type = steppe_raiders - stacks = gok_maa_medium_value - } - men_at_arms = { - type = nomad_lancers - stacks = gok_maa_small_value - } - men_at_arms = { - type = mangonel - stacks = gok_maa_smallish_value - } - men_at_arms = { - type = mangonel - stacks = gok_maa_smallish_value - } - location = capital_province - origin = capital_province - } - spawn_army = { - uses_supply = no - inheritable = yes - name = gok_event_troops - men_at_arms = { - type = nomadic_riders - stacks = gok_nomadic_riders_small_value - } - men_at_arms = { - type = horse_archers - stacks = gok_maa_medium_value - } - men_at_arms = { - type = heavy_horse_archers - stacks = gok_maa_smallish_value - } - men_at_arms = { - type = steppe_raiders - stacks = gok_maa_medium_value - } - men_at_arms = { - type = nomad_lancers - stacks = gok_maa_small_value - } - men_at_arms = { - type = mangonel - stacks = gok_maa_smallish_value - } - men_at_arms = { - type = mangonel - stacks = gok_maa_smallish_value - } - location = capital_province - origin = capital_province - } - } - #Onagers (sorry) - else = { - spawn_army = { - uses_supply = no - inheritable = yes - name = gok_event_troops - men_at_arms = { - type = nomadic_riders - stacks = gok_nomadic_riders_small_value - } - men_at_arms = { - type = horse_archers - stacks = gok_maa_medium_value - } - men_at_arms = { - type = heavy_horse_archers - stacks = gok_maa_smallish_value - } - men_at_arms = { - type = steppe_raiders - stacks = gok_maa_medium_value - } - men_at_arms = { - type = nomad_lancers - stacks = gok_maa_small_value - } - men_at_arms = { - type = onager - stacks = gok_maa_smallish_value - } - men_at_arms = { - type = onager - stacks = gok_maa_smallish_value - } - location = capital_province - origin = capital_province - } - spawn_army = { - uses_supply = no - inheritable = yes - name = gok_event_troops - men_at_arms = { - type = nomadic_riders - stacks = gok_nomadic_riders_small_value - } - men_at_arms = { - type = horse_archers - stacks = gok_maa_medium_value - } - men_at_arms = { - type = heavy_horse_archers - stacks = gok_maa_smallish_value - } - men_at_arms = { - type = steppe_raiders - stacks = gok_maa_medium_value - } - men_at_arms = { - type = nomad_lancers - stacks = gok_maa_small_value - } - men_at_arms = { - type = onager - stacks = gok_maa_smallish_value - } - men_at_arms = { - type = onager - stacks = gok_maa_smallish_value - } - location = capital_province - origin = capital_province - } - } -} - -mpo_gok_war_of_defiance_cleanup_effect = { - scope:defender = { - remove_character_modifier = aspiring_great_khan_modifier - } -} - -mpo_find_powerful_opponent_for_gurkhan_effect = { - #Ok we're going to save all the valid options to a list and then pick the strongest of them - #Neighbors - every_land_neighboring_realm_with_tributaries_owner = { - limit = { - mpo_gok_coalition_member_trigger = yes - } - add_to_list = potential_gok_opponents - } - #All valid suzerains of neighbors - every_land_neighboring_realm_with_tributaries_owner = { - limit = { - is_tributary = yes - top_suzerain = { - mpo_gok_coalition_member_trigger = yes - } - } - top_suzerain = { - add_to_list = potential_gok_opponents - } - } - #People who hate you - every_relation = { - type = rival - limit = { - is_ruler = yes - mpo_gok_coalition_member_trigger = yes - } - add_to_list = potential_gok_opponents - } - #Those within same de jure empire - capital_county ?= { - empire = { - every_de_jure_county = { - limit = { - holder.top_Liege = { - mpo_gok_coalition_member_trigger = yes - } - } - holder.top_liege = { - add_to_list = potential_gok_opponents - } - } - every_de_jure_county = { - limit = { - holder.top_suzerain = { - mpo_gok_coalition_member_trigger = yes - } - } - holder.top_suzerain = { - add_to_list = potential_gok_opponents - } - } - } - } - #Those with capital within range - #Have to do a fallback in case everyone's military strength hasn't been calc'd yet - if = { - limit = { - any_independent_ruler = { - current_military_strength > 0 - } - } - every_independent_ruler = { - limit = { - highest_held_title_tier >= tier_duchy - exists = root.capital_county - realm_to_title_distance_squared = { - target = root.capital_county - value <= squared_distance_almost_massive - } - - mpo_gok_coalition_member_trigger = yes - } - add_to_list = potential_gok_opponents - } - } - else = { - every_independent_ruler = { - limit = { - highest_held_title_tier >= tier_duchy - exists = root.capital_county - realm_to_title_distance_squared = { - target = root.capital_county - value <= squared_distance_almost_massive - } - mpo_gok_coalition_member_trigger = yes - } - add_to_list = potential_gok_opponents - } - } - #Ideally we find someone at least half as strong as the Gurkhan... - if = { - limit = { - NOT = { - any_in_list = { - list = potential_gok_opponents - #THIS SHOULD CHECK THEIR STRENGTH IS MORE THAN HALF ROOT'S - confederation_worthy_foe_strength_ratio_value_root <= 2 - } - } - } - #expand search radius - if = { - limit = { - any_independent_ruler = { - current_military_strength > 0 - } - } - every_independent_ruler = { - limit = { - highest_held_title_tier >= tier_duchy - exists = root.capital_county - realm_to_title_distance_squared = { - target = root.capital_county - value <= squared_distance_massive - } - - mpo_gok_coalition_member_trigger = yes - } - add_to_list = potential_gok_opponents - } - } - else = { - every_independent_ruler = { - limit = { - highest_held_title_tier >= tier_duchy - exists = root.capital_county - realm_to_title_distance_squared = { - target = root.capital_county - value <= squared_distance_massive - } - mpo_gok_coalition_member_trigger = yes - } - add_to_list = potential_gok_opponents - } - } - } - if = { - limit = { - any_in_list = { - list = potential_gok_opponents - current_military_strength > 0 - } - } - ordered_in_list = { - list = potential_gok_opponents - limit = { - NOT = { - this = root - } - } - order_by = current_military_strength - add_to_list = anti_gok_coalition_members - save_scope_as = gok_opponent - } - } - else = { - ordered_in_list = { - list = potential_gok_opponents - limit = { - NOT = { - this = root - } - } - order_by = sub_realm_size - add_to_list = anti_gok_coalition_members - save_scope_as = gok_opponent - } - } -} - -gok_war_of_defiance_heir_transfer_effect = { - if = { - limit = { - has_variable = fought_for_gok_alone - } - save_scope_value_as = { - name = fought_for_gok_alone_value - value = var:fought_for_gok_alone - } - primary_heir = { - set_variable = { - name = fought_for_gok_alone - value = scope:fought_for_gok_alone_value - } - } - } -} - -mpo_gok_offer_submission_effect = { - #Give tribute/troops before potentially losing title - scope:recipient = { - #Payments from demand payments - #Costs more for those who aren't paying increased taxes - if = { - limit = { - NOR = { - government_has_flag = government_is_feudal - government_has_flag = government_is_nomadic - government_has_flag = government_is_herder - } - } - if = { - limit = { - scope:send_tribute = yes - } - pay_short_term_gold = { - target = scope:actor - gold = monumental_gold_value - } - } - else_if = { - limit = { - NOT = { scope:low_obligations = yes } - } - pay_short_term_gold = { - target = scope:actor - gold = major_gold_value - } - } - } - else_if = { - limit = { - government_has_flag = government_is_nomadic - scope:actor = { - government_has_flag = government_is_nomadic - } - scope:send_tribute = yes - } - pay_herd = { - target = scope:actor - value = domicile.massive_herd_value - } - } - else_if = { - limit = { - scope:send_tribute = yes - } - pay_short_term_gold = { - target = scope:actor - gold = massive_gold_value - } - } - #special soldiers - #Pay some gold or herd to signify giving them up - if = { - limit = { - OR = { - scope:send_army = yes - scope:send_siege_weapons = yes - } - } - if = { - limit = { - government_has_flag = government_is_nomadic - } - domicile = { - change_herd = medium_herd_loss - } - } - else_if = { - limit = { - government_has_flag = government_is_tribal - } - add_prestige = medium_prestige_loss - } - else = { - remove_short_term_gold = medium_gold_value - } - } - if = { - limit = { - scope:send_army = yes - } - scope:actor = { - gok_spawn_subjugated_quality_army_effect = { CHARACTER = scope:recipient } - } - } - if = { - limit = { - scope:send_siege_weapons = yes - } - scope:actor = { - gok_spawn_subjugated_siege_army_effect = { CHARACTER = scope:recipient } - } - } - } - - #If emperor... loses titles - if = { - limit = { - scope:recipient = { - highest_held_title_tier >= tier_empire - } - } - scope:recipient = { - hidden_effect = { - every_vassal = { - limit = { - highest_held_title_tier = tier_kingdom - } - create_title_and_vassal_change = { - type = swear_fealty - save_scope_as = change - } - change_liege = { - liege = scope:actor - change = scope:change - } - add_opinion = { - modifier = became_vassal - target = scope:actor - opinion = 10 - } - resolve_title_and_vassal_change = scope:change - } - } - #Have to grant them a kingdom if they don't have any... - if = { - limit = { - NOT = { - any_held_title = { - tier = tier_kingdom - } - } - } - if = { - limit = { - capital_county.kingdom ?= { - NOT = { - exists = holder - } - } - } - create_title_and_vassal_change = { - type = created - save_scope_as = change - add_claim_on_loss = no - } - capital_county.kingdom = { - change_title_holder = { - holder = scope:recipient - change = scope:change - } - } - resolve_title_and_vassal_change = scope:change - } - else = { - primary_title = { - save_scope_as = old_title - } - hidden_effect = { - #create some bullshit kingdom - create_dynamic_title = { - tier = kingdom - name = GOK_SUBJECT_TITLE_NAME - adj = GOK_SUBJECT_TITLE_NAME_ADJ - article = article_CONFEDERATION_CULTURE_NAME - } - scope:new_title = { - set_color_from_title = scope:recipient.capital_county - set_definitive_form = yes - generate_coa = yes - } - create_title_and_vassal_change = { - type = created - save_scope_as = change - add_claim_on_loss = no - } - scope:new_title = { - change_title_holder = { - holder = scope:recipient - change = scope:change - } - } - resolve_title_and_vassal_change = scope:change - } - } - } - every_held_title = { - limit = { - tier >= tier_empire - } - scope:recipient = { - destroy_title = prev - } - } - } - } - - create_title_and_vassal_change = { - type = swear_fealty - save_scope_as = change - } - scope:recipient = { - change_liege = { - liege = scope:actor - change = scope:change - } - hidden_effect = { - add_opinion = { - modifier = became_vassal - target = scope:actor - opinion = 10 - } - } - } - resolve_title_and_vassal_change = scope:change - - #If GoK is a pluralist, they always get religious freedom - scope:recipient = { - if = { - limit = { - #Actor is still nomadic or pluralist and thus doesn't care about religion - scope:actor = { - faith = { - has_doctrine = doctrine_pluralism_pluralistic - } - } - OR = { - government_has_flag = government_is_feudal - government_has_flag = government_is_clan - } - } - hidden_effect = { - if = { - limit = { is_independent_ruler = no } # To avoid errors during tooltip generation (prior to the contract being generated) - vassal_contract_set_obligation_level = { type = religious_rights level = 1 } - } - } - custom_tooltip = religious_protection_tt - } - } - - # Special terms for feudal contracts - scope:recipient = { - if = { - limit = { - government_has_flag = government_is_feudal - } - if = { - limit = { - scope:send_tribute = yes - } - hidden_effect = { - if = { - limit = { is_independent_ruler = no } # To avoid errors during tooltip generation (prior to the contract being generated) - vassal_contract_set_obligation_level = { type = feudal_government_taxes level = 3 } - vassal_contract_set_obligation_level = { type = feudal_government_levies level = 3 } - } - } - custom_tooltip = high_obligations_taxes - custom_tooltip = high_obligations_levies - } - else_if = { - limit = { scope:low_obligations = yes } - hidden_effect = { - if = { - limit = { is_independent_ruler = no } # To avoid errors during tooltip generation (prior to the contract being generated) - vassal_contract_set_obligation_level = { type = feudal_government_taxes level = 1 } - vassal_contract_set_obligation_level = { type = feudal_government_levies level = 1 } - } - } - custom_tooltip = low_obligations_taxes - custom_tooltip = low_obligations_levies - } - else = { - hidden_effect = { - if = { - limit = { is_independent_ruler = no } # To avoid errors during tooltip generation (prior to the contract being generated) - vassal_contract_set_obligation_level = { type = feudal_government_taxes level = 2 } - vassal_contract_set_obligation_level = { type = feudal_government_levies level = 2 } - } - } - custom_tooltip = normal_obligations_taxes - custom_tooltip = normal_obligations_levies - } - } - else_if = { - limit = { - government_has_flag = government_is_nomadic - } - if = { - limit = { - scope:send_tribute = yes - } - hidden_effect = { - if = { - limit = { is_independent_ruler = no } # To avoid errors during tooltip generation (prior to the contract being generated) - vassal_contract_set_obligation_level = { type = nomad_government_herd level = 3 } - } - } - custom_tooltip = high_obligations_herds - } - else_if = { - limit = { scope:low_obligations = yes } - hidden_effect = { - if = { - limit = { is_independent_ruler = no } # To avoid errors during tooltip generation (prior to the contract being generated) - vassal_contract_set_obligation_level = { type = nomad_government_herd level = 1 } - } - } - custom_tooltip = low_obligations_herds - } - else = { - hidden_effect = { - if = { - limit = { is_independent_ruler = no } # To avoid errors during tooltip generation (prior to the contract being generated) - vassal_contract_set_obligation_level = { type = nomad_government_herd level = 2 } - } - } - custom_tooltip = normal_obligations_herds - } - } - } - - # Struggle catalysts. - hidden_effect = { - fp3_struggle_apply_independent_vassalage_catalyst_effect = { - NEW_LIEGE = scope:actor - NEW_VASSAL = scope:recipient - } - } -} - -mpo_gok_offer_submission_refusal_effect = { - save_scope_as = actor - start_war = { - cb = mpo_gok_onslaught_cb - target = scope:recipient - target_title = scope:recipient.primary_title - } - custom_tooltip = gok_on_victory_tt - show_as_tooltip = { - rightfully_imprison_character_less_verbose_effect = { - TARGET = scope:recipient - IMPRISONER = scope:actor - } - } - custom_tooltip = gok_ruin_additional_destruction_tt - custom_tooltip = gok_gain_dread_tt - if = { - limit = { - government_has_flag = government_is_nomadic - scope:recipient.capital_county = { - any_county_province = { - OR = { - has_holding_type = nomad_holding - has_holding_type = herder_holding - } - } - } - } - custom_tooltip = gok_gain_herd_tt - } - else = { - custom_tooltip = gok_gain_gold_tt - } - if = { - limit = { - scope:send_army = yes - } - save_scope_as = requested_quality_army - custom_tooltip = gok_cb_event_troops_quality_tt - } - else_if = { - limit = { - scope:send_siege_weapons = yes - } - save_scope_as = requested_siege_army - custom_tooltip = gok_cb_event_troops_siege_tt - } - else = { - custom_tooltip = gok_cb_event_troops_tt - } - - custom_tooltip = gok_offer_submission_acceptance_bonus_tt - scope:recipient.primary_title = { - set_variable = { - name = refused_submission - value = yes - } - } -} - -gok_spawn_subjugated_siege_army_effect = { - $CHARACTER$ = { save_scope_as = army_giver } - custom_tooltip = gok_siege_army_gain_tt - if = { - limit = { - exists = $CHARACTER$.primary_title - } - $CHARACTER$.primary_title = { - save_scope_as = army_origin_realm - } - } - else = { - $CHARACTER$.location.county.kingdom = { - save_scope_as = army_origin_realm - } - } - hidden_effect = { - #TGP Cannon - if = { - limit = {#Bombards - OR = { - $CHARACTER$.culture = { - has_innovation = innovation_gunpowder - OR = { - has_cultural_pillar = heritage_chinese - has_cultural_pillar = heritage_korean - has_cultural_pillar = heritage_japonic - } - } - $CHARACTER$.capital_county.culture ?= { - has_innovation = innovation_gunpowder - OR = { - has_cultural_pillar = heritage_chinese - has_cultural_pillar = heritage_korean - has_cultural_pillar = heritage_japonic - } - } - } - } - random_list = { - #Heavy Infantry - 1 = { - trigger = { - OR = { - $CHARACTER$.culture = { - has_innovation = innovation_quilted_armor - } - $CHARACTER$.capital_county.culture ?= { - has_innovation = innovation_quilted_armor - } - } - } - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_base_type = { - type = heavy_infantry - value > 0 - } - } - add = 10 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_heavy_infantry_maa = yes - } - add = 10 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_heavy_infantry_maa = yes - } - add = 10 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = armored_footmen - stacks = gok_subjugated_army_maa_value_very_small - } - men_at_arms = { - type = cannon - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Pikemen - 1 = { - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_base_type = { - type = pikemen - value > 0 - } - } - add = 10 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_pikemen_maa = yes - } - add = 10 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_pikemen_maa = yes - } - add = 10 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = pikemen_unit - stacks = gok_subjugated_army_maa_value_very_small - } - men_at_arms = { - type = cannon - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Crossbowmen - 1 = { - trigger = { - OR = { - $CHARACTER$.culture = { - has_innovation = innovation_advanced_bowmaking - } - $CHARACTER$.capital_county.culture ?= { - has_innovation = innovation_advanced_bowmaking - } - } - } - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_type = { - target = crossbowmen - value > 0 - } - } - add = 10 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_archer_maa = yes - } - add = 10 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_archer_maa = yes - } - add = 10 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = crossbowmen - stacks = gok_subjugated_army_maa_value_very_small - } - men_at_arms = { - type = cannon - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Light Cavalry - 1 = { - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_base_type = { - type = light_cavalry - value > 0 - } - } - add = 10 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_light_cavalry_maa = yes - } - add = 10 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_light_cavalry_maa = yes - } - add = 10 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = light_horsemen - stacks = gok_subjugated_army_maa_value_very_small - } - men_at_arms = { - type = cannon - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Bowmen - 1 = { - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_base_type = { - type = archers - value > 0 - } - } - add = 10 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_archer_maa = yes - } - add = 10 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_archer_maa = yes - } - add = 10 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = bowmen - stacks = gok_subjugated_army_maa_value_small - } - men_at_arms = { - type = cannon - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Light Footmen - 1 = { - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_base_type = { - type = skirmishers - value > 0 - } - } - add = 10 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_skirmisher_maa = yes - } - add = 10 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_skirmisher_maa = yes - } - add = 10 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = light_footmen - stacks = gok_subjugated_army_maa_value_small - } - men_at_arms = { - type = cannon - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - } - } - #Non-TGP Bombard - else_if = { - limit = {#Bombards - OR = { - $CHARACTER$.culture = { - has_innovation = innovation_gunpowder - } - $CHARACTER$.capital_county.culture ?= { - has_innovation = innovation_gunpowder - } - } - } - random_list = { - #Heavy Infantry - 1 = { - trigger = { - OR = { - $CHARACTER$.culture = { - has_innovation = innovation_quilted_armor - } - $CHARACTER$.capital_county.culture ?= { - has_innovation = innovation_quilted_armor - } - } - } - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_base_type = { - type = heavy_infantry - value > 0 - } - } - add = 10 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_heavy_infantry_maa = yes - } - add = 10 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_heavy_infantry_maa = yes - } - add = 10 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = armored_footmen - stacks = gok_subjugated_army_maa_value_very_small - } - men_at_arms = { - type = bombard - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Pikemen - 1 = { - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_base_type = { - type = pikemen - value > 0 - } - } - add = 10 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_pikemen_maa = yes - } - add = 10 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_pikemen_maa = yes - } - add = 10 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = pikemen_unit - stacks = gok_subjugated_army_maa_value_very_small - } - men_at_arms = { - type = bombard - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Crossbowmen - 1 = { - trigger = { - OR = { - $CHARACTER$.culture = { - has_innovation = innovation_advanced_bowmaking - } - $CHARACTER$.capital_county.culture ?= { - has_innovation = innovation_advanced_bowmaking - } - } - } - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_type = { - target = crossbowmen - value > 0 - } - } - add = 10 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_archer_maa = yes - } - add = 10 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_archer_maa = yes - } - add = 10 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = crossbowmen - stacks = gok_subjugated_army_maa_value_very_small - } - men_at_arms = { - type = bombard - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Light Cavalry - 1 = { - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_base_type = { - type = light_cavalry - value > 0 - } - } - add = 10 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_light_cavalry_maa = yes - } - add = 10 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_light_cavalry_maa = yes - } - add = 10 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = light_horsemen - stacks = gok_subjugated_army_maa_value_very_small - } - men_at_arms = { - type = bombard - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Bowmen - 1 = { - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_base_type = { - type = archers - value > 0 - } - } - add = 10 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_archer_maa = yes - } - add = 10 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_archer_maa = yes - } - add = 10 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = bowmen - stacks = gok_subjugated_army_maa_value_small - } - men_at_arms = { - type = bombard - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Light Footmen - 1 = { - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_base_type = { - type = skirmishers - value > 0 - } - } - add = 10 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_skirmisher_maa = yes - } - add = 10 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_skirmisher_maa = yes - } - add = 10 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = light_footmen - stacks = gok_subjugated_army_maa_value_small - } - men_at_arms = { - type = bombard - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - } - } - #Siege Towers - else_if = { - limit = { - OR = { - $CHARACTER$.culture = { - has_innovation = innovation_trebuchet - OR = { - has_cultural_pillar = heritage_chinese - has_cultural_pillar = heritage_korean - has_cultural_pillar = heritage_japonic - } - } - $CHARACTER$.capital_county.culture ?= { - has_innovation = innovation_trebuchet - OR = { - has_cultural_pillar = heritage_chinese - has_cultural_pillar = heritage_korean - has_cultural_pillar = heritage_japonic - } - } - } - } - random_list = { - #Heavy Infantry - 1 = { - trigger = { - OR = { - $CHARACTER$.culture = { - has_innovation = innovation_quilted_armor - } - $CHARACTER$.capital_county.culture ?= { - has_innovation = innovation_quilted_armor - } - } - } - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_base_type = { - type = heavy_infantry - value > 0 - } - } - add = 10 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_heavy_infantry_maa = yes - } - add = 10 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_heavy_infantry_maa = yes - } - add = 10 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = armored_footmen - stacks = gok_subjugated_army_maa_value_very_small - } - men_at_arms = { - type = siege_tower - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Pikemen - 1 = { - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_base_type = { - type = pikemen - value > 0 - } - } - add = 10 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_pikemen_maa = yes - } - add = 10 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_pikemen_maa = yes - } - add = 10 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = pikemen_unit - stacks = gok_subjugated_army_maa_value_very_small - } - men_at_arms = { - type = siege_tower - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Crossbowmen - 1 = { - trigger = { - OR = { - $CHARACTER$.culture = { - has_innovation = innovation_advanced_bowmaking - } - $CHARACTER$.capital_county.culture ?= { - has_innovation = innovation_advanced_bowmaking - } - } - } - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_type = { - target = crossbowmen - value > 0 - } - } - add = 10 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_archer_maa = yes - } - add = 10 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_archer_maa = yes - } - add = 10 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = crossbowmen - stacks = gok_subjugated_army_maa_value_very_small - } - men_at_arms = { - type = siege_tower - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Light Cavalry - 1 = { - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_base_type = { - type = light_cavalry - value > 0 - } - } - add = 10 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_light_cavalry_maa = yes - } - add = 10 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_light_cavalry_maa = yes - } - add = 10 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = light_horsemen - stacks = gok_subjugated_army_maa_value_very_small - } - men_at_arms = { - type = siege_tower - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Bowmen - 1 = { - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_base_type = { - type = archers - value > 0 - } - } - add = 10 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_archer_maa = yes - } - add = 10 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_archer_maa = yes - } - add = 10 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = bowmen - stacks = gok_subjugated_army_maa_value_small - } - men_at_arms = { - type = siege_tower - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Light Footmen - 1 = { - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_base_type = { - type = skirmishers - value > 0 - } - } - add = 10 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_skirmisher_maa = yes - } - add = 10 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_skirmisher_maa = yes - } - add = 10 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = light_footmen - stacks = gok_subjugated_army_maa_value_small - } - men_at_arms = { - type = siege_tower - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - } - } - #Trebuchets - else_if = { - limit = { - OR = { - $CHARACTER$.culture = { - has_innovation = innovation_trebuchet - } - $CHARACTER$.capital_county.culture ?= { - has_innovation = innovation_trebuchet - } - } - } - random_list = { - #Heavy Infantry - 1 = { - trigger = { - OR = { - $CHARACTER$.culture = { - has_innovation = innovation_quilted_armor - } - $CHARACTER$.capital_county.culture ?= { - has_innovation = innovation_quilted_armor - } - } - } - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_base_type = { - type = heavy_infantry - value > 0 - } - } - add = 10 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_heavy_infantry_maa = yes - } - add = 10 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_heavy_infantry_maa = yes - } - add = 10 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = armored_footmen - stacks = gok_subjugated_army_maa_value_very_small - } - men_at_arms = { - type = trebuchet - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Pikemen - 1 = { - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_base_type = { - type = pikemen - value > 0 - } - } - add = 10 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_pikemen_maa = yes - } - add = 10 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_pikemen_maa = yes - } - add = 10 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = pikemen_unit - stacks = gok_subjugated_army_maa_value_very_small - } - men_at_arms = { - type = trebuchet - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Crossbowmen - 1 = { - trigger = { - OR = { - $CHARACTER$.culture = { - has_innovation = innovation_advanced_bowmaking - } - $CHARACTER$.capital_county.culture ?= { - has_innovation = innovation_advanced_bowmaking - } - } - } - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_type = { - target = crossbowmen - value > 0 - } - } - add = 10 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_archer_maa = yes - } - add = 10 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_archer_maa = yes - } - add = 10 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = crossbowmen - stacks = gok_subjugated_army_maa_value_very_small - } - men_at_arms = { - type = trebuchet - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Light Cavalry - 1 = { - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_base_type = { - type = light_cavalry - value > 0 - } - } - add = 10 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_light_cavalry_maa = yes - } - add = 10 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_light_cavalry_maa = yes - } - add = 10 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = light_horsemen - stacks = gok_subjugated_army_maa_value_very_small - } - men_at_arms = { - type = trebuchet - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Bowmen - 1 = { - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_base_type = { - type = archers - value > 0 - } - } - add = 10 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_archer_maa = yes - } - add = 10 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_archer_maa = yes - } - add = 10 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = bowmen - stacks = gok_subjugated_army_maa_value_small - } - men_at_arms = { - type = trebuchet - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Light Footmen - 1 = { - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_base_type = { - type = skirmishers - value > 0 - } - } - add = 10 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_skirmisher_maa = yes - } - add = 10 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_skirmisher_maa = yes - } - add = 10 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = light_footmen - stacks = gok_subjugated_army_maa_value_small - } - men_at_arms = { - type = trebuchet - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - } - } - #Cloud Ladder - else_if = { - limit = { - OR = { - $CHARACTER$.culture = { - has_innovation = innovation_mangonel - OR = { - has_cultural_pillar = heritage_chinese - has_cultural_pillar = heritage_korean - has_cultural_pillar = heritage_japonic - } - } - $CHARACTER$.capital_county.culture ?= { - has_innovation = innovation_mangonel - OR = { - has_cultural_pillar = heritage_chinese - has_cultural_pillar = heritage_korean - has_cultural_pillar = heritage_japonic - } - } - } - } - random_list = { - #Heavy Infantry - 1 = { - trigger = { - OR = { - $CHARACTER$.culture = { - has_innovation = innovation_quilted_armor - } - $CHARACTER$.capital_county.culture ?= { - has_innovation = innovation_quilted_armor - } - } - } - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_base_type = { - type = heavy_infantry - value > 0 - } - } - add = 10 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_heavy_infantry_maa = yes - } - add = 10 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_heavy_infantry_maa = yes - } - add = 10 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = armored_footmen - stacks = gok_subjugated_army_maa_value_very_small - } - men_at_arms = { - type = cloud_ladder - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Pikemen - 1 = { - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_base_type = { - type = pikemen - value > 0 - } - } - add = 10 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_pikemen_maa = yes - } - add = 10 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_pikemen_maa = yes - } - add = 10 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = pikemen_unit - stacks = gok_subjugated_army_maa_value_very_small - } - men_at_arms = { - type = cloud_ladder - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Crossbowmen - 1 = { - trigger = { - OR = { - $CHARACTER$.culture = { - has_innovation = innovation_advanced_bowmaking - } - $CHARACTER$.capital_county.culture ?= { - has_innovation = innovation_advanced_bowmaking - } - } - } - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_type = { - target = crossbowmen - value > 0 - } - } - add = 10 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_archer_maa = yes - } - add = 10 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_archer_maa = yes - } - add = 10 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = crossbowmen - stacks = gok_subjugated_army_maa_value_very_small - } - men_at_arms = { - type = cloud_ladder - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Light Cavalry - 1 = { - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_base_type = { - type = light_cavalry - value > 0 - } - } - add = 10 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_light_cavalry_maa = yes - } - add = 10 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_light_cavalry_maa = yes - } - add = 10 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = light_horsemen - stacks = gok_subjugated_army_maa_value_very_small - } - men_at_arms = { - type = cloud_ladder - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Bowmen - 1 = { - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_base_type = { - type = archers - value > 0 - } - } - add = 10 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_archer_maa = yes - } - add = 10 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_archer_maa = yes - } - add = 10 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = bowmen - stacks = gok_subjugated_army_maa_value_small - } - men_at_arms = { - type = cloud_ladder - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Light Footmen - 1 = { - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_base_type = { - type = skirmishers - value > 0 - } - } - add = 10 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_skirmisher_maa = yes - } - add = 10 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_skirmisher_maa = yes - } - add = 10 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = light_footmen - stacks = gok_subjugated_army_maa_value_small - } - men_at_arms = { - type = cloud_ladder - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - } - } - #Mangonel - else_if = { - limit = { - OR = { - $CHARACTER$.culture = { - has_innovation = innovation_mangonel - } - $CHARACTER$.capital_county.culture ?= { - has_innovation = innovation_mangonel - } - } - } - random_list = { - #Heavy Infantry - 1 = { - trigger = { - OR = { - $CHARACTER$.culture = { - has_innovation = innovation_quilted_armor - } - $CHARACTER$.capital_county.culture ?= { - has_innovation = innovation_quilted_armor - } - } - } - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_base_type = { - type = heavy_infantry - value > 0 - } - } - add = 10 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_heavy_infantry_maa = yes - } - add = 10 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_heavy_infantry_maa = yes - } - add = 10 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = armored_footmen - stacks = gok_subjugated_army_maa_value_very_small - } - men_at_arms = { - type = mangonel - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Pikemen - 1 = { - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_base_type = { - type = pikemen - value > 0 - } - } - add = 10 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_pikemen_maa = yes - } - add = 10 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_pikemen_maa = yes - } - add = 10 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = pikemen_unit - stacks = gok_subjugated_army_maa_value_very_small - } - men_at_arms = { - type = mangonel - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Crossbowmen - 1 = { - trigger = { - OR = { - $CHARACTER$.culture = { - has_innovation = innovation_advanced_bowmaking - } - $CHARACTER$.capital_county.culture ?= { - has_innovation = innovation_advanced_bowmaking - } - } - } - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_type = { - target = crossbowmen - value > 0 - } - } - add = 10 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_archer_maa = yes - } - add = 10 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_archer_maa = yes - } - add = 10 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = crossbowmen - stacks = gok_subjugated_army_maa_value_very_small - } - men_at_arms = { - type = mangonel - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Light Cavalry - 1 = { - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_base_type = { - type = light_cavalry - value > 0 - } - } - add = 10 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_light_cavalry_maa = yes - } - add = 10 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_light_cavalry_maa = yes - } - add = 10 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = light_horsemen - stacks = gok_subjugated_army_maa_value_very_small - } - men_at_arms = { - type = mangonel - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Bowmen - 1 = { - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_base_type = { - type = archers - value > 0 - } - } - add = 10 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_archer_maa = yes - } - add = 10 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_archer_maa = yes - } - add = 10 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = bowmen - stacks = gok_subjugated_army_maa_value_small - } - men_at_arms = { - type = mangonel - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Light Footmen - 1 = { - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_base_type = { - type = skirmishers - value > 0 - } - } - add = 10 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_skirmisher_maa = yes - } - add = 10 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_skirmisher_maa = yes - } - add = 10 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = light_footmen - stacks = gok_subjugated_army_maa_value_small - } - men_at_arms = { - type = mangonel - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - } - } - #Ballista - but not the Byz one - else_if = { - limit = { - OR = { - $CHARACTER$.culture = { - OR = { - has_cultural_pillar = heritage_chinese - has_cultural_pillar = heritage_korean - has_cultural_pillar = heritage_japonic - } - } - $CHARACTER$.capital_county.culture ?= { - OR = { - has_cultural_pillar = heritage_chinese - has_cultural_pillar = heritage_korean - has_cultural_pillar = heritage_japonic - } - } - } - } - random_list = { - #Heavy Infantry - 1 = { - trigger = { - OR = { - $CHARACTER$.culture = { - has_innovation = innovation_quilted_armor - } - $CHARACTER$.capital_county.culture ?= { - has_innovation = innovation_quilted_armor - } - } - } - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_base_type = { - type = heavy_infantry - value > 0 - } - } - add = 10 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_heavy_infantry_maa = yes - } - add = 10 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_heavy_infantry_maa = yes - } - add = 10 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = armored_footmen - stacks = gok_subjugated_army_maa_value_very_small - } - men_at_arms = { - type = ballista - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Pikemen - 1 = { - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_base_type = { - type = pikemen - value > 0 - } - } - add = 10 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_pikemen_maa = yes - } - add = 10 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_pikemen_maa = yes - } - add = 10 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = pikemen_unit - stacks = gok_subjugated_army_maa_value_very_small - } - men_at_arms = { - type = ballista - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Crossbowmen - 1 = { - trigger = { - OR = { - $CHARACTER$.culture = { - has_innovation = innovation_advanced_bowmaking - } - $CHARACTER$.capital_county.culture ?= { - has_innovation = innovation_advanced_bowmaking - } - } - } - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_type = { - target = crossbowmen - value > 0 - } - } - add = 10 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_archer_maa = yes - } - add = 10 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_archer_maa = yes - } - add = 10 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = crossbowmen - stacks = gok_subjugated_army_maa_value_very_small - } - men_at_arms = { - type = ballista - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Light Cavalry - 1 = { - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_base_type = { - type = light_cavalry - value > 0 - } - } - add = 10 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_light_cavalry_maa = yes - } - add = 10 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_light_cavalry_maa = yes - } - add = 10 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = light_horsemen - stacks = gok_subjugated_army_maa_value_very_small - } - men_at_arms = { - type = ballista - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Bowmen - 1 = { - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_base_type = { - type = archers - value > 0 - } - } - add = 10 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_archer_maa = yes - } - add = 10 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_archer_maa = yes - } - add = 10 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = bowmen - stacks = gok_subjugated_army_maa_value_small - } - men_at_arms = { - type = ballista - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Light Footmen - 1 = { - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_base_type = { - type = skirmishers - value > 0 - } - } - add = 10 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_skirmisher_maa = yes - } - add = 10 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_skirmisher_maa = yes - } - add = 10 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = light_footmen - stacks = gok_subjugated_army_maa_value_small - } - men_at_arms = { - type = ballista - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - } - } - else = { - random_list = { - #Heavy Infantry - 1 = { - trigger = { - OR = { - $CHARACTER$.culture = { - has_innovation = innovation_quilted_armor - } - $CHARACTER$.capital_county.culture ?= { - has_innovation = innovation_quilted_armor - } - } - } - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_base_type = { - type = heavy_infantry - value > 0 - } - } - add = 10 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_heavy_infantry_maa = yes - } - add = 10 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_heavy_infantry_maa = yes - } - add = 10 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = armored_footmen - stacks = gok_subjugated_army_maa_value_very_small - } - men_at_arms = { - type = onager - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Pikemen - 1 = { - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_base_type = { - type = pikemen - value > 0 - } - } - add = 10 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_pikemen_maa = yes - } - add = 10 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_pikemen_maa = yes - } - add = 10 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = pikemen_unit - stacks = gok_subjugated_army_maa_value_very_small - } - men_at_arms = { - type = onager - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Crossbowmen - 1 = { - trigger = { - OR = { - $CHARACTER$.culture = { - has_innovation = innovation_advanced_bowmaking - } - $CHARACTER$.capital_county.culture ?= { - has_innovation = innovation_advanced_bowmaking - } - } - } - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_type = { - target = crossbowmen - value > 0 - } - } - add = 10 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_archer_maa = yes - } - add = 10 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_archer_maa = yes - } - add = 10 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = crossbowmen - stacks = gok_subjugated_army_maa_value_very_small - } - men_at_arms = { - type = onager - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Light Cavalry - 1 = { - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_base_type = { - type = light_cavalry - value > 0 - } - } - add = 10 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_light_cavalry_maa = yes - } - add = 10 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_light_cavalry_maa = yes - } - add = 10 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = light_horsemen - stacks = gok_subjugated_army_maa_value_very_small - } - men_at_arms = { - type = onager - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Bowmen - 1 = { - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_base_type = { - type = archers - value > 0 - } - } - add = 10 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_archer_maa = yes - } - add = 10 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_archer_maa = yes - } - add = 10 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = bowmen - stacks = gok_subjugated_army_maa_value_small - } - men_at_arms = { - type = onager - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Light Footmen - 1 = { - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_base_type = { - type = skirmishers - value > 0 - } - } - add = 10 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_skirmisher_maa = yes - } - add = 10 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_skirmisher_maa = yes - } - add = 10 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = light_footmen - stacks = gok_subjugated_army_maa_value_small - } - men_at_arms = { - type = onager - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - } - } - } -} - -gok_spawn_subjugated_quality_army_effect = { - $CHARACTER$ = { - save_scope_as = army_giver - } - custom_tooltip = gok_quality_army_gain_tt - if = { - limit = { - exists = $CHARACTER$.primary_title - } - $CHARACTER$.primary_title = { - save_scope_as = army_origin_realm - } - } - else = { - $CHARACTER$.location.county.kingdom = { - save_scope_as = army_origin_realm - } - } - hidden_effect = { - random_list = { - #Paiks - 100 = { - trigger = { - scope:army_giver = { - OR = { - culture = { - has_innovation = innovation_bamboo_bows - } - capital_county.culture = { - has_innovation = innovation_bamboo_bows - } - } - } - } - - spawn_army = { - name = gok_subjugated_army_name_subject_troops - uses_supply = no - inheritable = yes - - men_at_arms = { - type = paiks - stacks = gok_subjugated_army_maa_value_very_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Sahel Horsemen - 100 = { - trigger = { - scope:army_giver = { - OR = { - culture = { - has_innovation = innovation_sahel_horsemen - } - capital_county.culture = { - has_innovation = innovation_sahel_horsemen - } - } - } - } - - spawn_army = { - name = gok_subjugated_army_name_subject_troops - uses_supply = no - inheritable = yes - - men_at_arms = { - type = sahel_horsemen - stacks = gok_subjugated_army_maa_value_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #WAR ELEPHANTS... I mean, come on - 200 = { - trigger = { - scope:army_giver = { - OR = { - culture = { - has_innovation = innovation_elephantry - } - capital_county.culture = { - has_innovation = innovation_elephantry - } - } - } - } - - spawn_army = { - name = gok_subjugated_army_name_subject_troops - uses_supply = no - inheritable = yes - - men_at_arms = { - type = war_elephant - stacks = gok_subjugated_army_maa_value_very_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #BALLISTA ELEPHANTS... I mean, come on - 200 = { - trigger = { - scope:army_giver = { - OR = { - culture = { - has_innovation = innovation_elephantry - has_innovation = innovation_advanced_bowmaking - } - capital_county.culture = { - has_innovation = innovation_elephantry - has_innovation = innovation_advanced_bowmaking - } - } - } - } - - spawn_army = { - name = gok_subjugated_army_name_subject_troops - uses_supply = no - inheritable = yes - - men_at_arms = { - type = ballista_elephant - stacks = gok_subjugated_army_maa_value_very_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - - #Abudrar - 100 = { - trigger = { - scope:army_giver = { - OR = { - culture = { - has_cultural_parameter = unlock_maa_abudrar - } - capital_county.culture = { - has_cultural_parameter = unlock_maa_abudrar - } - } - } - } - - spawn_army = { - name = gok_subjugated_army_name_subject_troops - uses_supply = no - inheritable = yes - - men_at_arms = { - type = abudrar - stacks = gok_subjugated_army_maa_value_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - - #Ayyar - 100 = { - trigger = { - scope:army_giver = { - OR = { - culture = { - has_cultural_parameter = unlock_maa_ayyar - } - capital_county.culture = { - has_cultural_parameter = unlock_maa_ayyar - } - } - } - } - - spawn_army = { - name = gok_subjugated_army_name_subject_troops - uses_supply = no - inheritable = yes - - men_at_arms = { - type = ayyar - stacks = gok_subjugated_army_maa_value_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - - #Druzhina - 100 = { - trigger = { - scope:army_giver = { - OR = { - culture = { - has_cultural_parameter = unlock_maa_druzhina - } - capital_county.culture = { - has_cultural_parameter = unlock_maa_druzhina - } - } - } - } - if = { - limit = { - scope:army_giver.culture = { - has_cultural_parameter = unlock_maa_druzhina - } - } - scope:army_giver.culture = { save_scope_as = army_culture } - } - else = { - scope:army_giver.capital_county.culture = { save_scope_as = army_culture } - } - - spawn_army = { - name = gok_noble_army_name - uses_supply = no - inheritable = yes - - men_at_arms = { - type = druzhina - stacks = gok_subjugated_army_maa_value_medium - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - - #Chausseurs - 100 = { - trigger = { - scope:army_giver = { - OR = { - culture = { - has_innovation = innovation_desert_tactics - } - capital_county.culture = { - has_innovation = innovation_desert_tactics - } - } - } - } - - spawn_army = { - name = gok_subjugated_army_name_subject_troops - uses_supply = no - inheritable = yes - - men_at_arms = { - type = chasseur - stacks = gok_subjugated_army_maa_value_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - - #Guinean Uplanders - 100 = { - trigger = { - scope:army_giver = { - OR = { - culture = { - has_cultural_parameter = unlock_maa_guinea_warrior - } - capital_county.culture = { - has_cultural_parameter = unlock_maa_guinea_warrior - } - } - } - } - - spawn_army = { - name = gok_subjugated_army_name_subject_troops - uses_supply = no - inheritable = yes - - men_at_arms = { - type = guinea_warrior - stacks = gok_subjugated_army_maa_value_very_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - - #Khandayat - 100 = { - trigger = { - scope:army_giver = { - OR = { - culture = { - has_cultural_parameter = unlock_maa_khandayat - } - capital_county.culture = { - has_cultural_parameter = unlock_maa_khandayat - } - } - } - } - - spawn_army = { - name = gok_subjugated_army_name_subject_troops - uses_supply = no - inheritable = yes - - men_at_arms = { - type = khandayat - stacks = gok_subjugated_army_maa_value_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - - #Lenkas - 100 = { - trigger = { - scope:army_giver = { - OR = { - culture = { - has_cultural_parameter = unlock_maa_garudas - } - capital_county.culture = { - has_cultural_parameter = unlock_maa_garudas - } - } - } - } - - spawn_army = { - name = gok_subjugated_army_name_subject_troops - uses_supply = no - inheritable = yes - - men_at_arms = { - type = garudas - stacks = gok_subjugated_army_maa_value_medium - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - - #Mountaineers - 100 = { - trigger = { - scope:army_giver = { - OR = { - culture = { - has_cultural_parameter = unlock_maa_mountaineer - } - capital_county.culture = { - has_cultural_parameter = unlock_maa_mountaineer - } - } - } - } - - spawn_army = { - name = gok_subjugated_army_name_subject_troops - uses_supply = no - inheritable = yes - - men_at_arms = { - type = mountaineer - stacks = gok_subjugated_army_maa_value_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - - #Mulathanum - 100 = { - trigger = { - scope:army_giver = { - OR = { - culture = { - has_cultural_parameter = unlock_maa_mulaththamun - } - capital_county.culture = { - has_cultural_parameter = unlock_maa_mulaththamun - } - } - } - } - - spawn_army = { - name = gok_subjugated_army_name_subject_troops - uses_supply = no - inheritable = yes - - men_at_arms = { - type = mulaththamun - stacks = gok_subjugated_army_maa_value_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - - #Nile Archers - 100 = { - trigger = { - scope:army_giver = { - OR = { - culture = { - has_cultural_parameter = unlock_maa_archers_of_the_nile - } - capital_county.culture = { - has_cultural_parameter = unlock_maa_archers_of_the_nile - } - } - } - } - - spawn_army = { - name = gok_subjugated_army_name_subject_troops - uses_supply = no - inheritable = yes - - men_at_arms = { - type = archers_of_the_nile - stacks = gok_subjugated_army_maa_value_very_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - - #Palace Guards - 100 = { - trigger = { - scope:army_giver = { - OR = { - culture = { - has_cultural_parameter = unlock_maa_palace_guards - } - capital_county.culture = { - has_cultural_parameter = unlock_maa_palace_guards - } - } - } - } - - spawn_army = { - name = gok_subjugated_army_name_subject_troops - uses_supply = no - inheritable = yes - - men_at_arms = { - type = palace_guards - stacks = gok_subjugated_army_maa_value_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - - #Sarawit - 100 = { - trigger = { - scope:army_giver = { - OR = { - culture = { - has_innovation = innovation_sarawit - } - capital_county.culture = { - has_innovation = innovation_sarawit - } - } - } - } - - spawn_army = { - name = gok_subjugated_army_name_subject_troops - uses_supply = no - inheritable = yes - - men_at_arms = { - type = sarawit - stacks = gok_subjugated_army_maa_value_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - - #Shomer - 100 = { - trigger = { - scope:army_giver = { - OR = { - culture = { - has_cultural_parameter = unlock_maa_shomer - } - capital_county.culture = { - has_cultural_parameter = unlock_maa_shomer - } - } - } - } - - spawn_army = { - name = gok_subjugated_army_name_subject_troops - uses_supply = no - inheritable = yes - - men_at_arms = { - type = shomer - stacks = gok_subjugated_army_maa_value_very_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - - #Zbrojnosh - 100 = { - trigger = { - scope:army_giver = { - OR = { - culture = { - has_cultural_parameter = unlock_maa_zbrojnosh - } - capital_county.culture = { - has_cultural_parameter = unlock_maa_zbrojnosh - } - } - } - } - - spawn_army = { - name = gok_subjugated_army_name_subject_troops - uses_supply = no - inheritable = yes - - men_at_arms = { - type = zbrojnosh - stacks = gok_subjugated_army_maa_value_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - - #Bondi - 100 = { - trigger = { - scope:army_giver = { - OR = { - culture = { - has_cultural_parameter = unlock_maa_bondi - } - capital_county.culture = { - has_cultural_parameter = unlock_maa_bondi - } - } - } - } - - spawn_army = { - name = gok_subjugated_army_name_subject_troops - uses_supply = no - inheritable = yes - - men_at_arms = { - type = bondi - stacks = gok_subjugated_army_maa_value_very_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - - #Vigmen - 100 = { - trigger = { - scope:army_giver = { - OR = { - culture = { - has_cultural_parameter = unlock_maa_vigmen - } - capital_county.culture = { - has_cultural_parameter = unlock_maa_vigmen - } - } - } - } - - spawn_army = { - name = gok_subjugated_army_name_subject_troops - uses_supply = no - inheritable = yes - - men_at_arms = { - type = vigmen - stacks = gok_subjugated_army_maa_value_very_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - - #Tarkhans - 100 = { - trigger = { - scope:army_giver = { - OR = { - culture = { - has_cultural_parameter = unlock_maa_tarkhan - } - capital_county.culture = { - has_cultural_parameter = unlock_maa_tarkhan - } - } - } - } - - spawn_army = { - name = gok_subjugated_army_name_subject_troops - uses_supply = no - inheritable = yes - - men_at_arms = { - type = tarkhan - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - - #Tawashi - 100 = { - trigger = { - scope:army_giver = { - OR = { - culture = { - has_cultural_parameter = unlock_maa_tawashi - } - capital_county.culture = { - has_cultural_parameter = unlock_maa_tawashi - } - } - } - } - - spawn_army = { - name = gok_subjugated_army_name_subject_troops - uses_supply = no - inheritable = yes - - men_at_arms = { - type = tawashi - stacks = gok_subjugated_army_maa_value_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - - #Zupin Spearmen - 100 = { - trigger = { - scope:army_giver = { - OR = { - culture = { - has_cultural_parameter = unlock_maa_zupin_warrior - } - capital_county.culture = { - has_cultural_parameter = unlock_maa_zupin_warrior - } - } - } - } - - spawn_army = { - name = gok_subjugated_army_name_subject_troops - uses_supply = no - inheritable = yes - - men_at_arms = { - type = zupin_warrior - stacks = gok_subjugated_army_maa_value_very_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - - #Cho ko nu - 100 = { - trigger = { - scope:army_giver = { - OR = { - culture = { - has_innovation = innovation_repeating_crossbow - } - capital_county.culture = { - has_innovation = innovation_repeating_crossbow - } - } - } - } - - spawn_army = { - name = gok_subjugated_army_name_subject_troops - uses_supply = no - inheritable = yes - - men_at_arms = { - type = shenbigong - stacks = gok_subjugated_army_maa_value_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - - #Palatini - 100 = { - trigger = { - scope:army_giver = { - OR = { - culture = { - has_innovation = innovation_legionnaires - } - capital_county.culture = { - has_innovation = innovation_legionnaires - } - } - } - } - - spawn_army = { - name = gok_subjugated_army_name_subject_troops - uses_supply = no - inheritable = yes - - men_at_arms = { - type = praetorian - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - - #Vaulter Infantry - 100 = { - trigger = { - scope:army_giver = { - OR = { - culture = { - has_innovation = innovation_pole_vault - } - capital_county.culture = { - has_innovation = innovation_pole_vault - } - } - } - } - - spawn_army = { - name = gok_subjugated_army_name_subject_troops - uses_supply = no - inheritable = yes - - men_at_arms = { - type = guanch_vaulter - stacks = gok_subjugated_army_maa_value_very_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - - #WARBAND - #Bush Hunters - 100 = { - trigger = { - scope:army_giver = { - OR = { - culture = { - has_cultural_parameter = unlock_maa_bush_hunter - } - capital_county.culture = { - has_cultural_parameter = unlock_maa_bush_hunter - } - } - } - } - if = { - limit = { - scope:army_giver.culture = { - has_cultural_parameter = unlock_maa_bush_hunter - } - } - scope:army_giver.culture = { save_scope_as = army_culture } - } - else = { - scope:army_giver.capital_county.culture = { save_scope_as = army_culture } - } - - spawn_army = { - name = greek_anarchy_war_nomad_army_name - uses_supply = no - inheritable = yes - - men_at_arms = { - type = bush_hunter - stacks = gok_subjugated_army_maa_value_very_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - - #Horn Warriors - 100 = { - trigger = { - scope:army_giver = { - OR = { - culture = { - has_cultural_parameter = unlock_maa_horn_warrior - } - capital_county.culture = { - has_cultural_parameter = unlock_maa_horn_warrior - } - } - } - } - if = { - limit = { - scope:army_giver.culture = { - has_cultural_parameter = unlock_maa_horn_warrior - } - } - scope:army_giver.culture = { save_scope_as = army_culture } - } - else = { - scope:army_giver.capital_county.culture = { save_scope_as = army_culture } - } - - spawn_army = { - name = greek_anarchy_war_nomad_army_name - uses_supply = no - inheritable = yes - - men_at_arms = { - type = horn_warrior - stacks = gok_subjugated_army_maa_value_very_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - - #Metsanvartija - 100 = { - trigger = { - scope:army_giver = { - OR = { - culture = { - has_cultural_parameter = unlock_maa_metsanvartija - } - capital_county.culture = { - has_cultural_parameter = unlock_maa_metsanvartija - } - } - } - } - if = { - limit = { - scope:army_giver.culture = { - has_cultural_parameter = unlock_maa_metsanvartija - } - } - scope:army_giver.culture = { save_scope_as = army_culture } - } - else = { - scope:army_giver.capital_county.culture = { save_scope_as = army_culture } - } - - spawn_army = { - name = greek_anarchy_war_nomad_army_name - uses_supply = no - inheritable = yes - - men_at_arms = { - type = metsanvartija - stacks = gok_subjugated_army_maa_value_very_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - - #Greeks - 300 = { - trigger = { - OR = { - scope:army_giver = { - capital_county = { - culture = { - has_cultural_parameter = unlock_maa_cataphract - } - } - } - scope:army_giver = { - culture = { - has_cultural_parameter = unlock_maa_cataphract - } - } - } - scope:army_giver = { - highest_held_title_tier >= tier_kingdom - } - } - if = { - limit = { - scope:army_giver = { - culture = { - has_cultural_parameter = unlock_maa_cataphract - } - } - } - scope:army_giver.culture = { save_scope_as = army_culture } - } - else_if = { - limit = { - scope:army_giver = { - capital_county = { - culture = { - has_cultural_parameter = unlock_maa_cataphract - } - } - } - } - scope:army_giver = { - capital_county = { - culture = { save_scope_as = army_culture } - } - } - } - else = { - culture = { - save_scope_as = army_culture - } - } - spawn_army = { - name = greek_anarchy_war_greek_army_name - uses_supply = no - inheritable = yes - - men_at_arms = { - type = cataphract - stacks = gok_subjugated_army_maa_value_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - 100 = { - trigger = { - OR = { - scope:army_giver = { - culture = { - has_cultural_parameter = unlock_maa_ballistrai - } - } - scope:army_giver = { - capital_county = { - culture = { - has_cultural_parameter = unlock_maa_ballistrai - } - } - } - } - } - if = { - limit = { - scope:army_giver = { - culture = { - has_cultural_parameter = unlock_maa_ballistrai - } - } - } - scope:army_giver.culture = { save_scope_as = army_culture } - } - else_if = { - limit = { - scope:army_giver = { - capital_county = { - culture = { - has_cultural_parameter = unlock_maa_ballistrai - } - } - } - } - scope:army_giver = { - capital_county = { - culture = { save_scope_as = army_culture } - } - } - } - else = { - culture = { - save_scope_as = army_culture - } - } - spawn_army = { - name = greek_anarchy_war_greek_army_name - uses_supply = no - inheritable = yes - - men_at_arms = { - type = ballistrai - stacks = gok_subjugated_army_maa_value_very_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - 100 = { - trigger = { - OR = { - scope:army_giver = { - capital_county = { - culture = { - has_cultural_parameter = unlock_maa_skoutatoi - } - } - } - scope:army_giver = { - culture = { - has_cultural_parameter = unlock_maa_skoutatoi - } - } - } - } - if = { - limit = { - scope:army_giver = { - culture = { - has_cultural_parameter = unlock_maa_skoutatoi - } - } - } - scope:army_giver.culture = { save_scope_as = army_culture } - } - else_if = { - limit = { - scope:army_giver = { - capital_county = { - culture = { - has_cultural_parameter = unlock_maa_skoutatoi - } - } - } - } - scope:army_giver = { - capital_county = { - culture = { save_scope_as = army_culture } - } - } - } - else = { - culture = { - save_scope_as = army_culture - } - } - spawn_army = { - name = greek_anarchy_war_greek_army_name - uses_supply = no - inheritable = yes - - men_at_arms = { - type = skoutatoi - stacks = gok_subjugated_army_maa_value_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - 100 = { - trigger = { - OR = { - scope:army_giver = { - capital_county = { - culture = { - has_cultural_parameter = unlock_maa_akritai - } - any_county_province = { - terrain = mountains - } - } - } - scope:army_giver = { - culture = { - has_cultural_parameter = unlock_maa_akritai - } - } - } - } - if = { - limit = { - scope:army_giver = { - culture = { - has_cultural_parameter = unlock_maa_akritai - } - } - } - scope:army_giver.culture = { save_scope_as = army_culture } - } - else_if = { - limit = { - scope:army_giver = { - capital_county = { - culture = { - has_cultural_parameter = unlock_maa_akritai - } - } - } - } - scope:army_giver = { - capital_county = { - culture = { save_scope_as = army_culture } - } - } - } - else = { - culture = { - save_scope_as = army_culture - } - } - spawn_army = { - name = greek_anarchy_war_greek_army_name - uses_supply = no - inheritable = yes - - men_at_arms = { - type = akritai - stacks = gok_subjugated_army_maa_value_very_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Armenians - 100 = { - trigger = { - OR = { - scope:army_giver = { - culture = { - has_cultural_parameter = unlock_maa_ayrudzi - } - } - scope:army_giver = { - capital_county = { - culture = { - has_cultural_parameter = unlock_maa_ayrudzi - } - } - } - } - } - if = { - limit = { - scope:army_giver = { - culture = { - has_cultural_parameter = unlock_maa_ayrudzi - } - } - } - scope:army_giver.culture = { save_scope_as = army_culture } - } - else_if = { - limit = { - scope:army_giver = { - capital_county = { - culture = { - has_cultural_parameter = unlock_maa_ayrudzi - } - } - } - } - scope:army_giver = { - capital_county = { - culture = { save_scope_as = army_culture } - } - } - } - else = { - culture = { - save_scope_as = army_culture - } - } - spawn_army = { - name = gok_noble_army_name - uses_supply = no - inheritable = yes - - men_at_arms = { - type = ayrudzi - stacks = gok_subjugated_army_maa_value_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Georgians - 100 = { - trigger = { - OR = { - scope:army_giver = { - culture = { - has_cultural_parameter = unlock_maa_monaspa - } - } - scope:army_giver = { - capital_county = { - culture = { - has_cultural_parameter = unlock_maa_monaspa - } - } - } - } - } - if = { - limit = { - scope:army_giver = { - culture = { - has_cultural_parameter = unlock_maa_monaspa - } - } - } - scope:army_giver.culture = { save_scope_as = army_culture } - } - else_if = { - limit = { - scope:army_giver = { - capital_county = { - culture = { - has_cultural_parameter = unlock_maa_monaspa - } - } - } - } - scope:army_giver = { - capital_county = { - culture = { save_scope_as = army_culture } - } - } - } - else = { - culture = { - save_scope_as = army_culture - } - } - spawn_army = { - name = gok_noble_army_name - uses_supply = no - inheritable = yes - - men_at_arms = { - type = monaspa - stacks = gok_subjugated_army_maa_value_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Cataphract archers - 100 = { - trigger = { - OR = { - scope:army_giver = { - culture = { - has_cultural_parameter = unlock_maa_cataphract_archers - } - } - scope:army_giver = { - capital_county = { - culture = { - has_cultural_parameter = unlock_maa_cataphract_archers - } - } - } - } - scope:army_giver = { - highest_held_title_tier >= tier_kingdom - } - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - uses_supply = no - inheritable = yes - - men_at_arms = { - type = cataphract_archers - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Konni folk get konni - 100 = { - trigger = { - OR = { - scope:army_giver = { - culture = { - has_cultural_parameter = unlock_maa_hussar - } - } - scope:army_giver = { - capital_county = { - culture = { - has_cultural_parameter = unlock_maa_hussar - } - } - } - } - } - if = { - limit = { - scope:army_giver = { - culture = { - has_cultural_parameter = unlock_maa_hussar - } - } - } - scope:army_giver.culture = { save_scope_as = army_culture } - } - else_if = { - limit = { - scope:army_giver = { - capital_county = { - culture = { - has_cultural_parameter = unlock_maa_hussar - } - } - } - } - scope:army_giver = { - capital_county = { - culture = { save_scope_as = army_culture } - } - } - } - else = { - culture = { - save_scope_as = army_culture - } - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - uses_supply = no - inheritable = yes - - men_at_arms = { - type = hussar - stacks = gok_subjugated_army_maa_value_medium - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Varangians - 100 = { - trigger = { - OR = { - scope:army_giver = { - culture = { - has_cultural_parameter = unlock_maa_varangian_veterans - } - } - scope:army_giver = { - capital_county = { - culture = { - has_cultural_parameter = unlock_maa_varangian_veterans - } - } - } - } - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - uses_supply = no - inheritable = yes - - men_at_arms = { - type = varangian_veterans - stacks = gok_subjugated_army_maa_value_medium - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Horse archers - 2 = { - trigger = { - OR = { - scope:army_giver = { - capital_county = { - culture = { - culture_has_archer_cavalry_maa = yes - } - } - } - scope:army_giver = { - any_vassal = { - OR = { - culture = { culture_has_archer_cavalry_maa = yes } - mpo_can_recruit_nomad_maa_trigger = yes - } - } - } - scope:army_giver = { - OR = { - culture = { culture_has_archer_cavalry_maa = yes } - mpo_can_recruit_nomad_maa_trigger = yes - } - } - } - } - if = { - limit = { - scope:army_giver = { - capital_county = { - culture = { - culture_has_archer_cavalry_maa = yes - } - } - } - } - scope:army_giver = { - capital_county = { - culture = { save_scope_as = army_culture } - } - } - } - else_if = { - limit = { - scope:army_giver = { - OR = { - culture = { culture_has_archer_cavalry_maa = yes } - mpo_can_recruit_nomad_maa_trigger = yes - } - } - } - scope:army_giver = { - culture = { - save_scope_as = army_culture - } - } - } - else_if = { - limit = { - scope:army_giver = { - any_vassal = { - OR = { - culture = { culture_has_archer_cavalry_maa = yes } - mpo_can_recruit_nomad_maa_trigger = yes - } - } - } - } - scope:army_giver = { - random_vassal = { - limit = { - OR = { - culture = { culture_has_archer_cavalry_maa = yes } - mpo_can_recruit_nomad_maa_trigger = yes - } - } - culture = { save_scope_as = army_culture } - } - } - } - else = { - culture = { - save_scope_as = army_culture - } - } - spawn_army = { - name = greek_anarchy_war_nomad_army_name - uses_supply = no - inheritable = yes - - men_at_arms = { - type = horse_archers - stacks = gok_subjugated_army_maa_value_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Crossbowmen - 5 = { - trigger = { - OR = { - scope:army_giver = { - culture = { - OR = { - has_innovation = innovation_advanced_bowmaking - has_innovation = innovation_repeating_crossbow - } - } - } - scope:army_giver = { - capital_county = { - culture = { - OR = { - has_innovation = innovation_advanced_bowmaking - has_innovation = innovation_repeating_crossbow - } - } - } - } - } - } - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_type = { - target = crossbowmen - value > 0 - } - } - add = 2 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_archer_maa = yes - } - add = 2 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_archer_maa = yes - } - add = 2 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - uses_supply = no - inheritable = yes - - men_at_arms = { - type = crossbowmen - stacks = gok_subjugated_army_maa_value_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Norman knights - 100 = { - trigger = { - OR = { - scope:army_giver.culture = { - has_cultural_parameter = unlock_maa_conrois - } - scope:army_giver.capital_county = { - culture = { - has_cultural_parameter = unlock_maa_conrois - } - } - } - } - modifier = { - OR = { - culture = { - has_cultural_parameter = unlock_maa_conrois - } - top_liege = { - any_vassal = { - highest_held_title_tier >= tier_county - culture = { - has_cultural_parameter = unlock_maa_conrois - } - } - } - capital_county = { - culture = { - has_cultural_parameter = unlock_maa_conrois - } - } - } - add = 18 - } - if = { - limit = { - scope:army_giver.culture = { - has_cultural_parameter = unlock_maa_conrois - } - } - scope:army_giver.culture = { - save_scope_as = army_culture - } - } - else = { - scope:army_giver.capital_county = { - culture = { - save_scope_as = army_culture - } - } - } - spawn_army = { - name = greek_anarchy_war_crusaders_army_name - uses_supply = no - inheritable = yes - - men_at_arms = { - type = conrois - stacks = gok_subjugated_army_maa_value_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Longbowmen - 100 = { - trigger = { - scope:army_giver = { - OR = { - culture = { - has_cultural_parameter = unlock_maa_longbowmen - } - capital_county = { - culture = { - has_cultural_parameter = unlock_maa_longbowmen - } - } - } - } - } - if = { - limit = { - scope:army_giver.culture = { - has_cultural_parameter = unlock_maa_longbowmen - } - } - scope:army_giver.culture = { - save_scope_as = army_culture - } - } - else = { - scope:army_giver.capital_county = { - culture = { - save_scope_as = army_culture - } - } - } - spawn_army = { - name = greek_anarchy_war_crusaders_army_name - uses_supply = no - inheritable = yes - - men_at_arms = { - type = longbowmen - stacks = gok_subjugated_army_maa_value_very_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Picchieri - 100 = { - trigger = { - scope:army_giver = { - OR = { - culture = { - has_innovation = innovation_pike_columns - } - capital_county = { - culture = { - has_innovation = innovation_pike_columns - } - } - } - } - } - if = { - limit = { - scope:army_giver.culture = { - has_innovation = innovation_pike_columns - } - } - scope:army_giver.culture = { - save_scope_as = army_culture - } - } - else = { - scope:army_giver.capital_county = { - culture = { - save_scope_as = army_culture - } - } - } - spawn_army = { - name = greek_anarchy_war_crusaders_army_name - uses_supply = no - inheritable = yes - - men_at_arms = { - type = picchieri - stacks = gok_subjugated_army_maa_value_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Goedendag - 100 = { - trigger = { - scope:army_giver = { - OR = { - culture = { - has_innovation = innovation_adaptive_militia - } - capital_county = { - culture = { - has_innovation = innovation_adaptive_militia - } - } - } - } - } - if = { - limit = { - scope:army_giver.culture = { - has_innovation = innovation_adaptive_militia - } - } - scope:army_giver.culture = { - save_scope_as = army_culture - } - } - else = { - scope:army_giver.capital_county = { - culture = { - save_scope_as = army_culture - } - } - } - spawn_army = { - name = greek_anarchy_war_crusaders_army_name - uses_supply = no - inheritable = yes - - men_at_arms = { - type = goedendag - stacks = gok_subjugated_army_maa_value_very_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Caballeros - 100 = { - trigger = { - scope:army_giver = { - OR = { - culture = { - has_innovation = innovation_caballeros - } - capital_county = { - culture = { - has_innovation = innovation_caballeros - } - } - } - } - } - if = { - limit = { - scope:army_giver.culture = { - has_innovation = innovation_caballeros - } - } - scope:army_giver.culture = { - save_scope_as = army_culture - } - } - else = { - scope:army_giver.capital_county = { - culture = { - save_scope_as = army_culture - } - } - } - spawn_army = { - name = greek_anarchy_war_crusaders_army_name - uses_supply = no - inheritable = yes - - men_at_arms = { - type = caballero - stacks = gok_subjugated_army_maa_value_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Hobbies - 100 = { - trigger = { - scope:army_giver = { - OR = { - culture = { - has_innovation = innovation_hobbies - } - capital_county = { - culture = { - has_innovation = innovation_hobbies - } - } - } - } - } - if = { - limit = { - scope:army_giver.culture = { - has_innovation = innovation_hobbies - } - } - scope:army_giver.culture = { - save_scope_as = army_culture - } - } - else = { - scope:army_giver.capital_county = { - culture = { - save_scope_as = army_culture - } - } - } - spawn_army = { - name = greek_anarchy_war_crusaders_army_name - uses_supply = no - inheritable = yes - - men_at_arms = { - type = hobelar - stacks = gok_subjugated_army_maa_value_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Schiltron - 100 = { - trigger = { - scope:army_giver = { - OR = { - culture = { - has_innovation = innovation_rectilinear_schiltron - } - capital_county = { - culture = { - has_innovation = innovation_rectilinear_schiltron - } - } - } - } - } - if = { - limit = { - scope:army_giver.culture = { - has_innovation = innovation_rectilinear_schiltron - } - } - scope:army_giver.culture = { - save_scope_as = army_culture - } - } - else = { - scope:army_giver.capital_county = { - culture = { - save_scope_as = army_culture - } - } - } - spawn_army = { - name = greek_anarchy_war_crusaders_army_name - uses_supply = no - inheritable = yes - - men_at_arms = { - type = schiltron - stacks = gok_subjugated_army_maa_value_medium - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Valets - 100 = { - trigger = { - scope:army_giver = { - OR = { - culture = { - has_innovation = innovation_valets - } - capital_county = { - culture = { - has_innovation = innovation_valets - } - } - } - } - scope:army_giver = { - highest_held_title_tier >= tier_kingdom - } - } - if = { - limit = { - scope:army_giver.culture = { - has_innovation = innovation_valets - } - } - scope:army_giver.culture = { - save_scope_as = army_culture - } - } - else = { - scope:army_giver.capital_county = { - culture = { - save_scope_as = army_culture - } - } - } - spawn_army = { - name = gok_noble_army_name - uses_supply = no - inheritable = yes - - men_at_arms = { - type = gendarme - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #landsknecht - 100 = { - trigger = { - scope:army_giver = { - OR = { - culture = { - has_innovation = innovation_zweihanders - } - capital_county = { - culture = { - has_innovation = innovation_zweihanders - } - } - } - } - } - if = { - limit = { - scope:army_giver.culture = { - has_innovation = innovation_zweihanders - } - } - scope:army_giver.culture = { - save_scope_as = army_culture - } - } - else = { - scope:army_giver.capital_county = { - culture = { - save_scope_as = army_culture - } - } - } - spawn_army = { - name = greek_anarchy_war_crusaders_army_name - uses_supply = no - inheritable = yes - - men_at_arms = { - type = landsknecht - stacks = gok_subjugated_army_maa_value_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Huscarls - 100 = { - trigger = { - scope:army_giver = { - OR = { - culture = { - has_cultural_parameter = unlock_maa_huscarls - } - capital_county = { - culture = { - has_cultural_parameter = unlock_maa_huscarls - } - } - } - } - } - if = { - limit = { - scope:army_giver.culture = { - has_cultural_parameter = unlock_maa_huscarls - } - } - scope:army_giver.culture = { - save_scope_as = army_culture - } - } - else = { - scope:army_giver.capital_county = { - culture = { - save_scope_as = army_culture - } - } - } - spawn_army = { - name = gok_noble_army_name - uses_supply = no - inheritable = yes - - men_at_arms = { - type = huscarl - stacks = gok_subjugated_army_maa_value_medium - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Camels - 3 = { - trigger = { - OR = { - scope:army_giver = { - capital_county = { - culture = { - has_innovation = innovation_war_camels - } - any_county_province = { - OR = { - terrain = drylands - terrain = desert - } - } - } - } - } - } - if = { - limit = { - scope:army_giver = { - capital_county = { - culture = { - has_innovation = innovation_war_camels - } - any_county_province = { - OR = { - terrain = drylands - terrain = desert - } - } - } - } - } - scope:army_giver = { - capital_county = { - culture = { - save_scope_as = army_culture - } - } - } - } - else = { - scope:army_giver.culture = { - save_scope_as = army_culture - } - } - spawn_army = { - name = greek_anarchy_war_nomad_army_name - uses_supply = no - inheritable = yes - - men_at_arms = { - type = camel_rider - stacks = gok_subjugated_army_maa_value_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Heavy cav - 3 = { - trigger = { - OR = { - scope:army_giver = { - culture = { - has_innovation = innovation_arched_saddle - } - } - scope:army_giver = { - capital_county = { - culture = { - has_innovation = innovation_arched_saddle - } - } - } - } - scope:army_giver = { - highest_held_title_tier >= tier_kingdom - } - OR = { - scope:army_giver = { - NOT = { - government_has_flag = government_is_nomadic - } - } - scope:army_giver = { - capital_county = { - NOT = { - any_county_province = { - OR = { - has_holding_type = nomad_holding - has_holding_type = herder_holding - } - } - } - } - } - } - } - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_base_type = { - type = heavy_cavalry - value > 0 - } - } - add = 2 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_heavy_cavalry_maa = yes - } - add = 2 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_heavy_cavalry_maa = yes - } - add = 2 - } - if = { - limit = { - scope:army_giver.culture = { - has_innovation = innovation_arched_saddle - } - } - scope:army_giver.culture = { save_scope_as = army_culture } - } - else = { - scope:army_giver.capital_county.culture = { save_scope_as = army_culture } - } - spawn_army = { - name = gok_noble_army_name - inheritable = yes - uses_supply = no - - men_at_arms = { - type = armored_horsemen - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Heavy Infantry - 1 = { - trigger = { - OR = { - scope:army_giver = { - culture = { - has_innovation = innovation_quilted_armor - } - } - scope:army_giver = { - capital_county = { - culture = { - has_innovation = innovation_quilted_armor - } - } - } - } - OR = { - scope:army_giver = { - NOT = { - government_has_flag = government_is_nomadic - } - } - scope:army_giver = { - capital_county = { - NOT = { - any_county_province = { - OR = { - has_holding_type = nomad_holding - has_holding_type = herder_holding - } - } - } - } - } - } - } - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_base_type = { - type = heavy_infantry - value > 0 - } - } - add = 2 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_heavy_infantry_maa = yes - } - add = 2 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_heavy_infantry_maa = yes - } - add = 2 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = armored_footmen - stacks = gok_subjugated_army_maa_value_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Pikemen - 1 = { - trigger = { - scope:army_giver = { - capital_county = { - any_county_province = { - terrain = mountains - } - } - } - OR = { - scope:army_giver = { - NOT = { - government_has_flag = government_is_nomadic - } - } - scope:army_giver = { - capital_county = { - NOT = { - any_county_province = { - OR = { - has_holding_type = nomad_holding - has_holding_type = herder_holding - } - } - } - } - } - } - } - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_base_type = { - type = pikemen - value > 0 - } - } - add = 2 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_pikemen_maa = yes - } - add = 2 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_pikemen_maa = yes - } - add = 2 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = pikemen_unit - stacks = gok_subjugated_army_maa_value_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Archers - 1 = { - trigger = { - scope:army_giver = { - capital_county = { - any_county_province = { - terrain = forest - } - } - } - OR = { - scope:army_giver = { - NOT = { - government_has_flag = government_is_nomadic - } - } - scope:army_giver = { - capital_county = { - NOT = { - any_county_province = { - OR = { - has_holding_type = nomad_holding - has_holding_type = herder_holding - } - } - } - } - } - } - } - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_base_type = { - type = archers - value > 0 - } - } - add = 2 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_archer_maa = yes - } - add = 2 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_archer_maa = yes - } - add = 2 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = bowmen - stacks = gok_subjugated_army_maa_value_very_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Light Horsemen - 1 = { - trigger = { - OR = { - scope:army_giver = { - NOT = { - government_has_flag = government_is_nomadic - } - } - scope:army_giver = { - capital_county = { - NOT = { - any_county_province = { - OR = { - has_holding_type = nomad_holding - has_holding_type = herder_holding - } - } - } - } - } - } - } - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_base_type = { - type = light_cavalry - value > 0 - } - } - add = 2 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_light_cavalry_maa = yes - } - add = 2 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_light_cavalry_maa = yes - } - add = 2 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = light_horsemen - stacks = gok_subjugated_army_maa_value_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Light Footmen - 1 = { - trigger = { - OR = { - scope:army_giver = { - NOT = { - government_has_flag = government_is_nomadic - } - } - scope:army_giver = { - capital_county = { - NOT = { - any_county_province = { - OR = { - has_holding_type = nomad_holding - has_holding_type = herder_holding - } - } - } - } - } - } - } - modifier = { - $CHARACTER$ = { - number_maa_regiments_of_base_type = { - type = skirmishers - value > 0 - } - } - add = 2 - } - modifier = { - $CHARACTER$.culture = { - culture_specializes_in_skirmisher_maa = yes - } - add = 2 - } - modifier = { - $CHARACTER$.capital_county.culture ?= { - culture_specializes_in_skirmisher_maa = yes - } - add = 2 - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - inheritable = yes - uses_supply = no - - men_at_arms = { - type = light_footmen - stacks = gok_subjugated_army_maa_value_very_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Steppe Raiders - 2 = { - trigger = { - scope:army_giver = { - mpo_can_recruit_nomad_maa_trigger = yes - } - } - scope:army_giver.culture = { save_scope_as = army_culture } - - spawn_army = { - name = greek_anarchy_war_nomad_army_name - uses_supply = no - inheritable = yes - - men_at_arms = { - type = steppe_raiders - stacks = gok_subjugated_army_maa_value_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Heavy Horse Archers - 10 = { - trigger = { - scope:army_giver = { - exists = domicile - domicile = { - has_domicile_parameter = unlock_maa_heavy_horse_archers - } - } - } - scope:army_giver.culture = { save_scope_as = army_culture } - - spawn_army = { - name = greek_anarchy_war_nomad_army_name - uses_supply = no - inheritable = yes - - men_at_arms = { - type = heavy_horse_archers - stacks = gok_subjugated_army_maa_value_medium - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Nomad Lancers - 2 = { - trigger = { - scope:army_giver = { - mpo_can_recruit_nomad_maa_trigger = yes - highest_held_title_tier >= tier_duchy - } - } - scope:army_giver.culture = { save_scope_as = army_culture } - - spawn_army = { - name = mpo_war_nomad_army_name - uses_supply = no - inheritable = yes - - men_at_arms = { - type = nomad_lancers - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Mangudai - 100 = { - trigger = { - scope:army_giver = { - OR = { - culture = { - has_cultural_parameter = unlock_maa_mangudai - } - capital_county.culture = { - has_cultural_parameter = unlock_maa_mangudai - } - } - - } - } - if = { - limit = { - scope:army_giver.culture = { - has_cultural_parameter = unlock_maa_mangudai - } - } - scope:army_giver.culture = { save_scope_as = army_culture } - } - else = { - scope:army_giver.capital_county.culture = { save_scope_as = army_culture } - } - - spawn_army = { - name = greek_anarchy_war_nomad_army_name - uses_supply = no - inheritable = yes - - men_at_arms = { - type = mangudai - stacks = gok_subjugated_army_maa_value_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Maturkan Warriors - 100 = { - trigger = { - scope:army_giver = { - OR = { - culture = { - has_cultural_parameter = unlock_maa_maturkan_warriors - } - capital_county.culture = { - has_cultural_parameter = unlock_maa_maturkan_warriors - } - } - - } - } - if = { - limit = { - scope:army_giver.culture = { - has_cultural_parameter = unlock_maa_maturkan_warriors - } - } - scope:army_giver.culture = { save_scope_as = army_culture } - } - else = { - scope:army_giver.capital_county.culture = { save_scope_as = army_culture } - } - - spawn_army = { - name = greek_anarchy_war_nomad_army_name - uses_supply = no - inheritable = yes - - men_at_arms = { - type = maturkan_warriors - stacks = gok_subjugated_army_maa_value_very_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Emishi Horse Archers - 100 = { - trigger = { - scope:army_giver = { - OR = { - culture = { - has_cultural_parameter = unlock_emishi_horse_archers_units - } - capital_county.culture = { - has_cultural_parameter = unlock_emishi_horse_archers_units - } - } - - } - } - if = { - limit = { - scope:army_giver.culture = { - has_cultural_parameter = unlock_emishi_horse_archers_units - } - } - scope:army_giver.culture = { save_scope_as = army_culture } - } - else = { - scope:army_giver.capital_county.culture = { save_scope_as = army_culture } - } - - spawn_army = { - name = greek_anarchy_war_nomad_army_name - uses_supply = no - inheritable = yes - - men_at_arms = { - type = emishi_horse_archers - stacks = gok_subjugated_army_maa_value_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Mounted Samurai - 100 = { - trigger = { - scope:army_giver = { - valid_for_maa_trigger = { PARAMETER = unlock_mounted_samurai_units } - } - } - scope:army_giver.capital_county.culture = { save_scope_as = army_culture } - - spawn_army = { - name = gok_noble_army_name - uses_supply = no - inheritable = yes - - men_at_arms = { - type = japanese_horse_archers - stacks = gok_subjugated_army_maa_value_medium - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Warrior Monks - 100 = { - trigger = { - scope:army_giver = { - valid_for_maa_trigger = { PARAMETER = unlock_warrior_monk_units } - } - } - scope:army_giver.capital_county.culture = { save_scope_as = army_culture } spawn_army = { - name = gok_subjugated_army_name_subject_troops - uses_supply = no - inheritable = yes - - men_at_arms = { - type = warrior_monks - stacks = gok_subjugated_army_maa_value_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Fire Lancers - 100 = { - trigger = { - scope:army_giver = { - OR = { - culture = { has_cultural_parameter = unlock_fire_lancers_units } - capital_county.culture = { has_cultural_parameter = unlock_fire_lancers_units } - } - highest_held_title_tier >= tier_kingdom - } - } - if = { - limit = { - scope:army_giver = { - culture = { has_cultural_parameter = unlock_fire_lancers_units } - } - } - scope:army_giver.culture = { - save_scope_as = army_culture - } - } - else = { - scope:army_giver.capital_county.culture = { save_scope_as = army_culture } - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - uses_supply = no - inheritable = yes - - men_at_arms = { - type = fire_lancers - stacks = gok_subjugated_army_maa_value_medium - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Gakgung archers - 100 = { - trigger = { - scope:army_giver = { - valid_for_maa_trigger = { PARAMETER = unlock_maa_gakgung_archers } - } - } - scope:army_giver.culture = { - save_scope_as = army_culture - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - uses_supply = no - inheritable = yes - - men_at_arms = { - type = gakgung_archers - stacks = gok_subjugated_army_maa_value_very_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Pesilat Warriors - 100 = { - trigger = { - scope:army_giver = { - valid_for_maa_trigger = { PARAMETER = unlock_maa_pesilat } - } - } - scope:army_giver.capital_county.culture = { save_scope_as = army_culture } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - uses_supply = no - inheritable = yes - - men_at_arms = { - type = pesilat_warriors - stacks = gok_subjugated_army_maa_value_very_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Samurai - 100 = { - trigger = { - scope:army_giver = { - valid_for_maa_trigger = { PARAMETER = unlock_infantry_samurai_units } - NOT = { - culture = { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } - } - } - } - scope:army_giver.capital_county.culture = { save_scope_as = army_culture } - - spawn_army = { - name = gok_noble_army_name - uses_supply = no - inheritable = yes - - men_at_arms = { - type = samurai - stacks = gok_subjugated_army_maa_value_medium - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Zhanmadao Infantry - 100 = { - trigger = { - scope:army_giver = { - valid_for_maa_trigger = { PARAMETER = unlock_zhanmadao } - OR = { - vassal_contract_has_flag = celestial_province_military - vassal_contract_has_flag = celestial_province_celestial - } - NOT = { - culture = { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } - } - } - } - if = { - limit = { - scope:army_giver = { - valid_for_maa_trigger = { PARAMETER = unlock_zhanmadao } - OR = { - vassal_contract_has_flag = celestial_province_military - vassal_contract_has_flag = celestial_province_celestial - } - NOT = { - culture = { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } - } - } - } - scope:army_giver.culture = { - save_scope_as = army_culture - } - } - else = { - culture = { save_scope_as = army_culture } - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - uses_supply = no - inheritable = yes - - men_at_arms = { - type = zhanmadao_infantry - stacks = gok_subjugated_army_maa_value_medium - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Tiefutu - 100 = { - trigger = { - scope:army_giver = { - valid_for_maa_trigger = { PARAMETER = unlock_maa_tiefutu } - NOT = { - culture = { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } - } - culture = { - has_innovation = innovation_arched_saddle - } - highest_held_title_tier >= tier_kingdom - } - } - if = { - limit = { - scope:army_giver = { - valid_for_maa_trigger = { PARAMETER = unlock_maa_tiefutu } - NOT = { - culture = { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } - } - } - } - scope:army_giver.culture = { - save_scope_as = army_culture - } - } - else = { - culture = { save_scope_as = army_culture } - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - uses_supply = no - inheritable = yes - - men_at_arms = { - type = tiefutu - stacks = gok_subjugated_army_maa_value_small - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Burenjia - 100 = { - trigger = { - scope:army_giver = { - valid_for_maa_trigger = { PARAMETER = unlock_burenjia } - NOT = { - culture = { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } - } - } - } - if = { - limit = { - scope:army_giver = { - valid_for_maa_trigger = { PARAMETER = unlock_burenjia } - NOT = { - culture = { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } - } - } - } - scope:army_giver.culture = { - save_scope_as = army_culture - } - } - else = { - culture = { save_scope_as = army_culture } - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - uses_supply = no - inheritable = yes - - men_at_arms = { - type = burenjia - stacks = gok_subjugated_army_maa_value_medium - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Rocket carts - 100 = { - trigger = { - OR = { - scope:army_giver = { - culture = { - has_innovation = innovation_rocket_cart - } - } - scope:army_giver = { - capital_county = { - culture = { - has_innovation = innovation_rocket_cart - } - } - } - } - } - if = { - limit = { - scope:army_giver = { - culture = { - has_innovation = innovation_rocket_cart - } - } - } - scope:army_giver.culture = { save_scope_as = army_culture } - } - else_if = { - limit = { - scope:army_giver = { - capital_county = { - culture = { - has_innovation = innovation_rocket_cart - } - } - } - } - scope:army_giver = { - capital_county = { - culture = { save_scope_as = army_culture } - } - } - } - else = { - culture = { - save_scope_as = army_culture - } - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - uses_supply = no - inheritable = yes - - men_at_arms = { - type = rocket_carts - stacks = gok_subjugated_army_maa_value_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Shenbigong - 100 = { - trigger = { - scope:army_giver = { - OR = { - culture = { - has_innovation = innovation_repeating_crossbow - } - capital_county = { - culture = { - has_innovation = innovation_repeating_crossbow - } - } - } - } - } - if = { - limit = { - scope:army_giver.culture = { - has_innovation = innovation_repeating_crossbow - } - } - scope:army_giver.culture = { - save_scope_as = army_culture - } - } - else = { - scope:army_giver.capital_county = { - culture = { - save_scope_as = army_culture - } - } - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - uses_supply = no - inheritable = yes - - men_at_arms = { - type = shenbigong - stacks = gok_subjugated_army_maa_value_large - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - #Mubarizun - 50 = { - trigger = { - scope:army_giver = { - valid_for_maa_trigger = { PARAMETER = unlock_maa_mubarizun } - NOT = { - culture = { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } - } - } - } - if = { - limit = { - scope:army_giver = { - valid_for_maa_trigger = { PARAMETER = unlock_maa_mubarizun } - NOT = { - culture = { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } - } - } - } - scope:army_giver.culture = { - save_scope_as = army_culture - } - } - else = { - culture = { save_scope_as = army_culture } - } - spawn_army = { - name = gok_subjugated_army_name_subject_troops - uses_supply = no - inheritable = yes - - men_at_arms = { - type = mubarizun - stacks = gok_subjugated_army_maa_value_medium - } - location = scope:gok.capital_province - origin = $CHARACTER$.capital_province - } - } - } - } -} - -gok_realm_devastation_effect = { - #Minor issues targeting the general realm, but REALLY focus in on the capital area for revenge - add_to_list = defender_realm_vassals - #defender domain specifically targeted - every_in_list = { - list = target_titles - limit = { - tier = tier_county - is_landless_type_title = no - } - add_to_list = devastation_area - } - #and area of capital - capital_county.duchy = { - every_de_jure_county = { - limit = { - holder = { - top_liege = scope:defender - NOR = { - is_ai = no - is_at_war_with = scope:defender - } - } - } - add_to_list = devastation_area - } - } - every_vassal_or_below = { - add_to_list = defender_realm_vassals - } - #is this violent retribution for refusing the khan's generosity? - if = { - limit = { - exists = scope:khans_retribution_target - } - scope:attacker = { - custom_tooltip = gok_gain_dread_tt - } - custom_tooltip = gok_ruin_additional_destruction_tt - if = { - limit = { - government_has_flag = government_is_nomadic - scope:defender.capital_county = { - any_county_province = { - OR = { - has_holding_type = nomad_holding - has_holding_type = herder_holding - } - } - } - } - scope:attacker = { - custom_tooltip = gok_gain_herd_tt - } - } - else = { - scope:attacker = { - custom_tooltip = gok_gain_gold_tt - } - } - hidden_effect = { - scope:attacker = { - #First off, gain dread - add_dread = gok_retribution_dread_value - #Gain herd or gold - if = { - limit = { - government_has_flag = government_is_nomadic - scope:defender.capital_county = { - any_county_province = { - OR = { - has_holding_type = nomad_holding - has_holding_type = herder_holding - } - } - } - } - domicile = { - change_herd = gok_retribution_herd_value - } - } - else = { - add_short_term_gold = gok_retribution_gold_value - } - } - #Tank control everywhere - every_sub_realm_county = { - limit = { - NOT = { - is_in_list = devastation_area - } - } - change_county_control = massive_county_control_loss - change_development_level = { - subtract = development_level - multiply = 0.2 - floor = yes - } - } - #Destroy the holdings - every_in_list = { - list = devastation_area - limit = { - any_county_province = { - has_holding = yes - is_county_capital = no - } - } - every_county_province = { - limit = { - has_holding = yes - is_county_capital = no - } - random = { - chance = 50 - remove_holding = yes - add_to_list = destroyed_holdings - } - - } - } - - scope:attacker = { - save_scope_as = mongol_emperor - } - #Kick the shit out of capital area - every_in_list = { - list = devastation_area - save_scope_as = county - - change_county_control = massive_county_control_loss - holder = { - send_interface_message = { - type = event_war_bad - title = mongols_sieged_county.t - left_icon = scope:mongol_emperor - right_icon = scope:county - - scope:county = { - change_development_level = { - subtract = scope:county.development_level - multiply = 0.5 - floor = yes - } - every_county_province = { - limit = { - has_holding = yes - num_buildings >= 2 - } - destroy_random_building_variable_effect = yes - destroy_random_building_effect = yes - } - every_county_province = { - limit = { - has_holding = yes - num_buildings >= 2 - } - destroy_random_building_variable_effect = yes - destroy_random_building_effect = yes - } - every_county_province = { - limit = { - has_holding = yes - num_buildings >= 2 - } - destroy_random_building_variable_effect = yes - destroy_random_building_effect = yes - } - } - - } - } - - hidden_effect = { - mpo_gok_civilian_slaughter_totalling_effect = yes - } - if = { - limit = { - culture = { - cultural_acceptance = { - target = scope:attacker.culture - value > 0 - } - } - } - culture = { - change_cultural_acceptance = { - target = scope:attacker.culture - value = major_cultural_acceptance_loss - desc = gok_sacking_cultural_acceptance - } - } - } - } - if = { - limit = { - "list_size(destroyed_holdings)" > 1 - } - #Holding notification - save_scope_value_as = { - name = destroyed_holdings - value = "list_size(destroyed_holdings)" - } - #Send notification message - if = { - limit = { - scope:defender = { - trigger_if = { - limit = { - highest_held_title_tier >= tier_kingdom - } - sub_realm_size >= 2 - } - trigger_else = { - highest_held_title_tier >= tier_duchy - sub_realm_size >= 5 - } - } - } - every_player = { - limit = { - OR = { - in_diplomatic_range = scope:defender - this = scope:defender - } - } - send_interface_message = { - type = msg_gok_destruction - title = gok_destruction.t - left_icon = scope:gok - desc = gok_destruction.tooltip - } - } - } - #Be more discerning with rulers that aren't significant - else = { - every_player = { - limit = { - OR = { - this = scope:attacker - this = scope:defender - has_any_scripted_relation = scope:defender - is_close_or_extended_family_of = scope:defender - is_consort_of = scope:defender - is_allied_to = scope:defender - } - } - send_interface_message = { - type = msg_gok_destruction - title = gok_destruction.t - left_icon = scope:gok - desc = gok_destruction.tooltip - } - } - } - } - #Slaughter notification - if = { - limit = { - "list_size(gok_slaughter_victims)" > 1 - } - save_scope_value_as = { - name = gok_slaughter_value - value = "list_size(gok_slaughter_victims)" - } - if = { - limit = { - scope:defender = { - trigger_if = { - limit = { - highest_held_title_tier >= tier_kingdom - } - sub_realm_size >= 2 - } - trigger_else = { - highest_held_title_tier >= tier_duchy - sub_realm_size >= 5 - } - } - } - every_player = { - limit = { - OR = { - this = scope:attacker - this = scope:defender - in_diplomatic_range = scope:defender - has_any_scripted_relation = scope:defender - is_close_or_extended_family_of = scope:defender - is_consort_of = scope:defender - is_allied_to = scope:defender - } - } - send_interface_message = { - type = msg_gok_slaughter - title = gok_slaughter.t - left_icon = scope:gok - desc = gok_slaughter.tooltip - } - } - every_player = { - every_in_list = { - list = gok_slaughter_victims - limit = { - OR = { - has_any_scripted_relation = prev - is_close_or_extended_family_of = prev - is_consort_of = prev - is_allied_to = prev - } - } - save_scope_as = victim - prev = { - send_interface_message = { - type = msg_gok_slaughter - title = gok_slaughter_victim.t - left_icon = scope:victim - desc = gok_slaughter_victim.tooltip - } - } - } - } - } - else = { - every_player = { - limit = { - OR = { - this = scope:attacker - this = scope:defender - has_any_scripted_relation = scope:defender - is_close_or_extended_family_of = scope:defender - is_consort_of = scope:defender - is_allied_to = scope:defender - } - } - send_interface_message = { - type = msg_gok_slaughter - title = gok_slaughter.t - left_icon = scope:gok - desc = gok_slaughter.tooltip - } - } - every_player = { - every_in_list = { - list = gok_slaughter_victims - limit = { - OR = { - has_any_scripted_relation = prev - is_close_or_extended_family_of = prev - is_consort_of = prev - is_allied_to = prev - } - } - save_scope_as = victim - prev = { - send_interface_message = { - type = msg_gok_slaughter - title = gok_slaughter_victim.t - left_icon = scope:victim - desc = gok_slaughter_victim.tooltip - } - } - } - } - } - } - hidden_effect = { - every_in_list = { - list = gok_slaughter_victims - death = { - death_reason = death_gok_slaughter - } - } - } - } - } - else = { - every_sub_realm_county = { - custom = custom.every_taken_county - change_county_control = medium_county_control_loss - change_development_level = { - subtract = development_level - multiply = 0.1 - floor = yes - } - } - } -} - -mpo_gok_civilian_slaughter_totalling_effect = { - every_in_list = { - list = devastation_area - if = { - limit = { - this = holder.capital_county - } - holder = { - if = { - limit = { - NOR = { - this = scope:defender - is_ai = no - } - } - add_to_list = potential_victims - } - every_courtier_or_guest = { - add_to_list = potential_victims - } - } - #Local pool characters - every_pool_character = { - province = prev.holder.capital_province - add_to_list = potential_victims - } - } - } - scope:defender = { - #ai landless house heads in the capital - every_vassal = { - limit = { - is_ai = yes - is_landless_administrative = yes - domicile ?= { - domicile_location.county = { - this = scope:defender.capital_county - } - } - } - add_to_list = potential_victims - } - #Courtiers of landless house heads in the capital - every_vassal = { - limit = { - is_landless_administrative = yes - domicile ?= { - domicile_location.county = { - this = scope:defender.capital_county - } - } - } - every_courtier_or_guest = { - add_to_list = potential_victims - } - } - } - ordered_in_list = { - order_by = { - value = 1 - #I suppose they would probably try to avoid killing their own - if = { - limit = { - NOT = { - faith = scope:attacker.faith - } - } - add = 1 - } - if = { - limit = { - NOT = { - culture = scope:attacker.culture - } - } - add = 1 - } - } - list = potential_victims - max = { - value = "list_size(potential_victims)" - divide = 2 - } - add_to_list = gok_slaughter_victims - } -} - -gok_retribution_cleanup_effect = { - if = { - limit = { - exists = scope:khans_retribution_target - } - scope:defender = { - every_held_title = { - limit = { - has_variable = refused_submission - } - remove_variable = refused_submission - } - every_vassal_or_below = { - limit = { - any_held_title = { - has_variable = refused_submission - } - } - remove_variable = refused_submission - } - } - } -} - -gok_world_conquest_generic_rewards_effect = { - custom_tooltip = gok_gain_hegemony - hidden_effect = { - #CENGIZ KHAGANATE - if = { - limit = { - culture = { - has_cultural_pillar = language_turkic - } - OR = { - has_nickname = nick_cengiz_khan - primary_title = { - any_past_holder = { - has_nickname = nick_cengiz_khan - } - } - } - } - #Create a hegemony for the GoK! - create_dynamic_title = { - tier = hegemony - name = GREATEST_OF_KHANS_HEGEMONY_NAME_CENGIZ - adj = GREATEST_OF_KHANS_HEGEMONY_NAME_CENGIZ_ADJ - article = article_CONFEDERATION_CULTURE_NAME - } - } - #YEKHE KHAGANATE - else_if = { - limit = { - culture = { - has_cultural_pillar = language_mongolic - } - OR = { - has_nickname = nick_yekhe_khagan - primary_title = { - any_past_holder = { - has_nickname = nick_yekhe_khagan - } - } - } - } - #Create a hegemony for the GoK! - create_dynamic_title = { - tier = hegemony - name = GREATEST_OF_KHANS_HEGEMONY_NAME_YEKHE - adj = GREATEST_OF_KHANS_HEGEMONY_NAME_YEKHE_ADJ - article = article_CONFEDERATION_CULTURE_NAME - } - } - #DORT YONLUG KHAGANATE - else_if = { - limit = { - culture = { - has_cultural_pillar = language_turkic - } - OR = { - has_nickname = nick_dort_yonlug_khagan - primary_title = { - any_past_holder = { - has_nickname = nick_dort_yonlug_khagan - } - } - } - } - #Create a hegemony for the GoK! - create_dynamic_title = { - tier = hegemony - name = GREATEST_OF_KHANS_HEGEMONY_NAME_DORT_YONLUG - adj = GREATEST_OF_KHANS_HEGEMONY_NAME_DORT_YONLUG_ADJ - article = article_CONFEDERATION_CULTURE_NAME - } - } - #MAR SARGIS KHAGANATE - else_if = { - limit = { - faith = faith:nestorian - OR = { - has_nickname = nick_mar_sargis - primary_title = { - any_past_holder = { - has_nickname = nick_mar_sargis - } - } - } - } - #Create a hegemony for the GoK! - create_dynamic_title = { - tier = hegemony - name = GREATEST_OF_KHANS_HEGEMONY_NAME_MAR_SARGIS - adj = GREATEST_OF_KHANS_HEGEMONY_NAME_MAR_SARGIS_ADJ - article = article_CONFEDERATION_CULTURE_NAME - } - } - #XORMUSTA KHAGANATE - else_if = { - limit = { - OR = { - faith = faith:nestorian - faith.religion = faith:manichean.religion - } - OR = { - has_nickname = nick_xormuzta - primary_title = { - any_past_holder = { - has_nickname = nick_xormuzta - } - } - } - } - #Create a hegemony for the GoK! - create_dynamic_title = { - tier = hegemony - name = GREATEST_OF_KHANS_HEGEMONY_NAME_XORMUZTA - adj = GREATEST_OF_KHANS_HEGEMONY_NAME_XORMUZTA_ADJ - article = article_CONFEDERATION_CULTURE_NAME - } - } - #CIHANGIR KHAGANATE - else_if = { - limit = { - faith.religion = religion:islam_religion - capital_province ?= { - OR = { - geographical_region = world_middle_east - geographical_region = world_asia_minor - geographical_region = world_steppe_tarim - geographical_region = world_steppe_central - } - } - current_date >= 1250 - OR = { - has_nickname = nick_cihangir - primary_title = { - any_past_holder = { - has_nickname = nick_cihangir - } - } - } - } - #Create a hegemony for the GoK! - create_dynamic_title = { - tier = hegemony - name = GREATEST_OF_KHANS_HEGEMONY_NAME_CIHANGIR - adj = GREATEST_OF_KHANS_HEGEMONY_NAME_CIHANGIR_ADJ - article = article_CONFEDERATION_CULTURE_NAME - } - } - #AKHSHUNWAR KHAGANATE - else_if = { - limit = { - culture = { - OR = { - has_cultural_pillar = language_iranian - has_cultural_pillar = language_scythian - } - } - OR = { - has_nickname = nick_akhshunwar - primary_title = { - any_past_holder = { - has_nickname = nick_akhshunwar - } - } - } - } - #Create a hegemony for the GoK! - create_dynamic_title = { - tier = hegemony - name = GREATEST_OF_KHANS_HEGEMONY_NAME_AKHSHUNWAR - adj = GREATEST_OF_KHANS_HEGEMONY_NAME_AKHSHUNWAR_ADJ - article = article_CONFEDERATION_CULTURE_NAME - } - } - #TENGRI KHAGANATE - else_if = { - limit = { - NOR = { - faith.religion = religion:christianity_religion - faith.religion = religion:islam_religion - } - OR = { - has_nickname = nick_tengri_khagan - primary_title = { - any_past_holder = { - has_nickname = nick_tengri_khagan - } - } - } - } - #Create a hegemony for the GoK! - create_dynamic_title = { - tier = hegemony - name = GREATEST_OF_KHANS_HEGEMONY_NAME_TENGRI - adj = GREATEST_OF_KHANS_HEGEMONY_NAME_TENGRI_ADJ - article = article_CONFEDERATION_CULTURE_NAME - } - } - #CHINGGISID KHAGANATE - else_if = { - limit = { - NOT = { - culture = { - has_cultural_pillar = language_turkic - } - } - OR = { - has_nickname = nick_genghis_khan - primary_title = { - any_past_holder = { - has_nickname = nick_genghis_khan - } - } - } - } - #Create a hegemony for the GoK! - create_dynamic_title = { - tier = hegemony - name = GREATEST_OF_KHANS_HEGEMONY_NAME_CHINGGIS - adj = GREATEST_OF_KHANS_HEGEMONY_NAME_CHINGGIS_ADJ - article = article_CONFEDERATION_CULTURE_NAME - } - } - #FALLBACK OPTIONS - else_if = { - limit = { - culture = { - has_cultural_pillar = heritage_turkic - } - } - #Create a hegemony for the GoK! - create_dynamic_title = { - tier = hegemony - name = GREATEST_OF_KHANS_HEGEMONY_NAME_TURKIC - adj = GREATEST_OF_KHANS_HEGEMONY_NAME_TURKIC_ADJ - article = article_CONFEDERATION_CULTURE_NAME - } - } - else_if = { - limit = { - culture = { - has_cultural_pillar = heritage_mongolic - } - } - #Create a hegemony for the GoK! - create_dynamic_title = { - tier = hegemony - name = GREATEST_OF_KHANS_HEGEMONY_NAME_MONGOLIC - adj = GREATEST_OF_KHANS_HEGEMONY_NAME_MONGOLIC_ADJ - article = article_CONFEDERATION_CULTURE_NAME - } - } - else = { - #Create a hegemony for the GoK! - create_dynamic_title = { - tier = hegemony - name = GREATEST_OF_KHANS_HEGEMONY_NAME - adj = GREATEST_OF_KHANS_HEGEMONY_NAME_ADJ - article = article_CONFEDERATION_CULTURE_NAME - } - } - scope:new_title = { - save_scope_as = gok_hegemony - } - scope:gok_hegemony = { - set_color_from_title = root.capital_county.kingdom - set_can_be_named_after_dynasty = no - set_can_use_nomadic_naming = no - set_definitive_form = yes - } - - create_title_and_vassal_change = { - type = created - save_scope_as = change - add_claim_on_loss = no - } - scope:gok_hegemony = { - change_title_holder = { - holder = root - change = scope:change - } - } - resolve_title_and_vassal_change = scope:change - scope:gok_hegemony = { - generate_coa = yes - } - save_scope_value_as = { - name = gok_empire_crumble_date - value = global_var:gok_empire_crumble_date - } - } - - #Give the GoK hegemony all of the steppe as de jure - hidden_effect = { - situation:the_great_steppe ?= { - every_situation_county = { - limit = { - holder.top_liege ?= root - } - empire = { - add_to_list = steppe_empires - } - } - } - every_in_list = { - list = steppe_empires - limit = { - #Check Chinese empires aren't swapped - NAND = { - exists = hegemony - OR = { - this = title:e_zhongyuan - this = title:e_yongliang - this = title:e_jingyang - this = title:e_liangyi - this = title:e_lingnan - } - } - } - set_de_jure_liege_title = scope:gok_hegemony - } - } - - if = { - limit = { - exists = dynasty - } - dynasty = { - add_dynasty_prestige = monumental_dynasty_prestige_gain - } - } - - if = { - limit = { - has_education_martial_trigger = yes - NOT = { - has_trait = education_martial_5 - } - } - remove_trait = education_martial_1 - remove_trait = education_martial_2 - remove_trait = education_martial_3 - remove_trait = education_martial_4 - custom_tooltip = { - text = gain_5th_lvl_education_martial_tt - add_trait = education_martial_5 - } - - } - else_if = { - limit = { - has_education_diplomacy_trigger = yes - NOT = { - has_trait = education_diplomacy_5 - } - } - remove_trait = education_diplomacy_1 - remove_trait = education_diplomacy_2 - remove_trait = education_diplomacy_3 - remove_trait = education_diplomacy_4 - custom_tooltip = { - text = gain_5th_lvl_education_diplomacy_tt - add_trait = education_diplomacy_5 - } - } - else_if = { - limit = { - has_education_stewardship_trigger = yes - NOT = { - has_trait = education_stewardship_5 - } - } - remove_trait = education_stewardship_1 - remove_trait = education_stewardship_2 - remove_trait = education_stewardship_3 - remove_trait = education_stewardship_4 - custom_tooltip = { - text = gain_5th_lvl_education_stewardship_tt - add_trait = education_stewardship_5 - } - } - else_if = { - limit = { - has_education_intrigue_trigger = yes - NOT = { - has_trait = education_intrigue_5 - } - } - remove_trait = education_intrigue_1 - remove_trait = education_intrigue_2 - remove_trait = education_intrigue_3 - remove_trait = education_intrigue_4 - custom_tooltip = { - text = gain_5th_lvl_education_intrigue_tt - add_trait = education_intrigue_5 - } - } - else_if = { - limit = { - has_education_learning_trigger = yes - NOT = { - has_trait = education_learning_5 - } - } - remove_trait = education_learning_1 - remove_trait = education_learning_2 - remove_trait = education_learning_3 - remove_trait = education_learning_4 - custom_tooltip = { - text = gain_5th_lvl_education_learning_tt - add_trait = education_learning_5 - } - } - else = { - add_trait = shrewd - } -} - -gok_upgrade_realm_and_government_effect = { - if = { - limit = { - exists = scope:realm_culture_1 - } - culture = { - get_random_innovation_from = scope:realm_culture_1 - } - } - if = { - limit = { - exists = scope:realm_culture_2 - } - culture = { - get_random_innovation_from = scope:realm_culture_2 - } - } - if = { - limit = { - exists = scope:realm_culture_3 - } - culture = { - get_random_innovation_from = scope:realm_culture_3 - } - } - - capital_county = { - if = { - limit = { - any_county_province = { - OR = { - has_holding_type = nomad_holding - has_holding_type = herder_holding - } - } - } - add_county_modifier = { - modifier = great_khans_capital_modifier - years = 30 - } - } - custom_tooltip = gok_capital_holdings_switch_tt - - hidden_effect = { - every_county_province = { - limit = { - has_holding = yes - OR = { - has_holding_type = nomad_holding - has_holding_type = herder_holding - } - } - set_holding_type = castle_holding - add_building = castle_02 - if = { - limit = { - any_culture_global = { - has_cultural_era_or_later = culture_era_high_medieval - } - } - add_building = castle_03 - } - if = { - limit = { - any_culture_global = { - has_cultural_era_or_later = culture_era_late_medieval - } - } - add_building = castle_04 - } - } - random_county_province = { - limit = { - has_holding = no - } - save_scope_as = capital_prov_1 - set_holding_type = church_holding - - if = { - limit = { - any_culture_global = { - has_cultural_era_or_later = culture_era_high_medieval - } - } - add_building = temple_03 - } - if = { - limit = { - any_culture_global = { - has_cultural_era_or_later = culture_era_late_medieval - } - } - add_building = temple_02 - } - } - random_county_province = { - limit = { - exists = scope:capital_prov_1 - has_holding = no - NOT = { - this = scope:capital_prov_1 - } - } - set_holding_type = city_holding - - if = { - limit = { - any_culture_global = { - has_cultural_era_or_later = culture_era_high_medieval - } - } - add_building = city_03 - } - if = { - limit = { - any_culture_global = { - has_cultural_era_or_later = culture_era_late_medieval - } - } - add_building = city_02 - } - } - } - } - custom_tooltip = gok_every_held_title_gains_castles - custom_tooltip = gok_some_nomad_vassals_holdings_switch - hidden_effect = { - every_held_title = { - limit = { - tier = tier_county - any_county_province = { - is_county_capital = yes - OR = { - has_holding_type = nomad_holding - has_holding_type = herder_holding - } - } - } - every_county_province = { - limit = { - is_county_capital = yes - OR = { - has_holding_type = nomad_holding - has_holding_type = herder_holding - } - } - set_holding_type = castle_holding - } - } - every_realm_county = { - limit = { - any_county_province = { - is_county_capital = yes - OR = { - has_holding_type = nomad_holding - has_holding_type = herder_holding - } - } - holder = { - is_in_list = switching_vassals - } - } - every_county_province = { - limit = { - is_county_capital = yes - OR = { - has_holding_type = nomad_holding - has_holding_type = herder_holding - } - } - set_holding_type = castle_holding - #holder is a high lord, upgrade their castle a bit - if = { - limit = { - county.holder = { - highest_held_title_tier >= tier_duchy - } - this = county.holder.capital_province - } - if = { - limit = { - any_culture_global = { - has_cultural_era_or_later = culture_era_high_medieval - } - } - add_building = castle_02 - } - if = { - limit = { - any_culture_global = { - has_cultural_era_or_later = culture_era_late_medieval - } - } - add_building = castle_03 - } - } - } - #Holder is a king, give capital some extra holdings - if = { - limit = { - holder = { - highest_held_title_tier >= tier_kingdom - } - this = holder.capital_county - } - random_county_province = { - limit = { - has_holding = no - } - save_scope_as = capital_prov_1 - begin_create_holding = church_holding - } - random_county_province = { - limit = { - exists = scope:capital_prov_1 - has_holding = no - NOT = { - this = scope:capital_prov_1 - } - } - begin_create_holding = city_holding - } - } - } - } -} - -gok_final_decision_list_setup = { - #Switching vassals to feudalism or clan - every_vassal_or_below = { - limit = { - gok_gov_switch_valid_vassal_trigger = yes - mpo_greatest_of_khans_0030_willing_nomad_vassal = yes - } - add_to_list = switching_vassals - } - save_scope_value_as = { - name = switching_vassals_value - value = "list_size(switching_vassals)" - } - #Switching vassals TO nomadism - every_vassal_or_below = { - limit = { - NOR = { - government_has_flag = government_is_nomadic - government_has_flag = government_is_herder - } - gok_gov_switch_valid_vassal_trigger = yes - } - #ones willing to switch can remain in power - if = { - limit = { - OR = { - has_trait = nomadic_philosophy - culture = { - has_cultural_tradition = tradition_horse_lords - } - culture = { - has_cultural_tradition = tradition_devoted_horsemanship - } - AND = { - highest_held_title_tier >= tier_kingdom - mpo_greatest_of_khans_0030_dominated_sedentary_vassal = yes - } - AND = { - highest_held_title_tier >= tier_duchy - mpo_greatest_of_khans_0030_willing_sedentary_vassal = yes - } - highest_held_title_tier = tier_county - } - } - add_to_list = sedentary_to_nomad_vassals - } - #The others must go - else = { - add_to_list = city_state_vassals - } - } - save_scope_value_as = { - name = sedentary_to_nomad_vassals_value - value = "list_size(sedentary_to_nomad_vassals)" - } - save_scope_value_as = { - name = city_state_vassals_value - value = "list_size(city_state_vassals)" - } - #counties that will be switched from non-nomadic to nomadic - every_realm_county = { - limit = { - NOR = { - #Already nomadic - any_county_province = { - OR = { - has_holding_type = nomad_holding - has_holding_type = herder_holding - } - } - #Holder is invalid for switching - holder = { gok_gov_switch_valid_vassal_trigger = no } - #De jure kingdom capital (probably important) - this = kingdom.title_capital_county - AND = { - holder = { - is_in_list = city_state_vassals - } - this = holder.capital_county - } - } - } - add_to_list = burned_to_nomadism - } - save_scope_value_as = { - name = burned_to_nomadism_value - value = "list_size(burned_to_nomadism)" - } -} - -### GoK will automatically declare DEVASTATING wars -gok_war_target_evaluation_and_declaration_effect = { - save_scope_as = actor - if = { - limit = { - mpo_offer_submission_or_ruin_shown_actor_trigger = yes - mpo_offer_submission_or_ruin_valid_actor_trigger = yes - } - # Set the Mongol Emperor as reference point - save_scope_as = mongol_emperor - add_character_flag = { - flag = free_mongol_cb - days = 14 - } - # Select a new target - random_neighboring_top_liege_realm_owner = { - limit = { - NOT = { is_at_war_with = scope:mongol_emperor } - NOT = { is_allied_to = scope:mongol_emperor } - NOT = { this = scope:mongol_emperor } - NOT = { top_liege = scope:mongol_emperor } - save_temporary_scope_as = truce_check - NOT = { - scope:mongol_emperor = { - any_truce_target = { - this = scope:truce_check - } - } - } - trigger_if = { # We don't want the Byzantine empire to get annihilated immediately - limit = { - OR = { - has_primary_title = title:e_byzantium - has_primary_title = title:e_latin_empire - } - } - OR = { - # This is not the 'historical' Mongol Empire, all bets are off - NOT = { - scope:mongol_emperor = { - any_held_title = { - this = title:e_mongol_empire - } - } - } - current_year < 1178 - current_year >= 1279 # Roughly when the mongols should fracture historically - scope:mongol_emperor = { - completely_controls_region = special_mongol_empire_golden_horde_region # Controls all of Russia and the Steppe - } - any_realm_county = { # Byzantium is expansionist - count >= 50 - title_province = { - OR = { - geographical_region = special_mongol_empire_conquest_region_prio_5 - geographical_region = special_mongol_empire_conquest_region_prio_4 - geographical_region = special_mongol_empire_conquest_region_prio_3 - geographical_region = special_mongol_empire_conquest_region_prio_2 - geographical_region = special_mongol_empire_conquest_region_prio_1 - geographical_region = special_mongol_empire_conquest_region_prio_1_alpha - } - } - } - } - } - save_temporary_scope_as = recipient - mpo_offer_submission_or_ruin_shown_recipient_trigger = yes - mpo_offer_submission_or_ruin_valid_recipient_trigger = yes - } - weight = { - base = 0 - modifier = { - add = mongol_invasion_target_character_weight - always = yes - } - #Should only attack China when very strong - modifier = { - factor = 0.1 - primary_title = title:h_china - current_military_strength >= scope:mongol_emperor.half_current_military_strength - } - } - save_temporary_scope_as = next_invasion_target - primary_title = { - save_temporary_scope_as = next_invasion_title_target - } - } - if = { - limit = { - exists = scope:next_invasion_target - } - if = { - limit = { # Declare war on every same-tier count or duke in same empire - scope:next_invasion_target = { - OR = { - highest_held_title_tier = tier_county - highest_held_title_tier = tier_duchy - } - } - } - scope:next_invasion_title_target = { - add_to_temporary_list = all_titles_to_declare_on - empire = { - every_in_de_jure_hierarchy = { # Find all other same-tier titles in same de jure empire - continue = { - tier > tier_county - # Stop searching if you hit the Mongol Emperor's territory at any point - trigger_if = { - limit = { exists = holder } - NOT = { holder = scope:mongol_emperor } - NOT = { holder.top_liege = scope:mongol_emperor } - } - } - limit = { - exists = this - OR = { - tier = tier_county - tier = tier_duchy - } - exists = holder - holder = { - is_independent_ruler = yes - NOT = { this = scope:mongol_emperor } - NOT = { top_liege = scope:mongol_emperor } - NOT = { is_at_war_with = scope:mongol_emperor } - NOT = { is_allied_to = scope:mongol_emperor } - NOT = { is_at_war_with = scope:mongol_emperor } - save_temporary_scope_as = truce_check - NOT = { - scope:mongol_emperor = { - any_truce_target = { - this = scope:truce_check - } - } - } - save_temporary_scope_as = recipient - mpo_offer_submission_or_ruin_shown_recipient_trigger = yes - mpo_offer_submission_or_ruin_valid_recipient_trigger = yes - in_diplomatic_range = scope:mongol_emperor - } - } - - add_to_temporary_list = all_titles_to_declare_on - } - } - every_in_list = { - list = all_titles_to_declare_on - limit = { - holder = { - # An extra check to make sure we haven't snuck any Mongol territory in - NOT = { this = scope:mongol_emperor } - NOT = { top_liege = scope:mongol_emperor } - - # Standard conditions - NOT = { is_at_war_with = scope:mongol_emperor } - NOT = { - is_in_list = has_been_sent_subjugation_offer - } - save_temporary_scope_as = truce_check - - save_temporary_scope_as = recipient - mpo_offer_submission_or_ruin_shown_recipient_trigger = yes - mpo_offer_submission_or_ruin_valid_recipient_trigger = yes - in_diplomatic_range = scope:mongol_emperor - } - NOT = { - scope:mongol_emperor = { - any_truce_target = { - this = scope:truce_check - } - } - } - } - holder = { - add_to_list = title_holders_declared_on - } - } - every_in_list = { - list = title_holders_declared_on - save_scope_as = recipient - scope:mongol_emperor = { - run_interaction = { - interaction = mpo_offer_submission_or_ruin - actor = scope:mongol_emperor - recipient = scope:recipient - send_threshold = decline - } - } - } - } - } - else = { - scope:next_invasion_target = { - save_scope_as = recipient - } - scope:mongol_emperor = { - run_interaction = { - interaction = mpo_offer_submission_or_ruin - actor = scope:mongol_emperor - recipient = scope:recipient - send_threshold = decline - } - } - } - } - } -} - -mpo_add_golden_lineage_effect = { - add_trait = golden_lineage - if = { - limit = { - exists = dynasty - } - custom_tooltip = descendants_gain_golden_lineage - hidden_effect = { - dynasty = { - every_dynasty_member = { - custom = custom - limit = { - any_ancestor = { - this = $CHARACTER$ - } - } - add_trait = golden_lineage - } - } - } - } - every_child = { - limit = { - NOR = { - has_trait = bastard - has_trait = legitimized_bastard - } - NOT = { - has_trait = golden_lineage - } - } - add_trait = golden_lineage - if = { - limit = { - is_male = yes - } - every_child = { - add_trait = golden_lineage - } - } - } -} - -mpo_gok_onslaught_admin_vassal_reorganization = { - #Make a list of admin vassals high enough tier to survive - every_vassal_or_below = { - limit = { - is_landed = yes - #This should be duke or count based on gov type - highest_held_title_tier >= main_administrative_tier - government_allows = administrative - } - add_to_list = protected_admin_vassals - } - #Make a list of admin vassals that must be moved or purged - every_vassal_or_below = { - limit = { - is_landed = yes - highest_held_title_tier < main_administrative_tier - government_allows = administrative - highest_held_title_tier > tier_barony - NOT = { - any_liege_or_above = { - is_in_list = protected_admin_vassals - } - } - } - add_to_list = vulnerable_admin_vassals - } - #Make a list of the highest surviving admin in their vassalship chain - every_in_list = { - list = protected_admin_vassals - limit = { - OR = { - liege = scope:defender - liege = { - NOT = { - government_allows = administrative - } - } - } - } - add_to_list = top_protected_admins - } - #Find a liege for every vulnerable we can - every_in_list = { - list = vulnerable_admin_vassals - #Move de jure vulnerable vassals to empires - if = { - limit = { - capital_county.empire.holder ?= { - is_in_list = top_protected_admins - } - } - capital_county.empire.holder = { - save_scope_as = landless_admin_liege - } - create_title_and_vassal_change = { - type = swear_fealty - save_scope_as = change - add_claim_on_loss = yes - } - change_liege = { - liege = scope:landless_admin_liege - change = scope:change - } - resolve_title_and_vassal_change = scope:change - remove_from_list = vulnerable_admin_vassals - } - #Move de jure vulnerable vassals to kingdoms - if = { - limit = { - capital_county.kingdom.holder ?= { - is_in_list = top_protected_admins - } - } - capital_county.kingdom.holder = { - save_scope_as = landless_admin_liege - } - create_title_and_vassal_change = { - type = swear_fealty - save_scope_as = change - add_claim_on_loss = yes - } - change_liege = { - liege = scope:landless_admin_liege - change = scope:change - } - resolve_title_and_vassal_change = scope:change - remove_from_list = vulnerable_admin_vassals - } - #Move de jure vulnerable vassals to duchies - if = { - limit = { - capital_county.duchy.holder ?= { - is_in_list = top_protected_admins - } - } - capital_county.duchy.holder = { - save_scope_as = landless_admin_liege - } - create_title_and_vassal_change = { - type = swear_fealty - save_scope_as = change - add_claim_on_loss = yes - } - change_liege = { - liege = scope:landless_admin_liege - change = scope:change - } - resolve_title_and_vassal_change = scope:change - remove_from_list = vulnerable_admin_vassals - } - #Move landed vulnerable neighbors - else_if = { - limit = { - is_landed = yes - any_sub_realm_county = { - any_neighboring_county = { - holder = { - OR = { - is_in_list = top_protected_admins - any_liege_or_above = { - is_in_list = top_protected_admins - } - } - } - } - } - } - save_scope_as = vulnerable_neighbor - ordered_in_list = { - order_by = current_military_strength - list = top_protected_admins - limit = { - any_sub_realm_county = { - any_neighboring_county = { - holder = { - OR = { - this = scope:vulnerable_neighbor - any_liege_or_above = { - this = scope:vulnerable_neighbor - } - } - } - } - } - } - save_scope_as = landless_admin_liege - } - create_title_and_vassal_change = { - type = swear_fealty - save_scope_as = change - add_claim_on_loss = yes - } - change_liege = { - liege = scope:landless_admin_liege - change = scope:change - } - resolve_title_and_vassal_change = scope:change - remove_from_list = vulnerable_admin_vassals - } - #Move landless to random top tiers in list - else_if = { - limit = { - is_landless_administrative = yes - #Lower tier than potential liege - any_in_list = { - list = top_protected_admins - highest_held_title_tier > prev.highest_held_title_tier - } - } - ordered_in_list = { - list = top_protected_admins - order_by = highest_held_title_tier - save_scope_as = landless_admin_liege - } - create_title_and_vassal_change = { - type = swear_fealty - save_scope_as = change - add_claim_on_loss = yes - } - change_liege = { - liege = scope:landless_admin_liege - change = scope:change - } - resolve_title_and_vassal_change = scope:change - remove_from_list = vulnerable_admin_vassals - } - } -} - -gok_government_change_story_end_effect = { - if = { - limit = { - any_owned_story = { - story_type = story_greatest_of_khans - } - } - custom_tooltip = gok_ending_warning_offer_sub_or_ruin - custom_tooltip = gok_ending_warning_onslaught - custom_tooltip = gok_ending_warning_end_decision - hidden_effect = { - every_owned_story = { - limit = { story_type = story_greatest_of_khans } - end_story = yes - } - trigger_event = { - id = mpo_greatest_of_khans.0041 - days = 3 - } - } - } -} diff --git a/N3OW/common/scripted_effects/09_mpo_settlement_issue_effects.txt b/N3OW/common/scripted_effects/09_mpo_settlement_issue_effects.txt deleted file mode 100644 index 1f18bbdc..00000000 --- a/N3OW/common/scripted_effects/09_mpo_settlement_issue_effects.txt +++ /dev/null @@ -1,234 +0,0 @@ -settlement_issue_on_accepted_default_effect = { - save_scope_as = task_contract - task_contract_taker = { - set_variable = nomadic_migration_contract_$NUMBER$ - if = { - limit = { - location = root.task_contract_location - } - trigger_event = { - id = mpo_contract_events.$ARRIVAL_ID$ - } - } - else = { - start_travel_plan = { - destination = root.task_contract_location - on_arrival_event = mpo_contract_events.$ARRIVAL_ID$ - return_trip = yes - on_travel_planner_cancel_event = mpo_contract_events.$RESET_ID$ - } - } - } -} - -settlement_issue_on_invalidated_default_effect = { - task_contract_location.county = { - remove_county_modifier = ongoing_settlement_contract - } -} - -settlement_issue_on_create_effect = { - scope:contract.task_contract_location.county = { - add_county_modifier = ongoing_settlement_contract - } - scope:contract.task_contract_taker = { - if = { - limit = { - is_ai = yes - is_available = yes - } - accept_task_contract = scope:contract - } - else_if = { - limit = { - is_ai = yes - } - scope:contract = { - invalidate_contract = yes - } - } - } -} - -settlement_issue_after_completing_effect = { - hidden_effect = { - scope:task_contract = { - complete_task_contract = control - } - scope:task_contract.task_contract_location.county = { - remove_county_modifier = ongoing_settlement_contract - } - } -} - -settlement_issue_control_reward_effect = { - show_as_tooltip = { - task_contract_location.county = { - change_county_control = settlement_issue_control_reward - } - } -} - -settlement_issue_herd_reward_effect = { - show_as_tooltip = { - task_contract_taker.domicile = { - change_herd = settlement_issue_herd_reward - } - } -} - -settlement_issue_culture_reward_effect = { - show_as_tooltip = { - task_contract_location.county.var:migration_previous_culture = { - change_cultural_acceptance = { - target = root.task_contract_taker.culture - value = 5 - desc = cultural_acceptance_gain_event - } - } - } -} - -settlement_issue_gold_reward_effect = { - show_as_tooltip = { - task_contract_taker = { - add_gold = minor_gold_value - } - } -} - -settlement_issue_opinion_reward_effect = { - show_as_tooltip = { - task_contract_taker = { - add_character_modifier = $MODIFIER$ - } - } -} - -settlement_issue_character_opinion_reward_effect = { - show_as_tooltip = { - $CHARACTER$ = { - add_opinion = { - modifier = friendliness_opinion - target = root.task_contract_taker - opinion = 10 - } - } - } -} - -settlement_issue_fertility_reward_effect = { - show_as_tooltip = { - task_contract_location.county = { - change_county_fertility = tiny_county_fertility_level_gain - } - } -} - -mpo_invalidating_settlement_contract_effect = { - switch = { - trigger = has_variable - nomadic_migration_contract_1 = { - random_character_active_contract = { - limit = { - has_task_contract_type = nomadic_migration_contract_1 - } - save_scope_as = task_contract - } - trigger_event = { id = mpo_contract_events.0003 } - } - nomadic_migration_contract_2 = { - random_character_active_contract = { - limit = { - has_task_contract_type = nomadic_migration_contract_2 - } - save_scope_as = task_contract - } - trigger_event = { id = mpo_contract_events.0013 } - } - nomadic_migration_contract_3 = { - random_character_active_contract = { - limit = { - has_task_contract_type = nomadic_migration_contract_3 - } - save_scope_as = task_contract - } - trigger_event = { id = mpo_contract_events.0023 } - } - } -} - -mpo_settlement_issue_reset_effect = { - scope:task_contract.task_contract_employer ?= { - if = { - limit = { - NOT = { exists = scope:new_employer } - is_alive = yes - OR = { - liege_or_court_owner = root - employer = root - } - } - save_scope_as = new_employer - } - } - if = { - limit = { - NOT = { exists = scope:contract_province } - OR = { - scope:task_contract.task_contract_location.province_owner ?= root - scope:task_contract.task_contract_location.province_owner.top_liege ?= root - } - } - scope:task_contract.task_contract_location ?= { - save_scope_as = contract_province - } - } - - scope:task_contract ?= { invalidate_contract = yes } - - remove_variable = nomadic_migration_contract_$NUMBER$ - - trigger_event = { - id = mpo_contract_events.$ID$ - days = 1 - } -} - -mpo_settlement_issue_own_lands_effect = { - if = { - limit = { - NOT = { exists = scope:contract_province } - } - random_held_county = { - limit = { - is_landless_type_title = no - exists = title_province - county_control < 90 - NOT = { has_county_modifier = ongoing_settlement_contract } - } - title_province = { save_scope_as = contract_province } - } - } - - if = { - limit = { - NOT = { exists = scope:new_employer } - } - random_knight = { - limit = { - is_landed = no - is_ai = yes - } - alternative_limit = { is_ai = yes } - save_scope_as = new_employer - } - } - - create_task_contract = { - task_contract_type = nomadic_migration_contract_$NUMBER$ - task_contract_tier = $TIER$ - location = scope:contract_province - task_contract_employer = scope:new_employer - } -} diff --git a/N3OW/common/scripted_effects/10_ach_effects.txt b/N3OW/common/scripted_effects/10_ach_effects.txt deleted file mode 100644 index 7cf110eb..00000000 --- a/N3OW/common/scripted_effects/10_ach_effects.txt +++ /dev/null @@ -1,7037 +0,0 @@ -#Coronation End Effect -# root is the current attending character -# current scope is the host of the activity, also available as scope:activity.host - -# Activity Base Effects -coronation_busy_effect = { - if = { - limit = { - is_ai = no - has_multiple_players = yes - } - involved_activity ?= { - add_to_variable_list = { - name = coronation_list_busy - target = root - } - } - } -} - -coronation_ready_effect = { - if = { - limit = { - is_ai = no - has_multiple_players = yes - } - involved_activity ?= { - remove_list_variable = { - name = coronation_list_busy - target = root - } - } - } -} - -# Realm Laws -coronation_reset_realm_law_effect = { - trigger_event = ach_maintenance_events.0001 -} - -coronation_reset_realm_law_variable_effect = { - if = { - limit = { - NOT = { has_realm_law = crowned_emperor } - has_variable = crowned_emperor_var - } - remove_variable = crowned_emperor_var - } - else_if = { - limit = { - NOT = { has_realm_law = crowned_king } - has_variable = crowned_king_var - } - remove_variable = crowned_king_var - } -} - -coronation_change_law_effect = { - if = { - limit = { - involved_activity = { - has_activity_option = { - category = special_type - option = coronation_type_anointment - } - } - } - if = { - limit = { - NOT = { - has_game_rule = coronation_laws_off - } - } - add_realm_law = crowned_emperor - } - set_variable = crowned_emperor_var - } - else = { - if = { - limit = { - NOT = { - has_game_rule = coronation_laws_off - } - } - add_realm_law = crowned_king - } - set_variable = crowned_king_var - } -} - -# Oaths -coronation_set_oath_effect = { - save_scope_value_as = { - name = $OATH$ - value = flag:$OATH$ - } - scope:$OATH$ ?= { - add_to_list = chosen_oaths - } -} - -coronation_set_oath_alternatives_effect = { - # Find up to 11 fitting oaths the ruler might choose from - random_list = { - pick = 11 - unique = yes - ## Diplomacy - # Alliances - 1 = { - trigger = { - is_ai = no - NOR = { - has_variable = diplomacy_oath_1 - has_character_modifier = oath_of_alliances - } - any_ally = { - count <= 1 - } - } - coronation_set_oath_effect = { OATH = diplomacy_oath_1 } - } - # Children - 1 = { - trigger = { - NOR = { - has_variable = diplomacy_oath_2 - has_character_modifier = oath_of_children - } - fertility >= 0.5 - trigger_if = { - limit = { - is_ai = yes - } - OR = { - is_married = no - any_spouse = { - fertility >= 0.5 - } - } - } - age <= 30 - any_child = { - count <= 2 - } - } - coronation_set_oath_effect = { OATH = diplomacy_oath_2 } - } - ## Martial - # Reconquering Lands in your De Jure - 1 = { - trigger = { - OR = { - is_ai = no - ai_has_conqueror_personality = yes - } - NOR = { - has_variable = martial_oath_1 - has_character_modifier = oath_of_reconquest - government_has_flag = government_is_mandala - } - primary_title ?= { - any_de_jure_county = { - percent >= 0.35 - holder = { - NOR = { - target_is_liege_or_above = root - this = root - } - } - } - } - } - coronation_set_oath_effect = { OATH = martial_oath_1 } - } - # General Conquer lands Oath - 1 = { - trigger = { - OR = { - is_ai = no - ai_has_conqueror_personality = yes - ai_has_warlike_personality = yes - } - NOR = { - has_variable = martial_oath_2 - has_character_modifier = oath_of_conquest - government_has_flag = government_is_mandala - } - } - coronation_set_oath_effect = { OATH = martial_oath_2 } - } - ## Stewardship - # Peace Oath - 1 = { - trigger = { - NOR = { - has_variable = stewardship_oath_1 - has_character_modifier = oath_of_peace - } - days_of_continuous_peace <= 365 - } - coronation_set_oath_effect = { OATH = stewardship_oath_1 } - } - # Building Oath - 1 = { - trigger = { - OR = { - is_ai = no - ai_has_economical_boom_personality = yes - } - NOR = { - has_variable = stewardship_oath_2 - has_character_modifier = oath_of_buildings - government_has_flag = government_is_nomadic - government_has_flag = government_is_tribal - } - } - coronation_set_oath_effect = { OATH = stewardship_oath_2 } - } - ## Intrigue - ## Learning - # University Oath - 50 = { - trigger = { - is_ai = no - NOT = { has_variable = learning_oath_1 } - any_realm_county = { - title_province = { has_special_building = no } - development_level >= 25 - } - } - coronation_set_oath_effect = { OATH = learning_oath_1 } - } - # Purge Pretenders - 1 = { - trigger = { - is_ai = no - NOR = { - has_variable = purge_pretenders_oath - has_character_modifier = oath_of_purge_pretenders - has_realm_law = single_heir_succession_law - has_realm_law = clan_harmonious_partition_succession_law - has_realm_law = single_heir_succession_law_youngest - has_realm_law = single_heir_dynasty_house - government_has_flag = government_is_mandala - } - trigger_if = { - limit = { - culture = { - has_cultural_era_or_later = culture_era_late_medieval - } - } - primary_title ?= { - any_claimant = { - count >= 12 - NOT = { - is_child_of = root - } - } - } - } - trigger_else_if = { - limit = { - culture = { - has_cultural_era_or_later = culture_era_high_medieval - } - } - primary_title ?= { - any_claimant = { - count >= 10 - NOT = { - is_child_of = root - } - } - } - } - trigger_else_if = { - limit = { - culture = { - has_cultural_era_or_later = culture_era_early_medieval - } - } - primary_title ?= { - any_claimant = { - count >= 8 - NOT = { - is_child_of = root - } - } - } - } - trigger_else = { - primary_title ?= { - any_claimant = { - count >= 6 - NOT = { - is_child_of = root - } - } - } - } - } - coronation_set_oath_effect = { OATH = purge_pretenders_oath } - } - - # End the struggle - 100 = { - trigger = { - is_ai = no - NOR = { - has_variable = end_the_struggle_oath - has_character_modifier = oath_of_end_the_struggle - } - OR = { - exists = struggle:iberian_struggle - exists = struggle:persian_struggle - } - OR = { - any_character_struggle = { is_struggle_type = iberian_struggle } - any_character_struggle = { is_struggle_type = persian_struggle } - } - } - coronation_set_oath_effect = { OATH = end_the_struggle_oath } - } - - ## Greatest Hunter - 1 = { - trigger = { - is_ai = no - NOR = { - has_variable = greatest_hunter_oath - has_character_modifier = oath_greatest_hunter - culture ?= { has_cultural_tradition = tradition_vegetarianism } - } - } - coronation_set_oath_effect = { OATH = greatest_hunter_oath } - } - - ## Heir Preparation - 1 = { - trigger = { - is_ai = no - age >= 50 - NOR = { - has_variable = heir_preparation_oath - has_character_modifier = oath_heir_preparation - primary_heir ?= { - is_child_of = prev - } - } - } - coronation_set_oath_effect = { OATH = heir_preparation_oath } - } - - ## Install Claimants - 1 = { - trigger = { - is_ai = no - NOR = { - has_variable = install_claimants_oath - has_character_modifier = oath_install_claimants - government_has_flag = government_is_mandala - } - } - coronation_set_oath_effect = { OATH = install_claimants_oath } - } - - ## Mend the Fracture - 1 = { - trigger = { - always = no - NOR = { - has_variable = mend_the_fracture_oath - has_character_modifier = oath_mend_the_fracture - } - any_sub_realm_county = { - percent >= 0.4 - culture != root.culture - culture = { - cultural_acceptance = { - target = root.culture - value <= 20 - } - any_culture_county = { - count >= 6 - holder = { - target_is_liege_or_above = root - } - } - any_culture_county = { - percent >= 0.6 - holder = { - target_is_liege_or_above = root - } - } - } - } - } - coronation_set_oath_effect = { OATH = mend_the_fracture_oath } - } - - ## Provide for Warriors - 1 = { - trigger = { - OR = { - is_ai = no - ai_has_economical_boom_personality = yes - } - NOR = { - has_variable = provide_for_the_warriors_oath - has_character_modifier = oath_provide_for_the_warriors - government_has_flag = government_is_nomadic - government_has_flag = government_is_tribal - } - any_directly_owned_province = { - count >= 3 - free_building_slots >= 1 - NOT = { - has_building_or_higher = oath_warriors_building_01 - } - } - } - coronation_set_oath_effect = { OATH = provide_for_the_warriors_oath } - } - - ## Provide for the Faithful - 1 = { - trigger = { - OR = { - is_ai = no - ai_has_economical_boom_personality = yes - } - NOR = { - has_variable = provide_for_the_faithful_oath - has_character_modifier = oath_provide_for_the_faithful - government_has_flag = government_is_nomadic - government_has_flag = government_is_tribal - } - any_directly_owned_province = { - count >= 3 - free_building_slots >= 1 - NOT = { - has_building_or_higher = oath_faithful_building_01 - } - } - } - coronation_set_oath_effect = { OATH = provide_for_the_faithful_oath } - } - - ## Provide for the Poor - 1 = { - trigger = { - OR = { - is_ai = no - ai_has_economical_boom_personality = yes - } - NOR = { - has_variable = provide_for_the_poor_oath - has_character_modifier = oath_provide_for_the_poor - government_has_flag = government_is_nomadic - government_has_flag = government_is_tribal - } - any_directly_owned_province = { - count >= 3 - free_building_slots >= 1 - NOT = { - has_building_or_higher = oath_poor_building_01 - } - } - } - coronation_set_oath_effect = { OATH = provide_for_the_poor_oath } - } - - ## Repent - 1 = { - trigger = { - is_ai = no - NOR = { - has_variable = repent_oath - has_character_modifier = oath_repent - } - num_sinful_traits >= 1 - } - coronation_set_oath_effect = { OATH = repent_oath } - } - } -} - -coronation_chosen_oath_setup_effect = { - custom_tooltip = $VAR$_tooltip - set_variable = { - name = $VAR$ - value = 0 - } - set_variable = { - name = $VAR$_timer - days = $TIME$ - } - trigger_event = { - on_action = coronation_failed_oath_on_action - days = $TIME$ - } - scope:activity = { - set_variable = { - name = $VAR$ - value = 0 - } - } -} - -coronation_upgrade_oath_value_effect = { - save_scope_value_as = { - name = value_of_oath - value = { - value = 0 - add = { - value = scope:activity.var:activity_special_type_progression - divide = 20 - ceiling = yes - } - min = 1 - } - } - # Diplomacy - if = { - limit = { - has_variable = diplomacy_oath_1 - var:diplomacy_oath_1 = 0 - } - set_variable = { - name = diplomacy_oath_1 - value = scope:value_of_oath - } - } - if = { - limit = { - has_variable = diplomacy_oath_2 - var:diplomacy_oath_2 = 0 - } - set_variable = { - name = diplomacy_oath_2 - value = scope:value_of_oath - } - } - # Martial - else_if = { - limit = { - has_variable = martial_oath_1 - var:martial_oath_1 = 0 - } - set_variable = { - name = martial_oath_1 - value = scope:value_of_oath - } - } - else_if = { - limit = { - has_variable = martial_oath_2 - var:martial_oath_2 = 0 - } - set_variable = { - name = martial_oath_2 - value = scope:value_of_oath - } - } - # Stewardship - else_if = { - limit = { - has_variable = stewardship_oath_1 - var:stewardship_oath_1 = 0 - } - set_variable = { - name = stewardship_oath_1 - value = scope:value_of_oath - } - } - else_if = { - limit = { - has_variable = stewardship_oath_2 - var:stewardship_oath_2 = 0 - } - set_variable = { - name = stewardship_oath_2 - value = scope:value_of_oath - } - } - # Intrigue - # Learning - else_if = { - limit = { - has_variable = learning_oath_1 - var:learning_oath_1 = 0 - } - set_variable = { - name = learning_oath_1 - value = scope:value_of_oath - } - } - - # De Jure rights - else_if = { - limit = { - has_variable = purge_pretenders_oath - var:purge_pretenders_oath = 0 - } - set_variable = { - name = purge_pretenders_oath - value = scope:value_of_oath - } - } - - # End the struggle - else_if = { - limit = { - has_variable = end_the_struggle_oath - var:end_the_struggle_oath = 0 - } - set_variable = { - name = end_the_struggle_oath - value = scope:value_of_oath - } - } - - # Greatest Hunter - else_if = { - limit = { - has_variable = greatest_hunter_oath - var:greatest_hunter_oath = 0 - } - set_variable = { - name = greatest_hunter_oath - value = scope:value_of_oath - } - } - - # Heir Preparation - else_if = { - limit = { - has_variable = heir_preparation_oath - var:heir_preparation_oath = 0 - } - set_variable = { - name = heir_preparation_oath - value = scope:value_of_oath - } - } - - # Install Claimants - else_if = { - limit = { - has_variable = install_claimants_oath - var:install_claimants_oath = 0 - } - set_variable = { - name = install_claimants_oath - value = scope:value_of_oath - } - } - - # Mend the Fracture - else_if = { - limit = { - has_variable = mend_the_fracture_oath - var:mend_the_fracture_oath = 0 - } - set_variable = { - name = mend_the_fracture_oath - value = scope:value_of_oath - } - } - - # Provide for the Warriors - else_if = { - limit = { - has_variable = provide_for_the_warriors_oath - var:provide_for_the_warriors_oath = 0 - } - set_variable = { - name = provide_for_the_warriors_oath - value = scope:value_of_oath - } - } - - # Provide for the Faithful - else_if = { - limit = { - has_variable = provide_for_the_faithful_oath - var:provide_for_the_faithful_oath = 0 - } - set_variable = { - name = provide_for_the_faithful_oath - value = scope:value_of_oath - } - } - - # Provide for the Poor - else_if = { - limit = { - has_variable = provide_for_the_poor_oath - var:provide_for_the_poor_oath = 0 - } - set_variable = { - name = provide_for_the_poor_oath - value = scope:value_of_oath - } - } - - # Repent - else_if = { - limit = { - has_variable = repent_oath - var:repent_oath = 0 - } - set_variable = { - name = repent_oath - value = scope:value_of_oath - } - } -} - -coronation_oath_reward_effect = { - save_scope_value_as = { - name = oath_base_value - value = { - value = 200 - switch = { - trigger = var:$VARIABLE$ - 2 = { - multiply = { - value = 1 - add = 0.4 - } - } - 3 = { - multiply = { - value = 1 - add = { - value = 0.4 - multiply = 2 - } - } - } - 4 = { - multiply = { - value = 1 - add = { - value = 0.4 - multiply = 3 - } - } - } - 5 = { - multiply = { - value = 1 - add = { - value = 0.4 - multiply = 4 - } - } - } - 6 = { - multiply = { - value = 1 - add = { - value = 0.4 - multiply = 5 - } - } - } - 7 = { - multiply = { - value = 1 - add = { - value = 0.4 - multiply = 6 - } - } - } - } - } - } - coronation_oath_legitimacy_effect = { VALUE = scope:oath_base_value } - coronation_oath_prestige_effect = { - VALUE = scope:oath_base_value - PRESTIGE_MULTIPLIER = 2 - } - remove_variable = $VARIABLE$ -} - -coronation_oath_legitimacy_effect = { - save_scope_value_as = { - name = base_value - value = { - value = $VALUE$ - if = { # With higher legitimacy level, you are less in need of legitimacy, so we reduce the amount. In turn, we increase prestige gains later - limit = { - root.legitimacy_level >= 5 - } - multiply = 0.5 - } - #Balancing down because wow - multiply = 0.2 - } - } - add_legitimacy = scope:base_value -} - -coronation_oath_prestige_effect = { - save_scope_value_as = { - name = base_value - value = { - value = $VALUE$ - multiply = $PRESTIGE_MULTIPLIER$ - if = { # When Legitimacy gain goes down, Prestige gain goes up - limit = { - root.legitimacy_level >= 5 - } - multiply = 1.5 - } - #Balancing down because wow - multiply = 0.5 - } - } - add_prestige = scope:base_value -} - -coronation_oath_success_effect = { - save_scope_value_as = { - name = find_oath - value = flag:$OATH$ - } - show_as_tooltip = { - coronation_oath_reward_effect = { VARIABLE = $OATH$ } - } - - trigger_event = coronation_events.0175 -} - -coronation_oath_remove_variable_on_failure_effect = { - if = { - limit = { - has_variable = $VAR$ - NOT = { has_variable = $VAR$_timer } - } - save_scope_value_as = { - name = find_oath - value = flag:$VAR$ - } - remove_variable = $VAR$ - } -} - -coronation_oath_cleanup_effect = { - # Diplomacy - if = { - limit = { - NOT = { has_variable = diplomacy_oath_1 } - } - remove_variable = diplomacy_oath_1_timer - } - if = { - limit = { - NOT = { has_variable = diplomacy_oath_2 } - } - remove_variable = diplomacy_oath_2_timer - } - # Martial - if = { - limit = { - NOT = { has_variable = martial_oath_1 } - } - remove_variable = martial_oath_1_timer - remove_variable = oath_reconquest_title - } - if = { - limit = { - NOT = { has_variable = martial_oath_2 } - } - remove_variable = martial_oath_2_timer - remove_variable = oath_conquest_size - } - # Stewardship - if = { - limit = { - NOT = { has_variable = stewardship_oath_1 } - } - remove_variable = stewardship_oath_1_timer - } - if = { - limit = { - NOT = { has_variable = stewardship_oath_2 } - } - remove_variable = stewardship_oath_2_timer - } - # Learning - if = { - limit = { - NOT = { has_variable = learning_oath_1 } - } - remove_variable = learning_oath_1_timer - remove_variable = learning_oath_cost - } - # De Jure rights - if = { - limit = { - NOT = { has_variable = purge_pretenders_oath } - } - remove_variable = purge_pretenders_oath_timer - remove_variable = purge_pretenders_target_title - } - # End the struggle - if = { - limit = { - NOT = { has_variable = end_the_struggle_oath } - } - remove_variable = end_the_struggle_oath_timer - remove_variable = end_the_struggle_oath_type_var - } - # Greatest Hunter - if = { - limit = { - NOT = { has_variable = greatest_hunter_oath } - } - remove_variable = greatest_hunter_oath_timer - remove_variable = greatest_hunter_oath_l_counter - remove_variable = greatest_hunter_oath_r_counter - } - # Heir Preparation - if = { - limit = { - NOT = { has_variable = heir_preparation_oath } - } - remove_variable = heir_preparation_oath_timer - } - # Install Claimants - if = { - limit = { - NOT = { has_variable = install_claimants_oath } - } - remove_variable = install_claimants_oath_timer - } - # Mend the Fracture - if = { - limit = { - NOT = { has_variable = mend_the_fracture_oath } - } - remove_variable = mend_the_fracture_oath_timer - } - # Provide for the Warriors - if = { - limit = { - NOT = { has_variable = provide_for_the_warriors_oath } - } - remove_variable = provide_for_the_warriors_oath_timer - } - # Provide for the Faithful - if = { - limit = { - NOT = { has_variable = provide_for_the_faithful_oath } - } - remove_variable = provide_for_the_faithful_oath_timer - } - # Provide for the Poor - if = { - limit = { - NOT = { has_variable = provide_for_the_poor_oath } - } - remove_variable = provide_for_the_poor_oath_timer - } - # Repent - if = { - limit = { - NOT = { has_variable = repent_oath } - } - remove_variable = repent_oath_timer - } - -} - -coronation_hof_visit_effect = { - involved_activity = { - add_activity_log_entry = { - key = activity_hof_arrival_log - tags = { good } - score = 20 - character = activity_host - target = scope:hof - } - # Small boost to Magnificence - activity_special_type_progression_tiny = yes - custom_tooltip = coronation_tt_positive_tiny - activity_host = { - # Hosts get a bit of legitimacy and piety from having the HoF show up - add_legitimacy_effect = { LEGITIMACY = minor_legitimacy_gain } - add_piety = minor_piety_gain - } - activity_location = { - show_as_tooltip = { - add_province_modifier = { - modifier = ach_hof_visit_modifier - years = 10 - } - } - if = { # Add the Papal visit modifier - limit = { - NOT = { has_province_modifier = ach_hof_visit_modifier } - } - hidden_effect = { - add_province_modifier = { - modifier = ach_hof_visit_modifier - years = 10 - } - - # Toast the divine trinity of those who care: the host, the local baron and the holy count - scope:host = { - send_interface_toast = { - title = ach_coronation.0001.tt.hof_visit.title - left_icon = scope:hof - custom_tooltip = ach_coronation.0001.tt.hof_visit - } - } - } - } - } - } -} - -create_proper_coronation_artifact_setup = { - if = { - limit = { - coronation_proper_artifact_crown_trigger = yes - } - save_scope_value_as = { - name = coronation_artifact - value = flag:smith_type_crown - } - } - else_if = { - limit = { - coronation_proper_artifact_regalia_trigger = yes - } - save_scope_value_as = { - name = coronation_artifact - value = flag:smith_type_regalia - } - } - else = { - save_scope_value_as = { - name = coronation_artifact - value = flag:smith_type_crown - } - } - - if = { #first we check for an antiquarian - limit = { - employs_court_position = antiquarian_court_position - } - random_court_position_holder = { - type = antiquarian_court_position - save_scope_as = crownmaker - } - } - else_if = { - limit = { - any_pool_character = { - province = root.capital_province - has_no_particular_noble_roots_trigger = yes - is_available_healthy_ai_adult = yes - NOR = { - exists = inspiration - has_trait = peasant_leader - } - } - } - - random_pool_character = { - province = root.capital_province - limit = { - has_no_particular_noble_roots_trigger = yes - is_available_healthy_ai_adult = yes - NOR = { - exists = inspiration - has_trait = peasant_leader - } - } - save_scope_as = crownmaker - } - hidden_effect = { root = { add_courtier = scope:crownmaker } } - } - else = { - hidden_effect = { - create_character = { - template = local_artisan_template - location = root.capital_province - gender_female_chance = root_faith_dominant_gender_adjusted_female_chance - save_scope_as = crownmaker - } - root = { add_courtier = scope:crownmaker } - } - } - - add_character_flag = waiting_for_a_crown - - scope:crownmaker = { - set_variable = { - name = artifact_smith_type - value = scope:coronation_artifact - } - create_inspiration = smith_inspiration - } -} - -create_proper_coronation_artifact_creation = { - if = { - limit = { scope:coronation_artifact = flag:smith_type_crown } - custom_tooltip = court_maintenance.0011.crown_needed.tooltip - } - else = { - custom_tooltip = court_maintenance.0011.regalia_needed.tooltip - } - sponsor_inspiration = scope:crownmaker.inspiration -} - -create_proper_coronation_artifact = { - create_proper_coronation_artifact_setup = yes - hidden_effect = { sponsor_inspiration = scope:crownmaker.inspiration } -} - -coronation_ceremony_magnificence_effect = { - if = { - limit = { - coronation_ceremony_magnificence_adjustment_value >= 3 - } - custom_tooltip = coronation_tt_positive_major - scope:activity = { activity_special_type_progression_major = yes } - } - else_if = { - limit = { - coronation_ceremony_magnificence_adjustment_value >= 2 - } - custom_tooltip = coronation_tt_positive_medium - scope:activity = { activity_special_type_progression_medium = yes } - } - else_if = { - limit = { - coronation_ceremony_magnificence_adjustment_value >= 1 - } - custom_tooltip = coronation_tt_positive_tiny - scope:activity = { activity_special_type_progression_tiny = yes } - } - else_if = { - limit = { - coronation_ceremony_magnificence_adjustment_value >= 0 - } - custom_tooltip = coronation_tt_positive_miniscule - scope:activity = { activity_special_type_progression_miniscule = yes } - } - else_if = { - limit = { - coronation_ceremony_magnificence_adjustment_value >= -1 - } - custom_tooltip = coronation_tt_negative_tiny - scope:activity = { activity_special_type_progression_negative_tiny = yes } - } - else = { - custom_tooltip = coronation_tt_negative - scope:activity = { activity_special_type_progression_negative = yes } - } - if = { - limit = { - has_activity_intent = coronation_impress_attendees - } - custom_tooltip = improved_because_intent_tt - } - if = { - limit = { - scope:activity = { - has_activity_option = { - category = ceremony_size - option = coronation_large_ceremony - } - } - } - custom_tooltip = improved_by_coronation_large_ceremony_tt - } - if = { - limit = { - scope:activity = { - has_activity_option = { - category = ceremony_size - option = coronation_small_ceremony - } - } - } - custom_tooltip = degraded_by_coronation_small_ceremony_tt - } -} - -#For flavor and adjusting piety in coronation ceremony the clergy's approval event -coronation_ceremony_piety_effect = { - if = { - limit = { - coronation_clergy_approval_value >= 3 - } - add_piety = { - value = massive_piety_gain - if = { - limit = { - scope:activity = { - has_activity_option = { - category = special_type - option = coronation_type_anointment - } - } - } - multiply = 1.5 - } - } - } - else_if = { - limit = { - coronation_clergy_approval_value >= 2 - } - add_piety = { - value = major_piety_gain - if = { - limit = { - scope:activity = { - has_activity_option = { - category = special_type - option = coronation_type_anointment - } - } - } - multiply = 1.5 - } - } - } - else_if = { - limit = { - coronation_clergy_approval_value >= 1 - } - add_piety = { - value = medium_piety_gain - if = { - limit = { - scope:activity = { - has_activity_option = { - category = special_type - option = coronation_type_anointment - } - } - } - multiply = 1.5 - } - } - } - else_if = { - limit = { - coronation_clergy_approval_value >= 0 - } - add_piety = { - value = minor_piety_gain - if = { - limit = { - scope:activity = { - has_activity_option = { - category = special_type - option = coronation_type_anointment - } - } - } - multiply = 1.5 - } - } - } - else_if = { - limit = { - coronation_clergy_approval_value >= -1 - } - add_piety = { - value = miniscule_piety_gain - if = { - limit = { - scope:activity = { - has_activity_option = { - category = special_type - option = coronation_type_anointment - } - } - } - multiply = 1.5 - } - } - } - else_if = { - limit = { - coronation_clergy_approval_value >= -2 - } - add_piety = minor_piety_loss - } - else_if = { - limit = { - coronation_clergy_approval_value >= -3 - } - add_piety = major_piety_loss - } - else_if = { - limit = { - coronation_clergy_approval_value >= -4 - } - add_piety = major_piety_loss - } - else = { - add_piety = massive_piety_loss - } - #Custom tooltip triggers need to match coronation_clergy_approval_value - if = { - limit = { - OR = { - scope:activity.special_guest:priest ?= { - opinion = { - target = scope:host - value >= 90 - } - } - faith.religious_head ?= { - opinion = { - target = scope:host - value >= 40 - } - } - } - } - custom_tooltip = coronation_piety_improved_by_clerics - } - if = { - limit = { - OR = { - scope:activity.special_guest:priest ?= { - opinion = { - target = scope:host - value <= -90 - } - } - faith.religious_head ?= { - opinion = { - target = scope:host - value <= -40 - } - } - } - } - custom_tooltip = coronation_piety_harmed_by_clerics - } - if = { - limit = { - OR = { - num_virtuous_traits >= 1 - has_trait = zealous - has_trait = saint - has_trait = saoshyant_descendant - has_trait = sayyid - has_trait = divine_blood - has_trait = consecrated_blood - has_trait = order_member - has_trait = faith_warrior - has_trait = saoshyant - has_trait = paragon - has_trait = savior - has_trait = crusader_king - has_trait = theologian - } - } - custom_tooltip = coronation_piety_improved_by_virtuous_traits - } - if = { - limit = { - OR = { - num_sinful_traits >= 1 - has_trait = cynical - has_trait = excommunicated - has_any_shunned_or_criminal_trait_in_faith_trigger = { - CHARACTER = scope:host - FAITH = scope:host.faith - } - has_trait = despoiler_of_byzantium - has_trait = bastard - has_trait = gallowsbait - has_trait = decadent - num_sinful_traits >= 2 - } - } - custom_tooltip = coronation_piety_harmed_by_sinful_traits - } - if = { - limit = { - piety_level >= 3 - } - custom_tooltip = coronation_piety_improved_by_piety_level - } - if = { - limit = { - piety_level < 1 - } - custom_tooltip = coronation_piety_harmed_by_piety_level - } -} - -#For flavor and adjusting prestige in coronation ceremony the vassals' approval event -coronation_ceremony_prestige_effect = { - if = { - limit = { - coronation_vassals_approval_value >= 3 - } - add_prestige = massive_prestige_gain - } - else_if = { - limit = { - coronation_vassals_approval_value >= 2 - } - add_prestige = major_prestige_gain - } - else_if = { - limit = { - coronation_vassals_approval_value >= 1 - } - add_prestige = medium_prestige_gain - } - else_if = { - limit = { - coronation_vassals_approval_value >= 0 - } - add_prestige = minor_prestige_gain - } - else_if = { - limit = { - coronation_vassals_approval_value >= -1 - } - add_prestige = miniscule_prestige_gain - } - else_if = { - limit = { - coronation_vassals_approval_value >= -2 - } - add_prestige = minor_prestige_loss - } - else_if = { - limit = { - coronation_vassals_approval_value >= -3 - } - add_prestige = medium_prestige_loss - } - else_if = { - limit = { - coronation_vassals_approval_value >= -4 - } - add_prestige = major_prestige_loss - } - else = { - add_prestige = massive_prestige_loss - } - #Custom tooltip triggers need to match coronation_vassals_approval_value - #Tooltip major reasons why or why not - if = { - limit = { - has_activity_intent = coronation_embrace_supporters - } - custom_tooltip = coronation_prestige_embrace_supporters - } - if = { - limit = { - combined_supporter_vassal_strength > combined_detractor_vassal_strength - } - custom_tooltip = coronation_prestige_improved_by_supporters - } - if = { - limit = { - combined_detractor_vassal_strength > combined_supporter_vassal_strength - } - custom_tooltip = coronation_prestige_harmed_by_detractors - } - if = { - limit = { - OR = { - any_targeting_faction = { - faction_power >= scope:host.current_military_strength - NOT = { - faction_is_type = peasant_faction - } - } - any_targeting_faction = { - count >= 2 - NOT = { - faction_is_type = peasant_faction - } - } - } - } - custom_tooltip = coronation_prestige_harmed_by_factions - } - if = { - limit = { - OR = { - has_trait = bastard - has_trait = denounced - has_trait = wild_oat - has_trait = legitimized_bastard - has_trait = gallivanter - has_trait = disinherited - has_trait = bastard_founder - has_trait = disloyal - } - } - custom_tooltip = coronation_prestige_harmed_by_ignoble_traits - } - if = { - limit = { - OR = { - AND = { - tyranny >= high_tyranny - dread < high_dread - } - AND = { - tyranny >= medium_tyranny - dread < medium_dread - } - } - } - custom_tooltip = coronation_prestige_harmed_by_tyranny - } - if = { - limit = { - OR = { - has_trait = august - has_trait = family_first - has_trait = knight_errant - AND = { - has_trait = lifestyle_hunter - OR = { - has_trait_xp = { - trait = lifestyle_hunter - track = hunter - value >= 25 - } - has_trait_xp = { - trait = lifestyle_hunter - track = falconer - value >= 25 - } - } - } - AND = { - has_trait = governor - has_trait_xp = { - trait = governor - value >= 50 - } - } - has_trait = violet_poet - has_trait = diplomat - has_trait = extolled - has_trait = augustus - has_trait = greatest_of_khans - has_trait = gallant - } - } - custom_tooltip = coronation_prestige_improved_by_noble_traits - } - if = { - limit = { - legitimacy_level >= 5 - } - custom_tooltip = coronation_prestige_improved_by_legitimacy - } -} - -#For flavor and adjusting legitimacy in coronation ceremony the people's approval event -coronation_ceremony_legitimacy_effect = { - if = { - limit = { - has_legitimacy = yes - } - if = { - limit = { - coronation_popular_approval_value >= 3 - } - add_legitimacy = major_legitimacy_gain - } - else_if = { - limit = { - coronation_popular_approval_value >= 2 - } - add_legitimacy = medium_legitimacy_gain - } - else_if = { - limit = { - coronation_popular_approval_value >= 1 - } - add_legitimacy = minor_legitimacy_gain - } - else_if = { - limit = { - coronation_popular_approval_value >= 0 - } - add_legitimacy = miniscule_legitimacy_gain - } - else_if = { - limit = { - coronation_popular_approval_value >= -1 - } - add_legitimacy = minor_legitimacy_loss - } - else_if = { - limit = { - coronation_popular_approval_value >= -2 - } - add_legitimacy = medium_legitimacy_loss - } - else = { - add_legitimacy = major_legitimacy_loss - } - } - #Tooltip major reasons why or why not - #coronation_popular_approval_value needs to be updated with these - if = { - limit = { - has_activity_intent = coronation_impress_attendees - } - custom_tooltip = coronation_legit_impress_attendees - } - if = { - limit = { - OR = { - has_trait = peasant_leader - has_trait = populist_leader - has_trait = education_republican_knowledge_1 - has_trait = education_republican_knowledge_2 - has_trait = education_republican_knowledge_3 - has_trait = education_republican_knowledge_4 - } - } - custom_tooltip = coronation_legit_improved_by_peasant_leader - } - if = { - limit = { - location.county = { - county_opinion >= 25 - } - } - custom_tooltip = coronation_legit_improved_by_county_opinion - } - if = { - limit = { - involved_activity = { - has_activity_option = { - category = special_type - option = coronation_type_anointment - } - } - } - custom_tooltip = coronation_legit_improved_by_anointment - } - if = { - limit = { - location.county = { - county_opinion < 0 - holder = { - OR = { - this = root - any_liege_or_above = { - this = root - } - } - } - } - } - custom_tooltip = coronation_legit_harmed_by_county_opinion - } - if = { - limit = { - location.county = { - county_control < 100 - holder = { - OR = { - this = root - any_liege_or_above = { - this = root - } - } - } - } - } - custom_tooltip = coronation_legit_harmed_by_county_control - } - if = { - limit = { - #county is in faction against liege - location.county = { - holder = { - OR = { - this = scope:host - any_liege_or_above = { - this = scope:host - } - } - } - title_is_a_faction_member = yes - } - } - custom_tooltip = coronation_legit_harmed_by_county_faction - } - if = { - limit = { - OR = { - AND = { - tyranny >= high_tyranny - dread < high_dread - } - AND = { - tyranny >= medium_tyranny - dread < medium_dread - } - } - } - custom_tooltip = coronation_legitimacy_harmed_by_tyranny - } - if = { - limit = { - location = { - any_province_epidemic = { - exists = this - } - } - } - custom_tooltip = coronation_legit_harmed_by_disease - } -} - -#Increases or reduces attendee opinion based on coronation magnificence -#Used in ceremony phase -coronation_ceremony_opinion_effect = { - scope:activity = { - if = { - limit = { - scope:activity.var:activity_special_type_progression >= 75 - } - every_attending_character = { - custom = custom.every_attending_character - limit = { - NOT = { - this = scope:host - } - } - add_opinion = { - target = scope:host - opinion = 10 - modifier = impressed_opinion - } - } - scope:host = { - custom_tooltip = coronation_ceremony_opinion_effect_tt - } - } - else_if = { - limit = { - scope:activity.var:activity_special_type_progression >= 50 - } - every_attending_character = { - custom = custom.every_attending_character - limit = { - NOT = { - this = scope:host - } - } - add_opinion = { - target = scope:host - opinion = 5 - modifier = impressed_opinion - } - } - scope:host = { - custom_tooltip = coronation_ceremony_opinion_effect_tt - } - } - else_if = { - limit = { - scope:activity.var:activity_special_type_progression < 25 - } - every_attending_character = { - custom = custom.every_attending_character - limit = { - NOT = { - this = scope:host - } - } - add_opinion = { - target = scope:host - opinion = -10 - modifier = contempt_opinion - } - } - scope:host = { - custom_tooltip = coronation_ceremony_opinion_effect_tt - } - } - } -} - -#Only going to do anything in root's realm, during beginning of coronation ceremony -coronation_ceremony_county_effect = { - scope:activity = { - if = { - limit = { - activity_location.county.holder = { - OR = { - this = scope:host - any_liege_or_above = { - this = scope:host - } - } - } - } - if = { - limit = { - scope:activity.var:activity_special_type_progression >= 75 - } - activity_location.county = { - if = { - limit = { - county_control < 100 - } - change_county_control = major_county_control_gain - } - if = { - limit = { uses_county_fertility = yes } - add_county_modifier = { - modifier = major_coronation_approval_unsettled_modifier - years = 10 - desc = coronation_modifier_removed_on_title_transfer_desc - } - } - else = { - add_county_modifier = { - modifier = major_coronation_approval_modifier - years = 10 - desc = coronation_modifier_removed_on_title_transfer_desc - } - } - custom_tooltip = county_modifier_excellent_magnificence - custom_tooltip = coronation_modifier_removed_on_title_transfer_tt - custom_tooltip = coronation_modifier_negative_on_title_transfer_tt - } - } - else_if = { - limit = { - scope:activity.var:activity_special_type_progression >= 50 - } - activity_location.county = { - if = { - limit = { - county_control < 100 - } - change_county_control = medium_county_control_gain - } - if = { - limit = { uses_county_fertility = yes } - add_county_modifier = { - modifier = medium_coronation_approval_unsettled_modifier - years = 10 - desc = coronation_modifier_removed_on_title_transfer_desc - } - } - else = { - add_county_modifier = { - modifier = medium_coronation_approval_modifier - years = 10 - desc = coronation_modifier_removed_on_title_transfer_desc - } - } - custom_tooltip = county_modifier_good_magnificence - custom_tooltip = coronation_modifier_removed_on_title_transfer_tt - custom_tooltip = coronation_modifier_negative_on_title_transfer_tt - } - } - else_if = { - limit = { - scope:activity.var:activity_special_type_progression >= 25 - } - activity_location.county = { - if = { - limit = { - county_control < 100 - } - change_county_control = minor_county_control_gain - } - if = { - limit = { uses_county_fertility = yes } - add_county_modifier = { - modifier = minor_coronation_approval_unsettled_modifier - years = 10 - desc = coronation_modifier_removed_on_title_transfer_desc - } - } - else = { - add_county_modifier = { - modifier = minor_coronation_approval_modifier - years = 10 - desc = coronation_modifier_removed_on_title_transfer_desc - } - } - custom_tooltip = county_modifier_decent_magnificence - custom_tooltip = coronation_modifier_removed_on_title_transfer_tt - custom_tooltip = coronation_modifier_negative_on_title_transfer_tt - } - } - } - } -} - -coronation_move_towards_supporter_effect = { - $CHARACTER$ = { - if = { - limit = { - scope:activity = { - is_target_in_variable_list = { - name = major_detractor - target = $CHARACTER$ - } - } - } - scope:activity = { - remove_list_variable = { - name = major_detractor - target = $CHARACTER$ - } - } - } - #Are you a detractor? Stop that - if = { - limit = { - is_in_guest_subset = { - name = detractor - } - } - if = { - limit = { - root = scope:host - } - custom_tooltip = buddy_leaves_detractors_tt - } - else = { - custom_tooltip = buddy_leaves_detractors_tt.guest - } - scope:activity = { - remove_from_guest_subset = { - name = detractor - target = $CHARACTER$ - } - add_to_variable_list = { - name = blocked_from_detractors - target = $CHARACTER$ - } - if = { - limit = { - has_variable_list = locked_into_detractors - } - remove_list_variable = { - name = locked_into_detractors - target = $CHARACTER$ - } - } - } - - } - #Not a supporter? Make them a supporter - else_if = { - limit = { - NOT = { - is_in_guest_subset = { - name = supporter - } - } - } - if = { - limit = { - root = scope:host - } - custom_tooltip = buddy_becomes_supporter_tt - } - else = { - custom_tooltip = buddy_becomes_supporter_tt.guest - } - scope:activity = { - add_to_guest_subset = { - name = supporter - target = $CHARACTER$ - } - add_to_variable_list = { - name = locked_into_supporters - target = $CHARACTER$ - } - if = { - limit = { - has_variable_list = blocked_from_supporters - } - remove_list_variable = { - name = blocked_from_supporters - target = $CHARACTER$ - } - } - } - } - if = { - limit = { - NOT = { - scope:activity = { - any_in_list = { - variable = major_supporter - count = all - coronation_supporter_sort_value > $CHARACTER$.coronation_supporter_sort_value - } - } - } - } - scope:activity = { - ordered_in_list = { - variable = major_supporter - order_by = { - value = coronation_supporter_sort_value - multiply = -1 - } - scope:activity = { - remove_list_variable = { - name = major_supporter - target = prev - } - } - } - add_to_variable_list = { - name = major_supporter - target = $CHARACTER$ - } - } - } - } -} -coronation_move_towards_detractor_effect = { - $CHARACTER$ = { - if = { - limit = { - scope:activity = { - is_target_in_variable_list = { - name = major_supporter - target = $CHARACTER$ - } - } - } - scope:activity = { - remove_list_variable = { - name = major_supporter - target = $CHARACTER$ - } - } - } - #re you a detractor? Stop that - if = { - limit = { - is_in_guest_subset = { - name = supporter - } - } - if = { - limit = { - root = scope:host - } - custom_tooltip = hater_leaves_supporters_tt - } - else = { - custom_tooltip = hater_leaves_supporters_tt.guest - } - scope:activity = { - remove_from_guest_subset = { - name = supporter - target = $CHARACTER$ - } - add_to_variable_list = { - name = blocked_from_supporters - target = $CHARACTER$ - } - if = { - limit = { - has_variable_list = locked_into_detractors - } - remove_list_variable = { - name = locked_into_detractors - target = $CHARACTER$ - } - } - } - } - #Not a supporter? Make them a supporter - else_if = { - limit = { - NOT = { - is_in_guest_subset = { - name = detractor - } - } - } - if = { - limit = { - root = scope:host - } - custom_tooltip = hater_becomes_detractor_tt - } - else = { - custom_tooltip = hater_becomes_detractor_tt.guest - } - scope:activity = { - add_to_guest_subset = { - name = detractor - target = $CHARACTER$ - } - add_to_variable_list = { - name = locked_into_detractors - target = $CHARACTER$ - } - if = { - limit = { - has_variable_list = blocked_from_detractors - } - remove_list_variable = { - name = blocked_from_detractors - target = $CHARACTER$ - } - } - } - } - if = { - limit = { - NOT = { - scope:activity = { - any_in_list = { - variable = major_detractor - count = all - coronation_detractor_sort_value > $CHARACTER$.coronation_detractor_sort_value - } - } - } - } - scope:activity = { - ordered_in_list = { - variable = major_detractor - order_by = { - value = coronation_detractor_sort_value - multiply = -1 - } - scope:activity = { - remove_list_variable = { - name = major_detractor - target = prev - } - } - } - add_to_variable_list = { - name = major_detractor - target = $CHARACTER$ - } - } - } - } -} - -coronation_save_crowning_artifact_effect = { - if = { - limit = { - coronation_proper_artifact_regalia_trigger = no - } - ordered_character_artifact = { - order_by = artifact_rarity - limit = { - artifact_slot_type = helmet - has_variable = artifact_succession_title - var:artifact_succession_title = { - this = $HOST$.primary_title - } - } - alternative_limit = { - artifact_slot_type = helmet - NOT = { has_variable = artifact_succession_title } - } - alternative_limit = { - artifact_slot_type = helmet - } - save_scope_as = crowning_artifact - } - } - else = { - ordered_character_artifact = { - order_by = artifact_rarity - limit = { - artifact_slot_type = regalia - has_variable = artifact_succession_title - var:artifact_succession_title = { - this = $HOST$.primary_title - } - } - alternative_limit = { - artifact_slot_type = regalia - NOT = { has_variable = artifact_succession_title } - } - alternative_limit = { - artifact_slot_type = regalia - } - save_scope_as = crowning_artifact - } - } -} - -coronation_weaken_detractors_opinion_effect = { - involved_activity = { - if = { - limit = { - any_attending_character = { - is_vassal_of = root - has_vassal_stance = belligerent - NOT = { is_in_guest_subset = { name = detractor } } - } - } - every_attending_character = { - limit = { - is_vassal_of = root - has_vassal_stance = belligerent - NOT = { is_in_guest_subset = { name = detractor } } - opinion = { - target = root - value < 100 - } - } - custom = weaken_detractors_opinion - add_opinion = { - target = root - modifier = impressed_opinion - opinion = 5 - } - } - } - } -} - -coronation_exalt_crown_opinion_effect = { - involved_activity = { - if = { - limit = { - any_attending_character = { - is_vassal_of = root - has_vassal_stance = parochial - } - } - every_attending_character = { - limit = { - is_vassal_of = root - has_vassal_stance = parochial - } - custom = exalt_crown_opinion - add_opinion = { - target = root - modifier = impressed_opinion - opinion = 5 - } - } - } - } -} - -coronation_embrace_supporters_opinion_effect = { - involved_activity = { - if = { - limit = { - any_attending_character = { - is_vassal_of = root - OR = { - has_vassal_stance = glory_hound - has_vassal_stance = zealot - } - opinion = { - target = root - value < 100 - } - } - } - every_attending_character = { - limit = { - is_vassal_of = root - OR = { - has_vassal_stance = glory_hound - has_vassal_stance = zealot - } - opinion = { - target = root - value < 100 - } - } - custom = embrace_supporters_opinion - add_opinion = { - target = root - modifier = impressed_opinion - opinion = 5 - } - } - } - } -} - -coronation_impress_attendees_opinion_effect = { - involved_activity = { - if = { - limit = { - any_attending_character = { - is_vassal_of = root - OR = { - has_vassal_stance = courtly - has_vassal_stance = minority - } - opinion = { - target = root - value < 100 - } - } - } - every_attending_character = { - limit = { - is_vassal_of = root - OR = { - has_vassal_stance = courtly - has_vassal_stance = minority - } - opinion = { - target = root - value < 100 - } - } - custom = impress_attendees_opinion - add_opinion = { - target = root - modifier = impressed_opinion - opinion = 5 - } - } - } - } -} -coronation_save_anointer_effect = { - scope:host = { - if = { - limit = { - coronation_living_officiator_trigger = yes - NOT = { - scope:activity.var:officiator = { - this = scope:host - } - } - } - scope:activity.var:officiator = { - save_scope_as = anointer - } - } - if = { - limit = { - OR = { - NOT = { exists = scope:anointer } - scope:anointer = { - is_alive = no - } - scope:anointer = { - is_imprisoned = yes - } - } - scope:activity = { - any_attending_character = { - this = faith.religious_head - NOT = { - this = scope:host - } - faith = scope:host.faith - is_alive = yes - } - } - } - faith.religious_head = { - save_scope_as = anointer - } - } - if = { - limit = { - OR = { - NOT = { exists = scope:anointer } - scope:anointer = { - is_alive = no - } - scope:anointer = { - is_imprisoned = yes - } - } - cp:councillor_court_chaplain ?= { - is_alive = yes - is_imprisoned = no - is_incapable = no - has_contagious_deadly_disease_trigger = no - } - } - cp:councillor_court_chaplain ?= { - save_scope_as = anointer - } - } - if = { - limit = { - OR = { - NOT = { exists = scope:anointer } - scope:anointer = { - is_alive = no - } - scope:anointer = { - is_imprisoned = yes - } - } - } - ordered_vassal = { - order_by = max_military_strength - limit = { - involved_activity ?= scope:activity - government_has_flag = government_is_theocracy - is_alive = yes - } - save_scope_as = anointer - } - } - if = { - limit = { - OR = { - NOT = { exists = scope:anointer } - scope:anointer = { - is_alive = no - } - scope:anointer = { - is_imprisoned = yes - } - } - } - create_character = { - template = priest_character_template - location = scope:host.location - culture = scope:host.location.culture - faith = scope:host.faith - save_scope_as = anointer - } - scope:anointer = { - add_character_flag = anointer_destroy_me - } - } - } -} - -coronation_disburse_rewards_effect = { - if = { #Highest Magnificence Rewards - limit = { - scope:activity = { var:activity_special_type_progression >= 100 } - } - - #Oath Legitimacy and Prestige upgrade notificiation - custom_tooltip = coronation_oath_upgrade_100 - - custom_tooltip = coronation_reward_100 - save_scope_value_as = { - name = coronation_reward_mult - value = 2.5 - } - - ach_coronation_ceremony_intent_modifiers_giveaway_effect = yes - save_scope_value_as = { - name = coronation_vassal_opinion_gain - value = 20 - } - } - else_if = { #High Magnificence Rewards - limit = { - scope:activity = { var:activity_special_type_progression >= 75 } - } - - #Intent rewards - - ach_coronation_ceremony_intent_modifiers_giveaway_effect = yes - - #Oath Legitimacy and Prestige upgrade notificiation - custom_tooltip = coronation_oath_upgrade_75 - - custom_tooltip = coronation_reward_75 - save_scope_value_as = { - name = coronation_reward_mult - value = 1.75 - } - - save_scope_value_as = { - name = coronation_vassal_opinion_gain - value = 15 - } - } - else_if = { #Medium Magnificence Rewards - limit = { - scope:activity = { var:activity_special_type_progression >= 50 } - } - - #Oath Legitimacy and Prestige upgrade notificiation - custom_tooltip = coronation_oath_upgrade_50 - - custom_tooltip = coronation_reward_50 - save_scope_value_as = { - name = coronation_reward_mult - value = 1.5 - } - - save_scope_value_as = { - name = coronation_vassal_opinion_gain - value = 10 - } - } - else_if = { #Low Magnificence Rewards - limit = { - scope:activity = { var:activity_special_type_progression >= 25 } - } - - #Oath Legitimacy and Prestige upgrade notificiation - custom_tooltip = coronation_oath_upgrade_25 - - save_scope_value_as = { - name = coronation_vassal_opinion_gain - value = 5 - } - - save_scope_value_as = { - name = coronation_reward_mult - value = 1.25 - } - } - else = { - save_scope_value_as = { - name = coronation_reward_mult - value = 1 - } - } - - if = { - limit = { exists = scope:coronation_vassal_opinion_gain root = root.involved_activity.activity_host } - switch = { - trigger = has_activity_intent - coronation_exalt_crown = { - involved_activity = { - every_attending_character = { - limit = { - is_vassal_of = root - has_vassal_stance = parochial - } - custom = exalt_crown_opinion - add_opinion = { - target = root - modifier = impressed_opinion - opinion = scope:coronation_vassal_opinion_gain - } - } - } - } - coronation_embrace_supporters = { - involved_activity = { - every_attending_character = { - limit = { - is_vassal_of = root - OR = { - has_vassal_stance = glory_hound - has_vassal_stance = zealot - } - } - custom = embrace_supporters_opinion - add_opinion = { - target = root - modifier = impressed_opinion - opinion = scope:coronation_vassal_opinion_gain - } - } - } - } - coronation_weaken_detractors = { - involved_activity = { - every_attending_character = { - limit = { - is_vassal_of = root - has_vassal_stance = belligerent - NOT = { is_in_guest_subset = { name = detractor } } - } - custom = weaken_detractors_opinion - add_opinion = { - target = root - modifier = impressed_opinion - opinion = scope:coronation_vassal_opinion_gain - } - } - } - } - coronation_impress_attendees = { - involved_activity = { - every_attending_character = { - limit = { - is_vassal_of = root - OR = { - has_vassal_stance = courtly - has_vassal_stance = minority - } - } - custom = impress_attendees_opinion - add_opinion = { - target = root - modifier = impressed_opinion - opinion = scope:coronation_vassal_opinion_gain - } - } - } - } - } - } - - - save_scope_value_as = { - name = tribal_prestige_mult - value = 1 - } - switch = { - trigger = government_has_flag - government_is_administrative = { - change_influence = { - value = medium_influence_value - multiply = scope:coronation_reward_mult - } - save_scope_value_as = { - name = coronation_reward_mult - value = { - value = scope:coronation_reward_mult - multiply = 0.8 - } - } - } - government_is_celestial = { - change_influence = { - value = medium_influence_value - multiply = scope:coronation_reward_mult - } - save_scope_value_as = { - name = coronation_reward_mult - value = { - value = scope:coronation_reward_mult - multiply = 0.8 - } - } - } - government_is_meritocratic = { - change_influence = { - value = medium_influence_value - multiply = scope:coronation_reward_mult - } - save_scope_value_as = { - name = coronation_reward_mult - value = { - value = scope:coronation_reward_mult - multiply = 0.8 - } - } - } - government_is_steppe_admin = { - change_influence = { - value = medium_influence_value - multiply = scope:coronation_reward_mult - } - save_scope_value_as = { - name = coronation_reward_mult - value = { - value = scope:coronation_reward_mult - multiply = 0.8 - } - } - } - government_is_japan_administrative = { - change_influence = { - value = medium_influence_value - multiply = scope:coronation_reward_mult - } - save_scope_value_as = { - name = coronation_reward_mult - value = { - value = scope:coronation_reward_mult - multiply = 0.8 - } - } - } - government_is_nomadic = { - save_scope_value_as = { - name = coronation_herd_value - value = { - value = scope:host.domicile.medium_herd_value - multiply = scope:coronation_reward_mult - } - } - hidden_effect = { - domicile ?= { - change_herd = { - value = scope:coronation_herd_value - } - } - } - save_scope_value_as = { - name = coronation_reward_mult - value = { - value = scope:coronation_reward_mult - multiply = 0.8 - } - } - custom_tooltip = coronation_nomadic_herd_reward - } - government_is_clan = { - scope:activity = { - ordered_attending_character = { - order_by = coronation_supporter_sort_value - limit = { - house ?= scope:host.house - is_ai = yes - } - switch = { - trigger = scope:coronation_reward_mult - 1 = { - save_scope_value_as = { - name = clan_unity_gain - value = miniscule_unity_loss - } - } - 1.25 = { - save_scope_value_as = { - name = clan_unity_gain - value = miniscule_unity_gain - } - } - 1.5 = { - save_scope_value_as = { - name = clan_unity_gain - value = minor_unity_gain - } - } - 1.75 = { - save_scope_value_as = { - name = clan_unity_gain - value = medium_unity_gain - } - } - 2.5 = { - save_scope_value_as = { - name = clan_unity_gain - value = major_unity_gain - } - } - } - save_scope_as = unity_character - add_clan_unity_interaction_effect = { - CHARACTER = scope:unity_character - TARGET = scope:host - VALUE = scope:clan_unity_gain - DESC = clan_unity_coronation_reward.desc - REVERSE_NON_HOUSE_TARGET = no - } - } - } - save_scope_value_as = { - name = coronation_reward_mult - value = { - value = scope:coronation_reward_mult - multiply = 0.8 - } - } - } - government_is_tribal = { - save_scope_value_as = { - name = tribal_prestige_mult - value = { - value = scope:coronation_reward_mult - subtract = 1 - multiply = 0.4 - add = 1 - min = 1 - } - } - } - } - - # Prestige and Legitimacy Rewards for host after coronation ceremony - - add_prestige = { - value = 100 - multiply = { - value = number_of_vassal_supporters - min = 1 - } - multiply = scope:coronation_reward_mult - multiply = scope:tribal_prestige_mult - min = 100 - max = { - value = 4000 - multiply = scope:tribal_prestige_mult - } - } - - add_legitimacy = { - value = 25 - multiply = { - value = number_of_vassal_supporters - min = 1 - } - multiply = scope:coronation_reward_mult - min = 25 - max = 1000 - } - - # Renown if you have the Exalt the Crown Intent - if = { - limit = { has_activity_intent = coronation_exalt_crown } - dynasty = { add_dynasty_prestige = minor_dynasty_prestige_gain } - } -} - - -ach_coronation_ceremony_intent_modifiers_giveaway_effect = { - switch = { - trigger = has_activity_intent - coronation_exalt_crown = { - if = { - limit = { - government_has_flag = government_is_settled - } - add_character_modifier = { - modifier = bp4_exalted_coronation - years = 20 - } - } - else = { - add_character_modifier = { - modifier = bp4_exalted_coronation_alt - years = 20 - } - } - } - coronation_embrace_supporters = { - if = { - limit = { - government_has_flag = government_is_settled - } - add_character_modifier = { - modifier = bp4_supported_coronation - years = 20 - } - } - else = { - add_character_modifier = { - modifier = bp4_supported_coronation_alt - years = 20 - } - } - } - coronation_weaken_detractors = { - if = { - limit = { - government_has_flag = government_is_settled - } - add_character_modifier = { - modifier = bp4_asserting_coronation - years = 20 - } - } - else = { - add_character_modifier = { - modifier = bp4_asserting_coronation_alt - years = 20 - } - } - } - coronation_impress_attendees = { - if = { - limit = { - government_has_flag = government_is_settled - } - add_character_modifier = { - modifier = bp4_impressive_coronation - years = 20 - } - } - else = { - add_character_modifier = { - modifier = bp4_impressive_coronation_alt - years = 20 - } - } - } - } -} - -coronation_completed_log_entry_effect = { - involved_activity = { - add_activity_log_entry = { - key = coronation_completed_log_entry_effect - tags = { completed } - score = 100 - show_in_conclusion = yes - character = scope:activity.activity_host - #Effects - show_as_tooltip = { - scope:activity.activity_host = { - custom_tooltip = coronation_completed_log_oath_tt - coronation_change_law_effect = yes - coronation_disburse_rewards_effect = yes - } - } - } - } -} - - -coronation_create_artifact_game_start_effect = { - save_scope_as = owner - if = { - limit = { - OR = { - realm_size >= 60 - highest_held_title_tier >= tier_empire - } - } - set_artifact_rarity_famed = yes - } - else = { - set_artifact_rarity_masterwork = yes - } - - if = { - limit = { - coronation_proper_artifact_crown_trigger = yes - } - save_scope_value_as = { - name = artifact_type - value = flag:crown - } - } - else_if = { - limit = { - coronation_proper_artifact_regalia_trigger = yes - } - save_scope_value_as = { - name = artifact_type - value = flag:regalia - } - } - else = { - random_list = { - 1 = { - save_scope_value_as = { - name = artifact_type - value = flag:crown - } - } - 1 = { - save_scope_value_as = { - name = artifact_type - value = flag:regalia - } - } - } - } - primary_title = { - save_scope_as = crown_title - ordered_past_holder = { - limit = { - NOT = { this = scope:owner } - house = scope:owner.house - time_since_death ={ - years >= 80 - } - } - alternative_limit = { - NOT = { this = scope:owner } - dynasty = scope:owner.dynasty - time_since_death ={ - years >= 80 - } - } - alternative_limit = { - NOT = { this = scope:owner } - culture = scope:owner.culture - time_since_death ={ - years >= 80 - } - } - alternative_limit = { - NOT = { this = scope:owner } - faith = scope:owner.faith - time_since_death ={ - years >= 80 - } - } - alternative_limit = { - NOT = { this = scope:owner } - dynasty = scope:owner.dynasty - } - alternative_limit = { - NOT = { this = scope:owner } - culture = scope:owner.culture - } - alternative_limit = { - NOT = { this = scope:owner } - faith = scope:owner.faith - } - alternative_limit = { - NOT = { this = scope:owner } - } - alternative_limit = { - always = yes - } - save_scope_as = title_founder - } - } - - if = { - limit = { - game_start_date >= 1170.1.1 - } - coronation_create_artifact_date_effect = { - DATE_CREATION = 1060.1.1 - DATE_INHERITANCE = 1070.1.1 - } - } - else_if = { - limit = { - game_start_date >= 1066.1.1 - } - coronation_create_artifact_date_effect = { - DATE_CREATION = 940.1.1 - DATE_INHERITANCE = 960.1.1 - } - } - else_if = { - limit = { - game_start_date < 868.1.1 - } - coronation_create_artifact_date_effect = { - DATE_CREATION = 740.1.1 - DATE_INHERITANCE = 760.1.1 - } - } -} - -coronation_create_artifact_date_effect = { - if = { - limit = { - scope:artifact_type = flag:crown - } - create_artifact = { - name = ach_spawned_crown_name - description = ach_spawned_crown_desc - type = helmet - visuals = crown - template = crown_wearable_template - wealth = scope:wealth - quality = scope:quality - decaying = no - modifier = artifact_monthly_minor_prestige_2_modifier - modifier = artifact_legitimacy_gain_mult_4_modifier - history = { - type = created - date = $DATE_CREATION$ - recipient = scope:title_founder - location = scope:crown_title.title_capital_county.title_province - } - save_scope_as = newly_created_artifact - } - scope:newly_created_artifact = { - add_artifact_title_history = { - target = scope:crown_title - date = $DATE_INHERITANCE$ - } - set_variable = { - name = artifact_succession_title - value = scope:crown_title - } - add_scaled_artifact_modifier_rulership_effect = yes - } - } - else_if = { - limit = { - scope:artifact_type = flag:regalia - } - create_artifact = { - name = ach_spawned_regalia_name - description = ach_spawned_regalia_desc - type = regalia - visuals = regalia - wealth = scope:wealth - quality = scope:quality - template = regalia_template - decaying = no - modifier = artifact_monthly_minor_prestige_2_modifier - modifier = artifact_legitimacy_gain_mult_4_modifier - history = { - type = created - date = $DATE_CREATION$ - recipient = scope:title_founder - location = scope:crown_title.title_capital_county.title_province - } - save_scope_as = newly_created_artifact - } - scope:newly_created_artifact = { - add_artifact_title_history = { - target = scope:crown_title - date = $DATE_INHERITANCE$ - } - set_variable = { - name = artifact_succession_title - value = scope:crown_title - } - add_scaled_artifact_modifier_rulership_effect = yes - } - } -} - - -coronation_add_magnificence_log_effect = { - if = { - limit = { - $CHAR$ != involved_activity.activity_host - } - save_scope_value_as = { - name = magnificence_level - value = $VALUE$ - } - $CHAR$ = { - save_scope_as = char - } - hidden_effect = { - involved_activity = { - switch = { - trigger = scope:magnificence_level - flag:positive_massive = { - add_activity_log_entry = { - key = coronation_tt_positive_massive_log - score = 10 - tags = { positive } - character = scope:char - custom_tooltip = coronation_tt_positive_massive - } - } - flag:positive_major = { - add_activity_log_entry = { - key = coronation_tt_positive_major_log - score = 10 - tags = { positive } - character = scope:char - custom_tooltip = coronation_tt_positive_major - } - } - flag:positive_medium = { - add_activity_log_entry = { - key = coronation_tt_positive_medium_log - score = 10 - tags = { positive } - character = scope:char - custom_tooltip = coronation_tt_positive_medium - } - } - flag:positive_tiny = { - add_activity_log_entry = { - key = coronation_tt_positive_tiny_log - score = 10 - tags = { positive } - character = scope:char - custom_tooltip = coronation_tt_positive_tiny - } - } - flag:positive_miniscule = { - add_activity_log_entry = { - key = coronation_tt_positive_miniscule_log - score = 10 - tags = { positive } - character = scope:char - custom_tooltip = coronation_tt_positive_miniscule - } - } - flag:negative_tiny = { - add_activity_log_entry = { - key = coronation_tt_negative_tiny_log - score = 10 - tags = { negative } - character = scope:char - custom_tooltip = coronation_tt_negative_tiny - } - } - flag:negative = { - add_activity_log_entry = { - key = coronation_tt_negative_log - score = 10 - tags = { negative } - character = scope:char - custom_tooltip = coronation_tt_negative - } - } - flag:negative_major = { - add_activity_log_entry = { - key = coronation_tt_negative_major_log - score = 10 - tags = { negative } - character = scope:char - custom_tooltip = coronation_tt_negative_major - } - } - } - } - } - } -} - -ach_host_intent_rewards_tooltip_effect = { - if = { - limit = { - scope:activity.activity_host = { has_variable = host_had_intent_reward } - } - scope:activity.activity_host = { - switch = { - trigger = var:host_had_intent_reward - flag:cultural_acceptance = { - custom_tooltip = coronation_cultural_acceptance_reward_tt - } - flag:opinion_gain = { - custom_tooltip = coronation_opinion_gain_reward_tt - } - flag:legitimacy_and_prestige_gain = { - custom_tooltip = coronation_legitimacy_and_prestige_gain_reward_tt - } - flag:prevent_faction_joining = { - custom_tooltip = coronation_prevent_faction_joining_reward_tt - } - flag:easier_imprisonment = { - custom_tooltip = coronation_easier_imprisonment_reward_tt - } - flag:stress = { - custom_tooltip = coronation_stress_reward_tt - } - flag:better_councillors = { - custom_tooltip = coronation_better_councillors_reward_tt - } - flag:vassal_development_boost = { - custom_tooltip = coronation_vassal_development_boost_reward_tt - } - flag:vassal_defensive_boost = { - custom_tooltip = coronation_vassal_defensive_boost_reward_tt - } - flag:artifact_boost = { - custom_tooltip = coronation_artifact_boost_reward_tt - } - flag:host_development_boost = { - custom_tooltip = coronation_host_development_boost_reward_tt - } - flag:host_defense_boost = { - custom_tooltip = coronation_host_defense_boost_reward_tt - } - } - switch = { - trigger = var:reward_tier - 1 = { - custom_tooltip = coronation_host_reward_tier_one_tt - } - 2 = { - custom_tooltip = coronation_host_reward_tier_two_tt - } - 3 = { - custom_tooltip = coronation_host_reward_tier_three_tt - } - 4 = { - custom_tooltip = coronation_host_reward_tier_four_tt - } - 5 = { - custom_tooltip = coronation_host_reward_tier_five_tt - } - } - } - } -} - -ach_host_intent_rewards_effect = { - if = { - limit = { - scope:activity.activity_host = { has_variable = host_had_intent_reward } - } - switch = { - trigger = scope:activity.activity_host.var:host_had_intent_reward - flag:cultural_acceptance = { - ach_cultural_acceptance_host_reward_effect = yes - } - flag:opinion_gain = { - ach_opinion_gain_host_reward_effect = yes - } - flag:legitimacy_and_prestige_gain = { - ach_legitimacy_and_prestige_gain_host_reward_effect = yes - } - flag:prevent_faction_joining = { - ach_prevent_faction_joining_host_reward_effect = yes - } - flag:easier_imprisonment = { - ach_easier_imprisonment_host_reward_effect = yes - } - flag:stress = { - ach_stress_host_reward_effect = yes - } - flag:better_councillors = { - ach_better_councillors_host_reward_effect = yes - } - flag:vassal_development_boost = { - ach_vassal_development_boost_host_reward_effect = yes - } - flag:vassal_defensive_boost = { - ach_vassal_defensive_boost_host_reward_effect = yes - } - flag:artifact_boost = { - root = { ach_artifact_boost_host_reward_effect = yes } - } - flag:host_development_boost = { - root = { ach_host_development_boost_host_reward_effect = yes } - } - flag:host_defense_boost = { - root = { ach_host_defense_boost_host_reward_effect = yes } - } - } - - } -} - -ach_cultural_acceptance_host_reward_effect = { - switch = { - trigger = scope:activity.activity_host.var:reward_tier - 1 = { - scope:activity = { - ordered_attending_character = { - order_by = coronation_supporter_sort_value - limit = { - culture != scope:activity.activity_host.culture - } - culture = { save_scope_as = first_reward_target add_to_list = culture_rewards } - } - } - } - 2 = { - scope:activity = { - ordered_attending_character = { - order_by = coronation_supporter_sort_value - limit = { - culture != scope:activity.activity_host.culture - } - culture = { save_scope_as = first_reward_target add_to_list = culture_rewards } - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - limit = { - culture != scope:activity.activity_host.culture - culture != scope:first_reward_target - } - culture = { save_scope_as = second_reward_target add_to_list = culture_rewards } - } - } - } - 3 = { - scope:activity = { - ordered_attending_character = { - order_by = coronation_supporter_sort_value - limit = { - culture != scope:activity.activity_host.culture - } - culture = { save_scope_as = first_reward_target add_to_list = culture_rewards } - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - limit = { - culture != scope:activity.activity_host.culture - culture != scope:first_reward_target - } - culture = { save_scope_as = second_reward_target add_to_list = culture_rewards} - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - limit = { - culture != scope:activity.activity_host.culture - culture != scope:first_reward_target - culture != scope:second_reward_target - } - culture = { save_scope_as = third_reward_target add_to_list = culture_rewards } - } - } - } - 4 = { - scope:activity = { - ordered_attending_character = { - order_by = coronation_supporter_sort_value - limit = { - culture != scope:activity.activity_host.culture - } - culture = { save_scope_as = first_reward_target add_to_list = culture_rewards } - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - limit = { - culture != scope:activity.activity_host.culture - culture != scope:first_reward_target - } - culture = { save_scope_as = second_reward_target add_to_list = culture_rewards } - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - limit = { - culture != scope:activity.activity_host.culture - culture != scope:first_reward_target - culture != scope:second_reward_target - } - culture = { save_scope_as = third_reward_target add_to_list = culture_rewards } - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - limit = { - culture != scope:activity.activity_host.culture - culture != scope:first_reward_target - culture != scope:second_reward_target - culture != scope:third_reward_target - } - culture = { save_scope_as = fourth_reward_target add_to_list = culture_rewards } - } - } - if = { - limit = { - NOT = { exists = scope:fourth_reward_target } - } - random_culture_global = { - limit = { - this != scope:activity.activity_host.culture - has_same_culture_heritage = scope:activity.activity_host.culture - } - alternative_limit = { - this != scope:activity.activity_host.culture - } - save_scope_as = fourth_reward_target - add_to_list = culture_rewards - } - } - } - 5 = { - scope:activity = { - ordered_attending_character = { - order_by = coronation_supporter_sort_value - limit = { - culture != scope:activity.activity_host.culture - } - culture = { save_scope_as = first_reward_target add_to_list = culture_rewards } - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - limit = { - culture != scope:activity.activity_host.culture - culture != scope:first_reward_target - } - culture = { save_scope_as = second_reward_target add_to_list = culture_rewards } - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - limit = { - culture != scope:activity.activity_host.culture - culture != scope:first_reward_target - culture != scope:second_reward_target - } - culture = { save_scope_as = third_reward_target add_to_list = culture_rewards } - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - limit = { - culture != scope:activity.activity_host.culture - culture != scope:first_reward_target - culture != scope:second_reward_target - culture != scope:third_reward_target - } - culture = { save_scope_as = fourth_reward_target add_to_list = culture_rewards } - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - limit = { - culture != scope:activity.activity_host.culture - culture != scope:first_reward_target - culture != scope:second_reward_target - culture != scope:third_reward_target - culture != scope:fourth_reward_target - } - culture = { save_scope_as = fifth_reward_target add_to_list = culture_rewards } - } - } - if = { - limit = { - NOT = { exists = scope:fourth_reward_target } - } - random_culture_global = { - limit = { - this != scope:activity.activity_host.culture - has_same_culture_heritage = scope:activity.activity_host.culture - } - alternative_limit = { - this != scope:activity.activity_host.culture - } - save_scope_as = fourth_reward_target - add_to_list = culture_rewards - } - } - if = { - limit = { - NOT = { exists = scope:fifth_reward_target } - } - random_culture_global = { - limit = { - this != scope:activity.activity_host.culture - has_same_culture_heritage = scope:activity.activity_host.culture - this != scope:fourth_reward_target - } - alternative_limit = { - this != scope:activity.activity_host.culture - this != scope:fourth_reward_target - } - save_scope_as = fifth_reward_target - add_to_list = culture_rewards - } - } - } - } - every_in_list = { - list = culture_rewards - change_cultural_acceptance = { - target = scope:activity.activity_host.culture - value = medium_positive_culture_acceptance - desc = cultural_acceptance_gain_coronation_host_reward - } - } -} - -ach_opinion_gain_host_reward_effect = { - switch = { - trigger = scope:activity.activity_host.var:reward_tier - 1 = { - scope:activity = { - ordered_attending_character = { - order_by = coronation_supporter_sort_value - limit = { - this != scope:activity.activity_host - is_ai = yes - } - save_scope_as = first_reward_target - add_to_list = opinion_rewards - } - } - } - 2 = { - scope:activity = { - ordered_attending_character = { - order_by = coronation_supporter_sort_value - limit = { - this != scope:activity.activity_host - is_ai = yes - } - save_scope_as = first_reward_target - add_to_list = opinion_rewards - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - is_ai = yes - } - save_scope_as = second_reward_target - add_to_list = opinion_rewards - } - } - } - 3 = { - scope:activity = { - ordered_attending_character = { - order_by = coronation_supporter_sort_value - limit = { - this != scope:activity.activity_host - is_ai = yes - } - save_scope_as = first_reward_target - add_to_list = opinion_rewards - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - is_ai = yes - } - save_scope_as = second_reward_target - add_to_list = opinion_rewards - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - this != scope:second_reward_target - is_ai = yes - } - save_scope_as = third_reward_target - add_to_list = opinion_rewards - } - } - } - 4 = { - scope:activity = { - ordered_attending_character = { - order_by = coronation_supporter_sort_value - limit = { - this != scope:activity.activity_host - is_ai = yes - } - save_scope_as = first_reward_target - add_to_list = opinion_rewards - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - is_ai = yes - } - save_scope_as = second_reward_target - add_to_list = opinion_rewards - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - this != scope:second_reward_target - is_ai = yes - } - save_scope_as = third_reward_target - add_to_list = opinion_rewards - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - this != scope:second_reward_target - this != scope:third_reward_target - is_ai = yes - } - save_scope_as = fourth_reward_target - add_to_list = opinion_rewards - } - } - } - 5 = { - scope:activity = { - ordered_attending_character = { - order_by = coronation_supporter_sort_value - limit = { - this != scope:activity.activity_host - is_ai = yes - } - save_scope_as = first_reward_target - add_to_list = opinion_rewards - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - is_ai = yes - } - save_scope_as = second_reward_target - add_to_list = opinion_rewards - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - this != scope:second_reward_target - is_ai = yes - } - save_scope_as = third_reward_target - add_to_list = opinion_rewards - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - this != scope:second_reward_target - this != scope:third_reward_target - is_ai = yes - } - save_scope_as = fourth_reward_target - add_to_list = opinion_rewards - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - this != scope:second_reward_target - this != scope:third_reward_target - this != scope:fourth_reward_target - is_ai = yes - } - save_scope_as = fifth_reward_target - add_to_list = opinion_rewards - } - } - } - } - every_in_list = { - list = opinion_rewards - add_opinion = { - target = scope:activity.activity_host - modifier = ach_intent_opinion - opinion = 25 - } - } -} - -ach_legitimacy_and_prestige_gain_host_reward_effect = { - switch = { - trigger = scope:activity.activity_host.var:reward_tier - 1 = { - scope:activity = { - activity_host = { - add_character_modifier = { - modifier = ach_intent_prestige_modifier - years = 10 - } - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - limit = { - this != scope:activity.activity_host - is_ai = yes - } - save_scope_as = first_reward_target - add_to_list = prestige_rewards - } - } - } - 2 = { - scope:activity = { - activity_host = { - add_character_modifier = { - modifier = ach_intent_prestige_modifier - years = 20 - } - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - limit = { - this != scope:activity.activity_host - is_ai = yes - } - save_scope_as = first_reward_target - add_to_list = prestige_rewards - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - is_ai = yes - } - save_scope_as = second_reward_target - add_to_list = prestige_rewards - } - } - } - 3 = { - scope:activity = { - activity_host = { - add_character_modifier = { - modifier = ach_intent_prestige_modifier - years = 30 - } - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - limit = { - this != scope:activity.activity_host - is_ai = yes - } - save_scope_as = first_reward_target - add_to_list = prestige_rewards - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - is_ai = yes - } - save_scope_as = second_reward_target - add_to_list = prestige_rewards - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - this != scope:second_reward_target - is_ai = yes - } - save_scope_as = third_reward_target - add_to_list = prestige_rewards - } - } - } - 4 = { - scope:activity = { - activity_host = { - add_character_modifier = { - modifier = ach_intent_prestige_modifier - years = 40 - } - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - limit = { - this != scope:activity.activity_host - is_ai = yes - } - save_scope_as = first_reward_target - add_to_list = prestige_rewards - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - is_ai = yes - } - save_scope_as = second_reward_target - add_to_list = prestige_rewards - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - this != scope:second_reward_target - is_ai = yes - } - save_scope_as = third_reward_target - add_to_list = prestige_rewards - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - this != scope:second_reward_target - this != scope:third_reward_target - is_ai = yes - } - save_scope_as = fourth_reward_target - add_to_list = prestige_rewards - } - } - } - 5 = { - scope:activity = { - activity_host = { - add_character_modifier = { - modifier = ach_intent_prestige_modifier - years = 50 - } - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - limit = { - this != scope:activity.activity_host - is_ai = yes - } - save_scope_as = first_reward_target - add_to_list = prestige_rewards - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - is_ai = yes - } - save_scope_as = second_reward_target - add_to_list = prestige_rewards - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - this != scope:second_reward_target - is_ai = yes - } - save_scope_as = third_reward_target - add_to_list = prestige_rewards - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - this != scope:second_reward_target - this != scope:third_reward_target - is_ai = yes - } - save_scope_as = fourth_reward_target - add_to_list = prestige_rewards - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - this != scope:second_reward_target - this != scope:third_reward_target - this != scope:fourth_reward_target - is_ai = yes - } - save_scope_as = fifth_reward_target - add_to_list = prestige_rewards - } - } - } - } - every_in_list = { - list = prestige_rewards - add_character_modifier = { - modifier = ach_intent_prestige_guest_modifier - years = 5 - } - } -} - -ach_prevent_faction_joining_host_reward_effect = { - switch = { - trigger = scope:activity.activity_host.var:reward_tier - 1 = { - ordered_attending_character = { - order_by = coronation_detractor_sort_value - position = 5 - limit = { - this != scope:activity.activity_host - is_ai = yes - is_vassal_of = scope:activity.activity_host - is_in_guest_subset = { name = detractor } - } - save_scope_as = first_reward_target - add_to_list = faction_rewards - } - } - 2 = { - ordered_attending_character = { - order_by = coronation_detractor_sort_value - position = 5 - limit = { - this != scope:activity.activity_host - is_ai = yes - is_vassal_of = scope:activity.activity_host - is_in_guest_subset = { name = detractor } - } - save_scope_as = first_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_detractor_sort_value - position = 4 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - is_ai = yes - is_vassal_of = scope:activity.activity_host - is_in_guest_subset = { name = detractor } - } - save_scope_as = second_reward_target - add_to_list = faction_rewards - } - } - 3 = { - ordered_attending_character = { - order_by = coronation_detractor_sort_value - position = 5 - limit = { - this != scope:activity.activity_host - is_ai = yes - is_vassal_of = scope:activity.activity_host - is_in_guest_subset = { name = detractor } - } - save_scope_as = first_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_detractor_sort_value - position = 4 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - is_ai = yes - is_vassal_of = scope:activity.activity_host - is_in_guest_subset = { name = detractor } - } - save_scope_as = second_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_detractor_sort_value - position = 3 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - this != scope:second_reward_target - is_ai = yes - is_vassal_of = scope:activity.activity_host - is_in_guest_subset = { name = detractor } - } - save_scope_as = third_reward_target - add_to_list = faction_rewards - } - } - 4 = { - ordered_attending_character = { - order_by = coronation_detractor_sort_value - position = 5 - limit = { - this != scope:activity.activity_host - is_ai = yes - is_vassal_of = scope:activity.activity_host - is_in_guest_subset = { name = detractor } - } - save_scope_as = first_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_detractor_sort_value - position = 4 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - is_ai = yes - is_vassal_of = scope:activity.activity_host - is_in_guest_subset = { name = detractor } - } - save_scope_as = second_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_detractor_sort_value - position = 3 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - this != scope:second_reward_target - is_ai = yes - is_vassal_of = scope:activity.activity_host - is_in_guest_subset = { name = detractor } - } - save_scope_as = third_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_detractor_sort_value - position = 2 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - this != scope:second_reward_target - this != scope:third_reward_target - is_ai = yes - is_vassal_of = scope:activity.activity_host - is_in_guest_subset = { name = detractor } - } - save_scope_as = fourth_reward_target - add_to_list = faction_rewards - } - } - 5 = { - ordered_attending_character = { - order_by = coronation_detractor_sort_value - position = 5 - limit = { - this != scope:activity.activity_host - is_ai = yes - is_vassal_of = scope:activity.activity_host - is_in_guest_subset = { name = detractor } - } - save_scope_as = first_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_detractor_sort_value - position = 4 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - is_ai = yes - is_vassal_of = scope:activity.activity_host - is_in_guest_subset = { name = detractor } - } - save_scope_as = second_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_detractor_sort_value - position = 3 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - this != scope:second_reward_target - is_ai = yes - is_vassal_of = scope:activity.activity_host - is_in_guest_subset = { name = detractor } - } - save_scope_as = third_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_detractor_sort_value - position = 2 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - this != scope:second_reward_target - this != scope:third_reward_target - is_ai = yes - is_vassal_of = scope:activity.activity_host - is_in_guest_subset = { name = detractor } - } - save_scope_as = fourth_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_detractor_sort_value - position = 1 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - this != scope:second_reward_target - this != scope:third_reward_target - this != scope:fourth_reward_target - is_ai = yes - is_vassal_of = scope:activity.activity_host - is_in_guest_subset = { name = detractor } - } - save_scope_as = fifth_reward_target - add_to_list = faction_rewards - } - } - } - every_in_list = { - list = faction_rewards - add_character_modifier = { - modifier = ach_intent_faction_joining_prevention_modifier - years = 10 - } - } -} - -ach_easier_imprisonment_host_reward_effect = { - switch = { - trigger = scope:activity.activity_host.var:reward_tier - 1 = { - ordered_attending_character = { - order_by = coronation_detractor_sort_value - position = 5 - limit = { - this != scope:activity.activity_host - is_ai = yes - OR = { - is_vassal_of = scope:activity.activity_host - is_courtier_of = scope:activity.activity_host - } - is_in_guest_subset = { name = detractor } - } - save_scope_as = first_reward_target - add_to_list = faction_rewards - } - } - 2 = { - ordered_attending_character = { - order_by = coronation_detractor_sort_value - position = 5 - limit = { - this != scope:activity.activity_host - is_ai = yes - OR = { - is_vassal_of = scope:activity.activity_host - is_courtier_of = scope:activity.activity_host - } - is_in_guest_subset = { name = detractor } - } - save_scope_as = first_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_detractor_sort_value - position = 4 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - is_ai = yes - OR = { - is_vassal_of = scope:activity.activity_host - is_courtier_of = scope:activity.activity_host - } - is_in_guest_subset = { name = detractor } - } - save_scope_as = second_reward_target - add_to_list = faction_rewards - } - } - 3 = { - ordered_attending_character = { - order_by = coronation_detractor_sort_value - position = 5 - limit = { - this != scope:activity.activity_host - is_ai = yes - OR = { - is_vassal_of = scope:activity.activity_host - is_courtier_of = scope:activity.activity_host - } - is_in_guest_subset = { name = detractor } - } - save_scope_as = first_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_detractor_sort_value - position = 4 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - is_ai = yes - OR = { - is_vassal_of = scope:activity.activity_host - is_courtier_of = scope:activity.activity_host - } - is_in_guest_subset = { name = detractor } - } - save_scope_as = second_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_detractor_sort_value - position = 3 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - this != scope:second_reward_target - is_ai = yes - OR = { - is_vassal_of = scope:activity.activity_host - is_courtier_of = scope:activity.activity_host - } - is_in_guest_subset = { name = detractor } - } - save_scope_as = third_reward_target - add_to_list = faction_rewards - } - } - 4 = { - ordered_attending_character = { - order_by = coronation_detractor_sort_value - position = 5 - limit = { - this != scope:activity.activity_host - is_ai = yes - OR = { - is_vassal_of = scope:activity.activity_host - is_courtier_of = scope:activity.activity_host - } - is_in_guest_subset = { name = detractor } - } - save_scope_as = first_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_detractor_sort_value - position = 4 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - is_ai = yes - OR = { - is_vassal_of = scope:activity.activity_host - is_courtier_of = scope:activity.activity_host - } - is_in_guest_subset = { name = detractor } - } - save_scope_as = second_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_detractor_sort_value - position = 3 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - this != scope:second_reward_target - is_ai = yes - OR = { - is_vassal_of = scope:activity.activity_host - is_courtier_of = scope:activity.activity_host - } - is_in_guest_subset = { name = detractor } - } - save_scope_as = third_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_detractor_sort_value - position = 2 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - this != scope:second_reward_target - this != scope:third_reward_target - is_ai = yes - OR = { - is_vassal_of = scope:activity.activity_host - is_courtier_of = scope:activity.activity_host - } - is_in_guest_subset = { name = detractor } - } - save_scope_as = fourth_reward_target - add_to_list = faction_rewards - } - } - 5 = { - ordered_attending_character = { - order_by = coronation_detractor_sort_value - position = 5 - limit = { - this != scope:activity.activity_host - is_ai = yes - OR = { - is_vassal_of = scope:activity.activity_host - is_courtier_of = scope:activity.activity_host - } - is_in_guest_subset = { name = detractor } - } - save_scope_as = first_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_detractor_sort_value - position = 4 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - is_ai = yes - OR = { - is_vassal_of = scope:activity.activity_host - is_courtier_of = scope:activity.activity_host - } - is_in_guest_subset = { name = detractor } - } - save_scope_as = second_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_detractor_sort_value - position = 3 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - this != scope:second_reward_target - is_ai = yes - OR = { - is_vassal_of = scope:activity.activity_host - is_courtier_of = scope:activity.activity_host - } - is_in_guest_subset = { name = detractor } - } - save_scope_as = third_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_detractor_sort_value - position = 2 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - this != scope:second_reward_target - this != scope:third_reward_target - is_ai = yes - OR = { - is_vassal_of = scope:activity.activity_host - is_courtier_of = scope:activity.activity_host - } - is_in_guest_subset = { name = detractor } - } - save_scope_as = fourth_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_detractor_sort_value - position = 1 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - this != scope:second_reward_target - this != scope:third_reward_target - this != scope:fourth_reward_target - is_ai = yes - OR = { - is_vassal_of = scope:activity.activity_host - is_courtier_of = scope:activity.activity_host - } - is_in_guest_subset = { name = detractor } - } - save_scope_as = fifth_reward_target - add_to_list = faction_rewards - } - } - } - every_in_list = { - list = faction_rewards - add_character_modifier = { - modifier = ach_intent_imprisonment_modifier - years = 10 - } - } -} - -ach_stress_host_reward_effect = { - switch = { - trigger = scope:activity.activity_host.var:reward_tier - 1 = { - ordered_attending_character = { - order_by = coronation_detractor_sort_value - position = 5 - limit = { - this != scope:activity.activity_host - is_ai = yes - is_in_guest_subset = { name = detractor } - } - save_scope_as = first_reward_target - add_to_list = faction_rewards - } - } - 2 = { - ordered_attending_character = { - order_by = coronation_detractor_sort_value - position = 5 - limit = { - this != scope:activity.activity_host - is_ai = yes - is_in_guest_subset = { name = detractor } - } - save_scope_as = first_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_detractor_sort_value - position = 4 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - is_ai = yes - is_in_guest_subset = { name = detractor } - } - save_scope_as = second_reward_target - add_to_list = faction_rewards - } - } - 3 = { - ordered_attending_character = { - order_by = coronation_detractor_sort_value - position = 5 - limit = { - this != scope:activity.activity_host - is_ai = yes - is_in_guest_subset = { name = detractor } - } - save_scope_as = first_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_detractor_sort_value - position = 4 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - is_ai = yes - is_in_guest_subset = { name = detractor } - } - save_scope_as = second_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_detractor_sort_value - position = 3 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - this != scope:second_reward_target - is_ai = yes - is_in_guest_subset = { name = detractor } - } - save_scope_as = third_reward_target - add_to_list = faction_rewards - } - } - 4 = { - ordered_attending_character = { - order_by = coronation_detractor_sort_value - position = 5 - limit = { - this != scope:activity.activity_host - is_ai = yes - is_in_guest_subset = { name = detractor } - } - save_scope_as = first_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_detractor_sort_value - position = 4 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - is_ai = yes - is_in_guest_subset = { name = detractor } - } - save_scope_as = second_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_detractor_sort_value - position = 3 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - this != scope:second_reward_target - is_ai = yes - is_in_guest_subset = { name = detractor } - } - save_scope_as = third_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_detractor_sort_value - position = 2 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - this != scope:second_reward_target - this != scope:third_reward_target - is_ai = yes - is_in_guest_subset = { name = detractor } - } - save_scope_as = fourth_reward_target - add_to_list = faction_rewards - } - } - 5 = { - ordered_attending_character = { - order_by = coronation_detractor_sort_value - position = 5 - limit = { - this != scope:activity.activity_host - is_ai = yes - is_in_guest_subset = { name = detractor } - } - save_scope_as = first_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_detractor_sort_value - position = 4 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - is_ai = yes - is_in_guest_subset = { name = detractor } - } - save_scope_as = second_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_detractor_sort_value - position = 3 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - this != scope:second_reward_target - is_ai = yes - is_in_guest_subset = { name = detractor } - } - save_scope_as = third_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_detractor_sort_value - position = 2 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - this != scope:second_reward_target - this != scope:third_reward_target - is_ai = yes - is_in_guest_subset = { name = detractor } - } - save_scope_as = fourth_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_detractor_sort_value - position = 1 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - this != scope:second_reward_target - this != scope:third_reward_target - this != scope:fourth_reward_target - is_ai = yes - is_in_guest_subset = { name = detractor } - } - save_scope_as = fifth_reward_target - add_to_list = faction_rewards - } - } - } - every_in_list = { - list = faction_rewards - add_stress = major_stress_gain - } -} - -ach_better_councillors_host_reward_effect = { - switch = { - trigger = scope:activity.activity_host.var:reward_tier - 1 = { - ordered_attending_character = { - order_by = coronation_supporter_sort_value - position = 5 - limit = { - this != scope:activity.activity_host - is_ai = yes - is_in_guest_subset = { name = supporter } - OR = { - is_vassal_of = scope:activity.activity_host - is_courtier_of = scope:activity.activity_host - } - } - save_scope_as = first_reward_target - add_to_list = faction_rewards - } - } - 2 = { - ordered_attending_character = { - order_by = coronation_supporter_sort_value - position = 5 - limit = { - this != scope:activity.activity_host - is_ai = yes - is_in_guest_subset = { name = supporter } - OR = { - is_vassal_of = scope:activity.activity_host - is_courtier_of = scope:activity.activity_host - } - } - save_scope_as = first_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - position = 4 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - is_ai = yes - is_in_guest_subset = { name = supporter } - OR = { - is_vassal_of = scope:activity.activity_host - is_courtier_of = scope:activity.activity_host - } - } - save_scope_as = second_reward_target - add_to_list = faction_rewards - } - } - 3 = { - ordered_attending_character = { - order_by = coronation_supporter_sort_value - position = 5 - limit = { - this != scope:activity.activity_host - is_ai = yes - is_in_guest_subset = { name = supporter } - OR = { - is_vassal_of = scope:activity.activity_host - is_courtier_of = scope:activity.activity_host - } - } - save_scope_as = first_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - position = 4 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - is_ai = yes - is_in_guest_subset = { name = supporter } - OR = { - is_vassal_of = scope:activity.activity_host - is_courtier_of = scope:activity.activity_host - } - } - save_scope_as = second_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - position = 3 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - this != scope:second_reward_target - is_ai = yes - is_in_guest_subset = { name = supporter } - OR = { - is_vassal_of = scope:activity.activity_host - is_courtier_of = scope:activity.activity_host - } - } - save_scope_as = third_reward_target - add_to_list = faction_rewards - } - } - 4 = { - ordered_attending_character = { - order_by = coronation_supporter_sort_value - position = 5 - limit = { - this != scope:activity.activity_host - is_ai = yes - is_in_guest_subset = { name = supporter } - OR = { - is_vassal_of = scope:activity.activity_host - is_courtier_of = scope:activity.activity_host - } - } - save_scope_as = first_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - position = 4 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - is_ai = yes - is_in_guest_subset = { name = supporter } - OR = { - is_vassal_of = scope:activity.activity_host - is_courtier_of = scope:activity.activity_host - } - } - save_scope_as = second_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - position = 3 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - this != scope:second_reward_target - is_ai = yes - is_in_guest_subset = { name = supporter } - OR = { - is_vassal_of = scope:activity.activity_host - is_courtier_of = scope:activity.activity_host - } - } - save_scope_as = third_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - position = 2 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - this != scope:second_reward_target - this != scope:third_reward_target - is_ai = yes - is_in_guest_subset = { name = supporter } - OR = { - is_vassal_of = scope:activity.activity_host - is_courtier_of = scope:activity.activity_host - } - } - save_scope_as = fourth_reward_target - add_to_list = faction_rewards - } - } - 5 = { - ordered_attending_character = { - order_by = coronation_supporter_sort_value - position = 5 - limit = { - this != scope:activity.activity_host - is_ai = yes - is_in_guest_subset = { name = supporter } - OR = { - is_vassal_of = scope:activity.activity_host - is_courtier_of = scope:activity.activity_host - } - } - save_scope_as = first_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - position = 4 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - is_ai = yes - is_in_guest_subset = { name = supporter } - OR = { - is_vassal_of = scope:activity.activity_host - is_courtier_of = scope:activity.activity_host - } - } - save_scope_as = second_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - position = 3 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - this != scope:second_reward_target - is_ai = yes - is_in_guest_subset = { name = supporter } - OR = { - is_vassal_of = scope:activity.activity_host - is_courtier_of = scope:activity.activity_host - } - } - save_scope_as = third_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - position = 2 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - this != scope:second_reward_target - this != scope:third_reward_target - is_ai = yes - is_in_guest_subset = { name = supporter } - OR = { - is_vassal_of = scope:activity.activity_host - is_courtier_of = scope:activity.activity_host - } - } - save_scope_as = fourth_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - position = 1 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - this != scope:second_reward_target - this != scope:third_reward_target - this != scope:fourth_reward_target - is_ai = yes - is_in_guest_subset = { name = supporter } - OR = { - is_vassal_of = scope:activity.activity_host - is_courtier_of = scope:activity.activity_host - } - } - save_scope_as = fifth_reward_target - add_to_list = faction_rewards - } - } - } - every_in_list = { - list = faction_rewards - add_character_modifier = { - modifier = ach_intent_better_councillors_modifier - years = 20 - } - } -} - -ach_vassal_development_boost_host_reward_effect = { - switch = { - trigger = scope:activity.activity_host.var:reward_tier - 1 = { - ordered_attending_character = { - order_by = coronation_supporter_sort_value - position = 5 - limit = { - this != scope:activity.activity_host - is_ai = yes - is_vassal_of = scope:activity.activity_host - is_in_guest_subset = { name = supporter } - } - save_scope_as = first_reward_target - add_to_list = faction_rewards - } - } - 2 = { - ordered_attending_character = { - order_by = coronation_supporter_sort_value - position = 5 - limit = { - this != scope:activity.activity_host - is_ai = yes - is_vassal_of = scope:activity.activity_host - is_in_guest_subset = { name = supporter } - } - save_scope_as = first_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - position = 4 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - is_ai = yes - is_vassal_of = scope:activity.activity_host - is_in_guest_subset = { name = supporter } - } - save_scope_as = second_reward_target - add_to_list = faction_rewards - } - } - 3 = { - ordered_attending_character = { - order_by = coronation_supporter_sort_value - position = 5 - limit = { - this != scope:activity.activity_host - is_ai = yes - is_vassal_of = scope:activity.activity_host - is_in_guest_subset = { name = supporter } - } - save_scope_as = first_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - position = 4 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - is_ai = yes - is_vassal_of = scope:activity.activity_host - is_in_guest_subset = { name = supporter } - } - save_scope_as = second_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - position = 3 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - this != scope:second_reward_target - is_ai = yes - is_vassal_of = scope:activity.activity_host - is_in_guest_subset = { name = supporter } - } - save_scope_as = third_reward_target - add_to_list = faction_rewards - } - } - 4 = { - ordered_attending_character = { - order_by = coronation_supporter_sort_value - position = 5 - limit = { - this != scope:activity.activity_host - is_ai = yes - is_vassal_of = scope:activity.activity_host - is_in_guest_subset = { name = supporter } - } - save_scope_as = first_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - position = 4 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - is_ai = yes - is_vassal_of = scope:activity.activity_host - is_in_guest_subset = { name = supporter } - } - save_scope_as = second_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - position = 3 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - this != scope:second_reward_target - is_ai = yes - is_vassal_of = scope:activity.activity_host - is_in_guest_subset = { name = supporter } - } - save_scope_as = third_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - position = 2 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - this != scope:second_reward_target - this != scope:third_reward_target - is_ai = yes - is_vassal_of = scope:activity.activity_host - is_in_guest_subset = { name = supporter } - } - save_scope_as = fourth_reward_target - add_to_list = faction_rewards - } - } - 5 = { - ordered_attending_character = { - order_by = coronation_supporter_sort_value - position = 5 - limit = { - this != scope:activity.activity_host - is_ai = yes - is_vassal_of = scope:activity.activity_host - is_in_guest_subset = { name = supporter } - } - save_scope_as = first_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - position = 4 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - is_ai = yes - is_vassal_of = scope:activity.activity_host - is_in_guest_subset = { name = supporter } - } - save_scope_as = second_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - position = 3 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - this != scope:second_reward_target - is_ai = yes - is_vassal_of = scope:activity.activity_host - is_in_guest_subset = { name = supporter } - } - save_scope_as = third_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - position = 2 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - this != scope:second_reward_target - this != scope:third_reward_target - is_ai = yes - is_vassal_of = scope:activity.activity_host - is_in_guest_subset = { name = supporter } - } - save_scope_as = fourth_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - position = 1 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - this != scope:second_reward_target - this != scope:third_reward_target - this != scope:fourth_reward_target - is_ai = yes - is_vassal_of = scope:activity.activity_host - is_in_guest_subset = { name = supporter } - } - save_scope_as = fifth_reward_target - add_to_list = faction_rewards - } - } - } - every_in_list = { - list = faction_rewards - add_character_modifier = { - modifier = ach_intent_vassal_development_boost_modifier - years = 20 - } - } -} - -ach_vassal_defensive_boost_host_reward_effect = { - switch = { - trigger = scope:activity.activity_host.var:reward_tier - 1 = { - ordered_attending_character = { - order_by = coronation_supporter_sort_value - position = 5 - limit = { - this != scope:activity.activity_host - is_ai = yes - is_vassal_of = scope:activity.activity_host - is_in_guest_subset = { name = supporter } - } - save_scope_as = first_reward_target - add_to_list = faction_rewards - } - } - 2 = { - ordered_attending_character = { - order_by = coronation_supporter_sort_value - position = 5 - limit = { - this != scope:activity.activity_host - is_ai = yes - is_vassal_of = scope:activity.activity_host - is_in_guest_subset = { name = supporter } - } - save_scope_as = first_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - position = 4 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - is_ai = yes - is_vassal_of = scope:activity.activity_host - is_in_guest_subset = { name = supporter } - } - save_scope_as = second_reward_target - add_to_list = faction_rewards - } - } - 3 = { - ordered_attending_character = { - order_by = coronation_supporter_sort_value - position = 5 - limit = { - this != scope:activity.activity_host - is_ai = yes - is_vassal_of = scope:activity.activity_host - is_in_guest_subset = { name = supporter } - } - save_scope_as = first_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - position = 4 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - is_ai = yes - is_vassal_of = scope:activity.activity_host - is_in_guest_subset = { name = supporter } - } - save_scope_as = second_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - position = 3 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - this != scope:second_reward_target - is_ai = yes - is_vassal_of = scope:activity.activity_host - is_in_guest_subset = { name = supporter } - } - save_scope_as = third_reward_target - add_to_list = faction_rewards - } - } - 4 = { - ordered_attending_character = { - order_by = coronation_supporter_sort_value - position = 5 - limit = { - this != scope:activity.activity_host - is_ai = yes - is_vassal_of = scope:activity.activity_host - is_in_guest_subset = { name = supporter } - } - save_scope_as = first_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - position = 4 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - is_ai = yes - is_vassal_of = scope:activity.activity_host - is_in_guest_subset = { name = supporter } - } - save_scope_as = second_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - position = 3 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - this != scope:second_reward_target - is_ai = yes - is_vassal_of = scope:activity.activity_host - is_in_guest_subset = { name = supporter } - } - save_scope_as = third_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - position = 2 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - this != scope:second_reward_target - this != scope:third_reward_target - is_ai = yes - is_vassal_of = scope:activity.activity_host - is_in_guest_subset = { name = supporter } - } - save_scope_as = fourth_reward_target - add_to_list = faction_rewards - } - } - 5 = { - ordered_attending_character = { - order_by = coronation_supporter_sort_value - position = 5 - limit = { - this != scope:activity.activity_host - is_ai = yes - is_vassal_of = scope:activity.activity_host - is_in_guest_subset = { name = supporter } - } - save_scope_as = first_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - position = 4 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - is_ai = yes - is_vassal_of = scope:activity.activity_host - is_in_guest_subset = { name = supporter } - } - save_scope_as = second_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - position = 3 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - this != scope:second_reward_target - is_ai = yes - is_vassal_of = scope:activity.activity_host - is_in_guest_subset = { name = supporter } - } - save_scope_as = third_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - position = 2 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - this != scope:second_reward_target - this != scope:third_reward_target - is_ai = yes - is_vassal_of = scope:activity.activity_host - is_in_guest_subset = { name = supporter } - } - save_scope_as = fourth_reward_target - add_to_list = faction_rewards - } - ordered_attending_character = { - order_by = coronation_supporter_sort_value - position = 1 - limit = { - this != scope:activity.activity_host - this != scope:first_reward_target - this != scope:second_reward_target - this != scope:third_reward_target - this != scope:fourth_reward_target - is_ai = yes - is_vassal_of = scope:activity.activity_host - is_in_guest_subset = { name = supporter } - } - save_scope_as = fifth_reward_target - add_to_list = faction_rewards - } - } - } - every_in_list = { - list = faction_rewards - add_character_modifier = { - modifier = ach_intent_vassal_defensive_boost_modifier - years = 20 - } - } -} - -ach_artifact_boost_host_reward_effect = { - switch = { - trigger = scope:activity.activity_host.var:reward_tier - 1 = { - ordered_character_artifact = { - order_by = artifact_age - limit = { - is_equipped = yes - } - alternative_limit = { - always = yes - } - save_scope_as = first_reward_target - add_to_list = artifact_rewards - } - } - 2 = { - ordered_character_artifact = { - order_by = artifact_age - limit = { - is_equipped = yes - } - alternative_limit = { - always = yes - } - save_scope_as = first_reward_target - add_to_list = artifact_rewards - } - ordered_character_artifact = { - order_by = artifact_age - limit = { - is_equipped = yes - this != scope:first_reward_target - } - alternative_limit = { - always = yes - this != scope:first_reward_target - } - save_scope_as = second_reward_target - add_to_list = artifact_rewards - } - } - 3 = { - ordered_character_artifact = { - order_by = artifact_age - limit = { - is_equipped = yes - } - alternative_limit = { - always = yes - } - save_scope_as = first_reward_target - add_to_list = artifact_rewards - } - ordered_character_artifact = { - order_by = artifact_age - limit = { - is_equipped = yes - this != scope:first_reward_target - } - alternative_limit = { - always = yes - this != scope:first_reward_target - } - save_scope_as = second_reward_target - add_to_list = artifact_rewards - } - ordered_character_artifact = { - order_by = artifact_age - limit = { - is_equipped = yes - this != scope:first_reward_target - this != scope:second_reward_target - } - alternative_limit = { - always = yes - this != scope:first_reward_target - this != scope:second_reward_target - } - save_scope_as = third_reward_target - add_to_list = artifact_rewards - } - } - 4 = { - ordered_character_artifact = { - order_by = artifact_age - limit = { - is_equipped = yes - } - alternative_limit = { - always = yes - } - save_scope_as = first_reward_target - add_to_list = artifact_rewards - } - ordered_character_artifact = { - order_by = artifact_age - limit = { - is_equipped = yes - this != scope:first_reward_target - } - alternative_limit = { - always = yes - this != scope:first_reward_target - } - save_scope_as = second_reward_target - add_to_list = artifact_rewards - } - ordered_character_artifact = { - order_by = artifact_age - limit = { - is_equipped = yes - this != scope:first_reward_target - this != scope:second_reward_target - } - alternative_limit = { - always = yes - this != scope:first_reward_target - this != scope:second_reward_target - } - save_scope_as = third_reward_target - add_to_list = artifact_rewards - } - ordered_character_artifact = { - order_by = artifact_age - limit = { - is_equipped = yes - this != scope:first_reward_target - this != scope:second_reward_target - this != scope:third_reward_target - } - alternative_limit = { - always = yes - this != scope:first_reward_target - this != scope:second_reward_target - this != scope:third_reward_target - } - save_scope_as = fourth_reward_target - add_to_list = artifact_rewards - } - } - 5 = { - ordered_character_artifact = { - order_by = artifact_age - limit = { - is_equipped = yes - } - alternative_limit = { - always = yes - } - save_scope_as = first_reward_target - add_to_list = artifact_rewards - } - ordered_character_artifact = { - order_by = artifact_age - limit = { - is_equipped = yes - this != scope:first_reward_target - } - alternative_limit = { - always = yes - this != scope:first_reward_target - } - save_scope_as = second_reward_target - add_to_list = artifact_rewards - } - ordered_character_artifact = { - order_by = artifact_age - limit = { - is_equipped = yes - this != scope:first_reward_target - this != scope:second_reward_target - } - alternative_limit = { - always = yes - this != scope:first_reward_target - this != scope:second_reward_target - } - save_scope_as = third_reward_target - add_to_list = artifact_rewards - } - ordered_character_artifact = { - order_by = artifact_age - limit = { - is_equipped = yes - this != scope:first_reward_target - this != scope:second_reward_target - this != scope:third_reward_target - } - alternative_limit = { - always = yes - this != scope:first_reward_target - this != scope:second_reward_target - this != scope:third_reward_target - } - save_scope_as = fourth_reward_target - add_to_list = artifact_rewards - } - ordered_character_artifact = { - order_by = artifact_age - limit = { - is_equipped = yes - this != scope:first_reward_target - this != scope:second_reward_target - this != scope:third_reward_target - this != scope:fourth_reward_target - } - alternative_limit = { - always = yes - this != scope:first_reward_target - this != scope:second_reward_target - this != scope:third_reward_target - this != scope:fourth_reward_target - } - save_scope_as = fifth_reward_target - add_to_list = artifact_rewards - } - } - } - save_scope_as = liege - save_scope_as = antiquarian_from_task - add_character_flag = { - flag = ach_intent_artifact_boost_flag - days = 6 - } - every_in_list = { - list = artifact_rewards - save_scope_as = artifact_target - antiquarian_improve_artifact_effect = yes - } -} - -ach_host_development_boost_host_reward_effect = { - switch = { - trigger = scope:activity.activity_host.var:reward_tier - 1 = { - ordered_held_county = { - order_by = { - value = development_level - multiply = -1 - } - save_scope_as = first_reward_target - add_to_list = county_rewards - } - } - 2 = { - ordered_held_county = { - order_by = { - value = development_level - multiply = -1 - } - save_scope_as = first_reward_target - add_to_list = county_rewards - } - ordered_held_county = { - order_by = { - value = development_level - multiply = -1 - } - limit = { - this != scope:first_reward_target - } - save_scope_as = second_reward_target - add_to_list = county_rewards - } - } - 3 = { - ordered_held_county = { - order_by = { - value = development_level - multiply = -1 - } - save_scope_as = first_reward_target - add_to_list = county_rewards - } - ordered_held_county = { - order_by = { - value = development_level - multiply = -1 - } - limit = { - this != scope:first_reward_target - } - save_scope_as = second_reward_target - add_to_list = county_rewards - } - ordered_held_county = { - order_by = { - value = development_level - multiply = -1 - } - limit = { - this != scope:first_reward_target - this != scope:second_reward_target - } - save_scope_as = third_reward_target - add_to_list = county_rewards - } - } - 4 = { - ordered_held_county = { - order_by = { - value = development_level - multiply = -1 - } - save_scope_as = first_reward_target - add_to_list = county_rewards - } - ordered_held_county = { - order_by = { - value = development_level - multiply = -1 - } - limit = { - this != scope:first_reward_target - } - save_scope_as = second_reward_target - add_to_list = county_rewards - } - ordered_held_county = { - order_by = { - value = development_level - multiply = -1 - } - limit = { - this != scope:first_reward_target - this != scope:second_reward_target - } - save_scope_as = third_reward_target - add_to_list = county_rewards - } - ordered_held_county = { - order_by = { - value = development_level - multiply = -1 - } - limit = { - this != scope:first_reward_target - this != scope:second_reward_target - this != scope:third_reward_target - } - save_scope_as = fourth_reward_target - add_to_list = county_rewards - } - } - 5 = { - ordered_held_county = { - order_by = { - value = development_level - multiply = -1 - } - save_scope_as = first_reward_target - add_to_list = county_rewards - } - ordered_held_county = { - order_by = { - value = development_level - multiply = -1 - } - limit = { - this != scope:first_reward_target - } - save_scope_as = second_reward_target - add_to_list = county_rewards - } - ordered_held_county = { - order_by = { - value = development_level - multiply = -1 - } - limit = { - this != scope:first_reward_target - this != scope:second_reward_target - } - save_scope_as = third_reward_target - add_to_list = county_rewards - } - ordered_held_county = { - order_by = { - value = development_level - multiply = -1 - } - limit = { - this != scope:first_reward_target - this != scope:second_reward_target - this != scope:third_reward_target - } - save_scope_as = fourth_reward_target - add_to_list = county_rewards - } - ordered_held_county = { - order_by = { - value = development_level - multiply = -1 - } - limit = { - this != scope:first_reward_target - this != scope:second_reward_target - this != scope:third_reward_target - this != scope:fourth_reward_target - } - save_scope_as = fifth_reward_target - add_to_list = county_rewards - } - } - } - if = { - limit = { - NOT = { - exists = scope:second_reward_target - } - } - ordered_realm_county = { - order_by = { - value = development_level - multiply = -1 - } - limit = { - holder = { - is_ai = yes - this != scope:first_reward_target - } - } - save_scope_as = second_reward_target - add_to_list = county_rewards - } - } - if = { - limit = { - NOT = { - exists = scope:third_reward_target - } - } - ordered_realm_county = { - order_by = { - value = development_level - multiply = -1 - } - limit = { - holder = { - is_ai = yes - this != scope:second_reward_target - this != scope:first_reward_target - } - } - save_scope_as = third_reward_target - add_to_list = county_rewards - } - } - if = { - limit = { - NOT = { - exists = scope:fourth_reward_target - } - } - ordered_realm_county = { - order_by = { - value = development_level - multiply = -1 - } - limit = { - holder = { - is_ai = yes - this != scope:second_reward_target - this != scope:first_reward_target - this != scope:third_reward_target - } - } - save_scope_as = fourth_reward_target - add_to_list = county_rewards - } - } - if = { - limit = { - NOT = { - exists = scope:fifth_reward_target - } - } - ordered_realm_county = { - order_by = { - value = development_level - multiply = -1 - } - limit = { - holder = { - is_ai = yes - this != scope:second_reward_target - this != scope:first_reward_target - this != scope:third_reward_target - this != scope:fourth_reward_target - } - } - save_scope_as = fifth_reward_target - add_to_list = county_rewards - } - } - every_in_list = { - list = county_rewards - change_development_level = 2 - add_county_modifier = { - modifier = ach_intent_development_boost_modifier - years = 20 - } - } -} - -ach_host_defense_boost_host_reward_effect = { - switch = { - trigger = scope:activity.activity_host.var:reward_tier - 1 = { - ordered_held_county = { - order_by = { - value = development_level - multiply = -1 - } - save_scope_as = first_reward_target - add_to_list = county_rewards - } - } - 2 = { - ordered_held_county = { - order_by = { - value = development_level - multiply = -1 - } - save_scope_as = first_reward_target - add_to_list = county_rewards - } - ordered_held_county = { - order_by = { - value = development_level - multiply = -1 - } - limit = { - this != scope:first_reward_target - } - save_scope_as = second_reward_target - add_to_list = county_rewards - } - } - 3 = { - ordered_held_county = { - order_by = { - value = development_level - multiply = -1 - } - save_scope_as = first_reward_target - add_to_list = county_rewards - } - ordered_held_county = { - order_by = { - value = development_level - multiply = -1 - } - limit = { - this != scope:first_reward_target - } - save_scope_as = second_reward_target - add_to_list = county_rewards - } - ordered_held_county = { - order_by = { - value = development_level - multiply = -1 - } - limit = { - this != scope:first_reward_target - this != scope:second_reward_target - } - save_scope_as = third_reward_target - add_to_list = county_rewards - } - } - 4 = { - ordered_held_county = { - order_by = { - value = development_level - multiply = -1 - } - save_scope_as = first_reward_target - add_to_list = county_rewards - } - ordered_held_county = { - order_by = { - value = development_level - multiply = -1 - } - limit = { - this != scope:first_reward_target - } - save_scope_as = second_reward_target - add_to_list = county_rewards - } - ordered_held_county = { - order_by = { - value = development_level - multiply = -1 - } - limit = { - this != scope:first_reward_target - this != scope:second_reward_target - } - save_scope_as = third_reward_target - add_to_list = county_rewards - } - ordered_held_county = { - order_by = { - value = development_level - multiply = -1 - } - limit = { - this != scope:first_reward_target - this != scope:second_reward_target - this != scope:third_reward_target - } - save_scope_as = fourth_reward_target - add_to_list = county_rewards - } - } - 5 = { - ordered_held_county = { - order_by = { - value = development_level - multiply = -1 - } - save_scope_as = first_reward_target - add_to_list = county_rewards - } - ordered_held_county = { - order_by = { - value = development_level - multiply = -1 - } - limit = { - this != scope:first_reward_target - } - save_scope_as = second_reward_target - add_to_list = county_rewards - } - ordered_held_county = { - order_by = { - value = development_level - multiply = -1 - } - limit = { - this != scope:first_reward_target - this != scope:second_reward_target - } - save_scope_as = third_reward_target - add_to_list = county_rewards - } - ordered_held_county = { - order_by = { - value = development_level - multiply = -1 - } - limit = { - this != scope:first_reward_target - this != scope:second_reward_target - this != scope:third_reward_target - } - save_scope_as = fourth_reward_target - add_to_list = county_rewards - } - ordered_held_county = { - order_by = { - value = development_level - multiply = -1 - } - limit = { - this != scope:first_reward_target - this != scope:second_reward_target - this != scope:third_reward_target - this != scope:fourth_reward_target - } - save_scope_as = fifth_reward_target - add_to_list = county_rewards - } - } - } - if = { - limit = { - NOT = { - exists = scope:second_reward_target - } - } - ordered_realm_county = { - order_by = { - value = development_level - multiply = -1 - } - limit = { - holder = { - is_ai = yes - this != scope:first_reward_target - } - } - save_scope_as = second_reward_target - add_to_list = county_rewards - } - } - if = { - limit = { - NOT = { - exists = scope:third_reward_target - } - } - ordered_realm_county = { - order_by = { - value = development_level - multiply = -1 - } - limit = { - holder = { - is_ai = yes - this != scope:second_reward_target - this != scope:first_reward_target - } - } - save_scope_as = third_reward_target - add_to_list = county_rewards - } - } - if = { - limit = { - NOT = { - exists = scope:fourth_reward_target - } - } - ordered_realm_county = { - order_by = { - value = development_level - multiply = -1 - } - limit = { - holder = { - is_ai = yes - this != scope:second_reward_target - this != scope:first_reward_target - this != scope:third_reward_target - } - } - save_scope_as = fourth_reward_target - add_to_list = county_rewards - } - } - if = { - limit = { - NOT = { - exists = scope:fifth_reward_target - } - } - ordered_realm_county = { - order_by = { - value = development_level - multiply = -1 - } - limit = { - holder = { - is_ai = yes - this != scope:second_reward_target - this != scope:first_reward_target - this != scope:third_reward_target - this != scope:fourth_reward_target - } - } - save_scope_as = fifth_reward_target - add_to_list = county_rewards - } - } - every_in_list = { - list = county_rewards - add_county_modifier = { - modifier = ach_intent_defense_boost_modifier - years = 20 - } - } -} - -coronation_create_artifact_yearly_effect = { - save_scope_as = owner - if = { - limit = { - highest_held_title_tier >= tier_empire - realm_size >= 120 - } - set_artifact_rarity_famed = yes - } - else = { - set_artifact_rarity_masterwork = yes - } - - if = { - limit = { - coronation_proper_artifact_crown_trigger = yes - } - save_scope_value_as = { - name = artifact_type - value = flag:crown - } - } - else_if = { - limit = { - coronation_proper_artifact_regalia_trigger = yes - } - save_scope_value_as = { - name = artifact_type - value = flag:regalia - } - } - else = { - random_list = { - 1 = { - save_scope_value_as = { - name = artifact_type - value = flag:crown - } - } - 1 = { - save_scope_value_as = { - name = artifact_type - value = flag:regalia - } - } - } - } - if = { - limit = { - scope:artifact_type = flag:crown - } - create_artifact = { - name = ach_yearly_crown_name - description = ach_yearly_crown_desc - type = helmet - visuals = crown - wealth = scope:wealth - template = crown_wearable_template - quality = scope:quality - decaying = no - modifier = artifact_parochial_vassal_opinion_3_modifier - creator = scope:owner - save_scope_as = newly_created_artifact - } - hidden_effect_new_object = { - scope:newly_created_artifact = { - add_scaled_artifact_modifier_rulership_effect = yes - } - } - } - else_if = { - limit = { - scope:artifact_type = flag:regalia - } - create_artifact = { - name = ach_yearly_regalia_name - description = ach_yearly_regalia_desc - type = regalia - template = regalia_template - visuals = regalia - wealth = scope:wealth - quality = scope:quality - decaying = no - modifier = artifact_parochial_vassal_opinion_3_modifier - creator = scope:owner - save_scope_as = newly_created_artifact - } - hidden_effect_new_object = { - scope:newly_created_artifact = { - add_scaled_artifact_modifier_rulership_effect = yes - } - } - } -} - -coronation_broken_oath_punishment_effect = { - - set_variable = { - name = scale_of_oath_failure - value = 0 - } - - every_vassal = { - add_to_list = disappointed_vassals - root = { - change_variable = { - name = scale_of_oath_failure - add = prev.sub_realm_size - } - } - } - - every_courtier_or_guest = { - add_to_list = disappointed_vassals - } - - change_variable = { - name = scale_of_oath_failure - add = sub_realm_size - } - - if = { - limit = { - culture = { has_cultural_era_or_later = culture_era_late_medieval } - } - change_variable = { - name = scale_of_oath_failure - multiply = 2 - } - } - else_if = { - limit = { - culture = { has_cultural_era_or_later = culture_era_high_medieval } - } - change_variable = { - name = scale_of_oath_failure - multiply = 1.6 - } - } - else_if = { - limit = { - culture = { has_cultural_era_or_later = culture_era_early_medieval } - } - change_variable = { - name = scale_of_oath_failure - multiply = 1.2 - } - } - else = { - change_variable = { - name = scale_of_oath_failure - multiply = 0.8 - } - } - - if = { - limit = { - has_trait = ambitious - } - change_variable = { - name = scale_of_oath_failure - multiply = 1.2 - } - } - - if = { - limit = { - is_ai = no - } - if = { - limit = { - has_game_rule = very_hard_difficulty - } - add_prestige_level = -3 - change_variable = { - name = scale_of_oath_failure - multiply = 2 - } - save_scope_value_as = { - name = failure_opinion_value - value = -60 - } - if = { - limit = { - has_trait = ambitious - } - add_stress = 200 - } - else = { - add_stress = 100 - } - } - else_if = { - limit = { - has_game_rule = hard_difficulty - } - add_prestige_level = -2 - change_variable = { - name = scale_of_oath_failure - multiply = 1.5 - } - save_scope_value_as = { - name = failure_opinion_value - value = -40 - } - if = { - limit = { - has_trait = ambitious - } - add_stress = 150 - } - else = { - add_stress = 75 - } - } - else_if = { - limit = { - has_game_rule = easy_difficulty - } - change_variable = { - name = scale_of_oath_failure - multiply = 0.7 - } - save_scope_value_as = { - name = failure_opinion_value - value = -10 - } - if = { - limit = { - has_trait = ambitious - } - add_stress = medium_stress_gain - } - else = { - add_stress = minor_stress_gain - } - } - else_if = { - limit = { - has_game_rule = very_easy_difficulty - } - change_variable = { - name = scale_of_oath_failure - multiply = 0.7 - } - save_scope_value_as = { - name = failure_opinion_value - value = -5 - } - if = { - limit = { - has_trait = ambitious - } - add_stress = minor_stress_gain - } - else = { - add_stress = miniscule_stress_gain - } - } - else = { - add_prestige_level = -1 - save_scope_value_as = { - name = failure_opinion_value - value = -15 - } - if = { - limit = { - has_trait = ambitious - } - add_stress = massive_stress_gain - } - else = { - add_stress = major_stress_gain - } - } - } - else = { - set_variable = { - name = scale_of_oath_failure - value = 1 - } - save_scope_value_as = { - name = failure_opinion_value - value = -1 - } - } - - save_scope_value_as = { - name = scale_of_oath_failure_scope - value = var:scale_of_oath_failure - } - - every_in_list = { - list = disappointed_vassals - custom = coronation_events.150.custom_list_tooltip - add_opinion = { - modifier = disappointed_opinion - target = root - opinion = scope:failure_opinion_value - } - } -} - -coronation_update_supporters_detractors_effect = { - #Add appropriate characters to detractors - every_attending_character = { - limit = { - NOR = { - is_in_guest_subset = { name = detractor } - government_has_flag = government_is_herder - this = scope:host - has_activity_intent = coronation_offer_support - } - trigger_if = { - limit = { - has_activity_intent = coronation_disrupt_loyalists - } - has_activity_intent = coronation_disrupt_loyalists - } - trigger_else = { - #Opinion combined with a less direct reason - opinion = { - target = scope:host - value < -10 - } - OR = { - opinion = { - target = scope:host - value < -50 - } - AND = { - is_a_faction_member = yes - is_vassal_of = scope:host - } - has_activity_intent = coronation_seize_advantages - is_causing_raid_hostility_towards = scope:host - scope:host = { - is_causing_raid_hostility_towards = prev - } - is_at_war_with = scope:host - has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:host } - } - } - scope:activity = { - trigger_if = { - limit = { - has_variable_list = blocked_from_detractors - } - NOT = { - is_target_in_variable_list = { - name = blocked_from_detractors - target = prev - } - } - } - trigger_if = { - limit = { - has_variable_list = locked_into_supporters - } - NOT = { - is_target_in_variable_list = { - name = locked_into_supporters - target = prev - } - } - } - } - #Players should have a reason they can see for their assignment - trigger_if = { - limit = { - is_ai = no - } - OR = { - has_activity_intent = coronation_disrupt_loyalists - AND = { - is_a_faction_member = yes - is_vassal_of = scope:host - } - is_causing_raid_hostility_towards = scope:host - scope:host = { - is_causing_raid_hostility_towards = prev - } - is_at_war_with = scope:host - has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:host } - reverse_opinion = { - target = scope:host - value < -80 - } - } - } - } - scope:activity = { - add_to_guest_subset = { - name = detractor - target = prev - } - } - } - #Remove inappropriate detractors - every_guest_subset = { - name = detractor - limit = { - scope:activity = { - trigger_if = { - limit = { - has_variable_list = locked_into_detractors - } - NOT = { - is_target_in_variable_list = { - name = locked_into_detractors - target = prev - } - } - } - } - OR = { - government_has_flag = government_is_herder - this = scope:host - has_activity_intent = coronation_offer_support - NOR = { - has_activity_intent = coronation_disrupt_loyalists - opinion = { - target = scope:host - value < -10 - } - } - } - } - scope:activity = { - remove_from_guest_subset = { - name = detractor - target = prev - } - } - } - #Clear and then re-save major detractors - clear_variable_list = major_detractor - if = { - limit = { - any_guest_subset = { - name = detractor - count >= 3 - } - } - ordered_guest_subset = { - name = detractor - max = 3 - order_by = coronation_detractor_sort_value - scope:activity = { - add_to_variable_list = { - name = major_detractor - target = prev - } - } - } - } - else_if = { - limit = { - any_guest_subset = { - name = detractor - count = 2 - } - } - ordered_guest_subset = { - name = detractor - max = 2 - order_by = coronation_detractor_sort_value - scope:activity = { - add_to_variable_list = { - name = major_detractor - target = prev - } - } - } - } - else_if = { - limit = { - any_guest_subset = { - name = detractor - count = 1 - } - } - ordered_guest_subset = { - name = detractor - max = 1 - order_by = coronation_detractor_sort_value - scope:activity = { - add_to_variable_list = { - name = major_detractor - target = prev - } - } - } - } - #SUPPORTERS - #Add appropriate characters to supporters - every_attending_character = { - limit = { - NOR = { - is_in_guest_subset = { name = detractor } - government_has_flag = government_is_herder - this = scope:host - has_activity_intent = coronation_disrupt_loyalists - AND = { - is_vassal_of = scope:host - is_a_faction_member = yes - } - is_at_war_with = scope:host - is_causing_raid_hostility_towards = scope:host - scope:host = { - is_causing_raid_hostility_towards = prev - } - } - trigger_if = { - limit = { - has_activity_intent = coronation_offer_support - } - has_activity_intent = coronation_offer_support - } - trigger_else = { - OR = { - opinion = { - target = scope:host - value > 50 - } - is_allied_to = scope:host - has_any_good_relationship_with_character_trigger = { CHARACTER = scope:host } - is_obedient_to = scope:host - } - opinion = { - target = scope:host - value >= 20 - } - } - - NOT = { this = scope:host } - scope:activity = { - trigger_if = { - limit = { - has_variable_list = blocked_from_supporters - } - NOT = { - is_target_in_variable_list = { - name = blocked_from_supporters - target = prev - } - } - } - trigger_if = { - limit = { - has_variable_list = locked_into_detractors - } - NOT = { - is_target_in_variable_list = { - name = locked_into_detractors - target = prev - } - } - } - } - #Players should have a reason they can see for their assignment - trigger_if = { - limit = { - is_ai = no - } - OR = { - has_activity_intent = coronation_offer_support - AND = { - any_tributary = { - this = scope:host - } - reverse_opinion = { - target = scope:host - value > 60 - } - } - AND = { - any_vassal = { - this = scope:host - } - reverse_opinion = { - target = scope:host - value > 60 - } - } - AND = { - exists = scope:host.house - house ?= scope:host.house - reverse_opinion = { - target = scope:host - value > 60 - } - } - is_allied_to = scope:host - has_any_good_relationship_with_character_trigger = { CHARACTER = scope:host } - reverse_opinion = { - target = scope:host - value > 80 - } - } - } - } - scope:activity = { - add_to_guest_subset = { - name = supporter - target = prev - } - } - } - #Remove inappropriate supporters - every_guest_subset = { - name = supporter - limit = { - scope:activity = { - trigger_if = { - limit = { - has_variable_list = locked_into_supporters - } - NOT = { - is_target_in_variable_list = { - name = locked_into_supporters - target = prev - } - } - } - } - OR = { - government_has_flag = government_is_herder - this = scope:host - has_activity_intent = coronation_disrupt_loyalists - AND = { - is_vassal_of = scope:host - is_a_faction_member = yes - } - is_at_war_with = scope:host - is_causing_raid_hostility_towards = scope:host - scope:host = { - is_causing_raid_hostility_towards = prev - } - NOR = { - has_activity_intent = coronation_offer_support - opinion = { - target = scope:host - value > 10 - } - } - } - } - scope:activity = { - remove_from_guest_subset = { - name = supporter - target = prev - } - } - } - #Clear and then re-save major supporters - clear_variable_list = major_supporter - if = { - limit = { - any_guest_subset = { - name = supporter - count >= 3 - } - } - ordered_guest_subset = { - name = supporter - max = 3 - order_by = coronation_supporter_sort_value - scope:activity = { - add_to_variable_list = { - name = major_supporter - target = prev - } - } - } - } - else_if = { - limit = { - any_guest_subset = { - name = supporter - count = 2 - } - } - ordered_guest_subset = { - name = supporter - max = 2 - order_by = coronation_supporter_sort_value - scope:activity = { - add_to_variable_list = { - name = major_supporter - target = prev - } - } - } - } - else_if = { - limit = { - any_guest_subset = { - name = supporter - count = 1 - } - } - ordered_guest_subset = { - name = supporter - max = 1 - order_by = coronation_supporter_sort_value - scope:activity = { - add_to_variable_list = { - name = major_supporter - target = prev - } - } - } - } -} -play_coronation_ceremony_music_effect = { - if = { - limit = { - involved_activity.activity_location.culture = { has_graphical_india_culture_group_trigger = yes } - } - play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tours/ep2_event_grand_tour_set_india" - } - else_if = { - limit = { - involved_activity.activity_location.culture = { has_graphical_mena_culture_group_trigger = yes } - } - play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tours/ep2_event_grand_tour_set_mena" - } - else = { - play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tours/ep2_event_grand_tour_set_west" - } - if = { - limit = { - scope:activity.var:activity_special_type_progression >= 50 - } - play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tours/ep2_event_grand_tour_arrival_welcome" - } - else_if = { - limit = { - scope:activity.var:activity_special_type_progression >= 25 - } - play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tours/ep2_event_grand_tour_arrival_neutral" - } - else = { - play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tours/ep2_event_grand_tour_arrival_suspicious" - } -} -ach_remove_oaths_on_king_minus_effect = { - if = { - limit = { - has_variable = diplomacy_oath_1 - } - remove_variable = diplomacy_oath_1 - remove_variable = diplomacy_oath_1_timer - } - if = { - limit = { - has_variable = diplomacy_oath_2 - } - remove_variable = diplomacy_oath_2 - remove_variable = diplomacy_oath_2_timer - } - # Martial - if = { - limit = { - has_variable = martial_oath_1 - } - remove_variable = martial_oath_1 - remove_variable = martial_oath_1_timer - remove_variable = oath_reconquest_title - } - if = { - limit = { - has_variable = martial_oath_2 - } - remove_variable = martial_oath_2 - remove_variable = martial_oath_2_timer - remove_variable = oath_conquest_size - } - # Stewardship - if = { - limit = { - has_variable = stewardship_oath_1 - } - remove_variable = stewardship_oath_1 - remove_variable = stewardship_oath_1_timer - } - if = { - limit = { - has_variable = stewardship_oath_2 - } - remove_variable = stewardship_oath_2 - remove_variable = stewardship_oath_2_timer - } - # Learning - if = { - limit = { - has_variable = learning_oath_1 - } - remove_variable = learning_oath_1 - remove_variable = learning_oath_1_timer - remove_variable = learning_oath_cost - } - # De Jure rights - if = { - limit = { - has_variable = purge_pretenders_oath - } - remove_variable = purge_pretenders_oath - remove_variable = purge_pretenders_oath_timer - remove_variable = purge_pretenders_target_title - } - # End the struggle - if = { - limit = { - has_variable = end_the_struggle_oath - } - remove_variable = end_the_struggle_oath - remove_variable = end_the_struggle_oath_timer - remove_variable = end_the_struggle_oath_type_var - } - # Greatest Hunter - if = { - limit = { - has_variable = greatest_hunter_oath - } - remove_variable = greatest_hunter_oath - remove_variable = greatest_hunter_oath_timer - remove_variable = greatest_hunter_oath_l_counter - remove_variable = greatest_hunter_oath_r_counter - } - # Heir Preparation - if = { - limit = { - has_variable = heir_preparation_oath - } - remove_variable = heir_preparation_oath - remove_variable = heir_preparation_oath_timer - } - # Install Claimants - if = { - limit = { - has_variable = install_claimants_oath - } - remove_variable = install_claimants_oath - remove_variable = install_claimants_oath_timer - } - # Mend the Fracture - if = { - limit = { - has_variable = mend_the_fracture_oath - } - remove_variable = mend_the_fracture_oath - remove_variable = mend_the_fracture_oath_timer - } - # Provide for the Warriors - if = { - limit = { - has_variable = provide_for_the_warriors_oath - } - remove_variable = provide_for_the_warriors_oath - remove_variable = provide_for_the_warriors_oath_timer - } - # Provide for the Faithful - if = { - limit = { - has_variable = provide_for_the_faithful_oath - } - remove_variable = provide_for_the_faithful_oath - remove_variable = provide_for_the_faithful_oath_timer - } - # Provide for the Poor - if = { - limit = { - has_variable = provide_for_the_poor_oath - } - remove_variable = provide_for_the_poor_oath - remove_variable = provide_for_the_poor_oath_timer - } - # Repent - if = { - limit = { - has_variable = repent_oath - } - remove_variable = repent_oath - remove_variable = repent_oath_timer - } -} - diff --git a/N3OW/common/scripted_effects/10_dlc_tgp_dynastic_cycle_scripted_effects.txt b/N3OW/common/scripted_effects/10_dlc_tgp_dynastic_cycle_scripted_effects.txt deleted file mode 100644 index 860a0fec..00000000 --- a/N3OW/common/scripted_effects/10_dlc_tgp_dynastic_cycle_scripted_effects.txt +++ /dev/null @@ -1,1572 +0,0 @@ -################################################## -# Dynastic Cycle Scripted Effects -################################################## - -# Effect called when claiming the Mandate of Heaven -tgp_claim_mandate_of_heaven_effect = { - save_temporary_scope_as = new_emperor_temp - every_vassal = { - limit = { - any_held_title = { - OR = { - exists = var:ceremonial_title - exists = var:administrative_ui_special_title - } - } - } - random_held_title = { - limit = { exists = var:ceremonial_title } - save_scope_as = ceremonial_title - } - save_temporary_scope_as = ceremonial_liege - # TGP end the ceremonial liege - # MESSAGE - hidden_effect = { - every_player = { - limit = { top_liege = scope:ceremonial_liege.top_liege } - send_interface_message = { - type = event_generic_bad - title = tgp_destroy_ceremonial_liege_throne_title - left_icon = scope:ceremonial_liege - right_icon = scope:new_emperor_temp - show_as_tooltip = { - scope:new_emperor_temp = { destroy_title = scope:ceremonial_title } - scope:ceremonial_liege = { add_trait = former_emperor } - } - } - } - } - # Actually destroy - scope:ceremonial_liege = { add_trait = former_emperor } - scope:new_emperor_temp = { destroy_title = scope:ceremonial_title } - } - set_variable = { - name = claimed_mandate_var - value = yes - days = 30 - } - # Grant the Hegemon title - create_title_and_vassal_change = { - type = created - save_scope_as = mandate_change - add_claim_on_loss = no - } - title:h_china = { - change_title_holder = { - holder = scope:new_emperor_temp - change = scope:mandate_change - } - } - resolve_title_and_vassal_change = scope:mandate_change - # Adjust tributaries - if = { - limit = { - number_of_tributaries > 0 - } - # Vassalize tributaries within China (except if it's a player) - create_title_and_vassal_change = { - type = swear_fealty - save_scope_as = mandate_vassalize_tributaries_change - } - every_tributary = { - limit = { - is_ai = yes - primary_title = { - target_is_de_jure_liege_or_above = title:h_china - } - } - hidden_effect = { end_tributary = yes } - change_liege = { - liege = scope:new_emperor_temp - change = scope:mandate_vassalize_tributaries_change - } - } - resolve_title_and_vassal_change = scope:mandate_vassalize_tributaries_change - # Turn your other tributaries into hegemonic - every_tributary = { - custom = custom.every_tributary - limit = { - NAND = { - is_ai = yes - primary_title = { - target_is_de_jure_liege_or_above = title:h_china - } - } - } - start_tributary = { - contract_group = tributary_celestial - suzerain = scope:new_emperor_temp - } - } - } - scope:new_emperor_temp = { - # Get some gold back from any owned domicile - nomad_domicile_refund_effect = yes - # Become celestial - if = { - limit = { - NOT = { has_government = celestial_government } - } - tgp_domicile_conversion_when_changing_government_type = { - NEW_DOMICILE_TYPE = east_asian_estate - NEW_GOVERNMENT_TYPE = celestial_government - } - change_government = celestial_government - } - # Get the de jure capital if possible - if = { - limit = { - title:h_china.title_capital_county.holder ?= { - OR = { - any_liege_or_above = { this = scope:new_emperor_temp } - this = scope:new_emperor_temp - } - } - } - if = { - limit = { - title:h_china.title_capital_county.holder = { - this != scope:new_emperor_temp - } - } - create_title_and_vassal_change = { - type = revoked - save_scope_as = mandate_capital_change - add_claim_on_loss = no - } - title:h_china.title_capital_county = { - change_title_holder = { - holder = scope:new_emperor_temp - change = scope:mandate_capital_change - } - } - resolve_title_and_vassal_change = scope:mandate_capital_change - } - set_realm_capital = title:h_china.title_capital_county - } - # Provide the new emperor with suitable rewards - hidden_effect = { - add_treasury = { - value = gold - min = 1000 - } - change_influence = { - value = monumental_influence_gain - multiply = 4 - } - add_legitimacy = mandate_legitimacy_max - } - dynasty = { - add_dynasty_prestige = excessive_dynasty_prestige_value - } - add_character_modifier = claim_mandate_decision_modifier - # Increase control of every owned county within China - hidden_effect = { - every_realm_county = { - custom = custom_every_realm_county - limit = { - target_is_de_jure_liege_or_above = title:h_china - } - change_county_control = 25 - } - } - show_as_tooltip = { # We show this as a tooltip because it looks better than the above effect - title:h_china = { change_county_control = 25 } - } - # Populate the emperor's court with high merit characters - hidden_effect = { - while = { - count = 5 - - create_character = { - template = tgp_minister_administrator_template - employer = scope:new_emperor_temp - faith = scope:new_emperor_temp.faith - culture = scope:new_emperor_temp.culture - save_scope_as = mandate_new_administrator_temp - } - scope:mandate_new_administrator_temp ?= { - change_merit = empire_starting_merit_value - assign_completed_exams_based_on_merit_effect = yes - } - create_character = { - template = tgp_minister_diplomat_template - employer = scope:new_emperor_temp - faith = scope:new_emperor_temp.faith - culture = scope:new_emperor_temp.culture - save_scope_as = mandate_new_diplomat_temp - } - scope:mandate_new_diplomat_temp ?= { - change_merit = empire_starting_merit_value - assign_completed_exams_based_on_merit_effect = yes - } - create_character = { - template = tgp_minister_scholar_template - employer = scope:new_emperor_temp - faith = scope:new_emperor_temp.faith - culture = scope:new_emperor_temp.culture - save_scope_as = mandate_new_scholar_temp - } - scope:mandate_new_scholar_temp ?= { - change_merit = empire_starting_merit_value - assign_completed_exams_based_on_merit_effect = yes - } - create_character = { - template = tgp_minister_scholar_template - employer = scope:new_emperor_temp - faith = scope:new_emperor_temp.faith - culture = scope:new_emperor_temp.culture - save_scope_as = mandate_new_scholar_temp - } - scope:mandate_new_scholar_temp ?= { - change_merit = empire_starting_merit_value - assign_completed_exams_based_on_merit_effect = yes - } - create_character = { - template = tgp_minister_commander_template - employer = scope:new_emperor_temp - faith = scope:new_emperor_temp.faith - culture = scope:new_emperor_temp.culture - save_scope_as = mandate_new_commander_temp - } - scope:mandate_new_commander_temp ?= { - change_merit = empire_starting_merit_value - assign_completed_exams_based_on_merit_effect = yes - } - } - every_courtier = { - limit = { - merit >= 3000 - } - random = { - chance = 50 - create_noble_family_effect = { GOVERNMENT_GIVER = scope:new_emperor_temp } - } - } - } - } - # Convert eligible vassals to celestial - custom_tooltip = { - text = claim_mandate_turn_vassal_celestial_desc - every_vassal_or_below = { - limit = { - highest_held_title_tier >= tier_county - NOR = { - # Don't change republics or theocracies - government_has_flag = government_is_republic - government_has_flag = government_is_theocracy - # And just in case, don't change any unfit governments - government_has_flag = cannot_be_vassal_or_liege - } - capital_province ?= { - OR = { - has_holding_type = castle_holding - has_holding_type = city_holding - has_holding_type = temple_citadel_holding - } - } - } - if = { - limit = { - # No need to change if they are celestial already - NOT = { government_has_flag = government_is_celestial } - } - change_to_administrative_effect = yes - } - # Give characters some merit and exams based on their position - change_merit = { - value = assign_merit_based_on_tier_value - add = { - value = age - multiply = 2 - } - add = { - value = sum_of_all_skills_value - multiply = 2 - } - } - assign_completed_exams_based_on_merit_effect = yes - } - } - hidden_effect = { - create_title_and_vassal_change = { - type = swear_fealty - save_scope_as = mandate_vassalize_celestial_families_change - } - # Vassalize any stray celestial noble families or independent realms within the Cycle's region - we also give them merit to fill out the candidate pools - every_independent_ruler = { - limit = { - capital_province.county ?= { - target_is_de_jure_liege_or_above = title:h_china - } - NOT = { government_has_flag = cannot_be_vassal_or_liege } - OR = { - government_has_flag = government_is_celestial - culture = { - has_same_culture_heritage = scope:new_emperor_temp.culture - } - dynasty = scope:new_emperor_temp.dynasty - } - } - change_liege = { - liege = scope:new_emperor_temp - change = scope:mandate_vassalize_celestial_families_change - } - change_merit = { - value = { 3000 8000 } - add = { - value = age - multiply = 2 - } - add = { - value = sum_of_all_skills_value - multiply = 2 - } - } - assign_completed_exams_based_on_merit_effect = yes - if = { - limit = { - highest_held_title_tier >= tier_county - NOR = { - # Don't change republics or theocracies - government_has_flag = government_is_republic - government_has_flag = government_is_theocracy - # No need to change if they are celestial already - government_has_flag = government_is_celestial - } - capital_province ?= { - OR = { - has_holding_type = castle_holding - has_holding_type = city_holding - has_holding_type = temple_citadel_holding - } - } - } - change_to_administrative_effect = yes - } - } - resolve_title_and_vassal_change = scope:mandate_vassalize_celestial_families_change - # Ensure that we get a family title and a domicile if we don't - change_to_administrative_effect = yes - # set up the council holder as dejure liege of the ministry title, as this effect is not called with the same scope as council onactions - scope:new_emperor_temp = { - save_scope_as = councillor_liege - } - # Make sure ministers are assigned correctly - fill_the_ministry_effect = yes - } -} - -# Effect called when entering the Chaos Phase -tgp_chaos_shattering_effect = { - hidden_effect = { - title:h_china = { - holder = { save_temporary_scope_as = old_emperor_temp } - # Reset imperial examination activity - set_variable = { - name = years_since_imperial_examination - value = 0 - } - } - #put every vassal of the current hegemon in a list - situation:dynastic_cycle = { - every_situation_participant = { - limit = { - top_liege = scope:old_emperor_temp - } - add_to_list = former_vassals - } - } - scope:old_emperor_temp = { - #destroy the title of china and all Empires that the Hegemon holds - every_held_title = { - limit = { - tier > tier_kingdom - } - scope:old_emperor_temp = { - destroy_title = prev - } - } - create_title_and_vassal_change = { - type = independency - save_scope_as = chaos_change - add_claim_on_loss = yes - } - every_vassal = { - limit = { - #breakaway all non-dejure vassals - primary_title = { - NOT = { target_is_de_jure_liege_or_above = scope:old_emperor_temp.primary_title } - } - } - becomes_independent = { change = scope:chaos_change } - } - resolve_title_and_vassal_change = scope:chaos_change - } - # destroy all empire and king level titles if holders have not enough power - every_in_list = { - list = former_vassals - if = { - limit = { - is_landed = yes - is_ai = yes - OR = { - AND = { - highest_held_title_tier = tier_empire - var:movement_power_individual < high_movement_power_value - } - AND = { - highest_held_title_tier = tier_kingdom - var:movement_power_individual < decent_movement_power_value - } - } - } - every_held_title = { - limit = { - tier > tier_duchy - } - prev = { - destroy_title = prev - } - } - } - } - every_in_list = { - list = former_vassals - # Destroy any held minister title - destroy_held_ministry_titles_effect = yes - } - every_in_list = { - list = former_vassals - # let the former vassals of the hegemon become regular conquerors - ai_chance_to_become_conqueror_effect = yes - # put movement leaders and elders into a list - if = { - limit = { - OR = { - num_of_relation_disciple > 0 - has_variable = former_movement_leader - } - is_independent_ruler = yes - is_landed = yes - } - add_to_list = new_lieges - } - } - # remake the hierarchy by vassalizing or tributarizing non-leader movement members and disciples - every_in_list = { - list = new_lieges - save_scope_as = new_liege - every_in_list = { - list = former_vassals - limit = { - OR = { - scope:new_liege.var:former_movement_leader ?= var:former_movement_member - has_relation_elder = scope:new_liege - } - this != scope:new_liege - } - save_scope_as = member - # if lower tier than the potential new liege and is neighboring them or anyone that is also neighboring new liege, vassalize them - if = { - limit = { - highest_held_title_tier < scope:new_liege.highest_held_title_tier - OR = { - primary_title = { is_neighbor_to_realm = scope:new_liege } - any_in_list = { - list = former_vassals - this != scope:new_liege - this != scope:member - primary_title = { - is_neighbor_to_realm = scope:new_liege - is_neighbor_to_realm = scope:member - } - is_tributary_of = scope:new_liege - } - } - } - create_title_and_vassal_change = { - type = swear_fealty - save_scope_as = elder_hierarchy_change - add_claim_on_loss = no - } - change_liege = { - liege = scope:new_liege - change = scope:elder_hierarchy_change - } - resolve_title_and_vassal_change = scope:elder_hierarchy_change - scope:new_liege = { - add_to_variable_list = { - name = chaos_new_vassals - target = scope:member - } - } - } - # otherwise turn into tributary - else_if = { - limit = { - top_liege = scope:member - is_landed = yes - } - start_tributary_interaction_effect = { - TRIBUTARY = scope:member - SUZERAIN = scope:new_liege - } - scope:new_liege = { - add_to_variable_list = { - name = chaos_new_tributaries - target = scope:member - } - } - } - } - } - # Assign unlanded family heads to a suitable realm - every_in_list = { - list = former_vassals - if = { - limit = { - any_held_title = { is_noble_family_title = yes } - is_landed = no - this = top_liege - } - create_title_and_vassal_change = { - type = swear_fealty - save_scope_as = unlanded_liege_change - add_claim_on_loss = no - } - # Save the top liege of the domicile's location - If ruler's tier is above county - if = { - limit = { - domicile.domicile_location.county.holder.top_liege = { - highest_held_title_tier > tier_county - } - } - domicile.domicile_location.county.holder.top_liege = { - save_temporary_scope_as = unlanded_new_liege - } - } - # Otherwise - Try and find a neighboring ruler - else_if = { - limit = { - domicile.domicile_location.county.holder = { - any_neighboring_top_liege_realm_owner = { - highest_held_title_tier > tier_county - } - } - } - domicile.domicile_location.county.holder = { - random_neighboring_top_liege_realm_owner = { - limit = { - highest_held_title_tier > tier_county - } - save_temporary_scope_as = unlanded_new_liege - } - } - } - change_liege = { - liege = scope:unlanded_new_liege - change = scope:unlanded_liege_change - } - resolve_title_and_vassal_change = scope:unlanded_liege_change - } - } - # create a story that will make characters pursue taking the mandate - situation:dynastic_cycle = { - every_situation_participant = { - if = { - limit = { - NOR = { - has_trait = conqueror - any_owned_story = { - story_type = story_conqueror - } - any_owned_story = { - story_type = story_greatest_of_khans - } - any_owned_story = { - story_type = story_mongol_invasion - } - } - is_landed = yes - highest_held_title_tier >= tier_duchy - is_tributary = no - is_adult = yes - is_incapable = no - # run the ai personality triggers only for non elders and non movement leaders - trigger_if = { - limit = { - NOT = { - is_in_list = new_lieges - } - } - ai_has_cautious_personality = no - ai_boldness >= 0 - ai_greed >= 0 - } - } - create_story = story_take_mandate_of_heaven - } - } - } - } - #depose the previous hegemon from all landed titles - scope:old_emperor_temp = { - force_step_down_landed_titles = yes - } - hidden_effect = { - situation:dynastic_cycle = { - every_situation_participant = { - remove_variable = movement_member - recalculate_participant_group = situation:dynastic_cycle - } - } - } -} - -# Saves Chinese Emperor, or the last one -tgp_save_son_of_heaven_or_previous_effect = { - title:h_china.holder ?= { save_scope_as = situation_liege } - if = { - limit = { NOT = { exists = scope:situation_liege } } - title:h_china.previous_holder ?= { save_scope_as = situation_liege } - } -} - -# Advances Dynastic Wuking element -tgp_update_wuking_element_effect = { - situation:dynastic_cycle = { - if = { - limit = { exists = var:wuking_element } - switch = { - trigger = var:wuking_element - flag:metal = { - tgp_set_wuking_element_effect = { ELEMENT = water } - } - flag:water = { - tgp_set_wuking_element_effect = { ELEMENT = wood } - } - flag:wood = { - tgp_set_wuking_element_effect = { ELEMENT = fire } - } - flag:fire = { - tgp_set_wuking_element_effect = { ELEMENT = earth } - } - flag:earth = { - tgp_set_wuking_element_effect = { ELEMENT = metal } - } - } - } - } -} - -# Adds Wuking element variable -tgp_set_wuking_element_effect = { - # Set from new creation - if = { - limit = { - NOT = { exists = title:h_china.holder.house.var:wuking_element } - } - title:h_china.holder.house ?= { - set_variable = { name = wuking_element value = flag:$ELEMENT$ } - } - } - # Set from the new or returning dynasty - set_variable = { name = wuking_element value = flag:$ELEMENT$ } -} - -tgp_treasury_raided_effect = { - if = { - limit = { - exists = title:h_china - scope:county = { - this = title:h_china.title_capital_county - holder ?= { - has_treasury = yes - treasury > 0 - } - } - } - add_loot = treasury_raided_loot_value - title:h_china.holder = { - remove_treasury = treasury_raided_loot_value - add_legitimacy_effect = { LEGITIMACY = medium_legitimacy_loss } - } - if = { - limit = { - situation:dynastic_cycle ?= { - situation_top_has_catalyst = catalyst_imperial_treasury_raided - } - } - trigger_situation_catalyst = catalyst_imperial_treasury_raided - } - } -} - -tgp_activate_catalyst_against_hegemon_effect = { - if = { - limit = { - exists = title:h_china - title:h_china.holder ?= $HEGEMON$ - any_character_situation = { - situation:dynastic_cycle ?= this - situation_top_has_catalyst = $CATALYST$ - } - } - situation:dynastic_cycle = { - trigger_situation_catalyst = $CATALYST$ - } - } -} - -tgp_assign_china_realm_name_options_effect = { - random_list = { - pick = 3 - unique = yes - 0 = { # Ba - modifier = { - add = 100 - capital_province ?= { - geographical_region = tgp_ba_region - } - } - modifier = { - factor = 0 - OR = { - is_title_localization_key_used = dynn_title_ba - is_target_in_variable_list = { name = realm_title_names target = flag:dynn_title_ba } - } - } - add_to_variable_list = { name = realm_title_names target = flag:dynn_title_ba } - } - 0 = { # Cai - modifier = { - add = 100 - capital_province ?= { - geographical_region = tgp_cai_region - } - } - modifier = { - factor = 0 - OR = { - is_title_localization_key_used = dynn_title_cai - is_target_in_variable_list = { name = realm_title_names target = flag:dynn_title_cai } - } - } - add_to_variable_list = { name = realm_title_names target = flag:dynn_title_cai } - } - 0 = { # Cao - modifier = { - add = 100 - capital_province ?= { - geographical_region = tgp_cao_region - } - } - modifier = { - factor = 0 - OR = { - is_title_localization_key_used = dynn_title_cao - is_target_in_variable_list = { name = realm_title_names target = flag:dynn_title_cao } - } - } - add_to_variable_list = { name = realm_title_names target = flag:dynn_title_cao } - } - 0 = { # Chen - modifier = { - add = 100 - capital_province ?= { - geographical_region = tgp_chen_region - } - } - modifier = { - factor = 0 - OR = { - is_title_localization_key_used = dynn_title_chen - is_target_in_variable_list = { name = realm_title_names target = flag:dynn_title_chen } - } - } - add_to_variable_list = { name = realm_title_names target = flag:dynn_title_chen } - } - 0 = { # Chu - modifier = { - add = 100 - capital_province ?= { - geographical_region = tgp_chu_region - } - } - modifier = { - factor = 0 - OR = { - is_title_localization_key_used = dynn_title_chu - is_target_in_variable_list = { name = realm_title_names target = flag:dynn_title_chu } - } - } - add_to_variable_list = { name = realm_title_names target = flag:dynn_title_chu } - } - 0 = { # Dai - modifier = { - add = 100 - capital_province ?= { - geographical_region = tgp_dai_region - } - } - modifier = { - factor = 0 - OR = { - is_title_localization_key_used = dynn_title_dai - is_target_in_variable_list = { name = realm_title_names target = flag:dynn_title_dai } - } - } - add_to_variable_list = { name = realm_title_names target = flag:dynn_title_dai } - } - 0 = { # Dian - modifier = { - add = 100 - capital_province ?= { - geographical_region = tgp_dian_region - } - } - modifier = { - factor = 0 - OR = { - is_title_localization_key_used = dynn_title_dian - is_target_in_variable_list = { name = realm_title_names target = flag:dynn_title_dian } - } - } - add_to_variable_list = { name = realm_title_names target = flag:dynn_title_dian } - } - 0 = { # Gan - modifier = { - add = 100 - capital_province ?= { - geographical_region = tgp_gan_region - } - } - modifier = { - factor = 0 - OR = { - is_title_localization_key_used = dynn_title_gan - is_target_in_variable_list = { name = realm_title_names target = flag:dynn_title_gan } - } - } - add_to_variable_list = { name = realm_title_names target = flag:dynn_title_gan } - } - 0 = { # Gui - modifier = { - add = 100 - capital_province ?= { - geographical_region = tgp_gui_region - } - } - modifier = { - factor = 0 - OR = { - is_title_localization_key_used = dynn_title_gui - is_target_in_variable_list = { name = realm_title_names target = flag:dynn_title_gui } - } - } - add_to_variable_list = { name = realm_title_names target = flag:dynn_title_gui } - } - 0 = { # Han - modifier = { - add = 100 - capital_province ?= { - geographical_region = tgp_han_region - } - } - modifier = { - factor = 0 - OR = { - is_title_localization_key_used = dynn_title_han - is_target_in_variable_list = { name = realm_title_names target = flag:dynn_title_han } - } - } - add_to_variable_list = { name = realm_title_names target = flag:dynn_title_han } - } - 0 = { # Huai - modifier = { - add = 100 - capital_province ?= { - geographical_region = tgp_huai_region - } - } - modifier = { - factor = 0 - OR = { - is_title_localization_key_used = dynn_title_huai - is_target_in_variable_list = { name = realm_title_names target = flag:dynn_title_huai } - } - } - add_to_variable_list = { name = realm_title_names target = flag:dynn_title_huai } - } - 0 = { # Jin - modifier = { - add = 100 - capital_province ?= { - geographical_region = tgp_jin_region - } - } - modifier = { - factor = 0 - OR = { - is_title_localization_key_used = dynn_title_jin - is_target_in_variable_list = { name = realm_title_names target = flag:dynn_title_jin } - } - } - add_to_variable_list = { name = realm_title_names target = flag:dynn_title_jin } - } - 0 = { # Jing - modifier = { - add = 100 - capital_province ?= { - geographical_region = tgp_jing_region - } - } - modifier = { - factor = 0 - OR = { - is_title_localization_key_used = dynn_title_jing - is_target_in_variable_list = { name = realm_title_names target = flag:dynn_title_jing } - } - } - add_to_variable_list = { name = realm_title_names target = flag:dynn_title_jing } - } - 0 = { # Lai - modifier = { - add = 100 - capital_province ?= { - geographical_region = tgp_lai_region - } - } - modifier = { - factor = 0 - OR = { - is_title_localization_key_used = dynn_title_lai - is_target_in_variable_list = { name = realm_title_names target = flag:dynn_title_lai } - } - } - add_to_variable_list = { name = realm_title_names target = flag:dynn_title_lai } - } - 0 = { # Liang - modifier = { - add = 100 - capital_province ?= { - geographical_region = tgp_liang_region - } - } - modifier = { - factor = 0 - OR = { - is_title_localization_key_used = dynn_title_liang - is_target_in_variable_list = { name = realm_title_names target = flag:dynn_title_liang } - } - } - add_to_variable_list = { name = realm_title_names target = flag:dynn_title_liang } - } - 0 = { # Lu - modifier = { - add = 100 - capital_province ?= { - geographical_region = tgp_lu_region - } - } - modifier = { - factor = 0 - OR = { - is_title_localization_key_used = dynn_title_lu - is_target_in_variable_list = { name = realm_title_names target = flag:dynn_title_lu } - } - } - add_to_variable_list = { name = realm_title_names target = flag:dynn_title_lu } - } - 0 = { # Min - modifier = { - add = 100 - capital_province ?= { - geographical_region = tgp_min_region - } - } - modifier = { - factor = 0 - OR = { - is_title_localization_key_used = dynn_title_min - is_target_in_variable_list = { name = realm_title_names target = flag:dynn_title_min } - } - } - add_to_variable_list = { name = realm_title_names target = flag:dynn_title_min } - } - 0 = { # Qi - modifier = { - add = 100 - capital_province ?= { - geographical_region = tgp_qi_region - } - } - modifier = { - factor = 0 - OR = { - is_title_localization_key_used = dynn_title_qi - is_target_in_variable_list = { name = realm_title_names target = flag:dynn_title_qi } - } - } - add_to_variable_list = { name = realm_title_names target = flag:dynn_title_qi } - } - 0 = { # Qian - modifier = { - add = 100 - capital_province ?= { - geographical_region = tgp_qian_region - } - } - modifier = { - factor = 0 - OR = { - is_title_localization_key_used = dynn_title_qian - is_target_in_variable_list = { name = realm_title_names target = flag:dynn_title_qian } - } - } - add_to_variable_list = { name = realm_title_names target = flag:dynn_title_qian } - } - 0 = { # Shu - modifier = { - add = 100 - capital_province ?= { - geographical_region = tgp_shu_region - } - } - modifier = { - factor = 0 - OR = { - is_title_localization_key_used = dynn_title_shu - is_target_in_variable_list = { name = realm_title_names target = flag:dynn_title_shu } - } - } - add_to_variable_list = { name = realm_title_names target = flag:dynn_title_shu } - } - 0 = { # Song - modifier = { - add = 100 - capital_province ?= { - geographical_region = tgp_song_region - } - } - modifier = { - factor = 0 - OR = { - is_title_localization_key_used = dynn_title_song - is_target_in_variable_list = { name = realm_title_names target = flag:dynn_title_song } - } - } - add_to_variable_list = { name = realm_title_names target = flag:dynn_title_song } - } - 0 = { # Sui - modifier = { - add = 100 - capital_province ?= { - geographical_region = tgp_sui_region - } - } - modifier = { - factor = 0 - OR = { - is_title_localization_key_used = dynn_title_sui - is_target_in_variable_list = { name = realm_title_names target = flag:dynn_title_sui } - } - } - add_to_variable_list = { name = realm_title_names target = flag:dynn_title_sui } - } - 0 = { # Tang - modifier = { - add = 100 - capital_province ?= { - geographical_region = tgp_tang_region - } - } - modifier = { - factor = 0 - OR = { - is_title_localization_key_used = dynn_title_tang - is_target_in_variable_list = { name = realm_title_names target = flag:dynn_title_tang } - } - } - add_to_variable_list = { name = realm_title_names target = flag:dynn_title_tang } - } - 0 = { # Wei - modifier = { - add = 100 - capital_province ?= { - geographical_region = tgp_wei_region - } - } - modifier = { - factor = 0 - OR = { - is_title_localization_key_used = dynn_title_wei - is_target_in_variable_list = { name = realm_title_names target = flag:dynn_title_wei } - } - } - add_to_variable_list = { name = realm_title_names target = flag:dynn_title_wei } - } - 0 = { # Wu - modifier = { - add = 100 - capital_province ?= { - geographical_region = tgp_wu_region - } - } - modifier = { - factor = 0 - OR = { - is_title_localization_key_used = dynn_title_wu - is_target_in_variable_list = { name = realm_title_names target = flag:dynn_title_wu } - } - } - add_to_variable_list = { name = realm_title_names target = flag:dynn_title_wu } - } - 0 = { # Xia - modifier = { - add = 100 - capital_province ?= { - geographical_region = tgp_xia_region - } - } - modifier = { - factor = 0 - OR = { - is_title_localization_key_used = dynn_title_xia - is_target_in_variable_list = { name = realm_title_names target = flag:dynn_title_xia } - } - } - add_to_variable_list = { name = realm_title_names target = flag:dynn_title_xia } - } - 0 = { # Xiang - modifier = { - add = 100 - capital_province ?= { - geographical_region = tgp_xiang_region - } - } - modifier = { - factor = 0 - OR = { - is_title_localization_key_used = dynn_title_xiang - is_target_in_variable_list = { name = realm_title_names target = flag:dynn_title_xiang } - } - } - add_to_variable_list = { name = realm_title_names target = flag:dynn_title_xiang } - } - 0 = { # Xing - modifier = { - add = 100 - capital_province ?= { - geographical_region = tgp_xing_region - } - } - modifier = { - factor = 0 - OR = { - is_title_localization_key_used = dynn_title_xing - is_target_in_variable_list = { name = realm_title_names target = flag:dynn_title_xing } - } - } - add_to_variable_list = { name = realm_title_names target = flag:dynn_title_xing } - } - 0 = { # Xu - modifier = { - add = 100 - capital_province ?= { - geographical_region = tgp_xu_region - } - } - modifier = { - factor = 0 - OR = { - is_title_localization_key_used = dynn_title_xu - is_target_in_variable_list = { name = realm_title_names target = flag:dynn_title_xu } - } - } - add_to_variable_list = { name = realm_title_names target = flag:dynn_title_xu } - } - 0 = { # Yang - modifier = { - add = 100 - capital_province ?= { - geographical_region = tgp_yang_region - } - } - modifier = { - factor = 0 - OR = { - is_title_localization_key_used = dynn_title_yang - is_target_in_variable_list = { name = realm_title_names target = flag:dynn_title_yang } - } - } - add_to_variable_list = { name = realm_title_names target = flag:dynn_title_yang } - } - 0 = { # Yin - modifier = { - add = 100 - capital_province ?= { - geographical_region = tgp_yin_region - } - } - modifier = { - factor = 0 - OR = { - is_title_localization_key_used = dynn_title_yin - is_target_in_variable_list = { name = realm_title_names target = flag:dynn_title_yin } - } - } - add_to_variable_list = { name = realm_title_names target = flag:dynn_title_yin } - } - 0 = { # Yong - modifier = { - add = 100 - capital_province ?= { - geographical_region = tgp_yong_region - } - } - modifier = { - factor = 0 - OR = { - is_title_localization_key_used = dynn_title_yong - is_target_in_variable_list = { name = realm_title_names target = flag:dynn_title_yong } - } - } - add_to_variable_list = { name = realm_title_names target = flag:dynn_title_yong } - } - 0 = { # Yue - modifier = { - add = 100 - capital_province ?= { - geographical_region = tgp_yue_region - } - } - modifier = { - factor = 0 - OR = { - is_title_localization_key_used = dynn_title_yue - is_target_in_variable_list = { name = realm_title_names target = flag:dynn_title_yue } - } - } - add_to_variable_list = { name = realm_title_names target = flag:dynn_title_yue } - } - 0 = { # Zhao - modifier = { - add = 100 - capital_province ?= { - geographical_region = tgp_zhao_region - } - } - modifier = { - factor = 0 - OR = { - is_title_localization_key_used = dynn_title_zhao - is_target_in_variable_list = { name = realm_title_names target = flag:dynn_title_zhao } - } - } - add_to_variable_list = { name = realm_title_names target = flag:dynn_title_zhao } - } - 0 = { # Zheng - modifier = { - add = 100 - capital_province ?= { - geographical_region = tgp_zheng_region - } - } - modifier = { - factor = 0 - OR = { - is_title_localization_key_used = dynn_title_zheng - is_target_in_variable_list = { name = realm_title_names target = flag:dynn_title_zheng } - } - } - add_to_variable_list = { name = realm_title_names target = flag:dynn_title_zheng } - } - 0 = { # Zhou - modifier = { - add = 100 - capital_province ?= { - geographical_region = tgp_zhou_region - } - } - modifier = { - factor = 0 - OR = { - is_title_localization_key_used = dynn_title_zhou - is_target_in_variable_list = { name = realm_title_names target = flag:dynn_title_zhou } - } - } - add_to_variable_list = { name = realm_title_names target = flag:dynn_title_zhou } - } - 0 = { # Yuan - modifier = { - add = 1000 - culture = { - has_cultural_pillar = heritage_mongolic - } - } - modifier = { - factor = 0 - OR = { - is_title_localization_key_used = dynn_title_yuan - is_target_in_variable_list = { name = realm_title_names target = flag:dynn_title_yuan } - } - } - add_to_variable_list = { name = realm_title_names target = flag:dynn_title_yuan } - } - } -} - -# Custom situation history entry setup on phase change -tgp_dynastic_cycle_record_history_phase_change_effect = { - - # protect from double history entries - if = { - limit = { - situation:dynastic_cycle = { - OR = { - NOT = { exists = var:last_recorded_phase_change } - AND = { - exists = var:last_recorded_phase_change - OR = { - var:last_recorded_phase_change != $PHASE_NUMBER$ - var:last_recorded_phase_change = 4 - } - } - } - } - } - # When we enter Division, we only want to show the old hegemon - if = { - limit = { - situation:dynastic_cycle = { - situation_current_phase = situation_dynastic_cycle_phase_chaos - } - } - situation:dynastic_cycle = { - record_situation_special_event = { - key = situation_dynastic_cycle_era_change_history_entry - phase = $PHASE$ - variables = { - old_hegemon = title:h_china.previous_holder - } - } - } - } - # When we restore China after division, we only show the new hegemon - else_if = { - limit = { - #exists = title:h_china.holder - #title:h_china.holder = { is_valid_celestial_dynasty = yes } - situation:dynastic_cycle = { - exists = var:last_recorded_phase_change - var:last_recorded_phase_change = 6 - } - } - situation:dynastic_cycle = { - record_situation_special_event = { - key = situation_dynastic_cycle_era_change_history_entry - phase = $PHASE$ - variables = { - new_hegemon = title:h_china.holder - } - } - } - } - # If we replace the ruling dynasty, show new and old hegemon - else_if = { - limit = { - exists = title:h_china.holder - exists = title:h_china.previous_holder - title:h_china.holder.dynasty != title:h_china.previous_holder.dynasty - } - situation:dynastic_cycle = { - record_situation_special_event = { - key = situation_dynastic_cycle_era_change_history_entry - phase = $PHASE$ - variables = { - new_hegemon = title:h_china.holder - old_hegemon = title:h_china.previous_holder - } - } - } - } - # Else, show none - else = { - situation:dynastic_cycle = { - record_situation_special_event = { - key = situation_dynastic_cycle_era_change_history_entry - phase = $PHASE$ - } - } - } - situation:dynastic_cycle = { - set_variable = { - name = last_recorded_phase_change - value = $PHASE_NUMBER$ - } - } - } -} - -tgp_dynastic_cycle_add_to_movement_effect = { - $CHAR$ = { save_temporary_scope_as = other_ruler } - custom_tooltip = tgp_movement_events_0010_add_to_movement_effect_tt - if = { - limit = { - top_participant_group:dynastic_cycle ?= { - participant_group_type = expansion_movement - } - } - $CHAR$ = { - set_variable = { - name = movement_member - value = flag:expansion - } - } - } - else_if = { - limit = { - top_participant_group:dynastic_cycle ?= { - participant_group_type = advancement_movement - } - } - $CHAR$ = { - set_variable = { - name = movement_member - value = flag:advancement - } - } - } - else_if = { - limit = { - top_participant_group:dynastic_cycle ?= { - participant_group_type = pro_hegemon_movement - } - } - $CHAR$ = { - set_variable = { - name = movement_member - value = flag:pro_hegemon - } - } - } - else_if = { - limit = { - top_participant_group:dynastic_cycle ?= { - participant_group_type = conservative_movement - } - } - $CHAR$ = { - set_variable = { - name = movement_member - value = flag:conservative - } - } - } - else_if = { - limit = { - top_participant_group:dynastic_cycle ?= { - participant_group_type = undecided_movement - } - } - $CHAR$ = { - set_variable = { - name = movement_member - value = flag:undecided - } - } - } -} - -tgp_catalyst_from_decision_effect = { - switch = { - trigger = participant_group_type - pro_hegemon_movement = { - situation:dynastic_cycle = { - if = { - limit = { - situation_top_has_catalyst = catalyst_house_head_consulted_heaven_advancement_positive - root.top_liege.hegemon_favored_stability_phase_value >= 0 - } - trigger_situation_catalyst = catalyst_house_head_consulted_heaven_advancement_positive - } - else_if = { - limit = { - situation_top_has_catalyst = catalyst_house_head_consulted_heaven_expansion_positive - root.top_liege.hegemon_favored_stability_phase_value < 0 - } - trigger_situation_catalyst = catalyst_house_head_consulted_heaven_expansion_positive - } - else = { - trigger_situation_catalyst = catalyst_house_head_consulted_heaven_chaos_negative - } - } - } - advancement_movement = { - situation:dynastic_cycle = { - if = { - limit = { - situation_top_has_catalyst = catalyst_house_head_consulted_heaven_advancement_positive - } - trigger_situation_catalyst = catalyst_house_head_consulted_heaven_advancement_positive - } - else_if = { - limit = { - situation_current_phase = situation_dynastic_cycle_phase_stability_advancement - } - trigger_situation_catalyst = catalyst_house_head_consulted_heaven_chaos_negative - } - else = { - trigger_situation_catalyst = catalyst_house_head_consulted_heaven_chaos_positive - } - } - } - expansion_movement = { - situation:dynastic_cycle = { - if = { - limit = { - situation_top_has_catalyst = catalyst_house_head_consulted_heaven_expansion_positive - } - trigger_situation_catalyst = catalyst_house_head_consulted_heaven_expansion_positive - } - else_if = { - limit = { - situation_current_phase = situation_dynastic_cycle_phase_stability_expansion - } - trigger_situation_catalyst = catalyst_house_head_consulted_heaven_chaos_negative - } - else = { - trigger_situation_catalyst = catalyst_house_head_consulted_heaven_chaos_positive - } - } - } - conservative_movement = { - situation:dynastic_cycle = { - if = { - limit = { - situation_top_has_catalyst = catalyst_house_head_consulted_heaven_advancement_positive - root.top_liege.hegemon_favored_stability_phase_value < 0 #flipped on purpose - } - trigger_situation_catalyst = catalyst_house_head_consulted_heaven_advancement_positive - } - else_if = { - limit = { - situation_top_has_catalyst = catalyst_house_head_consulted_heaven_expansion_positive - root.top_liege.hegemon_favored_stability_phase_value >= 0 #flipped on purpose - } - trigger_situation_catalyst = catalyst_house_head_consulted_heaven_expansion_positive - } - else = { - trigger_situation_catalyst = catalyst_house_head_consulted_heaven_chaos_positive - } - } - } - undecided_movement = { - situation:dynastic_cycle = { - trigger_situation_catalyst = catalyst_house_head_consulted_heaven_chaos_negative - } - } - } -} diff --git a/N3OW/common/scripted_effects/10_dlc_tgp_house_bloc_scripted_effects.txt b/N3OW/common/scripted_effects/10_dlc_tgp_house_bloc_scripted_effects.txt deleted file mode 100644 index 98ad1b74..00000000 --- a/N3OW/common/scripted_effects/10_dlc_tgp_house_bloc_scripted_effects.txt +++ /dev/null @@ -1,1376 +0,0 @@ -#### Japanese Bloc effects - -## Create Japanese Bloc -# -# Create an appropriately named block (i.e. Japanese style confederation), -# with the root scoped characters house as the leading house. -# -# root: house which will lead the bloc -# TYPE: flag representing the confederation (and by extension aspiration) type -# -tgp_create_house_bloc_effect = { - save_scope_as = bloc_creator - save_scope_value_as = { - name = type - value = flag:$TYPE$ - } - custom_description = { - text = create_house_bloc_effect - subject = scope:bloc_creator.house_head - if = { - limit = { - OR = { - has_house_power_parameter = ceremony_cheaper_feasts - scope:type = flag:ceremony - } - } - house_head = { - create_confederation = { - name = CONFEDERATION_HOUSE_NAME - type = confederation_type:house_bloc_ceremony - leader = house - } - } - } - else_if = { - limit = { - OR = { - has_house_power_parameter = unlocks_japanese_manor_watch_house - scope:type = flag:determination - } - } - house_head = { - create_confederation = { - name = CONFEDERATION_HOUSE_NAME - type = confederation_type:house_bloc_determination - leader = house - } - } - } - else_if = { - limit = { - OR = { - has_house_power_parameter = unlocks_japanese_manor_shrine - scope:type = flag:humility - } - } - house_head = { - create_confederation = { - name = CONFEDERATION_HOUSE_NAME - type = confederation_type:house_bloc_humility - leader = house - } - } - } - else_if = { - limit = { - OR = { - has_house_power_parameter = unlocks_japanese_manor_brewery - scope:type = flag:prosperity - } - } - house_head = { - create_confederation = { - name = CONFEDERATION_HOUSE_NAME - type = confederation_type:house_bloc_prosperity - leader = house - } - } - } - else_if = { - limit = { - OR = { - has_house_power_parameter = unlocks_japanese_manor_archive - scope:type = flag:service - } - } - house_head = { - create_confederation = { - name = CONFEDERATION_HOUSE_NAME - type = confederation_type:house_bloc_service - leader = house - } - } - } - else_if = { - limit = { - OR = { - has_house_power_parameter = unlocks_japanese_manor_armory - scope:type = flag:strength - } - } - house_head = { - create_confederation = { - name = CONFEDERATION_HOUSE_NAME - type = confederation_type:house_bloc_strength - leader = house - } - } - } - house_confederation ?= { - save_scope_as = bloc - set_coa = scope:bloc_creator - } - } -} - -## Add additional character, and all members of their house, to a 'block'. -# -# root: house - who was invited -# INVITER: house - who is a member of the bloc to join -# -tgp_join_house_bloc_effect = { - save_scope_as = joiner - house_confederation ?= { save_scope_as = old_bloc } - $INVITER$ ?= { - save_scope_as = inviter - house_confederation ?= { save_scope_as = bloc } - } - if = { # Tooltip for interaction - limit = { NOT = { exists = scope:bloc } } - scope:joiner.house_head = { custom_tooltip = join_house_bloc_tt_no_scope } - } - else_if = { - limit = { - exists = scope:joiner - exists = scope:inviter - exists = scope:bloc - trigger_if = { - limit = { exists = scope:old_bloc } - scope:old_bloc != scope:bloc - } - } - # ADD MEMBER HOUSE - custom_description = { - text = join_house_bloc_effect - subject = scope:joiner.house_head - object = scope:inviter.house_head - scope:bloc ?= { - hidden_effect = { add_confederation_member_house = scope:joiner } - } - } - # OPINION - if = { - limit = { - $OPINION$ = flag:yes - exists = scope:joiner - scope:inviter != scope:joiner - } - scope:inviter ?= { - house_head ?= { - if = { # Hide for players - limit = { is_ai = yes } - if = { - limit = { - has_opinion_modifier = { - modifier = left_house_bloc_opinion - target = scope:joiner.house_head - } - } - remove_opinion = { - modifier = left_house_bloc_opinion - target = scope:joiner.house_head - } - } - add_opinion = { - modifier = joined_house_bloc_opinion - target = scope:joiner.house_head - opinion = 15 - } - } - } - change_house_relation_effect = { - HOUSE = scope:joiner - VALUE = house_relation_improve_medium_value - REASON = joined_bloc - CHAR = scope:joiner.house_head - TARGET_CHAR = scope:inviter.house_head - TITLE = scope:dummy_gender - } - } - } - } -} - - -## Leave block taking all rulers of the same house with you -# -# root: house - leaving the bloc -# -tgp_leave_house_bloc_effect = { - save_scope_as = leaver - house_confederation ?= { - save_scope_as = bloc - leading_house ?= { save_scope_as = leader } - } - if = { - limit = { - exists = scope:bloc - scope:leaver.house_head.house.house_confederation ?= scope:bloc - } - if = { # DISBAND - limit = { - scope:bloc = { - any_confederation_member_house = { count <= 2 } - } - } - custom_description = { - text = leave_house_bloc_effect - subject = scope:leaver.house_head - object = scope:bloc.leading_house.house_head - } - custom_description = { - text = disband_house_bloc_effect - subject = scope:bloc.leading_house.house_head - } - } - else_if = { # COOLDOWN - limit = { scope:leader != scope:leaver } - custom_description = { - text = leave_house_bloc_cooldown_effect - subject = scope:leaver.house_head - object = scope:bloc.leading_house.house_head - add_to_variable_list = { - name = left_bloc_cooldown - target = scope:bloc - years = tgp_leave_house_bloc_cooldown_years_value - } - } - } - if = { - limit = { scope:leader = scope:leaver } - # NEW LEADER TOOLTIP - scope:bloc = { - show_as_tooltip = { tgp_find_new_house_bloc_leader_effect = yes } - } - } - else = { - # OPINION - if = { - limit = { $OPINION$ = flag:yes } - scope:leader ?= { - house_head ?= { - if = { - limit = { - has_opinion_modifier = { - target = scope:leaver.house_head - modifier = joined_house_bloc_opinion - } - } - remove_opinion = { - target = scope:leaver.house_head - modifier = joined_house_bloc_opinion - } - } - add_opinion = { - target = scope:leaver.house_head - modifier = left_house_bloc_opinion - opinion = -15 - } - } - change_house_relation_effect = { - HOUSE = scope:leaver - VALUE = house_relation_damage_medium_value - REASON = left_bloc - CHAR = scope:leaver.house_head - TARGET_CHAR = scope:leader.house_head - TITLE = scope:dummy_gender - } - } - } - # TRUCE - if = { - limit = { $TRUCE$ = flag:yes } - scope:leaver.house_head = { - custom_tooltip = { - text = tgp_leave_house_bloc_truce_tt - scope:bloc = { - every_confederation_member_house = { - every_house_member = { - limit = { - top_liege = scope:leaver.house_head.top_liege - is_landed = yes - } - if = { - limit = { house != scope:leaver } - add_to_list = truce_targets - } - else = { add_to_list = truce_getters } - } - } - every_in_list = { - list = truce_targets - save_temporary_scope_as = truce_target_temp - every_in_list = { - list = truce_getters - add_truce_one_way = { - character = scope:truce_target_temp - years = tgp_leave_house_bloc_truce_years_value - name = TRUCE_LEFT_BLOC - } - } - } - } - } - } - } - } - # REMOVE MEMBER HOUSE - scope:bloc ?= { - hidden_effect = { remove_confederation_member_house = scope:leaver } - } - } -} - - -## Clear bloc membership related flags -# -# root: character -# -tgp_clear_house_bloc_flags_effect = { - if = { - limit = { has_character_flag = forced_bloc_membership } - remove_character_flag = forced_bloc_membership - } - if = { - limit = { has_character_flag = recently_joined_bloc } - remove_character_flag = recently_joined_bloc - } -} - - -## Find new leading house if necessary -# -# root: confederation - to find a new leader for -# -tgp_find_new_house_bloc_leader_effect = { - save_scope_as = bloc_temp - ordered_confederation_member_house = { - limit = { - exists = house_head - save_temporary_scope_as = house_temp - } - order_by = { # Most members - value = 1 - scope:house_temp.house_head.top_liege = { - every_vassal = { - limit = { - highest_held_title_tier > tier_barony - is_landed = yes - exists = house - house = { has_same_house_power_as = scope:house_temp } - house = scope:house_temp - } - add = 1 - } - } - } - save_temporary_scope_as = new_leader_temp - scope:bloc_temp = { - tgp_set_house_bloc_leading_house_effect = { LEADER = scope:new_leader_temp } - } - } -} - -# Set house leading a 'bloc' (i.e. Japanese style confederation) -# -# root: confederation - bloc getting a new leading house -# LEADER: house - new leading house -# -# -tgp_set_house_bloc_leading_house_effect = { - save_scope_as = bloc - leading_house = { save_scope_as = old_leader } - $LEADER$ ?= { save_scope_as = leader } - if = { - limit = { - exists = scope:leader - exists = scope:bloc - trigger_if = { - limit = { exists = scope:old_leader } - scope:old_leader != scope:leader - } - } - custom_description = { - text = change_house_bloc_leader_effect - subject = scope:leader.house_head - object = scope:old_leader.house_head - scope:bloc ?= { - hidden_effect = { - tgp_bloc_set_leading_house_effect = { HOUSE = scope:leader } - } - if = { - limit = { exists = scope:old_leader } - set_variable = { - name = recent_leader_change - value = scope:old_leader - years = 5 - } - } - hidden_effect = { - every_player = { - limit = { confederation ?= scope:bloc } - send_interface_message = { - type = msg_house_bloc_leader - title = msg_bloc_new_leading_house - desc = msg_bloc_new_leading_house_desc - left_icon = scope:leader.house_head - right_icon = scope:leader - custom_description = { - text = change_house_bloc_leader_effect - subject = scope:leader.house_head - object = scope:old_leader.house_head - } - } - } - } - } - } - } -} - - -## Create historical blocs and add members at game start -# -# root: none -# -tgp_setup_historical_house_bloc_effect = { - ### 867 - if = { - limit = { game_start_date = 867.1.1 } - # Ceremony - dynasty:japanese_fujiwara.dynasty_founder.house ?= { - tgp_create_historical_house_bloc_effect = { TYPE = ceremony } # Northern Fujiwara - # Fujiwara - tgp_join_historical_house_bloc_effect = { JOINER = house:house_fujiwara_kyo_ke } # Capital Fujiwara - tgp_join_historical_house_bloc_effect = { JOINER = house:house_fujiwara_nan_ke } # Southern Fujiwara - tgp_join_historical_house_bloc_effect = { JOINER = house:house_fujiwara_shiki_ke } # Ceremonial Fujiwara - tgp_join_historical_house_bloc_effect = { JOINER = house:house_fujiwara_yamakage } # Yamakage Fujiwara - # Taira - tgp_join_historical_house_bloc_effect = { JOINER = dynasty:japanese_taira_kanmu.dynasty_founder.house } # Kanmu Taira - } - # Service - dynasty:japanese_sugawara.dynasty_founder.house ?= { - tgp_create_historical_house_bloc_effect = { TYPE = service } # Sugawara - # Minamoto - tgp_join_historical_house_bloc_effect = { JOINER = dynasty:japanese_minamoto_ninmyo.dynasty_founder.house } # Ninmyo Minamoto - # Other - tgp_join_historical_house_bloc_effect = { JOINER = dynasty:japanese_ariwara.dynasty_founder.house } # Ariwara - tgp_join_historical_house_bloc_effect = { JOINER = dynasty:japanese_harusumi.dynasty_founder.house } # Harusumi - tgp_join_historical_house_bloc_effect = { JOINER = dynasty:japanese_ki.dynasty_founder.house } # Ki - tgp_join_historical_house_bloc_effect = { JOINER = dynasty:japanese_kudara.dynasty_founder.house } # Kudara - tgp_join_historical_house_bloc_effect = { JOINER = dynasty:japanese_oe.dynasty_founder.house } # Oe - tgp_join_historical_house_bloc_effect = { JOINER = dynasty:japanese_shimada.dynasty_founder.house } # Shimada - tgp_join_historical_house_bloc_effect = { JOINER = dynasty:japanese_yamato.dynasty_founder.house } # Yamato - } - # Prosperity - dynasty:japanese_minamoto_saga.dynasty_founder.house ?= { - tgp_create_historical_house_bloc_effect = { TYPE = prosperity } # Saga Minamoto - # Fujiwara - tgp_join_historical_house_bloc_effect = { JOINER = house:house_fujiwara_manatsu } # Manatsu Fujiwara - tgp_join_historical_house_bloc_effect = { JOINER = house:house_fujiwara_uona } # Uona Fujiwara - # Minamoto - tgp_join_historical_house_bloc_effect = { JOINER = dynasty:japanese_minamoto_montoku.dynasty_founder.house } # Montoku Minamoto - # Other - tgp_join_historical_house_bloc_effect = { JOINER = dynasty:japanese_kiyohara.dynasty_founder.house } # Kiyohara - tgp_join_historical_house_bloc_effect = { JOINER = dynasty:japanese_tachibana.dynasty_founder.house } # Tachibana - } - # Strength - dynasty:japanese_yoshimine.dynasty_founder.house ?= { - tgp_create_historical_house_bloc_effect = { TYPE = strength } # Yoshmine - # Other - tgp_join_historical_house_bloc_effect = { JOINER = dynasty:japanese_abe.dynasty_founder.house } # Abe - } - # Humility - house:house_nakatomi_onakatomi ?= { - tgp_create_historical_house_bloc_effect = { TYPE = humility } # Onakatomi - # Other - tgp_join_historical_house_bloc_effect = { JOINER = dynasty:japanese_tomo.dynasty_founder.house } # Tomo - } - } - ### 1066 - else_if = { - limit = { game_start_date = 1066.9.15 } - # Ceremony - dynasty:japanese_fujiwara.dynasty_founder.house ?= { - tgp_create_historical_house_bloc_effect = { TYPE = ceremony } # Northern Fujiwara - # Fujiwara - tgp_join_historical_house_bloc_effect = { JOINER = house:house_fujiwara_koichijo } # Koichijo Fujiwara - tgp_join_historical_house_bloc_effect = { JOINER = house:house_fujiwara_manatsu } # Manatsu Fujiwara - tgp_join_historical_house_bloc_effect = { JOINER = house:house_fujiwara_nakamikado } # Nakamikado Fujiwara - tgp_join_historical_house_bloc_effect = { JOINER = house:house_fujiwara_nan_ke } # Southern Fujiwara - tgp_join_historical_house_bloc_effect = { JOINER = house:house_fujiwara_ononomiya } # Ononomiya Fujiwara - tgp_join_historical_house_bloc_effect = { JOINER = house:house_fujiwara_sesonji } # Sesonji Fujiwara - tgp_join_historical_house_bloc_effect = { JOINER = house:house_fujiwara_shiki_ke } # Ceremonial Fujiwara - tgp_join_historical_house_bloc_effect = { JOINER = house:house_fujiwara_yamakage } # Yamakage Fujiwara - tgp_join_historical_house_bloc_effect = { JOINER = house:house_fujiwara_yoshikado } # Yoshikado Fujiwara - tgp_join_historical_house_bloc_effect = { JOINER = house:house_fujiwara_yoshiyo } # Yoshiyo Fujiwara - # Other - tgp_join_historical_house_bloc_effect = { JOINER = dynasty:japanese_koremune.dynasty_founder.house } # Koremune - } - # Service - dynasty:japanese_minamoto_murakami.dynasty_founder.house ?= { # Murakami Minamoto - tgp_create_historical_house_bloc_effect = { TYPE = service } - # Fujiwara - tgp_join_historical_house_bloc_effect = { JOINER = house:house_fujiwara_kajuji } # Kajuji - # Minamoto - tgp_join_historical_house_bloc_effect = { JOINER = dynasty:japanese_minamoto_daigo.dynasty_founder.house } # Daigo Minamoto - tgp_join_historical_house_bloc_effect = { JOINER = dynasty:japanese_minamoto_sanjo.dynasty_founder.house } # Sanjo Minamoto - tgp_join_historical_house_bloc_effect = { JOINER = dynasty:japanese_minamoto_uda.dynasty_founder.house } # Uda Minamoto - # Other - tgp_join_historical_house_bloc_effect = { JOINER = dynasty:japanese_ki.dynasty_founder.house } # Ki - tgp_join_historical_house_bloc_effect = { JOINER = dynasty:japanese_oe.dynasty_founder.house } # Oe - tgp_join_historical_house_bloc_effect = { JOINER = dynasty:japanese_sugawara.dynasty_founder.house } # Sugawara - tgp_join_historical_house_bloc_effect = { JOINER = dynasty:japanese_takashina.dynasty_founder.house } # Takashina - } - # Strength - house:house_minamoto_kawachi ?= { - tgp_create_historical_house_bloc_effect = { TYPE = strength } # Kawachi Minamoto - # Minamoto - tgp_join_historical_house_bloc_effect = { JOINER = house:house_minamoto_mino } # Mino Minamoto - tgp_join_historical_house_bloc_effect = { JOINER = house:house_minamoto_settsu } # Settsu Minamoto - tgp_join_historical_house_bloc_effect = { JOINER = house:house_minamoto_shinano } # Shinano Minamoto - # Taira - tgp_join_historical_house_bloc_effect = { JOINER = house:house_taira_boso } # Boso Taira - tgp_join_historical_house_bloc_effect = { JOINER = house:house_taira_chichibu } # Chichibu Taira - tgp_join_historical_house_bloc_effect = { JOINER = house:house_taira_hitachi } # Daijo Taira - tgp_join_historical_house_bloc_effect = { JOINER = house:house_taira_miura } # Miura Taira - tgp_join_historical_house_bloc_effect = { JOINER = house:house_taira_iwaki } # Iwaki Taira - } - # Prosperity - dynasty:japanese_kiyohara.dynasty_founder.house ?= { - tgp_create_historical_house_bloc_effect = { TYPE = prosperity } # Kiyohara - # Taira - tgp_join_historical_house_bloc_effect = { JOINER = house:house_taira_echigo } # Echigo Taira - } - # Determination - dynasty:japanese_kikuchi.dynasty_founder.house ?= { - tgp_create_historical_house_bloc_effect = { TYPE = determination } # Kikuchi - # Minamoto - tgp_join_historical_house_bloc_effect = { JOINER = house:house_minamoto_watanabe } # Watanabe Minamoto - # Taira - tgp_join_historical_house_bloc_effect = { JOINER = house:house_taira_satsuma } # Satsuma Taira - # Other - tgp_join_historical_house_bloc_effect = { JOINER = dynasty:japanese_abiru.dynasty_founder.house } # Abiru - tgp_join_historical_house_bloc_effect = { JOINER = dynasty:japanese_kimotsuki.dynasty_founder.house } # Kimotsuki - tgp_join_historical_house_bloc_effect = { JOINER = dynasty:japanese_omiwa.dynasty_founder.house } # Omiwa - } - } - ### 1178 ### - else_if = { - limit = { game_start_date = 1178.10.1 } - # Ceremony - house:house_fujiwara_matsudono = { - tgp_create_historical_house_bloc_effect = { TYPE = ceremony } # Matsudono Fujiwara - # Fujiwara - tgp_join_historical_house_bloc_effect = { JOINER = dynasty:japanese_fujiwara.dynasty_founder.house } # Fujiwara - tgp_join_historical_house_bloc_effect = { JOINER = house:house_fujiwara_hamuro } # Hamuro Fujiwara - tgp_join_historical_house_bloc_effect = { JOINER = house:house_fujiwara_kajuji } # Kajuji Fujiwara - tgp_join_historical_house_bloc_effect = { JOINER = house:house_fujiwara_kasannoin } # Kasannoin Fujiwara - tgp_join_historical_house_bloc_effect = { JOINER = house:house_fujiwara_kujo } # Kujo Fujiwara - tgp_join_historical_house_bloc_effect = { JOINER = house:house_fujiwara_mikohida } # Mikohida Fujiwara - tgp_join_historical_house_bloc_effect = { JOINER = house:house_fujiwara_oinomikado } # Oinomikado Fujiwara - tgp_join_historical_house_bloc_effect = { JOINER = house:house_fujiwara_rokujo } # Rokujo Fujiwara - tgp_join_historical_house_bloc_effect = { JOINER = house:house_fujiwara_shijo } # Shijo Fujiwara - tgp_join_historical_house_bloc_effect = { JOINER = house:house_fujiwara_yoshikado } # Yoshikado Fujiwara - # Minamoto - tgp_join_historical_house_bloc_effect = { JOINER = dynasty:japanese_minamoto_uda.dynasty_founder.house } # Uda Minamoto - # Taira - tgp_join_historical_house_bloc_effect = { JOINER = house:house_taira_takamune } # Takamune Taira - } - # Determination - dynasty:japanese_taira_kanmu.dynasty_founder.house = { - tgp_create_historical_house_bloc_effect = { TYPE = determination } # Kanmu Taira - # Fujiwara - tgp_join_historical_house_bloc_effect = { JOINER = house:house_fujiwara_ashikaga } # Fujiwara Ashikaga - # Minamoto - tgp_join_historical_house_bloc_effect = { JOINER = house:house_minamoto_hitachi } # Satake Minamoto - # Taira - tgp_join_historical_house_bloc_effect = { JOINER = house:house_taira_echigo } # Jo Taira - tgp_join_historical_house_bloc_effect = { JOINER = house:house_taira_kawagoe } # Kawagoe Taira - tgp_join_historical_house_bloc_effect = { JOINER = house:house_taira_oba } # Oba Taira - tgp_join_historical_house_bloc_effect = { JOINER = house:house_taira_satsuma } # Satsuma Taira - # Other - tgp_join_historical_house_bloc_effect = { JOINER = dynasty:japanese_ito.dynasty_founder.house } # Ito - tgp_join_historical_house_bloc_effect = { JOINER = dynasty:japanese_osada.dynasty_founder.house } # Osada - tgp_join_historical_house_bloc_effect = { JOINER = dynasty:japanese_saeki_sanyo.dynasty_founder.house } # Saeki - tgp_join_historical_house_bloc_effect = { JOINER = dynasty:japanese_senoo.dynasty_founder.house } # Seno'o - tgp_join_historical_house_bloc_effect = { JOINER = house:house_tachibana_tokai } # Tachibana Tokai - tgp_join_historical_house_bloc_effect = { JOINER = dynasty:japanese_taguchi.dynasty_founder.house } # Taguchi - tgp_join_historical_house_bloc_effect = { JOINER = dynasty:japanese_yuasa.dynasty_founder.house } # Yuasa - } - # Prosperity - dynasty:japanese_kikuchi.dynasty_founder.house = { - tgp_create_historical_house_bloc_effect = { TYPE = prosperity } # Kikuchi - # Other - tgp_join_historical_house_bloc_effect = { JOINER = dynasty:japanese_kimotsuki.dynasty_founder.house } # Kimotsuki - tgp_join_historical_house_bloc_effect = { JOINER = dynasty:japanese_kono.dynasty_founder.house } # Kono - tgp_join_historical_house_bloc_effect = { JOINER = dynasty:japanese_kusakabe.dynasty_founder.house } # Kusakabe - tgp_join_historical_house_bloc_effect = { JOINER = dynasty:japanese_ouchi.dynasty_founder.house } # Ouchi - tgp_join_historical_house_bloc_effect = { JOINER = house:house_omiwa_usuki } # Usuki - } - # Strength - house:house_minamoto_settsu ?= { - tgp_create_historical_house_bloc_effect = { TYPE = strength } - # Minamoto - tgp_join_historical_house_bloc_effect = { JOINER = house:house_minamoto_ishikawa } # Ishikawa Minamoto - tgp_join_historical_house_bloc_effect = { JOINER = house:house_minamoto_kai } # Kai Minamoto (Takeda) - tgp_join_historical_house_bloc_effect = { JOINER = house:house_minamoto_kawachi } # Kawachi Minamoto - tgp_join_historical_house_bloc_effect = { JOINER = house:house_minamoto_kiso } # Kiso Minamoto - tgp_join_historical_house_bloc_effect = { JOINER = house:house_minamoto_kozuke } # Kozuke Minamoto (Nitta) - tgp_join_historical_house_bloc_effect = { JOINER = house:house_minamoto_toki } # Toki Minamoto - tgp_join_historical_house_bloc_effect = { JOINER = house:house_minamoto_yamamoto } # Yamamoto Minamoto - tgp_join_historical_house_bloc_effect = { JOINER = house:house_minamoto_yamato } # Yamato Minamoto - # Taira - tgp_join_historical_house_bloc_effect = { JOINER = house:house_taira_chiba } # Chiba Taira - tgp_join_historical_house_bloc_effect = { JOINER = house:house_taira_kazusa } # Kazusa Taira - tgp_join_historical_house_bloc_effect = { JOINER = house:house_taira_miura } # Miura Taira - } - # Prosperity - dynasty:japanese_fujiwara_oshu.dynasty_founder.house = { - tgp_create_historical_house_bloc_effect = { TYPE = prosperity } # Oshu Fujiwara - # Minamoto - tgp_join_historical_house_bloc_effect = { JOINER = dynasty:house_minamoto_oshu_ishikawa } # Oshu Ishikawa Minamoto - } - } - # Fix cooldowns - every_confederation = { - every_confederation_member_house = { remove_variable = recently_joined_bloc } - } -} - - -## Create historical bloc -# -# root: house - initial leader of bloc -# -tgp_create_historical_house_bloc_effect = { - house_head ?= { - save_temporary_scope_as = bloc_creator - if = { - limit = { - is_alive = yes - NOT = { exists = house.house_confederation } - } - if = { - limit = { is_ruler = yes } - house = { - tgp_create_house_bloc_effect = { TYPE = $TYPE$ } - add_to_list = historical_house_bloc_house_list - } - } - } - } - clear_saved_scope = bloc_creator -} - - -## Add a house to this Japanese Bloc -# -# In addition to adding the house (and thereby all eligible rulers in it), -# a friendly relation will be established between the involved houses. -# -# root: the leading house of the bloc -# JOINER: the house to add -# -tgp_join_historical_house_bloc_effect = { - if = { - limit = { exists = house_confederation } - save_temporary_scope_as = leader_temp - house_confederation = { save_temporary_scope_as = historical_bloc_temp } - $JOINER$ = { save_temporary_scope_as = joiner_temp } - scope:joiner_temp ?= { - if = { - limit = { - exists = house_head - NOT = { exists = house_confederation } - exists = scope:leader_temp - exists = scope:historical_bloc_temp - } - scope:historical_bloc_temp = { add_confederation_member_house = scope:joiner_temp } - scope:leader_temp = { - tgp_set_historical_house_relation_effect = { - OTHER_HOUSE = scope:joiner_temp - LEVEL = cordial - } - } - if = { - limit = { NOT = { exists = scope:joiner_temp.house_confederation } } - assert_if = { - limit = { always = yes } - text = "tgp_join_historical_house_bloc_effect: joiner did not join!" - } - debug_log = "tgp_join_historical_house_bloc_effect: joiner did not join!" - } - } - } - clear_saved_scope = leader_temp - clear_saved_scope = historical_bloc_temp - clear_saved_scope = joiner_temp - } -} - -tgp_on_member_joined_shared_effect = { - save_scope_as = bloc - scope:character = { - save_scope_as = joiner - add_character_flag = { - flag = bloc_message_flag - days = 1 - } - trigger_event = { - id = tgp_house_blocs.0002 - days = 1 - } - # JOIN LEADERS FACTION - if = { - limit = { - scope:bloc.leading_house.house_head.joined_faction.faction_leader ?= scope:bloc.leading_house.house_head - can_join_faction = scope:bloc.leading_house.house_head.joined_faction - } - join_faction = scope:bloc.leading_house.house_head.joined_faction - } - } - # Message setup - scope:bloc = { - add_to_variable_list = { - name = joining_house_members - target = scope:joiner - days = 1 - } - } -} - -tgp_on_member_left_shared_effect = { - save_scope_as = bloc - scope:character = { - save_scope_as = leaver - if = { - limit = { is_alive = yes } - add_character_flag = { - flag = bloc_message_flag - days = 1 - } - } - # Clear flags - tgp_clear_house_bloc_flags_effect = yes - trigger_event = { - id = tgp_house_blocs.0001 - days = 1 - } - # LEAVE LEADERS FACTION - joined_faction ?= { - save_temporary_scope_as = faction_temp - if = { - limit = { - faction_leader = { - NOT = { house = scope:character.house } - } - } - scope:vassal_house_temp = { leave_faction = scope:faction_temp } - } - } - } - # Message setup - scope:bloc = { - add_to_variable_list = { - name = leaving_house_members - target = scope:leaver - days = 1 - } - } -} - -tgp_on_member_house_joined_shared_effect = { - save_scope_as = bloc - scope:house ?= { - save_scope_as = joiner - set_variable = { - name = recently_joined_bloc - years = 5 - } - } - # MESSAGES - every_player = { - limit = { house.house_confederation ?= scope:bloc } - if = { - limit = { - house = scope:bloc.leading_house - scope:bloc = { - any_confederation_member_house = { count = 2 } - } - } - send_interface_message = { - type = msg_house_bloc_created - title = msg_house_bloc_created - desc = msg_house_bloc_created_desc - left_icon = scope:bloc.leading_house.house_head - right_icon = scope:bloc.leading_house - custom_description = { - text = create_house_bloc_effect - subject = scope:bloc.leading_house.house_head - } - } - } - else = { - send_interface_message = { - type = msg_house_joined_house_bloc - title = msg_house_joined_bloc - desc = msg_house_joined_bloc_desc - left_icon = scope:joiner - right_icon = scope:bloc.leading_house - custom_description = { - text = join_house_bloc_effect - subject = scope:joiner.house_head - object = scope:bloc.leading_house.house_head - } - # MEMBER LIST TOOLTIP - #show_as_tooltip = { - # scope:bloc = { - # every_in_list = { - # variable = joining_house_members - # limit = { house = scope:joiner } - # custom = house_joined_bloc_member_custom - # custom_tooltip = house_bloc_member_tt - # } - # } - #} - } - } - } - every_in_list = { - variable = joining_house_members - limit = { house = scope:joiner } - save_temporary_scope_as = house_member_temp - remove_character_flag = bloc_message_flag - scope:bloc = { - remove_list_variable = { - name = joining_house_members - target = scope:house_member_temp - } - } - # Find Sub-Vassal houses of joining Vassal Houses - if = { - limit = { is_independent_ruler = no } - every_vassal_or_below = { - limit = { - is_house_head = yes - any_held_title = { is_noble_family_title = yes } - is_independent_ruler = no - house = { - NOR = { - this = scope:house - house_confederation ?= scope:bloc - is_in_list = joining_vassal_houses - } - } - } - house = { add_to_list = joining_vassal_houses } - } - } - } - every_in_list = { - list = joining_vassal_houses - save_temporary_scope_as = vassal_house_temp - scope:bloc = { add_confederation_member_house = scope:vassal_house_temp } - } - if = { - limit = { debug_only = yes } - debug_log = "house joined bloc" - debug_log_scopes = yes - } -} - -tgp_on_member_house_left_shared_effect = { - save_scope_as = bloc - scope:house = { - save_scope_as = leaver - if = { - limit = { has_variable = recently_joined_bloc } - remove_variable = recently_joined_bloc - } - house_head ?= { - save_scope_as = house_head - } - } - # MESSAGES - every_player = { - limit = { - OR = { - house = scope:house - confederation ?= scope:bloc - } - } - # Inform Members of Leavers - send_interface_toast = { - type = msg_house_left_house_bloc - title = msg_house_left_bloc - desc = msg_house_left_bloc_desc - left_icon = scope:leaver - right_icon = scope:bloc.leading_house - custom_tooltip = msg_house_left_bloc_desc - # MEMBER LIST TOOLTIP - #show_as_tooltip = { - # scope:bloc = { - # every_in_list = { - # variable = leaving_house_members - # limit = { house = scope:leaver } - # #custom = house_left_bloc_member_custom - # custom_tooltip = house_bloc_member_tt - # } - # } - #} - } - } - every_in_list = { - variable = leaving_house_members - limit = { house = scope:leaver } - save_temporary_scope_as = house_member_temp - if = { - limit = { is_alive = yes } - remove_character_flag = bloc_message_flag - } - scope:bloc = { - remove_list_variable = { - name = leaving_house_members - target = scope:house_member_temp - } - } - # Find sub-Vassal houses of leaving vassal Houses - if = { - limit = { - house.house_head = { is_independent_ruler = no } - } - scope:bloc = { - every_confederation_member_house = { - limit = { - house_head = { - is_independent_ruler = no - liege.house ?= scope:house - } - NOR = { - this = scope:house - is_in_list = leaving_vassal_houses - } - } - add_to_list = leaving_vassal_houses - } - } - } - } - # Find leader if necessary - if = { - limit = { NOT = { exists = leading_house } } - if = { - limit = { - any_confederation_member = { has_title = title:e_japan } - } - random_confederation_member = { - limit = { has_title = title:e_japan } - save_scope_as = new_leader_scope - } - tgp_set_house_bloc_leading_house_effect = { LEADER = scope:new_leader_scope } - } - else = { - tgp_find_new_house_bloc_leader_effect = yes - } - } - # Remove Vassal houses of leaving Houses from above - every_in_list = { - list = leaving_vassal_houses - save_temporary_scope_as = vassal_house_temp - scope:bloc = { remove_confederation_member_house = scope:vassal_house_temp } - } - # Disband if necessary - if = { - limit = { - OR = { - NOT = { exists = leading_house } - any_confederation_member_house = { count = 1 } - } - } - every_player = { - limit = { - house.house_confederation ?= scope:bloc - NOT = { house = scope:leaver } - } - send_interface_message = { - type = msg_house_bloc_disbanded - title = msg_house_bloc_disbanded - desc = msg_house_bloc_disbanded_desc - left_icon = scope:leaver.house_head - right_icon = scope:leaver - show_as_tooltip = { - scope:bloc ?= { disband_confederation = yes } - } - } - } - hidden_effect = { disband_confederation = yes } - } - if = { - limit = { debug_only = yes } - debug_log = "house left bloc" - debug_log_scopes = yes - } -} - -bloc_leader_change_aspiration_cohesion_effect = { - if = { - limit = { exists = scope:house.house_confederation } - if = { - limit = { scope:house.house_confederation.leading_house ?= scope:house } - scope:house.house_confederation = { - tgp_bloc_change_cohesion_effect = { - VALUE = bloc_leader_change_aspiration_cohesion_value - ICON = scope:house.house_head - REASON = leader_aspiration - } - } - } - else_if = { - limit = { - scope:house = { has_same_house_power_as = scope:house.house_confederation.leading_house } - } - # Message - every_player = { - limit = { house.house_confederation ?= scope:house.house_confederation } - send_interface_message = { - type = msg_house_bloc_cohesion_change_good - title = msg_bloc_member_aspiration_changed - left_icon = scope:house.house_head - right_icon = scope:house - desc = msg_bloc_member_aspiration_changed_tt - custom_tooltip = msg_bloc_member_aspiration_match_tt - } - } - } - else = { - # Message - every_player = { - limit = { house.house_confederation ?= scope:house.house_confederation } - send_interface_message = { - type = msg_house_bloc_cohesion_change_bad - title = msg_bloc_member_aspiration_changed - left_icon = scope:house.house_head - right_icon = scope:house - desc = msg_bloc_member_aspiration_changed_tt - custom_tooltip = msg_bloc_member_aspiration_diverge_tt - } - } - } - } -} - -add_attacker_bloc_members_on_declared_effect = { - scope:attacker.house.house_confederation ?= { - every_confederation_member_house = { - every_house_member = { - limit = { - top_liege = scope:attacker.top_liege - is_landed = yes - } - save_temporary_scope_as = bloc_member_temp - scope:war = { add_attacker = scope:bloc_member_temp } - } - } - } -} - -tgp_bloc_war_defeat_member_effect = { - $WINNER$ = { - save_temporary_scope_as = winner_temp - house.house_confederation = { save_temporary_scope_as = winner_bloc_temp } - } - $LOSER$ = { - save_temporary_scope_as = loser_temp - house.house_confederation = { save_temporary_scope_as = loser_bloc_temp } - } - custom_description_no_bullet = { text = tgp_bloc_war_defeat_member_description } - scope:loser_bloc_temp = { - every_confederation_member_house = { - limit = { - house_head = { - tgp_bloc_war_transfer_trigger = { BLOC_LEADER = scope:loser_temp } - } - } - custom_description_no_bullet = { - text = tgp_bloc_war_defeat_member_house_description - subject = house_head - } - hidden_effect = { - if = { # LEAVE OLD BLOC IF NECESSARY - limit = { exists = house_confederation } - set_variable = { - name = bloc_leaving_reason - value = flag:reason_war - days = 4 - } - tgp_leave_house_bloc_effect = { - OPINION = flag:no - TRUCE = flag:yes - } - tgp_join_house_bloc_effect = { - INVITER = scope:winner_temp.house - OPINION = flag:no - } - } - } - } - } -} - -tgp_bloc_change_cohesion_effect = { - save_temporary_scope_as = bloc_temp - $ICON$ = { save_scope_as = icon } - save_scope_value_as = { - name = cohesion_change - value = $VALUE$ - } - hidden_effect = { - if = { - limit = { scope:cohesion_change >= 0 } - every_player = { - limit = { house.house_confederation ?= scope:bloc_temp } - send_interface_message = { - type = msg_house_bloc_cohesion_change_good - title = msg_bloc_cohesion_increased - left_icon = scope:icon - right_icon = scope:bloc_temp.leading_house - desc = tgp_bloc_change_cohesion_$REASON$_tt - show_as_tooltip = { - scope:bloc_temp = { change_cohesion = scope:cohesion_change } - } - } - } - } - else = { - every_player = { - limit = { house.house_confederation ?= scope:bloc_temp } - send_interface_message = { - type = msg_house_bloc_cohesion_change_bad - title = msg_bloc_cohesion_decreased - left_icon = scope:icon - right_icon = scope:bloc_temp.leading_house - desc = tgp_bloc_change_cohesion_$REASON$_tt - show_as_tooltip = { - scope:bloc_temp = { change_cohesion = scope:cohesion_change } - } - } - } - } - } - change_cohesion = scope:cohesion_change -} - -tgp_bloc_set_leading_house_effect = { - $HOUSE$ = { save_scope_as = bloc_creator } - set_leading_house = scope:bloc_creator - set_coa = scope:bloc_creator - set_confederation_name = "CONFEDERATION_HOUSE_NAME" -} - -tgp_on_bloc_destroyed_shared_effect = { - save_scope_as = bloc - every_confederation_member_house = { add_to_list = members } - leading_house = { save_scope_as = leader } - every_player = { - limit = { top_liege = scope:bloc.leading_house.house_head.top_liege } - if = { - limit = { - house = { is_in_list = members } - } - send_interface_message = { - type = msg_house_bloc_destroyed - title = msg_house_bloc_disbanded - desc = msg_house_bloc_disbanded_desc - left_icon = scope:bloc.leading_house.house_head - right_icon = scope:bloc.leading_house - house = { save_temporary_scope_as = player_house_temp } - show_as_tooltip = { - scope:bloc = { - remove_confederation_member_house = scope:player_house_temp - disband_confederation = yes - } - } - } - } - else = { - send_interface_message = { - type = msg_house_bloc_disbanded - title = msg_house_bloc_disbanded - desc = msg_house_bloc_disbanded_desc - left_icon = scope:bloc.leading_house.house_head - right_icon = scope:bloc.leading_house - show_as_tooltip = { - scope:bloc = { disband_confederation = yes } - } - } - } - } - if = { - limit = { debug_only = yes } - debug_log = "bloc destroyed" - debug_log_scopes = yes - } -} - -set_cadet_aspiration_cooldown_effect = { - hidden_effect = { - save_temporary_scope_as = house_temp - scope:old_house.house_confederation.leading_house = { - switch = { - trigger = has_house_power_parameter - ceremony_cheaper_feasts = { - scope:house_temp = { set_house_aspiration = { type = ceremony } } - } - unlocks_japanese_manor_watch_house = { - scope:house_temp = { set_house_aspiration = { type = determination } } - } - unlocks_japanese_manor_shrine = { - scope:house_temp = { set_house_aspiration = { type = humility } } - } - unlocks_japanese_manor_brewery = { - scope:house_temp = { set_house_aspiration = { type = prosperity } } - } - unlocks_japanese_manor_archive = { - scope:house_temp = { set_house_aspiration = { type = service } } - } - unlocks_japanese_manor_armory = { - scope:house_temp = { set_house_aspiration = { type = strength } } - } - } - } - if = { - limit = { house_head = { is_ai = yes } } - set_variable = { - name = recently_changed_aspiration - years = 5 - } - } - } -} - -tgp_save_bloc_leaving_reason_effect = { - if = { - limit = { NOT = { has_variable = bloc_leaving_reason } } - if = { - limit = { scope:joiner.house_head ?= { is_ai = no } } - set_variable = { - name = bloc_leaving_reason - value = flag:reason_player - days = 4 - } - } - else = { - if = { - limit = { NOT = { exists = scope:inviter } } - scope:leaver = { save_scope_as = inviter } #If there is no bloc join, we compare to the inviter - } - if = { - limit = { exists = scope:joiner_temp.confederation.leading_house.house_head } - scope:joiner_temp.confederation.leading_house.house_head = { save_scope_as = prev_bloc_leader } - if = { # PRESTIGE LEVEL - limit = { - OR = { - scope:leaver.prestige_level > scope:prev_bloc_leader.prestige_level - scope:inviter.prestige_level > scope:prev_bloc_leader.prestige_level - } - } - set_variable = { - name = bloc_leaving_reason - value = flag:reason_prestige - days = 4 - } - } - else_if = { # INFLUENCE LEVEL - limit = { - OR = { - scope:leaver.influence_level > scope:prev_bloc_leader.influence_level - scope:inviter.influence_level > scope:prev_bloc_leader.influence_level - } - } - set_variable = { - name = bloc_leaving_reason - value = flag:reason_influence - days = 4 - } - } - else_if = { # MILITARY POWER - limit = { - OR = { - scope:leaver.military_power > scope:prev_bloc_leader.military_power - scope:inviter.military_power > scope:prev_bloc_leader.military_power - } - } - set_variable = { - name = bloc_leaving_reason - value = flag:reason_military_strength - days = 4 - } - } - else_if = { # INVITER OPINION - limit = { - scope:leaver != scope:inviter - scope:leaver = { - opinion = { - target = scope:inviter - value >= 40 - } - } - } - set_variable = { - name = bloc_leaving_reason - value = flag:reason_inviter_bloc_opinion - days = 4 - } - } - else_if = { # PREV LEADER OPINION - limit = { - scope:leaver = { - opinion = { - target = scope:prev_bloc_leader - value < 0 - } - } - } - set_variable = { - name = bloc_leaving_reason - value = flag:reason_current_bloc_opinion - days = 4 - } - } - else_if = { # DYNASTY - limit = { - scope:leaver != scope:inviter - scope:leaver.dynasty = scope:inviter.dynasty - } - set_variable = { - name = bloc_leaving_reason - value = flag:reason_dynasty - days = 4 - } - } - else_if = { # ASPIRATIONS - limit = { - NOT = { - scope:leaver.house = { has_same_house_power_as = scope:prev_bloc_leader.house } - } - } - set_variable = { - name = bloc_leaving_reason - value = flag:reason_aspirations - days = 4 - } - } - else_if = { # COHESION - limit = { scope:joiner_temp.house.house_confederation ?= { cohesion <= 25 } } - set_variable = { - name = bloc_leaving_reason - value = flag:reason_cohesion - days = 4 - } - } - } - } - } -} diff --git a/N3OW/common/scripted_effects/10_dlc_tgp_house_relation_scripted_effects.txt b/N3OW/common/scripted_effects/10_dlc_tgp_house_relation_scripted_effects.txt deleted file mode 100644 index ace92ec6..00000000 --- a/N3OW/common/scripted_effects/10_dlc_tgp_house_relation_scripted_effects.txt +++ /dev/null @@ -1,561 +0,0 @@ -### HOUSE RELATION SCRIPTED EFFECTS - -set_house_relation_level_effect = { - save_scope_as = house - $HOUSE$ ?= { save_scope_as = other_house } - if = { - limit = { - exists = scope:house - exists = scope:other_house - scope:house != scope:other_house - } - set_house_relation = { - target = scope:other_house - level = $LEVEL$ - description = house_relation_reason_$REASON$_desc - save_scope_as = house_relation - } - } -} - -increase_house_relation_level_effect = { - save_scope_as = house - $HOUSE$ ?= { save_scope_as = other_house } - if = { - limit = { - exists = house - exists = scope:other_house - scope:house != scope:other_house - } - if = { - limit = { has_house_relation_with = scope:other_house } - random_house_relation = { - limit = { - any_relation_house = { scope:other_house = this } - } - save_scope_as = house_relation - if = { - limit = { has_house_relation_level = feud } - scope:house = { - set_house_relation_level_effect = { - HOUSE = scope:other_house - REASON = $REASON$ - LEVEL = rivalry - } - } - } - else_if = { - limit = { has_house_relation_level = rivalry } - scope:house = { - set_house_relation_level_effect = { - HOUSE = scope:other_house - REASON = $REASON$ - LEVEL = quarrel - } - } - } - else_if = { - limit = { has_house_relation_level = quarrel } - scope:house = { - set_house_relation_level_effect = { - HOUSE = scope:other_house - REASON = $REASON$ - LEVEL = neutral - } - } - } - else_if = { - limit = { has_house_relation_level = neutral } - scope:house = { - set_house_relation_level_effect = { - HOUSE = scope:other_house - REASON = $REASON$ - LEVEL = cordial - } - } - } - else_if = { - limit = { has_house_relation_level = cordial } - scope:house = { - set_house_relation_level_effect = { - HOUSE = scope:other_house - REASON = $REASON$ - LEVEL = friendly - } - } - } - else_if = { - limit = { has_house_relation_level = friendly } - scope:house = { - set_house_relation_level_effect = { - HOUSE = scope:other_house - REASON = $REASON$ - LEVEL = amity - } - } - } - } - } - else = { - set_house_relation_level_effect = { - HOUSE = scope:other_house - REASON = $REASON$ - LEVEL = cordial - } - random_house_relation = { - limit = { any_relation_house = { this = scope:other_house } } - save_scope_as = house_relation - } - } - } -} - -decrease_house_relation_level_effect = { - save_scope_as = house - $HOUSE$ ?= { save_scope_as = other_house } - scope:house ?= { - if = { - limit = { - exists = scope:other_house - scope:other_house != this - } - if = { - limit = { has_house_relation_with = scope:other_house } - random_house_relation = { - limit = { - any_relation_house = { scope:other_house = this } - } - save_scope_as = house_relation - if = { - limit = { has_house_relation_level = amity } - scope:house = { - set_house_relation_level_effect = { - HOUSE = scope:other_house - REASON = $REASON$ - LEVEL = friendly - } - } - } - else_if = { - limit = { has_house_relation_level = friendly } - scope:house = { - set_house_relation_level_effect = { - HOUSE = scope:other_house - REASON = $REASON$ - LEVEL = cordial - } - } - } - else_if = { - limit = { has_house_relation_level = cordial } - scope:house = { - set_house_relation_level_effect = { - HOUSE = scope:other_house - REASON = $REASON$ - LEVEL = neutral - } - } - } - else_if = { - limit = { has_house_relation_level = neutral } - scope:house = { - set_house_relation_level_effect = { - HOUSE = scope:other_house - REASON = $REASON$ - LEVEL = quarrel - } - } - } - else_if = { - limit = { has_house_relation_level = quarrel } - scope:house = { - set_house_relation_level_effect = { - HOUSE = scope:other_house - REASON = $REASON$ - LEVEL = rivalry - } - } - } - else_if = { - limit = { has_house_relation_level = rivalry } - scope:house = { - set_house_relation_level_effect = { - HOUSE = scope:other_house - REASON = $REASON$ - LEVEL = feud - } - } - } - } - } - else = { - set_house_relation_level_effect = { - HOUSE = scope:other_house - REASON = $REASON$ - LEVEL = quarrel - } - random_house_relation = { - limit = { any_relation_house = { this = scope:other_house } } - save_scope_as = house_relation - } - } - } - } -} - -# Effect for incrementing towards a level change - used actual gameplay effects, e.g. war declarations -# Required parameters: HOUSE, CHAR, TARGET_CHAR, TITLE, VALUE, REASON -change_house_relation_effect = { - # SAVE USEFUL SCOPES - save_scope_as = house - $HOUSE$ ?= { save_scope_as = other_house } - $CHAR$ ?= { save_scope_as = char } - $TARGET_CHAR$ ?= { save_scope_as = target_char } - $TITLE$ ?= { save_scope_as = title } - if = { - limit = { - exists = scope:house - exists = scope:other_house - scope:house != scope:other_house - } - save_scope_value_as = { - name = steps - value = $VALUE$ - } - # IF A HOUSE RELATION ALREADY EXISTS, MODIFY IT - if = { - limit = { - scope:house = { - any_house_relation = { - any_relation_house = { scope:other_house = this } - # EASIER TO JUMP VIA TEMP SCOPE - save_temporary_scope_as = relation_temp - } - } - } - scope:relation_temp = { save_scope_as = house_relation } - if = { - limit = { - house_relation_is_valid_to_keep_trigger = { - HOUSE = scope:house - OTHER_HOUSE = scope:other_house - } - } - scope:relation_temp = { - if = { - limit = { - scope:steps < 0 - NOT = { has_house_relation_level = feud } # already at min - } - change_house_relation_level = { - steps = scope:steps - description = house_relation_reason_$REASON$_desc - } - } - else_if = { - limit = { - NOT = { has_house_relation_level = amity } # already at max - } - change_house_relation_level = { - steps = scope:steps - description = house_relation_reason_$REASON$_desc - } - } - } - # INFORM PLAYERS OF CHANGE - every_player = { - limit = { - OR = { - house ?= scope:house - house ?= scope:other_house - } - } - house = { save_temporary_scope_as = house_temp } - scope:house_relation = { - random_relation_house = { - limit = { NOT = { this = scope:house_temp } } - save_temporary_scope_as = other_house_temp - } - } - } - } - else = { - scope:relation_temp = { save_scope_as = house_relation } - # INFORM PLAYERS OF CHANGE - every_player = { - limit = { - OR = { - house ?= scope:house - house ?= scope:other_house - } - } - house = { save_temporary_scope_as = house_temp } - scope:house_relation = { - random_relation_house = { - limit = { NOT = { this = scope:house_temp } } - save_temporary_scope_as = other_house_temp - } - } - send_interface_toast = { - type = msg_house_relation_cleared - title = house_relation_cleared_message_title - desc = house_relation_cleared_message_desc - left_icon = scope:house_temp - right_icon = scope:other_house_temp - } - } - scope:house_relation = { clear_house_relation = yes } - } - } - # OTHERWISE, SET STARTING - else_if = { - limit = { - house_relation_is_valid_to_start_trigger = { - HOUSE = scope:house - OTHER_HOUSE = scope:other_house - } - } - scope:house = { - if = { - limit = { scope:steps < 0 } - set_house_relation_level_effect = { - HOUSE = scope:other_house - REASON = $REASON$ - LEVEL = quarrel - } - } - else = { - set_house_relation_level_effect = { - HOUSE = scope:other_house - REASON = $REASON$ - LEVEL = cordial - } - } - } - } - } -} - -change_house_relation_feud_score_effect = { - save_scope_as = house - $TARGET$ ?= { save_scope_as = other_house } - random_house_relation = { - limit = { - has_bp1_dlc_trigger = yes - has_house_relation_level = feud - any_relation_house = { scope:other_house ?= this } - } - save_scope_as = relation - if = { - limit = { - exists = var:house_feud_house_1 - exists = var:house_feud_house_2 - exists = var:house_feud_house_1_score - exists = var:house_feud_house_2_score - } - if = { - limit = { var:house_feud_house_1 = scope:house } - change_variable = { name = house_feud_house_1_score add = $VALUE$ } - } - else = { - change_variable = { name = house_feud_house_2_score add = $VALUE$ } - } - } - else = { - set_variable = { name = house_feud_house_1 value = scope:house } - set_variable = { name = house_feud_house_2 value = scope:other_house } - set_variable = { name = house_feud_house_1_score value = $VALUE$ } - set_variable = { name = house_feud_house_2_score value = 0 } - } - hidden_effect = { - scope:house ?= { - every_house_member = { - limit = { is_ai = no } - send_interface_message = { - type = house_feud_$REASON$_good_message - left_icon = scope:house.house_head - right_icon = scope:other_house.house_head - if = { - limit = { $VALUE$ >= house_feud_major_counter_value } - custom_tooltip = house_feud_tipped_scales_pos_big - } - else_if = { - limit = { $VALUE$ >= house_feud_medium_counter_value } - custom_tooltip = house_feud_tipped_scales_pos_medium - } - else = { custom_tooltip = house_feud_tipped_scales_pos_small } - } - } - } - scope:other_house ?= { - every_house_member = { - limit = { is_ai = no } - send_interface_message = { - type = house_feud_$REASON$_bad_message - left_icon = scope:house.house_head - right_icon = scope:other_house.house_head - if = { - limit = { $VALUE$ >= house_feud_major_counter_value } - custom_tooltip = house_feud_tipped_scales_neg_big - } - else_if = { - limit = { $VALUE$ >= house_feud_medium_counter_value } - custom_tooltip = house_feud_tipped_scales_neg_medium - } - else = { custom_tooltip = house_feud_tipped_scales_neg_small } - } - } - } - } - } -} - -# Save targeting Feud scope for reference -save_ongoing_house_relation_effect = { - house ?= { - random_house_relation = { - limit = { - any_relation_house = { $TARGET$.house ?= this } - } - save_scope_as = relation - } - } -} - -# Promoting someone not of the same noble family as the current heir (with active investment) -promote_appointment_house_relation_effect = { - $TITLE$ ?= { save_temporary_scope_as = title_temp } - $CANDIDATE$ ?= { save_temporary_scope_as = candidate_temp } - $INVESTOR$ ?= { save_temporary_scope_as = investor_temp } - if = { # DAMAGE WITH CURRENT HEIR - limit = { - scope:investor_temp.house.house_head = { - # Investor belongs to a noble family - any_held_title = { is_noble_family_title = yes } - } - scope:title_temp = { - current_heir ?= { - # Heir has been invested in - has_succession_appointment_investors = $TITLE$ - # Candidate is not the heir - NOT = { scope:candidate_temp ?= this } - house ?= { - NOR = { # HEIR IS NOT FROM CANDIDATE OR INVESTOR HOUSES - scope:candidate_temp.house ?= this - scope:investor_temp.house ?= this - } - house_head ?= { - # HEIR HOUSE HEAD IN SAME REALM AS INVESTOR - scope:investor_temp.top_liege ?= top_liege - # HEIR HOUSE IS A NOBLE FAMILY - any_held_title = { is_noble_family_title = yes } - # SAME REALM AS HEIR - top_liege = scope:title_temp.current_heir.top_liege - # SAME REALM AS INVESTOR - top_liege = scope:investor_temp.top_liege - } - } - } - # CANDIDATE IS ACTUALLY MUSCLING IN - place_in_line_of_succession = { - target = scope:candidate_temp - value <= 5 - } - } - } - scope:investor_temp.house = { - change_house_relation_effect = { - HOUSE = scope:title_temp.current_heir.house - VALUE = house_relation_damage_minor_value - REASON = appointment_competition - CHAR = scope:investor_temp - TARGET_CHAR = scope:title_temp.current_heir - TITLE = scope:title_temp - } - } - } - if = { # IMPROVE WITH CANDIDATE - limit = { - scope:investor_temp.house ?= { - # Investor is of a different house than the candidate - NOT = { scope:candidate_temp.house ?= this } - house_head ?= { - # Investor in same realm as candidate - top_liege = scope:candidate_temp.house.house_head.top_liege - # Investor belongs to a noble family - any_held_title = { is_noble_family_title = yes } - } - } - scope:candidate_temp ?= { - # Candidate in same realm as their house head - top_liege = scope:candidate_temp.house.house_head.top_liege - # Candidate belongs to a noble family - house.house_head ?= { - any_held_title = { is_noble_family_title = yes } - # SAME REALM - top_liege = scope:investor_temp.top_liege - } - # Candidate has been invested in - has_succession_appointment_investors = scope:title_temp - } - scope:title_temp = { - # Not promoting another member of the house that is already winning the succession - NOT = { current_heir.house ?= scope:candidate_temp.house } - # Candidate has a good chance - place_in_line_of_succession = { - target = scope:candidate_temp - value <= 3 - } - } - } - scope:investor_temp.house = { - change_house_relation_effect = { - HOUSE = scope:candidate_temp.house - VALUE = house_relation_improve_minor_value - REASON = appointment_support - CHAR = scope:investor_temp - TARGET_CHAR = scope:candidate_temp - TITLE = scope:title_temp - } - } - } -} - -# Damaging an invested candidate of another noble family -damage_appointment_house_relation_effect = { - $TITLE$ ?= { save_temporary_scope_as = title_temp } - $CANDIDATE$ ?= { save_temporary_scope_as = candidate_temp } - $INVESTOR$ ?= { save_temporary_scope_as = investor_temp } - if = { - limit = { - scope:candidate_temp ?= { - NOT = { this = scope:investor_temp } - house ?= { - house_head ?= { - top_liege = scope:investor_temp.top_liege - any_held_title = { is_noble_family_title = yes } - } - NOT = { scope:investor_temp.house ?= this } - } - has_succession_appointment_investors = scope:title_temp - } - # CANDIDATE IS ACTUALLY MUSCLING IN - scope:title_temp = { - place_in_line_of_succession = { - target = scope:candidate_temp - value <= 5 - } - } - } - scope:investor_temp.house = { - change_house_relation_effect = { - HOUSE = scope:candidate_temp.house - VALUE = house_relation_damage_minor_value - REASON = appointment_competition - CHAR = scope:investor_temp - TARGET_CHAR = scope:candidate_temp - TITLE = scope:title_temp - } - } - } -} diff --git a/N3OW/common/scripted_effects/10_dlc_tgp_japan_scripted_effects.txt b/N3OW/common/scripted_effects/10_dlc_tgp_japan_scripted_effects.txt deleted file mode 100644 index 6bdb58d6..00000000 --- a/N3OW/common/scripted_effects/10_dlc_tgp_japan_scripted_effects.txt +++ /dev/null @@ -1,3845 +0,0 @@ -japan_establish_house_fief_effect = { - save_scope_as = house_fiefer - save_scope_as = new_head - # Dynasty - if = { - limit = { tgp_japan_cadet_creates_dynasty_trigger = yes } - if = { - limit = { exists = var:new_japanese_house_name } - create_dynasty = { - name = { - first_valid = { - triggered_desc = { - trigger = { scope:new_head.var:new_japanese_house_name ?= flag:japanese_house_random_barony } - desc = japanese_house_random_barony - } - triggered_desc = { - trigger = { scope:new_head.var:new_japanese_house_name ?= flag:japanese_house_primary_county } - desc = japanese_house_primary_county - } - triggered_desc = { - trigger = { scope:new_head.var:new_japanese_house_name ?= flag:japanese_house_domicile_barony } - desc = japanese_house_domicile_barony - } - triggered_desc = { - trigger = { scope:new_head.var:new_japanese_house_name ?= flag:japanese_house_domicile_county } - desc = japanese_house_domicile_county - } - triggered_desc = { - trigger = { scope:new_head.var:new_japanese_house_name ?= flag:japanese_house_first_name } - desc = japanese_house_first_name - } - triggered_desc = { - trigger = { scope:new_head.var:new_japanese_house_name ?= flag:custom } - desc = japanese_house_name_custom - } - desc = japanese_house_name_flag - } - } - save_scope_as = new_dynasty - } - } - else = { - create_dynasty = { save_scope_as = new_dynasty } - } - house = { - set_house_name = japanese_dynasty_name - save_scope_as = new_house - } - } - # House - else_if = { - limit = { is_house_head = no } - if = { - limit = { exists = var:new_japanese_house_name } - found_cadet_house_decision_effect = { - CHARACTER = root - PRESTIGE = 0 - } - house = { save_scope_as = new_house } - } - else = { - create_cadet_branch = { save_scope_as = new_house } - } - } - # Government - change_government = japan_feudal_government - # Old Dynasty - if = { - limit = { exists = scope:new_house } - # Rename old NF title - if = { - limit = { - scope:old_head ?= this - exists = scope:old_nf_title - } - #scope:old_nf_title = { set_title_name_dynamic = japanese_noble_family_name } - } - else = { - create_noble_family_effect = { GOVERNMENT_GIVER = this } - scope:new_title = { - #set_title_name_dynamic = japanese_noble_family_name - set_coa = scope:new_house - } - } - # Upset old Clan Head - scope:old_head ?= { - if = { - limit = { is_ai = yes } - add_opinion = { - modifier = established_house_fief_old_clan_head_opinion - target = root - } - } - trigger_event = tgp_japan_decision.9005 - } - } - # Crime to Regent - top_liege ?= { - if = { - limit = { - scope:new_head = { - is_landed = yes - NOR = { - var:petition_liege_house_fief_allowed_flag ?= scope:new_head.top_liege - top_liege = { - government_has_flag = government_is_japan_feudal - } - } - } - } - show_as_tooltip = { - add_opinion = { - modifier = established_house_fief_regent_crime - target = scope:new_head - } - } - hidden_effect = { - send_interface_message = { - type = event_toast_effect_bad - title = tgp_japan_establish_house_fief_kampaku_toast - left_icon = scope:new_head - right_icon = scope:new_head.primary_title - show_as_tooltip = { - scope:new_head = { change_government = japan_feudal_government } - } - add_opinion = { - modifier = established_house_fief_regent_crime - target = scope:new_head - } - } - } - } - } - create_character_memory = { type = establish_house_fief_memory } - ordered_memory = { - memory_type = establish_house_fief_memory - order_by = memory_creation_date - set_variable = { - name = title - value = root.primary_title - } - } - add_achievement_flag_effect = { FLAG = achievement_a_house_of_my_own_flag } -} - -set_house_of_all_descendants_effect = { - if = { - limit = { any_child = { count >= 1 } } - every_child = { # Children - limit = { house ?= $OLD_HOUSE$ } - set_house = $NEW_HOUSE$ - every_child = { # Grandchildren - limit = { house ?= $OLD_HOUSE$ } - set_house = $NEW_HOUSE$ - every_child = { # Great-grandchildren - limit = { house ?= $OLD_HOUSE$ } - set_house = $NEW_HOUSE$ - every_child = { # Great-grandchildren - limit = { house ?= $OLD_HOUSE$ } - set_house = $NEW_HOUSE$ - } - } - } - } - } -} - -japan_set_house_effect = { - house = { save_scope_as = old_house } - $NEW_HOUSE$ = { save_scope_as = new_house } - set_house = scope:new_house - custom_tooltip = { - text = tgp_japan_establish_house_fief_direct_descendents_effect - if = { - limit = { exists = $NEW_HOUSE$ } - set_house_of_all_descendants_effect = { - OLD_HOUSE = scope:old_house - NEW_HOUSE = scope:new_house - } - } - } -} - -japan_dynasty_tracker_setup_effect = { - # FUJIWARA - dynasty:japanese_fujiwara ?= { add_to_list = fujiwara_list } - dynasty:japanese_fujiwara_oshu ?= { add_to_list = fujiwara_list } - every_in_list = { - list = fujiwara_list - set_variable = { name = fujiwara_flag } - } - # MINAMOTO - dynasty:japanese_minamoto_daigo ?= { add_to_list = minamoto_list } - dynasty:japanese_minamoto_kazan ?= { add_to_list = minamoto_list } - dynasty:japanese_minamoto_koko ?= { add_to_list = minamoto_list } - dynasty:japanese_minamoto_gosanjo ?= { add_to_list = minamoto_list } - dynasty:japanese_minamoto_montoku ?= { add_to_list = minamoto_list } - dynasty:japanese_minamoto_murakami ?= { add_to_list = minamoto_list } - dynasty:japanese_minamoto_ninmyo ?= { add_to_list = minamoto_list } - dynasty:japanese_minamoto_saga ?= { add_to_list = minamoto_list } - dynasty:japanese_minamoto_sanjo ?= { add_to_list = minamoto_list } - dynasty:japanese_minamoto_seiwa ?= { add_to_list = minamoto_list } - dynasty:japanese_minamoto_uda ?= { add_to_list = minamoto_list } - dynasty:japanese_minamoto_yozei ?= { add_to_list = minamoto_list } - every_in_list = { - list = minamoto_list - set_variable = { name = minamoto_flag } - #dynasty_founder.house ?= { set_house_name = "dynn_Minamoto" } # For easier parsing of house names - } - # TAIRA - dynasty:japanese_taira_kanmu ?= { add_to_list = taira_list } - dynasty:japanese_taira_koko ?= { add_to_list = taira_list } - dynasty:japanese_taira_montoku ?= { add_to_list = taira_list } - dynasty:japanese_taira_ninmyo ?= { add_to_list = taira_list } - every_in_list = { - list = taira_list - set_variable = { name = taira_flag } - #dynasty_founder.house ?= { set_house_name = "dynn_Taira" } # For easier parsing of house names - } -} - -fill_external_japanese_manor_building_effect = { - switch = { - trigger = has_domicile_building_or_higher - japanese_manor_main_05 = { - while = { - limit = { free_external_domicile_building_slots >= 1 } - add_random_external_estate_building = yes - } - } - japanese_manor_main_04 = { - while = { - limit = { free_external_domicile_building_slots >= 2 } - add_random_external_japanese_manor_building = yes - } - } - japanese_manor_main_03 = { - while = { - limit = { free_external_domicile_building_slots >= 3 } - add_random_external_japanese_manor_building = yes - } - } - japanese_manor_main_02 = { - while = { - limit = { free_external_domicile_building_slots >= 4 } - add_random_external_japanese_manor_building = yes - } - } - japanese_manor_main_01 = { - while = { - limit = { free_external_domicile_building_slots >= 5 } - add_random_external_japanese_manor_building = yes - } - } - } -} - -add_random_external_japanese_manor_building = { - if = { - limit = { free_external_domicile_building_slots >= 1 } - random_list = { - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = japanese_fields_01 } - } - add_domicile_building = japanese_fields_01 - if = { - limit = { - has_domicile_building_or_higher = japanese_fields_01 - has_domicile_building_or_higher = japanese_manor_main_03 - } - add_domicile_building = japanese_fields_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = japanese_shrine_01 } - owner.house = { has_house_power_parameter = unlocks_japanese_manor_shrine } - } - add_domicile_building = japanese_shrine_01 - if = { - limit = { - has_domicile_building_or_higher = japanese_shrine_01 - has_domicile_building_or_higher = japanese_manor_main_03 - } - add_domicile_building = japanese_shrine_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = japanese_brewery_01 } - owner.house = { has_house_power_parameter = unlocks_japanese_manor_brewery } - } - add_domicile_building = japanese_brewery_01 - if = { - limit = { - has_domicile_building_or_higher = japanese_brewery_01 - has_domicile_building_or_higher = japanese_manor_main_03 - } - add_domicile_building = japanese_brewery_02 - } - } - 10 = { - trigger = { - owner = { government_has_flag = government_is_administrative } - NOT = { has_domicile_building_or_higher = japanese_archive_01 } - owner.house = { has_house_power_parameter = unlocks_japanese_manor_archive } - } - add_domicile_building = japanese_archive_01 - if = { - limit = { - has_domicile_building_or_higher = japanese_archive_01 - has_domicile_building_or_higher = japanese_manor_main_03 - } - add_domicile_building = japanese_archive_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = japanese_armory_01 } - owner.house = { has_house_power_parameter = unlocks_japanese_manor_armory } - } - add_domicile_building = japanese_armory_01 - if = { - limit = { - has_domicile_building_or_higher = japanese_armory_01 - has_domicile_building_or_higher = japanese_manor_main_03 - } - add_domicile_building = japanese_armory_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = japanese_watch_house_01 } - owner.house = { has_house_power_parameter = unlocks_japanese_manor_watch_house } - } - add_domicile_building = japanese_watch_house_01 - if = { - limit = { - has_domicile_building_or_higher = japanese_watch_house_01 - has_domicile_building_or_higher = japanese_manor_main_03 - } - add_domicile_building = japanese_watch_house_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = japanese_horse_pastures_01 } - } - add_domicile_building = japanese_horse_pastures_01 - if = { - limit = { - has_domicile_building_or_higher = japanese_horse_pastures_01 - has_domicile_building_or_higher = japanese_manor_main_03 - } - add_domicile_building = japanese_horse_pastures_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = japanese_tea_plantation_01 } - } - add_domicile_building = japanese_tea_plantation_01 - if = { - limit = { - has_domicile_building_or_higher = japanese_tea_plantation_01 - has_domicile_building_or_higher = japanese_manor_main_03 - } - add_domicile_building = japanese_tea_plantation_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = japanese_stables_01 } - } - add_domicile_building = japanese_stables_01 - if = { - limit = { - has_domicile_building_or_higher = japanese_stables_01 - has_domicile_building_or_higher = japanese_manor_main_03 - } - add_domicile_building = japanese_stables_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = japanese_workshop_01 } - } - add_domicile_building = japanese_workshop_01 - if = { - limit = { - has_domicile_building_or_higher = japanese_workshop_01 - has_domicile_building_or_higher = japanese_manor_main_03 - } - add_domicile_building = japanese_workshop_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = japanese_tea_house_01 } - owner.house = { has_house_power_parameter = unlocks_japanese_manor_tea_house } - } - add_domicile_building = japanese_tea_house_01 - if = { - limit = { - has_domicile_building_or_higher = japanese_tea_house_01 - has_domicile_building_or_higher = japanese_manor_main_03 - } - add_domicile_building = japanese_tea_house_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = japanese_garden_01 } - } - add_domicile_building = japanese_garden_01 - if = { - limit = { - has_domicile_building_or_higher = japanese_garden_01 - has_domicile_building_or_higher = japanese_manor_main_03 - } - add_domicile_building = japanese_garden_02 - } - } - } - } -} - -add_random_internal_japanese_manor_building = { - random_list = { - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = japanese_main_tax_collectors_01 } - } - add_domicile_building = japanese_main_tax_collectors_01 - if = { - limit = { has_domicile_building = japanese_manor_main_03 } - add_domicile_building = japanese_main_tax_collectors_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = japanese_main_carpenter_01 } - } - add_domicile_building = japanese_main_carpenter_01 - if = { - limit = { has_domicile_building = japanese_manor_main_03 } - add_domicile_building = japanese_main_carpenter_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = sarugaku_stage_01 } - } - add_domicile_building = sarugaku_stage_01 - if = { - limit = { has_domicile_building = japanese_manor_main_03 } - add_domicile_building = sarugaku_stage_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = japanese_manor_office_01 } - } - add_domicile_building = japanese_manor_office_01 - if = { - limit = { has_domicile_building = japanese_manor_main_03 } - add_domicile_building = japanese_manor_office_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = japanese_manor_servants_quarters_01 } - } - add_domicile_building = japanese_manor_servants_quarters_01 - if = { - limit = { has_domicile_building = japanese_manor_main_03 } - add_domicile_building = japanese_manor_servants_quarters_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = japanese_manor_library_confucian_01 } - } - add_domicile_building = japanese_manor_library_confucian_01 - if = { - limit = { has_domicile_building = japanese_manor_main_03 } - add_domicile_building = japanese_manor_library_confucian_02 - } - } - } -} - -japan_clear_flavour_flags_effect = { - remove_global_variable = shogunate_established - remove_global_variable = tenno_restored - remove_character_flag = shogun_flag - remove_character_flag = ceremonial_liege_flag - remove_character_flag = joko_flag -} - -japanese_become_shogun_reward_effect = { - # Setup - japan_clear_flavour_flags_effect = yes - set_global_variable = { - name = shogunate_established - value = yes - } - add_character_flag = shogun_flag - - # Rewards - if = { - limit = { has_dlc_feature = legends } - create_legend_seed = { - type = legitimizing - quality = illustrious - chronicle = great_deed_dynasty - properties = { - dynasty = root.dynasty - founder = root - title = primary_title - } - } - } - add_dread = massive_dread_gain - add_legitimacy = monumental_legitimacy_gain - dynasty = { add_dynasty_prestige = monumental_dynasty_prestige_gain } - culture = { - if = { - limit = { has_cultural_tradition = tradition_tgp_imperial_peace } - custom_tooltip = { - text = tradition_tgp_bushido_tt - remove_culture_tradition = tradition_tgp_imperial_peace - add_culture_tradition = tradition_tgp_bushido - } - } - else = { custom_tooltip = unlocks_bushido_tradition_tooltip } - } - every_vassal = { - custom = every_japan_admin_vassal_custom_bullet - limit = { - government_has_flag = government_is_japan_administrative - } - show_as_tooltip = { change_government = japan_feudal_government } - } -} - -restore_ceremonial_liege_faction_reward_effect = { - top_liege = { save_temporary_scope_as = regent_temp } - top_liege.primary_title = { - save_temporary_scope_as = realm_temp - var:administrative_ui_special_title.holder = { save_temporary_scope_as = ceremonial_liege_temp } - } - # GLOBAL VAR - if = { - limit = { top_liege.primary_title = title:e_japan } - japan_clear_flavour_flags_effect = yes - set_global_variable = { - name = tenno_restored - value = yes - } - } - # TRANSFER TITLES - scope:regent_temp = { - every_held_title = { - title_tier > barony - limit = { - is_landless_type_title = no - } - add_to_list = target_titles - } - } - scope:ceremonial_liege_temp = { - if = { - limit = { has_legitimacy = yes } - add_legitimacy = major_legitimacy_gain - } - add_realm_law_skip_effects = single_heir_succession_law - } -} - -restore_ceremonial_liege_faction_reward_and_titles_effect = { - restore_ceremonial_liege_faction_reward_effect = yes - create_title_and_vassal_change = { - type = appointment - save_scope_as = title_change - add_claim_on_loss = no - } - show_as_tooltip = { - scope:realm_temp = { # Give top liege title to the Emperor - change_title_holder_include_vassals = { - holder = scope:ceremonial_liege_temp - change = scope:title_change - } - } - } - hidden_effect = { - scope:realm_temp.holder ?= { - every_held_title = { - limit = { - is_landless_type_title = no - is_noble_family_title = no - } - change_title_holder_include_vassals = { - holder = scope:ceremonial_liege_temp - change = scope:title_change - } - } - } - } - resolve_title_and_vassal_change = scope:title_change -} - -assign_japanese_house_name_options_effect = { - random_list = { - ### AKI - ### AKITA (NUSHIRO) - 1 = { # OKAWA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_O_kawa TITLE = title:c_nushiro } } - japanese_new_house_name_modifiers = { TITLE = title:c_nushiro } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_O_kawa } - } - 1 = { # YURI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Yuri TITLE = title:c_nushiro } } - japanese_new_house_name_modifiers = { TITLE = title:c_nushiro } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Yuri } - } - ### AWA - 1 = { # MIYOSHI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Miyoshi TITLE = title:c_awa } } - japanese_new_house_name_modifiers = { TITLE = title:c_awa } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Miyoshi } - } - 1 = { # TAGUCHI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Taguchi TITLE = title:c_awa } } - japanese_new_house_name_modifiers = { TITLE = title:c_awa } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Taguchi } - } - ### BINGO - 1 = { # OTA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_O_ta TITLE = title:c_bingo } } - japanese_new_house_name_modifiers = { TITLE = title:c_bingo } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_O_ta } - } - ### BITCHU - 1 = { # SENOO - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Seno_o TITLE = title:c_bitchu } } - japanese_new_house_name_modifiers = { TITLE = title:c_bitchu } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Seno_o } - } - ### BIZEN - 1 = { # NAMBA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Namba TITLE = title:c_bizen } } - japanese_new_house_name_modifiers = { TITLE = title:c_bizen } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Namba } - } - ### BUNGO - 1 = { # ANAMI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Anami TITLE = title:c_bungo } } - japanese_new_house_name_modifiers = { TITLE = title:c_bungo } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Anami } - } - 1 = { # HONDA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Honda TITLE = title:c_bungo } } - japanese_new_house_name_modifiers = { TITLE = title:c_bungo } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Honda } - } - 1 = { # MITAI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Mitai TITLE = title:c_bungo } } - japanese_new_house_name_modifiers = { TITLE = title:c_bungo } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Mitai } - } - 1 = { # OGATA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Ogata TITLE = title:c_bungo } } - japanese_new_house_name_modifiers = { TITLE = title:c_bungo } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Ogata } - } - 1 = { # ONO - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_O_no TITLE = title:c_bungo } } - japanese_new_house_name_modifiers = { TITLE = title:c_bungo } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_O_no } - } - 1 = { # SHIGA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Shiga TITLE = title:c_bungo } } - japanese_new_house_name_modifiers = { TITLE = title:c_bungo } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Shiga } - } - 1 = { # WASADA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Wasada TITLE = title:c_bungo } } - japanese_new_house_name_modifiers = { TITLE = title:c_bungo } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Wasada } - } - 1 = { # USUKI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Usuki TITLE = title:c_bungo } } - japanese_new_house_name_modifiers = { TITLE = title:c_bungo } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Usuki } - } - ### BUZEN - 1 = { # YAMAGA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Yamaga TITLE = title:c_buzen } } - japanese_new_house_name_modifiers = { TITLE = title:c_buzen } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Yamaga } - } - ### CHIKUGO - 1 = { # KAMACHI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Kamachi TITLE = title:c_chikugo } } - japanese_new_house_name_modifiers = { TITLE = title:c_chikugo } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Kamachi } - } - ### CHIKUZEN - 1 = { # AKIZUKI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Akizuki TITLE = title:c_chikugo } } - japanese_new_house_name_modifiers = { TITLE = title:c_chikugo } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Akizuki } - } - 1 = { # HARADA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Harada TITLE = title:c_chikugo } } - japanese_new_house_name_modifiers = { TITLE = title:c_chikugo } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Harada } - } - ### DEWA (TOKISARA) - 1 = { # SAGAE - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Sagae TITLE = title:c_tokisara } } - japanese_new_house_name_modifiers = { TITLE = title:c_tokisara } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Sagae } - } - ### ECHIGO - 1 = { # HANJO - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Kanazu TITLE = title:c_echigo } } - japanese_new_house_name_modifiers = { TITLE = title:c_echigo } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Kanazu } - } - 1 = { # IROBE - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Irobe TITLE = title:c_echigo } } - japanese_new_house_name_modifiers = { TITLE = title:c_echigo } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Irobe } - } - 1 = { # KAJI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Kaji TITLE = title:c_echigo } } - japanese_new_house_name_modifiers = { TITLE = title:c_echigo } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Kaji } - } - 1 = { # KANAZU - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Kanazu TITLE = title:c_echigo } } - japanese_new_house_name_modifiers = { TITLE = title:c_echigo } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Kanazu } - } - 1 = { # NAKAJO - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_NakajO_ TITLE = title:c_echigo } } - japanese_new_house_name_modifiers = { TITLE = title:c_echigo } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_NakajO_ } - } - 1 = { # OGUNI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Oguni TITLE = title:c_echigo } } - japanese_new_house_name_modifiers = { TITLE = title:c_echigo } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Oguni } - } - 1 = { # SADO - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Sado TITLE = title:c_echigo } } - japanese_new_house_name_modifiers = { TITLE = title:c_echigo } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Sado } - } - 1 = { # YASUDA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Yasuda TITLE = title:c_echigo } } - japanese_new_house_name_modifiers = { TITLE = title:c_echigo } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Yasuda } - } - ### ECHIZEN - 1 = { # AKATSUKA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Akatsuka TITLE = title:c_echizen } } - japanese_new_house_name_modifiers = { TITLE = title:c_echizen } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Akatsuka } - } - 1 = { # ICHIJI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Ichiji TITLE = title:c_echizen } } - japanese_new_house_name_modifiers = { TITLE = title:c_echizen } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Ichiji } - } - 1 = { # MIKATA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Mikata TITLE = title:c_echizen } } - japanese_new_house_name_modifiers = { TITLE = title:c_echizen } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Mikata } - } - 1 = { # ODA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Oda TITLE = title:c_echizen } } - japanese_new_house_name_modifiers = { TITLE = title:c_echizen } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Oda } - } - 1 = { # NANJO - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_NanjO_ TITLE = title:c_echizen } } - japanese_new_house_name_modifiers = { TITLE = title:c_echizen } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_NanjO_ } - } - 1 = { # TSUTSUMI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Tsutsumi TITLE = title:c_echizen } } - japanese_new_house_name_modifiers = { TITLE = title:c_echizen } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Tsutsumi } - } - ### ETCHU - ### HARIMA - 1 = { # AKAMATSU - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Akamatsu TITLE = title:c_harima } } - japanese_new_house_name_modifiers = { TITLE = title:c_harima } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Akamatsu } - } - 1 = { # BESSHO - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Bessho TITLE = title:c_harima } } - japanese_new_house_name_modifiers = { TITLE = title:c_harima } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Bessho } - } - 1 = { # URAKAMI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Urakami TITLE = title:c_harima } } - japanese_new_house_name_modifiers = { TITLE = title:c_harima } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Urakami } - } - ### HIDA - 1 = { # USHIMARU - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Ushimaru TITLE = title:c_hida } } - japanese_new_house_name_modifiers = { TITLE = title:c_hida } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Ushimaru } - } - ### HIGO - 1 = { # ASO - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Aso TITLE = title:c_higo } } - japanese_new_house_name_modifiers = { TITLE = title:c_higo } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Aso } - } - 1 = { # KIKUCHI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Kikuchi TITLE = title:c_higo } } - japanese_new_house_name_modifiers = { TITLE = title:c_higo } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Kikuchi } - } - 1 = { # KUMABE - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Kumabe TITLE = title:c_higo } } - japanese_new_house_name_modifiers = { TITLE = title:c_higo } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Kumabe } - } - 1 = { # TAKEZAKI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Takezaki TITLE = title:c_higo } } - japanese_new_house_name_modifiers = { TITLE = title:c_higo } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Takezaki } - } - ### HITACHI - 1 = { # AKASU - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Akasu TITLE = title:c_hitachi } } - japanese_new_house_name_modifiers = { TITLE = title:c_hitachi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Akasu } - } - 1 = { # ASABA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Asaba TITLE = title:c_hitachi } } - japanese_new_house_name_modifiers = { TITLE = title:c_hitachi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Asaba } - } - 1 = { # HATTA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Hatta TITLE = title:c_hitachi } } - japanese_new_house_name_modifiers = { TITLE = title:c_hitachi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Hatta } - } - 1 = { # ISA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Isa TITLE = title:c_hitachi } } - japanese_new_house_name_modifiers = { TITLE = title:c_hitachi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Isa } - } - 1 = { # KATAOKA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Kataoka TITLE = title:c_hitachi } } - japanese_new_house_name_modifiers = { TITLE = title:c_hitachi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Kataoka } - } - 1 = { # MIMURA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Mimura TITLE = title:c_hitachi } } - japanese_new_house_name_modifiers = { TITLE = title:c_hitachi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Mimura } - } - 1 = { # NAMEKATA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Namekata TITLE = title:c_hitachi } } - japanese_new_house_name_modifiers = { TITLE = title:c_hitachi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Namekata } - } - 1 = { # NEMOTO - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Nemoto TITLE = title:c_hitachi } } - japanese_new_house_name_modifiers = { TITLE = title:c_hitachi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Nemoto } - } - 1 = { # NISSAI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Nissai TITLE = title:c_hitachi } } - japanese_new_house_name_modifiers = { TITLE = title:c_hitachi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Nissai } - } - 1 = { # ONOZAKI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Onozaki TITLE = title:c_hitachi } } - japanese_new_house_name_modifiers = { TITLE = title:c_hitachi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Onozaki } - } - 1 = { # SATAKE - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Satake TITLE = title:c_hitachi } } - japanese_new_house_name_modifiers = { TITLE = title:c_hitachi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Satake } - } - 1 = { # SHIDA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Shida TITLE = title:c_hitachi } } - japanese_new_house_name_modifiers = { TITLE = title:c_hitachi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Shida } - } - 1 = { # TAKEDA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Takeda TITLE = title:c_hitachi } } - japanese_new_house_name_modifiers = { TITLE = title:c_hitachi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Takeda } - } - 1 = { # TOMURA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Tomura TITLE = title:c_hitachi } } - japanese_new_house_name_modifiers = { TITLE = title:c_hitachi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Tomura } - } - ### HIZEN - 1 = { # MATSURA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Matsura TITLE = title:c_hizen } } - japanese_new_house_name_modifiers = { TITLE = title:c_hizen } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Matsura } - } - 1 = { # YASUTOMI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Yasutomi TITLE = title:c_hizen } } - japanese_new_house_name_modifiers = { TITLE = title:c_hizen } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Yasutomi } - } - ### HOKI - ### HYUGA - ### INABA - 1 = { # HIKIDA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Hikida TITLE = title:c_inaba } } - japanese_new_house_name_modifiers = { TITLE = title:c_inaba } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Hikida } - } - 1 = { # SAJI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Saji TITLE = title:c_inaba } } - japanese_new_house_name_modifiers = { TITLE = title:c_inaba } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Saji } - } - ### ISAWA - 1 = { # SHIBA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Shiba TITLE = title:c_isawa } } - japanese_new_house_name_modifiers = { TITLE = title:c_isawa } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Shiba } - } - ### ISE - 1 = { # HATTORI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Hattori TITLE = title:c_yamato } } - japanese_new_house_name_modifiers = { TITLE = title:c_yamato } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Hattori } - } - 1 = { # IGA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Iga TITLE = title:c_ise } } - japanese_new_house_name_modifiers = { TITLE = title:c_ise } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Iga } - } - 1 = { # ITO - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_ItO_ TITLE = title:c_izu } } - japanese_new_house_name_modifiers = { TITLE = title:c_izu } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_ItO_ } - } - 1 = { # KANBE - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Kanbe TITLE = title:c_ise } } - japanese_new_house_name_modifiers = { TITLE = title:c_ise } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Kanbe } - } - 1 = { # KUKI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Kuki TITLE = title:c_ise } } - japanese_new_house_name_modifiers = { TITLE = title:c_ise } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Kuki } - } - 1 = { # SEKI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Seki TITLE = title:c_ise } } - japanese_new_house_name_modifiers = { TITLE = title:c_ise } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Seki } - } - 1 = { # SHIMA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Shima TITLE = title:c_ise } } - japanese_new_house_name_modifiers = { TITLE = title:c_ise } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Shima } - } - ### IWAKI - 1 = { # TAMURA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Tamura TITLE = title:c_iwaki } } - japanese_new_house_name_modifiers = { TITLE = title:c_iwaki } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Tamura } - } - 1 = { # WATARI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Watari TITLE = title:c_iwaki } } - japanese_new_house_name_modifiers = { TITLE = title:c_iwaki } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Watari } - } - ### IWASHIRO - 1 = { # DATE - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Date TITLE = title:c_iwase } } - japanese_new_house_name_modifiers = { TITLE = title:c_iwase } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Date } - } - 1 = { # SUGIME - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Sugime TITLE = title:c_iwase } } - japanese_new_house_name_modifiers = { TITLE = title:c_iwase } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Sugime } - } - ### IWASE - 1 = { # ASAKA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Asaka TITLE = title:c_iwase } } - japanese_new_house_name_modifiers = { TITLE = title:c_iwase } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Asaka } - } - ### IYO - 1 = { # KONO - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Kono TITLE = title:c_iyo } } - japanese_new_house_name_modifiers = { TITLE = title:c_iyo } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Kono } - } - ### IZU - 1 = { # AKAZAWA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Akazawa TITLE = title:c_izu } } - japanese_new_house_name_modifiers = { TITLE = title:c_izu } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Akazawa } - } - 1 = { # AMANO - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Amano TITLE = title:c_izu } } - japanese_new_house_name_modifiers = { TITLE = title:c_izu } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Amano } - } - 1 = { # EMA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Ema TITLE = title:c_izu } } - japanese_new_house_name_modifiers = { TITLE = title:c_izu } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Ema } - } - 1 = { # HOJO - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_HO_jO_ TITLE = title:c_izu } } - japanese_new_house_name_modifiers = { TITLE = title:c_izu } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_HO_jO_ } - } - 1 = { # ITO 2 - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_ItO__2 TITLE = title:c_izu } } - japanese_new_house_name_modifiers = { TITLE = title:c_izu } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_ItO__2 } - } - 1 = { # KANO - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Kano TITLE = title:c_izu } } - japanese_new_house_name_modifiers = { TITLE = title:c_izu } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Kano } - } - 1 = { # KAWAZU - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Kawazu TITLE = title:c_izu } } - japanese_new_house_name_modifiers = { TITLE = title:c_izu } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Kawazu } - } - 1 = { # OMI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_O_mi TITLE = title:c_izu } } - japanese_new_house_name_modifiers = { TITLE = title:c_izu } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_O_mi } - } - 1 = { # TASHIRO - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Tashiro TITLE = title:c_izu } } - japanese_new_house_name_modifiers = { TITLE = title:c_izu } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Tashiro } - } - 1 = { # USAMI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Usami TITLE = title:c_izu } } - japanese_new_house_name_modifiers = { TITLE = title:c_izu } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Usami } - } - ### IWAMI - 1 = { # MASUDA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Masuda TITLE = title:c_iwami } } - japanese_new_house_name_modifiers = { TITLE = title:c_iwami } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Masuda } - } - ### IZUMO - 1 = { # MISAWA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Misawa TITLE = title:c_izumo } } - japanese_new_house_name_modifiers = { TITLE = title:c_izumo } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Misawa } - } - 1 = { # MITOYA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Mitoya TITLE = title:c_izumo } } - japanese_new_house_name_modifiers = { TITLE = title:c_izumo } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Mitoya } - } - 1 = { # NOGI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Nogi TITLE = title:c_izumo } } - japanese_new_house_name_modifiers = { TITLE = title:c_izumo } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Nogi } - } - ### KAGA - 1 = { # KUMASAKA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Kumasaka TITLE = title:c_kaga } } - japanese_new_house_name_modifiers = { TITLE = title:c_kaga } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Kumasaka } - } - 1 = { # TOGASHI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Togashi TITLE = title:c_kaga } } - japanese_new_house_name_modifiers = { TITLE = title:c_kaga } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Togashi } - } - ### KAI - 1 = { # AKIYAMA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Akiyama TITLE = title:c_kai } } - japanese_new_house_name_modifiers = { TITLE = title:c_kai } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Akiyama } - } - 1 = { # ASARI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Asari TITLE = title:c_kai } } - japanese_new_house_name_modifiers = { TITLE = title:c_kai } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Asari } - } - 1 = { # ICHIJO - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_IchijO_ TITLE = title:c_kai } } - japanese_new_house_name_modifiers = { TITLE = title:c_kai } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_IchijO_ } - } - 1 = { # ITSUMI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Henmi TITLE = title:c_kai } } - japanese_new_house_name_modifiers = { TITLE = title:c_kai } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Henmi } - } - 1 = { # KAGAMI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Kagami TITLE = title:c_kai } } - japanese_new_house_name_modifiers = { TITLE = title:c_kai } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Kagami } - } - 1 = { # NANBU - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Nanbu TITLE = title:c_kai } } - japanese_new_house_name_modifiers = { TITLE = title:c_kai } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Nanbu } - } - 1 = { # OGASAWARA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Ogasawara TITLE = title:c_kai } } - japanese_new_house_name_modifiers = { TITLE = title:c_kai } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Ogasawara } - } - ### KAWACHI - 1 = { # IZUMI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Izumi TITLE = title:c_kawachi } } - japanese_new_house_name_modifiers = { TITLE = title:c_kawachi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Izumi } - } - 1 = { # TAKAYASU - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Takayasu TITLE = title:c_kawachi } } - japanese_new_house_name_modifiers = { TITLE = title:c_kawachi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Takayasu } - } - ### KAZUSA - 1 = { # ANZAI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Anzai TITLE = title:c_kazusa } } - japanese_new_house_name_modifiers = { TITLE = title:c_kazusa } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Anzai } - } - 1 = { # HANYU 2 - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_HanyU__2 TITLE = title:c_kazusa } } - japanese_new_house_name_modifiers = { TITLE = title:c_kazusa } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_HanyU__2 } - } - 1 = { # INTO - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_IntO_ TITLE = title:c_kazusa } } - japanese_new_house_name_modifiers = { TITLE = title:c_kazusa } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_IntO_ } - } - 1 = { # KANEDA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Kaneda TITLE = title:c_kazusa } } - japanese_new_house_name_modifiers = { TITLE = title:c_kazusa } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Kaneda } - } - 1 = { # NAGASA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Nagasa TITLE = title:c_awa } } - japanese_new_house_name_modifiers = { TITLE = title:c_awa } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Nagasa } - } - 1 = { # OBU - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Obu TITLE = title:c_kazusa } } - japanese_new_house_name_modifiers = { TITLE = title:c_kazusa } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Obu } - } - 1 = { # SAKUMA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Sakuma TITLE = title:c_kazusa } } - japanese_new_house_name_modifiers = { TITLE = title:c_kazusa } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Sakuma } - } - ### KII - 1 = { # AKATA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Akata TITLE = title:c_kii } } - japanese_new_house_name_modifiers = { TITLE = title:c_kii } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Akata } - } - 1 = { # ITOGA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Itoga TITLE = title:c_kii } } - japanese_new_house_name_modifiers = { TITLE = title:c_kii } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Itoga } - } - 1 = { # HOZUMI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Hozumi TITLE = title:c_kii } } - japanese_new_house_name_modifiers = { TITLE = title:c_kii } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Hozumi } - } - 1 = { # SHINGU - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_ShingU_ TITLE = title:c_kii } } - japanese_new_house_name_modifiers = { TITLE = title:c_kii } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_ShingU_ } - } - 1 = { # SUZUKI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Suzuki TITLE = title:c_kii } } - japanese_new_house_name_modifiers = { TITLE = title:c_kii } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Suzuki } - } - 1 = { # UI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Ui TITLE = title:c_kii } } - japanese_new_house_name_modifiers = { TITLE = title:c_kii } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Ui } - } - 1 = { # YAMAMOTO - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Yamamoto TITLE = title:c_kii } } - japanese_new_house_name_modifiers = { TITLE = title:c_kii } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Yamamoto } - } - 1 = { # YUASA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Yuasa TITLE = title:c_kii } } - japanese_new_house_name_modifiers = { TITLE = title:c_kii } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Yuasa } - } - ### KOZUKE - 1 = { # AKAHORI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Akahori TITLE = title:c_kozuke } } - japanese_new_house_name_modifiers = { TITLE = title:c_kozuke } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Akahori } - } - 1 = { # AOYAMA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Aoyama TITLE = title:c_kozuke } } - japanese_new_house_name_modifiers = { TITLE = title:c_kozuke } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Aoyama } - } - 1 = { # IWAMATSU - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Iwamatsu TITLE = title:c_kozuke } } - japanese_new_house_name_modifiers = { TITLE = title:c_kozuke } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Iwamatsu } - } - 1 = { # JINBO - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Jinbo TITLE = title:c_kozuke } } - japanese_new_house_name_modifiers = { TITLE = title:c_kozuke } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Jinbo } - } - 1 = { # MOMONOI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Momonoi TITLE = title:c_kozuke } } - japanese_new_house_name_modifiers = { TITLE = title:c_kozuke } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Momonoi } - } - 1 = { # NITTA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Nitta TITLE = title:c_kozuke } } - japanese_new_house_name_modifiers = { TITLE = title:c_kozuke } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Nitta } - } - 1 = { # OBATA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Obata TITLE = title:c_kozuke } } - japanese_new_house_name_modifiers = { TITLE = title:c_kozuke } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Obata } - } - 1 = { # SATOMI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Satomi TITLE = title:c_mino } } - japanese_new_house_name_modifiers = { TITLE = title:c_mino } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Satomi } - } - 1 = { # TOKUGAWA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Tokugawa TITLE = title:c_kozuke } } - japanese_new_house_name_modifiers = { TITLE = title:c_kozuke } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Tokugawa } - } - 1 = { # YAMANA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Yamana TITLE = title:c_kozuke } } - japanese_new_house_name_modifiers = { TITLE = title:c_kozuke } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Yamana } - } - ### MIKAWA - 1 = { # ASUKE - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Asuke TITLE = title:c_mikawa } } - japanese_new_house_name_modifiers = { TITLE = title:c_mikawa } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Asuke } - } - 1 = { # HOSOKAWA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Hosokawa TITLE = title:c_mikawa } } - japanese_new_house_name_modifiers = { TITLE = title:c_mikawa } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Hosokawa } - } - 1 = { # IMAGAWA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Imagawa TITLE = title:c_mikawa } } - japanese_new_house_name_modifiers = { TITLE = title:c_mikawa } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Imagawa } - } - 1 = { # ISSHIKI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Isshiki TITLE = title:c_higo } } - japanese_new_house_name_modifiers = { TITLE = title:c_higo } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Isshiki } - } - 1 = { # KIRA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Kira TITLE = title:c_mikawa } } - japanese_new_house_name_modifiers = { TITLE = title:c_mikawa } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Kira } - } - 1 = { # MAKINO - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Makino TITLE = title:c_mikawa } } - japanese_new_house_name_modifiers = { TITLE = title:c_mikawa } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Makino } - } - 1 = { # MATSUDAIRA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Matsudaira TITLE = title:c_mikawa } } - japanese_new_house_name_modifiers = { TITLE = title:c_mikawa } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Matsudaira } - } - 1 = { # NIKI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Niki TITLE = title:c_mikawa } } - japanese_new_house_name_modifiers = { TITLE = title:c_mikawa } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Niki } - } - ### MIMASAKA - 1 = { # KATSUTA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Katsuta TITLE = title:c_mimasaka } } - japanese_new_house_name_modifiers = { TITLE = title:c_mimasaka } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Katsuta } - } - 1 = { # SHINMEN - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Shinmen TITLE = title:c_mimasaka } } - japanese_new_house_name_modifiers = { TITLE = title:c_mimasaka } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Shinmen } - } - ### MINO - 1 = { # ASANO - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Asano TITLE = title:c_mino } } - japanese_new_house_name_modifiers = { TITLE = title:c_mino } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Asano } - } - 1 = { # FUKUSHIMA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Fukushima TITLE = title:c_mino } } - japanese_new_house_name_modifiers = { TITLE = title:c_mino } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Fukushima } - } - 1 = { # IKEDA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Ikeda TITLE = title:c_mino } } - japanese_new_house_name_modifiers = { TITLE = title:c_mino } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Ikeda } - } - 1 = { # KIDA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Kida TITLE = title:c_mino } } - japanese_new_house_name_modifiers = { TITLE = title:c_mino } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Kida } - } - 1 = { # TOKI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Toki_JP TITLE = title:c_mino } } - japanese_new_house_name_modifiers = { TITLE = title:c_mino } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Toki_JP } - } - 1 = { # TOYOYAMA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Toyoyama TITLE = title:c_mino } } - japanese_new_house_name_modifiers = { TITLE = title:c_mino } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Toyoyama } - } - ### MUSASHI - 1 = { # ADACHI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Adachi TITLE = title:c_musashi } } - japanese_new_house_name_modifiers = { TITLE = title:c_musashi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Adachi } - } - 1 = { # ASAMI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Asami TITLE = title:c_musashi } } - japanese_new_house_name_modifiers = { TITLE = title:c_musashi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Asami } - } - 1 = { # CHICHIBU - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Chichibu TITLE = title:c_musashi } } - japanese_new_house_name_modifiers = { TITLE = title:c_musashi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Chichibu } - } - 1 = { # INAGE - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Inage TITLE = title:c_musashi } } - japanese_new_house_name_modifiers = { TITLE = title:c_musashi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Inage } - } - 1 = { # INOMATA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Inomata TITLE = title:c_musashi } } - japanese_new_house_name_modifiers = { TITLE = title:c_musashi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Inomata } - } - 1 = { # KANEKO - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Kaneko TITLE = title:c_musashi } } - japanese_new_house_name_modifiers = { TITLE = title:c_musashi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Kaneko } - } - 1 = { # KASAI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Kasai TITLE = title:c_musashi } } - japanese_new_house_name_modifiers = { TITLE = title:c_musashi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Kasai } - } - 1 = { # KASUKABE - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Kasukabe TITLE = title:c_musashi } } - japanese_new_house_name_modifiers = { TITLE = title:c_musashi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Kasukabe } - } - 1 = { # KAWAGOE - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Kawagoe TITLE = title:c_musashi } } - japanese_new_house_name_modifiers = { TITLE = title:c_musashi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Kawagoe } - } - 1 = { # KAWASAKI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Kawasaki TITLE = title:c_musashi } } - japanese_new_house_name_modifiers = { TITLE = title:c_musashi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Kawasaki } - } - 1 = { # KUMAGAI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Kumagai TITLE = title:c_musashi } } - japanese_new_house_name_modifiers = { TITLE = title:c_musashi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Kumagai } - } - 1 = { # HATAKEYAMA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Hatakeyama TITLE = title:c_musashi } } - japanese_new_house_name_modifiers = { TITLE = title:c_musashi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Hatakeyama } - } - 1 = { # HIKI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Hiki TITLE = title:c_musashi } } - japanese_new_house_name_modifiers = { TITLE = title:c_musashi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Hiki } - } - 1 = { # HIRUKAWA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Hirukawa TITLE = title:c_musashi } } - japanese_new_house_name_modifiers = { TITLE = title:c_musashi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Hirukawa } - } - 1 = { # INAZAWA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Inazawa TITLE = title:c_musashi } } - japanese_new_house_name_modifiers = { TITLE = title:c_musashi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Inazawa } - } - 1 = { # MOKUSAI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Mokusai TITLE = title:c_musashi } } - japanese_new_house_name_modifiers = { TITLE = title:c_musashi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Mokusai } - } - 1 = { # MURAYAMA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Murayama TITLE = title:c_musashi } } - japanese_new_house_name_modifiers = { TITLE = title:c_musashi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Murayama } - } - 1 = { # NARITA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Narita TITLE = title:c_musashi } } - japanese_new_house_name_modifiers = { TITLE = title:c_musashi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Narita } - } - 1 = { # NOMOTO - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Nomoto TITLE = title:c_musashi } } - japanese_new_house_name_modifiers = { TITLE = title:c_musashi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Nomoto } - } - 1 = { # NOYO - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Noyo TITLE = title:c_musashi } } - japanese_new_house_name_modifiers = { TITLE = title:c_musashi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Noyo } - } - 1 = { # OI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_O_i TITLE = title:c_musashi } } - japanese_new_house_name_modifiers = { TITLE = title:c_musashi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_O_i } - } - 1 = { # OYAMADA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Oyamada TITLE = title:c_musashi } } - japanese_new_house_name_modifiers = { TITLE = title:c_musashi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Oyamada } - } - 1 = { # TOSHIMA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Toshima TITLE = title:c_musashi } } - japanese_new_house_name_modifiers = { TITLE = title:c_musashi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Toshima } - } - 1 = { # SHINAGAWA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Shinagawa TITLE = title:c_musashi } } - japanese_new_house_name_modifiers = { TITLE = title:c_musashi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Shinagawa } - } - 1 = { # USHIODA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Ushioda TITLE = title:c_musashi } } - japanese_new_house_name_modifiers = { TITLE = title:c_musashi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Ushioda } - } - 1 = { # YOKOYAMA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Yokoyama TITLE = title:c_musashi } } - japanese_new_house_name_modifiers = { TITLE = title:c_musashi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Yokoyama } - } - 1 = { # YOMODA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Yomoda TITLE = title:c_musashi } } - japanese_new_house_name_modifiers = { TITLE = title:c_musashi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Yomoda } - } - ### NAGATO - ### NOTO - 1 = { # TOKUDA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Tokuda TITLE = title:c_noto } } - japanese_new_house_name_modifiers = { TITLE = title:c_noto } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Tokuda } - } - ### OKI - ### OMI - 1 = { # AMAGO - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Amago TITLE = title:c_omi } } - japanese_new_house_name_modifiers = { TITLE = title:c_omi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Amago } - } - 1 = { # AMENOMORI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Amenomori TITLE = title:c_omi } } - japanese_new_house_name_modifiers = { TITLE = title:c_omi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Amenomori } - } - 1 = { # HAYAMI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Hayami TITLE = title:c_omi } } - japanese_new_house_name_modifiers = { TITLE = title:c_omi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Hayami } - } - 1 = { # IBA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Iba_JP TITLE = title:c_omi } } - japanese_new_house_name_modifiers = { TITLE = title:c_omi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Iba_JP } - } - 1 = { # KUTSUKI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Kutsuki TITLE = title:c_omi } } - japanese_new_house_name_modifiers = { TITLE = title:c_omi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Kutsuki } - } - 1 = { # MIKI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Miki TITLE = title:c_omi } } - japanese_new_house_name_modifiers = { TITLE = title:c_omi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Miki } - } - 1 = { # OHARA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_O_hara TITLE = title:c_omi } } - japanese_new_house_name_modifiers = { TITLE = title:c_omi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_O_hara } - } - 1 = { # SASAKI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Sasaki TITLE = title:c_omi } } - japanese_new_house_name_modifiers = { TITLE = title:c_omi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Sasaki } - } - 1 = { # TANAKA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Tanaka TITLE = title:c_omi } } - japanese_new_house_name_modifiers = { TITLE = title:c_omi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Tanaka } - } - ### OSUMI - 1 = { # KIMOTSUKI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Kimotsuki TITLE = title:c_osumi } } - japanese_new_house_name_modifiers = { TITLE = title:c_osumi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Kimotsuki } - } - 1 = { # KITAHARA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Kitahara TITLE = title:c_osumi } } - japanese_new_house_name_modifiers = { TITLE = title:c_osumi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Kitahara } - } - ### OWARI - 1 = { # HACHISUKA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Hachisuka TITLE = title:c_owari } } - japanese_new_house_name_modifiers = { TITLE = title:c_owari } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Hachisuka } - } - 1 = { # HOTTA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Hotta TITLE = title:c_owari } } - japanese_new_house_name_modifiers = { TITLE = title:c_owari } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Hotta } - } - 1 = { # NIWA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Niwa TITLE = title:c_owari } } - japanese_new_house_name_modifiers = { TITLE = title:c_owari } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Niwa } - } - 1 = { # OGAWA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Ogawa TITLE = title:c_owari } } - japanese_new_house_name_modifiers = { TITLE = title:c_owari } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Ogawa } - } - 1 = { # OKADA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Okada TITLE = title:c_owari } } - japanese_new_house_name_modifiers = { TITLE = title:c_owari } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Okada } - } - 1 = { # OSADA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Osada TITLE = title:c_owari } } - japanese_new_house_name_modifiers = { TITLE = title:c_owari } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Osada } - } - 1 = { # YAMADA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Yamada TITLE = title:c_owari } } - japanese_new_house_name_modifiers = { TITLE = title:c_owari } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Yamada } - } - 1 = { # YASUDA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Yasuda TITLE = title:c_owari } } - japanese_new_house_name_modifiers = { TITLE = title:c_owari } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Yasuda } - } - ### SAGAMI - 1 = { # AIHARA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Aihara TITLE = title:c_sagami } } - japanese_new_house_name_modifiers = { TITLE = title:c_sagami } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Aihara } - } - 1 = { # AIKO - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_AikO_ TITLE = title:c_sagami } } - japanese_new_house_name_modifiers = { TITLE = title:c_sagami } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_AikO_ } - } - 1 = { # ASHINA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Ashina TITLE = title:c_sagami } } - japanese_new_house_name_modifiers = { TITLE = title:c_sagami } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Ashina } - } - 1 = { # DOI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Doi TITLE = title:c_sagami } } - japanese_new_house_name_modifiers = { TITLE = title:c_sagami } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Doi } - } - 1 = { # EBINA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Ebina TITLE = title:c_sagami } } - japanese_new_house_name_modifiers = { TITLE = title:c_sagami } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Ebina } - } - 1 = { # HATANO - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Hatano TITLE = title:c_sagami } } - japanese_new_house_name_modifiers = { TITLE = title:c_sagami } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Hatano } - } - 1 = { # KAGAWA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Kagawa TITLE = title:c_sagami } } - japanese_new_house_name_modifiers = { TITLE = title:c_sagami } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Kagawa } - } - 1 = { # KAJIWARA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Kajiwara TITLE = title:c_sagami } } - japanese_new_house_name_modifiers = { TITLE = title:c_sagami } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Kajiwara } - } - 1 = { # KOBAYAKAWA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Kobayakawa TITLE = title:c_sagami } } - japanese_new_house_name_modifiers = { TITLE = title:c_sagami } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Kobayakawa } - } - 1 = { # MATANO - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Matano TITLE = title:c_sagami } } - japanese_new_house_name_modifiers = { TITLE = title:c_sagami } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Matano } - } - 1 = { # MIURA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Miura TITLE = title:c_sagami } } - japanese_new_house_name_modifiers = { TITLE = title:c_sagami } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Miura } - } - 1 = { # MORI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Mori_JP TITLE = title:c_sagami } } - japanese_new_house_name_modifiers = { TITLE = title:c_sagami } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Mori_JP } - } - 1 = { # NAGAE - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Nagae TITLE = title:c_sagami } } - japanese_new_house_name_modifiers = { TITLE = title:c_sagami } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Nagae } - } - 1 = { # NAGAO - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Nagao TITLE = title:c_sagami } } - japanese_new_house_name_modifiers = { TITLE = title:c_sagami } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Nagao } - } - 1 = { # NAKAMURA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Nakamura TITLE = title:c_sagami } } - japanese_new_house_name_modifiers = { TITLE = title:c_sagami } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Nakamura } - } - 1 = { # NIKAIDO - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Nikaido TITLE = title:c_sagami } } - japanese_new_house_name_modifiers = { TITLE = title:c_sagami } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Nikaido } - } - 1 = { # OBA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_O_ba TITLE = title:c_sagami } } - japanese_new_house_name_modifiers = { TITLE = title:c_sagami } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_O_ba } - } - 1 = { # OKAZAKI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Okazaki TITLE = title:c_sagami } } - japanese_new_house_name_modifiers = { TITLE = title:c_sagami } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Okazaki } - } - 1 = { # OTAWA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_O_tawa TITLE = title:c_sagami } } - japanese_new_house_name_modifiers = { TITLE = title:c_sagami } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_O_tawa } - } - 1 = { # OTOMO - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_O_tomo TITLE = title:c_sagami } } - japanese_new_house_name_modifiers = { TITLE = title:c_sagami } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_O_tomo } - } - 1 = { # SAWARA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Sawara TITLE = title:c_sagami } } - japanese_new_house_name_modifiers = { TITLE = title:c_sagami } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Sawara } - } - 1 = { # SHIBUYA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Shibuya TITLE = title:c_sagami } } - japanese_new_house_name_modifiers = { TITLE = title:c_sagami } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Shibuya } - } - 1 = { # SOGA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Soga TITLE = title:c_sagami } } - japanese_new_house_name_modifiers = { TITLE = title:c_sagami } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Soga } - } - 1 = { # SUGIMOTO - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Sugimoto TITLE = title:c_sagami } } - japanese_new_house_name_modifiers = { TITLE = title:c_sagami } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Sugimoto } - } - 1 = { # TOKIWA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Tokiwa TITLE = title:c_sagami } } - japanese_new_house_name_modifiers = { TITLE = title:c_sagami } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Tokiwa } - } - 1 = { # TSUCHIYA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Tsuchiya TITLE = title:c_sagami } } - japanese_new_house_name_modifiers = { TITLE = title:c_sagami } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Tsuchiya } - } - 1 = { # YAMAUCHI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Yamauchi TITLE = title:c_sagami } } - japanese_new_house_name_modifiers = { TITLE = title:c_sagami } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Yamauchi } - } - ### SANUKI - 1 = { # SOGO - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_SogO_ TITLE = title:c_sanuki } } - japanese_new_house_name_modifiers = { TITLE = title:c_sanuki } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_SogO_ } - } - ### SATSUMA - 1 = { # SHIMAZU - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Shimazu TITLE = title:c_satsuma } } - japanese_new_house_name_modifiers = { TITLE = title:c_satsuma } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Shimazu } - } - 1 = { # TOGO - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_TO_gO_ TITLE = title:c_satsuma } } - japanese_new_house_name_modifiers = { TITLE = title:c_satsuma } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_TO_gO_ } - } - 1 = { # YAMADA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Yamada TITLE = title:c_satsuma } } - japanese_new_house_name_modifiers = { TITLE = title:c_satsuma } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Yamada } - } - ### SETTSU - 1 = { # MINASE - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Minase TITLE = title:c_settsu } } - japanese_new_house_name_modifiers = { TITLE = title:c_settsu } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Minase } - } - 1 = { # MIZOKUI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Mizokui TITLE = title:c_settsu } } - japanese_new_house_name_modifiers = { TITLE = title:c_settsu } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Mizokui } - } - 1 = { # NOSE - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Nose TITLE = title:c_settsu } } - japanese_new_house_name_modifiers = { TITLE = title:c_settsu } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Nose } - } - 1 = { # TADA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Tada TITLE = title:c_settsu } } - japanese_new_house_name_modifiers = { TITLE = title:c_settsu } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Tada } - } - 1 = { # WATANABE - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Watanabe TITLE = title:c_settsu } } - japanese_new_house_name_modifiers = { TITLE = title:c_settsu } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Watanabe } - } - ### SHINANO - 1 = { # AIDA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Aida TITLE = title:c_shinano } } - japanese_new_house_name_modifiers = { TITLE = title:c_shinano } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Aida } - } - 1 = { # ATOBE - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Atobe TITLE = title:c_shinano } } - japanese_new_house_name_modifiers = { TITLE = title:c_shinano } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Atobe } - } - 1 = { # DEURA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Deura TITLE = title:c_shinano } } - japanese_new_house_name_modifiers = { TITLE = title:c_shinano } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Deura } - } - 1 = { # HIGUCHI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Higuchi TITLE = title:c_shinano } } - japanese_new_house_name_modifiers = { TITLE = title:c_shinano } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Higuchi } - } - 1 = { # HOSHINA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Hoshina TITLE = title:c_shinano } } - japanese_new_house_name_modifiers = { TITLE = title:c_shinano } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Hoshina } - } - 1 = { # IIDA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Iida TITLE = title:c_shinano } } - japanese_new_house_name_modifiers = { TITLE = title:c_shinano } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Iida } - } - 1 = { # IINUMA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Iinuma TITLE = title:c_shinano } } - japanese_new_house_name_modifiers = { TITLE = title:c_shinano } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Iinuma } - } - 1 = { # IMAI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Imai TITLE = title:c_shinano } } - japanese_new_house_name_modifiers = { TITLE = title:c_shinano } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Imai } - } - 1 = { # INA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Ina TITLE = title:c_shinano } } - japanese_new_house_name_modifiers = { TITLE = title:c_shinano } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Ina } - } - 1 = { # INOUE - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Inoue TITLE = title:c_musashi } } - japanese_new_house_name_modifiers = { TITLE = title:c_musashi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Inoue } - } - 1 = { # KATAGIRI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Katagiri TITLE = title:c_shinano } } - japanese_new_house_name_modifiers = { TITLE = title:c_shinano } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Katagiri } - } - 1 = { # KOSAKA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Kosaka TITLE = title:c_shinano } } - japanese_new_house_name_modifiers = { TITLE = title:c_shinano } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Kosaka } - } - 1 = { # KISO - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Kiso TITLE = title:c_shinano } } - japanese_new_house_name_modifiers = { TITLE = title:c_shinano } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Kiso } - } - 1 = { # KURITA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Kurita TITLE = title:c_shinano } } - japanese_new_house_name_modifiers = { TITLE = title:c_shinano } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Kurita } - } - 1 = { # MOCHIZUKI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Mochizuki TITLE = title:c_shinano } } - japanese_new_house_name_modifiers = { TITLE = title:c_shinano } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Mochizuki } - } - 1 = { # MURAKAMI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Murakami TITLE = title:c_shinano } } - japanese_new_house_name_modifiers = { TITLE = title:c_shinano } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Murakami } - } - 1 = { # NAKANO - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Nakano TITLE = title:c_shinano } } - japanese_new_house_name_modifiers = { TITLE = title:c_shinano } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Nakano } - } - 1 = { # NATSUME - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Natsume TITLE = title:c_shinano } } - japanese_new_house_name_modifiers = { TITLE = title:c_shinano } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Natsume } - } - 1 = { # NEZU - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Nezu TITLE = title:c_shinano } } - japanese_new_house_name_modifiers = { TITLE = title:c_shinano } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Nezu } - } - 1 = { # NISHINA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Nishina TITLE = title:c_shinano } } - japanese_new_house_name_modifiers = { TITLE = title:c_shinano } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Nishina } - } - 1 = { # ODAGIRI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Odagiri TITLE = title:c_shinano } } - japanese_new_house_name_modifiers = { TITLE = title:c_shinano } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Odagiri } - } - 1 = { # SANADA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Sanada TITLE = title:c_shinano } } - japanese_new_house_name_modifiers = { TITLE = title:c_shinano } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Sanada } - } - 1 = { # SHIODA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Shioda TITLE = title:c_shinano } } - japanese_new_house_name_modifiers = { TITLE = title:c_shinano } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Shioda } - } - 1 = { # TOMONO - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Tomono TITLE = title:c_shinano } } - japanese_new_house_name_modifiers = { TITLE = title:c_shinano } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Tomono } - } - 1 = { # UEDA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Ueda TITLE = title:c_shinano } } - japanese_new_house_name_modifiers = { TITLE = title:c_shinano } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Ueda } - } - 1 = { # UNNO - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Unno TITLE = title:c_shinano } } - japanese_new_house_name_modifiers = { TITLE = title:c_shinano } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Unno } - } - 1 = { # YASHIRO - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Yashiro TITLE = title:c_shinano } } - japanese_new_house_name_modifiers = { TITLE = title:c_shinano } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Yashiro } - } - 1 = { # YODA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Yoda TITLE = title:c_shinano } } - japanese_new_house_name_modifiers = { TITLE = title:c_shinano } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Yoda } - } - ### SHIMOSA - 1 = { # CHIBA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Chiba TITLE = title:c_shimosa } } - japanese_new_house_name_modifiers = { TITLE = title:c_shimosa } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Chiba } - } - 1 = { # HARA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Hara TITLE = title:c_shimosa } } - japanese_new_house_name_modifiers = { TITLE = title:c_shimosa } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Hara } - } - 1 = { # KOKUBU - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Kokubu TITLE = title:c_shimosa } } - japanese_new_house_name_modifiers = { TITLE = title:c_shimosa } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Kokubu } - } - 1 = { # OSUGA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_O_suga TITLE = title:c_shimosa } } - japanese_new_house_name_modifiers = { TITLE = title:c_shimosa } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_O_suga } - } - 1 = { # SHIMOKOBE - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_ShimokO_be TITLE = title:c_shimosa } } - japanese_new_house_name_modifiers = { TITLE = title:c_shimosa } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_ShimokO_be } - } - 1 = { # SOMA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_SO_ma TITLE = title:c_shimosa } } - japanese_new_house_name_modifiers = { TITLE = title:c_shimosa } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_SO_ma } - } - 1 = { # SOSA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_SO_sa TITLE = title:c_shimosa } } - japanese_new_house_name_modifiers = { TITLE = title:c_shimosa } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_SO_sa } - } - 1 = { # TAKEISHI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Takeishi TITLE = title:c_shimosa } } - japanese_new_house_name_modifiers = { TITLE = title:c_shimosa } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Takeishi } - } - 1 = { # TO - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_TO_ TITLE = title:c_shimosa } } - japanese_new_house_name_modifiers = { TITLE = title:c_shimosa } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_TO_ } - } - 1 = { # YUKI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_YU_ki TITLE = title:c_shimosa } } - japanese_new_house_name_modifiers = { TITLE = title:c_shimosa } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_YU_ki } - } - ### SHIMOTSUKE - 1 = { # ASHIKAGA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Ashikaga TITLE = title:c_shimotsuke } } - japanese_new_house_name_modifiers = { TITLE = title:c_shimotsuke } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Ashikaga } - } - 1 = { # HAGA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Haga TITLE = title:c_shimotsuke } } - japanese_new_house_name_modifiers = { TITLE = title:c_shimotsuke } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Haga } - } - 1 = { # ITAKURA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Itakura TITLE = title:c_shimotsuke } } - japanese_new_house_name_modifiers = { TITLE = title:c_shimotsuke } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Itakura } - } - 1 = { # NASU - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Nasu TITLE = title:c_shimotsuke } } - japanese_new_house_name_modifiers = { TITLE = title:c_shimotsuke } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Nasu } - } - 1 = { # ONODERA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Onodera TITLE = title:c_shimotsuke } } - japanese_new_house_name_modifiers = { TITLE = title:c_shimotsuke } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Onodera } - } - 1 = { # OYAMA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Oyama TITLE = title:c_shimotsuke } } - japanese_new_house_name_modifiers = { TITLE = title:c_shimotsuke } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Oyama } - } - 1 = { # SANO - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Sano TITLE = title:c_shimotsuke } } - japanese_new_house_name_modifiers = { TITLE = title:c_shimotsuke } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Sano } - } - 1 = { # SHIONOYA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Shionoya TITLE = title:c_shimotsuke } } - japanese_new_house_name_modifiers = { TITLE = title:c_shimotsuke } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Shionoya } - } - 1 = { # UJIIE - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Uji_ie TITLE = title:c_shimotsuke } } - japanese_new_house_name_modifiers = { TITLE = title:c_shimotsuke } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Uji_ie } - } - ### SUO - 1 = { # MIGATA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Migata TITLE = title:c_suo } } - japanese_new_house_name_modifiers = { TITLE = title:c_suo } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Migata } - } - 1 = { # OUCHI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_O_uchi TITLE = title:c_suo } } - japanese_new_house_name_modifiers = { TITLE = title:c_suo } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_O_uchi } - } - 1 = { # TOIDA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Toida TITLE = title:c_suo } } - japanese_new_house_name_modifiers = { TITLE = title:c_suo } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Toida } - } - 1 = { # WASHIZU - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Washizu TITLE = title:c_suo } } - japanese_new_house_name_modifiers = { TITLE = title:c_suo } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Washizu } - } - 1 = { # YAMAGUCHI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Yamaguchi TITLE = title:c_suo } } - japanese_new_house_name_modifiers = { TITLE = title:c_suo } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Yamaguchi } - } - ### SURUGA - 1 = { # ABE - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Abe TITLE = title:c_suruga } } - japanese_new_house_name_modifiers = { TITLE = title:c_suruga } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Abe } - } - 1 = { # ANO - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Ano TITLE = title:c_suruga } } - japanese_new_house_name_modifiers = { TITLE = title:c_suruga } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Ano } - } - 1 = { # IRIE - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Irie TITLE = title:c_suruga } } - japanese_new_house_name_modifiers = { TITLE = title:c_suruga } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Irie } - } - 1 = { # KAMBARA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Kambara TITLE = title:c_suruga } } - japanese_new_house_name_modifiers = { TITLE = title:c_suruga } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Kambara } - } - 1 = { # KIKKAWA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Kikkawa TITLE = title:c_suruga } } - japanese_new_house_name_modifiers = { TITLE = title:c_suruga } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Kikkawa } - } - 1 = { # MAKI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Maki TITLE = title:c_suruga } } - japanese_new_house_name_modifiers = { TITLE = title:c_suruga } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Maki } - } - 1 = { # OKABE - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Okabe TITLE = title:c_suruga } } - japanese_new_house_name_modifiers = { TITLE = title:c_suruga } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Okabe } - } - ### TAGA - 1 = { # HIZUME - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Hizume TITLE = title:c_korehari } } - japanese_new_house_name_modifiers = { TITLE = title:c_korehari } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Hizume } - } - ### TAJIMA - 1 = { # ASAKURA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Asakura TITLE = title:c_tajima } } - japanese_new_house_name_modifiers = { TITLE = title:c_tajima } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Asakura } - } - ### TANBA - 1 = { # ASHIDA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Ashida TITLE = title:c_tanba } } - japanese_new_house_name_modifiers = { TITLE = title:c_tanba } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Ashida } - } - 1 = { # OTA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_O_ta TITLE = title:c_tanba } } - japanese_new_house_name_modifiers = { TITLE = title:c_tanba } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_O_ta } - } - 1 = { # UESUGI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Uesugi TITLE = title:c_tanba } } - japanese_new_house_name_modifiers = { TITLE = title:c_tanba } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Uesugi } - } - ### TOSA - 1 = { # CHOSOKABE - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_ChO_sokabe TITLE = title:c_tosa } } - japanese_new_house_name_modifiers = { TITLE = title:c_tosa } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_ChO_sokabe } - } - 1 = { # HASUIKE - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Hasuike TITLE = title:c_tosa } } - japanese_new_house_name_modifiers = { TITLE = title:c_tosa } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Hasuike } - } - 1 = { # KOSOKABE - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_KO_sokabe TITLE = title:c_tosa } } - japanese_new_house_name_modifiers = { TITLE = title:c_tosa } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_KO_sokabe } - } - 1 = { # SOGABE - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Sogabe TITLE = title:c_tosa } } - japanese_new_house_name_modifiers = { TITLE = title:c_tosa } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Sogabe } - } - 1 = { # YASU - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Yasu TITLE = title:c_tosa } } - japanese_new_house_name_modifiers = { TITLE = title:c_tosa } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Yasu } - } - ### TOTOMI - 1 = { # HARAISHI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Haraishi TITLE = title:c_totomi } } - japanese_new_house_name_modifiers = { TITLE = title:c_totomi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Haraishi } - } - 1 = { # II - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Ii TITLE = title:c_totomi } } - japanese_new_house_name_modifiers = { TITLE = title:c_totomi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Ii } - } - 1 = { # ISHITANI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Ishitani TITLE = title:c_totomi } } - japanese_new_house_name_modifiers = { TITLE = title:c_totomi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Ishitani } - } - 1 = { # SAGARA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Sagara TITLE = title:c_totomi } } - japanese_new_house_name_modifiers = { TITLE = title:c_totomi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Sagara } - } - 1 = { # TOYODA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Toyoda TITLE = title:c_totomi } } - japanese_new_house_name_modifiers = { TITLE = title:c_totomi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Toyoda } - } - ### TSUGARU - ### TSUSHIMA - 1 = { # SO - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_SO_ TITLE = title:c_tsushima } } - japanese_new_house_name_modifiers = { TITLE = title:c_tsushima } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_SO_ } - } - ### UGO - ### UZEN - 1 = { # MOGAMI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Mogami TITLE = title:c_tokisara } } - japanese_new_house_name_modifiers = { TITLE = title:c_tokisara } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Mogami } - } - 1 = { # OZONE - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_O_zone TITLE = title:c_tokisara } } - japanese_new_house_name_modifiers = { TITLE = title:c_tokisara } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_O_zone } - } - 1 = { # SHIRATORI - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Shiratori TITLE = title:c_tokisara } } - japanese_new_house_name_modifiers = { TITLE = title:c_tokisara } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Shiratori } - } - ### YAMATO - 1 = { # KASUGA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Kasuga TITLE = title:c_yamato } } - japanese_new_house_name_modifiers = { TITLE = title:c_yamato } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Kasuga } - } - 1 = { # IKOMA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_Ikoma TITLE = title:c_yamato } } - japanese_new_house_name_modifiers = { TITLE = title:c_yamato } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Ikoma } - } - 1 = { # OMIYA - trigger = { japan_house_name_county_trigger = { FLAG = flag:dynn_O_miya TITLE = title:c_yamato } } - japanese_new_house_name_modifiers = { TITLE = title:c_yamato } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_O_miya } - } - ### OTHER / SHARED - 1 = { # FURUICHI - trigger = { - OR = { - japan_house_name_county_trigger = { FLAG = flag:dynn_Furuichi TITLE = title:c_kawachi } - japan_house_name_county_trigger = { FLAG = flag:dynn_Furuichi TITLE = title:c_omi } - japan_house_name_county_trigger = { FLAG = flag:dynn_Furuichi TITLE = title:c_settsu } - japan_house_name_county_trigger = { FLAG = flag:dynn_Furuichi TITLE = title:c_yamato } - } - } - japanese_new_house_name_modifiers = { TITLE = title:c_kawachi } - japanese_new_house_name_modifiers = { TITLE = title:c_omi } - japanese_new_house_name_modifiers = { TITLE = title:c_settsu } - japanese_new_house_name_modifiers = { TITLE = title:c_yamato } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Furuichi } - } - 1 = { # HAYASHI - trigger = { - OR = { - japan_house_name_county_trigger = { FLAG = flag:dynn_Hayashi TITLE = title:c_kaga } - japan_house_name_county_trigger = { FLAG = flag:dynn_Hayashi TITLE = title:c_owari } - } - } - japanese_new_house_name_modifiers = { TITLE = title:c_kaga } - japanese_new_house_name_modifiers = { TITLE = title:c_owari } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Hayashi } - } - 1 = { # HONJO - trigger = { - OR = { - japan_house_name_county_trigger = { FLAG = flag:dynn_Furuichi TITLE = title:c_echigo } - japan_house_name_county_trigger = { FLAG = flag:dynn_Furuichi TITLE = title:c_musashi } - } - } - japanese_new_house_name_modifiers = { TITLE = title:c_echigo } - japanese_new_house_name_modifiers = { TITLE = title:c_musashi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_HonjO_ } - } - 1 = { # HIRAGA - trigger = { - OR = { - japan_house_name_county_trigger = { FLAG = flag:dynn_Hiraga TITLE = title:c_shinano } - japan_house_name_county_trigger = { FLAG = flag:dynn_Hiraga TITLE = title:c_tokisara } - } - } - japanese_new_house_name_modifiers = { TITLE = title:c_shinano } - japanese_new_house_name_modifiers = { TITLE = title:c_tokisara } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Hiraga } - } - 1 = { # ISHIKAWA - trigger = { - OR = { - japan_house_name_county_trigger = { FLAG = flag:dynn_Ishikawa TITLE = title:c_kawachi } - japan_house_name_county_trigger = { FLAG = flag:dynn_Ishikawa TITLE = title:c_iwaki } - } - } - japanese_new_house_name_modifiers = { TITLE = title:c_kawachi } - japanese_new_house_name_modifiers = { TITLE = title:c_iwaki } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Ishikawa } - } - 1 = { # KODAMA - trigger = { - OR = { - japan_house_name_county_trigger = { FLAG = flag:dynn_Kodama TITLE = title:c_hoki } - japan_house_name_county_trigger = { FLAG = flag:dynn_Kodama TITLE = title:c_musashi } - } - } - japanese_new_house_name_modifiers = { TITLE = title:c_hoki } - japanese_new_house_name_modifiers = { TITLE = title:c_musashi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Kodama } - } - 1 = { # NAKAMURA - trigger = { - OR = { - japan_house_name_county_trigger = { FLAG = flag:dynn_Nakamura TITLE = title:c_hitachi } - japan_house_name_county_trigger = { FLAG = flag:dynn_Nakamura TITLE = title:c_sagami } - japan_house_name_county_trigger = { FLAG = flag:dynn_Nakamura TITLE = title:c_shimotsuke } - } - } - japanese_new_house_name_modifiers = { TITLE = title:c_hitachi } - japanese_new_house_name_modifiers = { TITLE = title:c_sagami } - japanese_new_house_name_modifiers = { TITLE = title:c_shimotsuke } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Nakamura } - } - 1 = { # SHINGU - trigger = { - OR = { - japan_house_name_county_trigger = { FLAG = flag:dynn_ShingU_ TITLE = title:c_kii } - japan_house_name_county_trigger = { FLAG = flag:dynn_ShingU_ TITLE = title:c_iwase } - } - } - japanese_new_house_name_modifiers = { TITLE = title:c_kii } - japanese_new_house_name_modifiers = { TITLE = title:c_iwase } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_ShingU_ } - } - 1 = { # TAKAOKA - trigger = { - OR = { - japan_house_name_county_trigger = { FLAG = flag:dynn_Takaoka TITLE = title:c_hitachi } - japan_house_name_county_trigger = { FLAG = flag:dynn_Takaoka TITLE = title:c_izumo } - } - } - japanese_new_house_name_modifiers = { TITLE = title:c_hitachi } - japanese_new_house_name_modifiers = { TITLE = title:c_izumo } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Takaoka } - } - 1 = { # WADA - trigger = { - OR = { - japan_house_name_county_trigger = { FLAG = flag:dynn_Wada TITLE = title:c_kawachi } - japan_house_name_county_trigger = { FLAG = flag:dynn_Wada TITLE = title:c_sagami } - } - } - japanese_new_house_name_modifiers = { TITLE = title:c_kawachi } - japanese_new_house_name_modifiers = { TITLE = title:c_sagami } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Wada } - } - 1 = { # YAMAGATA - trigger = { - OR = { - japan_house_name_county_trigger = { FLAG = flag:dynn_Yamagata TITLE = title:c_aki } - japan_house_name_county_trigger = { FLAG = flag:dynn_Yamagata TITLE = title:c_mino } - } - } - japanese_new_house_name_modifiers = { TITLE = title:c_aki } - japanese_new_house_name_modifiers = { TITLE = title:c_mino } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Yamagata } - } - 1 = { # YOSHIDA - trigger = { - OR = { - japan_house_name_county_trigger = { FLAG = flag:dynn_Yoshida TITLE = title:c_musashi } - japan_house_name_county_trigger = { FLAG = flag:dynn_Yoshida TITLE = title:c_omi } - } - } - japanese_new_house_name_modifiers = { TITLE = title:c_musashi } - japanese_new_house_name_modifiers = { TITLE = title:c_omi } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Yoshida } - } - ### FUJIWARA - 3 = { # ANDO - trigger = { dynasty ?= { exists = var:fujiwara_flag } } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_AndO_ } - } - 3 = { # ENDO - trigger = { dynasty ?= { exists = var:fujiwara_flag } } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_EndO_ } - } - 3 = { # GOTO - trigger = { dynasty ?= { exists = var:fujiwara_flag } } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_GotO_ } - } - 3 = { # KATO - trigger = { dynasty ?= { exists = var:fujiwara_flag } } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_KatO_ } - } - 3 = { # KONDO - trigger = { dynasty ?= { exists = var:fujiwara_flag } } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_KondO_ } - } - 3 = { # KUDO - trigger = { dynasty ?= { exists = var:fujiwara_flag } } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_KudO_ } - } - 3 = { # MUTO - trigger = { dynasty ?= { exists = var:fujiwara_flag } } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_MutO_ } - } - 3 = { # SAITO - trigger = { dynasty ?= { exists = var:fujiwara_flag } } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_SaitO_ } - } - 3 = { # SATO - trigger = { dynasty ?= { exists = var:fujiwara_flag } } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_SatO_ } - } - } -} - -assign_japanese_house_name_options_kyoto_effect = { - ### YAMASHIRO (KYOTO) - random_list = { - 1 = { - trigger = { japan_house_name_trigger = { FLAG = flag:dynn_Awata } } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Awata } - } - 1 = { - trigger = { japan_house_name_trigger = { FLAG = flag:dynn_Awataguchi } } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Awataguchi } - } - 1 = { - trigger = { japan_house_name_trigger = { FLAG = flag:dynn_GojO_ } } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_GojO_ } - } - 1 = { - trigger = { japan_house_name_trigger = { FLAG = flag:dynn_IchijO_ } } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_IchijO_ } - } - 1 = { - trigger = { japan_house_name_trigger = { FLAG = flag:dynn_Kitabatake } } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Kitabatake } - } - 1 = { - trigger = { japan_house_name_trigger = { FLAG = flag:dynn_Konoe } } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Konoe } - } - 1 = { - trigger = { japan_house_name_trigger = { FLAG = flag:dynn_KyO_goku } } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_KyO_goku } - } - 1 = { - trigger = { japan_house_name_trigger = { FLAG = flag:dynn_Nakamikado } } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Nakamikado } - } - 1 = { - trigger = { japan_house_name_trigger = { FLAG = flag:dynn_NijO_ } } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_NijO_ } - } - 1 = { - trigger = { japan_house_name_trigger = { FLAG = flag:dynn_O_inomikado } } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_O_inomikado } - } - 1 = { - trigger = { japan_house_name_trigger = { FLAG = flag:dynn_Rokkaku } } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Rokkaku } - } - 1 = { - trigger = { japan_house_name_trigger = { FLAG = flag:dynn_RokujO_ } } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_RokujO_ } - } - 1 = { - trigger = { japan_house_name_trigger = { FLAG = flag:dynn_SanjO_ } } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_SanjO_ } - } - 1 = { - trigger = { japan_house_name_trigger = { FLAG = flag:dynn_ShijO_ } } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_ShijO_ } - } - 1 = { - trigger = { japan_house_name_trigger = { FLAG = flag:dynn_Tsuchimikado } } - add_to_variable_list = { name = japanese_house_names target = flag:dynn_Tsuchimikado } - } - } -} - -faction_demand_regent_transfer_effect = { - top_liege = { - save_temporary_scope_as = old_regent_temp - primary_title = { - save_temporary_scope_as = primary_title_temp - title_capital_county = { save_temporary_scope_as = preferred_capital_temp } - } - } - $NEW_REGENT$ = { - save_temporary_scope_as = new_regent_temp - if = { - limit = { government_has_flag = government_is_japan_feudal } - save_temporary_scope_as = japan_feudal - } - } - # COUNTIES - create_title_and_vassal_change = { - type = faction_demand - save_scope_as = title_change - add_claim_on_loss = no - } - scope:old_regent_temp = { # Give landed titles to the new Regent - show_as_tooltip = { - primary_title = { # Give top liege title to the new Regent - change_title_holder_include_vassals = { - holder = scope:new_regent_temp - change = scope:title_change - } - } - } - hidden_effect = { - every_held_title = { - limit = { - tier > tier_barony # we don't want to try and pass off baronies - is_landless_type_title = no - is_noble_family_title = no - NOT = { exists = var:ceremonial_title } # we don't want to hand away the ceremonial throne, which is not landless - } - change_title_holder_include_vassals = { - holder = scope:new_regent_temp - change = scope:title_change - } - } - change_liege = { - liege = scope:new_regent_temp - change = scope:title_change - } - } - } - resolve_title_and_vassal_change = scope:title_change - scope:new_regent_temp = { - if = { - limit = { - has_title = scope:preferred_capital_temp # do I own the preferred capital? - capital_county != scope:preferred_capital_temp # and is my capital not the preferred capital? - } - set_realm_capital = scope:preferred_capital_temp # now my capital is the preferred capital - } - # GOVERNMENT - if = { - limit = { - exists = scope:japan_feudal - NOT = { government_has_flag = government_is_japan_feudal } - } - change_government = japan_feudal_government - } - # SUCCESSION LAWS - if = { - limit = { - government_has_flag = government_is_japan_administrative - tgp_has_ceremonial_liege_title_trigger = no - NOT = { - has_realm_law = japanese_regency_succession_law - } - } - add_realm_law_skip_effects = japanese_regency_succession_law - } - else_if = { - limit = { - government_has_flag = government_is_meritocratic - tgp_has_ceremonial_liege_title_trigger = no - NOT = { - has_realm_law = meritocratic_regency_succession_law - } - } - add_realm_law_skip_effects = meritocratic_regency_succession_law - } - else_if = { - limit = { - NOT = { - has_realm_law = single_heir_succession_law # sanity check - } - } - add_realm_law_skip_effects = single_heir_succession_law - } - } -} - -tgp_japan_schoolhouse_education_boost_effect = { - save_scope_as = student - house.house_head.domicile ?= { - if = { - limit = { - has_domicile_parameter = japanese_schoolhouse_education_boost_1 - } - switch = { - trigger = has_domicile_building - japanese_schoolhouse_01 = { scope:student = { education_point_add_general_effect = { VALUE = 1 } } } - japanese_schoolhouse_02 = { scope:student = { education_point_add_general_effect = { VALUE = 2 } } } - japanese_schoolhouse_03 = { scope:student = { education_point_add_general_effect = { VALUE = 3 } } } - japanese_schoolhouse_04 = { scope:student = { education_point_add_general_effect = { VALUE = 4 } } } - japanese_schoolhouse_04 = { scope:student = { education_point_add_general_effect = { VALUE = 5 } } } - japanese_schoolhouse_04 = { scope:student = { education_point_add_general_effect = { VALUE = 6 } } } - } - } - } -} - -tgp_restore_japanese_monarchy_decision_effect = { - save_scope_as = kampaku - tgp_restore_japanese_monarchy_yamato_scion_effect = yes - add_prestige = major_prestige_value - if = { - limit = { government_allows = administrative } - change_influence = major_influence_value - } - else = { add_piety = medium_piety_value } - if = { - limit = { exists = scope:scion } - add_hook = { - type = strong_favor_hook - target = scope:scion - } - } - else = { custom_tooltip = tgp_restore_japanese_monarchy_decision_hook_tt } -} - -tgp_restore_japanese_monarchy_yamato_scion_effect = { - title:k_chrysanthemum_throne.previous_holder ?= { save_scope_as = last_tenno } - dynasty:japanese_yamato.dynasty_founder.house ?= { - save_scope_as = house_yamato - if = { - limit = { this = scope:kampaku.house } - if = { # Avoid display of short tooltips after creation - limit = { NOT = { exists = scope:scion } } - custom_tooltip = tgp_restore_japanese_monarchy_yamato_scion_kampaku_tt - } - scope:kampaku = { save_scope_as = scion } - } - else_if = { - limit = { - scope:last_tenno ?= { tgp_japan_valid_restore_monarchy_scion_trigger = yes } - } - if = { # Avoid display of short tooltips after creation - limit = { NOT = { exists = scope:scion } } - custom_tooltip = tgp_restore_japanese_monarchy_yamato_scion_last_tt - } - scope:last_tenno = { save_scope_as = scion } - } - else_if = { - limit = { - scope:last_tenno ?= { - any_child = { tgp_japan_valid_restore_monarchy_scion_trigger = yes } - } - } - if = { # Avoid display of short tooltips after creation - limit = { NOT = { exists = scope:scion } } - custom_tooltip = tgp_restore_japanese_monarchy_yamato_scion_last_child_tt - } - scope:last_tenno = { - ordered_child = { - limit = { tgp_japan_valid_restore_monarchy_scion_trigger = yes } - order_by = age - save_scope_as = scion - } - } - } - else_if = { - limit = { - scope:last_tenno ?= { - any_close_family_member = { tgp_japan_valid_restore_monarchy_scion_trigger = yes } - } - } - if = { # Avoid display of short tooltips after creation - limit = { NOT = { exists = scope:scion } } - custom_tooltip = tgp_restore_japanese_monarchy_yamato_scion_last_close_family_tt - } - scope:last_tenno = { - ordered_close_family_member = { - limit = { tgp_japan_valid_restore_monarchy_scion_trigger = yes } - order_by = age - save_scope_as = scion - } - } - } - else_if = { - limit = { - any_house_member = { - is_ruler = no - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root.top_liege } - is_healthy = yes - } - } - if = { # Avoid display of short tooltips after creation - limit = { NOT = { exists = scope:scion } } - custom_tooltip = tgp_restore_japanese_monarchy_yamato_scion_found_tt - } - ordered_house_member = { - limit = { - top_liege = root.top_liege - is_ruler = no - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root.top_liege } - is_healthy = yes - } - order_by = age - save_scope_as = scion - } - } - else = { - tgp_restore_japanese_monarchy_yamato_creation_effect = yes - if = { # Avoid display of short tooltips after creation - limit = { NOT = { exists = scope:scion } } - custom_tooltip = tgp_restore_japanese_monarchy_yamato_scion_created_tt - } - } - # Save children for portraits - scope:scion = { - save_scope_as = background_throne_room_scope - ordered_child = { - limit = { house = scope:scion.house } - max = 3 - check_range_bounds = no - order_by = age - switch = { - trigger = exists - scope:scion_child_2 = { save_scope_as = scion_child_3 } - scope:scion_child_1 = { save_scope_as = scion_child_2 } - fallback = { save_scope_as = scion_child_1 } - } - } - } - } -} - -tgp_restore_japanese_monarchy_yamato_restoration_effect = { - add_character_flag = tgp_japan_restore_japanese_monarchy_flag - if = { - limit = { exists = scope:scion } - if = { - limit = { exists = title:k_chrysanthemum_throne.holder } - create_title_and_vassal_change = { - type = usurped - save_scope_as = change - add_claim_on_loss = yes - } - } - else = { - create_title_and_vassal_change = { - type = created - save_scope_as = change - } - } - title:k_chrysanthemum_throne ?= { - change_title_holder = { - holder = scope:scion - change = scope:change - } - } - if = { - limit = { - scope:scion.liege != scope:kampaku - scope:scion != scope:kampaku - } - scope:scion ?= { - change_liege = { - liege = scope:kampaku - change = scope:change - } - } - } - resolve_title_and_vassal_change = scope:change - } - remove_character_flag = tgp_japan_restore_japanese_monarchy_flag - hidden_effect = { - scope:scion = { - if = { - limit = { - NOT = { government_has_flag = government_is_japan_administrative } - } - change_government = japan_administrative_government - } - } - } -} - -tgp_restore_japanese_monarchy_yamato_creation_effect = { - create_character = { - template = tgp_japan_imperial_scion_template - location = scope:kampaku.capital_province - age = { 16 38 } - save_scope_as = scion - } - scope:scion ?= { - if = { - limit = { is_female = yes } - create_character = { - template = tgp_japan_imperial_scion_template - location = scope:kampaku.capital_province - mother = scope:scion - age = { 11 12 } - } - create_character = { - template = tgp_japan_imperial_scion_template - location = scope:kampaku.capital_province - mother = scope:scion - age = { 7 8 } - } - create_character = { - template = tgp_japan_imperial_scion_template - location = scope:kampaku.capital_province - mother = scope:scion - age = { 3 4 } - } - } - else = { - create_character = { - template = tgp_japan_imperial_scion_template - location = scope:kampaku.capital_province - father = scope:scion - age = { 11 12 } - } - create_character = { - template = tgp_japan_imperial_scion_template - location = scope:kampaku.capital_province - father = scope:scion - age = { 7 8 } - } - create_character = { - template = tgp_japan_imperial_scion_template - location = scope:kampaku.capital_province - father = scope:scion - age = { 3 4 } - } - } - } -} - -tgp_restore_japanese_government_decision_effect = { - japan_clear_flavour_flags_effect = yes - save_scope_as = kampaku - save_scope_as = background_throne_room_scope - add_character_flag = tgp_japan_restore_japanese_government_flag - # Change government if relevant - change_government = japan_administrative_government - if = { - limit = { - NOT = { has_realm_law = japanese_regency_succession_law } - } - add_realm_law_skip_effects = japanese_regency_succession_law - } - # Inform vassals and convert governments if relevant - every_vassal = { - custom = every_japan_feudal_vassal_custom - limit = { government_has_flag = government_is_japan_feudal } - add_opinion = { - target = scope:kampaku - modifier = restored_ritsuryo_opinion - } - } - if = { - limit = { NOT = { exists = scope:vassal } } - custom_tooltip = tgp_japan_restore_japanese_government_decision_civil_war_tt - } - hidden_effect = { - ordered_powerful_vassal = { - limit = { - is_ai = yes - NOR = { - government_allows = administrative - is_allied_to = scope:kampaku - } - opinion = { - target = scope:kampaku - value < 25 - } - save_temporary_scope_as = vassal_temp - NOT = { - scope:kampaku = { has_usable_hook = scope:vassal_temp } - } - } - order_by = military_power - save_scope_as = rebel - } - if = { - limit = { - NOT = { exists = scope:rebel } - } - ordered_vassal = { - limit = { - is_ai = yes - NOT = { government_allows = administrative } - opinion = { - target = scope:kampaku - value < 25 - } - save_temporary_scope_as = vassal_temp - NOT = { - scope:kampaku = { has_usable_hook = scope:vassal_temp } - } - } - order_by = military_power - save_scope_as = rebel - } - } - if = { - limit = { exists = scope:rebel } - tgp_restore_ritsuryo_civil_war_effect = { - REBEL = scope:rebel - LIEGE = scope:kampaku - } - } - } - custom_tooltip = { - text = tgp_japan_restore_japanese_government_decision_vassal_tt - every_vassal_or_below = { - limit = { - primary_title.tier >= tier_county - culture = { has_same_culture_heritage = scope:kampaku.culture } - } - trigger_event = { - id = tgp_japan_decision.9912 - delayed = yes - } - } - } - remove_character_flag = tgp_japan_restore_japanese_government_flag -} - -tgp_destroy_ceremonial_throne_effect = { - liege = { save_scope_as = liege } - save_scope_as = vassal - scope:vassal ?= { - if = { - limit = { - any_held_title = { exists = var:ceremonial_title } - } - tgp_destroy_ceremonial_liege_title_effect = yes - } - every_held_title = { - limit = { exists = var:administrative_ui_special_title.holder } - var:administrative_ui_special_title.holder = { tgp_destroy_ceremonial_liege_title_effect = yes } - } - } -} - -tgp_destroy_ceremonial_liege_title_effect = { - save_scope_as = ceremonial_liege - random_held_title = { - limit = { exists = var:ceremonial_title } - save_scope_as = ceremonial_title - var:ceremonial_title = { save_scope_as = regent_title } - } - random_held_title = { - limit = { is_noble_family_title = yes } - save_scope_as = nf_title - } - # Destroy the Ceremonial Title if linked title has no holder, or is in another realm, or is a sub vassal - if = { - limit = { - OR = { - NOT = { exists = scope:ceremonial_title.var:ceremonial_title.holder } - scope:ceremonial_title.holder.top_liege != scope:ceremonial_title.var:ceremonial_title.holder.top_liege - scope:ceremonial_title.holder.top_liege != scope:ceremonial_title.holder.liege - scope:ceremonial_title.holder.top_liege.highest_held_title_tier = tier_hegemony - } - } - # MESSAGE - every_player = { - limit = { top_liege = scope:ceremonial_liege.top_liege } - send_interface_message = { - type = event_generic_bad - title = tgp_destroy_ceremonial_liege_throne_title - left_icon = scope:ceremonial_liege - right_icon = scope:liege - show_as_tooltip = { - scope:liege = { destroy_title = scope:ceremonial_title } - scope:ceremonial_liege = { - if = { - limit = { is_independent_ruler = no } - add_trait = former_emperor - } - } - } - } - } - # Actually destroy - scope:ceremonial_liege = { - if = { - limit = { has_treasury = yes } - custom_tooltip = { - text = treasury_emptying_effect_desc - empty_treasury_when_abandoning_landed_life_effect = yes # otherwise the treasury sticks around - } - } - if = { - limit = { is_independent_ruler = no } - add_trait = former_emperor - } - } - scope:ceremonial_title = { remove_variable = ceremonial_title } - scope:regent_title = { remove_variable = administrative_ui_special_title } - scope:liege = { destroy_title = scope:ceremonial_title } - } -} - -tgp_japan_demand_administrative_refusal_effect = { - if = { - limit = { - scope:actor = { government_has_flag = government_is_japan_administrative } - scope:recipient = { government_has_flag = government_is_japan_feudal } - } - scope:actor = { - start_war = { - casus_belli = japan_demand_administrative_cb - target = scope:recipient - } - } - custom_tooltip = japan_demand_administrative_cb_warning_japan_tt - } -} - -tgp_restore_ritsuryo_civil_war_effect = { - $REBEL$ = { - save_scope_as = actor - save_scope_value_as = { - name = war_for_hoken_flavour - value = yes - } - start_war = { - casus_belli = japan_refused_ritsuryo_cb - target = $LIEGE$ - } - } - $LIEGE$ = { - save_scope_as = recipient - every_vassal = { #Vassals joining the rebel. - custom = vassals_joining_war_tt - limit = { - government_has_flag = government_is_japan_feudal - NOR = { - this = $REBEL$ - is_ai = no - has_trait = incapable - is_imprisoned = yes - dread_modified_ai_boldness = { #Too scared to do anything. - dreaded_character = $LIEGE$ - value <= -50 - } - opinion = { # People who really, really like you will still back you - target = $LIEGE$ - value >= 80 - } - is_allied_to = $LIEGE$ - is_at_war_with = $REBEL$ - is_at_war_with = $LIEGE$ - } - highest_held_title_tier > tier_barony - OR = { - #Lovers and friends always back rebel (unless also lovers/friends of the liege) - AND = { - OR = { - is_allied_to = $REBEL$ - has_relation_lover = $REBEL$ - has_relation_friend = $REBEL$ - } - NOR = { - is_allied_to = $LIEGE$ - has_relation_lover = $LIEGE$ - has_relation_friend = $LIEGE$ - } - } - #Vassals that either like recipient or have high honor will rally if the liege is being tyrannical. - AND = { - # If they can't join a faction against the liege they should not revolt - NOR = { - has_relation_lover = $LIEGE$ - has_relation_friend = $LIEGE$ - is_allied_to = $LIEGE$ - is_primary_heir_of = $LIEGE$ - $LIEGE$ = { has_strong_hook = prev } - has_dread_level_towards = { - target = $LIEGE$ - level = 2 - } - } - OR = { - ai_boldness >= 25 - ai_honor >= 25 - opinion = { - target = $REBEL$ - value >= 40 - } - } - NOR = { - $LIEGE$ = { has_revoke_title_reason = $REBEL$ } - trigger_if = { - limit = { exists = scope:landed_title } - $LIEGE$ = { has_claim_on = scope:landed_title } - } - faith = { - faith_hostility_level = { - target = $REBEL$.faith - value >= faith_hostile_level - } - } - } - } - #And finally, vassals that really hate their liege will join regardless (provided that they also do not hate recipient). - AND = { - opinion = { - target = $REBEL$ - value >= -25 - } - OR = { - #default threshold - opinion = { - target = $LIEGE$ - value <= -50 - } - #If tyrannical, the default threshold will be reached if at this level - AND = { - $LIEGE$ = { - title_revocation_is_tyrannical_trigger = { VASSAL = $REBEL$ } - } - opinion = { - target = $LIEGE$ - value <= -30 #revoke_title_tyranny_gain adds -20 - } - } - } - } - } - } - save_scope_as = joining_vassal - custom_tooltip = tooltip_fellow_vassal_joins_war #The war has not started when viewing the interaction screen. - hidden_effect = { - $REBEL$ = { - every_character_war = { - limit = { - using_cb = japan_refused_ritsuryo_cb - casus_belli = { - primary_attacker = $REBEL$ - primary_defender = $LIEGE$ - } - } - add_to_list = war_to_join - } - } - every_in_list = { - list = war_to_join - limit = { - NOT = { is_defender = prev } - } - hidden_effect = { set_called_to = prev } - add_attacker = prev - } - } - hidden_effect = { - $LIEGE$ = { - add_opinion = { - target = prev - modifier = rebellious_vassal_opinion - } - } - } - } - every_vassal = { - limit = { - is_ai = no - NOT = { this = $REBEL$ } - is_imprisoned = no - } - $REBEL$ = { save_scope_as = recipient } - $LIEGE$ = { save_scope_as = actor } - trigger_event = tgp_japan_decision.9913 - } - } -} - -tgp_set_historical_house_relation_effect = { - if = { - limit = { - house_relation_is_valid_to_start_trigger = { - HOUSE = this - OTHER_HOUSE = $OTHER_HOUSE$ - } - } - set_house_relation = { - target = $OTHER_HOUSE$ - level = $LEVEL$ - description = house_relation_reason_historical_desc - } - } -} - -tgp_setup_historical_house_relation_effect = { - ### 867 ### - if = { - limit = { game_start_date = 867.1.1 } - house:house_fujiwara_ashikaga = { - tgp_set_historical_house_relation_effect = { # - OTHER_HOUSE = house:house_minamoto_kozuke - LEVEL = rivalry - } - } - } - ### 1066 ### - else_if = { - limit = { game_start_date = 1066.9.15 } - dynasty:japanese_minamoto_murakami.dynasty_founder.house = { - tgp_set_historical_house_relation_effect = { # - OTHER_HOUSE = dynasty:japanese_fujiwara.dynasty_founder.house - LEVEL = friendly - } - } - } - ### 1178 ### - else_if = { - limit = { game_start_date = 1178.10.1 } - dynasty:japanese_sugawara.dynasty_founder.house = { - tgp_set_historical_house_relation_effect = { # - OTHER_HOUSE = dynasty:japanese_ki.dynasty_founder.house - LEVEL = friendly - } - } - house:house_minamoto_kiso = { - tgp_set_historical_house_relation_effect = { # Yoshikata killed by Yoshihira - OTHER_HOUSE = dynasty:japanese_nakahara_kiso.dynasty_founder.house - LEVEL = friendly - } - } - house:house_minamoto_kawachi = { - tgp_set_historical_house_relation_effect = { # Yoritomo's brothers killed by Kiyomori - OTHER_HOUSE = dynasty:japanese_nakahara_kiso.dynasty_founder.house - LEVEL = rivalry - } - tgp_set_historical_house_relation_effect = { # Marriage and historical alliance - OTHER_HOUSE = house:house_taira_hojo - LEVEL = friendly - } - } - house:house_kudo_kawazu = { - tgp_set_historical_house_relation_effect = { # Soga brothers - OTHER_HOUSE = house:house_kudo_ito_2 - LEVEL = rivalry - } - } - house:house_taira_wada = { - tgp_set_historical_house_relation_effect = { # Yoshimune killed by Tsunetomo - OTHER_HOUSE = dynasty:japanese_nagasa.dynasty_founder.house - LEVEL = rivalry - } - } - house:house_taira_chichibu = { - tgp_set_historical_house_relation_effect = { # Shigetaka killed by Yoshihira - OTHER_HOUSE = house:house_minamoto_kawachi - LEVEL = rivalry - } - } - house:house_taira_soga = { - tgp_set_historical_house_relation_effect = { # Soga brothers - OTHER_HOUSE = house:house_minamoto_kawachi - LEVEL = rivalry - } - } - dynasty:japanese_ito.dynasty_founder.house = { - tgp_set_historical_house_relation_effect = { # Tadanao killed by Tametomo - OTHER_HOUSE = house:house_minamoto_kawachi - LEVEL = rivalry - } - } - house:house_kudo_ito_2 = { - tgp_set_historical_house_relation_effect = { # Sukeyasu_2 killed by Suketsune_2 - OTHER_HOUSE = house:house_kudo_kawazu - LEVEL = rivalry - } - } - house:house_fujiwara_shijo = { - tgp_set_historical_house_relation_effect = { # Takasue's brothers killed by Kiyomori - OTHER_HOUSE = dynasty:japanese_taira_kanmu.dynasty_founder.house - LEVEL = rivalry - } - } - dynasty:japanese_fujiwara.dynasty_founder.house = { - tgp_set_historical_house_relation_effect = { # Yorinaga killed by Shigesada - OTHER_HOUSE = house:house_minamoto_mitsumasa - LEVEL = rivalry - } - } - } -} - -tgp_liege_change_bloc_management_effect = { - $VASSAL$ = { - if = { # Leave if not a valid member anymore - limit = { - OR = { - exists = confederation.leading_house - exists = house.house_confederation - } - } - save_temporary_scope_as = vassal_temp - house ?= { save_temporary_scope_as = vassal_house_temp } - liege ?= { save_temporary_scope_as = new_liege } - confederation ?= { - save_temporary_scope_as = current_bloc_temp - leading_house = { save_temporary_scope_as = current_bloc_leader_temp } - } - house.house_confederation ?= { - save_temporary_scope_as = current_house_bloc_temp - leading_house = { save_temporary_scope_as = current_house_bloc_leader_temp } - } - if = { - limit = { - exists = scope:current_bloc_temp - exists = scope:old_liege - trigger_if = { # If a vassal - limit = { is_independent_ruler = no } - scope:new_liege.liege != scope:old_liege.liege - scope:new_liege = { - is_independent_ruler = no - } - } - trigger_else = { - NOT = { scope:vassal_temp = scope:old_liege.top_liege } - } - } - scope:current_bloc_temp = { - if = { - limit = { - scope:vassal_temp = { - is_house_head = yes - house.house_confederation = scope:current_bloc_temp - scope:new_liege = { - is_independent_ruler = no - } - } - } - remove_confederation_member_house = scope:vassal_house_temp - } - else_if = { - limit = { scope:vassal_temp.confederation = scope:current_bloc_temp } - remove_confederation_member = scope:vassal_temp - } - } - debug_log = "Bloc liege change member leave" - debug_log_scopes = yes - } - if = { # Join if not a member of valid - limit = { - is_house_head = no - exists = scope:current_house_bloc_temp - scope:vassal_house_temp.house_head.liege ?= liege - NOT = { confederation = scope:vassal_house_temp.house_confederation } - } - confederation ?= { - save_temporary_scope_as = current_bloc_temp - remove_confederation_member = scope:vassal_temp - } - house.house_confederation = { - save_temporary_scope_as = house_bloc_temp - add_confederation_member = scope:vassal_temp - } - debug_log = "Bloc liege change member join" - debug_log_scopes = yes - } - } - } -} - -tgp_japan_assert_regional_dominion_government_decision_effect = { - save_scope_as = super_soryo - scope:super_soryo.primary_title.duchy ?= { save_scope_as = title_scope } - # Crime to Kampaku - if = { - limit = { - top_liege = { government_allows = administrative } - } - # Message for attacker - send_interface_toast = { - type = event_war_bad - title = tgp_japan_soryo_war_is_crime_title - left_icon = top_liege - right_icon = scope:title_scope - top_liege = { - send_interface_toast = { - type = event_war_bad - title = tgp_japan_soryo_war_is_crime_kampaku_title - left_icon = scope:super_soryo - right_icon = scope:title_scope - add_opinion = { - target = scope:super_soryo - modifier = admin_soryo_conquest_crime - } - } - } - } - } - if = { - limit = { exists = scope:title_scope.holder } - hidden_effect = { - scope:title_scope.holder = { save_scope_as = main_defender } - scope:super_soryo = { - if = { - limit = { - any_truce_target = { this = scope:main_defender } - } - cancel_truce_both_ways = scope:main_defender - } - } - start_war = { - #lets make sure this is appropriate for Japan - cb = domination_cb - target = scope:main_defender - target_title = scope:title_scope - } - random_character_war = { - limit = { - using_cb = domination_cb - primary_defender = scope:main_defender - } - save_scope_as = war - } - } - tgp_bloc_members_join_war_effect = { WAR = scope:war } - custom_tooltip = domination_war_holder_custom_tooltip - } - else_if = { - limit = { - scope:super_soryo = { - NOR = { - prestige_level >= 4 - legitimacy_level >= 3 - } - } - scope:title_scope ?= { - any_de_jure_county_holder = { - is_landed = yes - NOR = { - top_liege = scope:super_soryo - top_suzerain ?= scope:super_soryo - is_allied_to = scope:super_soryo - government_has_flag = government_is_herder - trigger_if = { - limit = { - exists = scope:super_soryo.confederation - } - confederation ?= scope:super_soryo.confederation - } - } - #They wont join if you're too scary - has_dread_level_towards = { - target = scope:super_soryo - level < 2 - } - #Must be strong enough to feel like they can fight you - current_military_strength >= { - value = scope:super_soryo.current_military_strength - multiply = 0.5 - } - } - } - } - hidden_effect = { - scope:title_scope = { - every_de_jure_county_holder = { - limit = { - top_liege != scope:super_soryo - is_landed = yes - } - if = { - limit = { - NOR = { - top_suzerain ?= scope:super_soryo - is_allied_to = scope:super_soryo - government_has_flag = government_is_herder - trigger_if = { - limit = { - exists = scope:super_soryo.confederation - } - confederation ?= scope:super_soryo.confederation - } - } - - #They wont join if you're too scary - has_dread_level_towards = { - target = scope:super_soryo - level < 2 - } - #Must be strong enough to feel like they can fight you - current_military_strength >= { - value = scope:super_soryo.current_military_strength - multiply = 0.5 - } - } - add_to_list = war_targets - } - else = { - add_to_list = potential_vassals - } - - } - ordered_in_list = { - list = war_targets - order_by = current_military_strength - save_scope_as = main_defender - } - } - scope:super_soryo = { - if = { - limit = { - any_truce_target = { this = scope:main_defender } - } - cancel_truce_both_ways = scope:main_defender - } - } - start_war = { - cb = domination_cb - target = scope:main_defender - target_title = scope:title_scope - } - #find ai for war - random_character_war = { - limit = { - primary_attacker = scope:super_soryo - primary_defender = scope:main_defender - using_cb = domination_cb - } - save_scope_as = super_soryo_war - every_in_list = { - list = war_targets - limit = { - NOT = { is_participant_in_war = scope:super_soryo_war } - is_ai = yes - } - save_scope_as = super_soryo_war_target - scope:super_soryo_war = { - hidden_effect = { - set_called_to = scope:super_soryo_war_target - } - add_defender = scope:super_soryo_war_target - } - } - } - #send players letter to join war or bend the knee - every_in_list = { - list = war_targets - limit = { - is_ai = no - } - trigger_event = tgp_japan_decision.9963 - } - } - if = { - limit = { exists = scope:war } - tgp_bloc_members_join_war_effect = { WAR = scope:war } - } - save_scope_value_as = { - name = super_soryo_war_current_enemy_strength - value = { - value = 0 - every_in_list = { - list = war_targets - add = { - value = current_military_strength - every_tributary = { - limit = { - vassal_contract_has_flag = tributary_contract_tributary_forced_war_override - } - add = current_military_strength - } - if = { - limit = { this = scope:main_defender } - every_ally = { add = current_military_strength } - if = { - limit = { exists = house.house_confederation } - top_liege = { - every_vassal = { - limit = { - highest_held_title_tier > tier_barony - house.house_confederation = scope:main_defender.house.house_confederation - NOT = { is_allied_to = scope:main_defender } - } - add = current_military_strength - } - } - } - } - } - } - } - } - custom_tooltip = super_soryo_war_no_holder_custom_tooltip - custom_tooltip = super_soryo_potential_peaceful - } - else = { - scope:title_scope = { - create_title_and_vassal_change = { - type = created - save_scope_as = change - } - change_title_holder = { - holder = scope:super_soryo - change = scope:change - } - every_de_jure_county = { - limit = { - holder.top_liege = root.top_liege # in same realm - holder.liege = root.top_liege # is not already a sub-vassal - NOR = { - holder = root # held my me - holder.liege = root # or my vassal - } - } - if = { - limit = { - holder = { - NOT = { government_allows = administrative } - highest_held_title_tier <= tier_county - } - } - hidden_effect = { - holder = { - change_liege = { - liege = root - change = scope:change - } - } - } - } - else_if = { - limit = { - holder = { - OR = { - government_allows = administrative - this = root.top_liege - } - } - } - change_title_holder = { - holder = scope:super_soryo - change = scope:change - } - } - } - resolve_title_and_vassal_change = scope:change - } - add_dread = 15 - add_legitimacy = 50 - dynasty = { add_dynasty_prestige = 150 } - custom_tooltip = super_soryo_reward_peaceful - } -} - -tgp_set_minamoto_taira_dynasty_prestige_effect = { - holder.dynasty ?= { - while = { - limit = { dynasty_prestige_level < 5 } - add_dynasty_prestige_level = 1 - } - } -} - -tgp_japan_soryo_eradicate_cb_transfer_effect = { - - create_title_and_vassal_change = { - type = conquest - save_scope_as = change - add_claim_on_loss = yes - } - - scope:loser = { - every_held_title = { - limit = { - is_landless_type_title = no - tier < tier_kingdom - tier > tier_barony - } - - change_title_holder = { - holder = scope:winner - change = scope:change - } - } - } - resolve_title_and_vassal_change = scope:change -} - -japanese_establish_soryo_administration_reward_effect = { - save_temporary_scope_as = winner_temp - scope:winner_temp = { - if = { - limit = { - NOT = { has_government = japan_feudal_government } - } - change_government = japan_feudal_government - } - add_realm_law = japanese_bureaucracy_0 - house.house_confederation ?= { - custom_tooltip = { - text = japanese_establish_soryo_administration_vassal_government_tt - scope:winner_temp = { - every_vassal_or_below = { - limit = { - house.house_confederation ?= scope:winner_temp.house.house_confederation - highest_held_title_tier > tier_county - NOT = { has_government = japan_feudal_government } - } - change_government = japan_feudal_government - } - } - } - } - custom_tooltip = japanese_establish_soryo_administration_imprison_tt - } -} - -tgp_learn_chinese_effect_game_start = { - if = { - limit = { - should_learn_chinese_trigger = yes - } - learn_language = language_chinese - } -} -tgp_learn_chinese_effect_birthday = { - if = { - limit = { - should_learn_chinese_trigger = yes - } - learn_language = language_chinese - every_player = { - limit = { - OR = { - is_parent_of = scope:child_learned_chinese - this = scope:child_learned_chinese - has_relation_guardian = scope:child_learned_chinese - has_relation_elder = scope:child_learned_chinese - } - } - send_interface_toast = { - type = event_childhood_good_with_text - title = japanese_korean_child_learned_chinese_title - desc = japanese_korean_child_learned_chinese_effect - left_icon = scope:child_learned_chinese - show_as_tooltip = { - scope:child_learned_chinese = { - learn_language = language_chinese - } - } - } - } - } -} - -create_love_artifact_poetry_effect = { - $OWNER$ = { save_scope_as = owner } - - hidden_effect_new_object = { - get_artifact_quality_effect = yes - get_artifact_wealth_effect = yes - - scope:owner = { - create_artifact = { - name = love_artifact_poetry_name - creator = scope:owner - description = love_artifact_poetry_description - visuals = scroll - type = miscellaneous - modifier = artifact_monthly_minor_prestige_1_modifier - modifier = artifact_attraction_opinion_1_modifier - save_scope_as = newly_created_artifact - wealth = scope:wealth - quality = scope:quality - } - } - - scope:newly_created_artifact = { - add_scaled_artifact_modifier_minor_prestige_effect = yes - add_scaled_artifact_modifier_majesty_effect = yes - } - } -} - -tgp_bloc_members_join_faction_effect = { - if = { # Japanese blocs - limit = { scope:faction.faction_leader.house.house_confederation.leading_house ?= scope:faction.faction_leader.house } - scope:faction.faction_leader.house.house_confederation ?= { - every_confederation_member = { - limit = { can_join_faction = scope:faction } - join_faction = scope:faction - } - } - } -} - -tgp_bloc_members_join_war_effect = { - custom_tooltip = { - text = tgp_bloc_members_join_war_effect_tt - if = { - limit = { house.house_confederation.leading_house.house_head = this } - house.house_confederation ?= { - every_confederation_member = { - limit = { - NOT = { is_participant_in_war = $WAR$ } - } - save_temporary_scope_as = war_participant_temp - scope:war = { add_attacker = scope:war_participant_temp } - } - } - } - } -} - -tgp_japan_become_a_monk_decision_effect = { - if = { - limit = { is_ai = no } - random_held_title = { - limit = { is_noble_family_title = yes } - current_heir = { save_scope_as = new_player } - } - } - add_character_modifier = { modifier = ep3_renounced_estate } - custom_tooltip = { - text = renounce_noble_family_title_decision_tt - send_interface_toast = { - type = event_toast_effect_neutral - title = renounce_noble_family_title_decision_toast_title - custom_tooltip = renounce_noble_family_title_decision_toast_desc - left_icon = scope:new_player - right_icon = root - } - } - if = { - limit = { exists = scope:new_player } - hidden_effect = { - create_title_and_vassal_change = { - type = granted - save_scope_as = title_change - add_claim_on_loss = no - } - every_held_title = { - change_title_holder = { - holder = scope:new_player - change = scope:title_change - } - } - resolve_title_and_vassal_change = scope:title_change - } - house = { set_house_head = scope:new_player } - set_player_character = scope:new_player - progress_towards_friend_effect = { - REASON = friend_retired_from_governorship - CHARACTER = scope:new_player - OPINION = default_friend_opinion - } - } - tgp_step_down_title_recipient_tooltip_effect = yes - set_variable = { - name = appointment_trait_override - value = trait:intellect_good_3 - } -} - -tgp_dynasty_house_name_setup_effect = { - # Fujiwara - dynasty:japanese_fujiwara.dynasty_founder.house ?= { set_house_name = "dynn_Fujiwara_Hok_ke" } - dynasty:japanese_fujiwara_oshu.dynasty_founder.house ?= { set_house_name = "dynn_Fujiwara_O_shU_" } - # Kiyohara - dynasty:japanese_kiyohara_hirozumi.dynasty_founder.house ?= { set_house_name = "dynn_Kiyohara_Hirozumi" } - # Minamoto - dynasty:japanese_minamoto_daigo.dynasty_founder.house ?= { set_house_name = "dynn_Minamoto_Daigo" } - dynasty:japanese_minamoto_kazan.dynasty_founder.house ?= { set_house_name = "dynn_Minamoto_Kazan" } - dynasty:japanese_minamoto_koko.dynasty_founder.house ?= { set_house_name = "dynn_Minamoto_KO_kO_" } - dynasty:japanese_minamoto_gosanjo.dynasty_founder.house ?= { set_house_name = "dynn_Minamoto_Go_SanjO_" } - dynasty:japanese_minamoto_montoku.dynasty_founder.house ?= { set_house_name = "dynn_Minamoto_Montoku" } - dynasty:japanese_minamoto_murakami.dynasty_founder.house ?= { set_house_name = "dynn_Minamoto_Murakami" } - dynasty:japanese_minamoto_ninmyo.dynasty_founder.house ?= { set_house_name = "dynn_Minamoto_NinmyO_" } - dynasty:japanese_minamoto_saga.dynasty_founder.house ?= { set_house_name = "dynn_Minamoto_Saga" } - dynasty:japanese_minamoto_sanjo.dynasty_founder.house ?= { set_house_name = "dynn_Minamoto_SanjO_" } - dynasty:japanese_minamoto_seiwa.dynasty_founder.house ?= { set_house_name = "dynn_Minamoto_Seiwa" } - dynasty:japanese_minamoto_uda.dynasty_founder.house ?= { set_house_name = "dynn_Minamoto_Uda" } - dynasty:japanese_minamoto_yozei.dynasty_founder.house ?= { set_house_name = "dynn_Minamoto_YO_zei" } - # Taira - dynasty:japanese_taira_kanmu.dynasty_founder.house ?= { set_house_name = "dynn_Taira_Kanmu" } - dynasty:japanese_taira_koko.dynasty_founder.house ?= { set_house_name = "dynn_Taira_KO_kO_" } - dynasty:japanese_taira_montoku.dynasty_founder.house ?= { set_house_name = "dynn_Taira_Montoku" } - dynasty:japanese_taira_ninmyo.dynasty_founder.house ?= { set_house_name = "dynn_Taira_NinmyO_" } -} diff --git a/N3OW/common/scripted_effects/10_dlc_tgp_korea_scripted_effects.txt b/N3OW/common/scripted_effects/10_dlc_tgp_korea_scripted_effects.txt deleted file mode 100644 index 717eef1b..00000000 --- a/N3OW/common/scripted_effects/10_dlc_tgp_korea_scripted_effects.txt +++ /dev/null @@ -1,107 +0,0 @@ - -korea_unify_goryeo_reward_effect = { - # Legend Seed - gain_heroic_legend_seed_tooltip_effect = yes - # Create new titles - create_title_and_vassal_change = { - type = created - save_scope_as = title_change - } - title:e_goryeo = { - change_title_holder = { - holder = scope:king_of_goryeo - change = scope:title_change - } - } - resolve_title_and_vassal_change = scope:title_change - tgp_setup_ceremonial_regent_title_effect = { - FOUNDER = this - CEREMONIAL_TITLE = title:k_yongson_throne - } - # Destroy old titles - title:k_silla = { add_to_list = korea_kingdoms } - title:k_baekje = { add_to_list = korea_kingdoms } - title:k_goguryeo = { add_to_list = korea_kingdoms } - every_in_list = { - list = korea_kingdoms - limit = { holder = scope:king_of_goryeo } - save_scope_as = korean_kingdom - scope:king_of_goryeo = { destroy_title = scope:korean_kingdom } - } - # Cultural acceptance (move towards Goryeo culture) - every_culture_global = { - limit = { - NOT = { this = scope:king_of_goryeo.culture } - OR = { - has_cultural_pillar = heritage_buyeo - has_cultural_pillar = heritage_korean - any_parent_culture = { - OR = { - has_cultural_pillar = heritage_buyeo - has_cultural_pillar = heritage_korean - } - } - } - any_culture_county = { - any_county_province = { geographical_region = world_asia_korea } - } - } - add_to_list = goryeo_cultures - } - every_in_list = { - list = goryeo_cultures - change_cultural_acceptance = { - target = root.culture - value = 25 - desc = cultural_acceptance_gain_unify_goryeo - } - } -} - -tgp_create_ceremonial_regent_title_effect = { - $FOUNDER$ = { save_scope_as = founder } - create_dynamic_title = { - tier = kingdom - name = MERITOCRATIC_CEREMONIAL_LIEGE_TITLE - } - scope:new_title = { - set_variable = { - name = ceremonial_title - value = scope:founder.primary_title - } - set_definitive_form = yes - set_coa = scope:founder.house - } - tgp_setup_ceremonial_regent_title_effect = { - FOUNDER = scope:founder - CEREMONIAL_TITLE = scope:new_title - } -} - -tgp_setup_ceremonial_regent_title_effect = { - $CEREMONIAL_TITLE$ = { save_scope_as = new_title } - $FOUNDER$ = { save_scope_as = founder } - create_title_and_vassal_change = { - type = created - save_scope_as = change - add_claim_on_loss = yes - } - scope:new_title = { - change_title_holder = { - holder = scope:founder - change = scope:change - } - } - resolve_title_and_vassal_change = scope:change - scope:new_title = { add_title_law = single_heir_succession_law } # Regency inherited separately - scope:founder.primary_title = { - save_scope_as = regent_title - set_variable = { - name = administrative_ui_special_title - value = scope:new_title - } - } - scope:founder = { - add_realm_law_skip_effects = single_heir_succession_law # Regency inherited separately - } -} diff --git a/N3OW/common/scripted_effects/10_dlc_tgp_natural_disaster_scripted_effects.txt b/N3OW/common/scripted_effects/10_dlc_tgp_natural_disaster_scripted_effects.txt deleted file mode 100644 index 9fc08e21..00000000 --- a/N3OW/common/scripted_effects/10_dlc_tgp_natural_disaster_scripted_effects.txt +++ /dev/null @@ -1,1004 +0,0 @@ -##################################################################### -# EFFECTS -##################################################################### - -spawn_earthquake_in_region_effect = { - random_county_in_region = { - region = $REGION$ - limit = { - development_level >= 10 - NOT = { - any_county_situation = { - situation_type = natural_disaster_earthquake - } - } - } - alternative_limit = { - development_level >= 5 - NOT = { - any_county_situation = { - situation_type = natural_disaster_earthquake - } - } - } - alternative_limit = { - development_level >= 2 - NOT = { - any_county_situation = { - situation_type = natural_disaster_earthquake - } - } - } - weight = { - base = 1 - modifier = { - any_county_province = { terrain = mountains } - add = 1 - } - modifier = { - any_county_province = { terrain = desert_mountains } - add = 1 - } - # Distribution - modifier = { - save_temporary_scope_as = county_temp - any_in_global_list = { - variable = ongoing_earthquakes - var:epicenter_county.kingdom ?= scope:county_temp.kingdom - } - factor = 0.5 - } - modifier = { - save_temporary_scope_as = county_temp - any_in_global_list = { - variable = ongoing_earthquakes - var:epicenter_county.duchy ?= scope:county_temp.duchy - } - factor = 0.5 - } - modifier = { - save_temporary_scope_as = county_temp - any_in_global_list = { - variable = ongoing_earthquakes - var:epicenter_county ?= scope:county_temp - } - factor = 0.1 - } - } - - spawn_earthquake_in_county_effect = { COUNTY = this } - } -} - -spawn_earthquake_in_county_effect = { - $COUNTY$ = { save_scope_as = epicenter_county } - - # Track globally for exclusivity and distribution - start_situation = { - type = natural_disaster_earthquake - save_scope_as = situation - } - - scope:situation ?= { - set_situation_center_province = scope:epicenter_county.title_province - add_to_global_variable_list = { - name = ongoing_earthquakes - target = this - } - set_variable = { - name = fatalities - value = 0 - } - - # Potentially overridden below based on region - save_scope_value_as = { - name = min_severity - value = 1 - } - save_scope_value_as = { - name = max_severity - value = 3 - } - - scope:epicenter_county.title_province ?= { - switch = { - trigger = geographical_region - geographical_region:world_europe_west_britannia = { save_scope_value_as = { name = max_severity value = 1 } } - geographical_region:world_europe_north = { save_scope_value_as = { name = max_severity value = 1 } } - geographical_region:world_middle_east_arabia = { save_scope_value_as = { name = max_severity value = 1 } } - geographical_region:world_india_deccan = { save_scope_value_as = { name = max_severity value = 1 } } - geographical_region:world_india_rajastan = { save_scope_value_as = { name = max_severity value = 1 } } - geographical_region:custom_lanka = { save_scope_value_as = { name = max_severity value = 1 } } - geographical_region:world_africa_west = { save_scope_value_as = { name = max_severity value = 1 } } - geographical_region:world_steppe_west = { save_scope_value_as = { name = max_severity value = 1 } } - geographical_region:world_siberia = { save_scope_value_as = { name = max_severity value = 1 } } - geographical_region:world_asia_korea = { save_scope_value_as = { name = max_severity value = 1 } } - geographical_region:world_asia_borneo = { save_scope_value_as = { name = max_severity value = 1 } } - } - } - scope:epicenter_county.title_province ?= { - switch = { - trigger = geographical_region - geographical_region:world_europe_south = { save_scope_value_as = { name = min_severity value = 2 } } - geographical_region:world_asia_minor = { save_scope_value_as = { name = min_severity value = 2 } } - geographical_region:world_middle_east = { save_scope_value_as = { name = min_severity value = 2 } } - geographical_region:world_tibet = { save_scope_value_as = { name = min_severity value = 2 } } - geographical_region:world_burma = { save_scope_value_as = { name = min_severity value = 2 } } - geographical_region:custom_arakan_mountains = { save_scope_value_as = { name = min_severity value = 2 } } - geographical_region:world_asia = { save_scope_value_as = { name = min_severity value = 2 } } - geographical_region:custom_bactria = { save_scope_value_as = { name = min_severity value = 2 } } - geographical_region:world_himalaya = { save_scope_value_as = { name = min_severity value = 2 } } - } - } - - set_variable = { - name = severity - value = { - add = { - fixed_range = { - min = 1 - max = 3 - } - min = scope:min_severity - max = scope:max_severity - } - } - } - - set_variable = { - name = epicenter_county - value = scope:epicenter_county - } - - situation_sub_region:disaster_area = { add_dejure_title_to_sub_region = scope:epicenter_county } - # Add neighbours to sub_region - scope:epicenter_county = { - every_neighboring_county = { - add_to_temporary_list = neighbouring_counties - save_temporary_scope_as = neighbouring_county - scope:situation.situation_sub_region:disaster_area = { add_dejure_title_to_sub_region = scope:neighbouring_county } - # Cleanup for simpler debugging - clear_saved_scope = neighbouring_county - } - } - log_natural_disaster = "started" - } -} - -spawn_flood_in_region_effect = { - $REGION$ = { save_scope_as = river_region } - - random_county_in_region = { - region = $REGION$ - limit = { development_level >= 10 } - alternative_limit = { development_level >= 5 } - alternative_limit = { development_level >= 2 } - weight = { - base = 1 - modifier = { - any_county_province = { terrain = farmlands } - add = 1 - } - modifier = { - any_county_province = { terrain = plains } - add = 1 - } - # Distribution - modifier = { - save_temporary_scope_as = county_temp - any_in_global_list = { - variable = ongoing_floods - var:epicenter_county.kingdom ?= scope:county_temp.kingdom - } - factor = 0.5 - } - modifier = { - save_temporary_scope_as = county_temp - any_in_global_list = { - variable = ongoing_floods - var:epicenter_county.duchy ?= scope:county_temp.duchy - } - factor = 0.5 - } - modifier = { - save_temporary_scope_as = county_temp - any_in_global_list = { - variable = ongoing_floods - var:epicenter_county ?= scope:county_temp - } - factor = 0.1 - } - } - spawn_flood_in_county_effect = { COUNTY = this } - } -} - -spawn_flood_in_county_effect = { - $COUNTY$ = { save_scope_as = flood_county } - - if = { - limit = { NOT = { exists = scope:river_region } } - random_in_global_list = { - variable = flood_region_list - limit = { - save_temporary_scope_as = region_temp - NOT = { - any_in_global_list = { - variable = ongoing_floods - scope:region_temp = this - } - } - scope:flood_county.title_province = { geographical_region = scope:region_temp } - } - save_scope_as = river_region - } - } - - start_situation = { - type = natural_disaster_flood - save_scope_as = situation - } - - # Track globally for exclusivity and distribution - scope:situation ?= { - set_situation_center_province = scope:flood_county.title_province - add_to_global_variable_list = { - name = ongoing_floods - target = this - } - - # Save region for exclusivity checks and Situation naming - set_variable = { - name = river_region - value = scope:river_region - } - - set_variable = { - name = fatalities - value = 0 - } - - # Potentially overridden below based on region - save_scope_value_as = { - name = min_severity - value = 1 - } - save_scope_value_as = { - name = max_severity - value = 3 - } - - scope:flood_county.title_province ?= { - switch = { - trigger = geographical_region - geographical_region:yellow_river_region = { save_scope_value_as = { name = min_severity value = 2 } } - geographical_region:nile_river_region = { save_scope_value_as = { name = min_severity value = 2 } } - } - } - - set_variable = { - name = severity - value = { - add = { - fixed_range = { - min = 1 - max = 3 - } - min = scope:min_severity - max = scope:max_severity - } - } - } - - random_situation_sub_region = { add_geographical_region = scope:river_region } - log_natural_disaster = "started" - } -} - -# Requires the following scopes: -# this = character -# scope:situation -# scope:situation_sub_region -natural_disaster_ruler_start_effect = { - save_scope_as = ruler - scope:situation.situation_center_province ?= { - if = { - limit = { scope:ruler = county.holder.top_liege } - save_scope_as = disaster_province - } - } - - if = { - limit = { NOT = { exists = scope:disaster_province } } - scope:situation_sub_region = { - random_situation_sub_region_county = { - limit = { scope:ruler = holder.top_liege } - title_province = { - save_scope_as = disaster_province - } - } - } - } - tgp_activate_catalyst_against_hegemon_effect = { - HEGEMON = scope:ruler.top_liege - CATALYST = catalyst_hegemon_natural_disaster - } - scope:situation = { - switch = { - trigger = situation_type - natural_disaster_earthquake = { - scope:ruler = { natural_disaster_start_great_project_effect = { TYPE = earthquake } } - } - natural_disaster_flood = { - scope:ruler = { natural_disaster_start_great_project_effect = { TYPE = flood } } - } - } - } - scope:great_project ?= { - set_variable = { - name = situation - value = scope:situation - } - scope:situation = { # Nested to prevent errors from non-existence - add_to_variable_list = { - name = great_projects - target = scope:great_project - } - } - } -} - -natural_disaster_start_great_project_effect = { - natural_disaster_save_disaster_province_effect = yes - if = { # make sure this ruler doesn't already have a great project for this disaster - limit = { - NOT = { - any_great_project = { - great_project_type = great_project_$TYPE$ - great_project_owner = scope:ruler - var:situation = scope:situation - } - } - } - scope:disaster_province ?= { - plan_great_project = { - great_project_type = great_project_$TYPE$ - founder = scope:ruler - save_scope_as = great_project - } - } - } -} - -great_projects_ensure_unique_disaster_recovery_projects_effect = { - save_scope_as = title_holder - every_character_situation = { - limit = { tgp_natural_disaster_situation_is_disaster_trigger = yes } - every_great_project = { - limit = { - OR = { - great_project_type = great_project_earthquake - great_project_type = great_project_flood - } - great_project_owner = scope:title_holder - var:situation = prev - } - add_to_list = recovery_projects - } - random_in_list = { # find the one to keep - list = recovery_projects - limit = { great_project_founder = scope:title_holder } - alternative_limit = { great_project_founder.house = scope:title_holder.house } - alternative_limit = { always = yes } # basically random - save_scope_as = project_to_keep - } - every_in_list = { # destroy the rest - list = recovery_projects - limit = { this != scope:project_to_keep } - cancel_great_project = this - } - every_in_list = { # clear list for next situation - list = recovery_projects - remove_from_list = recovery_projects - } - } -} - -natural_disaster_vassal_recovery_start_effect = { - show_as_tooltip = { - custom_tooltip = natural_disaster_vassal_recovery_start_tt - } -} - -natural_disaster_vassal_start_effect = { - show_as_tooltip = { - root.top_liege = { - if = { - limit = { has_legitimacy = yes } - add_legitimacy = natural_disaster_legitimacy_loss_value - } - } - scope:existing_great_project.great_project_location ?= { - plan_great_project = { - great_project_type = natural_disaster_$TYPE$ - founder = root.top_liege - } - } - - } -} - -# Effect to manage spacing of warning events -natural_disaster_fire_warning_event_effect = { - trigger_event = { - id = natural_disaster.9001 - days = 20 - } -} - -# Effect to manage spacing of impact events -natural_disaster_fire_spaced_impact_events_effect = { - natural_disaster_impact_effect = yes - - # Event for travellers through the affected region - every_situation_sub_region = { - every_situation_sub_region_county = { - every_county_province = { - every_character_in_location = { - trigger_event = natural_disaster_flavor_events.0005 - } - } - } - } - - # Later random impact/death events - trigger_event = { - id = natural_disaster.9010 # Random - days = 7 - } - trigger_event = { - id = natural_disaster.9010 # Random - days = 14 - } - trigger_event = { - id = natural_disaster.9010 # Random - days = 21 - } -} - -try_remove_disaster_vars_effect = { - if = { - limit = { - NOT = { - any_character_situation = { - tgp_natural_disaster_situation_is_disaster_trigger = yes - } - } - } - if = { - limit = { has_diarchy_type = temporary_regency } - end_diarchy = yes - } - remove_variable = natural_disaster_received_first_warning - remove_variable = natural_disaster_5102_count - if = { - limit = { has_variable = natural_disaster_contribution_discount } - remove_variable = natural_disaster_contribution_discount - } - } -} - -natural_disaster_death_damage_roll_effect = { - save_scope_as = situation - every_situation_county = { - every_county_province = { - every_character_in_location = { add_to_list = killable_characters } - every_army_in_location = { add_to_list = damageable_armies } - } - } - # Risk of characters to die or their armies to get damaged - every_in_list = { - list = killable_characters - if = { - limit = { is_pool_character = yes } - add_to_list = killed_characters - commanding_army ?= { add_to_list = damaged_armies } - knight_army ?= { add_to_list = damaged_armies } - } - else = { - random = { - chance = natural_disaster_base_death_chance_value - add_to_list = killed_characters - commanding_army ?= { add_to_list = damaged_armies } - knight_army ?= { add_to_list = damaged_armies } - } - } - } - # Risk of armies to get damaged if they weren't already from their leader commander/knight dying - every_in_list = { - list = damageable_armies - limit = { - NOT = { is_in_list = damaged_armies } - } - random = { # 25% to 50% base risk of getting damaged depending on size, plus more from type and severity - chance = 25 - modifier = { - add = { - value = army_size - divide = 1000 - max = 25 - } - } - modifier = { # Earthquakes are more deadly - scope:situation = { situation_type = natural_disaster_earthquake } - factor = 1.5 - } - modifier = { # Earthquake epicenters are more deadly - scope:situation.var:epicenter_county ?= location.county - factor = 1.5 - } - add_to_list = damaged_armies - } - } - - # EVENTS - # Inform players they may die. - every_player = { - limit = { is_in_list = killed_characters } - add_to_list = informees - trigger_event = natural_disaster.5101 - } - - # Otherwise inform players of any deaths. - every_in_list = { - list = killed_characters - save_scope_as = killed_character - every_player = { - if = { - limit = { - scope:killed_character = { is_travelling = yes } - this = current_travel_plan.travel_plan_owner - } - save_scope_as = message_receiver_temp - } - else_if = { - limit = { - scope:killed_character = { is_in_army = yes } - this = knight_army.army_commander - } - save_scope_as = message_receiver_temp - } - else_if = { - limit = { - scope:killed_character = { exists = involved_activity } - involved_activity ?= scope:killed_character.involved_activity - } - save_scope_as = message_receiver_temp - } - else_if = { - limit = { - scope:killed_character = { liege_or_court_owner = prev } - } - save_scope_as = message_receiver_temp - } - else_if = { - limit = { - OR = { - is_of_major_interest_trigger = { CHARACTER = scope:killed_character } - is_of_minor_interest_trigger = { CHARACTER = scope:killed_character } - } - } - save_scope_as = message_receiver_temp - } - } - scope:message_receiver_temp ?= { - if = { - limit = { - any_character_situation = { this = scope:situation } # we literally do not care if we aren't subject to the disaster - NOT = { is_in_list = informees } - } - add_to_list = informees - - if = { - limit = { - any_in_list = { - list = killed_characters - location = prev.location - } - } - save_scope_as = local_death - } - - trigger_event = { - id = natural_disaster.5102 - } - } - } - } - - # Inform players their army is damaged. - every_in_list = { - list = damaged_armies - army_commander ?= { - if = { - limit = { - is_ai = no - NOT = { is_in_list = informees } - } - add_to_list = informees - trigger_event = natural_disaster.5111 - } - } - } - # Otherwise inform players of any damaged armies. - every_in_list = { - list = damaged_armies - limit = { - NOR = { - army_commander = { is_in_list = informees } - save_temporary_scope_as = army_temp - any_in_list = { - list = killed_characters - knight_army ?= scope:army_temp - } - } - } - save_scope_as = army - army_owner = { - if = { - limit = { - NOT = { this = scope:army.army_commander } - } - send_interface_message = { - type = msg_natural_disaster_army_damaged_bad - title = natural_disaster_army_damaged_title - right_icon = scope:army.army_commander - show_as_tooltip = { - scope:army = { natural_disaster_army_damage_effect = yes } - every_in_list = { - list = killed_characters - limit = { knight_army ?= scope:army } - save_scope_as = victim_temp - natural_disaster_death_effect = { VICTIM = scope:victim_temp } - } - } - } - } - every_war_ally = { - send_interface_message = { - type = msg_natural_disaster_army_damaged_bad - title = natural_disaster_allied_army_damaged_title - right_icon = scope:army.army_commander - show_as_tooltip = { - scope:army = { natural_disaster_army_damage_effect = yes } - every_in_list = { - list = killed_characters - limit = { knight_army ?= scope:army } - save_scope_as = victim_temp - natural_disaster_death_effect = { VICTIM = scope:victim_temp } - } - } - } - } - every_war_enemy = { - send_interface_message = { - type = msg_natural_disaster_army_damaged_good - title = natural_disaster_enemy_army_damaged_title - right_icon = scope:army.army_commander - show_as_tooltip = { - scope:army = { natural_disaster_army_damage_effect = yes } - every_in_list = { - list = killed_characters - limit = { knight_army ?= scope:army } - save_scope_as = victim_temp - natural_disaster_death_effect = { VICTIM = scope:victim_temp } - } - } - } - } - } - } - # Actually kill people. - every_in_list = { - list = killed_characters - limit = { - is_ai = yes # Players who die will do so in events - is_alive = yes - } - save_scope_as = victim_temp - natural_disaster_death_effect = { VICTIM = scope:victim_temp } - } - # Actually damage armies. - every_in_list = { - list = damaged_armies - save_scope_as = army_temp - natural_disaster_army_damage_effect = yes - } - debug_log_scopes = yes -} - -natural_disaster_survival_memory_effect = { - if = { - limit = { - any_memory = { - memory_type = survived_disaster_memory - memory_age_years < 1 - } - } - # Don't add duplicates - } - else = { - create_character_memory = { type = survived_disaster_memory } - ordered_memory = { - order_by = memory_creation_date - save_scope_as = memory - scope:situation = { - switch = { - trigger = situation_type - natural_disaster_flood = { - scope:memory = { - set_variable = { name = disaster value = flag:flood } - set_variable = { name = river_region value = scope:situation.var:river_region } - } - } - natural_disaster_earthquake = { - scope:memory = { - set_variable = { name = disaster value = flag:earthquake } - set_variable = { name = epicenter_county value = scope:situation.situation_center_province.county } - } - } - } - } - set_variable = { name = location value = memory_owner.location } - } - } -} - -# Effect to apply the correct death reason to a killed character -natural_disaster_death_effect = { - scope:situation = { - change_variable = { - name = fatalities - add = 1 - } - switch = { - trigger = situation_type - natural_disaster_earthquake = { - $VICTIM$ = { - death = { death_reason = death_consumed_by_earthquake } - } - } - natural_disaster_flood = { - $VICTIM$ = { - death = { death_reason = death_swept_away_by_flash_flood } - } - } - } - } -} - -# Effect to damage an army -natural_disaster_army_damage_effect = { - subtract_supply = natural_disaster_army_supply_loss_value - deplete_army_by_percentage = natural_disaster_army_deplete_value -} - -# Save base useful event scopes -natural_disaster_save_base_scopes_effect = { - situation_center_province.county ?= { save_scope_as = epicenter_county } - var:river_region ?= { save_scope_as = river_region } - scope:situation_sub_region ?= { save_scope_as = situation_sub_region } -} - -natural_disaster_save_disaster_province_effect = { - save_scope_as = disaster_province_ruler - scope:situation = { - every_situation_sub_region = { - every_situation_sub_region_county = { - limit = { holder.top_liege ?= scope:disaster_province_ruler } - add_to_list = disaster_counties - } - } - random_in_list = { - list = disaster_counties - limit = { situation_center_province.county ?= this } - alternative_limit = { holder ?= scope:disaster_province_ruler } - alternative_limit = { holder.liege ?= scope:disaster_province_ruler } - alternative_limit = { always = yes } - title_province = { save_scope_as = disaster_province } - } - } -} - -natural_disaster_impact_effect = { - scope:situation = { - switch = { - trigger = situation_type - natural_disaster_earthquake = { - every_situation_county = { - custom = every_disaster_county_custom - change_county_control = natural_disaster_earthquake_control_loss_value - if = { - limit = { scope:situation.var:severity >= 2.5 } - add_county_modifier = { - modifier = tgp_natural_disaster_earthquake_3_county_modifier - duration_desc = until_the_disaster_is_over - years = 25 - } - } - else_if = { - limit = { scope:situation.var:severity >= 1.5 } - add_county_modifier = { - modifier = tgp_natural_disaster_earthquake_2_county_modifier - duration_desc = until_the_disaster_is_over - years = 25 - } - } - else = { - add_county_modifier = { - modifier = tgp_natural_disaster_earthquake_1_county_modifier - duration_desc = until_the_disaster_is_over - years = 25 - } - } - } - } - natural_disaster_flood = { - every_situation_county = { - custom = every_disaster_county_custom - change_county_control = natural_disaster_flood_control_loss_value - if = { - limit = { scope:situation.var:severity >= 2.5 } - add_county_modifier = { - modifier = tgp_natural_disaster_flood_3_county_modifier - duration_desc = until_the_disaster_is_over - years = 25 - } - } - else_if = { - limit = { scope:situation.var:severity >= 1.5 } - add_county_modifier = { - modifier = tgp_natural_disaster_flood_2_county_modifier - duration_desc = until_the_disaster_is_over - years = 25 - } - } - else = { - add_county_modifier = { - modifier = tgp_natural_disaster_flood_1_county_modifier - duration_desc = until_the_disaster_is_over - years = 25 - } - } - } - } - } - } -} - -natural_disaster_great_project_mandatory_investment_reward_effect = { - if = { - limit = { this = scope:owner } - if = { - limit = { is_valid_for_legitimacy_change = yes } - add_legitimacy = natural_disaster_great_project_mandatory_investment_legitimacy_gain_value - } - else = { - add_prestige = minor_prestige_gain - add_piety = minor_piety_gain - } - } - else_if = { - limit = { is_governor = yes } - change_influence = minor_influence_gain - increase_governance_effect = { VALUE = 2 } - } - else = { - add_prestige = medium_prestige_gain - add_piety = medium_prestige_gain - } - if = { - limit = { - government_allows = merit - this != title:h_china.holder # Chinese Emperor does not "use" merit - } - change_merit = { - value = medium_merit_gain - } - } -} - -natural_disaster_assign_councillor_to_manage_effect = { - if = { - limit = { government_has_flag = government_is_nomadic } - random_councillor = { - limit = { is_kurultai_trigger = yes } - save_scope_as = councillor - } - } - else_if = { - limit = { government_has_flag = government_is_landless_adventurer } - random_entourage_character = { - save_scope_as = councillor - } - } - else_if = { - limit = { - government_has_flag = government_is_celestial - tgp_has_access_to_ministry_trigger = yes - } - cp:minister_works = { save_scope_as = councillor } - } - else = { - cp:councillor_steward = { save_scope_as = councillor } - } - $GREAT_PROJECT$ = { - set_variable = { - name = managing_councillor - value = scope:councillor - } - } -} - -natural_disaster_great_project_optional_investment_reward_effect = { - if = { - limit = { this = scope:owner } - if = { - limit = { is_valid_for_legitimacy_change = yes } - add_legitimacy = natural_disaster_great_project_optional_investment_legitimacy_gain_value - } - else = { - add_prestige = medium_prestige_gain - add_piety = medium_piety_gain - } - } - else_if = { - limit = { is_governor = yes } - change_influence = medium_influence_gain - increase_governance_effect = { VALUE = 5 } - } - else = { - add_prestige = major_prestige_gain - add_piety = major_prestige_gain - } - if = { - limit = { - government_allows = merit - this != title:h_china.holder # Chinese Emperor does not "use" merit - } - change_merit = { - value = major_merit_gain - } - } -} - -# OPERATION: 'add' or 'remove' modifier -# MODIFIER: which modifier to add/remove -# YEARS: duration in years, or negative value for permanent -natural_disaster_all_counties_investment_modifier_effect = { - scope:situation ?= { - every_situation_county = { - limit = { holder.top_liege = scope:owner } - custom = every_realm_disaster_county_great_project_custom - if = { - limit = { exists = $YEARS$ } - $OPERATION$_county_modifier = { - modifier = $MODIFIER$ - years = $YEARS$ - } - } - else = { - $OPERATION$_county_modifier = { - modifier = $MODIFIER$ - } - } - } - } -} - -natural_disaster_great_project_save_scopes_effect = { - scope:great_project.var:situation ?= { - save_scope_as = situation - situation_sub_region:disaster_area = { save_scope_as = situation_sub_region } - } -} diff --git a/N3OW/common/scripted_effects/10_dlc_tgp_scripted_effects.txt b/N3OW/common/scripted_effects/10_dlc_tgp_scripted_effects.txt deleted file mode 100644 index df470c40..00000000 --- a/N3OW/common/scripted_effects/10_dlc_tgp_scripted_effects.txt +++ /dev/null @@ -1,9460 +0,0 @@ -spawn_celestial_governance_contract_effect = { - save_scope_as = governor - # Select the Contract Tier (somewhat randomized, based on your experience as a governor) - random_list = { - 30 = { - save_scope_value_as = { - name = governance_task_contract_tier - value = define:NTaskContract|LOW_TASK_CONTRACT_TIER - } - } - 20 = { - save_scope_value_as = { - name = governance_task_contract_tier - value = define:NTaskContract|MEDIUM_TASK_CONTRACT_TIER - } - - modifier = { - add = 10 - has_trait = governor - } - modifier = { - add = 10 - has_trait = governor - has_trait_xp = { - trait = governor - value >= 40 - } - } - } - 10 = { - save_scope_value_as = { - name = governance_task_contract_tier - value = define:NTaskContract|HIGH_TASK_CONTRACT_TIER - } - - modifier = { - add = 10 - has_trait = governor - } - modifier = { - add = 10 - has_trait = governor - has_trait_xp = { - trait = governor - value >= 40 - } - } - modifier = { - add = 20 - has_trait = governor - has_trait_xp = { - trait = governor - value >= 80 - } - } - } - } - - # Select which contract to create - trigger_event = { - on_action = spawn_celestial_governance_contract_on_action - } - - play_sound_effect = "event:/DLC/EP4/SFX/UI/domicile_buildings/tgp_ui_domicile_building_archives_japanese" -} - -remove_other_grand_guardian_modifiers_effect = { - hidden_effect = { # No need to show this - # Let's check for the county opinion modifier first - scope:liege ?= { - # We check and scope to all counties to make sure we remove any stray modifiers in case the capital is moved, etc. - every_realm_county = { - limit = { - any_county_province = { - has_province_modifier = grand_guardian_guard_the_capital_modifier - } - } - every_county_province = { - limit = { - has_province_modifier = grand_guardian_guard_the_capital_modifier - } - remove_province_modifier = grand_guardian_guard_the_capital_modifier - } - } - } - } -} - -### Grand Mentor Task Effects ### -grand_mentor_mentoring_skill_effect = { - send_interface_toast = { - type = event_royal_court_good_with_text - title = grand_mentor_mentoring_title - desc = grand_mentor_mentoring_notification_desc - left_icon = root - right_icon = scope:target_character - - scope:target_character = { add_$SKILL$_skill = 1 } - } -} - -grand_mentor_mentoring_merit_effect = { - send_interface_toast = { - type = event_royal_court_good_with_text - title = grand_mentor_mentoring_title - desc = grand_mentor_mentoring_notification_desc - left_icon = root - right_icon = scope:target_character - - scope:target_character = { change_merit = major_merit_gain } - } -} - -grand_mentor_mentoring_trait_xp_effect = { - send_interface_toast = { - type = event_royal_court_good_with_text - title = grand_mentor_mentoring_title - desc = grand_mentor_mentoring_notification_desc - left_icon = root - right_icon = scope:target_character - - scope:target_character = { - add_trait_xp = { - trait = $TRAIT$ - value = 5 - } - } - } -} - -grand_mentor_mentoring_trait_track_xp_effect = { - send_interface_toast = { - type = event_royal_court_good_with_text - title = grand_mentor_mentoring_title - desc = grand_mentor_mentoring_notification_desc - left_icon = root - right_icon = scope:target_character - - scope:target_character = { - add_trait_xp = { - trait = $TRAIT$ - track = $TRACK$ - value = 5 - } - } - } -} - -# Rewards for contributing to upgrading the great wall -contributor_great_wall_reward_effect = { - if = { - limit = { - this != scope:owner - is_alive = yes - } - send_interface_toast = { - title = great_project_contribution_msg_t - left_icon = root - right_icon = scope:owner - - if = { - limit = { - government_allows = merit - } - change_merit = monumental_merit_gain - } - if = { - limit = { - government_allows = administrative - } - change_influence = monumental_influence_gain - } - else = { - add_prestige = major_prestige_gain - } - } - } -} - -great_project_notify_completion = { - $CHARACTER$ ?= { - send_interface_toast = { - type = event_generic_neutral_text - title = great_project_completed_msg_t - left_icon = scope:founder - right_icon = scope:province.county - desc = great_project_completed_msg_desc - } - } -} - -# root = contributor -great_project_notify_contribution = { - if = { - limit = { - this != scope:owner - } - scope:owner ?= { - send_interface_toast = { - type = event_generic_good_with_text - title = great_project_contributed_msg_t - desc = great_project_contributed_msg_desc - left_icon = root - right_icon = scope:great_project.great_project_location.county - } - } - } -} - -# If both owner and contributor are part of the Dynastic Cycle, trigger the contribution catalyst -great_project_contribution_catalyst_effect = { - if = { - limit = { - this != scope:owner - scope:owner ?= { - any_character_situation = { - situation_type = dynastic_cycle - } - } - OR = { - scope:great_project.great_project_type = great_project_type:great_wall - scope:great_project.great_project_type = great_project_type:great_wall_extend_to_shanhai_pass - scope:great_project.great_project_type = great_project_type:great_wall_extend_to_liaodong - scope:great_project.great_project_type = great_project_type:minister_project_establish_control - } - } - random_character_situation = { - limit = { situation_type = dynastic_cycle } - switch = { - trigger = scope:great_project.great_project_type - great_project_type:great_wall = { trigger_situation_catalyst = catalyst_great_project_great_wall_contribution } - great_project_type:great_wall_extend_to_shanhai_pass = { trigger_situation_catalyst = catalyst_great_project_great_wall_contribution } - great_project_type:great_wall_extend_to_liaodong = { trigger_situation_catalyst = catalyst_great_project_great_wall_contribution } - great_project_type:minister_project_establish_control = { trigger_situation_catalyst = catalyst_great_project_establish_control_contribution } - } - } - } -} - -# root = contributor -great_project_reward_contribution_completion_notification_effect = { - if = { - limit = { this != scope:owner } - send_interface_toast = { - title = great_project_contribution_msg_t - left_icon = root - right_icon = scope:owner - - great_project_contribution_completion_reward_$LEVEL$_effect = { EXTRA_EFFECT = $NON_OWNER_REWARD_EFFECT$ } - } - } - else = { - send_interface_toast = { - title = great_project_contribution_msg_t - left_icon = root - right_icon = scope:province - - great_project_contribution_completion_reward_$LEVEL$_effect = { EXTRA_EFFECT = $OWNER_REWARD_EFFECT$ } - } - } -} - -great_project_contribution_completion_reward_major_effect = { - great_project_reward_contribution_completion_actual_reward_effect = { - LEGITIMACY_GAIN = minor_legitimacy_gain - INFLUENCE_GAIN = medium_influence_gain - GOVERNANCE_GAIN = 5 - PRESTIGE_GAIN_WITH_GOVERNANCE = minor_prestige_gain - PRESTIGE_GAIN_FALLBACK = major_prestige_gain - MERIT_GAIN = minor_merit_gain - EXTRA_EFFECT = $EXTRA_EFFECT$ - } -} - -great_project_contribution_completion_reward_minor_effect = { - great_project_reward_contribution_completion_actual_reward_effect = { - LEGITIMACY_GAIN = miniscule_legitimacy_gain - INFLUENCE_GAIN = minor_influence_gain - GOVERNANCE_GAIN = 2 - PRESTIGE_GAIN_WITH_GOVERNANCE = miniscule_prestige_gain - PRESTIGE_GAIN_FALLBACK = minor_prestige_gain - MERIT_GAIN = miniscule_merit_gain - EXTRA_EFFECT = $EXTRA_EFFECT$ - } -} - -great_project_reward_contribution_completion_actual_reward_effect = { - if = { - limit = { - is_valid_for_legitimacy_change = yes - } - add_legitimacy = { - value = $LEGITIMACY_GAIN$ - if = { - limit = { - any_character_situation = { - situation_type = dynastic_cycle - has_situation_top_phase_parameter = dynastic_cycle_great_projects_increased_legitimacy - } - } - multiply = 2 - } - } - } - else = { - if = { - limit = { government_allows = administrative } - change_influence = $INFLUENCE_GAIN$ - } - - if = { - limit = { is_governor = yes } - increase_governance_effect = { VALUE = $GOVERNANCE_GAIN$ } - add_prestige = $PRESTIGE_GAIN_WITH_GOVERNANCE$ - } - else = { - add_prestige = $PRESTIGE_GAIN_FALLBACK$ - } - if = { - limit = { - government_allows = merit - this != title:h_china.holder # Chinese Emperor does not "use" merit - } - change_merit = $MERIT_GAIN$ - } - } - $EXTRA_EFFECT$ = yes -} - -great_project_reward_contribution_completion_stewardship_xp = { - add_stewardship_lifestyle_xp = medium_lifestyle_xp -} - -# This is cursed but necessary for the string substitution in great_project_reward_contribution_completion effects to work -great_project_reward_contribution_completion_null = {} - -spawn_natural_disaster_contract_effect = { - if = { - limit = { - is_governor = yes - trigger_if = { - limit = { is_ai = yes } - is_available = yes - } - } - save_scope_as = governor - # Select the Contract Tier (somewhat randomized, based on your experience as a governor) - random_list = { - 30 = { - save_scope_value_as = { - name = governance_task_contract_tier - value = define:NTaskContract|LOW_TASK_CONTRACT_TIER - } - } - 20 = { - save_scope_value_as = { - name = governance_task_contract_tier - value = define:NTaskContract|MEDIUM_TASK_CONTRACT_TIER - } - - modifier = { - add = 10 - has_trait = governor - } - modifier = { - add = 10 - has_trait = governor - has_trait_xp = { - trait = governor - value >= 40 - } - } - } - 10 = { - save_scope_value_as = { - name = governance_task_contract_tier - value = define:NTaskContract|HIGH_TASK_CONTRACT_TIER - } - - modifier = { - add = 10 - has_trait = governor - } - modifier = { - add = 10 - has_trait = governor - has_trait_xp = { - trait = governor - value >= 40 - } - } - modifier = { - add = 20 - has_trait = governor - has_trait_xp = { - trait = governor - value >= 80 - } - } - } - } - - # Select which contract to create - trigger_event = { - on_action = spawn_natural_disaster_contract_on_action - } - - play_sound_effect = "event:/DLC/EP4/SFX/UI/domicile_buildings/tgp_ui_domicile_building_archives_japanese" - } -} -# root = scope:character -# requires a scope:situation_participant_group to be saved beforehand -# ran on game start through the dynastic cycle script and on character joining a movement -set_movement_leader_and_power_effect = { - save_scope_as = char - bring_disciples_to_movement_effect = yes - scope:situation_participant_group = { - # set root as leader if leader doesn't exist yet - if = { - limit = { - NOT = { exists = var:movement_leader } - } - set_variable = { - name = movement_leader - value = scope:char - } - } - # update movement power - set_variable = { - name = movement_power - value = movement_power_value - } - } -} -# root = scope:character -# requires a scope:situation_participant_group to be saved beforehand -bring_disciples_to_movement_effect = { - #all of your disciples should always follow you - save_temporary_scope_as = recipient #for loc - every_relation = { - type = disciple - custom = every_disciple_joins_movement - scope:situation_participant_group = { - switch = { - trigger = participant_group_type - expansion_movement = { - custom_tooltip = celestial_switch_movement_to_expansion_tt - prev = { - if = { - limit = { - is_ai = no - } - run_interaction = { - interaction = celestial_ask_to_switch_movements_interaction - actor = scope:recipient - recipient = this - send_threshold = decline - } - } - else = { - set_variable = { - name = movement_member - value = flag:expansion - } - } - } - } - advancement_movement = { - custom_tooltip = celestial_switch_movement_to_advancement_tt - prev = { - if = { - limit = { - is_ai = no - } - run_interaction = { - interaction = celestial_ask_to_switch_movements_interaction - actor = scope:recipient - recipient = this - send_threshold = decline - } - } - else = { - set_variable = { - name = movement_member - value = flag:advancement - } - } - } - } - pro_hegemon_movement = { - custom_tooltip = celestial_switch_movement_to_pro_hegemon_tt - prev = { - if = { - limit = { - is_ai = no - } - run_interaction = { - interaction = celestial_ask_to_switch_movements_interaction - actor = scope:recipient - recipient = this - send_threshold = decline - } - } - else = { - set_variable = { - name = movement_member - value = flag:pro_hegemon - } - } - } - } - conservative_movement = { - custom_tooltip = celestial_switch_movement_to_conservative_tt - prev = { - if = { - limit = { - is_ai = no - } - run_interaction = { - interaction = celestial_ask_to_switch_movements_interaction - actor = scope:recipient - recipient = this - send_threshold = decline - } - } - else = { - set_variable = { - name = movement_member - value = flag:conservative - } - } - } - } - } - } - custom_tooltip = every_disciple_adds_movement_power_tt - hidden_effect = { recalculate_participant_group = situation:dynastic_cycle } - } -} - -# root = scope:situation_participant_group -# Fallback configuration of making sure we have a movement leader -# We run this on the yearly pulse through the dynastic cycle script and on character leaving a movement -update_movement_leader_effect = { - ordered_situation_group_participant = { - order_by = var:movement_power # just set the character with highest movement_power - scope:situation_participant_group = { - set_variable = { - name = movement_leader - value = prev - } - } - } -} - -# For when a character becomes the new movement leader -# Use in a character scope -make_movement_leader_effect = { - save_temporary_scope_as = new_movement_leader - if = { - limit = { - any_character_situation = { - situation_type = dynastic_cycle - any_participant_group = { - participant_group_has_character = scope:new_movement_leader - NOR = { # Is not a group without a leader - participant_group_type = hegemon_ruler - participant_group_type = undecided_movement - participant_group_type = other_rulers - } - save_temporary_scope_as = leaders_movement - } - } - } - custom_description = { - text = make_movement_leader_effect_desc - subject = scope:new_movement_leader - object = scope:leaders_movement - situation:dynastic_cycle ?= { - random_participant_group = { - limit = { - participant_group_has_character = scope:new_movement_leader - } - set_variable = { - name = movement_leader - value = scope:new_movement_leader - } - } - } - } - if = { - limit = { - scope:debate_loser ?= { - this != scope:new_movement_leader - var:movement_power < scope:new_movement_leader.var:movement_power - } - } - switch = { - trigger = scope:leaders_movement - situation:dynastic_cycle.situation_participant_group:expansion_movement = { - tgp_activate_catalyst_against_hegemon_effect = { - HEGEMON = scope:new_movement_leader.top_liege - CATALYST = catalyst_movement_gained_power_expansion - } - } - situation:dynastic_cycle.situation_participant_group:advancement_movement = { - tgp_activate_catalyst_against_hegemon_effect = { - HEGEMON = scope:new_movement_leader.top_liege - CATALYST = catalyst_movement_gained_power_advancement - } - } - situation:dynastic_cycle.situation_participant_group:conservative_movement = { - tgp_activate_catalyst_against_hegemon_effect = { - HEGEMON = scope:new_movement_leader.top_liege - CATALYST = catalyst_movement_gained_power_conservative - } - } - situation:dynastic_cycle.situation_participant_group:pro_hegemon_movement = { - tgp_activate_catalyst_against_hegemon_effect = { - HEGEMON = scope:new_movement_leader.top_liege - CATALYST = catalyst_movement_gained_power_pro_hegemon - } - } - } - } - } -} - -# root = scope:situation_participant_group -# ran on yearly pulse through the dynastic cycle script and on character leaving a movement -update_movement_power_effect = { - set_variable = { - name = movement_power - value = movement_power_value - } -} - -# root = scope:character -update_character_movement_power_individual_effect = { - set_variable = { - name = movement_power_individual - value = movement_power_character_individual_value - } -} - -# root = scope:characte -update_character_movement_power_disciples_effect = { - set_variable = { - name = movement_power_disciples - value = { - value = every_disciple_movement_power_value - multiply = 0.25 - } - } -} - -# root = scope:character -# ran on yearly pulse through the dynastic cycle script and on character leaving a movement -update_character_movement_power_effect = { - update_character_movement_power_individual_effect = yes - update_character_movement_power_disciples_effect = yes - set_variable = { - name = movement_power - value = { - add = { - value = var:movement_power_individual - } - add = { - value = var:movement_power_disciples - } - } - } -} - -change_bureaucracy_laws_increase_effect = { - scope:hegemon = { - change_realm_law_level = { law_group = celestial_bureaucracy change = 1 } - } -} -change_bureaucracy_laws_decrease_effect = { - scope:hegemon = { - change_realm_law_level = { law_group = celestial_bureaucracy change = -1 } - } -} -change_army_laws_increase_effect = { - scope:hegemon = { - change_realm_law_level = { law_group = celestial_army_liege_law change = 1 } - } -} -change_army_laws_decrease_effect = { - scope:hegemon = { - change_realm_law_level = { law_group = celestial_army_liege_law change = -1 } - } -} -change_province_metropolitan_effect = { - if = { - limit = { - NOT = { exists = scope:province_change_recipient } - } - custom_tooltip = change_province_metropolitan_effect.no_scope - } - else = { - scope:province_change_recipient = { - vassal_contract_set_obligation_level = { - type = celestial_provinces - level = 2 - } - hidden_effect = { - set_vassal_contract_modification_blocked = yes - add_realm_law_skip_effects = celestial_appointment_succession_law - } - } - } -} -change_province_industrial_effect = { - if = { - limit = { - NOT = { exists = scope:province_change_recipient } - } - custom_tooltip = change_province_industrial_effect.no_scope - } - else = { - scope:province_change_recipient = { - vassal_contract_set_obligation_level = { - type = celestial_provinces - level = 1 - } - hidden_effect = { - set_vassal_contract_modification_blocked = yes - add_realm_law_skip_effects = celestial_appointment_succession_law - } - } - } -} -change_province_military_effect = { - if = { - limit = { - NOT = { exists = scope:province_change_recipient } - } - custom_tooltip = change_province_military_effect.no_scope - } - else = { - scope:province_change_recipient = { - vassal_contract_set_obligation_level = { - type = celestial_provinces - level = 3 - } - hidden_effect = { - set_vassal_contract_modification_blocked = yes - add_realm_law_skip_effects = celestial_military_appointment_succession_law - } - } - } -} -change_province_protectorate_effect = { - if = { - limit = { - NOT = { exists = scope:province_change_recipient } - } - custom_tooltip = change_province_protectorate_effect.no_scope - } - else = { - scope:province_change_recipient = { - vassal_contract_set_obligation_level = { - type = celestial_provinces - level = 4 - } - hidden_effect = { - set_vassal_contract_modification_blocked = yes - add_realm_law_skip_effects = celestial_military_appointment_succession_law - } - } - } -} -hold_examinations_effect = { - custom_tooltip = celestial_movement_demands_interaction.tt.hold_examinations_effect - hidden_effect = { - scope:hegemon = { - add_character_flag = { - flag = examinations_ai_override - } - ai_attempt_to_host_activity = activity_imperial_examination - } - } -} -change_retirement_law_increase_effect = { - scope:hegemon = { - change_realm_law_level = { law_group = celestial_retirement_law change = -1 } - } -} -change_retirement_law_decrease_effect = { - scope:hegemon = { - change_realm_law_level = { law_group = celestial_retirement_law change = 1 } - } -} -change_candidate_score_law_effect = { - scope:hegemon = { - if = { - limit = { - has_realm_law = candidate_score_merit_law - } - add_realm_law_skip_effects = candidate_score_prestige_law - } - else = { - add_realm_law_skip_effects = candidate_score_merit_law - } - } -} -increase_budget_salary_effect = { - scope:hegemon = { - if = { - limit = { - scope:petitioner.var:budget_change ?= flag:decrease_ministry - } - change_realm_law_level = { law_group = budget_allocation_salary_law change = 1 } - change_realm_law_level = { law_group = budget_allocation_ministry_law change = -1 } - } - else = { - change_realm_law_level = { law_group = budget_allocation_salary_law change = 1 } - change_realm_law_level = { law_group = budget_allocation_military_law change = -1 } - - } - enact_treasury_budgets_no_costs = yes - } -} -increase_budget_ministry_effect = { - scope:hegemon = { - if = { - limit = { - scope:petitioner.var:budget_change ?= flag:decrease_salary - } - change_realm_law_level = { law_group = budget_allocation_ministry_law change = 1 } - change_realm_law_level = { law_group = budget_allocation_salary_law change = -1 } - } - else = { - change_realm_law_level = { law_group = budget_allocation_ministry_law change = 1 } - change_realm_law_level = { law_group = budget_allocation_military_law change = -1 } - - } - enact_treasury_budgets_no_costs = yes - } -} -increase_budget_military_effect = { - scope:hegemon = { - if = { - limit = { - scope:petitioner.var:budget_change ?= flag:decrease_ministry - } - change_realm_law_level = { law_group = budget_allocation_military_law change = 1 } - change_realm_law_level = { law_group = budget_allocation_ministry_law change = -1 } - } - else = { - change_realm_law_level = { law_group = budget_allocation_military_law change = 1 } - change_realm_law_level = { law_group = budget_allocation_salary_law change = -1 } - - } - enact_treasury_budgets_no_costs = yes - } -} - -grant_movement_petition_tooltip_effect = { - show_as_tooltip = { - switch = { - trigger = scope:movement_petition_effect - flag:change_bureaucracy_laws_increase = { - change_bureaucracy_laws_increase_effect = yes - } - flag:change_bureaucracy_laws_decrease = { - change_bureaucracy_laws_decrease_effect = yes - } - flag:change_army_laws_increase = { - change_army_laws_increase_effect = yes - } - flag:change_army_laws_decrease = { - change_army_laws_decrease_effect = yes - } - flag:change_province_metropolitan = { - change_province_metropolitan_effect = yes - } - flag:change_province_industrial = { - change_province_industrial_effect = yes - } - flag:change_province_military = { - change_province_military_effect = yes - } - flag:change_province_protectorate = { - change_province_protectorate_effect = yes - } - flag:hold_examinations = { - hold_examinations_effect = yes - } - flag:change_retirement_law_increase = { - change_retirement_law_increase_effect = yes - } - flag:change_retirement_law_decrease = { - change_retirement_law_decrease_effect = yes - } - flag:change_candidate_score_law = { - change_candidate_score_law_effect = yes - } - flag:increase_budget_salary = { - increase_budget_salary_effect = yes - } - flag:increase_budget_ministry = { - increase_budget_ministry_effect = yes - } - flag:increase_budget_military = { - increase_budget_military_effect = yes - } - } - situation:dynastic_cycle ?= { - if = { - limit = { - situation_top_has_catalyst = catalyst_hegemon_influenced_by_interaction - } - trigger_situation_catalyst = { - catalyst = catalyst_hegemon_influenced_by_interaction - character = scope:petitioner - } - } - } - scope:hegemon = { - add_legitimacy_effect = { LEGITIMACY = miniscule_legitimacy_gain } - } - #set a cooldown variable in case the leader changes - scope:actors_movement = { - petition_change_movement_power_effect = { - VALUE = 100 - } - set_variable = { - name = recent_movement_petition - value = scope:petitioner - years = 3 - } - } - } -} -grant_movement_petition_effect = { - switch = { - trigger = scope:petitioner.var:movement_petition - flag:change_bureaucracy_laws_increase = { - change_bureaucracy_laws_increase_effect = yes - } - flag:change_bureaucracy_laws_decrease = { - change_bureaucracy_laws_decrease_effect = yes - } - flag:change_army_laws_increase = { - change_army_laws_increase_effect = yes - } - flag:change_army_laws_decrease = { - change_army_laws_decrease_effect = yes - } - flag:change_province_metropolitan = { - change_province_metropolitan_effect = yes - } - flag:change_province_industrial = { - change_province_industrial_effect = yes - } - flag:change_province_military = { - change_province_military_effect = yes - } - flag:change_province_protectorate = { - change_province_protectorate_effect = yes - } - flag:hold_examinations = { - hold_examinations_effect = yes - } - flag:change_retirement_law_increase = { - change_retirement_law_increase_effect = yes - } - flag:change_retirement_law_decrease = { - change_retirement_law_decrease_effect = yes - } - flag:change_candidate_score_law = { - change_candidate_score_law_effect = yes - } - flag:increase_budget_salary = { - increase_budget_salary_effect = yes - } - flag:increase_budget_ministry = { - increase_budget_ministry_effect = yes - } - flag:increase_budget_military = { - increase_budget_military_effect = yes - } - } - situation:dynastic_cycle ?= { - if = { - limit = { - situation_top_has_catalyst = catalyst_hegemon_influenced_by_interaction - } - trigger_situation_catalyst = { - catalyst = catalyst_hegemon_influenced_by_interaction - character = scope:petitioner - } - } - } - scope:hegemon = { - add_legitimacy_effect = { LEGITIMACY = miniscule_legitimacy_gain } - } - #set a cooldown variable in case the leader changes - scope:actors_movement = { - petition_change_movement_power_effect = { - VALUE = 100 - } - set_variable = { - name = recent_movement_petition - value = scope:petitioner - years = 3 - } - } -} - -refuse_movement_petition_effect = { - send_interface_message = { - type = event_diplomacy_bad - title = tgp_decision_events.0103.b_title - left_icon = scope:petition_recipient - add_opinion = { - modifier = hegemon_refused_faction_demands_modifier - target = scope:petition_recipient - years = 5 - } - scope:hegemon = { - add_legitimacy_effect = { LEGITIMACY = miniscule_legitimacy_loss } - if = { - limit = { - scope:petitioner.var:movement_petition ?= flag:hold_examinations - } - situation:dynastic_cycle = { - if = { - limit = { - situation_top_has_catalyst = catalyst_imperial_examinations_gap_short_yearly - exists = title:h_china.var:years_since_imperial_examination - title:h_china.var:years_since_imperial_examination >= catalyst_imperial_examinations_gap_short_yearly_value - } - trigger_situation_catalyst = { - catalyst = catalyst_imperial_examinations_gap_short_yearly - character = scope:petitioner - } - } - if = { - limit = { - situation_top_has_catalyst = catalyst_imperial_examinations_gap_long_yearly - exists = title:h_china.var:years_since_imperial_examination - title:h_china.var:years_since_imperial_examination >= catalyst_imperial_examinations_gap_long_yearly_value - } - trigger_situation_catalyst = { - catalyst = catalyst_imperial_examinations_gap_long_yearly - character = scope:petitioner - } - } - } - } - } - scope:actors_movement = { - petition_change_movement_power_effect = { - VALUE = -100 - } - } - } -} - -display_movement_petition_recipient_acceptance_chance_effect = { - if = { - limit = { - movement_demands_acceptance_value > 100 - } - custom_tooltip = movement_petition_decision.recipient_will_accept - } - else_if = { - limit = { - movement_demands_acceptance_value >= 50 - } - custom_tooltip = movement_petition_decision.recipient_may_accept - } - else_if = { - limit = { - movement_demands_acceptance_value >= 0 - } - custom_tooltip = movement_petition_decision.recipient_may_refuse - } - else = { - custom_tooltip = movement_petition_decision.recipient_will_refuse - } -} - -display_movement_petition_recipient_acceptance_effect = { - display_movement_petition_recipient_acceptance_chance_effect = yes - show_as_tooltip = { - random_list = { - 1 = { - show_chance = no - desc = tgp_decision_events.0102.petition_accepted - grant_movement_petition_tooltip_effect = yes - } - 1 = { - show_chance = no - desc = tgp_decision_events.0102.petition_refused - refuse_movement_petition_effect = yes - } - } - } -} - -# Makes the targeted movement become empowered -# Scope is situation_participant_group -make_movement_favored_effect = { - save_scope_as = movement_to_be_favored - custom_description = { - text = new_movement_becomes_favored_desc - object = scope:movement_to_be_favored - situation:dynastic_cycle ?= { - random_participant_group = { - limit = { - has_variable = movement_favored - } - set_variable = { - name = movement_unfavored - days = 1 - } - remove_variable = movement_favored - } - scope:movement_to_be_favored = { - set_variable = movement_favored - } - } - } - custom_tooltip = new_movement_becomes_favored_power_increase - - situation:dynastic_cycle ?= { - random_participant_group = { - limit = { - has_variable = movement_unfavored - } - save_scope_as = movement_to_be_unfavored - } - } - if = { - limit = { - exists = scope:movement_to_be_unfavored - } - custom_tooltip = new_movement_becomes_favored_power_decrease - } -} - -# ELDER = scope:character that should become the elder of the relation -# DISCIPLE = scope:character that should become the disciple of the relation -# MERIT = amount of merit the Elder will gain, can be set to 0 for no gain -set_elder_relation_effect = { - $DISCIPLE$ = { - save_scope_as = new_disciple - random_relation = { - type = elder - save_scope_as = old_elder - } - } - $ELDER$ = { - save_scope_as = new_elder - } - if = { - limit = { - # no circular relations please - NOT = { - scope:new_disciple = { - has_relation_elder = scope:new_elder - } - } - # Disciple does not have a higher merit rank than the elder - # The elder can have more disciples - scope:new_elder = { - eligible_for_elder_trigger = { - DISCIPLE = scope:new_disciple - } - } - } - scope:new_disciple = { - # in case you already had an elder, remove the relation and send them a letter - if = { - limit = { - exists = scope:old_elder - } - remove_relation_elder = scope:old_elder - save_scope_as = actor #for loc in tgp_interaction_event.0030 - scope:old_elder = { - add_opinion = { - target = scope:new_disciple - modifier = refused_to_be_disciple_opinion - opinion = -50 - } - save_scope_as = recipient #for loc in tgp_interaction_event.0030 - trigger_event = tgp_interaction_event.0030 - } - } - set_relation_elder = scope:new_elder - } - scope:new_elder = { - add_merit_if_relevant_effect = { - MERIT = $MERIT$ - } - } - } -} - -# Skips the opinion loss and the breakup event -set_elder_relation_no_breakup_effect = { - $DISCIPLE$ = { - save_scope_as = new_disciple - random_relation = { - type = elder - save_scope_as = old_elder - } - } - $ELDER$ = { - save_scope_as = new_elder - } - if = { - limit = { - # no circular relations please - NOT = { - scope:new_disciple = { - has_relation_elder = scope:new_elder - } - } - # Disciple does not have a higher merit rank than the elder - # The elder can have more disciples - scope:new_elder = { - eligible_for_elder_trigger = { - DISCIPLE = scope:new_disciple - } - } - } - scope:new_disciple = { - # in case you already had an elder, remove the relation and send them a letter - if = { - limit = { - exists = scope:old_elder - } - remove_relation_elder = scope:old_elder - } - set_relation_elder = scope:new_elder - } - scope:new_elder = { - add_merit_if_relevant_effect = { - MERIT = minor_merit_value - } - } - } -} - -# This effect improves Development in Celestial Tributaries' capital provinces, for as long as they have the Trade Investiture and as long as it's below the Development level of China's capital province -develop_celestial_tributaries = { - if = { - limit = { - subject_contract_has_flag = celestial_investiture_trade - capital_county.development_level < overlord.capital_county.development_level - subject_standing > 10 - } - save_scope_value_as = { - name = tributary_capital_development_growth - value = { - add = { # ratio of how close they are in development - add = capital_county.development_level - divide = overlord.capital_county.development_level - } - subtract = 1 - multiply = -1 - multiply = { # ratio of subject standing, with a minimum value to make at least something happen - add = subject_standing - divide = 100 - min = 0.2 - } - multiply = celestial_investiture_trade_bonus_max - add = { # to make it feel a bit more dynamic - fixed_range = { - min = -5 - max = 5 - } - } - } - } - if = { - limit = { scope:tributary_capital_development_growth >= 1 } - send_interface_message = { - type = msg_tributary_capital_province_development_growth - title = msg_tributary_capital_province_development_growth_title - desc = msg_tributary_capital_province_development_growth_desc - - left_icon = root - right_icon = overlord - - capital_county = { - change_development_progress_with_overflow = scope:tributary_capital_development_growth - } - } - } - } -} - -pledge_loyalty_to_liege_refund_and_cleanup_effect = { - send_interface_toast = { - type = event_toast_effect_neutral - title = pledge_loyalty_to_liege_costs_refunded - left_icon = root - # Remove variable preventing you from kneeling before liege again - if = { - limit = { - has_variable = pledge_loyalty_to_liege_grace - exists = liege - var:pledge_loyalty_to_liege_grace = liege - } - remove_variable = pledge_loyalty_to_liege_grace - } - # refund any costs - if = { - limit = { - has_variable = pledge_loyalty_to_liege_gold_value - } - add_gold = var:pledge_loyalty_to_liege_gold_value - } - switch = { - trigger = has_trait - shy = { add_stress = medium_stress_impact_loss } - arrogant = { add_stress = medium_stress_impact_loss } - } - } - # Variable cleanup - if = { - limit = { has_variable = homage_type } - remove_variable = homage_type - } - # Contract - if = { - limit = { has_variable = pledge_loyalty_to_liege_contract_type } - remove_variable = pledge_loyalty_to_liege_contract_type - } - # Liege - if = { - limit = { has_variable = pledge_loyalty_to_liege_scope } - remove_variable = pledge_loyalty_to_liege_scope - } - if = { - limit = { has_variable = pledge_loyalty_to_liege_gold_value } - remove_variable = pledge_loyalty_to_liege_gold_value - } -} - -#Adds Merit if your government has it -#Required Parameter MERIT -#Reminder, the values are -#miniscule_merit_value -#minor_merit_value -#medium_merit_value -#major_merit_value -#massive_merit_value -#monumental_merit_value -add_merit_if_relevant_effect = { - if = { - limit = { - government_has_flag = government_has_merit - top_liege != this - $MERIT$ != 0 - } - change_merit = $MERIT$ - } -} - -#use this in SCHEMES to temporarily increase or decrease movement power of a character or movement -scheme_change_movement_power_effect = { - save_scope_value_as = { - name = movement_power_scheme_effect_value - value = { - value = $VALUE$ - multiply = 100 - } - } - if = { - limit = { - scope:movement_power_scheme_effect_value >= 0 - } - if = { - limit = { - exists = var:movement_power_increased_scheme - } - set_variable = { - name = movement_power_increased_scheme - value = { - value = var:movement_power_increased_scheme - add = $VALUE$ - } - } - } - else = { - set_variable = { - name = movement_power_increased_scheme - value = $VALUE$ - } - } - } - else = { - if = { - limit = { - exists = var:movement_power_decreased_scheme - } - set_variable = { - name = movement_power_decreased_scheme - value = { - value = var:movement_power_decreased_scheme - add = $VALUE$ - } - } - } - else = { - set_variable = { - name = movement_power_decreased_scheme - value = $VALUE$ - } - } - } - #force the update of variables to immediately show changes - if = { #for characters - limit = { - exists = var:movement_power_individual - } - if = { - limit = { - scope:movement_power_scheme_effect_value >= 0 - } - custom_tooltip = movement_power_scheme.tt.increased_character - } - else = { - custom_tooltip = movement_power_scheme.tt.decreased_character - } - update_character_movement_power_effect = yes - top_participant_group:dynastic_cycle ?= { - update_movement_power_effect = yes - } - } - else = { #for movements - if = { - limit = { - scope:movement_power_scheme_effect_value >= 0 - } - custom_tooltip = movement_power_scheme.tt.increased_movement - } - else = { - custom_tooltip = movement_power_scheme.tt.decreased_movement - } - update_movement_power_effect = yes - } -} - -#use this in EVENTS to temporarily increase or decrease movement power of a character or movement -event_change_movement_power_effect = { - if = { - limit = { - $VALUE$ >= 0 - } - if = { - limit = { - exists = var:movement_power_increased_event - } - set_variable = { - name = movement_power_increased_event - value = { - value = var:movement_power_increased_event - add = $VALUE$ - } - } - } - else = { - set_variable = { - name = movement_power_increased_event - value = $VALUE$ - } - } - - } - else = { - if = { - limit = { - exists = var:movement_power_decreased_event - } - set_variable = { - name = movement_power_decreased_event - value = { - value = var:movement_power_decreased_event - add = $VALUE$ - } - } - } - else = { - set_variable = { - name = movement_power_decreased_event - value = $VALUE$ - } - } - } - #force the update of variables to immediately show changes - if = { #for characters - limit = { - exists = var:movement_power_individual - } - update_character_movement_power_effect = yes - top_participant_group:dynastic_cycle ?= { - update_movement_power_effect = yes - } - } - else = { #for movements - update_movement_power_effect = yes - } -} - -#use this in PETITION to temporarily increase or decrease movement power of a character or movement -petition_change_movement_power_effect = { - save_scope_value_as = { - name = petition_modifies_movement_power_value - value = $VALUE$ - } - if = { - limit = { - NOT = { - participant_group_type = undecided_movement - } - } - if = { - limit = { - $VALUE$ >= 0 - } - custom_tooltip = { - text = petition_increase_movement_power_effect_tooltip - if = { - limit = { - exists = var:movement_power_increased_petition - } - set_variable = { - name = movement_power_increased_petition - value = { - value = var:movement_power_increased_petition - add = $VALUE$ - } - } - } - else = { - set_variable = { - name = movement_power_increased_petition - value = $VALUE$ - } - } - } - } - else = { - custom_tooltip = { - text = petition_decrease_movement_power_effect_tooltip - if = { - limit = { - exists = var:movement_power_decreased_petition - } - set_variable = { - name = movement_power_decreased_petition - value = { - value = var:movement_power_decreased_petition - add = $VALUE$ - } - } - } - else = { - set_variable = { - name = movement_power_decreased_petition - value = $VALUE$ - } - } - } - } - #force the update of variables to immediately show changes - if = { #for characters - limit = { - exists = var:movement_power_individual - } - update_character_movement_power_effect = yes - top_participant_group:dynastic_cycle ?= { - update_movement_power_effect = yes - } - } - else = { #for movements - update_movement_power_effect = yes - } - } -} - -# update the variables on yearly pulse towards 0 and remove it if they reach it -update_modified_movement_power_effect = { - if = { - limit = { - exists = var:movement_power_increased_scheme - } - change_variable = { - name = movement_power_increased_scheme - add = movement_power_increased_scheme_decay_value - } - if = { - limit = { var:movement_power_increased_scheme <= 0 } - remove_variable = movement_power_increased_scheme - } - } - if = { - limit = { - exists = var:movement_power_decreased_scheme - } - change_variable = { - name = movement_power_decreased_scheme - add = movement_power_decreased_scheme_decay_value - } - if = { - limit = { var:movement_power_decreased_scheme >= 0 } - remove_variable = movement_power_decreased_scheme - } - } - if = { - limit = { - exists = var:movement_power_increased_event - } - change_variable = { - name = movement_power_increased_event - add = movement_power_increased_event_decay_value - } - if = { - limit = { var:movement_power_increased_event <= 0 } - remove_variable = movement_power_increased_event - } - } - if = { - limit = { - exists = var:movement_power_decreased_event - } - change_variable = { - name = movement_power_decreased_event - add = movement_power_decreased_event_decay_value - } - if = { - limit = { var:movement_power_decreased_event >= 0 } - remove_variable = movement_power_decreased_event - } - } - if = { - limit = { - exists = var:movement_power_increased_petition - } - change_variable = { - name = movement_power_increased_petition - add = movement_power_increased_petition_decay_value - } - if = { - limit = { var:movement_power_increased_petition <= 0 } - remove_variable = movement_power_increased_petition - } - } - if = { - limit = { - exists = var:movement_power_decreased_petition - } - change_variable = { - name = movement_power_decreased_petition - add = movement_power_decreased_petition_decay_value - } - if = { - limit = { var:movement_power_decreased_petition >= 0 } - remove_variable = movement_power_decreased_petition - } - } -} - - -# When scoped character is appointed as a minister -got_minister_position_effect = { - save_scope_as = new_minister - - if = { # If your liege has a ministry, set up titles if needed - limit = { - scope:councillor_liege = { - this != scope:new_minister - tgp_has_access_to_ministry_trigger = yes - } - not = { exists = scope:swapped_position } - } - # Grant the ministry title if councillor doesn't have it - if = { - limit = { - NOT = { has_title = title:$MINISTER_TITLE$ } - } - create_title_and_vassal_change = { - type = appointment - save_scope_as = minister_title_change - add_claim_on_loss = no - } - - if = { - limit = { - scope:councillor_liege = { - tgp_has_access_to_ministry_trigger = yes - } - # retire from other ministry primary titles - scope:new_minister = { - OR = { - primary_title = title:e_minister_chancellor - primary_title = title:e_minister_censor - primary_title = title:e_minister_grand_marshal - primary_title = title:e_minister_of_personnel - primary_title = title:e_minister_of_revenue - primary_title = title:e_minister_of_rites - primary_title = title:e_minister_of_war - primary_title = title:e_minister_of_justice - primary_title = title:e_minister_of_works - } - primary_title != title:$MINISTER_TITLE$ - } - } - primary_title = { - save_scope_as = old_ministry_title - change_title_holder = { - holder = current_heir - change = scope:minister_title_change - } - } - } - - title:$MINISTER_TITLE$ = { - change_title_holder = { - holder = scope:new_minister - change = scope:minister_title_change - } - } - resolve_title_and_vassal_change = scope:minister_title_change - } - # Add the correct title law if it doesn't have it already - if = { - limit = { - exists = title:$MINISTER_TITLE$.holder - title:$MINISTER_TITLE$ = title:e_minister_grand_marshal - NOT = { - title:$MINISTER_TITLE$ = { - has_title_law = celestial_grand_marshal_appointment_succession_law - } - } - } - title:$MINISTER_TITLE$ = { - add_title_law = celestial_grand_marshal_appointment_succession_law - } - } - else_if = { - limit = { - exists = title:$MINISTER_TITLE$.holder - NOR = { - title:$MINISTER_TITLE$ = title:e_minister_grand_marshal - title:$MINISTER_TITLE$ = { - has_title_law = celestial_ministry_appointment_succession_law - } - } - } - title:$MINISTER_TITLE$ = { - add_title_law = celestial_ministry_appointment_succession_law - } - } - - # Make them a minister if they don't have the council position - if = { - limit = { - NOT = { has_council_position = $MINISTER_POSITION$ } - } - top_liege = { - assign_councillor_type = { - type = $MINISTER_POSITION$ - target = scope:new_minister - remove_existing_councillor = yes - } - } - } - # If we have any noble family vassals remaining, let's move them to where they are supposed to be - if = { - limit = { - vassal_count > 0 - } - create_title_and_vassal_change = { - type = granted - save_scope_as = minister_vassal_change - } - every_vassal = { - limit = { - any_held_title = { - is_noble_family_title = yes - } - NOT = { - any_held_title = { - is_noble_family_title = no - } - } - } - change_liege = { - liege = top_liege # I.e. the top liege - change = scope:minister_vassal_change - } - } - resolve_title_and_vassal_change = scope:minister_vassal_change - } - # If the new minister should be the diarch, make it so - if = { - limit = { - OR = { - AND = { - top_liege ?= { - has_realm_law = grand_chancellor_law - } - title:e_minister_chancellor = { - this = title:$MINISTER_TITLE$ - holder = scope:new_minister - } - } - AND = { - top_liege ?= { - has_realm_law = grand_marshal_law - } - title:e_minister_grand_marshal = { - this = title:$MINISTER_TITLE$ - holder = scope:new_minister - } - } - AND = { - top_liege ?= { - has_realm_law = grand_censor_law - } - title:e_minister_censor = { - this = title:$MINISTER_TITLE$ - holder = scope:new_minister - } - } - } - } - top_liege = { - if = { - limit = { - diarch != scope:new_minister - } - if = { - limit = { - NOT = { has_diarchy_type = grand_secretariat } - } - try_start_diarchy = grand_secretariat - } - set_diarch = scope:new_minister - } - } - } - - # Save and track accomplishment for the Gate domicile building - if = { - limit = { - title:e_minister_chancellor = { - this = title:$MINISTER_TITLE$ - holder = scope:new_minister - } - } - scope:new_minister.house ?= { - house_head ?= { - if = { - limit = { - exists = domicile - } - domicile ?= { - set_family_accomplishment_effect = { ACCOMPLISHMENT = family_accomplishment_minister } - } - } - } - } - } - if = { - limit = { - title:e_minister_grand_marshal = { - this = title:$MINISTER_TITLE$ - holder = scope:new_minister - } - } - scope:new_minister.house ?= { - house_head ?= { - if = { - limit = { - exists = domicile - } - domicile ?= { - set_family_accomplishment_effect = { ACCOMPLISHMENT = family_accomplishment_grand_marshal } - } - } - } - } - } - if = { # make sure the minister is participant in the Dynastic Cycle situation - limit = { - NOT = { - any_character_situation = { - situation_type = dynastic_cycle - } - } - top_liege ?= { - any_character_situation = { - situation_type = dynastic_cycle - } - } - } - - situation:dynastic_cycle = { - add_manual_participant = prev - } - } - } -} - -fired_minister_position_effect = { - if = { - limit = { - scope:councillor_liege = { - tgp_has_access_to_ministry_trigger = yes - } - not = { exists = scope:new_councillor } - } - - switch = { - trigger = primary_title - title:e_minister_chancellor = { - if = { - limit = { - exists = title:e_minister_chancellor.current_heir - } - title:e_minister_chancellor.current_heir = { - got_minister_position_effect = { MINISTER_TITLE = e_minister_chancellor MINISTER_POSITION = councillor_chancellor } - } - } - else = { - destroy_title = title:e_minister_chancellor - } - } - title:e_minister_censor = { - if = { - limit = { - exists = title:e_minister_censor.current_heir - } - title:e_minister_censor.current_heir = { - got_minister_position_effect = { MINISTER_TITLE = e_minister_censor MINISTER_POSITION = councillor_spymaster } - } - } - else = { - destroy_title = title:e_minister_censor - } - } - title:e_minister_grand_marshal = { - if = { - limit = { - exists = title:e_minister_grand_marshal.current_heir - } - title:e_minister_grand_marshal.current_heir = { - got_minister_position_effect = { MINISTER_TITLE = e_minister_grand_marshal MINISTER_POSITION = minister_grand_marshal } - } - } - else = { - destroy_title = title:e_minister_grand_marshal - } - } - title:e_minister_of_personnel = { - if = { - limit = { - exists = title:e_minister_of_personnel.current_heir - } - title:e_minister_of_personnel.current_heir = { - got_minister_position_effect = { MINISTER_TITLE = e_minister_of_personnel MINISTER_POSITION = minister_personnel } - } - } - else = { - destroy_title = title:e_minister_of_personnel - } - } - title:e_minister_of_revenue = { - if = { - limit = { - exists = title:e_minister_of_revenue.current_heir - } - title:e_minister_of_revenue.current_heir = { - got_minister_position_effect = { MINISTER_TITLE = e_minister_of_revenue MINISTER_POSITION = councillor_steward } - } - } - else = { - destroy_title = title:e_minister_of_revenue - } - } - title:e_minister_of_rites = { - if = { - limit = { - exists = title:e_minister_of_rites.current_heir - } - title:e_minister_of_rites.current_heir = { - got_minister_position_effect = { MINISTER_TITLE = e_minister_of_rites MINISTER_POSITION = councillor_court_chaplain } - } - } - else = { - destroy_title = title:e_minister_of_rites - } - } - title:e_minister_of_war = { - if = { - limit = { - exists = title:e_minister_of_war.current_heir - } - title:e_minister_of_war.current_heir = { - got_minister_position_effect = { MINISTER_TITLE = e_minister_of_war MINISTER_POSITION = councillor_marshal } - } - } - else = { - destroy_title = title:e_minister_of_war - } - } - title:e_minister_of_justice = { - if = { - limit = { - exists = title:e_minister_of_justice.current_heir - } - title:e_minister_of_justice.current_heir = { - got_minister_position_effect = { MINISTER_TITLE = e_minister_of_justice MINISTER_POSITION = minister_justice } - } - } - else = { - destroy_title = title:e_minister_of_justice - } - } - title:e_minister_of_works = { - if = { - limit = { - exists = title:e_minister_of_works.current_heir - } - title:e_minister_of_works.current_heir = { - got_minister_position_effect = { MINISTER_TITLE = e_minister_of_works MINISTER_POSITION = minister_works } - } - } - else = { - destroy_title = title:e_minister_of_works - } - } - } - } -} - -# Destroy any held ministry title - Use this on a character -destroy_held_ministry_titles_effect = { - save_scope_as = minister_should_lose_ministry_title - if = { - limit = { - OR = { - has_title = title:e_minister_chancellor - has_title = title:e_minister_censor - has_title = title:e_minister_grand_marshal - has_title = title:e_minister_of_personnel - has_title = title:e_minister_of_revenue - has_title = title:e_minister_of_rites - has_title = title:e_minister_of_war - has_title = title:e_minister_of_justice - has_title = title:e_minister_of_works - } - } - every_held_title = { - switch = { - trigger = this - title:e_minister_chancellor = { - scope:minister_should_lose_ministry_title = { destroy_title = title:e_minister_chancellor } - } - title:e_minister_censor = { - scope:minister_should_lose_ministry_title = { destroy_title = title:e_minister_censor } - } - title:e_minister_grand_marshal = { - scope:minister_should_lose_ministry_title = { destroy_title = title:e_minister_grand_marshal } - } - title:e_minister_of_personnel = { - scope:minister_should_lose_ministry_title = { destroy_title = title:e_minister_of_personnel } - } - title:e_minister_of_revenue = { - scope:minister_should_lose_ministry_title = { destroy_title = title:e_minister_of_revenue } - } - title:e_minister_of_rites = { - scope:minister_should_lose_ministry_title = { destroy_title = title:e_minister_of_rites } - } - title:e_minister_of_war = { - scope:minister_should_lose_ministry_title = { destroy_title = title:e_minister_of_war } - } - title:e_minister_of_justice = { - scope:minister_should_lose_ministry_title = { destroy_title = title:e_minister_of_justice } - } - title:e_minister_of_works = { - scope:minister_should_lose_ministry_title = { destroy_title = title:e_minister_of_works } - } - } - } - - situation:dynastic_cycle = { - remove_manual_participant = prev - } - } -} - -# Fill the ministry with valid characters -fill_the_ministry_effect = { - save_scope_as = councillor_liege - # Assign a grand chancellor - if = { - limit = { - OR = { - NOT = { exists = cp:councillor_chancellor } - cp:councillor_chancellor ?= { - NOT = { has_title = title:e_minister_chancellor } - } - } - } - random_vassal = { - limit = { - tgp_can_be_a_minister_trigger = { COURT_OWNER = scope:councillor_liege } - tgp_is_any_minister = no - } - weight = { - base = 1 - modifier = { - add = diplomacy - } - } - got_minister_position_effect = { MINISTER_TITLE = e_minister_chancellor MINISTER_POSITION = councillor_chancellor } - } - } - # Assign an imperial censor - if = { - limit = { - OR = { - NOT = { exists = cp:councillor_spymaster } - cp:councillor_spymaster ?= { - NOT = { has_title = title:e_minister_censor } - } - } - } - random_vassal = { - limit = { - tgp_can_be_a_minister_trigger = { COURT_OWNER = scope:councillor_liege } - tgp_is_any_minister = no - } - weight = { - base = 1 - modifier = { - add = intrigue - } - } - got_minister_position_effect = { MINISTER_TITLE = e_minister_censor MINISTER_POSITION = councillor_spymaster } - } - } - # Assign a grand marshal - if = { - limit = { - OR = { - NOT = { exists = cp:minister_grand_marshal } - cp:minister_grand_marshal ?= { - NOT = { has_title = title:e_minister_grand_marshal } - } - } - } - random_vassal = { - limit = { - tgp_can_be_a_minister_trigger = { COURT_OWNER = scope:councillor_liege } - tgp_is_any_minister = no - } - weight = { - base = 1 - modifier = { - add = martial - } - } - got_minister_position_effect = { MINISTER_TITLE = e_minister_grand_marshal MINISTER_POSITION = minister_grand_marshal } - } - } - # Assign a minister of personnel - if = { - limit = { - OR = { - NOT = { exists = cp:minister_personnel } - cp:minister_personnel ?= { - NOT = { has_title = title:e_minister_of_personnel } - } - } - } - random_vassal = { - limit = { - tgp_can_be_a_minister_trigger = { COURT_OWNER = scope:councillor_liege } - tgp_is_any_minister = no - } - weight = { - base = 1 - modifier = { - add = diplomacy - } - } - got_minister_position_effect = { MINISTER_TITLE = e_minister_of_personnel MINISTER_POSITION = minister_personnel } - } - } - # Assign a minister of revenue - if = { - limit = { - OR = { - NOT = { exists = cp:councillor_steward } - cp:councillor_steward ?= { - NOT = { has_title = title:e_minister_of_revenue } - } - } - } - random_vassal = { - limit = { - tgp_can_be_a_minister_trigger = { COURT_OWNER = scope:councillor_liege } - tgp_is_any_minister = no - } - weight = { - base = 1 - modifier = { - add = stewardship - } - } - got_minister_position_effect = { MINISTER_TITLE = e_minister_of_revenue MINISTER_POSITION = councillor_steward } - } - } - # Assign a minister of rites - if = { - limit = { - OR = { - NOT = { exists = cp:councillor_court_chaplain } - cp:councillor_court_chaplain ?= { - NOT = { has_title = title:e_minister_of_rites } - } - } - } - random_vassal = { - limit = { - tgp_can_be_a_minister_trigger = { COURT_OWNER = scope:councillor_liege } - tgp_is_any_minister = no - } - weight = { - base = 1 - modifier = { - add = learning - } - } - got_minister_position_effect = { MINISTER_TITLE = e_minister_of_rites MINISTER_POSITION = councillor_court_chaplain } - } - } - # Assign a minister of war - if = { - limit = { - OR = { - NOT = { exists = cp:councillor_marshal } - cp:councillor_marshal ?= { - NOT = { has_title = title:e_minister_of_war } - } - } - } - random_vassal = { - limit = { - tgp_can_be_a_minister_trigger = { COURT_OWNER = scope:councillor_liege } - tgp_is_any_minister = no - } - weight = { - base = 1 - modifier = { - add = martial - } - } - got_minister_position_effect = { MINISTER_TITLE = e_minister_of_war MINISTER_POSITION = councillor_marshal } - } - } - # Assign a minister of justice - if = { - limit = { - OR = { - NOT = { exists = cp:minister_justice } - cp:minister_justice ?= { - NOT = { has_title = title:e_minister_of_justice } - } - } - } - random_vassal = { - limit = { - tgp_can_be_a_minister_trigger = { COURT_OWNER = scope:councillor_liege } - tgp_is_any_minister = no - } - weight = { - base = 1 - modifier = { - add = learning - } - } - got_minister_position_effect = { MINISTER_TITLE = e_minister_of_justice MINISTER_POSITION = minister_justice } - } - } - # Assign a minister of works - if = { - limit = { - OR = { - NOT = { exists = cp:minister_works } - cp:minister_works ?= { - NOT = { has_title = title:e_minister_of_works } - } - } - } - random_vassal = { - limit = { - tgp_can_be_a_minister_trigger = { COURT_OWNER = scope:councillor_liege } - tgp_is_any_minister = no - } - weight = { - base = 1 - modifier = { - add = stewardship - } - } - got_minister_position_effect = { MINISTER_TITLE = e_minister_of_works MINISTER_POSITION = minister_works } - } - } -} - -# Minister courtier recruitment effect -minister_courtier_recruitment_effect = { - while = { - count = minister_recruit_courtier_value - - save_scope_as = minister - create_character = { - employer = scope:minister - template = $COURTIER_TEMPLATE$ - faith = scope:minister.top_liege.capital_county.faith - culture = scope:minister.top_liege.capital_county.culture - save_scope_as = new_courtier - } - if = { - limit = { exists = scope:new_courtier } - scope:new_courtier = { - assign_completed_exams_based_on_merit_effect = yes - add_character_flag = { - flag = blocked_from_leaving - years = 25 - } - } - if = { - limit = { - scope:new_courtier = { - NOT = { is_courtier_of = scope:minister } - } - } - add_courtier = scope:new_courtier - } - send_interface_message = { - title = minister_courtier_recruited_t - left_icon = scope:new_courtier - custom_tooltip = minister_courtier_recruited_desc - } - } - } -} - -# Effect to keep track of family accomplishments for the Ancestral Gate domicile building -set_family_accomplishment_effect = { - # ACCOMPLISHMENT = the accomplishment you want to save - if = { - limit = { - NOT = { has_variable = $ACCOMPLISHMENT$ } - } - set_variable = { - name = $ACCOMPLISHMENT$ - value = yes - } - if = { - limit = { - has_variable = family_accomplishments - } - change_variable = { - name = family_accomplishments - add = 1 - } - } - else = { - set_variable = { - name = family_accomplishments - value = 1 - } - } - } -} - -## GRAND CAMPAIGN great project effects -set_duchies_to_attack_effect = { - while = { - count = 20 #as for tgp France holds the record for the most duchies with 17 - limit = { - list_size:duchies_to_attack > 0 - } - random_in_list = { - list = duchies_to_attack - limit = { - this = scope:grand_campaign_project.great_project_location.duchy - } - set_duchies_to_attack_variable_effect = { - VALUE = 1 - } - } - ordered_in_list = { - list = duchies_to_attack - order_by = { - value = holder.realm_size - multiply = -1 - } - switch = { - trigger = list_size:duchies_to_attack - 1 = { - set_duchies_to_attack_variable_effect = { - VALUE = 2 - } - } - 2 = { - set_duchies_to_attack_variable_effect = { - VALUE = 3 - } - } - 3 = { - set_duchies_to_attack_variable_effect = { - VALUE = 4 - } - } - 4 = { - set_duchies_to_attack_variable_effect = { - VALUE = 5 - } - } - 5 = { - set_duchies_to_attack_variable_effect = { - VALUE = 6 - } - } - 6 = { - set_duchies_to_attack_variable_effect = { - VALUE = 7 - } - } - 7 = { - set_duchies_to_attack_variable_effect = { - VALUE = 8 - } - } - 8 = { - set_duchies_to_attack_variable_effect = { - VALUE = 9 - } - } - 9 = { - set_duchies_to_attack_variable_effect = { - VALUE = 10 - } - } - 10 = { - set_duchies_to_attack_variable_effect = { - VALUE = 11 - } - } - 11 = { - set_duchies_to_attack_variable_effect = { - VALUE = 12 - } - } - 12 = { - set_duchies_to_attack_variable_effect = { - VALUE = 13 - } - } - 13 = { - set_duchies_to_attack_variable_effect = { - VALUE = 14 - } - } - 14 = { - set_duchies_to_attack_variable_effect = { - VALUE = 15 - } - } - 15 = { - set_duchies_to_attack_variable_effect = { - VALUE = 16 - } - } - 16 = { - set_duchies_to_attack_variable_effect = { - VALUE = 17 - } - } - 17 = { - set_duchies_to_attack_variable_effect = { - VALUE = 18 - } - } - 18 = { - set_duchies_to_attack_variable_effect = { - VALUE = 19 - } - } - 19 = { - set_duchies_to_attack_variable_effect = { - VALUE = 20 - } - } - } - } - } -} -set_duchies_to_attack_variable_effect = { - save_temporary_scope_as = duchy - scope:grand_campaign_project = { - set_variable = { - name = attack_$VALUE$ - value = scope:duchy - } - add_to_variable_list = { - name = grand_campaign_targets - target = scope:duchy - } - } - remove_from_list = duchies_to_attack -} -display_duchy_to_attack = { - prev.var:attack_$ID$ ?= { - add_to_list = target_titles - } -} - -grand_campaign_contribution_effect = { - save_scope_as = contributor - scope:great_project.var:$TITLE$ ?= { - save_scope_as = target_title - } - # the grand marshal should always be the war leader - title:e_minister_grand_marshal.holder = { - save_scope_as = war_leader - } - - scope:great_project ?= { - add_to_variable_list = { - name = grand_campaign_titles - target = scope:target_title - } - } - # if war does not exist yet, declare it - if = { - limit = { - NOT = { exists = scope:great_project.var:grand_campaign_war } - } - scope:war_leader = { - trigger_event = tgp_china_ministry.0001 - } - custom_tooltip = grand_campaign_start_tt - } - # if war exists, pull everyone in - else = { - trigger_event = tgp_china_ministry.0004 - } - custom_tooltip = great_project_type_grand_campaign_project_contribution_tt -} - -grand_campaign_contribution_complete_effect = { - if = { - limit = { - situation:dynastic_cycle ?= { - OR = { - situation_current_phase = situation_dynastic_cycle_phase_stability_advancement - situation_current_phase = situation_dynastic_cycle_phase_instability - } - } - } - custom_tooltip = great_project_type_grand_campaign_project_contribution_win_tributaries_tt - } - else = { - custom_tooltip = great_project_type_grand_campaign_project_contribution_win_tt - } -} - -# Chinese Estate building effects -add_random_internal_east_asian_estate_building = { - random_list = { - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = east_asian_estate_servants_quarters_01 } - } - add_domicile_building = east_asian_estate_servants_quarters_01 - if = { - limit = { has_domicile_building = east_asian_estate_main_03 } - add_domicile_building = east_asian_estate_servants_quarters_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = east_asian_estate_library_01 } - } - add_domicile_building = east_asian_estate_library_01 - if = { - limit = { has_domicile_building = east_asian_estate_main_03 } - add_domicile_building = east_asian_estate_library_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = east_asian_estate_bath_01 } - } - add_domicile_building = east_asian_estate_bath_01 - if = { - limit = { has_domicile_building = east_asian_estate_main_03 } - add_domicile_building = east_asian_estate_bath_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = east_asian_estate_courtyard_01 } - } - add_domicile_building = east_asian_estate_courtyard_01 - if = { - limit = { has_domicile_building = east_asian_estate_main_03 } - add_domicile_building = east_asian_estate_courtyard_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = east_asian_estate_prison_01 } - } - add_domicile_building = east_asian_estate_prison_01 - if = { - limit = { has_domicile_building = east_asian_estate_main_03 } - add_domicile_building = east_asian_estate_prison_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = east_asian_estate_living_quarters_01 } - } - add_domicile_building = east_asian_estate_living_quarters_01 - if = { - limit = { has_domicile_building = east_asian_estate_main_03 } - add_domicile_building = east_asian_estate_living_quarters_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = east_asian_estate_study_01 } - } - add_domicile_building = east_asian_estate_study_01 - if = { - limit = { has_domicile_building = east_asian_estate_main_03 } - add_domicile_building = east_asian_estate_study_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = east_asian_estate_guest_room_01 } - } - add_domicile_building = east_asian_estate_guest_room_01 - if = { - limit = { has_domicile_building = east_asian_estate_main_03 } - add_domicile_building = east_asian_estate_guest_room_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = east_asian_estate_wine_cellar_01 } - } - add_domicile_building = east_asian_estate_wine_cellar_01 - if = { - limit = { has_domicile_building = east_asian_estate_main_03 } - add_domicile_building = east_asian_estate_wine_cellar_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = east_asian_estate_taxation_01 } - } - add_domicile_building = east_asian_estate_taxation_01 - if = { - limit = { has_domicile_building = east_asian_estate_main_03 } - add_domicile_building = east_asian_estate_taxation_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = east_asian_estate_drafting_room_01 } - } - add_domicile_building = east_asian_estate_drafting_room_01 - if = { - limit = { has_domicile_building = east_asian_estate_main_03 } - add_domicile_building = east_asian_estate_drafting_room_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = east_asian_estate_clerks_hall_01 } - } - add_domicile_building = east_asian_estate_clerks_hall_01 - if = { - limit = { has_domicile_building = east_asian_estate_main_03 } - add_domicile_building = east_asian_estate_clerks_hall_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = east_asian_estate_revenue_audit_desk_01 } - } - add_domicile_building = east_asian_estate_revenue_audit_desk_01 - if = { - limit = { has_domicile_building = east_asian_estate_main_03 } - add_domicile_building = east_asian_estate_revenue_audit_desk_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = east_asian_estate_block_printing_hall_01 } - } - add_domicile_building = east_asian_estate_block_printing_hall_01 - if = { - limit = { has_domicile_building = east_asian_estate_main_03 } - add_domicile_building = east_asian_estate_block_printing_hall_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = east_asian_estate_xuan_paper_stores_01 } - } - add_domicile_building = east_asian_estate_xuan_paper_stores_01 - if = { - limit = { has_domicile_building = east_asian_estate_main_03 } - add_domicile_building = east_asian_estate_xuan_paper_stores_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = east_asian_estate_water_clock_room_01 } - } - add_domicile_building = east_asian_estate_water_clock_room_01 - if = { - limit = { has_domicile_building = east_asian_estate_main_03 } - add_domicile_building = east_asian_estate_water_clock_room_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = east_asian_estate_examination_room_01 } - } - add_domicile_building = east_asian_estate_examination_room_01 - if = { - limit = { has_domicile_building = east_asian_estate_main_03 } - add_domicile_building = east_asian_estate_examination_room_02 - } - } - } -} - -fill_external_east_asian_estate_building_effect = { - switch = { - trigger = has_domicile_building_or_higher - east_asian_estate_main_05 = { - while = { - limit = { free_external_domicile_building_slots >= 2 } - add_random_external_east_asian_estate_building = yes - } - } - east_asian_estate_main_04 = { - while = { - limit = { free_external_domicile_building_slots >= 3 } - add_random_external_east_asian_estate_building = yes - } - } - east_asian_estate_main_03 = { - while = { - limit = { free_external_domicile_building_slots >= 4 } - add_random_external_east_asian_estate_building = yes - } - } - east_asian_estate_main_02 = { - while = { - limit = { free_external_domicile_building_slots >= 5 } - add_random_external_east_asian_estate_building = yes - } - } - east_asian_estate_main_01 = { - while = { - limit = { free_external_domicile_building_slots >= 6 } - add_random_external_east_asian_estate_building = yes - } - } - } -} - -add_random_external_east_asian_estate_building = { - if = { - limit = { - free_external_domicile_building_slots >= 1 - } - random_list = { - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = east_asian_estate_ancestral_shrine_01 } - } - add_domicile_building = east_asian_estate_ancestral_shrine_01 - if = { - limit = { has_domicile_building = east_asian_estate_main_03 } - add_domicile_building = east_asian_estate_ancestral_shrine_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = east_asian_estate_barracks_01 } - } - add_domicile_building = east_asian_estate_barracks_01 - if = { - limit = { has_domicile_building = east_asian_estate_main_03 } - add_domicile_building = east_asian_estate_barracks_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = east_asian_estate_watchtower_01 } - } - add_domicile_building = east_asian_estate_watchtower_01 - if = { - limit = { has_domicile_building = east_asian_estate_main_03 } - add_domicile_building = east_asian_estate_watchtower_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = east_asian_estate_garden_01 } - } - add_domicile_building = east_asian_estate_garden_01 - if = { - limit = { has_domicile_building = east_asian_estate_main_03 } - add_domicile_building = east_asian_estate_garden_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = east_asian_estate_storage_01 } - } - add_domicile_building = east_asian_estate_storage_01 - if = { - limit = { has_domicile_building = east_asian_estate_main_03 } - add_domicile_building = east_asian_estate_storage_02 - } - } - 10 = { - trigger = { - NOT = { - has_domicile_building_or_higher = east_asian_estate_rice_field_01 - } - } - add_domicile_building = east_asian_estate_rice_field_01 - if = { - limit = { has_domicile_building = east_asian_estate_main_03 } - add_domicile_building = east_asian_estate_rice_field_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = east_asian_estate_stable_01 } - } - add_domicile_building = east_asian_estate_stable_01 - if = { - limit = { has_domicile_building = east_asian_estate_main_03 } - add_domicile_building = east_asian_estate_stable_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = east_asian_estate_workshop_01 } - } - add_domicile_building = east_asian_estate_workshop_01 - if = { - limit = { has_domicile_building = east_asian_estate_main_03 } - add_domicile_building = east_asian_estate_workshop_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = east_asian_estate_market_01 } - } - add_domicile_building = east_asian_estate_market_01 - if = { - limit = { has_domicile_building = east_asian_estate_main_03 } - add_domicile_building = east_asian_estate_market_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = east_asian_estate_grazing_land_01 } - } - add_domicile_building = east_asian_estate_grazing_land_01 - if = { - limit = { has_domicile_building = east_asian_estate_main_03 } - add_domicile_building = east_asian_estate_grazing_land_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = east_asian_estate_tea_01 } - } - add_domicile_building = east_asian_estate_tea_01 - if = { - limit = { has_domicile_building = east_asian_estate_main_03 } - add_domicile_building = east_asian_estate_tea_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = east_asian_estate_health_01 } - } - add_domicile_building = east_asian_estate_health_01 - if = { - limit = { has_domicile_building = east_asian_estate_main_03 } - add_domicile_building = east_asian_estate_health_02 - } - } - 10 = { - trigger = { - NOT = { has_domicile_building_or_higher = east_asian_estate_silk_01 } - owner = { - OR = { - custom_tooltip = { - house = { has_house_modifier = ep3_unlocked_silk } - text = has_unlocked_estate_silk - } - culture = { has_cultural_parameter = unlocks_silk_buildings_parameter } - } - } - } - add_domicile_building = east_asian_estate_silk_01 - if = { - limit = { has_domicile_building = east_asian_estate_main_03 } - add_domicile_building = east_asian_estate_silk_02 - } - } - } - } -} - -# Use this effect to set what exams a characters should have passed, based on their merit -# Used on game start, but can also be used for generated characters -assign_completed_exams_based_on_merit_effect = { - # Empire merit ranked vassals have always passed the palace exams - if = { - limit = { - merit >= empire_starting_merit_value - } - add_character_flag = passed_child_exam - add_character_flag = passed_provincial_exam - add_character_modifier = { - modifier = tgp_passed_provincial_exam_modifier - } - add_character_flag = passed_metropolitan_exam - add_character_modifier = { - modifier = tgp_passed_metropolitan_exam_modifier - } - add_character_flag = passed_palace_exam - add_character_modifier = { - modifier = tgp_passed_palace_exam_modifier - } - } - # Kingdom merit ranked vassals have always passed the metropolitan exams - else_if = { - limit = { - merit >= kingdom_starting_merit_value - } - add_character_flag = passed_child_exam - add_character_flag = passed_provincial_exam - add_character_modifier = { - modifier = tgp_passed_provincial_exam_modifier - } - add_character_flag = passed_metropolitan_exam - add_character_modifier = { - modifier = tgp_passed_metropolitan_exam_modifier - } - if = { # The AI has a chance to start with having passed additional exams - limit = { - is_ai = yes - } - random = { - chance = 50 - add_character_flag = passed_palace_exam - add_character_modifier = { - modifier = tgp_passed_palace_exam_modifier - } - } - } - change_merit = merit_starting_boost_value - } - # Duchy merit ranked vassals have always passed the provincial exams - else_if = { - limit = { - merit >= duchy_starting_merit_value - } - add_character_flag = passed_child_exam - add_character_flag = passed_provincial_exam - add_character_modifier = { - modifier = tgp_passed_provincial_exam_modifier - } - if = { # The AI has a chance to start with having passed additional exams - limit = { - is_ai = yes - } - random = { - chance = 60 - add_character_flag = passed_metropolitan_exam - add_character_modifier = { - modifier = tgp_passed_metropolitan_exam_modifier - } - - random = { - chance = 30 - add_character_flag = passed_palace_exam - add_character_modifier = { - modifier = tgp_passed_palace_exam_modifier - } - } - } - } - change_merit = merit_starting_boost_value - } - # Everyone else have a chance to having passed the provincial exams - else = { - if = { # The AI has a chance to start with having passed the provincial exams - limit = { - is_ai = yes - } - random_list = { - 10 = {} - 50 = { - add_character_flag = passed_provincial_exam - add_character_modifier = { - modifier = tgp_passed_provincial_exam_modifier - } - change_merit = { - value = county_starting_merit_value - add = age - add = learning - } - } - 25 = { - add_character_flag = passed_provincial_exam - add_character_modifier = { - modifier = tgp_passed_provincial_exam_modifier - } - add_character_flag = passed_metropolitan_exam - add_character_modifier = { - modifier = tgp_passed_metropolitan_exam_modifier - } - change_merit = { - value = county_starting_merit_value - add = age - add = learning - } - } - 15 = { - add_character_flag = passed_provincial_exam - add_character_modifier = { - modifier = tgp_passed_provincial_exam_modifier - } - add_character_flag = passed_metropolitan_exam - add_character_modifier = { - modifier = tgp_passed_metropolitan_exam_modifier - } - add_character_flag = passed_palace_exam - add_character_modifier = { - modifier = tgp_passed_palace_exam_modifier - } - change_merit = { - value = county_starting_merit_value - add = age - add = learning - } - } - } - # Chance to start with having passed child exams (for flavor) - random = { - chance = 60 - add_character_flag = passed_child_exam - } - } - } -} - -meritocratic_assign_completed_exams_based_on_merit_effect = { - if = { - limit = { - merit >= duchy_starting_merit_value - } - add_character_flag = passed_provincial_exam - add_character_modifier = { - modifier = tgp_passed_provincial_exam_modifier - } - } - # Everyone else have a chance to having passed the provincial exams - else = { - if = { # The AI has a chance to start with having passed the provincial exams - limit = { - is_ai = yes - } - random = { - chance = { - value = 40 - if = { - limit = { - is_ruler = yes - } - add = 20 - } - } - add_character_flag = passed_provincial_exam - add_character_modifier = { - modifier = tgp_passed_provincial_exam_modifier - } - } - } - } -} - -tgp_save_realm_ceremonial_liege_effect = { - if = { - limit = { tgp_realm_has_ceremonial_liege_trigger = yes } - top_liege.primary_title.var:administrative_ui_special_title.holder = { save_scope_as = ceremonial_liege } - } -} - -tgp_imperial_policy_event_effect = { - save_scope_as = liege - every_player = { - limit = { top_liege = scope:liege } - trigger_event = tgp_japan_general.9300 - } -} - -tgp_treasury_setup_effect = { - if = { - limit = { has_treasury = yes } - enact_treasury_budgets_init = yes - } -} - -# Enact treasury template effect -# If you update these, remember to update the corresponding tooltip! -tgp_treasury_enact_salary_budget_effect = { - custom_tooltip = { - text = tgp_treasury_enact_salary_budget_desc - if = { - limit = { - NOT = { has_realm_law = budget_allocation_salary_45 } - } - add_realm_law = budget_allocation_salary_45 - } - if = { - limit = { - NOT = { has_realm_law = budget_allocation_ministry_25 } - } - add_realm_law = budget_allocation_ministry_25 - } - if = { - limit = { - NOT = { has_realm_law = budget_allocation_military_20 } - } - add_realm_law = budget_allocation_military_20 - } - - enact_treasury_budgets_no_costs = yes - } -} - -tgp_treasury_enact_ministry_budget_effect = { - custom_tooltip = { - text = tgp_treasury_enact_ministry_budget_desc - if = { - limit = { - NOT = { has_realm_law = budget_allocation_salary_25 } - } - add_realm_law = budget_allocation_salary_25 - } - if = { - limit = { - NOT = { has_realm_law = budget_allocation_ministry_45 } - } - add_realm_law = budget_allocation_ministry_45 - } - if = { - limit = { - NOT = { has_realm_law = budget_allocation_military_20 } - } - add_realm_law = budget_allocation_military_20 - } - - enact_treasury_budgets_no_costs = yes - } -} - -tgp_treasury_enact_military_budget_effect = { - custom_tooltip = { - text = tgp_treasury_enact_military_budget_desc - if = { - limit = { - NOT = { has_realm_law = budget_allocation_salary_30 } - } - add_realm_law = budget_allocation_salary_30 - } - if = { - limit = { - NOT = { has_realm_law = budget_allocation_ministry_20 } - } - add_realm_law = budget_allocation_ministry_20 - } - if = { - limit = { - NOT = { has_realm_law = budget_allocation_military_40 } - } - add_realm_law = budget_allocation_military_40 - } - - enact_treasury_budgets_no_costs = yes - } -} - -tgp_treasury_enact_hegemon_budget_effect = { - custom_tooltip = { - text = tgp_treasury_enact_hegemon_budget_desc - if = { - limit = { - NOT = { has_realm_law = budget_allocation_salary_30 } - } - add_realm_law = budget_allocation_salary_30 - } - if = { - limit = { - NOT = { has_realm_law = budget_allocation_ministry_25 } - } - add_realm_law = budget_allocation_ministry_25 - } - if = { - limit = { - NOT = { has_realm_law = budget_allocation_military_25 } - } - add_realm_law = budget_allocation_military_25 - } - - enact_treasury_budgets_no_costs = yes - } -} - -tgp_treasury_enact_balanced_budget_effect = { - custom_tooltip = { - text = tgp_treasury_enact_balanced_budget_desc - if = { - limit = { - NOT = { has_realm_law = budget_allocation_salary_35 } - } - add_realm_law = budget_allocation_salary_35 - } - if = { - limit = { - NOT = { has_realm_law = budget_allocation_ministry_30 } - } - add_realm_law = budget_allocation_ministry_30 - } - if = { - limit = { - NOT = { has_realm_law = budget_allocation_military_25 } - } - add_realm_law = budget_allocation_military_25 - } - - enact_treasury_budgets_no_costs = yes - } -} - -tgp_treasury_enact_meritocratic_salary_budget_effect = { - custom_tooltip = { - text = tgp_treasury_enact_meritocratic_salary_budget_desc - if = { - limit = { - NOT = { has_realm_law = budget_allocation_salary_55 } - } - add_realm_law = budget_allocation_salary_55 - } - if = { - limit = { - NOT = { has_realm_law = budget_allocation_military_35 } - } - add_realm_law = budget_allocation_military_35 - } - - enact_treasury_budgets_no_costs = yes - } -} - -tgp_treasury_enact_meritocratic_military_budget_effect = { - custom_tooltip = { - text = tgp_treasury_enact_meritocratic_military_budget_desc - if = { - limit = { - NOT = { has_realm_law = budget_allocation_salary_35 } - } - add_realm_law = budget_allocation_salary_35 - } - if = { - limit = { - NOT = { has_realm_law = budget_allocation_military_55 } - } - add_realm_law = budget_allocation_military_55 - } - - enact_treasury_budgets_no_costs = yes - } -} - -tgp_treasury_enact_meritocratic_balanced_budget_effect = { - custom_tooltip = { - text = tgp_treasury_enact_meritocratic_balanced_budget_desc - if = { - limit = { - NOT = { has_realm_law = budget_allocation_salary_45 } - } - add_realm_law = budget_allocation_salary_45 - } - if = { - limit = { - NOT = { has_realm_law = budget_allocation_military_45 } - } - add_realm_law = budget_allocation_military_45 - } - - enact_treasury_budgets_no_costs = yes - } -} - -tgp_save_opposing_power_effect = { - if = { # You are the Regent - limit = { - tgp_is_ceremonial_regent_trigger = yes - } - primary_title.var:administrative_ui_special_title.holder = { save_scope_as = opposing_power } - } - else = { # You are the liege - top_liege = { save_scope_as = opposing_power } - } -} - -tgp_one_up_activity_effect = { - tgp_save_opposing_power_effect = yes - add_prestige = massive_prestige_gain - if = { - limit = { - government_has_flag = government_is_administrative - } - change_influence = massive_influence_gain - } - scope:opposing_power = { - add_prestige = massive_prestige_loss - if = { - limit = { - government_has_flag = government_is_administrative - } - change_influence = massive_influence_loss - } - } -} - -destroy_landless_title_no_tgp_dlc_effect = { - if = { - limit = { - NOT = { has_dlc_feature = all_under_heaven } - game_start_date = $DATE$ - } - holder = { destroy_title = prev } - } -} - -coup_ceremonial_liege_scheme_success_effect = { - # scope:target = ceremonial liege - # scope:owner = ceremonial regent - scope:owner.top_liege.primary_title.var:administrative_ui_special_title = { save_scope_as = ceremonial_title } - scope:target = { - save_scope_as = background_dungeon_scope - save_scope_as = background_courtyard_scope - save_scope_as = background_throne_room_scope - } - # Old ruler's fate - if = { - limit = { exists = scope:death } - scope:target = { - death = { death_reason = death_fight } - } - } - else_if = { - limit = { exists = scope:imprison } - scope:target = { add_character_flag = was_abducted_block_notification_event } - rightfully_imprison_character_less_verbose_effect = { - TARGET = scope:target - IMPRISONER = scope:owner - } - } - create_title_and_vassal_change = { - type = conquest - save_scope_as = change - add_claim_on_loss = yes - } - scope:target = { - every_held_title = { - limit = { - tier > tier_barony - OR = { - scope:owner.top_liege.primary_title.var:administrative_ui_special_title = this - exists = var:ceremonial_title - is_landless_type_title = no - } - } - change_title_holder_include_vassals = { - holder = scope:owner - change = scope:change - } - } - } - resolve_title_and_vassal_change = scope:change - rightfully_imprison_character_less_verbose_effect = { - TARGET = scope:target - IMPRISONER = scope:owner - } - add_clan_unity_interaction_effect = { - CHARACTER = scope:owner - TARGET = scope:target - VALUE = medium_unity_loss - DESC = clan_unity_coup_ceremonial_liege_attempted.desc - REVERSE_NON_HOUSE_TARGET = no - } - successful_coup_ceremonial_liege_opinion_effect = { - VICTIM = scope:target - PLOTTER = scope:owner - } - scope:owner = { - create_character_memory = { - type = seized_throne_memory - participants = { deposed = scope:target } - } - ordered_memory = { - memory_type = seized_throne_memory - order_by = memory_creation_date - if = { - limit = { - NOT = { exists = var:ceremonial_title } - } - set_variable = { - name = ceremonial_title - value = scope:ceremonial_title - } - } - } - } - scope:target = { - create_character_memory = { - type = throne_seized_memory - participants = { deposer = scope:owner } - } - ordered_memory = { - memory_type = throne_seized_memory - order_by = memory_creation_date - if = { - limit = { - NOT = { exists = var:ceremonial_title } - } - set_variable = { - name = ceremonial_title - value = scope:ceremonial_title - } - } - } - } -} - -coup_ceremonial_liege_scheme_failure_effect = { - scope:owner.top_liege.primary_title.var:administrative_ui_special_title = { save_scope_as = ceremonial_title } - scope:scheme = { end_scheme = yes } - #Add Watchful Modifier to the target - scope:target = { - save_scope_as = background_dungeon_scope - save_scope_as = background_courtyard_scope - save_scope_as = background_throne_room_scope - show_as_tooltip = { - add_character_modifier = { - modifier = watchful_modifier - days = watchful_modifier_duration - } - } - } - scope:owner = { - create_character_memory = { - type = seized_throne_failed_memory - participants = { deposed = scope:target } - } - ordered_memory = { - memory_type = seized_throne_failed_memory - order_by = memory_creation_date - if = { - limit = { - NOT = { exists = var:ceremonial_title } - } - set_variable = { - name = ceremonial_title - value = scope:ceremonial_title - } - } - } - add_character_flag = was_abducted_block_notification_event - create_title_and_vassal_change = { - type = conquest - save_scope_as = change - add_claim_on_loss = yes - } - every_held_title = { - limit = { - is_landless_type_title = no - tier > tier_barony - } - change_title_holder_include_vassals = { - holder = scope:target - change = scope:change - } - } - resolve_title_and_vassal_change = scope:change - } - hidden_effect = { change_prison_type = dungeon } - rightfully_imprison_character_less_verbose_effect = { - TARGET = scope:owner - IMPRISONER = scope:target - } - attempted_coup_ceremonial_liege_opinion_effect = { - VICTIM = scope:target - PLOTTER = scope:owner - } - # If we're a clan this affects unity - add_clan_unity_interaction_effect = { - CHARACTER = scope:owner - TARGET = scope:target - VALUE = medium_unity_loss - DESC = clan_unity_coup_ceremonial_liege_attempted.desc - REVERSE_NON_HOUSE_TARGET = no - } - scope:target = { - create_character_memory = { - type = throne_seized_failed_memory - participants = { deposer = scope:owner } - } - ordered_memory = { - memory_type = throne_seized_failed_memory - order_by = memory_creation_date - if = { - limit = { - NOT = { exists = var:ceremonial_title } - } - set_variable = { - name = ceremonial_title - value = scope:ceremonial_title - } - } - } - } -} - -successful_coup_ceremonial_liege_opinion_effect = { - $VICTIM$ = { - if = { - limit = { is_alive = yes } - add_opinion = { - target = $PLOTTER$ - modifier = seized_my_throne_crime - } - set_relation_rival = { - target = scope:owner - reason = rival_seized_throne_reason - } - } - every_spouse = { - limit = { - NOR = { - this = $PLOTTER$ - is_spouse_of = $PLOTTER$ - is_close_family_of = $PLOTTER$ - } - } - add_to_temporary_list = close_family_coup_ceremonial_liege_opinion_list - } - every_close_family_member = { - limit = { - NOR = { - this = $PLOTTER$ - is_spouse_of = $PLOTTER$ - is_close_family_of = $PLOTTER$ - } - } - add_to_temporary_list = close_family_coup_ceremonial_liege_opinion_list - } - every_in_list = { - list = close_family_coup_ceremonial_liege_opinion_list - limit = { top_liege = scope:owner.top_liege } - rightfully_imprison_character_less_verbose_effect = { - TARGET = this - IMPRISONER = scope:owner - } - } - every_in_list = { - list = close_family_coup_ceremonial_liege_opinion_list - custom = all_close_family_and_spouses - add_opinion = { - target = $PLOTTER$ - modifier = seized_close_family_throne_crime - } - } - } -} - -attempted_coup_ceremonial_liege_opinion_effect = { - $VICTIM$ = { - if = { - limit = { is_alive = yes } - add_opinion = { - target = $PLOTTER$ - modifier = attempted_to_seize_my_throne_crime - } - } - every_spouse = { - limit = { NOT = { this = $PLOTTER$ } } - add_to_temporary_list = close_family_coup_ceremonial_liege_opinion_list - } - every_close_family_member = { - limit = { NOT = { this = $PLOTTER$ } } - add_to_temporary_list = close_family_coup_ceremonial_liege_opinion_list - } - if = { - limit = { - any_in_list = { list = close_family_coup_ceremonial_liege_opinion_list } - } - every_in_list = { - list = close_family_coup_ceremonial_liege_opinion_list - custom = all_close_family_and_spouses - add_opinion = { - target = $PLOTTER$ - modifier = attempted_to_seize_throne_close_family_crime - } - } - } - } -} - -nomad_domicile_refund_treasury_or_gold_effect = { - #Domicile buildings give cash refund - if = { - limit = { - has_domicile = yes - } - save_scope_as = former_nomad - custom_tooltip = nomad_domicile_buildings_converted_for_treasury_or_gold - hidden_effect = { - save_scope_value_as = { - name = domicile_refund_treasury_or_gold_value - value = { - value = medium_gold_value - switch = { - trigger = domicile.num_domicile_buildings - 7 = { multiply = 7 } - 6 = { multiply = 6 } - 5 = { multiply = 5 } - 4 = { multiply = 4 } - 3 = { multiply = 3 } - 2 = { multiply = 2 } - } - } - } - } - } -} - -nomad_convert_herds_to_treasury_or_gold_special_troops_effect = { - save_scope_as = former_nomad - custom_tooltip = treasury_or_gold_army_for_herd_tt - hidden_effect = { - if = { - limit = { - domicile.herd >= 50 - } - save_scope_as = army_getter - save_scope_value_as = { - name = nomad_convert_herds_to_treasury_or_gold_value - value = { - value = domicile.herd - multiply = 0.3 - min = 100 - max = 10000 - } - } - spawn_army = { - levies = 200 - men_at_arms = { - type = horse_archers - men = { value = domicile.herd multiply = 0.02 min = 100 max = 10000 } - } - men_at_arms = { - type = steppe_raiders - men = { value = domicile.herd multiply = 0.01 min = 100 max = 10000 } - } - men_at_arms = { - type = nomad_lancers - men = { value = domicile.herd multiply = 0.01 min = 100 max = 10000 } - } - men_at_arms = { - type = nomadic_riders - men = { value = domicile.herd multiply = 0.1 min = 100 max = 10000 } - } - location = capital_province - inheritable = yes - uses_supply = yes - name = former_nomad_army_name - } - } - } -} - -empty_treasury_when_abandoning_landed_life_effect = { - if = { - limit = { - treasury > 0 - } - save_scope_value_as = { - name = current_treasury - value = treasury - } - remove_treasury = { - value = scope:current_treasury - } - } -} - -refund_noble_family_domicile_buildings_effect = { - if = { - limit = { - has_domicile = yes - } - save_scope_as = former_noble_family_head - custom_tooltip = noble_family_domicile_buildings_converted - hidden_effect = { - add_gold = { - value = { - value = medium_gold_value - switch = { - trigger = domicile.num_domicile_buildings - 7 = { multiply = 7 } - 6 = { multiply = 6 } - 5 = { multiply = 5 } - 4 = { multiply = 4 } - 3 = { multiply = 3 } - 2 = { multiply = 2 } - } - } - } - } - } -} - -refund_vassal_noble_families_and_make_them_nomads_effect = { - if = { - limit = { - any_vassal = { - is_landless_ruler = yes - culture = { - has_same_culture_heritage = root.culture - } - any_held_title = { - is_noble_family_title = yes - } - } - } - every_vassal = { - limit = { - is_landless_ruler = yes - culture = { - has_same_culture_heritage = root.culture - } - any_held_title = { - is_noble_family_title = yes - } - } - if = { - limit = { - has_domicile = yes - } - add_gold = { - value = { - value = medium_gold_value - switch = { - trigger = domicile.num_domicile_buildings - 7 = { multiply = 7 } - 6 = { multiply = 6 } - 5 = { multiply = 5 } - 4 = { multiply = 4 } - 3 = { multiply = 3 } - 2 = { multiply = 2 } - } - } - } - } - change_government = nomad_government - if = { - limit = { NOT = { has_trait = nomadic_philosophy } } - add_trait = nomadic_philosophy - } - every_held_title = { - limit = { - is_noble_family_title = yes - } - holder = { - destroy_title = prev - } - } - } - } -} - -rehome_noble_families_to_compatible_liege_effect = { - if = { - limit = { - any_vassal = { - is_landless_ruler = yes - NOT = { - culture = { - has_same_culture_heritage = root.culture - } - } - any_held_title = { - is_noble_family_title = yes - } - } - } - if = { - limit = { - any_vassal = { - is_landed = yes - highest_held_title_tier >= tier_kingdom - government_has_flag = government_has_merit - } - } - random_vassal = { - limit = { - is_landed = yes - highest_held_title_tier >= tier_kingdom - government_has_flag = government_has_merit - } - save_scope_as = new_liege_for_homeless_families - } - } - else_if = { - limit = { - any_tributary = { - highest_held_title_tier >= tier_kingdom - government_has_flag = government_has_merit - } - } - random_tributary = { - limit = { - highest_held_title_tier >= tier_kingdom - government_has_flag = government_has_merit - } - save_scope_as = new_liege_for_homeless_families - } - } - else_if = { - limit = { - any_neighboring_top_liege_realm_owner = { - government_has_flag = government_has_merit - highest_held_title_tier >= tier_empire - } - } - random_neighboring_top_liege_realm_owner = { - limit = { - government_has_flag = government_has_merit - highest_held_title_tier >= tier_hegemony - } - save_scope_as = new_liege_for_homeless_families - } - } - else_if = { - limit = { - any_independent_ruler = { - NOT = { - this = root - } - in_diplomatic_range = root - government_has_flag = government_has_merit - highest_held_title_tier >= tier_empire - } - } - random_independent_ruler = { - limit = { - NOT = { - this = root - } - in_diplomatic_range = root - government_has_flag = government_has_merit - highest_held_title_tier >= tier_empire - } - save_scope_as = new_liege_for_homeless_families - } - } - else_if = { - limit = { - any_independent_ruler = { - NOT = { - this = root - } - in_diplomatic_range = root - government_has_flag = government_has_merit - highest_held_title_tier >= tier_kingdom - } - } - random_independent_ruler = { - limit = { - NOT = { - this = root - } - in_diplomatic_range = root - government_has_flag = government_has_merit - highest_held_title_tier >= tier_kingdom - } - save_scope_as = new_liege_for_homeless_families - } - } - if = { - limit = { - exists = scope:new_liege_for_homeless_families - } - every_vassal = { - limit = { - is_landless_ruler = yes - NOT = { - culture = { - has_same_culture_heritage = root.culture - } - } - any_held_title = { - is_noble_family_title = yes - } - } - create_title_and_vassal_change = { - type = swear_fealty - save_scope_as = title_change - } - change_liege = { - liege = scope:new_liege_for_homeless_families - change = scope:title_change - } - resolve_title_and_vassal_change = scope:title_change - domicile = { - move_domicile = scope:new_liege_for_homeless_families.capital_province - } - } - } - else = { - every_vassal = { - limit = { - is_landless_ruler = yes - NOT = { - culture = { - has_same_culture_heritage = root.culture - } - } - any_held_title = { - is_noble_family_title = yes - } - } - every_held_title = { - limit = { - is_noble_family_title = yes - } - holder = { - destroy_title = prev - } - } - move_to_pool_effect = yes - } - } - } -} - -convert_steppe_admin_vassals_to_meritocratic_effect = { - if = { - limit = { - any_vassal_or_below = { - government_has_flag = government_is_steppe_admin - } - } - every_vassal_or_below = { - limit = { - government_has_flag = government_is_steppe_admin - } - change_government = meritocratic_government - } - } -} - -nomad_to_steppe_admin_new_capital_effect = { - every_sub_realm_county = { - limit = { - title_province = { - NOR = { - has_holding_type = nomad_holding - has_holding_type = herder_holding - has_holding_type = tribal_holding - } - } - } - add_to_list = potential_new_capitals - } - every_held_title = { - limit = { - tier = tier_county - title_province = { - NOR = { - has_holding_type = nomad_holding - has_holding_type = herder_holding - has_holding_type = tribal_holding - } - } - } - add_to_list = potential_new_capitals - } - ordered_in_list = { - order_by = development_level - list = potential_new_capitals - save_scope_as = new_capital - } - if = { - limit = { - capital_county = { - title_province = { - NOR = { - has_holding_type = nomad_holding - has_holding_type = herder_holding - has_holding_type = tribal_holding - } - } - } - } - capital_county = { - save_scope_as = new_capital - } - } - if = { - limit = { - exists = scope:new_capital - capital_county != scope:new_capital - } - if = { - limit = { - scope:new_capital.holder != root - } - create_title_and_vassal_change = { - type = usurped - save_scope_as = change - add_claim_on_loss = yes - } - scope:new_capital = { - change_title_holder = { - holder = root - change = scope:change - } - } - resolve_title_and_vassal_change = scope:change - } - set_realm_capital = scope:new_capital - } - scope:new_capital.duchy = { save_scope_as = nomad_duchy_for_name } - #Should gain target title, if possible - if = { - limit = { - scope:new_capital.kingdom = { - NOT = { - exists = holder - } - } - } - create_title_and_vassal_change = { - type = created - save_scope_as = change - add_claim_on_loss = yes - } - scope:new_capital.kingdom = { - save_scope_as = new_primary - change_title_holder = { - holder = root - change = scope:change - } - } - resolve_title_and_vassal_change = scope:change - } - if = { - limit = { - scope:new_capital.duchy = { - NOT = { - exists = holder - } - } - } - hidden_effect = { - create_title_and_vassal_change = { - type = created - save_scope_as = change_1 - add_claim_on_loss = yes - } - scope:new_capital.duchy = { - change_title_holder = { - holder = root - change = scope:change_1 - } - } - resolve_title_and_vassal_change = scope:change_1 - } - } - #For GoK, they keep using their Gok Title - if = { - limit = { - AND = { - exists = global_var:greatest_of_khans_title - primary_title = global_var:greatest_of_khans_title - } - } - primary_title = { - set_can_be_named_after_dynasty = yes - set_definitive_form = yes - save_scope_as = new_primary - save_scope_as = new_title - set_capital_county = scope:new_capital - } - } - #Otherwise, gain titular empire - else = { - hidden_effect = { - create_dynamic_title = { - tier = empire - name = SETTLED_NOMAD_STEPPE_ADMIN_EMPIRE_NAME - adj = SETTLED_NOMAD_STEPPE_ADMIN_EMPIRE_ADJ - } - scope:new_title = { - save_scope_as = new_primary - set_definitive_form = yes - } - create_title_and_vassal_change = { - type = created - save_scope_as = change_2 - add_claim_on_loss = no - } - scope:new_title = { - set_can_be_named_after_dynasty = yes - change_title_holder = { - holder = root - change = scope:change_2 - } - } - resolve_title_and_vassal_change = scope:change_2 - scope:new_title = { generate_coa = yes } - } - #Make this their primary title, if highest tier - hidden_effect = { - if = { - limit = { - exists = scope:new_primary - NOT = { - highest_held_title_tier > scope:new_primary.tier - } - } - set_primary_title_to = scope:new_primary - scope:new_primary = { - set_capital_county = scope:new_capital - } - } - } - } -} - -generate_new_steppe_admin_families_effect = { - while = { - count = 10 - create_character = { - template = tgp_steppe_admin_family_head_template - culture = root.capital_county.culture - faith = root.capital_county.faith - location = root.location - dynasty = generate - after_creation = { - add_to_list = new_steppe_admin_family_heads - set_employer = root - } - } - } - every_in_list = { - list = new_steppe_admin_family_heads - give_noble_family_title = { - name = noble_family_name - tier = county - article = DEFAULT_TITLE_NAME_ARTICLE - government = steppe_admin_government - save_scope_as = new_title - } - } - create_title_and_vassal_change = { - type = created - save_scope_as = change - } - every_in_list = { - list = new_steppe_admin_family_heads - change_liege = { - liege = root - change = scope:change - } - } - resolve_title_and_vassal_change = scope:change - scope:new_title = { - set_coa = holder.house - } -} - -tgp_cranial_trophies_beheading_effect = { - $KILLER$ = { - save_temporary_scope_as = the_killer # for the Artifact localization - } - $DEAD$ = { - save_temporary_scope_as = dead_one # for the Artifact localization - save_scope_as = dead_character - } - if = { - limit = { - $DEAD$ = { - highest_held_title_tier = tier_hegemony - } - } - $KILLER$ = { - create_artifact = { - name = tgp_cranial_trophy_artifact - description = tgp_cranial_trophy_artifact_desc - rarity = illustrious - type = miscellaneous - modifier = cranial_trophy_modifier_t6 - decaying = yes - template = tgp_severed_head_template - visuals = pocket_severed_head - creator = $DEAD$ - save_scope_as = new_head_artifact - } - } - } - else_if = { - limit = { - $DEAD$ = { - highest_held_title_tier = tier_empire - } - } - $KILLER$ = { - create_artifact = { - name = tgp_cranial_trophy_artifact - description = tgp_cranial_trophy_artifact_desc - rarity = illustrious - type = miscellaneous - modifier = cranial_trophy_modifier_t5 - decaying = yes - template = tgp_severed_head_template - visuals = pocket_severed_head - creator = $DEAD$ - save_scope_as = new_head_artifact - } - } - } - else_if = { - limit = { - $DEAD$ = { - highest_held_title_tier = tier_kingdom - } - } - $KILLER$ = { - create_artifact = { - name = tgp_cranial_trophy_artifact - description = tgp_cranial_trophy_artifact_desc - rarity = famed - type = miscellaneous - modifier = cranial_trophy_modifier_t4 - decaying = yes - template = tgp_severed_head_template - visuals = pocket_severed_head - creator = $DEAD$ - save_scope_as = new_head_artifact - } - } - } - else_if = { - limit = { - $DEAD$ = { - highest_held_title_tier = tier_duchy - } - } - $KILLER$ = { - create_artifact = { - name = tgp_cranial_trophy_artifact - description = tgp_cranial_trophy_artifact_desc - rarity = famed - type = miscellaneous - modifier = cranial_trophy_modifier_t3 - decaying = yes - template = tgp_severed_head_template - visuals = pocket_severed_head - creator = $DEAD$ - save_scope_as = new_head_artifact - } - } - } - else_if = { - limit = { - $DEAD$ = { - highest_held_title_tier = tier_county - } - } - $KILLER$ = { - create_artifact = { - name = tgp_cranial_trophy_artifact - description = tgp_cranial_trophy_artifact_desc - rarity = masterwork - type = miscellaneous - modifier = cranial_trophy_modifier_t2 - decaying = yes - template = tgp_severed_head_template - visuals = pocket_severed_head - creator = $DEAD$ - save_scope_as = new_head_artifact - } - } - } - else_if = { - limit = { - $DEAD$ = { - highest_held_title_tier = tier_barony - } - } - $KILLER$ = { - create_artifact = { - name = tgp_cranial_trophy_artifact - description = tgp_cranial_trophy_artifact_desc - rarity = masterwork - type = miscellaneous - modifier = cranial_trophy_modifier_t1 - decaying = yes - template = tgp_severed_head_template - visuals = pocket_severed_head - creator = $DEAD$ - save_scope_as = new_head_artifact - } - } - } - else = { - $KILLER$ = { - create_artifact = { - name = tgp_cranial_trophy_artifact - description = tgp_cranial_trophy_artifact_desc - rarity = common - type = miscellaneous - modifier = cranial_trophy_modifier_t0 - decaying = yes - template = tgp_severed_head_template - visuals = pocket_severed_head - creator = $DEAD$ - save_scope_as = new_head_artifact - } - } - } - scope:new_head_artifact = { - flag_as_trash_artifact = yes - } - $KILLER$ = { - add_piety = { - value = cranial_trophies_stolen_prestige_value - } - } -} - -generate_ci_poem_title_effect = { - #For use with the [SCOPE.Custom('GetCiPoemName')] loc key. This sets a poem. - #Only needed if you want a randomized but persistent name - otherwise we just use the custom loc key directly and it works out of the box. - random_list = { - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:riverside_city - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:green_jade_bowl - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:scent_fills_the_hall - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:lady_yu - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:butterflies_love_blossoms - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:plucking_mulberry_leafs - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:rivertown_man - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:fragrance_filling_the_hall - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:butterflies_kiss_flowers - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:spring_in_the_han_palace - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:winds_between_pine_trees - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:memories_of_the_past_at_red_cliff - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:my_wrath_bristles_through_my_helmet - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:thinking_of_the_past_at_beigu_pavilion - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:dream_song - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:picking_mulberry - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:as_in_a_dream - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:immortal_by_the_river - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:longing_for_qin_e - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:new_chrysanthemum_flowers - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:poluomen_son - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:pouring_out_deep_emotions - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:rain_hits_a_bell - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:spring_in_the_tower_of_jade - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:drunk_in_the_fairyland - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:anxiety_of_a_beauty - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:writing_of_my_sorrow - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:sad_remembrance - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:on_the_advent_of_spring - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:silk_washing_stream - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:at_an_inn_in_xinshi - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:on_red_lotus_petals - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:pusa_man - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:a_quiet_night - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:huanxi_sand - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:overlapping_golden_light_of_small_hills - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:the_river_is_red - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:the_road_is_difficult - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:phoenix_hairpin - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:boating_on_tai_lake - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:prelude_to_the_water_song - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:rambling_young_man - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:king_of_lanling - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:washing_creek_sands - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:magnolia_blossoms - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:petals_falling_in_the_river - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:my_way_passed_ancient_tombs - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:the_water_clock_sings_at_night - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:dreaming_of_the_south_side_of_the_river - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:beautiful_barbarian - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:missing_the_emperors_hometown - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:daoist_priestess - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:a_bushel_of_pearls - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:bodhisattva_barbarian - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:clear_and_even_music - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:lost_battle - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:beauty_yu - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:crows_cry_at_night - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:phoenix_perched_on_the_parasol_tree - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:imperial_avenue_procession - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:rain_hits_a_bell - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:divination_song - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:attached_to_her_skirt - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:partridge_sky - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:mountain_hawthorn - } - } - 1 = { - save_scope_value_as = { - name = poem_tune - value = flag:the_song_of_tangduo - } - } - } -} - -tgp_step_down_title_recipient_tooltip_effect = { - if = { - limit = { is_independent_ruler = no } - top_liege = { save_temporary_scope_as = fallback_temp } - } - else = { - primary_title.current_heir = { save_temporary_scope_as = fallback_temp } - } - show_as_tooltip = { - create_title_and_vassal_change = { - type = appointment - save_scope_as = change - } - every_held_title = { - limit = { - is_landless_type_title = no - tier > tier_barony - } - save_temporary_scope_as = lost_title_temp - current_heir ?= { save_temporary_scope_as = heir_temp } - if = { - limit = { NOT = { exists = scope:heir_temp } } - scope:fallback_temp = { save_temporary_scope_as = heir_temp } - } - change_title_holder = { - holder = scope:heir_temp - change = scope:change - } - } - resolve_title_and_vassal_change = scope:change - } -} - -tgp_domicile_conversion_when_changing_government_type = { - hidden_effect = { - if = { - limit = { - any_held_title = { - is_noble_family_title = yes - } - has_domicile = yes - NOT = { - domicile ?= { - is_domicile_type = $NEW_DOMICILE_TYPE$ - } - } - } - random_held_title = { - limit = { - is_noble_family_title = yes - } - save_scope_as = old_nf_title - } - tgp_wipe_domicile_effect = yes - if = { - limit = { - has_character_flag = new_government_is_byz_admin - } - give_noble_family_title = { - name = noble_family_name - tier = duchy - article = DEFAULT_TITLE_NAME_ARTICLE - government = $NEW_GOVERNMENT_TYPE$ - save_scope_as = new_title - } - } - else = { - give_noble_family_title = { - name = noble_family_name - tier = county - article = DEFAULT_TITLE_NAME_ARTICLE - government = $NEW_GOVERNMENT_TYPE$ - save_scope_as = new_title - } - } - scope:new_title = { - copy_title_history = scope:old_nf_title - } - destroy_title = scope:old_nf_title - domicile ?= { - set_up_domicile_estate_effect = yes - } - } - } -} - -tgp_wipe_domicile_effect = { - domicile ?= { - if = { - limit = { has_domicile_building = east_asian_estate_main_01 } - remove_domicile_building = east_asian_estate_main_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_main_02 } - remove_domicile_building = east_asian_estate_main_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_main_03 } - remove_domicile_building = east_asian_estate_main_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_main_04 } - remove_domicile_building = east_asian_estate_main_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_main_05 } - remove_domicile_building = east_asian_estate_main_05 - } - if = { - limit = { has_domicile_building = east_asian_estate_library_01 } - remove_domicile_building = east_asian_estate_library_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_library_02 } - remove_domicile_building = east_asian_estate_library_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_library_education_03 } - remove_domicile_building = east_asian_estate_library_education_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_library_education_04 } - remove_domicile_building = east_asian_estate_library_education_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_taxation_01 } - remove_domicile_building = east_asian_estate_taxation_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_taxation_02 } - remove_domicile_building = east_asian_estate_taxation_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_taxation_03 } - remove_domicile_building = east_asian_estate_taxation_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_taxation_04 } - remove_domicile_building = east_asian_estate_taxation_04 - } - if = { - limit = { has_domicile_building = east_asian_peasant_quarters_01 } - remove_domicile_building = east_asian_peasant_quarters_01 - } - if = { - limit = { has_domicile_building = east_asian_peasant_quarters_02 } - remove_domicile_building = east_asian_peasant_quarters_02 - } - if = { - limit = { has_domicile_building = east_asian_peasant_quarters_03 } - remove_domicile_building = east_asian_peasant_quarters_03 - } - if = { - limit = { has_domicile_building = east_asian_peasant_quarters_04 } - remove_domicile_building = east_asian_peasant_quarters_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_minister_office_01 } - remove_domicile_building = east_asian_estate_minister_office_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_minister_office_02 } - remove_domicile_building = east_asian_estate_minister_office_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_minister_office_03 } - remove_domicile_building = east_asian_estate_minister_office_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_minister_office_04 } - remove_domicile_building = east_asian_estate_minister_office_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_movement_study_01 } - remove_domicile_building = east_asian_estate_movement_study_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_movement_study_02 } - remove_domicile_building = east_asian_estate_movement_study_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_movement_study_03 } - remove_domicile_building = east_asian_estate_movement_study_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_movement_study_04 } - remove_domicile_building = east_asian_estate_movement_study_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_archive_01 } - remove_domicile_building = east_asian_estate_archive_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_archive_02 } - remove_domicile_building = east_asian_estate_archive_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_archive_03 } - remove_domicile_building = east_asian_estate_archive_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_archive_04 } - remove_domicile_building = east_asian_estate_archive_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_cartography_office_01 } - remove_domicile_building = east_asian_estate_cartography_office_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_cartography_office_02 } - remove_domicile_building = east_asian_estate_cartography_office_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_cartography_office_03 } - remove_domicile_building = east_asian_estate_cartography_office_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_cartography_office_04 } - remove_domicile_building = east_asian_estate_cartography_office_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_drafting_room_01 } - remove_domicile_building = east_asian_estate_drafting_room_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_drafting_room_02 } - remove_domicile_building = east_asian_estate_drafting_room_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_drafting_room_03 } - remove_domicile_building = east_asian_estate_drafting_room_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_drafting_room_04 } - remove_domicile_building = east_asian_estate_drafting_room_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_clerks_hall_01 } - remove_domicile_building = east_asian_estate_clerks_hall_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_clerks_hall_02 } - remove_domicile_building = east_asian_estate_clerks_hall_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_clerks_hall_03 } - remove_domicile_building = east_asian_estate_clerks_hall_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_clerks_hall_04 } - remove_domicile_building = east_asian_estate_clerks_hall_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_revenue_audit_desk_01 } - remove_domicile_building = east_asian_estate_revenue_audit_desk_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_revenue_audit_desk_02 } - remove_domicile_building = east_asian_estate_revenue_audit_desk_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_revenue_audit_desk_03 } - remove_domicile_building = east_asian_estate_revenue_audit_desk_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_revenue_audit_desk_04 } - remove_domicile_building = east_asian_estate_revenue_audit_desk_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_block_printing_hall_01 } - remove_domicile_building = east_asian_estate_block_printing_hall_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_block_printing_hall_02 } - remove_domicile_building = east_asian_estate_block_printing_hall_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_block_printing_hall_03 } - remove_domicile_building = east_asian_estate_block_printing_hall_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_block_printing_hall_04 } - remove_domicile_building = east_asian_estate_block_printing_hall_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_xuan_paper_stores_01 } - remove_domicile_building = east_asian_estate_xuan_paper_stores_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_xuan_paper_stores_02 } - remove_domicile_building = east_asian_estate_xuan_paper_stores_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_xuan_paper_stores_03 } - remove_domicile_building = east_asian_estate_xuan_paper_stores_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_xuan_paper_stores_04 } - remove_domicile_building = east_asian_estate_xuan_paper_stores_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_water_clock_room_01 } - remove_domicile_building = east_asian_estate_water_clock_room_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_water_clock_room_02 } - remove_domicile_building = east_asian_estate_water_clock_room_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_water_clock_room_03 } - remove_domicile_building = east_asian_estate_water_clock_room_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_water_clock_room_04 } - remove_domicile_building = east_asian_estate_water_clock_room_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_examination_room_01 } - remove_domicile_building = east_asian_estate_examination_room_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_examination_room_02 } - remove_domicile_building = east_asian_estate_examination_room_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_examination_room_03 } - remove_domicile_building = east_asian_estate_examination_room_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_examination_room_04 } - remove_domicile_building = east_asian_estate_examination_room_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_living_quarters_01 } - remove_domicile_building = east_asian_estate_living_quarters_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_living_quarters_02 } - remove_domicile_building = east_asian_estate_living_quarters_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_living_quarters_03 } - remove_domicile_building = east_asian_estate_living_quarters_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_living_quarters_04 } - remove_domicile_building = east_asian_estate_living_quarters_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_study_01 } - remove_domicile_building = east_asian_estate_study_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_study_02 } - remove_domicile_building = east_asian_estate_study_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_study_03 } - remove_domicile_building = east_asian_estate_study_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_study_04 } - remove_domicile_building = east_asian_estate_study_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_commander_study_01 } - remove_domicile_building = east_asian_estate_commander_study_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_commander_study_02 } - remove_domicile_building = east_asian_estate_commander_study_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_commander_study_03 } - remove_domicile_building = east_asian_estate_commander_study_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_commander_study_04 } - remove_domicile_building = east_asian_estate_commander_study_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_office_01 } - remove_domicile_building = east_asian_estate_office_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_office_02 } - remove_domicile_building = east_asian_estate_office_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_office_03 } - remove_domicile_building = east_asian_estate_office_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_office_04 } - remove_domicile_building = east_asian_estate_office_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_servants_quarters_01 } - remove_domicile_building = east_asian_estate_servants_quarters_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_servants_quarters_02 } - remove_domicile_building = east_asian_estate_servants_quarters_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_servants_quarters_03 } - remove_domicile_building = east_asian_estate_servants_quarters_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_servants_quarters_04 } - remove_domicile_building = east_asian_estate_servants_quarters_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_bath_01 } - remove_domicile_building = east_asian_estate_bath_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_bath_02 } - remove_domicile_building = east_asian_estate_bath_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_bath_03 } - remove_domicile_building = east_asian_estate_bath_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_bath_04 } - remove_domicile_building = east_asian_estate_bath_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_guest_room_01 } - remove_domicile_building = east_asian_estate_guest_room_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_guest_room_02 } - remove_domicile_building = east_asian_estate_guest_room_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_guest_room_03 } - remove_domicile_building = east_asian_estate_guest_room_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_guest_room_04 } - remove_domicile_building = east_asian_estate_guest_room_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_wine_cellar_01 } - remove_domicile_building = east_asian_estate_wine_cellar_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_wine_cellar_02 } - remove_domicile_building = east_asian_estate_wine_cellar_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_wine_cellar_03 } - remove_domicile_building = east_asian_estate_wine_cellar_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_courtyard_01 } - remove_domicile_building = east_asian_estate_courtyard_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_courtyard_02 } - remove_domicile_building = east_asian_estate_courtyard_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_courtyard_03 } - remove_domicile_building = east_asian_estate_courtyard_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_courtyard_04 } - remove_domicile_building = east_asian_estate_courtyard_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_prison_01 } - remove_domicile_building = east_asian_estate_prison_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_prison_02 } - remove_domicile_building = east_asian_estate_prison_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_prison_03 } - remove_domicile_building = east_asian_estate_prison_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_prison_04 } - remove_domicile_building = east_asian_estate_prison_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_reception_hall_01 } - remove_domicile_building = east_asian_estate_reception_hall_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_reception_hall_02 } - remove_domicile_building = east_asian_estate_reception_hall_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_reception_hall_03 } - remove_domicile_building = east_asian_estate_reception_hall_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_reception_hall_04 } - remove_domicile_building = east_asian_estate_reception_hall_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_reception_hall_05 } - remove_domicile_building = east_asian_estate_reception_hall_05 - } - if = { - limit = { has_domicile_building = east_asian_estate_cabinet_of_curiosities_01 } - remove_domicile_building = east_asian_estate_cabinet_of_curiosities_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_cabinet_of_curiosities_02 } - remove_domicile_building = east_asian_estate_cabinet_of_curiosities_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_cabinet_of_curiosities_03 } - remove_domicile_building = east_asian_estate_cabinet_of_curiosities_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_rice_field_01 } - remove_domicile_building = east_asian_estate_rice_field_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_rice_field_02 } - remove_domicile_building = east_asian_estate_rice_field_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_rice_field_03 } - remove_domicile_building = east_asian_estate_rice_field_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_rice_field_04 } - remove_domicile_building = east_asian_estate_rice_field_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_rice_field_05 } - remove_domicile_building = east_asian_estate_rice_field_05 - } - if = { - limit = { has_domicile_building = east_asian_estate_rice_field_06 } - remove_domicile_building = east_asian_estate_rice_field_06 - } - if = { - limit = { has_domicile_building = east_asian_estate_tea_01 } - remove_domicile_building = east_asian_estate_tea_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_tea_02 } - remove_domicile_building = east_asian_estate_tea_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_tea_03 } - remove_domicile_building = east_asian_estate_tea_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_tea_04 } - remove_domicile_building = east_asian_estate_tea_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_tea_05 } - remove_domicile_building = east_asian_estate_tea_05 - } - if = { - limit = { has_domicile_building = east_asian_estate_tea_06 } - remove_domicile_building = east_asian_estate_tea_06 - } - if = { - limit = { has_domicile_building = east_asian_estate_market_01 } - remove_domicile_building = east_asian_estate_market_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_market_02 } - remove_domicile_building = east_asian_estate_market_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_market_03 } - remove_domicile_building = east_asian_estate_market_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_market_04 } - remove_domicile_building = east_asian_estate_market_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_market_05 } - remove_domicile_building = east_asian_estate_market_05 - } - if = { - limit = { has_domicile_building = east_asian_estate_market_06 } - remove_domicile_building = east_asian_estate_market_06 - } - if = { - limit = { has_domicile_building = east_asian_estate_health_01 } - remove_domicile_building = east_asian_estate_health_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_health_02 } - remove_domicile_building = east_asian_estate_health_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_health_03 } - remove_domicile_building = east_asian_estate_health_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_health_04 } - remove_domicile_building = east_asian_estate_health_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_health_05 } - remove_domicile_building = east_asian_estate_health_05 - } - if = { - limit = { has_domicile_building = east_asian_estate_health_06 } - remove_domicile_building = east_asian_estate_health_06 - } - if = { - limit = { has_domicile_building = east_asian_estate_silk_01 } - remove_domicile_building = east_asian_estate_silk_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_silk_02 } - remove_domicile_building = east_asian_estate_silk_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_silk_03 } - remove_domicile_building = east_asian_estate_silk_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_silk_04 } - remove_domicile_building = east_asian_estate_silk_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_silk_05 } - remove_domicile_building = east_asian_estate_silk_05 - } - if = { - limit = { has_domicile_building = east_asian_estate_silk_06 } - remove_domicile_building = east_asian_estate_silk_06 - } - if = { - limit = { has_domicile_building = east_asian_estate_ancestral_shrine_01 } - remove_domicile_building = east_asian_estate_ancestral_shrine_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_ancestral_shrine_02 } - remove_domicile_building = east_asian_estate_ancestral_shrine_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_ancestral_shrine_03 } - remove_domicile_building = east_asian_estate_ancestral_shrine_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_ancestral_shrine_04 } - remove_domicile_building = east_asian_estate_ancestral_shrine_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_ancestral_shrine_05 } - remove_domicile_building = east_asian_estate_ancestral_shrine_05 - } - if = { - limit = { has_domicile_building = east_asian_estate_ancestral_shrine_06 } - remove_domicile_building = east_asian_estate_ancestral_shrine_06 - } - if = { - limit = { has_domicile_building = east_asian_estate_temple_01 } - remove_domicile_building = east_asian_estate_temple_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_temple_02 } - remove_domicile_building = east_asian_estate_temple_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_temple_03 } - remove_domicile_building = east_asian_estate_temple_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_temple_04 } - remove_domicile_building = east_asian_estate_temple_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_temple_05 } - remove_domicile_building = east_asian_estate_temple_05 - } - if = { - limit = { has_domicile_building = east_asian_estate_temple_06 } - remove_domicile_building = east_asian_estate_temple_06 - } - if = { - limit = { has_domicile_building = east_asian_estate_barracks_01 } - remove_domicile_building = east_asian_estate_barracks_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_barracks_02 } - remove_domicile_building = east_asian_estate_barracks_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_barracks_03 } - remove_domicile_building = east_asian_estate_barracks_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_barracks_04 } - remove_domicile_building = east_asian_estate_barracks_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_barracks_05 } - remove_domicile_building = east_asian_estate_barracks_05 - } - if = { - limit = { has_domicile_building = east_asian_estate_barracks_06 } - remove_domicile_building = east_asian_estate_barracks_06 - } - if = { - limit = { has_domicile_building = east_asian_estate_watchtower_01 } - remove_domicile_building = east_asian_estate_watchtower_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_watchtower_02 } - remove_domicile_building = east_asian_estate_watchtower_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_watchtower_03 } - remove_domicile_building = east_asian_estate_watchtower_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_watchtower_04 } - remove_domicile_building = east_asian_estate_watchtower_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_watchtower_05 } - remove_domicile_building = east_asian_estate_watchtower_05 - } - if = { - limit = { has_domicile_building = east_asian_estate_watchtower_06 } - remove_domicile_building = east_asian_estate_watchtower_06 - } - if = { - limit = { has_domicile_building = east_asian_estate_garden_01 } - remove_domicile_building = east_asian_estate_garden_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_garden_02 } - remove_domicile_building = east_asian_estate_garden_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_garden_03 } - remove_domicile_building = east_asian_estate_garden_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_garden_leisure_04 } - remove_domicile_building = east_asian_estate_garden_leisure_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_garden_leisure_05 } - remove_domicile_building = east_asian_estate_garden_leisure_05 - } - if = { - limit = { has_domicile_building = east_asian_estate_garden_leisure_06 } - remove_domicile_building = east_asian_estate_garden_leisure_06 - } - if = { - limit = { has_domicile_building = east_asian_estate_garden_fruit_04 } - remove_domicile_building = east_asian_estate_garden_fruit_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_garden_fruit_05 } - remove_domicile_building = east_asian_estate_garden_fruit_05 - } - if = { - limit = { has_domicile_building = east_asian_estate_garden_fruit_06 } - remove_domicile_building = east_asian_estate_garden_fruit_06 - } - if = { - limit = { has_domicile_building = east_asian_estate_stable_01 } - remove_domicile_building = east_asian_estate_stable_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_stable_02 } - remove_domicile_building = east_asian_estate_stable_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_stable_03 } - remove_domicile_building = east_asian_estate_stable_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_stable_grand_04 } - remove_domicile_building = east_asian_estate_stable_grand_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_stable_grand_05 } - remove_domicile_building = east_asian_estate_stable_grand_05 - } - if = { - limit = { has_domicile_building = east_asian_estate_stable_grand_06 } - remove_domicile_building = east_asian_estate_stable_grand_06 - } - if = { - limit = { has_domicile_building = east_asian_estate_stable_kennel_04 } - remove_domicile_building = east_asian_estate_stable_kennel_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_stable_kennel_05 } - remove_domicile_building = east_asian_estate_stable_kennel_05 - } - if = { - limit = { has_domicile_building = east_asian_estate_stable_kennel_06 } - remove_domicile_building = east_asian_estate_stable_kennel_06 - } - if = { - limit = { has_domicile_building = east_asian_estate_workshop_01 } - remove_domicile_building = east_asian_estate_workshop_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_workshop_02 } - remove_domicile_building = east_asian_estate_workshop_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_workshop_carpenter_03 } - remove_domicile_building = east_asian_estate_workshop_carpenter_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_workshop_carpenter_04 } - remove_domicile_building = east_asian_estate_workshop_carpenter_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_workshop_carpenter_05 } - remove_domicile_building = east_asian_estate_workshop_carpenter_05 - } - if = { - limit = { has_domicile_building = east_asian_estate_workshop_carpenter_06 } - remove_domicile_building = east_asian_estate_workshop_carpenter_06 - } - if = { - limit = { has_domicile_building = east_asian_estate_workshop_mason_03 } - remove_domicile_building = east_asian_estate_workshop_mason_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_workshop_mason_04 } - remove_domicile_building = east_asian_estate_workshop_mason_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_workshop_mason_05 } - remove_domicile_building = east_asian_estate_workshop_mason_05 - } - if = { - limit = { has_domicile_building = east_asian_estate_workshop_mason_06 } - remove_domicile_building = east_asian_estate_workshop_mason_06 - } - if = { - limit = { has_domicile_building = east_asian_estate_workshop_textile_03 } - remove_domicile_building = east_asian_estate_workshop_textile_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_workshop_textile_04 } - remove_domicile_building = east_asian_estate_workshop_textile_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_workshop_textile_05 } - remove_domicile_building = east_asian_estate_workshop_textile_05 - } - if = { - limit = { has_domicile_building = east_asian_estate_workshop_textile_06 } - remove_domicile_building = east_asian_estate_workshop_textile_06 - } - if = { - limit = { has_domicile_building = east_asian_estate_storage_01 } - remove_domicile_building = east_asian_estate_storage_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_storage_02 } - remove_domicile_building = east_asian_estate_storage_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_storage_warehouse_03 } - remove_domicile_building = east_asian_estate_storage_warehouse_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_storage_warehouse_04 } - remove_domicile_building = east_asian_estate_storage_warehouse_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_storage_warehouse_05 } - remove_domicile_building = east_asian_estate_storage_warehouse_05 - } - if = { - limit = { has_domicile_building = east_asian_estate_storage_warehouse_06 } - remove_domicile_building = east_asian_estate_storage_warehouse_06 - } - if = { - limit = { has_domicile_building = east_asian_estate_storage_granary_03 } - remove_domicile_building = east_asian_estate_storage_granary_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_storage_granary_04 } - remove_domicile_building = east_asian_estate_storage_granary_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_storage_granary_05 } - remove_domicile_building = east_asian_estate_storage_granary_05 - } - if = { - limit = { has_domicile_building = east_asian_estate_storage_granary_06 } - remove_domicile_building = east_asian_estate_storage_granary_06 - } - if = { - limit = { has_domicile_building = east_asian_estate_grazing_land_01 } - remove_domicile_building = east_asian_estate_grazing_land_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_grazing_land_02 } - remove_domicile_building = east_asian_estate_grazing_land_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_grazing_land_03 } - remove_domicile_building = east_asian_estate_grazing_land_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_grazing_land_04 } - remove_domicile_building = east_asian_estate_grazing_land_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_grazing_land_05 } - remove_domicile_building = east_asian_estate_grazing_land_05 - } - if = { - limit = { has_domicile_building = east_asian_estate_grazing_land_06 } - remove_domicile_building = east_asian_estate_grazing_land_06 - } - if = { - limit = { has_domicile_building = east_asian_estate_horse_pasture_04 } - remove_domicile_building = east_asian_estate_horse_pasture_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_horse_pasture_05 } - remove_domicile_building = east_asian_estate_horse_pasture_05 - } - if = { - limit = { has_domicile_building = east_asian_estate_horse_pasture_06 } - remove_domicile_building = east_asian_estate_horse_pasture_06 - } - if = { - limit = { has_domicile_building = east_asian_estate_camel_pasture_04 } - remove_domicile_building = east_asian_estate_camel_pasture_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_camel_pasture_05 } - remove_domicile_building = east_asian_estate_camel_pasture_05 - } - if = { - limit = { has_domicile_building = east_asian_estate_camel_pasture_06 } - remove_domicile_building = east_asian_estate_camel_pasture_06 - } - if = { - limit = { has_domicile_building = east_asian_estate_elephant_pasture_04 } - remove_domicile_building = east_asian_estate_elephant_pasture_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_elephant_pasture_05 } - remove_domicile_building = east_asian_estate_elephant_pasture_05 - } - if = { - limit = { has_domicile_building = east_asian_estate_elephant_pasture_06 } - remove_domicile_building = east_asian_estate_elephant_pasture_06 - } - if = { - limit = { has_domicile_building = east_asian_estate_gate_01 } - remove_domicile_building = east_asian_estate_gate_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_gate_02 } - remove_domicile_building = east_asian_estate_gate_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_gate_03 } - remove_domicile_building = east_asian_estate_gate_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_gate_04 } - remove_domicile_building = east_asian_estate_gate_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_gate_05 } - remove_domicile_building = east_asian_estate_gate_05 - } - if = { - limit = { has_domicile_building = east_asian_estate_gate_06 } - remove_domicile_building = east_asian_estate_gate_06 - } - if = { - limit = { has_domicile_building = east_asian_estate_waterways_office_01 } - remove_domicile_building = east_asian_estate_waterways_office_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_waterways_office_02 } - remove_domicile_building = east_asian_estate_waterways_office_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_waterways_office_03 } - remove_domicile_building = east_asian_estate_waterways_office_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_waterways_office_04 } - remove_domicile_building = east_asian_estate_waterways_office_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_field_surveyors_office_01 } - remove_domicile_building = east_asian_estate_field_surveyors_office_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_field_surveyors_office_02 } - remove_domicile_building = east_asian_estate_field_surveyors_office_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_field_surveyors_office_03 } - remove_domicile_building = east_asian_estate_field_surveyors_office_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_field_surveyors_office_04 } - remove_domicile_building = east_asian_estate_field_surveyors_office_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_buffer_stock_granary_01 } - remove_domicile_building = east_asian_estate_buffer_stock_granary_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_buffer_stock_granary_02 } - remove_domicile_building = east_asian_estate_buffer_stock_granary_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_buffer_stock_granary_03 } - remove_domicile_building = east_asian_estate_buffer_stock_granary_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_buffer_stock_granary_04 } - remove_domicile_building = east_asian_estate_buffer_stock_granary_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_rice_fish_duck_ponds_01 } - remove_domicile_building = east_asian_estate_rice_fish_duck_ponds_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_rice_fish_duck_ponds_02 } - remove_domicile_building = east_asian_estate_rice_fish_duck_ponds_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_rice_fish_duck_ponds_03 } - remove_domicile_building = east_asian_estate_rice_fish_duck_ponds_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_rice_fish_duck_ponds_04 } - remove_domicile_building = east_asian_estate_rice_fish_duck_ponds_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_militia_muster_green_01 } - remove_domicile_building = east_asian_estate_militia_muster_green_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_militia_muster_green_02 } - remove_domicile_building = east_asian_estate_militia_muster_green_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_militia_muster_green_03 } - remove_domicile_building = east_asian_estate_militia_muster_green_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_militia_muster_green_04 } - remove_domicile_building = east_asian_estate_militia_muster_green_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_ration_wine_stores_01 } - remove_domicile_building = east_asian_estate_ration_wine_stores_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_ration_wine_stores_02 } - remove_domicile_building = east_asian_estate_ration_wine_stores_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_ration_wine_stores_03 } - remove_domicile_building = east_asian_estate_ration_wine_stores_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_ration_wine_stores_04 } - remove_domicile_building = east_asian_estate_ration_wine_stores_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_vintner_halls_01 } - remove_domicile_building = east_asian_estate_vintner_halls_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_vintner_halls_02 } - remove_domicile_building = east_asian_estate_vintner_halls_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_vintner_halls_03 } - remove_domicile_building = east_asian_estate_vintner_halls_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_vintner_halls_04 } - remove_domicile_building = east_asian_estate_vintner_halls_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_wine_press_01 } - remove_domicile_building = east_asian_estate_wine_press_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_wine_press_02 } - remove_domicile_building = east_asian_estate_wine_press_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_wine_press_03 } - remove_domicile_building = east_asian_estate_wine_press_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_wine_press_04 } - remove_domicile_building = east_asian_estate_wine_press_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_cellar_cave_01 } - remove_domicile_building = east_asian_estate_cellar_cave_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_cellar_cave_02 } - remove_domicile_building = east_asian_estate_cellar_cave_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_cellar_cave_03 } - remove_domicile_building = east_asian_estate_cellar_cave_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_cellar_cave_04 } - remove_domicile_building = east_asian_estate_cellar_cave_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_jar_kiln_01 } - remove_domicile_building = east_asian_estate_jar_kiln_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_jar_kiln_02 } - remove_domicile_building = east_asian_estate_jar_kiln_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_jar_kiln_03 } - remove_domicile_building = east_asian_estate_jar_kiln_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_jar_kiln_04 } - remove_domicile_building = east_asian_estate_jar_kiln_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_weighing_house_01 } - remove_domicile_building = east_asian_estate_weighing_house_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_weighing_house_02 } - remove_domicile_building = east_asian_estate_weighing_house_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_weighing_house_03 } - remove_domicile_building = east_asian_estate_weighing_house_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_weighing_house_04 } - remove_domicile_building = east_asian_estate_weighing_house_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_meeting_houses_01 } - remove_domicile_building = east_asian_estate_meeting_houses_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_meeting_houses_02 } - remove_domicile_building = east_asian_estate_meeting_houses_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_meeting_houses_03 } - remove_domicile_building = east_asian_estate_meeting_houses_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_meeting_houses_04 } - remove_domicile_building = east_asian_estate_meeting_houses_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_night_watch_01 } - remove_domicile_building = east_asian_estate_night_watch_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_night_watch_02 } - remove_domicile_building = east_asian_estate_night_watch_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_night_watch_03 } - remove_domicile_building = east_asian_estate_night_watch_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_night_watch_04 } - remove_domicile_building = east_asian_estate_night_watch_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_fire_brigade_01 } - remove_domicile_building = east_asian_estate_fire_brigade_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_fire_brigade_02 } - remove_domicile_building = east_asian_estate_fire_brigade_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_fire_brigade_03 } - remove_domicile_building = east_asian_estate_fire_brigade_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_fire_brigade_04 } - remove_domicile_building = east_asian_estate_fire_brigade_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_courier_posthouse_01 } - remove_domicile_building = east_asian_estate_courier_posthouse_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_courier_posthouse_02 } - remove_domicile_building = east_asian_estate_courier_posthouse_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_courier_posthouse_03 } - remove_domicile_building = east_asian_estate_courier_posthouse_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_courier_posthouse_04 } - remove_domicile_building = east_asian_estate_courier_posthouse_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_dye_works_01 } - remove_domicile_building = east_asian_estate_dye_works_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_dye_works_02 } - remove_domicile_building = east_asian_estate_dye_works_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_dye_works_03 } - remove_domicile_building = east_asian_estate_dye_works_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_dye_works_04 } - remove_domicile_building = east_asian_estate_dye_works_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_sericulture_school_01 } - remove_domicile_building = east_asian_estate_sericulture_school_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_sericulture_school_02 } - remove_domicile_building = east_asian_estate_sericulture_school_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_sericulture_school_03 } - remove_domicile_building = east_asian_estate_sericulture_school_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_sericulture_school_04 } - remove_domicile_building = east_asian_estate_sericulture_school_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_inspection_office_01 } - remove_domicile_building = east_asian_estate_inspection_office_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_inspection_office_02 } - remove_domicile_building = east_asian_estate_inspection_office_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_inspection_office_03 } - remove_domicile_building = east_asian_estate_inspection_office_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_inspection_office_04 } - remove_domicile_building = east_asian_estate_inspection_office_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_mulberry_nursery_01 } - remove_domicile_building = east_asian_estate_mulberry_nursery_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_mulberry_nursery_02 } - remove_domicile_building = east_asian_estate_mulberry_nursery_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_mulberry_nursery_03 } - remove_domicile_building = east_asian_estate_mulberry_nursery_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_mulberry_nursery_04 } - remove_domicile_building = east_asian_estate_mulberry_nursery_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_silk_storage_01 } - remove_domicile_building = east_asian_estate_silk_storage_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_silk_storage_02 } - remove_domicile_building = east_asian_estate_silk_storage_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_silk_storage_03 } - remove_domicile_building = east_asian_estate_silk_storage_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_silk_storage_04 } - remove_domicile_building = east_asian_estate_silk_storage_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_roasting_house_01 } - remove_domicile_building = east_asian_estate_roasting_house_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_roasting_house_02 } - remove_domicile_building = east_asian_estate_roasting_house_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_roasting_house_03 } - remove_domicile_building = east_asian_estate_roasting_house_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_roasting_house_04 } - remove_domicile_building = east_asian_estate_roasting_house_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_grading_hall_01 } - remove_domicile_building = east_asian_estate_grading_hall_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_grading_hall_02 } - remove_domicile_building = east_asian_estate_grading_hall_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_grading_hall_03 } - remove_domicile_building = east_asian_estate_grading_hall_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_grading_hall_04 } - remove_domicile_building = east_asian_estate_grading_hall_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_tea_horse_road_office_01 } - remove_domicile_building = east_asian_estate_tea_horse_road_office_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_tea_horse_road_office_02 } - remove_domicile_building = east_asian_estate_tea_horse_road_office_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_tea_horse_road_office_03 } - remove_domicile_building = east_asian_estate_tea_horse_road_office_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_tea_horse_road_office_04 } - remove_domicile_building = east_asian_estate_tea_horse_road_office_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_tea_tax_office_01 } - remove_domicile_building = east_asian_estate_tea_tax_office_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_tea_tax_office_02 } - remove_domicile_building = east_asian_estate_tea_tax_office_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_tea_tax_office_03 } - remove_domicile_building = east_asian_estate_tea_tax_office_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_tea_tax_office_04 } - remove_domicile_building = east_asian_estate_tea_tax_office_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_teahouse_01 } - remove_domicile_building = east_asian_estate_teahouse_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_teahouse_02 } - remove_domicile_building = east_asian_estate_teahouse_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_teahouse_03 } - remove_domicile_building = east_asian_estate_teahouse_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_teahouse_04 } - remove_domicile_building = east_asian_estate_teahouse_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_pharmacy_01 } - remove_domicile_building = east_asian_estate_pharmacy_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_pharmacy_02 } - remove_domicile_building = east_asian_estate_pharmacy_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_pharmacy_03 } - remove_domicile_building = east_asian_estate_pharmacy_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_pharmacy_04 } - remove_domicile_building = east_asian_estate_pharmacy_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_hot_baths_01 } - remove_domicile_building = east_asian_estate_hot_baths_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_hot_baths_02 } - remove_domicile_building = east_asian_estate_hot_baths_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_hot_baths_03 } - remove_domicile_building = east_asian_estate_hot_baths_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_hot_baths_04 } - remove_domicile_building = east_asian_estate_hot_baths_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_medical_library_01 } - remove_domicile_building = east_asian_estate_medical_library_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_medical_library_02 } - remove_domicile_building = east_asian_estate_medical_library_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_medical_library_03 } - remove_domicile_building = east_asian_estate_medical_library_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_medical_library_04 } - remove_domicile_building = east_asian_estate_medical_library_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_field_surgeon_cart_01 } - remove_domicile_building = east_asian_estate_field_surgeon_cart_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_field_surgeon_cart_02 } - remove_domicile_building = east_asian_estate_field_surgeon_cart_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_field_surgeon_cart_03 } - remove_domicile_building = east_asian_estate_field_surgeon_cart_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_field_surgeon_cart_04 } - remove_domicile_building = east_asian_estate_field_surgeon_cart_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_herb_drying_terrace_01 } - remove_domicile_building = east_asian_estate_herb_drying_terrace_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_herb_drying_terrace_02 } - remove_domicile_building = east_asian_estate_herb_drying_terrace_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_herb_drying_terrace_03 } - remove_domicile_building = east_asian_estate_herb_drying_terrace_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_herb_drying_terrace_04 } - remove_domicile_building = east_asian_estate_herb_drying_terrace_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_bell_drum_tower_01 } - remove_domicile_building = east_asian_estate_bell_drum_tower_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_bell_drum_tower_02 } - remove_domicile_building = east_asian_estate_bell_drum_tower_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_bell_drum_tower_03 } - remove_domicile_building = east_asian_estate_bell_drum_tower_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_bell_drum_tower_04 } - remove_domicile_building = east_asian_estate_bell_drum_tower_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_temple_land_office_01 } - remove_domicile_building = east_asian_estate_temple_land_office_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_temple_land_office_02 } - remove_domicile_building = east_asian_estate_temple_land_office_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_temple_land_office_03 } - remove_domicile_building = east_asian_estate_temple_land_office_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_temple_land_office_04 } - remove_domicile_building = east_asian_estate_temple_land_office_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_lecture_pavilion_01 } - remove_domicile_building = east_asian_estate_lecture_pavilion_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_lecture_pavilion_02 } - remove_domicile_building = east_asian_estate_lecture_pavilion_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_lecture_pavilion_03 } - remove_domicile_building = east_asian_estate_lecture_pavilion_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_lecture_pavilion_04 } - remove_domicile_building = east_asian_estate_lecture_pavilion_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_guesthouse_01 } - remove_domicile_building = east_asian_estate_guesthouse_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_guesthouse_02 } - remove_domicile_building = east_asian_estate_guesthouse_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_guesthouse_03 } - remove_domicile_building = east_asian_estate_guesthouse_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_guesthouse_04 } - remove_domicile_building = east_asian_estate_guesthouse_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_chanting_hall_01 } - remove_domicile_building = east_asian_estate_chanting_hall_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_chanting_hall_02 } - remove_domicile_building = east_asian_estate_chanting_hall_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_chanting_hall_03 } - remove_domicile_building = east_asian_estate_chanting_hall_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_chanting_hall_04 } - remove_domicile_building = east_asian_estate_chanting_hall_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_genealogy_hall_01 } - remove_domicile_building = east_asian_estate_genealogy_hall_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_genealogy_hall_02 } - remove_domicile_building = east_asian_estate_genealogy_hall_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_genealogy_hall_03 } - remove_domicile_building = east_asian_estate_genealogy_hall_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_genealogy_hall_04 } - remove_domicile_building = east_asian_estate_genealogy_hall_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_history_school_01 } - remove_domicile_building = east_asian_estate_history_school_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_history_school_02 } - remove_domicile_building = east_asian_estate_history_school_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_history_school_03 } - remove_domicile_building = east_asian_estate_history_school_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_history_school_04 } - remove_domicile_building = east_asian_estate_history_school_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_ancestral_orchard_01 } - remove_domicile_building = east_asian_estate_ancestral_orchard_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_ancestral_orchard_02 } - remove_domicile_building = east_asian_estate_ancestral_orchard_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_ancestral_orchard_03 } - remove_domicile_building = east_asian_estate_ancestral_orchard_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_ancestral_orchard_04 } - remove_domicile_building = east_asian_estate_ancestral_orchard_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_rites_office_01 } - remove_domicile_building = east_asian_estate_rites_office_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_rites_office_02 } - remove_domicile_building = east_asian_estate_rites_office_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_rites_office_03 } - remove_domicile_building = east_asian_estate_rites_office_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_rites_office_04 } - remove_domicile_building = east_asian_estate_rites_office_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_memorial_archway_01 } - remove_domicile_building = east_asian_estate_memorial_archway_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_memorial_archway_02 } - remove_domicile_building = east_asian_estate_memorial_archway_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_memorial_archway_03 } - remove_domicile_building = east_asian_estate_memorial_archway_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_memorial_archway_04 } - remove_domicile_building = east_asian_estate_memorial_archway_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_armorer_01 } - remove_domicile_building = east_asian_estate_armorer_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_armorer_02 } - remove_domicile_building = east_asian_estate_armorer_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_armorer_03 } - remove_domicile_building = east_asian_estate_armorer_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_armorer_04 } - remove_domicile_building = east_asian_estate_armorer_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_veterans_hall_01 } - remove_domicile_building = east_asian_estate_veterans_hall_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_veterans_hall_02 } - remove_domicile_building = east_asian_estate_veterans_hall_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_veterans_hall_03 } - remove_domicile_building = east_asian_estate_veterans_hall_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_veterans_hall_04 } - remove_domicile_building = east_asian_estate_veterans_hall_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_quartermaster_01 } - remove_domicile_building = east_asian_estate_quartermaster_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_quartermaster_02 } - remove_domicile_building = east_asian_estate_quartermaster_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_quartermaster_03 } - remove_domicile_building = east_asian_estate_quartermaster_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_quartermaster_04 } - remove_domicile_building = east_asian_estate_quartermaster_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_sergeants_school_01 } - remove_domicile_building = east_asian_estate_sergeants_school_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_sergeants_school_02 } - remove_domicile_building = east_asian_estate_sergeants_school_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_sergeants_school_03 } - remove_domicile_building = east_asian_estate_sergeants_school_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_sergeants_school_04 } - remove_domicile_building = east_asian_estate_sergeants_school_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_drill_yard_01 } - remove_domicile_building = east_asian_estate_drill_yard_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_drill_yard_02 } - remove_domicile_building = east_asian_estate_drill_yard_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_drill_yard_03 } - remove_domicile_building = east_asian_estate_drill_yard_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_drill_yard_04 } - remove_domicile_building = east_asian_estate_drill_yard_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_pass_office_01 } - remove_domicile_building = east_asian_estate_pass_office_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_pass_office_02 } - remove_domicile_building = east_asian_estate_pass_office_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_pass_office_03 } - remove_domicile_building = east_asian_estate_pass_office_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_pass_office_04 } - remove_domicile_building = east_asian_estate_pass_office_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_gunpowder_storage_01 } - remove_domicile_building = east_asian_estate_gunpowder_storage_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_gunpowder_storage_02 } - remove_domicile_building = east_asian_estate_gunpowder_storage_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_gunpowder_storage_03 } - remove_domicile_building = east_asian_estate_gunpowder_storage_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_gunpowder_storage_04 } - remove_domicile_building = east_asian_estate_gunpowder_storage_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_signal_fires_01 } - remove_domicile_building = east_asian_estate_signal_fires_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_signal_fires_02 } - remove_domicile_building = east_asian_estate_signal_fires_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_signal_fires_03 } - remove_domicile_building = east_asian_estate_signal_fires_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_signal_fires_04 } - remove_domicile_building = east_asian_estate_signal_fires_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_regular_patrols_01 } - remove_domicile_building = east_asian_estate_regular_patrols_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_regular_patrols_02 } - remove_domicile_building = east_asian_estate_regular_patrols_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_regular_patrols_03 } - remove_domicile_building = east_asian_estate_regular_patrols_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_regular_patrols_04 } - remove_domicile_building = east_asian_estate_regular_patrols_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_crossbow_storage_01 } - remove_domicile_building = east_asian_estate_crossbow_storage_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_crossbow_storage_02 } - remove_domicile_building = east_asian_estate_crossbow_storage_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_crossbow_storage_03 } - remove_domicile_building = east_asian_estate_crossbow_storage_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_crossbow_storage_04 } - remove_domicile_building = east_asian_estate_crossbow_storage_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_aviary_01 } - remove_domicile_building = east_asian_estate_aviary_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_aviary_02 } - remove_domicile_building = east_asian_estate_aviary_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_aviary_03 } - remove_domicile_building = east_asian_estate_aviary_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_aviary_04 } - remove_domicile_building = east_asian_estate_aviary_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_four_gentlemen_01 } - remove_domicile_building = east_asian_estate_four_gentlemen_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_four_gentlemen_02 } - remove_domicile_building = east_asian_estate_four_gentlemen_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_four_gentlemen_03 } - remove_domicile_building = east_asian_estate_four_gentlemen_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_four_gentlemen_04 } - remove_domicile_building = east_asian_estate_four_gentlemen_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_scholars_rocks_01 } - remove_domicile_building = east_asian_estate_scholars_rocks_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_scholars_rocks_02 } - remove_domicile_building = east_asian_estate_scholars_rocks_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_scholars_rocks_03 } - remove_domicile_building = east_asian_estate_scholars_rocks_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_scholars_rocks_04 } - remove_domicile_building = east_asian_estate_scholars_rocks_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_lotus_pond_01 } - remove_domicile_building = east_asian_estate_lotus_pond_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_lotus_pond_02 } - remove_domicile_building = east_asian_estate_lotus_pond_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_lotus_pond_03 } - remove_domicile_building = east_asian_estate_lotus_pond_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_lotus_pond_04 } - remove_domicile_building = east_asian_estate_lotus_pond_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_fruit_trees_01 } - remove_domicile_building = east_asian_estate_fruit_trees_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_fruit_trees_02 } - remove_domicile_building = east_asian_estate_fruit_trees_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_fruit_trees_03 } - remove_domicile_building = east_asian_estate_fruit_trees_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_fruit_trees_04 } - remove_domicile_building = east_asian_estate_fruit_trees_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_foaling_pens_01 } - remove_domicile_building = east_asian_estate_foaling_pens_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_foaling_pens_02 } - remove_domicile_building = east_asian_estate_foaling_pens_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_foaling_pens_03 } - remove_domicile_building = east_asian_estate_foaling_pens_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_foaling_pens_04 } - remove_domicile_building = east_asian_estate_foaling_pens_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_riding_arena_01 } - remove_domicile_building = east_asian_estate_riding_arena_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_riding_arena_02 } - remove_domicile_building = east_asian_estate_riding_arena_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_riding_arena_03 } - remove_domicile_building = east_asian_estate_riding_arena_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_riding_arena_04 } - remove_domicile_building = east_asian_estate_riding_arena_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_farriers_office_01 } - remove_domicile_building = east_asian_estate_farriers_office_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_farriers_office_02 } - remove_domicile_building = east_asian_estate_farriers_office_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_farriers_office_03 } - remove_domicile_building = east_asian_estate_farriers_office_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_farriers_office_04 } - remove_domicile_building = east_asian_estate_farriers_office_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_bloodline_records_office_01 } - remove_domicile_building = east_asian_estate_bloodline_records_office_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_bloodline_records_office_02 } - remove_domicile_building = east_asian_estate_bloodline_records_office_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_bloodline_records_office_03 } - remove_domicile_building = east_asian_estate_bloodline_records_office_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_bloodline_records_office_04 } - remove_domicile_building = east_asian_estate_bloodline_records_office_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_fodder_reserves_01 } - remove_domicile_building = east_asian_estate_fodder_reserves_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_fodder_reserves_02 } - remove_domicile_building = east_asian_estate_fodder_reserves_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_fodder_reserves_03 } - remove_domicile_building = east_asian_estate_fodder_reserves_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_fodder_reserves_04 } - remove_domicile_building = east_asian_estate_fodder_reserves_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_paper_mill_01 } - remove_domicile_building = east_asian_estate_paper_mill_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_paper_mill_02 } - remove_domicile_building = east_asian_estate_paper_mill_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_paper_mill_03 } - remove_domicile_building = east_asian_estate_paper_mill_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_paper_mill_04 } - remove_domicile_building = east_asian_estate_paper_mill_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_ink_brush_makers_01 } - remove_domicile_building = east_asian_estate_ink_brush_makers_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_ink_brush_makers_02 } - remove_domicile_building = east_asian_estate_ink_brush_makers_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_ink_brush_makers_03 } - remove_domicile_building = east_asian_estate_ink_brush_makers_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_ink_brush_makers_04 } - remove_domicile_building = east_asian_estate_ink_brush_makers_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_ceramics_kiln_01 } - remove_domicile_building = east_asian_estate_ceramics_kiln_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_ceramics_kiln_02 } - remove_domicile_building = east_asian_estate_ceramics_kiln_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_ceramics_kiln_03 } - remove_domicile_building = east_asian_estate_ceramics_kiln_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_ceramics_kiln_04 } - remove_domicile_building = east_asian_estate_ceramics_kiln_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_lacquer_studio_01 } - remove_domicile_building = east_asian_estate_lacquer_studio_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_lacquer_studio_02 } - remove_domicile_building = east_asian_estate_lacquer_studio_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_lacquer_studio_03 } - remove_domicile_building = east_asian_estate_lacquer_studio_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_lacquer_studio_04 } - remove_domicile_building = east_asian_estate_lacquer_studio_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_leatherworks_01 } - remove_domicile_building = east_asian_estate_leatherworks_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_leatherworks_02 } - remove_domicile_building = east_asian_estate_leatherworks_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_leatherworks_03 } - remove_domicile_building = east_asian_estate_leatherworks_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_leatherworks_04 } - remove_domicile_building = east_asian_estate_leatherworks_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_ever_normal_granaries_01 } - remove_domicile_building = east_asian_estate_ever_normal_granaries_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_ever_normal_granaries_02 } - remove_domicile_building = east_asian_estate_ever_normal_granaries_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_ever_normal_granaries_03 } - remove_domicile_building = east_asian_estate_ever_normal_granaries_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_ever_normal_granaries_04 } - remove_domicile_building = east_asian_estate_ever_normal_granaries_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_millhouse_01 } - remove_domicile_building = east_asian_estate_millhouse_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_millhouse_02 } - remove_domicile_building = east_asian_estate_millhouse_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_millhouse_03 } - remove_domicile_building = east_asian_estate_millhouse_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_millhouse_04 } - remove_domicile_building = east_asian_estate_millhouse_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_ledger_office_01 } - remove_domicile_building = east_asian_estate_ledger_office_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_ledger_office_02 } - remove_domicile_building = east_asian_estate_ledger_office_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_ledger_office_03 } - remove_domicile_building = east_asian_estate_ledger_office_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_ledger_office_04 } - remove_domicile_building = east_asian_estate_ledger_office_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_drying_loft_01 } - remove_domicile_building = east_asian_estate_drying_loft_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_drying_loft_02 } - remove_domicile_building = east_asian_estate_drying_loft_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_drying_loft_03 } - remove_domicile_building = east_asian_estate_drying_loft_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_drying_loft_04 } - remove_domicile_building = east_asian_estate_drying_loft_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_weights_measures_bench_01 } - remove_domicile_building = east_asian_estate_weights_measures_bench_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_weights_measures_bench_02 } - remove_domicile_building = east_asian_estate_weights_measures_bench_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_weights_measures_bench_03 } - remove_domicile_building = east_asian_estate_weights_measures_bench_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_weights_measures_bench_04 } - remove_domicile_building = east_asian_estate_weights_measures_bench_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_seasonal_shelters_01 } - remove_domicile_building = east_asian_estate_seasonal_shelters_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_seasonal_shelters_02 } - remove_domicile_building = east_asian_estate_seasonal_shelters_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_seasonal_shelters_03 } - remove_domicile_building = east_asian_estate_seasonal_shelters_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_seasonal_shelters_04 } - remove_domicile_building = east_asian_estate_seasonal_shelters_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_veterinary_shed_01 } - remove_domicile_building = east_asian_estate_veterinary_shed_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_veterinary_shed_02 } - remove_domicile_building = east_asian_estate_veterinary_shed_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_veterinary_shed_03 } - remove_domicile_building = east_asian_estate_veterinary_shed_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_veterinary_shed_04 } - remove_domicile_building = east_asian_estate_veterinary_shed_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_watering_ditches_01 } - remove_domicile_building = east_asian_estate_watering_ditches_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_watering_ditches_02 } - remove_domicile_building = east_asian_estate_watering_ditches_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_watering_ditches_03 } - remove_domicile_building = east_asian_estate_watering_ditches_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_watering_ditches_04 } - remove_domicile_building = east_asian_estate_watering_ditches_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_salt_lick_terraces_01 } - remove_domicile_building = east_asian_estate_salt_lick_terraces_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_salt_lick_terraces_02 } - remove_domicile_building = east_asian_estate_salt_lick_terraces_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_salt_lick_terraces_03 } - remove_domicile_building = east_asian_estate_salt_lick_terraces_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_salt_lick_terraces_04 } - remove_domicile_building = east_asian_estate_salt_lick_terraces_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_rotation_paddocks_01 } - remove_domicile_building = east_asian_estate_rotation_paddocks_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_rotation_paddocks_02 } - remove_domicile_building = east_asian_estate_rotation_paddocks_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_rotation_paddocks_03 } - remove_domicile_building = east_asian_estate_rotation_paddocks_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_rotation_paddocks_04 } - remove_domicile_building = east_asian_estate_rotation_paddocks_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_disciples_hall_01 } - remove_domicile_building = east_asian_estate_disciples_hall_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_disciples_hall_02 } - remove_domicile_building = east_asian_estate_disciples_hall_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_disciples_hall_03 } - remove_domicile_building = east_asian_estate_disciples_hall_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_disciples_hall_04 } - remove_domicile_building = east_asian_estate_disciples_hall_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_donation_box_01 } - remove_domicile_building = east_asian_estate_donation_box_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_donation_box_02 } - remove_domicile_building = east_asian_estate_donation_box_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_donation_box_03 } - remove_domicile_building = east_asian_estate_donation_box_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_donation_box_04 } - remove_domicile_building = east_asian_estate_donation_box_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_gate_plaques_01 } - remove_domicile_building = east_asian_estate_gate_plaques_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_gate_plaques_02 } - remove_domicile_building = east_asian_estate_gate_plaques_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_gate_plaques_03 } - remove_domicile_building = east_asian_estate_gate_plaques_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_gate_plaques_04 } - remove_domicile_building = east_asian_estate_gate_plaques_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_pavilion_01 } - remove_domicile_building = east_asian_estate_pavilion_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_pavilion_02 } - remove_domicile_building = east_asian_estate_pavilion_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_pavilion_03 } - remove_domicile_building = east_asian_estate_pavilion_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_pavilion_04 } - remove_domicile_building = east_asian_estate_pavilion_04 - } - if = { - limit = { has_domicile_building = east_asian_estate_performance_stage_01 } - remove_domicile_building = east_asian_estate_performance_stage_01 - } - if = { - limit = { has_domicile_building = east_asian_estate_performance_stage_02 } - remove_domicile_building = east_asian_estate_performance_stage_02 - } - if = { - limit = { has_domicile_building = east_asian_estate_performance_stage_03 } - remove_domicile_building = east_asian_estate_performance_stage_03 - } - if = { - limit = { has_domicile_building = east_asian_estate_performance_stage_04 } - remove_domicile_building = east_asian_estate_performance_stage_04 - } - if = { - limit = { has_domicile_building = estate_main_01 } - remove_domicile_building = estate_main_01 - } - if = { - limit = { has_domicile_building = estate_main_02 } - remove_domicile_building = estate_main_02 - } - if = { - limit = { has_domicile_building = estate_main_03 } - remove_domicile_building = estate_main_03 - } - if = { - limit = { has_domicile_building = estate_main_04 } - remove_domicile_building = estate_main_04 - } - if = { - limit = { has_domicile_building = estate_main_05 } - remove_domicile_building = estate_main_05 - } - if = { - limit = { has_domicile_building = living_quarters_01 } - remove_domicile_building = living_quarters_01 - } - if = { - limit = { has_domicile_building = living_quarters_02 } - remove_domicile_building = living_quarters_02 - } - if = { - limit = { has_domicile_building = living_quarters_03 } - remove_domicile_building = living_quarters_03 - } - if = { - limit = { has_domicile_building = living_quarters_04 } - remove_domicile_building = living_quarters_04 - } - if = { - limit = { has_domicile_building = trophy_room_01 } - remove_domicile_building = trophy_room_01 - } - if = { - limit = { has_domicile_building = trophy_room_02 } - remove_domicile_building = trophy_room_02 - } - if = { - limit = { has_domicile_building = trophy_room_03 } - remove_domicile_building = trophy_room_03 - } - if = { - limit = { has_domicile_building = trophy_room_04 } - remove_domicile_building = trophy_room_04 - } - if = { - limit = { has_domicile_building = office_01 } - remove_domicile_building = office_01 - } - if = { - limit = { has_domicile_building = office_02 } - remove_domicile_building = office_02 - } - if = { - limit = { has_domicile_building = office_03 } - remove_domicile_building = office_03 - } - if = { - limit = { has_domicile_building = office_04 } - remove_domicile_building = office_04 - } - if = { - limit = { has_domicile_building = servants_quarters_01 } - remove_domicile_building = servants_quarters_01 - } - if = { - limit = { has_domicile_building = servants_quarters_02 } - remove_domicile_building = servants_quarters_02 - } - if = { - limit = { has_domicile_building = servants_quarters_03 } - remove_domicile_building = servants_quarters_03 - } - if = { - limit = { has_domicile_building = servants_quarters_04 } - remove_domicile_building = servants_quarters_04 - } - if = { - limit = { has_domicile_building = library_01 } - remove_domicile_building = library_01 - } - if = { - limit = { has_domicile_building = library_02 } - remove_domicile_building = library_02 - } - if = { - limit = { has_domicile_building = library_observatory_03 } - remove_domicile_building = library_observatory_03 - } - if = { - limit = { has_domicile_building = library_observatory_04 } - remove_domicile_building = library_observatory_04 - } - if = { - limit = { has_domicile_building = library_education_03 } - remove_domicile_building = library_education_03 - } - if = { - limit = { has_domicile_building = library_education_04 } - remove_domicile_building = library_education_04 - } - if = { - limit = { has_domicile_building = bath_01 } - remove_domicile_building = bath_01 - } - if = { - limit = { has_domicile_building = bath_02 } - remove_domicile_building = bath_02 - } - if = { - limit = { has_domicile_building = bath_03 } - remove_domicile_building = bath_03 - } - if = { - limit = { has_domicile_building = bath_04 } - remove_domicile_building = bath_04 - } - if = { - limit = { has_domicile_building = guest_room_01 } - remove_domicile_building = guest_room_01 - } - if = { - limit = { has_domicile_building = guest_room_02 } - remove_domicile_building = guest_room_02 - } - if = { - limit = { has_domicile_building = guest_room_03 } - remove_domicile_building = guest_room_03 - } - if = { - limit = { has_domicile_building = guest_room_04 } - remove_domicile_building = guest_room_04 - } - if = { - limit = { has_domicile_building = guest_room_05 } - remove_domicile_building = guest_room_05 - } - if = { - limit = { has_domicile_building = guest_room_06 } - remove_domicile_building = guest_room_06 - } - if = { - limit = { has_domicile_building = wine_cellar_01 } - remove_domicile_building = wine_cellar_01 - } - if = { - limit = { has_domicile_building = wine_cellar_02 } - remove_domicile_building = wine_cellar_02 - } - if = { - limit = { has_domicile_building = wine_cellar_03 } - remove_domicile_building = wine_cellar_03 - } - if = { - limit = { has_domicile_building = courtyard_01 } - remove_domicile_building = courtyard_01 - } - if = { - limit = { has_domicile_building = courtyard_02 } - remove_domicile_building = courtyard_02 - } - if = { - limit = { has_domicile_building = courtyard_03 } - remove_domicile_building = courtyard_03 - } - if = { - limit = { has_domicile_building = courtyard_04 } - remove_domicile_building = courtyard_04 - } - if = { - limit = { has_domicile_building = prison_01 } - remove_domicile_building = prison_01 - } - if = { - limit = { has_domicile_building = prison_02 } - remove_domicile_building = prison_02 - } - if = { - limit = { has_domicile_building = prison_03 } - remove_domicile_building = prison_03 - } - if = { - limit = { has_domicile_building = prison_04 } - remove_domicile_building = prison_04 - } - if = { - limit = { has_domicile_building = reception_hall_01 } - remove_domicile_building = reception_hall_01 - } - if = { - limit = { has_domicile_building = reception_hall_02 } - remove_domicile_building = reception_hall_02 - } - if = { - limit = { has_domicile_building = reception_hall_03 } - remove_domicile_building = reception_hall_03 - } - if = { - limit = { has_domicile_building = reception_hall_04 } - remove_domicile_building = reception_hall_04 - } - if = { - limit = { has_domicile_building = reception_hall_05 } - remove_domicile_building = reception_hall_05 - } - if = { - limit = { has_domicile_building = cabinet_of_curiosities_01 } - remove_domicile_building = cabinet_of_curiosities_01 - } - if = { - limit = { has_domicile_building = cabinet_of_curiosities_02 } - remove_domicile_building = cabinet_of_curiosities_02 - } - if = { - limit = { has_domicile_building = cabinet_of_curiosities_03 } - remove_domicile_building = cabinet_of_curiosities_03 - } - if = { - limit = { has_domicile_building = grand_solar_01 } - remove_domicile_building = grand_solar_01 - } - if = { - limit = { has_domicile_building = grand_solar_02 } - remove_domicile_building = grand_solar_02 - } - if = { - limit = { has_domicile_building = grand_solar_03 } - remove_domicile_building = grand_solar_03 - } - if = { - limit = { has_domicile_building = grand_solar_04 } - remove_domicile_building = grand_solar_04 - } - if = { - limit = { has_domicile_building = temple_small_01 } - remove_domicile_building = temple_small_01 - } - if = { - limit = { has_domicile_building = temple_small_02 } - remove_domicile_building = temple_small_02 - } - if = { - limit = { has_domicile_building = temple_small_03 } - remove_domicile_building = temple_small_03 - } - if = { - limit = { has_domicile_building = temple_crypt_04 } - remove_domicile_building = temple_crypt_04 - } - if = { - limit = { has_domicile_building = temple_crypt_05 } - remove_domicile_building = temple_crypt_05 - } - if = { - limit = { has_domicile_building = temple_crypt_06 } - remove_domicile_building = temple_crypt_06 - } - if = { - limit = { has_domicile_building = temple_large_04 } - remove_domicile_building = temple_large_04 - } - if = { - limit = { has_domicile_building = temple_large_05 } - remove_domicile_building = temple_large_05 - } - if = { - limit = { has_domicile_building = temple_large_06 } - remove_domicile_building = temple_large_06 - } - if = { - limit = { has_domicile_building = temple_monastery_04 } - remove_domicile_building = temple_monastery_04 - } - if = { - limit = { has_domicile_building = temple_monastery_05 } - remove_domicile_building = temple_monastery_05 - } - if = { - limit = { has_domicile_building = temple_monastery_06 } - remove_domicile_building = temple_monastery_06 - } - if = { - limit = { has_domicile_building = barracks_01 } - remove_domicile_building = barracks_01 - } - if = { - limit = { has_domicile_building = barracks_02 } - remove_domicile_building = barracks_02 - } - if = { - limit = { has_domicile_building = barracks_03 } - remove_domicile_building = barracks_03 - } - if = { - limit = { has_domicile_building = barracks_04 } - remove_domicile_building = barracks_04 - } - if = { - limit = { has_domicile_building = barracks_05 } - remove_domicile_building = barracks_05 - } - if = { - limit = { has_domicile_building = barracks_06 } - remove_domicile_building = barracks_06 - } - if = { - limit = { has_domicile_building = watchtower_01 } - remove_domicile_building = watchtower_01 - } - if = { - limit = { has_domicile_building = watchtower_02 } - remove_domicile_building = watchtower_02 - } - if = { - limit = { has_domicile_building = watchtower_03 } - remove_domicile_building = watchtower_03 - } - if = { - limit = { has_domicile_building = watchtower_04 } - remove_domicile_building = watchtower_04 - } - if = { - limit = { has_domicile_building = watchtower_05 } - remove_domicile_building = watchtower_05 - } - if = { - limit = { has_domicile_building = watchtower_06 } - remove_domicile_building = watchtower_06 - } - if = { - limit = { has_domicile_building = guardhouse_01 } - remove_domicile_building = guardhouse_01 - } - if = { - limit = { has_domicile_building = guardhouse_02 } - remove_domicile_building = guardhouse_02 - } - if = { - limit = { has_domicile_building = guardhouse_03 } - remove_domicile_building = guardhouse_03 - } - if = { - limit = { has_domicile_building = guardhouse_04 } - remove_domicile_building = guardhouse_04 - } - if = { - limit = { has_domicile_building = garden_01 } - remove_domicile_building = garden_01 - } - if = { - limit = { has_domicile_building = garden_02 } - remove_domicile_building = garden_02 - } - if = { - limit = { has_domicile_building = garden_03 } - remove_domicile_building = garden_03 - } - if = { - limit = { has_domicile_building = garden_leisure_04 } - remove_domicile_building = garden_leisure_04 - } - if = { - limit = { has_domicile_building = garden_leisure_05 } - remove_domicile_building = garden_leisure_05 - } - if = { - limit = { has_domicile_building = garden_leisure_06 } - remove_domicile_building = garden_leisure_06 - } - if = { - limit = { has_domicile_building = garden_fruit_04 } - remove_domicile_building = garden_fruit_04 - } - if = { - limit = { has_domicile_building = garden_fruit_05 } - remove_domicile_building = garden_fruit_05 - } - if = { - limit = { has_domicile_building = garden_fruit_06 } - remove_domicile_building = garden_fruit_06 - } - if = { - limit = { has_domicile_building = stable_01 } - remove_domicile_building = stable_01 - } - if = { - limit = { has_domicile_building = stable_02 } - remove_domicile_building = stable_02 - } - if = { - limit = { has_domicile_building = stable_03 } - remove_domicile_building = stable_03 - } - if = { - limit = { has_domicile_building = stable_grand_04 } - remove_domicile_building = stable_grand_04 - } - if = { - limit = { has_domicile_building = stable_grand_05 } - remove_domicile_building = stable_grand_05 - } - if = { - limit = { has_domicile_building = stable_grand_06 } - remove_domicile_building = stable_grand_06 - } - if = { - limit = { has_domicile_building = stable_kennel_04 } - remove_domicile_building = stable_kennel_04 - } - if = { - limit = { has_domicile_building = stable_kennel_05 } - remove_domicile_building = stable_kennel_05 - } - if = { - limit = { has_domicile_building = stable_kennel_06 } - remove_domicile_building = stable_kennel_06 - } - if = { - limit = { has_domicile_building = stable_chariot_04 } - remove_domicile_building = stable_chariot_04 - } - if = { - limit = { has_domicile_building = stable_chariot_05 } - remove_domicile_building = stable_chariot_05 - } - if = { - limit = { has_domicile_building = stable_chariot_06 } - remove_domicile_building = stable_chariot_06 - } - if = { - limit = { has_domicile_building = workshop_01 } - remove_domicile_building = workshop_01 - } - if = { - limit = { has_domicile_building = workshop_02 } - remove_domicile_building = workshop_02 - } - if = { - limit = { has_domicile_building = workshop_carpenter_03 } - remove_domicile_building = workshop_carpenter_03 - } - if = { - limit = { has_domicile_building = workshop_carpenter_04 } - remove_domicile_building = workshop_carpenter_04 - } - if = { - limit = { has_domicile_building = workshop_carpenter_05 } - remove_domicile_building = workshop_carpenter_05 - } - if = { - limit = { has_domicile_building = workshop_carpenter_06 } - remove_domicile_building = workshop_carpenter_06 - } - if = { - limit = { has_domicile_building = workshop_mason_03 } - remove_domicile_building = workshop_mason_03 - } - if = { - limit = { has_domicile_building = workshop_mason_04 } - remove_domicile_building = workshop_mason_04 - } - if = { - limit = { has_domicile_building = workshop_mason_05 } - remove_domicile_building = workshop_mason_05 - } - if = { - limit = { has_domicile_building = workshop_mason_06 } - remove_domicile_building = workshop_mason_06 - } - if = { - limit = { has_domicile_building = workshop_textile_03 } - remove_domicile_building = workshop_textile_03 - } - if = { - limit = { has_domicile_building = workshop_textile_04 } - remove_domicile_building = workshop_textile_04 - } - if = { - limit = { has_domicile_building = workshop_textile_05 } - remove_domicile_building = workshop_textile_05 - } - if = { - limit = { has_domicile_building = workshop_textile_06 } - remove_domicile_building = workshop_textile_06 - } - if = { - limit = { has_domicile_building = storage_01 } - remove_domicile_building = storage_01 - } - if = { - limit = { has_domicile_building = storage_02 } - remove_domicile_building = storage_02 - } - if = { - limit = { has_domicile_building = storage_warehouse_03 } - remove_domicile_building = storage_warehouse_03 - } - if = { - limit = { has_domicile_building = storage_warehouse_04 } - remove_domicile_building = storage_warehouse_04 - } - if = { - limit = { has_domicile_building = storage_granary_03 } - remove_domicile_building = storage_granary_03 - } - if = { - limit = { has_domicile_building = storage_granary_04 } - remove_domicile_building = storage_granary_04 - } - if = { - limit = { has_domicile_building = market_01 } - remove_domicile_building = market_01 - } - if = { - limit = { has_domicile_building = market_02 } - remove_domicile_building = market_02 - } - if = { - limit = { has_domicile_building = market_03 } - remove_domicile_building = market_03 - } - if = { - limit = { has_domicile_building = market_04 } - remove_domicile_building = market_04 - } - if = { - limit = { has_domicile_building = market_05 } - remove_domicile_building = market_05 - } - if = { - limit = { has_domicile_building = market_06 } - remove_domicile_building = market_06 - } - if = { - limit = { has_domicile_building = grazing_land_01 } - remove_domicile_building = grazing_land_01 - } - if = { - limit = { has_domicile_building = grazing_land_02 } - remove_domicile_building = grazing_land_02 - } - if = { - limit = { has_domicile_building = grazing_land_03 } - remove_domicile_building = grazing_land_03 - } - if = { - limit = { has_domicile_building = grazing_land_04 } - remove_domicile_building = grazing_land_04 - } - if = { - limit = { has_domicile_building = grazing_land_05 } - remove_domicile_building = grazing_land_05 - } - if = { - limit = { has_domicile_building = grazing_land_06 } - remove_domicile_building = grazing_land_06 - } - if = { - limit = { has_domicile_building = horse_pasture_04 } - remove_domicile_building = horse_pasture_04 - } - if = { - limit = { has_domicile_building = horse_pasture_05 } - remove_domicile_building = horse_pasture_05 - } - if = { - limit = { has_domicile_building = horse_pasture_06 } - remove_domicile_building = horse_pasture_06 - } - if = { - limit = { has_domicile_building = camel_pasture_04 } - remove_domicile_building = camel_pasture_04 - } - if = { - limit = { has_domicile_building = camel_pasture_05 } - remove_domicile_building = camel_pasture_05 - } - if = { - limit = { has_domicile_building = camel_pasture_06 } - remove_domicile_building = camel_pasture_06 - } - if = { - limit = { has_domicile_building = elephant_pasture_04 } - remove_domicile_building = elephant_pasture_04 - } - if = { - limit = { has_domicile_building = elephant_pasture_05 } - remove_domicile_building = elephant_pasture_05 - } - if = { - limit = { has_domicile_building = elephant_pasture_06 } - remove_domicile_building = elephant_pasture_06 - } - if = { - limit = { has_domicile_building = grain_field_01 } - remove_domicile_building = grain_field_01 - } - if = { - limit = { has_domicile_building = grain_field_02 } - remove_domicile_building = grain_field_02 - } - if = { - limit = { has_domicile_building = grain_field_03 } - remove_domicile_building = grain_field_03 - } - if = { - limit = { has_domicile_building = grain_field_04 } - remove_domicile_building = grain_field_04 - } - if = { - limit = { has_domicile_building = grain_field_05 } - remove_domicile_building = grain_field_05 - } - if = { - limit = { has_domicile_building = grain_field_06 } - remove_domicile_building = grain_field_06 - } - if = { - limit = { has_domicile_building = rice_field_01 } - remove_domicile_building = rice_field_01 - } - if = { - limit = { has_domicile_building = rice_field_02 } - remove_domicile_building = rice_field_02 - } - if = { - limit = { has_domicile_building = rice_field_03 } - remove_domicile_building = rice_field_03 - } - if = { - limit = { has_domicile_building = rice_field_04 } - remove_domicile_building = rice_field_04 - } - if = { - limit = { has_domicile_building = rice_field_05 } - remove_domicile_building = rice_field_05 - } - if = { - limit = { has_domicile_building = rice_field_06 } - remove_domicile_building = rice_field_06 - } - if = { - limit = { has_domicile_building = vineyard_01 } - remove_domicile_building = vineyard_01 - } - if = { - limit = { has_domicile_building = vineyard_02 } - remove_domicile_building = vineyard_02 - } - if = { - limit = { has_domicile_building = vineyard_03 } - remove_domicile_building = vineyard_03 - } - if = { - limit = { has_domicile_building = vineyard_04 } - remove_domicile_building = vineyard_04 - } - if = { - limit = { has_domicile_building = vineyard_05 } - remove_domicile_building = vineyard_05 - } - if = { - limit = { has_domicile_building = vineyard_06 } - remove_domicile_building = vineyard_06 - } - if = { - limit = { has_domicile_building = tea_01 } - remove_domicile_building = tea_01 - } - if = { - limit = { has_domicile_building = tea_02 } - remove_domicile_building = tea_02 - } - if = { - limit = { has_domicile_building = tea_03 } - remove_domicile_building = tea_03 - } - if = { - limit = { has_domicile_building = tea_04 } - remove_domicile_building = tea_04 - } - if = { - limit = { has_domicile_building = tea_05 } - remove_domicile_building = tea_05 - } - if = { - limit = { has_domicile_building = tea_06 } - remove_domicile_building = tea_06 - } - if = { - limit = { has_domicile_building = olive_01 } - remove_domicile_building = olive_01 - } - if = { - limit = { has_domicile_building = olive_02 } - remove_domicile_building = olive_02 - } - if = { - limit = { has_domicile_building = olive_03 } - remove_domicile_building = olive_03 - } - if = { - limit = { has_domicile_building = olive_04 } - remove_domicile_building = olive_04 - } - if = { - limit = { has_domicile_building = olive_05 } - remove_domicile_building = olive_05 - } - if = { - limit = { has_domicile_building = olive_06 } - remove_domicile_building = olive_06 - } - if = { - limit = { has_domicile_building = silk_01 } - remove_domicile_building = silk_01 - } - if = { - limit = { has_domicile_building = silk_02 } - remove_domicile_building = silk_02 - } - if = { - limit = { has_domicile_building = silk_03 } - remove_domicile_building = silk_03 - } - if = { - limit = { has_domicile_building = silk_04 } - remove_domicile_building = silk_04 - } - if = { - limit = { has_domicile_building = silk_05 } - remove_domicile_building = silk_05 - } - if = { - limit = { has_domicile_building = silk_06 } - remove_domicile_building = silk_06 - } - if = { - limit = { has_domicile_building = japanese_manor_main_01 } - remove_domicile_building = japanese_manor_main_01 - } - if = { - limit = { has_domicile_building = japanese_manor_main_02 } - remove_domicile_building = japanese_manor_main_02 - } - if = { - limit = { has_domicile_building = japanese_manor_main_03 } - remove_domicile_building = japanese_manor_main_03 - } - if = { - limit = { has_domicile_building = japanese_manor_main_04 } - remove_domicile_building = japanese_manor_main_04 - } - if = { - limit = { has_domicile_building = japanese_manor_main_05 } - remove_domicile_building = japanese_manor_main_05 - } - if = { - limit = { has_domicile_building = japanese_manor_main_06 } - remove_domicile_building = japanese_manor_main_06 - } - if = { - limit = { has_domicile_building = japanese_main_tax_collectors_01 } - remove_domicile_building = japanese_main_tax_collectors_01 - } - if = { - limit = { has_domicile_building = japanese_main_tax_collectors_02 } - remove_domicile_building = japanese_main_tax_collectors_02 - } - if = { - limit = { has_domicile_building = japanese_main_tax_collectors_03 } - remove_domicile_building = japanese_main_tax_collectors_03 - } - if = { - limit = { has_domicile_building = japanese_main_tax_collectors_04 } - remove_domicile_building = japanese_main_tax_collectors_04 - } - if = { - limit = { has_domicile_building = japanese_main_tax_collectors_05 } - remove_domicile_building = japanese_main_tax_collectors_05 - } - if = { - limit = { has_domicile_building = japanese_main_tax_collectors_06 } - remove_domicile_building = japanese_main_tax_collectors_06 - } - if = { - limit = { has_domicile_building = japanese_main_carpenter_01 } - remove_domicile_building = japanese_main_carpenter_01 - } - if = { - limit = { has_domicile_building = japanese_main_carpenter_02 } - remove_domicile_building = japanese_main_carpenter_02 - } - if = { - limit = { has_domicile_building = japanese_main_carpenter_03 } - remove_domicile_building = japanese_main_carpenter_03 - } - if = { - limit = { has_domicile_building = japanese_main_carpenter_04 } - remove_domicile_building = japanese_main_carpenter_04 - } - if = { - limit = { has_domicile_building = japanese_main_carpenter_05 } - remove_domicile_building = japanese_main_carpenter_05 - } - if = { - limit = { has_domicile_building = japanese_main_carpenter_06 } - remove_domicile_building = japanese_main_carpenter_06 - } - if = { - limit = { has_domicile_building = japanese_manor_poetry_library_01 } - remove_domicile_building = japanese_manor_poetry_library_01 - } - if = { - limit = { has_domicile_building = japanese_manor_poetry_library_02 } - remove_domicile_building = japanese_manor_poetry_library_02 - } - if = { - limit = { has_domicile_building = japanese_manor_poetry_library_03 } - remove_domicile_building = japanese_manor_poetry_library_03 - } - if = { - limit = { has_domicile_building = japanese_manor_poetry_library_04 } - remove_domicile_building = japanese_manor_poetry_library_04 - } - if = { - limit = { has_domicile_building = japanese_manor_poetry_library_05 } - remove_domicile_building = japanese_manor_poetry_library_05 - } - if = { - limit = { has_domicile_building = japanese_manor_poetry_library_06 } - remove_domicile_building = japanese_manor_poetry_library_06 - } - if = { - limit = { has_domicile_building = sarugaku_stage_01 } - remove_domicile_building = sarugaku_stage_01 - } - if = { - limit = { has_domicile_building = sarugaku_stage_02 } - remove_domicile_building = sarugaku_stage_02 - } - if = { - limit = { has_domicile_building = sarugaku_stage_03 } - remove_domicile_building = sarugaku_stage_03 - } - if = { - limit = { has_domicile_building = sarugaku_stage_04 } - remove_domicile_building = sarugaku_stage_04 - } - if = { - limit = { has_domicile_building = sarugaku_stage_05 } - remove_domicile_building = sarugaku_stage_05 - } - if = { - limit = { has_domicile_building = sarugaku_stage_06 } - remove_domicile_building = sarugaku_stage_06 - } - if = { - limit = { has_domicile_building = japanese_manor_trophy_room_01 } - remove_domicile_building = japanese_manor_trophy_room_01 - } - if = { - limit = { has_domicile_building = japanese_manor_trophy_room_02 } - remove_domicile_building = japanese_manor_trophy_room_02 - } - if = { - limit = { has_domicile_building = japanese_manor_trophy_room_03 } - remove_domicile_building = japanese_manor_trophy_room_03 - } - if = { - limit = { has_domicile_building = japanese_manor_trophy_room_04 } - remove_domicile_building = japanese_manor_trophy_room_04 - } - if = { - limit = { has_domicile_building = japanese_manor_trophy_room_05 } - remove_domicile_building = japanese_manor_trophy_room_05 - } - if = { - limit = { has_domicile_building = japanese_manor_trophy_room_06 } - remove_domicile_building = japanese_manor_trophy_room_06 - } - if = { - limit = { has_domicile_building = japanese_manor_office_01 } - remove_domicile_building = japanese_manor_office_01 - } - if = { - limit = { has_domicile_building = japanese_manor_office_02 } - remove_domicile_building = japanese_manor_office_02 - } - if = { - limit = { has_domicile_building = japanese_manor_office_03 } - remove_domicile_building = japanese_manor_office_03 - } - if = { - limit = { has_domicile_building = japanese_manor_office_04 } - remove_domicile_building = japanese_manor_office_04 - } - if = { - limit = { has_domicile_building = japanese_manor_office_05 } - remove_domicile_building = japanese_manor_office_05 - } - if = { - limit = { has_domicile_building = japanese_manor_office_06 } - remove_domicile_building = japanese_manor_office_06 - } - if = { - limit = { has_domicile_building = japanese_manor_servants_quarters_01 } - remove_domicile_building = japanese_manor_servants_quarters_01 - } - if = { - limit = { has_domicile_building = japanese_manor_servants_quarters_02 } - remove_domicile_building = japanese_manor_servants_quarters_02 - } - if = { - limit = { has_domicile_building = japanese_manor_servants_quarters_03 } - remove_domicile_building = japanese_manor_servants_quarters_03 - } - if = { - limit = { has_domicile_building = japanese_manor_servants_quarters_04 } - remove_domicile_building = japanese_manor_servants_quarters_04 - } - if = { - limit = { has_domicile_building = japanese_manor_servants_quarters_05 } - remove_domicile_building = japanese_manor_servants_quarters_05 - } - if = { - limit = { has_domicile_building = japanese_manor_servants_quarters_06 } - remove_domicile_building = japanese_manor_servants_quarters_06 - } - if = { - limit = { has_domicile_building = japanese_manor_library_confucian_01 } - remove_domicile_building = japanese_manor_library_confucian_01 - } - if = { - limit = { has_domicile_building = japanese_manor_library_confucian_02 } - remove_domicile_building = japanese_manor_library_confucian_02 - } - if = { - limit = { has_domicile_building = japanese_manor_library_confucian_03 } - remove_domicile_building = japanese_manor_library_confucian_03 - } - if = { - limit = { has_domicile_building = japanese_manor_library_confucian_04 } - remove_domicile_building = japanese_manor_library_confucian_04 - } - if = { - limit = { has_domicile_building = japanese_manor_library_confucian_05 } - remove_domicile_building = japanese_manor_library_confucian_05 - } - if = { - limit = { has_domicile_building = japanese_manor_library_confucian_06 } - remove_domicile_building = japanese_manor_library_confucian_06 - } - if = { - limit = { has_domicile_building = japanese_manor_retainer_accomodations_01 } - remove_domicile_building = japanese_manor_retainer_accomodations_01 - } - if = { - limit = { has_domicile_building = japanese_manor_retainer_accomodations_02 } - remove_domicile_building = japanese_manor_retainer_accomodations_02 - } - if = { - limit = { has_domicile_building = japanese_manor_retainer_accomodations_03 } - remove_domicile_building = japanese_manor_retainer_accomodations_03 - } - if = { - limit = { has_domicile_building = japanese_manor_retainer_accomodations_04 } - remove_domicile_building = japanese_manor_retainer_accomodations_04 - } - if = { - limit = { has_domicile_building = japanese_manor_retainer_accomodations_05 } - remove_domicile_building = japanese_manor_retainer_accomodations_05 - } - if = { - limit = { has_domicile_building = japanese_fields_01 } - remove_domicile_building = japanese_fields_01 - } - if = { - limit = { has_domicile_building = japanese_fields_02 } - remove_domicile_building = japanese_fields_02 - } - if = { - limit = { has_domicile_building = japanese_fields_03 } - remove_domicile_building = japanese_fields_03 - } - if = { - limit = { has_domicile_building = japanese_fields_04 } - remove_domicile_building = japanese_fields_04 - } - if = { - limit = { has_domicile_building = japanese_fields_05 } - remove_domicile_building = japanese_fields_05 - } - if = { - limit = { has_domicile_building = japanese_fields_06 } - remove_domicile_building = japanese_fields_06 - } - if = { - limit = { has_domicile_building = japanese_granary_01 } - remove_domicile_building = japanese_granary_01 - } - if = { - limit = { has_domicile_building = japanese_granary_02 } - remove_domicile_building = japanese_granary_02 - } - if = { - limit = { has_domicile_building = japanese_granary_03 } - remove_domicile_building = japanese_granary_03 - } - if = { - limit = { has_domicile_building = japanese_granary_04 } - remove_domicile_building = japanese_granary_04 - } - if = { - limit = { has_domicile_building = japanese_granary_05 } - remove_domicile_building = japanese_granary_05 - } - if = { - limit = { has_domicile_building = japanese_granary_06 } - remove_domicile_building = japanese_granary_06 - } - if = { - limit = { has_domicile_building = japanese_rice_broker_01 } - remove_domicile_building = japanese_rice_broker_01 - } - if = { - limit = { has_domicile_building = japanese_rice_broker_02 } - remove_domicile_building = japanese_rice_broker_02 - } - if = { - limit = { has_domicile_building = japanese_rice_broker_03 } - remove_domicile_building = japanese_rice_broker_03 - } - if = { - limit = { has_domicile_building = japanese_rice_broker_04 } - remove_domicile_building = japanese_rice_broker_04 - } - if = { - limit = { has_domicile_building = japanese_rice_broker_05 } - remove_domicile_building = japanese_rice_broker_05 - } - if = { - limit = { has_domicile_building = japanese_rice_broker_06 } - remove_domicile_building = japanese_rice_broker_06 - } - if = { - limit = { has_domicile_building = japanese_tenant_farmers_01 } - remove_domicile_building = japanese_tenant_farmers_01 - } - if = { - limit = { has_domicile_building = japanese_tenant_farmers_02 } - remove_domicile_building = japanese_tenant_farmers_02 - } - if = { - limit = { has_domicile_building = japanese_tenant_farmers_03 } - remove_domicile_building = japanese_tenant_farmers_03 - } - if = { - limit = { has_domicile_building = japanese_tenant_farmers_04 } - remove_domicile_building = japanese_tenant_farmers_04 - } - if = { - limit = { has_domicile_building = japanese_tenant_farmers_05 } - remove_domicile_building = japanese_tenant_farmers_05 - } - if = { - limit = { has_domicile_building = japanese_tenant_farmers_06 } - remove_domicile_building = japanese_tenant_farmers_06 - } - if = { - limit = { has_domicile_building = japanese_shrine_01 } - remove_domicile_building = japanese_shrine_01 - } - if = { - limit = { has_domicile_building = japanese_shrine_02 } - remove_domicile_building = japanese_shrine_02 - } - if = { - limit = { has_domicile_building = japanese_shrine_03 } - remove_domicile_building = japanese_shrine_03 - } - if = { - limit = { has_domicile_building = japanese_shrine_04 } - remove_domicile_building = japanese_shrine_04 - } - if = { - limit = { has_domicile_building = japanese_shrine_05 } - remove_domicile_building = japanese_shrine_05 - } - if = { - limit = { has_domicile_building = japanese_shrine_06 } - remove_domicile_building = japanese_shrine_06 - } - if = { - limit = { has_domicile_building = japanese_cemetery_01 } - remove_domicile_building = japanese_cemetery_01 - } - if = { - limit = { has_domicile_building = japanese_cemetery_02 } - remove_domicile_building = japanese_cemetery_02 - } - if = { - limit = { has_domicile_building = japanese_cemetery_03 } - remove_domicile_building = japanese_cemetery_03 - } - if = { - limit = { has_domicile_building = japanese_cemetery_04 } - remove_domicile_building = japanese_cemetery_04 - } - if = { - limit = { has_domicile_building = japanese_cemetery_05 } - remove_domicile_building = japanese_cemetery_05 - } - if = { - limit = { has_domicile_building = japanese_cemetery_06 } - remove_domicile_building = japanese_cemetery_06 - } - if = { - limit = { has_domicile_building = japanese_shokubo_01 } - remove_domicile_building = japanese_shokubo_01 - } - if = { - limit = { has_domicile_building = japanese_shokubo_02 } - remove_domicile_building = japanese_shokubo_02 - } - if = { - limit = { has_domicile_building = japanese_shokubo_03 } - remove_domicile_building = japanese_shokubo_03 - } - if = { - limit = { has_domicile_building = japanese_shokubo_04 } - remove_domicile_building = japanese_shokubo_04 - } - if = { - limit = { has_domicile_building = japanese_shokubo_05 } - remove_domicile_building = japanese_shokubo_05 - } - if = { - limit = { has_domicile_building = japanese_shokubo_06 } - remove_domicile_building = japanese_shokubo_06 - } - if = { - limit = { has_domicile_building = japanese_monastery_01 } - remove_domicile_building = japanese_monastery_01 - } - if = { - limit = { has_domicile_building = japanese_monastery_02 } - remove_domicile_building = japanese_monastery_02 - } - if = { - limit = { has_domicile_building = japanese_monastery_03 } - remove_domicile_building = japanese_monastery_03 - } - if = { - limit = { has_domicile_building = japanese_monastery_04 } - remove_domicile_building = japanese_monastery_04 - } - if = { - limit = { has_domicile_building = japanese_monastery_05 } - remove_domicile_building = japanese_monastery_05 - } - if = { - limit = { has_domicile_building = japanese_monastery_06 } - remove_domicile_building = japanese_monastery_06 - } - if = { - limit = { has_domicile_building = japanese_brewery_01 } - remove_domicile_building = japanese_brewery_01 - } - if = { - limit = { has_domicile_building = japanese_brewery_02 } - remove_domicile_building = japanese_brewery_02 - } - if = { - limit = { has_domicile_building = japanese_brewery_03 } - remove_domicile_building = japanese_brewery_03 - } - if = { - limit = { has_domicile_building = japanese_brewery_04 } - remove_domicile_building = japanese_brewery_04 - } - if = { - limit = { has_domicile_building = japanese_brewery_05 } - remove_domicile_building = japanese_brewery_05 - } - if = { - limit = { has_domicile_building = japanese_brewery_06 } - remove_domicile_building = japanese_brewery_06 - } - if = { - limit = { has_domicile_building = japanese_koshu_cellars_01 } - remove_domicile_building = japanese_koshu_cellars_01 - } - if = { - limit = { has_domicile_building = japanese_koshu_cellars_02 } - remove_domicile_building = japanese_koshu_cellars_02 - } - if = { - limit = { has_domicile_building = japanese_koshu_cellars_03 } - remove_domicile_building = japanese_koshu_cellars_03 - } - if = { - limit = { has_domicile_building = japanese_koshu_cellars_04 } - remove_domicile_building = japanese_koshu_cellars_04 - } - if = { - limit = { has_domicile_building = japanese_koshu_cellars_05 } - remove_domicile_building = japanese_koshu_cellars_05 - } - if = { - limit = { has_domicile_building = japanese_koshu_cellars_06 } - remove_domicile_building = japanese_koshu_cellars_06 - } - if = { - limit = { has_domicile_building = japanese_gambling_den_01 } - remove_domicile_building = japanese_gambling_den_01 - } - if = { - limit = { has_domicile_building = japanese_gambling_den_02 } - remove_domicile_building = japanese_gambling_den_02 - } - if = { - limit = { has_domicile_building = japanese_gambling_den_03 } - remove_domicile_building = japanese_gambling_den_03 - } - if = { - limit = { has_domicile_building = japanese_gambling_den_04 } - remove_domicile_building = japanese_gambling_den_04 - } - if = { - limit = { has_domicile_building = japanese_gambling_den_05 } - remove_domicile_building = japanese_gambling_den_05 - } - if = { - limit = { has_domicile_building = japanese_gambling_den_06 } - remove_domicile_building = japanese_gambling_den_06 - } - if = { - limit = { has_domicile_building = japanese_sumo_hall_01 } - remove_domicile_building = japanese_sumo_hall_01 - } - if = { - limit = { has_domicile_building = japanese_sumo_hall_02 } - remove_domicile_building = japanese_sumo_hall_02 - } - if = { - limit = { has_domicile_building = japanese_sumo_hall_03 } - remove_domicile_building = japanese_sumo_hall_03 - } - if = { - limit = { has_domicile_building = japanese_sumo_hall_04 } - remove_domicile_building = japanese_sumo_hall_04 - } - if = { - limit = { has_domicile_building = japanese_sumo_hall_05 } - remove_domicile_building = japanese_sumo_hall_05 - } - if = { - limit = { has_domicile_building = japanese_sumo_hall_06 } - remove_domicile_building = japanese_sumo_hall_06 - } - if = { - limit = { has_domicile_building = japanese_archive_01 } - remove_domicile_building = japanese_archive_01 - } - if = { - limit = { has_domicile_building = japanese_archive_02 } - remove_domicile_building = japanese_archive_02 - } - if = { - limit = { has_domicile_building = japanese_archive_03 } - remove_domicile_building = japanese_archive_03 - } - if = { - limit = { has_domicile_building = japanese_archive_04 } - remove_domicile_building = japanese_archive_04 - } - if = { - limit = { has_domicile_building = japanese_archive_05 } - remove_domicile_building = japanese_archive_05 - } - if = { - limit = { has_domicile_building = japanese_archive_06 } - remove_domicile_building = japanese_archive_06 - } - if = { - limit = { has_domicile_building = japanese_schoolhouse_01 } - remove_domicile_building = japanese_schoolhouse_01 - } - if = { - limit = { has_domicile_building = japanese_schoolhouse_02 } - remove_domicile_building = japanese_schoolhouse_02 - } - if = { - limit = { has_domicile_building = japanese_schoolhouse_03 } - remove_domicile_building = japanese_schoolhouse_03 - } - if = { - limit = { has_domicile_building = japanese_schoolhouse_04 } - remove_domicile_building = japanese_schoolhouse_04 - } - if = { - limit = { has_domicile_building = japanese_schoolhouse_05 } - remove_domicile_building = japanese_schoolhouse_05 - } - if = { - limit = { has_domicile_building = japanese_schoolhouse_06 } - remove_domicile_building = japanese_schoolhouse_06 - } - if = { - limit = { has_domicile_building = japanese_law_library_01 } - remove_domicile_building = japanese_law_library_01 - } - if = { - limit = { has_domicile_building = japanese_law_library_02 } - remove_domicile_building = japanese_law_library_02 - } - if = { - limit = { has_domicile_building = japanese_law_library_03 } - remove_domicile_building = japanese_law_library_03 - } - if = { - limit = { has_domicile_building = japanese_law_library_04 } - remove_domicile_building = japanese_law_library_04 - } - if = { - limit = { has_domicile_building = japanese_law_library_05 } - remove_domicile_building = japanese_law_library_05 - } - if = { - limit = { has_domicile_building = japanese_law_library_06 } - remove_domicile_building = japanese_law_library_06 - } - if = { - limit = { has_domicile_building = japanese_messenger_service_01 } - remove_domicile_building = japanese_messenger_service_01 - } - if = { - limit = { has_domicile_building = japanese_messenger_service_02 } - remove_domicile_building = japanese_messenger_service_02 - } - if = { - limit = { has_domicile_building = japanese_messenger_service_03 } - remove_domicile_building = japanese_messenger_service_03 - } - if = { - limit = { has_domicile_building = japanese_messenger_service_04 } - remove_domicile_building = japanese_messenger_service_04 - } - if = { - limit = { has_domicile_building = japanese_messenger_service_05 } - remove_domicile_building = japanese_messenger_service_05 - } - if = { - limit = { has_domicile_building = japanese_messenger_service_06 } - remove_domicile_building = japanese_messenger_service_06 - } - if = { - limit = { has_domicile_building = japanese_armory_01 } - remove_domicile_building = japanese_armory_01 - } - if = { - limit = { has_domicile_building = japanese_armory_02 } - remove_domicile_building = japanese_armory_02 - } - if = { - limit = { has_domicile_building = japanese_armory_03 } - remove_domicile_building = japanese_armory_03 - } - if = { - limit = { has_domicile_building = japanese_armory_04 } - remove_domicile_building = japanese_armory_04 - } - if = { - limit = { has_domicile_building = japanese_armory_05 } - remove_domicile_building = japanese_armory_05 - } - if = { - limit = { has_domicile_building = japanese_armory_06 } - remove_domicile_building = japanese_armory_06 - } - if = { - limit = { has_domicile_building = japanese_bladesmith_01 } - remove_domicile_building = japanese_bladesmith_01 - } - if = { - limit = { has_domicile_building = japanese_bladesmith_02 } - remove_domicile_building = japanese_bladesmith_02 - } - if = { - limit = { has_domicile_building = japanese_bladesmith_03 } - remove_domicile_building = japanese_bladesmith_03 - } - if = { - limit = { has_domicile_building = japanese_bladesmith_04 } - remove_domicile_building = japanese_bladesmith_04 - } - if = { - limit = { has_domicile_building = japanese_bladesmith_05 } - remove_domicile_building = japanese_bladesmith_05 - } - if = { - limit = { has_domicile_building = japanese_bladesmith_06 } - remove_domicile_building = japanese_bladesmith_06 - } - if = { - limit = { has_domicile_building = japanese_armorer_01 } - remove_domicile_building = japanese_armorer_01 - } - if = { - limit = { has_domicile_building = japanese_armorer_02 } - remove_domicile_building = japanese_armorer_02 - } - if = { - limit = { has_domicile_building = japanese_armorer_03 } - remove_domicile_building = japanese_armorer_03 - } - if = { - limit = { has_domicile_building = japanese_armorer_04 } - remove_domicile_building = japanese_armorer_04 - } - if = { - limit = { has_domicile_building = japanese_armorer_05 } - remove_domicile_building = japanese_armorer_05 - } - if = { - limit = { has_domicile_building = japanese_armorer_06 } - remove_domicile_building = japanese_armorer_06 - } - if = { - limit = { has_domicile_building = japanese_barracks_01 } - remove_domicile_building = japanese_barracks_01 - } - if = { - limit = { has_domicile_building = japanese_barracks_02 } - remove_domicile_building = japanese_barracks_02 - } - if = { - limit = { has_domicile_building = japanese_barracks_03 } - remove_domicile_building = japanese_barracks_03 - } - if = { - limit = { has_domicile_building = japanese_barracks_04 } - remove_domicile_building = japanese_barracks_04 - } - if = { - limit = { has_domicile_building = japanese_barracks_05 } - remove_domicile_building = japanese_barracks_05 - } - if = { - limit = { has_domicile_building = japanese_barracks_06 } - remove_domicile_building = japanese_barracks_06 - } - if = { - limit = { has_domicile_building = japanese_watch_house_01 } - remove_domicile_building = japanese_watch_house_01 - } - if = { - limit = { has_domicile_building = japanese_watch_house_02 } - remove_domicile_building = japanese_watch_house_02 - } - if = { - limit = { has_domicile_building = japanese_watch_house_03 } - remove_domicile_building = japanese_watch_house_03 - } - if = { - limit = { has_domicile_building = japanese_watch_house_04 } - remove_domicile_building = japanese_watch_house_04 - } - if = { - limit = { has_domicile_building = japanese_watch_house_05 } - remove_domicile_building = japanese_watch_house_05 - } - if = { - limit = { has_domicile_building = japanese_watch_house_06 } - remove_domicile_building = japanese_watch_house_06 - } - if = { - limit = { has_domicile_building = japanese_spy_network_01 } - remove_domicile_building = japanese_spy_network_01 - } - if = { - limit = { has_domicile_building = japanese_spy_network_02 } - remove_domicile_building = japanese_spy_network_02 - } - if = { - limit = { has_domicile_building = japanese_spy_network_03 } - remove_domicile_building = japanese_spy_network_03 - } - if = { - limit = { has_domicile_building = japanese_spy_network_04 } - remove_domicile_building = japanese_spy_network_04 - } - if = { - limit = { has_domicile_building = japanese_spy_network_05 } - remove_domicile_building = japanese_spy_network_05 - } - if = { - limit = { has_domicile_building = japanese_spy_network_06 } - remove_domicile_building = japanese_spy_network_06 - } - if = { - limit = { has_domicile_building = japanese_infiltrators_01 } - remove_domicile_building = japanese_infiltrators_01 - } - if = { - limit = { has_domicile_building = japanese_infiltrators_02 } - remove_domicile_building = japanese_infiltrators_02 - } - if = { - limit = { has_domicile_building = japanese_infiltrators_03 } - remove_domicile_building = japanese_infiltrators_03 - } - if = { - limit = { has_domicile_building = japanese_infiltrators_04 } - remove_domicile_building = japanese_infiltrators_04 - } - if = { - limit = { has_domicile_building = japanese_infiltrators_05 } - remove_domicile_building = japanese_infiltrators_05 - } - if = { - limit = { has_domicile_building = japanese_infiltrators_06 } - remove_domicile_building = japanese_infiltrators_06 - } - if = { - limit = { has_domicile_building = japanese_prison_01 } - remove_domicile_building = japanese_prison_01 - } - if = { - limit = { has_domicile_building = japanese_prison_02 } - remove_domicile_building = japanese_prison_02 - } - if = { - limit = { has_domicile_building = japanese_prison_03 } - remove_domicile_building = japanese_prison_03 - } - if = { - limit = { has_domicile_building = japanese_prison_04 } - remove_domicile_building = japanese_prison_04 - } - if = { - limit = { has_domicile_building = japanese_prison_05 } - remove_domicile_building = japanese_prison_05 - } - if = { - limit = { has_domicile_building = japanese_prison_06 } - remove_domicile_building = japanese_prison_06 - } - if = { - limit = { has_domicile_building = japanese_horse_pastures_01 } - remove_domicile_building = japanese_horse_pastures_01 - } - if = { - limit = { has_domicile_building = japanese_horse_pastures_02 } - remove_domicile_building = japanese_horse_pastures_02 - } - if = { - limit = { has_domicile_building = japanese_horse_pastures_03 } - remove_domicile_building = japanese_horse_pastures_03 - } - if = { - limit = { has_domicile_building = japanese_horse_pastures_04 } - remove_domicile_building = japanese_horse_pastures_04 - } - if = { - limit = { has_domicile_building = japanese_horse_pastures_05 } - remove_domicile_building = japanese_horse_pastures_05 - } - if = { - limit = { has_domicile_building = japanese_horse_pastures_06 } - remove_domicile_building = japanese_horse_pastures_06 - } - if = { - limit = { has_domicile_building = japanese_stud_farm_01 } - remove_domicile_building = japanese_stud_farm_01 - } - if = { - limit = { has_domicile_building = japanese_stud_farm_02 } - remove_domicile_building = japanese_stud_farm_02 - } - if = { - limit = { has_domicile_building = japanese_stud_farm_03 } - remove_domicile_building = japanese_stud_farm_03 - } - if = { - limit = { has_domicile_building = japanese_stud_farm_04 } - remove_domicile_building = japanese_stud_farm_04 - } - if = { - limit = { has_domicile_building = japanese_stud_farm_05 } - remove_domicile_building = japanese_stud_farm_05 - } - if = { - limit = { has_domicile_building = japanese_stud_farm_06 } - remove_domicile_building = japanese_stud_farm_06 - } - if = { - limit = { has_domicile_building = japanese_ox_breeder_01 } - remove_domicile_building = japanese_ox_breeder_01 - } - if = { - limit = { has_domicile_building = japanese_ox_breeder_02 } - remove_domicile_building = japanese_ox_breeder_02 - } - if = { - limit = { has_domicile_building = japanese_ox_breeder_03 } - remove_domicile_building = japanese_ox_breeder_03 - } - if = { - limit = { has_domicile_building = japanese_ox_breeder_04 } - remove_domicile_building = japanese_ox_breeder_04 - } - if = { - limit = { has_domicile_building = japanese_ox_breeder_05 } - remove_domicile_building = japanese_ox_breeder_05 - } - if = { - limit = { has_domicile_building = japanese_ox_breeder_06 } - remove_domicile_building = japanese_ox_breeder_06 - } - if = { - limit = { has_domicile_building = japanese_riding_school_01 } - remove_domicile_building = japanese_riding_school_01 - } - if = { - limit = { has_domicile_building = japanese_riding_school_02 } - remove_domicile_building = japanese_riding_school_02 - } - if = { - limit = { has_domicile_building = japanese_riding_school_03 } - remove_domicile_building = japanese_riding_school_03 - } - if = { - limit = { has_domicile_building = japanese_riding_school_04 } - remove_domicile_building = japanese_riding_school_04 - } - if = { - limit = { has_domicile_building = japanese_riding_school_05 } - remove_domicile_building = japanese_riding_school_05 - } - if = { - limit = { has_domicile_building = japanese_riding_school_06 } - remove_domicile_building = japanese_riding_school_06 - } - if = { - limit = { has_domicile_building = japanese_tea_plantation_01 } - remove_domicile_building = japanese_tea_plantation_01 - } - if = { - limit = { has_domicile_building = japanese_tea_plantation_02 } - remove_domicile_building = japanese_tea_plantation_02 - } - if = { - limit = { has_domicile_building = japanese_tea_plantation_03 } - remove_domicile_building = japanese_tea_plantation_03 - } - if = { - limit = { has_domicile_building = japanese_tea_plantation_04 } - remove_domicile_building = japanese_tea_plantation_04 - } - if = { - limit = { has_domicile_building = japanese_tea_plantation_05 } - remove_domicile_building = japanese_tea_plantation_05 - } - if = { - limit = { has_domicile_building = japanese_tea_plantation_06 } - remove_domicile_building = japanese_tea_plantation_06 - } - if = { - limit = { has_domicile_building = japanese_matcha_factory_01 } - remove_domicile_building = japanese_matcha_factory_01 - } - if = { - limit = { has_domicile_building = japanese_matcha_factory_02 } - remove_domicile_building = japanese_matcha_factory_02 - } - if = { - limit = { has_domicile_building = japanese_matcha_factory_03 } - remove_domicile_building = japanese_matcha_factory_03 - } - if = { - limit = { has_domicile_building = japanese_matcha_factory_04 } - remove_domicile_building = japanese_matcha_factory_04 - } - if = { - limit = { has_domicile_building = japanese_matcha_factory_05 } - remove_domicile_building = japanese_matcha_factory_05 - } - if = { - limit = { has_domicile_building = japanese_matcha_factory_06 } - remove_domicile_building = japanese_matcha_factory_06 - } - if = { - limit = { has_domicile_building = japanese_medicine_house_01 } - remove_domicile_building = japanese_medicine_house_01 - } - if = { - limit = { has_domicile_building = japanese_medicine_house_02 } - remove_domicile_building = japanese_medicine_house_02 - } - if = { - limit = { has_domicile_building = japanese_medicine_house_03 } - remove_domicile_building = japanese_medicine_house_03 - } - if = { - limit = { has_domicile_building = japanese_medicine_house_04 } - remove_domicile_building = japanese_medicine_house_04 - } - if = { - limit = { has_domicile_building = japanese_medicine_house_05 } - remove_domicile_building = japanese_medicine_house_05 - } - if = { - limit = { has_domicile_building = japanese_medicine_house_06 } - remove_domicile_building = japanese_medicine_house_06 - } - if = { - limit = { has_domicile_building = japanese_roastery_01 } - remove_domicile_building = japanese_roastery_01 - } - if = { - limit = { has_domicile_building = japanese_roastery_02 } - remove_domicile_building = japanese_roastery_02 - } - if = { - limit = { has_domicile_building = japanese_roastery_03 } - remove_domicile_building = japanese_roastery_03 - } - if = { - limit = { has_domicile_building = japanese_roastery_04 } - remove_domicile_building = japanese_roastery_04 - } - if = { - limit = { has_domicile_building = japanese_roastery_05 } - remove_domicile_building = japanese_roastery_05 - } - if = { - limit = { has_domicile_building = japanese_roastery_06 } - remove_domicile_building = japanese_roastery_06 - } - if = { - limit = { has_domicile_building = japanese_stables_01 } - remove_domicile_building = japanese_stables_01 - } - if = { - limit = { has_domicile_building = japanese_stables_02 } - remove_domicile_building = japanese_stables_02 - } - if = { - limit = { has_domicile_building = japanese_stables_03 } - remove_domicile_building = japanese_stables_03 - } - if = { - limit = { has_domicile_building = japanese_stables_04 } - remove_domicile_building = japanese_stables_04 - } - if = { - limit = { has_domicile_building = japanese_stables_05 } - remove_domicile_building = japanese_stables_05 - } - if = { - limit = { has_domicile_building = japanese_stables_06 } - remove_domicile_building = japanese_stables_06 - } - if = { - limit = { has_domicile_building = japanese_yabusame_ground_01 } - remove_domicile_building = japanese_yabusame_ground_01 - } - if = { - limit = { has_domicile_building = japanese_yabusame_ground_02 } - remove_domicile_building = japanese_yabusame_ground_02 - } - if = { - limit = { has_domicile_building = japanese_yabusame_ground_03 } - remove_domicile_building = japanese_yabusame_ground_03 - } - if = { - limit = { has_domicile_building = japanese_yabusame_ground_04 } - remove_domicile_building = japanese_yabusame_ground_04 - } - if = { - limit = { has_domicile_building = japanese_yabusame_ground_05 } - remove_domicile_building = japanese_yabusame_ground_05 - } - if = { - limit = { has_domicile_building = japanese_yabusame_ground_06 } - remove_domicile_building = japanese_yabusame_ground_06 - } - if = { - limit = { has_domicile_building = japanese_farrier_01 } - remove_domicile_building = japanese_farrier_01 - } - if = { - limit = { has_domicile_building = japanese_farrier_02 } - remove_domicile_building = japanese_farrier_02 - } - if = { - limit = { has_domicile_building = japanese_farrier_03 } - remove_domicile_building = japanese_farrier_03 - } - if = { - limit = { has_domicile_building = japanese_farrier_04 } - remove_domicile_building = japanese_farrier_04 - } - if = { - limit = { has_domicile_building = japanese_farrier_05 } - remove_domicile_building = japanese_farrier_05 - } - if = { - limit = { has_domicile_building = japanese_farrier_06 } - remove_domicile_building = japanese_farrier_06 - } - if = { - limit = { has_domicile_building = japanese_hunting_lodge_01 } - remove_domicile_building = japanese_hunting_lodge_01 - } - if = { - limit = { has_domicile_building = japanese_hunting_lodge_02 } - remove_domicile_building = japanese_hunting_lodge_02 - } - if = { - limit = { has_domicile_building = japanese_hunting_lodge_03 } - remove_domicile_building = japanese_hunting_lodge_03 - } - if = { - limit = { has_domicile_building = japanese_hunting_lodge_04 } - remove_domicile_building = japanese_hunting_lodge_04 - } - if = { - limit = { has_domicile_building = japanese_hunting_lodge_05 } - remove_domicile_building = japanese_hunting_lodge_05 - } - if = { - limit = { has_domicile_building = japanese_hunting_lodge_06 } - remove_domicile_building = japanese_hunting_lodge_06 - } - if = { - limit = { has_domicile_building = japanese_workshop_01 } - remove_domicile_building = japanese_workshop_01 - } - if = { - limit = { has_domicile_building = japanese_workshop_02 } - remove_domicile_building = japanese_workshop_02 - } - if = { - limit = { has_domicile_building = japanese_workshop_03 } - remove_domicile_building = japanese_workshop_03 - } - if = { - limit = { has_domicile_building = japanese_workshop_04 } - remove_domicile_building = japanese_workshop_04 - } - if = { - limit = { has_domicile_building = japanese_workshop_05 } - remove_domicile_building = japanese_workshop_05 - } - if = { - limit = { has_domicile_building = japanese_workshop_06 } - remove_domicile_building = japanese_workshop_06 - } - if = { - limit = { has_domicile_building = japanese_bowyer_01 } - remove_domicile_building = japanese_bowyer_01 - } - if = { - limit = { has_domicile_building = japanese_bowyer_02 } - remove_domicile_building = japanese_bowyer_02 - } - if = { - limit = { has_domicile_building = japanese_bowyer_03 } - remove_domicile_building = japanese_bowyer_03 - } - if = { - limit = { has_domicile_building = japanese_bowyer_04 } - remove_domicile_building = japanese_bowyer_04 - } - if = { - limit = { has_domicile_building = japanese_bowyer_05 } - remove_domicile_building = japanese_bowyer_05 - } - if = { - limit = { has_domicile_building = japanese_bowyer_06 } - remove_domicile_building = japanese_bowyer_06 - } - if = { - limit = { has_domicile_building = japanese_lacquerer_01 } - remove_domicile_building = japanese_lacquerer_01 - } - if = { - limit = { has_domicile_building = japanese_lacquerer_02 } - remove_domicile_building = japanese_lacquerer_02 - } - if = { - limit = { has_domicile_building = japanese_lacquerer_03 } - remove_domicile_building = japanese_lacquerer_03 - } - if = { - limit = { has_domicile_building = japanese_lacquerer_04 } - remove_domicile_building = japanese_lacquerer_04 - } - if = { - limit = { has_domicile_building = japanese_lacquerer_05 } - remove_domicile_building = japanese_lacquerer_05 - } - if = { - limit = { has_domicile_building = japanese_lacquerer_06 } - remove_domicile_building = japanese_lacquerer_06 - } - if = { - limit = { has_domicile_building = japanese_carpenter_01 } - remove_domicile_building = japanese_carpenter_01 - } - if = { - limit = { has_domicile_building = japanese_carpenter_02 } - remove_domicile_building = japanese_carpenter_02 - } - if = { - limit = { has_domicile_building = japanese_carpenter_03 } - remove_domicile_building = japanese_carpenter_03 - } - if = { - limit = { has_domicile_building = japanese_carpenter_04 } - remove_domicile_building = japanese_carpenter_04 - } - if = { - limit = { has_domicile_building = japanese_carpenter_05 } - remove_domicile_building = japanese_carpenter_05 - } - if = { - limit = { has_domicile_building = japanese_carpenter_06 } - remove_domicile_building = japanese_carpenter_06 - } - if = { - limit = { has_domicile_building = japanese_tea_house_01 } - remove_domicile_building = japanese_tea_house_01 - } - if = { - limit = { has_domicile_building = japanese_tea_house_02 } - remove_domicile_building = japanese_tea_house_02 - } - if = { - limit = { has_domicile_building = japanese_tea_house_03 } - remove_domicile_building = japanese_tea_house_03 - } - if = { - limit = { has_domicile_building = japanese_tea_house_04 } - remove_domicile_building = japanese_tea_house_04 - } - if = { - limit = { has_domicile_building = japanese_tea_house_05 } - remove_domicile_building = japanese_tea_house_05 - } - if = { - limit = { has_domicile_building = japanese_tea_house_06 } - remove_domicile_building = japanese_tea_house_06 - } - if = { - limit = { has_domicile_building = japanese_guest_house_01 } - remove_domicile_building = japanese_guest_house_01 - } - if = { - limit = { has_domicile_building = japanese_guest_house_02 } - remove_domicile_building = japanese_guest_house_02 - } - if = { - limit = { has_domicile_building = japanese_guest_house_03 } - remove_domicile_building = japanese_guest_house_03 - } - if = { - limit = { has_domicile_building = japanese_guest_house_04 } - remove_domicile_building = japanese_guest_house_04 - } - if = { - limit = { has_domicile_building = japanese_guest_house_05 } - remove_domicile_building = japanese_guest_house_05 - } - if = { - limit = { has_domicile_building = japanese_guest_house_06 } - remove_domicile_building = japanese_guest_house_06 - } - if = { - limit = { has_domicile_building = japanese_performance_stage_01 } - remove_domicile_building = japanese_performance_stage_01 - } - if = { - limit = { has_domicile_building = japanese_performance_stage_02 } - remove_domicile_building = japanese_performance_stage_02 - } - if = { - limit = { has_domicile_building = japanese_performance_stage_03 } - remove_domicile_building = japanese_performance_stage_03 - } - if = { - limit = { has_domicile_building = japanese_performance_stage_04 } - remove_domicile_building = japanese_performance_stage_04 - } - if = { - limit = { has_domicile_building = japanese_performance_stage_05 } - remove_domicile_building = japanese_performance_stage_05 - } - if = { - limit = { has_domicile_building = japanese_performance_stage_06 } - remove_domicile_building = japanese_performance_stage_06 - } - if = { - limit = { has_domicile_building = japanese_asobi_colony_01 } - remove_domicile_building = japanese_asobi_colony_01 - } - if = { - limit = { has_domicile_building = japanese_asobi_colony_02 } - remove_domicile_building = japanese_asobi_colony_02 - } - if = { - limit = { has_domicile_building = japanese_asobi_colony_03 } - remove_domicile_building = japanese_asobi_colony_03 - } - if = { - limit = { has_domicile_building = japanese_asobi_colony_04 } - remove_domicile_building = japanese_asobi_colony_04 - } - if = { - limit = { has_domicile_building = japanese_asobi_colony_05 } - remove_domicile_building = japanese_asobi_colony_05 - } - if = { - limit = { has_domicile_building = japanese_asobi_colony_06 } - remove_domicile_building = japanese_asobi_colony_06 - } - if = { - limit = { has_domicile_building = japanese_garden_01 } - remove_domicile_building = japanese_garden_01 - } - if = { - limit = { has_domicile_building = japanese_garden_02 } - remove_domicile_building = japanese_garden_02 - } - if = { - limit = { has_domicile_building = japanese_garden_03 } - remove_domicile_building = japanese_garden_03 - } - if = { - limit = { has_domicile_building = japanese_garden_04 } - remove_domicile_building = japanese_garden_04 - } - if = { - limit = { has_domicile_building = japanese_garden_05 } - remove_domicile_building = japanese_garden_05 - } - if = { - limit = { has_domicile_building = japanese_garden_06 } - remove_domicile_building = japanese_garden_06 - } - if = { - limit = { has_domicile_building = japanese_rock_garden_01 } - remove_domicile_building = japanese_rock_garden_01 - } - if = { - limit = { has_domicile_building = japanese_rock_garden_02 } - remove_domicile_building = japanese_rock_garden_02 - } - if = { - limit = { has_domicile_building = japanese_rock_garden_03 } - remove_domicile_building = japanese_rock_garden_03 - } - if = { - limit = { has_domicile_building = japanese_rock_garden_04 } - remove_domicile_building = japanese_rock_garden_04 - } - if = { - limit = { has_domicile_building = japanese_rock_garden_05 } - remove_domicile_building = japanese_rock_garden_05 - } - if = { - limit = { has_domicile_building = japanese_rock_garden_06 } - remove_domicile_building = japanese_rock_garden_06 - } - if = { - limit = { has_domicile_building = japanese_kazan_display_01 } - remove_domicile_building = japanese_kazan_display_01 - } - if = { - limit = { has_domicile_building = japanese_kazan_display_02 } - remove_domicile_building = japanese_kazan_display_02 - } - if = { - limit = { has_domicile_building = japanese_kazan_display_03 } - remove_domicile_building = japanese_kazan_display_03 - } - if = { - limit = { has_domicile_building = japanese_kazan_display_04 } - remove_domicile_building = japanese_kazan_display_04 - } - if = { - limit = { has_domicile_building = japanese_kazan_display_05 } - remove_domicile_building = japanese_kazan_display_05 - } - if = { - limit = { has_domicile_building = japanese_kazan_display_06 } - remove_domicile_building = japanese_kazan_display_06 - } - if = { - limit = { has_domicile_building = japanese_orchard_01 } - remove_domicile_building = japanese_orchard_01 - } - if = { - limit = { has_domicile_building = japanese_orchard_02 } - remove_domicile_building = japanese_orchard_02 - } - if = { - limit = { has_domicile_building = japanese_orchard_03 } - remove_domicile_building = japanese_orchard_03 - } - if = { - limit = { has_domicile_building = japanese_orchard_04 } - remove_domicile_building = japanese_orchard_04 - } - if = { - limit = { has_domicile_building = japanese_orchard_05 } - remove_domicile_building = japanese_orchard_05 - } - if = { - limit = { has_domicile_building = japanese_orchard_06 } - remove_domicile_building = japanese_orchard_06 - } - } -} - -disburse_festival_piety_reward_effect = { - if = { - limit = { - root.faith = { - OR = { - has_doctrine_parameter = piety_from_festivals_active - AND = { - has_doctrine_parameter = summer_festivals_active - # Only during 'summer' (May 1st through July 31st). - current_month >= 5 - current_month <= 7 - } - } - } - } - root = { - add_piety = { - value = 0 - - if = { - limit = { - faith = { has_doctrine_parameter = summer_festivals_active } - # Only during 'summer' (May 1st through July 31st). - current_month >= 5 - current_month <= 7 - } - add = major_piety_value - } - if = { - limit = { - faith = { has_doctrine = tenet_ritual_celebrations } - } - add = medium_piety_value - } - if = { - limit = { - faith = { has_doctrine = tenet_hedonistic } - } - add = medium_piety_value - } - if = { - limit = { - has_royal_court = yes - has_dlc_feature = royal_court - amenity_level = { target = court_food_quality value >= 5 } - } - multiply = 2.5 - } - else_if = { - limit = { - has_royal_court = yes - has_dlc_feature = royal_court - amenity_level = { target = court_food_quality value >= 4 } - } - multiply = 2 - } - else_if = { - limit = { - has_royal_court = yes - has_dlc_feature = royal_court - amenity_level = { target = court_food_quality value >= 3 } - } - multiply = 1.5 - } - else_if = { - limit = { - has_royal_court = yes - has_dlc_feature = royal_court - amenity_level = { target = court_food_quality value >= 2 } - } - multiply = 1 - } - else_if = { - limit = { - has_royal_court = yes - has_dlc_feature = royal_court - amenity_level = { target = court_food_quality value <= 1 } - } - multiply = 0.5 - } - - # Always give some piety, even if you completely cheaped out. - min = medium_piety_value - } - } - } -} - -tgp_flip_education_track_on_game_start = { - switch = { - trigger = has_trait - #Flip the military trait to a random civilian one of the same level - education_martial_1 = { - remove_trait = education_martial_1 - random_list = { - 1 = { - add_trait = education_intrigue_1 - } - 1 = { - add_trait = education_diplomacy_1 - } - 1 = { - add_trait = education_stewardship_1 - } - 1 = { - add_trait = education_learning_1 - } - } - } - education_martial_2 = { - remove_trait = education_martial_2 - random_list = { - 1 = { - add_trait = education_intrigue_2 - } - 1 = { - add_trait = education_diplomacy_2 - } - 1 = { - add_trait = education_stewardship_2 - } - 1 = { - add_trait = education_learning_2 - } - } - } - education_martial_3 = { - remove_trait = education_martial_3 - random_list = { - 1 = { - add_trait = education_intrigue_3 - } - 1 = { - add_trait = education_diplomacy_3 - } - 1 = { - add_trait = education_stewardship_3 - } - 1 = { - add_trait = education_learning_3 - } - } - } - education_martial_4 = { - remove_trait = education_martial_4 - random_list = { - 1 = { - add_trait = education_intrigue_4 - } - 1 = { - add_trait = education_diplomacy_4 - } - 1 = { - add_trait = education_stewardship_4 - } - 1 = { - add_trait = education_learning_4 - } - } - } - education_martial_5 = { - remove_trait = education_martial_5 - random_list = { - 1 = { - add_trait = education_intrigue_5 - } - 1 = { - add_trait = education_diplomacy_5 - } - 1 = { - add_trait = education_stewardship_5 - } - 1 = { - add_trait = education_learning_5 - } - } - } - # Flip civilian education traits to martial of the same level - education_intrigue_1 = { - remove_trait = education_intrigue_1 - add_trait = education_martial_1 - } - education_intrigue_2 = { - remove_trait = education_intrigue_2 - add_trait = education_martial_2 - } - education_intrigue_3 = { - remove_trait = education_intrigue_3 - add_trait = education_martial_3 - } - education_intrigue_4 = { - remove_trait = education_intrigue_4 - add_trait = education_martial_4 - } - education_intrigue_5 = { - remove_trait = education_intrigue_5 - add_trait = education_martial_5 - } - education_diplomacy_1 = { - remove_trait = education_diplomacy_1 - add_trait = education_martial_1 - } - education_diplomacy_2 = { - remove_trait = education_diplomacy_2 - add_trait = education_martial_2 - } - education_diplomacy_3 = { - remove_trait = education_diplomacy_3 - add_trait = education_martial_3 - } - education_diplomacy_4 = { - remove_trait = education_diplomacy_4 - add_trait = education_martial_4 - } - education_diplomacy_5 = { - remove_trait = education_diplomacy_5 - add_trait = education_martial_5 - } - education_stewardship_1 = { - remove_trait = education_stewardship_1 - add_trait = education_martial_1 - } - education_stewardship_2 = { - remove_trait = education_stewardship_2 - add_trait = education_martial_2 - } - education_stewardship_3 = { - remove_trait = education_stewardship_3 - add_trait = education_martial_3 - } - education_stewardship_4 = { - remove_trait = education_stewardship_4 - add_trait = education_martial_4 - } - education_stewardship_5 = { - remove_trait = education_stewardship_5 - add_trait = education_martial_5 - } - education_learning_1 = { - remove_trait = education_learning_1 - add_trait = education_martial_1 - } - education_learning_2 = { - remove_trait = education_learning_2 - add_trait = education_martial_2 - } - education_learning_3 = { - remove_trait = education_learning_3 - add_trait = education_martial_3 - } - education_learning_4 = { - remove_trait = education_learning_4 - add_trait = education_martial_4 - } - education_learning_5 = { - remove_trait = education_learning_5 - add_trait = education_martial_5 - } - } -} diff --git a/N3OW/common/scripted_effects/10_dlc_tgp_silk_road_scripted_effects.txt b/N3OW/common/scripted_effects/10_dlc_tgp_silk_road_scripted_effects.txt deleted file mode 100644 index eb561b08..00000000 --- a/N3OW/common/scripted_effects/10_dlc_tgp_silk_road_scripted_effects.txt +++ /dev/null @@ -1,644 +0,0 @@ -################################################## -# Silk Road Scripted Effects -################################################## - -tgp_silk_road_downstream_player_sub_region_effect = { - save_temporary_scope_as = player_temp - scope:origin_sub_region_temp = { - if = { - limit = { any_situation_sub_region_participant = { this = scope:player_temp } } - save_temporary_scope_as = player_sub_region_temp - } - } - if = { - limit = { NOT = { exists = scope:player_sub_region_temp } } - random_in_list = { - list = second_sub_regions - limit = { any_situation_sub_region_participant = { this = scope:player_temp } } - save_temporary_scope_as = player_sub_region_temp - } - } - if = { - limit = { NOT = { exists = scope:player_sub_region_temp } } - random_in_list = { - list = third_sub_regions - limit = { any_situation_sub_region_participant = { this = scope:player_temp } } - save_temporary_scope_as = player_sub_region_temp - } - } -} - -tgp_silk_road_downstream_effect = { - save_temporary_scope_as = origin_sub_region_temp - switch = { - trigger = scope:origin_sub_region_temp - # China - situation:silk_road_situation.situation_sub_region:region_silk_road_proper_china = { - situation:silk_road_situation = { - # Secondary - situation_sub_region:region_silk_road_proper_tibet = { add_to_temporary_list = second_sub_regions } - situation_sub_region:region_silk_road_proper_central_asia = { add_to_temporary_list = second_sub_regions } - # Tertiary - situation_sub_region:region_silk_road_proper_india = { add_to_temporary_list = third_sub_regions } - situation_sub_region:region_silk_road_proper_transcaspia = { add_to_temporary_list = third_sub_regions } - situation_sub_region:region_silk_road_proper_occident = { add_to_temporary_list = third_sub_regions } - } - } - # Tibet - situation:silk_road_situation.situation_sub_region:region_silk_road_proper_tibet = { - situation:silk_road_situation = { - # Secondary - situation_sub_region:region_silk_road_proper_india = { add_to_temporary_list = second_sub_regions } - # Tertiary - situation_sub_region:region_silk_road_proper_occident = { add_to_temporary_list = third_sub_regions } - } - } - # Central Asia - situation:silk_road_situation.situation_sub_region:region_silk_road_proper_central_asia = { - situation:silk_road_situation = { - # Secondary - situation_sub_region:region_silk_road_proper_transcaspia = { add_to_temporary_list = second_sub_regions } - # Tertiary - situation_sub_region:region_silk_road_proper_occident = { add_to_temporary_list = third_sub_regions } - } - } - # India - situation:silk_road_situation.situation_sub_region:region_silk_road_proper_india = { - situation:silk_road_situation = { - # Secondary - situation_sub_region:region_silk_road_proper_occident = { add_to_temporary_list = second_sub_regions } - } - } - # Transcaspia - situation:silk_road_situation.situation_sub_region:region_silk_road_proper_transcaspia = { - situation:silk_road_situation = { - # Secondary - situation_sub_region:region_silk_road_proper_occident = { add_to_temporary_list = second_sub_regions } - } - } - # Occident - situation:silk_road_situation.situation_sub_region:region_silk_road_proper_occident = {} # Terminus - } - # Fire changes/messages - scope:origin_sub_region_temp ?= { - if = { - limit = { silk_road_sub_region_conflict_trigger = yes } - tgp_silk_road_downstream_war_effect = yes - } - else = { tgp_silk_road_downstream_peace_effect = yes } - } - # Cleanup - clear_saved_scope = origin_sub_region_temp - every_in_list = { - list = second_sub_regions - remove_from_list = second_sub_regions - } - every_in_list = { - list = third_sub_regions - remove_from_list = third_sub_regions - } -} - -# Effects to move sub regions towards Hardship -tgp_silk_road_downstream_war_effect = { - # Disabled for now - #tgp_silk_road_downstream_war_message_effect = yes - scope:origin_sub_region_temp ?= { - trigger_sub_region_catalyst = { catalyst = catalyst_silk_road_region_peace } - } - every_in_list = { - list = second_sub_regions - trigger_sub_region_catalyst = { catalyst = catalyst_silk_road_adjacent_upstream_region_peace } - } - every_in_list = { - list = third_sub_regions - trigger_sub_region_catalyst = { catalyst = catalyst_silk_road_distant_upstream_region_peace } - } -} - -tgp_silk_road_downstream_war_message_effect = { - every_player = { - tgp_silk_road_downstream_player_sub_region_effect = yes - if = { - limit = { exists = scope:player_sub_region_temp } - send_interface_message = { - type = msg_silk_road_prosperity_war_bad - title = msg_silk_road_prosperity_upstream_war - desc = tgp_silk_road_move_sub_region_towards_hardship_tt - scope:player_sub_region_temp = { - if = { - limit = { sub_region_current_phase = phase_exceptional_bounty } - if = { - limit = { this = scope:origin_sub_region_temp } - custom_tooltip = tgp_silk_road_move_sub_region_towards_steady_trading_primary_tt - } - else_if = { - limit = { is_in_list = second_sub_regions } - custom_tooltip = tgp_silk_road_move_sub_region_towards_steady_trading_secondary_tt - } - else = { custom_tooltip = tgp_silk_road_move_sub_region_towards_steady_trading_tertiary_tt } - } - else_if = { - limit = { - NOT = { sub_region_current_phase = phase_hardship } - } - if = { - limit = { this = scope:origin_sub_region_temp } - custom_tooltip = tgp_silk_road_move_sub_region_towards_hardship_primary_tt - } - else_if = { - limit = { is_in_list = second_sub_regions } - custom_tooltip = tgp_silk_road_move_sub_region_towards_hardship_secondary_tt - } - else = { custom_tooltip = tgp_silk_road_move_sub_region_towards_hardship_tertiary_tt } - } - } - } - } - } -} - -# Effects to move sub regions towards Prosperity -tgp_silk_road_downstream_peace_effect = { - # Disabled for now - #tgp_silk_road_downstream_peace_message_effect = yes - scope:origin_sub_region_temp ?= { - trigger_sub_region_catalyst = { catalyst = catalyst_silk_road_region_war } - } - every_in_list = { - list = second_sub_regions - trigger_sub_region_catalyst = { catalyst = catalyst_silk_road_adjacent_upstream_region_war } - } - every_in_list = { - list = third_sub_regions - trigger_sub_region_catalyst = { catalyst = catalyst_silk_road_distant_upstream_region_war } - } -} - -tgp_silk_road_downstream_peace_message_effect = { - every_player = { - tgp_silk_road_downstream_player_sub_region_effect = yes - if = { - limit = { exists = scope:player_sub_region_temp } - send_interface_message = { - type = msg_silk_road_prosperity_peace_good - title = msg_silk_road_prosperity_upstream_peace - desc = tgp_silk_road_move_sub_region_towards_exceptional_bounty_tt - scope:player_sub_region_temp = { - if = { - limit = { sub_region_current_phase = phase_hardship } - if = { - limit = { this = scope:origin_sub_region_temp } - custom_tooltip = tgp_silk_road_move_sub_region_towards_steady_trading_primary_tt - } - else_if = { - limit = { is_in_list = second_sub_regions } - custom_tooltip = tgp_silk_road_move_sub_region_towards_steady_trading_secondary_tt - } - else = { custom_tooltip = tgp_silk_road_move_sub_region_towards_steady_trading_tertiary_tt } - } - else_if = { - limit = { - NOT = { sub_region_current_phase = phase_exceptional_bounty } - } - if = { - limit = { this = scope:origin_sub_region_temp } - custom_tooltip = tgp_silk_road_move_sub_region_towards_exceptional_bounty_primary_tt - } - else_if = { - limit = { is_in_list = second_sub_regions } - custom_tooltip = tgp_silk_road_move_sub_region_towards_exceptional_bounty_secondary_tt - } - else = { custom_tooltip = tgp_silk_road_move_sub_region_towards_exceptional_bounty_tertiary_tt } - } - } - } - } - } -} - -tgp_silk_road_innovation_setup_add_effect = { - add_to_variable_list = { name = silk_road_unlocked_innovations target = culture_innovation:innovation_$INNOVATION$ } - add_innovation = innovation_$INNOVATION$ -} - -tgp_silk_road_innovation_setup_effect = { - if = { - limit = { has_tgp_dlc_trigger = yes } - # CHAM - culture:cham = { - tgp_silk_road_innovation_setup_add_effect = { INNOVATION = champa_rice } - } - # VIET - culture:viet = { - if = { - limit = { - game_start_date >= 1066.1.1 - } - tgp_silk_road_innovation_setup_add_effect = { INNOVATION = champa_rice } - } - } - # JAPAN - culture:japanese = { - tgp_silk_road_innovation_setup_add_effect = { INNOVATION = lacquered_armor } - } - # KOREA - culture:baekje = { - tgp_silk_road_innovation_setup_add_effect = { INNOVATION = lacquered_armor } - } - culture:goguryeo = { - tgp_silk_road_innovation_setup_add_effect = { INNOVATION = lacquered_armor } - } - culture:silla = { - tgp_silk_road_innovation_setup_add_effect = { INNOVATION = lacquered_armor } - } - culture:goryeo = { - if = { - limit = { - game_start_date >= 1066.1.1 - } - tgp_silk_road_innovation_setup_add_effect = { INNOVATION = lacquered_armor } - } - } - # CHINA - culture:han = { - # Woodblock scrolls by 868 - tgp_silk_road_innovation_setup_add_effect = { INNOVATION = block_printing } - # Coking by 9th century - tgp_silk_road_innovation_setup_add_effect = { INNOVATION = coking } - # Woodblock scrolls by 868 - tgp_silk_road_innovation_setup_add_effect = { INNOVATION = composite_crossbow } - # Pre-Tang - tgp_silk_road_innovation_setup_add_effect = { INNOVATION = cupellation } - # Pre-Tang - tgp_silk_road_innovation_setup_add_effect = { INNOVATION = dragon_kiln } - # Pre-Tang - tgp_silk_road_innovation_setup_add_effect = { INNOVATION = lacquered_armor } - # Pre-Tang - tgp_silk_road_innovation_setup_add_effect = { INNOVATION = pharmacopoeia } - # Pre-Tang - tgp_silk_road_innovation_setup_add_effect = { INNOVATION = sericulture } - # Pre-Tang - tgp_silk_road_innovation_setup_add_effect = { INNOVATION = waterworks } - if = { - limit = { - game_start_date >= 1066.1.1 - } - # Known by Song - tgp_silk_road_innovation_setup_add_effect = { INNOVATION = bulkheads } - # Introduced to the Song court by 977 - tgp_silk_road_innovation_setup_add_effect = { INNOVATION = champa_rice } - # Lodestone compasses by 1088 - tgp_silk_road_innovation_setup_add_effect = { INNOVATION = compass } - # 10-11th century - tgp_silk_road_innovation_setup_add_effect = { INNOVATION = double_entry_bookkeeping } - # First edition of the Wujing Zongyao and the first written formulation of weaponized gunpowder - tgp_silk_road_innovation_setup_add_effect = { INNOVATION = fire_medicine } - # 震天雷 by 1044 - tgp_silk_road_innovation_setup_add_effect = { INNOVATION = grenades } - } - } - } -} - -tgp_silk_road_movement_stream_effect = { - $SUB_REGION$ ?= { - save_temporary_scope_as = sub_region_temp - var:innovation ?= { save_temporary_scope_as = old_innovation_temp } - } - $UPSTREAM_SUB_REGION$ = { - save_temporary_scope_as = upstream_sub_region_temp - var:innovation ?= { save_temporary_scope_as = new_innovation_temp } - } - scope:sub_region_temp = { - every_player = { - limit = { - save_temporary_scope_as = player_temp - scope:sub_region_temp = { any_situation_sub_region_participant = { this = scope:player_temp } } - } - send_interface_message = { - type = msg_silk_road_innovation_movement - title = msg_silk_road_innovation_movement_stream_title - desc = msg_silk_road_innovation_movement_stream_desc - custom_tooltip = msg_silk_road_innovation_movement_tt - } - } - set_variable = { - name = innovation - value = scope:new_innovation_temp - } - } -} - -tgp_silk_road_movement_china_effect = { - situation_sub_region:region_silk_road_proper_china = { save_temporary_scope_as = sub_region_temp } - - # Find the culture of the province the market of Chang'an is located in - title:c_jingzhao = { - culture = { - save_temporary_scope_as = region_silk_road_proper_china_market_culture - random_culture_innovation = { - limit = { - has_innovation_parameter = silk_road_innovation_parameter - is_known_by_culture = scope:region_silk_road_proper_china_market_culture - NOR = { - this = situation_sub_region:region_silk_road_proper_occident.var:innovation - this = situation_sub_region:region_silk_road_proper_transcaspia.var:innovation - this = situation_sub_region:region_silk_road_proper_india.var:innovation - this = situation_sub_region:region_silk_road_proper_central_asia.var:innovation - this = situation_sub_region:region_silk_road_proper_tibet.var:innovation - this = situation_sub_region:region_silk_road_proper_china.var:innovation - } - } - save_scope_as = new_innovation_temp - } - } - } - scope:sub_region_temp = { - every_player = { - limit = { - save_temporary_scope_as = player_temp - scope:sub_region_temp = { any_situation_sub_region_participant = { this = scope:player_temp } } - } - send_interface_message = { - type = msg_silk_road_innovation_movement - title = msg_silk_road_innovation_movement_china_title - desc = msg_silk_road_innovation_movement_china_desc - custom_tooltip = msg_silk_road_innovation_movement_tt - } - } - set_variable = { - name = innovation - value = scope:new_innovation_temp - } - } -} - -tgp_silk_road_decision_scope_effect = { - save_scope_as = market_temp - title_province = { - save_scope_as = destination_province - save_scope_as = background_market_scope - save_scope_as = silk_road_market_town - } - random_county_situation_sub_region = { - limit = { - situation_sub_region_has_county = scope:market_temp - OR = { - sub_region_current_phase = phase_exceptional_bounty - sub_region_current_phase = phase_steady_trading - sub_region_current_phase = phase_hardship - } - } - save_scope_as = sub_region_temp - var:innovation ?= { save_scope_as = innovation_temp } - } -} - -tgp_silk_road_market_built_effect = { - county = { - save_temporary_scope_as = county_temp - random_county_situation = { - limit = { - situation_type = silk_road_situation - situation_has_catalyst = catalyst_silk_road_famous_market_built - } - trigger_situation_catalyst = { - catalyst = catalyst_silk_road_famous_market_built - county = scope:county_temp - character = scope:character - } - } - } -} - -tgp_silk_road_canal_built_effect = { - situation:silk_road_situation ?= { - if = { - limit = { situation_has_catalyst = catalyst_silk_road_china_grand_canal_expanded } - situation_sub_region:region_silk_road_proper_china ?= { - trigger_sub_region_catalyst = { - catalyst = catalyst_silk_road_china_grand_canal_expanded - character = scope:owner - } - } - } - if = { - limit = { situation_has_catalyst = catalyst_silk_road_china_grand_canal_expanded_secondary } - situation_sub_region:region_silk_road_proper_tibet ?= { - trigger_sub_region_catalyst = { - catalyst = catalyst_silk_road_china_grand_canal_expanded_secondary - character = scope:owner - } - } - situation_sub_region:region_silk_road_proper_central_asia ?= { - trigger_sub_region_catalyst = { - catalyst = catalyst_silk_road_china_grand_canal_expanded_secondary - character = scope:owner - } - } - } - if = { - limit = { situation_has_catalyst = catalyst_silk_road_china_grand_canal_expanded_tertiary } - situation_sub_region:region_silk_road_proper_india ?= { - trigger_sub_region_catalyst = { - catalyst = catalyst_silk_road_china_grand_canal_expanded_tertiary - character = scope:owner - } - } - situation_sub_region:region_silk_road_proper_transcaspia ?= { - trigger_sub_region_catalyst = { - catalyst = catalyst_silk_road_china_grand_canal_expanded_tertiary - character = scope:owner - } - } - } - } -} - -tgp_silk_road_expand_steppe_effect = { - situation:silk_road_situation = { - if = { - limit = { situation_has_catalyst = catalyst_silk_road_mpo_region_to_steppe } - situation_sub_region:region_silk_road_proper_$SUB_REGION$ = { - trigger_sub_region_catalyst = { - catalyst = catalyst_silk_road_mpo_region_to_steppe - character = scope:steppe_expander - } - } - } - } -} - -tgp_silk_road_raid_effect = { # county scope - if = { - limit = { - title_province = { geographical_region = dlc_tgp_silk_road_route_region } # the actual route - } - save_temporary_scope_as = county_temp - random_county_situation = { - limit = { - situation_type = silk_road_situation - situation_has_catalyst = catalyst_silk_road_raided - } - trigger_situation_catalyst = { - catalyst = catalyst_silk_road_raided - county = scope:county_temp - character = scope:raider - } - } - } -} - -tgp_silk_road_mongol_devastation_effect = { # county scope - if = { - limit = { - title_province = { geographical_region = dlc_tgp_silk_road_route_region } # the actual route - } - save_temporary_scope_as = county_temp - random_county_situation = { - limit = { - situation_type = silk_road_situation - situation_has_catalyst = catalyst_silk_road_mongol_devastation - } - trigger_situation_catalyst = { - catalyst = catalyst_silk_road_mongol_devastation - county = scope:county_temp - character = scope:mongol_emperor - } - } - } -} - -tgp_silk_road_iranian_intermezzo_yearly_effect = { - if = { - limit = { - struggle:persian_struggle ?= { is_struggle_phase = struggle_persia_phase_unrest } - situation:silk_road_situation ?= { situation_has_catalyst = catalyst_silk_road_iranian_intermezzo_in_unrest } - } - situation:silk_road_situation.situation_sub_region:region_silk_road_proper_occident ?= { - trigger_sub_region_catalyst = { catalyst = catalyst_silk_road_iranian_intermezzo_in_unrest } - } - } -} - -tgp_silk_road_iranian_intermezzo_ending_effect = { - save_scope_as = struggle_ender - situation:silk_road_situation ?= { - if = { - limit = { situation_has_catalyst = catalyst_silk_road_iranian_intermezzo_ending_reached } - situation_sub_region:region_silk_road_proper_occident ?= { - trigger_sub_region_catalyst = { - catalyst = catalyst_silk_road_iranian_intermezzo_ending_reached - character = scope:struggle_ender - } - } - } - } -} - -tgp_silk_road_china_consolidation_effect = { - situation:silk_road_situation ?= { - if = { - limit = { situation_has_catalyst = catalyst_silk_road_china_consolidation } - every_situation_sub_region = { - trigger_sub_region_catalyst = { - catalyst = catalyst_silk_road_china_consolidation - character = scope:huangdi - } - } - } - } -} - -tgp_silk_road_china_stability_effect = { - if = { - limit = { - situation:dynastic_cycle = { - OR = { - situation_current_phase = situation_dynastic_cycle_phase_stability - situation_current_phase = situation_dynastic_cycle_phase_stability_expansion - situation_current_phase = situation_dynastic_cycle_phase_stability_advancement - } - } - } - situation:silk_road_situation ?= { - if = { - limit = { situation_has_catalyst = catalyst_silk_road_china_stability } - every_situation_sub_region = { - trigger_sub_region_catalyst = { - catalyst = catalyst_silk_road_china_stability - character = scope:huangdi - } - } - } - } - } -} - -tgp_silk_road_feudalize_holding_effect = { - save_temporary_scope_as = county_temp - random_county_situation = { - limit = { - situation_type = silk_road_situation - situation_has_catalyst = catalyst_silk_road_mpo_region_resettled - } - trigger_situation_catalyst = { - catalyst = catalyst_silk_road_mpo_region_resettled - county = scope:county_temp - character = scope:actor - } - } -} - -tgp_silk_road_byzantium_destroyed_effect = { - situation:silk_road_situation = { - if = { - limit = { situation_has_catalyst = catalyst_silk_road_byzantium_blew_up } - situation_sub_region:region_silk_road_proper_occident = { - trigger_sub_region_catalyst = { - catalyst = catalyst_silk_road_byzantium_blew_up - character = title:e_byzantium.previous_holder - } - } - } - } -} - -tgp_silk_road_phase_message_effect = { - every_player = { - limit = { - save_temporary_scope_as = player_temp - scope:situation_sub_region ?= { - any_situation_sub_region_participant_group = { participant_group_has_character = scope:player_temp } - } - } - if = { - limit = { - scope:situation_sub_region = { sub_region_current_phase = phase_exceptional_bounty } - } - send_interface_message = { - type = msg_silk_road_good - title = msg_silk_road_phase_change_title - custom_tooltip = msg_silk_road_phase_change_tt - } - } - else_if = { - limit = { - scope:situation_sub_region = { sub_region_current_phase = phase_hardship} - } - send_interface_message = { - type = msg_silk_road_bad - title = msg_silk_road_phase_change_title - custom_tooltip = msg_silk_road_phase_change_tt - } - } - else = { - send_interface_message = { - type = msg_silk_road_neutral - title = msg_silk_road_phase_change_title - custom_tooltip = msg_silk_road_phase_change_tt - } - } - } -} diff --git a/N3OW/common/scripted_effects/20_health_balancing_effects.txt b/N3OW/common/scripted_effects/20_health_balancing_effects.txt deleted file mode 100644 index ba05da7b..00000000 --- a/N3OW/common/scripted_effects/20_health_balancing_effects.txt +++ /dev/null @@ -1,2 +0,0 @@ -### HEALTH BALANCING EFFECTS ### -# Along with the health balancing triggers, these effects are only used to get data output used for balancing diseases. diff --git a/N3OW/common/scripted_effects/20_health_effects.txt b/N3OW/common/scripted_effects/20_health_effects.txt deleted file mode 100644 index 169b55af..00000000 --- a/N3OW/common/scripted_effects/20_health_effects.txt +++ /dev/null @@ -1,4103 +0,0 @@ -#health effects list# - -################### -# DISEASE EFFECTS # -################### - -### GENERAL CONTRACT/RECOVER EFFECTS ### -# contract_disease_effect - Adds disease trait, sends treatment and notification events etc. NO contraction event. Needs argument DISEASE (trait name) and TREATMENT_EVENT (yes/no). -# contract_disease_notify_effect - Sends a "contracted disease" event in 5-15 days. The event checks if the disease is valid and runs contract_disease_effect to apply the disease trait. Needs argument DISEASE (trait name). -# recover_from_disease_effect - Checks if has disease, removes it and sets any immunity, and sends appropriate notifications to other characters. Needs argument DISEASE (trait name). Does not send event to character who contracts disease. -#recover_from_disease_notify_effect - Checks if has disease, removes it and sets any immunity in an event for the character in question, and sends appropriate notifications to other characters. Needs argument DISEASE (trait name). - -### STD EFFECTS ### -# contract_lovers_pox_from - sends the scoped character "contracted lover's pox" event if argument PARTNER has lover's pox. Uses PARTNER in event. -# contract_great_pox_from - sends the scoped character "contracted early lover's pox" event if argument PARTNER has great pox. Uses PARTNER in event. -# risk_of_std_from_effect - 50% chance of running contract_lovers_pox_from effect and 30% chance of running contract_great_pox_from effect - -### CONTAGIOUS DISEASE ### -# create_contagion_list_effect - Creates a list of characters who might contract contagious disease (smallpox/plague) from scope - -### SIDE EFFECTS ### -# epilepsy_fever_risk_effect -# epilepsy_brain_trauma_risk_effect - - - -############################### -# GAIN/INCREASE WOUND EFFECTS # -############################### - -# increase_wounds_no_death_effect - increases wound level without killing -# increase_wounds_effect - increases wound level with chance of death -# maimed_in_battle_effect - - -######################################## -#EFFECTS FOR WEIGHT GAIN/LOSS # -######################################## - -#target_weight_modifier_effect - Increases character variable that's used in the weight balancing - - -######################################## -#EFFECTS FOR COURT PHYSICIAN TREATMENT # -######################################## - -### COURT PHYSICIAN MANAGEMENT ### -# set_court_physician_effect -# fire_court_physician_effect -# save_court_physician_as -# invalidate_physician_effect - -### COURT PHYSICIAN RANK UP ### -#physician_level_up_chance_effect -#mystic_level_up_chance_effect -#physician_rank_up_tooltip_effect - -### DISEASE TREATMENT OPTIONS ### -# safe_disease_treatment_effect -# risky_disease_treatment_effect -# mystic_disease_treatment_effect -# no_disease_treatment_effect -# find_court_physician_effect -# deny_disease_treatment_effect - -### WOUND TREATMENT OPTIONS ### -# safe_wound_treatment_effect -# risky_wound_treatment_effect - -### DISEASE TREATMENT OUTCOMES ### -# set_worst_disease_effect -# add_disease_treatment_modifier_effect -# disease_treatment_results_effect -# disease_treatment_result_tooltip_effect -# remove_disease_treatment_effect - -### WOUND TREATMENT OUTCOMES ### -# add_wound_treatment_modifier_effect -# wound_treatment_result_tooltip_effect -# wound_treatment_results_effect - -### DISEASE TREATMENT LOGIC ### -# save_health_court_owner_effect -# pick_own_disease_treatment_effect -# decide_who_picks_disease_treatment_effect -# liege_picks_treatment_effect - -### WOUND LOGIC ### -# pick_own_wound_treatment_effect -# decide_who_picks_wound_treatment_effect - -### FAILED TREAMENT EFFECTS ### -# add_failed_treatment_of_me_opinions_effect -# add_failed_treatment_of_kin_opinions_effect -# downgrade_failed_treatment_of_me_opinions_effect -# downgrade_failed_treatment_of_kin_opinions_effect -# execute_physician_effect -# imprison_physician_effect -# chastise_physician_effect -# forgive_physician_effect - - -### DISEASE MESSAGES ### -# inform_liege_about_disease_treatment_effect -# activate_outbreak_story_effect - -### WOUND MESSAGES ### -# inform_liege_about_wound_treatment_effect - - -###################### -#EFFECTS FOR SUICIDE # -###################### -# committed_suicide_effect -# attempted_suicide_effect - - -############################################################################################## -# LIST ENDS HERE - - -#################### -# DISEASE EFFECTS # -#################### - -#Adds the disease in question and sends notifications to everyone who should know. Checks validity and sends treatment event. Needs the arguments DISEASE (trait name, only exception is early_great_pox - it should be added as great_pox and then the effect will figure out whether the character should have early_great_pox first) and TREATMENT_EVENT (yes/no). Does NOT send an event to the character who gets the disease. -contract_disease_effect = { - if = { #Is the disease valid? - limit = { can_contract_disease_trigger = { DISEASE = $DISEASE$ } } - - hidden_effect = { - #SET SCOPES - save_scope_as = sick_character - - save_scope_value_as = { - name = disease_type - value = flag:$DISEASE$ - } - - save_temporary_scope_value_as = { - name = treatment_event - value = flag:$TREATMENT_EVENT$ - } - - if = { - limit = { #Should I get early great pox instead of great pox? - scope:disease_type = flag:great_pox - NOR = { - has_trait = lovers_pox - has_trait = early_great_pox - } - } - save_scope_value_as = { - name = disease_type - value = flag:early_great_pox - } - } - - #Data collection - disease_data_save_contraction_effect = { DISEASE = $DISEASE$ } - - - #TREATMENT EVENT - if = { - limit = { - scope:treatment_event = flag:yes - } - - trigger_event = { - id = health.3100 - days = 5 - } - } - else_if = { - limit = { scope:treatment_event = flag:no } #This is just here to stop errors - } - } - - - #NON-CONTAGIOUS DISEASES - if = { - limit = { - OR = { - scope:disease_type = flag:ill - scope:disease_type = flag:pneumonic - scope:disease_type = flag:gout_ridden - scope:disease_type = flag:leper - scope:disease_type = flag:cancer - scope:disease_type = flag:ergotism - } - } - - if = { #Removes ill if progressing to pneumonia - limit = { - scope:disease_type = flag:pneumonic - has_trait = ill - } - remove_trait = ill - } - - add_trait_force_tooltip = $DISEASE$ - } - - #CONTAGIOUS DISEASES - if = { - limit = { - OR = { - scope:disease_type = flag:smallpox - scope:disease_type = flag:measles - scope:disease_type = flag:dysentery - scope:disease_type = flag:bubonic_plague - scope:disease_type = flag:typhus - scope:disease_type = flag:consumption - } - } - - add_trait_force_tooltip = $DISEASE$ - } - - #STD DISEASES - else_if = { #Lover's pox - limit = { scope:disease_type = flag:lovers_pox } - add_trait_force_tooltip = lovers_pox - - hidden_effect = { - #Trigger regular contagion checks - trigger_event = { - id = health.1200 - days = { 60 1000 } #This first one can happen quite fast, the following checks are delayed 250-10000 days depending on traits - } - } - } - else_if = { #Early great pox - limit = { scope:disease_type = flag:early_great_pox } - add_trait_force_tooltip = early_great_pox - - hidden_effect = { - trigger_event = { - id = health.1013 #Reveals the true disease - days = { 90 150 } - } - } - } - else_if = { #Great pox - limit = { scope:disease_type = flag:great_pox } - - hidden_effect = { - remove_trait = lovers_pox #If you get Great Pox and already have lover's pox, we pretend that lover's pox was the first symptoms - remove_trait = early_great_pox - } - add_trait_force_tooltip = great_pox - - hidden_effect = { - #Trigger regular contagion checks - trigger_event = { - id = health.1201 - days = { 250 1500 } #This first one can happen quite fast, the following checks are delayed 350-10000 days depending on traits - } - } - } - - #RECOVERY - if = { #Ill - limit = { scope:disease_type = flag:ill } - trigger_event = { - id = health.1101 - days = { ill_recovery_min ill_recovery_max } - } - } - else_if = { #Pneumonic - limit = { scope:disease_type = flag:pneumonic } - trigger_event = { - id = health.1102 - days = { pneumonic_recovery_min pneumonic_recovery_max } - } - } - else_if = { #Gout - limit = { scope:disease_type = flag:gout_ridden } - random = { - chance = 25 - modifier = { - has_trait = gluttonous - add = -15 - } - modifier = { - has_trait = temperate - add = 15 - } - trigger_event = { - id = health.1103 - days = { gout_ridden_recovery_min gout_ridden_recovery_max } #1 to 30 years - } - } - } - else_if = { #Typhus - limit = { scope:disease_type = flag:typhus } - trigger_event = { - id = health.1105 - days = { 45 150 } - } - } - else_if = { #Consumption - limit = { scope:disease_type = flag:consumption } - trigger_event = { - id = health.1106 - days = { 365 2190 } #1 to 6 years - } - } - else_if = { #Cancer - limit = { scope:disease_type = flag:cancer } - random = { - chance = 1 - trigger_event = { - id = health.1107 - days = { 365 3650 } #1 to 10 years - } - } - } - else_if = { #Great pox - limit = { - OR = { - scope:disease_type = flag:early_great_pox - scope:disease_type = flag:great_pox - } - } - trigger_event = { - id = health.1109 - days = { 730 5475 } #2 to 15 years (note that early pox progresses into great pox in 60-150 days and great pox leads to lunacy after 5 to 15 years) - } - } - else_if = { #Smallpox - limit = { scope:disease_type = flag:smallpox } - trigger_event = { - id = health.1110 - days = { smallpox_min_recovery_time smallpox_max_recovery_time } - } - } - else_if = { #Bubonic Plague - limit = { scope:disease_type = flag:bubonic_plague } - trigger_event = { - id = health.1111 - days = { bubonic_plague_min_recovery_time bubonic_plague_max_recovery_time } - } - } - else_if = { #Measles - limit = { scope:disease_type = flag:measles } - trigger_event = { - id = health.1112 - days = { measles_min_recovery_time measles_max_recovery_time } - } - } - else_if = { #Dysentery - limit = { scope:disease_type = flag:dysentery } - trigger_event = { - id = health.1113 - days = { dysentery_min_recovery_time dysentery_max_recovery_time } - } - } - else_if = { #Ergotism - limit = { scope:disease_type = flag:ergotism } - trigger_event = { - id = health.1114 - days = { ergotism_min_recovery_time ergotism_max_recovery_time } - } - } - #No recovery for leper and lover's pox - - - #EPILEPSY RISK - if = { - limit = { scope:disease_type = flag:ill } - epilepsy_fever_risk_effect = { CHANCE = 1 } - } - else_if = { - limit = { - OR = { - scope:disease_type = flag:pneumonic - scope:disease_type = flag:typhus - scope:disease_type = flag:consumption - scope:disease_type = flag:measles - scope:disease_type = flag:dysentery - scope:disease_type = flag:smallpox - scope:disease_type = flag:bubonic_plague - } - } - epilepsy_fever_risk_effect = { CHANCE = 5 } - } - - #NOTIFICATIONS: CONTAGIOUS DISEASE, FAMILY & SEX PARTNER STD, NOTIFICATIONS & LIEGE TREATMENT EVENTS - - #List creation: - #Imprisoner/court owner if contagious - if = { - limit = { - OR = { - scope:disease_type = flag:smallpox - scope:disease_type = flag:bubonic_plague - scope:disease_type = flag:measles - scope:disease_type = flag:dysentery - scope:disease_type = flag:typhus - scope:disease_type = flag:consumption - } - is_ruler = no - has_health_court_owner_trigger = yes #Imprisoner or court owner - } - save_health_court_owner_effect = { SCOPE_NAME = health_court_owner }#Imprisoner or court owner - - scope:health_court_owner = { - add_to_temporary_list = disase_notification_list - } - } - #Sex partners if STD - if = { - limit = { - OR = { - scope:disease_type = flag:lovers_pox - scope:disease_type = flag:early_great_pox - scope:disease_type = flag:great_pox - } - } - every_consort = { - add_to_temporary_list = disase_notification_list - } - every_relation = { - type = lover - add_to_temporary_list = disase_notification_list - } - } - #Family if the disease is somewhat dangerous - if = { - limit = { - sick_enough_for_relative_to_care_trigger = yes - } - every_parent = { - limit = { - is_playable_character = yes - } - add_to_temporary_list = disase_notification_list - } - every_spouse = { - limit = { - is_playable_character = yes - } - add_to_temporary_list = disase_notification_list - } - every_heir_title = { - limit = { - exists = holder - } - holder = { - if = { - limit = { - player_heir = scope:sick_character - } - add_to_temporary_list = disase_notification_list - } - } - } - } - - #Go through list and send notifications - every_in_list = { - list = disase_notification_list - - #Send a STD warning event - if = { - limit = { - OR = { - scope:disease_type = flag:lovers_pox - scope:disease_type = flag:early_great_pox - scope:disease_type = flag:great_pox - } - OR = { - is_consort_of = scope:sick_character - has_relation_lover = scope:sick_character - } - } - scope:sick_character = { save_scope_as = std_partner } - if = { - limit = { scope:disease_type = flag:great_pox } - trigger_event = { - id = health.2002 #Partner has great pox - days = { 7 14 } - } - } - else = { - trigger_event = { - id = health.2001 #Partner has lover's pox/early great great pox - days = { 7 14 } - } - } - } - #Send a notification/treatment event to family - else_if = { - limit = { - OR = { - #It's a player heir - trigger_if = { - limit = { exists = player_heir } - player_heir = scope:sick_character - } - #Or a child/spouse who is really sick or this character has to pick their treatment - AND = { - is_spouse_of = scope:sick_character #we only send you your spouse and primary heir to avoid event spam with plagues - OR = { - #The sick character is dying - health < death_chance_dying_health - #This character gets to pick sick character's treatment - trigger_if = { - limit = { exists = scope:sick_character.liege } - this = scope:sick_character.liege - scope:sick_character = { liege_picks_treatment_trigger = yes } - } - } - } - } - } - trigger_event = { - id = health.2201 #Important character is sick - days = 3 - } - #set a variable, so you are sure to get a follow-up - if = { - limit = { is_ai = no } - scope:sick_character = { - add_to_variable_list = { - name = recovery_event_receivers - target = prev - } - } - } - } - else_if = { - limit = { - exists = scope:epidemic - is_target_in_variable_list = { - name = notified_of_epidemics - target = scope:epidemic - } - } - # Don't get spammed by courtiers and guests falling sick during epidemics - } - #Send a feed message - else = { - send_interface_message = { - type = msg_disease_contraction - left_icon = scope:sick_character - localization_values = { - disease_trait = trait:$DISEASE$ - message_receiver = this - } - show_as_tooltip = { - scope:sick_character = { - if = { - limit = { scope:disease_type = flag:early_great_pox } - add_trait_force_tooltip = early_great_pox - } - else = { - add_trait_force_tooltip = $DISEASE$ - } - } - } - } - if = { - limit = { is_ai = no } - add_to_variable_list = { - name = notified_of_epidemics - target = scope:epidemic - } - } - } - } - } - hidden_effect = { - if = { - limit = { - exists = scope:epidemic - } - give_epidemic_immunity = { EPIDEMIC = scope:epidemic } - # Give appropriate memory - if = { - limit = { - scope:disease_type ?= flag:bubonic_plague - } - create_character_memory = { - type = ce1_contracted_black_death - } - } - else = { - create_character_memory = { - type = ce1_contracted_epidemic - } - scope:new_memory = { - if = { - limit = { - NOT = { exists = var:epidemic_infected } - } - set_variable = { - name = epidemic_infected - value = scope:epidemic.epidemic_type.epidemic_trait - } - } - } - } - } - } -} - - - - -#Triggers an event giving you the disease (if you meet the conditions) and notifying everyone who should know. Needs the arguments DISEASE trait name, only exception is early_great_pox - it should be added as great_pox and then the effect will figure out whether the character should have early_great_pox first) -contract_disease_notify_effect = { - save_scope_value_as = { - name = disease_type - value = flag:$DISEASE$ - } - - #Ill - if = { - limit = { scope:disease_type = flag:ill } - trigger_event = { id = health.1001 days = { 5 15 } } - } - else_if = { - limit = { scope:disease_type = flag:pneumonic } - trigger_event = { id = health.1002 days = { 5 15 } } - } - else_if = { - limit = { scope:disease_type = flag:gout_ridden } - trigger_event = { id = health.1003 days = { 5 15 } } - } - else_if = { - limit = { scope:disease_type = flag:leper } - trigger_event = { id = health.1004 days = { 5 15 } } - } - else_if = { - limit = { scope:disease_type = flag:typhus } - trigger_event = { id = health.1005 days = { 5 15 } } - } - else_if = { - limit = { scope:disease_type = flag:consumption } - trigger_event = { id = health.1006 days = { 5 15 } } - } - else_if = { - limit = { scope:disease_type = flag:cancer } - trigger_event = { id = health.1007 days = { 5 15 } } - } - else_if = { - limit = { scope:disease_type = flag:lovers_pox } - trigger_event = { id = health.1008 days = { 5 15 } } - } - else_if = { - limit = { scope:disease_type = flag:great_pox } - trigger_event = { id = health.1009 days = { 5 15 } } - } - else_if = { - limit = { scope:disease_type = flag:smallpox } - trigger_event = { id = health.1010 days = { 5 15 } } - } - else_if = { - limit = { scope:disease_type = flag:measles } - trigger_event = { id = health.1015 days = { 5 15 } } - } - else_if = { - limit = { scope:disease_type = flag:dysentery } - trigger_event = { id = health.1016 days = { 5 15 } } - } - else_if = { - limit = { scope:disease_type = flag:ergotism } - trigger_event = { id = health.1017 days = { 5 15 } } - } - else_if = { - limit = { scope:disease_type = flag:bubonic_plague } - trigger_event = { id = health.1011 days = { 5 15 } } - } -} - -#Removes the disease in question and sends notifications to everyone who should know. Needs the arguments DISEASE (trait name, only exception is early_great_pox - it should be removed as great_pox). Does NOT send an event to the character who gets the disease. -recover_from_disease_effect = { - hidden_effect = { - save_scope_value_as = { - name = disease_type - value = flag:$DISEASE$ - } - - if = { - limit = { - has_trait = early_great_pox - scope:disease_type = flag:great_pox - } - save_scope_value_as = { - name = disease_type - value = flag:early_great_pox - } - } - } - - if = { #They actually have the disease you want to remove - limit = { has_trait = $DISEASE$ } - - save_scope_as = sick_character - - #Notifications (first, because some notifications need to check health which are changed when traits are removed) - hidden_effect = { - - #IMPORTANT CHARACTER (add to list) - if = { - limit = { #The disease has to be somewhat dangerous - OR = { - health < death_chance_dying_health - NOR = { - scope:disease_type = flag:ill - scope:disease_type = flag:gout_ridden - scope:disease_type = flag:lovers_pox - scope:disease_type = flag:early_great_pox - } - } - } - every_parent = { - limit = { is_playable_character = yes } - add_to_temporary_list = disase_notification_list - } - every_child = { - limit = { is_playable_character = yes } - add_to_temporary_list = disase_notification_list - } - every_spouse = { - limit = { - is_playable_character = yes - NOT = { is_in_list = disase_notification_list } - } - add_to_temporary_list = disase_notification_list - } - every_heir_title = { - limit = { - exists = holder - } - holder = { - if = { - limit = { - player_heir ?= scope:sick_character - NOT = { is_in_list = disase_notification_list } - } - add_to_temporary_list = disase_notification_list - } - } - } - } - - #PARTNERS WHO WANT TO KNOW ABOUT STDS (add to list) - if = { - limit = { - OR = { - scope:disease_type = flag:great_pox - scope:disease_type = flag:lovers_pox - scope:disease_type = flag:early_great_pox - } - } - every_relation = { - type = lover - limit = { - is_playable_character = yes - NOT = { is_in_list = disase_notification_list } - } - add_to_temporary_list = disase_notification_list - } - every_concubine = { - limit = { - is_playable_character = yes - NOT = { is_in_list = disase_notification_list } - } - add_to_temporary_list = disase_notification_list - } - } - - #IMPOTANT CHARACTER NOTIFICATION EVENT - every_parent = { - limit = { - inform_about_relative_recovery_trigger = yes - } - add_to_temporary_list = disase_notification_list - } - every_spouse = { - limit = { - inform_about_relative_recovery_trigger = yes - NOT = { is_in_list = disase_notification_list } - } - add_to_temporary_list = disase_notification_list - } - every_heir_title = { - limit = { - exists = holder - } - holder = { - if = { - limit = { - player_heir = scope:sick_character - inform_about_relative_recovery_trigger = yes - NOT = { is_in_list = disase_notification_list } - } - add_to_temporary_list = disase_notification_list - } - } - } - - #Go through list and send notifications - every_in_list = { - list = disase_notification_list - - if = { - limit = { - OR = { - #This character received an event when - scope:sick_character = { - is_target_in_variable_list = { - name = recovery_event_receivers - target = prev - } - } - #It's your player heir - trigger_if = { - limit = { exists = player_heir } - player_heir = scope:sick_character - } - } - } - trigger_event = health.2202 - } - else = { - save_scope_as = message_receiver - send_interface_message = { - type = msg_disease_recovery - left_icon = scope:sick_character - title = disease_recovery_feed_message.t - show_as_tooltip = { - scope:sick_character = { - if = { - limit = { scope:disease_type = flag:early_great_pox } - remove_trait_force_tooltip = early_great_pox - } - else = { - remove_trait_force_tooltip = $DISEASE$ - } - } - } - } - } - } - } - - clear_variable_list = recovery_event_receivers - - #TRAIT REMOVAL - remove_trait = $DISEASE$ - - #IMMUNITY - hidden_effect = { - if = { - limit = { scope:disease_type = flag:smallpox } - add_character_flag = disease_immunity_smallpox - } - else_if = { - limit = { scope:disease_type = flag:measles } - add_character_flag = disease_immunity_measles - } - else_if = { - limit = { scope:disease_type = flag:bubonic_plague } - add_character_flag = disease_immunity_bubonic_plague - } - } - } -} - - -#Triggers an event removing the disease (if you meet the conditions) and notifying everyone who should know. Needs the arguments DISEASE trait name. No events exist for leper, lovers_pox and early_great_pox. - -recover_from_disease_notify_effect = { - save_scope_value_as = { - name = disease_type - value = flag:$DISEASE$ - } - - if = { - limit = { scope:disease_type = flag:ill } - trigger_event = { id = health.1101 days = { 5 15 } } - } - else_if = { - limit = { scope:disease_type = flag:pneumonic } - trigger_event = { id = health.1102 days = { 5 15 } } - } - else_if = { - limit = { scope:disease_type = flag:gout_ridden } - trigger_event = { id = health.1103 days = { 5 15 } } - } - else_if = { - limit = { scope:disease_type = flag:typhus } - trigger_event = { id = health.1105 days = { 5 15 } } - } - else_if = { - limit = { scope:disease_type = flag:consumption } - trigger_event = { id = health.1106 days = { 5 15 } } - } - else_if = { - limit = { scope:disease_type = flag:cancer } - trigger_event = { id = health.1107 days = { 5 15 } } - } - else_if = { - limit = { scope:disease_type = flag:great_pox } - trigger_event = { id = health.1109 days = { 5 15 } } - } - else_if = { - limit = { scope:disease_type = flag:smallpox } - trigger_event = { id = health.1110 days = { 5 15 } } - } - else_if = { - limit = { scope:disease_type = flag:bubonic_plague } - trigger_event = { id = health.1111 days = { 5 15 } } - } -} - -#If partner has lover's pox, the character gets it through an event. Needs argument PARTNER -contract_lovers_pox_from = { - $PARTNER$ = { save_scope_as = infecting_partner } - if = { - limit = { scope:infecting_partner = { has_trait = lovers_pox } } - contract_disease_notify_effect = { DISEASE = lovers_pox } - } -} - -#If partner has great pox, the character gets it through an event. Needs argument PARTNER -contract_great_pox_from = { - $PARTNER$ = { save_scope_as = infecting_partner } - if = { - limit = { - scope:infecting_partner = { - OR = { - has_trait = early_great_pox - has_trait = great_pox - } - } - } - contract_disease_notify_effect = { DISEASE = great_pox } - } -} - -#50% risk of herpes (if partner has it) and 30% risk of great pox (if partner has it). Added through event. Needs argument PARTNER -risk_of_std_from_effect = { - random = { - chance = 50 - modifier = { - add = -30 - has_perk = wash_your_hands_perk - } - contract_lovers_pox_from = { PARTNER = $PARTNER$ } - } - random = { - chance = 30 - modifier = { - add = -10 - has_perk = wash_your_hands_perk - } - modifier = { - add = -30 - has_character_flag = contraction_cooldown_great_pox - } - contract_great_pox_from = { PARTNER = $PARTNER$ } - } -} - -#Creates a list of characters which might contract a disease from you (for plague and smallpox) -create_contagion_list_effect = { - $CONTAGION_COURT_OWNER$ = { - if = { - limit = { - NOR = { - this = $SICK_CHARACTER$ - is_in_list = contagion_list - } - } - add_to_temporary_list = contagion_list - } - every_courtier_or_guest = { - limit = { - NOR = { - this = $SICK_CHARACTER$ - is_in_list = contagion_list - } - } - add_to_temporary_list = contagion_list - } - every_prisoner = { - limit = { - NOR = { - this = $SICK_CHARACTER$ - is_in_list = contagion_list - } - } - add_to_temporary_list = contagion_list - } - } - $SICK_CHARACTER$ = { - every_scheme = { - limit = { - friendly_scheme_trigger = yes - NOT = { scheme_target_character = { is_in_list = contagion_list } } - } - scheme_target_character = { add_to_temporary_list = contagion_list } - } - every_targeting_scheme = { - limit = { - friendly_scheme_trigger = yes - NOT = { scheme_owner = { is_in_list = contagion_list } } - } - scheme_owner = { add_to_temporary_list = contagion_list } - } - } -} - -### SIDE EFFECTS ### -epilepsy_fever_risk_effect = { - hidden_effect = { - if = { - limit = { age <= 12 } - random = { - chance = $CHANCE$ - modifier = { - age >= 9 - factor = 0.7 - } - debug_log = "Epilepsy: fever" - trigger_event = { - id = trait_specific.2001 #Gain "possessed" - days = { 30 300 } - } - } - } - } -} - -epilepsy_brain_trauma_risk_effect = { - hidden_effect = { - random = { - chance = $CHANCE$ - debug_log = "Epilepsy: brain trauma" - trigger_event = { - id = trait_specific.2001 #Gain "possessed" - days = { 30 300 } - } - } - } -} - - -############################### -############################### -# GAIN/INCREASE WOUND EFFECTS # -############################### -############################### - - -increase_wounds_no_death_effect = { - save_temporary_scope_value_as = { - name = treatment_type - value = flag:$REASON$ - } - - change_trait_rank = { - trait = wounded - rank = 1 - max = 3 - } - - if = { #Wounds from treatments give no infection and no additional treatment - limit = { NOT = { scope:treatment_type = flag:treatment } } - - #CHANCE OF INFECTION - hidden_effect = { - random = { - chance = 10 - trigger_event = { - id = health.0201 - days = { 30 60 } - } - } - } - - #HANDLE TREATMENT - if = { #To send notification message or trigger the right event - limit = { - has_trait_rank = { - trait = wounded - rank = 1 - } - court_physician_available_trigger = yes - } - save_scope_as = sick_character - safe_wound_treatment_effect = yes #Wounded 1 only gives a "result of treatment" notification" if you have a physician, i.e. you get no events about it. - } - else_if = { - limit = { - has_trait_rank = { - trait = wounded - rank = 2 - } - has_recent_wound_treatment_trigger = no - } - #A "real" event if you're not receiving treatment - #Nothing happens if you're already being treated for wounds - trigger_event = { - id = health.0102 - days = { 2 3 } - } - } - else_if = { - limit = { - has_trait_rank = { - trait = wounded - rank = 3 - } - has_recent_wound_treatment_trigger = no - } - #A "real" event if you're not receiving treatment - #Nothing happens if you're already being treated for wounds - trigger_event = { - id = health.0104 - days = { 2 3 } - } - - #Epilepsy risk - epilepsy_brain_trauma_risk_effect = { CHANCE = 5 } - } - } - - # To stop the game from complaining about unused character flags since we only specifically check - # the treatment reason for risk of further or infection - if = { - limit = { - exists = flag:$REASON$ - } - } -} - - -increase_wounds_children_no_death_effect = { - hidden_effect = { - random_list = { - 75 = { - if = { - limit = { - has_character_modifier = scratched_and_bruised - } - remove_character_modifier = scratched_and_bruised - } - add_character_modifier = { - modifier = scratched_and_bruised - years = 3 - } - } - 25 = { - increase_wounds_no_death_effect = { REASON = wounds } - } - } - } -} - -#increase_wounds_effect -increase_wounds_effect = { - if = { - limit = { - has_trait_rank = { - trait = wounded - rank < 3 - } - } - increase_wounds_no_death_effect = { REASON = $REASON$ } - } - else_if = { #Using an if because this needs to never go wrong - limit = { - has_trait_rank = { - trait = wounded - rank = 3 - } - } - death = { - death_reason = death_$REASON$ - } - } -} - -maimed_in_battle_effect = { - random_list = { - 4 = { - trigger = { - NOT = { - has_trait = one_legged - } - } - add_trait_force_tooltip = one_legged - increase_wounds_effect = { REASON = fight } - } - 2 = { - trigger = { - NOT = { - has_trait = disfigured - } - } - add_trait_force_tooltip = disfigured - increase_wounds_effect = { REASON = fight } - epilepsy_brain_trauma_risk_effect = { CHANCE = 5 } - } - 4 = { - trigger = { - NOT = { - has_trait = one_eyed - } - } - add_trait_force_tooltip = one_eyed - increase_wounds_effect = { REASON = fight } - epilepsy_brain_trauma_risk_effect = { CHANCE = 5 } - } - 4 = { - trigger = { - NOT = { - has_trait = maimed - } - } - apply_maimed_trait_and_modifier_effect = yes - epilepsy_brain_trauma_risk_effect = { CHANCE = 5 } - } - } -} - -apply_maimed_trait_and_modifier_effect = { - add_trait = maimed - add_character_modifier = { - modifier = recently_maimed_modifier - years = 1 - } -} - - -######################################### -# EFFECTS FOR WEIGHT GAIN/LOSS # -######################################### - -target_weight_modifier_effect = { - if = { - limit = { - NOT = { has_variable = character_weight_variable } - } - set_variable = { - name = character_weight_variable - value = 0 - } - } - change_variable = { - name = character_weight_variable - add = $VALUE$ - } -} - - -######################################### -# EFFECTS FOR COURT PHYSICIAN TREATMENT # -######################################### - - - -### COURT PHYSICIAN MANAGEMENT ### - -set_court_physician_effect = { - $PHYSICIAN$ = { - if = { - limit = { - NOT = { liege = $EMPLOYER$ } - } - $EMPLOYER$ = { add_courtier = $PHYSICIAN$ } - } - } - $EMPLOYER$ = { - #Replace existing court physician if one exists - if = { - limit = { - employs_court_position = court_physician_court_position - any_court_position_holder = { - type = court_physician_court_position - count > 0 - } - } - every_court_position_holder = { - type = court_physician_court_position - save_temporary_scope_as = old_physician - - $EMPLOYER$ = { - replace_court_position = { - recipient = $PHYSICIAN$ - holder = scope:old_physician - court_position = court_physician_court_position - } - reverse_add_opinion = { - target = scope:old_physician - modifier = disappointed_opinion - opinion = -15 - } - reverse_add_opinion = { - target = $PHYSICIAN$ - modifier = hired_me_opinion - } - } - } - } - #Else just straight up appoint - else = { - appoint_court_position = { - recipient = $PHYSICIAN$ - court_position = court_physician_court_position - } - reverse_add_opinion = { - target = $PHYSICIAN$ - modifier = hired_me_opinion - } - } - - #Trigger treatments if needed - hidden_effect = { - if = { - limit = { - has_treatable_disease_trigger = yes - has_recent_treatment_trigger = no - } - save_scope_as = sick_character - trigger_event = { - id = health.3101 - days = { physician_treatment_delay_ruler_min physician_treatment_delay_ruler_max } - } - } - else_if = { - limit = { - has_recent_wound_treatment_trigger = no - has_wounds_trigger = yes - } - save_scope_as = sick_character - trigger_event = { - id = health.4001 - days = { physician_treatment_delay_ruler_min physician_treatment_delay_ruler_max } - } - } - every_courtier_or_guest = { - if = { - limit = { - has_treatable_disease_trigger = yes - has_recent_treatment_trigger = no - } - set_worst_disease_effect = yes - save_scope_as = sick_character - decide_who_picks_disease_treatment_effect = yes #Sends health.3101 to them or 3102 to liege (you) - } - else_if = { - limit = { - has_recent_wound_treatment_trigger = no - has_wounds_trigger = yes - } - save_scope_as = sick_character - decide_who_picks_wound_treatment_effect = yes - } - } - } - } -} - -save_court_physician_as_effect = { - hidden_effect = { - if = { - limit = { exists = court_owner } - court_owner = { - random_court_position_holder = { - type = court_physician_court_position - limit = { - is_physically_able = yes - } - save_scope_as = $SCOPE_NAME$ - } - } - } - } -} - - - -###COURT PHYSICIAN RANK UP### - -physician_rank_up_tooltip_effect = { - scope:physician = { - if = { - limit = { - exists = var:physician_level_up - } - show_as_tooltip = { - if = { - limit = { var:physician_level_up = flag:physician } - if = { - limit = { - has_trait_xp = { - trait = lifestyle_physician - value > 5 - } - } - add_trait_xp = { - trait = lifestyle_physician - value = 10 - } - } - else = { add_trait_force_tooltip = lifestyle_physician } - } - else_if = { - limit = { var:physician_level_up = flag:mystic } - if = { - limit = { - has_trait_xp = { - trait = lifestyle_mystic - value > 5 - } - } - add_trait_xp = { - trait = lifestyle_mystic - value = 10 - } - } - else = { add_trait_force_tooltip = lifestyle_mystic } - } - } - } - } -} - -#Needs argument CHANCE -physician_level_up_chance_effect = { - if = { - limit = { - is_alive = yes - NAND = { - has_trait = lifestyle_physician - has_trait_xp = { - trait = lifestyle_physician - value >= 100 - } - } - } - random = { - chance = $CHANCE$ - physician_lifestyle_rank_up_effect = yes - - #Used by physician_rank_up_tooltip_effect, to be shown in treatment outcome... - set_variable = { name = physician_level_up value = flag:physician days = 15 } - - #...or in notification - if = { - limit = { - liege ?= { this != scope:sick_character } - } - liege = { - send_interface_message = { #Should be feed message, because it's not hugely important - type = event_court_physician_good - title = physician_level_up_chance_effect.t - left_icon = scope:physician - physician_rank_up_tooltip_effect = yes - } - } - } - } - } -} - -#Needs argument CHANCE -mystic_level_up_chance_effect = { - if = { - limit = { - NAND = { - has_trait = lifestyle_mystic - has_trait_xp = { - trait = lifestyle_mystic - value >= 100 - } - } - is_alive = yes - } - random = { - chance = $CHANCE$ - ai_mystic_lifestyle_rank_up_effect = yes - - #Used by physician_rank_up_tooltip_effect, to be shown in treatment outcome... - set_variable = { name = physician_level_up value = flag:mystic days = 15 } - - #...or in notification - if = { - limit = { - liege ?= { this != scope:sick_character } - } - liege = { - send_interface_message = { - type = event_court_physician_good - title = physician_level_up_chance_effect.t - left_icon = scope:physician - physician_rank_up_tooltip_effect = yes - } - } - } - - #Have a tiny chance to become witch - hidden_effect = { - if = { - limit = { - is_ai = yes - NOR = { - any_secret = { type = secret_witch } - has_trait = witch - } - } - random = { - modifier = { - factor = 0 - ai_zeal >= medium_positive_ai_value - } - modifier = { - factor = 2 - ai_zeal <= high_negative_ai_value #high and not medium because mystic traits already remove some ai_zeal - } - chance = 5 - give_witch_secret_or_trait_effect = yes - } - } - } - } - } -} - - - - -###DISEASE TREATMENT OPTIONS### - -safe_disease_treatment_effect = { - $TREATMENT_PICKER$ = { save_scope_as = treatment_picker } - $PATIENT$ = { - custom_tooltip = safe_diseaste_treatment.tt - - hidden_effect = { - save_court_physician_as_effect = { SCOPE_NAME = physician } - - if = { - limit = { - NOT = { exists = scope:sick_character } - } - save_scope_as = sick_character - } #If a sick character was not already saved we save the patient as Sick Character here - - if = { - limit = { - exists = scope:physician - court_physician_available_trigger = yes - } - - #Physician skill up - scope:physician = { - random_list = { - 90 = { #physician - trigger = { - NAND = { - has_trait = lifestyle_physician - has_trait_xp = { - trait = lifestyle_physician - value >= 100 - } - } - } - physician_level_up_chance_effect = { CHANCE = 10 } - } - 10 = { #Mystic - trigger = { - NOR = { - AND = { - has_trait = lifestyle_mystic - has_trait_xp = { - trait = lifestyle_mystic - value >= 100 - } - } - AND = { #Because then this would be the only option which is weird - has_trait = lifestyle_physician - has_trait_xp = { - trait = lifestyle_physician - value >= 100 - } - } - } - OR = { - NAND = { #Either, this is my first rank up - has_trait = lifestyle_physician - has_trait = lifestyle_mystic - } - has_trait = lifestyle_mystic #I have already chosen this path - } - } - modifier = { - has_trait = lifestyle_mystic - factor = 2 - } - modifier = { - ai_zeal >= medium_positive_ai_value - factor = 0 - } - mystic_level_up_chance_effect = { CHANCE = 10 } - } - } - } - - # OUTCOME RANDOMIZATION - random_list = { - 70 = { # Success - modifier = { - factor = scope:physician.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) - } - modifier = { # Bump the death numbers a bit - $PATIENT$ = { is_ruler = no } - factor = 0.8 - } - modifier = { # Pool characters should die more - $PATIENT$ = { is_pool_character = yes } - factor = 0.2 - } - trigger_event = health.3103 #Safe treatment sucess - } - 30 = { # Failure - trigger_event = health.3104 #Safe treatment failure - } - 70 = { # Failure on purpose - trigger = { - court_physician_can_fail_on_purpose_trigger = yes - } - opinion_modifier = { - who = scope:physician - opinion_target = scope:sick_character - multiplier = -1 # Adds 100 for -100 opinion - } - modifier = { - factor = { #To keep it scaling with success - add = scope:physician.physician_safe_treatment_skill_factor - divide = 2 - } - } - modifier = { #Are they already trying to kill you? - add = 40 - scope:sick_character = { - any_targeting_scheme = { - scheme_type = murder - OR = { - scheme_owner = scope:physician - any_scheme_agent_character = { this = scope:physician } - } - } - } - } - - trigger_event = health.3104 #Safe treatment failure - } - } - } - } - } -} - - -risky_disease_treatment_effect = { - $TREATMENT_PICKER$ = { save_scope_as = treatment_picker } - $PATIENT$ = { - custom_tooltip = risky_diseaste_treatment.tt - - scope:treatment_picker = { - stress_impact = { - craven = medium_stress_impact_gain - content = minor_stress_impact_gain - } - } - - hidden_effect = { - save_court_physician_as_effect = { SCOPE_NAME = physician } - - if = { - limit = { - exists = scope:physician - court_physician_available_trigger = yes - } - - #Physician skill up - scope:physician = { - physician_level_up_chance_effect = { CHANCE = 10 } - } - - random_list = { - 1 = { #Success - modifier = { - scope:physician = { - learning >= mediocre_skill_rating - learning < medium_skill_rating - } - factor = 2 - } - modifier = { - scope:physician = { - learning >= medium_skill_rating - learning < decent_skill_rating - } - factor = 4 - } - modifier = { - scope:physician = { - learning >= decent_skill_rating - learning < high_skill_rating - } - factor = 7 - } - modifier = { - scope:physician = { - learning >= high_skill_rating - } - factor = 10 - } - modifier = { - scope:physician = { has_trait = lifestyle_physician } - factor = 2 - } - modifier = { - scope:physician = { - has_trait = lifestyle_physician - has_trait_xp = { - trait = lifestyle_physician - value >= 50 - } - } - factor = 5 - } - modifier = { - scope:physician = { - has_trait = lifestyle_physician - has_trait_xp = { - trait = lifestyle_physician - value >= 100 - } - } - factor = 5 - } - # Liege Perk bonus - modifier = { - exists = scope:physician.liege - scope:physician.liege = { - has_perk = anatomical_studies_perk - } - factor = 2 - } - modifier = { # Bump the death numbers a bit - $PATIENT$ = { is_ruler = no } - factor = 0.8 - } - modifier = { # Pool characters should die more - $PATIENT$ = { is_pool_character = yes } - factor = 0.2 - } - - #Critical or normal success? - random_list = { - 1 = { - modifier = { - scope:physician = { has_trait = lifestyle_physician } - factor = 2 - } - modifier = { - scope:physician = { - has_trait = lifestyle_physician - has_trait_xp = { - trait = lifestyle_physician - value >= 50 - } - } - factor = 2 - } - modifier = { - scope:physician = { - has_trait = lifestyle_physician - has_trait_xp = { - trait = lifestyle_physician - value >= 100 - } - } - factor = 2 - } - modifier = { - scope:disease_type = flag:leper - factor = 0 - } - modifier = { - scope:disease_type = flag:cancer - factor = 0.2 - } - # Liege Perk bonus - modifier = { - exists = scope:physician.liege - scope:physician.liege = { - has_perk = anatomical_studies_perk - } - factor = 2 - } - trigger_event = health.3105 #Critical success - } - 5 = { - trigger_event = health.3106 #Normal success - } - } - } - 10 = { #Failure - trigger_event = health.3107 #Failure - } - 5 = { #Failure on purpose - trigger = { - court_physician_can_fail_on_purpose_trigger = yes - } - modifier = { - OR = { - has_relation_rival = scope:physician - reverse_opinion = { - target = scope:physician - value <= -20 - } - } - factor = 2 - } - modifier = { #Are they already trying to kill you? - add = 40 - scope:sick_character = { - any_targeting_scheme = { - scheme_type = murder - OR = { - scheme_owner = scope:physician - any_scheme_agent_character = { this = scope:physician } - } - } - } - } - trigger_event = health.3107 #Risky treatment failure - } - } - } - } - } -} - -mystic_disease_treatment_effect = { - $TREATMENT_PICKER$ = { save_scope_as = treatment_picker } - $PATIENT$ = { - custom_tooltip = mystic_diseaste_treatment.tt - - scope:treatment_picker = { - stress_impact = { - paranoid = minor_stress_impact_gain - zealous = major_stress_impact_gain - craven = medium_stress_impact_gain - } - } - - hidden_effect = { - save_court_physician_as_effect = { SCOPE_NAME = physician } - - if = { - limit = { - exists = scope:physician - court_physician_available_trigger = yes - } - #Physician skill up - scope:physician = { - mystic_level_up_chance_effect = { CHANCE = 15 } - } - } - else = { - debug_log = "No Physician existed in a mystic_treatment_effect! Why was the option even available?" - } - - random_list = { - 1 = { #Success - modifier = { - scope:physician = { - learning >= mediocre_skill_rating - learning < medium_skill_rating - } - factor = 2 - } - modifier = { - scope:physician = { - learning >= medium_skill_rating - learning < decent_skill_rating - } - factor = 4 - } - modifier = { - scope:physician = { - learning >= decent_skill_rating - learning < high_skill_rating - } - factor = 7 - } - modifier = { - scope:physician = { - learning >= high_skill_rating - } - factor = 10 - } - modifier = { - scope:physician = { has_trait = lifestyle_mystic } - factor = 2 - } - modifier = { - scope:physician = { - has_trait = lifestyle_mystic - has_trait_xp = { - trait = lifestyle_mystic - value >= 50 - } - } - factor = 5 - } - modifier = { - scope:physician = { - has_trait = lifestyle_mystic - has_trait_xp = { - trait = lifestyle_mystic - value >= 50 - } - } - factor = 5 - } - # Liege Perk bonus - modifier = { - scope:physician.liege = { - has_perk = anatomical_studies_perk - } - factor = 2 - } - modifier = { # Bump the death numbers a bit - $PATIENT$ = { is_ruler = no } - factor = 0.8 - } - modifier = { # Pool characters should die more - $PATIENT$ = { is_pool_character = yes } - factor = 0.2 - } - - #Critical or normal success? - random_list = { - 1 = { - modifier = { - scope:physician = { has_trait = lifestyle_physician } - factor = 1.5 - } - modifier = { - scope:physician = { - has_trait = lifestyle_physician - has_trait_xp = { - trait = lifestyle_physician - value >= 50 - } - } - factor = 2 - } - modifier = { - scope:physician = { - has_trait = lifestyle_physician - has_trait_xp = { - trait = lifestyle_physician - value >= 50 - } - } - factor = 3 - } - modifier = { - is_adult = no - factor = 0 - } - modifier = { - scope:disease_type = flag:leper - factor = 0 - } - modifier = { - scope:disease_type = flag:cancer - factor = 0.1 - } - - # Liege Perk bonus - modifier = { - scope:physician.liege = { - has_perk = anatomical_studies_perk - } - factor = 2 - } - - trigger_event = health.3108 #Critical success - } - 5 = { - trigger_event = health.3109 #Normal success - } - } - } - 10 = { #Failure - trigger_event = health.3110 #Failure - } - 5 = { #Failure on purpose - trigger = { - court_physician_can_fail_on_purpose_trigger = yes - } - modifier = { - OR = { - has_relation_rival = scope:physician - reverse_opinion = { - target = scope:physician - value <= -20 - } - } - factor = 2 - } - modifier = { #Are they already trying to kill you? - add = 40 - scope:sick_character = { - any_targeting_scheme = { - scheme_type = murder - OR = { - scheme_owner = scope:physician - any_scheme_agent_character = { this = scope:physician } - } - } - } - } - trigger_event = health.3110 #Failure - } - } - } - } -} - -no_disease_treatment_effect = { - custom_tooltip = no_treatment_effect.tt -} - -find_court_physician_effect = { - custom_tooltip = health.3101.e.tt - hidden_effect = { - # Stop AI taking physicians via event, since they've got an AI prioritisation system to work with. - ## We do this in the effect rather than elsewhere for script hygiene. - if = { - limit = { is_ai = no } - add_character_flag = { flag = already_sick days = 30 } - add_character_flag = { flag = searching_for_physician days = court_physician_search_max } - trigger_event = { - id = health.3001 days = { court_physician_search_min court_physician_search_max } - } - } - } -} - -deny_treatment_effect = { - $TREATMENT_PICKER$ = { save_scope_as = treatment_picker } - $PATIENT$ = { - custom_tooltip = deny_treatment_effect.tt - - add_opinion = { - target = root - modifier = cruelty_opinion - opinion = -20 - } - } -} - - -###WOUND TREATMENT OPTIONS### - -safe_wound_treatment_effect = { - custom_tooltip = safe_wound_treatment.tt - - hidden_effect = { - save_court_physician_as_effect = { SCOPE_NAME = physician } - - if = { - limit = { - exists = scope:physician - court_physician_available_trigger = yes - } - - #Physician skill up - scope:physician = { - if = { - limit = { - NAND = { - has_trait = lifestyle_physician - has_trait_xp = { - trait = lifestyle_physician - value >= 100 - } - } - } - physician_level_up_chance_effect = { CHANCE = 10 } - } - } - - random_list = { - 10 = { #Success - modifier = { - scope:physician = { - learning >= mediocre_skill_rating - learning < medium_skill_rating - } - factor = 2 - } - modifier = { - scope:physician = { - learning >= medium_skill_rating - learning < decent_skill_rating - } - factor = 4 - } - modifier = { - scope:physician = { - learning >= decent_skill_rating - learning < high_skill_rating - } - factor = 7 - } - modifier = { - scope:physician = { - learning >= high_skill_rating - } - factor = 10 - } - modifier = { - scope:physician = { has_trait = lifestyle_physician } - factor = 2 - } - modifier = { - scope:physician = { - has_trait = lifestyle_physician - has_trait_xp = { - trait = lifestyle_physician - value >= 50 - } - } - factor = 2 - } - modifier = { - scope:physician = { - has_trait = lifestyle_physician - has_trait_xp = { - trait = lifestyle_physician - value >= 100 - } - } - factor = 4 - } - if = { - limit = { - has_trait = wounded_1 - } - trigger_event = { - id = health.0100 - days = { 2 3 } - } - } - else = { - trigger_event = health.4101 #Safe treatment success - } - } - 50 = { #Failure - if = { - limit = { - has_trait = wounded_1 - } - trigger_event = { - id = health.0101 - days = { 2 3 } - } - } - else = { - trigger_event = health.4102 #Safe treatment failure - } - } - } - } - } -} - - -risky_wound_treatment_effect = { - custom_tooltip = risky_wound_treatment.tt - - hidden_effect = { - save_court_physician_as_effect = { SCOPE_NAME = physician } - - if = { - limit = { - exists = scope:physician - court_physician_available_trigger = yes - } - - #Physician skill up - scope:physician = { - physician_level_up_chance_effect = { CHANCE = 10 } - } - - random_list = { - 1 = { #Success - modifier = { - scope:physician = { - learning >= mediocre_skill_rating - learning < medium_skill_rating - } - factor = 2 - } - modifier = { - scope:physician = { - learning >= medium_skill_rating - learning < decent_skill_rating - } - factor = 4 - } - modifier = { - scope:physician = { - learning >= decent_skill_rating - learning < high_skill_rating - } - factor = 7 - } - modifier = { - scope:physician = { - learning >= high_skill_rating - } - factor = 10 - } - modifier = { - scope:physician = { has_trait = lifestyle_physician } - factor = 2 - } - modifier = { - scope:physician = { - has_trait = lifestyle_physician - has_trait_xp = { - trait = lifestyle_physician - value >= 50 - } - } - factor = 2 - } - modifier = { - scope:physician = { - has_trait = lifestyle_physician - has_trait_xp = { - trait = lifestyle_physician - value >= 100 - } - } - factor = 4 - } - - modifier = { #Gangrene! Lower chance of success - factor = 0.5 - has_character_modifier = gangrene_modifier - } - - #Critical or normal success? - random_list = { - 1 = { - modifier = { - scope:physician = { has_trait = lifestyle_physician } - factor = 2 - } - modifier = { - scope:physician = { - has_trait = lifestyle_physician - has_trait_xp = { - trait = lifestyle_physician - value >= 50 - } - } - factor = 2 - } - modifier = { - scope:physician = { - has_trait = lifestyle_physician - has_trait_xp = { - trait = lifestyle_physician - value >= 100 - } - } - factor = 2 - } - modifier = { - has_character_modifier = infected_wound_modifier - factor = 0.7 - } - modifier = { #Gangrene! Lower chance of critical success - has_character_modifier = gangrene_modifier - factor = 0.7 - } - trigger_event = health.4103 #Critical success - } - 5 = { - trigger_event = health.4104 #Normal success - } - } - } - 10 = { #Failure - trigger_event = health.4105 #Failure - } - } - } - } -} - - - -###DISEASE TREATMENT OUTCOMES### - -set_worst_disease_effect = { - if = { - limit = { has_trait = bubonic_plague } - save_scope_value_as = { - name = disease_type - value = flag:bubonic_plague - } - } - else_if = { - limit = { has_trait = cancer } - save_scope_value_as = { - name = disease_type - value = flag:cancer - } - } - else_if = { - limit = { has_trait = smallpox } - save_scope_value_as = { - name = disease_type - value = flag:smallpox - } - } - else_if = { - limit = { has_trait = measles } - save_scope_value_as = { - name = disease_type - value = flag:measles - } - } - else_if = { - limit = { has_trait = dysentery } - save_scope_value_as = { - name = disease_type - value = flag:dysentery - } - } - else_if = { - limit = { has_trait = ergotism } - save_scope_value_as = { - name = disease_type - value = flag:ergotism - } - } - else_if = { - limit = { has_trait = consumption } - save_scope_value_as = { - name = disease_type - value = flag:consumption - } - } - else_if = { - limit = { has_trait = typhus } - save_scope_value_as = { - name = disease_type - value = flag:typhus - } - } - else_if = { - limit = { has_trait = great_pox } - save_scope_value_as = { - name = disease_type - value = flag:great_pox - } - } - else_if = { - limit = { has_trait = pneumonic } - save_scope_value_as = { - name = disease_type - value = flag:pneumonic - } - } - else_if = { - limit = { has_trait = leper } - save_scope_value_as = { - name = disease_type - value = flag:leper - } - } - else_if = { - limit = { has_trait = gout_ridden } - save_scope_value_as = { - name = disease_type - value = flag:gout_ridden - } - } - else_if = { - limit = { has_trait = ill } - save_scope_value_as = { - name = disease_type - value = flag:ill - } - } -} - -add_disease_treatment_modifier_effect = { - #Treatment length depends on whether the disease has a short or long duration - #Successful treatments come in two strengths per treatment type, low for diseases with low health penalty and high for diseases with high health penalty - #Negative treatments only have one strength per treatment type - #Successful safe treatments remove most of the penalty for low -health diseases but only 1/2-1/4 of penalty for high -health diseases - #Successful risky/mystic treatments remove almost all of the penalty for all diseases (with plague being the main exception, that penalty is roughly halved) - #Safe treatment:success - - save_temporary_scope_value_as = { - name = treatment_result_treatment - value = flag:$TREATMENT$ - } - save_temporary_scope_value_as = { - name = treatment_result_outcome - value = flag:$OUTCOME$ - } - - #SAFE TREATMENT: SUCCESS - if = { - limit = { - scope:treatment_result_treatment = flag:safe - scope:treatment_result_outcome = flag:success - } - if = { - limit = { - has_short_disease_type_trigger = yes - has_high_health_penalty_disease_type_trigger = yes - } - add_character_modifier = { modifier = safe_disease_treatment_success_high_modifier days = disease_treatment_short_duration } - } - else_if = { - limit = { - has_short_disease_type_trigger = no - has_high_health_penalty_disease_type_trigger = yes - } - add_character_modifier = { modifier = safe_disease_treatment_success_high_modifier days = disease_treatment_long_duration } - } - else_if = { - limit = { - has_short_disease_type_trigger = yes - has_high_health_penalty_disease_type_trigger = no - } - add_character_modifier = { modifier = safe_disease_treatment_success_low_modifier days = disease_treatment_short_duration } - } - else_if = { - limit = { - has_short_disease_type_trigger = no - has_high_health_penalty_disease_type_trigger = no - } - add_character_modifier = { modifier = safe_disease_treatment_success_low_modifier days = disease_treatment_long_duration } - } - } - #SAFE TREATMENT: FAILURE - else_if = { - limit = { - scope:treatment_result_treatment = flag:safe - scope:treatment_result_outcome = flag:failure - } - if = { - limit = { has_short_disease_type_trigger = yes } - add_character_modifier = { modifier = safe_disease_treatment_failure_modifier days = disease_treatment_short_duration } - } - else_if = { - limit = { has_short_disease_type_trigger = no } - add_character_modifier = { modifier = safe_disease_treatment_failure_modifier days = disease_treatment_long_duration } - } - } - #RISKY & MYSTIC TREATMENT: CRITICAL SUCCESS - else_if = { - limit = { - OR = { - scope:treatment_result_treatment = flag:risky - scope:treatment_result_treatment = flag:mystic #A succcessful mystic treatment shouldn't be noticeable from the outside, so using same modifiers - } - scope:treatment_result_outcome = flag:critical_success - } - - #General cooldown - add_character_flag = { - flag = contraction_cooldown_general - years = 2 - } - - if = { - limit = { scope:disease_type = flag:consumption } - remove_trait_force_tooltip = consumption - add_character_flag = { flag = contraction_cooldown_consumption years = 20 } - } - else_if = { - limit = { scope:disease_type = flag:cancer } - remove_trait_force_tooltip = cancer - add_character_flag = { flag = contraction_cooldown_cancer years = 20 } - } - else_if = { - limit = { scope:disease_type = flag:great_pox } - remove_trait_force_tooltip = great_pox - add_character_flag = { flag = contraction_cooldown_great_pox years = 20 } - } - else_if = { - limit = { scope:disease_type = flag:gout_ridden } - remove_trait_force_tooltip = gout_ridden - add_character_flag = { flag = contraction_cooldown_gout_ridden years = 20 } - } - else_if = { - limit = { scope:disease_type = flag:ill } - remove_trait_force_tooltip = ill - #No cooldown, common disease - } - else_if = { - limit = { scope:disease_type = flag:pneumonic } - remove_trait_force_tooltip = pneumonic - add_character_flag = { flag = contraction_cooldown_pneumonic years = 20 } - } - else_if = { - limit = { scope:disease_type = flag:typhus } - remove_trait_force_tooltip = typhus - add_character_flag = { flag = contraction_cooldown_typhus years = 20 } - } - else_if = { - limit = { scope:disease_type = flag:measles } - remove_trait_force_tooltip = measles - #No cooldown, immunity - } - else_if = { - limit = { scope:disease_type = flag:dysentery } - remove_trait_force_tooltip = dysentery - add_character_flag = { flag = contraction_cooldown_dysentery years = 20 } - } - else_if = { - limit = { scope:disease_type = flag:ergotism } - remove_trait_force_tooltip = ergotism - add_character_flag = { flag = contraction_cooldown_ergotism years = 20 } - } - else_if = { - limit = { scope:disease_type = flag:smallpox } - remove_trait_force_tooltip = smallpox - #No cooldown, immunity - } - else_if = { - limit = { scope:disease_type = flag:bubonic_plague } - remove_trait_force_tooltip = bubonic_plague - #No cooldown, immunity - } - } - - #RISKY & MYSTIC TREATMENT: SUCCESS - else_if = { - limit = { - OR = { - scope:treatment_result_treatment = flag:risky - scope:treatment_result_treatment = flag:mystic #A succcessful mystic treatment shouldn't be noticeable from the outside, so using same modifiers - } - scope:treatment_result_outcome = flag:success - } - if = { - limit = { - has_short_disease_type_trigger = yes - has_high_health_penalty_disease_type_trigger = yes - } - add_character_modifier = { modifier = risky_disease_treatment_success_high_modifier days = disease_treatment_short_duration } - } - else_if = { - limit = { - has_short_disease_type_trigger = no - has_high_health_penalty_disease_type_trigger = yes - } - add_character_modifier = { modifier = risky_disease_treatment_success_high_modifier days = disease_treatment_long_duration } - } - else_if = { - limit = { - has_short_disease_type_trigger = yes - has_high_health_penalty_disease_type_trigger = no - } - add_character_modifier = { modifier = risky_disease_treatment_success_low_modifier days = disease_treatment_short_duration } - } - else_if = { - limit = { - has_short_disease_type_trigger = no - has_high_health_penalty_disease_type_trigger = no - } - add_character_modifier = { modifier = risky_disease_treatment_success_low_modifier days = disease_treatment_long_duration } - } - } - # RISKY TREATMENT FAILURE - else_if = { - limit = { - scope:treatment_result_treatment = flag:risky - scope:treatment_result_outcome = flag:failure - } - if = { - limit = { has_short_disease_type_trigger = yes } - add_character_modifier = { modifier = risky_disease_treatment_failure_modifier days = disease_treatment_short_duration } - } - else_if = { - limit = { has_short_disease_type_trigger = no } - add_character_modifier = { modifier = risky_disease_treatment_failure_modifier days = disease_treatment_long_duration } - } - } -} - - -disease_treatment_result_tooltip_effect = { - save_temporary_scope_value_as = { - name = treatment_result_treatment - value = flag:$TREATMENT$ - } - save_temporary_scope_value_as = { - name = treatment_result_outcome - value = flag:$OUTCOME$ - } - #Show death or treatment outcome - if = { - limit = { scope:sick_character = { is_alive = no } } - custom_tooltip = health.3200.death.tt - } - else = { - show_as_tooltip = { - scope:sick_character = { - add_disease_treatment_modifier_effect = { TREATMENT = $TREATMENT$ OUTCOME = $OUTCOME$ } - - #Risky - if = { - limit = { has_variable = treatment_strategy } - if = { - limit = { var:treatment_strategy = flag:amputation } - add_trait_force_tooltip = one_legged - } - else_if = { - limit = { var:treatment_strategy = flag:disfigurement } - add_trait_force_tooltip = disfigured - } - else_if = { - limit = { var:treatment_strategy = flag:eye } - add_trait_force_tooltip = one_eyed - } - else_if = { - limit = { - var:treatment_strategy = flag:castration - age >= 12 - } - add_trait_force_tooltip = eunuch_1 - } - else_if = { - limit = { - var:treatment_strategy = flag:castration - age < 12 - } - add_trait_force_tooltip = beardless_eunuch - } - } - if = { - limit = { has_variable = mystic_side_effect } - #Mystic - if = { - limit = { var:mystic_side_effect = flag:lunatic } - add_trait_force_tooltip = lunatic_1 - } - else_if = { - limit = { var:mystic_side_effect = flag:possessed } - add_trait_force_tooltip = possessed_1 - } - else_if = { - limit = { var:mystic_side_effect = flag:dull } - add_trait_force_tooltip = dull - } - else_if = { - limit = { var:mystic_side_effect = flag:craven } - add_trait_force_tooltip = craven - } - else_if = { - limit = { var:mystic_side_effect = flag:paranoid } - add_trait_force_tooltip = paranoid - } - else_if = { - limit = { var:mystic_side_effect = flag:massive_stress_gain } - add_stress = massive_stress_gain - } - } - } - } - } -} - -disease_treatment_results_effect = { - save_temporary_scope_value_as = { - name = treatment_result_treatment - value = flag:$TREATMENT$ - } - save_temporary_scope_value_as = { - name = treatment_result_outcome - value = flag:$OUTCOME$ - } - - #APPLY MODIFIERS (OR REMOVE TRAITS) - add_disease_treatment_modifier_effect = { TREATMENT = $TREATMENT$ OUTCOME = $OUTCOME$ } - - #RISKY TREATMENT: DETERMINING TREATMENT STRATEGY AND REMOVING BODY PART - if = { - limit = { scope:treatment_result_treatment = flag:risky } - random_list = { - 1 = { #Medicine - trigger = { - OR = { #Only use for cancer if no body part can be removed - NOT = { scope:disease_type ?= flag:cancer } - AND = { - scope:disease_type ?= flag:cancer - has_trait = one_eyed - has_trait = one_legged - has_trait = disfigured - OR = { - is_female = yes - is_eunuch_trigger = yes - } - } - } - } - set_variable = { - name = treatment_strategy - value = flag:medicine - days = 30 - } - } - 1 = { #Amputation - trigger = { - NOT = { has_trait = one_legged } - OR = { - has_amputation_type_disease_trigger = yes - AND = { - scope:treatment_result_outcome = flag:failure - scope:physician = { NOT = { has_trait = lifestyle_physician } } - } - } - } - add_trait_force_tooltip = one_legged - increase_wounds_no_death_effect = { REASON = treatment } - set_variable = { - name = treatment_strategy - value = flag:amputation - days = 30 - } - if = { - limit = { has_amputation_type_disease_trigger = no } - add_character_flag = { flag = physician_used_wrong_method days = 30 } - } - } - 1 = { #Disfigurement - trigger = { - NOT = { has_trait = disfigured } - OR = { - has_disfigurement_type_disease_trigger = yes - AND = { - scope:treatment_result_outcome = flag:failure - scope:physician = { NOT = { has_trait = lifestyle_physician } } - } - } - } - add_trait_force_tooltip = disfigured - increase_wounds_no_death_effect = { REASON = treatment } - set_variable = { - name = treatment_strategy - value = flag:disfigurement - days = 30 - } - if = { - limit = { has_disfigurement_type_disease_trigger = no } - add_character_flag = { flag = physician_used_wrong_method days = 30 } - } - } - 1 = { #Castration - trigger = { - is_male = yes - is_eunuch_trigger = no - OR = { - scope:disease_type ?= flag:cancer - AND = { - scope:treatment_result_outcome = flag:failure - scope:physician = { NOT = { has_trait = lifestyle_physician } } - } - } - } - if = { - limit = { - age >= 12 - } - add_trait_force_tooltip = eunuch_1 - } - else = { - add_trait_force_tooltip = beardless_eunuch - } - - increase_wounds_no_death_effect = { REASON = treatment } - set_variable = { - name = treatment_strategy - value = flag:castration - days = 30 - } - if = { - limit = { NOT = { scope:disease_type ?= flag:cancer } } - add_character_flag = { flag = physician_used_wrong_method days = 30 } - } - } - 1 = { #Remove eye - trigger = { - NOT = { has_trait = one_eyed } - OR = { - scope:disease_type ?= flag:cancer - AND = { - scope:treatment_result_outcome = flag:failure - scope:physician = { NOT = { has_trait = lifestyle_physician } } - } - } - } - add_trait_force_tooltip = one_eyed - increase_wounds_no_death_effect = { REASON = treatment } - set_variable = { - name = treatment_strategy - value = flag:eye - days = 30 - } - if = { - limit = { NOT = { scope:disease_type ?= flag:cancer } } - add_character_flag = { flag = physician_used_wrong_method days = 30 } - } - } - } - } - - #RISKY TREATMENT FAILURE: DEATH? - if = { - limit = { - scope:treatment_result_treatment = flag:risky - scope:treatment_result_outcome = flag:failure - } - if = { - limit = { - OR = { - AND = { #Dies from wound upgrading past lvl 3 - has_trait = wounded_3 - AND = { - has_variable = treatment_strategy - OR = { - var:treatment_strategy = flag:amputation - var:treatment_strategy = flag:disfigurement - var:treatment_strategy = flag:eye - var:treatment_strategy = flag:castration - } - } - } - AND = { - is_ai = yes - health <= 0 - } - } - } - add_character_flag = die_risky_treatment - } - } - - #MYSTIC TREATMENT: OCCULT OR SIMPLY QUESTIONABLE TREATMENT - if = { - limit = { scope:treatment_result_treatment = flag:mystic } - random_list = { - 100 = { #Occult - modifier = { - scope:physician = { - OR = { - any_secret = { type = secret_witch } - has_trait = witch - } - } - factor = 10 - } - random_list = { - 10 = { #Regular occult - hidden_effect = { - set_variable = { - name = treatment_strategy - value = flag:occult - days = 30 - } - } - } - 2 = { #Cannibal occult - trigger = { - NOR = { - has_trait = cannibal - any_secret = { type = secret_cannibal } - } - } - hidden_effect = { - set_variable = { - name = treatment_strategy - value = flag:occult_cannibal - days = 30 - } - } - give_cannibal_secret_or_trait_effect = yes - } - 2 = { #Deviant occult - trigger = { - is_adult = yes - NOR = { - has_trait = deviant - any_secret = { type = secret_deviant } - } - NOT = { scope:treatment_result_outcome = flag:failure } - } - hidden_effect = { - set_variable = { - name = treatment_strategy - value = flag:occult_deviant - days = 30 - } - } - give_deviant_secret_or_trait_effect = yes - } - } - } - 50 = { #Questionable - hidden_effect = { - set_variable = { - name = treatment_strategy - value = flag:questionable - days = 30 - } - } - } - } - - #MYSTIC TREATMENT: SPECIAL EFFECTS - if = { - limit = { scope:treatment_result_outcome = flag:failure } - random_list = { - 10 = { - trigger = { NOT = { has_trait = lunatic } } - set_variable = { - name = mystic_side_effect - value = flag:lunatic - days = 30 - } - add_trait_force_tooltip = lunatic_1 - } - 10 = { - trigger = { NOT = { has_trait = possessed } } - set_variable = { - name = mystic_side_effect - value = flag:possessed - days = 30 - } - add_trait_force_tooltip = possessed_1 - } - 10 = { - trigger = { - NOR = { - has_trait = dull - has_trait = intellect_good - has_trait = shrewd - } - } - set_variable = { - name = mystic_side_effect - value = flag:dull - days = 30 - } - add_trait_force_tooltip = dull - } - 10 = { - trigger = { NOT = { has_trait = craven } } - set_variable = { - name = mystic_side_effect - value = flag:craven - days = 30 - } - add_trait_force_tooltip = craven - } - 10 = { - trigger = { NOT = { has_trait = paranoid } } - set_variable = { - name = mystic_side_effect - value = flag:paranoid - days = 30 - } - add_trait_force_tooltip = paranoid - } - 15 = { - set_variable = { - name = mystic_side_effect - value = flag:massive_stress_gain - days = 30 - } - add_stress = massive_stress_gain - } - } - } - - #Stress for occult treatments - if = { - limit = { has_variable = treatment_strategy } - if = { - limit = { var:treatment_strategy = flag:occult } - stress_impact = { - zealous = major_stress_impact_gain - } - } - else_if = { - limit = { var:treatment_strategy = flag:occult_cannibal } - stress_impact = { - zealous = major_stress_impact_gain - compassionate = major_stress_impact_gain - } - } - else_if = { - limit = { var:treatment_strategy = flag:occult_deviant } - stress_impact = { - zealous = major_stress_impact_gain - chaste = major_stress_impact_gain - } - } - } - } - - #RETURN VISIT TO THE DOCTOR! - hidden_effect = { - if = { - limit = { - NOT = { #Risky/mystic critical success cures completely, no need for another visit - scope:treatment_result_outcome = flag:critical_success - } - } - if = { - limit = { has_short_disease_type_trigger = yes } - trigger_event = { - id = health.3100 #Sends health.3101 to me or 3102 to liege - days = disease_treatment_short_duration_plus_1 - } - } - else = { - trigger_event = { - id = health.3100 #Sends health.3101 to me or 3102 to liege - days = disease_treatment_long_duration_plus_1 - } - } - } - } - - #FAILED TREATMENT OPINIONS - if = { - limit = { - scope:treatment_result_outcome = flag:failure - OR = { - scope:treatment_result_treatment = flag:risky - scope:treatment_result_treatment = flag:mystic - } - } - add_failed_treatment_of_kin_opinions_effect = yes - } - - physician_rank_up_tooltip_effect = yes #Shows trait gain if physician ranked up -} - - - - - -###WOUND TREATMENT OUTCOMES### - -add_wound_treatment_modifier_effect = { - save_temporary_scope_value_as = { - name = treatment_result_treatment - value = flag:$TREATMENT$ - } - save_temporary_scope_value_as = { - name = treatment_result_outcome - value = flag:$OUTCOME$ - } - - - ###SUCCESS### - if = { - limit = { - OR = { - scope:treatment_result_outcome = flag:success - scope:treatment_result_outcome = flag:critical_success - } - } - #Infection is always removed - if = { - limit = { has_character_modifier = infected_wound_modifier } - remove_character_modifier = infected_wound_modifier - save_scope_value_as = { - name = infection - value = yes - } - } - #Gangrene is removed if you picked risky - else_if = { - limit = { - has_character_modifier = gangrene_modifier - scope:treatment_result_treatment = flag:risky - } - remove_character_modifier = gangrene_modifier - save_scope_value_as = { - name = gangrene - value = yes - } - } - - - #Applying correct modifier or removing correct trait (unless there's still an active treatment, could happen if you got treated for a wound and then got infection/gangrene) - if = { - limit = { has_recent_wound_treatment_trigger = no } - - #Safe treatment - if = { - limit = { scope:treatment_result_treatment = flag:safe } - - #Add modifier or remove wounded_1 trait - if = { - limit = { has_character_modifier = gangrene_modifier } - add_character_modifier = { modifier = safe_wound_treatment_success_high_modifier days = wound_treatment_success_duration } - } - else_if = { - limit = { has_trait = wounded_1 } - remove_trait = wounded_1 - } - else_if = { - limit = { - OR = { - has_trait = wounded_2 - has_trait = wounded_3 - } - } - add_character_modifier = { modifier = safe_wound_treatment_success_low_modifier days = wound_treatment_success_duration } - } - } - - #Risky treatment critical success - else_if = { - limit = { - scope:treatment_result_treatment = flag:risky - scope:treatment_result_outcome = flag:critical_success - } - #Remove a trait level - if = { - limit = { has_trait = wounded_1 } - remove_trait = wounded_1 - } - else_if = { - limit = { has_trait = wounded_2 } - remove_trait = wounded_2 #We do it like this so you can see the trait you've lost - add_trait = wounded_1 - } - else_if = { - limit = { has_trait = wounded_3 } - remove_trait = wounded_3 - add_trait = wounded_2 - } - } - - #Risky treatment regular success - else_if = { - limit = { - scope:treatment_result_treatment = flag:risky - scope:treatment_result_outcome = flag:critical_success - } - add_character_modifier = { modifier = risky_wound_treatment_success_modifier days = wound_treatment_success_duration } - } - } - } - ###FAILURE### - else_if = { - limit = { scope:treatment_result_outcome = flag:failure } - - #Safe treatment failure - if = { - limit = { scope:treatment_result_treatment = flag:safe } - add_character_modifier = { modifier = safe_wound_treatment_failure_modifier days = wound_treatment_failure_duration } - } - if = { - limit = { scope:treatment_result_treatment = flag:risky } - add_character_modifier = { modifier = risky_wound_treatment_failure_modifier days = wound_treatment_failure_duration } - } - } -} - - - -wound_treatment_result_tooltip_effect = { - save_temporary_scope_value_as = { - name = treatment_result_treatment - value = flag:$TREATMENT$ - } - save_temporary_scope_value_as = { - name = treatment_result_outcome - value = flag:$OUTCOME$ - } - #Show death or treatment outcome - if = { - limit = { scope:sick_character = { is_alive = no } } - custom_tooltip = health.3200.death.tt - } - else = { - show_as_tooltip = { - scope:sick_character = { - add_wound_treatment_modifier_effect = { TREATMENT = $TREATMENT$ OUTCOME = $OUTCOME$ } - - if = { - limit = { has_variable = treatment_strategy } - if = { - limit = { var:treatment_strategy = flag:amputation } - add_trait_force_tooltip = one_legged - } - else_if = { - limit = { var:treatment_strategy = flag:disfigurement } - add_trait_force_tooltip = disfigured - } - else_if = { - limit = { var:treatment_strategy = flag:eye } - add_trait_force_tooltip = one_eyed - } - else_if = { - limit = { - var:treatment_strategy = flag:castration - age >= 12 - } - add_trait_force_tooltip = eunuch_1 - } - else_if = { - limit = { - var:treatment_strategy = flag:castration - age < 12 - } - add_trait_force_tooltip = beardless_eunuch - } - } - } - } - } -} - -wound_treatment_results_effect = { - save_temporary_scope_value_as = { - name = treatment_result_treatment - value = flag:$TREATMENT$ - } - save_temporary_scope_value_as = { - name = treatment_result_outcome - value = flag:$OUTCOME$ - } - - #APPLY MODIFIERS (OR REMOVE TRAITS) - add_wound_treatment_modifier_effect = { TREATMENT = $TREATMENT$ OUTCOME = $OUTCOME$ } - - #RISKY TREATMENT: DETERMINING TREATMENT STRATEGY AND REMOVING BODY PART - if = { - limit = { scope:treatment_result_treatment = flag:risky } - random_list = { - 1 = { #Medicine - trigger = { - OR = { #Only use for gangrene if no body part can be removed - NOT = { has_character_modifier = gangrene_modifier } - AND = { - has_character_modifier = gangrene_modifier - has_trait = one_eyed - has_trait = one_legged - has_trait = disfigured - OR = { - is_female = yes - is_eunuch_trigger = yes - } - } - } - } - set_variable = { - name = treatment_strategy - value = flag:medicine - days = 30 - } - } - 1 = { #Amputation - trigger = { - NOT = { has_trait = one_legged } - OR = { - has_infected_or_gangrenous_wound_trigger = yes - AND = { - scope:treatment_result_outcome = flag:failure - scope:physician = { NOT = { has_trait = lifestyle_physician } } - } - } - } - add_trait_force_tooltip = one_legged - increase_wounds_no_death_effect = { REASON = treatment } - set_variable = { - name = treatment_strategy - value = flag:amputation - days = 30 - } - if = { - limit = { has_infected_or_gangrenous_wound_trigger = no } - add_character_flag = { flag = physician_used_wrong_method days = 30 } - } - } - 1 = { #Disfigurement - trigger = { - NOT = { has_trait = disfigured } - scope:treatment_result_outcome = flag:failure - scope:physician = { NOT = { has_trait = lifestyle_physician } } - } - add_trait_force_tooltip = disfigured - increase_wounds_no_death_effect = { REASON = treatment } - set_variable = { - name = treatment_strategy - value = flag:disfigurement - days = 30 - } - } - 1 = { #Castration - trigger = { - is_male = yes - is_eunuch_trigger = no - OR = { - has_infected_or_gangrenous_wound_trigger = yes - AND = { - scope:treatment_result_outcome = flag:failure - scope:physician = { NOT = { has_trait = lifestyle_physician } } - } - } - } - if = { - limit = { - age >= 12 - } - add_trait_force_tooltip = eunuch_1 - } - else = { - add_trait_force_tooltip = beardless_eunuch - } - increase_wounds_no_death_effect = { REASON = treatment } - set_variable = { - name = treatment_strategy - value = flag:castration - days = 30 - } - if = { - limit = { has_infected_or_gangrenous_wound_trigger = no } - add_character_flag = { flag = physician_used_wrong_method days = 30 } - } - } - 1 = { #Remove eye - trigger = { - NOT = { has_trait = one_eyed } - OR = { - has_infected_or_gangrenous_wound_trigger = yes - AND = { - scope:treatment_result_outcome = flag:failure - scope:physician = { NOT = { has_trait = lifestyle_physician } } - } - } - } - add_trait_force_tooltip = one_eyed - increase_wounds_no_death_effect = { REASON = treatment } - set_variable = { - name = treatment_strategy - value = flag:eye - days = 30 - } - if = { - limit = { has_infected_or_gangrenous_wound_trigger = no } - add_character_flag = { flag = physician_used_wrong_method days = 30 } - } - } - } - - #Fallback - if = { - limit = { NOT = { exists = var:treatment_strategy } } - set_variable = { - name = treatment_strategy - value = flag:medicine - days = 30 - } - } - } - - #RISKY TREATMENT FAILURE: DEATH? - if = { - limit = { - scope:treatment_result_treatment = flag:risky - scope:treatment_result_outcome = flag:failure - OR = { - AND = { #Dies from wound upgrading past lvl 3 - has_trait = wounded_3 - OR = { - var:treatment_strategy = flag:amputation - var:treatment_strategy = flag:disfigurement - var:treatment_strategy = flag:eye - var:treatment_strategy = flag:castration - } - } - AND = { #AIs die immediately if their health is reduced to 0 or below - is_ai = yes - health <= 0 - } - } - } - add_character_flag = die_surgery - } - - #RETURN VISIT TO THE DOCTOR! - hidden_effect = { - if = { - limit = { - has_trait = wounded - NOT = { has_character_flag = die_surgery } - } - if = { - limit = { scope:treatment_result_outcome = flag:failure } - trigger_event = { - id = health.4999 #Sends health.4001 to me or 4002 to liege - days = wound_treatment_failure_duration_plus_1 - } - } - else = { - trigger_event = { - id = health.4999 #Sends health.4001 to me or 4002 to liege - days = wound_treatment_success_duration_plus_1 - } - } - } - } - - #FAILED TREATMENT OPINIONS - if = { - limit = { - scope:treatment_result_outcome = flag:failure - OR = { - scope:treatment_result_treatment = flag:risky - scope:treatment_result_treatment = flag:mystic - } - } - add_failed_treatment_of_kin_opinions_effect = yes - } - - physician_rank_up_tooltip_effect = yes #Shows trait gain if physician ranked up -} - - - - - - - - -###DISEASE TREATMENT LOGIC### -save_health_court_owner_effect = { #Should match has_health_court_owner_trigger - if = { - limit = { exists = imprisoner } - imprisoner = { save_scope_as = $SCOPE_NAME$ } - } - else_if = { - limit = { exists = court_owner } #Courtiers: liege. Guest: host. Ruler: themselves. - court_owner = { save_scope_as = $SCOPE_NAME$ } - } -} - -pick_own_disease_treatment_effect = { - if = { - limit = { is_adult = yes } - custom_tooltip = pick_own_treatment_effect.adult.tt - } - else = { - custom_tooltip = pick_own_treatment_effect.child.tt - } - - hidden_effect = { - trigger_event = { - id = health.3101 - days = { 5 10 } - } - } -} - -#Who treats a sick character? -decide_who_picks_disease_treatment_effect = { - if = { - limit = { - liege_picks_treatment_trigger = yes - } - liege = { - trigger_event = { - id = health.3102 #Liege decides - days = { physician_treatment_delay_subject_min physician_treatment_delay_subject_max } - } - } - } - else = { - trigger_event = { - id = health.3101 #I decide - days = { physician_treatment_delay_ruler_min physician_treatment_delay_ruler_max } - } - } -} - -liege_picks_treatment_effect = { - if = { - limit = { - liege_picks_treatment_trigger = yes - } - liege = { - trigger_event = { - id = health.3102 #Liege decides - days = { 5 10 } - } - } - } -} - -remove_disease_treatment_effect = { - hidden_effect = { - if = { - limit = { - has_treatable_disease_trigger = no - } - remove_character_modifier = safe_disease_treatment_success_high_modifier - remove_character_modifier = safe_disease_treatment_success_low_modifier - remove_character_modifier = safe_disease_treatment_failure_modifier - remove_character_modifier = risky_disease_treatment_success_high_modifier - remove_character_modifier = risky_disease_treatment_success_low_modifier - remove_character_modifier = risky_disease_treatment_failure_modifier - - } - } -} - -###WOUNDS TREATMENT LOGIC### - -pick_own_wound_treatment_effect = { - if = { - limit = { is_adult = yes } - custom_tooltip = pick_own_treatment_effect.adult.tt - } - else = { - custom_tooltip = pick_own_treatment_effect.child.tt - } - - hidden_effect = { - trigger_event = { - id = health.4001 - days = { 5 10 } - } - } -} - -decide_who_picks_wound_treatment_effect = { - if = { - limit = { - liege_picks_treatment_trigger = yes - } - liege = { - trigger_event = { - id = health.4002 #Liege decides - days = { 10 20 } - } - } - } - else = { - trigger_event = { - id = health.4001 #I decide - days = { 5 15 } - } - } -} - - - -###FAILED TREAMENT EFFECTS### - -add_failed_treatment_of_me_opinions_effect = { -#Physician scope is set in the events that reference this effect - if = { - limit = { - scope:physician = { - is_alive = yes - } - court_physician_available_trigger = yes - this != scope:physician - } - if = { - limit = { - OR = { - has_character_flag = physician_used_wrong_method - scope:physician = { has_character_modifier = chastised_physician_modifier } - scope:sick_character = { - exists = var:treatment_strategy - OR = { - var:treatment_strategy = flag:amputation - var:treatment_strategy = flag:disfigurement - var:treatment_strategy = flag:eye - var:treatment_strategy = flag:castration - } - } - } - } - hidden_effect = { - add_opinion = { - target = scope:physician - modifier = botched_my_treatment_crime_opinion - } - } - show_as_tooltip = { - add_opinion = { - target = scope:physician - modifier = botched_my_treatment_crime_opinion - } - } - } - else = { - hidden_effect = { - add_opinion = { - target = scope:physician - modifier = failed_to_treat_me_crime_opinion - } - } - show_as_tooltip = { - add_opinion = { - target = scope:physician - modifier = failed_to_treat_me_opinion - } - } - } - } -} - -add_failed_treatment_of_kin_opinions_effect = { -#Physician scope is set in the events that reference this effect - hidden_effect = { - if = { - limit = { - scope:physician = { - is_alive = yes - } - court_physician_available_trigger = yes - this != scope:physician - } - every_close_family_member = { - add_to_temporary_list = failed_treatment_opinion - } - every_heir_title = { - limit = { - exists = holder - } - holder = { - if = { - limit = { - player_heir = scope:sick_character - NOT = { is_in_list = failed_treatment_opinion } - } - add_to_temporary_list = failed_treatment_opinion - } - } - } - every_in_list = { - list = failed_treatment_opinion - limit = { - this != scope:physician - } - if = { - limit = { - scope:sick_character = { - has_character_flag = die_risky_treatment - is_alive = no - has_character_flag = physician_used_wrong_method - scope:physician = { has_character_modifier = chastised_physician_modifier } - trigger_if = { - limit = { has_variable = treatment_strategy } - OR = { - var:treatment_strategy = flag:amputation - var:treatment_strategy = flag:disfigurement - var:treatment_strategy = flag:eye - var:treatment_strategy = flag:castration - var:treatment_strategy = flag:occult - var:treatment_strategy = flag:occult_cannibal - var:treatment_strategy = flag:occult_deviant - } - } - } - } - - add_opinion = { - target = scope:physician - modifier = botched_treatment_of_kin_crime_opinion - } - } - else = { - add_opinion = { - target = scope:physician - modifier = failed_to_treat_kin_crime_opinion - } - } - } - } - } -} - - -downgrade_failed_treatment_of_me_opinions_effect = { - #Physician scope is set in the events that reference this effect - hidden_effect = { - if = { - limit = { - scope:physician = { - is_alive = yes - } - court_physician_available_trigger = yes - } - if = { - limit = { - has_opinion_modifier = { - target = scope:physician - modifier = botched_my_treatment_crime_opinion - } - } - remove_opinion = { - target = scope:physician - modifier = botched_my_treatment_crime_opinion - } - add_opinion = { - #add nice opinion version - target = scope:physician - modifier = botched_my_treatment_crime_opinion - } - } - if = { - limit = { - has_opinion_modifier = { - target = scope:physician - modifier = failed_to_treat_me_crime_opinion - } - } - remove_opinion = { - target = scope:physician - modifier = failed_to_treat_me_crime_opinion - } - add_opinion = { - target = scope:physician - modifier = failed_to_treat_me_opinion - } - } - } - } -} - -downgrade_failed_treatment_of_kin_opinions_effect = { - hidden_effect = { - if = { - limit = { - has_opinion_modifier = { - target = scope:physician - modifier = botched_treatment_of_kin_crime_opinion - } - } - remove_opinion = { - target = scope:physician - modifier = botched_treatment_of_kin_crime_opinion - } - add_opinion = { - #add nice opinion version - target = scope:physician - modifier = botched_treatment_of_kin_opinion - } - } - if = { - limit = { - has_opinion_modifier = { - target = scope:physician - modifier = failed_to_treat_kin_crime_opinion - } - } - remove_opinion = { - target = scope:physician - modifier = failed_to_treat_kin_crime_opinion - } - add_opinion = { - target = scope:physician - modifier = failed_to_treat_kin_opinion - } - } - } -} - - -execute_physician_effect = { - execute_prisoner_effect = { - VICTIM = scope:physician - EXECUTIONER = root - } - - - stress_impact = { - compassionate = major_stress_impact_gain - just = minor_stress_impact_gain - forgiving = medium_stress_impact_gain - } -} - -imprison_physician_effect = { - custom_tooltip = health.3107.d.tt - - imprison_character_effect = { - TARGET = scope:physician - IMPRISONER = root - } - - root = { remove_relation_court_physician = scope:physician } - - stress_impact = { - compassionate = medium_stress_impact_gain - just = minor_stress_impact_gain - forgiving = minor_stress_impact_gain - } -} - -chastise_physician_effect = { - scope:physician = { - add_character_modifier = { - modifier = chastised_physician_modifier - years = 5 - } - } - if = { - limit = { - exists = scope:sick_character - scope:sick_character = { this = root } - } - downgrade_failed_treatment_of_me_opinions_effect = yes #You can no longer punish them - } - else_if = { - limit = { - exists = scope:sick_character - } - downgrade_failed_treatment_of_kin_opinions_effect = yes #You can no longer punish them - } - - stress_impact = { - vengeful = medium_stress_impact_gain - } -} - -forgive_physician_effect = { - if = { - limit = { - exists = scope:sick_character - scope:sick_character = { this = root } - } - downgrade_failed_treatment_of_me_opinions_effect = yes #You can no longer punish them - } - else_if = { - limit = { - exists = scope:sick_character - } - downgrade_failed_treatment_of_kin_opinions_effect = yes #You can no longer punish them - } - - reverse_add_opinion = { - target = scope:physician - modifier = grateful_opinion - opinion = 15 - } - - stress_impact = { - vengeful = major_stress_impact_gain - wrathful = medium_stress_impact_gain - } -} - -###DISEASE MESSAGES### - -inform_liege_about_disease_treatment_effect = { - hidden_effect = { - save_scope_value_as = { - name = treatment - value = flag:$TREATMENT$ - } - save_scope_value_as = { - name = outcome - value = flag:$OUTCOME$ - } - - #To save scope for portrait - if = { - limit = { - scope:physician != scope:sick_character - } - scope:physician = { save_scope_as = portrait } - } - - #Is liege generally responsible for our treatment? - if = { - limit = { liege_is_responsible_for_treatment_trigger = yes } - - #Toast messages for success and minor failures: only if liege actually picked the treatment - #Event for major failures and death: always - - liege = { - #CRITICAL SUCCESS & SUCCESS (TOAST) - if = { - limit = { - exists = scope:treatment_picker - this = scope:treatment_picker - OR = { - scope:outcome = flag:success - scope:outcome = flag:critical_success - } - } - send_interface_toast = { - title = court_physician_treatment_success_message_title - left_icon = scope:sick_character - right_icon = scope:portrait - disease_treatment_result_tooltip_effect = { TREATMENT = $TREATMENT$ OUTCOME = $OUTCOME$ } - } - } - #FAILURE - else_if = { - limit = { scope:outcome = flag:failure } - #SAFE FAILURE (TOAST) - if = { - limit = { - exists = scope:treatment_picker - this = scope:treatment_picker - scope:treatment = flag:safe - } - send_interface_toast = { - title = court_physician_treatment_failure_message_title - left_icon = scope:sick_character - right_icon = scope:portrait - wound_treatment_result_tooltip_effect = { TREATMENT = $TREATMENT$ OUTCOME = $OUTCOME$ } - } - } - #RISKY FAILURE (EVENT) - else_if = { - limit = { scope:treatment = flag:risky } - save_scope_value_as = { - name = disease_or_wound - value = flag:disease - } - trigger_event = health.3200 - } - #MYSTIC FAILURE (EVENT) - else_if = { - limit = { scope:treatment = flag:mystic } - trigger_event = health.3201 - #reveal secret in this event - } - } - #DEATH (EVENT) - else_if = { - limit = { scope:outcome = flag:death } - - add_character_flag = { - flag = sent_relevant_death_event #This blocks further death events triggered by death_management.0001 - days = 5 - } - trigger_event = health.3200 - } - } - } - } -} - -### WOUND MESSAGES ### - -inform_liege_about_wound_treatment_effect = { - hidden_effect = { - save_scope_value_as = { - name = treatment - value = flag:$TREATMENT$ - } - save_scope_value_as = { - name = outcome - value = flag:$OUTCOME$ - } - - - #Is liege generally responsible for our treatment? - if = { - limit = { liege_is_responsible_for_treatment_trigger = yes } - - #Success and minor failure: no message - #Major failure and death: event - - liege = { - #RISKY FAILURE - if = { - limit = { - scope:outcome = flag:failure - scope:treatment = flag:risky - } - save_scope_value_as = { - name = disease_or_wound - value = flag:wound - } - trigger_event = health.3200 - } - #RISKY DEATH - else_if = { - limit = { scope:outcome = flag:death } - - save_scope_value_as = { - name = disease_or_wound - value = flag:wound - } - add_character_flag = { - flag = sent_relevant_death_event #This blocks further death events triggered by death_management.0001 - days = 5 - } - trigger_event = health.3200 - } - } - } - } -} - -#Currently no message to liege because liege never picks wound treatment and safe success is not noteworthy - - -#Effect run when you commit suicide -committed_suicide_effect = { - if = { - limit = { - any_vassal = { } - } - every_vassal = { - custom = all_vassals - add_opinion = { - modifier = suicide_opinion - target = root - opinion = -30 - } - } - } - if = { - limit = { - is_ai = yes - exists = dynasty - } - dynasty = { - add_dynasty_prestige = medium_dynasty_prestige_loss - } - } - else_if = { - limit = { exists = dynasty } - dynasty = { - add_dynasty_prestige_level = -1 - } - } - add_piety_level = -1 - death = { - death_reason = death_suicide - } -} - -#Effect run when you attempt to commit suicide -attempted_suicide_effect = { - add_piety_level = -1 -} - -# Remove infirm when adding incapable so that the player doesn't just immediately die. -upgrade_infirm_to_incapable_effect = { - # Stealthily remove infirm - hidden_effect = { - if = { - limit = { has_trait = infirm } - remove_trait = infirm - } - } - # And add in capable. - add_trait = incapable - # Logging. - log_harm_event_incapability_as_variable_effect = yes -} diff --git a/N3OW/common/scripted_triggers/00_activity_triggers.txt b/N3OW/common/scripted_triggers/00_activity_triggers.txt deleted file mode 100644 index 41e644a8..00000000 --- a/N3OW/common/scripted_triggers/00_activity_triggers.txt +++ /dev/null @@ -1,676 +0,0 @@ -is_available_for_activity_trigger = { - is_available_quick = { - adult = yes - at_war = no - imprisoned = no - activity = no - } - is_healthy = yes - NOR = { - exists = var:booked_for_a_party - exists = var:engaged_in_single_combat - } -} - -is_available_for_child_activity_trigger = { - is_available_quick = { - adult = no - at_war = no - imprisoned = no - activity = no - hostage = no - } - age >= 4 - age < less_than_two_years_to_adulthood_value #To avoid being away when Coming of Age-event triggers - is_healthy = yes - NOR = { - exists = var:hostage_travelling_to_warden - exists = var:ward_travelling_to_guardian - } -} - -is_available_in_activity_trigger = { - is_available_quick = { - activity = yes - adult = yes - at_war = no - imprisoned = no - } - is_healthy = yes -} - -### Witch Ritual -activity_witch_ritual_valid_trigger = { - house ?= { - has_house_modifier = witch_coven - any_house_member = { - this != root - is_witch_known_by_trigger = { CHARACTER = root } - } - } -} - -### Petition Liege triggers - -# Council Seat -petition_liege_council_seat_liege_trigger = { - liege ?= { - OR = { - cp:councillor_chancellor ?= { - NOT = { - is_blocked_from_being_fired_from_council_trigger = { COURT_OWNER = root.liege } - } - } - cp:councillor_marshal ?= { - NOT = { - is_blocked_from_being_fired_from_council_trigger = { COURT_OWNER = root.liege } - } - } - cp:councillor_steward ?= { - NOT = { - is_blocked_from_being_fired_from_council_trigger = { COURT_OWNER = root.liege } - } - } - cp:councillor_spymaster ?= { - NOT = { - is_blocked_from_being_fired_from_council_trigger = { COURT_OWNER = root.liege } - } - } - trigger_if = { - limit = { root.faith = root.liege.faith } - root.faith = { has_doctrine = doctrine_clerical_succession_temporal_appointment } - cp:councillor_court_chaplain ?= { - NOT = { - is_blocked_from_being_fired_from_council_trigger = { COURT_OWNER = root.liege } - } - } - } - NOT = { exists = cp:councillor_chancellor } - NOT = { exists = cp:councillor_marshal } - NOT = { exists = cp:councillor_steward } - NOT = { exists = cp:councillor_spymaster } - trigger_if = { - limit = { root.faith = root.liege.faith } - root.faith = { has_doctrine = doctrine_clerical_succession_temporal_appointment } - NOT = { exists = cp:councillor_court_chaplain } - } - } - } -} - -petition_liege_council_chaplain_appointable_trigger = { - $LIEGE$.faith = { has_doctrine = doctrine_clerical_succession_temporal_appointment } - $LIEGE$.faith = $JOB_TAKER$.faith -} - -petition_liege_councillor_second_trigger = { - NOT = { $JOB_TAKER$.var:petition_liege_council_first ?= flag:$ROLE$ } - trigger_if = { - limit = { exists = $LIEGE$.cp:councillor_$ROLE$ } - OR = { - $JOB_TAKER$.$SKILL$ >= $LIEGE$.cp:councillor_$ROLE$.$SKILL$ - $JOB_TAKER$ = { has_trait = education_$SKILL$ } - } - } - trigger_else = { $JOB_TAKER$.$SKILL$ >= mediocre_skill_rating } -} - -petition_liege_councillor_blocked_trigger = { - $JOB_TAKER$ = { - can_be_$ROLE$_trigger = { COURT_OWNER = $LIEGE$ } - } - $LIEGE$.cp:councillor_$ROLE$ ?= { - NOT = { - is_blocked_from_being_fired_from_council_trigger = { COURT_OWNER = $LIEGE$ } - } - trigger_if = { - limit = { exists = scope:eunuch } - NOT = { is_close_family_of = scope:eunuch } - } - } -} - -# Pay Debt -petition_liege_pay_debt_trigger = { - debt_level > -1 - liege.debt_level = -1 -} - -# War Aid -petition_liege_war_aid_trigger = { - is_at_war = yes - save_temporary_scope_as = vassal - any_character_war = { - scope:vassal = { is_leader_in_war = prev } - trigger_if = { - limit = { - scope:vassal = { is_attacker_in_war = prev } - } - defender_war_score >= petition_war_aid_score_value - } - trigger_else = { attacker_war_score >= petition_war_aid_score_value } - } -} - -petition_liege_war_liege_involvement_trigger = { - liege = { - NOR = { - 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_advantage_value - } - } - trigger_else = { - OR = { - primary_attacker.primary_title.tier >= root.liege.primary_title.tier - petition_liege_attacker_strength_value > petition_war_aid_liege_ally_advantage_value - } - } - } - is_in_ongoing_great_holy_war = yes - } - } -} - -petition_liege_war_aid_share_trigger = { - NOT = { - any_character_war = { - root = { is_leader_in_war = prev } - any_war_participant = { this = root.liege } - } - } -} - -# Vassal War -petition_liege_vassal_war_trigger = { - any_character_war = { - root = { is_leader_in_war = prev } # root is a war leader - primary_attacker.liege = primary_defender.liege # War is between vassals of the same liege - NOT = { - root.liege = { is_participant_in_war = prev } # Liege is not involved in the war - } - } -} - -# Control -petition_liege_county_control_trigger = { - tier = tier_county - trigger_if = { - limit = { tier = tier_county } - county_control < medium_county_control - } -} - -# Convert -petition_liege_county_convert_trigger = { - tier = tier_county - trigger_if = { - limit = { tier = tier_county } - county.faith != holder.faith - } -} - -# Opinion -petition_liege_county_opinion_trigger = { - tier = tier_county - trigger_if = { - limit = { tier = tier_county } - county_opinion <= petition_county_opinion_value - } -} - -# Fortify -petition_liege_fortify_border_trigger = { - tier = tier_county - trigger_if = { - limit = { tier = tier_county } - county = { - save_temporary_scope_as = county_scope - any_title_to_title_neighboring_county = { - holder.top_liege != scope:county_scope.holder.top_liege # petition_liege - NOT = { - holder.top_liege = { is_allied_to = scope:county_scope.holder.top_liege } # petition_liege - } - } - } - } -} - -# Liege Title -petition_liege_title_liege_trigger = { - holder = prev.liege - this != prev.liege.primary_title - tier < prev.liege.primary_title.tier - trigger_if = { - limit = { exists = county } - county != holder.capital_county - } - OR = { - tier > tier_county - holder = { - any_held_title = { - count > 1 - title_tier = county - } - } - } -} - -# Vassal Title -petition_liege_title_vassal_trigger = { - holder ?= { save_temporary_scope_as = second_temp } - OR = { - scope:second_temp.liege = prev.liege - scope:second_temp.liege.liege = prev.liege - scope:second_temp.liege.liege.liege = prev.liege - } - NOR = { - scope:second_temp = prev.liege - has_variable = petition_title_cooldown - scope:second_temp = { is_at_war = yes } - prev.liege = { - any_targeting_faction = { - any_faction_member = { this = scope:second_temp } - } - } - } - #trigger_if = { - # limit = { exists = county } - # county != holder.capital_county - #} - scope:second_temp = { - trigger_if = { - limit = { government_has_flag = government_is_feudal } - NOT = { vassal_contract_obligation_level_can_be_decreased = title_revocation_rights } - } - } - OR = { - tier > tier_county - scope:second_temp = { - any_held_title = { - count > 1 - title_tier = county - } - } - } -} - -# Construct City -petition_liege_construct_city_trigger = { - county_has_empty_province_trigger = yes - OR = { - county_has_no_city_trigger = yes - county_has_all_holding_types = yes - } -} - -# Construct Temple -petition_liege_construct_temple_trigger = { - county_has_empty_province_trigger = yes - OR = { - county_has_no_church_trigger = yes - county_has_all_holding_types = yes - } -} - -# AI weightings -petition_liege_medium_cost_trigger = { - exists = scope:petition_vassal - scope:petition_vassal = { has_variable = petition_type } - OR = { - trigger_if = { - limit = { scope:petition_vassal.var:petition_type = flag:pay_debt } - scope:petition_vassal.debt_level < 3 - } - scope:petition_vassal.var:petition_type = flag:war_aid - scope:petition_vassal.var:petition_type = flag:vassal_war - scope:petition_vassal.var:petition_type = flag:title_vassal - trigger_if = { - limit = { scope:petition_vassal.var:petition_type = flag:war_aid } - petitioner_war_aid_levies_cost_value > scope:petition_liege.medium_gold_value - } - scope:petition_vassal.var:petition_type = flag:regent - } -} - -petition_liege_high_cost_trigger = { - exists = scope:petition_vassal - scope:petition_vassal = { has_variable = petition_type } - OR = { - trigger_if = { - limit = { scope:petition_vassal.var:petition_type = flag:pay_debt } - scope:petition_vassal.debt_level >= 3 - } - scope:petition_vassal.var:petition_type = flag:title_liege - scope:petition_vassal.var:petition_type = flag:construct_city - scope:petition_vassal.var:petition_type = flag:construct_temple - scope:petition_vassal.var:petition_type = flag:development - trigger_if = { - limit = { scope:petition_vassal.var:petition_type = flag:war_aid } - petitioner_war_aid_levies_cost_value > scope:petition_liege.major_gold_value - } - } -} - -petition_liege_likes_trigger = { - exists = $COMPARE$ - OR = { - has_relation_friend = $COMPARE$ - has_relation_best_friend = $COMPARE$ - has_relation_soulmate = $COMPARE$ - has_relation_lover = $COMPARE$ - is_close_family_of = $COMPARE$ - opinion = { - target = $COMPARE$ - value >= 50 - } - } -} - -petition_liege_dislikes_trigger = { - exists = $COMPARE$ - OR = { - has_relation_rival = $COMPARE$ - has_relation_nemesis = $COMPARE$ - opinion = { - target = $COMPARE$ - value <= -50 - } - } -} - -# Character is not already involved in the event e.g. claim target, incumbent councillor, etc. -petition_liege_skiller_trigger = { - is_available_adult = yes - - trigger_if = { - limit = { exists = scope:second_party } - this != scope:second_party - } - trigger_if = { - limit = { exists = scope:vassal_claimant } - this != scope:vassal_claimant - } - trigger_if = { - limit = { exists = scope:second_councillor } - this != scope:second_councillor - } - trigger_if = { - limit = { exists = scope:diplomacy_check } - this != scope:diplomacy_check - } - trigger_if = { - limit = { exists = scope:martial_check } - this != scope:martial_check - } - trigger_if = { - limit = { exists = scope:stewardship_check } - this != scope:stewardship_check - } - trigger_if = { - limit = { exists = scope:intrigue_check } - this != scope:intrigue_check - } - trigger_if = { - limit = { exists = scope:learning_check } - this != scope:learning_check - } - trigger_if = { - limit = { exists = scope:petition_vassal } - this != scope:petition_vassal - } -} - -# Has a councillor or spouse who is not involved in the event already -petition_liege_has_main_skiller_trigger = { - scope:petition_liege = { - OR = { - trigger_if = { - limit = { exists = cp:councillor_chancellor } - cp:councillor_chancellor = { petition_liege_skiller_trigger = yes } - } - trigger_else = { always = no } - - trigger_if = { - limit = { exists = cp:councillor_marshal } - cp:councillor_marshal = { petition_liege_skiller_trigger = yes } - } - trigger_else = { always = no } - - trigger_if = { - limit = { exists = cp:councillor_steward } - cp:councillor_steward = { petition_liege_skiller_trigger = yes } - } - trigger_else = { always = no } - - trigger_if = { - limit = { exists = cp:councillor_spymaster } - cp:councillor_spymaster = { petition_liege_skiller_trigger = yes } - } - trigger_else = { always = no } - - trigger_if = { - limit = { exists = cp:councillor_court_chaplain } - cp:councillor_court_chaplain = { petition_liege_skiller_trigger = yes } - } - trigger_else = { always = no } - - trigger_if = { - limit = { - is_married = yes - exists = primary_spouse - } - primary_spouse = { - is_playable_character = no - petition_liege_skiller_trigger = yes - exists = scope:petition_vassal - NOT = { has_any_scripted_relation = scope:petition_vassal } - } - } - trigger_else = { always = no } - } - } -} - -# Character can be a wildcard, due to their existing relationship with petitioner -petition_liege_wildcard_trigger = { - OR = { - has_relation_friend = scope:petition_vassal - has_relation_best_friend = scope:petition_vassal - has_relation_lover = scope:petition_vassal - has_relation_soulmate = scope:petition_vassal - opinion = { - target = scope:petition_vassal - value >= 50 - } - } -} - -# No more than 2 skill check options already exist -petition_liege_skillcheck_limit = { - calc_true_if = { - amount < 2 - exists = scope:diplomacy_check - exists = scope:martial_check - exists = scope:stewardship_check - exists = scope:intrigue_check - exists = scope:learning_check - } -} - -# Character is valid councillor and invalid wildcard -petition_liege_skiller_no_wildcard_trigger = { - petition_liege_skiller_trigger = yes - petition_liege_wildcard_trigger = no -} - -# Character has some way to be placated by liege -petition_liege_relation_favor_trigger = { - can_add_hook = { - type = favor_hook - target = scope:petition_liege - } - OR = { - has_relation_friend = scope:petition_liege - has_relation_best_friend = scope:petition_liege - has_relation_lover = scope:petition_liege - has_relation_soulmate = scope:petition_liege - } -} - -# For picking which council position to offer -petition_liege_councillor_replace_weight_trigger = { - AND = { - scope:petition_vassal = { has_variable = petition_liege_council_first } - scope:petition_vassal.var:petition_liege_council_first = flag:$JOB$ - OR = { - NOT = { has_councillor_for_skill = $SKILL$ } - AND = { - exists = scope:second_party - scope:petition_vassal.$SKILL$ > scope:second_party.$SKILL$ - } - } - } -} - -# Petition is still valid -petition_liege_valid_trigger = { - is_alive = yes - is_imprisoned = no - has_variable = petition_liege_scope - liege = var:petition_liege_scope - var:petition_liege_scope = { - is_imprisoned = no - has_royal_court = yes - } -} - -petition_ceremonial_liege_valid_trigger = { - is_alive = yes - is_imprisoned = no - has_variable = petition_ceremonial_liege_scope - var:petition_ceremonial_liege_scope.top_liege ?= root.top_liege # Same realm - var:petition_ceremonial_liege_scope != root.top_liege # Not true liege - var:petition_ceremonial_liege_scope = { - is_imprisoned = no - has_royal_court = yes - } -} - -adventurer_potential_destination_distance_check = { - #This is made to be used inside set_adventure_location_effect - it relies on the scope it is being run in being the adventurer - #Also expects $REGION$ - any_county_in_region = { - region = $REGION$ - trigger_if = { - limit = { - prev.adventure_inspiration_average_skill_value >= high_inspiration_skill - } - NOT = { - prev.location = { - geographical_region = $REGION$ - } - } #Highly skilled adventurers can travel anywhere - and will not pick the region they are already in - } - trigger_else_if = { - limit = { - prev.adventure_inspiration_average_skill_value >= medium_inspiration_skill - } - squared_distance = { - target = prev.location - value <= medium_adventure_max_length - } - } - trigger_else = { - #low_inspiration_skill - squared_distance = { - target = prev.location - value < short_adventure_max_length - } - } - } -} - -activity_invite_rule_trigger = { - is_available_quick = { - adult = yes - imprisoned = no - } - in_diplomatic_range = root -} - -considers_social_presence_a_gift_to_other_trigger = { - has_trait = improvident - OR = { - has_trait = gregarious - has_trait = arrogant - } -} - -not_hosting_a_murder_feast = { - trigger_if = { - limit = { - this = scope:host - scope:activity = { - has_activity_type = activity_feast - } - } - scope:activity = { - NOT = { - has_activity_option = { - category = special_type - option = feast_type_murder - } - } - } - } - trigger_else = { - always = yes - } -} - -factor_zero_if_entitled_to_freebie_activity_trigger = { - dynasty ?= { has_dynasty_perk = ep2_activities_legacy_5 } - this = house.house_head - NOT = { has_variable = ep2_activities_legacy_5_had_freebie } -} - -# to be run in activity scope -has_attending_activity_guests = { - # We have more than one attending character - # Host always attends so we ignore them - any_attending_character = { - count > 1 # 1 includes the host who always attends - } -} - -any_journey_point_of_interest_trigger = { - has_special_building = yes - NOR = { - has_building_or_higher = generic_university - has_building_or_higher = hall_of_heroes_01 - has_building_or_higher = special_sicilian_parliament_01 - has_building_or_higher = special_greenhouse_01 - has_building_or_higher = holy_site_cathedral_01 - has_building_or_higher = holy_site_mosque_01 - has_building_or_higher = holy_site_fire_temple_01 - has_building_or_higher = holy_site_pagan_grand_temple_01 - has_building_or_higher = holy_site_indian_grand_temple_01 - has_building_or_higher = holy_site_other_grand_temple_01 - has_building_or_higher = generic_copper_mines_01 - has_building_or_higher = generic_silver_mines_01 - has_building_or_higher = generic_gold_mines_01 - # TGP - has_building_or_higher = holy_site_buddhist_grand_temple_01 - has_building_or_higher = holy_site_japanese_temple_01 - has_building_or_higher = holy_site_chinese_temple_01 - has_building_or_higher = holy_site_se_asia_pagan_temple_01 - } -} - diff --git a/N3OW/common/scripted_triggers/00_adultery_triggers.txt b/N3OW/common/scripted_triggers/00_adultery_triggers.txt deleted file mode 100644 index 5d33490b..00000000 --- a/N3OW/common/scripted_triggers/00_adultery_triggers.txt +++ /dev/null @@ -1,129 +0,0 @@ -# This character is publicly known for cheating on the SPOUSE -exposed_cheating_on_spouse_trigger = { #Is a publicly known cheater against spouse - OR = { - reverse_has_opinion_modifier = { - modifier = unfaithful_spouse_exposed_opinion - target = $SPOUSE$ - } - AND = { - has_variable = std_from_unfaithfulness_against - var:std_from_unfaithfulness_against = $SPOUSE$ - } - } -} - -would_attempt_to_seduce_trigger = { - is_adult = yes - age <= 50 - # Already interested or not a relation - trigger_if = { - limit = { has_any_scripted_relation = $CHARACTER$ } - OR = { - has_relation_potential_lover = $CHARACTER$ - has_relation_crush = $CHARACTER$ - } - } - # Not married - NOT = { is_consort_of = $CHARACTER$ } - OR = { - # Pre-existing schemes - is_scheming_against = { - target = $CHARACTER$ - type = seduce - } - is_scheming_against = { - target = $CHARACTER$ - type = courting - } - AND = { - # Sexuality - is_attracted_to_gender_of = $CHARACTER$ - NOR = { - # Proactive - has_trait = chaste - # Undevoted - any_relation = { type = soulmate } - } - # Compatible or attractive - OR = { - trait_compatibility = { - target = $CHARACTER$ - value >= low_positive_trait_compatibility - } - $CHARACTER$.attraction >= medium_positive_attraction - } - } - } - # Flouts the laws of decency - would_attempt_to_seduce_incest_trigger = { CHARACTER = $CHARACTER$ } - # Flouts the sanctity of marriage - would_attempt_to_seduce_married_trigger = yes -} - -would_attempt_to_seduce_incest_trigger = { - trigger_if = { - limit = { - save_temporary_scope_as = potential_cheater - OR = { - # Checks for incest - relation_with_character_is_incestuous_in_faith_trigger = { - FAITH = scope:potential_cheater.faith - CHARACTER = $CHARACTER$ - } - # Check celibate clergy too since it's a similar overcoming of norms - AND = { - is_clergy = yes - faith = { has_doctrine = doctrine_clerical_marriage_allowed } - } - } - } - # Isn't god-fearing - NOT = { has_trait = zealous } - # Is randy - has_trait = lustful - # Takes what they want - ai_boldness >= medium_positive_ai_value - # Likes them - opinion = { - target = $CHARACTER$ - value >= 25 - } - # Big attraction or get on very well - OR = { - trait_compatibility = { - target = $CHARACTER$ - value >= medium_positive_trait_compatibility - } - $CHARACTER$.attraction >= medium_positive_attraction - } - } -} - -would_attempt_to_seduce_married_trigger = { - trigger_if = { - limit = { is_married = yes } - OR = { - # Adultery is accepted for their gender in their faith - AND = { - is_female = yes - faith = { has_doctrine_parameter = adultery_female_accepted } - } - AND = { - is_male = yes - faith = { has_doctrine_parameter = adultery_male_accepted } - } - NOR = { - # Isn't god-fearing - has_trait = zealous - save_temporary_scope_as = potential_cheater - # Isn't that fond of partner - opinion = { - target = scope:potential_cheater.primary_spouse - value >= 25 - } - # Isn't honorable - ai_honor >= low_positive_ai_value - } - } - } -} diff --git a/N3OW/common/scripted_triggers/00_ai_acceptance_triggers.txt b/N3OW/common/scripted_triggers/00_ai_acceptance_triggers.txt deleted file mode 100644 index ad9eb7e4..00000000 --- a/N3OW/common/scripted_triggers/00_ai_acceptance_triggers.txt +++ /dev/null @@ -1,19 +0,0 @@ - -###TRIGGER LIST -#ai_will_give_favor_trigger - -#CHAR1 is the character who will be giving the favor, CHAR2 is the character who will be receiving it(i.e., CHAR2 is the one that gets to call in the favor). -ai_will_give_favor_trigger = { - $CHAR1$ = { - NOR = { - has_relation_rival = $CHAR2$ - opinion = { - value <= -25 - target = $CHAR2$ - } - - is_scheming_against = { target = $CHAR2$ type = murder } - } - } -} - diff --git a/N3OW/common/scripted_triggers/00_ai_value_triggers.txt b/N3OW/common/scripted_triggers/00_ai_value_triggers.txt deleted file mode 100644 index d1bc4307..00000000 --- a/N3OW/common/scripted_triggers/00_ai_value_triggers.txt +++ /dev/null @@ -1,373 +0,0 @@ - -###TRIGGER LIST -#opposing_ai_values_trigger - Checks if one character has a positive value and another character has a negative value for the same ai value. - -#Needs TARGET and the name of the VALUE -opposing_ai_values_trigger = { - OR = { - AND = { - ai_$VALUE$ < 0 - $TARGET$ = { ai_$VALUE$ > 0 } - } - AND = { - ai_$VALUE$ > 0 - $TARGET$ = { ai_$VALUE$ < 0 } - } - } -} - -ai_has_builder_or_pious_builder_personality = { - ai_has_pious_builder_personality = yes - ai_has_economical_boom_personality = yes -} - -ai_has_pious_builder_personality = { - OR = { - AND = { - pious_ai_builder_trigger = yes - ai_has_warlike_personality = no - } - #Or our Devaraja decrees it - AND = { - OR = { - is_tributary = yes - is_independent_ruler = no - } - overlord ?= { has_realm_law_flag = subjects_appear_more_pious } - } - #Weight the AI according to their Aspect - house ?= { has_house_power_parameter = aspect_of_serenity } - } - NOR = { - has_variable = conqueror - #Weight the AI according to their Aspect - house ?= { - OR = { - has_house_power_parameter = aspect_of_creation - has_house_power_parameter = aspect_of_destruction - has_house_power_parameter = aspect_of_trickery - } - } - } -} - -ai_has_warlike_personality = { - OR = { - AND = { - has_trait = despoiler_of_byzantium - any_held_title = { - tier <= tier_empire - OR = { - empire = title:e_byzantium - empire = title:e_latin_empire - } - } - } - vassal_contract_has_flag = admin_ai_is_warlike # Admin vassals with the "Frontier" administration consider it their job to expand - house ?= { # The unity decision "Organize House Members for War" forces AI house members to adopt this stance - has_house_modifier = unity_house_organized_for_war_modifier - } - AND = { # They are Detractors during the FP3 Struggle in the Unrest Phase - any_character_struggle = { - trigger_if = { - limit = { is_struggle_type = persian_struggle } - is_struggle_phase = struggle_persia_phase_unrest - } - trigger_else = { always = no } - } - has_trait = fp3_struggle_detractor - } - AND = { # Nomads are not 'unpredictable', they are Warlike instead - government_has_flag = government_is_nomadic - ai_has_cautious_personality = no - economical_ai_guts_trigger = no - } - AND = { - ai_boldness > 0 - ai_greed >= 0 - - OR = { - has_trait = wrathful - has_trait = impatient - has_trait = sadistic - has_trait = ambitious - has_trait = vengeful - has_trait = zealous - has_trait = irritable - AND = { - ai_boldness >= 50 - ai_greed >= 50 - } - AND = { - ai_boldness >= 25 - ai_greed >= 100 - } - AND = { - ai_boldness >= 100 - ai_greed >= 25 - } - government_has_flag = government_is_tribal - culture = { has_cultural_pillar = ethos_bellicose } - } - - NOR = { - ai_compassion >= 75 - has_trait = compassionate - has_trait = craven - has_trait = calm - faith = { has_doctrine_parameter = pacifist_opinion_active } - culture = { has_cultural_parameter = reduced_cost_for_conversion_to_pacifist_faith } - house ?= { - has_house_modifier = unity_house_focused_on_economy_modifier - } - vassal_contract_has_flag = admin_ai_is_builder - } - } - # Or we're on the warpath. - has_variable = imperial_expedition_charged - #Or our Devaraja decrees it - AND = { - OR = { - is_tributary = yes - is_independent_ruler = no - } - overlord ?= { has_realm_law_flag = subjects_appear_more_warlike } - } - #Weight the AI according to their Aspect - house ?= { has_house_power_parameter = aspect_of_destruction } - } - NOR = { - has_variable = conqueror - #Weight the AI according to their Aspect - house ?= { - OR = { - has_house_power_parameter = aspect_of_creation - has_house_power_parameter = aspect_of_serenity - has_house_power_parameter = aspect_of_trickery - } - } - } -} - -ai_has_cautious_personality = { - ai_boldness <= 0 - - OR = { - has_trait = paranoid - has_trait = craven - AND = { - ai_boldness <= -25 - OR = { - has_trait = patient - has_trait = calm - has_trait = content - culture = { has_cultural_pillar = ethos_stoic } - culture = { has_cultural_tradition = tradition_stalwart_defenders } - } - } - } - NOR = { - has_trait = fickle - has_trait = lunatic - house ?= { - OR = { - has_house_modifier = unity_house_organized_for_war_modifier - has_house_modifier = unity_house_focused_on_economy_modifier - #Weight the AI according to their Aspect - has_house_power_parameter = aspect_of_creation - has_house_power_parameter = aspect_of_serenity - has_house_power_parameter = aspect_of_trickery - } - } - AND = { # They are Detractors during the FP3 Struggle in the Unrest Phase - any_character_struggle = { - is_struggle_type = persian_struggle - is_struggle_phase = struggle_persia_phase_unrest - } - has_trait = fp3_struggle_detractor - } - vassal_contract_has_flag = admin_ai_is_warlike - vassal_contract_has_flag = admin_ai_is_builder - has_variable = conqueror - } -} - -ai_has_economical_boom_personality = { - OR = { - # Admin vassals with the "Civilian" administration consider it their job to improve the economy - vassal_contract_has_flag = admin_ai_is_builder - # The unity decision "Encourage House to Improve the Economy" forces AI house members to adopt this stance - house ?= { - has_house_modifier = unity_house_focused_on_economy_modifier - } - AND = { - economical_ai_guts_trigger = yes - ai_has_warlike_personality = no - } - #Or our Devaraja decrees it - AND = { - OR = { - is_tributary = yes - is_independent_ruler = no - } - overlord ?= { has_realm_law_flag = subjects_appear_more_economical } - } - #Weight the AI according to their Aspect - house ?= { has_house_power_parameter = aspect_of_creation } - } - NOR = { - has_variable = conqueror - #Weight the AI according to their Aspect - house ?= { - OR = { - has_house_power_parameter = aspect_of_destruction - has_house_power_parameter = aspect_of_serenity - has_house_power_parameter = aspect_of_trickery - } - } - } -} - -pious_ai_builder_trigger = { - ai_zeal > 0 - ai_energy > 0 - OR = { - has_focus = learning_theology_focus # Only this focus, which is 33% of all learning focused characters in the world - has_trait = zealous - has_trait = forgiving - has_trait = improvident - has_trait = humble - has_trait = patient - has_trait = diligent - has_trait = generous - has_character_modifier = the_temple_builder_modifier - government_has_flag = government_is_mandala - } - num_virtuous_traits >= 1 - num_sinful_traits = 0 - NAND = { - has_trait = cynical - has_trait = greedy - house = { - has_house_modifier = unity_house_organized_for_war_modifier - } - } -} - -economical_ai_guts_trigger = { - ai_boldness > 0 - OR = { - has_focus = stewardship_domain_focus # Only this focus, which is 33% of all stewardship focused characters in the world - has_trait = calm - has_trait = patient - has_trait = diligent - has_trait = generous - has_trait = stubborn - has_trait = profligate - has_character_modifier = the_city_builder_modifier - has_character_modifier = the_castle_builder_modifier - } - NAND = { - has_trait = greedy - has_trait = impatient - house ?= { - has_house_modifier = unity_house_organized_for_war_modifier - } - } -} - -ai_wants_low_unity = { - government_has_flag = government_is_clan - # To actively decrease Unity, the AI needs the following personality - OR = { - AND = { - OR = { - has_trait_malicious_trigger = yes - has_trait_dominant_trigger = yes - } - has_trait_submissive_trigger = no - has_trait_benevolent_trigger = no - } - ai_has_warlike_personality = yes - has_variable = conqueror - has_character_flag = agenda_towards_escalation - } -} - -ai_wants_high_unity = { - government_has_flag = government_is_clan - # We'll make sure that the AI only wants to actively increase Unity if they have a matching personality - OR = { - AND = { - OR = { - has_trait_benevolent_trigger = yes - has_trait_submissive_trigger = yes - } - has_trait_malicious_trigger = no - } - ai_has_economical_boom_personality = yes - AND = { - NOT = { has_trait = fp3_struggle_detractor } - # House is the most recent Caliphs house - exists = struggle:persian_struggle - trigger_if = { - limit = { exists = title:d_sunni.holder } - house = title:d_sunni.holder.house - } - trigger_else = { house = title:d_sunni.previous_holder.house } - } - has_character_flag = agenda_towards_deescalation - } - - # And to make sure the AI doesn't want to increase and decrease Unity at the same time - ai_wants_low_unity = no -} - -ai_has_conqueror_personality = { - OR = { - has_trait = conqueror - has_trait = greatest_of_khans - has_character_modifier = the_great_khan_modifier - any_owned_story = { - type = story_conqueror - } - } -} - -ai_should_get_conqueror_bonuses = { - has_variable = conqueror - NOT = { has_game_rule = no_conquerors_bonuses } -} - -ai_should_get_extreme_conqueror_bonuses = { - has_variable = conqueror - has_character_modifier = ai_extreme_conqueror_modifier -} - -ai_should_focus_on_building_in_their_capital = { - is_landed = yes - highest_held_title_tier >= tier_county - NOT = { has_variable = conqueror } - NOT = { government_has_flag = government_is_nomadic } - exists = capital_county - exists = culture - OR = { - capital_county.title_province.free_building_slots > 0 - AND = { - culture = { has_innovation = innovation_ledger } - capital_county.title_province.combined_building_level <= 4 - } - AND = { - culture = { has_innovation = innovation_baliffs } - capital_county.title_province.combined_building_level <= 6 - } - AND = { - culture = { has_innovation = innovation_guilds } - capital_county.title_province.combined_building_level <= 9 - } - AND = { - culture = { has_innovation = innovation_cranes } - capital_county.title_province.combined_building_level <= 12 - } - } -} diff --git a/N3OW/common/scripted_triggers/00_artifact_triggers.txt b/N3OW/common/scripted_triggers/00_artifact_triggers.txt deleted file mode 100644 index cad4e647..00000000 --- a/N3OW/common/scripted_triggers/00_artifact_triggers.txt +++ /dev/null @@ -1,2322 +0,0 @@ - -# Artifact Script Triggers -artifact_value_trigger = { - trigger_if = { - limit = { - exists = $VALUE$ - } - $VALUE$ >= $MIN$ - $VALUE$ < $MAX$ - } - trigger_else_if = { - limit = { - $MIN$ < 50 - } - artifact_low_rarity_trigger = yes - } - trigger_else_if = { - limit = { - $MIN$ > 50 - $MAX$ < 70 - } - artifact_medium_rarity_trigger = yes - } - trigger_else = { - artifact_high_rarity_trigger = yes - } -} - -artifact_region_trigger = { - trigger_if = { - limit = { - any_in_list = { - list = artifact_material_sources - exists = this - } - } - any_in_list = { - list = artifact_material_sources - geographical_region = $REGION$ - } - } - trigger_else_if = { - limit = { - exists = $CHARACTER$ - } - $CHARACTER$ = { - trigger_if = { - limit = { - exists = capital_province - } - capital_province = { geographical_region = $REGION$ } - } - trigger_else_if = { - limit = { exists = location } - location = { geographical_region = $REGION$ } - } - trigger_else = { - #no location - } - } - } - trigger_else_if = { - limit = { exists = scope:artifact.artifact_owner } - scope:artifact.artifact_owner = { - trigger_if = { - limit = { - exists = capital_province - } - capital_province = { geographical_region = $REGION$ } - } - trigger_else_if = { - limit = { exists = location } - location = { geographical_region = $REGION$ } - } - trigger_else = { - #no location - } - } - } - trigger_else = { - trigger_if = { - limit = { - exists = capital_province - } - capital_province = { geographical_region = $REGION$ } - } - trigger_else_if = { - limit = { exists = location } - location = { geographical_region = $REGION$ } - } - trigger_else = { - #no location - } - } -} - -artifact_has_religious_decorations_trigger = { - OR = { - has_artifact_feature = decoration_pattern_war_god - has_artifact_feature = decoration_pattern_religion - has_artifact_feature = decoration_pattern_religious_symbol - has_artifact_feature = decoration_pattern_eschatology - has_artifact_feature = icon_decoration_pattern_saint - } -} - -artifact_has_pattern_trigger = { - artifact_needs_pattern_trigger = yes -} - -artifact_needs_pattern_trigger = { - # Check if one of our artifact features needs a pattern reference - OR = { - # Weapons - has_artifact_feature = blade_decoration_etched_pattern - has_artifact_feature = hilt_decoration_carved_pattern - has_artifact_feature = hilt_decoration_inlay_pattern - has_artifact_feature = head_decoration_etched_pattern - has_artifact_feature = shaft_decoration_painted_pattern - has_artifact_feature = metal_handle_decoration_etched_pattern - - # Armor - has_artifact_feature = armor_decoration_etched_pattern - has_artifact_feature = armor_decoration_inlay_pattern - has_artifact_feature = armor_decoration_painted_pattern - - # Furniture - has_artifact_feature = wood_decoration_painted_pattern - - # Box - has_artifact_feature = box_decoration_painted - has_artifact_feature = box_decoration_carved - - # Bowl - artifact_type = bowl - - # Plate - artifact_type = plate - } -} - -artifact_needs_material_inlay_trigger = { - # Check if one of our artifact features needs a material reference for inlay - OR = { - # Weapons - has_artifact_feature = hilt_decoration_inlay_pattern - has_artifact_feature = hilt_decoration_rounded_pommels - has_artifact_feature = hilt_decoration_twisting - has_artifact_feature = metal_handle_decoration_inlay - - # Armor - has_artifact_feature = armor_decoration_inlay_pattern - - # Box - has_artifact_feature = box_decoration_inlay - - # Alchemy - Elixir - has_artifact_feature = glass_decoration_inlay_pattern - } -} - -artifact_needs_material_wire_trigger = { - # Check if one of our artifact features needs a material reference for precious metal wire or other jewelery-like fastenings - OR = { - # Weapons - has_artifact_feature = hilt_decoration_wires - has_artifact_feature = hilt_decoration_filigree - has_artifact_feature = hilt_decoration_circles - - # Armor - has_artifact_feature = armor_decoration_lining - has_artifact_feature = armor_decoration_embossed - has_artifact_feature = armor_decoration_grouped_rivets - - # Ring - has_artifact_feature = ring_centerpiece_signet - has_artifact_feature = ring_centerpiece_religious - has_artifact_feature = ring_adornment_runes - - # Necklace - artifact_type = necklace - artifact_type = necklace_pedestal - } -} - -artifact_needs_material_cloth_trigger = { - # Check if one of our artifact features needs a material reference for cloth lining - OR = { - # Armor - has_artifact_feature = armor_helmet_nasal - has_artifact_feature = armor_helmet_enclosed - has_artifact_feature = armor_helmet_great_helmet - has_artifact_feature = armor_helmet_cervelliere - } -} - -artifact_needs_material_gem_trigger = { - OR = { - has_artifact_feature = crown_decoration_gems - has_artifact_feature = crown_decoration_filigree_and_gem - has_artifact_feature = brooch_centerpiece_cabochon - has_artifact_feature = brooch_adornment_gems - has_artifact_feature = ring_centerpiece_cabochon - has_artifact_feature = ring_adornment_gems - has_artifact_feature = book_decoration_gems - has_artifact_feature = book_decoration_gems_and_clasp - - artifact_type = necklace - artifact_type = necklace_pedestal - } -} - -artifact_needs_material_hsb_trigger = { - OR = { - has_artifact_feature = wood_decoration_hsb_inlay - has_artifact_feature = shaft_decoration_inlay - } -} - -artifact_needs_material_wood_trigger = { - has_artifact_feature = book_cover_material_wood -} - - -############################ -# Artifact Visual Triggers # -############################ - -# UnitGFX-based triggers -artifact_use_african_unit_visuals_trigger = { - culture ?= { has_unit_gfx = sub_sahran_unit_gfx } -} - -artifact_use_eastern_unit_visuals_trigger = { - culture = { has_unit_gfx = eastern_unit_gfx } -} - -artifact_use_indian_unit_visuals_trigger = { - culture = { has_unit_gfx = indian_unit_gfx } -} - -artifact_use_mena_unit_visuals_trigger = { - culture = { - OR = { - has_unit_gfx = mena_unit_gfx - has_unit_gfx = iberian_muslim_unit_gfx - } - } -} - -artifact_use_northern_unit_visuals_trigger = { - culture ?= { - OR = { - has_unit_gfx = norse_unit_gfx - has_unit_gfx = northern_unit_gfx - } - } -} - -artifact_use_mongol_unit_visuals_trigger = { - culture ?= { has_unit_gfx = mongol_unit_gfx } -} - -artifact_use_western_unit_visuals_trigger = { - culture ?= { - OR = { - has_unit_gfx = western_unit_gfx - has_unit_gfx = eastern_unit_gfx - has_unit_gfx = iberian_christian_unit_gfx - } - } -} - -artifact_use_chinese_unit_visuals_trigger = { - culture ?= { has_unit_gfx = chinese_unit_gfx } -} - -artifact_use_japanese_unit_visuals_trigger = { - culture ?= { has_unit_gfx = japanese_unit_gfx } -} - -artifact_use_southeast_asian_unit_visuals_trigger = { - culture ?= { has_unit_gfx = southeast_asian_unit_gfx } -} - -artifact_use_iberian_muslim_unit_visuals_trigger = { - culture ?= { has_unit_gfx = iberian_muslim_unit_gfx } -} - -artifact_use_iberian_christian_unit_visuals_trigger = { - culture ?= { has_unit_gfx = iberian_christian_unit_gfx } -} - -artifact_use_iranian_unit_visuals_trigger = { - culture ?= { has_unit_gfx = iranian_unit_gfx } -} - -# BuildingGFX-based triggers -artifacts_use_indian_books_trigger = { - OR = { - artifact_use_indian_building_visuals_trigger = yes - artifact_use_chinese_building_visuals_trigger = yes - artifact_use_japanese_building_visuals_trigger = yes - artifact_use_southeast_asian_building_visuals_trigger = yes - } -} - -artifact_use_indian_building_visuals_trigger = { - culture ?= { - OR = { - has_building_gfx = indian_building_gfx - has_building_gfx = southeast_asian_building_gfx - } - } -} - -artifact_use_mena_building_visuals_trigger = { - culture ?= { has_building_gfx = mena_building_gfx } -} - -artifact_use_mediterranean_building_visuals_trigger = { - culture ?= { - OR = { - has_building_gfx = mediterranean_building_gfx - has_building_gfx = byzantine_building_gfx - } - } -} - -artifact_use_byzantine_building_visuals_trigger = { - culture ?= { has_building_gfx = byzantine_building_gfx } -} - -artifact_use_iberian_building_visuals_trigger = { - culture ?= { has_building_gfx = iberian_building_gfx } -} - -artifact_use_western_building_visuals_trigger = { - culture ?= { has_building_gfx = western_building_gfx } -} - -artifact_use_norse_building_visuals_trigger = { - culture ?= { has_building_gfx = norse_building_gfx } -} - -artifact_use_steppe_building_visuals_trigger = { - culture ?= { has_building_gfx = steppe_building_gfx } -} - -artifact_use_iranian_building_visuals_trigger = { - culture ?= { has_building_gfx = iranian_building_gfx } -} - -artifact_use_berber_building_visuals_trigger = { - culture ?= { has_building_gfx = berber_group_building_gfx } -} - -artifact_use_chinese_building_visuals_trigger = { - culture ?= { has_building_gfx = chinese_building_gfx } -} - -artifact_use_japanese_building_visuals_trigger = { - culture ?= { has_building_gfx = japanese_building_gfx } -} - -artifact_use_southeast_asian_building_visuals_trigger = { - culture ?= { has_building_gfx = southeast_asian_building_gfx } -} - -artifact_use_korean_clothing_visuals_trigger = { - culture ?= { has_clothing_gfx = korean_clothing_gfx } -} - -# GFX Trigger-picker - -artifact_should_use_gfx_type_trigger = { - trigger_if = { - limit = { exists = scope:artifact.creator.culture } - scope:artifact.creator = { artifact_use_$TYPE$_visuals_trigger = yes } - } - trigger_else_if = { #If the creator is not found we use the owner. Often this would be if the creator is a dummy, which has no culture - limit = { exists = culture } - artifact_use_$TYPE$_visuals_trigger = yes - } - trigger_else = { - always = no #We should never get here as all created artifacts should have an owner. - } -} - -artifact_low_rarity_trigger = { - scope:artifact ?= { - OR = { - rarity = masterwork - rarity = common - } - } -} - -artifact_medium_rarity_trigger = { - scope:artifact ?= { - OR = { - rarity = masterwork - rarity = famed - } - } -} - -artifact_high_rarity_trigger = { - scope:artifact ?= { - OR = { - rarity = famed - rarity = illustrious - } - } -} - -artifact_low_wealth_trigger = { - OR = { - NOT = { exists = scope:wealth } - trigger_if = { - limit = { exists = scope:wealth } - scope:wealth < low_high_wealth_cutoff - } - } -} - -artifact_high_wealth_trigger = { - exists = scope:wealth - scope:wealth >= low_high_wealth_cutoff -} - -portrait_should_wield_axe_trigger = { - trigger_if = { - limit = { - any_equipped_character_artifact = { artifact_slot_type = primary_armament } - NOT = { has_variable = temporary_signature_weapon } - } - any_equipped_character_artifact = { artifact_type = axe } - } - trigger_else = { - has_variable = signature_weapon - var:signature_weapon = flag:axe - } -} -portrait_should_wield_hammer_trigger = { - trigger_if = { - limit = { - any_equipped_character_artifact = { artifact_slot_type = primary_armament } - NOT = { has_variable = temporary_signature_weapon } - } - any_equipped_character_artifact = { artifact_type = hammer } - } - trigger_else = { - has_variable = signature_weapon - var:signature_weapon = flag:hammer - } -} -portrait_should_wield_mace_trigger = { - trigger_if = { - limit = { - any_equipped_character_artifact = { artifact_slot_type = primary_armament } - NOT = { has_variable = temporary_signature_weapon } - } - any_equipped_character_artifact = { artifact_type = mace } - } - trigger_else = { - has_variable = signature_weapon - var:signature_weapon = flag:mace - } -} -portrait_should_wield_spear_trigger = { - trigger_if = { - limit = { - any_equipped_character_artifact = { artifact_slot_type = primary_armament } - NOT = { has_variable = temporary_signature_weapon } - } - any_equipped_character_artifact = { artifact_type = spear } - } - trigger_else = { - has_variable = signature_weapon - var:signature_weapon = flag:spear - } -} -portrait_should_wield_dagger_trigger = { - trigger_if = { - limit = { - any_equipped_character_artifact = { artifact_slot_type = primary_armament } - NOT = { has_variable = temporary_signature_weapon } - } - any_equipped_character_artifact = { artifact_type = dagger } - } - trigger_else = { - has_variable = signature_weapon - var:signature_weapon = flag:dagger - } -} -portrait_should_wield_sword_trigger = { - trigger_if = { - limit = { - any_equipped_character_artifact = { artifact_slot_type = primary_armament } - NOT = { has_variable = temporary_signature_weapon } - } - any_equipped_character_artifact = { artifact_type = sword } - } - trigger_else = { - has_variable = signature_weapon - var:signature_weapon = flag:sword - } -} -portrait_should_wield_wooden_sword_trigger = { - has_variable = signature_weapon - var:signature_weapon = flag:wooden_sword -} -# # -################################## -### Artifact Material Triggers ### -################################## -# # - -########################################## -# Woods - Trees and Lumber -# Determines where various trees grow and, as a result, where products made from them is likely to be found -########################################## - -# Found (Almost) Everywhere: -# ash -artifact_feature_wood_ash_trigger = { - exists = scope:wealth - scope:wealth < 50 - scope:wealth >= 0 - NOT = { artifact_region_trigger = { CHARACTER = scope:owner REGION = material_woods_subsaharan } } -} - -# oak -artifact_feature_wood_oak_trigger = { - always = yes #There must always be an available wood type -} - - -# Widespread Regional Woods - Europe/MENA: -# pine -artifact_feature_wood_pine_trigger = { - trigger_if = { - limit = { exists = scope:wealth } - artifact_value_trigger = { VALUE = scope:wealth MIN = 0 MAX = 50 } - } - trigger_else = { - always = yes - } - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_woods_pine_and_fir } -} - -# fir -artifact_feature_wood_fir_trigger = { - exists = scope:wealth - artifact_value_trigger = { VALUE = scope:wealth MIN = 10 MAX = 60 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_woods_pine_and_fir } -} - -# elm -artifact_feature_wood_elm_trigger = { - exists = scope:wealth - artifact_value_trigger = { VALUE = scope:wealth MIN = 10 MAX = 70 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_wood_elm } -} - -# walnut -artifact_feature_wood_walnut_trigger = { - exists = scope:wealth - artifact_value_trigger = { VALUE = scope:wealth MIN = 40 MAX = 999 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_wood_walnut } -} - -# maple -artifact_feature_wood_maple_trigger = { - exists = scope:wealth - artifact_value_trigger = { VALUE = scope:wealth MIN = 40 MAX = 999 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_wood_maple } -} - - -# Widespread Regional Woods - Subsaharan Africa -# fleroya -artifact_feature_wood_fleroya_trigger = { - trigger_if = { - limit = { - exists = scope:wealth - } - artifact_value_trigger = { VALUE = scope:wealth MIN = 0 MAX = 50 } - } - trigger_else = { - always = yes - } - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_woods_subsaharan } -} - -# sycomore -artifact_feature_wood_sycomore_trigger = { - exists = scope:wealth - artifact_value_trigger = { VALUE = scope:wealth MIN = 30 MAX = 80 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_woods_subsaharan } -} - -# padauk -artifact_feature_wood_padauk_trigger = { - exists = scope:wealth - artifact_value_trigger = { VALUE = scope:wealth MIN = 60 MAX = 999 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_woods_padauk } -} - - -# Widespread Regional Woods - India -# sal -artifact_feature_wood_sal_trigger = { - exists = scope:wealth - artifact_value_trigger = { VALUE = scope:wealth MIN = 20 MAX = 60 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_woods_india } -} - -# rosewood -artifact_feature_wood_rosewood_trigger = { - exists = scope:wealth - artifact_value_trigger = { VALUE = scope:wealth MIN = 50 MAX = 999 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_woods_india_burma } -} - -# satinwood -artifact_feature_wood_satinwood_trigger = { - exists = scope:wealth - artifact_value_trigger = { VALUE = scope:wealth MIN = 60 MAX = 999 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_woods_india_burma } -} - -# teak -artifact_feature_wood_teak_trigger = { - exists = scope:wealth - artifact_value_trigger = { VALUE = scope:wealth MIN = 70 MAX = 999 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_woods_india_burma } -} - -# Local Regional Woods -# yew -artifact_feature_wood_yew_trigger = { - exists = scope:wealth - artifact_value_trigger = { VALUE = scope:wealth MIN = 30 MAX = 70 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_woods_yew } -} - -# olivewood -artifact_feature_wood_olivewood_trigger = { - exists = scope:wealth - artifact_value_trigger = { VALUE = scope:wealth MIN = 45 MAX = 85 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_woods_mediterranean } -} - -# coromandel -artifact_feature_wood_coromandel_trigger = { - exists = scope:wealth - artifact_value_trigger = { VALUE = scope:wealth MIN = 70 MAX = 999 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_woods_sri_lanka } -} - -# ebony -artifact_feature_wood_ebony_trigger = { - exists = scope:wealth - artifact_value_trigger = { VALUE = scope:wealth MIN = 70 MAX = 999 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_woods_ebony } -} - -# bamboo -artifact_feature_wood_bamboo_trigger = { - artifact_value_trigger = { VALUE = scope:wealth MIN = 10 MAX = 90 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_woods_bamboo } -} - -# cherry -artifact_feature_wood_cherry_trigger = { - always = yes #There must always be an available wood type -} - -# dogwood -artifact_feature_wood_dogwood_trigger = { - artifact_value_trigger = { VALUE = scope:wealth MIN = 10 MAX = 90 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_woods_dogwood } -} - -# hazel -artifact_feature_wood_hazel_trigger = { - artifact_value_trigger = { VALUE = scope:wealth MIN = 10 MAX = 90 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_woods_hazel } -} - -# hickory -artifact_feature_wood_hickory_trigger = { - artifact_value_trigger = { VALUE = scope:wealth MIN = 10 MAX = 90 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_woods_hickory } -} - -# mulberry -artifact_feature_wood_mulberry_trigger = { - artifact_value_trigger = { VALUE = scope:wealth MIN = 10 MAX = 90 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_woods_mulberry } -} - -# palm -artifact_feature_wood_palm_trigger = { - artifact_value_trigger = { VALUE = scope:wealth MIN = 10 MAX = 90 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_woods_palm } -} - -# East Asia -# nanmu -artifact_feature_wood_nanmu_trigger = { - artifact_value_trigger = { VALUE = scope:wealth MIN = 10 MAX = 90 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_woods_asia_east } -} - -# boxwood -artifact_feature_wood_boxwood_trigger = { - artifact_value_trigger = { VALUE = scope:wealth MIN = 10 MAX = 90 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_woods_asia_east } -} - -# paulownia -artifact_feature_wood_paulownia_trigger = { - artifact_value_trigger = { VALUE = scope:wealth MIN = 10 MAX = 90 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_woods_asia_east } -} - -# camphorwood -artifact_feature_wood_camphorwood_trigger = { - artifact_value_trigger = { VALUE = scope:wealth MIN = 10 MAX = 90 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_woods_asia_east } -} - -# Southeast Asia -# narra -artifact_feature_wood_narra_trigger = { - artifact_value_trigger = { VALUE = scope:wealth MIN = 10 MAX = 90 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_woods_asia_southeast } -} - -# toona sureni -artifact_feature_wood_toona_sureni_trigger = { - artifact_value_trigger = { VALUE = scope:wealth MIN = 10 MAX = 90 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_woods_asia_southeast } -} - -# agarwood -artifact_feature_wood_agarwood_trigger = { - artifact_value_trigger = { VALUE = scope:wealth MIN = 10 MAX = 90 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_woods_asia_southeast } -} - -# sandalwood -artifact_feature_wood_sandalwood_trigger = { - artifact_value_trigger = { VALUE = scope:wealth MIN = 10 MAX = 90 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_woods_asia_southeast } -} - -# Northeast Asia -# birch -artifact_feature_wood_birch_trigger = { - artifact_value_trigger = { VALUE = scope:wealth MIN = 10 MAX = 90 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_woods_asia_northeast } -} - -# linden -artifact_feature_wood_linden_trigger = { - artifact_value_trigger = { VALUE = scope:wealth MIN = 10 MAX = 90 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_woods_asia_northeast } -} - -########################################## -# Cloths -# Woven materials for clothing, tapestries, embroidery, ropes, etc. -########################################## - -# Wool -# - Found literally everywhere -# wool -artifact_feature_cloth_wool_trigger = { - trigger_if = { - limit = { exists = scope:wealth } - artifact_value_trigger = { VALUE = scope:wealth MIN = 0 MAX = 60 } - } - trigger_else = { - always = yes - } -} - -# lambswool -artifact_feature_cloth_lambswool_trigger = { - exists = scope:wealth - artifact_value_trigger = { VALUE = scope:wealth MIN = 60 MAX = 999 } -} - - -# Silk -# - Found pretty much everywhere but subsaharan Africa. -# silk -artifact_feature_cloth_silk_trigger = { - exists = scope:wealth - artifact_value_trigger = { VALUE = scope:wealth MIN = 40 MAX = 70 } - NOT = { artifact_region_trigger = { CHARACTER = scope:owner REGION = material_cloth_no_silk } } -} - -# satin -artifact_feature_cloth_satin_trigger = { - exists = scope:wealth - artifact_value_trigger = { VALUE = scope:wealth MIN = 50 MAX = 80 } - NOT = { artifact_region_trigger = { CHARACTER = scope:owner REGION = material_cloth_no_silk } } -} - -# velvet -artifact_feature_cloth_velvet_trigger = { - exists = scope:wealth - artifact_value_trigger = { VALUE = scope:wealth MIN = 60 MAX = 90 } - NOT = { artifact_region_trigger = { CHARACTER = scope:owner REGION = material_cloth_no_silk } } -} - -# samite -artifact_feature_cloth_samite_trigger = { - exists = scope:wealth - artifact_value_trigger = { VALUE = scope:wealth MIN = 70 MAX = 999 } - NOT = { artifact_region_trigger = { CHARACTER = scope:owner REGION = material_cloth_no_silk } } -} - - -# Linen -# - Modern Germany was a major producer of linen, which was exported throughout all of Europe (but not really beyond that) -# linen -artifact_feature_cloth_linen_trigger = { - trigger_if = { - limit = { exists = scope:wealth } - artifact_value_trigger = { VALUE = scope:wealth MIN = 0 MAX = 60 } - } - trigger_else = { - always = yes - } - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_cloth_linen } -} - -# fustian -artifact_feature_cloth_fustian_trigger = { - exists = scope:wealth - artifact_value_trigger = { VALUE = scope:wealth MIN = 40 MAX = 70 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_cloth_linen } - NOT = { scope:owner.religion = religion:judaism_religion } -} - - -# Cotton -# - Cotton has been grown in Egypt since ancient times, spread to Etheopia early on and then in the late medieval period to Europe and India. -# cotton -artifact_feature_cloth_cotton_trigger = { - trigger_if = { - limit = { exists = scope:wealth } - artifact_value_trigger = { VALUE = scope:wealth MIN = 10 MAX = 70 } - } - trigger_else = { - always = yes - } - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_cloth_cotton } -} - - -# British Isles -# worsted_wool -artifact_feature_cloth_worsted_wool_trigger = { - exists = scope:wealth - artifact_value_trigger = { VALUE = scope:wealth MIN = 60 MAX = 999 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_cloth_cotton } - current_date >= 1200.1.1 -} - - -########################################## -# HSB = Horn, Shell, Bone. -# Basically animal-based materials that have a wide array of applications — especially for carving, inlay, or other decorations. -########################################## - -# Common. All regions should have access to at least one of these. -# hsb_camel_bone -artifact_feature_hsb_camel_bone_trigger = { - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_hsb_camel_bone } -} - -# hsb_deer_antler -artifact_feature_hsb_deer_antler_trigger = { - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_hsb_deer_antler } -} - -# hsb_boar_tusk -artifact_feature_hsb_boar_tusk_trigger = { - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_hsb_boar_tusk } -} - -# hsb_seashell -artifact_feature_hsb_seashell_trigger = { - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_hsb_seashell } -} - - -# Rare, Expensive, or Region-Specifc. Not all regions will have access to these. -# hsb_tortoiseshell -artifact_feature_hsb_tortoiseshell_trigger = { - AND = { - exists = scope:wealth - artifact_value_trigger = { VALUE = scope:wealth MIN = 50 MAX = 999 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_hsb_tortoiseshell } - } -} - -# hsb_mother_of_pearl -artifact_feature_hsb_mother_of_pearl_trigger = { - AND = { - exists = scope:wealth - artifact_value_trigger = { VALUE = scope:wealth MIN = 50 MAX = 999 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_hsb_mother_of_pearl } - } -} - -# hsb_ivory -artifact_feature_hsb_ivory_native_trigger = { - AND = { - exists = scope:wealth - artifact_value_trigger = { VALUE = scope:wealth MIN = 50 MAX = 999 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_hsb_ivory_native } - } -} - -# hsb_ivory -artifact_feature_hsb_ivory_imported_trigger = { - AND = { - exists = scope:wealth - artifact_value_trigger = { VALUE = scope:wealth MIN = 80 MAX = 999 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_hsb_ivory_imported } - } -} - -# hsb_bison_horn -artifact_feature_hsb_bison_horn_trigger = { - artifact_value_trigger = { VALUE = scope:wealth MIN = 10 MAX = 90 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = hunt_animal_bison_region } -} - -# hsb_antelope_horn -artifact_feature_hsb_antelope_horn_trigger = { - artifact_value_trigger = { VALUE = scope:wealth MIN = 10 MAX = 90 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = hunt_animal_antelope_region } -} - -########################################## -# Animal type -# Basically an animal used in an artifact, for example as a wall ornament or hide -########################################## - -# boar -artifact_feature_animal_boar_trigger = { - trigger_if = { - limit = { exists = scope:location } - title_province = { - NOT = { - terrain = desert - terrain = desert_mountains - } - } - } -} - -# lion -artifact_feature_animal_lion_trigger = { - trigger_if = { - limit = { exists = scope:location } - scope:location = { - OR = { - terrain = forest - terrain = jungle - terrain = desert - terrain = oasis - terrain = desert_mountains - } - NOT = { geographical_region = world_europe } - } - } -} - -# tiger -artifact_feature_animal_tiger_trigger = { - trigger_if = { - limit = { exists = scope:location } - scope:location = { - terrain = jungle - geographical_region = world_india - } - } -} - -# bear -artifact_feature_animal_bear_trigger = { - trigger_if = { - limit = { exists = scope:location } - scope:location = { geographical_region = hunt_animal_bear_region } - } -} - -# aurochs -artifact_feature_animal_aurochs_trigger = { - trigger_if = { - limit = { exists = scope:location } - scope:location = { - NOR = { - geographical_region = world_africa - geographical_region = world_india - } - } - } -} - -#lynx -artifact_feature_animal_lynx_trigger = { - trigger_if = { - limit = { exists = scope:location } - scope:location = { - terrain = forest - geographical_region = world_europe - } - } -} - -# leopard -artifact_feature_animal_leopard_trigger = { - trigger_if = { - limit = { exists = scope:location } - scope:location = { hunt_animal_leopard_trigger = yes } - } -} - -########################################## -# Patterns -# Any kind of decorative pattern which can be engraved/painted/drawn on something. -########################################## - -# wolf -artifact_feature_pattern_wolf_trigger = { - trigger_if = { - limit = { - exists = scope:newly_created_artifact - scope:newly_created_artifact = { artifact_type = book } - } - scope:newly_created_artifact = { - OR = { - has_artifact_feature = book_subject_hunter - has_artifact_feature = book_subject_cannibal - has_artifact_feature = book_subject_mystical_animal - has_artifact_feature = book_subject_animals - has_artifact_feature = book_subject_martial - has_artifact_feature = book_subject_intrigue - } - } - } - scope:owner = { - faith = { - NOR = { - has_doctrine = tenet_aniconism - religion = religion:islam_religion - } - } - } -} - -# animals -artifact_feature_pattern_animals_trigger = { - scope:owner = { - faith = { - NOR = { - has_doctrine = tenet_aniconism - religion = religion:islam_religion - } - } - } -} - -# local_animal -artifact_feature_pattern_local_animal_trigger = { - scope:owner = { - faith = { - NOR = { - has_doctrine = tenet_aniconism - religion = religion:islam_religion - } - } - } -} - -# beasts -artifact_feature_pattern_beasts_trigger = { - scope:owner = { - faith = { - NOR = { - has_doctrine = tenet_aniconism - religion = religion:islam_religion - } - } - } -} - -# bird -artifact_feature_pattern_bird_trigger = { - scope:owner = { - faith = { - NOR = { - has_doctrine = tenet_aniconism - religion = religion:islam_religion - } - } - } -} - -# war_god -artifact_feature_pattern_war_god_trigger = { - trigger_if = { - limit = { - exists = scope:newly_created_artifact - scope:newly_created_artifact = { artifact_type = book } - } - scope:newly_created_artifact = { - OR = { - has_artifact_feature = book_subject_martial - has_artifact_feature = book_subject_blademaster - has_artifact_feature = book_subject_hunter - has_artifact_feature = book_subject_mystical_animal - } - } - } - scope:owner = { - faith = { - NOR = { - has_doctrine = tenet_aniconism - has_doctrine = tenet_pacifism - } - } - } -} - -# religion -artifact_feature_pattern_religion_trigger = { - trigger_if = { - limit = { - exists = scope:newly_created_artifact - scope:newly_created_artifact = { artifact_type = book } - } - scope:newly_created_artifact = { has_artifact_feature = book_subject_learning } - } - scope:owner = { - faith = { - NOR = { - has_doctrine = tenet_aniconism - religion = religion:islam_religion - } - } - } -} -# eschatology -artifact_feature_pattern_eschatology_trigger = { - trigger_if = { - limit = { - exists = scope:newly_created_artifact - scope:newly_created_artifact = { artifact_type = book } - } - scope:newly_created_artifact = { - OR = { - has_artifact_feature = book_subject_learning - has_artifact_feature = book_subject_mystic - } - } - } - scope:owner = { - faith = { - NOR = { - has_doctrine = tenet_aniconism - religion = religion:islam_religion - } - } - } -} -# pattern_religious_symbol -artifact_feature_pattern_religious_symbol_trigger = { - trigger_if = { - limit = { - exists = scope:newly_created_artifact - scope:newly_created_artifact = { artifact_type = book } - } - scope:newly_created_artifact = { - OR = { - has_artifact_feature = book_subject_learning - has_artifact_feature = book_subject_mystic - } - } - } - scope:owner = { - faith = { - NOR = { - has_doctrine = tenet_aniconism - religion = religion:islam_religion - } - } - } -} -# gibberish -artifact_feature_pattern_gibberish_trigger = { - trigger_if = { - limit = { - exists = scope:newly_created_artifact - scope:newly_created_artifact = { artifact_type = book } - } - scope:newly_created_artifact = { - OR = { - has_artifact_feature = book_subject_witch - has_artifact_feature = book_subject_mystic - has_artifact_feature = book_subject_lunatic - has_artifact_feature = book_subject_childhood - } - } - } - scope:owner = { - OR = { - has_trait = lifestyle_mystic - has_trait = paranoid - has_trait = lunatic - has_trait = witch - } - } -} -# pattern_culture_symbol -artifact_feature_pattern_culture_symbol_trigger = { - trigger_if = { - limit = { - exists = scope:newly_created_artifact - scope:newly_created_artifact = { artifact_type = book } - } - scope:newly_created_artifact = { - OR = { - has_artifact_feature = book_subject_empire - has_artifact_feature = book_subject_kingdom - has_artifact_feature = book_subject_dynasty - has_artifact_feature = book_subject_stewardship - } - } - } - scope:owner = { - has_royal_court = yes - has_dlc_feature = royal_court - court_grandeur_current_level > 1 - } -} - -# pattern_culture_style -artifact_feature_pattern_culture_style_trigger = { - trigger_if = { - limit = { - exists = scope:newly_created_artifact - scope:newly_created_artifact = { artifact_type = book } - } - scope:newly_created_artifact = { - OR = { - has_artifact_feature = book_subject_empire - has_artifact_feature = book_subject_kingdom - has_artifact_feature = book_subject_dynasty - has_artifact_feature = book_subject_stewardship - } - } - } - scope:owner = { - has_royal_court = yes - has_dlc_feature = royal_court - court_grandeur_current_level > 1 - } -} - -# pattern_dynasty_shield -artifact_feature_pattern_dynasty_shield_trigger = { - trigger_if = { - limit = { - exists = scope:newly_created_artifact - scope:newly_created_artifact = { artifact_type = book } - } - scope:newly_created_artifact = { - OR = { - has_artifact_feature = book_subject_empire - has_artifact_feature = book_subject_kingdom - has_artifact_feature = book_subject_dynasty - has_artifact_feature = book_subject_stewardship - has_artifact_feature = book_subject_diplomacy - } - } - } - exists = scope:owner.dynasty - scope:owner.dynasty = { dynasty_prestige_level > medium_dynasty_prestige_level } -} - -# pattern_dynasty_motifs -artifact_feature_pattern_dynasty_motifs_trigger = { - trigger_if = { - limit = { - exists = scope:newly_created_artifact - scope:newly_created_artifact = { artifact_type = book } - } - scope:newly_created_artifact = { - OR = { - has_artifact_feature = book_subject_empire - has_artifact_feature = book_subject_kingdom - has_artifact_feature = book_subject_dynasty - has_artifact_feature = book_subject_stewardship - has_artifact_feature = book_subject_diplomacy - } - } - } - exists = scope:owner.dynasty - scope:owner.dynasty = { dynasty_prestige_level > medium_dynasty_prestige_level } -} - -# roses -artifact_feature_pattern_roses_trigger = { - always = yes -} - -# floral -artifact_feature_pattern_floral_trigger = { - always = yes -} - -# geometric -artifact_feature_pattern_geometric_trigger = { - always = yes -} - -# quotes -artifact_feature_pattern_quotes_trigger = { - trigger_if = { - limit = { exists = scope:newly_created_artifact } - NOT = { scope:newly_created_artifact = { artifact_type = book } } - } - always = yes -} - -# knots -artifact_feature_pattern_knots_trigger = { - always = yes -} - -# bodies -artifact_feature_pattern_bodies_trigger = { - trigger_if = { - limit = { exists = scope:newly_created_artifact } - scope:newly_created_artifact = { - artifact_type = book - OR = { - has_artifact_feature = book_subject_cannibal - has_artifact_feature = book_subject_deviant - has_artifact_feature = book_subject_intrigue - } - } - } -} - -########################################## -# Metals -# Any mettalic resources used for either functional or decorative purposes. -########################################## - -# Weapon Materials -# wrought_iron -artifact_feature_metal_wrought_iron_trigger = { - always = yes -} - -# folded_iron -artifact_feature_metal_folded_iron_trigger = { - exists = scope:quality - artifact_value_trigger = { VALUE = scope:quality MIN = 50 MAX = 999 } -} - - -# wootz_steel -artifact_feature_metal_wootz_steel_trigger = { - exists = scope:wealth - exists = scope:owner - artifact_value_trigger = { VALUE = scope:wealth MIN = 80 MAX = 999 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_metal_wootz } -} - -# damascus_steel -artifact_feature_metal_damascus_steel_trigger = { - exists = scope:wealth - exists = scope:owner - artifact_value_trigger = { VALUE = scope:wealth MIN = 80 MAX = 999 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_metal_damascus } -} - -# bulat_steel -artifact_feature_metal_bulat_steel_trigger = { - exists = scope:wealth - exists = scope:owner - artifact_value_trigger = { VALUE = scope:wealth MIN = 80 MAX = 999 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = material_metal_bulat } -} - -# Decorative Materials -# gold -artifact_feature_metal_gold_trigger = { - exists = scope:wealth - scope:wealth >= 60 -} - -# electrum -artifact_feature_metal_electrum_trigger = { - exists = scope:wealth - scope:wealth < 80 - scope:wealth >= 40 -} - -# silver -artifact_feature_metal_silver_trigger = { - exists = scope:wealth - scope:wealth < 60 - scope:wealth >= 20 -} - -# niello -artifact_feature_metal_niello_trigger = { - exists = scope:wealth - scope:wealth < 70 - scope:wealth >= 30 -} - -# brass -artifact_feature_metal_brass_trigger = { - trigger_if = { - limit = { exists = scope:wealth } - scope:wealth < 40 - } - trigger_else = { - always = yes - } -} - -# pewter -artifact_feature_metal_pewter_trigger = { - trigger_if = { - limit = { exists = scope:wealth } - scope:wealth < 30 - } - trigger_else = { - always = yes - } -} - -# bronze -artifact_feature_metal_bronze_trigger = { - trigger_if = { - limit = { exists = scope:wealth } - scope:wealth < 40 - } - trigger_else = { - always = yes - } -} - -# copper -artifact_feature_metal_copper_trigger = { - trigger_if = { - limit = { exists = scope:wealth } - scope:wealth < 40 - } - trigger_else = { - always = yes - } -} - -# clay -artifact_feature_earthware_clay_trigger = { - always = yes -} - -# terracotta -artifact_feature_earthware_terracotta_trigger = { - always = yes -} - -# stone -artifact_feature_earthware_stone_trigger = { - trigger_if = { - limit = { exists = scope:potter } - scope:potter.culture = { has_cultural_pillar = heritage_chinese } - } - trigger_else = { - always = no - } - trigger_if = { - limit = { exists = scope:wealth } - scope:wealth < 80 - } - trigger_else = { - always = yes - } -} - -# porcelain -artifact_feature_earthware_porcelain_trigger = { - trigger_if = { - limit = { exists = scope:potter } - scope:potter.culture = { has_cultural_pillar = heritage_chinese } - } - trigger_else = { - always = no - } - trigger_if = { - limit = { exists = scope:wealth } - scope:wealth >= 60 - } - trigger_else = { - always = no - } -} - - - - -########################################## -# Gemstones -# Natural minerals or organic gemstones (such as amber) used to decorate ob -########################################## - -# Cheap/Common Gems, Everywhere -# rock_crystal -artifact_feature_gem_rock_crystal_trigger = { - trigger_if = { - limit = { - exists = scope:wealth - } - artifact_value_trigger = { VALUE = scope:wealth MIN = 0 MAX = 20 } - } - trigger_else = { - always = yes - } -} - -# jet -artifact_feature_gem_jet_trigger = { - exists = scope:wealth - artifact_value_trigger = { VALUE = scope:wealth MIN = 10 MAX = 30 } -} - -# agate -artifact_feature_gem_agate_trigger = { - exists = scope:wealth - artifact_value_trigger = { VALUE = scope:wealth MIN = 20 MAX = 40 } -} - -# onyx -artifact_feature_gem_onyx_trigger = { - exists = scope:wealth - artifact_value_trigger = { VALUE = scope:wealth MIN = 20 MAX = 40 } -} - - -# Semi-Precious Gems, Everywhere -# jasper -artifact_feature_gem_jasper_trigger = { - exists = scope:wealth - artifact_value_trigger = { VALUE = scope:wealth MIN = 30 MAX = 50 } -} - -# zircon -artifact_feature_gem_zircon_trigger = { - exists = scope:wealth - artifact_value_trigger = { VALUE = scope:wealth MIN = 35 MAX = 60 } -} - -# garnet -artifact_feature_gem_garnet_trigger = { - exists = scope:wealth - artifact_value_trigger = { VALUE = scope:wealth MIN = 40 MAX = 70 } -} - - -# Rare/Precious Gems, Everywhere -# sapphire -artifact_feature_gem_sapphire_trigger = { - exists = scope:wealth - artifact_value_trigger = { VALUE = scope:wealth MIN = 50 MAX = 999 } -} - -# emerald -artifact_feature_gem_emerald_trigger = { - exists = scope:wealth - artifact_value_trigger = { VALUE = scope:wealth MIN = 60 MAX = 999 } -} - -# ruby -artifact_feature_gem_ruby_trigger = { - exists = scope:wealth - artifact_value_trigger = { VALUE = scope:wealth MIN = 70 MAX = 999 } -} - -# Semi-Precious Gems, Regional -# flourite -artifact_feature_gem_flourite_trigger = { - exists = scope:wealth - artifact_value_trigger = { VALUE = scope:wealth MIN = 20 MAX = 60 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = world_europe_west_britannia } -} - -# adventurine -artifact_feature_gem_adventurine_trigger = { - exists = scope:wealth - artifact_value_trigger = { VALUE = scope:wealth MIN = 20 MAX = 60 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = world_europe_west_iberia } -} - -# amethyst -artifact_feature_gem_amethyst_trigger = { - artifact_value_trigger = { VALUE = scope:wealth MIN = 20 MAX = 60 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = world_europe_west_francia } -} - -# amber -artifact_feature_gem_amber_trigger = { - exists = scope:wealth - artifact_value_trigger = { VALUE = scope:wealth MIN = 20 MAX = 70 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = custom_eastern_baltic} -} - -# moonstone -artifact_feature_gem_moonstone_trigger = { - exists = scope:wealth - artifact_value_trigger = { VALUE = scope:wealth MIN = 20 MAX = 70 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = world_india } -} - -# turquoise -artifact_feature_gem_turquoise_trigger = { - exists = scope:wealth - artifact_value_trigger = { VALUE = scope:wealth MIN = 20 MAX = 70 } - OR = { - artifact_region_trigger = { CHARACTER = scope:owner REGION = world_asia_minor } - artifact_region_trigger = { CHARACTER = scope:owner REGION = world_middle_east_persia } - } -} - -# carnelian -artifact_feature_gem_carnelian_trigger = { - exists = scope:wealth - artifact_value_trigger = { VALUE = scope:wealth MIN = 20 MAX = 70 } - OR = { - artifact_region_trigger = { CHARACTER = scope:owner REGION = world_europe_west_germania } - artifact_region_trigger = { CHARACTER = scope:owner REGION = world_europe_north } - } -} - - -# Rare/Precious Gems, Regional -# peridot -artifact_feature_gem_peridot_trigger = { - exists = scope:wealth - artifact_value_trigger = { VALUE = scope:wealth MIN = 40 MAX = 80 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = world_india_deccan } -} - -# lapis_lazuli -artifact_feature_gem_lapis_lazuli_trigger = { - exists = scope:wealth - artifact_value_trigger = { VALUE = scope:wealth MIN = 40 MAX = 90 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = world_middle_east_persia } -} - -# opal -artifact_feature_gem_opal_trigger = { - exists = scope:wealth - artifact_value_trigger = { VALUE = scope:wealth MIN = 40 MAX = 90 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = world_africa_east } -} - -# spinel -artifact_feature_gem_spinel_trigger = { - exists = scope:wealth - artifact_value_trigger = { VALUE = scope:wealth MIN = 40 MAX = 90 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = world_india_deccan } -} - -# jade -artifact_feature_gem_jade_trigger = { - exists = scope:wealth - artifact_value_trigger = { VALUE = scope:wealth MIN = 40 MAX = 90 } - artifact_region_trigger = { CHARACTER = scope:owner REGION = world_india_bengal } -} - -########################################## -# Books -# -########################################## - -artifact_book_topic_preface_trigger = { - OR = { - has_artifact_feature = book_topic_unification - has_artifact_feature = book_topic_creation - has_artifact_feature = book_topic_restoration - has_artifact_feature = book_topic_martial_troop_compositions - has_artifact_feature = book_topic_martial_military_strategies - has_artifact_feature = book_topic_martial_ancient_military_campaigns - has_artifact_feature = book_topic_diplomacy_court_politics - has_artifact_feature = book_topic_diplomacy_court_alliances - has_artifact_feature = book_topic_diplomacy_art_of_feasting - has_artifact_feature = book_topic_learning_theological_treaties - has_artifact_feature = book_topic_learning_metaphysical_conundrums - has_artifact_feature = book_topic_learning_tome_collections - has_artifact_feature = book_topic_stewardship_trade_routes - has_artifact_feature = book_topic_stewardship_lawmaking - has_artifact_feature = book_topic_stewardship_best_practices_tax_collectors - has_artifact_feature = book_topic_intrigue_poisons - has_artifact_feature = book_topic_intrigue_the_art_of_love - has_artifact_feature = book_topic_medicine_medicine - has_artifact_feature = book_topic_medicine_herbs - has_artifact_feature = book_topic_medicine_witch - has_artifact_feature = book_topic_artifact_book_topic_cannibal - has_artifact_feature = book_topic_lunatic_lunatic - has_artifact_feature = book_topic_mystic_mystic - has_artifact_feature = book_topic_hunter_hunter - has_artifact_feature = book_topic_witch_worship_horned_god - } -} - - -book_subject_martial_trigger = { - OR = { - prowess >= high_skill_rating - has_trait = faith_warrior - has_trait = crusader_king - has_trait = viking - number_of_commander_traits >= 1 - } -} - -book_subject_medicine_trigger = { - OR = { - has_trait = lifestyle_physician - has_trait = lifestyle_herbalist - has_focus = learning_medicine_focus - } -} - -book_subject_medicine_witch_trigger = { - OR = { - has_trait = lifestyle_physician - has_trait = lifestyle_mystic - has_trait = lifestyle_herbalist - has_focus = learning_medicine_focus - is_witch_trigger = yes - } -} - -book_subject_witch_trigger = { - OR = { - has_trait = arrogant - has_trait = witch - } -} - -book_subject_cannibal_trigger = { - OR = { - has_trait = arrogant - has_trait = cannibal - } -} - -book_subject_deviant_trigger = { - OR = { - has_trait = arrogant - has_trait = deviant - } -} - -book_subject_torturer_trigger = { - OR = { - has_trait = torturer - has_trait = sadistic - } -} - -book_subject_animals_trigger = { - OR = { - has_trait = lifestyle_hunter - AND = { - any_owned_story = { type = story_cycle_pet_cat } - exists = var:story_cycle_cat_name - } - AND = { - any_owned_story = { type = story_cycle_pet_dog } - exists = var:story_cycle_dog_name - } - } -} - -book_topic_martial_military_strategies_trigger = { - OR = { - has_focus_or_focus_trait_trigger = { FOCUS = martial_strategy_focus } - has_trait_rank = { - trait = education_martial - rank >= 2 - } - } -} - -book_topic_martial_ancient_military_campaigns_trigger = { - OR = { - has_focus_or_focus_trait_trigger = { FOCUS = martial_strategy_focus } - has_trait_rank = { - trait = education_martial - rank >= 2 - } - } -} - -book_topic_martial_military_trigger = { - OR = { - has_focus_or_focus_trait_trigger = { FOCUS = martial_strategy_focus } - has_trait_rank = { - trait = education_martial - rank >= 2 - } - } -} - -book_topic_martial_duels_trigger = { - OR = { - has_focus_or_focus_trait_trigger = { FOCUS = martial_chivalry_focus } - has_trait_rank = { - trait = education_martial - rank >= 2 - } - } -} - -book_topic_martial_chivalry_trigger = { - OR = { - has_martial_lifestyle_trait_trigger = yes - has_focus_or_focus_trait_trigger = { FOCUS = martial_chivalry_focus } - has_trait_rank = { - trait = education_martial - rank >= 2 - } - } -} - -book_topic_diplomacy_court_politics_trigger = { - OR = { - has_focus_or_focus_trait_trigger = { FOCUS = diplomacy_majesty_focus } - has_trait_rank = { - trait = education_diplomacy - rank >= 2 - } - } -} - -book_topic_diplomacy_court_alliances_trigger = { - OR = { - has_focus_or_focus_trait_trigger = { FOCUS = diplomacy_majesty_focus } - has_trait_rank = { - trait = education_diplomacy - rank >= 2 - } - } -} - -book_topic_diplomacy_jokes_trigger = { - OR = { #the jokes we tell to hide the pain...! - has_trait = depressed - has_trait = lunatic - has_trait = possessed - } -} - -book_topic_learning_theological_treaties = { - OR = { - has_focus_or_focus_trait_trigger = { FOCUS = learning_theology_focus } - has_trait_rank = { - trait = education_learning - rank >= 2 - } - } -} - -book_topic_learning_tome_collections_trigger = { - OR = { - has_focus_or_focus_trait_trigger = { FOCUS = learning_scholarship_focus } - has_trait_rank = { - trait = education_learning - rank >= 2 - } - } -} - -book_topic_stewardship_lawmaking_trigger = { - OR = { - has_focus_or_focus_trait_trigger = { FOCUS = stewardship_duty_focus } - has_trait_rank = { - trait = education_stewardship - rank >= 2 - } - } -} - -book_topic_stewardship_best_practices_tax_collectors_trigger = { - OR = { - has_focus_or_focus_trait_trigger = { FOCUS = stewardship_wealth_focus } - has_trait_rank = { - trait = education_stewardship - rank >= 2 - } - } -} - -book_topic_intrigue_poisons_trigger = { - OR = { - has_focus_or_focus_trait_trigger = { FOCUS = intrigue_skulduggery_focus } - has_trait_rank = { - trait = education_intrigue - rank >= 2 - } - } -} - -book_topic_intrigue_punishment_trigger = { - OR = { - has_focus_or_focus_trait_trigger = { FOCUS = intrigue_intimidation_focus } - has_trait_rank = { - trait = education_intrigue - rank >= 2 - } - has_trait = torturer - } -} - -book_topic_intrigue_seduction_trigger = { - OR = { - has_trait = lustful - has_trait = seducer - has_focus = intrigue_temptation_focus - has_trait = deviant - has_trait = rakish - } -} - -book_topic_medicine_herbs_trigger = { - OR = { - has_trait = lifestyle_herbalist - is_witch_trigger = yes - } -} - -book_topic_witch_love_sorcery_trigger = { - OR = { - has_trait = seducer - has_focus = intrigue_temptation_focus - } -} - -book_topic_witch_curse_sorcery_trigger = { - OR = { - dread >= medium_dread - has_trait = sadistic - has_trait = vengeful - has_trait = torturer - has_trait = paranoid - } -} - -# Saintly Bones -saintly_bones_faith_trigger = { # christianity is of the right kind - trigger_if = { - limit = { - OR = { - scope:artifact.var:saint_bone_faith = faith:catholic - scope:artifact.var:saint_bone_faith = faith:orthodox - } - } - OR = { - faith = faith:catholic - faith = faith:orthodox - faith = { has_doctrine = tenet_christian_syncretism } - } - } - trigger_else_if = { - limit = { - OR = { - scope:artifact.var:saint_bone_faith = faith:nestorian - scope:artifact.var:saint_bone_faith = faith:coptic - scope:artifact.var:saint_bone_faith = faith:armenian_apostolic - } - } - OR = { - faith = faith:nestorian - faith = faith:coptic - faith = faith:armenian_apostolic - } - } - trigger_else_if = { - limit = { scope:artifact.var:saint_bone_faith = faith:insular_celtic } - faith = faith:insular_celtic - } - trigger_else = { - OR = { - faith = faith:catholic - faith = faith:orthodox - faith = faith:nestorian - faith = faith:coptic - faith = faith:armenian_apostolic - faith = faith:insular_celtic - faith = { has_doctrine = tenet_christian_syncretism } - } - } -} - -#Used after setting local animal to determine if a skull artifact/trophy can be made from that animal. -can_animal_produce_skull_trigger = { - exists = $VARIABLE$ - NOR = { - $VARIABLE$ = flag:dragon - $VARIABLE$ = flag:hart - $VARIABLE$ = flag:fox - $VARIABLE$ = flag:hare - $VARIABLE$ = flag:lynx - } -} - -# Duel cultures -axe_unique_gfx_trigger = { - culture = { - OR = { - has_clothing_gfx = northern_clothing_gfx - has_clothing_gfx = mongol_clothing_gfx - has_clothing_gfx = byzantine_clothing_gfx - has_clothing_gfx = indian_clothing_gfx - has_clothing_gfx = african_clothing_gfx - has_clothing_gfx = mena_clothing_gfx - has_clothing_gfx = iranian_clothing_gfx - has_clothing_gfx = iberian_christian_clothing_gfx - has_clothing_gfx = iberian_muslim_clothing_gfx - } - } -} - -sword_unique_gfx_trigger = { - culture = { - OR = { - has_clothing_gfx = northern_clothing_gfx - has_clothing_gfx = mongol_clothing_gfx - has_clothing_gfx = byzantine_clothing_gfx - has_clothing_gfx = indian_clothing_gfx - has_clothing_gfx = african_clothing_gfx - has_clothing_gfx = mena_clothing_gfx - has_clothing_gfx = iberian_christian_clothing_gfx - has_clothing_gfx = iberian_muslim_clothing_gfx - has_clothing_gfx = iranian_clothing_gfx - } - } -} - -hammer_unique_gfx_trigger = { - culture = { - OR = { - has_clothing_gfx = african_clothing_gfx - has_clothing_gfx = mongol_clothing_gfx - has_clothing_gfx = indian_clothing_gfx - has_clothing_gfx = mena_clothing_gfx - has_clothing_gfx = iberian_christian_clothing_gfx - has_clothing_gfx = iberian_muslim_clothing_gfx - } - } -} - -dagger_unique_gfx_trigger = { - culture = { - OR = { - has_clothing_gfx = iberian_christian_clothing_gfx - has_clothing_gfx = iberian_muslim_clothing_gfx - has_clothing_gfx = indian_clothing_gfx - } - } -} - -mace_unique_gfx_trigger = { - culture = { - OR = { - has_clothing_gfx = mongol_clothing_gfx - has_clothing_gfx = byzantine_clothing_gfx - has_clothing_gfx = indian_clothing_gfx - has_clothing_gfx = african_clothing_gfx - has_clothing_gfx = mena_clothing_gfx - has_clothing_gfx = iberian_christian_clothing_gfx - has_clothing_gfx = iberian_muslim_clothing_gfx - } - } -} - -spear_unique_gfx_trigger = { - culture = { - OR = { - has_clothing_gfx = indian_clothing_gfx - has_clothing_gfx = mongol_clothing_gfx - has_clothing_gfx = african_clothing_gfx - has_clothing_gfx = mena_clothing_gfx - has_clothing_gfx = iberian_christian_clothing_gfx - has_clothing_gfx = iberian_muslim_clothing_gfx - has_clothing_gfx = iranian_clothing_gfx - } - } -} - -# Scientific Apparatus Availability - -eligible_for_scientific_apparatus_armillary_sphere_trigger = { - has_fp2_dlc_trigger = yes - $CHARACTER$ = { - culture = { has_innovation = innovation_armilary_sphere } - OR = { - # Wide spread in the Arabic world fairly early. - - has_court_language = language_arabic - has_court_language = language_iranian #FP3 addition - - - knows_language = language_arabic - # Becomes commonplace towards the end of the period. - culture = { has_cultural_era_or_later = culture_era_late_medieval } - trigger_if = { - limit = { has_royal_court = yes } - OR = { - has_court_language = language_arabic - # Nerds can import the knowledge. - has_court_type = court_scholarly - } - } - } - } -} - -# Relic War Validity - -relic_war_valid_religious_artefact_trigger = { - exists = var:relic - scope:attacker = { - can_benefit_from_artifact = prev - } - NOT = { - scope:defender = { - can_benefit_from_artifact = prev - } - } -} - -relic_war_valid_struggle_artefact_trigger = { - exists = var:relic - var:relic = flag:iberian_struggle - scope:attacker = { - any_character_struggle = { is_struggle_type = iberian_struggle } - # Plus one of the valid using faiths. - OR = { - islam_or_syncretic_with_islam_trigger = { CHARACTER = scope:attacker } - christianity_or_syncretic_with_christianity_trigger = { CHARACTER = scope:attacker } - } - } - scope:attacker.faith != scope:defender.faith - -} - -relic_war_valid_against_defender_trigger = { - any_character_artifact = { - exists = var:relic - OR = { - # Standard relics. - AND = { - scope:attacker = { - can_benefit_from_artifact = prev - } - NOT = { - scope:defender = { - can_benefit_from_artifact = prev - } - } - } - # Struggle relics. - ## The Bells of Santiago de Compostela. - AND = { - var:relic = flag:iberian_struggle - scope:attacker = { - any_character_struggle = { is_struggle_type = iberian_struggle } - # Plus one of the valid using faiths. - OR = { - islam_or_syncretic_with_islam_trigger = { CHARACTER = scope:attacker } - christianity_or_syncretic_with_christianity_trigger = { CHARACTER = scope:attacker } - } - } - scope:attacker.faith != scope:defender.faith - } - } - } -} - -relic_war_valid_against_defender_vassal_trigger = { - any_vassal_or_below = { - faith != scope:attacker.faith - any_character_artifact = { - exists = var:relic - OR = { - # Standard relics. - AND = { - scope:attacker = { - can_benefit_from_artifact = prev - } - NOT = { - scope:defender = { - can_benefit_from_artifact = prev - } - } - } - # Struggle relics. - ## The Bells of Santiago de Compostela. - AND = { - var:relic = flag:iberian_struggle - scope:attacker = { - any_character_struggle = { is_struggle_type = iberian_struggle } - # Plus one of the valid using faiths. - OR = { - islam_or_syncretic_with_islam_trigger = { CHARACTER = scope:attacker } - christianity_or_syncretic_with_christianity_trigger = { CHARACTER = scope:attacker } - } - } - scope:attacker.faith != scope:defender.faith - } - } - } - } -} - -portrait_should_wield_longbow_trigger = { - trigger_if = { - limit = { - any_equipped_character_artifact = { - OR = { - artifact_type = longbow - artifact_type = bow - } - } - } - OR = { - any_equipped_character_artifact = { artifact_type = longbow } - any_equipped_character_artifact = { - artifact_type = bow - creator ?= { artifact_use_indian_unit_visuals_trigger = yes } - } - } - } - trigger_else = { - culture = { - OR = { - has_cultural_tradition = tradition_longbow_competitions - has_clothing_gfx = indian_clothing_gfx - } - } - } -} - -portrait_should_wield_crossbow_trigger = { - any_equipped_character_artifact = { artifact_type = crossbow } -} - -artifact_war_claimable_artifact_trigger = { - artifact_owner = { - is_ruler = yes - target_is_same_character_or_above = scope:defender - } - trigger_if ={ - limit = { - scope:attacker = { is_ai = yes } - } - NOT = { has_variable = cursed_artifact } - artifact_rarity >= 4 #More than masterwork - save_temporary_scope_as = artifact_temp - scope:attacker = { can_benefit_from_artifact = scope:artifact_temp } - } -} - -sword_could_be_longsword_trigger = { - trigger_if = { - limit = { exists = scope:artifact.creator.culture } - scope:artifact.creator.culture = { - has_unit_gfx = western_unit_gfx - has_cultural_era_or_later = culture_era_late_medieval - } - } - trigger_else_if = { #If the creator is not found we use the owner. Often this would be if the creator is a dummy, which has no culture - limit = { exists = culture } - culture = { - has_unit_gfx = western_unit_gfx - has_cultural_era_or_later = culture_era_late_medieval - } - } - trigger_else = { - always = no #We should never get here as all created artifacts should have an owner. - } -} - -any_recent_previous_owner = { - OR = { - previous_owner = $OWNER$ - previous_owner_level_2 = $OWNER$ - previous_owner_level_3 = $OWNER$ - } -} diff --git a/N3OW/common/scripted_triggers/00_auto_character_triggers.txt b/N3OW/common/scripted_triggers/00_auto_character_triggers.txt deleted file mode 100644 index b90f6410..00000000 --- a/N3OW/common/scripted_triggers/00_auto_character_triggers.txt +++ /dev/null @@ -1,17 +0,0 @@ -is_valid_auto_title_holder = { - is_capable_adult = yes - is_claimant = no - is_imprisoned = no - trigger_if = { - limit = { - scope:base.primary_title = { has_title_law = female_only_law } - } - is_female = yes - } - trigger_if = { - limit = { - scope:base.primary_title = { has_title_law = male_only_law } - } - is_male = yes - } -} diff --git a/N3OW/common/scripted_triggers/00_available_for_events_triggers.txt b/N3OW/common/scripted_triggers/00_available_for_events_triggers.txt deleted file mode 100644 index c80af4e0..00000000 --- a/N3OW/common/scripted_triggers/00_available_for_events_triggers.txt +++ /dev/null @@ -1,931 +0,0 @@ -###TRIGGER LIST -#has_contagious_deadly_disease_trigger -#is_healthy -#is_available -#is_available_ai -#is_available_adult -#is_available_healthy_adult -#is_available_ai_adult -#is_available_healthy_ai_adult -#is_capable_adult -#is_capable_adult_ai -#liege_is_boss_trigger -#can_select_lifestyle_focus -#can_marry -#can_become_concubine - -has_contagious_deadly_disease_trigger = { - has_trait_with_flag = contagious_deadly_disease -} - -is_healthy = { - custom_tooltip = { - text = not_poor_health_tt - health >= fine_health - } - NOT = { - has_trait_with_flag = is_healthy_trigger_flag - } - has_contagious_deadly_disease_trigger = no -} - -basic_is_available_ai = { - is_available_quick = { - ai = yes - alive = yes - imprisoned = no - incapable = no - } - has_contagious_deadly_disease_trigger = no -} - -is_available_allow_travelling = { - is_available_quick = { - alive = yes - imprisoned = no - incapable = no - in_army = no - } - has_contagious_deadly_disease_trigger = no - custom_description = { - text = ALREADY_IN_ACTIVITY - NOR = { - exists = involved_activity - has_variable = { - name = homage_liege_scope - name = meditation_character_flag - name = local_shrine_rite - name = petition_liege_character_flag - name = holding_court_character_flag - } - is_being_visited_on_tour_strict = yes - } - } - custom_description = { - text = ALREADY_PLANNING_ACTIVITY - NOT = { has_character_flag = planning_an_activity } - } - # Variable set within the adventure inspiration events - NOT = { has_variable = gone_adventuring } - # Variable set on Mandala succession - custom_tooltip = { - text = busy_in_mandala_succession - NOT = { has_variable = busy_in_mandala_succession } - } -} - -# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. -is_available = { - is_available_quick = { - alive = yes - travel = no - in_army = no - imprisoned = no - incapable = no - } - has_contagious_deadly_disease_trigger = no - custom_description = { - text = ALREADY_IN_ACTIVITY - NOR = { - exists = involved_activity - has_variable = { - name = homage_liege_scope - name = meditation_character_flag - name = local_shrine_rite - name = petition_liege_character_flag - name = holding_court_character_flag - } - is_being_visited_on_tour_strict = yes - } - } - custom_description = { - text = ALREADY_PLANNING_ACTIVITY - NOT = { has_character_flag = planning_an_activity } - } - # Variable set within the adventure inspiration events - NOT = { has_variable = gone_adventuring } - # Variable set on Mandala succession - custom_tooltip = { - text = busy_in_mandala_succession - NOT = { has_variable = busy_in_mandala_succession } - } -} - -# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. -is_available_travelling = { - is_available_quick = { - alive = yes - in_army = no - imprisoned = no - incapable = no - travel = yes - } - has_contagious_deadly_disease_trigger = no - NOR = { - has_character_flag = is_in_task_contract_event_chain - has_variable = gone_adventuring - } -} - -# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. -is_available_travelling_adult = { - is_available_quick = { - travel = yes - adult = yes - alive = yes - in_army = no - imprisoned = no - incapable = no - } - has_contagious_deadly_disease_trigger = no - NOR = { - has_character_flag = is_in_task_contract_event_chain - has_variable = gone_adventuring - } -} - -# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. -is_available_travelling_ai_adult = { - is_available_quick = { - travel = yes - adult = yes - ai = yes - alive = yes - in_army = no - imprisoned = no - incapable = no - } - has_contagious_deadly_disease_trigger = no - NOR = { - has_character_flag = is_in_task_contract_event_chain - has_variable = gone_adventuring - } -} - -# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. -is_physically_able = { - is_available_quick = { - alive = yes - imprisoned = no - incapable = no - } -} - -# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. -is_physically_able_ai = { - is_available_quick = { - ai = yes - alive = yes - imprisoned = no - incapable = no - } -} - -# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. -is_physically_able_adult = { - is_available_quick = { - adult = yes - alive = yes - imprisoned = no - incapable = no - } -} - -# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. -is_physically_able_ai_adult = { - is_available_quick = { - ai = yes - adult = yes - alive = yes - imprisoned = no - incapable = no - } -} - -# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. -is_available_ai = { - is_available_quick = { - ai = yes - alive = yes - travel = no - in_army = no - imprisoned = no - incapable = no - } - has_contagious_deadly_disease_trigger = no - custom_description = { - text = ALREADY_IN_ACTIVITY - NOR = { - exists = involved_activity - has_variable = { - name = homage_liege_scope - name = meditation_character_flag - name = local_shrine_rite - name = petition_liege_character_flag - name = holding_court_character_flag - } - is_being_visited_on_tour_strict = yes - } - } - custom_description = { - text = ALREADY_PLANNING_ACTIVITY - NOT = { has_character_flag = planning_an_activity } - } - # Variable set within the adventure inspiration events - NOT = { has_variable = gone_adventuring } -} - -# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. -is_available_child = { - is_available_quick = { - adult = no - alive = yes - travel = no - in_army = no - imprisoned = no - incapable = no - } - - has_contagious_deadly_disease_trigger = no - custom_description = { - text = ALREADY_IN_ACTIVITY - NOR = { - exists = involved_activity - has_variable = { - name = homage_liege_scope - name = meditation_character_flag - name = local_shrine_rite - name = petition_liege_character_flag - name = holding_court_character_flag - } - is_being_visited_on_tour_strict = yes - } - } - custom_description = { - text = ALREADY_PLANNING_ACTIVITY - NOT = { has_character_flag = planning_an_activity } - } - # Variable set within the adventure inspiration events - NOT = { has_variable = gone_adventuring } -} - -# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. -is_available_child_allow_travel = { - is_available_quick = { - adult = no - alive = yes - in_army = no - imprisoned = no - incapable = no - } - - has_contagious_deadly_disease_trigger = no - custom_description = { - text = ALREADY_IN_ACTIVITY - NOR = { - exists = involved_activity - has_variable = { - name = homage_liege_scope - name = meditation_character_flag - name = local_shrine_rite - name = petition_liege_character_flag - name = holding_court_character_flag - } - is_being_visited_on_tour_strict = yes - } - } - custom_description = { - text = ALREADY_PLANNING_ACTIVITY - NOT = { has_character_flag = planning_an_activity } - } - # Variable set within the adventure inspiration events - NOT = { has_variable = gone_adventuring } -} - -# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. -is_available_ai_child = { - is_available_quick = { - adult = no - ai = yes - alive = yes - travel = no - in_army = no - imprisoned = no - incapable = no - } - has_contagious_deadly_disease_trigger = no - custom_description = { - text = ALREADY_IN_ACTIVITY - NOR = { - exists = involved_activity - has_variable = { - name = homage_liege_scope - name = meditation_character_flag - name = local_shrine_rite - name = petition_liege_character_flag - name = holding_court_character_flag - } - is_being_visited_on_tour_strict = yes - } - } - custom_description = { - text = ALREADY_PLANNING_ACTIVITY - NOT = { has_character_flag = planning_an_activity } - } - # Variable set within the adventure inspiration events - NOT = { has_variable = gone_adventuring } -} - -# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. -is_available_healthy_child = { - is_available_quick = { - adult = no - alive = yes - travel = no - in_army = no - imprisoned = no - incapable = no - } - is_healthy = yes - custom_description = { - text = ALREADY_IN_ACTIVITY - NOR = { - exists = involved_activity - has_variable = { - name = homage_liege_scope - name = meditation_character_flag - name = local_shrine_rite - name = petition_liege_character_flag - name = holding_court_character_flag - } - is_being_visited_on_tour_strict = yes - } - } - custom_description = { - text = ALREADY_PLANNING_ACTIVITY - NOT = { has_character_flag = planning_an_activity } - } - # Variable set within the adventure inspiration events - NOT = { has_variable = gone_adventuring } -} - -# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. -is_available_healthy_ai_child = { - is_available_quick = { - ai = yes - adult = no - alive = yes - travel = no - in_army = no - imprisoned = no - incapable = no - } - is_healthy = yes - custom_description = { - text = ALREADY_IN_ACTIVITY - NOR = { - exists = involved_activity - has_variable = { - name = homage_liege_scope - name = meditation_character_flag - name = local_shrine_rite - name = petition_liege_character_flag - name = holding_court_character_flag - } - is_being_visited_on_tour_strict = yes - } - } - custom_description = { - text = ALREADY_PLANNING_ACTIVITY - NOT = { has_character_flag = planning_an_activity } - } - # Variable set within the adventure inspiration events - NOT = { has_variable = gone_adventuring } -} - -# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. -is_available_adult = { - is_available_quick = { - adult = yes - alive = yes - travel = no - in_army = no - imprisoned = no - incapable = no - } - has_contagious_deadly_disease_trigger = no - custom_description = { - text = ALREADY_IN_ACTIVITY - NOR = { - exists = involved_activity - has_variable = { - name = homage_liege_scope - name = meditation_character_flag - name = local_shrine_rite - name = petition_liege_character_flag - name = holding_court_character_flag - } - is_being_visited_on_tour_strict = yes - } - } - custom_description = { - text = ALREADY_PLANNING_ACTIVITY - NOT = { has_character_flag = planning_an_activity } - } - # Variable set within the adventure inspiration events - NOT = { has_variable = gone_adventuring } -} - -# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. -is_available_ai_adult = { - is_available_quick = { - ai = yes - adult = yes - alive = yes - travel = no - in_army = no - imprisoned = no - incapable = no - } - has_contagious_deadly_disease_trigger = no - custom_description = { - text = ALREADY_IN_ACTIVITY - NOR = { - exists = involved_activity - has_variable = { - name = homage_liege_scope - name = meditation_character_flag - name = local_shrine_rite - name = petition_liege_character_flag - name = holding_court_character_flag - } - is_being_visited_on_tour_strict = yes - } - } - custom_description = { - text = ALREADY_PLANNING_ACTIVITY - NOT = { has_character_flag = planning_an_activity } - } - # Variable set within the adventure inspiration events - NOT = { has_variable = gone_adventuring } -} - -# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. -is_available_healthy_adult = { - is_available_quick = { - adult = yes - alive = yes - travel = no - in_army = no - imprisoned = no - incapable = no - } - is_healthy = yes - custom_description = { - text = ALREADY_IN_ACTIVITY - NOR = { - exists = involved_activity - has_variable = { - name = homage_liege_scope - name = meditation_character_flag - name = local_shrine_rite - name = petition_liege_character_flag - name = holding_court_character_flag - } - is_being_visited_on_tour_strict = yes - } - } - custom_description = { - text = ALREADY_PLANNING_ACTIVITY - NOT = { has_character_flag = planning_an_activity } - } - # Variable set within the adventure inspiration events - NOT = { has_variable = gone_adventuring } -} - -# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. -is_available_healthy_ai_adult = { - is_available_quick = { - ai = yes - adult = yes - alive = yes - travel = no - in_army = no - imprisoned = no - incapable = no - } - is_healthy = yes - custom_description = { - text = ALREADY_IN_ACTIVITY - NOR = { - exists = involved_activity - has_variable = { - name = homage_liege_scope - name = meditation_character_flag - name = local_shrine_rite - name = petition_liege_character_flag - name = holding_court_character_flag - } - is_being_visited_on_tour_strict = yes - } - } - custom_description = { - text = ALREADY_PLANNING_ACTIVITY - NOT = { has_character_flag = planning_an_activity } - } - # Variable set within the adventure inspiration events - NOT = { has_variable = gone_adventuring } -} - -is_available_adult_or_is_commanding = { - OR = { - is_commanding_army = yes - is_available_adult = yes - } -} - -# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. -is_available_at_peace = { - is_available_quick = { - at_war = no - alive = yes - travel = no - in_army = no - imprisoned = no - incapable = no - } - has_contagious_deadly_disease_trigger = no - custom_description = { - text = ALREADY_IN_ACTIVITY - NOR = { - exists = involved_activity - has_variable = { - name = homage_liege_scope - name = meditation_character_flag - name = local_shrine_rite - name = petition_liege_character_flag - name = holding_court_character_flag - } - is_being_visited_on_tour_strict = yes - } - } - custom_description = { - text = ALREADY_PLANNING_ACTIVITY - NOT = { has_character_flag = planning_an_activity } - } - # Variable set within the adventure inspiration events - NOT = { has_variable = gone_adventuring } -} - -# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. -is_available_at_peace_adult = { - is_available_quick = { - at_war = no - adult = yes - alive = yes - travel = no - in_army = no - imprisoned = no - incapable = no - } - has_contagious_deadly_disease_trigger = no - custom_description = { - text = ALREADY_IN_ACTIVITY - NOR = { - exists = involved_activity - has_variable = { - name = homage_liege_scope - name = meditation_character_flag - name = local_shrine_rite - name = petition_liege_character_flag - name = holding_court_character_flag - } - is_being_visited_on_tour_strict = yes - } - } - custom_description = { - text = ALREADY_PLANNING_ACTIVITY - NOT = { has_character_flag = planning_an_activity } - } - # Variable set within the adventure inspiration events - NOT = { has_variable = gone_adventuring } -} - -# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. -is_available_at_peace_ai_adult = { - is_available_quick = { - ai = yes - adult = yes - alive = yes - imprisoned = no - incapable = no - travel = no - in_army = no - at_war = no - } - - has_contagious_deadly_disease_trigger = no - custom_description = { - text = ALREADY_IN_ACTIVITY - NOR = { - exists = involved_activity - has_variable = { - name = homage_liege_scope - name = meditation_character_flag - name = local_shrine_rite - name = petition_liege_character_flag - name = holding_court_character_flag - } - is_being_visited_on_tour_strict = yes - } - } - custom_description = { - text = ALREADY_PLANNING_ACTIVITY - NOT = { has_character_flag = planning_an_activity } - } - # Variable set within the adventure inspiration events - NOT = { has_variable = gone_adventuring } -} - -# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. -is_available_at_peace_adult_lenient = { - is_available_quick = { - adult = yes - alive = yes - travel = no - in_army = no - imprisoned = no - incapable = no - at_war = no - } - - has_contagious_deadly_disease_trigger = no - custom_description = { - text = ALREADY_IN_ACTIVITY - NOR = { - exists = involved_activity - has_variable = { - name = homage_liege_scope - name = meditation_character_flag - name = local_shrine_rite - name = petition_liege_character_flag - name = holding_court_character_flag - } - is_being_visited_on_tour_strict = yes - } - } - custom_description = { - text = ALREADY_PLANNING_ACTIVITY - NOT = { has_character_flag = planning_an_activity } - } - # Variable set within the adventure inspiration events - NOT = { has_variable = gone_adventuring } -} - -# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. -# Meaning you may be at war, but you're still located in your capital. -is_available_even_at_war_adult = { - is_available_quick = { - adult = yes - alive = yes - travel = no - in_army = no - imprisoned = no - incapable = no - } - - has_contagious_deadly_disease_trigger = no - custom_description = { - text = ALREADY_IN_ACTIVITY - NOR = { - exists = involved_activity - has_variable = { - name = homage_liege_scope - name = meditation_character_flag - name = local_shrine_rite - name = petition_liege_character_flag - name = holding_court_character_flag - } - is_being_visited_on_tour_strict = yes - } - } - custom_description = { - text = ALREADY_PLANNING_ACTIVITY - NOT = { has_character_flag = planning_an_activity } - } - # Variable set within the adventure inspiration events - NOT = { has_variable = gone_adventuring } -} - -is_capable_adult = { - is_available_quick = { - adult = yes - incapable = no - } -} - -is_capable_adult_ai = { - is_available_quick = { - ai = yes - adult = yes - incapable = no - } -} - -can_select_lifestyle_focus = { - is_capable_adult = yes - is_playable_character = yes -} - -is_not_hostile_towards_root = { - NOR = { - is_a_faction_member = yes - any_scheme = { - hostile_scheme_trigger = yes - scheme_target_character = root - } - is_at_war_with = root - } -} - -player_target_available_for_personal_scheme_ongoing_events_trigger = { - $TARGET$ = { - trigger_if = { - limit = { - is_ai = no - $OWNER$ = { is_ruler = no } - } - is_at_war = no - } - trigger_else = { - always = yes - } - } -} - - -basic_is_valid_for_yearly_events_trigger = { - is_playable_character = yes - is_available_quick = { - imprisoned = no - incapable = no - } - OR = { - is_travelling = no - has_government = landless_adventurer_government - } - NOR = { - has_character_flag = is_in_task_contract_event_chain - exists = involved_activity - } -} - -# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. -is_valid_for_narrow_yearly_events = { - is_available_quick = { - at_war = no - imprisoned = no - incapable = no - } - is_commanding_army = no - is_playable_character = yes - OR = { - is_travelling = no - has_government = landless_adventurer_government - } - NOR = { - has_character_flag = is_in_task_contract_event_chain - exists = involved_activity - } -} - -# If you update one of the available triggers, update all of them. It's a lot better for performance to not have scripted triggers within scripted triggers when they're checked as often as these ones are. -is_valid_for_narrow_yearly_events_adult = { - is_available_quick = { - adult = yes - at_war = no - imprisoned = no - incapable = no - } - is_commanding_army = no - is_playable_character = yes - OR = { - is_travelling = no - has_government = landless_adventurer_government - } - NOR = { - has_character_flag = is_in_task_contract_event_chain - exists = involved_activity - } -} - -is_within_diplo_range = { - capital_province ?= { - save_temporary_scope_as = my_capital - $CHARACTER$.capital_province ?= { - squared_distance = { - target = scope:my_capital - value < 200000 - } - } - } -} - -# This trigger checks if a character is a Nomad -is_nomad = { - government_has_flag = government_is_nomadic - is_ruler = yes -} - -# This trigger checks if a character is a landed Nomad -is_landed_nomad = { - government_has_flag = government_is_nomadic - is_available_quick = { - ruler = yes - landed = yes - } -} - -# Checks if a character is a landless nomad with a domicile -is_landless_nomad = { - government_has_flag = government_is_nomadic - is_landed = no - has_domicile = yes -} - -# This trigger checks if a character is a landless adventurer -is_landless_adventurer = { - government_has_flag = government_is_landless_adventurer -} - -# This trigger checks if a character is a governor in an admin realm (implying they are landed) -is_governor = { - government_allows = administrative - is_landed = yes - top_liege != this - OR = { - highest_held_title_tier >= main_administrative_tier - highest_held_title_tier >= min_title_maa_tier - } - tgp_is_ceremonial_liege_trigger = no -} -is_governor_or_admin_count = { - government_allows = administrative - is_landed = yes - top_liege != this - highest_held_title_tier >= tier_county - tgp_is_ceremonial_liege_trigger = no -} - -# Checks if a character is a landless house_head within an admin realm -is_landless_administrative = { - government_allows = administrative - is_landed = no - is_house_head = yes - has_domicile = yes -} - -# Checks if a character is a landless house_head within a feudal realm -is_landless_soryo = { - government_has_flag = government_is_japan_feudal - is_landed = no - is_house_head = yes - has_domicile = yes -} - -# Checks if a character is either landed or an unlanded house head within an admin realm -is_landed_or_landless_administrative = { - OR = { - is_landed = yes - is_landless_administrative = yes - } -} - -# Checks if a character is either landed, a landless house head within an admin realm, a landless nomad, a landless adventurer, a landless soryo, or a minister -is_playable_character = { - OR = { - is_landed = yes - is_landless_administrative = yes - is_landless_adventurer = yes - is_landless_nomad = yes - is_landless_soryo = yes - tgp_is_any_minister = yes # To keep ministers playable, regardless of having a nobel family title or not - } -} - -roman_restoration_is_valid_roman_empire_trigger = { - is_ai = no - is_roman_emperor_trigger = yes - OR = { - religion = religion:christianity_religion #Either Christian - religion = religion:hellenism_religion #Or Hellenic - } - NOT = { has_ep3_dlc_trigger = yes } -} - -is_eunuch_trigger = { - OR = { - has_trait = eunuch_1 - has_trait = beardless_eunuch - } -} diff --git a/N3OW/common/scripted_triggers/00_bastard_triggers.txt b/N3OW/common/scripted_triggers/00_bastard_triggers.txt deleted file mode 100644 index 26516bfe..00000000 --- a/N3OW/common/scripted_triggers/00_bastard_triggers.txt +++ /dev/null @@ -1,234 +0,0 @@ - - -should_mother_give_house_to_bastard_trigger = { - #Also governs the "should_mother_give_house_to_bastard" scripted rule - trigger_if = { - limit = { NOT = { exists = mother } } - always = no - } - trigger_else_if = { - limit = { NOT = { exists = mother.house } } - always = no - } - trigger_else_if = { - limit = { NOT = { exists = father } } - always = yes - } - trigger_else_if = { - limit = { - real_father = { is_ruler = yes } - mother = { is_ruler = no } - exists = real_father.house - } - always = no - } - trigger_else_if = { - limit = { - real_father = { is_ruler = no } - mother = { is_ruler = yes } - exists = mother.house - } - always = yes - } - trigger_else_if = { - limit = { - mother = { NOT = { exists = house } } - exists = real_father.house - } - always = no - } - trigger_else_if = { - limit = { - real_father = { NOT = { exists = house } } - exists = mother.house - } - always = yes - } - # making the default behavior explicit if no other trigger_(else_)ifs are valid - trigger_else = { - always = yes - } -} - -secret_unmarried_illegitimate_child_is_valid_trigger = { - $TARGET$ = { - is_alive = yes - exists = real_father - exists = mother - NOT = { has_trait = child_of_concubine } - save_temporary_scope_as = temp_child - trigger_if = { - limit = { - exists = father - exists = scope:temp_child.real_father - } - father != scope:temp_child.real_father - } - } -} - -secret_disputed_heritage_is_valid_trigger = { - $TARGET$ = { # Child - is_alive = yes - exists = real_father - exists = father - exists = mother - real_father != father - NOR = { - has_trait = bastard - has_trait = wild_oat - has_trait = legitimized_bastard - real_father = { - government_has_flag = government_is_mandala - house ?= { has_house_power_parameter = aspect_of_creation } - is_house_head = yes - } - mother = { - government_has_flag = government_is_mandala - house ?= { has_house_power_parameter = aspect_of_creation } - is_house_head = yes - } - } - } -} - -bastard_secret_is_criminal = { - $TARGET$ = { save_temporary_scope_as = criminal_bastard } - $PARTICIPANT$ = { save_temporary_scope_as = criminal_participant } - OR = { - #Adultery of parent is criminal - scope:criminal_participant = { - NAND = { - government_has_flag = government_is_mandala - house ?= { has_house_power_parameter = aspect_of_creation } - is_house_head = yes - } - OR = { - trait_is_criminal_in_faith_trigger = { - FAITH = faith - TRAIT = adulterer - GENDER_CHARACTER = scope:criminal_participant - } - any_liege_or_above = { - trait_is_criminal_in_faith_trigger = { - FAITH = faith - TRAIT = adulterer - GENDER_CHARACTER = scope:criminal_participant - } - } - } - } - } -} - - -bastard_secret_is_shunned = { - assert_if = { - limit = { NOT = { exists = $TARGET$ } } - text = "Empty TARGET was passed to bastard_secret_is_shunned!" - } - assert_if = { - limit = { NOT = { exists = $TARGET$ } } - text = "Empty PARTICIPANT was passed to bastard_secret_is_shunned!" - } - - #Saving bastard & other parent scope - $TARGET$ = { save_temporary_scope_as = bastard } - $PARTICIPANT$ = { save_temporary_scope_as = participant } - - assert_if = { - limit = { NOT = { exists = scope:bastard } } - text = "scope:bastard does not exist in bastard_secret_is_shunned!" - } - assert_if = { - limit = { NOT = { exists = scope:participant } } - text = "scope:participant does not exist in bastard_secret_is_shunned!" - } - assert_if = { - limit = { NOT = { exists = scope:bastard.mother } } - text = "scope:bastard.mother does not exist in bastard_secret_is_shunned!" - } - assert_if = { - limit = { NOT = { exists = scope:bastard.real_father } } - text = "scope:bastard.real_father does not exist in bastard_secret_is_shunned!" - } - - OR = { - #Bastard child: always shunned, never criminal - scope:participant = scope:bastard - #Adultery is shunned - scope:participant = { - OR = { - trait_is_shunned_in_faith_trigger = { - FAITH = faith - TRAIT = adulterer - GENDER_CHARACTER = scope:participant - } - any_liege_or_above = { - trait_is_shunned_in_faith_trigger = { - FAITH = faith - TRAIT = adulterer - GENDER_CHARACTER = scope:participant - } - } - } - } - #Either parent if incest is shunned - AND = { - # Can't have incest with only one parent! - exists = scope:bastard.real_father - exists = scope:bastard.mother - - # Also the secret participant has to be one of the parents - scope:participant = { - OR = { - this = scope:bastard.mother - this = scope:bastard.real_father - } - trigger_if = { - limit = { this = scope:bastard.mother } - scope:bastard.real_father = { save_temporary_scope_as = other_parent } - } - trigger_else = { - scope:bastard.mother = { save_temporary_scope_as = other_parent } - } - - # Check if the relation would be incestuous in my faith or my liege's faith - relation_with_character_is_incestuous_in_faith_trigger = { - CHARACTER = scope:other_parent - FAITH = scope:participant.faith - } - any_liege_or_above = { - save_temporary_scope_as = liege_or_above - scope:participant = { - relation_with_character_is_incestuous_in_faith_trigger = { - CHARACTER = scope:other_parent - FAITH = scope:liege_or_above.faith - } - } - } - } - } - } - NOT = { - bastard_secret_is_criminal = { - TARGET = scope:bastard - PARTICIPANT = scope:participant - } - } -} - -has_any_bastard_trait_trigger = { - OR = { - has_trait = wild_oat - has_any_negative_bastard_trait_trigger = yes - } -} - -has_any_negative_bastard_trait_trigger = { - OR = { - has_trait = bastard - has_trait = legitimized_bastard - has_trait = disputed_heritage - } -} diff --git a/N3OW/common/scripted_triggers/00_birth_triggers.txt b/N3OW/common/scripted_triggers/00_birth_triggers.txt deleted file mode 100644 index 7bb4a5e0..00000000 --- a/N3OW/common/scripted_triggers/00_birth_triggers.txt +++ /dev/null @@ -1,59 +0,0 @@ - -### Birth trigger list - - -birth_will_happen_as_usual_trigger = { - OR = { - has_character_flag = birth_will_go_smoothly - has_character_flag = birth_child_will_become_sickly - has_character_flag = birth_mother_will_become_ill - } -} - -allow_naming_on_birth_of_child_trigger = { - save_temporary_scope_as = naming_parent - exists = $CHILD$ - is_ai = no - is_close_family_of = $CHILD$ - OR = { - #I am the only player parent of child - NOT = { - $CHILD$ = { - any_parent = { - is_ai = no - this != scope:naming_parent - } - } - } - #I am the best player to name this child - AND = { - $CHILD$ = { #There are two player parents - exists = father - exists = mother - NOT = { any_parent = { is_ai = yes } } - } - OR = { - AND = { #They are of my dynasty, not theirs - dynasty = $CHILD$.dynasty - $CHILD$ = { - any_parent = { - this != scope:naming_parent - NOT = { dynasty = $CHILD$.dynasty } - } - } - } - AND = { #I am their mother, and parents are of same dynasty/neither has baby's dynasty - $CHILD$ = { mother = { this = scope:naming_parent } } - OR = { - $CHILD$.mother.dynasty = $CHILD$.father.dynasty - NOR = { - $CHILD$.mother.dynasty = $CHILD$.dynasty - $CHILD$.father.dynasty = $CHILD$.dynasty - } - } - } - } - } - } -} - diff --git a/N3OW/common/scripted_triggers/00_board_game_scripted_triggers.txt b/N3OW/common/scripted_triggers/00_board_game_scripted_triggers.txt deleted file mode 100644 index 377f765c..00000000 --- a/N3OW/common/scripted_triggers/00_board_game_scripted_triggers.txt +++ /dev/null @@ -1,83 +0,0 @@ - -################################################## -# GENERIC TRIGGERS - -# Note: this is a very stripped down trigger set. It's expected that it'll be parsed through something that parses out more typically unsuitable candidates (e.g., prisoners under most circumstances). -bg_can_start_board_game_trigger = { - # Check for the usual stuff. - can_start_board_game_eligibility_checks_trigger = yes - # And filter out those who can never play a board game. - bg_can_start_board_game_is_scope_banned_checks_trigger = no -} - -can_start_board_game_eligibility_checks_trigger = { - # Children need to be old enough to know to not eat the playing pieces. - age >= 8 - # Otherwise, we're actually pretty forgiving of basically everyone being able to play somehow. For now. -} - -bg_can_start_board_game_is_scope_banned_checks_trigger = { - # Currently, we just *always* filter anyone who's already in a bout. - exists = var:engaged_in_board_game -} - -################################################## -# INTERACTION TRIGGERS - -bg_game_type_region_pachisi_trigger = { - OR = { - geographical_region = world_india - geographical_region = world_burma - } -} - -bg_game_type_region_hnefatafl_trigger = { - NOT = { geographical_region = board_game_fidchell_region } - OR = { - geographical_region = world_europe_north - geographical_region = world_europe_west_britannia - } -} - -bg_game_type_region_tabula_trigger = { - OR = { - geographical_region = world_asia_minor - geographical_region = world_europe_south - } -} - -bg_game_type_region_go_trigger = { - OR = { - geographical_region = world_tibet - geographical_region = world_asia_china - geographical_region = world_asia_japan - geographical_region = world_asia_korea - geographical_region = world_asia_southeast - } - -} - -bg_game_type_region_fidchell_trigger = { - geographical_region = board_game_fidchell_region -} - -bg_stake_land_valid_neighbouring_county_to_trade_trigger = { - tier = tier_county - # Suppress a false positive error. - trigger_if = { - limit = { tier = tier_county } - this != prev.capital_county - any_neighboring_county = { - # Ensure that they're swappable. - OR = { - # Generally, the county should be held by the other character. - holder = $NEIGHBOUR$ - # But OCMs can be traded too. - holder = { - liege = $NEIGHBOUR$ - sub_realm_size = 1 - } - } - } - } -} diff --git a/N3OW/common/scripted_triggers/00_building_requirement_triggers.txt b/N3OW/common/scripted_triggers/00_building_requirement_triggers.txt deleted file mode 100644 index 397d68f5..00000000 --- a/N3OW/common/scripted_triggers/00_building_requirement_triggers.txt +++ /dev/null @@ -1,886 +0,0 @@ -###################################################################### -# Government -###################################################################### - -building_requirement_tribal = { - scope:holder ?= { - OR = { - government_has_flag = government_is_tribal - government_has_flag = government_is_nomadic - government_has_flag = government_is_wanua - } - } -} - -building_requirement_wanua = { - scope:holder ?= { - government_has_flag = government_is_wanua - } -} - -building_requirement_tribal_holding_in_county = { - NOT = { - county = { - any_county_province = { - has_holding_type = tribal_holding - } - } - } -} - -building_requirement_nomad = { - scope:holder ?= { - government_has_flag = government_is_nomadic - } -} - -building_requirement_nomad_holding_in_county = { - NOT = { - county = { - any_county_province = { - has_holding_type = nomad_holding - } - } - } -} - -building_requirement_herder = { - scope:holder ?= { - government_has_flag = government_is_herder - } -} - -building_requirement_herder_holding_in_county = { - NOT = { - county = { - any_county_province = { - has_holding_type = herder_holding - } - } - } -} - -###################################################################### -# Holding Level -###################################################################### - -building_requirement_castle_city_church = { - trigger_if = { - limit = { has_holding_type = castle_holding } - has_building_or_higher = castle_$LEVEL$ - } - trigger_else_if = { - limit = { has_holding_type = city_holding } - has_building_or_higher = city_$LEVEL$ - } - trigger_else_if = { - limit = { has_holding_type = church_holding } - has_building_or_higher = temple_$LEVEL$ - } - trigger_else_if = { - limit = { has_holding_type = temple_citadel_holding } - has_building_or_higher = temple_citadel_$LEVEL$ - } - trigger_else = { - custom_description = { - text = "building_requirement_castle_city_church_failed" - always = no - } - } -} - -###################################################################### -# Special -###################################################################### - -building_hall_of_heroes_requirement = { - custom_description = { - text = building_requirement_hall_of_heroes_failed - has_variable = hall_of_heroes - scope:holder = { - OR = { - has_religion = religion:baltic_religion - has_religion = religion:slavic_religion - has_religion = religion:finno_ugric_religion - has_religion = religion:siberian_religion - } - } - } -} - -building_university_requirement = { - #has_variable = university -} - -###################################################################### -# Terrain -###################################################################### - -building_common_tradeport_requirement_terrain = { - OR = { - is_coastal = yes - is_riverside_province = yes - } -} - -building_pastures_requirement_terrain = { - OR = { - terrain = farmlands - terrain = plains - terrain = steppe - terrain = desert - terrain = drylands - terrain = oasis - terrain = mountains - terrain = desert_mountains - terrain = hills - terrain = floodplains - AND = { - terrain = jungle - NOT = { geographical_region = world_innovation_elephants } - } - } -} - -building_hunting_grounds_requirement_terrain = { - OR = { - terrain = plains - terrain = drylands - terrain = steppe - terrain = hills - terrain = taiga - terrain = forest - terrain = jungle - terrain = wetlands - } -} - -building_orchards_requirement_terrain = { - OR = { - terrain = floodplains - terrain = oasis - has_building_or_higher = qanats_05 - culture = { - has_cultural_parameter = vegetarian_fruit_orchard_allowed - } - } -} - -building_farm_estates_requirement_terrain = { - terrain = farmlands -} - -building_military_camps_requirement_terrain = { - #OR = { # All Terrains - # terrain = farmlands - # terrain = plains - # terrain = drylands - # terrain = desert - # terrain = oasis - # terrain = floodplains - # terrain = steppe - # terrain = mountains - # terrain = desert_mountains - # terrain = wetlands - # terrain = forest - # terrain = taiga - # terrain = jungle - # terrain = hills - #} -} - -building_regimental_grounds_requirement_terrain = { - OR = { - terrain = floodplains - terrain = farmlands - } -} - -building_ramparts_requirement_terrain = { - OR = { - terrain = taiga - terrain = forest - terrain = jungle - } -} - -building_curtain_walls_requirement_terrain = { - OR = { - terrain = farmlands - terrain = plains - terrain = wetlands - terrain = floodplains - } -} - -building_watchtowers_requirement_terrain = { - OR = { - terrain = desert - terrain = drylands - terrain = oasis - terrain = steppe - } -} - -building_paddy_fields_requirement_terrain = { - OR = { - terrain = terraced_hills - AND = { - terrain = floodplains - OR = { - geographical_region = graphical_east_asia - geographical_region = custom_viet_lands - } - } - AND = { - terrain = wetlands - county.culture = { has_cultural_parameter = champa_rice_wet_land_paddies } - } - AND = { - OR = { - terrain = hills - terrain = jungle - } - county.culture = { has_cultural_parameter = rice_cultivators_can_construct_paddy_fields_in_hills_and_jungle } - } - } -} - -building_cereal_fields_requirement_terrain = { - OR = { - terrain = farmlands - terrain = plains - terrain = drylands - AND = { - terrain = floodplains - NOR = { - geographical_region = graphical_east_asia - geographical_region = custom_viet_lands - } - } - county = { - OR = { - has_county_modifier = fertile_desert_mountains_modifier - has_county_modifier = dodekapolis_modifier - } - } - - has_building_or_higher = qanats_05 - } -} - -building_outposts_requirement_terrain = { - OR = { - terrain = wetlands - terrain = taiga - terrain = forest - terrain = jungle - } -} - -building_barracks_requirement_terrain = { - #OR = { - # terrain = farmlands - # terrain = plains - # terrain = drylands - # terrain = floodplains # new - # terrain = hills - # terrain = mountains - # terrain = forest - # terrain = taiga - # terrain = jungle - # terrain = wetlands - # terrain = steppe - #} -} - -building_camel_farms_requirement_terrain = { - geographical_region = world_innovation_camels # new - OR = { - terrain = desert - terrain = desert_mountains - terrain = oasis - terrain = floodplains - terrain = drylands # new - } -} - -building_stables_requirement_terrain = { - # All terrains -} - -building_smiths_requirement_terrain = { - # All terrains -} - -building_workshops_requirement_terrain = { - # All terrains -} - -building_logging_camps_requirement_terrain = { - OR = { - terrain = taiga - terrain = forest - terrain = jungle - } -} - -building_peat_quarries_requirement_terrain = { - terrain = wetlands -} - -building_hill_farms_requirement_terrain = { - OR = { - terrain = hills - terrain = terraced_hills - } -} - -building_elephant_pens_requirement_terrain = { - terrain = jungle - OR = { - geographical_region = world_innovation_elephants - culture = { has_cultural_parameter = elephant_pens_building_bonuses } - } -} - -building_horse_pastures_requirement_terrain = { - OR = { - terrain = steppe - geographical_region = world_steppe_east - culture = { has_cultural_parameter = unlock_horse_pastures_building } - } -} - -building_plantations_requirement_terrain = { - OR = { - terrain = drylands - terrain = desert - terrain = oasis - } -} - -building_quarries_requirement_terrain = { - OR = { - terrain = mountains - terrain = desert_mountains - culture = { has_cultural_parameter = can_build_quarries_everywhere } - } -} - -building_warrior_lodges_requirement_terrain = { - OR = { - AND = { - OR = { - terrain = mountains - terrain = desert_mountains - terrain = hills - } - NOT = { geographical_region = world_horse_buildings_in_hills_and_mountains } - } - culture = { has_cultural_parameter = warrior_lodges_lift_restrictions } - } -} - -building_hillside_grazing_requirement_terrain = { - OR = { - terrain = mountains - terrain = desert_mountains - terrain = hills - } - geographical_region = world_horse_buildings_in_hills_and_mountains -} - -building_wind_furnace_requirement_terrain = { - geographical_region = world_india - OR = { - is_coastal = yes - AND = { - scope:holder.top_liege = { - any_realm_county = { - any_county_province = { - has_building_or_higher = konasamudram_mines_01 - } - } - } - duchy = { - any_de_jure_county = { - any_county_province = { - has_building_or_higher = konasamudram_mines_01 - } - } - } - } - - } - - scope:holder.culture = { has_innovation = innovation_wootz_steel } -} - -building_hill_forts_requirement_terrain = { - OR = { - terrain = mountains - terrain = desert_mountains - terrain = hills - terrain = terraced_hills - } -} - -building_windmills_requirement_terrain = { - county ?= { - any_county_province = { - OR = { - terrain = farmlands - terrain = plains - terrain = hills - is_coastal = yes - } - } - } -} - -building_watermills_requirement_terrain = { - county ?= { - any_county_province = { - OR = { - terrain = mountains - terrain = wetlands - terrain = forest - terrain = taiga - terrain = jungle - terrain = terraced_hills - is_riverside_province = yes - } - } - } -} - -building_caravanserai_requirement_terrain = { - county ?= { - any_county_province = { - OR = { - terrain = drylands - terrain = desert - terrain = oasis - terrain = floodplains - terrain = steppe - terrain = desert_mountains - AND = { - geographical_region = world_europe_west_iberia - has_global_variable = fp2_struggle_conciliation_ending - } - } - } - } -} - -building_qanats_requirement_terrain = { - county ?= { - culture = { has_cultural_parameter = unlocks_qanat_building } - county_has_province_with_terrain = { - terrain = hills - terrain = mountains - terrain = desert_mountains - terrain = desert - terrain = drylands - } - } -} - -building_hospices_requirement_terrain = { - -} - -has_any_special_mine_trigger = { - has_building_with_flag = special_mine - #OR = { - # has_building_or_higher = rammelsberg_mines_01 - # has_building_or_higher = kutna_hora_mines_01 - # has_building_or_higher = kremnica_mines_01 - # has_building_or_higher = falun_mines_01 - # has_building_or_higher = schwaz_mines_01 - # has_building_or_higher = argentiera_mines_01 - # has_building_or_higher = kollur_mines_01 - # has_building_or_higher = siderokausia_mines_01 - # has_building_or_higher = mali_mines_01 - # has_building_or_higher = konasamudram_mines_01 - # has_building_or_higher = dean_mines_01 - # has_building_or_higher = phnom_dek_mines_01 - # has_building_or_higher = zawar_mines_01 - # has_building_or_higher = takkeda_mines_01 - # has_building_or_higher = khetri_mines_01 - # has_building_or_higher = taghaza_mines_01 - # has_building_or_higher = ijil_mines_01 - # has_building_or_higher = turda_mines_01 - # has_building_or_higher = phocaea_mines_01 - # has_building_or_higher = pansjhir_mines_01 - # has_building_or_higher = trepca_mines_01 - # has_building_or_higher = rudnik_mines_01 - # has_building_or_higher = cevennes_mines_01 - # has_building_or_higher = allaq_mines_01 - # has_building_or_higher = verespatak_mines_01 - # has_building_or_higher = nishapur_mines_01 - # has_building_or_higher = srebrenica_mines_01 - # has_building_or_higher = ratnapura_mines_01 - # has_building_or_higher = mogok_mines_01 - #} -} - -###################################################################### -# Baronies that cannot have a holding (intended for Sahara) -###################################################################### - -barony_cannot_construct_holding = { - barony.title_province = { - OR = { - terrain = desert - terrain = desert_mountains - } - geographical_region = world_africa_sahara - } -} - -###################################################################### -# Triggers for add_random_building_effect script effect -###################################################################### - -# is any existing building of the checked tier? (e.g. 02) -has_any_building_of_level_trigger = { - OR = { - has_building = outposts_$BUILDING_LEVEL$ - has_building = logging_camps_$BUILDING_LEVEL$ - has_building = peat_quarries_$BUILDING_LEVEL$ - has_building = hill_forts_$BUILDING_LEVEL$ - has_building = plantations_$BUILDING_LEVEL$ - has_building = quarries_$BUILDING_LEVEL$ - has_building = hunting_grounds_$BUILDING_LEVEL$ - has_building = military_camps_$BUILDING_LEVEL$ - has_building = pastures_$BUILDING_LEVEL$ - has_building = ramparts_$BUILDING_LEVEL$ - has_building = curtain_walls_$BUILDING_LEVEL$ - has_building = watchtowers_$BUILDING_LEVEL$ - has_building = cereal_fields_$BUILDING_LEVEL$ - has_building = barracks_$BUILDING_LEVEL$ - has_building = camel_farms_$BUILDING_LEVEL$ - has_building = hill_farms_$BUILDING_LEVEL$ - has_building = elephant_pens_$BUILDING_LEVEL$ - has_building = common_tradeport_$BUILDING_LEVEL$ - has_building = orchards_$BUILDING_LEVEL$ - has_building = farm_estates_$BUILDING_LEVEL$ - has_building = regimental_grounds_$BUILDING_LEVEL$ - has_building = monastic_schools_$BUILDING_LEVEL$ - } -} - -# is any existing building a lower tier than compare building? -has_lesser_building_trigger = { - trigger_if = { - limit = { has_building_or_higher = $COMPARE$_02 } - has_any_building_of_level_trigger = { BUILDING_LEVEL = 01 } - } - trigger_else_if = { - limit = { has_building_or_higher = $COMPARE$_03 } - OR = { - has_any_building_of_level_trigger = { BUILDING_LEVEL = 01 } - has_any_building_of_level_trigger = { BUILDING_LEVEL = 02 } - } - } - trigger_else_if = { - limit = { has_building_or_higher = $COMPARE$_04 } - OR = { - has_any_building_of_level_trigger = { BUILDING_LEVEL = 01 } - has_any_building_of_level_trigger = { BUILDING_LEVEL = 02 } - has_any_building_of_level_trigger = { BUILDING_LEVEL = 03 } - } - } - trigger_else_if = { - limit = { has_building_or_higher = $COMPARE$_05 } - OR = { - has_any_building_of_level_trigger = { BUILDING_LEVEL = 01 } - has_any_building_of_level_trigger = { BUILDING_LEVEL = 02 } - has_any_building_of_level_trigger = { BUILDING_LEVEL = 03 } - has_any_building_of_level_trigger = { BUILDING_LEVEL = 04 } - } - } - trigger_else_if = { - limit = { has_building_or_higher = $COMPARE$_06 } - OR = { - has_any_building_of_level_trigger = { BUILDING_LEVEL = 01 } - has_any_building_of_level_trigger = { BUILDING_LEVEL = 02 } - has_any_building_of_level_trigger = { BUILDING_LEVEL = 03 } - has_any_building_of_level_trigger = { BUILDING_LEVEL = 04 } - has_any_building_of_level_trigger = { BUILDING_LEVEL = 05 } - } - } - trigger_else_if = { - limit = { has_building_or_higher = $COMPARE$_07 } - OR = { - has_any_building_of_level_trigger = { BUILDING_LEVEL = 01 } - has_any_building_of_level_trigger = { BUILDING_LEVEL = 02 } - has_any_building_of_level_trigger = { BUILDING_LEVEL = 03 } - has_any_building_of_level_trigger = { BUILDING_LEVEL = 04 } - has_any_building_of_level_trigger = { BUILDING_LEVEL = 05 } - has_any_building_of_level_trigger = { BUILDING_LEVEL = 06 } - } - } - trigger_else = { always = no } # Must already be highest tier possible -} - -# can this building be added? -add_random_building_trigger = { - building_$BUILDING$_requirement_terrain = yes # terrain fits building type - trigger_if = { # if all slots are full, this building type exists already - limit = { free_building_slots = 0 } - has_building_or_higher = $BUILDING$_01 - NOT = { - has_lesser_building_trigger = { COMPARE = $BUILDING$ } - } - } - trigger_else = { - NOT = { has_building_or_higher = $BUILDING$_01 } - } -} - -# Innovation and holding level triggers for most economic buildings -generic_economic_building_innovation_trigger = { - trigger_if = { - limit = { has_building_or_higher = $BUILDING$_01 } - scope:build_owner.culture = { has_innovation = innovation_crop_rotation } - } - trigger_if = { - limit = { has_building_or_higher = $BUILDING$_02 } - building_requirement_castle_city_church = { LEVEL = 02 } - scope:build_owner.culture = { has_innovation = innovation_manorialism } - } - trigger_if = { - limit = { has_building_or_higher = $BUILDING$_04 } - building_requirement_castle_city_church = { LEVEL = 03 } - scope:build_owner.culture = { has_innovation = innovation_guilds } - } - trigger_if = { - limit = { has_building_or_higher = $BUILDING$_06 } - building_requirement_castle_city_church = { LEVEL = 04 } - scope:build_owner.culture = { has_innovation = innovation_cranes } - } -} - -# Innovation and holding level triggers for most fortification buildings -generic_fortification_building_innovations_trigger = { - trigger_if = { - limit = { has_building_or_higher = $BUILDING$_01 } - scope:build_owner.culture = { has_innovation = innovation_motte } - } - trigger_if = { - limit = { has_building_or_higher = $BUILDING$_02 } - building_requirement_castle_city_church = { LEVEL = 02 } - scope:build_owner.culture = { has_innovation = innovation_battlements } - } - trigger_if = { - limit = { has_building_or_higher = $BUILDING$_04 } - building_requirement_castle_city_church = { LEVEL = 03 } - scope:build_owner.culture = { has_innovation = innovation_hoardings } - } - trigger_if = { - limit = { has_building_or_higher = $BUILDING$_06 } - building_requirement_castle_city_church = { LEVEL = 04 } - scope:build_owner.culture = { has_innovation = innovation_machicolations } - } -} - -# Innovation and holding level triggers for most recruitment buildings -generic_recruitment_building_innovations_trigger = { - trigger_if = { - limit = { has_building_or_higher = $BUILDING$_01 } - scope:build_owner.culture = { has_innovation = innovation_barracks } - } - trigger_if = { - limit = { has_building_or_higher = $BUILDING$_02 } - building_requirement_castle_city_church = { LEVEL = 02 } - scope:build_owner.culture = { has_innovation = innovation_burhs } - } - trigger_if = { - limit = { has_building_or_higher = $BUILDING$_04 } - building_requirement_castle_city_church = { LEVEL = 03 } - scope:build_owner.culture = { has_innovation = innovation_castle_baileys } - } - trigger_if = { - limit = { has_building_or_higher = $BUILDING$_06 } - building_requirement_castle_city_church = { LEVEL = 04 } - scope:build_owner.culture = { has_innovation = innovation_royal_armory } - } -} - -islamic_special_building_trigger = { - OR = { - has_building = holy_site_great_mosque_of_djenne_01 - has_building = holy_site_great_mosque_of_samarra_01 - has_building = holy_site_prophetic_mosque_01 - has_building = hagia_sophia_02 - has_building = the_friday_mosque_01 # shared zoroastrian - has_building = holy_site_great_mosque_of_cordoba_01 # shared christian - has_building_or_higher = damascus_mosque_01 - } -} - -christian_special_building_trigger = { - OR = { - has_building = holy_site_cologne_cathedral_01 - has_building = holy_site_canterbury_cathedral_01 - has_building = holy_site_canterbury_cathedral_02 - has_building = holy_site_canterbury_cathedral_03 - has_building = temple_of_uppsala_01 - has_building = temple_of_uppsala_02 - has_building = lund_cathedral_01 - has_building = holy_site_great_mosque_of_cordoba_01 # shared muslim - has_building_or_higher = cluny_abbey_01 - has_building_or_higher = beta_giyorgis_01 - has_building_or_higher = holy_wisdom_01 - has_building_or_higher = duomo_florence_01 - has_building_or_higher = wawel_cathedral_01 - } -} - -eastern_special_building_trigger = { - OR = { - has_building = buddhas_of_bamian_01 - has_building = brihadeeswarar_temple_01 - has_building = shwedagon_pagoda_01 - has_building = ananda_temple_01 - has_building = khajuraho_01 - has_building_or_higher = jokhang_01 - has_building_or_higher = konark_temple_01 - has_building_or_higher = vatapi_caves_01 - } -} - -# Religious special building triggers -religious_special_building_exclusion_trigger = { # checks if any special buildings present do not fit your religion - OR = { - AND = { # Generic - NOT = { - barony = { is_holy_site_of = holder.faith } - } - OR = { - has_building = holy_site_cathedral_01 - has_building = holy_site_mosque_01 - has_building = holy_site_pagan_grand_temple_01 - has_building = holy_site_indian_grand_temple_01 - has_building = holy_site_other_grand_temple_01 - has_building = hagia_sophia_01 - has_building = holy_site_mahabodhi_temple_01 - has_building = holy_site_imam_ali_mosque_01 - has_building = holy_site_great_mosque_of_mecca_01 - islamic_special_building_trigger = yes - christian_special_building_trigger = yes - has_building = holy_site_buddhist_grand_temple_01 - has_building = holy_site_japanese_temple_01 - has_building = holy_site_chinese_temple_01 - has_building = holy_site_se_asia_pagan_temple_01 - } - } - AND = { # Islamic - NOT = { barony.holder.religion = religion:islam_religion } - islamic_special_building_trigger = yes - } - AND = { # Christian - NOT = { barony.holder.religion = religion:christianity_religion } - christian_special_building_trigger = yes - } - AND = { # Islamic/Zoroastrian - NOT = { barony.holder.religion = religion:zoroastrianism_religion } - has_building = the_friday_mosque_01 # shared muslim - } - AND = { # Eastern family - NOR = { - ROOT.religion = religion:hinduism_religion - ROOT.religion = religion:buddhism_religion - ROOT.religion = religion:jainism_religion - ROOT.religion = religion:taoism_religion - ROOT.religion = religion:zoroastrianism_religion - } - eastern_special_building_trigger = yes - } - # Judaism - AND = { - barony.holder.religion = religion:judaism_religion - has_building = dome_of_the_rock_01 - } - AND = { - NOT = { barony.holder.religion = religion:judaism_religion } - has_building = temple_in_jerusalem_01 - } - } -} - -building_murex_farm_requirement_terrain = { - is_county_capital = yes - is_coastal = yes - geographical_region = mediteranean_coast - NOR = { - this.barony = title:b_salmydessus - this.barony = title:b_chelai - } -} - -building_waterworks_requirement_terrain = { - is_county_capital = yes - NOR = { - terrain = mountains - terrain = desert_mountains - } - scope:holder.culture = { has_cultural_parameter = unlocks_waterworks_buildings } -} - -building_spice_plantation_requirement_terrain = { - is_county_capital = yes - - # cloves, nutmeg: present on Muluku Islands - # cinnamomum verum: India, Sri Lanka, Bangladesh and Myanmar - # cinnamomum malabathrum: Eastern Himalayas & Western Ghats - OR = { - geographical_region = world_asia_southeast_mainland - geographical_region = world_asia_borneo - geographical_region = world_asia_sulawesi_maluku - geographical_region = world_asia_indonesia - geographical_region = world_india - } - OR = { - terrain = jungle - terrain = farmlands - terrain = terraced_hills - terrain = plains - } -} - -building_examination_hall_requirement_terrain = { - is_county_capital = yes - - scope:holder = { - government_has_flag = government_has_merit - } -} - -building_breweries_requirement = { - OR = { - AND = { - has_building_or_higher = temple_$NUMBER$ - OR = { - faith = faith:catholic - faith = { has_doctrine_parameter = allows_brewery } - } - } - AND = { - has_building_or_higher = city_$NUMBER$ - culture = { has_cultural_parameter = allows_brewery } - } - } -} - -#building_powder_magazine_requirement = { -# scope:build_owner.culture = { -# OR = { -# has_innovation = innovation_gunpowder -# has_innovation = innovation_fire_medicine -# } -# } -#} diff --git a/N3OW/common/scripted_triggers/00_childhood_triggers.txt b/N3OW/common/scripted_triggers/00_childhood_triggers.txt deleted file mode 100644 index 049edc53..00000000 --- a/N3OW/common/scripted_triggers/00_childhood_triggers.txt +++ /dev/null @@ -1,414 +0,0 @@ -@infant_upper_age_threshold_value = 2 -@teen_lower_threshold_value = 13 -@teen_upper_threshold_value = 19 - -child_is_infant_trigger = { - age <= @infant_upper_age_threshold_value - is_adult = no -} - -# Duplicated because there were some weird edge case OR uses where "child_is_infant_trigger = no" read _extremely_ confusingly. -child_not_infant_trigger = { - age > @infant_upper_age_threshold_value - is_adult = no -} - -# At what point is it not weird to hear a child using (relatively) advanced reasoning & so able to hold an extended conversation? -child_can_have_full_conversations_trigger = { - age >= 6 - is_adult = no -} - -child_not_teen_trigger = { - child_not_infant_trigger = yes - age < @teen_lower_threshold_value - is_adult = no -} - -# Duplicated because there were some weird edge case OR uses where "child_not_teen_trigger = no" read _extremely_ confusingly. -child_is_teen_trigger = { - age >= @teen_lower_threshold_value - is_adult = no -} - -child_old_enough_for_responsibility_trigger = { - age >= 8 - is_adult = no -} - -# Note: we don't want to say that children below this definitely can't read, that's a lot of edge cases to account for, but it's convenient to roughly unified trigger we can check for whether pensive characters are more likely to read or be read to. -child_likely_reader_trigger = { age >= 7 } - -character_is_teen_trigger = { - age >= @teen_lower_threshold_value - age <= @teen_upper_threshold_value -} - -character_is_teen_or_older_trigger = { - age > @teen_lower_threshold_value -} - -save_good_friend_character_trigger_check = { - is_adult = no - age >= root.age_dif_child_down_friend - age <= root.age_dif_child_up_friend - this != root - is_imprisoned = no - opinion = { - target = root - value > -10 - } - NOR = { - has_relation_friend = root - has_any_bad_relationship_with_root_trigger = yes - } -} - - -save_good_crush_character_trigger_check = { - is_adult = no - age >= root.age_dif_child_down - age <= root.age_dif_child_up - age > childhood_education_start_age - this != root - is_imprisoned = no - is_close_family_of_root_trigger = no - NOR = { - root = { has_relation_crush = prev } - has_relation_victim = root - } - OR = { - has_sexuality = heterosexual - has_sexuality = bisexual - has_sexuality = homosexual - } - is_attracted_to_gender_of = root - root = { is_attracted_to_gender_of = prev } - OR = { - num_of_relation_crush <= 2 - has_trait = lustful - } -} - -save_good_bully_character_trigger_check = { - is_adult = no - age >= 6 - age >= root.age - this != root - is_imprisoned = no - OR = { - has_trait_malicious_trigger = yes - has_trait_dominant_trigger = yes - has_trait_emotional_trigger = yes - } - NOR = { - has_trait = compassionate - has_trait_submissive_trigger = yes - } - opinion = { - target = root - value < 0 - } - NOR = { - has_any_bad_relationship_with_root_trigger = yes - has_relation_victim = root - has_relation_friend = root - has_relation_crush = root - } - tgp_is_chinese_style_emperor_trigger = no # This would be weird, otherwise -} - -save_good_victim_character_trigger_check = { - is_adult = no - age >= 6 - age <= root.age - this != root - is_imprisoned = no - reverse_opinion = { - target = root - value < 0 - } - NOR = { - has_any_bad_relationship_with_root_trigger = yes - has_relation_victim = root - has_relation_friend = root - has_relation_crush = root - } - tgp_is_chinese_style_emperor_trigger = no # This would be weird, otherwise -} - -child_suitable_to_play_with_character = { - # Is available for events at $CHARACTER$'s locale. - is_available_child = yes - location ?= $CHARACTER$.location - # Of a suitable age range. - child_not_infant_trigger = yes - # Doesn't have a bad relationship with $CHARACTER$. - NOT = { - has_any_bad_relationship_with_character_trigger = { CHARACTER = $CHARACTER$ } - } -} - -child_suitable_to_play_with_character_one_sided = { - child_suitable_to_play_with_character = { CHARACTER = $CHARACTER$ } - is_ai = yes -} - - - -childhood_mean_child_trigger = { - OR = { - has_trait = rowdy - has_personality_malicious_trigger = yes - has_personality_dominant_trigger = yes - ai_compassion <= low_negative_ai_value - } -} - -childhood_loud_child_trigger = { - OR = { - has_trait = curious - has_trait = bossy - has_personality_extroverted_trigger = yes - has_personality_emotional_trigger = yes - ai_energy >= low_positive_ai_value - ai_boldness >= low_positive_ai_value - } -} - -childhood_quiet_child_trigger = { - OR = { - has_trait = pensive - has_personality_submissive_trigger = yes - has_personality_introverted_trigger = yes - ai_energy <= low_negative_ai_value - ai_boldness <= low_negative_ai_value - } -} - -childhood_nice_child_trigger = { - OR = { - has_trait = charming - has_trait = curious - has_personality_benevolent_trigger = yes - has_personality_levelheaded_trigger = yes - ai_compassion >= low_positive_ai_value - } -} - -suitable_same_realm_child = { - trigger_if = { - limit = { - OR = { - father ?= { - is_ai = no - } - mother ?= { - is_ai = no - } - host ?= { - is_ai = no - } - } - } - location.county.holder ?= { # Scoping like this allows children in the pool to also get this event - OR = { - AND = { - is_ai = yes - is_available_child = yes - this != root - age >= 6 - } - any_courtier_or_guest = { - is_ai = yes - is_available_child = yes - this != root - age >= 6 - } - any_warden_hostage = { - is_ai = yes - is_available_child = yes - this != root - age >= 6 - } - any_vassal = { - is_ai = yes - is_available_child = yes - this != root - age >= 6 - } - any_vassal = { - any_courtier_or_guest = { - is_ai = yes - is_available_child = yes - this != root - age >= 6 - } - } - } - } - } - trigger_else = { - location.county.holder ?= { # Scoping like this allows children in the pool to also get this event - OR = { - AND = { - is_ai = yes - is_available_child = yes - this != root - age >= 6 - } - any_courtier = { - is_ai = yes - is_available_child = yes - this != root - age >= 6 - } - any_warden_hostage = { - is_ai = yes - is_available_child = yes - this != root - age >= 6 - } - } - } - } -} - -similar_age_same_court_child = { - exists = location.county.holder # Scoping like this allows children in the pool to also get this event - location.county.holder = { - OR = { - AND = { - is_ai = yes - is_available_child = yes - this != root - age <= root.age_plus_3 - age >= age_minus_3 - } - any_courtier_or_guest = { - is_ai = yes - is_available_child = yes - this != root - age <= root.age_plus_3 - age >= age_minus_3 - } - any_warden_hostage = { - is_ai = yes - is_available_child = yes - this != root - age <= root.age_plus_3 - age >= age_minus_3 - } - } - } -} - -suitable_crush_trigger = { - AND = { - save_temporary_scope_as = temp_crush - is_ai = yes - is_available_child = yes - this != root - child_not_infant_trigger = yes - age <= root.age_plus_3 - age >= root.age_minus_3 - location = root.location - OR = { - matching_gender_and_sexuality_trigger = { - CHARACTER_1 = root - CHARACTER_2 = scope:temp_crush - } - AND = { - has_sexuality = asexual - root = { - OR = { - is_attracted_to_gender_of = scope:temp_crush - has_sexuality = asexual - } - } - } - AND = { - root = { has_sexuality = asexual } - OR = { - is_attracted_to_gender_of = root - has_sexuality = asexual - } - } - } - NOT = { - relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = root } - } - } -} - -suitable_crush_same_court_child = { - exists = location.county.holder # Scoping like this allows children in the pool to also get this event - location.county.holder = { - OR = { - save_good_crush_character_trigger_check = yes - any_courtier_or_guest = { - save_good_crush_character_trigger_check = yes - } - any_warden_hostage = { - save_good_crush_character_trigger_check = yes - } - } - } -} - -guardian_or_court_tutor_trait = { - trigger_if = { - limit = { - any_relation = { - type = guardian - } - } - any_relation = { - type = guardian - has_trait = $TRAIT$ - } - } - trigger_else = { - OR = { - court_owner.court_position:court_tutor_court_position ?= { - has_trait = $TRAIT$ - } - court_owner.court_position:court_guru_court_position ?= { - has_trait = $TRAIT$ - } - } - } -} - -guardian_or_court_tutor_2_trait = { - trigger_if = { - limit = { - any_relation = { - type = guardian - } - } - any_relation = { - type = guardian - OR = { - has_trait = $TRAIT$ - has_trait = $TRAIT_2$ - } - } - } - trigger_else = { - OR = { - court_owner.court_position:court_tutor_court_position ?= { - OR = { - has_trait = $TRAIT$ - has_trait = $TRAIT_2$ - } - } - court_owner.court_position:court_guru_court_position ?= { - OR = { - has_trait = $TRAIT$ - has_trait = $TRAIT_2$ - } - } - } - } -} diff --git a/N3OW/common/scripted_triggers/00_clan_triggers.txt b/N3OW/common/scripted_triggers/00_clan_triggers.txt deleted file mode 100644 index 5b4fe944..00000000 --- a/N3OW/common/scripted_triggers/00_clan_triggers.txt +++ /dev/null @@ -1,26 +0,0 @@ -### CLAN TRIGGERS ### -is_in_clan_trigger = { - exists = house - government_has_flag = government_is_clan - top_liege = house.house_head -} - -is_in_same_clan_as_trigger = { - exists = house - exists = $CHARACTER$.house - OR = { - government_has_flag = government_is_clan - $CHARACTER$ = { government_has_flag = government_is_clan } - } - house = $CHARACTER$.house - top_liege = $CHARACTER$.top_liege -} - -check_tax_collector_aptitude = { - $CHARACTER$ = { - tax_collector_aptitude = { - target = clan_tax_slot - value = $VALUE$ - } - } -} diff --git a/N3OW/common/scripted_triggers/00_coa_triggers.txt b/N3OW/common/scripted_triggers/00_coa_triggers.txt deleted file mode 100644 index 1acfb316..00000000 --- a/N3OW/common/scripted_triggers/00_coa_triggers.txt +++ /dev/null @@ -1,532 +0,0 @@ -#Triggers to control Coat of Arms weighting - -coa_african_trigger = { - OR = { - coa_african_culture_trigger = yes - coa_african_religion_trigger = yes - } -} - -coa_african_culture_trigger = { - scope:culture = { - OR = { - has_coa_gfx = central_african_group_coa_gfx - has_coa_gfx = east_african_coa_gfx - has_coa_gfx = west_african_group_coa_gfx - } - } -} - -coa_african_religion_trigger = { - scope:faith.religion = { - save_temporary_scope_as = religion - } - scope:religion = { - OR = { - this = religion:akom_religion - this = religion:waaqism_religion - this = religion:west_african_religion - this = religion:west_african_bori_religion - this = religion:west_african_orisha_religion - this = religion:west_african_roog_religion - } - } -} - -coa_bishopric_trigger = { - scope:faith.religion = religion:christianity_religion - coa_theocratic_trigger = yes -} - -coa_breton_trigger = { - OR = { - scope:culture = { has_coa_gfx = breton_coa_gfx } - scope:title ?= { - any_this_title_or_de_jure_above = { - this = title:k_brittany - } - } - } -} - -coa_byzantine_trigger = { - OR = { - scope:culture = { has_coa_gfx = byzantine_group_coa_gfx } - scope:title ?= { - any_this_title_or_de_jure_above = { - this = title:e_byzantium - } - } - } -} - -coa_castilian_trigger = { - OR = { - scope:culture = { has_coa_gfx = castilian_coa_gfx } - scope:title ?= { - any_this_title_or_de_jure_above = { - this = title:k_castille - } - } - } -} - -coa_coptic_trigger = { - OR = { - scope:faith = faith:coptic - } -} - -coa_cross_trigger = { - scope:faith = { - religion = religion:christianity_religion - NOT = { has_doctrine = tenet_aniconism } - } -} - -coa_england_switches_to_france_coa_trigger = { - holder = { - OR = { - has_title = title:k_france - has_claim_on = title:k_france - has_title = title:e_france - has_claim_on = title:e_france - } - } -} -coa_switch_to_norman_trigger = { - holder.culture = { - OR = { - has_coa_gfx = english_coa_gfx - has_coa_gfx = frankish_group_coa_gfx - has_coa_gfx = latin_group_coa_gfx - has_coa_gfx = iberian_group_coa_gfx - } - } -} - -coa_switch_to_norse_trigger = { - holder = { - NOT = { - faith.religion = religion:christianity_religion - } - OR = { - faith.religion = religion:germanic_religion - culture = { has_coa_gfx = norse_coa_gfx } - } - } -} - -coa_feudal_trigger = { - scope:faith.religion = religion:christianity_religion - government_has_flag = government_is_feudal -} - -coa_french_trigger = { - OR = { - scope:culture = { has_coa_gfx = french_coa_gfx } - AND = { - exists = root - any_liege_or_above = { - primary_title = { - this = title:k_france - } - } - } - } -} - -coa_irish_trigger = { - OR = { - scope:culture = { has_coa_gfx = irish_coa_gfx } - scope:title ?= { - any_this_title_or_de_jure_above = { - this = title:k_ireland - } - } - } -} - - -coa_indian_culture_trigger = { - scope:culture = { - OR = { - has_coa_gfx = burman_group_coa_gfx - has_coa_gfx = dravidian_group_coa_gfx - has_coa_gfx = indo_aryan_group_coa_gfx - has_coa_gfx = tibetan_group_coa_gfx - } - } -} -coa_indian_region_trigger = { - exists = scope:title - scope:title = { - is_landless_type_title = no - title_province ?= { geographical_region = world_india } - } -} -coa_indian_religion_trigger = { - scope:faith.religion = { - save_temporary_scope_as = religion - } - scope:religion = { - OR = { - this = { is_in_family = rf_eastern } - this = religion:bon_religion - this = religion:buddhism_religion - this = religion:hinduism_religion - this = religion:jainism_religion - } - } -} -coa_indian_trigger = { - OR = { - coa_indian_culture_trigger = yes - coa_indian_region_trigger = yes - coa_indian_religion_trigger = yes - } - scope:culture = { has_graphical_east_asia_culture_group_trigger = no } -} - -coa_jewish_trigger = { - OR = { - scope:faith.religion = religion:judaism_religion - scope:culture = { has_coa_gfx = israelite_group_coa_gfx } - } -} - -coa_leonese_trigger = { - OR = { - scope:culture = { has_coa_gfx = leonese_coa_gfx } - scope:title ?= { - any_this_title_or_de_jure_above = { - this = title:k_leon - } - } - } -} - -coa_manx_trigger = { - OR = { - scope:title ?= { - any_this_title_or_de_jure_above = { - this = title:d_the_isles # Mann - } - } - AND = { - exists = root - any_liege_or_above = { - primary_title = { - OR = { - this = title:c_isle_of_man - this = title:d_the_isles # Mann - } - } - } - } - } -} - -coa_mena_trigger = { - OR = { - scope:faith.religion = religion:islam_religion - scope:culture = { - OR = { - has_coa_gfx = arabic_group_coa_gfx - has_coa_gfx = berber_group_coa_gfx - } - } - } -} - -coa_suomenusko_trigger = { - OR = { - scope:faith.religion = religion:finno_ugric_religion - scope:culture = { - OR = { - has_coa_gfx = balto_finnic_group_coa_gfx - has_coa_gfx = ugro_permian_group_coa_gfx - has_coa_gfx = volga_finnic_group_coa_gfx - } - } - } -} - -coa_polish_trigger = { - OR = { - scope:culture = { has_coa_gfx = polish_coa_gfx } - AND = { - exists = root - any_liege_or_above = { - primary_title = { - this = title:k_poland - } - } - } - } -} - -coa_scottish_trigger = { - OR = { - scope:culture = { has_coa_gfx = scottish_coa_gfx } - scope:title ?= { - any_this_title_or_de_jure_above = { - this = title:k_scotland - } - } - } -} - -coa_theocratic_trigger = { - exists = root - OR = { - government_has_flag = government_is_theocracy - is_theocratic_lessee = yes - } -} - -coa_welsh_trigger = { - scope:culture = { has_coa_gfx = welsh_coa_gfx } -} - -coa_tamga_trigger = { - scope:culture = { has_coa_gfx = steppe_coa_gfx } -} - -coa_scandinavian_trigger = { - scope:culture = { - OR = { - has_coa_gfx = swedish_coa_gfx - has_coa_gfx = norwegian_coa_gfx - has_coa_gfx = danish_coa_gfx - } - } -} - -coa_norse_trigger = { - scope:culture = { has_coa_gfx = norse_coa_gfx } -} - -coa_germanic_trigger = { - scope:culture = { has_coa_gfx = german_group_coa_gfx } -} - -coa_iberian_trigger = { - OR = { - scope:culture = { has_coa_gfx = iberian_group_coa_gfx } - AND = { - scope:culture = { has_coa_gfx = arabic_group_coa_gfx } - scope:title ?= { - OR = { - this = title:e_spain - empire ?= title:e_spain - } - } - } - } -} - -coa_iranian_trigger = { - scope:culture = { has_coa_gfx = iranian_group_coa_gfx } -} - -has_recognizable_chinese_seal = { - trigger_if = { - limit = { exists = scope:title } - scope:title = { is_noble_family_title = yes } - } - house ?= { - OR = { - ### CHINESE ### - has_base_name = "dynn_Bai_767D" - has_base_name = "dynn_Cai_8521" - has_base_name = "dynn_Cao_66F9" - has_base_name = "dynn_Chen_9673" - has_base_name = "dynn_Cheng_7A0B" - has_base_name = "dynn_Cui_5D14" - has_base_name = "dynn_Da_5927" - has_base_name = "dynn_Dai_6234" - has_base_name = "dynn_Deng_9127" - has_base_name = "dynn_Ding_4E01" - has_base_name = "dynn_Dong_8463" - has_base_name = "dynn_Du_675C" - has_base_name = "dynn_Duan_6BB5" - has_base_name = "dynn_Fan_8303" - has_base_name = "dynn_Fang_65B9" - has_base_name = "dynn_Feng_99AE" - has_base_name = "dynn_Fu_5085" - has_base_name = "dynn_Gao_9AD8" - has_base_name = "dynn_Gong_9F94" - has_base_name = "dynn_Gu_9867" - has_base_name = "dynn_Guo_90ED" - has_base_name = "dynn_Han_97D3" - has_base_name = "dynn_Hao_90DD" - has_base_name = "dynn_He_4F55" - has_base_name = "dynn_He_8CC0" - has_base_name = "dynn_Hou_4FAF" - has_base_name = "dynn_Hu_80E1" - has_base_name = "dynn_Huang_9EC3" - has_base_name = "dynn_Jia_8CC8" - has_base_name = "dynn_Jiang_59DC" - has_base_name = "dynn_Jiang_6C5F" - has_base_name = "dynn_Jiang_8523" - has_base_name = "dynn_Jin_91D1" - has_base_name = "dynn_Kong_5B54" - has_base_name = "dynn_Lei_96F7" - has_base_name = "dynn_Li_674E" - has_base_name = "dynn_Li_9ECE" - has_base_name = "dynn_Liang_6881" - has_base_name = "dynn_Liao_5ED6" - has_base_name = "dynn_Liao_907C" - has_base_name = "dynn_Lin_6797" - has_base_name = "dynn_Liu_5289" - has_base_name = "dynn_Long_9F8D" - has_base_name = "dynn_Lu_5442" - has_base_name = "dynn_Lu_76E7" - has_base_name = "dynn_Lu_9678" - has_base_name = "dynn_Luo_7F85" - has_base_name = "dynn_Ma_99AC" - has_base_name = "dynn_Mao_6BDB" - has_base_name = "dynn_Meng_5B5F" - has_base_name = "dynn_Meng_8499" - has_base_name = "dynn_Mo_83AB" - has_base_name = "dynn_Nan_5357" - has_base_name = "dynn_Nangong_5357" - has_base_name = "dynn_Ou_6B50" - has_base_name = "dynn_Pan_6F58" - has_base_name = "dynn_Peng_5F6D" - has_base_name = "dynn_Po_6734" - has_base_name = "dynn_Qian_9322" - has_base_name = "dynn_Qin_79E6" - has_base_name = "dynn_Qiu_90B1" - has_base_name = "dynn_Quan_6B0A" - has_base_name = "dynn_Ren_4EFB" - has_base_name = "dynn_Shan_55AE" - has_base_name = "dynn_Shao_90B5" - has_base_name = "dynn_Shen_6C88" - has_base_name = "dynn_Shi_53F2" - has_base_name = "dynn_Shi_77F3" - has_base_name = "dynn_Situ_53F8" - has_base_name = "dynn_Song_5B8B" - has_base_name = "dynn_Su_8607" - has_base_name = "dynn_Sun_5B6B" - has_base_name = "dynn_Tan_8983" - has_base_name = "dynn_Tan_8B5A" - has_base_name = "dynn_Tang_5510" - has_base_name = "dynn_Tao_9676" - has_base_name = "dynn_Tian_7530" - has_base_name = "dynn_Wan_842C" - has_base_name = "dynn_Wang_6C6A" - has_base_name = "dynn_Wang_738B" - has_base_name = "dynn_Wei_97CB" - has_base_name = "dynn_Wei_9B4F" - has_base_name = "dynn_Wen_6587" - has_base_name = "dynn_Wu_5433" - has_base_name = "dynn_Wu_6B66" - has_base_name = "dynn_Xia_590F" - has_base_name = "dynn_Xiang_5411" - has_base_name = "dynn_Xiao_856D" - has_base_name = "dynn_Xie_8B1D" - has_base_name = "dynn_Xie_90aa" - has_base_name = "dynn_Ximen_897F" - has_base_name = "dynn_Xin_8F9B" - has_base_name = "dynn_Xiong_718A" - has_base_name = "dynn_Xu_5F90" - has_base_name = "dynn_Xu_8A31" - has_base_name = "dynn_Xue_859B" - has_base_name = "dynn_Yan_56B4" - has_base_name = "dynn_Yan_95BB" - has_base_name = "dynn_Yang_694A" - has_base_name = "dynn_Yao_59DA" - has_base_name = "dynn_Ye_8449" - has_base_name = "dynn_Yin_5C39" - has_base_name = "dynn_Yu_4E8E" - has_base_name = "dynn_Yu_4F59" - has_base_name = "dynn_Yuan_8881" - has_base_name = "dynn_Yue_8D8A" - has_base_name = "dynn_Zeng_66FE" - has_base_name = "dynn_Zhang_5F35" - has_base_name = "dynn_Zhao_8A54" - has_base_name = "dynn_Zhao_8D99" - has_base_name = "dynn_Zheng_912D" - has_base_name = "dynn_Zhong_937E" - has_base_name = "dynn_Zhou_5468" - has_base_name = "dynn_Zhu_6731" - has_base_name = "dynn_Zou_9112" - ### KOREAN/BALHAE ### - has_base_name = "dynn_An_694A" - has_base_name = "dynn_Baek_767D" - has_base_name = "dynn_Bak_6734" - has_base_name = "dynn_Chae_8521" - has_base_name = "dynn_Choe_5D14" - has_base_name = "dynn_Dae_5927" - has_base_name = "dynn_Du_675C_KO" - has_base_name = "dynn_Gang_59DC" - has_base_name = "dynn_Gim_91D1" - has_base_name = "dynn_Go_9AD8" - has_base_name = "dynn_Gwak_90ED" - has_base_name = "dynn_Gwon_6B0A" - has_base_name = "dynn_Ha_590F" - has_base_name = "dynn_Ha_8CC0" - has_base_name = "dynn_Han_97D3_KO" - has_base_name = "dynn_I_674E" - has_base_name = "dynn_Im_4EFB" - has_base_name = "dynn_Jang_5F35" - has_base_name = "dynn_Jeong_912D" - has_base_name = "dynn_Jo_8D99" - has_base_name = "dynn_Ju_5468" - has_base_name = "dynn_Ju_6731" - has_base_name = "dynn_Ma_99AC_KO" - has_base_name = "dynn_Mun_6587" - has_base_name = "dynn_O_5433" - has_base_name = "dynn_Pung_99AE" - has_base_name = "dynn_Ra_7F85" - has_base_name = "dynn_Rim_6797" - has_base_name = "dynn_Sa_53F2" - has_base_name = "dynn_Seo_5F90" - has_base_name = "dynn_Sin_8F9B" - has_base_name = "dynn_Song_5B8B_KO" - has_base_name = "dynn_Wang_738B_KO" - has_base_name = "dynn_Yang_6881" - has_base_name = "dynn_Yang_694A_KO" - has_base_name = "dynn_Yeo_5442" - has_base_name = "dynn_Yu_5289" - has_base_name = "dynn_Yun_5C39" - ### VIET ### - has_base_name = "dynn_Bach_767D" - has_base_name = "dynn_Cao_9AD8" - has_base_name = "dynn_Chu_6731" - has_base_name = "dynn_Dao_9676" - has_base_name = "dynn_Dinh_4E01" - has_base_name = "dynn_Doan_6BB5" - has_base_name = "dynn_Dong_8463_VN" - has_base_name = "dynn_Duong_694A" - has_base_name = "dynn_Ha_4F55" - has_base_name = "dynn_Ho_80E1" - has_base_name = "dynn_Hoang_9EC3" - has_base_name = "dynn_Lam_6797" - has_base_name = "dynn_Le_9ECE" - has_base_name = "dynn_Loi_96F7" - has_base_name = "dynn_Luu_5289" - has_base_name = "dynn_Ly_674E" - has_base_name = "dynn_Mac_83AB" - has_base_name = "dynn_Ngo_5433" - has_base_name = "dynn_Phan_6F58" - has_base_name = "dynn_Pham_8303" - has_base_name = "dynn_Phung_99AE" - has_base_name = "dynn_Quach_90ED" - has_base_name = "dynn_Quyen_6B0A" - has_base_name = "dynn_Ta_8B1D" - has_base_name = "dynn_To_8607" - has_base_name = "dynn_Ton_5B6B" - has_base_name = "dynn_Tong_5B8B" - has_base_name = "dynn_Tran_9673" - has_base_name = "dynn_Trieu_8D99" - has_base_name = "dynn_Trinh_912D" - has_base_name = "dynn_Truong_5F35" - has_base_name = "dynn_Van_6587" - has_base_name = "dynn_Vu_6B66" - has_base_name = "dynn_Vuong_738B" - } - } -} diff --git a/N3OW/common/scripted_triggers/00_commander_triggers.txt b/N3OW/common/scripted_triggers/00_commander_triggers.txt deleted file mode 100644 index a3784ed2..00000000 --- a/N3OW/common/scripted_triggers/00_commander_triggers.txt +++ /dev/null @@ -1,62 +0,0 @@ -#Triggers relating to Commander Characters - -commander_in_terrain_specialisation = { - OR = { - AND = { - has_trait = desert_warrior - location = { - terrain = desert - terrain = desert_mountains - } - } - AND = { - has_trait = jungle_stalker - location = { terrain = jungle } - } - AND = { - has_trait = open_terrain_expert - location = { - terrain = farmlands - terrain = plains - terrain = steppe - } - } - AND = { - has_trait = rough_terrain_expert - location = { - terrain = hills - terrain = mountains - terrain = wetlands - } - } - AND = { - has_trait = forest_fighter - location = { - terrain = forest - terrain = taiga - } - } - } -} - -has_commander_trait_trigger = { - OR = { - has_trait = logistician - has_trait = military_engineer - has_trait = aggressive_attacker - has_trait = unyielding_defender - has_trait = forder - has_trait = flexible_leader - has_trait = desert_warrior - has_trait = jungle_stalker - has_trait = reaver - has_trait = reckless - has_trait = holy_warrior - has_trait = open_terrain_expert - has_trait = rough_terrain_expert - has_trait = forest_fighter - has_trait = cautious_leader - has_trait = organizer - has_trait = winter_soldier - } -} diff --git a/N3OW/common/scripted_triggers/00_compliment_triggers.txt b/N3OW/common/scripted_triggers/00_compliment_triggers.txt deleted file mode 100644 index 43e861f1..00000000 --- a/N3OW/common/scripted_triggers/00_compliment_triggers.txt +++ /dev/null @@ -1,22 +0,0 @@ -##################### -# COMPLIMENT SYSTEM # -##################### -#This system evaluates whether a character would accept a certain type of compliment (types listed below) from another character. It will set a compliment_outcome varaible with a flag value of either good, neutral or bad which can be used to trigger follow up events. Read more in the effects file. - -can_receieve_good_available_compliment_trigger = { - OR = { - ai_compassion >= low_positive_ai_value - ai_boldness >= low_positive_ai_value - ai_honor >= low_positive_ai_value - ai_greed >= low_positive_ai_value - ai_rationality >= low_positive_ai_value - ai_zeal >= low_positive_ai_value - ai_energy >= low_positive_ai_value - ai_vengefulness <= low_negative_ai_value - attraction >= 10 - has_trait = strong - has_trait = physique_good - has_personality_extroverted_trigger = yes - has_personality_dominant_trigger = yes - } -} \ No newline at end of file diff --git a/N3OW/common/scripted_triggers/00_councillor_triggers.txt b/N3OW/common/scripted_triggers/00_councillor_triggers.txt deleted file mode 100644 index f82e5245..00000000 --- a/N3OW/common/scripted_triggers/00_councillor_triggers.txt +++ /dev/null @@ -1,1156 +0,0 @@ - - -###TRIGGER LIST - -# councillor_loyalty_trigger - -#Spouse councillor: -# - - -#TRIGGERS - -can_be_councillor_basics_trigger = { - is_available_quick = { - adult = yes - incapable = no - imprisoned = no - } - is_at_war_with_liege = no - trigger_if = { - limit = { has_variable = block_hire_councillor } - NOT = { var:block_hire_councillor = liege } - } -} - -can_be_chancellor_trigger = { - can_be_councillor_basics_trigger = yes - $COURT_OWNER$ ?= { - NOT = { government_has_flag = government_is_nomadic } - } - NAND = { - has_council_position = councillor_court_chaplain - faith = { has_doctrine_parameter = clerical_appointment_fixed } - } - NOR = { - has_council_position = councillor_spouse - AND = { - this = liege.diarch - liege = { has_diarchy_active_parameter = diarchy_is_vizierate } - } - } - OR = { - is_ruler = yes - AND = { - is_female = yes - $COURT_OWNER$.faith = { NOT = { has_doctrine_parameter = male_dominated_council } } - } - AND = { - is_male = yes - $COURT_OWNER$.faith = { NOT = { has_doctrine_parameter = female_dominated_council } } - } - } -} - -can_be_steward_trigger = { - can_be_councillor_basics_trigger = yes - $COURT_OWNER$ ?= { - NOT = { government_has_flag = government_is_nomadic } - } - NAND = { - has_council_position = councillor_court_chaplain - faith = { has_doctrine_parameter = clerical_appointment_fixed } - } - NOR = { - has_council_position = councillor_spouse - AND = { - this = liege.diarch - liege = { has_diarchy_active_parameter = diarchy_is_vizierate } - } - } - OR = { - is_ruler = yes - AND = { - is_female = yes - $COURT_OWNER$.faith = { NOT = { has_doctrine_parameter = male_dominated_council } } - } - AND = { - is_male = yes - $COURT_OWNER$.faith = { NOT = { has_doctrine_parameter = female_dominated_council } } - } - } -} - -can_be_marshal_trigger = { - can_be_councillor_basics_trigger = yes - $COURT_OWNER$ ?= { - NOT = { government_has_flag = government_is_nomadic } - } - is_hostage = no - NAND = { - has_council_position = councillor_court_chaplain - faith = { has_doctrine_parameter = clerical_appointment_fixed } - } - NOR = { - has_council_position = councillor_spouse - AND = { - this = liege.diarch - liege = { has_diarchy_active_parameter = diarchy_is_vizierate } - } - } - OR = { - is_ruler = yes - AND = { - is_female = yes - $COURT_OWNER$.faith = { NOT = { has_doctrine_parameter = male_dominated_council } } - } - AND = { - is_male = yes - $COURT_OWNER$.faith = { NOT = { has_doctrine_parameter = female_dominated_council } } - } - AND = { - has_trait = shieldmaiden - $COURT_OWNER$.culture = { has_cultural_parameter = has_access_to_shieldmaidens } - } - } -} - -can_be_spymaster_trigger = { - can_be_councillor_basics_trigger = yes - NAND = { - has_council_position = councillor_court_chaplain - faith = { has_doctrine_parameter = clerical_appointment_fixed } - } - NOR = { - has_council_position = councillor_spouse - AND = { - this = liege.diarch - liege = { has_diarchy_active_parameter = diarchy_is_vizierate } - } - } - exists = $COURT_OWNER$ #so we can have the argument but get no errors -} - -can_be_court_chaplain_trigger = { - save_temporary_scope_as = court_chaplain_check - can_be_councillor_basics_trigger = yes - $COURT_OWNER$ ?= { - NOT = { government_has_flag = government_is_nomadic } - } - NOR = { - has_council_position = councillor_spouse - AND = { - this = liege.diarch - liege = { has_diarchy_active_parameter = diarchy_is_vizierate } - } - } - $COURT_OWNER$.faith = { has_allowed_gender_for_clergy = scope:court_chaplain_check } - faith = $COURT_OWNER$.faith - trigger_if = { - limit = { - faith = { has_doctrine = doctrine_theocracy_temporal } - } - OR = { - is_ruler = no - government_has_flag = government_is_theocracy - } - } - trigger_if = { - limit = { - exists = var:escaped_imprisonment_from - } - NOT = { var:escaped_imprisonment_from = $COURT_OWNER$ } - } - trigger_if = { # An excommunicated ruler tolerate excommunicated bishops - limit = { - $COURT_OWNER$ ?= { NOT = { has_trait = excommunicated } } - } - NOT = { has_trait = excommunicated } - } -} - -can_be_spouse_councillor_trigger = { - save_temporary_scope_as = spouse_councillor_check - can_be_councillor_basics_trigger = yes - #NOT = { # We allow spouses to both be regents and do their spouse job - # this = liege.diarch - #} - trigger_if = { - limit = { is_ruler = yes } - liege ?= $COUNCIL_OWNER$ - $COUNCIL_OWNER$ = { primary_spouse = scope:spouse_councillor_check } - } - trigger_else = { - $COUNCIL_OWNER$ ?= { primary_spouse = scope:spouse_councillor_check } - } -} - -can_be_kurultai_trigger = { - can_be_councillor_basics_trigger = yes - exists = $COURT_OWNER$ - NOT = { government_has_flag = government_is_herder } - NOR = { - has_council_position = councillor_spouse - has_court_position = court_astrologer_court_position - AND = { - this = $COURT_OWNER$.diarch - $COURT_OWNER$ ?= { has_diarchy_active_parameter = diarchy_is_vizierate } - } - } - NOR = { - has_council_position = $CP1$ - has_council_position = $CP2$ - has_council_position = $CP3$ - } - OR = { - is_landed = yes - is_knight_of = $COURT_OWNER$ - is_courtier_of = $COURT_OWNER$ - is_ruler = yes - is_powerful_vassal = yes - } - OR = { - is_ruler = yes - AND = { - is_female = yes - $COURT_OWNER$.faith = { NOT = { has_doctrine_parameter = male_dominated_council } } - } - AND = { - is_male = yes - $COURT_OWNER$.faith = { NOT = { has_doctrine_parameter = female_dominated_council } } - } - AND = { - has_trait = shieldmaiden - $COURT_OWNER$.culture = { has_cultural_parameter = has_access_to_shieldmaidens } - } - } -} - -can_be_any_kurultai_trigger = { - can_be_councillor_basics_trigger = yes - $COURT_OWNER$ ?= { - OR = { - has_council_position = councillor_kurultai_1 - has_council_position = councillor_kurultai_2 - has_council_position = councillor_kurultai_3 - has_council_position = councillor_kurultai_4 - } - } - NOR = { - has_council_position = councillor_spouse - AND = { - this = $COURT_OWNER$.diarch - $COURT_OWNER$ ?= { has_diarchy_active_parameter = diarchy_is_vizierate } - } - } - NOR = { - has_council_position = councillor_kurultai_1 - has_council_position = councillor_kurultai_2 - has_council_position = councillor_kurultai_3 - has_council_position = councillor_kurultai_4 - } - OR = { - is_landed = yes - is_knight_of = $COURT_OWNER$ - is_courtier_of = $COURT_OWNER$ - is_ruler = yes - is_powerful_vassal = yes - } - OR = { - is_ruler = yes - AND = { - is_female = yes - $COURT_OWNER$.faith = { NOT = { has_doctrine_parameter = male_dominated_council } } - } - AND = { - is_male = yes - $COURT_OWNER$.faith = { NOT = { has_doctrine_parameter = female_dominated_council } } - } - AND = { - has_trait = shieldmaiden - $COURT_OWNER$.culture = { has_cultural_parameter = has_access_to_shieldmaidens } - } - } -} - -is_kurultai_trigger = { - OR = { - has_council_position = councillor_kurultai_1 - has_council_position = councillor_kurultai_2 - has_council_position = councillor_kurultai_3 - has_council_position = councillor_kurultai_4 - } -} - -has_any_kurultai_trigger = { - OR = { - exists = cp:councillor_kurultai_1 - exists = cp:councillor_kurultai_2 - exists = cp:councillor_kurultai_3 - exists = cp:councillor_kurultai_4 - } -} - -councillor_loyalty_trigger = { - weighted_calc_true_if = { - amount >= 50 - 20 = { - NOT = { has_trait = ambitious } - } - 20 = { - opinion = { - target = liege - value > 0 - } - } - 20 = { - opinion = { - target = liege - value > 20 - } - } - 20 = { - opinion = { - target = liege - value > 40 - } - } - 20 = { - opinion = { - target = liege - value > 60 - } - } - } -} - -############################ -#SPOUSE COUNCILLOR TRIGGERS# -############################ - -valid_spouse_councillor_trigger = { - scope:councillor = { is_available = yes } - cp:councillor_spouse ?= scope:councillor -} - -is_blocked_from_being_fired_from_council_trigger = { - custom_description = { - text = "is_blocked_from_being_fired_from_council" - subject = this - object = $COURT_OWNER$ - - OR = { - # Check in code if the court owner is prevented from firing the councilor - # can_fire_position must take a council task as input, but checks the councilor behind the task. - AND = { - exists = this.council_task - this.council_task = { can_fire_position = no } - } - # Check for variable preventing the firing of a councilor set by script - AND = { - has_variable = block_fire_councillor - var:block_fire_councillor = $COURT_OWNER$ - } - } - } -} - - -can_be_fired_from_council_trigger = { - NOT = { - is_blocked_from_being_fired_from_council_trigger = { COURT_OWNER = $COURT_OWNER$ } - } - trigger_if = { - limit = { - has_council_position = councillor_court_chaplain - } - faith = { - OR = { - has_doctrine = doctrine_clerical_succession_temporal_appointment - has_doctrine = doctrine_clerical_succession_spiritual_appointment - } - } - } -} - - -#Faith/culture triggers -same_faith_or_culture_as_councillor_trigger = { - OR = { - culture = scope:councillor.culture - faith = scope:councillor.faith - } -} - -different_faith_and_or_culture_from_councillor_trigger = { - OR = { - culture != scope:councillor.culture - faith != scope:councillor.faith - } -} - -character_same_faith_as_councillor_but_different_from_root_trigger = { - faith = scope:councillor.faith - faith != root.faith -} - -character_same_culture_as_councillor_but_different_from_root_trigger = { - culture = scope:councillor.culture - culture != root.culture -} - - -character_same_faith_or_culture_as_councillor_but_different_from_root_trigger = { - OR = { - character_same_faith_as_councillor_but_different_from_root_trigger = yes - character_same_culture_as_councillor_but_different_from_root_trigger = yes - } -} - -character_different_culture_than_councillor_and_root_trigger = { - NOR = { - culture = scope:councillor.culture - culture = root.culture - } -} - -character_different_faith_than_councillor_and_root_trigger = { - NOR = { - faith = scope:councillor.faith - faith = root.faith - } -} - -character_different_faith_or_culture_than_councillor_and_root_trigger = { - OR = { - character_different_culture_than_councillor_and_root_trigger = yes - character_different_faith_than_councillor_and_root_trigger = yes - } -} - -province_same_faith_or_culture_as_councillor_but_different_from_root_trigger = { - OR = { - AND = { - culture = scope:councillor.culture - culture != root.culture - } - AND = { - faith = scope:councillor.faith - faith != root.faith - } - } -} -#End of faith/culture triggers - - -#Councillor Spouse threshold triggers - -#Intrigue -spouse_intrigue_tier_1_trigger = { - scope:councillor = { - OR = { - has_character_modifier = councillor_spouse_intrigue_2_modifier - has_character_modifier = councillor_spouse_intrigue_1_modifier - has_trait = schemer - intrigue >= spouse_skill_rating_1 - is_performing_council_task = task_court_intrigue - } - } -} - -spouse_intrigue_tier_2_trigger = { - scope:councillor = { - opinion = { - target = liege - value > 30 - } - OR = { - has_character_modifier = councillor_spouse_intrigue_2_modifier - has_trait = schemer - intrigue >= spouse_skill_rating_3 - AND = { - is_performing_council_task = task_court_intrigue - OR = { - intrigue >= spouse_skill_rating_2 - has_character_modifier = councillor_spouse_intrigue_2_modifier - has_character_modifier = councillor_spouse_intrigue_1_modifier - has_trait = schemer - } - } - } - } -} - -spouse_intrigue_tier_3_trigger = { - scope:councillor = { - opinion = { - target = liege - value > 50 - } - OR = { - has_trait = schemer - intrigue >= spouse_skill_rating_4 - AND = { - is_performing_council_task = task_court_intrigue - OR = { - intrigue >= high_skill_rating - has_character_modifier = councillor_spouse_intrigue_2_modifier - has_trait = schemer - } - } - } - } -} - -#Diplomacy -spouse_diplomacy_tier_1_trigger = { - scope:councillor = { - OR = { - has_character_modifier = councillor_spouse_diplomacy_2_modifier - has_character_modifier = councillor_spouse_diplomacy_1_modifier - has_trait = diplomat - diplomacy >= spouse_skill_rating_1 - is_performing_council_task = task_court_politics - } - } -} - -spouse_diplomacy_tier_2_trigger = { - scope:councillor = { - opinion = { - target = liege - value > 30 - } - OR = { - has_character_modifier = councillor_spouse_diplomacy_2_modifier - has_trait = diplomat - diplomacy >= spouse_skill_rating_3 - AND = { - is_performing_council_task = task_court_politics - OR = { - diplomacy >= spouse_skill_rating_2 - has_character_modifier = councillor_spouse_diplomacy_2_modifier - has_character_modifier = councillor_spouse_diplomacy_1_modifier - has_trait = diplomat - } - } - } - } -} - -spouse_diplomacy_tier_3_trigger = { - scope:councillor = { - opinion = { - target = liege - value > 50 - } - OR = { - has_trait = diplomat - diplomacy >= spouse_skill_rating_4 - AND = { - is_performing_council_task = task_court_politics - OR = { - diplomacy >= spouse_skill_rating_2 - has_trait = diplomat - has_character_modifier = councillor_spouse_diplomacy_2_modifier - } - } - } - } -} - - -#Martial -spouse_martial_tier_1_trigger = { - scope:councillor = { - OR = { - has_character_modifier = councillor_spouse_martial_2_modifier - has_character_modifier = councillor_spouse_martial_1_modifier - has_trait = strategist - martial >= spouse_skill_rating_1 - is_performing_council_task = task_chivalry - } - } -} - -spouse_martial_tier_2_trigger = { - scope:councillor = { - opinion = { - target = liege - value > 30 - } - OR = { - has_character_modifier = councillor_spouse_martial_2_modifier - has_trait = strategist - martial >= spouse_skill_rating_3 - AND = { - is_performing_council_task = task_chivalry - OR = { - martial >= spouse_skill_rating_2 - has_character_modifier = councillor_spouse_martial_2_modifier - has_character_modifier = councillor_spouse_martial_1_modifier - has_trait = strategist - } - } - } - } -} - -spouse_martial_tier_3_trigger = { - scope:councillor = { - opinion = { - target = liege - value > 50 - } - OR = { - has_trait = strategist - martial >= spouse_skill_rating_4 - AND = { - is_performing_council_task = task_chivalry - OR = { - martial >= spouse_skill_rating_2 - has_character_modifier = councillor_spouse_martial_2_modifier - has_trait = strategist - } - } - } - } -} - - - -#Stewardship -spouse_stewardship_tier_1_trigger = { - scope:councillor = { - OR = { - has_character_modifier = councillor_spouse_stewardship_2_modifier - has_character_modifier = councillor_spouse_stewardship_1_modifier - has_trait = architect - stewardship >= spouse_skill_rating_1 - is_performing_council_task = task_manage_domain - } - } -} - -spouse_stewardship_tier_2_trigger = { - scope:councillor = { - opinion = { - target = liege - value > 30 - } - OR = { - has_character_modifier = councillor_spouse_stewardship_2_modifier - has_trait = architect - stewardship >= spouse_skill_rating_3 - AND = { - is_performing_council_task = task_manage_domain - OR = { - stewardship >= spouse_skill_rating_2 - has_character_modifier = councillor_spouse_stewardship_2_modifier - has_character_modifier = councillor_spouse_stewardship_1_modifier - has_trait = architect - } - } - } - } -} - -spouse_stewardship_tier_3_trigger = { - scope:councillor = { - opinion = { - target = liege - value > 50 - } - OR = { - has_trait = architect - stewardship >= spouse_skill_rating_4 - AND = { - is_performing_council_task = task_manage_domain - OR = { - stewardship >= spouse_skill_rating_2 - has_character_modifier = councillor_spouse_stewardship_2_modifier - has_trait = architect - } - } - } - } -} - - - - -#Learning -spouse_learning_tier_1_trigger = { - scope:councillor = { - OR = { - has_character_modifier = councillor_spouse_learning_2_modifier - has_character_modifier = councillor_spouse_learning_1_modifier - has_trait = scholar - learning >= spouse_skill_rating_1 - is_performing_council_task = task_patronage - } - } -} - -spouse_learning_tier_2_trigger = { - scope:councillor = { - opinion = { - target = liege - value > 30 - } - OR = { - has_character_modifier = councillor_spouse_learning_2_modifier - has_trait = scholar - learning >= spouse_skill_rating_3 - AND = { - is_performing_council_task = task_patronage - OR = { - learning >= spouse_skill_rating_2 - has_character_modifier = councillor_spouse_learning_2_modifier - has_character_modifier = councillor_spouse_learning_1_modifier - has_trait = scholar - } - } - } - } -} - -spouse_learning_tier_3_trigger = { - scope:councillor = { - opinion = { - target = liege - value > 50 - } - OR = { - has_trait = scholar - learning >= spouse_skill_rating_4 - AND = { - is_performing_council_task = task_patronage - OR = { - learning >= spouse_skill_rating_2 - has_character_modifier = councillor_spouse_learning_2_modifier - has_trait = scholar - } - } - } - } -} - -# Court Espionage task triggers -spymaster_task_find_secrets_interesting_secret_type_trigger = { - save_temporary_scope_as = suitable_secret - trigger_if = { - limit = { - secret_type = secret_disputed_heritage - exists = secret_target - } - NOT = { secret_target = { has_trait = legitimized_bastard } } - } - OR = { - secret_is_always_interesting_trigger = yes - is_blackmailable_secret_trigger = { BLACKMAILER = scope:councillor_liege PARTICIPANT = scope:suitable_secret.secret_owner } - } -} - -spymaster_task_find_secrets_block_spymaster_self_reveal_trigger = { - # Spymaster should not reveal secrets targeting themselves unless it is a murder attempt - trigger_if = { - limit = { - exists = secret_target - NOT = { secret_type = secret_murder_attempt } - } - secret_target != scope:councillor - } - # If the spymaster is the father of a secret bastard, don't reveal that - trigger_if = { - limit = { - OR = { - secret_type = secret_disputed_heritage - secret_type = secret_unmarried_illegitimate_child - } - exists = secret_target.real_father - } - secret_target.real_father != scope:councillor - } -} - -spymaster_task_find_secrets_suitable_minor_secret_trigger = { - OR = { - is_shunned_for = secret_owner - AND = { - NOT = { - is_blackmailable_secret_trigger = { - PARTICIPANT = secret_owner - BLACKMAILER = scope:councillor_liege - } - } - secret_is_always_interesting_trigger = yes - } - } - NOT = { is_known_by = scope:councillor_liege } - spymaster_task_find_secrets_block_spymaster_self_reveal_trigger = yes - NOT = { - any_secret_participant = { - OR = { - this = scope:councillor - this = scope:councillor_liege - } - } - } - spymaster_task_find_secrets_interesting_secret_type_trigger = yes -} - -spymaster_task_find_secrets_suitable_major_secret_trigger = { - is_criminal_for = secret_owner - NOT = { is_known_by = scope:councillor_liege } - spymaster_task_find_secrets_block_spymaster_self_reveal_trigger = yes - NOT = { - any_secret_participant = { - OR = { - this = scope:councillor - this = scope:councillor_liege - } - } - } - spymaster_task_find_secrets_interesting_secret_type_trigger = yes -} - -spymaster_task_find_secrets_court_has_minor_secrets_trigger = { - OR = { - AND = { - has_any_secrets = yes - any_secret = { - spymaster_task_find_secrets_suitable_minor_secret_trigger = yes - } - } - any_vassal = { - has_any_secrets = yes - this != scope:councillor_liege - this != scope:councillor - any_secret = { - spymaster_task_find_secrets_suitable_minor_secret_trigger = yes - } - } - any_courtier_or_guest = { - has_any_secrets = yes - this != scope:councillor_liege - this != scope:councillor - any_secret = { - spymaster_task_find_secrets_suitable_minor_secret_trigger = yes - } - } - } -} - -spymaster_task_find_secrets_court_has_major_secrets_trigger = { - OR = { - AND = { - has_any_secrets = yes - any_secret = { - spymaster_task_find_secrets_suitable_major_secret_trigger = yes - } - } - any_vassal = { - has_any_secrets = yes - this != scope:councillor_liege - this != scope:councillor - any_secret = { - spymaster_task_find_secrets_suitable_major_secret_trigger = yes - } - } - any_courtier_or_guest = { - has_any_secrets = yes - this != scope:councillor_liege - this != scope:councillor - any_secret = { - spymaster_task_find_secrets_suitable_major_secret_trigger = yes - } - } - } -} - -spymaster_find_secrets_secret_holder_is_interesting_to_me_trigger = { - scope:councillor_liege = { - save_temporary_scope_as = me - } - scope:secret_holder ?= { - OR = { - is_ruler = yes - is_close_or_extended_family_of = scope:me - is_courtier_of = scope:me - has_relation_rival = scope:me - has_relation_lover = scope:me - is_player_heir_of = scope:me - } - } -} - -spymaster_find_secrets_secret_target_is_interesting_to_me_trigger = { - scope:councillor_liege = { - save_temporary_scope_as = me - } - trigger_if = { - limit = { - exists = secret_target - } - secret_target = { - OR = { - is_close_or_extended_family_of = scope:me - is_courtier_of = scope:me - has_relation_rival = scope:me - has_relation_lover = scope:me - is_player_heir_of = scope:me - } - } - } - trigger_else = { - always = no - } -} - - -# Event triggers -# Defined here because they need to be used in event + council task desc - -marshal_task_1101_county_trigger = { - holder = root - NOT = { - has_county_modifier = marshal_task_organized_service_modifier - } -} - -marshal_task_1102_county_trigger = { - NOT = { - has_county_modifier = marshal_task_military_presence_modifier - } -} - -marshal_task_1003_county_trigger = { - is_valid_for_county_corruption_trigger = yes - OR = { - NOT = { has_county_modifier = county_corruption_unsafe_highways_modifier } - NOT = { has_county_modifier = county_corruption_thieves_guild_modifier } - NOT = { has_county_modifier = county_corruption_bandits_rampant_modifier } - } -} - -steward_task_county_corruption_county_trigger = { - holder = { - OR = { - is_ai = yes - this = root - } - } -} - -councillor_spouse_learning_2603_valid_councillor_trigger = { - is_available_ai_adult = yes - this != scope:councillor -} - - -councillor_liege_has_erudition_legacy_5_perk = { - scope:councillor_liege.dynasty ?= { has_dynasty_perk = erudition_legacy_5 } -} - - -councillor_liege_has_customs_legacy_perk = { - scope:councillor_liege.dynasty ?= { has_dynasty_perk = ep1_culture_legacy_2 } -} - -councillor_liege_has_family_business_bonus = { - scope:councillor_liege.culture ?= { has_cultural_parameter = close_family_better_councillors } - scope:councillor ?= { - is_close_family_of = scope:councillor_liege - } -} - -councillor_liege_has_consulted_house_bonus = { - scope:councillor_liege ?= { has_character_flag = fp3_consulted_house } - scope:councillor.house ?= scope:councillor_liege.house -} - -councillor_is_unskilled_trigger = { - trigger_if = { - limit = { $EMPLOYER$.cp:councillor_chancellor ?= this } - diplomacy < mediocre_skill_rating - } - trigger_else_if = { - limit = { $EMPLOYER$.cp:councillor_steward ?= this } - stewardship < mediocre_skill_rating - } - trigger_else_if = { - limit = { $EMPLOYER$.cp:councillor_marshal ?= this } - martial < mediocre_skill_rating - } - trigger_else_if = { - limit = { $EMPLOYER$.cp:councillor_spymaster ?= this } - intrigue < mediocre_skill_rating - } - trigger_else = { learning < mediocre_skill_rating } -} - -councillor_is_skilled_trigger = { - trigger_if = { - limit = { $EMPLOYER$.cp:councillor_chancellor ?= this } - diplomacy > decent_skill_rating - } - trigger_else_if = { - limit = { $EMPLOYER$.cp:councillor_steward ?= this } - stewardship > decent_skill_rating - } - trigger_else_if = { - limit = { $EMPLOYER$.cp:councillor_marshal ?= this } - martial > decent_skill_rating - } - trigger_else_if = { - limit = { $EMPLOYER$.cp:councillor_spymaster ?= this } - intrigue > decent_skill_rating - } - trigger_else = { learning > decent_skill_rating } -} - -kurultai_is_skilled_trigger = { - trigger_if = { - limit = { $EMPLOYER$.cp:councillor_kurultai_1 ?= this } - OR = { - average_skill_rating >= sum_of_all_skills_threshold_average - has_any_high_skill_rating = yes - } - } - trigger_else_if = { - limit = { $EMPLOYER$.cp:councillor_kurultai_2 ?= this } - OR = { - average_skill_rating >= sum_of_all_skills_threshold_average - has_any_high_skill_rating = yes - } - } - trigger_else_if = { - limit = { $EMPLOYER$.cp:councillor_kurultai_3 ?= this } - OR = { - average_skill_rating >= sum_of_all_skills_threshold_average - has_any_high_skill_rating = yes - } - } - trigger_else_if = { - limit = { $EMPLOYER$.cp:councillor_kurultai_4 ?= this } - OR = { - average_skill_rating >= sum_of_all_skills_threshold_average - has_any_high_skill_rating = yes - } - } - trigger_else = { intrigue > decent_skill_rating } # Spymaster -} - -#FP3 Legacy Track: -councillor_liege_has_khvarenah_legacy_perk = { - exists = scope:councillor_liege.dynasty - scope:councillor_liege.dynasty = { has_dynasty_perk = fp3_khvarenah_legacy_4 } -} - -can_be_knight_now_light_trigger = { - is_available_quick = { - ai = yes # Players can't be knights - imprisoned = no - adult = yes - alive = yes - } -} - -can_be_trained_as_knight_now_light_trigger = { - can_be_knight_now_light_trigger = yes - is_in_army = no - has_contagious_deadly_disease_trigger = no - NOT = { has_trait = incapable } - custom_description = { - text = ALREADY_IN_ACTIVITY - NOR = { - exists = involved_activity - has_variable = homage_liege_scope - has_character_flag = meditation_character_flag - has_character_flag = local_shrine_rite - has_character_flag = petition_liege_character_flag - has_character_flag = holding_court_character_flag - is_being_visited_on_tour_strict = yes - } - } - custom_description = { - text = ALREADY_PLANNING_ACTIVITY - NOT = { has_character_flag = planning_an_activity } - } - # Variable set within the adventure inspiration events - NOT = { has_variable = gone_adventuring } -} - -teacher_has_trait_that_student_does_not_trigger = { - OR = { - AND = { - $TEACHER$ = { has_trait = logistician } - $STUDENT$ = { NOT = { has_trait = logistician } } - } - AND = { - $TEACHER$ = { has_trait = military_engineer } - $STUDENT$ = { NOT = { has_trait = military_engineer } } - } - AND = { - $TEACHER$ = { has_trait = aggressive_attacker } - $STUDENT$ = { NOT = { has_trait = aggressive_attacker } } - } - AND = { - $TEACHER$ = { has_trait = unyielding_defender } - $STUDENT$ = { NOT = { has_trait = unyielding_defender } } - } - AND = { - $TEACHER$ = { has_trait = forder } - $STUDENT$ = { NOT = { has_trait = forder } } - } - AND = { - $TEACHER$ = { has_trait = flexible_leader } - $STUDENT$ = { NOT = { has_trait = flexible_leader } } - } - AND = { - $TEACHER$ = { has_trait = desert_warrior } - $STUDENT$ = { NOT = { has_trait = desert_warrior } } - } - AND = { - $TEACHER$ = { has_trait = jungle_stalker } - $STUDENT$ = { NOT = { has_trait = jungle_stalker } } - } - AND = { - $TEACHER$ = { has_trait = winter_soldier } - $STUDENT$ = { NOT = { has_trait = winter_soldier } } - } - AND = { - $TEACHER$ = { has_trait = reaver } - $STUDENT$ = { NOT = { has_trait = reaver } } - } - AND = { - $TEACHER$ = { has_trait = reckless } - $STUDENT$ = { NOT = { has_trait = reckless } } - } - AND = { - $TEACHER$ = { has_trait = holy_warrior } - $STUDENT$ = { NOT = { has_trait = holy_warrior } } - } - AND = { - $TEACHER$ = { has_trait = open_terrain_expert } - $STUDENT$ = { NOT = { has_trait = open_terrain_expert } } - } - AND = { - $TEACHER$ = { has_trait = rough_terrain_expert } - $STUDENT$ = { NOT = { has_trait = rough_terrain_expert } } - } - AND = { - $TEACHER$ = { has_trait = forest_fighter } - $STUDENT$ = { NOT = { has_trait = forest_fighter } } - } - AND = { - $TEACHER$ = { has_trait = cautious_leader } - $STUDENT$ = { NOT = { has_trait = cautious_leader } } - } - AND = { - $TEACHER$ = { has_trait = organizer } - $STUDENT$ = { NOT = { has_trait = organizer } } - } - } -} diff --git a/N3OW/common/scripted_triggers/00_county_corruption_triggers.txt b/N3OW/common/scripted_triggers/00_county_corruption_triggers.txt deleted file mode 100644 index 67739a5f..00000000 --- a/N3OW/common/scripted_triggers/00_county_corruption_triggers.txt +++ /dev/null @@ -1,49 +0,0 @@ - -###TRIGGER LIST - -# has_county_corruption_trigger - Does the County have any corruption modifiers -# immune_to_county_corruption_trigger - Is the County immune to corruption for any reason -# is_valid_for_county_corruption_trigger - Can County Corruption be applied in this County - -has_county_corruption_trigger = { - OR = { - has_county_modifier = county_corruption_inefficient_tax_collection_modifier - has_county_modifier = county_corruption_deserting_levies_modifier - has_county_modifier = county_corruption_smuggling_ring_modifier - has_county_modifier = county_corruption_bandits_rampant_modifier - has_county_modifier = county_corruption_inefficient_census_modifier - has_county_modifier = county_corruption_lack_of_sheriffs_modifier - has_county_modifier = county_corruption_lack_of_courts_modifier - has_county_modifier = county_corruption_thieves_guild_modifier - has_county_modifier = county_corruption_unsafe_highways_modifier - has_county_modifier = county_corruption_uncooperative_guilds_modifier - has_county_modifier = county_corruption_lackluster_administration_modifier - has_county_modifier = county_corruption_roaming_bandits_modifier - has_county_modifier = county_corruption_wild_beast_attacks_modifier - has_county_modifier = county_corruption_upset_shepherds_modifier - has_county_modifier = county_corruption_rogue_warriors_modifier - has_county_modifier = county_corruption_unruly_nomads_modifier - has_county_modifier = small_investment_in_revolt_modifier - has_county_modifier = medium_investment_in_revolt_modifier - has_county_modifier = high_investment_in_revolt_modifier - } -} - -immune_to_county_corruption_trigger = { - OR = { - is_landless_type_title = yes - has_variable = corruption_event_happening - has_variable = county_corruption_recent_removal - is_target_of_council_task = task_increase_control - has_county_modifier = marshal_task_military_presence_modifier - is_noble_family_title = yes - is_landless_type_title = yes - } -} - -is_valid_for_county_corruption_trigger = { - NOT = { - county_corruption_modifier_count >= max_county_corruption_modifiers_at_once - } - immune_to_county_corruption_trigger = no -} diff --git a/N3OW/common/scripted_triggers/00_court_position_triggers.txt b/N3OW/common/scripted_triggers/00_court_position_triggers.txt deleted file mode 100644 index d6d26a46..00000000 --- a/N3OW/common/scripted_triggers/00_court_position_triggers.txt +++ /dev/null @@ -1,1880 +0,0 @@ -# Grants a random unfilled court position based on skills and traits using CANDIDATE - ROOT is ruler -any_court_position_available_trigger = { - OR = { - NOT = { employs_court_position = royal_architect_court_position } - NOT = { employs_court_position = seneschal_court_position } - NOT = { employs_court_position = court_tutor_court_position } - NOT = { employs_court_position = court_guru_court_position } - NOT = { employs_court_position = high_almoner_court_position } - NOT = { employs_court_position = court_physician_court_position } - NOT = { employs_court_position = antiquarian_court_position } - NOT = { employs_court_position = master_of_horse_court_position } - AND = { - $CANDIDATE$ = { - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = ROOT } - } - NOT = { employs_court_position = bodyguard_court_position } - } - AND = { - $CANDIDATE$ = { - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = ROOT } - } - NOT = { employs_court_position = champion_court_position } - } - NOT = { employs_court_position = master_of_hunt_court_position } - NOT = { employs_court_position = court_poet_court_position } - NOT = { employs_court_position = court_musician_court_position } - NOT = { employs_court_position = cupbearer_court_position } - AND = { - is_female = yes - $CANDIDATE$ = { is_female = yes } - NOT = { employs_court_position = lady_in_waiting_court_position } - } - AND = { - culture = { has_cultural_parameter = can_appoint_chief_eunuch } - $CANDIDATE$ = { is_eunuch_trigger = yes } - NOT = { employs_court_position = chief_eunuch_court_position } - } - AND = { - culture = { has_cultural_parameter = can_appoint_court_gardener } - NOT = { employs_court_position = court_gardener_court_position } - } - AND = { - $CANDIDATE$ = { - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = ROOT } - } - NOT = { employs_court_position = akolouthos_court_position } - } - AND = { - government_has_flag = government_is_nomadic - OR = { - has_religion = religion:tengrism_religion - culture = { has_cultural_pillar = heritage_mongolic } - culture = { has_cultural_pillar = heritage_turkic } - } - NOT = { employs_court_position = court_astrologer_court_position } - } - AND = { - government_has_flag = government_is_nomadic - NOT = { employs_court_position = boyan_court_position } - } - AND = { - has_trait = military_engineer - NOT = { employs_court_position = siege_engineer_court_position } - } - AND = { - government_has_flag = government_is_nomadic - NOT = { employs_court_position = yurtchi_court_position } - } - AND = { - government_has_flag = government_is_nomadic - NOT = { employs_court_position = cherbi_court_position } - } - AND = { - government_has_flag = government_is_nomadic - NOT = { employs_court_position = yeke_jarquchi_court_position } - } - AND = { - NOT = { root.culture = $CANDIDATE$.culture } - NOT = { employs_court_position = foreign_emissary_court_position } - } - AND = { - government_has_flag = government_is_nomadic - NOT = { employs_court_position = keeper_of_the_horses_court_position } - } - } -} - -#@info! Used together with assign_appropriate_court_position_effect and distribute_determined_court_position_effect -- update the flags here if you add any Court Positions in the effects -has_any_court_position_flag_trigger = { - OR = { - has_character_flag = physician_flag - has_character_flag = tutor_flag - has_character_flag = almoner_flag - has_character_flag = antiquarian_flag - has_character_flag = qadi_flag - has_character_flag = taster_flag - has_character_flag = executioner_flag - has_character_flag = cupbearer_flag - has_character_flag = lady_in_waiting_flag - has_character_flag = jester_flag - has_character_flag = poet_flag - has_character_flag = musician_flag - has_character_flag = gardener_flag - has_character_flag = architect_flag - has_character_flag = swan_flag - has_character_flag = seneschal_flag - has_character_flag = horse_flag - has_character_flag = garuda_flag - has_character_flag = hunt_flag - has_character_flag = bodyguard_flag - has_character_flag = travel_leader_flag - has_character_flag = wet_nurse_flag - has_character_flag = akolouthos_flag - has_character_flag = court_astrologer_flag - has_character_flag = boyan_flag - has_character_flag = siege_engineer_flag - has_character_flag = yurtchi_flag - has_character_flag = yeke_jarquchi_flag - has_character_flag = foreign_emissary_flag - has_character_flag = keeper_of_the_horses_flag - } -} - -# Used in the trigger for court positions to make sure that they don't already have a "job" -# If a court position is considered a full time job, the character cannot hold another similar position -court_position_does_not_already_have_a_job_trigger = { - custom_tooltip = { - text = does_not_have_a_full_time_job - NOR = { - has_court_position = court_tutor_court_position - has_court_position = court_guru_court_position - has_court_position = food_taster_court_position - has_court_position = seneschal_court_position - has_court_position = cupbearer_court_position - has_court_position = antiquarian_court_position - has_court_position = lady_in_waiting_court_position - has_court_position = court_jester_court_position - has_court_position = court_poet_court_position - has_court_position = court_musician_court_position - has_court_position = bodyguard_court_position - has_court_position = executioner_court_position - has_court_position = court_gardener_court_position - has_court_position = travel_leader_court_position - has_court_position = wet_nurse_court_position - has_court_position = akolouthos_court_position - has_court_position = grand_preceptor_court_position - has_court_position = grand_guardian_court_position - has_court_position = grand_mentor_court_position - has_court_position = fire_dragon_engineer_court_position - has_court_position = keeper_of_the_harem_court_position - is_councillor = yes - } - } -} - -# IMPORTANT: This should be used before most instances of appoint_court_position - CU -# Checks that you can employ a specific character to a specific court position at a given moment. This prevents errors from randomly trying to already hire the holder of that court position in some cases. -# Trigger should be used in the scope of the hiring liege -# $COURT_POS$ is the position to which you want to appoint a character -# $CHAR$ is the character you wish to appoint -can_appoint_char_to_court_position = { - save_temporary_scope_as = hiring_liege - can_employ_court_position_type = $COURT_POS$ - $CHAR$ = { - this != scope:hiring_liege - NOT = { has_court_position = $COURT_POS$ } - can_be_employed_as = $COURT_POS$ - } -} - -can_appoint_char_to_any_court_position = { - OR = { - can_appoint_char_to_court_position = { CHAR = $CHAR$ COURT_POS = court_physician_court_position } - can_appoint_char_to_court_position = { CHAR = $CHAR$ COURT_POS = cultural_emissary_court_position } - can_appoint_char_to_court_position = { CHAR = $CHAR$ COURT_POS = keeper_of_swans_court_position } - can_appoint_char_to_court_position = { CHAR = $CHAR$ COURT_POS = chief_qadi_court_position } - can_appoint_char_to_court_position = { CHAR = $CHAR$ COURT_POS = garuda_court_position } - can_appoint_char_to_court_position = { CHAR = $CHAR$ COURT_POS = court_gardener_court_position } - can_appoint_char_to_court_position = { CHAR = $CHAR$ COURT_POS = lady_in_waiting_court_position } - can_appoint_char_to_court_position = { CHAR = $CHAR$ COURT_POS = antiquarian_court_position } - can_appoint_char_to_court_position = { CHAR = $CHAR$ COURT_POS = travel_leader_court_position } - can_appoint_char_to_court_position = { CHAR = $CHAR$ COURT_POS = wet_nurse_court_position } - can_appoint_char_to_court_position = { CHAR = $CHAR$ COURT_POS = court_tutor_court_position } - can_appoint_char_to_court_position = { CHAR = $CHAR$ COURT_POS = court_guru_court_position } - can_appoint_char_to_court_position = { CHAR = $CHAR$ COURT_POS = food_taster_court_position } - can_appoint_char_to_court_position = { CHAR = $CHAR$ COURT_POS = master_of_horse_court_position } - can_appoint_char_to_court_position = { CHAR = $CHAR$ COURT_POS = master_of_hunt_court_position } - can_appoint_char_to_court_position = { CHAR = $CHAR$ COURT_POS = royal_architect_court_position } - can_appoint_char_to_court_position = { CHAR = $CHAR$ COURT_POS = high_almoner_court_position } - can_appoint_char_to_court_position = { CHAR = $CHAR$ COURT_POS = seneschal_court_position } - can_appoint_char_to_court_position = { CHAR = $CHAR$ COURT_POS = cupbearer_court_position } - can_appoint_char_to_court_position = { CHAR = $CHAR$ COURT_POS = chief_eunuch_court_position } - can_appoint_char_to_court_position = { CHAR = $CHAR$ COURT_POS = court_jester_court_position } - can_appoint_char_to_court_position = { CHAR = $CHAR$ COURT_POS = court_poet_court_position } - can_appoint_char_to_court_position = { CHAR = $CHAR$ COURT_POS = court_musician_court_position } - can_appoint_char_to_court_position = { CHAR = $CHAR$ COURT_POS = bodyguard_court_position } - can_appoint_char_to_court_position = { CHAR = $CHAR$ COURT_POS = champion_court_position } - can_appoint_char_to_court_position = { CHAR = $CHAR$ COURT_POS = executioner_court_position } - can_appoint_char_to_court_position = { CHAR = $CHAR$ COURT_POS = court_artificer_court_position } - can_appoint_char_to_court_position = { CHAR = $CHAR$ COURT_POS = master_assassin_court_position } - can_appoint_char_to_court_position = { CHAR = $CHAR$ COURT_POS = cave_hermit_court_position } - can_appoint_char_to_court_position = { CHAR = $CHAR$ COURT_POS = chronicler_court_position } - can_appoint_char_to_court_position = { CHAR = $CHAR$ COURT_POS = court_scholar_court_position } - can_appoint_char_to_court_position = { CHAR = $CHAR$ COURT_POS = charioteer_court_position } - can_appoint_char_to_court_position = { CHAR = $CHAR$ COURT_POS = bookmaker_court_position } - can_appoint_char_to_court_position = { CHAR = $CHAR$ COURT_POS = akolouthos_court_position } - can_appoint_char_to_court_position = { CHAR = $CHAR$ COURT_POS = court_brewmaster_court_position } - can_appoint_char_to_court_position = { CHAR = $CHAR$ COURT_POS = court_astrologer_court_position } - can_appoint_char_to_court_position = { CHAR = $CHAR$ COURT_POS = boyan_court_position } - can_appoint_char_to_court_position = { CHAR = $CHAR$ COURT_POS = siege_engineer_court_position } - can_appoint_char_to_court_position = { CHAR = $CHAR$ COURT_POS = yurtchi_court_position } - can_appoint_char_to_court_position = { CHAR = $CHAR$ COURT_POS = cherbi_court_position } - can_appoint_char_to_court_position = { CHAR = $CHAR$ COURT_POS = yeke_jarquchi_court_position } - can_appoint_char_to_court_position = { CHAR = $CHAR$ COURT_POS = keeper_of_the_horses_court_position } - } -} - -has_diplomacy_court_position = { - OR = { - has_court_position = court_poet_court_position - has_court_position = court_musician_court_position - has_court_position = court_jester_court_position - has_court_position = cupbearer_court_position - has_court_position = lady_in_waiting_court_position - has_court_position = chronicler_court_position - has_court_position = yeke_jarquchi_court_position - has_court_position = foreign_emissary_court_position - } -} - -has_martial_court_position = { - OR = { - has_court_position = master_of_horse_court_position - has_court_position = bodyguard_court_position - has_court_position = champion_court_position - has_court_position = master_of_hunt_court_position - has_court_position = akolouthos_court_position - has_court_position = boyan_court_position - has_court_position = siege_engineer_court_position - has_court_position = cherbi_court_position - has_court_position = keeper_of_the_horses_court_position - } -} - -has_stewardship_court_position = { - OR = { - has_court_position = royal_architect_court_position - has_court_position = seneschal_court_position - has_court_position = keeper_of_swans_court_position - has_court_position = court_gardener_court_position - has_court_position = yurtchi_court_position - } -} - -has_intrigue_court_position = { - OR = { - has_court_position = food_taster_court_position - has_court_position = chief_eunuch_court_position - has_court_position = master_assassin_court_position - } -} - -has_learning_court_position = { - OR = { - has_court_position = court_tutor_court_position - has_court_position = court_guru_court_position - has_court_position = high_almoner_court_position - has_court_position = court_physician_court_position - has_court_position = antiquarian_court_position - has_court_position = cave_hermit_court_position - has_court_position = court_scholar_court_position - has_court_position = court_brewmaster_court_position - has_court_position = court_astrologer_court_position - } -} - -court_position_stewardship_trigger = { # Is courtier suited to stewardship positions? - OR = { - has_education_stewardship_trigger = yes - has_trait = diligent - stewardship >= medium_skill_rating - } -} - -court_position_martial_trigger = { - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = $EMPLOYER$ } - OR = { - number_of_commander_traits > 0 - has_trait = brave - prowess >= mediocre_skill_rating - has_trait = viking - has_trait = varangian - has_trait = berserker - has_trait = shieldmaiden - has_trait = lifestyle_blademaster - has_trait = education_martial_prowess - } -} - -court_position_learning_trigger = { # Is courtier suited to learning positions? - OR = { - has_education_learning_trigger = yes - has_trait = devoted - } -} - -base_court_position_validity_trigger = { # would_be_valid_for_court_position ultimately traces back to this, so touch with caution - is_imprisoned = no - NOT = { is_at_war_with = $EMPLOYER$ } - custom_tooltip = { - text = is_not_a_ceremonial_liege_trigger - tgp_is_ceremonial_liege_trigger = no - } -} - -royal_architect_validity_trigger = { - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } -} - -seneschal_validity_trigger = { - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - OR = { - is_landed = no - stewardship >= 12 - } - custom_tooltip = { - text = NONE_NOT_THE_SPOUSE_OF_CHARACTER_COURT_POSITION - NOT = { is_spouse_of = $EMPLOYER$ } - } - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = seneschal_court_position } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } -} - -khlon_glan_validity_trigger = { - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - stewardship >= 10 - martial >= 10 - custom_tooltip = { - text = NONE_NOT_THE_SPOUSE_OF_CHARACTER_COURT_POSITION - NOT = { is_spouse_of = $EMPLOYER$ } - } - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = khlon_glan_court_position } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } -} - -court_tutor_validity_trigger = { - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - OR = { - is_landed = no - learning >= 12 - } - custom_tooltip = { - text = NONE_NOT_THE_SPOUSE_OF_CHARACTER_COURT_POSITION - NOT = { is_spouse_of = $EMPLOYER$ } - } - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { - NOR = { - has_court_position = court_tutor_court_position - has_court_position = court_guru_court_position - } - } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } -} - -high_almoner_validity_trigger = { - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - OR = { - is_landed = no - learning >= 12 - } -} - -court_brahmin_validity_trigger = { - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - OR = { - has_religion = religion:buddhism_religion - has_religion = religion:hinduism_religion - } - learning >= 12 -} - -court_physician_validity_trigger = { - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - is_landed = no -} - -antiquarian_validity_trigger = { - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - OR = { - is_landed = no - learning >= 12 - } - - custom_tooltip = { - text = NONE_NOT_THE_SPOUSE_OF_CHARACTER_COURT_POSITION - NOT = { is_spouse_of = $EMPLOYER$ } - } - - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = antiquarian_court_position } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } -} - -master_of_horse_validity_trigger = { - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } -} - -bodyguard_validity_trigger = { - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - is_landed = no - NOR = { - has_trait = blind - has_trait = infirm - } - custom_tooltip = { - text = NONE_NOT_THE_SPOUSE_OF_CHARACTER_COURT_POSITION - NOT = { is_spouse_of = $EMPLOYER$ } - } - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = $EMPLOYER$ } - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = bodyguard_court_position } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } -} - -champion_validity_trigger = { - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - is_landed = no - NOR = { - has_trait = blind - has_trait = infirm - } - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = $EMPLOYER$ } -} - -master_of_hunt_validity_trigger = { - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - NOR = { - has_trait = blind - has_trait = infirm - } - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = $EMPLOYER$ } -} - -court_poet_validity_trigger = { - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - custom_tooltip = { - text = NONE_NOT_THE_SPOUSE_OF_CHARACTER_COURT_POSITION - NOT = { is_spouse_of = $EMPLOYER$ } - } - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = court_poet_court_position } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } -} - -house_poet_validity_trigger = { - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - custom_tooltip = { - text = NONE_NOT_THE_SPOUSE_OF_CHARACTER_COURT_POSITION - NOT = { is_spouse_of = $EMPLOYER$ } - } - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = house_poet_court_position } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } -} - -court_musician_validity_trigger = { - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - OR = { - is_landed = no - diplomacy >= 12 - } - custom_tooltip = { - text = NONE_NOT_THE_SPOUSE_OF_CHARACTER_COURT_POSITION - NOT = { is_spouse_of = $EMPLOYER$ } - } - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = court_musician_court_position } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } -} - -court_jester_validity_trigger = { - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = court_jester_court_position } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } -} - -executioner_validity_trigger = { - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - is_adult = yes - is_landed = no - custom_tooltip = { - text = NONE_NOT_THE_SPOUSE_OF_CHARACTER_COURT_POSITION - NOT = { is_spouse_of = $EMPLOYER$ } - } - OR = { - custom_tooltip = { - text = has_imprisonment_reason_no_subject - $EMPLOYER$ = { has_imprisonment_reason = prev } - } - custom_tooltip = { - text = is_imprisoned_court_position_executioner - trigger_if = { # Imprisoned characters should only be valid if they aren't already the executioner - limit = { - is_imprisoned = yes - NOT = { has_court_position = executioner_court_position } - } - is_imprisoned_by = $EMPLOYER$ - } - } - custom_tooltip = { - text = has_strong_hook_no_subject - $EMPLOYER$ = { has_strong_usable_hook = prev } - } - } - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = executioner_court_position } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } -} - -food_taster_validity_trigger = { - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - custom_tooltip = { - text = NONE_NOT_THE_SPOUSE_OF_CHARACTER_COURT_POSITION - NOT = { is_spouse_of = $EMPLOYER$ } - } - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = $EMPLOYER$ } - custom_tooltip = { - text = faith_allows_recruitment_court_position - trigger_if = { - limit = { - scope:liege.faith = { - NOT = { has_doctrine = doctrine_clerical_function_recruitment } - } - } - is_clergy = no - } - } - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = food_taster_court_position } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } -} - -cupbearer_validity_trigger = { - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - custom_tooltip = { - text = NONE_NOT_THE_SPOUSE_OF_CHARACTER_COURT_POSITION - NOT = { is_spouse_of = $EMPLOYER$ } - } - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = cupbearer_court_position } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } -} - -lady_in_waiting_validity_trigger = { - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - is_landed = no - is_female = yes - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = lady_in_waiting_court_position } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } -} - -chief_eunuch_validity_trigger = { - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - is_landed = no - is_eunuch_trigger = yes -} - -court_gardener_validity_trigger = { - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - OR = { - is_landed = no - stewardship >= 12 - } - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = court_gardener_court_position } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } -} - -court_artificer_validity_trigger = { - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - is_landed = no - custom_tooltip = { - text = NONE_NOT_THE_SPOUSE_OF_CHARACTER_COURT_POSITION - NOT = { is_spouse_of = $EMPLOYER$ } - } - OR = { - custom_tooltip = { - text = has_a_completed_inspiration - has_completed_inspiration = yes - } - custom_tooltip = { - text = has_an_inspiration - exists = inspiration - } - } - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = court_artificer_court_position } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } -} - -cultural_emissary_validity_trigger = { - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - diplomacy >= 8 -} - -chief_qadi_validity_trigger = { - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - has_religion = religion:islam_religion - has_trait = education_learning - custom_tooltip = { - text = MATCHING_FAITH_DOCTRINE_GENDER - trigger_if = { - limit = { $EMPLOYER$.faith = { has_doctrine = doctrine_gender_male_dominated } } - is_male = yes - } - trigger_if = { - limit = { $EMPLOYER$.faith = { has_doctrine = doctrine_gender_female_dominated } } - is_female = yes - } - trigger_else = { always = yes } - } -} - -garuda_validity_trigger = { - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - is_knight = yes - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = $EMPLOYER$ } -} - -keeper_of_swans_validity_trigger = { - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } -} - -travel_leader_validity_trigger = { - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - is_landed = no - is_clergy = no - custom_tooltip = { - text = NONE_NOT_THE_SPOUSE_OF_CHARACTER_COURT_POSITION - NOT = { is_spouse_of = $EMPLOYER$ } - } - custom_tooltip = { - text = IS_NOT_APPLICABLE_DIARCH_COURT_POSITION - trigger_if = { - limit = { bannable_serving_diarch_trigger = yes } - bannable_serving_diarch_trigger = no - } - } - custom_tooltip = { - text = IS_NOT_GONE_ADVENTURING - trigger_if = { - limit = { has_variable = gone_adventuring } - NOT = { has_variable = gone_adventuring } - } - } - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = travel_leader_court_position } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } -} - -wet_nurse_validity_trigger = { - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - is_playable_character = no - is_female = yes - custom_tooltip = { - text = wet_nurse_age_tt - age < 46 - } - custom_tooltip = { - text = NONE_IS_NOT_CLOSE_FAMILY_OF_CHARACTER_COURT_POSITION - NOT = { is_close_family_of = $EMPLOYER$ } - } - custom_tooltip = { - text = none_has_no_particular_noble_roots_trigger - has_no_particular_noble_roots_trigger = yes - } - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = wet_nurse_court_position } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } - # Nuns cannot be wet nurses - NOT = { has_trait = devoted } -} - -cave_hermit_validity_trigger = { - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - is_playable_character = no - custom_tooltip = { - text = NONE_NOT_THE_SPOUSE_OF_CHARACTER_COURT_POSITION - NOT = { is_spouse_of = $EMPLOYER$ } - } - has_trait = lifestyle_mystic - has_trait_xp = { - trait = lifestyle_mystic - value >= 50 - } - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = cave_hermit_court_position } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } -} - -master_assassin_validity_trigger = { - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - is_playable_character = no # You can't be a public figure and a master assassin - custom_tooltip = { - text = none_has_no_particular_noble_roots_trigger - has_no_particular_noble_roots_trigger = yes - } - custom_tooltip = { - text = NONE_NOT_THE_SPOUSE_OF_CHARACTER_COURT_POSITION - NOT = { is_spouse_of = $EMPLOYER$ } - } - custom_tooltip = { - text = faith_allows_master_assassin - faith = { - has_doctrine = tenet_fp3_fedayeen - NOR = { - has_doctrine = tenet_pacifism - has_doctrine = tenet_dharmic_pacifism - } - } - } - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = $EMPLOYER$ } - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = master_assassin_court_position } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } -} - -court_scholar_validity_trigger = { - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - is_adult = yes - is_landed = no #A requirement for inspirations - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = court_scholar_court_position } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } -} - -chronicler_validity_trigger = { - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - OR = { - is_landed = no - diplomacy >= 12 - } -} - -akolouthos_validity_trigger = { - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - is_landed = no - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = $EMPLOYER$ } # check culture of warrior not liege - custom_tooltip = { - text = NONE_NOT_THE_SPOUSE_OF_CHARACTER_COURT_POSITION - NOT = { is_spouse_of = $EMPLOYER$ } - } - OR = { - culture = { - OR = { - custom_tooltip = { - text = court_position_fp1_coastal_warriors - has_cultural_tradition = tradition_fp1_coastal_warriors - } - custom_tooltip = { - text = court_position_hird - has_cultural_tradition = tradition_hird - } - custom_tooltip = { - text = court_position_fp1_performative_honour - has_cultural_tradition = tradition_fp1_performative_honour - } - custom_tooltip = { - text = court_position_north_germanic - has_cultural_pillar = heritage_north_germanic - } - custom_tooltip = { - text = court_position_west_germanic - has_cultural_pillar = heritage_west_germanic - } - } - } - AND = { - has_trait = loyal - culture = { - NOR = { - custom_tooltip = { - text = court_position_not_same_culture_heritage - has_same_culture_heritage = $EMPLOYER$.culture - } - custom_tooltip = { - text = court_position_not_same_culture_language - has_same_culture_language = $EMPLOYER$.culture - } - } - } - } - } - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = akolouthos_court_position } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } -} - -court_brewmaster_validity_trigger = { - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - drinks_alcohol_trigger = yes - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = court_brewmaster_court_position } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } - OR = { - learning >= 12 - has_trait = lifestyle_reveler - has_trait = diligent - has_trait = patient - } -} - -court_astrologer_validity_trigger = { - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - is_landed = no - OR = { - has_religion = religion:tengrism_religion - custom_tooltip = { - text = court_position_mongolic - culture = { has_cultural_pillar = heritage_mongolic } - } - custom_tooltip = { - text = court_position_turkic - culture = { has_cultural_pillar = heritage_turkic } - } - has_trait = nomadic_philosophy - has_trait = lifestyle_mystic - $EMPLOYER$.domicile.domicile_culture ?= culture - } - custom_tooltip = { - text = court_position_not_kurultai - is_councillor = no - } -} - -boyan_validity_trigger = { - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - is_landed = no - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = $EMPLOYER$ } - custom_tooltip = { - text = court_position_nomadic - government_has_flag = government_is_nomadic - } - custom_tooltip = { - text = boyan_validity_trigger_tt - trigger_if = { - limit = { - NOT = { - has_court_position = boyan_court_position - } - } - martial >= 12 - } - } -} - -siege_engineer_validity_trigger = { - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - is_landed = no - has_trait = military_engineer -} - -yurtchi_validity_trigger = { - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - is_landed = no - custom_tooltip = { - text = court_position_nomadic - government_has_flag = government_is_nomadic - } - custom_tooltip = { - text = yurtchi_validity_trigger_tt - trigger_if = { - limit = { - NOT = { - has_court_position = yurtchi_court_position - } - } - stewardship >= 12 - } - } -} - -cherbi_validity_trigger = { - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = $EMPLOYER$ } - is_landed = no - custom_tooltip = { - text = court_position_nomadic - government_has_flag = government_is_nomadic - } - custom_tooltip = { - text = cherbi_validity_trigger_tt - trigger_if = { - limit = { - NOT = { - has_court_position = cherbi_court_position - } - } - prowess >= 12 - } - } -} - -yeke_jarquchi_validity_trigger = { - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - is_landed = no - custom_tooltip = { - text = court_position_nomadic - government_has_flag = government_is_nomadic - } - custom_tooltip = { - text = yeke_jarquchi_validity_trigger_tt - trigger_if = { - limit = { - NOT = { - has_court_position = yeke_jarquchi_court_position - } - } - diplomacy >= 12 - } - } -} - -foreign_emissary_validity_trigger = { - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - is_landed = no - custom_tooltip = { - text = court_position_different_culture - NOT = { culture = $EMPLOYER$.culture } - } -} - -keeper_of_the_horses_validity_trigger = { - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - is_landed = no - custom_tooltip = { - text = court_position_nomadic - government_has_flag = government_is_nomadic - } - custom_tooltip = { - text = keeper_of_the_horses_validity_trigger_tt - trigger_if = { - limit = { - NOT = { - has_court_position = keeper_of_the_horses_court_position - } - } - prowess >= 12 - } - } -} - -court_position_generator_pickable_trigger = { - $EMPLOYER$ = { - OR = { - can_employ_court_position_type = $POS$_court_position - employs_court_position = $POS$_court_position - } - } - NOT = { has_court_position = $POS$_court_position } - trigger_if = { - limit = { liege ?= $EMPLOYER$ } - can_be_employed_as = $POS$_court_position - } - trigger_else = { - $POS$_validity_trigger = { EMPLOYER = $EMPLOYER$ } - } - trigger_if = { - limit = { exists = var:target_court_position } - NOT = { var:target_court_position = flag:$POS$ } - } - trigger_if = { - limit = { exists = var:second_court_position } - NOT = { var:second_court_position = flag:$POS$ } - } - trigger_if = { - limit = { exists = scope:eunuch } - NOT = { - $EMPLOYER$ = { - any_court_position_holder = { - type = $POS$_court_position - is_close_family_of = scope:eunuch - } - } - } - } -} - -camp_officer_generator_pickable_trigger = { - $EMPLOYER$ = { - OR = { - can_employ_court_position_type = $POS$_camp_officer - employs_court_position = $POS$_camp_officer - } - } - NOT = { has_court_position = $POS$_camp_officer } - would_be_valid_for_court_position = { - court_position = $POS$_camp_officer - employer = $EMPLOYER$ - } - trigger_if = { - limit = { exists = var:target_court_position } - NOT = { var:target_court_position = flag:$POS$ } - } - trigger_if = { - limit = { exists = var:second_court_position } - NOT = { var:second_court_position = flag:$POS$ } - } -} - -# Set to 0 with Dynasty Perk Inner Circle -court_position_inner_circle_salary_trigger = { - trigger_if = { - limit = { - exists = scope:liege - } - scope:liege ?= { - dynasty ?= { has_dynasty_perk = fp2_coterie_legacy_1 } - employs_court_position = $POS$_court_position - any_court_position_holder = { - type = $POS$_court_position - house ?= scope:liege.house - } - } - } - trigger_else = { always = no } -} - -# Halved via obligation hook -court_position_obligation_hook_salary_trigger = { - trigger_if = { - limit = { exists = $LIEGE$ } - $LIEGE$ = { - employs_court_position = $POS$_court_position - any_court_position_holder = { - type = $POS$_court_position - $LIEGE$ = { - OR = { - has_hook_of_type = { - type = obligation_hook - target = prev - } - has_hook_of_type = { - type = strong_obligation_hook - target = prev - } - } - } - } - } - } - trigger_else = { always = no } -} -can_be_employed_as_any_court_position_trigger = { - OR = { - can_be_employed_as = court_poet_court_position - can_be_employed_as = court_musician_court_position - can_be_employed_as = court_jester_court_position - can_be_employed_as = cupbearer_court_position - can_be_employed_as = lady_in_waiting_court_position - can_be_employed_as = chronicler_court_position - can_be_employed_as = master_of_horse_court_position - can_be_employed_as = bodyguard_court_position - can_be_employed_as = champion_court_position - can_be_employed_as = master_of_hunt_court_position - can_be_employed_as = akolouthos_court_position - can_be_employed_as = royal_architect_court_position - can_be_employed_as = seneschal_court_position - can_be_employed_as = keeper_of_swans_court_position - can_be_employed_as = court_gardener_court_position - can_be_employed_as = food_taster_court_position - can_be_employed_as = chief_eunuch_court_position - can_be_employed_as = master_assassin_court_position - can_be_employed_as = court_tutor_court_position - can_be_employed_as = court_guru_court_position - can_be_employed_as = high_almoner_court_position - can_be_employed_as = court_physician_court_position - can_be_employed_as = antiquarian_court_position - can_be_employed_as = cave_hermit_court_position - can_be_employed_as = court_scholar_court_position - can_be_employed_as = court_brewmaster_court_position - can_be_employed_as = court_astrologer_court_position - can_be_employed_as = grand_preceptor_court_position - can_be_employed_as = grand_mentor_court_position - can_be_employed_as = grand_guardian_court_position - can_be_employed_as = fire_dragon_engineer_court_position - can_be_employed_as = keeper_of_the_harem_court_position - can_be_employed_as = boyan_court_position - can_be_employed_as = siege_engineer_court_position - can_be_employed_as = yurtchi_court_position - can_be_employed_as = cherbi_court_position - can_be_employed_as = yeke_jarquchi_court_position - can_be_employed_as = foreign_emissary_court_position - can_be_employed_as = keeper_of_the_horses_court_position - } -} - -court_position_petition_ai_weight_trigger = { - scope:employee.var:petition_court_position_liege ?= scope:liege - scope:employee.var:petition_court_position_role ?= flag:$ROLE$ -} - -# Salary halved -court_position_halved_salary_trigger = { - trigger_if = { - limit = { exists = scope:liege } - scope:liege = { - employs_court_position = $POS$_court_position - any_court_position_holder = { - type = $POS$_court_position - scope:liege = { - is_target_in_variable_list = { - name = halved_position_salary_employees - target = prev - } - } - } - } - } - trigger_else = { always = no } -} - -# Salary increased -court_position_increased_salary_trigger = { - trigger_if = { - limit = { exists = scope:liege } - scope:liege = { - employs_court_position = $POS$_court_position - any_court_position_holder = { - type = $POS$_court_position - scope:liege = { - is_target_in_variable_list = { - name = increased_position_salary_employees - target = prev - } - } - } - } - } - trigger_else = { always = no } -} - -# canp officers valid character triggers -valid_camp_officer_trigger = { - scope:employee = { - $OFFICER$_validity_trigger = { EMPLOYER = scope:liege } - } -} - -second_validity_trigger = { - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = second_camp_officer } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } -} - -quartermaster_validity_trigger = { - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = quartermaster_camp_officer } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - # Qualifications. - OR = { - # Skill. - stewardship >= decent_skill_rating - # Personality. - has_trait = greedy - has_trait = gluttonous - has_trait = diligent - # Misc. - has_trait = logistician - has_trait = organizer - } -} - -armorer_validity_trigger = { - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = armorer_camp_officer } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - # Qualifications. - OR = { - # Skill. - stewardship >= decent_skill_rating - # Personality. - has_trait = wrathful - has_trait = gregarious - has_trait = humble - has_trait = diligent - } -} - -chief_forager_validity_trigger = { - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = chief_forager_camp_officer } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - # Qualifications. - OR = { - # Skill. - learning >= decent_skill_rating - # Personality. - has_trait = humble - has_trait = eccentric - has_trait = deceitful - has_trait = diligent - # Misc. - has_trait = lifestyle_mystic - has_trait = lifestyle_gardener - has_trait = lifestyle_herbalist - has_trait = lifestyle_physician - has_trait = scholar - has_trait = witch - } -} - -master_thief_validity_trigger = { - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = master_thief_camp_officer } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - # Qualifications. - OR = { - # Skill. - intrigue >= decent_skill_rating - # Personality. - has_trait = craven - has_trait = deceitful - has_trait = arbitrary - has_trait = diligent - } -} - -head_porter_validity_trigger = { - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = head_porter_camp_officer } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - # Qualifications. - OR = { - # Skill. - martial >= decent_skill_rating - # Personality. - has_trait = humble - has_trait = content - has_trait = diligent - # Misc. - has_trait = athletic - } -} - -head_groom_validity_trigger = { - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = head_groom_camp_officer } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - # Qualifications. - OR = { - # Skill. - stewardship >= decent_skill_rating - # Personality. - has_trait = patient - has_trait = calm - has_trait = diligent - } -} - -huntperson_validity_trigger = { - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = huntperson_camp_officer } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - # Qualifications. - OR = { - # Skill. - prowess >= decent_skill_rating - # Personality. - has_trait = patient - has_trait = callous - has_trait = brave - has_trait = diligent - # Misc. - has_trait = lifestyle_hunter - has_trait = athletic - } -} - -kennelperson_validity_trigger = { - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = kennelperson_camp_officer } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - # Qualifications. - OR = { - # Skill. - martial >= decent_skill_rating - # Personality. - has_trait = gregarious - has_trait = stubborn - has_trait = diligent - } -} - -chief_engineer_validity_trigger = { - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = chief_engineer_camp_officer } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - # Qualifications. - OR = { - # Skill. - learning >= decent_skill_rating - # Personality. - has_trait = patient - has_trait = stubborn - has_trait = eccentric - has_trait = diligent - # Misc. - has_trait = military_engineer - has_trait = logistician - } -} - -witness_validity_trigger = { - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = witness_camp_officer } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - # Qualifications. - OR = { - # Skill. - diplomacy >= decent_skill_rating - # Personality. - has_trait = honest - has_trait = just - has_trait = brave - } -} - -person_haggler_validity_trigger = { - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = person_haggler_camp_officer } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - # Qualifications. - OR = { - # Skill. - diplomacy >= decent_skill_rating - # Personality. - has_trait = callous - has_trait = sadistic - has_trait = greedy - has_trait = diligent - } -} - -camp_cook_validity_trigger = { - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = camp_cook_camp_officer } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - # Qualifications. - OR = { - # Skill. - intrigue >= decent_skill_rating - # Personality. - has_trait = gluttonous - has_trait = humble - has_trait = diligent - } -} - -master_bard_validity_trigger = { - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = master_bard_camp_officer } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - # Qualifications. - OR = { - # Skill. - diplomacy >= decent_skill_rating - # Personality. - has_trait = gregarious - has_trait = arrogant - has_trait = deceitful - has_trait = diligent - # Misc. - has_trait = lifestyle_poet - has_trait = drunkard - } -} - -stooge_validity_trigger = { - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = stooge_camp_officer } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } -} - -master_of_arms_validity_trigger = { - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = master_of_arms_camp_officer } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - # Qualifications. - OR = { - # Skill. - martial >= decent_skill_rating - # Personality. - has_trait = brave - has_trait = stubborn - has_trait = callous - has_trait = diligent - # Misc. - has_trait = aggressive_attacker - has_trait = unyielding_defender - has_trait = organizer - } -} - -light_cavalry_captain_validity_trigger = { - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = light_cavalry_captain_camp_officer } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } -} - -camelry_captain_validity_trigger = { - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = camelry_captain_camp_officer } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } -} - -elephantry_captain_validity_trigger = { - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = elephantry_captain_camp_officer } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } -} - -heavy_cavalry_captain_validity_trigger = { - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = heavy_cavalry_captain_camp_officer } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } -} - -horse_archer_captain_validity_trigger = { - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = horse_archer_captain_camp_officer } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } -} - -archer_captain_validity_trigger = { - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = archer_captain_camp_officer } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } -} - -heavy_infantry_captain_validity_trigger = { - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = heavy_infantry_captain_camp_officer } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } -} - -light_infantry_captain_validity_trigger = { - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = light_infantry_captain_camp_officer } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } -} - -pike_captain_validity_trigger = { - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = pike_captain_camp_officer } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } -} - -master_of_spoils_validity_trigger = { - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = master_of_spoils_camp_officer } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - # Qualifications. - OR = { - # Skill. - stewardship >= decent_skill_rating - # Personality. - has_trait = greedy - has_trait = stubborn - has_trait = just - has_trait = diligent - } -} - -laureate_validity_trigger = { - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = laureate_camp_officer } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - # Qualifications. - OR = { - # Skill. - diplomacy >= decent_skill_rating - # Personality. - has_trait = gregarious - has_trait = arrogant - has_trait = fickle - # Misc. - has_trait = lifestyle_poet - has_trait = lifestyle_reveler - } -} - -camp_priest_validity_trigger = { - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = camp_priest_camp_officer } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - #have to be the same faith - faith = scope:liege.faith - # Qualifications. - OR = { - # Skill. - learning >= decent_skill_rating - # Personality. - has_trait = zealous - has_trait = gregarious - has_trait = compassionate - has_trait = diligent - # Misc. - has_trait = pilgrim - has_trait = holy_warrior - has_trait = faith_warrior - } -} - -charioteer_validity_trigger = { - is_imprisoned = no - custom_tooltip = { - text = NONE_NOT_THE_SPOUSE_OF_CHARACTER_COURT_POSITION - NOT = { is_spouse_of = $EMPLOYER$ } - } - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = $EMPLOYER$ } - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = charioteer_court_position } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } -} - -bookmaker_validity_trigger = { - is_imprisoned = no - custom_tooltip = { - text = NONE_NOT_THE_SPOUSE_OF_CHARACTER_COURT_POSITION - NOT = { is_spouse_of = $EMPLOYER$ } - } - stewardship >= 8 - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = bookmaker_court_position } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } -} - -grand_preceptor_validity_trigger = { - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = grand_preceptor_court_position } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } -} - -grand_guardian_validity_trigger = { - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = grand_guardian_court_position } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } -} - -fire_dragon_engineer_validity_trigger = { - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = fire_dragon_engineer_court_position } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } -} - -grand_mentor_validity_trigger = { - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = grand_mentor_court_position } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } -} - -keeper_of_the_harem_validity_trigger = { - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { NOT = { has_court_position = keeper_of_the_harem_court_position } } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } -} - -court_guru_validity_trigger = { - base_court_position_validity_trigger = { EMPLOYER = $EMPLOYER$ } - has_trait = lifestyle_mystic - OR = { - has_religion = religion:buddhism_religion - has_religion = religion:hinduism_religion - } - custom_tooltip = { - text = NONE_NOT_THE_SPOUSE_OF_CHARACTER_COURT_POSITION - NOT = { is_spouse_of = $EMPLOYER$ } - } - custom_tooltip = { - text = none_does_not_have_a_full_time_job - trigger_if = { - limit = { - NOR = { - has_court_position = court_tutor_court_position - has_court_position = court_guru_court_position - } - } - court_position_does_not_already_have_a_job_trigger = yes # This positions is considered a job, and cannot be held at the same time as another similar position - } - } -} - -### Court Position Task Triggers ### -wet_nurse_instill_virtue_trigger = { - NOT = { has_trait = $TRAIT$ } - scope:notification_character.faith = { trait_is_virtue = $TRAIT$ } -} - -court_position_employee_shown_trigger = { - is_imprisoned = no - tgp_is_ceremonial_liege_trigger = no -} - -can_employ_court_eunuchs_trigger = { - $CHAR$ ?= { - custom_tooltip = { - text = can_appoint_chief_eunuch_name_tt - culture = { # Culture that has eunuchs - has_cultural_parameter = can_appoint_chief_eunuch - } - } - } -} diff --git a/N3OW/common/scripted_triggers/00_court_role_triggers.txt b/N3OW/common/scripted_triggers/00_court_role_triggers.txt deleted file mode 100644 index dadca052..00000000 --- a/N3OW/common/scripted_triggers/00_court_role_triggers.txt +++ /dev/null @@ -1,92 +0,0 @@ -is_non_spouse_councillor_trigger = { - is_available_healthy_ai_adult = yes - NOT = { - is_spouse_of = scope:ruler - } -} - -court_event_ongoing_trigger = { - OR = { - has_local_player_open_court_event = yes - has_local_player_unopened_court_event = yes - } -} - -is_available_non_adventurer_inspired_person_trigger = { - exists = inspiration - is_in_the_same_court_as_or_guest = scope:ruler - is_available_healthy_ai_adult = yes -} - -is_available_schemer = { - save_temporary_scope_as = schemer_check - OR = { - has_owned_scheme = yes - scope:ruler = { - any_targeting_scheme = { - is_hostile = yes - any_scheme_agent_character = { - this = scope:schemer_check - } - } - } - } - is_available_healthy_ai_adult = yes -} - -is_available_non_primary_consort = { - is_available = yes - this != primary_spouse -} - -is_available_non_child_family = { - is_available = yes - is_healthy = yes - child_not_infant_trigger = yes - is_close_or_extended_family_of = scope:ruler -} - -is_incorrect_type_for_throne_trigger = { - trigger_if = { - limit = { - exists = $CHARACTER$.capital_county - } - $CHARACTER$.capital_county.culture = { - OR = { - has_graphical_mena_culture_group_trigger = yes - has_graphical_india_culture_group_trigger = yes - } - } - } - OR = { - has_trait = dwarf - has_trait = giant - is_adult = no - } -} - -is_spouse_incorrect_type_for_throne_trigger = { - trigger_if = { - limit = { - exists = $CHARACTER$.capital_county - } - $CHARACTER$.capital_county.culture = { - OR = { - has_graphical_mena_culture_group_trigger = yes - has_graphical_india_culture_group_trigger = yes - } - } - } - exists = $CHARACTER$.primary_spouse - $CHARACTER$.primary_spouse = { - OR = { - has_trait = dwarf - has_trait = giant - is_adult = no - } - } -} - -has_court_event_flag = { - has_character_flag = in_court_event -} diff --git a/N3OW/common/scripted_triggers/00_court_scheme_triggers.txt b/N3OW/common/scripted_triggers/00_court_scheme_triggers.txt deleted file mode 100644 index ad8d9021..00000000 --- a/N3OW/common/scripted_triggers/00_court_scheme_triggers.txt +++ /dev/null @@ -1,6 +0,0 @@ -court_love_is_shunned_or_criminal_trigger = { - OR = { - scope:target = { relation_with_character_is_incestuous_in_my_or_lieges_faith_trigger = { CHARACTER = scope:owner } } - scope:target = { relation_with_character_is_sodomy_in_my_or_lieges_faith_trigger = { CHARACTER = scope:owner } } - } -} \ No newline at end of file diff --git a/N3OW/common/scripted_triggers/00_courtier_guest_management_triggers.txt b/N3OW/common/scripted_triggers/00_courtier_guest_management_triggers.txt deleted file mode 100644 index 706ffd4c..00000000 --- a/N3OW/common/scripted_triggers/00_courtier_guest_management_triggers.txt +++ /dev/null @@ -1,830 +0,0 @@ -###TRIGGER LIST### - -#GUEST/COURTIER LEAVING/ARRIVING TRIGGERS: -#any_child_not_in_traveling_family_trigger -#any_consort_not_in_traveling_family_trigger -#courtier_allowed_to_leave_trigger -#guest_allowed_to_leave_trigger -#guest_allowed_to_arrive_trigger - -#GUEST/COURTIER USEFULNESS: -#courtier_or_guest_claim_trigger -#useful_courtier_or_guest_claim_trigger -#has_useful_potential_spouse_claim_trigger -#guest_knight_candidate_trigger -#guest_commander_candidate_trigger -#guest_vassal_candidate_trigger -#guest_physician_candidate_trigger -#guest_male_female_balance_trigger -#child_available_for_guest_marriage_trigger -#guest_marriage_candidate_trigger - -#POOL CHARACTER TRIGGERS: -#pool_character_is_pruneable_trigger - - -####GUEST/COURTIER LEAVING/ARRIVING TRIGGERS### -same_location_and_court_status_as = { # Same location and both are in court / are guests / are pool characters - exists = location - exists = $CHARACTER$.location - location = $CHARACTER$.location - OR = { - is_in_the_same_court_as = $CHARACTER$ - trigger_if = { - limit = { $CHARACTER$ = { is_pool_guest = yes } } - is_pool_guest = yes - } - trigger_if = { - limit = { $CHARACTER$ = { is_pool_character = yes } } - is_pool_character = yes - } - } - -} - -any_child_not_in_traveling_family_trigger = { - save_temporary_scope_as = traveler - exists = location - any_child = { - is_adult = no - same_location_and_court_status_as = { CHARACTER = scope:traveler } - save_temporary_scope_as = checking_child - scope:traveler = { - NOT = { - any_traveling_family_member = { this = scope:checking_child } - } - } - } -} - -any_consort_not_in_traveling_family_trigger = { - save_temporary_scope_as = traveler - exists = location - any_spouse = { - exists = location - same_location_and_court_status_as = { CHARACTER = scope:traveler } - save_temporary_scope_as = checking_consort - scope:traveler = { - NOT = { - any_traveling_family_member = { this = scope:checking_consort } - } - } - } -} - - -courtier_allowed_to_leave_trigger = { - save_temporary_scope_as = leaving_courtier - NOR = { - # Not blocked by script - has_character_flag = blocked_from_leaving - is_councillor_of = scope:liege - is_consort_of = scope:liege - scope:liege = { - player_heir_position = { - target = scope:leaving_courtier - value <= 2 #Not 1st, 2nd or 3rd player heir (0,1,2) - } - } - has_any_court_position = yes - has_relation_lover = scope:liege - is_knight_of = scope:liege - is_tax_collector_of = scope:liege - any_relation = { - type = ward - OR = { - this = scope:liege - AND = { - is_courtier_of = scope:liege - OR = { - NOT = { any_close_family_member = { this = scope:leaving_courtier } } - any_close_family_member = { this = scope:liege } - } - } - } - } - any_relation = { - type = guardian - OR = { - this = scope:liege - AND = { - is_courtier_of = scope:liege - OR = { - NOT = { any_close_family_member = { this = scope:leaving_courtier } } - any_close_family_member = { this = scope:liege } - } - } - } - } - any_relation = { - type = mentor - OR = { - this = scope:liege - AND = { - is_courtier_of = scope:liege - OR = { - NOT = { any_close_family_member = { this = scope:leaving_courtier } } - any_close_family_member = { this = scope:liege } - } - } - } - } - any_relation = { - type = student - OR = { - this = scope:liege - AND = { - is_courtier_of = scope:liege - OR = { - NOT = { any_close_family_member = { this = scope:leaving_courtier } } - any_close_family_member = { this = scope:liege } - } - } - } - } - #Keep daughters/sons for marriages - AND = { - OR = { - is_child_of = scope:liege - is_grandchild_of = scope:liege - is_great_grandchild_of = scope:liege - } - NOT = { has_trait = bastard } - trigger_if = { #Daughters - limit = { is_female = yes } - scope:liege = { - OR = { - has_realm_law = male_only_law - has_realm_law = male_preference_law - } - } - } - trigger_else = { #Sons - scope:liege = { - OR = { - has_realm_law = female_only_law - has_realm_law = female_preference_law - } - } - } - } - #No children of liege can leave court while children - AND = { - OR = { - is_child_of = scope:liege - is_grandchild_of = scope:liege - is_great_grandchild_of = scope:liege - } - is_adult = no - } - #Claimant won't leave while claim is pressed... - scope:liege = { pressing_claim_of_character_trigger = { CHARACTER = scope:leaving_courtier } } - #Would be leaving without a child or consort - any_child_not_in_traveling_family_trigger = yes - any_consort_not_in_traveling_family_trigger = yes - #...Or while they have a promise for a claim getting pressed - has_character_flag = courtier_staying_for_claim - - #...Or if they're involved in an ongoing event - has_variable = stewardship_duty_1062_employer - - #...Or if someone is trying to elope with them - any_targeting_scheme = { - scheme_type = elope - } - - #Non-dominant spouses don't wander off - AND = { - is_married = yes - any_spouse = { - OR = { - liege ?= scope:leaving_courtier.liege - - AND = { - exists = host - exists = scope:leaving_courtier.host - liege = scope:leaving_courtier.host - } - is_in_the_same_court_as = scope:leaving_courtier - } - } - trigger_if = { - limit = { is_female = yes } - scope:liege = { - OR = { - has_realm_law = male_only_law - has_realm_law = male_preference_law - } - } - } - trigger_else = { - scope:liege = { - OR = { - has_realm_law = female_only_law - has_realm_law = female_preference_law - } - } - } - } - - # Diarchs don't leave their court. - is_diarch = yes - is_designated_diarch = yes - - #Shieldmaidens stay till dismissed. - has_trait = shieldmaiden - - # Children taught a lesson won't leave - has_character_modifier = mellowed_spirit - - # Courtiers with sponsored inspirations won't leave on their own. - inspiration ?= { exists = inspiration_sponsor } - - scope:liege = { government_has_flag = government_is_landless_adventurer } - is_obedient_to = scope:liege - - AND = { - scope:liege.primary_title = title:h_china - OR = { - is_child_of = scope:liege - is_grandchild_of = scope:liege - is_great_grandchild_of = scope:liege - } - } - } -} - - -guest_allowed_to_leave_trigger = { - NOR = { - # Not blocked by script - has_character_flag = blocked_from_leaving - #Agent in a local scheme - scope:host = { - any_courtier = { - any_targeting_scheme = { - any_scheme_agent_character = { - this = scope:guest - } - } - } - } - scope:host = { - any_targeting_scheme = { - any_scheme_agent_character = { - this = scope:guest - } - } - } - any_child = { # No child can be a known child of the host - is_adult = no - any_parent = { this = scope:host } - } - # Diarchs don't leave their court. - is_diarch = yes - is_designated_diarch = yes - #Would be leaving without spouse or underage child - any_child_not_in_traveling_family_trigger = yes - any_consort_not_in_traveling_family_trigger = yes - #Is waiting for inspiration funding - exists = inspiration - } -} - -guest_allowed_to_arrive_trigger = { - trigger_if = { - limit = { exists = var:last_visited_ruler } - NOT = { var:last_visited_ruler = $HOST$ } - } - trigger_if = { # Make sure that they're not trying to go back to where they are right now - limit = { exists = host } - NOT = { host = $HOST$ } - } - NOT = { has_trait_with_flag = epidemic_disease } - NOT = { has_relation_rival = $HOST$ } - #Compatible faiths - faith = { - save_temporary_scope_as = potential_guest_faith - faith_hostility_level = { - target = $HOST$.faith - value < faith_evil_level - } - } - $HOST$.faith = { - faith_hostility_level = { - target = scope:potential_guest_faith - value < faith_evil_level - } - } - - #Isn't too good for host - NAND = { - OR = { - any_claim = { tier = tier_empire } - any_close_family_member = { highest_held_title_tier = tier_empire } - } - $HOST$ = { highest_held_title_tier <= tier_county } - } -} #Note: this trigger used to contain opinion triggers but then some awful rulers could never get guests because everyone hates them - - -#This is a localized trigger for checking that a character do not have a spouse that's employed or has some other circumstance blocking them from being recruited to a court -can_recruit_character_to_court_trigger = { - $RECRUITER$ = { save_temporary_scope_as = recruiter } - $RECRUITEE$ = { save_temporary_scope_as = recruitee } - scope:recruitee = { - bp2_valid_for_standard_interactions_trigger = yes - NOR = { - custom_description = { - text = is_not_wandering_child - subject = scope:recruitee - AND = { - is_adult = no - NOT = { is_close_or_extended_family_of = scope:recruiter } - } - } - is_imprisoned = yes - is_theocratic_lessee = yes - is_diarch = yes - trigger_if = { - limit = { - exists = host - host = { is_ai = no } - NOT = { is_player_heir_of = scope:recruiter } - } - is_player_heir_of = host - } - trigger_if = { - limit = { - exists = host - host = { is_ai = yes } - NOT = { is_player_heir_of = scope:recruiter } - } - is_primary_heir_of = host - } - trigger_if = { - limit = { exists = host } - is_consort_of = host - } - trigger_if = { - limit = { exists = host } - host = { - pressing_claim_of_character_trigger = { CHARACTER = scope:recruitee } - } - } - trigger_if = { - limit = { exists = host } - #Are they employed? - is_councillor_of = scope:recruitee.host - is_knight_of = scope:recruitee.host - any_relation = { - type = ward - OR = { - this = scope:recruitee.host - is_close_family_of = scope:recruitee.host - } - } - any_relation = { - type = guardian - OR = { - this = scope:recruitee.host - is_close_family_of = scope:recruitee.host - } - } - any_relation = { - type = mentor - OR = { - this = scope:recruitee.host - is_close_family_of = scope:recruitee.host - } - } - any_relation = { - type = student - OR = { - this = scope:recruitee.host - is_close_family_of = scope:recruitee.host - } - } - any_court_position_employer = { this = scope:recruitee.host } - } - trigger_if = { - limit = { - scope:recruiter = { has_government = landless_adventurer_government } - } - custom_tooltip = { - text = can_recruit_character_to_court_trigger.tt.laamps_invitation_restrictions - NOR = { - is_player_heir_of = scope:recruiter - has_relation_soulmate = scope:recruiter - has_relation_best_friend = scope:recruiter - is_consort_of = scope:recruiter - AND = { - is_pool_character = yes - OR = { - has_relation_friend = scope:recruiter - has_relation_lover = scope:recruiter - is_close_family_of = scope:recruiter - } - } - } - } - } - - #Do they have the "wrong" marriage type and the spouse is employed? - custom_description = { - text = is_married_matrilineally_and_spouse_is_dominant_partner - subject = scope:recruitee - any_spouse = { - is_female = yes - matrilinear_marriage = yes - host ?= scope:recruitee.host - save_temporary_scope_as = spouse - OR = { #Is employed in some way - is_councillor_of = scope:recruitee.host - is_knight_of = scope:recruitee.host - any_relation = { - type = ward - OR = { - this = scope:recruitee.host - is_close_family_of = scope:recruitee.host - } - } - any_relation = { - type = guardian - OR = { - this = scope:recruitee.host - is_close_family_of = scope:recruitee.host - } - } - any_relation = { - type = mentor - OR = { - this = scope:recruitee.host - is_close_family_of = scope:recruitee.host - } - } - any_relation = { - type = student - OR = { - this = scope:recruitee.host - is_close_family_of = scope:recruitee.host - } - } - scope:spouse = { - any_court_position_employer = { this = scope:recruitee.host } - } - } - } - } - custom_description = { - text = is_married_patrilineally_and_spouse_is_dominant_partner - subject = scope:recruitee - any_spouse = { - is_male = yes - patrilinear_marriage = yes - host ?= scope:recruitee.host - save_temporary_scope_as = spouse - OR = { #Is employed in some way - is_councillor_of = scope:recruitee.host - is_knight_of = scope:recruitee.host - any_relation = { - type = ward - OR = { - this = scope:recruitee.host - is_close_family_of = scope:recruitee.host - } - } - any_relation = { - type = guardian - OR = { - this = scope:recruitee.host - is_close_family_of = scope:recruitee.host - } - } - any_relation = { - type = mentor - OR = { - this = scope:recruitee.host - is_close_family_of = scope:recruitee.host - } - } - any_relation = { - type = student - OR = { - this = scope:recruitee.host - is_close_family_of = scope:recruitee.host - } - } - scope:spouse = { - any_court_position_employer = { this = scope:recruitee.host } - } - } - } - } - custom_description = { - text = "is_escaped_prisoner" - subject = scope:recruitee - OR = { - has_opinion_modifier = { - modifier = attempted_imprisonment_opinion - target = scope:recruiter - } - has_opinion_modifier = { - modifier = treasonous_imprison_refusal - target = scope:recruiter - } - AND = { - exists = var:escaped_imprisonment_from - var:escaped_imprisonment_from = scope:recruiter - } - } - } - } - } -} - - -###GUEST/COURTIER USEFULNESS TRIGGERS### -courtier_or_guest_claim_trigger = { - exists = holder - NOT = { - holder = { - OR = { - this = $RULER$ - target_is_liege_or_above = $RULER$ - } - } - } -} - -useful_courtier_or_guest_claim_trigger = { - courtier_or_guest_claim_trigger = { RULER = $RULER$ } - tier < $RULER$.highest_held_title_tier - $RULER$ = { is_landed = yes } - OR = { #For distance check - exists = title_province - exists = holder.capital_province - } - #The higher tier the ruler has, the longer distance is acceptable - #We prefer to measure against the title's province, but if there is none, check its holder - trigger_if = { - limit = { $RULER$ = { highest_held_title_tier = tier_empire } } - trigger_if = { - limit = { exists = title_province } - title_province = { squared_distance = { target = $RULER$.capital_province value <= squared_distance_almost_massive } } - } - trigger_else = { - holder.capital_province = { squared_distance = { target = $RULER$.capital_province value <= squared_distance_almost_massive } } - } - } - trigger_else_if = { - limit = { $RULER$ = { highest_held_title_tier = tier_kingdom } } - trigger_if = { - limit = { exists = title_province } - title_province = { squared_distance = { target = $RULER$.capital_province value <= squared_distance_huge } } - } - trigger_else = { - holder.capital_province = { squared_distance = { target = $RULER$.capital_province value <= squared_distance_huge } } - } - } - trigger_else_if = { - limit = { $RULER$ = { highest_held_title_tier = tier_duchy } } - trigger_if = { - limit = { exists = title_province } - title_province = { squared_distance = { target = $RULER$.capital_province value <= squared_distance_large } } - } - trigger_else = { - holder.capital_province = { squared_distance = { target = $RULER$.capital_province value <= squared_distance_large } } - } - } - trigger_else = { - trigger_if = { - limit = { exists = title_province } - title_province = { squared_distance = { target = $RULER$.capital_province value <= squared_distance_medium } } - } - trigger_else = { - holder.capital_province = { squared_distance = { target = $RULER$.capital_province value <= squared_distance_medium } } - } - } -} - -neighboring_useful_courtier_or_guest_claim_trigger = { - courtier_or_guest_claim_trigger = { RULER = $RULER$ } - tier < $RULER$.highest_held_title_tier - exists = $RULER$.capital_province - holder = { - any_sub_realm_county = { - is_neighbor_to_realm = $RULER$ - } - } -} - -has_useful_potential_spouse_claim_trigger = { - any_claim = { - pressed = yes - exists = holder - NOT = { - holder = { - OR = { - this = $RULER$ - target_is_liege_or_above = $RULER$ - } - } - } - } -} - -guest_knight_candidate_trigger = { - can_be_knight_trigger = { ARMY_OWNER = $HOST$ } - age < 60 - age >= 25 - prowess > medium_skill_rating -} - -guest_commander_candidate_trigger = { - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = $HOST$ } - age < 60 - age >= 25 - martial > medium_skill_rating -} - -guest_vassal_candidate_good_traits_trigger = { - OR = { #Gives +opinion of liege - has_trait = content - has_trait = trusting - has_trait = humble - } -} - -guest_vassal_candidate_bad_traits_trigger = { - OR = { #Gives -opinion of liege - has_trait = ambitious - has_trait = arrogant - has_trait = impatient - } -} - -guest_vassal_candidate_trigger = { - age < 60 - faith = scope:host.faith - culture = scope:host.culture - faith = { - has_dominant_ruling_gender = prev - } - guest_vassal_candidate_bad_traits_trigger = no - save_temporary_scope_as = vassal_candidate - is_eunuch_trigger = no - NOR = { #So they don't leave your realm through inheritance - any_heir_title = { - scope:guest = { is_primary_heir_of = scope:vassal_candidate } - } - any_child = { is_playable_character = yes } - has_trait = devoted - has_trait = order_member - } -} - -guest_physician_candidate_trigger = { - age < 70 - learning >= decent_skill_rating -} - -guest_male_female_balance_trigger = { #are you interesting enough to get "upbalanced" to make up for lack of available positions due to your gender? - is_adult = yes - age <= 65 - is_lowborn = no -} - -child_available_for_guest_marriage_trigger = { - is_married = no - is_betrothed = no - age >= 10 - OR = { - is_vassal_of = scope:host - is_courtier_of = scope:host - } -} - -guest_marriage_candidate_trigger = { - save_temporary_scope_as = marriage_candidate - OR = { - is_male = yes - age <= 40 - } - OR = { - AND = { - is_married = no - can_marry_character_trigger = { CHARACTER = scope:host } - } - scope:host = { - any_child = { - child_available_for_guest_marriage_trigger = yes - can_marry_character_trigger = { CHARACTER = scope:marriage_candidate } - } - } - } -} - -###POOL TRIGGERS### -is_visitable_relation_trigger = { - capital_province ?= { local_pool_is_full_trigger = no } - NOR = { - this = $CHARACTER$.host - has_relation_rival = $CHARACTER$ - } - $CHARACTER$ = { - NOT = { - var:last_visited_ruler ?= prev - } - } -} - - -########################### -# POOL CHARACTER TRIGGERS # -########################### - -pool_character_is_pruneable_trigger = { - save_temporary_scope_as = pool_prune_check - is_adult = yes - NOR = { - has_trait = heresiarch - has_trait = populist_leader - has_trait = adventurer_follower - has_trait = adventurer - has_trait = historical_character - has_character_flag = ai_will_not_convert - is_married = yes - any_claim = { } - any_child = { is_adult = no } - any_relation = { - type = lover - is_ruler = yes - } - any_relation = { - type = friend - is_ruler = yes - } - any_close_or_extended_family_member = { is_ruler = yes } - #Belongs to a dynasty with more than 1 member - any_relation = { - type = rival - is_ai = no - } - has_character_flag = easteregg - } - trigger_if = { - limit = { - is_lowborn = no - } - NOR = { - diplomacy >= high_skill_rating - martial >= high_skill_rating - stewardship >= high_skill_rating - intrigue >= high_skill_rating - learning >= high_skill_rating - prowess >= high_skill_rating - dynasty ?= { any_dynasty_member = { this != scope:pool_prune_check } } - any_relation = { - type = rival - is_ruler = yes - } - culture = { - has_cultural_tradition = tradition_diasporic - } - } - } -} - - -local_pool_is_full_trigger = { - number_of_characters_in_pool >= full_pool_size -} - -guest_poet_candidate_trigger = { - age < 80 - age >= 16 - diplomacy > medium_skill_rating -} - -is_courtier_or_knight_of_root = { - OR = { - is_courtier_of = root - is_knight_of = root - } -} - -guest_herder_candidate_trigger = { - government_has_flag = government_is_herder - has_trait = lifestyle_seasoned_pastor - trigger_if = { - limit = { root.faith = { has_doctrine = doctrine_gender_male_dominated } } - is_male = yes - } - trigger_if = { - limit = { root.faith = { has_doctrine = doctrine_gender_female_dominated } } - is_female = yes - } - age < 45 - age >= 25 -} diff --git a/N3OW/common/scripted_triggers/00_crime_triggers.txt b/N3OW/common/scripted_triggers/00_crime_triggers.txt deleted file mode 100644 index 212ed8f1..00000000 --- a/N3OW/common/scripted_triggers/00_crime_triggers.txt +++ /dev/null @@ -1,68 +0,0 @@ -#is_witch_trigger -#is_deviant_trigger - - - -is_witch_trigger = { - custom_description = { - text = is_a_witch - subject = this - OR = { - has_trait = witch - any_secret = { type = secret_witch } - } - } -} - -is_witch_known_by_trigger = { - OR = { - has_trait = witch - custom_description = { - text = has_a_witch_secret_known_by_character - subject = this - object = $CHARACTER$ - any_secret = { - type = secret_witch - is_known_by = $CHARACTER$ - } - } - } -} - -is_deviant_trigger = { - OR = { - has_trait = deviant - any_secret = { type = secret_deviant } - } -} - -is_incestuous_trigger = { - OR = { - has_trait = incestuous - any_secret = { - type = secret_incest - } - } -} - -sexual_activity_with_partner_is_criminal_in_faith_trigger = { - save_temporary_scope_as = sexual_legality_check - OR = { - #Incest (currently never illegal so commented out) - #AND = { - # relation_with_character_is_incestuous_in_faith_trigger = { CHARACTER = $PARTNER$ FAITH = $FAITH$ } - # trait_is_criminal_in_faith_trigger = { TRAIT = incestuous FAITH = $FAITH$ GENDER_CHARACTER = scope:sexual_legality_check } } - #} - #Sodomy - AND = { - relation_with_character_is_sodomy_in_faith_trigger = { CHARACTER = $PARTNER$ FAITH = $FAITH$ } - trait_is_criminal_in_faith_trigger = { TRAIT = sodomite FAITH = $FAITH$ GENDER_CHARACTER = scope:sexual_legality_check } - } - #Adultery/fornication - AND = { - NOT = { is_consort_of = $PARTNER$ } - trait_is_criminal_in_faith_trigger = { TRAIT = fornicator FAITH = $FAITH$ GENDER_CHARACTER = scope:sexual_legality_check } - } - } -} - diff --git a/N3OW/common/scripted_triggers/00_crypto_religionist_triggers.txt b/N3OW/common/scripted_triggers/00_crypto_religionist_triggers.txt deleted file mode 100644 index 6567c990..00000000 --- a/N3OW/common/scripted_triggers/00_crypto_religionist_triggers.txt +++ /dev/null @@ -1,16 +0,0 @@ -knows_about_character_being_same_crypto_religionist_trigger = { - exists = secret_faith - $CHARACTER$ = { exists = secret_faith } - secret_faith = $CHARACTER$.secret_faith - any_known_secret = { - secret_owner = $CHARACTER$ - secret_type = secret_crypto_religionist - } -} - -has_crypto_religionist_secret_known_by_character_trigger = { - any_secret = { - type = secret_crypto_religionist - any_secret_knower = { this = $CHARACTER$ } - } -} \ No newline at end of file diff --git a/N3OW/common/scripted_triggers/00_cultural_heritage_triggers.txt b/N3OW/common/scripted_triggers/00_cultural_heritage_triggers.txt deleted file mode 100644 index bcac7584..00000000 --- a/N3OW/common/scripted_triggers/00_cultural_heritage_triggers.txt +++ /dev/null @@ -1,233 +0,0 @@ -### Cultural heritage triggers -# By their nature these triggers will be a bit lose and inaccurate, so keep that in mind when using them! - -#ASIA -culture_has_asian_heritage_pillar_trigger = { - OR = { - culture_has_east_asian_heritage_pillar_trigger = yes - culture_has_west_asian_heritage_pillar_trigger = yes - culture_has_south_asian_heritage_pillar_trigger = yes - culture_has_southeast_asian_heritage_pillar_trigger = yes - culture_has_north_asian_heritage_pillar_trigger = yes - culture_has_central_asian_heritage_pillar_trigger = yes - } -} -culture_has_east_asian_heritage_pillar_trigger = { - culture = { - OR = { - has_cultural_pillar = heritage_tibetan - has_cultural_pillar = heritage_chinese - has_cultural_pillar = heritage_japonic - has_cultural_pillar = heritage_korean - has_cultural_pillar = heritage_buyeo - has_cultural_pillar = heritage_qiangic - has_cultural_pillar = heritage_viet - has_cultural_pillar = heritage_hmongic - } - } -} -culture_has_west_asian_heritage_pillar_trigger = { - culture = { - OR = { - has_cultural_pillar = heritage_iranian - has_cultural_pillar = heritage_turkic - has_cultural_pillar = heritage_tocharian - has_cultural_pillar = heritage_hunnic - } - } -} -culture_has_south_asian_heritage_pillar_trigger = { - culture = { - OR = { - has_cultural_pillar = heritage_austronesian - has_cultural_pillar = heritage_indo_aryan - has_cultural_pillar = heritage_dravidian - has_cultural_pillar = heritage_burman - has_cultural_pillar = heritage_qiangic - } - } -} - -culture_has_southeast_asian_heritage_pillar_trigger = { - culture = { - OR = { - has_cultural_pillar = heritage_viet - has_cultural_pillar = heritage_mon_khmer - has_cultural_pillar = heritage_malayic - has_cultural_pillar = heritage_burman - has_cultural_pillar = heritage_austronesian - has_cultural_pillar = heritage_tai - } - } -} - -culture_has_north_asian_heritage_pillar_trigger = { - culture = { - OR = { - has_cultural_pillar = heritage_turkic - has_cultural_pillar = heritage_mongolic - has_cultural_pillar = heritage_ugro_permian - has_cultural_pillar = heritage_nivkh - has_cultural_pillar = heritage_ainuic - has_cultural_pillar = heritage_tungusic - } - } -} - -culture_has_north_east_asian_heritage_pillar_trigger = { - culture = { - OR = { - has_cultural_pillar = heritage_nivkh - has_cultural_pillar = heritage_ainuic - has_cultural_pillar = heritage_tungusic - } - } -} -culture_has_central_asian_heritage_pillar_trigger = { - culture = { - OR = { - has_cultural_pillar = heritage_qiangic - has_cultural_pillar = heritage_turkic - has_cultural_pillar = heritage_mongolic - has_cultural_pillar = heritage_tocharian - } - } -} -culture_has_east_central_asian_heritage_pillar_trigger = { - culture = { - OR = { - has_cultural_pillar = heritage_qiangic - has_cultural_pillar = heritage_mongolic - } - } -} - -#AFRICA -culture_has_african_heritage_pillar_trigger = { - OR = { - culture_has_west_african_heritage_pillar_trigger = yes - culture_has_east_african_heritage_pillar_trigger = yes - culture_has_north_african_heritage_pillar_trigger = yes - culture_has_central_african_heritage_pillar_trigger = yes - } -} -culture_has_west_african_heritage_pillar_trigger = { - culture = { - OR = { - has_cultural_pillar = heritage_akan - has_cultural_pillar = heritage_yoruba - has_cultural_pillar = heritage_west_african - has_cultural_pillar = heritage_senegambian - has_cultural_pillar = heritage_sahelian - has_cultural_pillar = heritage_akan - } - } -} -culture_has_east_african_heritage_pillar_trigger = { - culture = { - OR = { - has_cultural_pillar = heritage_somalian - has_cultural_pillar = heritage_east_african - has_cultural_pillar = heritage_bantu - } - } -} -culture_has_north_african_heritage_pillar_trigger = { - culture = { - OR = { - has_cultural_pillar = heritage_berber - has_cultural_pillar = heritage_egyptian - } - } -} -culture_has_central_african_heritage_pillar_trigger = { - culture = { - has_cultural_pillar = heritage_central_african - } -} - -#MENA -culture_has_mena_heritage_pillar_trigger = { - OR = { - culture = { has_cultural_pillar = heritage_arabic } - culture = { has_cultural_pillar = heritage_syriac } - culture = { has_cultural_pillar = heritage_iranian } - culture_has_north_african_heritage_pillar_trigger = yes - } -} - -#EUROPE -culture_has_european_heritage_pillar_trigger = { - OR = { - culture_has_west_european_heritage_pillar_trigger = yes - culture_has_east_european_heritage_pillar_trigger = yes - culture_has_north_european_heritage_pillar_trigger = yes - culture_has_south_european_heritage_pillar_trigger = yes - culture_has_central_european_heritage_pillar_trigger = yes - } -} -culture_has_west_european_heritage_pillar_trigger = { - culture = { - OR = { - has_cultural_pillar = heritage_goidelic - has_cultural_pillar = heritage_west_germanic - has_cultural_pillar = heritage_brythonic - has_cultural_pillar = heritage_israelite - } - } -} -culture_has_east_european_heritage_pillar_trigger = { - culture = { - OR = { - has_cultural_pillar = heritage_turkic - has_cultural_pillar = heritage_volga_finnic - has_cultural_pillar = heritage_east_slavic - has_cultural_pillar = heritage_baltic - has_cultural_pillar = heritage_caucasian - } - } -} -culture_has_north_european_heritage_pillar_trigger = { - culture = { - OR = { - has_cultural_pillar = heritage_balto_finnic - has_cultural_pillar = heritage_north_germanic - has_cultural_pillar = heritage_ugro_permian - has_cultural_pillar = heritage_gothic - } - } -} -culture_has_south_european_heritage_pillar_trigger = { - culture = { - OR = { - has_cultural_pillar = heritage_iberian - has_cultural_pillar = heritage_latin - has_cultural_pillar = heritage_byzantine - has_cultural_pillar = heritage_south_slavic - has_cultural_pillar = heritage_israelite - has_cultural_pillar = heritage_vlach - has_cultural_pillar = heritage_ancient_greek - } - } -} -culture_has_central_european_heritage_pillar_trigger = { - culture = { - OR = { - has_cultural_pillar = heritage_magyar - has_cultural_pillar = heritage_west_slavic - has_cultural_pillar = heritage_central_germanic - has_cultural_pillar = heritage_frankish - has_cultural_pillar = heritage_israelite - has_cultural_pillar = heritage_israelite - } - } -} -culture_has_slavic_heritage_pillar_trigger = { - culture = { - OR = { - has_cultural_pillar = heritage_south_slavic - has_cultural_pillar = heritage_east_slavic - has_cultural_pillar = heritage_west_slavic - } - } -} diff --git a/N3OW/common/scripted_triggers/00_cultural_triggers.txt b/N3OW/common/scripted_triggers/00_cultural_triggers.txt deleted file mode 100644 index 525a1e72..00000000 --- a/N3OW/common/scripted_triggers/00_cultural_triggers.txt +++ /dev/null @@ -1,639 +0,0 @@ - -### Cultural trigger list - -# drinks_alcohol_trigger - Would this person drink alcohol? -# holder_or_above_is_player_of_culture - Is this county's holder or anyone above them in the de facto hierarchy a player with the same culture? - - -###################### -# Cultural triggers # -###################### - -drinks_alcohol_trigger = { - is_adult = yes - custom_tooltip = { - text = drinks_alcohol - OR = { - has_trait = drunkard - faith_forbids_alcohol_trigger = no - } - } -} - -faith_forbids_alcohol_trigger = { - OR = { - religion = religion:islam_religion # Prohibited by khamr, a prohibition against intoxicants - religion = religion:jainism_religion # Prohibited along with the consumption of any fermented food - AND = { - has_trait = zealous - religion = religion:buddhism_religion # Discouraged as it disrupts progress along the eightfold path - } - } -} - -# If you need to check if a county drinks alcohol. -faith_only_forbids_alcohol_trigger = { - OR = { - religion = religion:islam_religion # Prohibited by khamr, a prohibition against intoxicants - religion = religion:jainism_religion # Prohibited along with the consumption of any fermented food - religion = religion:buddhism_religion # Discouraged as it disrupts progress along the eightfold path - } -} - -holder_or_above_is_player_of_culture = { - culture = { - save_temporary_scope_as = this_culture - } - OR = { - holder = { - AND = { - is_ai = no - culture = scope:this_culture - } - any_liege_or_above = { - is_ai = no - culture = scope:this_culture - } - } - } -} - -culture_in_winter_geographical_region_trigger = { - custom_description = { - text = culture_in_winter_geographical_region_trigger_desc - any_culture_county = { - any_county_province = { - OR = { - geographical_region = world_europe_north - geographical_region = world_europe_west - geographical_region = world_europe_east - geographical_region = world_steppe - geographical_region = world_tibet - geographical_region = world_asia_china - geographical_region = world_asia_japan - geographical_region = world_asia_sakhalin_hokkaido - geographical_region = world_asia_korea - geographical_region = world_asia_north_east - } - } - } - } -} - -culture_in_non_sedentary_geographical_region_trigger = { - custom_description = { - text = culture_in_non_sedentary_geographical_region_trigger_desc - any_culture_county = { - any_county_province = { - geographical_region = world_steppe - } - } - } -} - -culture_not_pacifistic_trigger = { - custom_description = { - text = culture_not_pacifist_trigger_desc - NOT = { - culture_tradition:tradition_pacifism = { is_in_list = traits } - } - } -} - -culture_not_warlike_trigger = { - custom_description = { - text = culture_not_warlike_trigger_desc - NOR = { - culture_tradition:tradition_winter_warriors = { is_in_list = traits } - culture_tradition:tradition_forest_fighters = { is_in_list = traits } - culture_tradition:tradition_mountaineers = { is_in_list = traits } - culture_tradition:tradition_warriors_of_the_dry = { is_in_list = traits } - culture_tradition:tradition_highland_warriors = { is_in_list = traits } - culture_tradition:tradition_jungle_warriors = { is_in_list = traits } - culture_tradition:tradition_quarrelsome = { is_in_list = traits } - culture_tradition:tradition_malleable_invaders = { is_in_list = traits } - culture_tradition:tradition_hunters = { is_in_list = traits } - culture_tradition:tradition_warrior_culture = { is_in_list = traits } - culture_tradition:tradition_martial_admiration = { is_in_list = traits } - culture_tradition:tradition_tgp_bushido = { is_in_list = traits } - culture_tradition:tradition_tgp_defiant_ambushers = { is_in_list = traits } - culture_tradition:tradition_tgp_warrior_monks = { is_in_list = traits } - culture_tradition:tradition_tgp_art_of_war = { is_in_list = traits } - } - } - custom_description = { - text = culture_has_winter_warriors_desc - NOT = { - culture_tradition:tradition_winter_warriors = { is_in_list = traits } - } - } - custom_description = { - text = culture_has_forest_fighter_desc - NOT = { - culture_tradition:tradition_forest_fighters = { is_in_list = traits } - } - } - custom_description = { - text = culture_has_mountaineers_desc - NOT = { - culture_tradition:tradition_mountaineers = { is_in_list = traits } - } - } - custom_description = { - text = culture_has_warriors_of_the_dry_desc - NOT = { - culture_tradition:tradition_warriors_of_the_dry = { is_in_list = traits } - } - } - custom_description = { - text = culture_has_highland_warriors_desc - NOT = { - culture_tradition:tradition_highland_warriors = { is_in_list = traits } - } - } - custom_description = { - text = culture_has_jungle_warriors_desc - NOT = { - culture_tradition:tradition_jungle_warriors = { is_in_list = traits } - } - } - custom_description = { - text = culture_has_quarrelsome_desc - NOT = { - culture_tradition:tradition_quarrelsome = { is_in_list = traits } - } - } - custom_description = { - text = culture_has_malleable_invaders_desc - NOT = { - culture_tradition:tradition_malleable_invaders = { is_in_list = traits } - } - } - custom_description = { - text = culture_has_hunters_desc - NOT = { - culture_tradition:tradition_hunters = { is_in_list = traits } - } - } - custom_description = { - text = culture_has_warrior_culture_desc - NOT = { - culture_tradition:tradition_warrior_culture = { is_in_list = traits } - } - } - custom_description = { - text = culture_has_martial_admiration_desc - NOT = { - culture_tradition:tradition_martial_admiration = { is_in_list = traits } - } - } -} - -should_have_same_faith_succession_trigger = { - culture = { - has_cultural_parameter = same_faith_inheritance_only - } - NOR = { - government_has_flag = government_is_theocracy # Handled separately - government_has_flag = government_is_holy_order # Handled separately - government_has_flag = government_is_mercenary # Irrelevant - } -} - -not_tribal_raid_trigger = { - culture = { - has_cultural_parameter = not_tribal_raiding_malus - } - NOT = { government_has_flag = government_is_tribal } -} - -culture_is_not_historical_hybrid_trigger = { - #Used to tell if a hybrid culture is one of the historical hybrids or not, mainly in checks for AI hybridization checks related to game rules. - #Expects to be used in culture scope - NOR = { - this = culture:norman - this = culture:maghrebi - this = culture:gaelic - this = culture:anglo_saxon - this = culture:scottish - this = culture:andalusian - this = culture:catalan - this = culture:english - this = culture:sicilian - this = culture:cisalpine - } -} - -# Cultural MAA triggers - Used in various places for triggers, AI weights, etc. -culture_has_skirmisher_maa = { - OR = { - has_cultural_parameter = unlock_maa_horn_warrior - has_cultural_parameter = unlock_maa_shomer - has_cultural_parameter = unlock_maa_abudrar - has_cultural_parameter = unlock_maa_guinea_warrior - has_cultural_parameter = unlock_maa_pesilat - has_innovation = innovation_adaptive_militia #Goedendag - Later Era MAA - has_cultural_parameter = unlock_maa_akritai - } -} - -culture_has_archer_maa = { - OR = { - has_cultural_parameter = unlock_maa_archers_of_the_nile - has_cultural_parameter = unlock_maa_bush_hunter - has_cultural_parameter = unlock_maa_metsanvartija - has_cultural_parameter = unlock_maa_maturkan_warriors - has_cultural_parameter = unlock_maa_longbowmen - has_innovation = innovation_repeating_crossbow #Chu-ko-nu Archers - has_innovation = innovation_bamboo_bows #Paiks - } -} - -culture_has_improved_crossbowmen = { - OR = { - has_innovation = innovation_repeating_crossbow #Chu-ko-nu Archers - } -} - -culture_has_heavy_infantry_maa = { - OR = { - has_cultural_parameter = unlock_maa_ayyar - has_cultural_parameter = unlock_maa_mubarizun - has_cultural_parameter = unlock_maa_druzhina - has_cultural_parameter = unlock_maa_khandayat - has_cultural_parameter = unlock_maa_garudas - has_cultural_parameter = unlock_maa_palace_guards - has_cultural_parameter = unlock_maa_huscarls - has_cultural_parameter = unlock_maa_mountaineer - has_cultural_parameter = unlock_maa_zbrojnosh - has_cultural_parameter = unlock_infantry_samurai_units - has_cultural_parameter = unlock_zhanmadao - has_cultural_parameter = unlock_burenjia - - has_innovation = innovation_sarawit #Sarawit - Later Era MAA - has_innovation = innovation_legionnaires #Praetorian - has_cultural_parameter = unlock_maa_varangian_guards - } -} - -culture_has_pikemen_maa = { #I.e. Spearmen - OR = { - has_cultural_parameter = unlock_maa_zupin_warrior - has_cultural_parameter = unlock_warrior_monk_units - has_innovation = innovation_rectilinear_schiltron #Schiltron - Later Era MAA - has_innovation = innovation_pike_columns #Picchieri - Later Era MAA - has_innovation = innovation_zweihanders #Later Era MAA - has_cultural_parameter = unlock_maa_skoutatoi - } -} - -culture_has_light_cavalry_maa = { - OR = { - has_cultural_parameter = unlock_maa_mulaththamun - has_cultural_parameter = unlock_maa_hussar #Konni - has_cultural_parameter = unlock_maa_tawashi #Tawashi - has_cultural_parameter = unlock_maa_ayrudzi - has_innovation = innovation_desert_tactics #Chasseur - has_innovation = innovation_caballeros #Caballero - has_innovation = innovation_hobbies #Hobelar - has_innovation = innovation_sahel_horsemen #Sahel Horsemen - } -} - -culture_has_heavy_cavalry_maa = { - OR = { - has_cultural_parameter = unlock_maa_cataphract - has_cultural_parameter = unlock_maa_monaspa - has_cultural_parameter = unlock_maa_tarkhan - has_cultural_parameter = unlock_maa_conrois - has_cultural_parameter = unlock_maa_cataphract_archers - has_innovation = innovation_valets #Gendarme - Later Era MAA - } -} - -culture_has_archer_cavalry_maa = { - OR = { - has_cultural_parameter = unlock_maa_horse_archers - has_cultural_parameter = unlock_maa_mangudai - has_cultural_parameter = unlock_emishi_horse_archers_units - has_cultural_parameter = unlock_mounted_samurai_units - - - culture_head ?= { - mpo_can_recruit_nomad_maa_trigger = yes - } - any_player = { - culture = prev - mpo_can_recruit_nomad_maa_trigger = yes - } - } -} - -#Culture specialized in maa type -culture_specializes_in_skirmisher_maa = { - OR = { - has_cultural_tradition = tradition_forest_folk - has_cultural_tradition = tradition_jungle_dwellers - has_cultural_tradition = tradition_polders - has_cultural_tradition = tradition_adaptive_skirmishing - has_cultural_tradition = tradition_hit_and_run - has_cultural_tradition = tradition_forest_wardens - has_cultural_tradition = tradition_hussar - has_cultural_tradition = tradition_fp3_pragmatic_creed - culture_has_skirmisher_maa = yes - } -} - -culture_specializes_in_archer_maa = { - OR = { - has_cultural_tradition = tradition_forest_folk - has_cultural_tradition = tradition_jungle_dwellers - has_cultural_tradition = tradition_adaptive_skirmishing - has_cultural_tradition = tradition_formation_fighting - culture_has_archer_maa = yes - } -} - -culture_specializes_in_heavy_infantry_maa = { - OR = { - has_cultural_tradition = tradition_roman_legacy - has_cultural_tradition = tradition_metal_craftsmanship - has_cultural_tradition = tradition_mountain_homes - has_cultural_tradition = tradition_stand_and_fight - has_cultural_tradition = tradition_mobile_guards - has_cultural_tradition = tradition_mountaineer_ruralism - has_cultural_tradition = tradition_tgp_art_of_war - has_cultural_tradition = tradition_tgp_bushido - culture_has_heavy_infantry_maa = yes - } -} - -culture_specializes_in_pikemen_maa = { - OR = { - has_cultural_tradition = tradition_mountaineer_ruralism - has_cultural_tradition = tradition_metal_craftsmanship - has_cultural_tradition = tradition_mountain_homes - has_cultural_tradition = tradition_formation_fighting - has_cultural_tradition = tradition_stand_and_fight - has_cultural_tradition = tradition_mobile_guards - has_cultural_tradition = tradition_tgp_warrior_monks - culture_has_pikemen_maa = yes - } -} - -culture_specializes_in_light_cavalry_maa = { - OR = { - has_cultural_tradition = tradition_dryland_dwellers - has_cultural_tradition = tradition_pastoralists - has_cultural_tradition = tradition_hit_and_run - has_cultural_tradition = tradition_horse_breeder - has_cultural_tradition = tradition_saharan_nomads - culture_has_light_cavalry_maa = yes - } -} - -culture_specializes_in_heavy_cavalry_maa = { - OR = { - has_cultural_tradition = tradition_roman_legacy - has_cultural_tradition = tradition_mountain_homes - has_cultural_tradition = tradition_horse_breeder - has_cultural_tradition = tradition_stand_and_fight - has_cultural_tradition = tradition_mobile_guards - has_cultural_tradition = tradition_ep3_indomitable_azatani - has_cultural_tradition = tradition_mountaineer_ruralism - has_cultural_tradition = tradition_tgp_art_of_war - culture_has_heavy_cavalry_maa = yes - } -} - -culture_specializes_in_archer_cavalry_maa = { - OR = { - has_cultural_tradition = tradition_ep3_indomitable_azatani - has_cultural_tradition = tradition_horse_breeder - has_cultural_tradition = tradition_mpo_iron_cavalry - has_cultural_tradition = tradition_devoted_horsemanship - has_cultural_tradition = tradition_tgp_bushido - has_cultural_tradition = tradition_tgp_defiant_ambushers - culture_has_archer_cavalry_maa = yes - } -} - -# Language trigger - Makes languages available when you diverge your culture -language_is_shown_trigger = { - scope:character = { - OR = { - AND = { - exists = var:legendary_culture - var:legendary_culture = { has_cultural_pillar = $LANGUAGE$ } - } - AND = { - # The target language needs to fulfill ALL of the following: - any_sub_realm_county = { # Language needs to be well-represented within your realm - percent >= 0.1 - culture = { has_cultural_pillar = $LANGUAGE$ } - } - any_sub_realm_county = { # Language needs to border your own culture - culture = { has_cultural_pillar = $LANGUAGE$ } - any_neighboring_county = { - culture = { this = scope:character.culture } - } - } - any_sub_realm_county = { # You need a minimum acceptance with any culture speaking the language - culture = { - has_cultural_pillar = $LANGUAGE$ - cultural_acceptance = { - target = scope:character.culture - value >= 25 - } - } - } - } - } - } -} - -# Language trigger - Makes heritages available when you diverge your culture -heritage_is_shown_trigger = { - scope:character = { - OR = { - AND = { - exists = var:legendary_culture - var:legendary_culture = { has_cultural_pillar = $HERITAGE$ } - } - culture = { has_cultural_pillar = $HERITAGE$ } - } - } -} - -# Checks if you could Hybridise with the culture without checking for acceptance -is_valid_for_hybridising_trigger = { - $CHARACTER$ = { - culture = { - NOT = { has_same_culture_heritage = $CULTURE$ } - culture_age >= culture_hybrid_cooldown - } - trigger_if = { - limit = { - NAND = { - exists = var:special_culture - var:special_culture = $CULTURE$ - } - } - custom_description = { - text = culture_present_in_realm_for_hybridization - any_sub_realm_county = { - culture = $CULTURE$ - } - } - } - custom_description = { - text = culture_is_not_parent_culture - culture = { - NOT = { - any_parent_culture = { - this = $CULTURE$ - } - } - } - } - custom_description = { - text = culture_is_not_child_culture - $CULTURE$ = { - NOT = { - any_parent_culture = { - this = $CHARACTER$.culture - } - } - } - } - } -} - -# Checks if you can currently hybridise with the culture -can_hybridize_culture_trigger = { - is_valid_for_hybridising_trigger = { - CHARACTER = $CHARACTER$ - CULTURE = $CULTURE$ - } - $CHARACTER$ = { - culture = { - cultural_acceptance = { target = $CULTURE$ value >= hybridization_threshold_value } - } - } -} - - -# Uses current scope and scope:culture -cultures_share_relevant_region_trigger = { - OR = { - AND = { - culture_overlaps_geographical_region = world_europe - scope:culture = { - culture_overlaps_geographical_region = world_europe - } - } - AND = { - culture_overlaps_geographical_region = world_asia_minor - scope:culture = { - culture_overlaps_geographical_region = world_asia_minor - } - } - AND = { - OR = { - culture_overlaps_geographical_region = world_middle_east - culture_overlaps_geographical_region = world_middle_east_persia - } - scope:culture = { - OR = { - culture_overlaps_geographical_region = world_middle_east - culture_overlaps_geographical_region = world_middle_east_persia - } - } - } - AND = { - culture_overlaps_geographical_region = world_steppe - scope:culture = { - culture_overlaps_geographical_region = world_steppe - } - } - AND = { - culture_overlaps_geographical_region = world_tibet - scope:culture = { - culture_overlaps_geographical_region = world_tibet - } - } - AND = { - OR = { - culture_overlaps_geographical_region = world_india - culture_overlaps_geographical_region = world_burma - } - scope:culture = { - OR = { - culture_overlaps_geographical_region = world_india - culture_overlaps_geographical_region = world_burma - } - } - } - AND = { - culture_overlaps_geographical_region = world_africa - scope:culture = { - culture_overlaps_geographical_region = world_africa - } - } - AND = { - culture_overlaps_geographical_region = world_asia_china - scope:culture = { - culture_overlaps_geographical_region = world_asia_china - } - } - AND = { - culture_overlaps_geographical_region = world_asia_china - scope:culture = { - culture_overlaps_geographical_region = world_asia_korea - } - } - AND = { - culture_overlaps_geographical_region = world_asia_china - scope:culture = { - culture_overlaps_geographical_region = world_asia_southeast - } - } - AND = { - culture_overlaps_geographical_region = world_asia_japan - scope:culture = { - culture_overlaps_geographical_region = world_asia_japan - } - } - } -} - -is_vegetarian_trigger = { - OR = { - culture = { - has_cultural_parameter = cannot_hunt - } - faith_is_vegetarian_trigger = yes - } -} - -faith_is_vegetarian_trigger = { - faith = { - OR = { - religion = religion:buddhism_religion - religion = religion:jainism_religion - religion = religion:bon_religion - this = faith:mazdakism - this = faith:manichean - } - } -} - -culture_tradition_reduction_trigger = { - scope:character = { - has_variable_list = culture_tradition_reduction - is_target_in_variable_list = { - name = culture_tradition_reduction - target = culture_tradition:$TRADITION$ - } - } -} diff --git a/N3OW/common/scripted_triggers/00_death_management_triggers.txt b/N3OW/common/scripted_triggers/00_death_management_triggers.txt deleted file mode 100644 index df68e601..00000000 --- a/N3OW/common/scripted_triggers/00_death_management_triggers.txt +++ /dev/null @@ -1,97 +0,0 @@ -block_death_event_trigger = { - OR = { - trigger_if = { - limit = { exists = var:block_death_event_from } - var:block_death_event_from = $DEAD$ - #If we get timed variables in list: - # is_target_in_variable_list = { - # name = block_death_event_from - # target = $DEAD$ - # } - } - has_character_flag = sent_relevant_death_event - } -} - -had_gruesome_death_trigger = { #Used to check if a character's death was gruesome - OR = { - death_reason = death_physician_mistreatment - death_reason = death_murder - death_reason = death_ended_on_feast_table - death_reason = death_mysterious - death_reason = death_plotting - death_reason = death_script_cruelty - death_reason = death_punishment - death_reason = death_dungeon - death_reason = death_head_ripped_off - death_reason = death_cloven_in_half - death_reason = death_viciously_dismembered - death_reason = death_ripped_apart_limb_by_limb - death_reason = death_chopped_to_pieces - death_reason = death_heart_ripped_out - death_reason = death_fear - death_reason = death_skull_cracked_open - death_reason = death_strangled_with_own_intestines - death_reason = death_carp_accident - death_reason = death_whipping - death_reason = death_torture - death_reason = death_execution_blood_eagle - death_reason = death_execution_blot - death_reason = death_execution - death_reason = death_burned - death_reason = death_eaten - death_reason = death_beaten - death_reason = death_sacrificed_to_gods - death_reason = death_crucified - death_reason = death_burned_witch - death_reason = death_feast_accident - death_reason = death_fall - death_reason = death_poison - death_reason = death_crocodile - death_reason = death_dog_attack - death_reason = death_wolves - death_reason = death_bear - death_reason = death_ritually_hung_then_eaten - death_reason = death_ritually_hung - death_reason = death_ritually_eaten - death_reason = death_botched_decapitation - death_reason = death_decapitated - death_reason = death_kennel - death_reason = death_thrown_onto_chariot_track - death_reason = death_thrown_off_kathisma - death_reason = death_killed_while_attempting_murder - death_reason = death_chariot_race_trick - death_reason = death_snake - } -} - -death_killer_always_public_trigger = { - OR = { - # Executions - death_reason = death_crucified - death_reason = death_burned_witch - death_reason = death_torture - death_reason = death_execution_blood_eagle - death_reason = death_execution_blot - death_reason = death_execution - death_reason = death_dungeon - death_reason = death_ritually_hung_then_eaten - death_reason = death_ritually_hung - death_reason = death_ritually_eaten - death_reason = death_hostage_execution - death_reason = death_botched_decapitation - death_reason = death_decapitated - death_reason = death_sacrificed_to_gods - death_reason = death_eaten - death_reason = death_kennel - # Public Fights - death_reason = death_fight - death_reason = death_battle - death_reason = death_duel - death_reason = death_beaten - death_reason = death_killed_while_attempting_murder - # Accidents - death_reason = death_carp_accident - death_reason = death_feast_accident - } -} diff --git a/N3OW/common/scripted_triggers/00_distance_triggers.txt b/N3OW/common/scripted_triggers/00_distance_triggers.txt deleted file mode 100644 index fa09cebe..00000000 --- a/N3OW/common/scripted_triggers/00_distance_triggers.txt +++ /dev/null @@ -1,23 +0,0 @@ -character_realm_neighbors_target_trigger = { - any_character_to_title_neighboring_county = { - holder = { - OR = { - this = $TARGET_CHARACTER$ - target_is_liege_or_above = $TARGET_CHARACTER$ - } - } - } -} - -should_notify_player_about_neighboring_rulers_wars_trigger = { - NOR = { - target_is_liege_or_above = $TARGET_CHARACTER$ # We have separate toasts for this. - target_is_vassal_or_below = $TARGET_CHARACTER$ # We are probably already aware of our vassal's wars (and likely involved in them in some fashion). - } - character_realm_neighbors_target_trigger = { TARGET_CHARACTER = $TARGET_CHARACTER$ } - OR = { - $TARGET_CHARACTER$ = { top_liege = this } # Independent rulers are always relevant. - liege = $TARGET_CHARACTER$.liege # Rulers are also relevant if we have the same direct liege (We might be able to DoW them, or at least want to stay informed as to relative power level). - top_liege = $TARGET_CHARACTER$.liege # Alternatively, if their direct liege is our top liege, we can still DoW them (If I am a Duke under a King under an Emperor, I might still want to DoW one of the Emperor's other King or Duke vassals.) - } -} \ No newline at end of file diff --git a/N3OW/common/scripted_triggers/00_dynasty_triggers.txt b/N3OW/common/scripted_triggers/00_dynasty_triggers.txt deleted file mode 100644 index 9608dc7d..00000000 --- a/N3OW/common/scripted_triggers/00_dynasty_triggers.txt +++ /dev/null @@ -1,136 +0,0 @@ - - -is_house_head = { # For unevaluated triggers - trigger_if = { - limit = { - exists = this - } - save_temporary_scope_as = house_check - house ?= { - house_head = scope:house_check - } - } -} - -is_dynast = { - save_temporary_scope_as = dynast_check - custom_description = { - text = is_dynast - subject = scope:dynast_check - - dynasty ?= { - dynast = scope:dynast_check - } - } -} - -can_start_new_legacy_track_trigger = { - dynasty ?= { - OR = { - NOT = { has_dynasty_perk = blood_legacy_1 } - has_dynasty_perk = blood_legacy_5 - } - OR = { - NOT = { has_dynasty_perk = warfare_legacy_1 } - has_dynasty_perk = warfare_legacy_5 - } - OR = { - NOT = { has_dynasty_perk = law_legacy_1 } - has_dynasty_perk = law_legacy_5 - } - OR = { - NOT = { has_dynasty_perk = guile_legacy_1 } - has_dynasty_perk = guile_legacy_5 - } - OR = { - NOT = { has_dynasty_perk = erudition_legacy_1 } - has_dynasty_perk = erudition_legacy_5 - } - OR = { - NOT = { has_dynasty_perk = glory_legacy_1 } - has_dynasty_perk = glory_legacy_5 - } - OR = { - NOT = { has_dynasty_perk = kin_legacy_1 } - has_dynasty_perk = kin_legacy_5 - } - OR = { - NOT = { has_fp1_dlc_trigger = yes } - NOT = { has_dynasty_perk = fp1_adventure_legacy_1 } - has_dynasty_perk = fp1_adventure_legacy_5 - } - OR = { - NOT = { has_fp1_dlc_trigger = yes } - NOT = { has_dynasty_perk = fp1_pillage_legacy_1 } - has_dynasty_perk = fp1_pillage_legacy_5 - } - OR = { - NOT = { has_dlc_feature = hybridize_culture } - NOT = { has_dynasty_perk = ep1_culture_legacy_1 } - has_dynasty_perk = ep1_culture_legacy_5 - } - OR = { - NOT = { has_dlc_feature = the_fate_of_iberia } - NOT = { has_dynasty_perk = fp2_urbanism_legacy_1 } - has_dynasty_perk = fp2_urbanism_legacy_5 - } - OR = { - NOT = { has_dlc_feature = the_fate_of_iberia } - NOT = { has_dynasty_perk = fp2_coterie_legacy_1 } - has_dynasty_perk = fp2_coterie_legacy_5 - } - OR = { - NOT = { has_dlc_feature = legacy_of_persia } - NOT = { has_dynasty_perk = fp3_khvarenah_legacy_1 } - has_dynasty_perk = fp3_khvarenah_legacy_5 - } - OR = { - NOT = { has_dlc_feature = tours_and_tournaments } - NOT = { has_dynasty_perk = ep2_activities_legacy_1 } - has_dynasty_perk = ep2_activities_legacy_5 - } - OR = { - NOT = { has_dlc_feature = legends_of_the_dead } - NOT = { has_dynasty_perk = ce1_heroic_legacy_1 } - has_dynasty_perk = ce1_heroic_legacy_5 - } - OR = { - NOT = { has_dlc_feature = legends_of_the_dead } - NOT = { has_dynasty_perk = ce1_legitimacy_legacy_1 } - has_dynasty_perk = ce1_legitimacy_legacy_5 - } - OR = { - NOT = { has_dlc_feature = roads_to_power } - NOT = { has_dynasty_perk = ep3_administrative_legacy_1 } - has_dynasty_perk = ep3_administrative_legacy_5 - } - OR = { - NOT = { has_dlc_feature = khans_of_the_steppe } - NOT = { has_dynasty_perk = mpo_nomad_legacy_1 } - has_dynasty_perk = mpo_nomad_legacy_5 - } - OR = { - NOT = { has_dlc_feature = all_under_heaven } - NOT = { has_dynasty_perk = tgp_chinese_legacy_1 } - has_dynasty_perk = tgp_chinese_legacy_5 - } - OR = { - NOT = { has_dlc_feature = all_under_heaven } - NOT = { has_dynasty_perk = tgp_japan_legacy_1 } - has_dynasty_perk = tgp_japan_legacy_5 - } - OR = { - NOT = { has_dlc_feature = all_under_heaven } - NOT = { has_dynasty_perk = tgp_sea_legacy_1 } - has_dynasty_perk = tgp_sea_legacy_5 - } - } -} - -dynasty_head_prefers_activities_trigger = { - has_trait = diligent - OR = { - has_trait = gregarious - has_trait = lifestyle_reveler - } -} diff --git a/N3OW/common/scripted_triggers/00_economic_triggers.txt b/N3OW/common/scripted_triggers/00_economic_triggers.txt deleted file mode 100644 index 7eea20bc..00000000 --- a/N3OW/common/scripted_triggers/00_economic_triggers.txt +++ /dev/null @@ -1,106 +0,0 @@ -can_make_expensive_purchase_trigger = { - OR = { - # Players can make their own decisions. - is_ai = no - # Some people are just really bad with money. - has_trait = profligate - ## If a purchase is unwise but would be magnanimous, save this scope first to flag it as valid in the event. - ### If you're in a chain, don't forget to clear the scope up afterwards with clear_saved_scope, otherwise it might affect other usages of the trigger further down the chain. - AND = { - has_trait = improvident - exists = scope:generous_purchase - } - # And if you've got the cash to spare, who cares? - short_term_gold >= $PRICE$ - } -} - -county_has_any_special_mine_building_trigger = { - has_building_with_flag = special_mine - #OR = { - # # Rammelsberg Mines - # has_building_or_higher = rammelsberg_mines_01 - # # Kutna_hora Mines - # has_building_or_higher = kutna_hora_mines_01 - # # Kremnica Mines - # has_building_or_higher = kremnica_mines_01 - # # Falun Mines - # has_building_or_higher = falun_mines_01 - # # Schwaz Mines - # has_building_or_higher = schwaz_mines_01 - # # Argentiera Mines - # has_building_or_higher = argentiera_mines_01 - # # Kollur Mines - # has_building_or_higher = kollur_mines_01 - # # Siderokausia Mines - # has_building_or_higher = siderokausia_mines_01 - # # Mali Mines - # has_building_or_higher = mali_mines_01 - # # Konasamudram Mines - # has_building_or_higher = konasamudram_mines_01 - # # Dean Mines - # has_building_or_higher = dean_mines_01 - # # Phnom Dek Mines - # has_building_or_higher = phnom_dek_mines_01 - # # Zawar Mines - # has_building_or_higher = zawar_mines_01 - # # Takkeda Mines - # has_building_or_higher = takkeda_mines_01 - # # Khetri Mines - # has_building_or_higher = khetri_mines_01 - # # Taghaza Mines - # has_building_or_higher = taghaza_mines_01 - # # Ijil Mines - # has_building_or_higher = ijil_mines_01 - # # Turda Mines - # has_building_or_higher = turda_mines_01 - # # Phocaea Mines - # has_building_or_higher = phocaea_mines_01 - # # Pansjhir Mines - # has_building_or_higher = pansjhir_mines_01 - # # Trepca Mines - # has_building_or_higher = trepca_mines_01 - # # Rudnik Mines - # has_building_or_higher = rudnik_mines_01 - # # Cevennes Mines - # has_building_or_higher = cevennes_mines_01 - # # Allaq Mines - # has_building_or_higher = allaq_mines_01 - # # Verespatak Mines - # has_building_or_higher = verespatak_mines_01 - # # Nishapur Mines - # has_building_or_higher = nishapur_mines_01 - # # Srebrenica Mines - # has_building_or_higher = srebrenica_mines_01 - # # Ratnapura Mines - # has_building_or_higher = ratnapura_mines_01 - # # Sar i Sang Mines - # has_building_or_higher = sar_i_sang_mines_01 - # # Mogok Valley Mines - # has_building_or_higher = mogok_mines_01 - #} -} - -location_has_multi_story_buildings_trigger = { - $LOCATION$ = { - # Filter out ocean-going people. - ## Yes, this will error otherwise. - is_sea_province = no - # We just want to make sure we're not dealing with a tribe, who likely won't have too many really tall buildings. - NOT = { has_holding_type = tribal_holding } - # And that the place isn't a total backwater, which would also stop it having too many tall buildings. - county = { development_level >= 10 } - } -} - -location_has_fast_traffic_trigger = { - $LOCATION$ = { - # Filter out ocean-going people. - ## This one just might hypothetically error, so we check just in case. - is_sea_province = no - # We just want to make sure we're not dealing with a tribe, who would probably have carts but likely don't have to worry about them speeding much. - NOT = { has_holding_type = tribal_holding } - # And that the place isn't a total backwater, which would also keep the flow down. - county = { development_level >= 20 } - } -} diff --git a/N3OW/common/scripted_triggers/00_education_triggers.txt b/N3OW/common/scripted_triggers/00_education_triggers.txt deleted file mode 100644 index 77f158a3..00000000 --- a/N3OW/common/scripted_triggers/00_education_triggers.txt +++ /dev/null @@ -1,368 +0,0 @@ - - -###TRIGGER LIST - -#Takes RANK and OPERATOR -#OPERATOR can be "equals", "greater" or "less" -has_education_rank_trigger = { - save_temporary_scope_value_as = { - name = operator - value = flag:$OPERATOR$ - } - OR = { - AND = { - scope:operator = flag:equals - OR = { - has_trait_rank = { - trait = education_diplomacy - rank = $RANK$ - } - has_trait_rank = { - trait = education_martial - rank = $RANK$ - } - has_trait_rank = { - trait = education_stewardship - rank = $RANK$ - } - has_trait_rank = { - trait = education_intrigue - rank = $RANK$ - } - has_trait_rank = { - trait = education_learning - rank = $RANK$ - } - } - } - AND = { - scope:operator = flag:greater - OR = { - has_trait_rank = { - trait = education_diplomacy - rank > $RANK$ - } - has_trait_rank = { - trait = education_martial - rank > $RANK$ - } - has_trait_rank = { - trait = education_stewardship - rank > $RANK$ - } - has_trait_rank = { - trait = education_intrigue - rank > $RANK$ - } - has_trait_rank = { - trait = education_learning - rank > $RANK$ - } - } - } - #AND = { - # scope:operator = flag:less - # OR = { - # has_trait_rank = { - # trait = education_diplomacy - # rank < $RANK$ - # } - # has_trait_rank = { - # trait = education_martial - # rank < $RANK$ - # } - # has_trait_rank = { - # trait = education_stewardship - # rank < $RANK$ - # } - # has_trait_rank = { - # trait = education_intrigue - # rank < $RANK$ - # } - # has_trait_rank = { - # trait = education_learning - # rank < $RANK$ - # } - # } - #} - } -} - -has_education_rank_1_trigger = { - OR = { - has_trait = education_martial_1 - has_trait = education_diplomacy_1 - has_trait = education_stewardship_1 - has_trait = education_intrigue_1 - has_trait = education_learning_1 - } -} - -has_education_rank_2_trigger = { - OR = { - has_trait = education_martial_2 - has_trait = education_diplomacy_2 - has_trait = education_stewardship_2 - has_trait = education_intrigue_2 - has_trait = education_learning_2 - } -} - -has_education_rank_3_trigger = { - OR = { - has_trait = education_martial_3 - has_trait = education_diplomacy_3 - has_trait = education_stewardship_3 - has_trait = education_intrigue_3 - has_trait = education_learning_3 - } -} - -has_education_rank_4_trigger = { - OR = { - has_trait = education_martial_4 - has_trait = education_diplomacy_4 - has_trait = education_stewardship_4 - has_trait = education_intrigue_4 - has_trait = education_learning_4 - } -} - -has_education_rank_5_trigger = { - OR = { - has_trait = education_martial_5 - has_trait = education_diplomacy_5 - has_trait = education_stewardship_5 - has_trait = education_intrigue_5 - has_trait = education_learning_5 - } -} - -has_education_focus_trigger = { - OR = { - has_focus = education_diplomacy - has_focus = education_martial - has_focus = education_stewardship - has_focus = education_intrigue - has_focus = education_learning - } -} - -#Takes RANK and FOCUS -education_points_and_focus_equals_education_rank = { - save_temporary_scope_value_as = { - name = education_rank - value = $RANK$ - } - OR = { - AND = { - has_focus = education_$FOCUS$ - OR = { - AND = { - var:education_$FOCUS$_variable <= education_level_1 - scope:education_rank = 1 - } - AND = { - var:education_$FOCUS$_variable <= education_level_2 - scope:education_rank = 2 - } - AND = { - var:education_$FOCUS$_variable <= education_level_3 - scope:education_rank = 3 - } - AND = { - var:education_$FOCUS$_variable > education_level_3 - scope:education_rank = 4 - } - } - } - } -} - -#Takes RANK -education_points_equals_education_rank = { - OR = { - education_points_and_focus_equals_education_rank = { RANK = $RANK$ FOCUS = diplomacy } - education_points_and_focus_equals_education_rank = { RANK = $RANK$ FOCUS = martial } - education_points_and_focus_equals_education_rank = { RANK = $RANK$ FOCUS = stewardship } - education_points_and_focus_equals_education_rank = { RANK = $RANK$ FOCUS = intrigue } - education_points_and_focus_equals_education_rank = { RANK = $RANK$ FOCUS = learning } - } -} - -#Affinity/disaffinity -#For children -has_diplomacy_education_affinity_childhood_trait_trigger = { - OR = { - has_trait = charming - has_trait = curious - } -} - -has_martial_education_affinity_childhood_trait_trigger = { - OR = { - has_trait = rowdy - has_trait = bossy - } -} - -has_stewardship_education_affinity_childhood_trait_trigger = { - OR = { - has_trait = bossy - has_trait = pensive - } -} - -has_intrigue_education_affinity_childhood_trait_trigger = { - OR = { - has_trait = charming - has_trait = rowdy - } -} - -has_learning_education_affinity_childhood_trait_trigger = { - OR = { - has_trait = pensive - has_trait = curious - } -} - -has_diplomacy_education_disaffinity_childhood_trait_trigger = { - has_trait = bossy -} - -has_martial_education_disaffinity_childhood_trait_trigger = { - has_trait = curious -} - -has_stewardship_education_disaffinity_childhood_trait_trigger = { - has_trait = charming -} - -has_intrigue_education_disaffinity_childhood_trait_trigger = { - has_trait = pensive -} - -has_learning_education_disaffinity_childhood_trait_trigger = { - has_trait = rowdy -} - -#For adults -had_diplomacy_education_affinity_childhood_trait_trigger = { - has_variable = childhood_trait_type - OR = { - var:childhood_trait_type = flag:charming - var:childhood_trait_type = flag:curious - } -} - -had_martial_education_affinity_childhood_trait_trigger = { - has_variable = childhood_trait_type - OR = { - var:childhood_trait_type = flag:rowdy - var:childhood_trait_type = flag:bossy - } -} - -had_stewardship_education_affinity_childhood_trait_trigger = { - has_variable = childhood_trait_type - OR = { - var:childhood_trait_type = flag:bossy - var:childhood_trait_type = flag:pensive - } -} - -had_intrigue_education_affinity_childhood_trait_trigger = { - has_variable = childhood_trait_type - OR = { - var:childhood_trait_type = flag:charming - var:childhood_trait_type = flag:rowdy - } -} - -had_learning_education_affinity_childhood_trait_trigger = { - has_variable = childhood_trait_type - OR = { - var:childhood_trait_type = flag:pensive - var:childhood_trait_type = flag:curious - } -} - -had_diplomacy_education_disaffinity_childhood_trait_trigger = { - has_variable = childhood_trait_type - var:childhood_trait_type = flag:bossy -} - -had_martial_education_disaffinity_childhood_trait_trigger = { - has_variable = childhood_trait_type - var:childhood_trait_type = flag:curious -} - -had_stewardship_education_disaffinity_childhood_trait_trigger = { - has_variable = childhood_trait_type - var:childhood_trait_type = flag:charming -} - -had_intrigue_education_disaffinity_childhood_trait_trigger = { - has_variable = childhood_trait_type - var:childhood_trait_type = flag:pensive -} - -had_learning_education_disaffinity_childhood_trait_trigger = { - has_variable = childhood_trait_type - var:childhood_trait_type = flag:rowdy -} - -has_university_building_trigger = { - has_building_with_flag = special_university -} - -characters_have_same_education_group_trigger = { - # First, we make sure that both characters have an education finalised. - $CHARACTER_1$ = { - OR = { - has_trait = education_diplomacy - has_trait = education_martial - has_trait = education_stewardship - has_trait = education_intrigue - has_trait = education_learning - } - } - $CHARACTER_2$ = { - OR = { - has_trait = education_diplomacy - has_trait = education_martial - has_trait = education_stewardship - has_trait = education_intrigue - has_trait = education_learning - } - } - # Now check for the actual traits. - $CHARACTER_1$ = { - # Diplomacy. - trigger_if = { - limit = { has_trait = education_diplomacy } - $CHARACTER_2$ = { has_trait = education_diplomacy} - } - # Martial. - trigger_if = { - limit = { has_trait = education_martial } - $CHARACTER_2$ = { has_trait = education_martial } - } - # Stewardship. - trigger_if = { - limit = { has_trait = education_stewardship } - $CHARACTER_2$ = { has_trait = education_stewardship } - } - # Intrigue. - trigger_if = { - limit = { has_trait = education_intrigue } - $CHARACTER_2$ = { has_trait = education_intrigue } - } - # Learning. - trigger_if = { - limit = { has_trait = education_learning } - $CHARACTER_2$ = { has_trait = education_learning } - } - } -} diff --git a/N3OW/common/scripted_triggers/00_faction_triggers.txt b/N3OW/common/scripted_triggers/00_faction_triggers.txt deleted file mode 100644 index 01e98edd..00000000 --- a/N3OW/common/scripted_triggers/00_faction_triggers.txt +++ /dev/null @@ -1,356 +0,0 @@ - -### TRIGGER LIST ### -# General Triggers: -# - -# -# Popular Faction Triggers: -# - -# - -############################ -# General Faction Triggers # -############################ -############################ -immune_to_factions_trigger = { - OR = { - # Genghis Khan is immune to factions - has_character_flag = is_temujin - # Seljuk leader is immune to factions too - has_character_flag = is_seljuk - } -} - -character_has_faction_disabling_modifier_trigger = { - NOR = { - has_character_modifier = yearly_close_watch_modifier - #Add any subsequent character modifiers above this line. - } -} - -common_character_validity_trigger = { - NOR = { #No prince-bishop can ever join - government_has_flag = government_is_theocracy - trigger_if = { - limit = { exists = cp:councillor_court_chaplain } - this = cp:councillor_court_chaplain - } - } - OR = { - $FACTION_TARGET$ = liege - any_character_active_contract = { - task_contract_target = $FACTION_TARGET$ - } - } - highest_held_title_tier > tier_barony - - #Not blocked through events - custom_description = { - text = character_blocked_from_joining - NOT = { - has_character_flag = joining_faction_block - } - } - - # You cannot start a faction against your bloc members - trigger_if = { - limit = { - government_is_japanese_trigger = yes - $FACTION_TARGET$ = { government_is_japanese_trigger = yes } - exists = house.house_confederation - exists = $FACTION_TARGET$.house.house_confederation - } - custom_tooltip = { - text = CONFEDERATION_BLOC_YOURS_HEADER # TODO Better tooltip - house.house_confederation != $FACTION_TARGET$.house.house_confederation - } - } - - NOT = { has_relation_blood_brother = $FACTION_TARGET$ } -} - -common_can_character_join_trigger = { - common_character_validity_trigger = { - FACTION_TARGET = $FACTION_TARGET$ - } - is_adult = yes - NOT = { has_truce = $FACTION_TARGET$ } - $FACTION_TARGET$ = { - NOT = { has_strong_hook = root } - NOT = { is_allied_to = root } - } - - OR = { - is_ai = no - NOR = { - has_relation_lover = $FACTION_TARGET$ - has_relation_friend = $FACTION_TARGET$ - } - } - - $FACTION_TARGET$.highest_held_title_tier > tier_county - - custom_description = { - text = character_has_faction_disabling_modifier - character_has_faction_disabling_modifier_trigger = yes - } - - # You cannot join a faction against your bloc members - trigger_if = { - limit = { - government_is_japanese_trigger = yes - $FACTION_TARGET$ = { government_is_japanese_trigger = yes } - exists = house.house_confederation - exists = $FACTION_TARGET$.house.house_confederation - } - custom_tooltip = { - text = CONFEDERATION_BLOC_YOURS_HEADER # TODO Better tooltip - house.house_confederation != $FACTION_TARGET$.house.house_confederation - } - } -} - -common_can_character_create_trigger = { - NOT = { has_truce = $FACTION_TARGET$ } - common_character_validity_trigger = { - FACTION_TARGET = $FACTION_TARGET$ - } - trigger_if = { - limit = { - government_has_flag = government_has_house_blocs - $FACTION_TARGET$ = top_liege - is_confederation_member = yes - } - custom_tooltip = { - text = is_house_head_of_noble_family_tt - OR = { - joined_faction ?= { - any_faction_member = { - OR = { - this = root.house.house_confederation.leading_house.house_head - is_ai = no - } - } - } - AND = { - is_house_head = yes - any_held_title = { is_noble_family_title = yes } - } - AND = { - house.house_confederation.leading_house.house_head ?= { - tgp_is_ceremonial_liege_trigger = yes - } - joined_faction.faction_leader ?= { - is_leading_faction_type = restore_ceremonial_liege_faction - } - } - } - } - custom_tooltip = { - text = must_be_leading_house_of_bloc_trigger - OR = { - joined_faction ?= { - any_faction_member = { - OR = { - this = root.house.house_confederation.leading_house.house_head - is_ai = no - } - } - } - house.house_confederation.leading_house ?= house - AND = { - house.house_confederation.leading_house.house_head ?= { - tgp_is_ceremonial_liege_trigger = yes - } - joined_faction.faction_leader ?= { - is_leading_faction_type = restore_ceremonial_liege_faction - } - } - } - } - } - #### - # BLOCKERS - #### - # General Faction immunity - custom_description = { - text = character_is_immune_to_factions - subject = $FACTION_TARGET$ - NOT = { $FACTION_TARGET$ = { immune_to_factions_trigger = yes } } - } -} - -base_faction_trigger = { - NOT = { has_truce = scope:target } - can_join_or_create_faction_against = { - who = scope:target - faction = $FACTION_TYPE$ - } - scope:target = { NOT = { has_strong_hook = root } } - trigger_if = { - limit = { - exists = scope:recipient - } - scope:recipient = { - NOT = { is_at_war_with = scope:actor } - NOT = { has_trait = incapable } - } - } -} - - -############################ -# Popular Faction Triggers # -############################ - -character_can_join_popular_faction_trigger = { - OR = { - NOT = { faith = $FACTION$.faction_target.faith } - NOT = { culture = $FACTION$.faction_target.culture } - } -} - -county_can_join_popular_faction_trigger = { - OR = { - NOT = { faith = $FACTION$.faction_target.faith } - NOT = { culture = $FACTION$.faction_target.culture } - } -} - -has_active_diarch_for_factions_trigger = { - exists = $TARGET$.diarch - NOT = { $TARGET$.faith = $TARGET$.diarch.faith } -} - -#factions with only landless adventurers cannot exist -has_valid_faction_members_trigger = { - trigger_if = { - limit = { - is_landless_adventurer = yes - } - scope:faction = { - OR = { - any_faction_member = { - is_landless_adventurer = no - is_forced_into_faction = no - } - any_faction_county_member = { } - } - } - } -} - -############################ -# Liberty Faction Triggers # -############################ - -has_valid_realm_laws_for_liberty_faction_trigger = { - trigger_if = { - limit = { $TARGET$ = { realm_law_use_imperial_bureaucracy = yes } } - custom_description = { - text = has_lowest_imperial_bureaucracy - subject = $TARGET$ - $TARGET$ = { - OR = { - has_realm_law = imperial_bureaucracy_1 - has_realm_law = imperial_bureaucracy_2 - has_realm_law = imperial_bureaucracy_3 - } - } - } - } - trigger_else_if = { - limit = { $TARGET$ = { government_has_flag = government_is_tribal } } - custom_description = { - text = has_lowest_tribal_authority - subject = $TARGET$ - $TARGET$ = { - OR = { - has_realm_law = tribal_authority_1 - has_realm_law = tribal_authority_2 - has_realm_law = tribal_authority_3 - } - } - } - } - trigger_else_if = { - limit = { $TARGET$ = { realm_law_use_celestial_bureaucracy = yes } } - custom_description = { - text = has_lowest_celestial_bureaucracy - subject = $TARGET$ - $TARGET$ = { - OR = { - has_realm_law = celestial_bureaucracy_1 - has_realm_law = celestial_bureaucracy_2 - has_realm_law = celestial_bureaucracy_3 - } - } - } - } - trigger_else_if = { - limit = { $TARGET$ = { realm_law_use_meritocratic_bureaucracy = yes } } - custom_description = { - text = has_lowest_meritocratic_bureaucracy - subject = $TARGET$ - $TARGET$ = { - OR = { - has_realm_law = meritocratic_bureaucracy_1 - has_realm_law = meritocratic_bureaucracy_2 - has_realm_law = meritocratic_bureaucracy_3 - } - } - } - } - trigger_else_if = { - limit = { $TARGET$ = { realm_law_use_japanese_bureaucracy = yes } } - custom_description = { - text = has_lowest_japanese_bureaucracy - subject = $TARGET$ - $TARGET$ = { - OR = { - has_realm_law = japanese_bureaucracy_1 - has_realm_law = japanese_bureaucracy_2 - has_realm_law = japanese_bureaucracy_3 - } - } - } - } - trigger_else = { - custom_description = { - text = has_lowest_crown_authority - subject = $TARGET$ - $TARGET$ = { - OR = { - has_realm_law = crown_authority_1 - has_realm_law = crown_authority_2 - has_realm_law = crown_authority_3 - } - } - } - } -} - -############################# -# Japanese Faction Triggers # -############################# -can_become_leader_of_faction_trigger = { - is_playable_character = yes - tgp_is_ceremonial_liege_trigger = no - trigger_if = { - limit = { - government_has_flag = government_has_house_blocs - } - OR = { - is_confederation_member = no - house.house_confederation.leading_house ?= house - AND = { - house.house_confederation.leading_house.house_head ?= { - tgp_is_ceremonial_liege_trigger = yes - } - joined_faction.faction_leader ?= { - is_leading_faction_type = restore_ceremonial_liege_faction - } - } - NOT = { exists = faction_leader } - } - } -} diff --git a/N3OW/common/scripted_triggers/00_family_triggers.txt b/N3OW/common/scripted_triggers/00_family_triggers.txt deleted file mode 100644 index 02ad89bb..00000000 --- a/N3OW/common/scripted_triggers/00_family_triggers.txt +++ /dev/null @@ -1,336 +0,0 @@ - -###TRIGGER LIST - -# is_close_family_of_root_trigger -# is_sibling_child_of_root_trigger -# is_parent_sibling_of_root_trigger -# is_cousin_of_root_trigger -# is_sibling_in_law_of_root_trigger -# is_mother_of_compare_character_trigger -# is_father_of_compare_character_trigger -# is_sibling_of_compare_character_trigger -# is_child_of_compare_character_trigger -# is_close_family_of_compare_character_trigger -# is_allowed_to_legitimize_children_trigger - - -is_close_family_of_root_trigger = { - OR = { - any_parent = { this = root } - any_sibling = { this = root } - any_child = { this = root } - } -} - -is_close_family_or_spouse_of_root_trigger = { - OR = { - any_parent = { this = root } - any_sibling = { this = root } - any_child = { this = root } - any_spouse = { this = root } - } -} - -is_sibling_child_of_root_trigger = { - any_parent = { - even_if_dead = yes - any_sibling = { - this = root - } - } -} - -is_parent_sibling_of_root_trigger = { - any_sibling = { - even_if_dead = yes - any_child = { - this = root - } - } -} - -is_cousin_of_root_trigger = { - any_parent = { - even_if_dead = yes - any_sibling = { - even_if_dead = yes - any_child = { - this = root - } - } - } -} - -is_sibling_in_law_of_root_trigger = { - NOT = { - any_sibling = { - this = root - } - } - any_spouse = { - any_sibling = { - this = root - } - } -} - -is_cousin_in_law_of_root_trigger = { - any_spouse = { - is_cousin_of = root - this != root - } -} - -is_auntuncle_in_law_of_root_trigger = { - any_spouse = { - is_uncle_or_aunt_of = root - this != root - } -} - -is_grandmotherfather_in_law_of_root_trigger = { - any_spouse = { - is_grandparent_of = root - this != root - } -} - -is_great_grandmotherfather_in_law_of_root_trigger = { - any_spouse = { - is_great_grandparent_of = root - this != root - } -} - -is_granddaughterson_in_law_of_root_trigger = { - any_spouse = { - is_grandchild_of = root - this != root - } -} - -is_great_granddaughterson_in_law_of_root_trigger = { - any_spouse = { - is_great_grandchild_of = root - this != root - } -} - -is_nibling_in_law_of_root_trigger = { - any_spouse = { - is_nibling_of = root - this != root - } -} - -is_any_family_relation_or_spouse_of_root_trigger = { - OR = { - any_parent = { this = root } - any_sibling = { this = root } - any_child = { this = root } - any_spouse = { this = root } - any_parent = { - even_if_dead = yes - any_sibling = { - this = root - } - } - any_sibling = { - even_if_dead = yes - any_child = { - this = root - } - } - AND = { - NOT = { - any_sibling = { - this = root - } - } - any_parent = { - even_if_dead = yes - any_child = { - this = root - } - } - } - } -} - -is_mother_of_compare_character_trigger = { - this = scope:compare_character.mother -} - -is_father_of_compare_character_trigger = { - this = scope:compare_character.father -} - -is_sibling_of_compare_character_trigger = { - scope:compare_character = { - any_sibling = { - this = prev - } - } -} - -is_child_of_compare_character_trigger = { - scope:compare_character = { - any_child = { - this = prev - } - } -} - -is_close_family_of_compare_character_trigger = { - OR = { - this = scope:compare_character.mother - this = scope:compare_character.father - any_sibling = { - this = scope:compare_character - } - father = scope:compare_character - mother = scope:compare_character - } -} - -is_allowed_to_legitimize_children_trigger = { - is_lowborn = no - is_concubine = no - is_ruler = yes - custom_description = { - text = faith_allows_legitimization_of_bastards - faith = { - has_doctrine_parameter = bastards_legitimize - } - } -} - - - -############################################### -# Triggers that take an argument and NOT root -############################################## -is_close_family_trigger = { - OR = { - any_parent = { this = $CHARACTER$ } - any_sibling = { this = $CHARACTER$ } - any_child = { this = $CHARACTER$ } - } -} - -is_close_family_or_spouse_trigger = { - OR = { - any_parent = { this = $CHARACTER$ } - any_sibling = { this = $CHARACTER$ } - any_child = { this = $CHARACTER$ } - any_spouse = { this = $CHARACTER$ } - } -} - -is_any_family_relation_or_spouse_trigger = { - save_temporary_scope_as = root_character - OR = { - any_parent = { this = $CHARACTER$ } - any_sibling = { this = $CHARACTER$ } - any_child = { this = $CHARACTER$ } - any_spouse = { this = $CHARACTER$ } - any_parent = { - even_if_dead = yes - any_sibling = { - this = $CHARACTER$ - } - } - any_parent = { - even_if_dead = yes - any_sibling = { - even_if_dead = yes - any_child = { - this = $CHARACTER$ - } - } - } - any_sibling = { - even_if_dead = yes - any_child = { - this = $CHARACTER$ - } - } - AND = { - NOT = { - any_sibling = { - this = $CHARACTER$ - } - } - any_parent = { - even_if_dead = yes - any_child = { - this = $CHARACTER$ - } - } - } - - #child/parent/sibling/nephew/grandchild/grandparent/uncle/aunt/niece/nephew is married to the other - any_spouse = { - OR = { - is_close_family_of = $CHARACTER$ - is_nibling_of = $CHARACTER$ - is_uncle_or_aunt_of = $CHARACTER$ - } - } - $CHARACTER$ = { - any_spouse = { - OR = { - is_close_family_of = scope:root_character - is_nibling_of = scope:root_character - is_uncle_or_aunt_of = scope:root_character - } - } - } - #child/parent/sibling is married to other's child/parent/sibling - any_close_family_member = { - OR = { - is_parent_of = scope:root_character - is_child_of = scope:root_character - is_sibling_of = scope:root_character - } - any_spouse = { - OR = { - is_parent_of = $CHARACTER$ - is_child_of = $CHARACTER$ - is_sibling_of = $CHARACTER$ - } - } - } - } -} - - -house_head_would_approve_legitimization_trigger = { - $LEGITIMIZER$ = { - save_temporary_scope_as = the_legitimizer - } - $BASTARD$ = { - save_temporary_scope_as = the_bastard - } - trigger_if = { - limit = { - exists = scope:legitimizer.house - } - scope:legitimizer.house.house_head = { - save_temporary_scope_as = the_house_head - } - - house_head_legitimize_approval_rating > 0 - } -} - -is_allowed_to_legitimize_child_trigger = { - is_allowed_to_legitimize_children_trigger = yes - OR = { - this = house.house_head - house_head_would_approve_legitimization_trigger = { - LEGITIMIZER = $LEGITIMIZER$ - BASTARD = $BASTARD$ - } - } -} diff --git a/N3OW/common/scripted_triggers/00_feast_activity_triggers.txt b/N3OW/common/scripted_triggers/00_feast_activity_triggers.txt deleted file mode 100644 index 5733987a..00000000 --- a/N3OW/common/scripted_triggers/00_feast_activity_triggers.txt +++ /dev/null @@ -1,71 +0,0 @@ - -###TRIGGER LIST - -# has_strong_religious_conviction_trigger - -#Check whether any special conditions are true. -#Make sure conditions for new special Main Events are added to this! -has_special_main_event_potential = { - scope:activity = { - has_variable = potential_friend - } -} - -is_murder_feast = { - scope:activity = { - has_activity_option = { - category = special_type - option = feast_type_murder - } - } -} - -feast_default_participant_including_player_trigger = { - is_available_quick = { - alive = yes - imprisoned = no - } - this != root -} - -feast_default_participant_trigger = { - is_available_quick = { - ai = yes - alive = yes - imprisoned = no - } - this != root -} - -feast_default_adult_participant_trigger = { - is_available_quick = { - ai = yes - adult = yes - alive = yes - imprisoned = no - } - this != root -} - -has_hosted_feast_opinion_targeting_character = { - OR = { - has_opinion_modifier = { - modifier = feast_hosted_successful_feast - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = feast_hosted_successful_feast_with_music - target = $CHARACTER$ - } - } -} - -use_goblet_in_tavern_trigger = { - OR = { - location.culture ?= { has_graphical_india_culture_group_trigger = yes } - location.culture ?= { has_graphical_mena_culture_group_trigger = yes } - location.culture ?= { has_building_gfx = iranian_building_gfx } - location.culture ?= { has_graphical_african_culture_group_trigger = yes } - location.culture ?= { has_graphical_steppe_culture_group_trigger = yes } - } -} diff --git a/N3OW/common/scripted_triggers/00_food_scripted_triggers.txt b/N3OW/common/scripted_triggers/00_food_scripted_triggers.txt deleted file mode 100644 index fe1e0de8..00000000 --- a/N3OW/common/scripted_triggers/00_food_scripted_triggers.txt +++ /dev/null @@ -1,106 +0,0 @@ - -# James _insisted_ I make this file. So here we are. - -################################################## -# VEGETABLE TRIGGERS - -province_has_vegetable_carrot_trigger = { - OR = { - geographical_region = world_india - geographical_region = world_middle_east - geographical_region = world_europe - geographical_region = world_steppe_west - geographical_region = world_asia_minor - geographical_region = world_asia_china - } -} - -province_has_vegetable_parsnip_trigger = { - NOT = { geographical_region = world_africa } -} - -province_has_vegetable_turnip_trigger = { - NOT = { geographical_region = world_africa } -} - -province_has_vegetable_yams_trigger = { - OR = { - # African yams - geographical_region = world_africa - # Chinese yams - geographical_region = world_tibet - geographical_region = world_burma - geographical_region = world_steppe_east - geographical_region = world_steppe_tarim - geographical_region = world_asia_china - geographical_region = world_asia_southeast - geographical_region = world_asia_korea - } -} - -province_has_vegetable_kokoro_trigger = { - OR = { - geographical_region = world_africa - geographical_region = world_asia_southeast - } -} - -province_has_vegetable_ginger_trigger = { - OR = { - geographical_region = world_india - geographical_region = world_burma - geographical_region = world_asia_southeast - geographical_region = world_asia_china - geographical_region = world_asia_korea - geographical_region = world_asia_japan - } -} - -province_has_vegetable_taro_trigger = { - OR = { - geographical_region = world_india - geographical_region = world_burma - geographical_region = world_tibet - geographical_region = world_steppe_east - geographical_region = world_steppe_tarim - geographical_region = world_asia_southeast - geographical_region = world_asia_japan - } -} - -province_has_vegetable_daikon_radish_trigger = { - OR = { - geographical_region = world_asia_china - geographical_region = world_asia_korea - geographical_region = world_asia_japan - } -} - -province_has_vegetable_yam_bean_trigger = { - OR = { - geographical_region = world_asia_philippines - geographical_region = world_asia_borneo - } -} - -province_has_vegetable_lotus_root_trigger = { - OR = { - geographical_region = world_asia_china - geographical_region = world_asia_korea - geographical_region = world_asia_japan - geographical_region = world_asia_southeast_mainland - } -} - -province_has_vegetable_burdock_root_trigger = { - OR = { - geographical_region = world_asia_china - geographical_region = world_asia_korea - geographical_region = world_asia_japan - geographical_region = world_asia_north_east - } -} - -province_has_vegetable_arrowroot_trigger = { - geographical_region = world_asia_southeast_islands -} diff --git a/N3OW/common/scripted_triggers/00_funeral_and_body_disposal_triggers.txt b/N3OW/common/scripted_triggers/00_funeral_and_body_disposal_triggers.txt deleted file mode 100644 index 24a9b908..00000000 --- a/N3OW/common/scripted_triggers/00_funeral_and_body_disposal_triggers.txt +++ /dev/null @@ -1,42 +0,0 @@ - -################################################################ -### Triggers related to funerals and general body-related things - -body_is_available = { - is_alive = no - time_since_death = { - years <= 5 # Usually it takes a body less time than this to decompose, but we can plausibly say the body is being preserved in some way - } - NOT = { has_dead_character_variable = body_has_been_disposed } -} - -# NOTE: Keep this trigger in sync with `funeral_add_funeral_targets_to_list` effect -has_available_funeral_target = { - OR = { - primary_title ?= { # Previous holders of your primary title - any_past_holder = { - body_is_available = yes - } - } - any_close_or_extended_family_member = { - even_if_dead = yes - body_is_available = yes - } - any_spouse = { - even_if_dead = yes - body_is_available = yes - } - any_memory = { - OR = { - has_memory_type = friend_died - has_memory_type = lover_died - has_memory_type = soulmate_died - } - trigger_if = { - limit = { exists = memory_participant:dead_relation } - memory_participant:dead_relation = { body_is_available = yes } - } - trigger_else = { always = no } - } - } -} diff --git a/N3OW/common/scripted_triggers/00_game_rule_triggers.txt b/N3OW/common/scripted_triggers/00_game_rule_triggers.txt deleted file mode 100644 index b3e51193..00000000 --- a/N3OW/common/scripted_triggers/00_game_rule_triggers.txt +++ /dev/null @@ -1,281 +0,0 @@ -hungarian_migration_valid_ai_mogyer_ruler_trigger = { - culture = culture:mogyer - is_ai = yes - government_has_flag = government_is_tribal - is_at_war = no - highest_held_title_tier <= tier_kingdom - OR = { - top_liege = this - NOT = { - liege = { culture = culture:mogyer } - } - } -} - -hungarian_migration_valid_pannonian_target_trigger = { - NOR = { - culture = culture:mogyer - any_liege_or_above = { culture = culture:mogyer } - } - is_ai = yes - any_realm_county = { - count >= $COUNT$ - title_province = { geographical_region = custom_hungary } - } -} - -exclave_independence_trigger = { - top_liege = this - NOT = { has_title = title:k_papal_state } - exists = root.capital_province - any_sub_realm_title = { - tier = tier_county - NOT = { - is_connected_to = { - target = root.capital_province.county - } - } - } - trigger_if = { - limit = { - exists = primary_heir - } - primary_heir = { - NOR = { - top_liege = this # Disallow this when the heir is independent, lest we risk breaking up realms that should be connected - is_ai = no # Players always inherit everything - } - } - } -} - -# Sometimes we disable these events for specific characters. -harm_game_rule_enablement_trigger = { - # Disable entirely if harm_safe. - trigger_if = { - limit = { has_game_rule = harm_safe } - always = no - } - # harm_target_player_only - trigger_else_if = { - limit = { has_game_rule = harm_target_player_only } - is_ai = no - } - # harm_target_ai_only - trigger_else_if = { - limit = { has_game_rule = harm_target_ai_only } - is_ai = yes - } - # harm_target_all - trigger_else = { always = yes } - # Never just kill the player if it'd utterly game-over them. - trigger_if = { - limit = { is_ai = no } - # Either because they have no heir. - exists = player_heir - # Or because they have an heir they can't survive with. - player_heir.dynasty ?= dynasty - } - # Immortals do not receive harm events, as they would be inevitably killed by them over a long enough period of time. - NOT = { has_trait = immortal } -} - -# Who do we care about when recording variable logs for harm events? -harm_game_rule_valid_for_logging_trigger = { - OR = { - AND = { - highest_held_title_tier >= tier_duchy - OR = { - government_has_flag = government_is_feudal - government_has_flag = government_is_clan - government_has_flag = government_is_theocracy - } - } - any_close_family_member = { - highest_held_title_tier >= tier_duchy - OR = { - government_has_flag = government_is_feudal - government_has_flag = government_is_clan - government_has_flag = government_is_theocracy - } - } - } -} - -rule_title_creation_imperial_power_projection_title_creation_targeting_trigger = { - trigger_if = { - limit = { has_game_rule = title_creation_imperial_power_projection_targeting_ai_only } - is_ai = yes - } - trigger_else_if = { - limit = { has_game_rule = title_creation_imperial_power_projection_targeting_player_only } - is_ai = no - } - trigger_else = { always = yes } -} - -rule_title_creation_imperial_power_projection_title_creation_trigger = { - trigger_if = { - limit = { - has_game_rule = title_creation_imperial_power_projection_any_power_advantage - rule_title_creation_imperial_power_projection_title_creation_targeting_trigger = yes - highest_held_title_tier <= tier_kingdom - } - custom_tooltip = { - text = rule_title_creation_imperial_power_projection_title_creation_trigger.tt.any_power_advantage - any_neighboring_top_liege_realm_owner = { - count = all - trigger_if = { - limit = { highest_held_title_tier >= tier_empire } - save_temporary_scope_as = char_temp - OR = { - any_close_family_member = { is_spouse_of = root } - root = { has_strong_hook = scope:char_temp } - root.current_military_strength >= scope:char_temp.fifty_percent_more_of_current_military_strength - } - } - trigger_else = { always = yes } - } - } - } - trigger_else_if = { - limit = { - has_game_rule = title_creation_imperial_power_projection_hard_power_only - rule_title_creation_imperial_power_projection_title_creation_targeting_trigger = yes - highest_held_title_tier <= tier_kingdom - } - custom_tooltip = { - text = rule_title_creation_imperial_power_projection_title_creation_trigger.tt.hard_power_only - any_neighboring_top_liege_realm_owner = { - count = all - trigger_if = { - limit = { highest_held_title_tier >= tier_empire } - save_temporary_scope_as = char_temp - root.current_military_strength >= scope:char_temp.fifty_percent_more_of_current_military_strength - } - trigger_else = { always = yes } - } - } - } - trigger_else_if = { - limit = { - has_game_rule = title_creation_imperial_power_projection_soft_power_only - rule_title_creation_imperial_power_projection_title_creation_targeting_trigger = yes - highest_held_title_tier <= tier_kingdom - } - custom_tooltip = { - text = rule_title_creation_imperial_power_projection_title_creation_trigger.tt.soft_power_only - any_neighboring_top_liege_realm_owner = { - count = all - trigger_if = { - limit = { highest_held_title_tier >= tier_empire } - save_temporary_scope_as = char_temp - OR = { - any_close_family_member = { is_spouse_of = root } - root = { has_strong_hook = scope:char_temp } - } - } - trigger_else = { always = yes } - } - } - } - trigger_else_if = { - limit = { - has_game_rule = title_creation_imperial_power_projection_hard_power_only_strict - rule_title_creation_imperial_power_projection_title_creation_targeting_trigger = yes - highest_held_title_tier <= tier_kingdom - } - custom_tooltip = { - text = rule_title_creation_imperial_power_projection_title_creation_trigger.tt.hard_power_only_strict.neighbours - any_neighboring_top_liege_realm_owner = { - count = all - trigger_if = { - limit = { highest_held_title_tier >= tier_empire } - save_temporary_scope_as = char_temp - root.current_military_strength >= scope:char_temp.fifty_percent_more_of_current_military_strength - } - trigger_else = { always = yes } - } - } - custom_tooltip = { - text = rule_title_creation_imperial_power_projection_title_creation_trigger.tt.hard_power_only_strict.de_jure_sharers - any_sub_realm_county = { - count = all - empire = { - OR = { - is_title_created = no - holder = { - save_temporary_scope_as = char_temp - root.current_military_strength >= scope:char_temp.fifty_percent_more_of_current_military_strength - } - } - } - } - } - } - trigger_else_if = { - limit = { - has_game_rule = title_creation_imperial_power_projection_any_power_strict - rule_title_creation_imperial_power_projection_title_creation_targeting_trigger = yes - highest_held_title_tier <= tier_kingdom - } - custom_tooltip = { - text = rule_title_creation_imperial_power_projection_title_creation_trigger.tt.any_power_strict.neighbours - any_neighboring_top_liege_realm_owner = { - count = all - trigger_if = { - limit = { highest_held_title_tier >= tier_empire } - save_temporary_scope_as = char_temp - OR = { - any_close_family_member = { is_spouse_of = root } - root = { has_strong_hook = scope:char_temp } - root.current_military_strength >= scope:char_temp.fifty_percent_more_of_current_military_strength - } - } - trigger_else = { always = yes } - } - } - custom_tooltip = { - text = rule_title_creation_imperial_power_projection_title_creation_trigger.tt.any_power_strict.de_jure_sharers - any_sub_realm_county = { - count = all - empire = { - OR = { - is_title_created = no - holder = { - save_temporary_scope_as = char_temp - OR = { - any_close_family_member = { is_spouse_of = root } - root = { has_strong_hook = scope:char_temp } - root.current_military_strength >= scope:char_temp.fifty_percent_more_of_current_military_strength - } - } - } - } - } - } - } - trigger_else = { always = yes } -} - -game_rule_rig_norman_conquest_for_hereward_trigger = { - OR = { - has_game_rule = historicity_norman_conquest_determined_william - # We also rig it for William if we have a player Hereward and no other input. - AND = { - has_game_rule = historicity_norman_conquest_default_random - character:90028 ?= { is_ai = no } - NOT = { - any_player = { - NOT = { this = character:90028 } - any_character_war = { - OR = { - using_cb = norman_conquest_cb - using_cb = norwegian_invasion_cb - } - } - } - } - } - } -} diff --git a/N3OW/common/scripted_triggers/00_general_trait_triggers.txt b/N3OW/common/scripted_triggers/00_general_trait_triggers.txt deleted file mode 100644 index bde80ea1..00000000 --- a/N3OW/common/scripted_triggers/00_general_trait_triggers.txt +++ /dev/null @@ -1,1272 +0,0 @@ - -###TRIGGER LIST - -# has_same_education_as_compare_character_trigger -# has_same_education_as_root_trigger -# has_same_lifestyle_as_compare_character_trigger -# has_same_lifestyle_as_root_trigger -# has_same_fame_as_compare_character_trigger -# has_same_fame_as_root_trigger -# has_a_personality_trait_in_common_with_root_trigger -# has_a_personality_trait_opposite_to_root_trigger -# has_a_personality_trait_in_common_with_compare_character_trigger -# has_a_personality_trait_opposite_to_compare_character_trigger -# has_same_education_trait_as_root_trigger - -# has_diplomacy_lifestyle_trait_trigger = yes -# has_martial_lifestyle_trait_trigger = yes -# has_stewardship_lifestyle_trait_trigger = yes -# has_intrigue_lifestyle_trait_trigger = yes -# has_learning_lifestyle_trait_trigger = yes - -#has_any_high_skill_rating = yes - - - - - - -#Checks whether scope character and compare_character has the same type of education. -has_same_education_as_compare_character_trigger = { - OR = { - AND = { - OR = { - has_trait = education_intrigue_1 - has_trait = education_intrigue_2 - has_trait = education_intrigue_3 - has_trait = education_intrigue_4 - has_trait = education_intrigue_5 - } - scope:compare_character = { - OR = { - has_trait = education_intrigue_1 - has_trait = education_intrigue_2 - has_trait = education_intrigue_3 - has_trait = education_intrigue_4 - has_trait = education_intrigue_5 - } - } - } - AND = { - 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 - } - scope:compare_character = { - 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 - } - } - } - AND = { - OR = { - has_trait = education_stewardship_1 - has_trait = education_stewardship_2 - has_trait = education_stewardship_3 - has_trait = education_stewardship_4 - has_trait = education_stewardship_5 - } - scope:compare_character = { - OR = { - has_trait = education_stewardship_1 - has_trait = education_stewardship_2 - has_trait = education_stewardship_3 - has_trait = education_stewardship_4 - has_trait = education_stewardship_5 - } - } - } - AND = { - OR = { - has_trait = education_martial_1 - has_trait = education_martial_2 - has_trait = education_martial_3 - has_trait = education_martial_4 - has_trait = education_martial_5 - } - scope:compare_character = { - OR = { - has_trait = education_martial_1 - has_trait = education_martial_2 - has_trait = education_martial_3 - has_trait = education_martial_4 - has_trait = education_martial_5 - } - } - } - AND = { - OR = { - has_trait = education_learning_1 - has_trait = education_learning_2 - has_trait = education_learning_3 - has_trait = education_learning_4 - has_trait = education_learning_5 - } - scope:compare_character = { - OR = { - has_trait = education_learning_1 - has_trait = education_learning_2 - has_trait = education_learning_3 - has_trait = education_learning_4 - has_trait = education_learning_5 - } - } - } - } -} - - -has_same_education_as_root_trigger = { - OR = { - AND = { - OR = { - has_trait = education_intrigue_1 - has_trait = education_intrigue_2 - has_trait = education_intrigue_3 - has_trait = education_intrigue_4 - has_trait = education_intrigue_5 - } - root = { - OR = { - has_trait = education_intrigue_1 - has_trait = education_intrigue_2 - has_trait = education_intrigue_3 - has_trait = education_intrigue_4 - has_trait = education_intrigue_5 - } - } - } - AND = { - 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 - } - root = { - 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 - } - } - } - AND = { - OR = { - has_trait = education_stewardship_1 - has_trait = education_stewardship_2 - has_trait = education_stewardship_3 - has_trait = education_stewardship_4 - has_trait = education_stewardship_5 - } - root = { - OR = { - has_trait = education_stewardship_1 - has_trait = education_stewardship_2 - has_trait = education_stewardship_3 - has_trait = education_stewardship_4 - has_trait = education_stewardship_5 - } - } - } - AND = { - OR = { - has_trait = education_martial_1 - has_trait = education_martial_2 - has_trait = education_martial_3 - has_trait = education_martial_4 - has_trait = education_martial_5 - } - root = { - OR = { - has_trait = education_martial_1 - has_trait = education_martial_2 - has_trait = education_martial_3 - has_trait = education_martial_4 - has_trait = education_martial_5 - } - } - } - AND = { - OR = { - has_trait = education_learning_1 - has_trait = education_learning_2 - has_trait = education_learning_3 - has_trait = education_learning_4 - has_trait = education_learning_5 - } - root = { - OR = { - has_trait = education_learning_1 - has_trait = education_learning_2 - has_trait = education_learning_3 - has_trait = education_learning_4 - has_trait = education_learning_5 - } - } - } - } -} - -has_same_lifestyle_as_compare_character_trigger = { - OR = { - AND = { - has_trait = diplomat - scope:compare_character = { has_trait = diplomat } - } - AND = { - has_trait = lifestyle_reveler - scope:compare_character = { has_trait = lifestyle_reveler } - } - AND = { - has_trait = lifestyle_blademaster - scope:compare_character = { has_trait = lifestyle_blademaster } - } - AND = { - has_trait = lifestyle_hunter - scope:compare_character = { has_trait = lifestyle_hunter } - } - AND = { - has_trait = strategist - scope:compare_character = { has_trait = strategist } - } - AND = { - has_trait = architect - scope:compare_character = { has_trait = architect } - } - AND = { - has_intrigue_lifestyle_trait_trigger = yes - scope:compare_character = { has_intrigue_lifestyle_trait_trigger = yes } - } - AND = { - has_trait = seducer - scope:compare_character = { has_trait = seducer } - } - AND = { - has_trait = celibate - scope:compare_character = { has_trait = celibate } - } - AND = { - has_learning_lifestyle_trait_trigger = yes - scope:compare_character = { has_learning_lifestyle_trait_trigger = yes } - } - AND = { - has_trait = family_first - scope:compare_character = { has_trait = family_first } - } - AND = { - has_trait = sadistic - scope:compare_character = { has_trait = sadistic } - } - AND = { - has_trait = lunatic - scope:compare_character = { has_trait = lunatic } - } - } -} - -has_same_lifestyle_as_root_trigger = { - OR = { - AND = { - has_trait = diplomat - root = { has_trait = diplomat } - } - AND = { - has_trait = lifestyle_reveler - root = { has_trait = lifestyle_reveler } - } - AND = { - has_trait = lifestyle_blademaster - root = { has_trait = lifestyle_blademaster } - } - AND = { - has_trait = lifestyle_hunter - root = { has_trait = lifestyle_hunter } - } - AND = { - has_trait = strategist - root = { has_trait = strategist } - } - AND = { - has_trait = architect - root = { has_trait = architect } - } - AND = { - has_intrigue_lifestyle_trait_trigger = yes - root = { has_intrigue_lifestyle_trait_trigger = yes } - } - AND = { - has_trait = seducer - root = { has_trait = seducer } - } - AND = { - has_trait = celibate - root = { has_trait = celibate } - } - AND = { - has_learning_lifestyle_trait_trigger = yes - root = { has_learning_lifestyle_trait_trigger = yes } - } - AND = { - has_trait = family_first - root = { has_trait = family_first } - } - AND = { - has_trait = sadistic - root = { has_trait = sadistic } - } - AND = { - has_trait = lunatic - root = { has_trait = lunatic } - } - } -} - -has_same_fame_as_compare_character_trigger = { - OR = { - AND = { - has_trait = berserker - scope:compare_character = { has_trait = berserker } - } - AND = { - OR = { - has_trait = bastard - has_trait = legitimized_bastard - } - scope:compare_character = { - has_trait = bastard - has_trait = legitimized_bastard - } - } - AND = { - has_trait = kinslayer - scope:compare_character = { has_trait = kinslayer } - } - AND = { - has_trait = sodomite - scope:compare_character = { has_trait = sodomite } - OR = { - AND = { - is_female = yes - scope:compare_character = { is_female = yes } - } - AND = { - is_female = no - scope:compare_character = { is_female = no } - } - } - } - AND = { - has_trait = deviant - scope:compare_character = { has_trait = deviant } - } - AND = { - has_trait = viking - scope:compare_character = { has_trait = viking } - } - AND = { - has_trait = adventurer - scope:compare_character = { has_trait = adventurer } - } - AND = { - has_trait = lunatic - scope:compare_character = { has_trait = lunatic } - } - AND = { - has_trait = incestuous - scope:compare_character = { has_trait = incestuous } - } - } -} - -has_same_fame_as_root_trigger = { - OR = { - AND = { - has_trait = berserker - root = { has_trait = berserker } - } - AND = { - OR = { - has_trait = bastard - has_trait = legitimized_bastard - } - root = { - has_trait = bastard - has_trait = legitimized_bastard - } - } - AND = { - has_trait = kinslayer - root = { has_trait = kinslayer } - } - AND = { - has_sexuality = homosexual - root = { has_sexuality = homosexual } - OR = { - AND = { - is_female = yes - root = { is_female = yes } - } - AND = { - is_female = no - root = { is_female = no } - } - } - } - AND = { - has_trait = deviant - root = { has_trait = deviant } - } - AND = { - has_trait = viking - root = { has_trait = viking } - } - AND = { - has_trait = adventurer - root = { has_trait = adventurer } - } - AND = { - has_trait = lunatic - root = { has_trait = lunatic } - } - } -} - -has_a_personality_trait_in_common_with_root_trigger = { - OR = { - AND = { - has_trait = chaste - root = { has_trait = chaste } - } - AND = { - has_trait = lustful - root = { has_trait = lustful } - } - AND = { - has_trait = temperate - root = { has_trait = temperate } - } - AND = { - has_trait = gluttonous - root = { has_trait = gluttonous } - } - AND = { - has_trait = generous - root = { has_trait = generous } - } - AND = { - has_trait = greedy - root = { has_trait = greedy } - } - AND = { - has_trait = diligent - root = { has_trait = diligent } - } - AND = { - has_trait = lazy - root = { has_trait = lazy } - } - AND = { - has_trait = wrathful - root = { has_trait = wrathful } - } - AND = { - has_trait = calm - root = { has_trait = calm } - } - AND = { - has_trait = impatient - root = { has_trait = impatient } - } - AND = { - has_trait = patient - root = { has_trait = patient } - } - AND = { - has_trait = stubborn - root = { has_trait = stubborn } - } - AND = { - has_trait = fickle - root = { has_trait = fickle } - } - AND = { - has_trait = humble - root = { has_trait = humble } - } - AND = { - has_trait = arrogant - root = { has_trait = arrogant } - } - AND = { - has_trait = deceitful - root = { has_trait = deceitful } - } - AND = { - has_trait = honest - root = { has_trait = honest } - } - AND = { - has_trait = craven - root = { has_trait = craven } - } - AND = { - has_trait = brave - root = { has_trait = brave } - } - AND = { - has_trait = shy - root = { has_trait = shy } - } - AND = { - has_trait = gregarious - root = { has_trait = gregarious } - } - AND = { - has_trait = ambitious - root = { has_trait = ambitious } - } - AND = { - has_trait = content - root = { has_trait = content } - } - AND = { - has_trait = arbitrary - root = { has_trait = arbitrary } - } - AND = { - has_trait = just - root = { has_trait = just } - } - AND = { - has_trait = cynical - root = { has_trait = cynical } - } - AND = { - has_trait = zealous - root = { has_trait = zealous } - } - AND = { - has_trait = paranoid - root = { has_trait = paranoid } - } - AND = { - has_trait = trusting - root = { has_trait = trusting } - } - AND = { - has_trait = compassionate - root = { has_trait = compassionate } - } - AND = { - has_trait = callous - root = { has_trait = callous } - } - AND = { - has_trait = sadistic - root = { has_trait = sadistic } - } - AND = { - has_trait = vengeful - root = { has_trait = vengeful } - } - AND = { - has_trait = forgiving - root = { has_trait = forgiving } - } - AND = { - has_trait = eccentric - root = { has_trait = eccentric } - } - } -} - -has_a_personality_trait_opposite_to_root_trigger = { - OR = { - AND = { - has_trait = chaste - root = { has_trait = lustful } - } - AND = { - has_trait = lustful - root = { has_trait = chaste } - } - AND = { - has_trait = temperate - root = { has_trait = gluttonous } - } - AND = { - has_trait = gluttonous - root = { has_trait = temperate } - } - AND = { - has_trait = generous - root = { has_trait = greedy } - } - AND = { - has_trait = greedy - root = { has_trait = generous } - } - AND = { - has_trait = diligent - root = { has_trait = lazy } - } - AND = { - has_trait = lazy - root = { has_trait = diligent } - } - AND = { - has_trait = wrathful - root = { has_trait = calm } - } - AND = { - has_trait = calm - root = { has_trait = wrathful } - } - AND = { - has_trait = impatient - root = { has_trait = patient } - } - AND = { - has_trait = patient - root = { has_trait = impatient } - } - AND = { - has_trait = stubborn - root = { - OR = { - has_trait = fickle - has_trait = eccentric - } - } - } - AND = { - OR = { - has_trait = fickle - has_trait = eccentric - } - root = { has_trait = stubborn } - } - AND = { - has_trait = humble - root = { has_trait = arrogant } - } - AND = { - has_trait = arrogant - root = { has_trait = humble } - } - AND = { - has_trait = deceitful - root = { has_trait = honest } - } - AND = { - has_trait = honest - root = { has_trait = deceitful } - } - AND = { - has_trait = craven - root = { has_trait = brave } - } - AND = { - has_trait = brave - root = { has_trait = craven } - } - AND = { - has_trait = shy - root = { has_trait = gregarious } - } - AND = { - has_trait = gregarious - root = { has_trait = shy } - } - AND = { - has_trait = ambitious - root = { has_trait = content } - } - AND = { - has_trait = content - root = { has_trait = ambitious } - } - AND = { - has_trait = arbitrary - root = { has_trait = just } - } - AND = { - has_trait = just - root = { has_trait = arbitrary } - } - AND = { - has_trait = cynical - root = { has_trait = zealous } - } - AND = { - has_trait = zealous - root = { has_trait = cynical } - } - AND = { - has_trait = paranoid - root = { has_trait = trusting } - } - AND = { - has_trait = trusting - root = { has_trait = paranoid } - } - AND = { - has_trait = compassionate - root = { - OR = { - has_trait = callous - has_trait = sadistic - } - } - } - AND = { - has_trait = callous - root = { has_trait = compassionate } - } - AND = { - has_trait = sadistic - root = { has_trait = compassionate } - } - AND = { - has_trait = vengeful - root = { has_trait = forgiving } - } - AND = { - has_trait = forgiving - root = { has_trait = vengeful } - } - } -} - -has_a_personality_trait_in_common_with_compare_character_trigger = { - OR = { - AND = { - has_trait = chaste - scope:compare_character = { has_trait = chaste } - } - AND = { - has_trait = lustful - scope:compare_character = { has_trait = lustful } - } - AND = { - has_trait = temperate - scope:compare_character = { has_trait = temperate } - } - AND = { - has_trait = gluttonous - scope:compare_character = { has_trait = gluttonous } - } - AND = { - has_trait = generous - scope:compare_character = { has_trait = generous } - } - AND = { - has_trait = greedy - scope:compare_character = { has_trait = greedy } - } - AND = { - has_trait = diligent - scope:compare_character = { has_trait = diligent } - } - AND = { - has_trait = lazy - scope:compare_character = { has_trait = lazy } - } - AND = { - has_trait = wrathful - scope:compare_character = { has_trait = wrathful } - } - AND = { - has_trait = calm - scope:compare_character = { has_trait = calm } - } - AND = { - has_trait = impatient - scope:compare_character = { has_trait = impatient } - } - AND = { - has_trait = patient - scope:compare_character = { has_trait = patient } - } - AND = { - has_trait = stubborn - scope:compare_character = { has_trait = stubborn } - } - AND = { - has_trait = fickle - scope:compare_character = { has_trait = fickle } - } - AND = { - has_trait = humble - scope:compare_character = { has_trait = humble } - } - AND = { - has_trait = arrogant - scope:compare_character = { has_trait = arrogant } - } - AND = { - has_trait = deceitful - scope:compare_character = { has_trait = deceitful } - } - AND = { - has_trait = honest - scope:compare_character = { has_trait = honest } - } - AND = { - has_trait = craven - scope:compare_character = { has_trait = craven } - } - AND = { - has_trait = brave - scope:compare_character = { has_trait = brave } - } - AND = { - has_trait = shy - scope:compare_character = { has_trait = shy } - } - AND = { - has_trait = gregarious - scope:compare_character = { has_trait = gregarious } - } - AND = { - has_trait = ambitious - scope:compare_character = { has_trait = ambitious } - } - AND = { - has_trait = content - scope:compare_character = { has_trait = content } - } - AND = { - has_trait = arbitrary - scope:compare_character = { has_trait = arbitrary } - } - AND = { - has_trait = just - scope:compare_character = { has_trait = just } - } - AND = { - has_trait = cynical - scope:compare_character = { has_trait = cynical } - } - AND = { - has_trait = zealous - scope:compare_character = { has_trait = zealous } - } - AND = { - has_trait = paranoid - scope:compare_character = { has_trait = paranoid } - } - AND = { - has_trait = trusting - scope:compare_character = { has_trait = trusting } - } - AND = { - has_trait = compassionate - scope:compare_character = { has_trait = compassionate } - } - AND = { - has_trait = callous - scope:compare_character = { has_trait = callous } - } - AND = { - has_trait = sadistic - scope:compare_character = { has_trait = sadistic } - } - AND = { - has_trait = vengeful - scope:compare_character = { has_trait = vengeful } - } - AND = { - has_trait = forgiving - scope:compare_character = { has_trait = forgiving } - } - } -} - -has_a_personality_trait_opposite_to_compare_character_trigger = { - OR = { - AND = { - has_trait = chaste - scope:compare_character = { has_trait = lustful } - } - AND = { - has_trait = lustful - scope:compare_character = { has_trait = chaste } - } - AND = { - has_trait = temperate - scope:compare_character = { has_trait = gluttonous } - } - AND = { - has_trait = gluttonous - scope:compare_character = { has_trait = temperate } - } - AND = { - has_trait = generous - scope:compare_character = { has_trait = greedy } - } - AND = { - has_trait = greedy - scope:compare_character = { has_trait = generous } - } - AND = { - has_trait = diligent - scope:compare_character = { has_trait = lazy } - } - AND = { - has_trait = lazy - scope:compare_character = { has_trait = diligent } - } - AND = { - has_trait = wrathful - scope:compare_character = { has_trait = calm } - } - AND = { - has_trait = calm - scope:compare_character = { has_trait = wrathful } - } - AND = { - has_trait = impatient - scope:compare_character = { has_trait = patient } - } - AND = { - has_trait = patient - scope:compare_character = { has_trait = impatient } - } - AND = { - has_trait = stubborn - scope:compare_character = { has_trait = fickle } - } - AND = { - has_trait = fickle - scope:compare_character = { has_trait = stubborn } - } - AND = { - has_trait = humble - scope:compare_character = { has_trait = arrogant } - } - AND = { - has_trait = arrogant - scope:compare_character = { has_trait = humble } - } - AND = { - has_trait = deceitful - scope:compare_character = { has_trait = honest } - } - AND = { - has_trait = honest - scope:compare_character = { has_trait = deceitful } - } - AND = { - has_trait = craven - scope:compare_character = { has_trait = brave } - } - AND = { - has_trait = brave - scope:compare_character = { has_trait = craven } - } - AND = { - has_trait = shy - scope:compare_character = { has_trait = gregarious } - } - AND = { - has_trait = gregarious - scope:compare_character = { has_trait = shy } - } - AND = { - has_trait = ambitious - scope:compare_character = { has_trait = content } - } - AND = { - has_trait = content - scope:compare_character = { has_trait = ambitious } - } - AND = { - has_trait = arbitrary - scope:compare_character = { has_trait = just } - } - AND = { - has_trait = just - scope:compare_character = { has_trait = arbitrary } - } - AND = { - has_trait = cynical - scope:compare_character = { has_trait = zealous } - } - AND = { - has_trait = zealous - scope:compare_character = { has_trait = cynical } - } - AND = { - has_trait = paranoid - scope:compare_character = { has_trait = trusting } - } - AND = { - has_trait = trusting - scope:compare_character = { has_trait = paranoid } - } - AND = { - has_trait = compassionate - scope:compare_character = { - OR = { - has_trait = callous - has_trait = sadistic - } - } - } - AND = { - has_trait = callous - scope:compare_character = { has_trait = compassionate } - } - AND = { - has_trait = sadistic - scope:compare_character = { has_trait = compassionate } - } - AND = { - has_trait = vengeful - scope:compare_character = { has_trait = forgiving } - } - AND = { - has_trait = forgiving - scope:compare_character = { has_trait = vengeful } - } - } -} - -has_same_education_trait_as_root_trigger = { - OR = { - AND = { - has_trait = education_diplomacy - root = { has_trait = education_diplomacy } - } - AND = { - has_trait = education_martial - root = { has_trait = education_martial } - } - AND = { - has_trait = education_stewardship - root = { has_trait = education_stewardship } - } - AND = { - has_trait = education_intrigue - root = { has_trait = education_intrigue } - } - AND = { - has_trait = education_learning - root = { has_trait = education_learning } - } - } -} - -has_same_education_trait_as_character_trigger = { - OR = { - AND = { - has_trait = education_diplomacy - $CHARACTER$ = { has_trait = education_diplomacy } - } - AND = { - has_trait = education_martial - $CHARACTER$ = { has_trait = education_martial } - } - AND = { - has_trait = education_stewardship - $CHARACTER$ = { has_trait = education_stewardship } - } - AND = { - has_trait = education_intrigue - $CHARACTER$ = { has_trait = education_intrigue } - } - AND = { - has_trait = education_learning - $CHARACTER$ = { has_trait = education_learning } - } - } -} - - -has_diplomacy_lifestyle_trait_trigger = { - OR = { - has_trait = diplomat - has_trait = august - has_trait = family_first - } -} - -has_martial_lifestyle_trait_trigger = { - OR = { - has_trait = strategist - has_trait = overseer - has_trait = gallant - } -} - -has_stewardship_lifestyle_trait_trigger = { - OR = { - has_trait = architect - has_trait = administrator - has_trait = avaricious - } -} - -has_intrigue_lifestyle_trait_trigger = { - OR = { - has_trait = schemer - has_trait = seducer - has_trait = torturer - } -} - -has_learning_lifestyle_trait_trigger = { - OR = { - has_trait = scholar - has_trait = whole_of_body - has_trait = theologian - } -} - -has_special_content_trait = { - OR = { - is_cannibal_trigger = yes - is_witch_trigger = yes - is_deviant_trigger = yes - is_incestuous_trigger = yes - has_trait = lifestyle_reveler - has_trait = lifestyle_blademaster - has_trait = lifestyle_hunter - has_trait = lifestyle_mystic - has_trait = lifestyle_herbalist - has_trait = drunkard - has_trait = lunatic - has_trait = depressed - has_trait = possessed - } -} - -has_lifestyle_trait = { - OR = { - has_trait = lifestyle_reveler - has_trait = lifestyle_blademaster - has_trait = lifestyle_hunter - has_trait = lifestyle_mystic - has_trait = lifestyle_herbalist - has_trait = lifestyle_physician - } -} - -has_ward_guardian_education_match_compare_character_trigger = { - OR = { - AND = { - has_focus = education_diplomacy - scope:compare_character = { - OR = { - has_trait = education_diplomacy_1 - has_trait = education_diplomacy_2 - has_trait = education_diplomacy_3 - has_trait = education_diplomacy_4 - } - } - } - AND = { - has_focus = education_martial - scope:compare_character = { - OR = { - has_trait = education_martial_1 - has_trait = education_martial_2 - has_trait = education_martial_3 - has_trait = education_martial_4 - } - } - } - AND = { - has_focus = education_stewardship - scope:compare_character = { - OR = { - has_trait = education_stewardship_1 - has_trait = education_stewardship_2 - has_trait = education_stewardship_3 - has_trait = education_stewardship_4 - } - } - } - AND = { - has_focus = education_intrigue - scope:compare_character = { - OR = { - has_trait = education_intrigue_1 - has_trait = education_intrigue_2 - has_trait = education_intrigue_3 - has_trait = education_intrigue_4 - } - } - } - AND = { - has_focus = education_learning - scope:compare_character = { - OR = { - has_trait = education_learning_1 - has_trait = education_learning_2 - has_trait = education_learning_3 - has_trait = education_learning_4 - } - } - } - } -} - -has_any_high_skill_rating = { - OR = { - diplomacy >= high_skill_rating - intrigue >= high_skill_rating - prowess >= high_skill_rating - learning >= high_skill_rating - martial >= high_skill_rating - stewardship >= high_skill_rating - } -} - -has_any_decent_skill_rating = { - OR = { - diplomacy >= decent_skill_rating - intrigue >= decent_skill_rating - prowess >= decent_skill_rating - learning >= decent_skill_rating - martial >= decent_skill_rating - stewardship >= decent_skill_rating - } -} - -has_same_highest_skill = { - OR = { - AND = { - highest_skill = diplomacy - $CHARACTER$ = { highest_skill = diplomacy } - } - AND = { - highest_skill = martial - $CHARACTER$ = { highest_skill = martial } - } - AND = { - highest_skill = stewardship - $CHARACTER$ = { highest_skill = stewardship } - } - AND = { - highest_skill = intrigue - $CHARACTER$ = { highest_skill = intrigue } - } - AND = { - highest_skill = learning - $CHARACTER$ = { highest_skill = learning } - } - } -} diff --git a/N3OW/common/scripted_triggers/00_generic_event_sensibility_triggers.txt b/N3OW/common/scripted_triggers/00_generic_event_sensibility_triggers.txt deleted file mode 100644 index 44e22b15..00000000 --- a/N3OW/common/scripted_triggers/00_generic_event_sensibility_triggers.txt +++ /dev/null @@ -1,259 +0,0 @@ -########################### -# These triggers are designed for use in generic event content: -# They are very restrictive, and designed to, as much as possible, not break immersion. -# Use them where you can, but be aware that they will make event triggers very strict -########################### - -###### LOVER TRIGGERS ##### - -###### -# are_characters_sensible_and_appropriate_open_lovers_trigger = { INSTIGATING_LOVER = scope:something TARGET_OF_LOVE = scope:something_else } -# This is the most restrictive form of lover trigger, -# use it when you need a couple of innocent lovers - -###### -# are_characters_sensible_and_appropriate_lovers_trigger = { INSTIGATING_LOVER = scope:something TARGET_OF_LOVE = scope:something_else } -# Is the pairing both sensible from an attraction standpoint, -# and appropriate from a social standpoint? - -###### -# are_characters_sensible_lovers_trigger = { INSTIGATING_LOVER = scope:something TARGET_OF_LOVE = scope:something_else } -# Is the pairing sensible from an attraction standpoint? -# Does not restrict based on genetic bad looks, -# this is about the _lover_ status, not attraction-based sex - - -# Would two characters fancy each other somewhat? -are_characters_sensible_lovers_trigger = { - $INSTIGATING_LOVER$ = { save_temporary_scope_as = instigating_character } - $TARGET_OF_LOVE$ = { save_temporary_scope_as = target_of_love } - - scope:instigating_character = { - this != scope:target_of_love - is_physically_able_adult = yes - might_cheat_on_every_partner_trigger = yes - can_set_relation_lover_trigger = { CHARACTER = scope:target_of_love } - is_attracted_to_gender_of = scope:target_of_love - NOR = { - has_trait = chaste - has_trait = celibate - has_sexuality = asexual - has_trait = beardless_eunuch - has_trait = leper - has_trait = great_pox - has_trait = bubonic_plague - has_trait = smallpox - has_trait = measles - has_trait = ergotism - has_trait = dysentery - has_trait = consumption - has_trait = typhus - has_trait = pneumonic - } - # These three only need to be checked on one char - age <= scope:target_of_love.age_plus_10 - age >= scope:target_of_love.age_minus_10 - trait_compatibility = { - target = scope:target_of_love - value >= low_positive_trait_compatibility - } - } - - scope:target_of_love = { - this != scope:instigating_character - might_cheat_on_every_partner_trigger = yes - can_set_relation_lover_trigger = { CHARACTER = scope:instigating_character } - is_attracted_to_gender_of = scope:instigating_character - NOR = { - has_trait = chaste - has_trait = celibate - has_sexuality = asexual - has_trait = beardless_eunuch - has_trait = leper - has_trait = great_pox - has_trait = bubonic_plague - has_trait = smallpox - has_trait = measles - has_trait = ergotism - has_trait = dysentery - has_trait = consumption - has_trait = typhus - has_trait = pneumonic - } - } - - accepts_incest_with_each_other_trigger = { - CHARACTER_1 = scope:instigating_character - CHARACTER_2 = scope:target_of_love - } -} - -# Various social blockers - what would you, interpreting society, think of having a lover -are_characters_sensible_and_appropriate_lovers_trigger = { - $INSTIGATING_LOVER$ = { save_temporary_scope_as = instigating_character } - $TARGET_OF_LOVE$ = { save_temporary_scope_as = target_of_love } - - are_characters_sensible_lovers_trigger = { - INSTIGATING_LOVER = scope:instigating_character - TARGET_OF_LOVE = scope:target_of_love - } - - scope:instigating_character = { - OR = { - has_trait = lustful - any_relation = { - type = lover - count < 1 - } - } - trigger_if = { - limit = { - is_clergy = yes - } - faith = { - has_doctrine_parameter = clergy_can_marry - } - } - trigger_if = { - limit = { - is_courtier = yes - is_close_or_extended_family_of = liege - has_no_particular_noble_roots_trigger = no - } - OR = { - scope:target_of_love = { has_no_particular_noble_roots_trigger = no } - is_deviant_trigger = yes - has_trait = lustful - trait_compatibility = { - target = scope:target_of_love - value >= high_positive_trait_compatibility - } - } - } - trigger_if = { - limit = { - OR = { - faith = { - has_doctrine_parameter = homosexuality_shunned - } - liege.faith ?= { - has_doctrine_parameter = homosexuality_shunned - } - faith = { - has_doctrine_parameter = homosexuality_illegal - } - liege.faith ?= { - has_doctrine_parameter = homosexuality_illegal - } - } - } - NOR = { - AND = { - is_female = yes - scope:target_of_love = { is_female = yes } - } - AND = { - is_male = yes - scope:target_of_love = { is_male = yes } - } - } - } - } - - scope:target_of_love = { - OR = { - has_trait = lustful - any_relation = { - type = lover - count < 1 - } - } - trigger_if = { - limit = { - is_clergy = yes - } - faith = { - has_doctrine_parameter = clergy_can_marry - } - } - trigger_if = { - limit = { - is_courtier = yes - is_close_or_extended_family_of = liege - has_no_particular_noble_roots_trigger = no - } - OR = { - scope:instigating_character = { has_no_particular_noble_roots_trigger = no } - is_deviant_trigger = yes - has_trait = lustful - trait_compatibility = { - target = scope:instigating_character - value >= high_positive_trait_compatibility - } - } - } - trigger_if = { - limit = { - OR = { - faith = { - has_doctrine_parameter = homosexuality_shunned - } - liege.faith ?= { - has_doctrine_parameter = homosexuality_shunned - } - faith = { - has_doctrine_parameter = homosexuality_illegal - } - liege.faith ?= { - has_doctrine_parameter = homosexuality_illegal - } - } - } - NOR = { - AND = { - is_female = yes - scope:target_of_love = { is_female = yes } - } - AND = { - is_male = yes - scope:target_of_love = { is_male = yes } - } - } - } - } -} - -# Would the characters make sense as lovers within the context of their social situation -are_characters_sensible_and_appropriate_open_lovers_trigger = { - $INSTIGATING_LOVER$ = { save_temporary_scope_as = instigating_character } - $TARGET_OF_LOVE$ = { save_temporary_scope_as = target_of_love } - - scope:instigating_character = { - trigger_if = { - limit = { - NOT = { - is_consort_of = scope:target_of_love - } - } - is_married = no - is_concubine = no - } - } - - scope:target_of_love = { - trigger_if = { - limit = { - NOT = { - is_consort_of = scope:instigating_character - } - } - is_married = no - is_concubine = no - } - } - - are_characters_sensible_and_appropriate_lovers_trigger = { - INSTIGATING_LOVER = scope:instigating_character - TARGET_OF_LOVE = scope:target_of_love - } -} \ No newline at end of file diff --git a/N3OW/common/scripted_triggers/00_generic_struggle_scripted_triggers.txt b/N3OW/common/scripted_triggers/00_generic_struggle_scripted_triggers.txt deleted file mode 100644 index d3dcb8aa..00000000 --- a/N3OW/common/scripted_triggers/00_generic_struggle_scripted_triggers.txt +++ /dev/null @@ -1,508 +0,0 @@ - -################################################## -# Debug Triggers - -# Do we want to gather global variable tallies for the Persian struggle? -## Toggled off for release, toggle back on to check how often we change phases & which catalysts are firing. -gather_debug_variables_for_persian_struggle_trigger = { always = no } - -################################################## -# General Triggers -## Miscellaneous assorted triggers related to bits of neutral struggle content. - -# Characters of some note within the struggle. -is_important_struggle_character = { - highest_held_title_tier = tier_duchy -} - -# Characters who are very important within the struggle (generally enough that they matter for catalysts). -is_vip_struggle_character = { - OR = { - highest_held_title_tier >= tier_kingdom - AND = { - exists = faith.religious_head - this = faith.religious_head - } - this = culture.culture_head - } -} - -is_important_or_vip_struggle_character = { - OR = { - is_important_struggle_character = yes - is_vip_struggle_character = yes - } -} - -is_semi_important_ruler_struggle_character = { - OR = { - highest_held_title_tier >= tier_county - is_important_or_vip_struggle_character = yes - } -} - -is_secondary_character_involvement_involved_trigger = { - save_temporary_scope_as = struggle_temp - $CHAR$ = { - any_character_struggle = { - involvement = involved - this = scope:struggle_temp - } - } -} - -is_secondary_character_involvement_interloper_trigger = { - save_temporary_scope_as = struggle_temp - $CHAR$ = { - any_character_struggle = { - involvement = interloper - this = scope:struggle_temp - } - } -} - -is_secondary_character_involvement_either_trigger = { - save_temporary_scope_as = struggle_temp - $CHAR$ = { - any_character_struggle = { this = scope:struggle_temp } - } -} - -is_secondary_character_involvement_neither_trigger = { - save_temporary_scope_as = struggle_temp - $CHAR$ = { - NOT = { - any_character_struggle = { this = scope:struggle_temp } - } - } -} - -is_diff_faith_or_culture_trigger = { - NAND = { - culture = $CHAR$.culture - faith = $CHAR$.faith - } - $CHAR$ = { any_character_struggle = { involvement = $STATUS$ } } - # Removed the check for what struggle it is -} - -is_same_faith_or_culture_trigger = { - OR = { - culture = $CHAR$.culture - faith = $CHAR$.faith - } - $CHAR$ = { any_character_struggle = { involvement = $STATUS$ } } - # Removed the check for what struggle it is -} - -is_same_culture_trigger = { - culture = $CHAR$.culture - $CHAR$ = { any_character_struggle = { involvement = $STATUS$ } } - # Removed the check for what struggle it is -} - -is_same_faith_trigger = { - culture = $CHAR$.culture - $CHAR$ = { any_character_struggle = { involvement = $STATUS$ } } - # Removed the check for what struggle it is -} - -################################################## -# Catalyst Phase Triggers -## Should a catalyst be activating in this phase? -### Remember, that means it should activate in the phase _before_ the one that has it as a valid transitionary catalyst. - - -################################################## -# Catalyst Triggers -## Some common rump triggers used in catalysts activation, plus preliminaries for catalysts triggered in multiple locations. - -catalyst_gave_independence_to_powerful_diff_faith_culture_vassal_preliminary_trigger = { - $CHAR1$ = { - NAND = { - culture = $CHAR2$.culture - faith = $CHAR2$.faith - } - } - $CHAR2$ = { is_powerful_vassal_of = $CHAR1$ } -} - -catalyst_granted_powerful_diff_faith_vassal_religious_protection_preliminary_trigger = { - $CHAR$ = { - any_in_list = { - list = changed_obligations - vassal_contract_type = { - OR = { - this = vassal_contract:religious_rights - this = vassal_contract:jizya_special_rights - } - } - obligation_level_score >= 1 - } - is_powerful_vassal = yes - } -} - -catalyst_revoked_powerful_diff_faith_vassal_religious_protection_preliminary_trigger = { - $CHAR$ = { - any_in_list = { - list = changed_obligations - vassal_contract_type = { - OR = { - this = vassal_contract:religious_rights - this = vassal_contract:jizya_special_rights - } - } - obligation_level_score >= 1 - } - is_powerful_vassal = yes - } -} - -catalyst_hybridise_or_diverge_regional_cultures_preliminary_trigger = { - phase_has_catalyst = catalyst_hybridise_or_diverge_regional_cultures - save_temporary_scope_as = struggle_temp - OR = { - AND = { - exists = scope:parent_culture_2 - scope:struggle_temp = { - is_culture_involved_in_struggle = scope:parent_culture_1 - is_culture_involved_in_struggle = scope:parent_culture_2 - } - } - is_culture_involved_in_struggle = scope:parent_culture_1 - } -} - -catalyst_very_important_child_change_culture_or_faith_preliminary_trigger = { - any_character_struggle = { - phase_has_catalyst = catalyst_very_important_child_change_culture_or_faith - } - is_adult = no - any_parent = { - any_character_struggle ={ - involvement = involved - } - is_vip_struggle_character = yes - } -} - -activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { - phase_has_catalyst = $CATALYST$ - save_temporary_scope_as = struggle_temp - $CHAR$ = { - any_character_struggle = { - involvement = involved - this = scope:struggle_temp - } - } -} - -activate_struggle_catalyst_secondary_character_involvement_interloper_trigger = { - phase_has_catalyst = $CATALYST$ - save_temporary_scope_as = struggle_temp - $CHAR$ = { - any_character_struggle = { - involvement = interloper - this = scope:struggle_temp - } - } -} - -activate_struggle_catalyst_secondary_character_involvement_either_trigger = { - phase_has_catalyst = $CATALYST$ - save_temporary_scope_as = struggle_temp - $CHAR$ = { - any_character_struggle = { this = scope:struggle_temp } - } -} - -activate_struggle_catalyst_secondary_character_involvement_neither_trigger = { - phase_has_catalyst = $CATALYST$ - save_temporary_scope_as = struggle_temp - $CHAR$ = { - NOT = { - any_character_struggle = { this = scope:struggle_temp } - } - } -} - -activate_struggle_catalyst_secondary_character_involvement_interloper_or_uninvolved_trigger = { - phase_has_catalyst = $CATALYST$ - save_temporary_scope_as = struggle_temp - $CHAR$ = { - OR = { - any_character_struggle = { - involvement = interloper - this = scope:struggle_temp - } - NOT = { - any_character_struggle = { this = scope:struggle_temp } - } - } - } -} - -activate_struggle_catalyst_warfare_check_attacker_involvement_trigger = { - phase_has_catalyst = $CATALYST$ - save_temporary_scope_as = struggle_temp - $VAR_SCOPE$ = { - trigger_if = { - limit = { scope:attacker = scope:loser } - has_variable = struggle_involvement_attacker - has_variable = struggle_scope_attacker - var:struggle_involvement_attacker = flag:$INVOLVEMENT$ - var:struggle_scope_attacker = scope:struggle_temp - } - trigger_else = { - has_variable = struggle_involvement_defender - has_variable = struggle_scope_defender - var:struggle_involvement_defender = flag:$INVOLVEMENT$ - var:struggle_scope_defender = scope:struggle_temp - } - } -} - -################################################## -# Parameter Triggers -## If a parameter is triggered in multiple places, we use a scripted trigger to keep things unified. - -is_struggle_parameter_active_interfaith_marriages_available_between_involved_characters_trigger = { - scope:actor = { - any_character_struggle = { - involvement = involved - has_struggle_phase_parameter = interfaith_marriages_available_between_involved_characters - save_temporary_scope_as = struggle_temp - scope:recipient = { - any_character_struggle = { - involvement = involved - this = scope:struggle_temp - } - } - } - } -} - -is_struggle_parameter_active_cheaper_to_convert_to_struggle_culture_trigger = { - capital_county = { - any_county_struggle = { has_struggle_phase_parameter = cheaper_to_convert_to_struggle_culture } - } -} - -is_struggle_parameter_active_secondary_character_involvement_involved_trigger = { - has_struggle_phase_parameter = $PARAMETER$ - save_temporary_scope_as = struggle_temp - $CHAR$ = { - any_character_struggle = { - involvement = involved - this = scope:struggle_temp - } - } -} - -is_struggle_parameter_active_secondary_character_involvement_interloper_trigger = { - has_struggle_phase_parameter = $PARAMETER$ - save_temporary_scope_as = struggle_temp - $CHAR$ = { - any_character_struggle = { - involvement = interloper - this = scope:struggle_temp - } - } -} - -is_struggle_parameter_active_secondary_character_involvement_either_trigger = { - has_struggle_phase_parameter = $PARAMETER$ - save_temporary_scope_as = struggle_temp - $CHAR$ = { - any_character_struggle = { this = scope:struggle_temp } - } -} - -is_struggle_parameter_active_secondary_character_involvement_neither_trigger = { - has_struggle_phase_parameter = $PARAMETER$ - save_temporary_scope_as = struggle_temp - $CHAR$ = { - NOT = { - any_character_struggle = { this = scope:struggle_temp } - } - } -} - -is_struggle_parameter_active_secondary_county_trigger = { - has_struggle_phase_parameter = $PARAMETER$ - save_temporary_scope_as = struggle_temp - $COUNTY$ = { - any_county_struggle = { this = scope:struggle_temp } - } -} - -is_struggle_parameter_active_variable_cb_target_secondary_county_trigger = { - has_struggle_phase_parameter = $PARAMETER$ - save_temporary_scope_as = struggle_temp - any_in_list = { - list = target_titles - count >= 1 - tier = tier_county - any_county_struggle = { this = scope:struggle_temp } - } -} - -################################################## -# Casus Belli Triggers -## Struggle triggers related to wars & similar. - -# Is the scoped war using a CB we consider important enough to be a catalyst-worthy CB within the struggle? -is_large_conquest_war_for_struggle_trigger = { - $WAR$ = { - OR = { - # Large claim wars. - AND = { - using_cb = claim_cb - any_in_list = { - list = target_titles - tier >= tier_kingdom - } - } - using_cb = duchy_conquest_cb - using_cb = individual_duchy_de_jure_cb - using_cb = imperial_reconquest_cb - using_cb = invasion_war - using_cb = clan_invasion_war - using_cb = mongol_invasion_war - using_cb = mongol_realm_invasion_war - using_cb = mpo_gok_onslaught_cb - using_cb = major_religious_war - using_cb = undirected_great_holy_war - using_cb = directed_great_holy_war - using_cb = tribal_subjugation_cb - } - } -} - -# Can conquest holy wars be accessed in the current phase of the struggle? -are_holy_wars_disabled_in_struggle_phase_trigger = { - exists = scope:target - trigger_if = { - scope:target.tier = tier_county - scope:target = { - any_county_struggle = { - NOT = { has_struggle_phase_parameter = holy_wars_in_region_cannot_be_declared } - } - } - } - trigger_else = { # For Duchy and Kingdom Holy War - scope:target = { - any_in_de_facto_hierarchy = { # We only consider county within the realm of the target's holder - tier = tier_county - any_county_struggle = { - NOT = { has_struggle_phase_parameter = holy_wars_in_region_cannot_be_declared } - } - } - } - } -} - -# Can the struggle conquest CB be used? -## Currently, we're generous with this. Rather than tying it to a parameter, you just need to be involved in a struggle. -## This should sync neatly with the various struggle_conquest_cb_is_XYZ_phase_triggers, but due to parameter requirements, can't easily be made to do so automagically. -can_use_struggle_cbs_trigger = { - OR = { - any_character_struggle = { involvement = involved } - # Execption if taking hostility ending - AND = { - 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 - } - } - } - } -} - -# These triggers govern the relative costs for the struggle conquest CB. -## These should sync neatly with can_use_struggle_cbs_trigger, but due to parameter requirements, can't easily be made to do so automagically. -## Cheap. -struggle_conquest_cb_is_warlike_phase_trigger = { - $CHAR1$ = { - any_character_struggle = { - involvement = involved - is_struggle_type = iberian_struggle - is_struggle_phase = struggle_iberia_phase_hostility - is_secondary_character_involvement_either_trigger = { CHAR = $CHAR2$ } - } - } -} -## Average. -struggle_conquest_cb_is_average_phase_trigger = { - $CHAR1$ = { - any_character_struggle = { - involvement = involved - is_struggle_type = iberian_struggle - is_struggle_phase = struggle_iberia_phase_opportunity - is_secondary_character_involvement_either_trigger = { CHAR = $CHAR2$ } - } - } -} -## Pricey. -struggle_conquest_cb_is_peaceful_phase_trigger = { - $CHAR1$ = { - any_character_struggle = { - involvement = involved - is_struggle_type = iberian_struggle - OR = { - is_struggle_phase = struggle_iberia_phase_compromise - is_struggle_phase = struggle_iberia_phase_conciliation - } - is_secondary_character_involvement_either_trigger = { CHAR = $CHAR2$ } - } - } -} - -# Work out whether we need to vassalise someone vs. taking some of their stuff. -struggle_conquest_cb_target_is_ocm_trigger = { - any_in_list = { - list = target_titles - # Should only ever be one title, but just in case... - count = all - holder = { - any_held_title = { - count = 1 - title_tier = county - } - NOT = { - any_vassal = { highest_held_title_tier >= tier_county } - } - } - } -} - -struggle_blocks_invasion_conquest_cb_trigger = { - trigger_if = { - limit = { - scope:attacker = { - any_character_struggle = { - involvement = involved - has_struggle_phase_parameter = invasion_conquest_war_cannot_be_declared - } - } - exists = scope:defender - } - scope:defender = { - NOR = { - any_character_struggle = { - involvement = involved - has_struggle_phase_parameter = invasion_conquest_war_cannot_be_declared - } - any_character_struggle = { - involvement = interloper - has_struggle_phase_parameter = invasion_conquest_war_cannot_be_declared - } - } - } - } - trigger_else = { always = yes } -} diff --git a/N3OW/common/scripted_triggers/00_great_holy_war_triggers.txt b/N3OW/common/scripted_triggers/00_great_holy_war_triggers.txt deleted file mode 100644 index 1daec082..00000000 --- a/N3OW/common/scripted_triggers/00_great_holy_war_triggers.txt +++ /dev/null @@ -1,134 +0,0 @@ - -suitable_theocrat_sponsor_trigger = { - faith = scope:the_faith - is_capable_adult_ai = yes - is_imprisoned = no -} - -suitable_faith_for_undirected_ghw_trigger = { - OR = { - has_doctrine_parameter = great_holy_wars_active - AND = { - has_doctrine_parameter = great_holy_wars_active_if_reformed - NOT = { has_doctrine_parameter = unreformed } - } - has_doctrine = divine_destiny_doctrine #SPECIAL: Has become the Chakravarti - } - has_doctrine = doctrine_spiritual_head - NOR = { - has_doctrine_parameter = unreformed - AND = { - has_doctrine = tenet_dharmic_pacifism - NOT = { has_doctrine = divine_destiny_doctrine } - } - has_doctrine = tenet_pacifism - } - fervor >= 75 - save_temporary_scope_value_as = { - name = faith_strength - value = faith_military_strength - } - save_temporary_scope_as = faith - any_kingdom = { - valid_ghw_target_trigger = { FAITH = scope:faith } - } -} - -suitable_faith_for_directed_ghw_trigger = { - OR = { - has_doctrine = tenet_armed_pilgrimages #Catholics - has_doctrine = tenet_struggle_submission #Islam (though, the default Faiths have Temporal Heads, so still do not qualify) - has_doctrine = tenet_warmonger #Germanic (though, starting as Unreformed, it still doesn't qualify by default) - has_doctrine = divine_destiny_doctrine #SPECIAL: Has become the Chakravarti - } - has_doctrine = doctrine_temporal_head - NOR = { - has_doctrine_parameter = unreformed - AND = { - has_doctrine = tenet_dharmic_pacifism - NOT = { has_doctrine = divine_destiny_doctrine } - } - has_doctrine = tenet_pacifism - } - fervor >= 75 -} - -suitable_faith_for_any_ghw_trigger = { - OR = { - has_doctrine = tenet_armed_pilgrimages #Catholics - has_doctrine = tenet_struggle_submission #Islam (though, the default Faiths have Temporal Heads, so still do not qualify) - has_doctrine = tenet_warmonger #Germanic (though, starting as Unreformed, it still doesn't qualify by default) - has_doctrine = divine_destiny_doctrine #SPECIAL: Has become the Chakravarti - } - OR = { - has_doctrine = doctrine_temporal_head - has_doctrine = doctrine_spiritual_head - } - NOR = { - has_doctrine_parameter = unreformed - AND = { - has_doctrine = tenet_dharmic_pacifism - NOT = { has_doctrine = divine_destiny_doctrine } - } - has_doctrine = tenet_pacifism - } - fervor >= 65 -} - -valid_ghw_target_trigger = { - exists = capital_vassal.capital_vassal - any_in_de_jure_hierarchy = { - continue = { tier > tier_county } - tier = tier_county - count >= 5 - $FAITH$ = { - is_hostile_enough_for_holy_war_trigger = { FAITH = prev.holder.top_liege.faith } - } - } - NOT = { - any_in_de_jure_hierarchy = { - continue = { tier > tier_county } - tier = tier_county - $FAITH$ = { - is_hostile_enough_for_holy_war_trigger = { FAITH = prev.holder.top_liege.faith } - prev.holder.top_liege.current_military_strength > { value = scope:faith_strength } - } - } - } -} - -#The Pope is getting annoyed that player hasn't joined or contributed to the Crusade yet. -ghw_pope_annoyed_at_lack_of_participation_trigger = { - faith = scope:the_faith - NOR = { - this = scope:the_faith.great_holy_war.ghw_war_declarer - has_character_flag = ghw_unpledging_cooldown - #Has not already unpledged and been castigated for it once. - has_character_flag = ghw_unpledged_once - #Has not already pledged troops or money. - has_character_flag = ghw_pledged_gold - scope:the_faith.great_holy_war = { has_pledged_attacker = prev } - #Do not pledge against your own liege, or when your top liege belongs to the faith being targeted. - any_liege_or_above = { - this = scope:the_faith.great_holy_war.ghw_target_character - } - } - OR = { #Either be independent, or all lieges above you MUST be of the same Faith declaring the war to avoid messy situations of vassals and lieges fighting against each other. - top_liege = this - NOT = { - any_liege_or_above = { - faith != scope:the_faith - } - } - } -} -ghw_pope_annoyed_at_lack_of_participation_tier_trigger = { #Either King/Emperor, or Independent Dukes. - OR = { - highest_held_title_tier > 3 - AND = { - top_liege = this - highest_held_title_tier >= tier_duchy - is_landless_adventurer = no - } - } -} diff --git a/N3OW/common/scripted_triggers/00_has_dlc_scripted_triggers.txt b/N3OW/common/scripted_triggers/00_has_dlc_scripted_triggers.txt deleted file mode 100644 index 81850a85..00000000 --- a/N3OW/common/scripted_triggers/00_has_dlc_scripted_triggers.txt +++ /dev/null @@ -1,97 +0,0 @@ -################################################## -# Chapter Bonus Triggers -has_sp4_dlc_trigger = { - has_dlc_feature = crowns_of_the_world -} - -################################################## -# Creator content Triggers -has_afr_dlc_trigger = { - has_dlc_feature = north_african_attire -} -has_pol_dlc_trigger = { - has_dlc_feature = west_slavic_attire -} - -has_cp3_dlc_trigger = { - has_dlc_feature = medieval_monuments -} - -has_cp4_dlc_trigger = { - has_dlc_feature = arctic_attire -} - - -################################################## -# Booster Pack Triggers - -has_bp1_dlc_trigger = { - has_dlc_feature = friends_and_foes -} - -has_bp2_dlc_trigger = { - has_dlc_feature = wards_and_wardens -} - -has_bp3_dlc_trigger = { - has_dlc_feature = wandering_nobles -} - -has_ach_dlc_trigger = { - has_dlc_feature = coronations -} - -################################################## -# Flavour Pack Triggers - -has_fp1_dlc_trigger = { - # Does the host have the appropriate DLC? - has_dlc_feature = the_northern_lords -} - -has_fp2_dlc_trigger = { - # Does the host have the appropriate DLC? - has_dlc_feature = the_fate_of_iberia -} - -has_fp3_dlc_trigger = { - # Does the host have the appropriate DLC? - has_dlc_feature = legacy_of_persia -} - -has_ce1_dlc_trigger = { - # Does the host have the appropriate DLC? - has_dlc_feature = legends_of_the_dead -} - -has_mpo_dlc_trigger = { - # Does the host have the appropriate DLC? - has_dlc_feature = khans_of_the_steppe -} - -################################################## -# Expansion Pack Triggers - -has_ep1_dlc_trigger = { - has_dlc_feature = royal_court -} - -has_ep1_court_positions_dlc_trigger = { - has_dlc_feature = royal_court -} - -has_ep2_dlc_trigger = { - has_dlc_feature = tours_and_tournaments -} - -has_ep3_dlc_trigger = { - has_dlc_feature = roads_to_power -} - -has_tgp_dlc_trigger = { - has_dlc_feature = all_under_heaven -} - -has_playable_adventurer_dlc_trigger = { - has_dlc_feature = roads_to_power -} diff --git a/N3OW/common/scripted_triggers/00_hunt_triggers.txt b/N3OW/common/scripted_triggers/00_hunt_triggers.txt deleted file mode 100644 index bad22479..00000000 --- a/N3OW/common/scripted_triggers/00_hunt_triggers.txt +++ /dev/null @@ -1,1091 +0,0 @@ - -can_hunt_trigger = { - NOR = { - has_trait = wounded_2 - has_trait = wounded_3 - has_trait = infirm - has_trait = maimed - has_trait = blind - } - has_contagious_deadly_disease_trigger = no - custom_tooltip = { - text = hunt_cannot_hunt_parameter_tt - NOT = { - culture = { has_cultural_parameter = cannot_hunt } - } - } -} - -# Deer/Antelope -hunt_animal_deer_antelope_trigger = { - OR = { - hunt_animal_deer_trigger = yes - hunt_animal_antelope_trigger = yes - } - hunt_animal_big_available_trigger = yes -} - -# Deer -hunt_animal_deer_trigger = { - geographical_region = hunt_animal_deer_region - OR = { - hunt_animal_temperate_terrain_trigger = yes - terrain = jungle - } -} - -# Antelope -hunt_animal_antelope_trigger = { - geographical_region = hunt_animal_antelope_region - OR = { - hunt_animal_temperate_terrain_trigger = yes - hunt_animal_tropical_terrain_trigger = yes - NOT = { terrain = jungle } - } - trigger_if = { - limit = { exists = duchy } - NOR = { # Lambakanna - duchy = title:d_sinhala # Not native - duchy = title:d_dakhina_desa # Not native - duchy = title:d_ruhunu # Not native - } - } -} - -# Gazelle -hunt_animal_gazelle_trigger = { - geographical_region = hunt_animal_gazelle_region - NOT = { geographical_region = custom_sahara_proper } - hunt_animal_tropical_terrain_trigger = yes -} - -# Roe -hunt_animal_roe_trigger = { - OR = { - AND = { - geographical_region = world_europe - trigger_if = { - limit = { - empire ?= title:e_scandinavia - } - NOR = { - terrain = taiga - terrain = mountains - terrain = hills - } - } - } - geographical_region = world_asia_minor - geographical_region = world_india - geographical_region = world_burma - geographical_region = world_tibet - geographical_region = world_steppe_east - geographical_region = world_asia_china - geographical_region = world_asia_korea - geographical_region = world_asia_sakhalin_hokkaido - geographical_region = world_asia_north_east - } -} - -# Bison -hunt_animal_bison_trigger = { - geographical_region = hunt_animal_bison_region - hunt_animal_tropical_terrain_trigger = no - hunt_animal_big_available_trigger = yes -} - -# Aurochs -hunt_animal_aurochs_trigger = { - geographical_region = hunt_animal_aurochs_region - hunt_animal_tropical_terrain_trigger = no - hunt_animal_big_available_trigger = yes -} - -# Fox -hunt_animal_fox_trigger = { - hunt_animal_small_available_trigger = yes - trigger_if = { - limit = { exists = duchy } - NOT = { duchy = title:d_socotra } # Not native - } -} - -# Terrain Triggers -hunt_animal_temperate_terrain_trigger = { - OR = { - # Flat - terrain = plains - terrain = farmlands - terrain = steppe - terrain = wetlands - # Wooded - terrain = forest - terrain = taiga - # Rough - terrain = hills - terrain = mountains - } -} - -hunt_animal_tropical_terrain_trigger = { - OR = { - # Flat - terrain = desert - terrain = drylands - terrain = floodplains - terrain = oasis - # Wooded - terrain = jungle - # Rough - terrain = desert_mountains - } -} - -# Wolf -hunt_animal_wolf_trigger = { - NAND = { - geographical_region = world_africa_west - OR = { - terrain = hills - terrain = forest - terrain = jungle - terrain = mountains - } - } -} - -# Hyena -hunt_animal_hyena_trigger = { - OR = { - geographical_region = world_africa - geographical_region = world_middle_east - geographical_region = world_india - geographical_region = world_asia_china - geographical_region = world_asia_southeast_mainland - } -} - -# Lynx -hunt_animal_lynx_trigger = { - OR = { - geographical_region = world_europe_north - geographical_region = world_europe_east - geographical_region = world_steppe_east - geographical_region = world_steppe_west - geographical_region = world_tibet - geographical_region = world_asia_china - geographical_region = world_asia_korea - geographical_region = world_asia_sakhalin_hokkaido - geographical_region = world_asia_north_east - } -} - -# Boar -hunt_animal_boar_trigger = { - geographical_region = hunt_animal_boar_region - hunt_animal_big_available_trigger = yes -} - -# Bear -hunt_animal_bear_trigger = { - geographical_region = hunt_animal_bear_region - hunt_animal_big_available_trigger = yes -} - -# Caracal -hunt_animal_caracal_trigger = { - OR = { - geographical_region = world_middle_east - geographical_region = world_india_rajastan - geographical_region = world_africa - geographical_region = world_asia_minor - geographical_region = world_asia_china - } - OR = { - terrain = drylands - terrain = hills - } -} - -# Crocodile -hunt_animal_crocodile_trigger = { - OR = { - geographical_region = world_india - geographical_region = world_africa_north_east - geographical_region = world_africa_west - geographical_region = world_africa_east - geographical_region = world_asia_southeast_mainland - geographical_region = world_asia_southeast_islands - # Restrict our Mesopotamian crocs preemptively to _only_ floodplains. - AND = { - terrain = floodplains - geographical_region = world_middle_east - } - } - OR = { - is_riverside_province = yes - terrain = floodplains - terrain = jungle - AND = { - is_coastal = yes - # Nile crocodiles aren't ocean-dwellers. - NOT = { geographical_region = world_africa_north_east } - } - } -} - -# Hippo -hunt_animal_hippo_trigger = { - OR = { - geographical_region = world_africa_north_east - geographical_region = world_africa_west - geographical_region = world_africa_east - } - is_riverside_province = yes -} - -# Big Cat -hunt_animal_big_cat_trigger = { - geographical_region = hunt_animal_big_cat_region - hunt_animal_big_available_trigger = yes - OR = { - hunt_animal_lion_trigger = yes - hunt_animal_tiger_trigger = yes - hunt_animal_leopard_trigger = yes - } -} - -hunt_animal_lion_trigger = { - OR = { - geographical_region = world_africa - geographical_region = world_middle_east - } - OR = { - terrain = drylands - terrain = desert - terrain = desert_mountains - terrain = jungle - terrain = forest - terrain = hills - terrain = mountains - } - NOR = { - terrain = farmlands - terrain = floodplains - } -} - -hunt_animal_tiger_trigger = { - OR = { - geographical_region = world_steppe - geographical_region = world_india - geographical_region = world_burma - geographical_region = world_middle_east_persia - geographical_region = world_asia_korea - geographical_region = world_asia_china - geographical_region = world_asia_sakhalin_hokkaido - geographical_region = world_asia_southeast_mainland - geographical_region = world_asia_borneo - geographical_region = world_asia_sulawesi_maluku - geographical_region = world_asia_indonesia - } - OR = { - terrain = jungle - terrain = forest - terrain = taiga - terrain = mountains - terrain = hills - } - NOR = { - terrain = farmlands - terrain = floodplains - } -} - -hunt_animal_leopard_trigger = { - OR = { - geographical_region = world_africa_north_west - geographical_region = world_africa_east - geographical_region = world_africa_west - geographical_region = world_middle_east - geographical_region = world_india - geographical_region = world_burma - geographical_region = world_steppe_east - geographical_region = world_tibet - geographical_region = world_asia_korea - geographical_region = world_asia_china - geographical_region = world_asia_sakhalin_hokkaido - geographical_region = world_asia_southeast_mainland - geographical_region = world_asia_borneo - geographical_region = world_asia_sulawesi_maluku - geographical_region = world_asia_indonesia - } - NOR = { - terrain = farmlands - terrain = floodplains - terrain = desert_mountains - } -} - -hunt_animal_steppe_trigger = { # Saiga/etc. - geographical_region = world_steppe - OR = { - terrain = steppe - terrain = hills - terrain = desert - terrain = wetlands - } -} - -hunt_animal_big_available_trigger = { - OR = { - OR = { - has_building_or_higher = hunting_grounds_01 - has_building_or_higher = royal_forest_01 - } - AND = { - trigger_if = { - limit = { exists = county } - NOR = { - # Counties - county = title:c_dahlak # Not native - county = title:c_faereyar # Not native - county = title:c_hormuz # Not native - county = title:c_lesbos # Extinct - county = title:c_maldives # Not native - county = title:c_malta # Extinct - county = title:c_naxos # Extinct - } - } - trigger_if = { - limit = { exists = duchy } - NOR = { - duchy = title:d_canarias # Not native - duchy = title:d_krete # Extinct - duchy = title:d_iceland # Not native - duchy = title:d_mallorca # Not native - duchy = title:d_socotra # Not native - } - } - } - } -} - -hunt_animal_small_available_trigger = { - OR = { - OR = { - has_building_or_higher = hunting_grounds_01 - has_building_or_higher = royal_forest_01 - } - AND = { - trigger_if = { - limit = { exists = county } - NOR = { - county = title:c_dahlak # Not native - county = title:c_maldives # Not native - } - } - trigger_if = { - limit = { exists = duchy } - NOT = { duchy = title:d_canarias } # Not native - } - } - } -} - -hunt_activity_attendee_trigger = { - is_available_for_activity_trigger = yes - liege = scope:activity.activity_host - NOT = { has_trait = blind } -} - -hunt_activity_large_game_trigger = { - OR = { - $VAR$ ?= flag:hart - $VAR$ ?= flag:elk - $VAR$ ?= flag:stag - $VAR$ ?= flag:antelope - $VAR$ ?= flag:saiga - $VAR$ ?= flag:reindeer - $VAR$ ?= flag:saiga - $VAR$ ?= flag:bison - $VAR$ ?= flag:aurochs - $VAR$ ?= flag:boar - $VAR$ ?= flag:bear - $VAR$ ?= flag:lion - $VAR$ ?= flag:tiger - $VAR$ ?= flag:leopard - } -} - -hunt_activity_deer_antelope_game_trigger = { - OR = { - hunt_activity_deer_game_trigger = { VAR = $VAR$ } - hunt_activity_antelope_game_trigger = { VAR = $VAR$ } - } -} - -hunt_activity_antelope_game_trigger = { - OR = { - $VAR$ ?= flag:antelope - $VAR$ ?= flag:gazelle - $VAR$ ?= flag:saiga - } -} - -hunt_activity_deer_game_trigger = { - OR = { - $VAR$ ?= flag:stag - $VAR$ ?= flag:hart - $VAR$ ?= flag:roe - $VAR$ ?= flag:reindeer - $VAR$ ?= flag:elk - } -} - -hunt_activity_big_cat_game_trigger = { - OR = { - $VAR$ ?= flag:leopard - $VAR$ ?= flag:lion - $VAR$ ?= flag:tiger - } -} - -hunt_activity_herd_game_trigger = { - OR = { - hunt_activity_deer_antelope_game_trigger = { VAR = $VAR$ } - $VAR$ ?= flag:bison - $VAR$ ?= flag:aurochs - } -} - -hunt_activity_exotic_bird_trigger = { - OR = { - $VAR$ ?= flag:stork - $VAR$ ?= flag:crane - $VAR$ ?= flag:heron - $VAR$ ?= flag:egret - $VAR$ ?= flag:flamingo - $VAR$ ?= flag:pelican - } -} - -hunt_activity_bird_trigger = { - OR = { - $VAR$ ?= flag:pheasant - $VAR$ ?= flag:goose - $VAR$ ?= flag:grouse - $VAR$ ?= flag:quail - $VAR$ ?= flag:duck - $VAR$ ?= flag:swan - $VAR$ ?= flag:goose - $VAR$ ?= flag:quail - $VAR$ ?= flag:stork - $VAR$ ?= flag:crane - $VAR$ ?= flag:heron - $VAR$ ?= flag:egret - $VAR$ ?= flag:flamingo - $VAR$ ?= flag:pelican - } -} - -hunt_activity_ground_bird_trigger = { - OR = { - $VAR$ ?= flag:pheasant - $VAR$ ?= flag:bustard - $VAR$ ?= flag:grouse - $VAR$ ?= flag:quail - } -} - -hunt_activity_recent_hunt_sighting_trigger = { - OR = { - exists = var:recent_sighting - exists = var:animal_type - has_county_modifier = hunt_sighting_standard_modifier - has_county_modifier = hunt_sighting_dangerous_modifier - has_county_modifier = hunt_sighting_legendary_modifier - has_county_modifier = hunt_sighting_falconry_modifier - } -} - -hunt_sighting_event_trigger = { - is_available_adult = yes - is_landless_adventurer = no - NOT = { has_character_flag = recent_hunt_sighting } - trigger_if = { - limit = { is_landed = no } - NOT = { domicile.domicile_location ?= province:496 } - } - OR = { - court_position:master_of_hunt_court_position ?= { is_available_adult = yes } - court_position:huntperson_camp_officer ?= { is_available_adult = yes } - any_vassal_or_below = { - is_available_adult = yes - has_trait = lifestyle_hunter - } - any_courtier = { - is_available_adult = yes - has_trait = lifestyle_hunter - } - } -} - -hunt_new_sighting_event_trigger = { - trigger_if = { - limit = { is_landed = no } - domicile.domicile_location.county ?= { - NOR = { - has_variable = recent_sighting - any_neighboring_county = { has_variable = recent_sighting } - has_county_modifier = hunt_sighting_$TYPE$_modifier - any_neighboring_county = { has_county_modifier = hunt_sighting_$TYPE$_modifier } - hunt_activity_recent_hunt_sighting_trigger = yes - any_neighboring_county = { hunt_activity_recent_hunt_sighting_trigger = yes } - } - } - } - trigger_else = { - any_sub_realm_county = { hunt_activity_recent_hunt_sighting_trigger = no } - } -} - -hunt_is_valid_subordinate_trigger = { - is_adult = yes - NOT = { this = $LIEGE$ } - OR = { - is_vassal_of = $LIEGE$ - is_courtier_of = $LIEGE$ - } - is_participant_in_activity = $LIEGE$.involved_activity - NOR = { - has_trait = incapable - has_trait = wounded_2 - has_trait = wounded_3 - } -} - -hunt_small_game_trigger = { - exists = $VAR$ - OR = { - $VAR$ = flag:fox - $VAR$ = flag:hare - } -} - -hunt_story_trigger = { - exists = scope:activity - scope:activity = { - exists = var:hunt_activity_story - var:hunt_activity_story = flag:$STORY$ - } -} - -activity_befriend_woo_trigger = { - intent_target ?= $CHARACTER$ - OR = { - has_activity_intent = befriend_attendee_intent - has_activity_intent = woo_attendee_intent - } -} - -hunt_mentor_child_trigger = { - NOR = { - has_trait = lifestyle_hunter - AND = { - has_trait = tourney_participant - has_trait_xp = { - trait = tourney_participant - track = bow - value >= 25 - } - } - } - is_child_of = scope:host - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host } - NAND = { - exists = scope:hunt_participant - this = scope:hunt_participant - } -} - -hunt_hide_big_trigger = { - OR = { - $VARIABLE$ ?= flag:wolf - $VARIABLE$ ?= flag:stag - $VARIABLE$ ?= flag:reindeer - $VARIABLE$ ?= flag:antelope - $VARIABLE$ ?= flag:saiga - $VARIABLE$ ?= flag:hart - $VARIABLE$ ?= flag:elk - $VARIABLE$ ?= flag:bison - $VARIABLE$ ?= flag:aurochs - $VARIABLE$ ?= flag:lion - $VARIABLE$ ?= flag:tiger - $VARIABLE$ ?= flag:bear - $VARIABLE$ ?= flag:leopard - $VARIABLE$ ?= flag:unicorn - $VARIABLE$ ?= flag:dragon - } -} - -hunt_lifestyle_track_greater_equal_trigger = { - has_trait = lifestyle_hunter - has_trait_xp = { - trait = lifestyle_hunter - track = $TRACK$ - value >= $GREATER_EQUAL$ - } -} - -hunt_lifestyle_track_less_trigger = { - has_trait = lifestyle_hunter - has_trait_xp = { - trait = lifestyle_hunter - track = $TRACK$ - value < $LESS_THAN$ - } -} - -hunt_murder_target_trigger = { - OR = { - # Intent - AND = { - has_activity_intent = murder_attendee_intent - intent_target ?= { hunt_valid_accidental_murder_target_trigger = yes } - } - # Schemes - scope:activity = { - any_attending_character = { - this != root - hunt_valid_accidental_murder_target_trigger = yes - OR = { - # Rival - has_relation_rival = root - # Scheme - any_targeting_scheme = { hunt_murder_scheme_target_trigger = yes } - } - save_temporary_scope_as = murder_target_temp - } - } - # Is trying to murder - var:hunt_murder_attempt ?= { - hunt_valid_accidental_murder_target_trigger = yes - save_temporary_scope_as = murder_target_temp - } - } - # Not put off murder already - NAND = { - exists = scope:murder_target_temp - var:hunt_murder_defer ?= scope:murder_target_temp - } -} - -hunt_abduct_target_trigger = { - OR = { - # Intent - hunt_murder_intent_target_trigger = yes - # Schemes - scope:activity = { - any_attending_character = { - this != root - hunt_valid_accidental_murder_target_trigger = yes - OR = { - # Rival - has_relation_rival = root - # Scheme - any_targeting_scheme = { hunt_murder_scheme_target_trigger = yes } - } - save_temporary_scope_as = abduct_target_temp - } - } - # Is trying to abduct - var:hunt_abduct_attempt ?= { - hunt_valid_accidental_murder_target_trigger = yes - save_temporary_scope_as = abduct_target_temp - } - } - # Not put off abduction already - NAND = { - exists = scope:abduct_target_temp - var:hunt_abduct_defer ?= scope:abduct_target_temp - } -} - -hunt_valid_accidental_murder_target_trigger = { - is_alive = yes - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host } - NOT = { has_character_flag = not_slaying } - is_participant_in_activity = scope:activity -} - -hunt_murder_scheme_target_trigger = { - scheme_type = murder - OR = { - scheme_owner = root - any_scheme_agent_character = { this = root } - } - save_temporary_scope_as = scheme - scheme_progress > scheme_progress_33 -} - -hunt_murder_intent_target_trigger = { - has_activity_intent = murder_attendee_intent - intent_target ?= { hunt_valid_accidental_murder_target_trigger = yes } - save_temporary_scope_as = murder_target_temp -} - -hunt_valid_murder_accomplice_trigger = { - this != root - is_adult = yes - is_participant_in_activity = scope:activity - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host } - save_temporary_scope_as = murderer_temp -} - -hunt_1012_hated_participant_trigger = { - AND = { - exists = var:participant_to_use_1011 - var:participant_to_use_1011 = { - is_alive = yes - is_participant_in_activity = scope:activity - } - NOR = { - has_trait = just - has_trait = compassionate - } - } -} - -hunt_murder_risk_trigger = { - is_adult = yes - OR = { - # Scheme - is_scheming_against = { - target = root - type = murder - } - # Intent - AND = { - hunt_murder_intent_target_trigger = yes - intent_target = root - } - AND = { - exists = var:hunt_murder_attempt - var:hunt_murder_attempt = root - } - } -} - -hunt_potential_murder_risk_trigger = { - is_adult = yes - NOT = { - has_any_good_relationship_with_character_trigger = { CHARACTER = root } - } - OR = { - # Rival - has_relation_rival = root - # Feud - house_has_feud_relation_with_trigger = { TARGET = root } - - # Heir - AND = { - this = root.player_heir - NOT = { - has_any_good_relationship_with_character_trigger = { CHARACTER = root.player_heir } - } - opinion = { - target = root - value <= 20 - } - NOR = { - has_trait = craven - has_trait = honest - has_trait = content - } - } - AND = { - exists = var:hunt_murder_attempt - var:hunt_murder_attempt = root - } - } - can_start_scheme = { - type = murder - target_character = root - } - trigger_if = { - limit = { - OR = { - is_close_family_of = root - is_consort_of = root - } - } - OR = { - has_relation_rival = root - NOR = { - has_trait = compassionate - has_trait = just - } - } - } - opinion = { - target = root - value <= -25 - } -} - -hunt_accomplice_general_trigger = { - is_ai = yes - is_participant_in_activity = scope:activity - NOR = { - this = $TARGET$ - this = $MURDERER$ - has_any_good_relationship_with_character_trigger = { CHARACTER = $TARGET$ } - } - OR = { - has_any_good_relationship_with_character_trigger = { CHARACTER = $MURDERER$ } - has_relation_rival = root - NOR = { - has_trait = craven - has_trait = honest - has_trait = content - } - } -} - -hunt_elective_accomplice_trigger = { - hunt_accomplice_general_trigger = { - MURDERER = $MURDERER$ - TARGET = $TARGET$ - } - save_temporary_scope_as = elector_temp - $MURDERER$ = { - has_election_vote_of = { - who = scope:elector_temp - title = $TARGET$.primary_title - } - } -} - -hunt_claimant_faction_trigger = { - faction_is_type = claimant_faction - special_character ?= $MURDERER$ - special_title ?= $TARGET$.primary_title -} - -hunt_pertinent_friendly_trigger = { - OR = { - AND = { - OR = { - has_activity_intent = befriend_attendee_intent - has_activity_intent = woo_attendee_intent - } - intent_target = scope:pertinent - } - has_relation_friend = scope:pertinent - has_relation_lover = scope:pertinent - } -} - -hunt_pertinent_hostile_trigger = { - OR = { - AND = { - has_activity_intent = murder_attendee_intent - intent_target = scope:pertinent - } - has_relation_rival = scope:pertinent - } -} - -hunt_dharmic_pacificist_trigger = { - faith = { has_doctrine = tenet_dharmic_pacifism } - NOT = { has_trait = cynical } -} - -hunt_animal_type_small_trigger = { - OR = { - $VAR$ ?= flag:cat - $VAR$ ?= flag:dog - $VAR$ ?= flag:fox - $VAR$ ?= flag:gazelle - $VAR$ ?= flag:hare - $VAR$ ?= flag:roe - } -} - -hunt_animal_type_herbivore_trigger = { - OR = { - hunt_activity_deer_antelope_game_trigger = { VAR = $VAR$ } - $VAR$ ?= flag:aurochs - $VAR$ ?= flag:bison - $VAR$ ?= flag:boar - $VAR$ ?= flag:hare - } -} - -hunt_animal_type_dangerous_trigger = { - OR = { - $VAR$ ?= flag:boar - $VAR$ ?= flag:bison - $VAR$ ?= flag:aurochs - $VAR$ ?= flag:wolf - $VAR$ ?= flag:hyena - $VAR$ ?= flag:lynx - $VAR$ ?= flag:bear - $VAR$ ?= flag:lion - $VAR$ ?= flag:tiger - $VAR$ ?= flag:leopard - $VAR$ ?= flag:stag - $VAR$ ?= flag:antelope - $VAR$ ?= flag:saiga - $VAR$ ?= flag:reindeer - $VAR$ ?= flag:hart - $VAR$ ?= flag:elk - } -} - -hunt_animal_type_predator_trigger = { - OR = { - $VAR$ ?= flag:wolf - $VAR$ ?= flag:hyena - $VAR$ ?= flag:lynx - $VAR$ ?= flag:bear - $VAR$ ?= flag:lion - $VAR$ ?= flag:tiger - $VAR$ ?= flag:leopard - } -} - -hunt_animal_type_prestigious_trigger = { - OR = { - $VAR$ ?= flag:elk - $VAR$ ?= flag:hart - $VAR$ ?= flag:boar - $VAR$ ?= flag:bear - $VAR$ ?= flag:lion - $VAR$ ?= flag:tiger - $VAR$ ?= flag:leopard - } -} - -hunt_animal_type_lives_in_caves_trigger = { - OR = { - $VAR$ ?= flag:wolf - $VAR$ ?= flag:hyena - $VAR$ ?= flag:lynx - $VAR$ ?= flag:bear - $VAR$ ?= flag:leopard - } -} - -hunt_killed_by_animal_trigger = { - OR = { - death_reason = death_deer - death_reason = death_moose - death_reason = death_bear - death_reason = death_boar - death_reason = death_antelope - death_reason = death_gazelle - death_reason = death_bison - death_reason = death_aurochs - death_reason = death_wolf - death_reason = death_hyena - death_reason = death_lion - death_reason = death_tiger - death_reason = death_leopard - death_reason = death_lynx - death_reason = death_roe - death_reason = death_hart - } -} - -hunt_legendary_animal_custom_loc_trigger = { - trigger_if = { - limit = { exists = scope:story } - scope:story = { story_type = story_cycle_hunt_mystical_animal } - } - trigger_else_if = { - limit = { - exists = $ACTIVITY$ - $ACTIVITY$ != root - } - $ACTIVITY$ = { - has_activity_option = { category = special_type option = hunt_type_legendary } - } - } - trigger_else = { always = no } -} - -hunt_murder_bodyguard_appears_trigger = { - OR = { - has_court_position = bodyguard_court_position - has_court_position = akolouthos_court_position - } - is_participant_in_activity = scope:activity - NOR = { - this = scope:murderer - AND = { - exists = scope:accomplice - this = scope:accomplice - } - is_scheming_against = { - target = root - type = murder - } - AND = { - has_activity_intent = murder_attendee_intent - intent_target = root - } - } -} - -# Target is valid for host to want to gift -hunt_trophy_recipient_trigger = { - NOT = { - has_any_bad_relationship_with_character_trigger = { CHARACTER = root } - } - reverse_opinion = { target = root value > 20 } -} - -hunt_snowy_forest_trigger = { - OR = { - graphical_wilderness_forest_trigger = yes - graphical_wilderness_forest_pine_trigger = yes - } - OR = { - has_province_modifier = winter_normal_modifier - has_province_modifier = winter_harsh_modifier - } -} - -hunt_ongoing_sighting_trigger = { - OR = { - has_county_modifier = hunt_sighting_standard_modifier - has_county_modifier = hunt_sighting_dangerous_modifier - has_county_modifier = hunt_sighting_legendary_modifier - } - exists = var:animal_type - var:sighting_owner ?= root - any_neighboring_county = { - trigger_if = { - limit = { - root = { is_landed = yes } - } - holder.top_liege = root.top_liege - } - hunt_activity_recent_hunt_sighting_trigger = no - } -} - -hunt_is_nerge_type = { - has_activity_option = { - category = special_type - option = hunt_type_nerge - } -} - -activity_is_nerge_type = { - scope:activity ?= { - hunt_is_nerge_type = yes - } -} diff --git a/N3OW/common/scripted_triggers/00_important_actions_triggers.txt b/N3OW/common/scripted_triggers/00_important_actions_triggers.txt deleted file mode 100644 index 76b65921..00000000 --- a/N3OW/common/scripted_triggers/00_important_actions_triggers.txt +++ /dev/null @@ -1,18 +0,0 @@ -is_relevant_for_succession_notification = { - # no one cares about baronies - tier >= tier_county - - # strange titles - is_nomad_title = no - is_noble_family_title = no - - # title is inherited via merit pools (candidate lists) - holder ?= { - NOR = { - has_realm_law = celestial_appointment_succession_law - has_realm_law = celestial_military_appointment_succession_law - has_realm_law = meritocratic_appointment_succession_law - has_realm_law = meritocratic_military_appointment_succession_law - } - } -} diff --git a/N3OW/common/scripted_triggers/00_interaction_triggers.txt b/N3OW/common/scripted_triggers/00_interaction_triggers.txt deleted file mode 100644 index 5ebaf377..00000000 --- a/N3OW/common/scripted_triggers/00_interaction_triggers.txt +++ /dev/null @@ -1,395 +0,0 @@ -remove_guardian_interaction_visible_ward_trigger = { - OR = { - #If I am the child - this = scope:actor - #The ward has actor as its liege - employer ?= scope:actor - #The guardian is actor - any_relation = { - type = guardian - this = scope:actor - } - #The guardian is actor's courtier - any_relation = { - type = guardian - is_courtier_of = scope:actor - } - } -} - -remove_guardian_interaction_available_ward_trigger = { - #is_imprisoned = no -} - -kick_from_court_validity_trigger = { - NOR = { - is_spouse_of = scope:actor - is_concubine_of = scope:actor - is_close_family_of = scope:actor - has_council_position = councillor_court_chaplain - is_diarch = yes - # Marriage major partners of diarchs. - ## Female. - AND = { - is_married = yes - is_female = yes - matrilinear_marriage = yes - any_consort = { is_diarch = yes } - } - ## Male. - AND = { - is_married = yes - is_male = yes - patrilinear_marriage = yes - any_consort = { is_diarch = yes } - } - } -} - -ask_for_pardon_available_trigger = { - $ACTOR$ = { - top_liege != this - any_liege_or_above = { - OR = { - has_imprisonment_reason = $ACTOR$ - has_banish_reason = $ACTOR$ - has_execute_reason = $ACTOR$ - has_revoke_title_reason = $ACTOR$ - } - } - } -} - -title_revocation_standard_valid_showing_failures_only_trigger = { - scope:actor = { - NOR = { - is_at_war_with = scope:recipient - has_truce = scope:recipient - } - custom_description = { - text = "character_interactions_revoke_title_from_ally_without_reason" - object = scope:recipient - OR = { - NOT = { - is_allied_to = scope:recipient - } - has_revoke_title_reason = scope:recipient - } - } - } - scope:recipient = { - NOT = { has_strong_hook = scope:actor } - } -} - -title_revocation_standard_can_pick_title_trigger = { - is_contested = no - custom_description = { - text = "revoke_title_not_noble_family_title" - is_noble_family_title = no - } - NOT = { - recent_history = { - type = granted - years = 1 - } - } - custom_description = { - text = "character_interactions_not_rel_head_title" - is_head_of_faith = no - } -} - -diarch_revocation_has_claim_check_trigger = { - custom_description = { - text = diarch_has_claim_on_revokable_title - object = scope:recipient - scope:actor = { - any_claim = { - holder ?= scope:recipient - } - } - } -} - -title_revocation_is_admin_governor_trigger = { - government_allows = administrative - top_liege = this - save_temporary_scope_as = liege_temp - $VASSAL$ = { - is_landed_or_landless_administrative = yes - target_is_liege_or_above = scope:liege_temp - } -} - -title_revocation_is_tyrannical_trigger = { - NOR = { - exists = scope:administrative_revocation - has_revoke_title_reason = $VASSAL$ - trigger_if = { - limit = { exists = scope:landed_title } - has_claim_on = scope:landed_title - } - title_revocation_is_admin_governor_trigger = { VASSAL = $VASSAL$ } - faith = { - $VASSAL$ = { - NOT = { vassal_contract_has_flag = religiously_protected} - } - OR = { - AND = { - has_doctrine_parameter = pluralism_righteous_revocation_tyranny_reduced - faith_hostility_level = { - target = $VASSAL$.faith - value = faith_evil_level - } - } - AND = { - has_doctrine_parameter = pluralism_fundamentalist_revocation_tyranny_minimal - faith_hostility_level = { - target = $VASSAL$.faith - value >= faith_hostile_level - } - } - } - } - } -} - -vassal_revocation_is_tyrannical_trigger = { - NOR = { - exists = scope:administrative_revocation - AND = { - government_allows = administrative - $VASSAL$ = { - government_allows = administrative - } - } - has_revoke_title_reason = $VASSAL$ - faith = { - OR = { - AND = { - has_doctrine_parameter = pluralism_righteous_revocation_tyranny_reduced - faith_hostility_level = { - target = $VASSAL$.faith - value = faith_evil_level - } - } - AND = { - has_doctrine_parameter = pluralism_fundamentalist_revocation_tyranny_minimal - faith_hostility_level = { - target = $VASSAL$.faith - value >= faith_hostile_level - } - } - } - } - } -} - -vassal_retraction_standard_valid_showing_failures_only_trigger = { - NOT = { - scope:actor = { is_at_war_with = scope:recipient } - } - scope:recipient = { - NOT = { has_strong_hook = scope:actor } - } -} - -diarch_retraction_is_de_jure_liege_trigger = { - custom_description = { - text = "diarch_is_de_jure_liege_of_retractable_vassal" - object = scope:recipient - scope:actor = { - any_held_title = { - any_direct_de_jure_vassal_title = { holder.liege = scope:recipient } - } - } - } -} - -is_de_jure_vassal_of_liege_trigger = { - liege = { - save_temporary_scope_as = my_liege - } - primary_title = { - OR = { - de_jure_liege = { - holder ?= scope:my_liege - } - trigger_if = { - limit = { - tier = tier_duchy - } - de_jure_liege = { - de_jure_liege = { - holder ?= scope:my_liege - } - } - } - } - } -} - -send_poem_positive_poem_lock_trigger = { - OR = { - is_ai = no - NOT = { has_relation_rival = scope:recipient } - NOT = { has_relation_nemesis = scope:recipient } - } -} - -send_poem_negative_poem_lock_trigger = { - OR = { - is_ai = no - has_relation_rival = scope:recipient - has_relation_nemesis = scope:recipient - } -} - -can_any_traveling_family_members_travel_trigger = { - NOR = { - this = scope:recipient - is_in_pool_at = scope:actor.capital_province - } - is_ruler = no - trigger_if = { - limit = { - exists = scope:recipient.host - is_child_of = scope:recipient.host - is_adult = no - } - dynasty != scope:recipient.host.dynasty - } -} - -imprison_neutral_is_valid_showing_failures_only_triggers_trigger = { - scope:actor.liege = { - trigger_if = { - limit = { has_realm_law_flag = imprisonment_toggle_enable } - # TIT-43801 - #has_realm_law_flag = imprisonment_toggle_on - NOT = { has_realm_law = tribal_authority_0 } - } - } - scope:actor = { is_imprisoned = no } - custom_description = { - text = cannot_imprison_almohad_leader - subject = scope:recipient - NOT = { - scope:recipient = { has_character_modifier = almohad_leader_modifier } - } - } -} - -grant_title_rivalry_trigger = { - is_ai = yes - is_playable_character = yes - top_liege = scope:actor - faith = scope:actor.faith - reverse_opinion = { - target = top_liege - value > -50 - } - opinion = { - target = top_liege - value > -50 - } - trigger_if = { - limit = { - is_female = yes - faith_dominant_gender_female_or_equal = no - } - scope:recipient = { is_female = yes } - } - trigger_if = { - limit = { - is_male = yes - faith_dominant_gender_male_or_equal = no - } - scope:recipient = { is_male = yes } - } - has_dread_level_towards = { - target = scope:actor - level < 1 - } - is_eunuch_trigger = no - NOR = { - this = scope:actor - this = scope:recipient - has_trait = content - has_trait = humble - has_trait = blind - has_trait = devoted - is_close_family_of = scope:recipient - has_any_good_relationship_with_character_trigger = { CHARACTER = scope:actor } - has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:actor } - } -} - -should_prioritise_hostile_action_against_due_to_personal_relations_trigger = { - $ACTOR$ = { - OR = { - has_any_bad_relationship_with_character_trigger = { CHARACTER = $RECIPIENT$ } - opinion = { - target = $RECIPIENT$ - value <= very_high_negative_opinion - } - } - } -} - -should_avoid_hostile_action_against_due_to_personal_relations_trigger = { - $ACTOR$ = { - OR = { - has_any_good_relationship_with_character_trigger = { CHARACTER = $RECIPIENT$ } - is_allied_to = $RECIPIENT$ - opinion = { - target = $RECIPIENT$ - value >= very_high_positive_opinion - } - # Plus filter out heirs & other family, unless we hate 'em. - AND = { - OR = { - is_close_or_extended_family_of = $RECIPIENT$ - any_spouse = { this = $RECIPIENT$ } - is_heir_of = $RECIPIENT$ - } - NOR = { - has_any_bad_relationship_with_character_trigger = { CHARACTER = $RECIPIENT$ } - exposed_cheating_on_spouse_trigger = { SPOUSE = $RECIPIENT$ } - AND = { - is_ai = yes - opinion = { - target = $RECIPIENT$ - value <= low_negative_opinion - } - } - } - } - } - } -} - -should_avoid_hostile_action_against_due_to_liege_relations_trigger = { - $ACTOR$ = { - liege ?= { - OR = { - has_any_good_relationship_with_character_trigger = { CHARACTER = $RECIPIENT$ } - is_allied_to = $RECIPIENT$ - opinion = { - target = $RECIPIENT$ - value >= very_high_positive_opinion - } - } - } - } -} - -is_asking_for_gold_in_ransom_trigger = { - OR = { - scope:extortionate_gold ?= yes - scope:extortionate_current_gold ?= yes - scope:gold ?= yes - scope:current_gold ?= yes - } -} diff --git a/N3OW/common/scripted_triggers/00_journey_triggers.txt b/N3OW/common/scripted_triggers/00_journey_triggers.txt deleted file mode 100644 index b63510a1..00000000 --- a/N3OW/common/scripted_triggers/00_journey_triggers.txt +++ /dev/null @@ -1,112 +0,0 @@ -journey_diplomacy_skill_monument_trigger = { - OR = { - has_building_with_flag = travel_point_of_interest_wonder - has_building_with_flag = travel_point_of_interest_learning - has_building_with_flag = travel_point_of_interest_diplomatic - has_building_with_flag = travel_point_of_interest_natural_feature - has_building_with_flag = travel_point_of_interest_religious - NOR = { - has_building_with_flag = travel_point_of_interest_wonder - has_building_with_flag = travel_point_of_interest_diplomatic - has_building_with_flag = travel_point_of_interest_natural_feature - has_building_with_flag = travel_point_of_interest_martial - has_building_with_flag = travel_point_of_interest_religious - has_building_with_flag = travel_point_of_interest_learning - has_building_with_flag = travel_point_of_interest_economic - has_building_with_flag = travel_point_of_interest_martial_minor - } - } -} - -journey_martial_skill_monument_trigger = { - OR = { - has_building_with_flag = travel_point_of_interest_martial - has_building_with_flag = travel_point_of_interest_martial_minor - has_building_with_flag = travel_point_of_interest_wonder - has_building_with_flag = travel_point_of_interest_learning - NOR = { - has_building_with_flag = travel_point_of_interest_wonder - has_building_with_flag = travel_point_of_interest_diplomatic - has_building_with_flag = travel_point_of_interest_natural_feature - has_building_with_flag = travel_point_of_interest_martial - has_building_with_flag = travel_point_of_interest_religious - has_building_with_flag = travel_point_of_interest_learning - has_building_with_flag = travel_point_of_interest_economic - has_building_with_flag = travel_point_of_interest_martial_minor - } - } -} - -journey_learning_skill_monument_trigger = { - OR = { - has_building_with_flag = travel_point_of_interest_religious - has_building_with_flag = travel_point_of_interest_learning - NOR = { - has_building_with_flag = travel_point_of_interest_wonder - has_building_with_flag = travel_point_of_interest_diplomatic - has_building_with_flag = travel_point_of_interest_natural_feature - has_building_with_flag = travel_point_of_interest_martial - has_building_with_flag = travel_point_of_interest_religious - has_building_with_flag = travel_point_of_interest_learning - has_building_with_flag = travel_point_of_interest_economic - has_building_with_flag = travel_point_of_interest_martial_minor - } - } -} - -journey_stewardship_skill_monument_trigger = { - OR = { - has_building_with_flag = travel_point_of_interest_economic - NOR = { - has_building_with_flag = travel_point_of_interest_wonder - has_building_with_flag = travel_point_of_interest_diplomatic - has_building_with_flag = travel_point_of_interest_natural_feature - has_building_with_flag = travel_point_of_interest_martial - has_building_with_flag = travel_point_of_interest_religious - has_building_with_flag = travel_point_of_interest_learning - has_building_with_flag = travel_point_of_interest_economic - has_building_with_flag = travel_point_of_interest_martial_minor - } - } -} - -journey_intrigue_skill_monument_trigger = { - OR = { - has_building_with_flag = travel_point_of_interest_martial - has_building_with_flag = travel_point_of_interest_martial_minor - has_building_with_flag = travel_point_of_interest_diplomatic - has_building_with_flag = travel_point_of_interest_natural_feature - has_building_with_flag = travel_point_of_interest_wonder - has_building_with_flag = travel_point_of_interest_economic - NOR = { - has_building_with_flag = travel_point_of_interest_wonder - has_building_with_flag = travel_point_of_interest_diplomatic - has_building_with_flag = travel_point_of_interest_natural_feature - has_building_with_flag = travel_point_of_interest_martial - has_building_with_flag = travel_point_of_interest_religious - has_building_with_flag = travel_point_of_interest_learning - has_building_with_flag = travel_point_of_interest_economic - has_building_with_flag = travel_point_of_interest_martial_minor - } - } -} - -inspired_journey_trigger = { - scope:host = { - NAND = { - has_variable_list = extra_journey_target - is_target_in_variable_list = { - name = extra_journey_target - target = root - } - } - } -} - -inspired_journey_value_trigger = { - has_variable_list = extra_journey_target - is_target_in_variable_list = { - name = extra_journey_target - target = scope:province - } -} diff --git a/N3OW/common/scripted_triggers/00_law_triggers.txt b/N3OW/common/scripted_triggers/00_law_triggers.txt deleted file mode 100644 index efe3c3b8..00000000 --- a/N3OW/common/scripted_triggers/00_law_triggers.txt +++ /dev/null @@ -1,504 +0,0 @@ - -character_gender_can_rule_title_trigger = { - trigger_if = { - limit = { - $GENDER$ = { is_male = yes } - exists = $TITLE$ - $TITLE$ = { - NOT = { - has_title_law = female_only_law - } - } - } - always = yes - } - trigger_else_if = { - limit = { - $GENDER$ = { is_female = yes } - exists = $TITLE$ - $TITLE$ = { - NOT = { - has_title_law = male_only_law - } - } - } - always = yes - } - trigger_else = { - always = no - } -} - -character_gender_can_inherit_from_trigger = { - save_temporary_scope_as = heir - - trigger_if = { - limit = { - $CHARACTER$ = { exists = primary_title } - } - $CHARACTER$ = { - character_gender_can_rule_title_trigger = { - GENDER = scope:heir - TITLE = primary_title - } - } - } - trigger_else = { - always = no - } -} - -has_partition_succession_realm_law_trigger = { - OR = { - has_realm_law = confederate_partition_succession_law - has_realm_law = partition_succession_law - has_realm_law = high_partition_succession_law - has_realm_law = clan_antagonistic_partition_succession_law - has_realm_law = clan_competitive_partition_succession_law - has_realm_law = clan_impassive_partition_succession_law - has_realm_law = clan_friendly_partition_succession_law - has_realm_law = clan_harmonious_partition_succession_law - } -} - -realm_law_use_crown_authority = { - government_has_flag = government_uses_crown_authority -} - -realm_law_use_tribal_authority = { - government_has_flag = government_is_tribal -} - -realm_law_use_camp_purpose = { - government_has_flag = government_is_landless_adventurer -} - -realm_law_use_imperial_bureaucracy = { - government_allows = administrative - NOR = { - government_has_flag = government_is_celestial - government_has_flag = government_is_meritocratic - government_has_flag = government_is_steppe_admin - government_has_flag = government_is_japan_administrative - } -} - -realm_law_use_nomadic_authority = { - government_has_flag = government_is_nomadic -} - -realm_law_use_celestial_bureaucracy = { - government_has_flag = government_is_celestial -} - -realm_law_is_mandala = { - government_has_flag = government_is_mandala -} - -realm_law_use_meritocratic_bureaucracy = { - OR = { - government_has_flag = government_is_meritocratic - government_has_flag = government_is_steppe_admin - } -} - -realm_uses_treasury_laws_trigger = { - government_allows = treasury -} - -realm_law_use_japanese_bureaucracy = { - government_is_japanese_trigger = yes -} - -can_have_confederate_partition_succession_law_trigger = { - OR = { - government_has_flag = government_is_feudal - government_has_flag = government_is_tribal - # TGP - government_has_flag = government_is_japan_feudal - } -} - -can_keep_partition_succession_law_trigger = { - # The 'can_keep' triggers are dependent on actually having the law. If they aren't, the trigger breakdown for the player breaks and shows incomplete information. - trigger_if = { - limit = { - has_realm_law = partition_succession_law - } - OR = { - can_have_partition_succession_law_trigger = yes - - # Mongol Empires - has_title = title:e_mongol_empire - has_title = title:e_ilkhanate - has_title = title:e_golden_horde - has_title = title:e_chagatai - has_title = title:e_red_horde - has_title = title:e_white_horde - has_title = title:e_aarlud_khanate - has_title = title:e_togskol_khanate - has_title = title:e_baruun_khanate - has_title = title:e_great_yuan - has_title = title:e_blue_horde - has_title = title:e_omnod_dalai_khanate - } - } - NOT = { government_has_flag = government_is_clan } -} - -can_have_partition_succession_law_trigger = { - culture = { - has_innovation = innovation_hereditary_rule - } - custom_description = { - text = succession_laws_must_have_organised_government_tooltip - OR = { - government_has_flag = government_is_feudal - government_has_flag = government_is_clan - government_has_flag = government_is_japan_feudal - } - } -} - -can_keep_high_partition_succession_law_trigger = { - # The 'can_keep' triggers are dependent on actually having the law. If they aren't, the trigger breakdown for the player breaks and shows incomplete information. - trigger_if = { - limit = { - has_realm_law = high_partition_succession_law - } - OR = { - can_have_high_partition_succession_law_trigger = yes - - # Mongol Empires - has_title = title:e_mongol_empire - has_title = title:e_ilkhanate - has_title = title:e_golden_horde - has_title = title:e_chagatai - has_title = title:e_red_horde - has_title = title:e_white_horde - has_title = title:e_aarlud_khanate - has_title = title:e_togskol_khanate - has_title = title:e_baruun_khanate - has_title = title:e_great_yuan - has_title = title:e_blue_horde - has_title = title:e_omnod_dalai_khanate - } - } - NOT = { government_has_flag = government_is_clan} -} - -can_have_high_partition_succession_law_trigger = { - trigger_if = { - limit = { - NOT = { - culture = { has_cultural_parameter = can_enact_high_partition_succession_law } - } - } - culture = { has_innovation = innovation_heraldry } - } - custom_description = { - text = succession_laws_must_have_organised_government_tooltip - OR = { - government_has_flag = government_is_feudal - government_has_flag = government_is_clan - government_has_flag = government_is_japan_feudal - } - } -} - -can_keep_single_heir_succession_law_trigger = { - # The 'can_keep' triggers are dependent on actually having the law. If they aren't, the trigger breakdown for the player breaks and shows incomplete information. - trigger_if = { - limit = { - has_realm_law = single_heir_succession_law - } - OR = { - can_have_single_heir_succession_law_trigger = yes - # Byzantine Empire / Ceremonial Liege - historical_succession_access_single_heir_succession_law_trigger = yes - has_variable = purge_oath_previous_law # ACH Purge Pretenders Oath - } - } -} - -can_have_single_heir_succession_law_trigger = { - trigger_if = { # Celestial/Meritocratic/Soryo - limit = { - OR = { - government_allows = merit - government_has_flag = government_is_japan_feudal - } - } - custom_tooltip = { # You are independent, have the innovation or are Ceremonial Monarch - text = can_have_single_heir_succession_law_trigger_merit_or_japan_tt - OR = { - is_independent_ruler = yes - culture = { - has_innovation = innovation_primogeniture - } - tgp_has_ceremonial_liege_title_trigger = yes - } - } - } - trigger_else_if = { - limit = { tgp_has_ceremonial_liege_title_trigger = yes } - always = yes - } - trigger_else = { - culture = { - has_innovation = innovation_primogeniture - } - } - # Non-tribals only - trigger_if = { # We split the tooltip into two, to make sure we don't show admin unless you actually have it - limit = { - has_ep3_dlc_trigger = yes - } - custom_tooltip = { - text = must_be_feudal_clan_or_admin - OR = { - government_has_flag = government_is_feudal - government_has_flag = government_is_clan - government_allows = administrative - government_has_flag = government_is_japan_feudal - } - } - } - trigger_else = { - custom_description = { - text = succession_laws_must_have_organised_government_tooltip - OR = { - government_has_flag = government_is_feudal - government_has_flag = government_is_clan - government_has_flag = government_is_japan_feudal - tgp_has_ceremonial_liege_title_trigger = yes - } - } - } - trigger_if = { - limit = { - government_allows = administrative - } - OR = { - is_independent_ruler = yes - exists = primary_title.var:ceremonial_title - } - } -} - -can_keep_single_heir_youngest_succession_law_trigger = { - # The 'can_keep' triggers are dependent on actually having the law. If they aren't, the trigger breakdown for the player breaks and shows incomplete information. - trigger_if = { - limit = { - has_realm_law = single_heir_succession_law_youngest - } - OR = { - can_have_single_heir_youngest_succession_law_trigger = yes - historical_succession_access_single_heir_succession_law_youngest_trigger = yes - } - } -} - -can_have_single_heir_youngest_succession_law_trigger = { - culture = { - has_innovation = innovation_primogeniture - } - # Non-tribals only - trigger_if = { # We split the tooltip into two, to make sure we don't show admin unless you actually have it - limit = { - has_ep3_dlc_trigger = yes - } - custom_tooltip = { - text = must_be_feudal_clan_or_admin - OR = { - government_has_flag = government_is_feudal - government_has_flag = government_is_clan - government_allows = administrative - government_has_flag = government_is_japan_feudal - } - } - } - trigger_else = { - custom_description = { - text = succession_laws_must_have_organised_government_tooltip - OR = { - government_has_flag = government_is_feudal - government_has_flag = government_is_clan - government_has_flag = government_is_japan_feudal - } - } - } - trigger_if = { - limit = { - government_allows = administrative - } - is_independent_ruler = yes - } -} - -can_keep_single_heir_dynasty_house_trigger = { - # The 'can_keep' triggers are dependent on actually having the law. If they aren't, the trigger breakdown for the player breaks and shows incomplete information. - trigger_if = { - limit = { - has_realm_law = single_heir_dynasty_house - } - OR = { - can_have_single_heir_dynasty_house_trigger = yes - historical_succession_access_single_heir_dynasty_house_trigger = yes - } - } -} - -can_have_single_heir_dynasty_house_trigger = { - exists = house - trigger_if = { - limit = { - culture = { - OR = { - this = culture:czech - this = culture:slovien - any_parent_culture_or_above = { - this = culture:czech - } - any_parent_culture_or_above = { - this = culture:slovien - } - NOT = { has_innovation = innovation_heraldry } - } - } - } - culture = { - has_innovation = innovation_table_of_princes - } - } - trigger_else = { - culture = { - has_innovation = innovation_heraldry - } - } - custom_description = { - text = succession_laws_must_have_organised_government_tooltip - OR = { - government_has_flag = government_is_feudal - government_has_flag = government_is_clan - government_has_flag = government_is_japan_feudal - } - } - NOT = { government_allows = administrative } -} - -can_have_bishop_theocratic_succession_law_trigger = { - OR = { - is_theocratic_lessee = yes - government_has_flag = government_is_theocracy - } -} - -is_temporal_head_of_faith_trigger = { - is_head_of_faith = yes - holder.faith = { has_doctrine = doctrine_temporal_head } -} - -can_title_have_law_general_trigger = { - tier >= tier_duchy - is_temporal_head_of_faith_trigger = no -} - -can_have_holy_order_succession_law_trigger = { - government_has_flag = government_is_holy_order -} - -can_have_mercenary_succession_law_trigger = { - government_has_flag = government_is_mercenary -} - -can_have_city_succession_law_trigger = { - government_has_flag = government_is_republic -} - -can_have_herder_succession_law_trigger = { - government_has_flag = government_is_herder -} - -title_can_reduce_partition_law_trigger = { - holder ?= { - OR = { - has_realm_law = single_heir_succession_law - can_have_high_partition_succession_law_trigger = yes - } - OR = { - has_realm_law = high_partition_succession_law - can_have_high_partition_succession_law_trigger = yes - } - OR = { - has_realm_law = partition_succession_law - can_have_confederate_partition_succession_law_trigger = yes - } - } -} - -can_pass_law_ca1_trigger = { - culture = { has_innovation = innovation_plenary_assemblies } -} - -can_pass_law_ca2_trigger = { - culture = { has_innovation = innovation_royal_prerogative } -} - -can_pass_law_ca3_trigger = { - culture = { has_innovation = innovation_royal_prerogative } -} - -can_have_acclamation_succession_law_trigger = { - has_ep3_dlc_trigger = yes - top_liege = this - government_allows = administrative - NOR = { - government_has_flag = government_is_celestial - government_has_flag = government_is_japan_administrative - government_has_flag = government_is_meritocratic - government_has_flag = government_is_steppe_admin - } -} - -can_keep_acclamation_succession_law_trigger = { - has_ep3_dlc_trigger = yes - trigger_if = { - limit = { - has_realm_law = acclamation_succession_law - } - OR = { - can_have_acclamation_succession_law_trigger = yes - has_title = title:e_byzantium - } - } -} - -can_change_acclamation_succession_law_trigger = { - has_ep3_dlc_trigger = yes -} - -can_have_appointment_succession_law_trigger = { - has_ep3_dlc_trigger = yes - government_allows = administrative - NOR = { - government_has_flag = government_is_celestial - government_has_flag = government_is_japan_administrative - government_has_flag = government_is_meritocratic - } - is_independent_ruler = no -} - -can_keep_appointment_succession_law_trigger = { - has_ep3_dlc_trigger = yes - trigger_if = { - limit = { - has_realm_law = appointment_succession_law - } - can_have_appointment_succession_law_trigger = yes - } -} - -can_change_appointment_succession_law_trigger = { - has_ep3_dlc_trigger = yes -} diff --git a/N3OW/common/scripted_triggers/00_legal_triggers.txt b/N3OW/common/scripted_triggers/00_legal_triggers.txt deleted file mode 100644 index df14c55f..00000000 --- a/N3OW/common/scripted_triggers/00_legal_triggers.txt +++ /dev/null @@ -1,174 +0,0 @@ - -### Legal trigger list - -opposes_succession_law_change_trigger = { - is_imprisoned = no - opinion = { - target = liege - value < 0 - } - custom_description = { - text = law_change_approval_is_cowed - has_dread_level_towards = { - target = liege - level < 2 - } - } -} - -can_change_succession_laws_realm_flag_trigger = { - trigger_if = { - limit = { realm_law_use_tribal_authority = yes } - custom_description = { - text = "has_tribal_law_allowing_succession_law_change" - has_realm_law_flag = can_change_succession_laws - } - } - trigger_else_if = { - limit = { realm_law_use_imperial_bureaucracy = yes } - custom_description = { - text = has_imperial_bureaucracy_law_allowing_succession_law_change - has_realm_law_flag = can_change_succession_laws - } - } - trigger_else = { - custom_description = { - text = "has_crown_law_allowing_succession_law_change" - has_realm_law_flag = can_change_succession_laws - } - } -} - -can_change_succession_law_trigger = { - can_change_succession_laws_realm_flag_trigger = yes - custom_description = { - text = "no_powerful_vassal_with_negative_opinion" - NOT = { - any_vassal = { - is_powerful_vassal = yes - opposes_succession_law_change_trigger = yes - } - } - } -} - -can_change_single_heir_dynasty_house_succession_law_trigger = { - trigger_if = { - limit = { - culture = { - OR = { - this = culture:czech - this = culture:slovien - any_parent_culture_or_above = { - this = culture:czech - } - any_parent_culture_or_above = { - this = culture:slovien - } - } - } - NOT = { - has_realm_law_flag = can_change_succession_laws - } - } - culture = { - has_innovation = innovation_table_of_princes - } - } - trigger_else = { - can_change_succession_laws_realm_flag_trigger = yes - } - custom_description = { - text = "no_powerful_vassal_with_negative_opinion" - NOT = { - any_vassal = { - is_powerful_vassal = yes - opposes_succession_law_change_trigger = yes - } - } - } -} - -can_change_to_equal_succession_law_trigger = { - trigger_if = { - limit = { - NOT = { has_realm_law_flag = can_change_succession_laws } - } - OR = { - culture = { has_cultural_parameter = gender_equal_inheritance } - faith = { has_doctrine = doctrine_gender_equal } - } - } - can_change_succession_laws_realm_flag_trigger = yes - custom_description = { - text = "no_powerful_vassal_with_negative_opinion" - NOT = { - any_vassal = { - is_powerful_vassal = yes - opposes_succession_law_change_trigger = yes - } - } - } -} - -can_change_partition_succession_law_trigger = { - custom_description = { - text = "has_law_allowing_partition_succession_law_change" - OR = { - has_realm_law_flag = can_change_partition_succession_laws - has_realm_law_flag = can_change_succession_laws - } - } - custom_description = { - text = "no_powerful_vassal_with_negative_opinion" - NOT = { - any_vassal = { - is_powerful_vassal = yes - opposes_succession_law_change_trigger = yes - } - } - } -} - - -## Can this character assign a dedicated heir? -# -# Check if a character can assign some designated heir, -# but not if the heir is a valid candidate. -# -# root: Character that will assign an heir -# -can_designate_heir_trigger = { - trigger_if = { - # Admin always has access to this - limit = { government_allows = administrative } - - custom_description = { - text = "has_admin_allowing_designate_heir" - any_held_title = { - is_noble_family_title = yes - } - } - } - trigger_else_if = { - # Feudal and clan can get this by increasing crown authority - limit = { has_realm_law_in_group = crown_authority } - - custom_description = { - text = "has_crown_authority_designate_heir" - has_realm_law_flag = can_designate_heirs - } - } - trigger_else = { - # Everyone else also needs a law to gain access to this interaction - custom_description = { - text = "has_law_allowing_designate_heir" - has_realm_law_flag = can_designate_heirs - } - } -} - - -can_change_title_law_trigger = { - is_at_war = no -} diff --git a/N3OW/common/scripted_triggers/00_lifestyle_perk_triggers.txt b/N3OW/common/scripted_triggers/00_lifestyle_perk_triggers.txt deleted file mode 100644 index 7b3563d8..00000000 --- a/N3OW/common/scripted_triggers/00_lifestyle_perk_triggers.txt +++ /dev/null @@ -1,86 +0,0 @@ - -# Triggers used in events and actions caused by Lifestyle Perks - - -# extortion_powerful_vassal_trigger: Is this powerful vassal available for extortion? -# extortion_county_trigger: Is this County available for extortion? -# extortion_theocratic_vassal_trigger: Is this Theocratic Vassal available for extortion? - -extortion_powerful_vassal_trigger = { - is_available_ai_adult = yes - NOR = { - has_variable = was_recently_extorted - has_opinion_modifier = { - target = root - modifier = extorted_me_opinion - } - } -} - - -extortion_county_trigger = { - tier = tier_county - this != root.capital_county - county_control >= medium_county_control - NOR = { - has_county_modifier = county_extorted_modifier - has_variable = was_recently_extorted - } -} - -extortion_theocratic_vassal_trigger = { - is_available_ai_adult = yes - government_has_flag = government_is_theocracy - NOR = { - has_variable = was_recently_extorted - has_opinion_modifier = { - target = root - modifier = extorted_me_opinion - } - } -} - -extortion_vassal_at_large_trigger = { - is_available_ai_adult = yes - NOR = { - has_variable = was_recently_extorted - has_opinion_modifier = { - target = root - modifier = extorted_me_opinion - } - } -} - -extortion_courtier_representative_trigger = { - is_available_ai_adult = yes - NOR = { - is_close_family_of = root - has_variable = was_recently_extorted - has_opinion_modifier = { - target = root - modifier = extorted_me_opinion - } - } -} - -# We use a trigger so this can be enabled elsewhere easily. -can_challenge_rival_to_single_combat_trigger = { - # Enabling perks. - OR = { - has_perk = stalwart_leader_perk - culture = { has_cultural_parameter = can_duel_rivals } - government_has_flag = government_is_nomadic - government_has_flag = government_is_japan_feudal - } -} - -rival_single_combat_shown_and_not_invalid_trigger = { - scope:actor = { - # Scope:actor must be able to fight personally. - can_start_single_combat_trigger = yes - # Scope:actor cannot challenge someone they have a ceasefire against. - NOT = { has_truce = scope:recipient } - # Scope:actor *definitely* cannot challenge someone they're at war with. - NOT = { is_at_war_with = scope:recipient } - } -} diff --git a/N3OW/common/scripted_triggers/00_lifestyle_triggers.txt b/N3OW/common/scripted_triggers/00_lifestyle_triggers.txt deleted file mode 100644 index f77423ee..00000000 --- a/N3OW/common/scripted_triggers/00_lifestyle_triggers.txt +++ /dev/null @@ -1,413 +0,0 @@ -# can_start_new_lifestyle_tree_trigger -# lifestyle_friend_trigger - - -can_start_new_lifestyle_tree_trigger = { - OR = { - NOR = { - has_perk = benevolent_intent_perk - has_perk = firm_hand_perk - } - has_perk = august_perk - has_focus_diplomacy = no - } - OR = { - NOR = { - has_perk = befriend_perk - has_perk = familial_familiar_perk - } - has_perk = family_man_perk - has_focus_diplomacy = no - } - OR = { - NOT = { has_perk = thoughtful_perk } - has_perk = diplomat_perk - has_focus_diplomacy = no - } - OR = { - NOR = { - has_perk = dark_insights_perk - has_perk = dreadful_perk - } - has_perk = torturer_perk - has_focus_intrigue = no - } - OR = { - NOT = { has_perk = truth_is_relative_perk } - has_perk = schemer_perk - has_focus_intrigue = no - } - OR = { - NOR = { - has_perk = like_weed_in_a_garden_perk - has_perk = enticing_opportunity_perk - } - has_perk = seducer_perk - has_focus_intrigue = no - } - OR = { - NOT = { has_perk = anatomical_studies_perk } - has_perk = whole_of_body_perk - has_focus_learning = no - } - OR = { - NOR = { - has_perk = pedagogy_perk - has_perk = scientific_perk - } - has_perk = scholar_perk - has_focus_learning = no - } - OR = { - NOT = { has_perk = faithful_perk } - has_perk = theologian_perk - has_focus_learning = no - } - OR = { - NOT = { has_perk = stalwart_leader_perk } - has_perk = gallant_perk - has_focus_martial = no - } - OR = { - NOT = { has_perk = serve_the_crown_perk } - has_perk = overseer_perk - has_focus_martial = no - } - OR = { - NOT = { has_perk = bellum_justum_perk } - has_perk = strategist_perk - has_focus_martial = no - } - OR = { - NOR = { - has_perk = tax_man_perk - has_perk = cutting_corners_perk - } - has_perk = architect_perk - has_focus_stewardship = no - } - OR = { - NOT = { has_perk = meritocracy_perk } - has_perk = administrator_perk - has_focus_stewardship = no - } - OR = { - NOT = { has_perk = golden_obligations_perk } - has_perk = avaricious_perk - has_focus_stewardship = no - } - OR = { - NOT = { has_perk = mustering_the_troops_perk } - has_perk = surveyor_perk - has_focus_wanderer = no - } - OR = { - NOT = { has_perk = well_prepared_perk } - has_perk = wayfarer_perk - has_focus_wanderer = no - } - OR = { - NOR = { - has_perk = power_at_home_perk - has_perk = mercenary_contacts_perk - } - has_perk = voyager_perk - has_focus_wanderer = no - } -} - -has_completed_current_lifestyle_trigger = { - OR = { - AND = { - OR = { - has_focus = diplomacy_foreign_affairs_focus - has_focus = diplomacy_majesty_focus - has_focus = diplomacy_family_focus - } - has_perk = august_perk - has_perk = family_man_perk - has_perk = diplomat_perk - } - AND = { - OR = { - has_focus = intrigue_skulduggery_focus - has_focus = intrigue_temptation_focus - has_focus = intrigue_intimidation_focus - } - has_perk = torturer_perk - has_perk = schemer_perk - has_perk = seducer_perk - } - AND = { - OR = { - has_focus = learning_medicine_focus - has_focus = learning_scholarship_focus - has_focus = learning_theology_focus - } - has_perk = whole_of_body_perk - has_perk = scholar_perk - has_perk = theologian_perk - } - AND = { - OR = { - has_focus = martial_strategy_focus - has_focus = martial_authority_focus - has_focus = martial_chivalry_focus - } - has_perk = gallant_perk - has_perk = overseer_perk - has_perk = strategist_perk - } - AND = { - OR = { - has_focus = stewardship_wealth_focus - has_focus = stewardship_domain_focus - has_focus = stewardship_duty_focus - } - has_perk = architect_perk - has_perk = administrator_perk - has_perk = avaricious_perk - } - } -} - -has_completed_one_tree_in_current_lifestyle_trigger = { - OR = { - AND = { - OR = { - has_focus = diplomacy_foreign_affairs_focus - has_focus = diplomacy_majesty_focus - has_focus = diplomacy_family_focus - } - OR = { - has_perk = august_perk - has_perk = family_man_perk - has_perk = diplomat_perk - } - } - AND = { - OR = { - has_focus = intrigue_skulduggery_focus - has_focus = intrigue_temptation_focus - has_focus = intrigue_intimidation_focus - } - OR = { - has_perk = torturer_perk - has_perk = schemer_perk - has_perk = seducer_perk - } - } - AND = { - OR = { - has_focus = learning_medicine_focus - has_focus = learning_scholarship_focus - has_focus = learning_theology_focus - } - OR = { - has_perk = whole_of_body_perk - has_perk = scholar_perk - has_perk = theologian_perk - } - } - AND = { - OR = { - has_focus = martial_strategy_focus - has_focus = martial_authority_focus - has_focus = martial_chivalry_focus - } - OR = { - has_perk = gallant_perk - has_perk = overseer_perk - has_perk = strategist_perk - } - } - AND = { - OR = { - has_focus = stewardship_wealth_focus - has_focus = stewardship_domain_focus - has_focus = stewardship_duty_focus - } - OR = { - has_perk = architect_perk - has_perk = administrator_perk - has_perk = avaricious_perk - } - } - } -} - -############################## -# LIFESTYLE FRIEND TRIGGERS -############################## - -#Trigger to check if a friend is a lifestyle friend -lifestyle_friend_trigger = { - trigger_if = { - limit = { $CHARACTER$ = { is_ai = yes } } - OR = { - has_focus = $FOCUS$ - is_ruler = no - } - } - #If a player, check the friend points - trigger_else = { - $FOCUS$_friend_points > 0 - } -} - -#Is the character available as a potential lifestyle friend for CHARACTER -potential_lifestyle_friend_availability_trigger = { - lifestyle_friend_trigger = { CHARACTER = $CHARACTER$ FOCUS = $FOCUS$ } - basic_is_available_ai = yes - NOR = { - has_relation_friend = $CHARACTER$ - has_relation_rival = $CHARACTER$ - is_at_war_with = $CHARACTER$ - } - is_adult = yes - opinion = { - target = $CHARACTER$ - value >= low_negative_opinion - } - save_temporary_scope_value_as = { - name = trigger_focus - value = flag:$FOCUS$ - } - trigger_if = { - limit = { scope:trigger_focus = flag:intrigue_temptation_focus } - NOT = { - dislikes_partner_cheating_trigger = { PARTNER = $CHARACTER$ } - } - } -} - -has_focus_martial = { - OR = { - has_focus = martial_chivalry_focus - has_focus = martial_authority_focus - has_focus = martial_strategy_focus - has_focus = martial_adventurer_focus - } -} - -has_focus_learning = { - OR = { - has_focus = learning_theology_focus - has_focus = learning_scholarship_focus - has_focus = learning_medicine_focus - has_focus = learning_adventurer_focus - } -} - -has_focus_intrigue = { - OR = { - has_focus = intrigue_intimidation_focus - has_focus = intrigue_temptation_focus - has_focus = intrigue_skulduggery_focus - has_focus = intrigue_adventurer_focus - } -} - -has_focus_diplomacy = { - OR = { - has_focus = diplomacy_family_focus - has_focus = diplomacy_majesty_focus - has_focus = diplomacy_foreign_affairs_focus - has_focus = diplomacy_adventurer_focus - } -} - -has_focus_stewardship = { - OR = { - has_focus = stewardship_domain_focus - has_focus = stewardship_wealth_focus - has_focus = stewardship_duty_focus - has_focus = stewardship_adventurer_focus - } -} - -has_focus_wanderer = { - OR = { - has_focus = wanderer_internal_affairs_focus - has_focus = wanderer_journey_focus - has_focus = wanderer_destination_focus - } -} - - -####################### -# misc -####################### - -has_focus_or_focus_trait_trigger = { - save_temporary_scope_value_as = { - name = trigger_focus - value = flag:$FOCUS$ - } - OR = { - has_focus = $FOCUS$ - trigger_if = { - limit = { scope:trigger_focus = flag:diplomacy_foreign_affairs_focus } - has_trait = diplomat - } - trigger_else_if = { - limit = { scope:trigger_focus = flag:diplomacy_majesty_focus } - has_trait = august - } - trigger_else_if = { - limit = { scope:trigger_focus = flag:diplomacy_family_focus } - has_trait = family_first - } - trigger_else_if = { - limit = { scope:trigger_focus = flag:martial_strategy_focus } - has_trait = strategist - } - trigger_else_if = { - limit = { scope:trigger_focus = flag:martial_authority_focus } - has_trait = overseer - } - trigger_else_if = { - limit = { scope:trigger_focus = flag:martial_chivalry_focus } - has_trait = gallant - } - trigger_else_if = { - limit = { scope:trigger_focus = flag:stewardship_wealth_focus } - has_trait = avaricious - } - trigger_else_if = { - limit = { scope:trigger_focus = flag:stewardship_domain_focus } - has_trait = architect - } - trigger_else_if = { - limit = { scope:trigger_focus = flag:stewardship_duty_focus } - has_trait = administrator - } - trigger_else_if = { - limit = { scope:trigger_focus = flag:intrigue_skulduggery_focus } - has_trait = schemer - } - trigger_else_if = { - limit = { scope:trigger_focus = flag:intrigue_temptation_focus } - has_trait = seducer - } - trigger_else_if = { - limit = { scope:trigger_focus = flag:intrigue_intimidation_focus } - has_trait = torturer - } - trigger_else_if = { - limit = { scope:trigger_focus = flag:learning_medicine_focus } - has_trait = whole_of_body - } - trigger_else_if = { - limit = { scope:trigger_focus = flag:learning_scholarship_focus } - has_trait = scholar - } - trigger_else_if = { - limit = { scope:trigger_focus = flag:learning_theology_focus } - has_trait = theologian - } - trigger_else = { - always = no - } - } -} diff --git a/N3OW/common/scripted_triggers/00_major_decision_triggers.txt b/N3OW/common/scripted_triggers/00_major_decision_triggers.txt deleted file mode 100644 index c46817e5..00000000 --- a/N3OW/common/scripted_triggers/00_major_decision_triggers.txt +++ /dev/null @@ -1,225 +0,0 @@ -###Accuse the Krstjani of Heresy -accuse_krstjani_of_heresy_decision_suitable_krstjani_realm_owner_trigger = { - faith = faith:bosnian_church - realm_size >= 8 - primary_title.tier >= tier_duchy -} - -###Launch the Hungarian Migration -launch_hungarian_migration_ducal_processing_trigger = { - #We're currently processing dukes. - highest_held_title_tier = tier_duchy - #Doesn't hold a valid duchy-tier title in Pannonia. - NOT = { - any_held_title = { - title_tier = duchy - title_capital_county.title_province = { geographical_region = custom_hungary } - } - } -} - -launch_hungarian_migration_count_processing_trigger = { - #Doesn't hold a valid county-tier title in Pannonia. - NOT = { - any_held_title = { - title_tier = county - title_province = { geographical_region = custom_hungary } - } - } -} - -launch_hungarian_migration_sub_vassal_liege_pairing_trigger = { - tier = tier_county - #Liege should be a suitable duke within Pannonia. - holder = scope:receiving_vassal.liege - #Double-check that the duke can afford to give a title away. - scope:receiving_vassal.liege = { - any_held_title = { - count >= 2 - title_tier = county - title_province = { geographical_region = custom_hungary } - } - } -} - -launch_hungarian_migration_direct_vassal_requirements_trigger = { - tier = tier_county - holder = $INVADER$ -} - -launch_hungarian_migration_county_is_within_custom_hungary_trigger = { - tier = tier_county - title_province = { geographical_region = custom_hungary } -} - -launch_hungarian_migration_misplaced_count_suitable_liege_trigger = { - launch_hungarian_migration_county_is_within_custom_hungary_trigger = yes - duchy = { - holder ?= { - NOT = { this = $INVADER$ } - liege = $INVADER$ - } - } -} - -################################################## -# Danelaw Triggers - -## Colonial Sides -### The decision requires one lowland British party & one colonial Norse party. -negotiate_the_danelaw_british_side_trigger = { - OR = { - culture = { has_cultural_pillar = heritage_west_germanic } - culture = { has_cultural_pillar = heritage_brythonic } - } - NOT = { religion = religion:germanic_religion } -} -negotiate_the_danelaw_norse_side_trigger = { - OR = { - culture = { has_cultural_pillar = heritage_north_germanic } - culture = culture:norman - religion = religion:germanic_religion - } -} - -## Standard Filters -### Does this character meet the basic eligibility requirements? -negotiate_the_danelaw_basic_filter_trigger = { - # Standard filter checks. - is_playable_character = yes - exists = dynasty - OR = { - government_has_flag = government_is_tribal - government_has_flag = government_is_feudal - government_has_flag = government_is_clan - } - # Must be one of the two valid sides. - OR = { - negotiate_the_danelaw_british_side_trigger = yes - negotiate_the_danelaw_norse_side_trigger = yes - } -} -negotiate_the_danelaw_additional_filter_trigger = { - # Independent only, please. - top_liege = this - # Kings & Emperors are too high a rank to make concessions. - highest_held_title_tier <= tier_duchy - # Plus, a capital inside title:k_england. Not strictly necessary, but removes *so* many edge-cases. - capital_county.kingdom = title:k_england -} -negotiate_the_danelaw_standard_filter_trigger = { - negotiate_the_danelaw_basic_filter_trigger = yes - negotiate_the_danelaw_additional_filter_trigger = yes -} - -## Valid Opponent -### Assuming that we have a character who can take the decision (which has stricter requirements), do they have an opponent to negotiate with? -negotiate_the_danelaw_valid_danelaw_opponent_trigger = { - # Standard filter checks. - negotiate_the_danelaw_standard_filter_trigger = yes - # Ensure they match the opposing side. - trigger_if = { - limit = { - root = { negotiate_the_danelaw_british_side_trigger = yes } - } - negotiate_the_danelaw_norse_side_trigger = yes - } - trigger_if = { - limit = { - root = { negotiate_the_danelaw_norse_side_trigger = yes } - } - negotiate_the_danelaw_british_side_trigger = yes - } - # Holds a certain amount of de jure counties within k_england. - save_temporary_scope_as = valid_opponent - title:k_england = { - any_in_de_jure_hierarchy = { - count >= 10 - tier = tier_county - holder = { - OR = { - this = scope:valid_opponent - any_liege_or_above = { this = scope:valid_opponent } - } - } - } - } -} - -################################################## -# Favour the Countryside Basques Triggers - -favour_the_countryside_basques_counts_as_basque_trigger = { - culture = { - OR = { - this = culture:basque - any_parent_culture = { this = culture:basque } - } - } -} - -## We keep these isolated so that we can maintain easy parity between the decision rationales & the event desc rationales. -favour_the_countryside_basques_rationale_negative_piety_level_trigger = { - piety_level < low_piety_level -} - -favour_the_countryside_basques_rationale_sinful_traits_trigger = { - num_sinful_traits >= 2 -} - -favour_the_countryside_basques_rationale_virtuous_basque_pagan_traits_trigger = { - num_virtuous_traits = { - value >= favour_the_countryside_basques_decision_basque_pagan_virtues_tally_value - target = faith:basque_pagan - } -} - -favour_the_countryside_basques_rationale_excommunicated_trigger = { - has_trait = excommunicated -} - -favour_the_countryside_basques_rationale_naked_cynicism_trigger = { - trigger_if = { - limit = { is_ai = no } - has_trait = cynical - } -} - -favour_the_countryside_basques_rationale_hof_rivalry_trigger = { - AND = { - exists = faith.religious_head - has_relation_rival = faith.religious_head - } -} - -################################################## -# Rebuke Roman Revanchism Triggers - -rebuke_roman_revanchism_counties_controlled_trigger = { - holder = { - OR = { - this = root - top_liege = root - } - } -} - -rebuke_roman_revanchism_counties_controlled_by_ere_trigger = { - exists = title:e_byzantium.holder - holder = { - OR = { - this = title:e_byzantium.holder - top_liege = title:e_byzantium.holder - } - } -} - -rebuke_roman_revanchism_sicily_controls_unlisted_empire_trigger = { - highest_held_title_tier >= tier_empire - primary_title = { - NOR = { - this = title:e_italy - this = title:e_maghreb - } - } -} diff --git a/N3OW/common/scripted_triggers/00_marriage_triggers.txt b/N3OW/common/scripted_triggers/00_marriage_triggers.txt deleted file mode 100644 index e715eeda..00000000 --- a/N3OW/common/scripted_triggers/00_marriage_triggers.txt +++ /dev/null @@ -1,635 +0,0 @@ -####MARRIAGE TRIGGER LIST### - -#GENERAL MARRIAGE TRIGGERS -#can_marry_common_trigger -#can_marry_trigger -#could_marry_character_trigger -#can_marry_character_trigger -#marriage_between_characters_unlocks_alliance_of_min_tier_trigger -#can_become_concubine - -#MARRIAGE INTERACTION TRIGGERS - -############################# -# GENERAL MARRIAGE TRIGGERS # -############################# - -# Is allowed to marry (current marriage/concubine status ignored) -can_marry_common_trigger = { - is_alive = yes - NOT = { has_trait_with_flag = can_not_marry } - - trigger_if = { - limit = { - exists = primary_title - } - NOR = { - # Block Mercenaries from marrying or showing up in marriage interactions - primary_title = { - is_mercenary_company = yes - } - is_leading_faction_type = peasant_faction - is_leading_faction_type = populist_faction - government_has_flag = government_is_herder - } - } - - # Clergy cannot marry if their faith disallows it - trigger_if = { - limit = { - is_clergy = yes - } - faith = { - has_doctrine_parameter = clergy_can_marry - } - } - trigger_if = { - limit = { - exists = liege.involved_activity.var:tournament_marriage_prize - this = liege.involved_activity.var:tournament_marriage_prize - } - exists = scope:contest_winner - } -} - -#Can marry right now -can_marry_trigger = { - can_marry_common_trigger = yes - allowed_more_spouses = yes - #To account for a person marrying their concubines please use can_marry_character_trigger -} - -allowed_to_marry_same_sex_trigger = { - has_game_rule = accepted_same_sex_marriage - faith = { - NOR = { - has_doctrine_parameter = homosexuality_shunned - has_doctrine_parameter = homosexuality_illegal - } - } -} - -can_have_children_with = { - sex_opposite_of = $CHARACTER$ # Only opposite sex since for now -} - -allowed_to_marry_character_gender_trigger = { - OR = { - AND = { - allowed_to_marry_same_sex_trigger = yes - sex_same_as = $CHARACTER$ - } - sex_opposite_of = $CHARACTER$ - } -} - -#two characters could potentially marry (does NOT check that they're unmarried) -could_marry_character_trigger = { - save_temporary_scope_as = can_marry_check - can_marry_common_trigger = yes - $CHARACTER$ = { can_marry_common_trigger = yes } - #Opposite genders if you don't have accepted same-sex marriage game rule enabled and your faith supports it - trigger_if = { - limit = { - $CHARACTER$ = { allowed_to_marry_same_sex_trigger = no } - } - sex_opposite_of = $CHARACTER$ - } - #Have you recently divorced this character? - NOT = { - has_opinion_modifier = { - modifier = divorced_me_opinion - target = $CHARACTER$ - } - } - #Faith hostility & consanguinity - trigger_if = { - limit = { NOT = { is_courtier_of = $CHARACTER$ } } #If you're someone's courtier, your liege can marry you anyway - faith = { - faith_allows_marriage_consanguinity_trigger = { - CHARACTER_1 = scope:can_marry_check - CHARACTER_2 = $CHARACTER$ - } - #faith_hostility_level = { - # target = $CHARACTER$.faith - # value < faith_hostility_prevents_marriage_level - #} - } - } - trigger_if = { - limit = { $CHARACTER$ = { NOT = { is_courtier_of = scope:can_marry_check } } } #If you're someone's courtier, your liege can marry you anyway - $CHARACTER$.faith = { - faith_allows_marriage_consanguinity_trigger = { - CHARACTER_1 = scope:can_marry_check - CHARACTER_2 = $CHARACTER$ - } - #faith_hostility_level = { - # target = scope:can_marry_check.faith - # value < faith_hostility_prevents_marriage_level - #} - } - } - trigger_if = { - limit = { - any_close_or_extended_family_member = { - any_spouse = { this = $CHARACTER$ } - } - } - faith = { has_doctrine = doctrine_consanguinity_unrestricted } - $CHARACTER$ = { - faith = { has_doctrine = doctrine_consanguinity_unrestricted } - NOT = { - any_spouse = { - is_close_or_extended_family_of = scope:can_marry_check - NOT = { - faith = { has_doctrine = doctrine_consanguinity_unrestricted } - } - } - } - } - } - # Cannot marry self - NOT = { - scope:can_marry_check = { is_spouse_of = $CHARACTER$ } - } -} - -# Same trigger as above with the exception of the recent divorce trigger -can_take_as_concubine_character_trigger = { - save_temporary_scope_as = can_marry_check - can_marry_common_trigger = yes - $CHARACTER$ = { can_marry_common_trigger = yes } - #Opposite genders if you don't have accepted same-sex marriage game rule enabled and your faith supports it - trigger_if = { - limit = { - $CHARACTER$ = { allowed_to_marry_same_sex_trigger = no } - } - sex_opposite_of = $CHARACTER$ - } - #Faith hostility & consanguinity - trigger_if = { - limit = { NOT = { is_courtier_of = $CHARACTER$ } } #If you're someone's courtier, your liege can marry you anyway - faith = { - faith_allows_marriage_consanguinity_trigger = { - CHARACTER_1 = scope:can_marry_check - CHARACTER_2 = $CHARACTER$ - } - #faith_hostility_level = { - # target = $CHARACTER$.faith - # value < faith_hostility_prevents_marriage_level - #} - } - } - trigger_if = { - limit = { $CHARACTER$ = { NOT = { is_courtier_of = scope:can_marry_check } } } #If you're someone's courtier, your liege can marry you anyway - $CHARACTER$.faith = { - faith_allows_marriage_consanguinity_trigger = { - CHARACTER_1 = scope:can_marry_check - CHARACTER_2 = $CHARACTER$ - } - #faith_hostility_level = { - # target = scope:can_marry_check.faith - # value < faith_hostility_prevents_marriage_level - #} - } - } - NOT = { - scope:can_marry_check = { is_spouse_of = $CHARACTER$ } - } -} - -#Two characters are able to marry right now -can_marry_character_trigger = { - save_temporary_scope_as = can_marry_char_check - OR = { - AND = { - is_betrothed = yes - betrothed = $CHARACTER$ - } - AND = { - can_marry_trigger = yes - $CHARACTER$ = { can_marry_trigger = yes } - } - } - trigger_if = { - limit = { - $CHARACTER$ = { is_concubine = yes } - } - $CHARACTER$ = { is_concubine_of = scope:can_marry_char_check } - } - trigger_if = { - limit = { - is_concubine = yes - } - is_concubine_of = $CHARACTER$ - $CHARACTER$ = { could_marry_character_trigger = { CHARACTER = scope:can_marry_char_check } } #Gender, recent divorce, allowed to marry, no illegal incest etc.} If they're your concubine you're rules are the ones looked at - } - trigger_else = { - could_marry_character_trigger = { CHARACTER = $CHARACTER$ } #Gender, recent divorce, allowed to marry, no illegal incest etc. - } -} - -#A marriage between MY_CHARACTER and THEIR_CHARACTER would give alliance/would unlock renegotiate alliance for current scope where current scope's ally would be at least TIER -marriage_between_characters_unlocks_alliance_of_min_tier_trigger = { - save_temporary_scope_as = alliance_unlocker - $MY_CHARACTER$ = { - OR = { - this = scope:alliance_unlocker - is_close_family_of = scope:alliance_unlocker - } - } - $THEIR_CHARACTER$ = { - OR = { - AND = { - is_ruler = yes - highest_held_title_tier >= $TIER$ - } - any_close_family_member = { - is_ruler = yes - highest_held_title_tier >= $TIER$ - } - } - } -} - -can_become_concubine_of_character_trigger = { - is_available_quick = { - adult = yes - ruler = no - advanced_ruler = no - hostage = no - } - trigger_if = { - limit = { - NOT = { is_imprisoned_by = $CHARACTER$ } - } - is_married = no - is_betrothed = no - is_concubine = no - number_of_concubines = 0 - } - trigger_if = { - limit = { - is_imprisoned_by = $CHARACTER$ - is_married = yes - } - NOT = { is_spouse_of = $CHARACTER$ } - } - NOR = { - is_concubine_of = $CHARACTER$ - has_character_flag = has_been_offered_as_concubine - } - could_marry_character_trigger = { CHARACTER = $CHARACTER$ } #Gender, recent divorce, allowed to marry, no illegal incest etc. -} - -# Same as above, switching out could_marry_character_trigger for can_take_as_concubine_character_trigger, in order to better inform the player that they cannot take their ex-spouse as a concubine -can_become_concubine_of_character_valid_trigger = { - is_available_quick = { - adult = yes - ruler = no - advanced_ruler = no - } - trigger_if = { - limit = { - NOT = { is_imprisoned_by = $CHARACTER$ } - } - is_married = no - is_betrothed = no - is_concubine = no - is_diarch = no - number_of_concubines = 0 - } - trigger_if = { - limit = { - is_imprisoned_by = $CHARACTER$ - is_married = yes - } - NOT = { is_spouse_of = $CHARACTER$ } - } - NOR = { - is_concubine_of = $CHARACTER$ - has_character_flag = has_been_offered_as_concubine - } - can_take_as_concubine_character_trigger = { CHARACTER = $CHARACTER$ } #Gender, allowed to marry, no illegal incest etc. - has_any_disease_trigger = no - has_easily_mocked_physical_attribute_trigger = no -} - -can_be_offered_as_concubine_to_character_trigger = { - is_available_quick = { - adult = yes - ruler = no - advanced_ruler = no - } - trigger_if = { - limit = { - NOT = { is_imprisoned_by = $GIVER$ } - } - is_married = no - is_betrothed = no - is_diarch = no - OR = { - is_concubine = no - is_concubine_of = $GIVER$ - } - number_of_concubines = 0 - } - trigger_if = { - limit = { - is_imprisoned_by = $GIVER$ - is_married = yes - } - NOR = { - is_spouse_of = $CHARACTER$ - is_spouse_of = $GIVER$ - } - } - NOR = { - is_concubine_of = $CHARACTER$ - has_character_flag = has_been_offered_as_concubine - } - NOT = { - is_theocratic_lessee = yes - } - could_marry_character_trigger = { CHARACTER = $CHARACTER$ } #Gender, recent divorce, allowed to marry, no illegal incest etc. -} - -ready_to_marry_betrothed_trigger = { - trigger_if = { - limit = { exists = betrothed } - is_adult = yes - betrothed = { is_adult = yes } - } - trigger_else = { - always = no - } -} - -################################# -# MARRIAGE INTERACTION TRIGGERS # -################################# - -marriage_interaction_can_be_picked_trigger = { - can_marry_trigger = yes - is_available_quick = { - hostage = no - imprisoned = no - } -} - -marriage_interaction_valid_target_trigger = { - # Clergy cannot marry if their faith doesn't allow it - trigger_if = { - limit = { - scope:secondary_actor = { - is_clergy = yes - NOT = { - faith = { - has_doctrine_parameter = clergy_can_marry - } - } - } - } - custom_description = { - text = character_is_clergy_and_cannot_marry - subject = scope:secondary_actor - object = scope:secondary_recipient - scope:secondary_actor = { - is_clergy = no - } - } - } - trigger_else_if = { - limit = { - scope:secondary_recipient = { - is_clergy = yes - NOT = { - faith = { - has_doctrine_parameter = clergy_can_marry - } - } - } - } - custom_description = { - text = character_is_clergy_and_cannot_marry - subject = scope:secondary_recipient - object = scope:secondary_actor - scope:secondary_recipient = { - is_clergy = no - } - } - } - #Marriage - trigger_else_if = { - limit = { - scope:secondary_actor = { is_adult = yes } - scope:secondary_recipient = { is_adult = yes } - } - scope:secondary_actor = { - custom_description = { - text = "can_marry_check_secondary_actor" - subject = scope:secondary_actor - object = scope:secondary_recipient - can_marry_character_trigger = { CHARACTER = scope:secondary_recipient } #Checks marriage status, betrothed, gender, consanguinity, faith hostility etc. - } - } - } - #Betrothal - trigger_else = { - scope:secondary_actor = { - custom_description = { - text = "can_betroth_check_secondary_actor" - subject = scope:secondary_actor - object = scope:secondary_recipient - can_marry_character_trigger = { CHARACTER = scope:secondary_recipient } #Checks marriage status, betrothed, gender, consanguinity, faith hostility etc. - } - } - } - - # If the actor is ai they will not pick a character already considered for concubinage - trigger_if = { - limit = { - scope:actor = { is_ai = yes } - } - NOR = { - scope:secondary_actor = { has_character_flag = has_been_offered_as_concubine } - scope:secondary_recipient = { has_character_flag = has_been_offered_as_concubine } - } - } -} - -marriage_interaction_auto_accept_trigger = { - trigger_if = { - limit = { - exists = scope:secondary_actor.betrothed - scope:secondary_actor = { - has_been_promised_grand_wedding = yes - } - } - always = no - } - trigger_else_if = { - limit = { - exists = scope:secondary_actor.betrothed - } - custom_description = { - text = is_betrothed_auto_accept - subject = scope:secondary_actor - object = scope:secondary_recipient - scope:secondary_actor.betrothed = scope:secondary_recipient - } - } - trigger_else_if = { - limit = { - scope:hook = yes - } - #Strong hook = 100% accept (unless marrying 1st or 2nd player heir or the ruler and asking for matrilineal/partrilineal resulting in no dynasty children for them) - custom_description = { - text = "spending_hook" - subject = scope:actor - object = scope:recipient - scope:actor = { has_strong_hook = scope:recipient } - scope:recipient = { - NAND = { - #Secondary recipient can't be recipient or 1st/2nd heir... - OR = { - this = scope:secondary_recipient - player_heir_position = { - target = scope:secondary_recipient - value <= 2 - } - } - #...if the marriage (matrilineal/patrilineal) does not match their gender - OR = { - scope:secondary_recipient = { - is_female = yes - NOT = { always = scope:matrilineal } - } - scope:secondary_recipient = { - is_male = yes - always = scope:matrilineal - } - } - } - } - } - } - trigger_else = { - always = no - } -} - -make_concubine_is_shown_trigger = { - scope:actor = { - allowed_concubines = yes - is_adult = yes - } - scope:recipient = { - OR = { - is_courtier_of = scope:actor - is_imprisoned_by = scope:actor - } - can_become_concubine_of_character_valid_trigger = { CHARACTER = scope:actor } - } -} - -make_concubine_is_valid_trigger = { - custom_description = { - text = take_concubine_allowed_more - object = scope:recipient - scope:actor = { - allowed_more_concubines = yes - } - } - scope:recipient = { - custom_tooltip = { - text = take_concubine_ex_spouse - NOT = { - has_opinion_modifier = { - modifier = divorced_me_opinion - target = scope:actor - } - } - } - OR = { - AND = { - is_imprisoned_by = scope:actor - is_married = yes - } - is_married = no - } - is_hostage = no - } -} - -marriage_interaction_non_loyal_diarchs_refuse_secondary_marriage_trigger = { - trigger_if = { - limit = { - scope:$TARGET$ ?= { - is_diarch = yes - # We're only concerned about landed rulers, those who might be married out of their own court. - is_ruler = no - } - } - custom_tooltip = { - text = arrange_marriage_interaction.tt.non_loyal_regents_refuse_to_be_married_off.$TARGET$ - scope:$TARGET$ = { diarch_loyalty >= diarch_loyalty_visibly_loyal_threshold } - } - } -} - -wants_very_young_wife = { - is_available_quick = { - female = no - adult = no - } -} - -wants_young_wife = { - is_available_quick = { - female = no - adult = yes - } - age < 30 - NOT = { - any_child = { - count >= 2 - is_alive = yes - NOT = { has_trait = bastard } - } - } -} - -will_not_be_very_young_wife = { - is_female = yes - is_very_young_character = no -} - -will_not_be_young_wife = { - is_female = yes - is_young_character = no -} - -will_not_be_fertile_wife = { - is_female = yes - is_aging_character = yes -} - -is_ruler_or_close_family = { - OR = { - is_ruler = yes - any_close_family_member = { - even_if_dead = yes - is_ruler = yes - } - } -} - -can_have_concubines_trigger = { - $CHAR$ ?= { - custom_tooltip = { - text = can_have_concubines_name_tt - allowed_more_concubines = yes - } - } -} diff --git a/N3OW/common/scripted_triggers/00_military_triggers.txt b/N3OW/common/scripted_triggers/00_military_triggers.txt deleted file mode 100644 index 9d8cef75..00000000 --- a/N3OW/common/scripted_triggers/00_military_triggers.txt +++ /dev/null @@ -1,30 +0,0 @@ -#Triggers handling questions of military and warfare - -#Checks whether scope character has greater military strength than the ratio specified -military_strength_greater_than_ratio_trigger = { - save_temporary_scope_value_as = { - name = ratio - - value = { - value = max_military_strength - divide = $TARGET$.max_military_strength - } - } - - scope:ratio > $RATIO$ -} - -valid_for_maa_trigger = { - OR = { - AND = { - has_government = landless_adventurer_government - has_perk = planned_cultivation_perk - location.county.culture ?= { has_cultural_parameter = $PARAMETER$ } - } - culture = { has_cultural_parameter = $PARAMETER$ } - } -} - -valid_for_nomadic_riders_trigger = { - government_has_flag = government_is_nomadic -} \ No newline at end of file diff --git a/N3OW/common/scripted_triggers/00_opinion_scripted_triggers.txt b/N3OW/common/scripted_triggers/00_opinion_scripted_triggers.txt deleted file mode 100644 index be97e65b..00000000 --- a/N3OW/common/scripted_triggers/00_opinion_scripted_triggers.txt +++ /dev/null @@ -1,342 +0,0 @@ -################################################## -# Positive Opinion Triggers -has_good_opinion_of_character_trigger = { - opinion = { - value >= 25 - target = $CHARACTER$ - } -} - -has_good_opinion_of_root_trigger = { - opinion = { - value >= 25 - target = root - } -} - -################################################## -# Negative Opinion Triggers - -has_bad_opinion_of_character_trigger = { - opinion = { - value <= -25 - target = $CHARACTER$ - } -} - -has_bad_opinion_of_root_trigger = { - opinion = { - value <= -25 - target = root - } -} - -has_moderate_bad_opinion_of_character_trigger = { - opinion = { - value <= -50 - target = $CHARACTER$ - } -} - -has_moderate_bad_opinion_of_root_trigger = { - opinion = { - value <= -50 - target = root - } -} - -has_really_bad_opinion_of_character_trigger = { - opinion = { - value <= -75 - target = $CHARACTER$ - } -} - -has_really_bad_opinion_of_root_trigger = { - opinion = { - value <= -75 - target = root - } -} - -# Do I have any prior quarrel with this character? -has_any_major_negative_opinion_against_character_trigger = { - OR = { - has_any_war_opinion_against_character_trigger = { CHARACTER = $CHARACTER$ } - has_any_major_revenge_opinion_against_character_trigger = { CHARACTER = $CHARACTER$ } - } -} - -# Has this character declared war on me close enough that I remember it? -has_any_war_opinion_against_character_trigger = { - OR = { - has_opinion_modifier = { - modifier = declared_war - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = declared_war_on_son_daughter - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = vassal_lost_faction_revolt_war - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = vassal_wp_faction_revolt_war - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = peasant_revolt_opinion - target = $CHARACTER$ - } - } -} - -# Did this character do something awful to me or my family? -has_any_major_revenge_opinion_against_character_trigger = { - OR = { - has_opinion_modifier = { - modifier = imprisoned_me - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = banished_me - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = demanded_taking_vows - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = killed_my_child - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = treachery_opinion - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = treasonous_revoke_refusal - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = treasonous_imprison_refusal - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = treasonous_disobeyed_diarch - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = abductor_opinion - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = attempted_murder_opinion - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = botched_my_treatment_crime_opinion - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = botched_treatment_of_kin_crime_opinion - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = failed_to_treat_me_crime_opinion - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = failed_to_treat_kin_crime_opinion - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = theft_opinion - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = embezzled_opinion - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = siphoned_treasury_crime - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = attempted_arrest_opinion - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = attempted_imprisonment_opinion - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = rebellious_vassal_opinion - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = plotting_against_liege_opinion - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = spying_on_liege_opinion - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = abducted_me_opinion - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = attempted_abduction_opinion - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = elopement_opinion - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = attempted_elopement_opinion - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = murdered_close_family_crime - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = attempted_murder_close_family_crime - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = attempted_murder_me_crime - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = murdered_close_relation_opinion - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = murdered_someone_close_to_me_crime - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = hurt_someone_close_to_me_crime - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = murdered_my_vassal_crime - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = executed_close_family - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = executed_close_family_crime - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = executed_dynasty_member - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = executed_close_relation_opinion - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = executed_family_sun_trial_modifier - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = executed_my_countryman_modifier - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = tortured_family_member - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = tortured_me - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = blinded_family_member - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = blinded_me - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = castrated_family_member - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = castrated_me - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = attempted_to_steal_artifact_from_me - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = stole_artifact_from_me - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = slept_with_spouse_discovered_opinion - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = slept_with_spouse_exposed_opinion - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = unfaithful_spouse_discovered_opinion - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = unfaithful_spouse_exposed_opinion - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = refused_to_renounce_lover_opinion - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = betrayed_our_promise - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = loved_one_dungeon_death - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = reason_child_died - target = $CHARACTER$ - } - } -} - -# Did this character do something irksome to me or my family? -has_any_petty_revenge_opinion_against_character_trigger = { - OR = { - has_opinion_modifier = { - modifier = insulted_opinion - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = smeared_opinion - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = mocked_me_in_time_of_need - target = $CHARACTER$ - } - has_opinion_modifier = { - modifier = abandoned_me_opinion - target = $CHARACTER$ - } - } -} diff --git a/N3OW/common/scripted_triggers/00_personality_trait_triggers.txt b/N3OW/common/scripted_triggers/00_personality_trait_triggers.txt deleted file mode 100644 index cf862749..00000000 --- a/N3OW/common/scripted_triggers/00_personality_trait_triggers.txt +++ /dev/null @@ -1,192 +0,0 @@ -########################################################################################################################## -# -# These triggers all check for character flags which can be applied by the effects in '00_personality_trait_effects.txt' -# Used to determine if those effects successfully ran, and if they are still valid. - -personality_has_any_trait_flag_trigger = { - OR = { - scope:has_opposing_trait = flag:arrogant - scope:has_opposing_trait = flag:humble - scope:has_opposing_trait = flag:lustful - scope:has_opposing_trait = flag:chaste - scope:has_opposing_trait = flag:gregarious - scope:has_opposing_trait = flag:shy - scope:has_opposing_trait = flag:generous - scope:has_opposing_trait = flag:greedy - scope:has_opposing_trait = flag:ambitious - scope:has_opposing_trait = flag:content - scope:has_opposing_trait = flag:impatient - scope:has_opposing_trait = flag:patient - scope:has_opposing_trait = flag:temperate - scope:has_opposing_trait = flag:gluttonous - scope:has_opposing_trait = flag:diligent - scope:has_opposing_trait = flag:lazy - scope:has_opposing_trait = flag:wrathful - scope:has_opposing_trait = flag:calm - scope:has_opposing_trait = flag:deceitful - scope:has_opposing_trait = flag:honest - scope:has_opposing_trait = flag:craven - scope:has_opposing_trait = flag:brave - scope:has_opposing_trait = flag:arbitrary - scope:has_opposing_trait = flag:just - scope:has_opposing_trait = flag:cynical - scope:has_opposing_trait = flag:zealous - scope:has_opposing_trait = flag:paranoid - scope:has_opposing_trait = flag:trusting - scope:has_opposing_trait = flag:compassionate - scope:has_opposing_trait = flag:callous - scope:has_opposing_trait = flag:sadistic - scope:has_opposing_trait = flag:forgiving - scope:has_opposing_trait = flag:vengeful - scope:has_opposing_trait = flag:stubborn - scope:has_opposing_trait = flag:fickle - } -} - - - -#Checks if we can safely run the -personality_can_trait_shift = { - OR = { - AND = { - scope:has_opposing_trait = flag:arrogant - has_trait = arrogant - } - AND = { - scope:has_opposing_trait = flag:humble - has_trait = humble - } - AND = { - scope:has_opposing_trait = flag:lustful - has_trait = lustful - } - AND = { - scope:has_opposing_trait = flag:chaste - has_trait = chaste - } - AND = { - scope:has_opposing_trait = flag:gregarious - has_trait = gregarious - } - AND = { - scope:has_opposing_trait = flag:shy - has_trait = shy - } - AND = { - scope:has_opposing_trait = flag:generous - has_trait = generous - } - AND = { - scope:has_opposing_trait = flag:greedy - has_trait = greedy - } - AND = { - scope:has_opposing_trait = flag:ambitious - has_trait = ambitious - } - AND = { - scope:has_opposing_trait = flag:content - has_trait = content - } - AND = { - scope:has_opposing_trait = flag:impatient - has_trait = impatient - } - AND = { - scope:has_opposing_trait = flag:patient - has_trait = patient - } - AND = { - scope:has_opposing_trait = flag:temperate - has_trait = temperate - } - AND = { - scope:has_opposing_trait = flag:gluttonous - has_trait = gluttonous - } - AND = { - scope:has_opposing_trait = flag:diligent - has_trait = diligent - } - AND = { - scope:has_opposing_trait = flag:lazy - has_trait = lazy - } - AND = { - scope:has_opposing_trait = flag:wrathful - has_trait = wrathful - } - AND = { - scope:has_opposing_trait = flag:calm - has_trait = calm - } - AND = { - scope:has_opposing_trait = flag:deceitful - has_trait = deceitful - } - AND = { - scope:has_opposing_trait = flag:honest - has_trait = honest - } - AND = { - scope:has_opposing_trait = flag:craven - has_trait = craven - } - AND = { - scope:has_opposing_trait = flag:brave - has_trait = brave - } - AND = { - scope:has_opposing_trait = flag:arbitrary - has_trait = arbitrary - } - AND = { - scope:has_opposing_trait = flag:just - has_trait = just - } - AND = { - scope:has_opposing_trait = flag:cynical - has_trait = cynical - } - AND = { - scope:has_opposing_trait = flag:zealous - has_trait = zealous - } - AND = { - scope:has_opposing_trait = flag:paranoid - has_trait = paranoid - } - AND = { - scope:has_opposing_trait = flag:trusting - has_trait = trusting - } - AND = { - scope:has_opposing_trait = flag:compassionate - has_trait = compassionate - } - AND = { - scope:has_opposing_trait = flag:callous - has_trait = callous - } - AND = { - scope:has_opposing_trait = flag:sadistic - has_trait = sadistic - } - AND = { - scope:has_opposing_trait = flag:forgiving - has_trait = forgiving - } - AND = { - scope:has_opposing_trait = flag:vengeful - has_trait = vengeful - } - AND = { - scope:has_opposing_trait = flag:stubborn - has_trait = stubborn - } - AND = { - scope:has_opposing_trait = flag:fickle - has_trait = fickle - } - } -} diff --git a/N3OW/common/scripted_triggers/00_personality_triggers.txt b/N3OW/common/scripted_triggers/00_personality_triggers.txt deleted file mode 100644 index 134b43d1..00000000 --- a/N3OW/common/scripted_triggers/00_personality_triggers.txt +++ /dev/null @@ -1,247 +0,0 @@ - -###PERSONALITY TRIGGER LIST - -# has_personality_malicious_trigger - someone who is deceitful/uncaring/selfish/doesn't mind hurting others -# has_personality_benevolent_trigger - a kind soul who is likely to be helpful -# has_personality_dominant_trigger - someone with high confidence who is in control (or wants to be) -# has_personality_submissive_trigger - someone with low confidence or who is fine with obeying others -# has_personality_extroverted_trigger - someone who likes to interact with others -# has_personality_introverted_trigger - someone who is shy/chaste/scared -# has_personality_emotional_trigger - someone whose actions are easily swayed by their emotions -# has_personality_levelheaded_trigger - someone who is always in control or is indifferent -# has_personality_annoying_trigger - someone who gossips, meddles, disturbs etc. -# probably_intelligent_trigger -# probably_unintelligent_trigger - - -############################# -#SUPPORTING TRAITS TRIGGERS -############################ - -has_trait_malicious_trigger = { - OR = { - has_trait = deceitful - has_trait = arbitrary - has_trait = callous - has_trait = sadistic - has_trait = vengeful - has_trait = rowdy - } -} - -has_trait_benevolent_trigger = { - OR = { - has_trait = generous - has_trait = just - has_trait = compassionate - has_trait = forgiving - } -} - -has_trait_dominant_trigger = { - OR = { - has_trait = arrogant - has_trait = brave - has_trait = ambitious - has_trait = stubborn - has_trait = bossy - has_trait = rowdy - } -} - -has_trait_submissive_trigger = { - OR = { - has_trait = craven - has_trait = humble - has_trait = content - has_trait = fickle - } -} - -has_trait_extroverted_trigger = { - OR = { - has_diplomacy_lifestyle_trait_trigger = yes - has_trait = seducer - has_trait = lustful - has_trait = gregarious - has_trait = curious - has_trait = charming - has_trait = lifestyle_reveler - } -} - -has_trait_introverted_trigger = { - OR = { - has_trait = celibate - has_trait = chaste - has_trait = craven - has_trait = shy - has_trait = pensive - has_trait = reclusive - } -} - -has_trait_emotional_trigger = { - OR = { - has_trait = wrathful - has_trait = impatient - has_trait = paranoid - has_trait = compassionate - has_trait = vengeful - has_trait = drunkard - has_trait = depressed - has_trait = lunatic - has_trait = possessed - } -} - -has_trait_levelheaded_trigger = { - OR = { - has_trait = temperate - has_trait = calm - has_trait = patient - has_trait = callous - has_trait = pensive - } -} - -has_trait_schemy_trigger = { - OR = { - has_trait = deceitful - has_trait = callous - has_trait = ambitious - has_trait = vengeful - has_trait = disloyal - } -} - - -######################### -#PERSONALITY TRIGGERS -########################## - -has_personality_malicious_trigger = { - has_trait_malicious_trigger = yes - has_trait_benevolent_trigger = no -} - - -has_personality_benevolent_trigger = { - has_trait_benevolent_trigger = yes - has_trait_malicious_trigger = no -} - -has_personality_dominant_trigger = { - has_trait_dominant_trigger = yes - has_trait_submissive_trigger = no -} - -has_personality_submissive_trigger = { - has_trait_submissive_trigger = yes - has_trait_dominant_trigger = no -} - -has_personality_extroverted_trigger = { - has_trait_extroverted_trigger = yes - has_trait_introverted_trigger = no -} - -has_personality_introverted_trigger = { - has_trait_introverted_trigger = yes - has_trait_extroverted_trigger = no -} - -has_personality_emotional_trigger = { - has_trait_emotional_trigger = yes - has_trait_levelheaded_trigger = no -} - -has_personality_levelheaded_trigger = { - has_trait_levelheaded_trigger = yes - has_trait_emotional_trigger = no -} - -has_personality_annoying_trigger = { - OR = { - has_trait = gluttonous - has_trait = lazy - has_trait = arrogant - has_trait = drunkard - has_trait = stubborn - has_trait = paranoid - has_trait = lunatic - has_trait = possessed - has_trait = curious - has_trait = rowdy - } -} - -#Intelligence estimations -probably_intelligent_trigger = { - OR = { - has_trait_rank = { - trait = intellect_good - rank > 0 - } - has_trait = shrewd - } -} - -probably_unintelligent_trigger = { - OR = { - has_trait_rank = { - trait = intellect_bad - rank > 0 - } - has_trait = dull - has_trait = inbred - } -} - -# Other personality checks -untrustworthy_trigger = { - OR = { - has_trait = deceitful - has_trait = arbitrary - has_trait = disloyal - } -} - -loves_food_trigger = { - NOR = { - has_trait = inappetetic - has_trait = temperate - } - OR = { - has_trait = comfort_eater - has_trait = gluttonous - has_court_position = food_taster_court_position - } -} - -probably_superstitious = { - OR = { - learning <= mediocre_skill_rating - has_trait = intellect_bad - has_trait = dull - has_trait = eccentric - has_trait = paranoid - has_trait = lifestyle_herbalist - is_witch_trigger = yes - has_character_modifier = bp1_superstition_modifier - } -} - -probably_anti_superstitious = { - probably_superstitious = no - OR = { - learning >= high_skill_rating - has_trait = intellect_good - has_trait = shrewd - has_trait = cynical - has_trait = zealous - has_trait = theologian - } -} - - diff --git a/N3OW/common/scripted_triggers/00_pet_triggers.txt b/N3OW/common/scripted_triggers/00_pet_triggers.txt deleted file mode 100644 index e035e100..00000000 --- a/N3OW/common/scripted_triggers/00_pet_triggers.txt +++ /dev/null @@ -1,116 +0,0 @@ - -#Triggers revolving around pets - -has_cat_or_dog_trigger = { - OR = { - has_cat_trigger = yes - has_dog_trigger = yes - } -} - -has_named_cat_or_dog_trigger = { - OR = { - has_named_cat_trigger = yes - has_named_dog_trigger = yes - } -} - -has_cat_trigger = { - any_owned_story = { - type = story_cycle_pet_cat - } -} - -has_named_cat_trigger = { - any_owned_story = { - type = story_cycle_pet_cat - } - exists = var:story_cycle_cat_name -} - -has_dog_trigger = { - any_owned_story = { - type = story_cycle_pet_dog - } -} - -has_eagle_trigger = { - any_owned_story = { - story_type = story_cycle_pet_eagle - } -} - -has_available_eagle_trigger = { - any_owned_story = { - story_type = story_cycle_pet_eagle - } - NOR = { - has_character_flag = eagle_is_missing - has_character_flag = eagle_is_dying - } -} - -eagle_is_old_trigger = { - has_eagle_trigger = yes - exists = var:eagle_age_variable - var:eagle_age_variable >= 15 -} - -has_named_eagle_trigger = { - any_owned_story = { - story_type = story_cycle_pet_eagle - } - exists = var:story_cycle_eagle_name -} - -has_named_dog_trigger = { - any_owned_story = { - type = story_cycle_pet_dog - } - exists = var:story_cycle_dog_name -} - -has_alive_pet_trigger = { - OR = { - has_named_cat_trigger = yes - has_named_dog_trigger = yes - has_named_eagle_trigger = yes - has_character_modifier = exotic_pet_wolf - has_character_modifier = exotic_pet_bear - has_character_modifier = exotic_pet_lion - has_character_modifier = exotic_pet_tiger - } -} - -has_exotic_pet_trigger = { - OR = { - has_character_modifier = exotic_pet_wolf - has_character_modifier = exotic_pet_bear - has_character_modifier = exotic_pet_lion - has_character_modifier = exotic_pet_tiger - } -} - -has_eagle_personality_trait_trigger = { - OR = { - has_character_modifier = brave_eagle_story_modifier - has_character_modifier = curious_eagle_story_modifier - has_character_modifier = loyal_eagle_story_modifier - has_character_modifier = calm_eagle_story_modifier - has_character_modifier = wise_eagle_story_modifier - has_character_modifier = cunning_eagle_story_modifier - } -} - -has_secondary_eagle_personality_trait_trigger = { - has_variable = eagle_personality_trait_2 -} - -can_laamp_sell_eagle_trigger = { - location = { has_holding_type = nomad_holding } - has_available_eagle_trigger = yes - NOT = { scope:laamp_artifact_peddler = { has_eagle_trigger = yes } } - NOT = { has_character_flag = cant_sell_eagle } # Cooldown or somewhat healthy eagle - NOT = { exists = scope:1020_second_artifact_to_sell } # Should only have one artifact to sell - short_term_gold <= minor_gold_laamps_value # Out of desperation -} \ No newline at end of file diff --git a/N3OW/common/scripted_triggers/00_physical_appearance_triggers.txt b/N3OW/common/scripted_triggers/00_physical_appearance_triggers.txt deleted file mode 100644 index 063904d9..00000000 --- a/N3OW/common/scripted_triggers/00_physical_appearance_triggers.txt +++ /dev/null @@ -1,41 +0,0 @@ - -##TRIGGER LIST -# has_conventionally_attractive_trigger -# has_conventionally_ugly_trigger -# has_permanent_physical_injury - checks if you have some permanent injury -# - -has_conventionally_attractive_trigger = { - OR = { - has_trait = beauty_good - AND = { - has_trait = strong - NOT = { has_trait = beauty_bad } - } - } -} - -has_conventionally_ugly_trigger = { - OR = { - has_trait = beauty_bad - has_trait = hunchbacked - has_trait = one_legged - has_trait = scarred - has_trait = one_eyed - has_trait = scaly - has_trait = great_pox - has_trait = dwarf - has_trait = albino - } -} - -has_permanent_physical_injury = { - OR = { - has_trait = one_legged - has_trait = one_eyed - has_trait = scarred - has_trait = maimed - is_eunuch_trigger = yes - has_trait = blind - } -} diff --git a/N3OW/common/scripted_triggers/00_pilgrimage_triggers.txt b/N3OW/common/scripted_triggers/00_pilgrimage_triggers.txt deleted file mode 100644 index 95699929..00000000 --- a/N3OW/common/scripted_triggers/00_pilgrimage_triggers.txt +++ /dev/null @@ -1,113 +0,0 @@ - -is_on_a_pilgrimage_trigger = { - involved_activity ?= { has_activity_type = activity_pilgrimage } - #No more pilgrimage events if you're on your way home :colbert: - exists = capital_province - NOT = { - current_travel_plan = { - next_destination_province = root.capital_province - } - } -} - -is_on_a_hajj_trigger = { - involved_activity ?= { - has_activity_option = { - category = special_type - option = pilgrimage_type_hajj - } - } - involved_activity.activity_location.barony = title:b_makka - #No more Hajj events if you're on your way home :colbert: - exists = capital_province - NOT = { - current_travel_plan = { - next_destination_province = root.capital_province - } - } -} - -short_pilgrimage_trigger = { - root.involved_activity ?= { - exists = var:pilgrimage_distance - var:pilgrimage_distance = flag:short_pilgrimage_var - } -} - -medium_pilgrimage_trigger = { - root.involved_activity ?= { - exists = var:pilgrimage_distance - var:pilgrimage_distance = flag:medium_pilgrimage_var - } -} - -long_pilgrimage_trigger = { - root.involved_activity ?= { - exists = var:pilgrimage_distance - var:pilgrimage_distance = flag:long_pilgrimage_var - } -} - -very_long_pilgrimage_trigger = { - root.involved_activity ?= { - exists = var:pilgrimage_distance - var:pilgrimage_distance = flag:very_long_pilgrimage_var - } -} - -has_pious_pilgrimage_type_trigger = { - involved_activity ?= { - has_activity_type = activity_pilgrimage - has_activity_option = { - category = special_type - option = pilgrimage_type_pious - } - } -} - -has_worldly_pilgrimage_type_trigger = { - involved_activity ?= { - has_activity_type = activity_pilgrimage - has_activity_option = { - category = special_type - option = pilgrimage_type_worldly - } - } -} - -has_hajj_pilgrimage_type_trigger = { - involved_activity ?= { - has_activity_type = activity_pilgrimage - has_activity_option = { - category = special_type - option = pilgrimage_type_hajj - } - } -} - -#Assumes activity-scope -activity_has_pious_pilgrimage_type_trigger = { - has_activity_type = activity_pilgrimage - has_activity_option = { - category = special_type - option = pilgrimage_type_pious - } -} - -#Assumes activity-scope -activity_has_worldly_pilgrimage_type_trigger = { - has_activity_type = activity_pilgrimage - has_activity_option = { - category = special_type - option = pilgrimage_type_worldly - } -} - -#Assumes activity-scope -activity_has_hajj_pilgrimage_type_trigger = { - has_activity_type = activity_pilgrimage - has_activity_option = { - category = special_type - option = pilgrimage_type_hajj - } -} diff --git a/N3OW/common/scripted_triggers/00_playdate_activity_triggers.txt b/N3OW/common/scripted_triggers/00_playdate_activity_triggers.txt deleted file mode 100644 index 60917b2e..00000000 --- a/N3OW/common/scripted_triggers/00_playdate_activity_triggers.txt +++ /dev/null @@ -1,18 +0,0 @@ - - -playdate_default_participant_trigger = { - is_available_quick = { - ai = yes - alive = yes - imprisoned = no - incapable = no - } - this != root -} - - -playdate_potential_guest_check_trigger = { - this != scope:activity.activity_host - is_available_for_child_activity_trigger = yes - NOT = { is_in_list = potential_guests } -} diff --git a/N3OW/common/scripted_triggers/00_province_triggers.txt b/N3OW/common/scripted_triggers/00_province_triggers.txt deleted file mode 100644 index fce5aee1..00000000 --- a/N3OW/common/scripted_triggers/00_province_triggers.txt +++ /dev/null @@ -1,3 +0,0 @@ -has_province_owner = { - exists = province_owner -} diff --git a/N3OW/common/scripted_triggers/00_relation_triggers.txt b/N3OW/common/scripted_triggers/00_relation_triggers.txt deleted file mode 100644 index 0254714c..00000000 --- a/N3OW/common/scripted_triggers/00_relation_triggers.txt +++ /dev/null @@ -1,1229 +0,0 @@ - -###TRIGGER LIST - -################################# -# RELATIONSHIP SETTING TRIGGERS # -################################# - -### FRIEND ### -can_set_relation_potential_friend_trigger = { - NOT = { has_relation_potential_friend = $CHARACTER$ } - can_set_relation_friend_trigger = { CHARACTER = $CHARACTER$ } -} - -can_set_relation_friend_trigger = { - NOR = { - this = $CHARACTER$ - has_relation_friend = $CHARACTER$ - has_relation_best_friend = $CHARACTER$ - has_relation_rival = $CHARACTER$ - has_relation_nemesis = $CHARACTER$ - } -} - -can_set_relation_best_friend_trigger = { - NOR = { - this = $CHARACTER$ - has_relation_best_friend = $CHARACTER$ - has_relation_rival = $CHARACTER$ - has_relation_nemesis = $CHARACTER$ - } - num_of_relation_best_friend = 0 - $CHARACTER$ = { num_of_relation_best_friend = 0 } -} - -### LOVER ### -can_set_relation_potential_lover_trigger = { - NOT = { has_relation_potential_lover = $CHARACTER$ } - can_set_relation_lover_trigger = { CHARACTER = $CHARACTER$ } -} - -can_set_relation_lover_trigger = { - is_adult = yes - NOR = { - this = $CHARACTER$ - has_relation_lover = $CHARACTER$ - } - is_attracted_to_gender_of = $CHARACTER$ - $CHARACTER$ = { - is_adult = yes - is_attracted_to_gender_of = prev - } -} - -can_set_relation_soulmate_trigger = { - is_adult = yes - #Some asexuality handling - trigger_if = { - limit = { has_sexuality = asexual } - trigger_if = { - limit = { is_ai = yes } - always = no - } - trigger_else = { - $CHARACTER$ = { is_consort_of = prev } - } - } - trigger_else = { is_attracted_to_gender_of = $CHARACTER$ } - - NOR = { - this = $CHARACTER$ - has_relation_rival = $CHARACTER$ - has_relation_nemesis = $CHARACTER$ - } - $CHARACTER$ = { - is_adult = yes - is_attracted_to_gender_of = prev - num_of_relation_soulmate = 0 - } - num_of_relation_soulmate = 0 -} - -### RIVAL ### -can_set_relation_potential_rival_trigger = { - can_set_relation_rival_if_adult_trigger = { CHARACTER = $CHARACTER$ } - NOT = { has_relation_potential_rival = $CHARACTER$ } -} - -can_set_relation_rival_if_adult_trigger = { - NOR = { - this = $CHARACTER$ - has_relation_friend = $CHARACTER$ - has_relation_best_friend = $CHARACTER$ - has_relation_rival = $CHARACTER$ - has_relation_nemesis = $CHARACTER$ - } -} - -can_set_relation_rival_trigger = { - is_adult = yes - $CHARACTER$ = { is_adult = yes } - can_set_relation_rival_if_adult_trigger = { CHARACTER = $CHARACTER$ } -} - -can_set_relation_nemesis_trigger = { - is_adult = yes - NOR = { - this = $CHARACTER$ - has_relation_friend = $CHARACTER$ - has_relation_best_friend = $CHARACTER$ - } - num_of_relation_nemesis = 0 - $CHARACTER$ = { - is_adult = yes - num_of_relation_nemesis = 0 - } -} - -can_set_relation_bully_trigger = { - is_adult = no - $CHARACTER$ = { is_adult = no } - NOR = { - this = $CHARACTER$ - has_relation_friend = $CHARACTER$ - has_relation_best_friend = $CHARACTER$ - has_relation_bully = $CHARACTER$ - has_relation_victim = $CHARACTER$ - } -} - -can_set_relation_victim_trigger = { - is_adult = no - $CHARACTER$ = { is_adult = no } - NOR = { - this = $CHARACTER$ - has_relation_friend = $CHARACTER$ - has_relation_best_friend = $CHARACTER$ - has_relation_bully = $CHARACTER$ - has_relation_victim = $CHARACTER$ - } -} - -can_set_relation_rival_even_if_teen_trigger = { - OR = { - is_adult = yes - child_is_teen_trigger = yes - } - $CHARACTER$ = { - OR = { - is_adult = yes - child_is_teen_trigger = yes - } - } - can_set_relation_rival_if_adult_trigger = { CHARACTER = $CHARACTER$ } -} - -can_set_relation_nemesis_even_if_teen_trigger = { - OR = { - is_adult = yes - child_is_teen_trigger = yes - } - $CHARACTER$ = { - OR = { - is_adult = yes - child_is_teen_trigger = yes - } - } - NOR = { - this = $CHARACTER$ - has_relation_friend = $CHARACTER$ - has_relation_best_friend = $CHARACTER$ - } - num_of_relation_nemesis = 0 - $CHARACTER$ = { num_of_relation_nemesis = 0 } -} - -### GRUDGE -can_set_relation_grudge_trigger = { - can_set_relation_grudge_if_adult_trigger = { CHARACTER = $CHARACTER$ } - NOT = { has_relation_grudge = $CHARACTER$ } -} - -can_set_relation_grudge_if_adult_trigger = { - NOT = { this = $CHARACTER$ } - NOR = { - has_relation_friend = $CHARACTER$ - has_relation_best_friend = $CHARACTER$ - has_relation_rival = $CHARACTER$ - has_relation_nemesis = $CHARACTER$ - } -} - -### BLOOD BROTHER -can_set_relation_blood_brother_trigger = { - NOT = { this = $CHARACTER$ } - NOR = { - has_relation_blood_brother = $CHARACTER$ - has_relation_rival = $CHARACTER$ - has_relation_nemesis = $CHARACTER$ - } - num_of_relation_blood_brother = 0 - $CHARACTER$ = { num_of_relation_blood_brother = 0 } -} - -has_blood_brother = { - num_of_relation_blood_brother >= 1 -} - -#################### -# RELATION UPGRADE # -#################### - -# These are not hard blockers for upgrading relations, but are used in relation_upgrade events - -### FRIEND -upgrade_ready_potential_friend_to_friend_trigger = { - can_set_relation_friend_trigger = { CHARACTER = $CHARACTER$ } -} - - -### BEST FRIEND -upgrade_ready_friend_to_best_friend_trigger = { - can_set_relation_best_friend_trigger = { CHARACTER = $CHARACTER$ } -} - - -### LOVER -upgrade_ready_potential_lover_to_lover_support_trigger = { - OR = { - is_ai = no #Players chose if they are ready - trigger_if = { - limit = { has_trait = chaste } - opinion = { - target = $CHARACTER$ - value >= high_positive_opinion - } - } - trigger_else_if = { - limit = { - OR = { - has_trait = lustful - has_trait = seducer - $CHARACTER$.attraction >= medium_positive_attraction - } - } - opinion = { - target = $CHARACTER$ - value >= 0 - } - } - trigger_else = { - opinion = { - target = $CHARACTER$ - value >= low_positive_opinion - } - } - } -} - -upgrade_ready_potential_lover_to_lover_trigger = { - can_set_relation_lover_trigger = { CHARACTER = $CHARACTER$ } - upgrade_ready_potential_lover_to_lover_support_trigger = { CHARACTER = $CHARACTER$ } - save_temporary_scope_as = potential_lover_root - $CHARACTER$ = { upgrade_ready_potential_lover_to_lover_support_trigger = { CHARACTER = scope:potential_lover_root } } -} - -### SOULMATE -upgrade_ready_lover_to_soulmate_trigger = { - can_set_relation_soulmate_trigger = { CHARACTER = $CHARACTER$ } -} - - -### RIVAL -upgrade_ready_potential_rival_to_rival_trigger = { - can_set_relation_rival_trigger = { CHARACTER = $CHARACTER$ } -} - -### NEMESIS -upgrade_ready_rival_to_nemesis_trigger = { - can_set_relation_nemesis_trigger = { CHARACTER = $CHARACTER$ } -} - - - - - -######################## -# AI RELATIONSHIP CAPS # -######################## - -# Soft caps, mostly for schemes - -is_below_ai_friend_soft_cap_trigger = { - trigger_if = { - limit = { is_ai = yes } - - trigger_if = { - limit = { - OR = { - highest_held_title_tier >= tier_kingdom - has_trait = gregarious - } - } - num_of_relation_friend < 3 - } - trigger_else = { - num_of_relation_friend < 1 - } - } - trigger_else = { - always = yes - } -} - -is_below_ai_lover_soft_cap_trigger = { - trigger_if = { - limit = { is_ai = yes } - - trigger_if = { - limit = { - has_trait = lustful - has_trait = seducer - has_focus = intrigue_temptation_focus - } - num_of_relation_lover < 3 - } - trigger_else = { - num_of_relation_lover < 1 - } - } - trigger_else = { - always = yes - } -} - - -############################### -# Character priority triggers # -############################### - -has_important_relationship_with_character_trigger = { - OR = { - has_relation_lover = $CHARACTER$ - has_relation_rival = $CHARACTER$ - has_relation_friend = $CHARACTER$ - } -} - -has_friendly_relationship_with_character_trigger = { - OR = { - has_relation_lover = $CHARACTER$ - has_relation_friend = $CHARACTER$ - } -} - -has_any_mild_good_relationship_with_character_trigger = { - OR = { - has_relation_potential_lover = $CHARACTER$ - has_relation_crush = $CHARACTER$ - has_relation_potential_friend = $CHARACTER$ - has_relation_guardian = $CHARACTER$ - has_relation_ward = $CHARACTER$ - has_relation_elder = $CHARACTER$ - has_relation_disciple = $CHARACTER$ - } -} - -has_any_moderate_good_relationship_with_character_trigger = { - OR = { - has_relation_lover = $CHARACTER$ - has_relation_friend = $CHARACTER$ - } -} - -has_any_only_moderate_good_relationship_with_character_trigger = { - has_any_moderate_good_relationship_with_character_trigger = { CHARACTER = $CHARACTER$ } - # Exclude the max-tier positive relationships if we're being this specific. - NOT = { - has_any_best_good_relationship_with_character_trigger = { CHARACTER = $CHARACTER$ } - } -} - -has_any_fertility_relationship_with_character_trigger = { - OR = { - has_relation_wedding_very_bad_fertility = $CHARACTER$ - has_relation_wedding_bad_fertility = $CHARACTER$ - has_relation_wedding_good_fertility = $CHARACTER$ - has_relation_wedding_very_good_fertility = $CHARACTER$ - } -} - -has_any_fertility_relationship_with_root_trigger = { - has_any_fertility_relationship_with_character_trigger = { CHARACTER = root } -} - -has_any_best_good_relationship_with_character_trigger = { - OR = { - has_relation_best_friend = $CHARACTER$ - has_relation_soulmate = $CHARACTER$ - } -} - -likes_character_trigger = { - OR = { - has_relation_lover = $CHARACTER$ - has_relation_friend = $CHARACTER$ - has_relation_crush = $CHARACTER$ - has_relation_potential_friend = $CHARACTER$ - has_relation_elder = $CHARACTER$ - has_relation_disciple = $CHARACTER$ - AND = { - has_trait = loyal - OR = { - liege ?= $CHARACTER$ - is_consort_of = $CHARACTER$ - is_close_or_extended_family_of = $CHARACTER$ - } - } - opinion = { - target = $CHARACTER$ - value >= 25 - } - } - NOR = { - has_relation_victim = $CHARACTER$ - has_relation_bully = $CHARACTER$ - has_relation_rival = $CHARACTER$ - is_at_war_with = $CHARACTER$ - is_imprisoned_by = $CHARACTER$ - } -} - -dislikes_character_trigger = { - OR = { - opinion = { - target = $CHARACTER$ - value <= 25 - } - has_relation_grudge = $CHARACTER$ - has_relation_victim = $CHARACTER$ - has_relation_bully = $CHARACTER$ - has_relation_rival = $CHARACTER$ - - AND = { - has_relation_potential_rival = $CHARACTER$ - opinion = { - target = $CHARACTER$ - value <= 0 - } - } - AND = { - has_trait = disloyal - OR = { - liege ?= $CHARACTER$ - is_consort_of = $CHARACTER$ - is_close_or_extended_family_of = $CHARACTER$ - } - } - } - NOR = { - has_relation_lover = $CHARACTER$ - has_relation_friend = $CHARACTER$ - has_relation_crush = $CHARACTER$ - } -} - -has_any_good_relationship_with_character_trigger = { - OR = { - has_any_mild_good_relationship_with_character_trigger = { CHARACTER = $CHARACTER$ } - has_any_moderate_good_relationship_with_character_trigger = { CHARACTER = $CHARACTER$ } - } -} - -has_any_mild_bad_relationship_with_character_trigger = { - OR = { - has_relation_potential_rival = $CHARACTER$ - has_relation_victim = $CHARACTER$ - has_relation_bully = $CHARACTER$ - } -} - -has_any_moderate_bad_relationship_with_character_trigger = { - has_relation_rival = $CHARACTER$ -} - -has_any_only_moderate_bad_relationship_with_character_trigger = { - has_relation_rival = $CHARACTER$ - NOT = { - has_any_worst_bad_relationship_with_character_trigger = { CHARACTER = $CHARACTER$ } - } -} - -has_any_worst_bad_relationship_with_character_trigger = { - has_relation_nemesis = $CHARACTER$ -} - -has_any_bad_relationship_with_character_trigger = { - OR = { - has_any_mild_bad_relationship_with_character_trigger = { CHARACTER = $CHARACTER$ } - has_any_moderate_bad_relationship_with_character_trigger = { CHARACTER = $CHARACTER$ } - } -} - -has_important_relationship_with_root_trigger = { - has_important_relationship_with_character_trigger = { CHARACTER = root } -} - -has_friendly_relationship_with_root_trigger = { - has_friendly_relationship_with_character_trigger = { CHARACTER = root } -} - -has_any_good_relationship_with_root_trigger = { - has_any_good_relationship_with_character_trigger = { CHARACTER = root } -} - -has_any_bad_relationship_with_root_trigger = { - has_any_bad_relationship_with_character_trigger = { CHARACTER = root } -} - -lover_is_secret_trigger = { - any_secret = { - type = secret_lover - secret_target = $CHARACTER$ - } -} - - - -############################################### -# Triggers that take an argument and NOT root -############################################## - -# List of all localizable relations (e.g, My vassal Alex, My courtier Lisa, My liege Frank, My cousin Teddy, etc.) -has_any_relation_trigger = { - NOT = { this = $CHARACTER$ } - OR = { - # They are our liege - AND = { - exists = $CHARACTER$.liege - this = $CHARACTER$.liege - } - # We are their liege - is_vassal_of = $CHARACTER$ - is_courtier_of = $CHARACTER$ - is_councillor_of = $CHARACTER$ - - # They are our heir/spouse/familyetc. - is_heir_of = $CHARACTER$ - is_consort_of = $CHARACTER$ - is_close_or_extended_family_of = $CHARACTER$ - - #They are the head of our faith - AND = { - exists = $CHARACTER$.faith.religious_head - this = $CHARACTER$.faith.religious_head - } - - # Other relations - has_relation_lover = $CHARACTER$ - has_relation_rival = $CHARACTER$ - has_relation_friend = $CHARACTER$ - has_relation_guardian = $CHARACTER$ - has_relation_ward = $CHARACTER$ - has_relation_elder = $CHARACTER$ - has_relation_disciple = $CHARACTER$ - - AND = { - has_employed_any_court_position = yes - any_court_position_holder = { - this = $CHARACTER$ - } - } - } -} - -is_of_major_interest_trigger = { - NOT = { this = $CHARACTER$ } - OR = { - is_heir_of = $CHARACTER$ - is_diarch_of_target = $CHARACTER$ - AND = { - exists = $CHARACTER$.liege - this = $CHARACTER$.liege - } - is_consort_of = $CHARACTER$ - is_councillor_of = $CHARACTER$ - - #They are the head of our faith - AND = { - exists = $CHARACTER$.faith.religious_head - this = $CHARACTER$.faith.religious_head - } - - trigger_if = { - limit = { - exists = liege - exists = $CHARACTER$.liege - } - is_powerful_vassal = yes - liege = $CHARACTER$.liege - } - trigger_if = { - limit = { - top_liege = this - } - any_neighboring_top_liege_realm_owner = { - this = $CHARACTER$ - } - } - #House Head - trigger_if = { - limit = { - exists = $CHARACTER$.house.house_head - } - this = $CHARACTER$.house.house_head - } - is_child_of = $CHARACTER$ - # Activity Intents - trigger_if = { - limit = { - exists = involved_activity - exists = intent_target - } - intent_target = $CHARACTER$ - } - } -} - -is_of_minor_interest_trigger = { - NOT = { this = $CHARACTER$ } - OR = { - betrothed ?= $CHARACTER$ - has_relation_lover = $CHARACTER$ - has_relation_rival = $CHARACTER$ - has_relation_friend = $CHARACTER$ - has_relation_guardian = $CHARACTER$ - has_relation_ward = $CHARACTER$ - has_relation_elder = $CHARACTER$ - has_relation_disciple = $CHARACTER$ - AND = { - $CHARACTER$ = { target_is_liege_or_above = prev } - NOT = { this = $CHARACTER$.liege } - } - is_close_or_extended_family_of = $CHARACTER$ - } -} - -is_of_major_or_minor_interest_trigger = { - OR = { - is_of_major_interest_trigger = { CHARACTER = $CHARACTER$ } - is_of_minor_interest_trigger = { CHARACTER = $CHARACTER$ } - } -} -has_important_relationship_trigger = { - OR = { - has_relation_lover = $CHARACTER$ - has_relation_rival = $CHARACTER$ - has_relation_friend = $CHARACTER$ - } -} - -has_friendly_relationship_trigger = { - OR = { - has_relation_lover = $CHARACTER$ - has_relation_friend = $CHARACTER$ - } -} - -has_no_real_status_trigger = { - OR = { - is_lowborn = yes - AND = { - dynasty ?= { - any_dynasty_member = { - count <= 2 - } - } - } - highest_held_title_tier <= tier_barony - } - NOR = { - any_close_or_extended_family_member = { - highest_held_title_tier > tier_barony - } - dynasty.dynasty_prestige_level >= 2 - } - is_clergy = no - is_theocratic_lessee = no - is_claimant = no -} - -has_no_particular_noble_roots_trigger = { - custom_tooltip = { - text = has_no_particular_noble_roots_trigger - OR = { - is_lowborn = yes - dynasty ?= { - any_dynasty_member = { - count <= 2 - } - } - highest_held_title_tier <= tier_barony - government_has_flag = government_is_herder - } - NOR = { - AND = { - highest_held_title_tier > tier_barony - NOT = { government_has_flag = government_is_herder } - } - any_close_or_extended_family_member = { - highest_held_title_tier > tier_barony - NOT = { government_has_flag = government_is_herder } - } - AND = { - exists = dynasty - dynasty.dynasty_prestige_level >= 2 - } - } - } -} - - - -################################### -# Root argument versions -################################### - -is_of_major_interest_to_root_trigger = { - is_of_major_interest_trigger = { - CHARACTER = root - } -} - -is_of_minor_interest_to_root_trigger = { - is_of_minor_interest_trigger = { - CHARACTER = root - } -} - - -############### -# Character Lists -############### - -#Support trigger -major_interest_player_heir_trigger = { - exists = player_heir - NOT = { player_heir = { is_in_list = $LISTNAME$ } } -} - -#Support trigger -major_interest_liege_trigger = { - exists = liege - NOR = { - this = this.liege - liege = { is_in_list = $LISTNAME$ } - } -} - -#Support trigger -major_interest_realm_priest_trigger = { - faith = { has_doctrine = doctrine_theocracy_temporal } - exists = cp:councillor_court_chaplain - NOT = { - cp:councillor_court_chaplain = { is_in_list = $LISTNAME$ } - } -} - -#Support trigger -major_interest_primary_spouse_trigger = { - exists = primary_spouse - NOT = { primary_spouse = { is_in_list = $LISTNAME$ } } -} - - -#Support trigger -major_interest_potential_heirs_trigger = { - player_heir_position = { - target = $CHARACTER$ - value <= 5 - } - NOT = { is_in_list = $LISTNAME$ } -} - -#Makes a list of every character of major interest - #Parameters: - # CHARACTER - the character who the list will be for - # LISTNAME - the name of the list -get_characters_of_major_interest_trigger = { - save_temporary_scope_as = major_root - # 1 - Player heir - trigger_if = { - limit = { - major_interest_player_heir_trigger = { LISTNAME = $LISTNAME$ } - } - player_heir = { add_to_temporary_list = $LISTNAME$ } - } - # 2 - Liege - trigger_if = { - limit = { - major_interest_liege_trigger = { LISTNAME = $LISTNAME$ } - } - liege = { add_to_temporary_list = $LISTNAME$ } - } - # 3 - Realm Priest - trigger_if = { - limit = { - major_interest_realm_priest_trigger = { LISTNAME = $LISTNAME$ } - } - cp:councillor_court_chaplain = { add_to_temporary_list = $LISTNAME$ } - } - # 4 - Primary Spouse - trigger_if = { - limit = { - major_interest_primary_spouse_trigger = { LISTNAME = $LISTNAME$ } - } - primary_spouse = { add_to_temporary_list = $LISTNAME$ } - } - # 5 - Spymaster & # 11 - Other councillors - any_normal_councillor = { - NOT = { is_in_list = $LISTNAME$ } - count = all - add_to_temporary_list = $LISTNAME$ - } - # 6 - Powerful vassals - any_powerful_vassal = { - NOT = { is_in_list = $LISTNAME$ } - count = all - add_to_temporary_list = $LISTNAME$ - } - # 7 - Religious head (Excluded because they're highly context-specific) - # 8 - Potential heirs (Player only) - trigger_if = { - limit = { is_ai = no } - trigger_if = { - limit = { exists = dynasty } - dynasty = { - any_dynasty_member = { - major_interest_potential_heirs_trigger = { LISTNAME = $LISTNAME$ CHARACTER = scope:major_root } - count = all - add_to_temporary_list = $LISTNAME$ - } - } - } - # 9 - Allies (Player only, Enemies are only relevant for content about wars) - any_ally = { - NOT = { is_in_list = $LISTNAME$ } - count = all - add_to_temporary_list = $LISTNAME$ - } - } - # 10 - Neighboring rulers (not included in this list, hard to gauge relevance) -} - -#Support trigger -minor_interest_concubines_secondary_spouses_trigger = { - trigger_if = { - limit = { exists = $CHARACTER$.primary_spouse } - NOT = { this = $CHARACTER$.primary_spouse } - } - NOT = { is_in_list = $LISTNAME$ } -} - -#Support trigger -minor_interest_high_tier_vassal_trigger = { - is_powerful_vassal = no #Already included in major -# highest_held_title_tier >= { -# value = liege.highest_held_title_tier -# subtract = 2 -# min = 2 #Must be at least a count -# } - NOT = { is_in_list = $LISTNAME$ } -} - -minor_interest_close_relatives_trigger = { - NOR = { - #Blocking the most common overlap with high prio - AND = { - is_cousin_of = $CHARACTER$ - NOT = { is_close_family_of = $CHARACTER$ } #Because... incest. Sigh. - } - major_interest_potential_heirs_trigger = { CHARACTER = $CHARACTER$ LISTNAME = $LISTNAME$ } - trigger_if = { - limit = { exists = $CHARACTER$.player_heir } - this = $CHARACTER$.player_heir - } - is_in_list = $LISTNAME$ - } -} - -#Support trigger -minor_interest_betrothed_trigger = { - betrothed ?= { NOT = { is_in_list = $LISTNAME$ } } -} - -#Support trigger -minor_interest_skilled_courtiers_trigger = { - OR = { - diplomacy > high_skill_rating - martial > high_skill_rating - stewardship > high_skill_rating - intrigue > high_skill_rating - learning > high_skill_rating - prowess > high_skill_rating - } - average_skill_rating >= average_of_all_skills_and_prowess - NOT = { is_in_list = $LISTNAME$ } -} - -#Support trigger -minor_interest_liege_or_above_trigger = { - NOR = { - this = $CHARACTER$.liege - is_in_list = $LISTNAME$ - } -} - -#Makes a list of every character of minor interest - #Parameters: - # LISTNAME - the name of the list -get_characters_of_minor_interest_trigger = { - save_temporary_scope_as = minor_root - # 1 - Concubines & secondary spouses - any_consort = { - minor_interest_concubines_secondary_spouses_trigger = { CHARACTER = scope:minor_root LISTNAME = $LISTNAME$ } - count = all - add_to_temporary_list = $LISTNAME$ - } - # 2 - Direct vassals of high tier - any_vassal = { - minor_interest_high_tier_vassal_trigger = { LISTNAME = $LISTNAME$ } - count = all - add_to_temporary_list = $LISTNAME$ - } - # 3 - Betrothed - trigger_if = { - limit = { minor_interest_betrothed_trigger = { LISTNAME = $LISTNAME$ } } - betrothed = { add_to_temporary_list = $LISTNAME$ } - } - # 4 - Lovers - any_relation = { - type = lover - NOT = { is_in_list = $LISTNAME$ } - count = all - add_to_temporary_list = $LISTNAME$ - } - # 5 - Rivals (excluded as they're typically only used in specific contexts) - # 6 - Close relatives - any_close_or_extended_family_member = { - minor_interest_close_relatives_trigger = { CHARACTER = scope:minor_root LISTNAME = $LISTNAME$ } - count = all - add_to_temporary_list = $LISTNAME$ - } - trigger_if = { #Below is just for players - limit = { is_ai = no } - # 7 - Guardian - any_relation = { - type = guardian - NOT = { is_in_list = $LISTNAME$ } - count = all - add_to_temporary_list = $LISTNAME$ - } - # 8 - Ward - any_relation = { - type = ward - NOT = { is_in_list = $LISTNAME$ } - count = all - add_to_temporary_list = $LISTNAME$ - } - # 9 - Friends - any_relation = { - type = friend - NOT = { is_in_list = $LISTNAME$ } - count = all - add_to_temporary_list = $LISTNAME$ - } - # 10 - Knights - any_knight = { - NOT = { is_in_list = $LISTNAME$ } - count = all - add_to_temporary_list = $LISTNAME$ - } - # 11 - Highly skilled courtiers (players only) - trigger_if = { - limit = { is_ai = no } - any_courtier = { - minor_interest_skilled_courtiers_trigger = { LISTNAME = $LISTNAME$ } - count = all - add_to_temporary_list = $LISTNAME$ - } - } - any_liege_or_above = { - minor_interest_liege_or_above_trigger = { CHARACTER = scope:minor_root LISTNAME = $LISTNAME$ } - count = all - add_to_temporary_list = $LISTNAME$ - } - } -} - - - -#Makes a list of all characters of interest - #Parameters: - # CHARACTER - the character the list is for - # LISTNAME - the name of the list -get_characters_of_interest_trigger = { - get_characters_of_major_interest_trigger = { - LISTNAME = $LISTNAME$ - } - get_characters_of_minor_interest_trigger = { - LISTNAME = $LISTNAME$ - } -} - - - -################ -# Potential Enemies -################ - -#Makes a list of characters who are classified as potential enemies - #Parameters - # CHARACTER - The character whose enemies are being found - # LISTNAME - The name of the list -get_potential_enemies_effect = { - $CHARACTER$ = { - trigger_if = { - limit = { - any_vassal = { - always = yes - } - } - any_vassal = { - count = all - add_to_temporary_list = temp_$LISTNAME$ - } - } - trigger_if = { - limit = { - any_relation = { - type = rival - always = yes - } - } - any_relation = { - type = rival - count = all - add_to_temporary_list = temp_$LISTNAME$ - } - } - trigger_if = { - limit = { - top_liege != this - } - liege = { - add_to_temporary_list = temp_$LISTNAME$ - } - } - trigger_if = { - limit = { - top_liege = this - any_neighboring_top_liege_realm_owner = { - always = yes - } - } - any_neighboring_top_liege_realm_owner = { - count = all - add_to_temporary_list = temp_$LISTNAME$ - } - } - #Potential Heirs that do not like you - #A Religious Head that dislikes you and you are powerful enough - - any_in_list = { - count = all - trigger_if = { - limit = { - NOT = { is_in_list = $LISTNAME$ } - OR = { - #Vassal enemies - AND = { - is_vassal_of = $CHARACTER$ - is_powerful = yes - opinion = { - target = $CHARACTER$ - value <= 0 - } - } - #Rivals - has_relation_rival = $CHARACTER$ - #Lieges - AND = { - $CHARACTER$ = { top_liege != this } - this = $CHARACTER$.liege - opinion = { - target = $CHARACTER$ - value <= 0 - } - } - #Neighboring independent rulers - AND = { - any_neighboring_top_liege_realm_owner = { - this = $CHARACTER$ - } - NOT = { is_allied_to = $CHARACTER$ } - OR = { - opinion = { - target = $CHARACTER$ - value <= 20 - } - AND = { - opinion = { - target = $CHARACTER$ - value <= 50 - } - has_any_cb_on = $CHARACTER$ - } - } - } - } - } - add_to_temporary_list = $LISTNAME$ - } - } - } -} - -has_RelationToMe_relation = { - save_temporary_scope_as = relation_check - NOT = { this = $CHARACTER$ } # Don't print our relation to ourselves! - OR = { - is_close_or_extended_family_of = $CHARACTER$ - any_spouse = { - even_if_dead = yes - this = $CHARACTER$ - } - any_spouse = { - even_if_dead = yes - this = $CHARACTER$ - is_concubine = yes - } - $CHARACTER$ = { - player_heir ?= scope:relation_check - } - is_heir_of = $CHARACTER$ - has_relation_rival = $CHARACTER$ - has_relation_lover = $CHARACTER$ - has_relation_friend = $CHARACTER$ - has_relation_bully = $CHARACTER$ - has_relation_victim = $CHARACTER$ - is_councillor_of = $CHARACTER$ - any_spouse = { any_child = { this = $CHARACTER$ } } - any_parent = { any_spouse = { this = $CHARACTER$ } } - any_parent = { any_spouse = { any_child = { this = $CHARACTER$ } } } - liege ?= $CHARACTER$ - this = { is_tributary_of = $CHARACTER$ } - any_courtier = { this = $CHARACTER$ } - any_vassal_or_below = { this = $CHARACTER$ } - AND = { - top_liege != this - $CHARACTER$ = { top_liege != this } - liege = $CHARACTER$.liege - } - has_relation_crush = $CHARACTER$ - has_relation_ward = $CHARACTER$ - has_relation_guardian = $CHARACTER$ - has_relation_mentor = $CHARACTER$ - has_relation_student = $CHARACTER$ - has_relation_elder = $CHARACTER$ - has_relation_disciple = $CHARACTER$ - AND = { - has_employed_any_court_position = yes - any_court_position_holder = { - this = $CHARACTER$ - } - } - $CHARACTER$ = { is_sibling_in_law_of_root_trigger = yes } - AND = { - exists = dynasty - $CHARACTER$ = { exists = dynasty } - dynasty = $CHARACTER$.dynasty - } - $CHARACTER$ = { - any_owned_story = { - type = story_peasant_affair - var:peasant_character = { - this = root - } - } - } - $CHARACTER$ = { - is_courtier_of = scope:relation_check - OR = { - AND = { - inspiration ?= { - inspiration_sponsor = { this = scope:relation_check } - } - } - AND = { - exists = var:created_artifact_for - var:created_artifact_for = scope:relation_check - } - } - } - $CHARACTER$ = { - any_scheme = { - scheme_is_character_agent = root - } - } - is_imprisoned_by = $CHARACTER$ - $CHARACTER$ = { is_imprisoned_by = scope:relation_check } - host ?= $CHARACTER$ - $CHARACTER$ = { - host ?= scope:relation_check - } - is_knight_of = $CHARACTER$ - AND = { - is_female = yes - any_spouse = { - is_child_of = root - } - } - AND = { - is_male = yes - any_spouse = { - is_child_of = root - } - } - } -} diff --git a/N3OW/common/scripted_triggers/00_religious_triggers.txt b/N3OW/common/scripted_triggers/00_religious_triggers.txt deleted file mode 100644 index bd5a2031..00000000 --- a/N3OW/common/scripted_triggers/00_religious_triggers.txt +++ /dev/null @@ -1,2168 +0,0 @@ - -###TRIGGER LIST - -# has_strong_religious_conviction_trigger -# is_christian_trigger - -###DOCTRINE BASED### -# is_weak_claimant_due_to_gender_trigger -# can_be_combatant_based_on_gender_trigger -# can_be_clergy_due_to_gender_trigger -# faith_is_aniconic_trigger -# relation_with_character_is_incestuous_in_faith_trigger - Relation would be shunned in faith -# relation_with_character_is_incestuous_in_my_faith_trigger - Relation would be shunned in the faith of character you use trigger in -# relation_with_character_is_incestuous_in_my_or_lieges_faith_trigger - Relation would be shunned in the faith of the character you use trigger in or their liege's faith -# faith_allows_marriage_consanguinity_trigger -# relation_with_character_is_sodomy_in_faith_trigger -# relation_with_character_is_sodomy_trigger -# relation_with_character_is_sodomy_in_my_or_lieges_faith_trigger -# trait_is_shunned_in_faith_trigger -# trait_is_criminal_in_faith_trigger -# trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger -# has_negative_attitude_towards_trait_trigger -# secret_is_shunned_in_faith_trigger -# secret_is_criminal_in_faith_trigger -# secret_is_shunned_or_criminal_in_my_or_lieges_faith_trigger -# religion_has_angels_trigger -# highgod_is_passive_trigger -# highgod_is_active_trigger -# is_reincarnation_trigger -# holy_order_1000_request_target_trigger - Is this ruler a valid target for a holy order to request land from? - -###HERESY TRIGGERS### -# is_valid_heresiarch - -###RELIGIOUS INTERACTIONS### -# can_take_religious_vows_trigger - - -# CHECK A NUMBER OF RELIGION-RELATED CONDITIONS TO DETERMINE HOW STRONG OF A BELIEVER THEY SEEM TO BE -has_strong_religious_conviction_trigger = { - NOR = { - has_trait = cynical - has_trait = excommunicated - } - OR = { - has_trait = zealous - has_trait = pilgrim - has_trait = devoted - has_trait = sayyid - has_trait = saoshyant - has_trait = savior - has_trait = divine_blood - has_trait = blood_of_prophet - has_trait = faith_warrior - has_trait = saint - } -} - -is_christian_trigger = { - faith = { religion_tag = christianity_religion } -} - -# Not-non-XYZ triggers allow us to check for specific historical faiths whilst still defaulting to something positive for variant faiths. -## E.g., looking to see if something would only be of interest to Catholics, but if we're dealing with a player-made heresy, still return true. This way mechanics will default to on rather than off (still likely to result in weird GHWs, but at least less random ones). -not_non_catholic_standard_christian_faith_trigger = { - NOR = { - this = faith:orthodox - this = faith:iconoclast - this = faith:coptic - this = faith:armenian_apostolic - } -} - -not_non_orthodox_standard_christian_faith_trigger = { - NOR = { - this = faith:catholic - this = faith:coptic - this = faith:armenian_apostolic - } -} - -not_non_coptic_standard_christian_faith_trigger = { - NOR = { - this = faith:catholic - this = faith:orthodox - this = faith:iconoclast - this = faith:armenian_apostolic - } -} - -not_non_armenian_standard_christian_faith_trigger = { - NOR = { - this = faith:catholic - this = faith:orthodox - this = faith:iconoclast - this = faith:coptic - } -} - -is_weak_claimant_due_to_gender_trigger = { - OR = { - AND = { - $FAITH$ = { has_doctrine_parameter = female_claims_are_weak } - $CHARACTER$ = { is_female = yes } - } - AND = { - $FAITH$ = { has_doctrine_parameter = male_claims_are_weak } - $CHARACTER$ = { is_male = yes } - } - } -} - -can_be_combatant_based_on_gender_trigger = { - custom_description = { - text = "can_be_combatant_based_on_gender" - object = this - subject = $ARMY_OWNER$ - # Priests only fight if faith has war priests - trigger_if = { - limit = { - is_clergy = yes - } - OR = { - faith = { has_doctrine_parameter = clergy_can_fight } - culture = { has_cultural_parameter = culture_clergy_can_fight } - AND = { - $ARMY_OWNER$.culture = { - has_cultural_parameter = high_prowess_ignores_knight_restrictions - } - prowess >= 10 - } - } - } - OR = { - trigger_if = { # Has the Royal Court and thus can modify pillars - limit = { - has_dlc_feature = diverge_culture # Can modify pillars - } - trigger_if = { - limit = { - $ARMY_OWNER$.culture = { has_cultural_parameter = martial_custom_male_only_combatant } - } - is_male = yes - } - trigger_else_if = { - limit = { - $ARMY_OWNER$.culture = { has_cultural_parameter = martial_custom_female_only_combatant } - } - is_female = yes - } - trigger_else = {} - } - trigger_else = { # Does not have the Royal Court and thus combatant is governed by faith - OR = { - $ARMY_OWNER$.faith = { has_doctrine_parameter = combatant_can_be_either_gender_if_no_roco } - AND = { - $ARMY_OWNER$.faith = { has_doctrine_parameter = combatant_must_be_male_if_no_roco } - is_male = yes - } - AND = { - $ARMY_OWNER$.faith = { has_doctrine_parameter = combatant_must_be_female_if_no_roco } - is_female = yes - } - } - } - AND = { - # No need to gender diversify this: if they're a right-gender shieldperson of the culture, then they've already got permission to fight from the previous AND conditions. - has_trait = shieldmaiden - $ARMY_OWNER$ = { - culture = { has_cultural_parameter = has_access_to_shieldmaidens } - } - } - # Event-based special exceptions - OR = { - has_character_modifier = ignores_gender_army_rules - has_character_modifier = mpo_destined_leader_modifier - } - AND = { - prowess >= 10 - $ARMY_OWNER$.culture = { has_cultural_parameter = high_prowess_ignores_knight_restrictions } - NOT = { $ARMY_OWNER$.culture = { has_cultural_parameter = minimum_prowess_for_knights } } - } - AND = { - prowess >= 12 - $ARMY_OWNER$.culture = { - has_cultural_parameter = high_prowess_ignores_knight_restrictions - has_cultural_parameter = minimum_prowess_for_knights - } - } - } - } -} - -can_be_clergy_due_to_gender_trigger = { - OR = { - AND = { - faith = { has_doctrine_parameter = clergy_must_be_female } - is_female = yes - } - AND = { - faith = { has_doctrine_parameter = clergy_must_be_male } - is_male = yes - } - faith = { has_doctrine_parameter = clergy_can_be_either_gender } - } -} - -is_wrong_gender_in_faith_trigger = { - OR = { - AND = { - is_female = yes - $FAITH$ = { has_doctrine_parameter = male_dominated_law } - } - AND = { - is_male = yes - $FAITH$ = { has_doctrine_parameter = female_dominated_law } - } - } -} - -faith_is_aniconic_trigger = { - faith = { - OR = { - religion = religion:islam_religion - has_doctrine = tenet_aniconism - } - } -} - -#Needs CHARACTER and FAITH -relation_with_character_is_incestuous_in_faith_trigger = { - OR = { - # doctrine_consanguinity_dynastic; not within the same descent group - AND = { - $FAITH$ = { has_doctrine = doctrine_consanguinity_dynastic } - OR = { - is_close_or_extended_family_of = $CHARACTER$ - dynasty = $CHARACTER$.dynasty - } - } - #doctrine_consanguinity_restricted; absolutely no family business - AND = { - $FAITH$ = { has_doctrine = doctrine_consanguinity_restricted } - is_close_or_extended_family_of = $CHARACTER$ #[parents, children, siblings, grandparents, grandchildren, cousins, uncles, aunts, nephews, nieces] - } - #doctrine_consanguinity_cousins; the only acceptable incest is with your cousin - AND = { - $FAITH$ = { has_doctrine = doctrine_consanguinity_cousins } - OR = { - is_close_family_of = $CHARACTER$ #[parents, children, siblings, grandparents, grandchildren] - is_uncle_or_aunt_of = $CHARACTER$ - is_nibling_of = $CHARACTER$ - } - } - #doctrine_consanguinity_aunt_nephew_and_uncle_niece; extended family is ok - AND = { - $FAITH$ = { has_doctrine = doctrine_consanguinity_aunt_nephew_and_uncle_niece } - is_close_family_of = $CHARACTER$ - } - #doctrine_consanguinity_unrestricted; all forms of incest is acceptable - } -} - -#Note: only checks from the viewpoint of current scope. Needs CHARACTER -relation_with_character_is_incestuous_in_my_faith_trigger = { - faith = { save_temporary_scope_as = my_faith } - relation_with_character_is_incestuous_in_faith_trigger = { CHARACTER = $CHARACTER$ FAITH = scope:my_faith } -} - -relation_with_character_is_incestuous_in_my_or_lieges_faith_trigger = { - OR = { - AND = { - faith = { #My faith doesn't approve - save_temporary_scope_as = check_faith - } - relation_with_character_is_incestuous_in_faith_trigger = { CHARACTER = $CHARACTER$ FAITH = scope:check_faith } - } - AND = { #Liege's faith doesn't approve - liege ?= { - faith = { - save_temporary_scope_as = check_faith - } - } - relation_with_character_is_incestuous_in_faith_trigger = { CHARACTER = $CHARACTER$ FAITH = scope:check_faith } - } - } -} - -#Needs CHARACTER_1 and CHARACTER_2 -faith_allows_marriage_consanguinity_trigger = { - save_temporary_scope_as = consanguinity_faith - - NOT = { - $CHARACTER_1$ = { - relation_with_character_is_incestuous_in_faith_trigger = { - CHARACTER = $CHARACTER_2$ - FAITH = scope:consanguinity_faith - } - } - } -} -relation_between_characters_is_sodomy_in_my_faith_trigger = { - $CHARACTER_1$ = { is_male = yes } - $CHARACTER_2$ = { is_male = yes } - faith = { - OR = { - has_doctrine_parameter = homosexuality_shunned - has_doctrine_parameter = homosexuality_illegal - } - } -} - -relation_with_character_is_sodomy_in_faith_trigger = { - is_male = yes - $CHARACTER$ = { is_male = yes } - $FAITH$ = { - OR = { - has_doctrine_parameter = homosexuality_shunned - has_doctrine_parameter = homosexuality_illegal - } - } -} - -#Note: only checks from the viewpoint of current scope. Needs CHARACTER -relation_with_character_is_sodomy_trigger = { - faith = { save_temporary_scope_as = my_faith } - relation_with_character_is_sodomy_in_faith_trigger = { - CHARACTER = $CHARACTER$ - FAITH = scope:my_faith - } -} - -relation_with_character_is_sodomy_in_my_or_lieges_faith_trigger = { - OR = { - AND = { - faith = { #My faith doesn't approve - save_temporary_scope_as = check_faith - } - relation_with_character_is_sodomy_in_faith_trigger = { CHARACTER = $CHARACTER$ FAITH = scope:check_faith } - } - AND = { #Liege's faith doesn't approve - liege ?= { - faith = { - save_temporary_scope_as = check_faith - } - } - relation_with_character_is_sodomy_in_faith_trigger = { CHARACTER = $CHARACTER$ FAITH = scope:check_faith } - } - } -} - -murdering_character_is_kinslaying_in_faith_trigger = { - OR = { - is_close_or_extended_family_of = $CHARACTER$ - dynasty = $CHARACTER$.dynasty - } - $FAITH$ = { NOT = { has_doctrine = doctrine_kinslaying_accepted } } -} - -murdering_character_is_kinslaying_in_my_or_same_dynasty_lieges_faith_trigger = { - save_temporary_scope_as = kinslayer_me - faith = { - save_temporary_scope_as = check_faith - } - trigger_if = { - limit = { - liege ?= { dynasty = scope:kinslayer_me.dynasty } - } - liege = { - faith = { - save_temporary_scope_as = check_faith_liege - } - } - } - OR = { - murdering_character_is_kinslaying_in_faith_trigger = { CHARACTER = $CHARACTER$ FAITH = scope:check_faith } #My faith doesn't approve - AND = { #Liege's faith doesn't approve - liege ?= { dynasty = scope:kinslayer_me.dynasty } - murdering_character_is_kinslaying_in_faith_trigger = { CHARACTER = $CHARACTER$ FAITH = scope:check_faith_liege } - } - } -} - - - -trait_is_shunned_in_faith_trigger = { - save_temporary_scope_value_as = { - name = shunned_trait_check - value = flag:$TRAIT$ - } - OR = { - #INCEST - AND = { - scope:shunned_trait_check = flag:incestuous - $FAITH$ = { NOT = { has_doctrine_parameter = allows_unrestricted_marriage } } - } - #WITCH - AND = { - scope:shunned_trait_check = flag:witch - $FAITH$ = { has_doctrine_parameter = witchcraft_shunned } - } - #SODOMITE - AND = { - scope:shunned_trait_check = flag:sodomite - $FAITH$ = { has_doctrine_parameter = homosexuality_shunned } - } - #DEVIANT - AND = { - scope:shunned_trait_check = flag:deviant - $FAITH$ = { has_doctrine_parameter = deviancy_shunned } - } - #ADULTERER/FORNICATOR - AND = { - OR = { - scope:shunned_trait_check = flag:adulterer - scope:shunned_trait_check = flag:fornicator - } - $GENDER_CHARACTER$ = { - trigger_if = { - limit = { exists = faith } - accepts_adultery_without_penalty_trigger = no - } - } - OR = { - AND = { - $FAITH$ = { has_doctrine_parameter = adultery_female_shunned } - $GENDER_CHARACTER$ = { is_female = yes } - } - AND = { - $FAITH$ = { has_doctrine_parameter = adultery_male_shunned } - $GENDER_CHARACTER$ = { is_male = yes } - } - } - } - #KINSLAYER - AND = { - OR = { - scope:shunned_trait_check = flag:kinslayer_1 - scope:shunned_trait_check = flag:kinslayer_2 - scope:shunned_trait_check = flag:kinslayer_3 - } - $FAITH$ = { has_doctrine_parameter = kinslaying_shunned } - } - } -} - -trait_is_criminal_in_faith_trigger = { - save_temporary_scope_value_as = { - name = criminal_trait_check - value = flag:$TRAIT$ - } - OR = { - #KINSLAYER - AND = { - OR = { - scope:criminal_trait_check = flag:kinslayer_3 - scope:criminal_trait_check = flag:kinslayer_2 - scope:criminal_trait_check = flag:kinslayer_1 - } - $FAITH$ = { has_doctrine_parameter = kinslaying_any_dynasty_member_crime } - } - AND = { - OR = { - scope:criminal_trait_check = flag:kinslayer_3 - scope:criminal_trait_check = flag:kinslayer_2 - } - $FAITH$ = { has_doctrine_parameter = kinslaying_extended_family_crime } - } - AND = { - scope:criminal_trait_check = flag:kinslayer_3 - $FAITH$ = { has_doctrine_parameter = kinslaying_close_kin_crime } - } - #WITCH - AND = { - scope:criminal_trait_check = flag:witch - $FAITH$ = { has_doctrine_parameter = witchcraft_illegal } - } - #CANNIBAL - AND = { - scope:criminal_trait_check = flag:cannibal - NOT = { - $FAITH$ = { has_doctrine_parameter = cannibalism_legal } - } - } - #SODOMITE - AND = { - scope:criminal_trait_check = flag:sodomite - $FAITH$ = { has_doctrine_parameter = homosexuality_illegal } - } - #DEVIANT - AND = { - scope:criminal_trait_check = flag:deviant - $FAITH$ = { has_doctrine_parameter = deviancy_illegal } - } - #INCEST - AND = { - scope:criminal_trait_check = flag:incestuous - $FAITH$ = { NOT = { has_doctrine_parameter = consanguinity_unrestricted_incest } } - } - #ADULTERER/FORNICATOR - AND = { - OR = { - scope:criminal_trait_check = flag:adulterer - scope:criminal_trait_check = flag:fornicator - } - OR = { - AND = { - $FAITH$ = { has_doctrine_parameter = adultery_female_crime } - $GENDER_CHARACTER$ = { is_female = yes } - } - AND = { - $FAITH$ = { has_doctrine_parameter = adultery_male_crime } - $GENDER_CHARACTER$ = { is_male = yes } - } - } - } - } -} - -scoped_trait_is_criminal_in_faith_trigger = { - OR = { - #KINSLAYER - AND = { - OR = { - $TRAIT$ = trait:kinslayer_3 - $TRAIT$ = trait:kinslayer_2 - $TRAIT$ = trait:kinslayer_1 - } - $FAITH$ = { has_doctrine_parameter = kinslaying_any_dynasty_member_crime } - } - AND = { - OR = { - $TRAIT$ = trait:kinslayer_3 - $TRAIT$ = trait:kinslayer_2 - } - $FAITH$ = { has_doctrine_parameter = kinslaying_extended_family_crime } - } - AND = { - $TRAIT$ = trait:kinslayer_3 - $FAITH$ = { has_doctrine_parameter = kinslaying_close_kin_crime } - } - #WITCH - AND = { - $TRAIT$ = trait:witch - $FAITH$ = { has_doctrine_parameter = witchcraft_illegal } - } - #CANNIBAL - AND = { - $TRAIT$ = trait:cannibal - NOT = { - $FAITH$ = { has_doctrine_parameter = cannibalism_legal } - } - } - #SODOMITE - AND = { - $TRAIT$ = trait:sodomite - $FAITH$ = { has_doctrine_parameter = homosexuality_illegal } - } - #DEVIANT - AND = { - $TRAIT$ = trait:deviant - $FAITH$ = { has_doctrine_parameter = deviancy_illegal } - } - #INCEST - AND = { - $TRAIT$ = trait:incestuous - $FAITH$ = { NOT = { has_doctrine_parameter = consanguinity_unrestricted_incest } } - } - #ADULTERER/FORNICATOR - AND = { - OR = { - $TRAIT$ = trait:adulterer - $TRAIT$ = trait:fornicator - } - OR = { - AND = { - $FAITH$ = { has_doctrine_parameter = adultery_female_crime } - $GENDER_CHARACTER$ = { is_female = yes } - } - AND = { - $FAITH$ = { has_doctrine_parameter = adultery_male_crime } - $GENDER_CHARACTER$ = { is_male = yes } - } - } - } - } -} - -trait_is_shunned_or_criminal_in_faith_trigger = { - OR = { - trait_is_shunned_in_faith_trigger = { TRAIT = $TRAIT$ FAITH = $FAITH$ GENDER_CHARACTER = $GENDER_CHARACTER$ } - trait_is_criminal_in_faith_trigger = { TRAIT = $TRAIT$ FAITH = $FAITH$ GENDER_CHARACTER = $GENDER_CHARACTER$ } - } -} - -trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { - OR = { - AND = { - faith = { #My faith doesn't approve - save_temporary_scope_as = check_faith - } - trait_is_shunned_or_criminal_in_faith_trigger = { TRAIT = $TRAIT$ FAITH = scope:check_faith GENDER_CHARACTER = $GENDER_CHARACTER$ } - } - AND = { #Liege's faith doesn't approve - liege ?= { - faith = { - save_temporary_scope_as = check_faith - } - } - trait_is_shunned_or_criminal_in_faith_trigger = { TRAIT = $TRAIT$ FAITH = scope:check_faith GENDER_CHARACTER = $GENDER_CHARACTER$ } - } - } -} - -has_any_shunned_or_criminal_trait_in_faith_trigger = { - $CHARACTER$ = { - OR = { - #KINSLAYER - AND = { - has_trait = kinslayer_3 - trait_is_shunned_or_criminal_in_faith_trigger = { TRAIT = kinslayer_3 FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } - } - AND = { - has_trait = kinslayer_2 - trait_is_shunned_or_criminal_in_faith_trigger = { TRAIT = kinslayer_2 FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } - } - AND = { - has_trait = kinslayer_1 - trait_is_shunned_or_criminal_in_faith_trigger = { TRAIT = kinslayer_1 FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } - } - #WITCH - AND = { - has_trait = witch - trait_is_shunned_or_criminal_in_faith_trigger = { TRAIT = witch FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } - } - #CANNIBAL - AND = { - has_trait = cannibal - trait_is_shunned_or_criminal_in_faith_trigger = { TRAIT = cannibal FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } - } - #SODOMITE - AND = { - has_trait = sodomite - trait_is_shunned_or_criminal_in_faith_trigger = { TRAIT = sodomite FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } - } - #DEVIANT - AND = { - has_trait = deviant - trait_is_shunned_or_criminal_in_faith_trigger = { TRAIT = deviant FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } - } - AND = { - has_trait = incestuous - trait_is_shunned_or_criminal_in_faith_trigger = { TRAIT = incestuous FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } - } - #ADULTERER/FORNICATOR - AND = { - has_trait = adulterer - trait_is_shunned_or_criminal_in_faith_trigger = { TRAIT = adulterer FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } - } - AND = { - has_trait = fornicator - trait_is_shunned_or_criminal_in_faith_trigger = { TRAIT = fornicator FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } - } - } - } -} - -has_any_criminal_trait_in_faith_trigger = { - $CHARACTER$ = { - OR = { - #KINSLAYER - AND = { - has_trait = kinslayer_3 - trait_is_criminal_in_faith_trigger = { TRAIT = kinslayer_3 FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } - } - AND = { - has_trait = kinslayer_2 - trait_is_criminal_in_faith_trigger = { TRAIT = kinslayer_2 FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } - } - AND = { - has_trait = kinslayer_1 - trait_is_criminal_in_faith_trigger = { TRAIT = kinslayer_1 FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } - } - #WITCH - AND = { - has_trait = witch - trait_is_criminal_in_faith_trigger = { TRAIT = witch FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } - } - #CANNIBAL - AND = { - has_trait = cannibal - trait_is_criminal_in_faith_trigger = { TRAIT = cannibal FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } - } - #SODOMITE - AND = { - has_trait = sodomite - trait_is_criminal_in_faith_trigger = { TRAIT = sodomite FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } - } - #DEVIANT - AND = { - has_trait = deviant - trait_is_criminal_in_faith_trigger = { TRAIT = deviant FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } - } - AND = { - has_trait = incestuous - trait_is_criminal_in_faith_trigger = { TRAIT = incestuous FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } - } - #ADULTERER/FORNICATOR - AND = { - has_trait = adulterer - trait_is_criminal_in_faith_trigger = { TRAIT = adulterer FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } - } - AND = { - has_trait = fornicator - trait_is_criminal_in_faith_trigger = { TRAIT = fornicator FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } - } - } - } -} - -has_any_shunned_trait_in_faith_trigger = { - $CHARACTER$ = { - OR = { - #KINSLAYER - AND = { - has_trait = kinslayer_3 - trait_isshunnedl_in_faith_trigger = { TRAIT = kinslayer_3 FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } - } - AND = { - has_trait = kinslayer_2 - trait_is_shunned_in_faith_trigger = { TRAIT = kinslayer_2 FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } - } - AND = { - has_trait = kinslayer_1 - trait_is_shunned_in_faith_trigger = { TRAIT = kinslayer_1 FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } - } - #WITCH - AND = { - has_trait = witch - trait_is_shunned_in_faith_trigger = { TRAIT = witch FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } - } - #CANNIBAL - AND = { - has_trait = cannibal - trait_is_shunned_in_faith_trigger = { TRAIT = cannibal FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } - } - #SODOMITE - AND = { - has_trait = sodomite - trait_is_shunned_in_faith_trigger = { TRAIT = sodomite FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } - } - #DEVIANT - AND = { - has_trait = deviant - trait_is_shunned_in_faith_trigger = { TRAIT = deviant FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } - } - AND = { - has_trait = incestuous - trait_is_shunned_in_faith_trigger = { TRAIT = incestuous FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } - } - #ADULTERER/FORNICATOR - AND = { - has_trait = adulterer - trait_is_shunned_in_faith_trigger = { TRAIT = adulterer FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } - } - AND = { - has_trait = fornicator - trait_is_shunned_in_faith_trigger = { TRAIT = fornicator FAITH = $FAITH$ GENDER_CHARACTER = $CHARACTER$ } - } - } - } -} - - -has_negative_attitude_towards_trait_trigger = { - save_temporary_scope_value_as = { - name = negative_status_check - value = flag:$TRAIT$ - } - - NOR = { - has_trait = $TRAIT$ - #INCESTUOUS - AND = { - scope:negative_status_check = flag:incestuous - any_secret = { type = secret_incest } - } - #WITCH - AND = { - scope:negative_status_check = flag:witch - any_secret = { type = secret_witch } - } - #CANNIBAL - AND = { - scope:negative_status_check = flag:cannibal - any_secret = { type = secret_cannibal } - } - #SODOMITE - AND = { - scope:negative_status_check = flag:sodomite - OR = { - has_sexuality = homosexual - has_sexuality = bisexual - } - any_secret = { - type = secret_homosexual - } - } - #ADULTERER - AND = { - scope:negative_status_check = flag:adulterer - OR = { - has_trait = lustful - AND = { - is_married = yes - any_relation = { type = lover NOT = { is_spouse_of = prev } } - } - any_relation = { - type = lover - is_married = yes - NOT = { is_spouse_of = prev } - } - } - } - #FORNICATOR - AND = { - scope:negative_status_check = flag:fornicator - OR = { - has_trait = lustful - any_relation = { type = lover always = yes } - } - } - } - - faith = { save_temporary_scope_as = my_faith } - OR = { - trait_is_shunned_in_faith_trigger = { TRAIT = $TRAIT$ FAITH = scope:my_faith GENDER_CHARACTER = $GENDER_CHARACTER$ } - trait_is_criminal_in_faith_trigger = { TRAIT = $TRAIT$ FAITH = scope:my_faith GENDER_CHARACTER = $GENDER_CHARACTER$ } - } -} - -has_followers_trigger = { - OR = { - num_character_followers >= 1 - num_county_followers >= 1 - } -} - -secret_is_blackmailable_trigger = { - OR = { - secret_is_blackmailable_strong_hook_trigger = { TARGET = $TARGET$ } - secret_is_blackmailable_weak_hook_trigger = { TARGET = $TARGET$ } - } -} - - -################### -# Heresy Triggers # -################### - -is_preferred_heresy = { - is_valid_heresy = { - ORIGIN_FAITH = $ORIGIN_FAITH$ - HERETICAL_FAITH = $HERETICAL_FAITH$ - } - - OR = { - #If we're Chistian, pick a heretical faiths which is in the same regional group as our origin faith (i.e., Lollards for Catholics, Iconoclasts for Orthodox, etc.) - AND = { - religion_tag = christianity_religion - OR = { - faiths_are_in_western_christianity_group = { FAITH_1 = $ORIGIN_FAITH$ FAITH_2 = $HERETICAL_FAITH$ } - faiths_are_in_orthodox_christianity_group = { FAITH_1 = $ORIGIN_FAITH$ FAITH_2 = $HERETICAL_FAITH$ } - faiths_are_in_eastern_christianity_group = { FAITH_1 = $ORIGIN_FAITH$ FAITH_2 = $HERETICAL_FAITH$ } - } - } - - #If we're Muslim, we want to stay within our 'branch' of Islam: - AND = { - religion_tag = islam_religion - OR = { - faiths_are_in_sunni_islam_group = { FAITH_1 = $ORIGIN_FAITH$ FAITH_2 = $HERETICAL_FAITH$} - faiths_are_in_shia_islam_group = { FAITH_1 = $ORIGIN_FAITH$ FAITH_2 = $HERETICAL_FAITH$} - faiths_are_in_muhakkima_islam_group = { FAITH_1 = $ORIGIN_FAITH$ FAITH_2 = $HERETICAL_FAITH$} - } - } - #If we're Zoroastrian, we don't want Sogdian faith in Armenia and vice versa - AND = { - religion_tag = zoroastrianism_religion - OR = { - faiths_are_eastern_zoroastrian = { FAITH_1 = $ORIGIN_FAITH$ FAITH_2 = $HERETICAL_FAITH$} - faiths_are_western_zoroastrian = { FAITH_1 = $ORIGIN_FAITH$ FAITH_2 = $HERETICAL_FAITH$} - } - } - - #Otherwise, we don't have any special preferences. - NOT = { - religion_tag = islam_religion - religion_tag = christianity_religion - religion_tag = zoroastrianism_religion - } - } -} - -is_valid_heresy = { - #The origin faith can never be its own heresy. - NOT = { $ORIGIN_FAITH$ = $HERETICAL_FAITH$ } - #Must not be considered invalid - invalid_for_heresy_events = no - # A heretical faith can't be currently locked off via variable. - $HERETICAL_FAITH$ = { - NOR = { - has_variable = block_conversion_till_decision_taken - has_variable = block_conversion_till_nebulous_circumstances - } - } - #Depending on the origin faith's religion/religion group, there may have additional requirements for a heresy to be considered valid. - OR = { - #For Christian Faiths, the origin and heretical faiths must not both be Ecumenical (excepting the faiths which aren't technically ecumenical). - AND = { - religion_tag = christianity_religion - NAND = { - $ORIGIN_FAITH$ = { - has_doctrine = special_doctrine_ecumenical_christian - OR = { - this = faith:insular_celtic - this = faith:bosnian_church - this = faith:mozarabic_church - } - } - $HERETICAL_FAITH$ = { - has_doctrine = special_doctrine_ecumenical_christian - OR = { - this = faith:insular_celtic - this = faith:bosnian_church - this = faith:mozarabic_church - } - } - } - } - AND = { #FP3: for Zoroastrianism, Bedhin faiths are never heresies of each other - religion_tag = zoroastrianism_religion - NAND = { - $ORIGIN_FAITH$ = { - has_doctrine = doctrine_major_branch_behdin - } - $HERETICAL_FAITH$ = { - has_doctrine = doctrine_major_branch_behdin - } - } - } - #No special requirements for Muslims, Jews, or Yazidis - religion_tag = islam_religion - religion_tag = judaism_religion - #Eastern Faiths can shift and spread amongst each other. - OR = { - religion_tag = buddhism_religion - religion_tag = hinduism_religion - religion_tag = jainism_religion - religion_tag = dualism_religion - } - #No special requirements for Pagan religions. - has_doctrine = pagan_hostility_doctrine - } -} - -is_valid_heresiarch = { - is_landed = yes - faith = root - OR = { - highest_held_title_tier = tier_duchy - highest_held_title_tier = tier_county - } - is_imprisoned = no - is_capable_adult_ai = yes - is_playable_character = yes - is_landless_adventurer = no - primary_title ?= { - is_landless_type_title = no - is_noble_family_title = no - } - exists = capital_county - NOT = { has_trait = heresiarch } - no_heretical_hof_faith_trigger = yes - recently_converted_faith_trigger = no # As amusing as it may be, rulers shouldn't 'flip-flop' between Faiths, so we need to enforce a cooldown on heresy conversions. -} - -no_heretical_hof_faith_trigger = { #Head of Faith shouldn't convert. - OR = { - NOT = { exists = root.religious_head } - AND = { - exists = root.religious_head - this != root.religious_head - } - } -} - -#Christian Heresy Groups -faiths_are_in_western_christianity_group = { - OR = { - $FAITH_1$ = faith:catholic - $FAITH_1$ = faith:cathar - $FAITH_1$ = faith:waldensian - $FAITH_1$ = faith:lollard - AND = { - $FAITH_1$ = faith:insular_celtic - scope:heretic_capital.title_province = { geographical_region = world_europe_west_britannia } - } - AND = { - $FAITH_1$ = faith:mozarabic_church - scope:heretic_capital.title_province = { geographical_region = world_europe_west_iberia } - } - } - OR = { - $FAITH_2$ = faith:catholic - $FAITH_2$ = faith:cathar - $FAITH_2$ = faith:waldensian - $FAITH_2$ = faith:lollard - $FAITH_2$ = faith:priscillianism - AND = { - $FAITH_2$ = faith:insular_celtic - scope:heretic_capital.title_province = { geographical_region = world_europe_west_britannia } - } - AND = { - $FAITH_2$ = faith:mozarabic_church - scope:heretic_capital.title_province = { geographical_region = world_europe_west_iberia } - } - } -} - -faiths_are_in_orthodox_christianity_group = { - OR = { - $FAITH_1$ = faith:orthodox - $FAITH_1$ = faith:iconoclast - $FAITH_1$ = faith:bogomilist - $FAITH_1$ = faith:paulician - AND = { - $FAITH_1$ = faith:bosnian_church - scope:heretic_capital.title_province = { geographical_region = world_europe_south_east } - } - } - OR = { - $FAITH_2$ = faith:orthodox - $FAITH_2$ = faith:iconoclast - $FAITH_2$ = faith:bogomilist - $FAITH_2$ = faith:paulician - $FAITH_2$ = faith:bosnian_church - $FAITH_2$ = faith:cainitism - AND = { - $FAITH_1$ = faith:bosnian_church - scope:heretic_capital.title_province = { geographical_region = world_europe_south_east } - } - } -} - -faiths_are_in_eastern_christianity_group = { - OR = { - $FAITH_1$ = faith:coptic - $FAITH_1$ = faith:armenian_apostolic - $FAITH_1$ = faith:nestorian - $FAITH_1$ = faith:messalian - $FAITH_1$ = faith:paulician - } - OR = { - $FAITH_2$ = faith:coptic - $FAITH_2$ = faith:armenian_apostolic - $FAITH_2$ = faith:nestorian - $FAITH_2$ = faith:messalian - $FAITH_2$ = faith:paulician - $FAITH_2$ = faith:mandeaism - } -} - -faiths_are_shia_zandaqa_sub_group = { - OR = { - this = faith:quranist - this = faith:qarmatian - this = faith:ghulat - this = faith:alawite - this = faith:alevi - this = faith:druze - } -} - -faiths_are_in_sunni_islam_group = { - $FAITH_1$ = { - has_doctrine = muhammad_succession_sunni_doctrine - } - $FAITH_2$ = { - OR = { - has_doctrine = muhammad_succession_sunni_doctrine - has_doctrine = muhammad_succession_muhakkima_doctrine - this = faith:sabianism - this = faith:manichean - this = faith:quranist - } - } -} - -faiths_are_in_shia_islam_group = { - $FAITH_1$ = { - OR = { - has_doctrine = muhammad_succession_shia_doctrine - faiths_are_shia_zandaqa_sub_group = yes - } - } - $FAITH_2$ = { - OR = { - has_doctrine = muhammad_succession_shia_doctrine - has_doctrine = muhammad_succession_muhakkima_doctrine - faiths_are_shia_zandaqa_sub_group = yes - this = faith:valentinianism - this = faith:sabianism - } - } -} - -faiths_are_in_muhakkima_islam_group = { - $FAITH_1$ = { - has_doctrine = muhammad_succession_muhakkima_doctrine - } - $FAITH_2$ = { - OR = { - has_doctrine = muhammad_succession_muhakkima_doctrine - this = faith:manichean - this = faith:valentinianism - } - } -} - -faiths_are_eastern_zoroastrian = { #FP3 update - so that Armenian faith (Arewordik) don't appear as a heresy in Sogdia - OR = { - $FAITH_1$ = faith:mazdayasna - $FAITH_1$ = faith:khurmazta - $FAITH_1$ = faith:gayomarthianism - $FAITH_2$ = faith:zurvanism - $FAITH_2$ = faith:mazdakism - $FAITH_2$ = faith:khurramism - } - OR = { - $FAITH_1$ = faith:mazdayasna - $FAITH_1$ = faith:khurmazta - $FAITH_1$ = faith:gayomarthianism - $FAITH_2$ = faith:zurvanism - $FAITH_2$ = faith:mazdakism - $FAITH_2$ = faith:khurramism - } -} - -faiths_are_western_zoroastrian = { #FP3 update - so that Sogdian faith (Khurmazta) don't appear as a heresy in Armenia - OR = { - $FAITH_1$ = faith:mazdayasna - $FAITH_1$ = faith:gayomarthianism - $FAITH_2$ = faith:zurvanism - $FAITH_2$ = faith:mazdakism - $FAITH_2$ = faith:khurramism - $FAITH_2$ = faith:urartuism - } - OR = { - $FAITH_1$ = faith:mazdayasna - $FAITH_1$ = faith:gayomarthianism - $FAITH_2$ = faith:zurvanism - $FAITH_2$ = faith:mazdakism - $FAITH_2$ = faith:khurramism - $FAITH_2$ = faith:urartuism - } -} - -refusing_conversion_is_crime_trigger = { - faith = { - trigger_if = { # Only apply imprisonment reason if actor's faith is not the state faith - limit = { - $CHARACTER$ = { - top_liege = { government_allows = state_faith } - faith = $CHARACTER$.top_liege.primary_title.state_faith - } - } - always = no - } - OR = { - religion_tag = christianity_religion - religion_tag = islam_religion - religion_tag = judaism_religion - religion_tag = zoroastrianism_religion - } - NOT = { - faith_hostility_level = { - target = $CHARACTER$.faith - value <= faith_astray_level - } - } - } -} - -is_hostile_enough_for_holy_war_trigger = { - faith_hostility_level = { - target = $FAITH$ - value >= religious_cb_enabled_hostility_level - } -} - -barony_is_valid_for_holy_order_lease_trigger = { - title_province = { - OR = { - has_holding_type = castle_holding - has_holding_type = city_holding - } - } - trigger_if = { - limit = { - holder.primary_title.tier != tier_barony - } - can_be_leased_out = yes - } - trigger_if = { - limit = { - NOT = { holder = $CHARACTER$ } - } - holder.primary_title.tier = tier_barony - } - NOT = { - is_leased_out = yes - } -} - -barony_is_valid_for_holy_order_lease_cancellation_trigger = { - is_under_holy_order_lease = yes - has_revokable_lease = yes - lessee = { - NOT = { - has_strong_hook = prev.holder - } - } -} - -religion_has_angels_trigger = { - OR = { - religion = religion:christianity_religion - religion = religion:islam_religion - religion = religion:zoroastrianism_religion - religion = religion:dualism_religion - religion = religion:judaism_religion - religion = religion:yazidi_religion - } -} - -religion_has_circumcision_trigger = { - OR = { - religion = religion:islam_religion - religion = religion:judaism_religion - } -} - -is_heretic_trigger = { - $WHO$.faith.religion = $TARGET$.faith.religion - $WHO$.faith = { - faith_hostility_level = { - target = $TARGET$.faith - value >= religious_cb_enabled_hostility_level - } - } -} - -is_heathen_trigger = { - NOT = { $WHO$.faith.religion = $TARGET$.faith.religion } - $TARGET$.faith = { - has_doctrine = pagan_hostility_doctrine - } - $WHO$.faith = { - faith_hostility_level = { - target = $TARGET$.faith - value >= religious_cb_enabled_hostility_level - } - } -} - -is_infidel_trigger = { - NOT = { $WHO$.faith.religion = $TARGET$.faith.religion } - $TARGET$.faith = { - NOT = { has_doctrine = pagan_hostility_doctrine } - } - $WHO$.faith = { - faith_hostility_level = { - target = $TARGET$.faith - value >= religious_cb_enabled_hostility_level - } - } -} - -valid_demand_conversion_conditions_trigger = { - scope:recipient = { - NOR = { - has_strong_hook = scope:actor - has_trait = devoted - has_trait = order_member - is_imprisoned_by = scope:actor - is_at_war_with = scope:actor - } - } - scope:actor = { - trigger_if = { - limit = { - government_has_flag = government_is_landless_adventurer - scope:recipient = { is_courtier_of = scope:actor } - } - custom_tooltip = { - text = valid_demand_conversion_conditions_trigger.tt.domicile_requires_shrine - domicile = { has_domicile_parameter = camp_enable_conversion } - } - } - NAND = { - has_trait = nomadic_philosophy - has_trait = zealous - } - } - - custom_description = { - text = "is_head_of_religion" - subject = scope:recipient - scope:recipient.faith.religious_head != scope:recipient - } - custom_description = { - text = "is_protected_via_contract" - subject = scope:recipient - # Vassal Contract forbids meddling by liege - NAND = { - exists = scope:recipient.liege - scope:recipient.liege = scope:actor - scope:recipient = { - is_ruler = yes - vassal_contract_has_flag = religiously_protected - } - } - } - trigger_if = { - limit = { - scope:recipient = { - AND = { - has_variable = cannot_be_converted_by_value - var:cannot_be_converted_by_value = scope:actor - } - } - } - custom_tooltip = { - text = promised_to_not_convert_character - scope:recipient = { - NOR = { - has_variable = cannot_be_converted_by_value - var:cannot_be_converted_by_value = scope:actor - } - } - } - } - custom_tooltip = { - text = cannot_take_overt_hostile_actions_against_diarch.tt - NOT = { scope:recipient ?= scope:actor.diarch } - } -} - -valid_ask_for_conversion_conditions_trigger = { # Deliberate variant of the above, so you can ask your diarch nicely to convert if you made a new faith - scope:recipient = { - NOR = { - has_strong_hook = scope:actor - has_trait = devoted - has_trait = order_member - is_imprisoned_by = scope:actor - is_at_war_with = scope:actor - } - } - scope:actor = { - trigger_if = { - limit = { - government_has_flag = government_is_landless_adventurer - scope:recipient = { is_courtier_of = scope:actor } - } - custom_tooltip = { - text = valid_demand_conversion_conditions_trigger.tt.domicile_requires_shrine - domicile = { has_domicile_parameter = camp_enable_conversion } - } - } - NAND = { - has_trait = nomadic_philosophy - has_trait = zealous - } - } - - custom_description = { - text = "is_head_of_religion" - subject = scope:recipient - scope:recipient.faith.religious_head != scope:recipient - } - custom_description = { - text = "is_protected_via_contract" - subject = scope:recipient - # Vassal Contract forbids meddling by liege - NAND = { - exists = scope:recipient.liege - scope:recipient.liege = scope:actor - scope:recipient = { - is_ruler = yes - vassal_contract_has_flag = religiously_protected - } - } - } - trigger_if = { - limit = { - scope:recipient = { - AND = { - has_variable = cannot_be_converted_by_value - var:cannot_be_converted_by_value = scope:actor - } - } - } - custom_tooltip = { - text = promised_to_not_convert_character - scope:recipient = { - NOR = { - has_variable = cannot_be_converted_by_value - var:cannot_be_converted_by_value = scope:actor - } - } - } - } -} - -highgod_is_passive_trigger = { - OR = { - religion_tag = buddhism_religion - religion_tag = jainism_religion - religion_tag = taoism_religion - religion_tag = west_african_roog_religion - religion_tag = zunism_religion - } -} - -highgod_is_active_trigger = { - highgod_is_passive_trigger = no -} - - -fertilitygod_is_active_trigger = { - highgod_is_active_trigger = yes -} - - -###REINCARNATION### -can_become_reincarnation_trigger = { - save_temporary_scope_as = reincarnated_child - faith = { - has_doctrine = tenet_reincarnation - } - any_parent = { - is_playable_character = yes - faith = scope:reincarnated_child.faith - } -} - -can_reincarnate_trigger = { - is_alive = no - OR = { - has_trait = temperate - has_trait = greedy - has_trait = generous - has_trait = diligent - has_trait = calm - has_trait = arrogant - has_trait = humble - has_trait = deceitful - has_trait = honest - has_trait = brave - has_trait = gregarious - has_trait = ambitious - has_trait = just - has_trait = zealous - has_trait = compassionate - has_trait = stubborn - has_trait = forgiving - has_trait = lunatic - has_trait = dull - has_trait = intellect_bad - has_trait = shrewd - has_trait = intellect_good - has_trait = strong - has_trait = physique_good - } -} - -is_reincarnation_trigger = { - can_become_reincarnation_trigger = yes - has_variable = reincarnation_of -} - -# Used in faith scope, COUNT is number of faiths to at least have and CHARACTER is who must own them -num_realm_holy_sites_faithful_holders = { - $CHARACTER$ = { save_temporary_scope_as = root_scope } - trigger_if = { - limit = { - exists = $CHARACTER$.confederation - } - custom_description = { - text = direct_realm_holy_sites_held_by_faithful_confederation - subject = $CHARACTER$ - object = this - value = 1 - any_holy_site = { - county = { - save_temporary_scope_as = current_holy_site - is_holy_site_controlled_by = $CHARACTER$ - holder.faith = $CHARACTER$.faith - } - } - } - } - custom_description = { - text = number_realm_holy_sites_held_by_faithful - subject = $CHARACTER$ - object = this - value = $COUNT$ - any_holy_site = { - count >= $COUNT$ - county = { - save_temporary_scope_as = current_holy_site - OR = { - is_holy_site_controlled_by = $CHARACTER$ - $CHARACTER$.confederation ?= { - is_house_based = no # any_confederation_member is not performant for house blocs - any_confederation_member = { - scope:current_holy_site = { - is_holy_site_controlled_by = prev - } - } - } - } - holder.faith = $CHARACTER$.faith - } - } - } -} - -### Head of Faith -can_create_temporal_head_of_faith_title_trigger = { - num_realm_holy_sites_faithful_holders = { - COUNT = holy_sites_to_create_temporal_head_of_faith - CHARACTER = ROOT - } - root = { piety_level >= high_piety_level } - trigger_if = { - limit = { - root = { top_liege != this } - } - custom_description = { - text = cannot_create_hof_title_at_or_above_liege_tier - root.liege.primary_title.tier > tier_duchy - } - } -} - -can_create_spiritual_head_of_faith_title_trigger = { - num_realm_holy_sites_faithful_holders = { - COUNT = holy_sites_to_create_spiritual_head_of_faith - CHARACTER = ROOT - } - root = { piety_level >= medium_piety_level } - trigger_if = { - limit = { has_doctrine = special_doctrine_not_allowed_to_hof } - NOT = { has_doctrine = special_doctrine_not_allowed_to_hof } - } - NAND = { - exists = religious_head - has_doctrine_parameter = maintains_head_of_faith_on_creation - } -} - -# this = Person trying to create the title -can_afford_create_head_of_faith_title_cost_trigger = { - trigger_if = { - limit = { - faith = { - has_doctrine_parameter = temporal_head_of_faith - OR = { - has_doctrine = muhammad_succession_sunni_doctrine - has_doctrine = muhammad_succession_shia_doctrine - } - } - } - trigger_if = { - limit = { NOT = { has_trait = sayyid } } - piety >= massive_piety_value - } - } - trigger_else_if = { - limit = { - faith = { - has_doctrine_parameter = temporal_head_of_faith - } - } - piety >= major_piety_value - } - trigger_else = { - limit = { - faith = { - has_doctrine_parameter = spiritual_head_of_faith - } - } - gold >= medium_gold_max_value - } -} - -# FAITH = The faith we are trying to make the head of faith title for -# this = Person trying to create the title -can_create_head_of_faith_title_trigger = { - $FAITH$ = { - trigger_if = { - limit = { - has_doctrine_parameter = spiritual_head_of_faith - } - can_create_spiritual_head_of_faith_title_trigger = yes - } - trigger_else_if = { - limit = { - has_doctrine_parameter = temporal_head_of_faith - } - can_create_temporal_head_of_faith_title_trigger = yes - } - trigger_else = { - # We shouldn't hit this point, but if we do use the following as error messages. - has_doctrine_parameter = spiritual_head_of_faith - has_doctrine_parameter = temporal_head_of_faith - } - } - can_afford_create_head_of_faith_title_cost_trigger = yes -} - -can_perform_the_hajj_trigger = { - faith.religion = religion:islam_religion - faith = { has_doctrine_parameter = can_go_on_pilgrimage } -} - -shared_faith_or_hof_trigger = { - OR = { - $ACTOR$.faith = $RECIPIENT$.faith - AND = { - exists = $ACTOR$.faith.religious_head - exists = $RECIPIENT$.faith.religious_head - $ACTOR$.faith.religious_head = $RECIPIENT$.faith.religious_head - } - } -} - - -###RELIGIOUS INTERACTIONS### -#Triggers that applies to both Monastery or Holy Order requirements -can_take_religious_vows_trigger = { - can_take_religious_vows_disregard_marriage_trigger = yes - - #Do they have the "wrong" marriage type? - NOR = { - custom_description = { - text = is_married_matrilineally - subject = scope:recipient - any_spouse = { - is_female = yes - matrilinear_marriage = yes - } - } - custom_description = { - text = is_married_patrilineally - subject = scope:recipient - any_spouse = { - is_male = yes - patrilinear_marriage = yes - } - } - custom_description = { - text = matrilinear_betrothal - subject = scope:recipient - betrothed ?= { - is_female = yes - matrilinear_betrothal = yes - } - } - custom_description = { - text = patrilinear_betrothal - subject = scope:recipient - betrothed ?= { - is_male = yes - patrilinear_betrothal = yes - } - } - } - bp2_valid_for_standard_interactions_trigger = yes -} - -can_take_religious_vows_disregard_marriage_trigger = { - is_available_ai = yes - faith = scope:actor.faith - is_ruler = no - NOT = { has_trait = excommunicated } - NOT = { has_character_flag = holy_order_member_requested_return_home } -} - -does_religion_exist_in_world_region_trigger = { # The most efficient way I could think of to essentially do diplomatic range triggers on religions - trigger_if = { - limit = { location = { geographical_region = world_europe } } # Even though europe has many sub regions, it's overall size is small so no need to sub-divide! - any_county_in_region = { - region = world_europe - faith.religion = $RELIGION$ - } - } - trigger_else_if = { - limit = { location = { geographical_region = world_asia_minor } } # Maybe this should be grouped with both the one above and the one below... - any_county_in_region = { - region = world_asia_minor - faith.religion = $RELIGION$ - } - } - trigger_else_if = { - limit = { location = { geographical_region = world_middle_east } } - any_county_in_region = { - region = world_middle_east - faith.religion = $RELIGION$ - } - } - trigger_else_if = { - limit = { - location = { geographical_region = world_india } } - any_county_in_region = { - region = world_india - faith.religion = $RELIGION$ - } - } - trigger_else_if = { - limit = { location = { geographical_region = world_africa } } - any_county_in_region = { - region = world_africa - faith.religion = $RELIGION$ - } - } - trigger_else_if = { - limit = { location = { geographical_region = world_steppe } } - any_county_in_region = { - region = world_steppe - faith.religion = $RELIGION$ - } - } - trigger_else_if = { - limit = { location = { geographical_region = world_asia } } - any_county_in_region = { - region = world_asia - faith.religion = $RELIGION$ - } - } - - trigger_else_if = { # We group two smaller world regions into one - limit = { - location = { - OR = { - geographical_region = world_tibet - geographical_region = world_burma - } - } - } - OR = { - any_county_in_region = { - region = world_tibet - faith.religion = $RELIGION$ - } - any_county_in_region = { - region = world_burma - faith.religion = $RELIGION$ - } - } - } - trigger_else = { always = no } # This should always go at the end of this scripted trigger -} - -### HOLY ORDERS ### -holy_order_1000_holy_order_trigger = { - title = { - NOR = { - has_variable = received_new_land - has_variable = discarded_for_being_too_big - } - } -} - -holy_order_1000_target_barony_trigger = { - tier = tier_barony - barony_is_valid_for_holy_order_lease_trigger = { CHARACTER = $CHARACTER$ } - #Don't grab something that's held by a vassal player of the one receiving the event. - trigger_if = { - limit = { - NOT = { holder = $CHARACTER$ } - } - holder = { is_ai = yes } - } -} - -holy_order_1000_request_target_trigger = { - highest_held_title_tier >= tier_duchy - is_landed_or_landless_administrative = yes - faith = root - is_available = yes - NOR = { - has_character_flag = holy_order_recently_requested_land - has_character_flag = holy_order_recently_received_land - } - save_temporary_scope_as = ruler - any_sub_realm_barony = { - holy_order_1000_target_barony_trigger = { CHARACTER = scope:ruler } - } -} - -faith_dominant_gender_male_or_equal = { - faith = { - OR = { - has_doctrine_parameter = male_dominated_law - has_doctrine_parameter = gender_equal_law - } - } -} - -faith_dominant_gender_female_or_equal = { - faith = { - OR = { - has_doctrine_parameter = female_dominated_law - has_doctrine_parameter = gender_equal_law - } - } -} - -is_theological_character_trigger = { - OR = { - has_trait = theologian - has_trait = devoted - has_trait = order_member - AND = { - is_playable_character = yes - government_has_flag = government_is_theocracy - } - - } -} - -would_be_sinful_adulterer_trigger = { - is_married = yes - trigger_if = { - limit = { is_male = yes } - NOT = { - faith = { has_doctrine = doctrine_adultery_men_accepted } - } - } - trigger_else = { - NOT = { - faith = { has_doctrine = doctrine_adultery_women_accepted } - } - } -} - -has_tolerant_faith_or_culture_trigger = { - OR = { - faith = { has_doctrine = doctrine_pluralism_pluralistic } - culture = { has_cultural_parameter = less_likely_to_force_conversion } - culture = { has_cultural_tradition = tradition_religion_blending } - has_trait = nomadic_philosophy - } -} - -is_open_to_inviting_other_faiths_trigger = { - OR = { - faith = { has_doctrine = tenet_adaptive } - faith = { has_doctrine = unreformed_faith_doctrine } - faith = { has_doctrine = doctrine_pluralism_pluralistic } - culture = { has_cultural_tradition = tradition_religion_blending } - culture = { has_cultural_tradition = tradition_tgp_religious_hospitality } - } -} - -faith_is_open_minded_trigger = { - OR = { - has_doctrine = tenet_adaptive - has_doctrine = doctrine_pluralism_pluralistic - } -} - -is_mainstream_jewish_faith = { - religion = religion:judaism_religion - NOT = { - this = faith:samaritan - this = faith:haymanot - this = faith:malabarism - this = faith:kabarism - } -} - -is_unprotected_hostile_faith = { # Checks if the faith is at least hostile but not protected by a contract, used in a county scope - faith = { - faith_hostility_level = { - target = prev.holder.top_liege.faith - value >= 2 - } - } - holder = { - NOT = { vassal_contract_has_flag = religiously_protected } - } - trigger_if = { # Does anyone in the hierarchy have religious protection? - limit = { - holder = { - any_liege_or_above = { - faith = prev.faith - } - } - } - holder = { - any_liege_or_above = { - NOT = { vassal_contract_has_flag = religiously_protected } - } - } - } -} - -### SYNCRETIC TRIGGERS ### - -islam_or_syncretic_with_islam_trigger = { - $CHARACTER$ = { - faith = { - OR = { - religion = religion:islam_religion - has_doctrine = tenet_islamic_syncretism - } - } - } -} - -judaism_or_syncretic_with_judaism_trigger = { - $CHARACTER$ = { - faith = { - OR = { - religion = religion:judaism_religion - has_doctrine = tenet_jewish_syncretism - } - } - } -} - -christianity_or_syncretic_with_christianity_trigger = { - $CHARACTER$ = { - faith = { - OR = { - religion = religion:christianity_religion - has_doctrine = tenet_christian_syncretism - } - } - } -} - -unreformed_or_syncretic_with_unreformed_trigger = { - $CHARACTER$ = { - faith = { - OR = { - religion = religion:unreformed_religion - has_doctrine = tenet_unreformed_syncretism - } - } - } -} - -zoroastrian_or_syncretic_with_eastern_trigger = { - $CHARACTER$ = { - faith = { - OR = { - religion = religion:zoroastrianism_religion - has_doctrine = tenet_eastern_syncretism - } - } - } -} - -#Used on faiths -is_dharmic_faith_trigger = { - OR = { - religion = religion:hinduism_religion - religion = religion:buddhism_religion - religion = religion:jainism_religion - } -} - -#Used on provinces -has_holy_building = { - OR = { - has_building_or_higher = holy_site_cathedral_01 - has_building_or_higher = holy_site_mosque_01 - has_building_or_higher = holy_site_pagan_grand_temple_01 - has_building_or_higher = holy_site_indian_grand_temple_01 - has_building_or_higher = holy_site_other_grand_temple_01 - has_building_or_higher = holy_site_cologne_cathedral_01 - has_building_or_higher = holy_site_canterbury_cathedral_01 - has_building_or_higher = temple_of_uppsala_01 - has_building_or_higher = lund_cathedral_01 - has_building_or_higher = notre_dame_01 - has_building_or_higher = holy_site_imam_ali_mosque_01 - has_building_or_higher = holy_site_great_mosque_of_mecca_01 - has_building_or_higher = holy_site_great_mosque_of_cordoba_01 - has_building_or_higher = holy_site_great_mosque_of_djenne_01 - has_building_or_higher = holy_site_great_mosque_of_samarra_01 - has_building_or_higher = holy_site_prophetic_mosque_01 - has_building_or_higher = brihadeeswarar_temple_01 - has_building_or_higher = shwedagon_pagoda_01 - has_building_or_higher = ananda_temple_01 - has_building_or_higher = the_friday_mosque_01 - has_building_or_higher = dome_of_the_rock_01 - has_building_or_higher = temple_in_jerusalem_01 - has_building_or_higher = cluny_abbey_01 - has_building_or_higher = damascus_mosque_01 - has_building_or_higher = jokhang_01 - has_building_or_higher = beta_giyorgis_01 - has_building_or_higher = holy_wisdom_01 - has_building_or_higher = duomo_florence_01 - has_building_or_higher = konark_temple_01 - has_building_or_higher = wawel_cathedral_01 - has_building_or_higher = vatapi_caves_01 - # TGP - has_building_or_higher = holy_site_buddhist_grand_temple_01 - has_building_or_higher = holy_site_japanese_temple_01 - has_building_or_higher = holy_site_chinese_temple_01 - has_building_or_higher = holy_site_se_asia_pagan_temple_01 - has_building_or_higher = kofuku_ji_01 - has_building_or_higher = enryaku_ji_01 - has_building_or_higher = hwangnyongsa_01 - has_building_or_higher = besakih_temple_01 - has_building_or_higher = dau_temple_01 - has_building_or_higher = hanging_temple_01 - has_building_or_higher = liuhe_pagoda_01 - has_building_or_higher = pagoda_of_fogong_temple_01 - has_building_or_higher = giant_wild_goose_pagoda_01 - has_building_or_higher = maoshan_academy_01 - has_building_or_higher = tiantai_monasteries_01 - has_building_or_higher = jizu_shan_temples_01 - has_building_or_higher = nanhua_temple_01 - } -} - -invalid_for_heresy_events = { - OR = { - this = faith:conversos - this = faith:insular_celtic - this = faith:bosnian_church - this = faith:mozarabic_church - this = faith:adamites - this = faith:kabarism - } -} - -is_faith_dominant_gender = { - OR = { - AND = { - is_male = yes - faith = { - OR = { - has_doctrine_parameter = male_dominated_law - has_doctrine_parameter = gender_equal_law - } - } - } - AND = { - is_female = yes - faith = { - OR = { - has_doctrine_parameter = female_dominated_law - has_doctrine_parameter = gender_equal_law - } - } - } - } -} - -religion_is_broadly_asian_trigger = { - OR = { - religion_is_east_asian_trigger = yes - broadly_dharmic_trigger = yes - broadly_chinese_religion_trigger = yes - } -} - -religion_is_east_asian_trigger = { - OR = { - faith.religion = religion:buddhism_religion - faith.religion = religion:confucianism_religion - faith.religion = religion:taoism_religion - faith.religion = religion:shintoism_religion - } -} - -broadly_dharmic_trigger = { - OR = { - faith.religion = religion:buddhism_religion - faith.religion = religion:hinduism_religion - faith.religion = religion:jainism_religion - faith.religion = religion:bon_religion - faith.religion = religion:dab_qhuas_religion - faith.religion = religion:aluk_religion - faith.religion = religion:dayawism_religion - faith.religion = religion:hantuism_religion - faith.religion = religion:kaharingan_religion - faith.religion = religion:satsana_phi_religion - faith.religion = religion:tolotang_religion - faith.religion = religion:utaki_religion - faith.religion = religion:bimoism_religion - faith.religion = religion:moism_religion - faith.religion = religion:muism_religion - faith.religion = religion:qiangic_religion - } -} - -south_east_asian_pagan_trigger = { - OR = { - faith.religion = religion:aluk_religion - faith.religion = religion:dayawism_religion - faith.religion = religion:hantuism_religion - faith.religion = religion:kaharingan_religion - faith.religion = religion:tolotang_religion - faith.religion = religion:biliku_religion - } -} - -broadly_jungle_dwelling_trigger = { - culture = { - OR = { - has_cultural_pillar = heritage_austronesian - has_cultural_pillar = heritage_burman - has_cultural_pillar = heritage_tai - has_cultural_pillar = heritage_hmongic - has_cultural_pillar = heritage_dravidian - has_cultural_pillar = heritage_malayic - has_cultural_pillar = heritage_mon_khmer - has_cultural_pillar = heritage_viet - has_cultural_pillar = heritage_indo_aryan - } - } -} - -broadly_chinese_religion_trigger = { - OR = { - faith.religion = religion:taoism_religion - faith.religion = religion:confucianism_religion - } -} - -broadly_mainland_east_asian_heritage_trigger = { - culture = { - OR = { - has_cultural_pillar = heritage_chinese - has_cultural_pillar = heritage_korean - has_cultural_pillar = heritage_buyeo - has_cultural_pillar = heritage_qiangic - has_cultural_pillar = heritage_viet - } - } -} - -broadly_japanese_island_heritage_trigger = { - culture = { - OR = { - has_cultural_pillar = heritage_japonic - has_cultural_pillar = heritage_ainuic - } - } -} diff --git a/N3OW/common/scripted_triggers/00_rich_presence_triggers.txt b/N3OW/common/scripted_triggers/00_rich_presence_triggers.txt deleted file mode 100644 index b9313cc0..00000000 --- a/N3OW/common/scripted_triggers/00_rich_presence_triggers.txt +++ /dev/null @@ -1,18 +0,0 @@ -is_murder_activity_trigger = { - OR = { - AND = { - has_activity_type = activity_wedding - has_activity_option = { - category = special_type - option = wedding_type_bloody - } - } - AND = { - has_activity_type = activity_feast - has_activity_option = { - category = special_type - option = feast_type_murder - } - } - } -} diff --git a/N3OW/common/scripted_triggers/00_roaming_activity_triggers.txt b/N3OW/common/scripted_triggers/00_roaming_activity_triggers.txt deleted file mode 100644 index b57bc6be..00000000 --- a/N3OW/common/scripted_triggers/00_roaming_activity_triggers.txt +++ /dev/null @@ -1,88 +0,0 @@ -roaming_activity_intro_base_trigger = { - terrain = $TERRAIN$ - roaming_activity_winter_trigger = no - roaming_activity_monsoon_trigger = no -} - -roaming_activity_intro_base_two_trigger = { - OR = { - terrain = $TERRAIN$ - terrain = $TERRAIN_2$ - } - roaming_activity_winter_trigger = no - roaming_activity_monsoon_trigger = no -} - -roaming_activity_intro_base_three_trigger = { - OR = { - terrain = $TERRAIN$ - terrain = $TERRAIN_2$ - terrain = $TERRAIN_3$ - } - roaming_activity_winter_trigger = no - roaming_activity_monsoon_trigger = no -} - -roaming_activity_intro_winter_trigger = { - terrain = $TERRAIN$ - roaming_activity_winter_trigger = yes -} - -roaming_activity_intro_winter_two_trigger = { - OR = { - terrain = $TERRAIN$ - terrain = $TERRAIN_2$ - } - roaming_activity_winter_trigger = yes -} - -roaming_activity_winter_trigger = { - has_winter_trigger = yes - NOR = { - terrain = desert - terrain = desert_mountains - terrain = drylands - terrain = oasis - terrain = floodplains - } -} - -roaming_activity_intro_monsoon_trigger = { - terrain = $TERRAIN$ - roaming_activity_monsoon_trigger = yes -} - -roaming_activity_intro_monsoon_two_trigger = { - OR = { - terrain = $TERRAIN$ - terrain = $TERRAIN_2$ - } - roaming_activity_monsoon_trigger = yes -} - -roaming_activity_monsoon_trigger = { - tropical_seasons_region_trigger = yes - middle_of_year_season_trigger = yes - NOR = { - terrain = taiga - terrain = steppe - } -} - -roaming_activity_special_guest_trigger = { - this != scope:host - court_owner ?= scope:host - is_healthy = yes - is_available = yes - age >= 12 - is_ai = yes - OR = { - is_close_family_of = scope:host - is_spouse_of = scope:host - has_relation_friend = scope:host - has_relation_best_friend = scope:host - has_relation_lover = scope:host - is_knight_of = scope:host - } -} - diff --git a/N3OW/common/scripted_triggers/00_romance_and_seduction_triggers.txt b/N3OW/common/scripted_triggers/00_romance_and_seduction_triggers.txt deleted file mode 100644 index 4d6f570b..00000000 --- a/N3OW/common/scripted_triggers/00_romance_and_seduction_triggers.txt +++ /dev/null @@ -1,767 +0,0 @@ - -###TRIGGER LIST - -###SEDUCE SCHEME## -# use_seduce_secrecy_trigger - - -###SEXUAL ORITENTATION### -# attracted_to_same_gender_trigger_trigger -# attracted_to_opposite_gender_trigger_trigger -# attracted_to_all_genders_trigger -# matching_gender_and_sexuality_trigger - -###INCEST### -# accepts_incest_with_trigger -# accepts_incest_with_each_other_trigger -# likely_to_commit_incest_trigger -# likely_to_commit_incest_with_trigger - -###ATTRACTION### -# possibly_interested_in_root_trigger -# possible_mutual_interest_trigger -# object_of_importance_exist_trigger - -### CHEATING #### -# might_cheat_on_partner_trigger - If scope would at all be willing to cheat, baseline that must be passed -# might_cheat_on_every_partner_trigger - checks might_cheat_on_partner_trigger on every partner -# dislikes_partner_cheating_trigger - - -### PREGNANCY & STDs ### -# possible_pregnancy_after_sex_with_character_trigger - requries root and other character - - -###SEDUCE SCHEME TRIGGERS### - -use_seduce_secrecy_trigger = { - $OWNER$ ?= { is_alive = yes } - $TARGET$ ?= { is_alive = yes } - $TARGET$ = { - NOR = { - is_consort_of = $OWNER$ - is_courtier_of = $OWNER$ - } - } -} - - -court_allow_owner_opt_out_trigger = { - NAND = { - is_ai = yes - scope:target = { is_ai = no } - } -} - -###SEXUAL ORIENTATION TRIGGERS### -has_sexual_orientation_trigger = { - OR = { - has_sexuality = heterosexual - has_sexuality = bisexual - has_sexuality = homosexual - has_sexuality = asexual - } -} - -attracted_to_same_gender_trigger = { - OR = { - has_sexuality = bisexual - has_sexuality = homosexual - } -} - -attracted_to_opposite_gender_trigger = { - OR = { - has_sexuality = bisexual - has_sexuality = heterosexual - } -} - -attracted_to_all_genders_trigger = { - has_sexuality = bisexual -} - - -#Needs CHARACTER_1 and CHARACTER_2 -matching_gender_and_sexuality_trigger = { - $CHARACTER_1$ = { is_attracted_to_gender_of = $CHARACTER_2$ } - $CHARACTER_2$ = { is_attracted_to_gender_of = $CHARACTER_1$ } -} - - - - - - -###ATTRACTION### - -possibly_interested_in_root_trigger = { - OR = { - AND = { #Is not related to Root, or has an indicator that they would be interested anyways - NOR = { - any_sibling = { - this = root - } - any_parent = { - this = root - } - any_child = { - this = root - } - } - OR = { - has_relation_crush = root - has_relation_lover = root - has_relation_potential_lover = root - AND = { - is_attracted_to_men = yes - root = { is_male = yes } - } - AND = { - is_attracted_to_women = yes - root = { is_female = yes } - } - } - } - AND = { - OR = { - any_sibling = { - this = root - } - any_parent = { - this = root - } - any_child = { - this = root - } - } - OR = { - has_relation_crush = root - has_relation_lover = root - has_relation_potential_lover = root - } - } - } -} - -possibly_interested_in_character_trigger = { - OR = { - AND = { #Is not related to Root, or has an indicator that they would be interested anyways - NOR = { - any_sibling = { - this = $CHARACTER$ - } - any_parent = { - this = $CHARACTER$ - } - any_child = { - this = $CHARACTER$ - } - } - OR = { - has_relation_crush = $CHARACTER$ - has_relation_lover = $CHARACTER$ - has_relation_potential_lover = $CHARACTER$ - AND = { - is_attracted_to_men = yes - $CHARACTER$ = { is_male = yes } - } - AND = { - is_attracted_to_women = yes - $CHARACTER$ = { is_female = yes } - } - } - } - AND = { - OR = { - any_sibling = { - this = $CHARACTER$ - } - any_parent = { - this = $CHARACTER$ - } - any_child = { - this = $CHARACTER$ - } - } - OR = { - has_relation_crush = $CHARACTER$ - has_relation_lover = $CHARACTER$ - has_relation_potential_lover = $CHARACTER$ - } - } - } -} - -possible_mutual_interest_trigger = { - NOT ={ $CHARACTER_1$ = $CHARACTER_2$ } #Cannot be an event target for yourself - $CHARACTER_1$ = { - OR = { #Not related etc. - AND = { - NOT = { - any_sibling = { - this = $CHARACTER_2$ - } - } - NOT = { - any_parent = { - this = $CHARACTER_2$ - } - } - NOT = { - any_child = { - this = $CHARACTER_2$ - } - } - } - has_relation_crush = $CHARACTER_2$ - has_relation_lover = $CHARACTER_2$ - has_opinion_modifier = { - modifier = love_opinion - target = $CHARACTER_2$ - } - } - } - $CHARACTER_2$ = { - OR = { - AND = { #Not related etc. - NOT = { - any_sibling = { - this = $CHARACTER_1$ - } - } - NOT = { - any_parent = { - this = $CHARACTER_1$ - } - } - NOT = { - any_child = { - this = $CHARACTER_1$ - } - } - } - has_relation_crush = $CHARACTER_1$ - has_relation_lover = $CHARACTER_1$ - has_opinion_modifier = { - modifier = love_opinion - target = $CHARACTER_1$ - } - } - } - $CHARACTER_1$ = { - OR = { - AND = { - is_attracted_to_men = yes - $CHARACTER_2$ = { is_male = yes } - } - AND = { - is_attracted_to_women = yes - $CHARACTER_2$ = { is_female = yes } - } - } - } - $CHARACTER_2$ = { - OR = { - AND = { - is_attracted_to_men = yes - $CHARACTER_1$ = { is_male = yes } - } - AND = { - is_attracted_to_women = yes - $CHARACTER_1$ = { is_female = yes } - } - } - } -} - - -#To check if either of two lovers have a object of importance saved - #Use LOVER to slot in the non-scope character! -object_of_importance_exist_trigger = { - save_temporary_scope_as = original_scope - OR = { - AND = { - has_variable_list = lover_object_of_importance - variable_list_size = { - name = lover_object_of_importance - value = 2 - } - is_target_in_variable_list = { - name = lover_object_of_importance - target = $LOVER$ - } - } - AND = { - has_variable_list = lover_object_of_importance_2 - variable_list_size = { - name = lover_object_of_importance_2 - value = 2 - } - is_target_in_variable_list = { - name = lover_object_of_importance_2 - target = $LOVER$ - } - } - $LOVER$ = { - has_variable_list = lover_object_of_importance - variable_list_size = { - name = lover_object_of_importance - value = 2 - } - is_target_in_variable_list = { - name = lover_object_of_importance - target = scope:original_scope - } - } - $LOVER$ = { - has_variable_list = lover_object_of_importance_2 - variable_list_size = { - name = lover_object_of_importance_2 - value = 2 - } - is_target_in_variable_list = { - name = lover_object_of_importance_2 - target = scope:original_scope - } - } - } -} - - -might_cheat_on_partner_trigger = { - NOT = { has_trait = celibate } - is_eunuch_trigger = no - trigger_if = { - limit = { is_ai = no } - # Players always have the option to cheat - we check this here so that we don't constantly need to OR it when using might_cheat_on_every_partner_trigger. - always = yes - } - trigger_if = { - limit = { - $PARTNER$ = { - government_has_flag = government_is_nomadic - } - } - NOT = { - $PARTNER$ = { - domicile ?= { - has_domicile_parameter = nomad_yurt_spouse_will_not_cheat - } - } - } - } - trigger_else_if = { - limit = { - # If $PARTNER$ isn't actually my partner, it's not cheating! - OR = { - has_relation_lover = $PARTNER$ - is_consort_of = $PARTNER$ # Includes both spouses and concubines - } - # Additionally, in faiths with the Polyamory doctrine, extramarital relationships aren't considered to be cheating on partners. - # Additionally, some cultures do not have scruples about extramarital relationships. - accepts_adultery_without_penalty_trigger = no - } - - NOT = { has_trait = loyal } # Loyal people never cheat - - # Soulmates never cheat, unless they're Lustful/Seducer and have low Honor - trigger_if = { - limit = { has_relation_soulmate = $PARTNER$ } - ai_honor <= medium_negative_ai_value - calc_true_if = { - amount >= 2 - has_trait = lustful - has_trait = seducer - has_focus = intrigue_temptation_focus - } - } - # Non-soulmates have slightly more complex criteria - trigger_else = { - OR = { - # Having one of these things that makes characters always willing to cheat: - OR = { - has_trait = lustful - has_trait = seducer - has_focus = intrigue_temptation_focus - # Dishonorable and callous enough to not care about current partners (regardless of opinion). - AND = { - ai_compassion <= high_negative_ai_value - ai_honor <= high_negative_ai_value - } - # Needs aren't getting met. - AND = { - is_deviant_trigger = yes - $PARTNER$ = { is_deviant_trigger = no } - } - # Rakish character that's about to have a mental breakdown. - AND = { - has_trait = rakish - stress_level >= 2 - } - } - - # Calc for honour. - ## Characters with really lacking honour might cheat even at decently opinion positive levels. - trigger_if = { - limit = { ai_honor <= high_negative_ai_value } - # Consorts (spouses, concubines). - trigger_if = { - limit = { is_consort_of = $PARTNER$ } - opinion = { - target = $PARTNER$ - value <= medium_positive_opinion - } - } - # Lovers. - trigger_else = { - opinion = { - target = $PARTNER$ - value <= high_positive_opinion - } - } - } - ## Characters with at least some honour require much less happy relationships. - trigger_else_if = { - limit = { ai_honor <= medium_positive_ai_value } - # Consorts (spouses, concubines). - trigger_if = { - limit = { is_consort_of = $PARTNER$ } - # Consorts (spouses, concubines) - opinion = { - target = $PARTNER$ - value <= neutral_opinion - } - } - # Lovers. - trigger_else = { - opinion = { - target = $PARTNER$ - value <= low_positive_opinion # 80 for lovers - } - } - } - ## Finally, characters might also cheat if they just dislike their partner enough, regardless of honor. - trigger_else = { - opinion = { - target = $PARTNER$ - value <= high_negative_opinion - } - } - } - } - } - # Having an extramarital relationship with someone else would not count as cheating on this person. - trigger_else = { always = yes } -} - -might_cheat_on_every_partner_trigger = { - save_temporary_scope_as = potential_cheater - is_eunuch_trigger = no - NOT = { has_trait = celibate } - any_spouse = { - count = all - save_temporary_scope_as = partner2 - scope:potential_cheater = { might_cheat_on_partner_trigger = { PARTNER = scope:partner2 } } - } - any_relation = { - type = lover - count = all - save_temporary_scope_as = partner3 - scope:potential_cheater = { might_cheat_on_partner_trigger = { PARTNER = scope:partner3 } } - } -} - - -dislikes_partner_cheating_trigger = { - trigger_if = { - limit = { - OR = { - has_relation_lover = $PARTNER$ - is_consort_of = $PARTNER$ - } - } - $PARTNER$ = { save_temporary_scope_as = cheating_trigger_partner } - save_temporary_scope_as = cheating_trigger_root - OR = { - AND = { - has_relation_soulmate = $PARTNER$ # Soulmates are exclusive - accepts_adultery_without_penalty_trigger = no - } - AND = { # Feels slighted - is_consort_of = $PARTNER$ - trait_is_shunned_or_criminal_in_faith_trigger = { - TRAIT = adulterer - FAITH = scope:cheating_trigger_root.faith - GENDER_CHARACTER = scope:cheating_trigger_partner - } - OR = { - ai_honor >= 0 - ai_zeal >= 0 - has_trait = arrogant - ai_vengefulness <= 0 - } - } - opinion = { # Loves partner - target = $PARTNER$ - value >= high_positive_opinion - } - } - NAND = { # Sexually liberal characters don't mind, unless you're exclusive - sexually_liberal_trigger = yes - NOT = { has_relation_soulmate = $PARTNER$ } - } - } - trigger_else = { always = no } # Partner isn't my partner, so I don't care -} - -#Would a soulmate expect you to be exclusively with them? -soulmate_relation_is_exclusive_trigger = { - accepts_adultery_without_penalty_trigger = no -} - -sexually_liberal_trigger = { - OR = { - is_deviant_trigger = yes - has_trait = lustful - has_trait = seducer - faith = { trait_is_virtue = lustful } - AND = { - exists = scope:activity - has_activity_intent = lechery_intent - } - } - NOR = { - has_trait = chaste - has_trait = celibate - } -} - -has_lustful_adjacent_trait_trigger = { - OR = { - is_deviant_trigger = yes - has_trait = lustful - has_trait = seducer - has_trait = rakish - faith = { trait_is_virtue = lustful } - AND = { - exists = scope:activity - has_activity_intent = lechery_intent - } - } - NOR = { - has_trait = chaste - has_trait = celibate - } -} - -#Can this character ever have an affair? Counts both inability and whether sex outside marriage is counted as religiously problematic for them. -eligible_for_affairs_trigger = { - NOR = { - has_trait = celibate - #Technically (and, historically, frequently) eunuchs can still have affairs, they just aren't able to impregnate. - OR = { - accepts_adultery_without_penalty_trigger = yes - trait_is_shunned_or_criminal_in_faith_trigger = { - TRAIT = adulterer - FAITH = root.faith - GENDER_CHARACTER = root - } - trait_is_shunned_or_criminal_in_faith_trigger = { - TRAIT = fornicator - FAITH = root.faith - GENDER_CHARACTER = root - } - } - } -} - - -freely_accepts_sodomy_with_trigger = { #Will ignore sodomy consequences (because there are none or they have done this before) - OR = { - NOT = { relation_with_character_is_sodomy_in_my_or_lieges_faith_trigger = { CHARACTER = $CHARACTER$ } } - has_trait = deviant - has_trait = sodomite - any_secret = { type = secret_homosexual } - } -} - -# 100% fine with incest with CHARACTER. Important: There are also other factors to attraction! This isn't 100% acceptance of romantic/sexual relationship. -accepts_incest_with_trigger = { - OR = { - NOT = { is_close_or_extended_family_of = $CHARACTER$ } #Actually no incest here! - is_incestuous_trigger = yes - has_relation_potential_lover = $CHARACTER$ - has_relation_lover = $CHARACTER$ - } - save_temporary_scope_as = incest_evaluation - NOT = { #under 20 trigger is a HARD limit - guaranteed_under_20_incest_rejection_trigger = { - TARGET = scope:incest_evaluation - SEDUCER = $CHARACTER$ - } - } -} - -accepts_incest_with_each_other_trigger = { - $CHARACTER_2$ = { - accepts_incest_with_trigger = { - CHARACTER = $CHARACTER_1$ - } - } - $CHARACTER_1$ = { - accepts_incest_with_trigger = { - CHARACTER = $CHARACTER_2$ - } - } -} - -#Is likely to be okay with incest broadly -likely_to_commit_incest_trigger = { - OR = { - AND = { - sexually_liberal_trigger = yes - OR = { - # Doesn't care much about social taboo - has_trait = callous - has_trait = cynical - has_trait = eccentric - # Lack of contact with other members of their attracted sex - has_trait = reclusive - has_trait = shy - # They think they can get away with it - has_trait = deceitful - } - } - # A bit of a weirdo - is_deviant_trigger = yes - # I've incested before, I will incest again! - is_incestuous_trigger = yes - # Trauma - stress_level >= 2 - } - save_temporary_scope_as = incest_evaluation - NOT = { #under 20 trigger is a HARD limit - guaranteed_under_20_incest_rejection_trigger = { - TARGET = scope:incest_evaluation - SEDUCER = $CHARACTER$ - } - } -} - -likely_to_commit_incest_with_trigger = { - OR = { - NOT = { # Not incest - $CHARACTER_1$ = { - relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = $CHARACTER_2$ } - } - } - $CHARACTER_1$ = { - OR = { - AND = { - sexually_liberal_trigger = yes - OR = { - # Doesn't care much about social taboo - has_trait = callous - has_trait = cynical - has_trait = eccentric - # Lack of contact with other members of their attracted sex - has_trait = reclusive - has_trait = shy - # They think they can get away with it - has_trait = deceitful - } - # Only if the other character is also likely to accept in this case - $CHARACTER_2$ = { - sexually_liberal_trigger = yes - OR = { - # Doesn't care much about social taboo - has_trait = callous - has_trait = cynical - has_trait = eccentric - # Lack of contact with other members of their attracted sex - has_trait = reclusive - has_trait = shy - # Deceitful trigger not present here because CHARACTER_1 is assumed to be the instigator, CHARACTER_2 doesn't necessarily actively want this, so getting away with it wouldn't motivate them into doing it - is_incestuous_trigger = yes - is_deviant_trigger = yes - } - } - } - # A bit of a weirdo - is_deviant_trigger = yes - # I've incested before, I will incest again! - is_incestuous_trigger = yes - # Shared trauma - AND = { - any_relation = { - type = rival - has_relation_rival = $CHARACTER_2$ - } - stress_level >= 1 - } - } - save_temporary_scope_as = incest_evaluation - NOT = { #under 20 trigger is a HARD limit - guaranteed_under_20_incest_rejection_trigger = { - TARGET = scope:incest_evaluation - SEDUCER = $CHARACTER_1$ - } - } - } - } -} - -guaranteed_under_20_incest_rejection_trigger = { - $TARGET$ = { - NOT = { is_consort_of = $SEDUCER$ } - is_close_or_extended_family_of = $SEDUCER$ - age < 20 - age < $SEDUCER$.age - is_ai = yes #Players are allowed to choose - } -} - -### PREGNANCY & STDs ### -possible_pregnancy_after_sex_with_character_trigger = { - trigger_if = { - limit = { - is_male = yes - $CHARACTER$ = { is_female = yes } - } - is_visibly_fertile = yes - fertility >= 0.1 - - $CHARACTER$ ={ - is_visibly_fertile = yes - fertility >= 0.1 - is_pregnant = no - } - } - - trigger_if = { - limit = { - is_female = yes - $CHARACTER$ = { is_male = yes } - } - is_visibly_fertile = yes - fertility >= 0.1 - is_pregnant = no - - $CHARACTER$ = { - is_visibly_fertile = yes - fertility >= 0.1 - } - } -} - -accepts_adultery_without_penalty_trigger = { - OR = { - faith = { has_doctrine_parameter = no_unfaithfulness_penalty_active } - culture = { has_cultural_parameter = adultery_always_accepted } - AND = { - government_has_flag = government_is_mandala - house ?= { has_house_power_parameter = aspect_of_creation } - } - } -} diff --git a/N3OW/common/scripted_triggers/00_scheme_befriend_triggers.txt b/N3OW/common/scripted_triggers/00_scheme_befriend_triggers.txt deleted file mode 100644 index 29781651..00000000 --- a/N3OW/common/scripted_triggers/00_scheme_befriend_triggers.txt +++ /dev/null @@ -1,49 +0,0 @@ -#Scripted triggers relating to the Befriend Scheme - -##################################################################### -# TRIGGER LIST -##################################################################### -# !!! Remember to add all new triggers with a short description here !!! - -#befriend_target_is_close_to_owner_trigger <-Indicates someone is close to you already - -###################################################################### -# TRIGGERS -###################################################################### - -befriend_target_is_close_to_owner_trigger = { - OR = { - is_close_or_extended_family_of = scope:target - is_consort_of = scope:target - is_employer_of = scope:target - } -} - -befriend_owner_is_close_to_target_trigger = { - OR = { - is_close_or_extended_family_of = scope:owner - is_consort_of = scope:owner - court_owner = scope:owner - } -} - -befriend_scope_is_close_to_target_trigger = { - OR = { - is_close_or_extended_family_of = scope:target - is_consort_of = scope:target - has_relation_friend = scope:target - AND = { - OR = { - court_owner = scope:target - liege ?= scope:target - any_vassal = { - this = scope:target - } - } - reverse_opinion = { - target = scope:target - value > 30 - } - } - } -} diff --git a/N3OW/common/scripted_triggers/00_scheme_triggers.txt b/N3OW/common/scripted_triggers/00_scheme_triggers.txt deleted file mode 100644 index adf08a91..00000000 --- a/N3OW/common/scripted_triggers/00_scheme_triggers.txt +++ /dev/null @@ -1,924 +0,0 @@ - -diplomacy_scheme_trigger = { - OR = { - scheme_type = befriend - scheme_type = sway - scheme_type = courting - } -} - -intrigue_scheme_trigger = { - OR = { - scheme_type = murder - scheme_type = abduct - scheme_type = fabricate_hook - scheme_type = steal_back_artifact - } -} - -# Should be synced with the schemes listed in can_start_hostile_scheme_against_trigger. -hostile_scheme_trigger = { - OR = { - scheme_type = murder - scheme_type = abduct - scheme_type = claim_throne - scheme_type = fabricate_hook - scheme_type = steal_back_artifact - } -} - -friendly_scheme_trigger = { - OR = { - scheme_type = seduce - scheme_type = befriend - scheme_type = sway - scheme_type = courting - } -} - -# Should be synced with the schemes listed in hostile_scheme_trigger. -can_start_hostile_scheme_against_trigger = { - OR = { - can_start_scheme = { - type = murder - target_character = $TARGET$ - } - can_start_scheme = { - type = abduct - target_character = $TARGET$ - } - can_start_scheme = { - type = claim_throne - target_character = $TARGET$ - } - can_start_scheme = { - type = fabricate_hook - target_character = $TARGET$ - } - can_start_scheme = { - type = steal_back_artifact - target_character = $TARGET$ - } - } -} - -agent_valid_to_be_discovered_by_spymaster = { - trigger_if = { - limit = { - exists = scope:target.court_owner.cp:councillor_spymaster - } - this != scope:target.court_owner.cp:councillor_spymaster - } - NOT = { - has_character_flag = free_to_scheme - } - trigger_if = { - limit = { - exists = scope:target.court_owner - } - NOR = { - reverse_has_opinion_modifier = { - target = scope:target.court_owner - modifier = scheming_against_me - } - reverse_has_opinion_modifier = { - target = scope:target.court_owner - modifier = schemed_against_me - } - } - } -} - -personal_scheme_should_not_evaluate_tier_differences_trigger = { - # Your spouse doesn't care if you're a different rank than them. - scope:owner = { - NOT = { is_consort_of = scope:target } - } - # And laamps are never bothered either way. - scope:owner = { is_landless_adventurer = no } - scope:target = { is_landless_adventurer = no } -} - -personal_scheme_success_compare_target_liege_tier_trigger = { - is_landed_or_landless_administrative = no - exists = liege - OR = { - is_spouse_of = liege - is_close_family_of = liege - dynasty = liege.dynasty - } -} - -is_good_familial_murder_target_trigger = { - root = { - can_start_scheme = { - target_character = prev - type = murder - } - OR = { - AND = { # Psychopaths ignore opinion... - ai_greed >= very_high_positive_ai_value - ai_compassion <= very_high_negative_ai_value - has_trait = sadistic # Make sadistic people able to murder their own children - } - AND = { # Very greedy and non-compassionate characters almost ignore opinion... - ai_greed >= very_high_positive_ai_value - ai_compassion <= high_negative_ai_value - opinion = { - target = prev - value <= medium_positive_opinion - } - } - AND = { # Significantly greedy and non-compassionate characters can murder even at positive opinion - ai_greed >= high_positive_ai_value - ai_compassion < 0 - opinion = { - target = prev - value <= low_positive_opinion - } - } - AND = { # Somewhat greedy characters can murder people they just barely dislike... - ai_greed >= medium_positive_ai_value - opinion = { - target = prev - value <= low_negative_opinion - } - } - AND = { # Otherwise, their opinion must be rather poor... - opinion = { - target = prev - value <= medium_negative_opinion - } - } - } - } - NOR = { - has_opinion_modifier = { - modifier = received_title_county - target = root - } - has_opinion_modifier = { - modifier = received_title_duchy - target = root - } - has_opinion_modifier = { - modifier = received_title_kingdom - target = root - } - has_opinion_modifier = { - modifier = received_title_empire - target = root - } - } - #is a valid murder target if scheme owner is in line of succession to any of target's titles or at least 3rd in line of succession to any titles the target is 1st to inherit - OR = { - any_held_title = { - tier >= root.highest_held_title_tier - place_in_line_of_succession = { - target = root - value <= { - value = 2 - if = { - limit = { root.highest_held_title_tier > tier_barony } - add = 1 - } - } - } - } - any_heir_title = { - holder != root - tier >= root.highest_held_title_tier - place_in_line_of_succession = { - target = root - value <= { - value = 2 - if = { - limit = { root.highest_held_title_tier > tier_barony } - add = 1 - } - } - } - } - } -} - -# This trigger is a bit contrived in some way to ensure absolutely everyone gets evaluated without any early-outing -# It should always return true -# We use "count = all" and trigger_ifs to ensure that all have to be evaluated, and that all return -build_murder_targets_trigger = { - any_relation = { # Rivals are good targets for murder schemes - type = rival - count = all - trigger_if = { - limit = { - root = { - trigger_if = { - limit = { - has_relation_nemesis = prev - } - ai_honor <= medium_positive_ai_value - } - trigger_else = { - ai_honor <= low_positive_ai_value - } - can_start_scheme = { - target_character = prev - type = murder - } - } - } - add_to_temporary_list = murder_targets - } - } - trigger_if = { # Greedy people have no qualms murdering their way up the succession... - limit = { - ai_greed >= low_positive_ai_value - exists = dynasty - } - dynasty = { - any_dynasty_member = { - count = all - trigger_if = { - limit = { - is_good_familial_murder_target_trigger = yes - } - add_to_temporary_list = murder_targets - } - } - } - any_close_or_extended_family_member = { - count = all - trigger_if = { - limit = { - NOT = { is_in_list = murder_targets } - is_good_familial_murder_target_trigger = yes - } - add_to_temporary_list = murder_targets - } - } - } - trigger_if = { # Greedy people want to murder their liege's high aptitude tax collector... - limit = { - ai_greed >= low_positive_ai_value - top_liege != this - government_has_flag = government_is_clan - liege ?= { - any_tax_collector = { - any_tax_collector_vassal = { - this = root - } - tax_collector_aptitude = { - target = clan_tax_slot - value >= 4 - } - add_to_temporary_list = murder_targets - } - } - } - } - trigger_if = { # Some Clan members want to murder Extolled people out of pure spite and malice - limit = { - ai_greed >= 0 - ai_vengefulness >= 0 - ai_compassion <= medium_negative_ai_value - house.house_head ?= { - is_ruler = yes - government_has_flag = government_is_clan - } - ai_wants_low_unity = yes - } - house = { - any_house_member = { - has_trait = extolled - add_to_temporary_list = murder_targets - } - } - } - any_consort = { # Unfaithful spouses - trigger_if = { - limit = { - root = { - ai_compassion <= 0 - can_start_scheme = { - target_character = prev - type = murder - } - } - exposed_cheating_on_spouse_trigger = { SPOUSE = root } - add_to_temporary_list = murder_targets - } - } - } - trigger_if = { # Certain vassals will plot against their liege under certain conditions - limit = { - highest_held_title_tier > tier_barony - liege ?= { - tyranny >= medium_tyranny - } - opinion = { - target = liege - value <= high_negative_opinion - } - ai_rationality >= medium_positive_ai_value - } - liege = { - add_to_temporary_list = murder_targets - } - } - trigger_if = { # Murdering troublesome claimants is something you want to do... - limit = { - is_landed = yes - primary_title.tier >= tier_duchy - any_targeting_faction = { - faction_type = claimant_faction - special_character = { - add_to_temporary_list = murder_targets - } - } - } - } - trigger_if = { # Paranoid characters want to murder claimants to their titles - limit = { - ai_compassion <= low_negative_ai_value - ai_rationality <= 0 - is_landed = yes - has_trait = paranoid - primary_title.tier >= tier_duchy - any_held_title = { - any_claimant = { - add_to_temporary_list = murder_targets - } - } - } - } - any_spouse = { # Murder infertile spouses if you've yet to have an heir (and you're heartless...) - trigger_if = { - limit = { - fertility < 0.1 - is_ai = yes - root = { - ai_compassion <= 0 - ai_honor <= 0 - fertility > 0.1 - is_playable_character = yes - NOT = { - any_child = { - is_heir_of = root - } - } - can_start_scheme = { - target_character = prev - type = murder - } - } - add_to_temporary_list = murder_targets - } - } - } -} - -scheme_is_still_valid_trigger = { - scope:target = { - OR = { - exists = location - in_diplomatic_range = scope:owner - } - } -} - -can_use_befriend_scheme_trigger = { - OR = { - AND = { - house ?= { has_house_head_parameter = unlock_befriend_scheme } - is_house_head = yes - } - has_perk = befriend_perk - AND = { - dynasty ?= { - has_dynasty_perk = fp1_adventure_legacy_5 - } - target_is_vassal_or_below = $TARGET$ - } - culture = { has_cultural_parameter = automatic_befriend_access } - any_character_struggle = { - involvement = involved - has_struggle_phase_parameter = struggle_unlocks_befriend_schemes_for_everyone - } - AND = { - government_has_flag = government_is_clan - is_in_same_clan_as_trigger = { CHARACTER = $TARGET$ } - house = { has_house_unity_stage = harmonious } - } - government_has_flag = government_is_nomadic - } -} - -# Need to separate travel triggers from rest -can_seduce_scheme_trigger = { - $OWNER$ = { - is_adult = yes - is_imprisoned = no - OR = { - is_ai = no #Players may override their character's sexuality for the purposes of cynical seductions. - is_attracted_to_gender_of = $TARGET$ - } - is_below_ai_lover_soft_cap_trigger = yes - NOR = { - has_trait = celibate - has_character_flag = is_party_baron - has_relation_lover = $TARGET$ - guaranteed_under_20_incest_rejection_trigger = { - TARGET = $TARGET$ - SEDUCER = $OWNER$ - } - AND = { - has_character_modifier = rejected_from_marriage_bed_modifier - is_spouse_of = $TARGET$ - } - } - } - $TARGET$ = { - is_adult = yes - is_imprisoned = no - is_attracted_to_gender_of = $OWNER$ - NOR = { - has_character_flag = block_seduce_attempts - has_trait = intellect_bad_3 - has_trait = incapable - has_trait = celibate - has_opinion_modifier = { - modifier = seduce_permanent_blocker_opinion - target = $OWNER$ - } - has_opinion_modifier = { - modifier = seduce_regular_cooldown_opinion - target = $OWNER$ - } - } - OR = { - exists = location - in_diplomatic_range = $OWNER$ - } - trigger_if = { - limit = { - $OWNER$ = { is_ai = yes } - } - is_below_ai_lover_soft_cap_trigger = yes - trigger_if = { # Block AI from seducing lowborn nobodies in the players court - limit = { - liege ?= { is_ai = no } - NOR = { - is_courtier_of = $OWNER$ - is_foreign_court_or_pool_guest_of = $OWNER$ - } - } - OR = { - is_lowborn = no - is_playable_character = yes - } - } - trigger_if = { #So players don't get spammed by AI seduction - limit = { is_ai = no } - NOT = { - any_targeting_scheme = { scheme_type = seduce } - } - } - } - } -} - -################################################## -# Scheme Ending Triggers - -# Is this a scheme to kill someone who could be conceivably saved by something unexpected? -is_savable_murder_scheme_trigger = { - OR = { - scheme_type = murder - scheme_type = laamp_base_3011_contract_scheme - } -} - -# Could & would this lover of $TARGET$ -available_lover_to_sacrifice_in_murder_trigger = { - is_ruler = no - is_available_ai_adult = yes - # Filter out lovers that don't actually like you at all. - NOT = { has_trait = disloyal } - OR = { - has_trait = loyal - opinion = { - target = $TARGET$ - # And frankly this is being generous. - value >= 1 - } - } -} - -################################################## -# Murder Intercept Triggers - -# Would this character slack off from their task of guarding scope:target? -bodyguard_will_actually_do_job_trigger = { - # Basically functional. - is_ruler = no - is_physically_able_ai_adult = yes - # Can't hate their charge. - save_temporary_scope_as = char_temp - NOR = { - # Require that they don't hate their liege. - has_relation_rival = scope:target - opinion = { - target = scope:target - value <= high_negative_opinion - } - # Can't be directly involved with the scheme either. - scope:scheme = { - any_scheme_agent_character = { this = scope:char_temp } - } - scope:owner = scope:char_temp - } -} -foodtaster_will_actually_do_job_trigger = { - # Basically functional. - is_ruler = no - is_physically_able_ai_adult = yes - # Can't be directly involved with the scheme. - ## We're a bit pickier here, since food tasters can't just slack off from their duties like bodyguards or cupbearers arguably can. - ### You eat the food or you don't, so if you don't, you really must've planned ahead to look like you did. - save_temporary_scope_as = char_temp - NOR = { - scope:scheme = { - any_scheme_agent_character = { this = scope:char_temp } - } - scope:owner = scope:char_temp - } -} -cupbearer_will_actually_do_job_trigger = { - # Basically functional. - is_physically_able_ai_adult = yes - # Can't hate their charge. - save_temporary_scope_as = char_temp - NOR = { - # Require that they don't hate their liege. - has_relation_rival = scope:target - opinion = { - target = scope:target - value <= high_negative_opinion - } - # Can't be directly involved with the scheme either. - scope:scheme = { - any_scheme_agent_character = { this = scope:char_temp } - } - scope:owner = scope:char_temp - } -} - -################################################## -# Scheme Animation Triggers - -should_use_amorous_scheme_animation_trigger = { - OR = { - scheme_type = seduce - scheme_type = elope - scheme_type = courting - } -} - -################################################## -# Agent Invite Triggers - -would_agent_accept_petty_bribes_against_target_trigger = { - exists = scope:scheme - trigger_if = { - limit = { - exists = scope:scheme.scheme_target_character - } - NOT = { - scope:recipient = { is_parent_of = scope:scheme.scheme_target_character } - } - } - trigger_if = { - limit = { - exists = scope:scheme.scheme_target_title - } - NOT = { - scope:recipient = { is_parent_of = scope:scheme.scheme_target_title.holder } - } - } -} - -would_actor_consider_dramatic_enticement_trigger = { - scope:actor = { - OR = { - is_ai = no - has_trait = humble - has_trait = content - has_trait = profligate - AND = { - has_trait = vengeful - has_relation_rival = scope:recipient - } - AND = { - has_trait = impatient - NOR = { - has_trait = arrogant - has_trait = ambitious - } - } - } - } -} - -actor_has_valid_de_jure_enticement_county_trigger = { - holder = scope:actor - tier = tier_county - this != scope:actor.capital_county -} - -actor_has_valid_claimed_enticement_county_trigger = { - holder = scope:actor - tier = tier_county - this != scope:actor.capital_county -} - -################################################## -# Can Add Agent to Scheme Triggers - -char_can_fit_into_scheme_trigger = { - save_temporary_scope_as = char_temp - $SCHEME$ = { - any_scheme_agent_slot = { - is_filled = no - save_temporary_scope_as = slot_temp - } - scope:char_temp = { is_valid_as_agent_in_slot = scope:slot_temp } - } -} - -################################################## -# Scheme APA Triggers - -scheme_apa_apply_modifier_plus_secrecy_trigger = { - scheme_apa_apply_modifier_trigger = { MODIFIER = $MODIFIER$ } -} - -scheme_apa_apply_modifier_trigger = { - NOR = { - has_variable = scheme_pulse_action_on_cooldown - has_scheme_modifier = $MODIFIER$ - } -} - -scheme_apa_apply_positive_progress_trigger = { - NOT = { has_variable = scheme_pulse_action_on_cooldown } - # How many days in before we want to allow progress gains? - scheme_duration_days >= 365 -} - -scheme_apa_apply_negative_progress_trigger = { - NOT = { has_variable = scheme_pulse_action_on_cooldown } - save_temporary_scope_as = scheme - scheme_progress > scheme_progress_33 -} - -################################################## -# Agent Availability Triggers - -can_have_agent_hitman_trigger = { always = yes } -can_have_agent_assassin_trigger = { always = yes } -can_have_agent_lookout_trigger = { always = yes } -can_have_agent_infiltrator_trigger = { always = yes } -can_have_agent_footpad_trigger = { always = yes } -can_have_agent_alibi_trigger = { always = yes } -can_have_agent_thug_trigger = { always = yes } -can_have_agent_comrade_in_arms_trigger = { always = yes } -can_have_agent_socialite_trigger = { always = yes } -can_have_agent_musician_trigger = { always = yes } -can_have_agent_tumbler_trigger = { always = yes } -can_have_agent_poet_trigger = { always = yes } -can_have_agent_gabbler_trigger = { always = yes } -can_have_agent_shill_trigger = { always = yes } -can_have_agent_diplomat_trigger = { always = yes } -can_have_agent_justiciar_trigger = { always = yes } -can_have_agent_justiciar_speed_trigger = { always = yes } -can_have_agent_scribe_trigger = { always = yes } -can_have_agent_cleric_trigger = { always = yes } -can_have_agent_theologian_trigger = { always = yes } -can_have_agent_herald_trigger = { always = yes } -can_have_agent_wolf_hunter_trigger = { always = yes } -can_have_agent_thief_trigger = { always = yes } -can_have_agent_tutor_trigger = { always = yes } -can_have_agent_poisoner_trigger = { - domicile ?= { has_domicile_parameter = camp_unlocks_poisoner_scheme_agents } -} -can_have_agent_muscle_trigger = { always = yes } -can_have_agent_drillmaster_trigger = { always = yes } -can_have_agent_tracker_trigger = { always = yes } -can_have_agent_physic_trigger = { always = yes } -can_have_agent_smith_trigger = { always = yes } -can_have_agent_ambusher_trigger = { always = yes } -can_have_agent_bodyguard_trigger = { always = yes } -can_have_agent_scout_trigger = { always = yes } -can_have_agent_outrider_trigger = { always = yes } -can_have_agent_bookkeeper_trigger = { always = yes } -can_have_agent_bailiff_trigger = { always = yes } -can_have_agent_draughtsman_trigger = { always = yes } -can_have_agent_planner_trigger = { always = yes } -can_have_agent_supplier_trigger = { always = yes } -can_have_agent_outcast_trigger = { always = yes } -can_have_agent_wrangler_trigger = { always = yes } -can_have_agent_decoy_trigger = { always = yes } -can_have_agent_eunuch_trigger = { always = yes } -can_have_agent_wrangler_speed_trigger = { always = yes } -can_have_agent_theologian_success_trigger = { always = yes } -can_have_agent_cleric_success_trigger = { always = yes } -can_have_agent_lookout_success_trigger = { always = yes } -can_have_agent_lookout_speed_trigger = { always = yes } - -################################################## -# Countermeasure Triggers - -# Does a specific countermeasure apply to you? -countermeasure_parametre_applies_againt_char_trigger = { - $SCHEME_TARGET$.host ?= { - has_scheme_countermeasure_parameter = $PARAMETER$ - # Don't apply countermeasures vs. ourselves. - NOT = { this = $SCHEME_OWNER$ } - # And if the countermeasure only affects the host, then restrict it. - trigger_if = { - limit = { has_scheme_countermeasure_parameter = countermeasure_only_affects_court_holder } - this = $SCHEME_TARGET$ - } - } -} - -# Can a character adopt defensive measures against hostile schemes? -can_set_own_countermeasures_trigger = { - custom_tooltip = { - OR = { - # You can only set them for your home court. - host = prev - # And then we use this in here so we can valid - ## ... valid what, Ewan? _What can we valid_? You never finished your sentence and now we will never know. - is_ruler = no - } - text = can_set_own_countermeasures_trigger.tt - } -} - -# Used in scripted modifiers to determine if the AI should be deploying countermeasures that reduce secrecy or generally affect success chance. -should_ai_take_preemptive_countermeasures_trigger = { - # Don't do this if we've already deployed countermeasures. - NOT = { has_scheme_countermeasure_parameter = has_any_countermeasure_active } - any_targeting_scheme = { - # Make sure we'd need to do this at all. - has_variable = apply_countermeasures - # And we don't want to face schemes that're already at a later stage. - is_scheme_exposed = no - # Buuuut also give them their grace period to get started. - has_variable = secrecy_grace_period - var:secrecy_grace_period <= 0 - } -} - -################################################## -# Countermeasure Access Triggers - -# This trigger means that a character will only ever have access to the best version of a given countermeasure. -## Please note that some tiers may be inaccessible: they're set up so they can be hooked in to stuff, but we haven't assigned them all out straight away. -## Use them if you want them but don't feel obligated, basically. -scheme_countermeasure_access_select_best_tier_trigger = { - save_temporary_scope_value_as = { - name = checked_tier - value = $TIER$ - } - trigger_if = { - limit = { scheme_countermeasure_access_t4_$COUNTERMEASURE$_trigger = yes } - scope:checked_tier = 4 - } - trigger_else_if = { - limit = { scheme_countermeasure_access_t3_$COUNTERMEASURE$_trigger = yes } - scope:checked_tier = 3 - } - trigger_else_if = { - limit = { scheme_countermeasure_access_t2_$COUNTERMEASURE$_trigger = yes } - scope:checked_tier = 2 - } - trigger_else = { scope:checked_tier = 1 } -} - -# Can this character access the higher tiers of the Bounties for Whispers countermeasure? -scheme_countermeasure_access_t2_bounties_for_whispers_trigger = { - OR = { - has_trait_with_flag = trait_unlocks_t2_countermeasures - culture = { has_cultural_parameter = cultrad_unlocks_t2_countermeasures } - } -} -scheme_countermeasure_access_t3_bounties_for_whispers_trigger = { - always = no -} -scheme_countermeasure_access_t4_bounties_for_whispers_trigger = { - OR = { - culture = { has_cultural_parameter = cultrad_unlocks_t4_bounties_for_whispers } - faith = { has_doctrine_parameter = tenet_unlocks_t4_bounties_for_whispers } - } -} - -# Can this character access the higher tiers of the Arbitrary Arrests countermeasure? -scheme_countermeasure_access_t2_arbitrary_arrests_trigger = { - OR = { - has_trait_with_flag = trait_unlocks_t2_countermeasures - has_trait_with_flag = trait_unlocks_t2_arbitrary_arrests - culture = { has_cultural_parameter = cultrad_unlocks_t2_countermeasures } - } -} -scheme_countermeasure_access_t3_arbitrary_arrests_trigger = { - culture = { has_cultural_parameter = cultrad_unlocks_t3_arbitrary_arrests } -} -scheme_countermeasure_access_t4_arbitrary_arrests_trigger = { - always = no -} - -# Can this character access the higher tiers of the Strengthen Sentries countermeasure? -scheme_countermeasure_access_t2_strengthen_sentries_trigger = { - OR = { - has_trait_with_flag = trait_unlocks_t2_countermeasures - culture = { has_cultural_parameter = cultrad_unlocks_t2_countermeasures } - } -} -scheme_countermeasure_access_t3_strengthen_sentries_trigger = { - culture = { has_cultural_parameter = cultrad_unlocks_t3_strengthen_sentries } -} -scheme_countermeasure_access_t4_strengthen_sentries_trigger = { - always = no -} - -# Can this character access the higher tiers of the Redouble Guards countermeasure? -scheme_countermeasure_access_t2_redouble_guards_trigger = { - OR = { - has_trait_with_flag = trait_unlocks_t2_countermeasures - culture = { - OR = { - has_cultural_parameter = cultrad_unlocks_t2_countermeasures - has_cultural_parameter = cultrad_unlocks_t2_redouble_guards - } - } - } -} -scheme_countermeasure_access_t3_redouble_guards_trigger = { - culture = { has_cultural_parameter = cultrad_unlocks_t3_redouble_guards } -} -scheme_countermeasure_access_t4_redouble_guards_trigger = { - always = no -} - -# Can this character access the higher tiers of the Withdraw from View countermeasure? -scheme_countermeasure_access_t2_withdraw_from_view_trigger = { - OR = { - OR = { - has_trait_with_flag = trait_unlocks_t2_countermeasures - culture = { has_cultural_parameter = cultrad_unlocks_t2_countermeasures } - } - has_trait_with_flag = trait_unlocks_t2_withdraw_from_view - } -} -scheme_countermeasure_access_t3_withdraw_from_view_trigger = { - OR = { - has_trait_with_flag = trait_unlocks_t3_withdraw_from_view - faith = { has_doctrine_parameter = tenet_unlocks_t3_withdraw_from_view } - } -} -scheme_countermeasure_access_t4_withdraw_from_view_trigger = { - has_trait_with_flag = trait_unlocks_t4_withdraw_from_view -} - -# Can this character access the higher tiers of the Bribe Officials countermeasure? -scheme_countermeasure_access_t2_bribe_officials_trigger = { - OR = { - culture = { has_cultural_parameter = cultrad_unlocks_t2_countermeasures } - domicile ?= { has_domicile_parameter = estate_improve_political_scheme_countermeasure } - } -} -scheme_countermeasure_access_t3_bribe_officials_trigger = { - AND = { - culture = { has_cultural_parameter = cultrad_unlocks_t2_countermeasures } - domicile ?= { has_domicile_parameter = estate_improve_political_scheme_countermeasure } - } -} -scheme_countermeasure_access_t4_bribe_officials_trigger = { - always = no -} - -scheme_generic_ai_blocker_trigger = { - any_scheme = { - OR = { - scheme_type = befriend - scheme_type = sway - scheme_type = seduce - scheme_type = courting - scheme_type = elope - scheme_type = learn_language - scheme_type = teach_governor - } - } -} diff --git a/N3OW/common/scripted_triggers/00_scripted_rule_triggers.txt b/N3OW/common/scripted_triggers/00_scripted_rule_triggers.txt deleted file mode 100644 index b2b0326a..00000000 --- a/N3OW/common/scripted_triggers/00_scripted_rule_triggers.txt +++ /dev/null @@ -1,137 +0,0 @@ -#Controls the can_raid rule. -can_raid_trigger = { - OR = { - # Government logic. - government_has_flag = government_can_raid_rule - ## Admin - Frontier themes - vassal_contract_has_flag = admin_theme_can_raid - ## Clan - Ghazi - vassal_contract_has_flag = vassal_contract_allow_raiding - # Faith Logic. - faith = { has_doctrine_parameter = faith_can_raid } - # Dynasty logic. - dynasty ?= { - OR = { - can_raid_dynasty_modifiers_that_enable_raiding_overseas_list_trigger = yes - can_raid_dynasty_modifiers_that_enable_raiding_overland_list_trigger = yes - } - } - # House logic. - house ?= { - OR = { - can_raid_house_modifiers_that_enable_raiding_overseas_list_trigger = yes - can_raid_house_modifiers_that_enable_raiding_overland_list_trigger = yes - } - } - # Cultural logic. - ## With restrictions. - AND = { - can_raid_cultural_parameter_requirements_for_non_tribals_trigger = yes - culture = { - OR = { - has_cultural_parameter = culture_can_raid_at_sea_even_if_feudal - has_cultural_parameter = culture_can_raid_over_land_even_if_feudal - } - } - } - ## Without restrictions. - culture = { - OR = { - has_cultural_parameter = culture_can_raid_at_sea_even_if_feudal_no_restrictions - has_cultural_parameter = culture_can_raid_over_land_even_if_feudal_no_restrictions - } - } - # Trait logics. - ## With restrictions. - AND = { - can_raid_trait_flag_standard_requirements_trigger = yes - has_trait_with_flag = trait_enable_raiding_per_standard_restrictions - } - ## Without restrictions. - has_trait_with_flag = trait_enable_raiding_without_restrictions - } - # Some faiths prohibit this. - OR = { - NOR = { - faith = { has_doctrine_parameter = holy_wars_forbidden } - government_has_flag = government_is_landless_adventurer - } - # But not for Nomads or Wanua - government_has_flag = government_is_nomadic - government_has_flag = government_is_wanua - } - is_landed = yes -} - -# Here so that you can plug in whatever dynasty modifiers you want without overwriting the whole scripted rule trigger. -can_raid_dynasty_modifiers_that_enable_raiding_overseas_list_trigger = { - # Yes, I realise the OR is redundant till someone else puts something in here. Shoosh. - has_dynasty_modifier = fp1_legacy_of_piracy_modifier - -} -can_raid_dynasty_modifiers_that_enable_raiding_overland_list_trigger = { - OR = { - # Yes, I realise the OR is redundant till someone else puts something in here. Shoosh. - # Always = no because we have no vanilla use-case atm — the assumption is that modders'll overwrite it. - always = no - } -} - -# Here so that you can plug in whatever house modifiers you want without overwriting the whole scripted rule trigger. -can_raid_house_modifiers_that_enable_raiding_overseas_list_trigger = { - OR = { - # Yes, I realise the OR is redundant till someone else puts something in here. Shoosh. - # Always = no because we have no vanilla use-case atm — the assumption is that modders'll overwrite it. - always = no - } -} -can_raid_house_modifiers_that_enable_raiding_overland_list_trigger = { - OR = { - # Yes, I realise the OR is redundant till someone else puts something in here. Shoosh. - # Always = no because we have no vanilla use-case atm — the assumption is that modders'll overwrite it. - always = no - } -} - -# Here so that you can tweak the rules on how non-tribals raid via CulTrad without overriding the whole scripted rule trigger. -can_raid_cultural_parameter_requirements_for_non_tribals_trigger = { - OR = { - highest_held_title_tier <= tier_duchy - realm_size <= minor_realm_size - } -} - -# Here so that you can tweak the rules on which innovations allow raiding without overriding the whole scripted rule trigger. -can_ran_raid_overseas_cultural_innovations_trigger = { - OR = { - has_innovation = innovation_longboats - has_innovation = innovation_african_canoes - } -} - -# Here so that you can tweak the rules on characters with a trait that lets them raid under certain circumstances raid without overriding the whole scripted rule trigger. -can_raid_trait_flag_standard_requirements_trigger = { - # We don't use this in vanilla, so we don't have any actual requirements atm. - always = yes -} - -can_raid_across_water_trigger = { - OR = { - # Culture logic. - culture = { - OR = { - can_ran_raid_overseas_cultural_innovations_trigger = yes - has_cultural_parameter = culture_can_raid_at_sea_even_if_feudal - has_cultural_parameter = culture_can_raid_at_sea_even_if_feudal_no_restrictions - } - } - # Dynasty logic. - dynasty ?= { can_raid_dynasty_modifiers_that_enable_raiding_overseas_list_trigger = yes } - # House logic. - house ?= { can_raid_house_modifiers_that_enable_raiding_overseas_list_trigger = yes } - # Can raid overseas by government rules - government_has_flag = government_enables_naval_raiding - #Is Hereward. - has_trait = the_wake - } -} diff --git a/N3OW/common/scripted_triggers/00_scripted_triggers.txt b/N3OW/common/scripted_triggers/00_scripted_triggers.txt deleted file mode 100644 index 42231fb7..00000000 --- a/N3OW/common/scripted_triggers/00_scripted_triggers.txt +++ /dev/null @@ -1,615 +0,0 @@ -# Example: -# -# example_trigger = { -# is_country_type = default -# free_leader_slots > 0 -# } -# -# -# In a script file: -# -# trigger = { -# example_trigger = yes -# } -# - -minor_gold_value_trigger = { - short_term_gold >= minor_gold_value -} - -medium_gold_value_trigger = { - short_term_gold >= medium_gold_value -} - -major_gold_value_trigger = { - short_term_gold >= major_gold_value -} - -has_chosen_murder_execution_type = { - exists = scope:murder_method -} - -seduction_target_is_close_trigger = { - scope:target = { is_in_the_same_court_as = scope:owner } -} - - -scope_is_close_to_root_trigger = { - OR = { - is_in_the_same_court_as = root - is_courtier_of = root - } -} - -#Education triggers -has_education_martial_trigger = { - OR = { - has_trait = education_martial_1 - has_trait = education_martial_2 - has_trait = education_martial_3 - has_trait = education_martial_4 - has_trait = education_martial_5 - } -} - -has_education_diplomacy_trigger = { - 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 - } -} - -has_education_learning_trigger = { - OR = { - has_trait = education_learning_1 - has_trait = education_learning_2 - has_trait = education_learning_3 - has_trait = education_learning_4 - has_trait = education_learning_5 - } -} - -has_education_stewardship_trigger = { - OR = { - has_trait = education_stewardship_1 - has_trait = education_stewardship_2 - has_trait = education_stewardship_3 - has_trait = education_stewardship_4 - has_trait = education_stewardship_5 - } -} - -has_education_intrigue_trigger = { - OR = { - has_trait = education_intrigue_1 - has_trait = education_intrigue_2 - has_trait = education_intrigue_3 - has_trait = education_intrigue_4 - has_trait = education_intrigue_5 - } -} - -is_cannibal_trigger = { - OR = { - has_trait = cannibal - any_secret = { - type = secret_cannibal - } - } -} - -is_murderer_trigger = { - OR = { - has_trait = murderer - any_secret = { - type = secret_murder - } - } -} - - -likes_target_trigger = { - opinion = { - target = $CHARACTER$ - value > 10 - } -} - - - -has_any_lifestyle_focus_trigger = { - OR = { - has_lifestyle = diplomacy_lifestyle - has_lifestyle = martial_lifestyle - has_lifestyle = stewardship_lifestyle - has_lifestyle = intrigue_lifestyle - has_lifestyle = learning_lifestyle - } -} - -has_any_lifestyle_trait_trigger = { - OR = { - has_diplomacy_lifestyle_trait_trigger = yes - has_martial_lifestyle_trait_trigger = yes - has_stewardship_lifestyle_trait_trigger = yes - has_intrigue_lifestyle_trait_trigger = yes - has_learning_lifestyle_trait_trigger = yes - } -} - -tier_or_related_liege_tier_equal_trigger = { - OR = { - highest_held_title_tier = $TIER$ - AND = { - liege ?= { highest_held_title_tier = $TIER$ } - OR = { - is_close_family_of = this.liege - is_spouse_of = this.liege - } - } - } -} - -tier_or_related_liege_tier_greater_or_equal_trigger = { - OR = { - highest_held_title_tier >= $TIER$ - AND = { - liege ?= { highest_held_title_tier >= $TIER$ } - OR = { - is_close_family_of = this.liege - is_spouse_of = this.liege - } - } - } -} - -torture_secret_trigger = { - NOT = { is_known_by = scope:actor } - OR = { - is_blackmailable_secret_trigger = { BLACKMAILER = scope:actor PARTICIPANT = $PARTICIPANT$ } - secret_is_always_interesting_trigger = yes - } - NOT = { - secret_target ?= scope:recipient - } -} - -has_interesting_portrait_altering_trait_trigger = { - OR = { - has_trait = scarred - has_trait = blind - has_trait = beauty_bad - has_trait = beauty_good - has_trait = hunchbacked - has_trait = dwarf - has_trait = giant - has_trait = spindly - has_trait = scaly - has_trait = albino - has_trait = one_eyed - } -} - -is_dangerous_faction_trigger = { - OR = { - AND = { - faction_leader ?= { is_ai = no } # For now human factions are always dangerous - } - - AND = { - faction_is_type = peasant_faction - months_until_max_discontent <= 12 - } - AND = { - NOT = { faction_is_type = peasant_faction } - discontent_per_month > 0 - } - } -} - -basic_allowed_to_imprison_character_trigger = { #Only to be used in is_shown for imprison interaction and similar - save_temporary_scope_as = allowed_imprisoner - $CHARACTER$ = { - OR = { - target_is_liege_or_above = scope:allowed_imprisoner - is_foreign_court_or_pool_guest_of = scope:allowed_imprisoner - AND = { - # EP3 EVICTION - has_government = landless_adventurer_government - reverse_has_opinion_modifier = { - target = scope:allowed_imprisoner - modifier = eviction_ignored_opinion - } - } - } - NOT = { - is_imprisoned_by = scope:allowed_imprisoner - } - } -} - -advanced_allowed_to_imprison_character_trigger = { - save_temporary_scope_as = allowed_imprisoner - $CHARACTER$ = { - save_temporary_scope_as = allowed_prisoner - is_imprisoned = no - NOT = { is_at_war_with = scope:allowed_imprisoner } - custom_description = { - text = "character_interactions_imprison_recently_ransomed" - object = scope:allowed_prisoner - NOT = { - has_opinion_modifier = { - target = scope:allowed_imprisoner - modifier = ransomed_from_prison - } - } - } - NOT = { has_strong_hook = scope:allowed_imprisoner } - custom_tooltip = { - text = hostage_travelling_tt - NOT = { exists = var:hostage_travelling_to_warden } - } - trigger_if = { - limit = { has_government = landless_adventurer_government } - scope:allowed_imprisoner = { is_landed = yes } - reverse_has_opinion_modifier = { - target = scope:allowed_imprisoner - modifier = eviction_ignored_opinion - } - domicile.domicile_location.county ?= { target_is_de_facto_liege_or_above = scope:allowed_imprisoner.primary_title } - } - } - scope:allowed_imprisoner = { - custom_description = { - text = "character_interactions_imprison_ally_without_reason" - object = scope:allowed_prisoner - OR = { - NOT = { is_allied_to = scope:allowed_prisoner } - has_imprisonment_reason = scope:allowed_prisoner - is_spouse_of = scope:allowed_prisoner - } - } - } -} - -allowed_to_imprison_character_trigger = { - # We separate these out so that diarchs can imprison characters they aren't liege over. - advanced_allowed_to_imprison_character_trigger = { CHARACTER = $CHARACTER$ } - basic_allowed_to_imprison_character_trigger = { CHARACTER = $CHARACTER$ } -} - -can_be_granted_titles_by = { #This is set up with trigger-ifs to allow for nice tooltip printouts in grant title interaction - save_temporary_scope_as = title_grantee - #Gender check - trigger_if = { - limit = { - is_ruler = no #Rulers can always get additional titles - is_theocratic_lessee = no #Theocratic lessees use other gender checks - NOT = { $RULER$ = { government_allows = administrative } } - NOT = { - $RULER$.faith = { - has_dominant_ruling_gender = scope:title_grantee - } - } - } - trigger_if = { - limit = { - $RULER$ = { government_allows = state_faith } - } - $RULER$.primary_title.state_faith = { - has_dominant_ruling_gender = scope:title_grantee - } - } - trigger_else = { - $RULER$.faith = { - has_dominant_ruling_gender = scope:title_grantee - } - } - } - trigger_if = { - limit = { - is_ruler = no #Rulers can always get additional titles - is_theocratic_lessee = no #Theocratic lessees use other gender checks - $RULER$ = { - government_allows = administrative - NOT = { has_realm_law = equal_law } - } - } - trigger_if = { - limit = { - $RULER$ = { has_realm_law = male_only_law } - } - scope:title_grantee = { is_female = no } - } - trigger_if = { - limit = { - $RULER$ = { has_realm_law = female_only_law } - } - scope:title_grantee = { is_female = yes } - } - #trigger_else = { always = yes } - } - trigger_else_if = { - limit = { - is_theocratic_lessee = yes - } - liege = $RULER$ - #If this is ever visible anywhere, we need to write a custom desc "Theocratic lessees cannot only be given titles by their ruler" - } - trigger_else = { - always = yes - } -} - -can_be_granted_theocratic_titles_by = { #This is set up with trigger-ifs to allow for nice tooltip printouts in grant title interaction - save_temporary_scope_as = title_grantee - #Gender check - trigger_if = { - limit = { - $RULER$.faith = { has_doctrine = doctrine_clerical_gender_female_only } - } - is_female = yes - } - trigger_else_if = { - limit = { - $RULER$.faith = { has_doctrine = doctrine_clerical_gender_male_only } - } - is_male = yes - } - trigger_else = { always = yes } -} - -activate_disease_data_tracking_trigger = { - always = no #Should be set to no, unless you're gathering data -} - -vassal_contract_can_be_modified_trigger = { - custom_description = { - text = vassal_contract_can_be_modified - is_vassal_of = liege # To ensure we are actually a vassal and not a tributary - subject_contract_has_modifiable_obligations = yes - subject_contract_is_blocked_from_modification = no - } -} - -has_changed_contract_obligation_trigger = { - trigger_if = { - limit = { - scope:recipient = { government_has_flag = government_is_feudal } - } - custom_description = { - text = "modify_vassal_contract_select_different_obligation_level" - list_size = { - name = changed_obligations - value > 0 - } - } - } - trigger_else = { - custom_description = { - text = "modify_non_feudal_vassal_contract_select_different_obligation_level" - list_size = { - name = changed_obligations - value > 0 - } - } - } -} - -recently_converted_faith_trigger = { - OR = { - has_character_flag = converted_by_heresy_0011_event - has_character_flag = converted_by_heresy_0010_event - has_character_flag = converted_by_forced_conversion_interaction - } -} - -can_touch_someone_trigger = { - #This is to check if someone is physically capable and not in risk of disease. Remember to always ask for consent! - NOR = { - has_trait = leper - has_trait = scaly #people with eczema and other skin conditions often got the same treatment as lepers - has_trait = smallpox - has_trait = bubonic_plague - has_trait = measles #people with eczema and other skin conditions often got the same treatment as lepers - - #circumstancial - has_trait = incapable - has_trait = wounded - has_trait = maimed - has_trait = typhus - - # gout happens mostly in the foot, but as someone with inflammatory arthritis, I hate handshakes when my fingers are aching - has_trait = gout_ridden - } -} - -is_spouse_or_romantic_partner_of_root = { - OR = { - has_relation_lover = root - is_consort_of = root - has_relation_soulmate = root - } -} -terrible_sum_of_all_skills_trigger = { - sum_of_all_skills_value <= sum_of_all_skills_threshold_terrible -} -poor_sum_of_all_skills_trigger = { - sum_of_all_skills_value <= sum_of_all_skills_threshold_poor -} -average_sum_of_all_skills_trigger = { - sum_of_all_skills_value <= sum_of_all_skills_threshold_average -} -good_sum_of_all_skills_trigger = { - sum_of_all_skills_value <= sum_of_all_skills_threshold_good -} -excellent_sum_of_all_skills_trigger = { - sum_of_all_skills_value <= sum_of_all_skills_threshold_excellent -} - -scarred_trait_activation_1 = { - has_trait_xp = { - trait = scarred - track = scarred - value < 50 - } -} - -scarred_trait_activation_2 = { - AND = { - has_trait_xp = { - trait = scarred - track = scarred - value >= 50 - } - has_trait_xp = { - trait = scarred - track = scarred - value < 100 - } - } -} - -scarred_trait_activation_3 = { - has_trait_xp = { - trait = scarred - track = scarred - value > 99 - } -} - -has_purchased_truce_with_char = { - has_variable_list = bought_truce_list - any_in_list = { - variable = bought_truce_list - this = $TARGET$ - } -} - -has_different_clothing_gfx = { - culture = { - switch = { - trigger = has_clothing_gfx - byzantine_clothing_gfx = { - NOT = { - $CHAR$.culture = { has_clothing_gfx = byzantine_clothing_gfx } - } - } - indian_clothing_gfx = { - NOT = { - $CHAR$.culture = { has_clothing_gfx = indian_clothing_gfx } - } - } - mena_clothing_gfx = { - NOT = { - $CHAR$.culture = { has_clothing_gfx = mena_clothing_gfx } - } - } - african_clothing_gfx = { - NOT = { - $CHAR$.culture = { has_clothing_gfx = african_clothing_gfx } - } - } - northern_clothing_gfx = { - NOT = { - $CHAR$.culture = { has_clothing_gfx = northern_clothing_gfx } - } - } - iberian_muslim_clothing_gfx = { - NOT = { - $CHAR$.culture = { has_clothing_gfx = iberian_muslim_clothing_gfx } - } - } - iberian_christian_clothing_gfx = { - NOT = { - $CHAR$.culture = { has_clothing_gfx = iberian_christian_clothing_gfx } - } - } - mongol_clothing_gfx = { - NOT = { - $CHAR$.culture = { has_clothing_gfx = mongol_clothing_gfx } - } - } - fp1_norse_clothing_gfx = { - NOT = { - $CHAR$.culture = { has_clothing_gfx = fp1_norse_clothing_gfx } - } - } - western_clothing_gfx = { - NOT = { - $CHAR$.culture = { has_clothing_gfx = western_clothing_gfx } - } - } - dde_hre_clothing_gfx = { - NOT = { - $CHAR$.culture = { has_clothing_gfx = dde_hre_clothing_gfx } - } - } - dde_abbasid_clothing_gfx = { - NOT = { - $CHAR$.culture = { has_clothing_gfx = dde_abbasid_clothing_gfx } - } - } - iranian_clothing_gfx = { - NOT = { - $CHAR$.culture = { has_clothing_gfx = iranian_clothing_gfx } - } - } - turkic_clothing_gfx = { - NOT = { - $CHAR$.culture = { has_clothing_gfx = turkic_clothing_gfx } - } - } - afr_berber_clothing_gfx = { - NOT = { - $CHAR$.culture = { has_clothing_gfx = afr_berber_clothing_gfx } - } - } - west_slavic_clothing_gfx = { - NOT = { - $CHAR$.culture = { has_clothing_gfx = west_slavic_clothing_gfx } - } - } - french_clothing_gfx = { - NOT = { - $CHAR$.culture = { has_clothing_gfx = french_clothing_gfx } - } - } - east_slavic_clothing_gfx = { - NOT = { - $CHAR$.culture = { has_clothing_gfx = east_slavic_clothing_gfx } - } - } - sami_clothing_gfx = { - NOT = { - $CHAR$.culture = { has_clothing_gfx = sami_clothing_gfx } - } - } - ugro_permian_clothing_gfx = { - NOT = { - $CHAR$.culture = { has_clothing_gfx = ugro_permian_clothing_gfx } - } - } - } - } -} - -current_date_is_start_date_trigger = { - OR = { - AND = { - game_start_date = 867.1.1 - current_date = 867.1.1 - } - AND = { - game_start_date = 1066.09.15 - current_date = 1066.09.15 - } - AND = { - game_start_date = 1178.10.1 - current_date = 1178.10.1 - } - } -} diff --git a/N3OW/common/scripted_triggers/00_secret_triggers.txt b/N3OW/common/scripted_triggers/00_secret_triggers.txt deleted file mode 100644 index 436142d0..00000000 --- a/N3OW/common/scripted_triggers/00_secret_triggers.txt +++ /dev/null @@ -1,596 +0,0 @@ - -#Triggers revolving around secrets - -#has_secret_unknown_by_root_trigger -#Being_blackmailed_by_root_trigger -#is_blackmailable_secret_trigger -#secret_is_always_interesting_trigger - - - - - -has_secret_unknown_by_root_trigger = { - any_secret = { - NOT = { - is_known_by = root - } - } -} - -being_blackmailed_by_root_trigger = { - root = { - OR = { - has_hook_of_type = { - target = prev - type = weak_blackmail_hook - } - has_hook_of_type = { - target = prev - type = strong_blackmail_hook - } - } - } -} - -is_blackmailable_secret_trigger = { #Should not include is known - $PARTICIPANT$ = { save_temporary_scope_as = is_blackmailable_secret_participant } - $BLACKMAILER$ = { save_temporary_scope_as = is_blackmailable_secret_blackmailer } - is_shunned_or_criminal_for = scope:is_blackmailable_secret_participant - can_be_exposed_by = scope:is_blackmailable_secret_blackmailer - #Can we actually add a hook of the correct type - trigger_if = { - limit = { is_shunned_for = scope:is_blackmailable_secret_participant } - custom_description = { - text = "already_has_a_superior_hook" - subject = scope:is_blackmailable_secret_blackmailer - object = scope:is_blackmailable_secret_participant - scope:is_blackmailable_secret_blackmailer = { - can_add_hook = { - type = weak_blackmail_hook - target = scope:is_blackmailable_secret_participant - } - } - } - } - trigger_if = { - limit = { is_criminal_for = scope:is_blackmailable_secret_participant } - custom_description = { - text = "already_has_a_superior_hook" - subject = scope:is_blackmailable_secret_blackmailer - object = scope:is_blackmailable_secret_participant - scope:is_blackmailable_secret_blackmailer = { - can_add_hook = { - type = strong_blackmail_hook - target = scope:is_blackmailable_secret_participant - } - } - } - } - #If an AI promised not to reveal a secret they have to be very dishonest to do it - trigger_if = { - limit = { exists = var:promised_not_to_reveal} - custom_description = { - text = "promised_not_to_reveal_secret" - var:promised_not_to_reveal = scope:is_blackmailable_secret_blackmailer - scope:is_blackmailable_secret_blackmailer = { - is_ai = yes - ai_honor <= medium_negative_ai_value - } - } - } - - #Some things you can't blackmail others about - custom_description = { - text = "cant_blackmail_another_witch" - subject = scope:is_blackmailable_secret_blackmailer - NAND = { - secret_type = secret_witch - scope:is_blackmailable_secret_blackmailer = { is_witch_trigger = yes } - } - } - # Can't blackmail a crypto-religionist of the same faith - trigger_if = { - limit = { secret_type = secret_crypto_religionist } - custom_description = { - text = cannot_blackmail_crypto_religionist_of_same_faith - scope:is_blackmailable_secret_blackmailer = { - NOR = { - exists = secret_faith - secret_faith ?= scope:is_blackmailable_secret_participant.secret_faith - } - } - } - } - trigger_if = { - limit = { secret_type = secret_lover } - custom_description = { - text = cannot_blackmail_own_lover_secret - secret_target != scope:is_blackmailable_secret_blackmailer - } - } - trigger_if = { - limit = { - secret_type = secret_unmarried_illegitimate_child - } - custom_description = { - text = cannot_blackmail_over_own_bastard - secret_target = { - NOR = { - mother = scope:is_blackmailable_secret_blackmailer - real_father = scope:is_blackmailable_secret_blackmailer - } - } - } - } - trigger_if = { - limit = { - secret_type = secret_disputed_heritage - } - custom_description = { - text = cannot_blackmail_over_own_bastard - NOT = { - secret_target = { - OR = { - mother = scope:is_blackmailable_secret_blackmailer - real_father = scope:is_blackmailable_secret_blackmailer - } - } - } - } - } -} - - -secret_is_always_interesting_trigger = { #Even if they can't be used for blackmail - OR = { - secret_type = secret_lover - secret_type = secret_murder - secret_type = secret_murder_attempt - secret_type = secret_disputed_heritage - secret_type = secret_unmarried_illegitimate_child - secret_type = secret_crypto_religionist - } -} - - -#Checks whether a secret would incriminate its secret target if known - #Parameters: - # TARGET -secret_is_incriminating_trigger = { - OR = { - exists = secret_target - any_secret_participant = { } - } - OR = { - AND = { - secret_type = secret_lover - secret_target = $TARGET$ - } - AND = { - secret_type = secret_disputed_heritage - OR = { - secret_target = $TARGET$ - secret_target.mother = $TARGET$ - any_secret_participant = { - this = $TARGET$ - } - } - } - AND = { - secret_type = secret_unmarried_illegitimate_child - OR = { - secret_target = $TARGET$ - secret_target.mother = $TARGET$ - any_secret_participant = { - this = $TARGET$ - } - } - } - } -} - - - -###Expose secret triggers### - -block_exposed_secret_general_notifications = { #Because you're already getting your own, special event - OR = { - #Is one of the involved parties - this = scope:secret_exposer - this = scope:exposed_secret_character - this = scope:exposed_secret_owner - AND = { - exists = scope:exposed_secret_target - this = scope:exposed_secret_target - } - #For lover secret: No events for spouses or lovers, they get infidelity_confrontation.1000 instead - trigger_if = { - limit = { scope:secret = { secret_type = secret_lover } } - OR = { - is_spouse_of = scope:exposed_secret_owner - has_relation_lover = scope:exposed_secret_owner - is_spouse_of = scope:exposed_secret_target - has_relation_lover = scope:exposed_secret_target - } - } - #For bastard secrets: No events for child mother and real father - trigger_else_if = { - limit = { - scope:secret = { - OR = { - secret_type = secret_disputed_heritage - secret_type = secret_unmarried_illegitimate_child - } - } - } - OR = { - scope:exposed_secret_target.mother = scope:show_me #mother - scope:exposed_secret_target.real_father = scope:show_me #real father - } - } - trigger_else = { } #Just to avoid errors - } -} - - -show_me_exposed_secret_event_trigger = { - expose_secret_scope_saving_trigger = { SECRET = $SECRET$ CHARACTER = $CHARACTER$ } #Saves show_me, exposed_secret_character, exposed_secret_owner & exposed_secret_target - block_exposed_secret_general_notifications = no #Isn't the owner/target/exposer or other involved character - #Is someone who cares - OR = { - is_spouse_of_even_if_dead = scope:exposed_secret_character - is_close_family_of = scope:exposed_secret_character - AND = { - exists = scope:exposed_secret_character.player_heir - scope:exposed_secret_character = { player_heir = scope:show_me } - } - AND = { - scope:exposed_secret_character = { exists = liege } - scope:exposed_secret_character = { liege = scope:show_me } - } - AND = { #For bastards, fathers also care - $SECRET$ = { secret_type = secret_disputed_heritage } - exists = scope:father - this = scope:father - } - } -} - -show_me_exposed_secret_feed_message_trigger = { - expose_secret_scope_saving_trigger = { SECRET = $SECRET$ CHARACTER = $CHARACTER$ } #Saves show_me, exposed_secret_character, exposed_secret_owner & exposed_secret_target - block_exposed_secret_general_notifications = no #Isn't the owner/target/exposer or other involved character - NOT = { show_me_exposed_secret_event_trigger = { SECRET = $SECRET$ CHARACTER = $CHARACTER$ } } #I.e. hasn't already been notified -} - -expose_secret_scope_saving_trigger = { #Because we save the same scopes in two triggers that need to be the same - save_temporary_scope_as = show_me - $CHARACTER$ = { - save_temporary_scope_as = exposed_secret_character #Most of the time this is owner, but for secrets with targets/other involved parties it can also be them - } - $SECRET$ = { - secret_owner = { save_temporary_scope_as = exposed_secret_owner } - trigger_if = { - limit = { exists = secret_target } - secret_target = { save_temporary_scope_as = exposed_secret_target } - } - } -} - -###Triggers for give_random_likely_secret_effect - -give_random_likely_secret_murder_attempt_victim_trigger = { - is_ai = yes - save_temporary_scope_as = victim - scope:murderer = { - NOT = { - any_secret = { - type = secret_murder_attempt - secret_target = scope:victim - } - } - } -} - -give_random_likely_secret_lover_trigger = { - is_adult = yes - is_ai = yes - NOT = { any_relation = { type = lover this = scope:lover_1 } } - NOT = { is_spouse_of = scope:lover_1 } - NOT = { has_trait = celibate } - opinion = { - target = scope:lover_1 - value >= 20 - } - reverse_opinion = { - target = scope:lover_1 - value >= 20 - } - save_temporary_scope_as = lover_2 - possible_mutual_interest_trigger = { CHARACTER_1 = scope:lover_1 CHARACTER_2 = scope:lover_2 } -} - -give_random_likely_secret_incestous_lover_trigger = { - is_adult = yes - is_ai = yes - NOT = { any_relation = { type = lover this = scope:lover_1 } } - NOT = { is_spouse_of = scope:lover_1 } - OR = { - save_temporary_scope_as = lover_2 - possible_mutual_interest_trigger = { CHARACTER_1 = scope:lover_1 CHARACTER_2 = scope:lover_2 } - AND = { - matching_gender_and_sexuality_trigger = { CHARACTER_1 = scope:lover_1 CHARACTER_2 = scope:lover_2 } - opinion = { - target = scope:lover_1 - value >= 40 - } - reverse_opinion = { - target = scope:lover_1 - value >= 40 - } - } - } -} - - -#Simple Check if a given Secret Type is blackmailable - # NOTE THAT THIS CAN ONLY EVER CORRECTLY EVALUATE SECRETS THAT THE TARGET DOES NOT ALREADY HAVE - # ALSO NOTE THAT IT WILL ONLY EVER RETURN TRUE FOR SECRETS THAT ARE NOT RELIANT ON HAVING A VALID TARGET -secret_type_is_blackmailable_simple_trigger = { - # TYPE - # TARGET - - save_temporary_scope_value_as = { - name = type_flag - value = flag:$TYPE$ - } - - trigger_if = { - limit = { - scope:type_flag = flag:secret_deviant - } - secret_deviant_is_valid_trigger = { - OWNER = $TARGET$ - } - OR = { - secret_deviant_is_shunned_trigger = { - OWNER = $TARGET$ - } - secret_deviant_is_criminal_trigger = { - OWNER = $TARGET$ - } - } - } - trigger_else_if = { - limit = { - scope:type_flag = flag:secret_homosexual - } - secret_homosexual_is_valid_trigger = { - OWNER = $TARGET$ - } - OR = { - secret_homosexual_is_shunned_trigger = { - OWNER = $TARGET$ - } - secret_homosexual_is_criminal_trigger = { - OWNER = $TARGET$ - } - } - } - trigger_else_if = { - limit = { - scope:type_flag = flag:secret_cannibal - } - secret_cannibal_is_valid_trigger = { - OWNER = $TARGET$ - } - OR = { - secret_cannibal_is_shunned_trigger = { - OWNER = $TARGET$ - } - secret_cannibal_is_criminal_trigger = { - OWNER = $TARGET$ - } - } - } - trigger_else_if = { - limit = { - scope:type_flag = flag:secret_non_believer - } - secret_non_believer_is_valid_trigger = { - OWNER = $TARGET$ - } - OR = { - secret_non_believer_is_shunned_trigger = { - OWNER = $TARGET$ - } - secret_non_believer_is_criminal_trigger = { - OWNER = $TARGET$ - } - } - } - trigger_else_if = { - limit = { - scope:type_flag = flag:secret_incest - } - secret_incest_is_valid_trigger = { - OWNER = $TARGET$ - } - OR = { - secret_incest_is_shunned_trigger = { - OWNER = $TARGET$ - } - secret_incest_is_criminal_trigger = { - OWNER = $TARGET$ - } - } - } - trigger_else_if = { - limit = { - scope:type_flag = flag:secret_witch - } - secret_witch_is_valid_trigger = { - OWNER = $TARGET$ - } - OR = { - secret_witch_is_shunned_trigger = { - OWNER = $TARGET$ - } - secret_witch_is_criminal_trigger = { - OWNER = $TARGET$ - } - } - NOT = { - $BLACKMAILER$ = { is_witch_trigger = yes } - } - } - trigger_else_if = { - limit = { - scope:type_flag = flag:secret_crypto_religionist - } - secret_crypto_religionist_is_valid_trigger = { - OWNER = $TARGET$ - } - OR = { - secret_crypto_religionist_is_shunned_trigger = { - OWNER = $TARGET$ - } - secret_crypto_religionist_is_criminal_trigger = { - OWNER = $TARGET$ - } - } - } - trigger_else = { #Murder stuff, Bastard secrets, etc. - always = no - } -} - - -random_blackmailable_secret_can_be_added_simple_trigger = { - $TARGET$ = { save_temporary_scope_as = target } - OR = { - AND = { - secret_type_is_blackmailable_simple_trigger = { - TYPE = secret_deviant - TARGET = scope:target - BLACKMAILER = $BLACKMAILER$ - } - scope:target = { - NOT = { - any_secret = { - type = secret_deviant - } - } - } - } - AND = { - secret_type_is_blackmailable_simple_trigger = { - TYPE = secret_homosexual - TARGET = scope:target - BLACKMAILER = $BLACKMAILER$ - } - scope:target = { - NOT = { - any_secret = { - type = secret_homosexual - } - } - } - } - AND = { - secret_type_is_blackmailable_simple_trigger = { - TYPE = secret_cannibal - TARGET = scope:target - BLACKMAILER = $BLACKMAILER$ - } - scope:target = { - NOT = { - any_secret = { - type = secret_cannibal - } - } - } - } - AND = { - secret_type_is_blackmailable_simple_trigger = { - TYPE = secret_non_believer - TARGET = scope:target - BLACKMAILER = $BLACKMAILER$ - } - scope:target = { - NOT = { - any_secret = { - type = secret_non_believer - } - } - } - } - AND = { - secret_type_is_blackmailable_simple_trigger = { - TYPE = secret_incest - TARGET = scope:target - BLACKMAILER = $BLACKMAILER$ - } - scope:target = { - NOT = { - any_secret = { - type = secret_incest - } - } - } - } - AND = { - secret_type_is_blackmailable_simple_trigger = { - TYPE = secret_witch - TARGET = scope:target - BLACKMAILER = $BLACKMAILER$ - } - scope:target = { - NOT = { - any_secret = { - type = secret_witch - } - } - } - } - AND = { - secret_type_is_blackmailable_simple_trigger = { - TYPE = secret_crypto_religionist - TARGET = scope:target - BLACKMAILER = $BLACKMAILER$ - } - scope:target = { - NOT = { - any_secret = { - type = secret_crypto_religionist - } - } - } - } - } -} - -# If during the council task find secret's the spymaster can fabricate a hook on the target -spymaster_task_courtier_valid_for_hook_fabrication_trigger = { - is_available_ai_adult = yes - save_temporary_scope_as = target_check - NOR = { - this = scope:councillor - root = { - has_hook = scope:target_check - } - root = { - any_scheme = { - OR = { - scheme_target_character ?= scope:target_character - scheme_target_title ?= scope:target_character.primary_title - } - scheme_is_character_agent = scope:target_check - } - } - any_secret = { # Should prioritise actually finding Secrets - is_known_by = root - } - } -} - diff --git a/N3OW/common/scripted_triggers/00_secret_type_triggers.txt b/N3OW/common/scripted_triggers/00_secret_type_triggers.txt deleted file mode 100644 index 5f64410f..00000000 --- a/N3OW/common/scripted_triggers/00_secret_type_triggers.txt +++ /dev/null @@ -1,463 +0,0 @@ - -#Triggers for Shunned and Criminal Secret Types - - -# SECRET DEVIANT -secret_deviant_is_valid_trigger = { - $OWNER$ = { - is_adult = yes - NOT = { - has_trait = deviant - } - } -} - -secret_deviant_is_shunned_trigger = { - $OWNER$ = { - OR = { - faith = { has_doctrine_parameter = deviancy_shunned } - any_liege_or_above = { faith = { has_doctrine_parameter = deviancy_shunned } } - } - } -} - -secret_deviant_is_criminal_trigger = { - $OWNER$ = { - OR = { - faith = { has_doctrine_parameter = deviancy_illegal } - any_liege_or_above = { faith = { has_doctrine_parameter = deviancy_illegal } } - } - } -} -# SECRET DEVIANT - END - -# SECRET HOMOSEXUAL -secret_homosexual_is_valid_trigger = { - $OWNER$ = { - is_adult = yes - NOT = { - has_trait = sodomite - } - is_male = yes #Only for men since it is localized as Sodomite and also because female homosexuality historically hasn't been "a big deal" in most cultures - } -} - -secret_homosexual_is_shunned_trigger = { - $OWNER$ = { - OR = { - faith = { has_doctrine_parameter = homosexuality_shunned } - any_liege_or_above = { faith = { has_doctrine_parameter = homosexuality_shunned } } - } - } -} - -secret_homosexual_is_criminal_trigger = { - $OWNER$ = { - OR = { - faith = { has_doctrine_parameter = homosexuality_illegal } - any_liege_or_above = { faith = { has_doctrine_parameter = homosexuality_illegal } } - } - } -} -# SECRET HOMOSEXUAL - END - -# SECRET MURDER ATTEMPT -secret_murder_attempt_is_valid_trigger = { - NOT = { $OWNER$ = $TARGET$ } # Murder requires two people - - trigger_if = { # If the target is dead, check that the killer isn't the owner since then the attempt isn't really an attempt... - limit = { - $TARGET$ = { is_alive = no } - exists = $TARGET$.killer - } - NOT = { - $TARGET$.killer = $OWNER$ - } - } -} - -secret_murder_attempt_is_shunned_trigger = { - $TARGET$ = { - save_temporary_scope_as = attempted_murder_target - } - $OWNER$ = { - OR = { - NOT = { exists = liege } - any_liege_or_above = { - NOR = { - this = scope:attempted_murder_target - is_spouse_of = scope:attempted_murder_target - is_close_family_of = scope:attempted_murder_target - } - } - #You are your own liege (independent) or have no liege (pool) - liege = this - } - } -} - -secret_murder_attempt_is_criminal_trigger = { - $TARGET$ = { - save_temporary_scope_as = attempted_murder_target - } - $OWNER$ = { - any_liege_or_above = { - NOR = { - this = scope:attempted_murder_target - is_spouse_of = scope:attempted_murder_target - is_close_family_of = scope:attempted_murder_target - } - } - } -} -#SECRET MURDER ATTEMPT - END - -# SECRET CANNIBAL -secret_cannibal_is_valid_trigger = { - $OWNER$ = { - NOT = { has_trait = cannibal } - } -} - -secret_cannibal_is_shunned_trigger = { - $OWNER$ = { always = no } -} - -secret_cannibal_is_criminal_trigger = { - $OWNER$ = { - OR = { - faith = { - NOT = { has_doctrine_parameter = cannibalism_legal } - } - any_liege_or_above = { - faith = { - NOT = { has_doctrine_parameter = cannibalism_legal } - } - } - } - } -} -# SECRET CANNIBAL - END - -# SECRET LOVER -secret_lover_is_valid_trigger = { - $TARGET$ = { - is_alive = yes - save_temporary_scope_as = target - } - $OWNER$ = { - is_alive = yes - has_relation_lover = scope:target - NOT = { is_consort_of = scope:target } - } -} - -#Placed ahead of the Shunned trigger, so that the shunned trigger can refer back to this -secret_lover_is_criminal_trigger = { - $TARGET$ = { save_temporary_scope_as = criminal_partner } #Different name to the scope in the shunned trigger, to prevent issues - $OWNER$ = { - OR = { - # Adultery criminal - trait_is_criminal_in_faith_trigger = { - FAITH = faith - TRAIT = adulterer - GENDER_CHARACTER = $OWNER$ - } - any_liege_or_above = { - trait_is_criminal_in_faith_trigger = { - FAITH = faith - TRAIT = adulterer - GENDER_CHARACTER = $OWNER$ - } - } - #Sodomy criminal - AND = { - is_male = yes - scope:criminal_partner = { is_male = yes } - OR = { - faith = { has_doctrine_parameter = homosexuality_illegal } - any_liege_or_above = { faith = { has_doctrine_parameter = homosexuality_illegal } } - } - } - } - } -} - -secret_lover_is_shunned_trigger = { - $TARGET$ = { save_temporary_scope_as = partner } - $OWNER$ = { - save_temporary_scope_as = lover_owner - OR = { - #Adultery shunned - trait_is_shunned_in_faith_trigger = { - FAITH = faith - TRAIT = adulterer - GENDER_CHARACTER = scope:lover_owner - } - any_liege_or_above = { - trait_is_shunned_in_faith_trigger = { - FAITH = faith - TRAIT = adulterer - GENDER_CHARACTER = scope:lover_owner - } - } - #Sodomy shunned - AND = { - is_male = yes - scope:partner = { is_male = yes } - OR = { - faith = { has_doctrine_parameter = homosexuality_shunned } - any_liege_or_above = { faith = { has_doctrine_parameter = homosexuality_shunned } } - } - } - #Incest is shunned - relation_with_character_is_incestuous_in_faith_trigger = { CHARACTER = scope:partner FAITH = scope:lover_owner.faith } - any_liege_or_above = { - save_temporary_scope_as = liege_or_above - scope:lover_owner = { - relation_with_character_is_incestuous_in_faith_trigger = { CHARACTER = scope:partner FAITH = scope:liege_or_above.faith } - } - } - } - #And it doesn't fulfill the criminal conditions - NOT = { - secret_lover_is_criminal_trigger = { - OWNER = scope:lover_owner - TARGET = scope:partner - } - } - } -} -# SECRET LOVER - END - -# SECRET MURDER -secret_murder_is_trivial_trigger = { - #Is the murderer important enough to get away with it? - $OWNER$ = { highest_held_title_tier >= tier_county } - #Is it a murder that people might care about? - OR = { - #Independent rulers have little fear in terms of legal consequences for their actions. - $OWNER$ = { top_liege = this } - #Otherwise, certain victims are just not worth a strong hook. - $TARGET$ = { - NOR = { - #If landless or a baron, must have no important landed family. - AND = { - OR = { - is_ruler = no - highest_held_title_tier = tier_barony - } - any_close_or_extended_family_member = { highest_held_title_tier >= $OWNER$.primary_title.tier } - } - #Otherwise, characters who are two tiers lower than you arguably aren't nearly as much of a concern (again, providing they lack important family). - AND = { - tier_difference = { - target = $OWNER$ - value >= -1 - } - #Be a bit harsher with this, as these characters are the most likely to be relatives of the $OWNER$'s piers. - any_close_or_extended_family_member = { - tier_difference = { - target = $OWNER$ - value >= -1 - } - } - } - } - } - } -} - -secret_murder_is_valid_trigger = { - $TARGET$ = { - is_alive = no - killer = $OWNER$ - } -} - -#Murder attempts again unimportant characters are considered less serious. -secret_murder_is_shunned_trigger = { - $OWNER$ = { - secret_murder_is_trivial_trigger = { - OWNER = $OWNER$ - TARGET = $TARGET$ - } - } -} - -#If any of the get-out-if-imprisonment free clauses don't apply, then the murder is criminal -secret_murder_is_criminal_trigger = { - $OWNER$ = { - NOT = { - $OWNER$ = { - secret_murder_is_trivial_trigger = { - OWNER = $OWNER$ - TARGET = $TARGET$ - } - } - } - } -} -# SECRET MURDER - END - -# SECRET NON-BELIEVER -secret_non_believer_is_valid_trigger = { - $OWNER$ = { - NOT = { - has_character_modifier = known_non_believer - } - } -} - -secret_non_believer_is_shunned_trigger = { - $OWNER$ = { is_clergy = no } -} - -secret_non_believer_is_criminal_trigger = { - $OWNER$ = { is_clergy = yes } -} -# SECRET NON-BELIEVER - END - -# SECRET INCEST -secret_incest_is_valid_trigger = { - $OWNER$ = { - is_adult = yes - NOT = { - has_trait = incestuous - } - } -} - -secret_incest_is_shunned_trigger = { - $OWNER$ = { - OR = { - faith = { NOT = { has_doctrine_parameter = allows_unrestricted_marriage } } - any_liege_or_above = { faith = { NOT = { has_doctrine_parameter = allows_unrestricted_marriage } } } - } - } -} - -secret_incest_is_criminal_trigger = { - $OWNER$ = { always = no } -} -# SECRET INCEST - END - -# SECRET WITCH -secret_witch_is_valid_trigger = { - $OWNER$ = { - NOT = { - has_trait = witch - } - } -} - -secret_witch_is_shunned_trigger = { - $OWNER$ = { - OR = { - faith = { has_doctrine_parameter = witchcraft_shunned } - any_liege_or_above = { faith = { has_doctrine_parameter = witchcraft_shunned } } - } - } -} - -secret_witch_is_criminal_trigger = { - $OWNER$ = { - OR = { - faith = { has_doctrine_parameter = witchcraft_illegal } - any_liege_or_above = { faith = { has_doctrine_parameter = witchcraft_illegal } } - } - } -} -# SECRET WITCH - END - -# SECRET CRYPTO-RELIGIONIST -# Don't add the crypto-religionist trait if they practice that faith in the open -secret_crypto_religionist_is_valid_trigger = { - $OWNER$ = { - AND = { - exists = secret_faith - NOT = { secret_faith = $OWNER$.faith } - } - } -} - -# Same as secret non-believer -secret_crypto_religionist_is_shunned_trigger = { - $OWNER$ = { is_clergy = no } -} - -secret_crypto_religionist_is_criminal_trigger = { - $OWNER$ = { is_clergy = yes } -} -# SECRET CRYPTO-RELIGIONIST - END - -# SECRET EMBEZZLER -secret_embezzler_is_valid_trigger = { - # Can't embezzle from yourself. - ## Well, you can. - ### That's honestly even a fairly common white collar crime. - #### You just can't in-game. - ##### One rule for the wealthy, another for the rest of us [sigh]. - NOT = { $OWNER$ = $TARGET$ } -} - -# Embezzler is only criminal if the target is your liege _and_ the amount is very high. - -secret_embezzler_is_criminal_trigger = { - $OWNER$ = { - any_secret = { - type = secret_embezzler - secret_target ?= $OWNER$.liege - var:embezzlement_stake >= { - value = $OWNER$.monumental_gold_value - multiply = 1.5 - } - } - } - -} -# SECRET EMBEZZLER - END - -# SECRET COUP_LEADER -secret_coup_plotter_is_valid_trigger = { - # Can't coup yourself - NOT = { $OWNER$ = $TARGET$ } - # Both of y'all must still be admin - $OWNER$ = { government_allows = administrative } - $TARGET$ = { government_allows = administrative } -} - -secret_coup_plotter_is_criminal_trigger = { - always = yes -} -# SECRET COUP_LEADER - END - -secret_raid_estate_is_valid_trigger = { - NOT = { $OWNER$ = $TARGET$ } -} - -secret_raid_estate_is_criminal_trigger = { - NOT = { - $OWNER$.var:raid_estate_permission ?= $TARGET$.house - } -} - -secret_siphoned_treasury_is_valid_trigger = { - # Both of y'all must still have treasuries - $OWNER$ = { has_treasury = yes } - $TARGET$ = { has_treasury = yes } -} - -# criminal only if the target is your liege or the Hegemon -secret_siphoned_treasury_is_criminal_trigger = { - $TARGET$ = { - OR = { - is_liege_or_above_of = $OWNER$ - AND = { - exists = title:h_china - has_title = title:h_china - } - } - } - -} diff --git a/N3OW/common/scripted_triggers/00_sibling_triggers.txt b/N3OW/common/scripted_triggers/00_sibling_triggers.txt deleted file mode 100644 index 5261531f..00000000 --- a/N3OW/common/scripted_triggers/00_sibling_triggers.txt +++ /dev/null @@ -1,18 +0,0 @@ - -###TRIGGER LIST - -# has_adult_friendly_unlanded_sibling_trigger - - -has_adult_friendly_unlanded_sibling_trigger = { - any_sibling = { - is_landed_or_landless_administrative = no - is_adult = yes - opinion = { - target = root - value > 30 - } - } -} - - diff --git a/N3OW/common/scripted_triggers/00_single_combat_scripted_triggers.txt b/N3OW/common/scripted_triggers/00_single_combat_scripted_triggers.txt deleted file mode 100644 index b90eab90..00000000 --- a/N3OW/common/scripted_triggers/00_single_combat_scripted_triggers.txt +++ /dev/null @@ -1,78 +0,0 @@ - -################################################## -# GENERIC TRIGGERS - -# Note: this is a very stripped down trigger set. It's expected that it'll be parsed through something that parses out more typically unsuitable candidates (e.g., prisoners under most circumstances). -can_start_single_combat_trigger = { - # Check for the usual stuff. - can_start_single_combat_eligibility_checks_trigger = yes - # And filter out those who can never be in single combat. - can_start_single_combat_banned_checks_trigger = no -} - -can_start_single_combat_eligibility_checks_trigger = { - # Remove children and the cripplingly-old. - is_adult = yes - custom_description = { - text = banned_from_combat_old_and_frail - NAND = { - age >= 70 - prowess < 10 - } - } - # Filter out traits. - NOR = { - has_trait = pregnant - has_trait = incapable - has_trait = blind - } - # Check other scripted triggers - has_contagious_deadly_disease_trigger = no -} - -can_start_single_combat_banned_checks_trigger = { - # Currently, we just *always* filter anyone who's already in a bout. - exists = var:engaged_in_single_combat -} - -# Does the character have a trait with a notably beneficial special combat move? -has_relevant_special_single_combat_trait_trigger = { - OR = { - has_trait = lifestyle_blademaster - has_trait = lifestyle_hunter - has_trait = berserker - has_trait = shieldmaiden - has_trait = varangian - has_trait = deviant - has_trait = viking - } -} - -################################################## -# MOVE TRIGGERS - -single_combat_location_has_crocodilians_trigger = { - scope:sc_defender.location = { - # First, we look at supra regions. - OR = { - geographical_region = world_africa_west - geographical_region = world_africa_east - geographical_region = world_middle_east_persia - geographical_region = world_burma - geographical_region = world_india - geographical_region = world_asia_southeast - } - # Then, if any of those apply, drill down. - OR = { - # Either coastal. - is_coastal = yes - is_riverside_province = yes - # Or has a suitable terrain. - terrain = oasis - terrain = jungle - terrain = wetlands - terrain = floodplains - terrain = farmlands - } - } -} diff --git a/N3OW/common/scripted_triggers/00_statecraft_lifestyle_triggers.txt b/N3OW/common/scripted_triggers/00_statecraft_lifestyle_triggers.txt deleted file mode 100644 index 09e304a4..00000000 --- a/N3OW/common/scripted_triggers/00_statecraft_lifestyle_triggers.txt +++ /dev/null @@ -1,11 +0,0 @@ - -respected_liege_0002_bad_traits_trigger = { - OR = { - has_trait = arbitrary - has_trait = shy - has_trait = greedy - has_trait = sadistic - has_trait = callous - } -} - diff --git a/N3OW/common/scripted_triggers/00_stress_triggers.txt b/N3OW/common/scripted_triggers/00_stress_triggers.txt deleted file mode 100644 index 68787ccd..00000000 --- a/N3OW/common/scripted_triggers/00_stress_triggers.txt +++ /dev/null @@ -1,358 +0,0 @@ - -# This trigger is used when offering the player a choice between two stress outlets for a stress threshold event. -# The stress threshold event will add character flags from this list, based on a character's personality and relevance to the event, until two have been selected. -has_two_stress_threshold_options = { - calc_true_if = { - amount >= 2 - - has_character_flag = stress_threshold_option_drunkard - has_character_flag = stress_threshold_option_hashishiyah - has_character_flag = stress_threshold_option_rakish - has_character_flag = stress_threshold_option_reclusive - has_character_flag = stress_threshold_option_irritable - has_character_flag = stress_threshold_option_flagellant - has_character_flag = stress_threshold_option_profligate - has_character_flag = stress_threshold_option_improvident - has_character_flag = stress_threshold_option_contrite - has_character_flag = stress_threshold_option_comfort_eater - has_character_flag = stress_threshold_option_inappetetic - has_character_flag = stress_threshold_option_journaller - has_character_flag = stress_threshold_option_confider - has_character_flag = stress_threshold_option_athletic - has_character_flag = stress_threshold_option_conversion - has_character_flag = stress_threshold_option_depression - } -} - -# Check if the player already has two stress coping traits ( we don't want to give any more than that! ) -has_two_stress_coping_traits_trigger = { - calc_true_if = { - amount >= 2 - has_trait = drunkard - has_trait = hashishiyah - has_trait = rakish - has_trait = reclusive - has_trait = irritable - has_trait = flagellant - has_trait = profligate - has_trait = improvident - has_trait = contrite - has_trait = comfort_eater - has_trait = inappetetic - has_trait = journaller - has_trait = confider - has_trait = athletic - } -} - -has_a_stress_coping_trait_trigger = { - OR = { - has_trait = drunkard - has_trait = hashishiyah - has_trait = rakish - has_trait = reclusive - has_trait = irritable - has_trait = flagellant - has_trait = profligate - has_trait = improvident - has_trait = contrite - has_trait = comfort_eater - has_trait = inappetetic - has_trait = journaller - has_trait = confider - has_trait = athletic - } -} - -has_a_bad_stress_coping_trait_trigger = { - OR = { - has_trait = drunkard - has_trait = hashishiyah - has_trait = rakish - has_trait = irritable - has_trait = flagellant - has_trait = profligate - has_trait = contrite - has_trait = comfort_eater - has_trait = inappetetic - } -} - -can_be_drunkard = { - is_adult = yes - NOR = { # Cannot be Temperate or already have a Substance Abuse trait. - has_trait = drunkard - has_trait = hashishiyah - has_trait = temperate - } - faith = { # Cannot be Muslim ( some Muslims did actually drink, but ideally we want Muslims to be Hashishiyahs instead of Drunkards because it is more thematic). - NOT = { - religion_tag = islam_religion - } - } -} - -can_be_hashishiyah = { - is_adult = yes - NOR = { # Cannot be Temperate or already have a Substance Abuse trait. - has_trait = drunkard - has_trait = hashishiyah - has_trait = temperate - } - - NAND = { # Cannot be Zealous if faith views hashish as sinful - faith = { trait_is_sin = hashishiyah } - has_trait = zealous - } - - OR = { - # Muslims always have access to Hashish... - faith = { - religion_tag = islam_religion - } - # Otherwise you must not be located in Europe (where Hashish was relatively unknown until modern times.) - AND = { - OR = { - capital_province ?= { - save_temporary_scope_as = my_home_province - } - liege.capital_province ?= { - save_temporary_scope_as = my_home_province - } - } - scope:my_home_province = { - NOR = { - geographical_region = world_europe - geographical_region = world_asia - } - } - } - } -} - -can_be_rakish = { # Must have a fitting personality or lifestyle - is_adult = yes - NOR = { - has_trait = rakish - has_sexuality = asexual - has_trait = celibate - has_trait = chaste - } - OR = { - has_trait = lustful - has_trait = arrogant - has_trait = deceitful - has_trait = gallant - has_trait = seducer - } -} - -can_be_reclusive = { # Must have a fitting personality or lifestyle - NOT = { has_trait = reclusive } - OR = { - has_trait = shy - has_trait = lazy - has_trait = paranoid - has_trait = craven - has_trait = cynical - has_trait = just # Does this make sense here? - } -} - -can_be_irritable = { # Must have a fitting personality or lifestyle - NOT = { - has_trait = irritable - } - OR = { - has_trait = wrathful - has_trait = impatient - has_trait = arrogant - has_trait = stubborn - has_trait = vengeful - has_trait = callous - } -} - -can_be_flagellant = { # Must have a fitting personality or lifestyle - NOR = { - has_trait = flagellant - faith = { has_doctrine = special_doctrine_immaterial_harmony } - } - OR = { - has_trait = zealous - has_trait = chaste - has_trait = temperate - has_trait = humble - has_trait = lifestyle_mystic - } -} - -can_be_profligate = { # Must have a fitting personality or lifestyle - NOT = { has_trait = profligate } - OR = { - has_trait = greedy - has_trait = ambitious - has_trait = arbitrary - has_trait = gregarious - has_trait = cynical - } -} - -can_be_improvident = { # Must have a fitting personality or lifestyle - NOT = { has_trait = improvident } - OR = { - has_trait = generous - has_trait = forgiving - has_trait = compassionate - has_trait = just - has_trait = content - } -} - -can_be_contrite = { - NOT = { has_trait = contrite } - OR = { # Must have a fitting personality or lifestyle - has_trait = deceitful - has_trait = schemer - has_trait = honest - has_trait = trusting - has_trait = humble - } - OR = { # Must have something to feel guilty about / confess to. - num_sinful_traits >= 1 - any_secret = { - exists = this - can_be_exposed_by = root - } - } -} - -can_be_comfort_eater = { # Must have a fitting personality. - NOR = { - has_trait = comfort_eater - has_trait = inappetetic - has_trait = temperate - } - OR = { - has_trait = gluttonous - has_trait = fickle - has_trait = arbitrary - has_trait = impatient - has_trait = calm - } -} - -can_be_inappetetic = { # Must have a fitting personality. - NOR = { - has_trait = comfort_eater - has_trait = inappetetic - has_trait = gluttonous - } - OR = { - has_trait = temperate - has_trait = content - has_trait = arbitrary - has_trait = patient - has_trait = diligent - } -} - -can_be_journaller = { # Must be a learned character with the scholarship lifestyle. - NOT = { has_trait = journaller } - learning >= high_skill_rating - OR = { - has_trait = scholar - has_trait = theologian - } -} - -can_be_confider = { # Must have a close friend they can confide in (and be willing to confide in!) - NOR = { - has_trait = confider - has_trait = shy - has_trait = arrogant - has_trait = paranoid - } - any_relation = { - type = friend - is_available_ai_adult = yes - } -} - -can_be_athletic = { # Must be willing and interested in getting out and exercising. - has_traits_that_negate_athletic_trigger = no #Are we already athletic or does any of our traits contradict athletic? - OR = { - has_trait = brave - has_trait = diligent - } -} - - -can_do_lustful_stress_conversion = { - is_ai = no # AI picks this way too often and makes the map predominantly Paulician/Orthodox/Karite - is_adult = yes - - # So you don't end up with Sapmi or African pagans or Indian kings going "Yeah let's worship Jesus now!" and everyone else goes "Who is Jesus?" - religion = { is_in_family = rf_abrahamic } - - # So the Caliph doesn't just convert after a bad day - this != faith.religious_head -} - -can_inflict_torture = { - OR = { - has_trait = sadistic - has_trait = vengeful - has_trait = torturer - has_trait = lifestyle_hunter - has_trait = lifestyle_blademaster - } -} - -can_be_eccentric = { - NOR = { - has_trait = fickle - has_trait = stubborn - has_trait = eccentric - } -} - -has_witnessed_stress_coping_trait = { - NOT = { has_trait = $TRAIT$ } - var:witnessed_trait ?= flag:$TRAIT$ -} - -can_be_burdened = { - NOT = { - has_trait = burdened - } - is_adult = no - trigger_if = { - limit = { - faith = { has_doctrine = doctrine_gender_female_dominated } - } - is_female = yes - } - trigger_else_if = { - limit = { - faith = { has_doctrine = doctrine_gender_male_dominated } - } - is_female = no - } - trigger_else = { always = yes } - # TGP flavor stress trait - government_allows = merit - OR = { - # This stress trait is for children only, after all - has_trait = bossy - has_trait = pensive - has_trait = rowdy - # But kids get adult traits too - has_trait = wrathful - has_trait = impatient - has_trait = arrogant - has_trait = stubborn - has_trait = vengeful - has_trait = callous - } -} \ No newline at end of file diff --git a/N3OW/common/scripted_triggers/00_succession_triggers.txt b/N3OW/common/scripted_triggers/00_succession_triggers.txt deleted file mode 100644 index a23f89be..00000000 --- a/N3OW/common/scripted_triggers/00_succession_triggers.txt +++ /dev/null @@ -1,80 +0,0 @@ -#Special succession types -#If adding new types to the decision, use a trigger, otherwise they may break if the culture is split. - -special_succession_witengamot_trigger = { - culture = { has_cultural_parameter = witenagemot_succession_enabled } -} - -special_succession_thing_trigger = { - culture = { has_cultural_parameter = scandinavian_elective_enabled } -} - -special_succession_tanistry_trigger = { - culture = { - OR = { - has_cultural_pillar = heritage_brythonic - has_cultural_pillar = heritage_goidelic - } - } -} - -special_succession_jirga_trigger = { - culture = { has_cultural_parameter = tribal_elective_enabled } -} - -historical_succession_access_single_heir_succession_law_trigger = { - trigger_if = { - limit = { government_allows = administrative } - OR = { - tgp_japan_single_heir_succession_override_trigger = yes - tgp_korea_single_heir_succession_override_trigger = yes - has_title = title:e_hindustan - has_title = title:h_china - } - } - trigger_else = { - OR = { - has_title = title:k_austria - is_roman_emperor_trigger = yes - AND = { - has_title = title:e_france - is_target_in_global_variable_list = { - name = unavailable_unique_decisions - target = flag:flag_reformed_carolingian_empire - } - } - has_title = title:e_hindustan - has_title = title:h_china - AND = { - government_has_flag = government_is_japan_feudal - is_independent_ruler = yes - } - #Add any subsequent exceptions here. - } - } -} - -historical_succession_access_single_heir_succession_law_youngest_trigger = { - NOT = { government_allows = administrative } - OR = { - #has_title = title:e_byzantium - #Add any subsequent exceptions here. - } -} - -historical_succession_access_single_heir_dynasty_house_trigger = { - NOT = { government_allows = administrative } - AND = { - has_title = title:d_bohemia - culture = { has_innovation = innovation_table_of_princes } - } -} - -can_have_meritocratic_regency_succession_law_trigger = { - has_tgp_dlc_trigger = yes - is_independent_ruler = yes - highest_held_title_tier = tier_empire - government_allows = administrative - government_allows = merit - NOT = { government_allows = obedience } # Stop Khanates -} diff --git a/N3OW/common/scripted_triggers/00_task_contract_triggers.txt b/N3OW/common/scripted_triggers/00_task_contract_triggers.txt deleted file mode 100644 index 922ebacb..00000000 --- a/N3OW/common/scripted_triggers/00_task_contract_triggers.txt +++ /dev/null @@ -1,292 +0,0 @@ - -#This should list _ALL_ laamp_contracts_criminal_group-contracts -can_create_criminal_contract_trigger = { - $LAAMP$ = { - OR = { - can_create_task_contract = { - type_name = laamp_base_0041 - employer = $EMPLOYER$ - } - can_create_task_contract = { - type_name = laamp_base_1041 - employer = $EMPLOYER$ - } - can_create_task_contract = { - type_name = laamp_base_5031 - employer = $EMPLOYER$ - } - can_create_task_contract = { - type_name = laamp_base_5051 - employer = $EMPLOYER$ - } - can_create_task_contract = { - type_name = laamp_base_2041 - employer = $EMPLOYER$ - } - can_create_task_contract = { - type_name = laamp_base_3011 - employer = $EMPLOYER$ - } - can_create_task_contract = { - type_name = laamp_base_3031 - employer = $EMPLOYER$ - } - can_create_task_contract = { - type_name = laamp_base_3041 - employer = $EMPLOYER$ - } - can_create_task_contract = { - type_name = laamp_base_4041 - employer = $EMPLOYER$ - } - } - } -} - -#This should list _ALL_ laamp_contracts_diplomacy_group-contracts -can_create_diplomacy_contract_trigger = { - $LAAMP$ = { - OR = { - can_create_task_contract = { - type_name = laamp_base_0001 - employer = $EMPLOYER$ - } - can_create_task_contract = { - type_name = laamp_base_0011 - employer = $EMPLOYER$ - } - can_create_task_contract = { - type_name = laamp_base_0021 - employer = $EMPLOYER$ - } - can_create_task_contract = { - type_name = laamp_base_0031 - employer = $EMPLOYER$ - } - can_create_task_contract = { - type_name = laamp_cultural_minority_contract - employer = $EMPLOYER$ - } - can_create_task_contract = { - type_name = laamp_religious_minority_contract - employer = $EMPLOYER$ - } - can_create_task_contract = { - type_name = laamp_boost_legitimacy_contract - employer = $EMPLOYER$ - } - } - } -} - -#This should list _ALL_ laamp_contracts_hireling_group-contracts. Martial are also stashed here. -can_create_hireling_contract_trigger = { - $LAAMP$ = { - OR = { - can_create_task_contract = { - type_name = laamp_base_1011 - employer = $EMPLOYER$ - } - can_create_task_contract = { - type_name = laamp_base_2001 - employer = $EMPLOYER$ - } - can_create_task_contract = { - type_name = laamp_help_train_commanders_contract - employer = $EMPLOYER$ - } - can_create_task_contract = { - type_name = laamp_rid_councillor_contract - employer = $EMPLOYER$ - } - can_create_task_contract = { - type_name = laamp_gain_wanderer_contract - employer = $EMPLOYER$ - } - } - } -} - -#This should list _ALL_ laamp_contracts_justicar_group-contracts -can_create_justicar_contract_trigger = { - $LAAMP$ = { - OR = { - can_create_task_contract = { - type_name = laamp_base_6001 - employer = $EMPLOYER$ - } - can_create_task_contract = { - type_name = laamp_base_6011 - employer = $EMPLOYER$ - } - can_create_task_contract = { - type_name = laamp_base_6021 - employer = $EMPLOYER$ - } - can_create_task_contract = { - type_name = laamp_base_6031 - employer = $EMPLOYER$ - } - } - } -} - -#This should list _ALL_ laamp_contracts_learning_group-contracts -can_create_learning_contract_trigger = { - $LAAMP$ = { - OR = { - can_create_task_contract = { - type_name = laamp_base_4001 - employer = $EMPLOYER$ - } - can_create_task_contract = { - type_name = laamp_base_4011 - employer = $EMPLOYER$ - } - can_create_task_contract = { - type_name = laamp_base_4021 - employer = $EMPLOYER$ - } - can_create_task_contract = { - type_name = laamp_base_4031 - employer = $EMPLOYER$ - } - can_create_task_contract = { - type_name = laamp_base_4100 - employer = $EMPLOYER$ - } - can_create_task_contract = { - type_name = laamp_help_faith_conversion_contract - employer = $EMPLOYER$ - } - can_create_task_contract = { - type_name = laamp_fight_faith_conversion_contract - employer = $EMPLOYER$ - } - } - } -} - -#This should list _ALL_ laamp_contracts_intrigue_group-contracts -can_create_intrigue_contract_trigger = { - $LAAMP$ = { - OR = { - can_create_task_contract = { - type_name = laamp_base_3001 - employer = $EMPLOYER$ - } - can_create_task_contract = { - type_name = laamp_prison_break_contract - employer = $EMPLOYER$ - } - can_create_task_contract = { - type_name = laamp_help_find_secrets_contract - employer = $EMPLOYER$ - } - can_create_task_contract = { - type_name = laamp_help_fabricate_claim_contract - employer = $EMPLOYER$ - } - can_create_task_contract = { - type_name = laamp_help_increase_control_contract - employer = $EMPLOYER$ - } - can_create_task_contract = { - type_name = laamp_find_secret_contract - employer = $EMPLOYER$ - } - can_create_task_contract = { - type_name = laamp_eliminate_heir_contract - employer = $EMPLOYER$ - } - } - } -} - -#This should list _ALL_ laamp_contracts_stewardship_group-contracts -can_create_stewardship_contract_trigger = { - $LAAMP$ = { - OR = { - can_create_task_contract = { - type_name = laamp_base_2011 - employer = $EMPLOYER$ - } - can_create_task_contract = { - type_name = laamp_base_2021 - employer = $EMPLOYER$ - } - can_create_task_contract = { - type_name = laamp_base_2031 - employer = $EMPLOYER$ - } - } - } -} - -#This should list _ALL_ laamp_contracts_transport_group-contracts -can_create_transport_contract_trigger = { - $LAAMP$ = { - OR = { - can_create_task_contract = { - type_name = laamp_construction_contract - employer = $EMPLOYER$ - } - can_create_task_contract = { - type_name = laamp_treasure_hunting_contract - employer = $EMPLOYER$ - } - can_create_task_contract = { - type_name = laamp_transport_vip - employer = $EMPLOYER$ - } - can_create_task_contract = { - type_name = laamp_transport_artifact - employer = $EMPLOYER$ - } - can_create_task_contract = { - type_name = laamp_transport_gold - employer = $EMPLOYER$ - } - can_create_task_contract = { - type_name = laamp_transport_ward - employer = $EMPLOYER$ - } - can_create_task_contract = { - type_name = laamp_transport_explorer - employer = $EMPLOYER$ - } - can_create_task_contract = { - type_name = laamp_transport_animal - employer = $EMPLOYER$ - } - can_create_task_contract = { - type_name = laamp_transport_explorer - employer = $EMPLOYER$ - } - } - } -} - -contract_is_tier_3_contract_trigger = { - scope:task_contract.task_contract_tier = define:NTaskContract|HIGH_TASK_CONTRACT_TIER -} - -contract_is_tier_2_contract_trigger = { - scope:task_contract.task_contract_tier = define:NTaskContract|MEDIUM_TASK_CONTRACT_TIER -} - -contract_is_tier_1_contract_trigger = { - scope:task_contract.task_contract_tier = define:NTaskContract|LOW_TASK_CONTRACT_TIER -} - -is_tier_3_contract_trigger = { - task_contract_tier = define:NTaskContract|HIGH_TASK_CONTRACT_TIER -} - -is_tier_2_contract_trigger = { - task_contract_tier = define:NTaskContract|MEDIUM_TASK_CONTRACT_TIER -} - -is_tier_1_contract_trigger = { - task_contract_tier = define:NTaskContract|LOW_TASK_CONTRACT_TIER -} diff --git a/N3OW/common/scripted_triggers/00_terrain_triggers.txt b/N3OW/common/scripted_triggers/00_terrain_triggers.txt deleted file mode 100644 index 2e0e70cf..00000000 --- a/N3OW/common/scripted_triggers/00_terrain_triggers.txt +++ /dev/null @@ -1,87 +0,0 @@ - -######################### -# Triggers for Province Terrain -######################### -is_wooded_trigger = { - OR = { - terrain = forest - terrain = jungle - terrain = taiga - } -} - -is_mountainous_trigger = { - OR = { - terrain = mountains - terrain = desert_mountains - } -} - -is_mountainous_or_hilly_trigger = { - OR = { - terrain = mountains - terrain = desert_mountains - terrain = hills - } -} - -is_drylands_trigger = { - OR = { - terrain = drylands - terrain = steppe - } -} - -is_desert_trigger = { - OR = { - terrain = desert - terrain = desert_mountains - terrain = oasis - } -} - -is_drylands_or_desert_trigger = { - OR = { - terrain = drylands - terrain = steppe - terrain = desert - terrain = desert_mountains - terrain = oasis - } -} - -is_wetland_trigger = { - OR = { - terrain = wetlands - terrain = floodplains - terrain = oasis - } -} - -is_flatlands_trigger = { - OR = { - terrain = steppe - terrain = plains - terrain = farmlands - } -} - -is_likely_to_contain_trees_trigger = { - OR = { - is_wooded_trigger = yes - is_wetland_trigger = yes - is_flatlands_trigger = yes - terrain = hills - } -} - -holds_county_with_water_trigger = { - any_held_county = { - any_county_province = { - NOR = { - terrain = desert - terrain = desert_mountains - } - } - } -} diff --git a/N3OW/common/scripted_triggers/00_travel_triggers.txt b/N3OW/common/scripted_triggers/00_travel_triggers.txt deleted file mode 100644 index 94b375bd..00000000 --- a/N3OW/common/scripted_triggers/00_travel_triggers.txt +++ /dev/null @@ -1,257 +0,0 @@ -is_location_valid_for_travel_event_on_land = { - location = { - exists = county #This will exclude sea provinces, impassable provinces, river provinces, etc - } -} - -is_guard_type_character_trigger = { - OR = { - has_court_position = bodyguard_court_position - has_court_position = akolouthos_court_position - is_knight_of = root - has_council_position = councillor_marshal - save_temporary_scope_as = guard_check - AND = { - root.current_travel_plan = { - scope:guard_check = { is_travel_entourage_character = yes } - } - is_available_travelling_adult = yes - is_healthy = yes - prowess > low_skill_rating - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } - } - } -} - -is_character_not_specialized_in_terrain = { #Used in character scope - save_temporary_scope_as = character_in_terrain - is_location_valid_for_travel_event_on_land = yes - location = { #Is it reasonable for us to get lost, etc in this type of terrain? - switch = { - trigger = terrain - jungle = { - scope:character_in_terrain = { - NOT = { has_trait = jungle_stalker } - current_travel_plan.travel_leader ?= { - NOT = { has_trait = jungle_stalker } - } - } - } - desert = { - scope:character_in_terrain = { - NOT = { has_trait = desert_warrior } - current_travel_plan.travel_leader ?= { - NOT = { has_trait = desert_warrior } - } - } - } - drylands = { - scope:character_in_terrain = { - NOT = { has_trait = desert_warrior } - current_travel_plan.travel_leader ?= { - NOT = { has_trait = desert_warrior } - } - } - } - desert_mountains = { - scope:character_in_terrain = { - NOT = { has_trait = desert_warrior } - current_travel_plan.travel_leader ?= { - NOT = { has_trait = desert_warrior } - } - } - } - oasis = { - scope:character_in_terrain = { - NOT = { has_trait = desert_warrior } - current_travel_plan.travel_leader ?= { - NOT = { has_trait = desert_warrior } - } - } - } - mountains = { - scope:character_in_terrain = { - NOT = { has_trait = desert_warrior } - current_travel_plan.travel_leader ?= { - NOT = { has_trait = desert_warrior } - } - } - } - wetlands = { - scope:character_in_terrain = { - NOT = { has_trait = desert_warrior } - current_travel_plan.travel_leader ?= { - NOT = { has_trait = desert_warrior } - } - } - } - hills = { - scope:character_in_terrain = { - NOT = { has_trait = desert_warrior } - current_travel_plan.travel_leader ?= { - NOT = { has_trait = desert_warrior } - } - } - } - farmlands = { - scope:character_in_terrain = { - NOT = { has_trait = open_terrain_expert } - current_travel_plan.travel_leader ?= { - NOT = { has_trait = open_terrain_expert } - } - } - } - plains = { - scope:character_in_terrain = { - NOT = { has_trait = open_terrain_expert } - current_travel_plan.travel_leader ?= { - NOT = { has_trait = open_terrain_expert } - } - } - } - steppe = { - scope:character_in_terrain = { - NOT = { has_trait = open_terrain_expert } - current_travel_plan.travel_leader ?= { - NOT = { has_trait = open_terrain_expert } - } - } - } - forest = { - scope:character_in_terrain = { - NOT = { has_trait = forest_fighter } - current_travel_plan.travel_leader ?= { - NOT = { has_trait = forest_fighter } - } - } - } - taiga = { - scope:character_in_terrain = { - NOT = { has_trait = forest_fighter } - current_travel_plan.travel_leader ?= { - NOT = { has_trait = forest_fighter } - } - } - } - } - } -} - -has_sea_danger_type = { - is_sea_province = yes - OR = { - travel_danger_type = { - travel_plan = $TRAVEL$ - terrain = sea - } - travel_danger_type = { - travel_plan = $TRAVEL$ - terrain = coastal_sea - } - } -} - -has_terrain_danger_type = { - OR = { - travel_danger_type = { - travel_plan = $TRAVEL$ - terrain = hills - } - travel_danger_type = { - travel_plan = $TRAVEL$ - terrain = forest - } - travel_danger_type = { - travel_plan = $TRAVEL$ - terrain = mountains - } - travel_danger_type = { - travel_plan = $TRAVEL$ - terrain = desert_mountains - } - travel_danger_type = { - travel_plan = $TRAVEL$ - terrain = wetlands - } - travel_danger_type = { - travel_plan = $TRAVEL$ - terrain = floodplains - } - travel_danger_type = { - travel_plan = $TRAVEL$ - terrain = drylands - } - travel_danger_type = { - travel_plan = $TRAVEL$ - terrain = desert - } - travel_danger_type = { - travel_plan = $TRAVEL$ - terrain = jungle - } - travel_danger_type = { - travel_plan = $TRAVEL$ - terrain = steppe - } - } -} - -is_nomadic_location_trigger = { - geographical_region = world_steppe - culture = { - OR = { - has_cultural_pillar = heritage_mongolic - has_cultural_pillar = heritage_turkic - has_cultural_pillar = heritage_ugro_permian - } - } -} - -is_snowy_rural_scandinavia_location_trigger = { - location = { - OR = { - has_holding = no - has_holding_type = tribal_holding - } - geographical_region = world_europe_north - } - location_has_winter_trigger = yes -} - -### EP2 BACKGROUND TRIGGERS - -# Checks that a character is traveling to or from an activity and is not currently participating in an activity -is_travelling_not_at_activity = { - is_travelling = yes - trigger_if = { - limit = { exists = involved_activity } - has_activity_state = travel - } -} - -# Checks that a character is traveling, but currently at an activity and not actually moving around the map -is_travelling_at_activity = { - is_travelling = yes - trigger_if = { - limit = { exists = involved_activity } - NOT = { has_activity_state = travel } - } -} - -#update this if a new travel point of interest is added to the game, although currently it's only used in 1 laamp task contract -has_any_travel_poi_trigger = { - OR = { - has_travel_point_of_interest = poi_capitals - has_travel_point_of_interest = poi_special_buildings_martial - has_travel_point_of_interest = poi_special_buildings_learning - has_travel_point_of_interest = poi_special_buildings_religious - has_travel_point_of_interest = poi_special_buildings_diplomatic - has_travel_point_of_interest = poi_grand_city - has_travel_point_of_interest = poi_special_buildings_wonder - has_travel_point_of_interest = poi_special_buildings_economic - has_travel_point_of_interest = poi_mausoleum_at_halicarnassus - has_travel_point_of_interest = poi_lighthouse_of_alexandria - has_travel_point_of_interest = poi_natural_feature - has_travel_point_of_interest = poi_mandala_capital - } -} diff --git a/N3OW/common/scripted_triggers/00_tutorial_triggers.txt b/N3OW/common/scripted_triggers/00_tutorial_triggers.txt deleted file mode 100644 index 5cc05770..00000000 --- a/N3OW/common/scripted_triggers/00_tutorial_triggers.txt +++ /dev/null @@ -1,16 +0,0 @@ -should_show_tutorial_alert = { - OR= { - can_start_tutorial_lesson = $LESSON$ - is_tutorial_lesson_active = $LESSON$ - } -} - -valid_raid_target_trigger = { - NOR = { - has_raid_immunity_against = root - is_allied_to = root - has_truce = root - target_is_vassal_or_below = root - top_liege = root.top_liege - } -} diff --git a/N3OW/common/scripted_triggers/00_vassal_stance_triggers.txt b/N3OW/common/scripted_triggers/00_vassal_stance_triggers.txt deleted file mode 100644 index 2346da31..00000000 --- a/N3OW/common/scripted_triggers/00_vassal_stance_triggers.txt +++ /dev/null @@ -1,84 +0,0 @@ - -### Vassal stance trigger list - -# has_same_vassal_stance_as_trigger - -has_same_vassal_stance_as_trigger = { - top_liege != this - save_temporary_scope_as = vassal_temp - $COMPARE$ = { - top_liege != this - save_temporary_scope_as = compare_temp - } - scope:compare_temp = { - switch = { - trigger = has_vassal_stance - courtly = { scope:vassal_temp = { has_vassal_stance = courtly } } - glory_hound = { scope:vassal_temp = { has_vassal_stance = glory_hound } } - parochial = { scope:vassal_temp = { has_vassal_stance = parochial } } - zealot = { scope:vassal_temp = { has_vassal_stance = zealot } } - minority = { scope:vassal_temp = { has_vassal_stance = minority } } - barons_and_minor_landholders = { scope:vassal_temp = { has_vassal_stance = barons_and_minor_landholders } } - belligerent = { scope:vassal_temp = { has_vassal_stance = belligerent } } - } - } -} - -vassal_is_valid_and_follows_directive_trigger = { - top_liege != this - is_landed = yes - highest_held_title_tier >= tier_county - is_ai = yes - vassal_follows_directive_valid_trigger = { VASSAL = $VASSAL$ LIEGE = $LIEGE$ } - vassal_follows_directive_trigger = { VASSAL = $VASSAL$ LIEGE = $LIEGE$ } -} - -vassal_follows_directive_valid_trigger = { - $VASSAL$ = { save_temporary_scope_as = directive_vassal } - $LIEGE$ = { save_temporary_scope_as = directive_liege } - scope:directive_vassal = { - trigger_if = { - limit = { - scope:directive_liege = { government_allows = administrative } - } - is_vassal_of = scope:directive_liege - } - trigger_else = { - is_vassal_of = scope:directive_liege - } - NOT = { has_relation_rival = scope:directive_liege } - NOT = { is_at_war_with = scope:directive_liege } - NOT = { has_trait = disloyal } - } -} - -vassal_follows_directive_trigger = { - $VASSAL$ = { save_temporary_scope_as = directive_vassal } - $LIEGE$ = { save_temporary_scope_as = directive_liege } - scope:directive_vassal = { - OR = { - trigger_if = { - limit = { - has_dlc_feature = roads_to_power - } - custom_tooltip = { - text = has_admin_gov - government_allows = administrative - } - } - opinion = { - value >= 50 - target = scope:directive_liege - } - has_trait = trusting - has_trait = loyal - scope:directive_liege = { has_relation_friend = scope:directive_vassal } - scope:directive_liege = { has_relation_lover = scope:directive_vassal } - scope:directive_liege = { has_strong_hook = scope:directive_vassal } - scope:directive_liege = { has_perk = absolute_control_perk } - scope:directive_liege = { has_perk = honored_to_serve_perk } - scope:directive_liege = { has_realm_law = crown_authority_3 } - scope:directive_liege = { legitimacy_level = 5 } - } - } -} diff --git a/N3OW/common/scripted_triggers/00_weather_triggers.txt b/N3OW/common/scripted_triggers/00_weather_triggers.txt deleted file mode 100644 index 8536e635..00000000 --- a/N3OW/common/scripted_triggers/00_weather_triggers.txt +++ /dev/null @@ -1,505 +0,0 @@ - -################################################## -# Winter Triggers -county_has_winter_trigger = { - title_province = { - has_winter_trigger = yes - } -} - -character_capital_has_winter_trigger = { - capital_county = { county_has_winter_trigger = yes } -} - -culture_uses_frequent_winter_transportation_trigger = { - culture = { - OR = { - has_cultural_pillar = heritage_balto_finnic - has_cultural_pillar = heritage_north_germanic - # We exclude Normans as being pretty distant from this part of their heritage. - has_cultural_parameter = winter_trait_bonuses - } - } -} - -location_has_harsh_winter_trigger = { - location = { has_province_modifier = winter_harsh_modifier } -} - -location_has_normal_or_worse_winter_trigger = { - location = { - OR = { - has_province_modifier = winter_normal_modifier - has_province_modifier = winter_harsh_modifier - } - } -} - -location_has_winter_trigger = { - location = { - has_winter_trigger = yes - } -} - -has_winter_trigger = { - OR = { - has_province_modifier = winter_mild_modifier - has_province_modifier = winter_normal_modifier - has_province_modifier = winter_harsh_modifier - root = { has_zud_season_in_county_trigger = { COUNTY = root.location.county } } - } -} - -has_winter_combat_trigger = { - OR = { - has_province_modifier = winter_mild_modifier - has_province_modifier = winter_normal_modifier - has_province_modifier = winter_harsh_modifier - } -} - -################################################## -# Seasonal Triggers - -middle_of_year_season_trigger = { - current_month >= 4 - current_month <= 9 -} - -end_of_year_season_trigger = { - OR = { - current_month >= 10 - current_month <= 3 - } -} - -temperate_seasons_trigger = { - $LOCATION$ = { - OR = { - geographical_region = world_europe - geographical_region = world_asia_minor - geographical_region = world_middle_east - geographical_region = world_india_rajastan - geographical_region = world_india_bengal - geographical_region = world_africa_north - geographical_region = world_steppe - geographical_region = world_tibet - geographical_region = world_asia_china - geographical_region = world_asia_japan - geographical_region = world_asia_korea - } - } -} - -tropical_seasons_trigger = { - $LOCATION$ = { - tropical_seasons_region_trigger = yes - } -} - -tropical_seasons_region_trigger = { - OR = { - geographical_region = world_africa_west - geographical_region = world_africa_east - geographical_region = world_india_deccan - geographical_region = world_burma - geographical_region = world_asia_china - geographical_region = world_asia_southeast - } -} - -is_nice_season_to_be_outside_trigger = { - OR = { - # Temperate zones like to be out in summer. - AND = { - temperate_seasons_trigger = { LOCATION = $LOCATION$ } - middle_of_year_season_trigger = yes - } - # Tropical zones like to be out in winter. - AND = { - tropical_seasons_trigger = { LOCATION = $LOCATION$ } - end_of_year_season_trigger = yes - } - } -} - -is_nice_season_to_be_inside_trigger = { - OR = { - # Temperate zones like to be inside in winter. - AND = { - temperate_seasons_trigger = { LOCATION = $LOCATION$ } - end_of_year_season_trigger = yes - } - # Tropical zones like to be inside in summer. - AND = { - tropical_seasons_trigger = { LOCATION = $LOCATION$ } - middle_of_year_season_trigger = yes - } - } -} - - - -#Season scripted trigger tied into custom loc, can be used for backgrounds and VFX -#Format like current_season_winter = yes - -current_season_trigger = { - current_season_$SEASON$ = yes -} - -current_season_winter = { - #southern region with rainy/dry seasons - trigger_if = { - limit = { - location = { - geographical_region = seasonal_region_deccan - } - } - OR = { - current_month >= 11 - current_month < 3 - } - } - trigger_else_if = { - limit = { - location = { - geographical_region = seasonal_region_rajasthan - } - } - OR = { - current_month >= 12 - current_month < 4 - } - } - trigger_else_if = { - limit = { - location = { - geographical_region = seasonal_region_bengal - } - } - OR = { - current_month >= 11 - current_month < 2 - } - } - trigger_else = { - #Generic Northern Hemisphere - OR = { - current_month >= 12 - current_month < 3 - } - #Not present/has different name in these regions - location = { - NOR = { - geographical_region = seasonal_region_east_africa - geographical_region = seasonal_region_west_africa - geographical_region = seasonal_region_maritime_southeast_asia - geographical_region = seasonal_region_peninsular_southeast_asia - } - } - } -} - -current_season_autumn = { - #southern region with rainy/dry seasons - trigger_if = { - limit = { - location = { - geographical_region = seasonal_region_rajasthan - } - } - current_month >= 10 - current_month < 12 - } - trigger_else_if = { - limit = { - location = { - geographical_region = seasonal_region_bengal - } - } - current_month >= 8 - current_month < 11 - } - trigger_else_if = { - limit = { - location = { - geographical_region = seasonal_region_east_africa - } - } - current_month >= 9 - current_month < 11 - } - trigger_else = { - #Generic Northern Hemisphere - current_month >= 9 - current_month < 12 - #Not present/has different name in these regions - location = { - NOR = { - geographical_region = seasonal_region_west_africa - geographical_region = seasonal_region_deccan - geographical_region = seasonal_region_peninsular_southeast_asia - geographicaL_region = seasonal_region_maritime_southeast_asia - } - } - } -} - -current_season_summer = { - #southern region with rainy/dry seasons - trigger_if = { - limit = { - location = { - geographical_region = seasonal_region_deccan - } - } - current_month >= 3 - current_month < 6 - } - trigger_else_if = { - limit = { - location = { - geographical_region = seasonal_region_rajasthan - } - } - current_month >= 4 - current_month < 7 - } - trigger_else_if = { - limit = { - location = { - geographical_region = seasonal_region_bengal - } - } - current_month >= 4 - current_month < 6 - } - trigger_else = { - #Generic Northern Hemisphere - current_month >= 6 - current_month < 9 - #Not present/has different name in these regions - location = { - NOR = { - geographical_region = seasonal_region_west_africa - geographical_region = seasonal_region_east_africa - geographical_region = seasonal_region_peninsular_southeast_asia - geographical_region = seasonal_region_maritime_southeast_asia - } - } - } -} - -current_season_spring = { - #southern region with rainy/dry seasons - trigger_if = { - limit = { - location = { - geographical_region = seasonal_region_bengal - } - } - current_month >= 2 - current_month < 4 - } - trigger_else_if = { - limit = { - location = { - geographical_region = seasonal_region_east_africa - } - } - current_month >= 3 - current_month < 6 - } - trigger_else = { - #Generic Northern Hemisphere - current_month >= 3 - current_month < 6 - #Not present/has different name in these regions - location = { - NOR = { - geographical_region = seasonal_region_west_africa - geographical_region = seasonal_region_rajasthan - geographical_region = seasonal_region_deccan - geographical_region = seasonal_region_peninsular_southeast_asia - geographical_region = seasonal_region_maritime_southeast_asia - } - } - } -} - -current_season_dry_season = { - #southern region with rainy/dry seasons - location = { - OR = { - geographical_region = seasonal_region_west_africa - geographical_region = seasonal_region_east_africa - geographical_region = seasonal_region_peninsular_southeast_asia - geographical_region = seasonal_region_maritime_southeast_asia - geographical_region = seasonal_region_bengal - geographical_region = seasonal_region_deccan - } - } - trigger_if = { - limit = { - location = { geographical_region = seasonal_region_west_africa } - } - OR = { - current_month >= 11 - current_month < 5 - } - } - trigger_else_if = { - limit = { - location = { - geographical_region = seasonal_region_east_africa - } - } - OR = { - current_month >= 12 - current_month < 3 - } - } - trigger_else_if = { - limit = { - location = { - geographical_region = seasonal_region_maritime_southeast_asia - }#April to September - } - current_month >= 4 - current_month < 10 - } - trigger_else_if = { - limit = { - location = { - geographical_region = seasonal_region_peninsular_southeast_asia - } - } - OR = { #November to May - current_month >= 11 - current_month < 6 - } - } - trigger_else_if = { - limit = { - location = { - geographical_region = seasonal_region_bengal - } - } - OR = { - current_month >= 12 - current_month < 3 - } - } - trigger_else = { - location = { - geographical_region = seasonal_region_deccan - } - OR = { - current_month >= 12 - current_month < 3 - } - } -} - -current_season_rainy_season = { - #Jasons triggers here - location = { - OR = { - geographical_region = seasonal_region_west_africa - geographical_region = seasonal_region_east_africa - geographical_region = seasonal_region_peninsular_southeast_asia - geographical_region = seasonal_region_maritime_southeast_asia - geographical_region = seasonal_region_bengal - geographical_region = seasonal_region_deccan - geographical_region = seasonal_region_rajasthan - } - } - #southern region with rainy/dry seasons - trigger_if = { - limit = { - location = { - geographical_region = seasonal_region_deccan - } - } - current_month >= 6 - current_month < 11 - } - trigger_else_if = { - limit = { - location = { - geographical_region = seasonal_region_rajasthan - } - } - current_month >= 7 - current_month < 10 - } - trigger_else_if = { - limit = { - location = { - geographical_region = seasonal_region_bengal - } - } - current_month >= 6 - current_month < 8 - } - trigger_else_if = { - limit = { - location = { - geographical_region = seasonal_region_peninsular_southeast_asia - } - } #June to October - current_month >= 6 - current_month < 11 - } - trigger_else_if = { - limit = { - location = { - geographical_region = seasonal_region_maritime_southeast_asia - } - } #October to March - OR = { - current_month >= 10 - current_month < 4 - } - } - trigger_else = { - location = { - geographical_region = seasonal_region_east_africa - } - current_month >= 6 - current_month < 9 - } -} - -current_season_hot_season = { - OR = { - AND = { - location = { - OR = { - geographical_region = seasonal_region_east_africa - geographical_region = seasonal_region_west_africa - } - } - current_season_rainy_season = yes - } - current_season_summer = yes - } -} -current_season_cold_season = { - OR = { - current_season_winter = yes - current_season_dry_season = yes - } -} -current_season_wet = { - OR = { - current_season_spring = yes - current_season_rainy_season = yes - } -} -current_season_dry = { - OR = { - current_season_summer = yes - current_season_dry_season = yes - } -} diff --git a/N3OW/common/scripted_triggers/00_witch_triggers.txt b/N3OW/common/scripted_triggers/00_witch_triggers.txt deleted file mode 100644 index 8e5aea00..00000000 --- a/N3OW/common/scripted_triggers/00_witch_triggers.txt +++ /dev/null @@ -1,24 +0,0 @@ -use_convert_to_witchcraft_secrecy_trigger = { - $OWNER$ = { - any_secret = { type = secret_witch } - save_temporary_scope_as = witchract_secrecy_check - trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { TRAIT = witch GENDER_CHARACTER = scope:witchract_secrecy_check } - } -} - -knows_about_character_being_witch_trigger = { - OR = { - $CHARACTER$ = { has_trait = witch } - any_known_secret = { - secret_owner = $CHARACTER$ - secret_type = secret_witch - } - } -} - -potential_witch_friend_trigger = { - faith = $CHARACTER$.faith - knows_about_character_being_witch_trigger = { CHARACTER = $CHARACTER$ } - save_temporary_scope_as = trigger_witch_friend - $CHARACTER$ = { knows_about_character_being_witch_trigger = { CHARACTER = scope:trigger_witch_friend } } -} diff --git a/N3OW/common/scripted_triggers/01_bp1_filippa_scripted_triggers.txt b/N3OW/common/scripted_triggers/01_bp1_filippa_scripted_triggers.txt deleted file mode 100644 index 32f1cc5f..00000000 --- a/N3OW/common/scripted_triggers/01_bp1_filippa_scripted_triggers.txt +++ /dev/null @@ -1,41 +0,0 @@ - -has_weak_hook_on_trigger = { - OR = { - has_hook_of_type = { - target = $TARGET_CHARACTER$ - type = weak_blackmail_hook - } - has_hook_of_type = { - target = $TARGET_CHARACTER$ - type = favor_hook - } - has_hook_of_type = { - target = $TARGET_CHARACTER$ - type = obligation_hook - } - has_hook_of_type = { - target = $TARGET_CHARACTER$ - type = indebted_hook - } - has_hook_of_type = { - target = $TARGET_CHARACTER$ - type = threat_hook - } - has_hook_of_type = { - target = $TARGET_CHARACTER$ - type = manipulation_hook - } - has_hook_of_type = { - target = $TARGET_CHARACTER$ - type = house_head_hook - } - has_hook_of_type = { - target = $TARGET_CHARACTER$ - type = trial_by_combat_hook - } - has_hook_of_type = { - target = $TARGET_CHARACTER$ - type = sumptuary_crime_hook - } - } -} \ No newline at end of file diff --git a/N3OW/common/scripted_triggers/01_building_upgrade_triggers.txt b/N3OW/common/scripted_triggers/01_building_upgrade_triggers.txt deleted file mode 100644 index 184ae4d8..00000000 --- a/N3OW/common/scripted_triggers/01_building_upgrade_triggers.txt +++ /dev/null @@ -1,26 +0,0 @@ -has_existing_farming_building_trigger = { - trigger_if = { - limit = { building_farm_estates_requirement_terrain = yes } - OR = { - has_building = farm_estates_01 - has_building = farm_estates_02 - has_building = farm_estates_03 - has_building = farm_estates_04 - has_building = farm_estates_05 - has_building = farm_estates_06 - has_building = farm_estates_07 - } - } - trigger_if = { - limit = { building_farm_estates_requirement_terrain = yes } - OR = { - has_building = pastures_01 - has_building = pastures_02 - has_building = pastures_03 - has_building = pastures_04 - has_building = pastures_05 - has_building = pastures_06 - has_building = pastures_07 - } - } -} diff --git a/N3OW/common/scripted_triggers/01_fp1_scripted_triggers.txt b/N3OW/common/scripted_triggers/01_fp1_scripted_triggers.txt deleted file mode 100644 index 5309af13..00000000 --- a/N3OW/common/scripted_triggers/01_fp1_scripted_triggers.txt +++ /dev/null @@ -1,360 +0,0 @@ - -################################################## -# General Triggers - -eligible_for_fp1_dynasty_legacies_trigger = { - has_fp1_dlc_trigger = yes - OR = { - # Technically, we could hardscript this to North Germanics/Normans/Estonians, but eh. - culture = { has_innovation = innovation_longboats } - # Converts should also get a chance to get in on the fun. - religion = religion:germanic_religion - } -} - -fp1_can_raise_stele_trigger = { - OR = { - culture = { has_cultural_parameter = has_access_to_runestones } - has_character_modifier = embraced_local_traditions_modifier - } - culture = { - NOT = { has_cultural_era_or_later = culture_era_high_medieval } - } -} - -fp1_can_raise_stele_title_scope_trigger = { - culture = { - has_cultural_pillar = heritage_north_germanic - NOT = { has_cultural_era_or_later = culture_era_high_medieval } - } -} - -fp1_county_has_stele_trigger = { - OR = { - has_county_modifier = fp1_stele_ancestors_strong - has_county_modifier = fp1_stele_ancestors_weak - has_county_modifier = fp1_stele_conquest_strong - has_county_modifier = fp1_stele_conquest_weak - has_county_modifier = fp1_stele_promotion_strong - has_county_modifier = fp1_stele_promotion_weak - } -} - -fp1_eligible_for_yearly_events_trigger = { - has_fp1_dlc_trigger = yes - OR = { - culture = { has_cultural_pillar = heritage_north_germanic } - religion = religion:germanic_religion - } -} - -################################################## -# Cultural & Regional Triggers - -fp1_is_norse = { - OR = { - culture = { has_cultural_pillar = heritage_north_germanic } - culture = culture:norman - } -} - -fp1_is_norse_tribal = { - fp1_is_norse = yes - government_has_flag = government_is_tribal -} - -fp1_is_coastal_norse_tribal = { - # Standard checks. - fp1_is_norse_tribal = yes - # Do you have a relevant coastal county somewhere? - any_sub_realm_county = { is_coastal_county = yes } -} - -fp1_is_in_scandinavia = { - capital_county.title_province = { geographical_region = world_europe_north } -} - -fp1_is_in_scandinavian_colonies = { - capital_county.title_province = { - OR = { - geographical_region = world_europe_west_britannia - geographical_region = dlc_fp1_region_colonial_eastern_europe - } - } -} - -fp1_is_in_scandinavia_or_colonies = { - OR = { - fp1_is_in_scandinavia = yes - fp1_is_in_scandinavian_colonies = yes - } -} - -fp1_remove_stele_new_holder_trigger = { - # Is there a rogue stone around? - $TITLE$ = { exists = var:stele_commissioner } - # And would the new holder want to tear down the stele? - $NEW_HOLDER$ = { - OR = { - AND = { - exists = dynasty - # E.g., because they're a different family and won't maintain it. - NOT = { dynasty = $PREVIOUS_HOLDER$.dynasty } - } - # Or because they're a subject of the runestone, which means it's memorialising their defeat. - ## ... Unless they're a ghost. Damned proctors, I guess. - AND = { - exists = $TITLE$.var:stele_container - exists = $TITLE$.var:stele_scope_type - # Remember not to compare a character with a title. - $TITLE$.var:stele_scope_type = flag:character - this = $TITLE$.var:stele_container - } - } - } -} - -is_vaguely_danish_bhakti_trigger = { - OR = { - has_culture = culture:danish - culture = { has_name_list = name_list_danish } - # We deliberately use the de jure rather than the geographical area to make this at least a *little* more fluid. - AND = { - is_playable_character = yes - capital_county.kingdom = title:k_denmark - } - } -} - -################################################## -# Varangian Adventure Triggers - -fp1_va_eligible_for_scandinavian_troops_trigger = { - # We only give these to North Germanics. I realise we check this elsewhere, but it makes it a bit easier to hijack the CB for other cultures via modding without weirdness. - culture = { - OR = { - has_cultural_pillar = heritage_north_germanic - this = culture:estonian - any_parent_culture_or_above = { - this = culture:estonian #Estonian - } - } - } - # Who hold at least one county in the initial de jure of the mainland Norse kingdoms. - any_sub_realm_county = { - OR = { - title_province = { geographical_region = dlc_fp1_region_core_mainland_scandinavia } - title:k_esthonia = { - is_de_jure_liege_or_above_target = prev - } - } - culture = scope:attacker.culture - faith = scope:attacker.faith - } -} - -################################################## -# Illustration Triggers - -fp1_should_use_norse_graphics_trigger = { - culture = { has_building_gfx = norse_building_gfx } -} - -fp1_should_use_extra_tribal_graphics_trigger = { - should_use_tribal_realm_palace_graphics_trigger = yes -} - -################################################## -# Shieldmaiden Triggers - -suitable_shieldmaiden_gaoler_trigger = { - #Must be a shieldmaiden. - has_trait = shieldmaiden - NOR = { - #Filter out prisoners that the shieldmaiden would want to see freed. - has_friendly_relationship_trigger = { CHARACTER = root } - #And require that they don't hate their liege. - has_relation_rival = scope:imprisoner - #Make sure they don't really like root, in which case they'd let the escape slide. - opinion = { - target = root - value >= high_positive_opinion - } - #Aaaaand the inverse for actually really hating their host, in which case they don't care about escapees. - opinion = { - target = scope:imprisoner - value <= high_negative_opinion - } - } -} - -################################################## -# Interaction Triggers - -basic_can_have_trial_by_combat_trigger = { - # This is referenced elsewhere, so we keep it separate in order to allow justification for TbCs outside of interactions. - culture = { has_cultural_parameter = has_access_to_trials_by_combat } -} - -can_have_trial_by_combat_trigger = { - # First, evaluate culture to trim down our potentials list. - scope:actor = { basic_can_have_trial_by_combat_trigger = yes } - scope:recipient = { basic_can_have_trial_by_combat_trigger = yes } -} - -eligible_knight_to_champion_trial_by_combat_trigger = { - is_available_ai = yes - can_start_single_combat_trigger = yes -} - -trial_by_combat_shown_and_not_invalid_trigger = { - # Scope:actor must be able to fight personally. - scope:actor = { can_start_single_combat_trigger = yes } - # Scope:actor cannot challenge someone they have a ceasefire against. - scope:actor = { - NOT = { has_truce = scope:recipient } - } - # Scope:actor *definitely* cannot challenge someone they're at war with. - scope:actor = { - NOT = { is_at_war_with = scope:recipient } - } -} - -trial_by_combat_is_valid_trigger = { - # Calc some stuff that might invalidate elsewhere before the bout is sorted. - trial_by_combat_shown_and_not_invalid_trigger = yes - # Must have an imprisonment reason on the character. - scope:actor = { has_imprisonment_reason = scope:recipient } - # Scope:recipient must be able to fight or else have at least *one* designatable champion. - scope:recipient = { - trigger_if = { - limit = { - OR = { - can_start_single_combat_eligibility_checks_trigger = no - NOT = { - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:recipient } - } - } - } - custom_description = { - text = "fp1_tbc_no_available_champions" - OR = { - any_knight = { eligible_knight_to_champion_trial_by_combat_trigger = yes } - # Can use champion court position too if available - AND = { - employs_court_position = champion_court_position - any_court_position_holder = { - type = champion_court_position - eligible_knight_to_champion_trial_by_combat_trigger = yes #trigger checks for prowess, and while its not mandatory that the champ has a high value, we don't want to trap them into having to use their prowess 3 champ to defend their life - } - } - } - } - } - } - # Scope:recipient must not be banned from single combat. - scope:recipient = { - custom_description = { - text = "fp1_tbc_recipient_banned_from_combat" - can_start_single_combat_banned_checks_trigger = no - } - } - # Neither of the characters can be imprisoned. - scope:actor = { is_imprisoned = no } - scope:recipient = { is_imprisoned = no } -} - -################################################## -# Religious Triggers - -gruesome_sacrifices_grand_blot_can_continue_trigger = { - # Standard checks. Using a more lenient trigger here because we don't want to cancel the blot if you're in events or go on a hunt - #is_available_at_peace_adult_lenient = yes - scope:activity ?= { - has_activity_type = activity_gruesome_festival - } -} - -fp1_valid_norse_faith_for_jomsvikings_trigger = { - religion = religion:germanic_religion - has_doctrine_parameter = unreformed -} - -fp1_jomsvikings_have_not_existed_trigger = { - # They've already been destroyed in 1066. - game_start_date < 1000.1.1 - NOR = { - # And otherwise can't currently be created. - exists = global_var:jomsvikings_title - # Nor should they have been made via decision or event. - is_target_in_global_variable_list = { - name = unavailable_unique_decisions - target = flag:flag_forged_jomvikings - } - } -} - -fp1_valid_county_for_jomsvikings_trigger = { - tier = tier_county - is_coastal_county = yes - custom_description = { - text = forge_the_jomsvikings_decision.tt.is_in_correct_region - title_province = { geographical_region = dlc_fp1_region_non_scandinavian_southern_baltic } - } - any_county_province = { - custom_description = { - text = forge_the_jomsvikings_decision.tt.empty_castle_or_city - OR = { - has_holding = no - has_holding_type = castle_holding - has_holding_type = city_holding - } - } - } -} - -################################################## -# Achievement Triggers - -fp1_achievement_culture_norse_trigger = { - OR = { - culture = { has_cultural_pillar = heritage_north_germanic } - culture = culture:norman - } -} - -fp1_achievement_culture_norse_or_rus_trigger = { - OR = { - fp1_achievement_culture_norse_trigger = yes - culture = culture:russian - } -} - -fp1_achievement_religious_norse_trigger = { - religion = religion:germanic_religion -} - -fp1_achievement_culture_plus_religion_norse_trigger = { - fp1_achievement_culture_norse_trigger = yes - fp1_achievement_religious_norse_trigger = yes -} - -################################################### -# Jomsviking Triggers -fp1_ruler_eligible_for_jomsviking_coup = { - # We never want to coup realms with players who might be affected, so just flat-out ban them. - NOR = { - is_ai = no - any_vassal_or_below = { is_ai = no } - any_liege_or_above = { is_ai = no } - } - # And anyone that's close family to/married to a player. - NOR = { - any_spouse = { is_ai = no } - any_close_or_extended_family_member = { is_ai = no } - } - # Veto anyone following the unreformed Norse pagan faith. - NOT = { faith = faith:norse_pagan } - # For simplicity, exclude wars. - is_at_war = no -} diff --git a/N3OW/common/scripted_triggers/02_ep1_scripted_triggers.txt b/N3OW/common/scripted_triggers/02_ep1_scripted_triggers.txt deleted file mode 100644 index 71d71a9d..00000000 --- a/N3OW/common/scripted_triggers/02_ep1_scripted_triggers.txt +++ /dev/null @@ -1,414 +0,0 @@ -################################################# -# TRIGGER LIST # -################################################# -# ep1_is_valid_character_for_inspiration_trigger - Is the character valid to be used within the inspiration system? Character movement may break if these conditions are not true. - -ep1_is_valid_character_for_inspiration_trigger = { - is_adult = yes - is_imprisoned = no - NOT = { exists = inspiration } - - trigger_if = { - limit = { - OR = { - is_pool_guest = yes - is_in_pool_at = location - } - } - # For simplicity, inspired characters travel solo for now. - any_traveling_family_member = { - count = 1 - } - } -} - -ep1_spare_courtier_trigger = { #Used for picking out courtiers in your own court. - is_available_healthy_ai_adult = yes - is_councillor = no - NOR = { - is_close_or_extended_family_of = root - is_spouse_of = root - } -} - -# Court type trait 1 is unlocked by court_grandeur_level 5 -ep1_courtier_valid_for_court_trait_1_trigger = { - scope:cgv_value >= cgv_level_threshold_court_type_trait_1 - NOT = { has_trait = $TYPE$_court } - is_adult = yes -} - -# Court type trait 2 is unlocked by court_grandeur_level 8 -ep1_courtier_valid_for_court_trait_2_trigger = { - scope:cgv_value >= cgv_level_threshold_court_type_trait_2 - NOT = { has_trait = $TYPE$_court_2 } - has_trait = $TYPE$_court_1 - is_adult = yes -} - -############## -# INSPIRATION/ARTIFACT TRIGGERS -############## - -ep1_can_sponsor_inspiration_basic = { - scope:inspiration_owner = { - is_imprisoned = no - } -} - -ep1_is_sponsor_valid_inspiration_basic = { - trigger_if = { - limit = { - exists = scope:inspiration_sponsor - } - scope:inspiration_owner = { - is_courtier_of = scope:inspiration_sponsor - is_imprisoned = no - } - } -} - -ep1_character_had_or_has_inspiration_type_trigger = { - OR = { - AND = { - exists = var:created_artifact_type - var:created_artifact_type = flag:$TYPE$ - } - inspiration ?= { has_inspiration_type = $TYPE$_inspiration } - } -} - -ep1_no_artifact_decorations_trigger = { - OR = { - scope:wealth < 40 - AND = { - exists = scope:inspiration_owner - scope:inspiration_owner = { has_trait = humble } - } - } -} - -ep1_simple_artifact_decorations_trigger = { - scope:wealth >= 5 - scope:wealth < 70 -} - -ep1_advanced_artifact_decorations_trigger = { - scope:wealth >= 40 - scope:wealth < 90 -} - -ep1_extravagant_artifact_decorations_trigger = { - scope:wealth >= 70 -} - -ep1_artifact_durability_lower_equal_percent_trigger = { - $PERCENT$ > { - value = 0 - add = artifact_durability - divide = artifact_max_durability - } -} - -ep1_artifact_durability_higher_equal_percent_trigger = { - $PERCENT$ < { - value = 0 - add = artifact_durability - divide = artifact_max_durability - } -} - -ep1_character_has_court_artifact_trigger = { - any_character_artifact = { - ep1_artifact_is_court_artifact_trigger = yes - } -} - -ep1_artifact_is_court_artifact_trigger = { - OR = { - artifact_slot_type = wall_big - artifact_slot_type = wall_small - artifact_slot_type = sculpture - artifact_slot_type = book - artifact_slot_type = throne - artifact_slot_type = pedestal - } -} - - -############## -# COURT POSITION TRIGGERS -############## - -#Used to see if the scoped character has ANY court position that CHARACTER can hold -character_can_be_employed_in_a_court_position_trigger = { - OR = { - AND = { - can_employ_court_position_type = court_physician_court_position - $CHARACTER$ = { can_be_employed_as = court_physician_court_position } - } - AND = { - can_employ_court_position_type = master_of_horse_court_position - $CHARACTER$ = { can_be_employed_as = master_of_horse_court_position } - } - AND = { - can_employ_court_position_type = master_of_hunt_court_position - $CHARACTER$ = { can_be_employed_as = master_of_hunt_court_position } - } - AND = { - can_employ_court_position_type = keeper_of_swans_court_position - $CHARACTER$ = { can_be_employed_as = keeper_of_swans_court_position } - } - AND = { - can_employ_court_position_type = travel_leader_court_position - $CHARACTER$ = { can_be_employed_as = travel_leader_court_position } - } - AND = { - can_employ_court_position_type = court_jester_court_position - $CHARACTER$ = { can_be_employed_as = court_jester_court_position } - } - AND = { - can_employ_court_position_type = high_almoner_court_position - $CHARACTER$ = { can_be_employed_as = high_almoner_court_position } - } - AND = { - can_employ_court_position_type = seneschal_court_position - $CHARACTER$ = { can_be_employed_as = seneschal_court_position } - } - AND = { - can_employ_court_position_type = court_tutor_court_position - $CHARACTER$ = { can_be_employed_as = court_tutor_court_position } - } - AND = { - can_employ_court_position_type = court_guru_court_position - $CHARACTER$ = { can_be_employed_as = court_guru_court_position } - } - AND = { - can_employ_court_position_type = cupbearer_court_position - $CHARACTER$ = { can_be_employed_as = cupbearer_court_position } - } - AND = { - can_employ_court_position_type = chief_eunuch_court_position - $CHARACTER$ = { can_be_employed_as = chief_eunuch_court_position } - } - AND = { - can_employ_court_position_type = antiquarian_court_position - $CHARACTER$ = { can_be_employed_as = antiquarian_court_position } - } - AND = { - can_employ_court_position_type = royal_architect_court_position - $CHARACTER$ = { can_be_employed_as = royal_architect_court_position } - } - AND = { - can_employ_court_position_type = lady_in_waiting_court_position - $CHARACTER$ = { can_be_employed_as = lady_in_waiting_court_position } - } - AND = { - can_employ_court_position_type = court_poet_court_position - $CHARACTER$ = { can_be_employed_as = court_poet_court_position } - } - AND = { - can_employ_court_position_type = court_musician_court_position - $CHARACTER$ = { can_be_employed_as = court_musician_court_position } - } - AND = { - can_employ_court_position_type = bodyguard_court_position - $CHARACTER$ = { can_be_employed_as = bodyguard_court_position } - } - AND = { - can_employ_court_position_type = champion_court_position - $CHARACTER$ = { can_be_employed_as = champion_court_position } - } - AND = { - can_employ_court_position_type = food_taster_court_position - $CHARACTER$ = { can_be_employed_as = food_taster_court_position } - } - AND = { - can_employ_court_position_type = executioner_court_position - $CHARACTER$ = { can_be_employed_as = executioner_court_position } - } - AND = { - can_employ_court_position_type = garuda_court_position - $CHARACTER$ = { can_be_employed_as = garuda_court_position } - } - AND = { - can_employ_court_position_type = wet_nurse_court_position - $CHARACTER$ = { can_be_employed_as = wet_nurse_court_position } - } - AND = { - can_employ_court_position_type = akolouthos_court_position - $CHARACTER$ = { can_be_employed_as = akolouthos_court_position } - } - } -} - - -#Used to check if the scoped character can hold any court position -can_be_employed_in_any_court_position_trigger = { - OR = { - can_be_employed_as = court_physician_court_position - can_be_employed_as = master_of_horse_court_position - can_be_employed_as = master_of_hunt_court_position - can_be_employed_as = keeper_of_swans_court_position - can_be_employed_as = court_jester_court_position - can_be_employed_as = high_almoner_court_position - can_be_employed_as = seneschal_court_position - can_be_employed_as = court_tutor_court_position - can_be_employed_as = court_guru_court_position - can_be_employed_as = cupbearer_court_position - can_be_employed_as = chief_eunuch_court_position - can_be_employed_as = antiquarian_court_position - can_be_employed_as = royal_architect_court_position - can_be_employed_as = lady_in_waiting_court_position - can_be_employed_as = court_poet_court_position - can_be_employed_as = court_musician_court_position - can_be_employed_as = bodyguard_court_position - can_be_employed_as = champion_court_position - can_be_employed_as = food_taster_court_position - can_be_employed_as = executioner_court_position - can_be_employed_as = garuda_court_position - can_be_employed_as = travel_leader_court_position - can_be_employed_as = wet_nurse_court_position - can_be_employed_as = akolouthos_court_position - } -} - -##### Hold court - -hold_court_8010_county_trigger = { - any_title_to_title_neighboring_county = { - holder.top_liege = { - NOR = { - THIS = ROOT - is_allied_to = ROOT - is_at_war_with = ROOT - is_close_or_extended_family_of = ROOT - max_military_strength < hold_court_8010_75_strength_value # 75% of ROOT's soldiers - } - } - } -} - -target_of_powerful_faction_trigger = { - exists = yes - OR = { - faction_is_type = liberty_faction - faction_is_type = claimant_faction - } - OR = { - faction_power >= faction_power_threshold - faction_is_at_war = yes - } - trigger_if = { - limit = { exists = special_character } - special_character != faction_target.liege - } -} - -province_has_no_holding_trigger = { # province has no holding - has_ongoing_construction = no - NOR = { - has_holding_type = castle_holding - has_holding_type = tribal_holding - has_holding_type = city_holding - has_holding_type = church_holding - has_holding_type = herder_holding - has_holding_type = nomad_holding - has_holding_type = temple_citadel_holding - } -} - -county_has_all_holding_types = { # county has all three holding types - any_county_province = { has_holding_type = castle_holding } - any_county_province = { has_holding_type = city_holding } - any_county_province = { has_holding_type = church_holding } -} - -county_has_empty_province_trigger = { - tier = tier_county - any_county_province = { province_has_no_holding_trigger = yes } -} - -county_has_no_city_trigger = { # No city in a county - NOT = { - any_county_province = { has_holding_type = city_holding } - } -} - -county_has_no_church_trigger = { # No church in a county - NOT = { - any_county_province = { has_holding_type = church_holding } - } -} - -############## -# DECISION TRIGGERS -############## - -order_mass_eviction_decision_evictable_courtier_trigger = { - NOR = { - is_of_major_or_minor_interest_trigger = { CHARACTER = root } - any_close_family_member = { - host = root - is_of_major_or_minor_interest_trigger = { CHARACTER = root } - } - } -} - -# For technical reasons, this trigger can't be the same as ep1_decision_0111_list_builder_guts_trigger, but maintains (almost) technical parity with it. -exoticise_a_grand_hall_decision_list_builder_guts_trigger = { - # Is the title presently active? - exists = holder - # Can the two communicate? - holder = { - # Filter out anyone who has the right rank but lacks a mechanical royal court. - has_royal_court = yes - has_dlc_feature = royal_court - # Can the two communicate? - in_diplomatic_range = root - } -} - -############## -# CHARACTER INTERACTIONS TRIGGERS -############## - -indebt_guest_interaction_basic_checks_trigger = { - $ACTOR$ = { - # Gotta have a royal court. - has_royal_court = yes - has_dlc_feature = royal_court - # Gotta have maxed servants to help. - amenity_level = { - target = court_servants - value >= max_amenity_level - } - } -} - -############## -# BANNER TRIGGERS -############## - -artifact_house_not_owns_or_claims_trigger = { - exists = scope:familial_banner - NOR = { - this = scope:familial_banner.artifact_owner.house - has_house_artifact_claim = scope:familial_banner - } - trigger_if = { - limit = { exists = scope:familial_banner.var:banner_dynasty } - house_head.dynasty = scope:familial_banner.var:banner_dynasty - } -} - -is_composite_bow_culture_trigger = { - OR = { - has_cultural_tradition = tradition_horse_lords - has_cultural_pillar = heritage_byzantine - has_cultural_pillar = heritage_caucasian - has_cultural_pillar = heritage_turkic - has_cultural_pillar = heritage_mongolic - has_innovation = innovation_advanced_bowmaking - } -} diff --git a/N3OW/common/scripted_triggers/03_bp1_scripted_triggers.txt b/N3OW/common/scripted_triggers/03_bp1_scripted_triggers.txt deleted file mode 100644 index f0e10917..00000000 --- a/N3OW/common/scripted_triggers/03_bp1_scripted_triggers.txt +++ /dev/null @@ -1,294 +0,0 @@ -##### FAMILY FEUD ##### - -# Relation has variable with specified flag -house_relation_feud_flag_trigger = { - has_bp1_dlc_trigger = yes - has_house_relation_level = feud - exists = var:$VARIABLE$ - var:$VARIABLE$ = flag:$FLAG$ -} - -# Feud relation targeting a specified House -house_has_feud_relation_with_trigger = { - exists = house - exists = $TARGET$.house - house != $TARGET$.house - OR = { - house = { - any_house_relation = { - has_house_relation_level = feud - any_relation_house = { $TARGET$.house = this } - } - } - exists = scope:return_feud_as_true_for_debug - } - has_bp1_dlc_trigger = yes -} - -# General checks house head can start a feud -valid_for_feud_events_trigger = { - has_bp1_dlc_trigger = yes - # Must be House Head - is_house_head = yes - # Stop unlanded AI going crazy - is_playable_character = yes - is_available_adult = yes - # Save scopes for checking against - save_temporary_scope_as = house_head_temp -} - -valid_for_feud_events_with_target_trigger = { - # General checks - valid_for_feud_events_trigger = yes - # Victim House Head must exist - exists = $TARGET$.house.house_head - # Target House must be different - NOT = { house = $TARGET$.house } - # Ensure target is 'equal' - trigger_if = { - limit = { - is_landed = yes - $TARGET$.house.house_head = { is_landed = yes } - } - tier_difference = { - target = $TARGET$.house.house_head - value >= -1 - } - tier_difference = { - target = $TARGET$.house.house_head - value <= 1 - } - } - trigger_else = { - NOR = { - highest_held_title_tier > tier_duchy - $TARGET$.house.house_head.highest_held_title_tier > tier_duchy - } - } - NOR = { - # Is not part of same family as target House Head - is_close_family_of = $TARGET$.house.house_head - # Is not friendly with target House Head - has_any_good_relationship_with_character_trigger = { CHARACTER = $TARGET$.house.house_head } - } - # Avoid starting Feuds between Vassals and Lieges, as they are not 'equals' - trigger_if = { - limit = { exists = $TARGET$.house.house_head.liege } - NOR = { - # Is not liege of target House Head - this = $TARGET$.house.house_head.liege - # Does not share house with target's liege - this.house = $TARGET$.house.house_head.liege.house - } - } - # Must be near target House Head - in_diplomatic_range = $TARGET$.house.house_head - # Save scopes for checking against - save_temporary_scope_as = house_head_temp - $TARGET$.house.house_head = { save_temporary_scope_as = target_house_head_temp } -} - -# House Head, and House is valid to be a Feud target -house_feud_valid_feud_target_trigger = { - exists = house - this = this.house.house_head - is_playable_character = yes - NOR = { - house = root.house - is_close_family_of = root - has_any_good_relationship_with_character_trigger = { CHARACTER = root } - } - save_temporary_scope_as = house_head_temp - # House must not be too small (too easy to wipe out) - house = { - any_house_member = { - count >= 3 - is_adult = yes - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:house_head_temp } - } - } - # Must be interactable - in_diplomatic_range = root -} - -# Valid to be a target of a murder scheme -house_feud_scheme_target_trigger = { - is_available_adult = yes - save_temporary_scope_as = house_feud_scheme_target_temp - NOR = { - this = this.house.house_head - root = { - is_scheming_against = { target = scope:house_feud_scheme_target_temp } - } - is_in_list = house_feud_scheme_targets - } - root = { - can_start_scheme = { - type = murder - target_character = scope:house_feud_scheme_target_temp - } - } -} - -# Valid member of own house -house_feud_member_trigger = { - is_available_adult = yes - house = root.house - in_diplomatic_range = root - NOT = { - has_any_bad_relationship_with_character_trigger = { CHARACTER = root } - } -} - -# House has no remaining members -house_feud_wiped_out_trigger = { - house ?= { - any_house_relation = { - has_house_relation_level = feud - any_relation_house = { - this = $TARGET$.house - NOT = { - any_house_member = { is_alive = yes } - } - } - } - } -} - -################################################## -# Sycophant Triggers - -bp1_yearly_8100_sycophant_trigger = { - is_available_ai_adult = yes - liege = $LIEGE$ - reverse_opinion = { - target = $LIEGE$ - value >= 25 - } - NOT = { is_vassal_of = $LIEGE$ } - trigger_if = { - limit = { exists = $LIEGE$.cp:councillor_spouse } - NOT = { this = $LIEGE$.cp:councillor_spouse } - } - trigger_if = { - limit = { - $LIEGE$.faith = { has_doctrine = doctrine_clerical_succession_spiritual_fixed_appointment } - exists = $LIEGE$.cp:councillor_court_chaplain - } - NOT = { this = $LIEGE$.cp:councillor_court_chaplain } - } - OR = { - has_relation_lover = $LIEGE$ - has_relation_friend = $LIEGE$ - can_set_relation_friend_trigger = { CHARACTER = $LIEGE$ } - any_secret = { - type = secret_lover - secret_target = $LIEGE$ - } - } - NOT = { is_close_or_extended_family_of = $LIEGE$ } -} - -################################################## -# Feud AI Scheme Triggers - -house_feud_ai_murder_join_trigger = { - save_temporary_scope_as = instigator_temp - house ?= { - any_house_member = { - any_scheme = { - type = murder - scope:scheme_target_character.house ?= { - NOT = { this = scope:instigator_temp.house } - any_house_relation = { - has_house_relation_parameter = members_more_likely_to_scheme_hostile - any_relation_house = { this = scope:instigator_temp.house } - } - } - save_temporary_scope_as = murder_scheme_temp - } - } - } - trigger_if = { - limit = { exists = scope:murder_scheme_temp } - NOR = { - is_scheming_against = { target = scope:murder_scheme_temp.scheme_target_character } - has_any_good_relationship_with_character_trigger = { CHARACTER = scope:murder_scheme_temp.scheme_target_character } - } - char_can_fit_into_scheme_trigger = { SCHEME = scope:murder_scheme_temp } - } - trigger_else = { always = no } -} - -house_feud_ai_murder_start_trigger = { - save_temporary_scope_as = instigator_temp - house ?= { - any_house_relation = { - has_house_relation_parameter = members_more_likely_to_scheme_hostile - any_relation_house = { - NOT = { this = scope:instigator_temp.house } - any_house_member = { save_temporary_scope_as = murder_victim_temp } - } - } - } - trigger_if = { - limit = { exists = scope:murder_victim_temp } - NOR = { - is_scheming_against = { target = scope:murder_victim_temp } - has_any_good_relationship_with_character_trigger = { CHARACTER = scope:murder_victim_temp } - } - can_start_scheme = { - type = murder - target_character = scope:murder_victim_temp - } - } - trigger_else = { always = no } -} - -house_feud_ai_seduce_start_trigger = { - save_temporary_scope_as = instigator_temp - NOR = { - has_trait = chaste - has_trait = devoted - } - might_cheat_on_every_partner_trigger = yes - house ?= { - any_house_relation = { - has_house_relation_parameter = members_more_likely_to_scheme_hostile - any_relation_house = { - NOT = { this = scope:instigator_temp.house } - any_house_member = { - is_married = yes - save_temporary_scope_as = seduce_victim_temp - any_spouse = { - trigger_if = { - limit = { - exists = house - house != scope:seduce_victim_temp.house - } - } - NOT = { - has_any_good_relationship_with_character_trigger = { CHARACTER = scope:seduce_victim_temp } - } - save_temporary_scope_as = seduce_spouse_temp - } - } - } - } - } - trigger_if = { - limit = { - exists = scope:seduce_victim_temp - exists = scope:seduce_spouse_temp - } - NOR = { - has_any_good_relationship_with_character_trigger = { CHARACTER = scope:seduce_victim_temp } - has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:seduce_spouse_temp } - } - can_start_scheme = { - type = seduce - target_character = scope:seduce_spouse_temp - } - } - trigger_else = { always = no } -} diff --git a/N3OW/common/scripted_triggers/03_bp2_scripted_triggers.txt b/N3OW/common/scripted_triggers/03_bp2_scripted_triggers.txt deleted file mode 100644 index d718cbd7..00000000 --- a/N3OW/common/scripted_triggers/03_bp2_scripted_triggers.txt +++ /dev/null @@ -1,81 +0,0 @@ -# Scripted Triggers for BP2 related things - -# Trigger to find a random appropriate educator for a child -is_relevant_to_child = { - is_available_ai_adult = yes - #location = $CHILD$.location -} - -has_level_1_education_trait_trigger = { - OR = { - has_trait = education_diplomacy_1 - has_trait = education_martial_1 - has_trait = education_stewardship_1 - has_trait = education_intrigue_1 - has_trait = education_learning_1 - } -} - -has_level_2_education_trait_trigger = { - OR = { - has_trait = education_diplomacy_2 - has_trait = education_martial_2 - has_trait = education_stewardship_2 - has_trait = education_intrigue_2 - has_trait = education_learning_2 - } -} - -has_level_3_education_trait_trigger = { - OR = { - has_trait = education_diplomacy_3 - has_trait = education_martial_3 - has_trait = education_stewardship_3 - has_trait = education_intrigue_3 - has_trait = education_learning_3 - } -} - -has_level_4_education_trait_trigger = { - 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 - } -} - -style_changing_reformer_trigger = { - OR = { - root.top_liege ?= { has_character_flag = $FLAG$ } - AND = { - has_variable = years_as_varangian - has_character_flag = $FLAG$ - is_landed = no - } - } -} - -hostage_oath_of_friendship_trigger = { - AND = { - OR = { - has_relation_friend = scope:recipient - has_relation_best_friend = scope:recipient - } - OR = { - scope:actor = { - any_memory = { - memory_type = hostage_oath_of_friendship - has_memory_participant = scope:recipient - } - } - scope:recipient = { - any_memory = { - memory_type = hostage_oath_of_friendship - has_memory_participant = scope:actor - } - } - } - } -} diff --git a/N3OW/common/scripted_triggers/04_ep2_accolade_triggers.txt b/N3OW/common/scripted_triggers/04_ep2_accolade_triggers.txt deleted file mode 100644 index 797e517b..00000000 --- a/N3OW/common/scripted_triggers/04_ep2_accolade_triggers.txt +++ /dev/null @@ -1,11 +0,0 @@ -# Triggers related to knights and accolades - -ep2_can_be_accolade_successor_base_trigger = { - is_acclaimed = no - is_accolade_successor = no - is_available_quick = { - alive = yes - adult = yes - } - highest_held_title_tier <= tier_barony -} diff --git a/N3OW/common/scripted_triggers/04_ep2_tour_triggers.txt b/N3OW/common/scripted_triggers/04_ep2_tour_triggers.txt deleted file mode 100644 index e5af7042..00000000 --- a/N3OW/common/scripted_triggers/04_ep2_tour_triggers.txt +++ /dev/null @@ -1,75 +0,0 @@ - -################################################## -# Triggers related to the tour activity - -ep2_phase_general_location_checks = { - # Don't localize all the other stuff if you have no province owner anyway - trigger_if = { - limit = { has_province_owner = yes } - province_owner = { - liege ?= scope:host - this != scope:host - highest_held_title_tier >= tier_county - capital_province ?= root - is_available = yes - age >= 12 - } - } - trigger_else = { - has_province_owner = yes - } -} - -ep2_tour_phase_invalidation_check = { - scope:activity = { - NOT = { - any_activity_phase_location_past = { - province_owner = scope:province.province_owner - } - } - } - scope:province = { - province_owner != scope:host - province_owner = { - liege ?= scope:host - location = scope:province - highest_held_title_tier >= tier_county - #Checks mostly matching is_available: - is_in_army = no - is_travelling = no - is_imprisoned = no - has_contagious_deadly_disease_trigger = no - NOT = { has_trait = incapable } - # Variable set within the adventure inspiration events - NOT = { has_variable = gone_adventuring } - #We don't invalidate if it stopped being the capital province. - is_at_war = no - } - } -} - -travel_lifestyle_track_greater_equal_trigger = { - has_trait = lifestyle_traveler - has_trait_xp = { - trait = lifestyle_traveler - track = $TRACK$ - value >= $GREATER_EQUAL$ - } -} - -travel_lifestyle_track_less_trigger = { - has_trait = lifestyle_traveler - has_trait_xp = { - trait = lifestyle_traveler - track = $TRACK$ - value < $LESS_THAN$ - } -} - -is_being_visited_on_tour_strict = { - has_character_flag = being_visited_on_tour - # Extra sanity check to verify that our liege is actually still on a tour - liege ?= { - involved_activity ?= { has_activity_type = activity_tour } - } -} diff --git a/N3OW/common/scripted_triggers/04_ep2_tournament_triggers.txt b/N3OW/common/scripted_triggers/04_ep2_tournament_triggers.txt deleted file mode 100644 index 9da2bf74..00000000 --- a/N3OW/common/scripted_triggers/04_ep2_tournament_triggers.txt +++ /dev/null @@ -1,539 +0,0 @@ -chariot_race_trigger = { - involved_activity.activity_host.culture = { - OR = { - AND = { - has_cultural_tradition = tradition_ep3_roman_ceremonies - NOT = { has_cultural_era_or_later = culture_era_late_medieval } - } - this = culture:roman - } - } -} - -activity_is_valid_tournament_contestant_training_decision = { - is_alive = yes - is_adult = yes - is_imprisoned = no - # Exclude clergy who don't fight - trigger_if = { - limit = { is_clergy = yes } - faith = { has_doctrine_parameter = clergy_can_fight } - } -} - -activity_is_competing_trigger = { - activity_is_valid_tournament_contestant = yes - is_in_guest_subset = { name = contestant } - exists = var:progress_to_victory # Ensure they have a PtV as a valid contestant -} - -activity_is_valid_tournament_contestant = { - involved_activity ?= { has_activity_type = activity_tournament } - is_alive = yes - is_adult = yes - is_imprisoned = no - # Exclude clergy who don't fight - trigger_if = { - limit = { is_clergy = yes } - OR = { - faith = { has_doctrine_parameter = clergy_can_fight } - culture = { has_cultural_parameter = culture_clergy_can_fight } - } - } - # Has not opted out - NOR = { - has_character_flag = tournament_not_competing - is_in_guest_subset = { name = spectator } - } - trigger_if = { - limit = { - involved_activity = { - NOR = { - has_current_phase = tournament_phase_horse_race - has_current_phase = tournament_phase_board_game - has_current_phase = tournament_phase_recital - } - } - } - # Only martial sex competes - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = involved_activity.activity_host } - NOR = { - has_trait = wounded_2 - has_trait = wounded_3 - } - } - # Mulan is clever enough not to reveal themselves - trigger_if = { - limit = { - involved_activity = { has_current_phase = tournament_phase_wrestling } - } - NOT = { has_character_modifier = ignores_gender_army_rules } - } - NOT = { - has_trait = incapable - } - trigger_if = { - limit = { - NOT = { - involved_activity = { has_current_phase = tournament_phase_horse_race } - } - } - NOR = { - has_trait = blind - has_trait = infirm - } - } - trigger_if = { # Blind and maimed people don't do archery - limit = { - NOT = { - involved_activity = { has_current_phase = tournament_phase_archery } - } - } - NOR = { - has_trait = blind - has_trait = maimed - } - } -} - -activity_tournament_contest_non_martial_gender_allowed = { - involved_activity ?= { - OR = { - has_current_phase = tournament_phase_horse_race - has_current_phase = tournament_phase_board_game - has_current_phase = tournament_phase_recital - } - } -} - -activity_tournament_contest_martial_gender_only = { - involved_activity ?= { - OR = { - has_current_phase = tournament_phase_duel - has_current_phase = tournament_phase_wrestling - has_current_phase = tournament_phase_melee - has_current_phase = tournament_phase_archery - has_current_phase = tournament_phase_joust - } - } -} - -activity_has_reason_to_cheer_character_trigger = { - exists = $CHAR$ - OR = { - this = $CHAR$ - AND = { - opinion = { - target = $CHAR$ - value >= 25 - } - OR = { - is_close_family_of = $CHAR$ - is_consort_of = $CHAR$ - has_any_good_relationship_with_character_trigger = { CHARACTER = $CHAR$ } - } - } - } -} - -activity_has_reason_to_anger_character_trigger = { - exists = $CHAR$ - NOT = { this = $CHAR$ } - opinion = { - target = $CHAR$ - value < 25 - } - has_any_bad_relationship_with_character_trigger = { CHARACTER = $CHAR$ } -} - -tournament_contest_wager_trigger = { - AND = { - has_current_phase = tournament_phase_$CONTEST$ - NOT = { - any_guest_subset = { - name = winner - phase = tournament_phase_$CONTEST$ - } - } - } - any_guest_subset_current_phase = { - name = qualified - count >= 3 - } - trigger_if = { - limit = { exists = var:contest_versus_progress } - var:contest_versus_progress <= 3 - } -} - -activity_tournament_armor_trigger = { - involved_activity ?= { has_activity_type = activity_tournament } - OR = { - AND = { - is_in_guest_subset = { name = qualified } - involved_activity = { - OR = { - has_current_phase = tournament_phase_melee - has_current_phase = tournament_phase_duel - has_current_phase = tournament_phase_joust - } - } - } - AND = { - has_character_modifier = ignores_gender_army_rules - is_in_guest_subset = { name = qualified } - } - } -} - -activity_tournament_shirtless_trigger = { - involved_activity ?= { - has_activity_type = activity_tournament - has_current_phase = tournament_phase_wrestling - } - is_in_guest_subset = { name = qualified } -} - -activity_tournament_valid_winner_trigger = { - is_alive = yes - exists = var:contest_aptitude - exists = var:progress_to_victory -} - -activity_adult_available_or_attending_same_activity_trigger = { - is_adult = yes - OR = { - is_available = yes - involved_activity ?= scope:activity - } -} - -activity_tournament_versus_contest_trigger = { - OR = { - has_current_phase = tournament_phase_joust - has_current_phase = tournament_phase_wrestling - has_current_phase = tournament_phase_duel - has_current_phase = tournament_phase_board_game - } -} - -activity_tournament_team_contest_trigger = { - scope:activity = { has_current_phase = tournament_phase_melee } -} - -activity_tournament_turn_contest_trigger = { - scope:activity = { - OR = { - has_current_phase = tournament_phase_archery - has_current_phase = tournament_phase_recital - } - } -} - -activity_tournament_mind_contest_trigger = { - scope:activity = { - OR = { - has_current_phase = tournament_phase_recital - has_current_phase = tournament_phase_board_game - } - } -} - -activity_tournament_prowess_contest_trigger = { - scope:activity = { - OR = { - has_current_phase = tournament_phase_melee - has_current_phase = tournament_phase_joust - has_current_phase = tournament_phase_duel - has_current_phase = tournament_phase_wrestling - } - } -} - -activity_tournament_armor_contest_trigger = { - scope:activity = { - OR = { - has_current_phase = tournament_phase_melee - has_current_phase = tournament_phase_joust - has_current_phase = tournament_phase_duel - } - } -} - -activity_tournament_horse_contest_trigger = { - scope:activity = { - OR = { - has_current_phase = tournament_phase_horse_race - has_current_phase = tournament_phase_joust - has_current_phase = tournament_phase_melee - } - } -} - -activity_tournament_race_contest_trigger = { - scope:activity = { has_current_phase = tournament_phase_horse_race } -} - -activity_tournament_same_team_trigger = { - scope:activity = { - OR = { - AND = { - any_guest_subset = { - name = team_alpha - this = $FIRST$ - } - any_guest_subset = { - name = team_alpha - this = $SECOND$ - } - } - AND = { - any_guest_subset = { - name = team_beta - this = $FIRST$ - } - any_guest_subset = { - name = team_beta - this = $SECOND$ - } - } - } - } -} - -tournament_character_any_contest_winner_trigger = { - involved_activity = { - any_guest_subset = { - name = winner - this = $CHAR$ - phase = tournament_phase_$CONTEST$ - } - } -} - -contest_versus_player_vs_ai_trigger = { - calc_true_if = { - amount = 1 - scope:versus_matchee = { is_ai = no } - scope:versus_matcher = { is_ai = no } - } - calc_true_if = { - amount = 1 - scope:versus_matchee = { is_ai = yes } - scope:versus_matcher = { is_ai = yes } - } - NOR = { - scope:versus_matchee = { has_character_flag = resigned_contest_flag } - scope:versus_matcher = { has_character_flag = resigned_contest_flag } - } -} - -contest_event_general_contestant_valid_trigger = { - is_available_quick = { - ai = yes - alive = yes - } - exists = var:contest_aptitude - exists = var:progress_to_victory - this != root -} - -has_ongoing_grand_activity_trigger = { - trigger_if = { - limit = { exists = involved_activity } - involved_activity = { - OR = { - has_activity_type = activity_tournament - has_activity_type = activity_tour - has_activity_type = activity_wedding - } - } - } - trigger_else = { - always = no - } -} - -is_grand_activity_trigger = { - OR = { - has_activity_type = activity_tournament - has_activity_type = activity_tour - has_activity_type = activity_wedding - } -} - -tournament_contest_event_trigger = { - is_ai = no - is_in_guest_subset = { name = qualified } - exists = var:progress_to_victory - NOT = { has_character_flag = busy_in_contest_event } -} - -tournament_contest_versus_event_trigger = { - is_ai = no - exists = var:progress_to_victory - is_in_guest_subset = { name = qualified } - NOT = { has_character_flag = resigned_contest_flag } - save_temporary_scope_as = versus_event_scope - # Only fire events if the bout has not been pre-decided - involved_activity = { - switch = { - trigger = has_current_phase - tournament_phase_joust = { - scope:versus_event_scope = { - switch = { - trigger = involved_activity.var:contest_versus_progress - 0 = { exists = var:contest_qualified_match_joust.var:progress_to_victory } - 1 = { exists = var:contest_semi_finalist_match_joust.var:progress_to_victory } - 2 = { exists = var:contest_finalist_match_joust.var:progress_to_victory } - } - } - } - tournament_phase_duel = { - scope:versus_event_scope = { - switch = { - trigger = involved_activity.var:contest_versus_progress - 0 = { exists = var:contest_qualified_match_duel.var:progress_to_victory } - 1 = { exists = var:contest_semi_finalist_match_duel.var:progress_to_victory } - 2 = { exists = var:contest_finalist_match_duel.var:progress_to_victory } - } - } - } - tournament_phase_wrestling = { - scope:versus_event_scope = { - switch = { - trigger = involved_activity.var:contest_versus_progress - 0 = { exists = var:contest_qualified_match_wrestling.var:progress_to_victory } - 1 = { exists = var:contest_semi_finalist_match_wrestling.var:progress_to_victory } - 2 = { exists = var:contest_finalist_match_wrestling.var:progress_to_victory } - } - } - } - tournament_phase_board_game = { - scope:versus_event_scope = { - switch = { - trigger = involved_activity.var:contest_versus_progress - 0 = { exists = var:contest_qualified_match_board_game.var:progress_to_victory } - 1 = { exists = var:contest_semi_finalist_match_board_game.var:progress_to_victory } - 2 = { exists = var:contest_finalist_match_board_game.var:progress_to_victory } - } - } - } - } - } - -} - -tournament_contest_can_compete_trigger = { - exists = var:progress_to_victory - NOT = { - is_in_guest_subset = { name = qualified } - } - activity_is_valid_tournament_contestant = yes -} - -tournament_contest_can_compete_race_trigger = { - is_adult = yes - exists = var:progress_to_victory - OR = { - is_lowborn = no - AND = { - is_playable_character = yes - primary_title.tier >= tier_county - } - gold >= major_gold_value - } - NOT = { - is_in_guest_subset = { name = qualified } - } -} - -contest_team_enemy_member_exists_trigger = { - scope:activity = { - OR = { - is_in_guest_subset = { name = team_alpha } - is_in_guest_subset = { name = team_beta } - } - trigger_if = { - limit = { - is_in_guest_subset = { name = team_alpha } - } - any_guest_subset_current_phase = { - name = team_beta - is_available_quick = { - ai = yes - alive = yes - } - } - } - trigger_else = { - any_guest_subset_current_phase = { - name = team_alpha - is_available_quick = { - ai = yes - alive = yes - } - } - } - } -} - -tournament_pertinent_contestant_trigger = { - OR = { - root.var:contest_murder_attempt ?= this - has_any_good_relationship_with_character_trigger = { CHARACTER = root } - has_any_bad_relationship_with_character_trigger = { CHARACTER = root } - is_consort_of = root - is_close_family_of = root - AND = { - has_court_position = champion_court_position - liege = root - } - is_knight_of = root - AND = { - exists = root.house - house ?= root.house - } - root.var:tournament_wager_target ?= this - } -} - -tournament_is_knightly_entourage_character_trigger = { - is_knight = yes - is_playable_character = no - save_temporary_scope_as = char_temp - involved_activity = { - any_attending_character = { this = scope:char_temp.liege } - } -} - -would_want_to_attend_tournament = { - trigger_if = { - limit = { is_playable_character = yes } - NOR = { - government_has_flag = government_is_tribal - government_has_flag = government_is_mercenary - government_has_flag = government_is_holy_order - } - } - trigger_else = { is_clergy = no } - OR = { - is_ai = no - has_trait = tourney_participant - has_trait = education_martial - has_trait = education_martial_prowess - has_trait = gregarious - has_trait = brave - prowess >= decent_skill_rating - has_court_position = champion_court_position - is_knight = yes - number_of_commander_traits >= 1 - has_any_scripted_relation = scope:inviter - } -} - -is_available_ai_adult_locale_person = { #to prevent bishops from being anything else than temple priests - is_available_ai_adult = yes - has_no_particular_noble_roots_trigger = yes - is_clergy = no -} diff --git a/N3OW/common/scripted_triggers/04_ep2_wedding_triggers.txt b/N3OW/common/scripted_triggers/04_ep2_wedding_triggers.txt deleted file mode 100644 index d7884550..00000000 --- a/N3OW/common/scripted_triggers/04_ep2_wedding_triggers.txt +++ /dev/null @@ -1,40 +0,0 @@ -# OTHER_SPOUSE = the other spouse character, may be invalid object -is_valid_grand_wedding_special_guest_trigger = { - is_alive = yes - is_adult = yes - # Must be able to marry the other character if they are selected - trigger_if = { - limit = { exists = $OTHER_SPOUSE$ } - can_marry_character_trigger = { CHARACTER = $OTHER_SPOUSE$ } - } -} - -has_been_promised_grand_wedding = { - has_variable = promised_grand_wedding_by -} - -has_promised_a_grand_wedding = { - has_variable = promised_grand_wedding_marriage_countdown -} - -activity_wedding_is_valid_guest = { - age >= 3 - is_at_war = no - is_in_army = no - is_imprisoned = no - NOR = { - exists = involved_activity - has_trait = incapable - } -} - -activity_wedding_diplomatic_intent_impressible_target = { - top_liege = this - any_neighboring_and_across_water_top_liege_realm_owner = { this = root } - highest_held_title_tier < root.highest_held_title_tier - NOT = { government_has_flag = cannot_be_vassal_or_liege } - is_at_war = no - save_temporary_scope_as = impress_check - impress_intent_vassalization_acceptance_value > -30 - scope:host ?= root -} diff --git a/N3OW/common/scripted_triggers/05_bp2_hostage_triggers.txt b/N3OW/common/scripted_triggers/05_bp2_hostage_triggers.txt deleted file mode 100644 index 7decdf56..00000000 --- a/N3OW/common/scripted_triggers/05_bp2_hostage_triggers.txt +++ /dev/null @@ -1,292 +0,0 @@ - -################################################## -# Triggers related to the hostage system - -bp2_valid_to_offer_as_hostage_trigger = { - # Update if this is changed : offer_hostage_interaction_desc - - # Must not be a hostage already - is_hostage = no - # Cannot send self as hostage - NOT = { this = $SENDER$ } - # Must be under sender's control - liege ?= $SENDER$ - # Hostages must be landless and not a ruler - is_landed = no - is_landless_ruler = no - is_married = no - is_betrothed = no - # If imprisoned, it must be by sender - trigger_if = { - limit = { is_imprisoned = yes } - imprisoner = $SENDER$ - } - # Hostages must be very close relations of sender - OR = { - is_child_of = $SENDER$ - is_grandchild_of = $SENDER$ - is_sibling_of = $SENDER$ - is_nibling_of = $SENDER$ - } - # Not already offered and travelling - NOR = { - exists = var:hostage_travelling_to_warden - exists = var:guardian_travelling_to_ward - exists = var:ward_travelling_to_guardian - } - # You can't send your diarch away as a hostage. - custom_tooltip = { - text = hostage_cannot_offer_own_regent_tt - NOT = { this = $SENDER$.diarch } - } - trigger_if = { - limit = { exists = scope:war } - scope:war = { - custom_tooltip = { - text = hostage_exchange_invalid_for_crusade_tt - NOR = { - using_cb = undirected_great_holy_war - using_cb = directed_great_holy_war - } - } - custom_tooltip = { - text = hostage_exchange_invalid_for_cb_tt - bp2_hostage_exchange_invalid_cb_trigger = no - } - } - } -} - -bp2_valid_to_offer_hostage_ai_trigger = { - # AI only cares about neighbors - scope:recipient = { character_is_land_realm_neighbor = scope:actor } - # Don't waste hostages on those who aren't a threat - scope:recipient.current_military_strength >= scope:actor.fifty_percent_of_current_military_strength - scope:recipient = { has_any_cb_on = scope:actor } - # Don't send hostages to those you seriously hate, or vice versa - NOR = { - scope:recipient = { - has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:actor } - house_has_feud_relation_with_trigger = { TARGET = scope:actor } - } - } -} - -bp2_valid_to_demand_hostage_ai_trigger = { - # AI only cares about neighbors - scope:recipient = { character_is_land_realm_neighbor = scope:actor } - # Don't waste hostages on those who aren't a threat - scope:actor.current_military_strength >= scope:recipient.fifty_percent_of_current_military_strength - scope:actor = { has_any_cb_on = scope:recipient } - # Don't send hostages to those you seriously hate, or vice versa - NOR = { - scope:recipient = { - has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:actor } - house_has_feud_relation_with_trigger = { TARGET = scope:actor } - } - } -} - -bp2_valid_to_exchange_hostage_ai_trigger = { - # AI only cares about neighbors - scope:recipient = { character_is_land_realm_neighbor = scope:actor } - # Only exchange with similary strong - scope:actor.current_strength_with_allies_seventy_five_percent_value < scope:recipient.current_strength_with_allies_value - scope:recipient.current_strength_with_allies_seventy_five_percent_value < scope:actor.current_strength_with_allies_value - OR = { - scope:actor = { has_any_cb_on = scope:recipient } - scope:recipient = { has_any_cb_on = scope:actor } - } - # Don't send hostages to those you seriously hate, or vice versa - NOR = { - scope:recipient = { - has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:actor } - house_has_feud_relation_with_trigger = { TARGET = scope:actor } - } - } -} - -bp2_valid_hostage_action_shared_trigger = { - # Don't inform of unimportant cases - NOR = { - is_allied_to = root - is_consort_of = root - } -} - -bp2_valid_hostage_offer_action_trigger = { - # Context checks, e.g. alliance - bp2_valid_hostage_action_shared_trigger = yes - # Only care about actual threats - has_any_cb_on = root - save_temporary_scope_as = warden - # Does not already have your hostage - NOT = { - any_warden_hostage = { home_court = root } - } - root = { - # You have a hostage to offer - any_close_family_member = { - count >= 1 - bp2_valid_to_offer_as_hostage_trigger = { SENDER = root } - save_temporary_scope_as = my_hostage - } - # Ensure Offer might be accepted - is_character_interaction_potentially_accepted = { - interaction = offer_hostage_interaction - recipient = scope:warden - secondary_actor = scope:my_hostage - } - } - # Why Offer when you could Exchange? - trigger_if = { - limit = { - # Only if they don't have your hostage already - NOT = { - any_home_court_hostage = { warden = root } - } - any_close_family_member = { - bp2_valid_to_offer_as_hostage_trigger = { SENDER = scope:warden } - save_temporary_scope_as = their_hostage - } - } - NOT = { - root = { - is_character_interaction_potentially_accepted = { - interaction = exchange_hostage_interaction - recipient = scope:warden - secondary_recipient = scope:their_hostage - secondary_actor = scope:my_hostage - } - } - } - } -} - -bp2_valid_hostage_demand_action_trigger = { - # Context checks, e.g. alliance - bp2_valid_hostage_action_shared_trigger = yes save_temporary_scope_as = home_court - NOT = { - # Don't already have your hostage - any_home_court_hostage = { warden = root } - } - # Ensure a viable hostage exists - any_close_family_member = { - count >= 1 - bp2_valid_to_offer_as_hostage_trigger = { SENDER = scope:home_court } - save_temporary_scope_as = their_hostage - } - # Ensure Demand might be accepted - root = { - is_character_interaction_potentially_accepted = { - interaction = demand_hostage_interaction - recipient = scope:home_court - secondary_recipient = scope:their_hostage - } - } -} - -bp2_valid_hostage_exchange_action_trigger = { - # Context checks, e.g. alliance - bp2_valid_hostage_action_shared_trigger = yes - save_temporary_scope_as = home_court - # Must be at least some threat for an Exchange to be relevant - #current_strength_with_allies_value >= root.current_strength_with_allies_fifty_percent_value - NOR = { - # Don't already have their hostage - any_warden_hostage = { home_court = root } - # Don't already have your hostage - any_home_court_hostage = { warden = root } - } - # Ensure a viable target exists - any_close_family_member = { - count >= 1 - bp2_valid_to_offer_as_hostage_trigger = { SENDER = scope:home_court } - save_temporary_scope_as = their_hostage - } - root = { - # Why Exchange when you could Demand? - NOT = { - is_character_interaction_potentially_accepted = { - interaction = demand_hostage_interaction - recipient = scope:home_court - secondary_recipient = scope:their_hostage - } - } - any_close_family_member = { - bp2_valid_to_offer_as_hostage_trigger = { SENDER = root } - save_temporary_scope_as = my_hostage - } - # Ensure Exchange might be accepted - is_character_interaction_potentially_accepted = { - interaction = exchange_hostage_interaction - recipient = scope:home_court - secondary_recipient = scope:their_hostage - secondary_actor = scope:my_hostage - } - } -} - -bp2_valid_for_standard_interactions_trigger = { - # BP2 - is_hostage = no - custom_tooltip = { - text = hostage_travelling_tt - NOR = { - exists = var:hostage_travelling_to_warden - exists = var:ward_travelling_to_guardian - exists = var:guardian_travelling_to_ward - } - } -} - -bp2_hostage_benefits_valid_trigger = { - NAND = { - exists = scope:home_court.dynasty - exists = scope:warden.dynasty - scope:home_court.dynasty = scope:warden.dynasty - } -} - -bp2_warden_dynasty_renown_lower_trigger = { - exists = $HOME_COURT$.dynasty - exists = $WARDEN$.dynasty - $WARDEN$.dynasty.dynasty_prestige_level < $HOME_COURT$.dynasty.dynasty_prestige_level -} - -bp2_warden_title_tier_lower_trigger = { - exists = $HOME_COURT$.primary_title - exists = $WARDEN$.primary_title - $WARDEN$.primary_title.tier < $HOME_COURT$.primary_title.tier -} - -bp2_warden_prestige_level_lower_trigger = { - exists = $HOME_COURT$ - exists = $WARDEN$ - $WARDEN$.prestige_level < $HOME_COURT$.prestige_level -} - -bp2_hostage_exchange_invalid_cb_trigger = { - OR = { - using_cb = flowery_war_cb - using_cb = excommunication_war - using_cb = fp2_border_raid - using_cb = fp2_expel_interloper - using_cb = artifact_war - using_cb = reclaim_relic_artifact_war - using_cb = diarch_vassalisation_cb - using_cb = remove_regent_cb - 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 - using_cb = nation_fracturing_faction_war - using_cb = invasion_war - using_cb = norwegian_invasion_cb - using_cb = norman_conquest_cb - using_cb = sons_of_lothbrok_invasion_cb - } -} diff --git a/N3OW/common/scripted_triggers/05_bp2_scripted_triggers.txt b/N3OW/common/scripted_triggers/05_bp2_scripted_triggers.txt deleted file mode 100644 index ef39b073..00000000 --- a/N3OW/common/scripted_triggers/05_bp2_scripted_triggers.txt +++ /dev/null @@ -1,55 +0,0 @@ -################################################# -# TRIGGER LIST # -################################################# -# has_same_wet_nurse_trigger - Check 2 characters if they have the same wet nurse, uses SCOPE and OTHER_SCOPE as the 2 character you want to check for having the same nurse - -has_same_wet_nurse_trigger = { - $SCOPE$ = { - any_relation = { - type = wet_nurse - even_if_dead = yes - save_temporary_scope_as = wet_nurse_temp - } - } - $OTHER_SCOPE$ = { - any_relation = { - type = wet_nurse - even_if_dead = yes - save_temporary_scope_as = other_wet_nurse_temp - } - } - - trigger_if = { - limit = { - AND = { - exists = scope:wet_nurse_temp - exists = scope:other_wet_nurse_temp - } - } - scope:wet_nurse_temp = scope:other_wet_nurse_temp - } - trigger_else = { - always = no - } -} - -character_can_rites_of_passage_trigger = { - OR = { - AND = { - is_adult = no - age >= 12 - custom_description = { - text = rites_of_passage_trigger_not_proven - NOT = { - any_memory = { - memory_type = completed_rites_of_passage - } - } - } - } - custom_description = { - text = rites_of_passage_trigger_delayed - has_character_flag = unproven_adult_flag - } - } -} \ No newline at end of file diff --git a/N3OW/common/scripted_triggers/05_bp2_triggers.txt b/N3OW/common/scripted_triggers/05_bp2_triggers.txt deleted file mode 100644 index eab04b46..00000000 --- a/N3OW/common/scripted_triggers/05_bp2_triggers.txt +++ /dev/null @@ -1,103 +0,0 @@ -#Adult Education Activity -is_higher_studies_location = { - save_temporary_scope_as = temp_location - OR = { - has_university_building_trigger = yes - is_religious_studies_location = yes - title:h_china.holder.capital_province ?= scope:temp_location # The capital of h_china is always a valid location - } -} - -is_religious_studies_location = { - OR = { - has_building_or_higher = holy_site_cathedral_01 - has_building_or_higher = holy_site_mosque_01 - has_building_or_higher = holy_site_pagan_grand_temple_01 - has_building_or_higher = holy_site_indian_grand_temple_01 - has_building_or_higher = holy_site_other_grand_temple_01 - has_building_or_higher = holy_site_mahabodhi_temple_01 - has_building_or_higher = brihadeeswarar_temple_01 - has_building_or_higher = holy_site_cologne_cathedral_01 - has_building_or_higher = holy_site_canterbury_cathedral_01 - has_building_or_higher = temple_of_uppsala_01 - has_building_or_higher = lund_cathedral_01 - has_building_or_higher = notre_dame_01 - has_building_or_higher = holy_site_imam_ali_mosque_01 - has_building_or_higher = holy_site_great_mosque_of_mecca_01 - has_building_or_higher = holy_site_great_mosque_of_cordoba_01 - has_building_or_higher = holy_site_great_mosque_of_djenne_01 - has_building_or_higher = holy_site_great_mosque_of_samarra_01 - has_building_or_higher = holy_site_prophetic_mosque_01 - has_building_or_higher = shwedagon_pagoda_01 - has_building_or_higher = ananda_temple_01 - has_building_or_higher = the_friday_mosque_01 - has_building_or_higher = khajuraho_01 - has_building_or_higher = hagia_sophia_01 - has_building_or_higher = temple_in_jerusalem_01 - has_building_or_higher = holy_site_basilica_santiago_01 - has_building_or_higher = imam_reza_shrine_01 - has_building_or_higher = cluny_abbey_01 - has_building_or_higher = damascus_mosque_01 - has_building_or_higher = jokhang_01 - has_building_or_higher = holy_wisdom_01 - has_building_or_higher = duomo_florence_01 - has_building_or_higher = konark_temple_01 - has_building_or_higher = wawel_cathedral_01 - has_building_or_higher = vatapi_caves_01 - has_building_or_higher = al_qarawiyyin_university_01 - has_building_or_higher = somapura_university_01 - # TGP - has_building_or_higher = holy_site_buddhist_grand_temple_01 - has_building_or_higher = holy_site_japanese_temple_01 - has_building_or_higher = holy_site_chinese_temple_01 - has_building_or_higher = holy_site_se_asia_pagan_temple_01 - has_building_or_higher = kofuku_ji_01 - has_building_or_higher = enryaku_ji_01 - has_building_or_higher = hwangnyongsa_01 - has_building_or_higher = giant_wild_goose_pagoda_01 - has_building_or_higher = maoshan_academy_01 - has_building_or_higher = tiantai_monasteries_01 - has_building_or_higher = jizu_shan_temples_01 - has_building_or_higher = nanhua_temple_01 - has_building_or_higher = borobudur_01 - } -} - -is_available_adult_education_teacher = { - is_available_healthy_ai_adult = yes - age > 35 - 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 - 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 - } - OR = { - diplomacy >= 12 - martial >= 12 - stewardship >= 12 - intrigue >= 12 - learning >= 12 - } - trigger_if = { - limit = { - scope:location.county.faith = { has_doctrine = doctrine_gender_female_dominated } - } - is_female = yes - } - trigger_else_if = { - limit = { - scope:location.county.faith = { has_doctrine = doctrine_gender_male_dominated } - } - is_female = no - } - trigger_else = { - always = yes - } -} diff --git a/N3OW/common/scripted_triggers/06_bp3_triggers.txt b/N3OW/common/scripted_triggers/06_bp3_triggers.txt deleted file mode 100644 index f1757cc6..00000000 --- a/N3OW/common/scripted_triggers/06_bp3_triggers.txt +++ /dev/null @@ -1,216 +0,0 @@ -wayfarer_the_real_threat_trigger = { - is_councillor_of = root - is_ai = yes - opinion = { - target = root - value < 10 - } -} - -# Used to keep track of mines found after our time period, so they have a higher chance to spawn for the Inspection event, particularly in Norway -later_historical_gold_mine_trigger = { - OR = { - this = province:1705 # Kildonan Gold Rush, 1869 - this = province:1665 # Dolgellau Gold Rush, Mid-19th century - } -} - -later_historical_silver_mine_trigger = { - OR = { - this = province:248 # Kongsberg, 1623 - this = province:346 # Sala, 15th century - } -} - -later_historical_copper_mine_trigger = { - this = province:241 # Røros, 1645 -} - -reminiscing_event_trigger = { - is_ai = no - has_variable = reminiscing_location - var:reminiscing_location = root.location -} - -local_guild_trigger = { - OR = { - has_building_or_higher = watermills_01 - has_building_or_higher = windmills_01 - has_building_or_higher = common_tradeport_01 - has_building_or_higher = pastures_01 - has_building_or_higher = hunting_grounds_01 - has_building_or_higher = orchards_01 - has_building_or_higher = logging_camps_01 - has_building_or_higher = quarries_01 - has_building_or_higher = smiths_01 - has_building_or_higher = stables_01 - has_building_or_higher = guild_halls_01 - has_building_or_higher = hospices_01 - has_building_or_higher = workshops_01 - } -} - -local_guild_compare_trigger = { - switch = { - trigger = scope:local_guild_scope - 1 = { - NOT = { has_building_or_higher = watermills_01 } - building_watermills_requirement_terrain = yes - } - 2 = { - NOT = { has_building_or_higher = windmills_01 } - building_windmills_requirement_terrain = yes - } - 3 = { - NOT = { has_building_or_higher = common_tradeport_01 } - building_common_tradeport_requirement_terrain = yes - } - 4 = { - NOT = { has_building_or_higher = pastures_01 } - building_pastures_requirement_terrain = yes - } - 5 = { - NOT = { has_building_or_higher = pastures_01 } - building_pastures_requirement_terrain = yes - } - 6 = { - NOT = { has_building_or_higher = pastures_01 } - building_pastures_requirement_terrain = yes - } - 7 = { - NOT = { has_building_or_higher = pastures_01 } - building_pastures_requirement_terrain = yes - } - 8 = { - NOT = { has_building_or_higher = hunting_grounds_01 } - building_hunting_grounds_requirement_terrain = yes - } - 9 = { - NOT = { has_building_or_higher = hunting_grounds_01 } - building_hunting_grounds_requirement_terrain = yes - } - 10 = { - NOT = { has_building_or_higher = hunting_grounds_01 } - building_hunting_grounds_requirement_terrain = yes - } - 11 = { - NOT = { has_building_or_higher = orchards_01 } - building_orchards_requirement_terrain = yes - } - 12 = { - NOT = { has_building_or_higher = logging_camps_01 } - building_logging_camps_requirement_terrain = yes - } - 13 = { - NOT = { has_building_or_higher = quarries_01 } - building_quarries_requirement_terrain = yes - } - 14 = { - NOT = { has_building_or_higher = quarries_01 } - building_quarries_requirement_terrain = yes - } - 15 = { - NOT = { has_building_or_higher = smiths_01 } - building_smiths_requirement_terrain = yes - } - 16 = { - NOT = { has_building_or_higher = stables_01 } - building_stables_requirement_terrain = yes - } - 17 = { - NOT = { has_building_or_higher = guild_halls_01 } - has_building_or_higher = city_01 - } - 18 = { - NOT = { has_building_or_higher = hospices_01 } - } - 19 = { - NOT = { has_building_or_higher = hospices_01 } - } - 20 = { - NOT = { has_building_or_higher = workshops_01 } - building_workshops_requirement_terrain = yes - } - } -} - -landless_inspector_terrain_knowing_the_land_trigger = { - trigger_if = { - limit = { - OR = { - terrain = forest - terrain = jungle - terrain = taiga - terrain = wetlands - } - } - landless_inspector_terrain_master_trigger = { TERRAIN = woodlands } - } - trigger_if = { - limit = { - OR = { - terrain = mountains - terrain = hills - terrain = desert_mountains - } - } - landless_inspector_terrain_master_trigger = { TERRAIN = highlands } - } - trigger_if = { - limit = { - OR = { - terrain = plains - terrain = steppe - terrain = farmlands - terrain = floodplains - } - } - landless_inspector_terrain_master_trigger = { TERRAIN = lowlands } - } - trigger_if = { - limit = { - OR = { - terrain = desert - terrain = oasis - terrain = drylands - } - } - landless_inspector_terrain_master_trigger = { TERRAIN = drylands } - } -} - -landless_inspector_terrain_master_trigger = { - root = { - OR = { - has_character_modifier = landless_inspector_$TERRAIN$_tier_1_modifier - has_character_modifier = landless_inspector_$TERRAIN$_tier_2_modifier - has_character_modifier = nomadic_inspector_$TERRAIN$_tier_2_modifier - has_character_modifier = landless_inspector_$TERRAIN$_tier_3_modifier - has_character_modifier = nomadic_inspector_$TERRAIN$_tier_3_modifier - } - } -} - -landless_inspector_king_of_the_wilds = { - switch = { - trigger = has_character_modifier - # Woodlands - master_terrain_forest_modifier = { root.location ?= { terrain = forest } } - master_terrain_jungle_modifier = { root.location ?= { terrain = jungle } } - master_terrain_taiga_modifier = { root.location ?= { terrain = taiga } } - master_terrain_wetlands_modifier = { root.location ?= { terrain = wetlands } } - # Highlands - master_terrain_mountains_modifier = { root.location ?= { terrain = mountains } } - master_terrain_hills_modifier = { root.location ?= { terrain = hills } } - master_terrain_desert_mountains_modifier = { root.location ?= { terrain = desert_mountains } } - # Lowlands - master_terrain_plains_modifier = { root.location ?= { terrain = plains } } - master_terrain_steppe_modifier = { root.location ?= { terrain = steppe } } - master_terrain_farmlands_modifier = { root.location ?= { terrain = farmlands } } - master_terrain_floodplains_modifier = { root.location ?= { terrain = floodplains } } - # Drylands - master_terrain_drylands_modifier = { root.location ?= { terrain = drylands } } - master_terrain_desert_modifier = { root.location ?= { terrain = desert } } - master_terrain_oasis_modifier = { root.location ?= { terrain = oasis } } - } -} diff --git a/N3OW/common/scripted_triggers/06_ce1_epidemic_triggers.txt b/N3OW/common/scripted_triggers/06_ce1_epidemic_triggers.txt deleted file mode 100644 index c8c40336..00000000 --- a/N3OW/common/scripted_triggers/06_ce1_epidemic_triggers.txt +++ /dev/null @@ -1,41 +0,0 @@ -#would_follow_social_distancing_trigger -#realm_has_any_epidemic -#notified_of_plague_trigger - -would_follow_social_distancing_trigger = { - would_follow_social_distancing_value >= 0 -} - -realm_has_any_epidemic = { - any_sub_realm_county = { - count >= $SIZE$ - any_county_province_epidemic = { - outbreak_intensity >= $INTENSITY$ - } - } -} - -realm_has_any_nearby_epidemic = { - any_sub_realm_county = { - count >= $SIZE$ - any_county_province = { - OR = { - county.holder = root - squared_distance = { - target = root.capital_province - value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). - } - } - any_province_epidemic = { - outbreak_intensity >= $INTENSITY$ - } - } - } -} - -notified_of_plague_trigger = { - is_target_in_variable_list = { - name = plagues_notified - target = scope:epidemic - } -} \ No newline at end of file diff --git a/N3OW/common/scripted_triggers/06_ce1_legend_triggers.txt b/N3OW/common/scripted_triggers/06_ce1_legend_triggers.txt deleted file mode 100644 index b6ff34bf..00000000 --- a/N3OW/common/scripted_triggers/06_ce1_legend_triggers.txt +++ /dev/null @@ -1,119 +0,0 @@ -#is_standard_legend_spreading_courtier -#has_access_to_legitimizing_seeds -#has_legend_chapter_trigger - checks if you own a legend - -is_standard_legend_spreading_courtier = { - this != root - this != root.promoted_legend.legend_protagonist - NOT = { is_spouse_of = root } - NOT = { is_child_of = root } - is_available_ai_adult = yes -} - -locale_valid_for_legendary_buildings = { - scope:location ?= { - OR = { - province_owner = root - province_owner.top_liege = root - } - has_special_building_slot = no - } - -} - -valid_for_legendary_integration_k = { - save_temporary_scope_as = title_to_check - OR = { - custom_tooltip = { - text = control_the_entirity_of_title_tt - AND = { - de_jure_drift_progress = { - target = root.primary_title - value > 0 - } - root = { completely_controls = scope:title_to_check } - } - } - holder = root - } - custom_tooltip = { - text = not_already_de_jure_your_title_tt - NOR = { - this = root.primary_title - root.primary_title = { - is_de_jure_liege_or_above_target = scope:title_to_check - } - } - } -} - -valid_for_legendary_integration_d = { - OR = { - de_jure_drift_progress = { - target = root.primary_title - value > 0 - } - kingdom ?= { - de_jure_drift_progress = { - target = root.primary_title - value > 0 - } - } - holder = root - } - NOR = { - kingdom ?= root.primary_title - empire ?= root.primary_title - } -} - -has_legend_chapter_trigger = { - has_dlc_feature = legends - exists = promoted_legend - promoted_legend.legend_owner = root - promoted_legend = { - has_legend_chapter = $CHAPTER$ - } -} - -has_legend_chapter_winner_trigger = { - has_dlc_feature = legends - exists = promoted_legend - promoted_legend.legend_owner = scope:winner - promoted_legend = { - has_legend_chapter = $CHAPTER$ - } -} - -has_any_point_of_interest_flag = { - OR = { - has_building_with_flag = { - flag = travel_point_of_interest_martial - } - has_building_with_flag = { - flag = travel_point_of_interest_martial_minor - } - has_building_with_flag = { - flag = travel_point_of_interest_religious - } - has_building_with_flag = { - flag = travel_point_of_interest_diplomatic - } - has_building_with_flag = { - flag = travel_point_of_interest_wonder - } - has_building_with_flag = { - flag = travel_point_of_interest_economic - } - has_building_with_flag = { - flag = travel_point_of_interest_learning - } - has_building_with_flag = { - flag = travel_point_of_interest_natural_feature - } - has_building_with_flag = { - flag = travel_point_of_interest_stress_relief - } - } -} - diff --git a/N3OW/common/scripted_triggers/06_ce1_legitimacy_triggers.txt b/N3OW/common/scripted_triggers/06_ce1_legitimacy_triggers.txt deleted file mode 100644 index 9af9ca8b..00000000 --- a/N3OW/common/scripted_triggers/06_ce1_legitimacy_triggers.txt +++ /dev/null @@ -1,30 +0,0 @@ -###################### -# Legitimacy -###################### - -#is_valid_for_legitimacy_change -#has_nomadic_legitimacy -#is_valid_for_nomadic_legitimacy_change - -is_valid_for_legitimacy_change = { - has_legitimacy = yes - is_alive = yes - is_landed = yes - is_ruler = yes - exists = dynasty - highest_held_title_tier >= tier_county - NOR = { - government_has_flag = government_is_theocracy - government_has_flag = government_is_republic - } -} - -has_nomadic_legitimacy = { - has_legitimacy = yes - government_has_flag = government_is_nomadic -} - -is_valid_for_nomadic_legitimacy_change = { - is_valid_for_legitimacy_change = yes - government_has_flag = government_is_nomadic -} \ No newline at end of file diff --git a/N3OW/common/scripted_triggers/06_fp3_scripted_triggers.txt b/N3OW/common/scripted_triggers/06_fp3_scripted_triggers.txt deleted file mode 100644 index da15ac56..00000000 --- a/N3OW/common/scripted_triggers/06_fp3_scripted_triggers.txt +++ /dev/null @@ -1,479 +0,0 @@ -fp3_should_use_iranian_graphics_trigger = { - culture = { has_building_gfx = iranian_building_gfx } -} - -eligible_for_fp3_khvarenah_legacy_trigger = { - has_fp3_dlc_trigger = yes - dynasty = { - OR = { - dynast = { - culture = { - OR = { - has_cultural_pillar = heritage_iranian - any_parent_culture_or_above = { - has_cultural_pillar = heritage_iranian - } - } - } - } - has_dynasty_perk = fp3_khvarenah_legacy_1 - } - } -} - -fp3_warrior_culture_trigger = { - AND = { - OR = { - has_cultural_pillar = ethos_bellicose - has_cultural_tradition = tradition_swords_for_hire - } - OR = { - has_cultural_pillar = heritage_iranian - has_cultural_pillar = heritage_arabic - has_cultural_pillar = heritage_turkic - has_cultural_pillar = heritage_tocharian - } - } -} - -fp3_custom_divinity_for_zoroastrianism_faiths = { - OR = { - faith.religion = faith:mazdayasna.religion - faith.religion = faith:gayomarthianism.religion - faith.religion = faith:khurmazta.religion - faith.religion = faith:zurvanism.religion - faith.religion = faith:urartuism.religion - faith.religion = faith:mazdakism.religion - faith.religion = faith:khurramism.religion - } -} - -fp3_sufism_enthusiast_trigger = { - has_religion = religion:islam_religion - learning > good_skill_level - OR = { - faith = { has_doctrine = tenet_esotericism } - faith = { has_doctrine_parameter = meditation_mechanics_active } - has_character_modifier = hallucinogenic_visions_uplifting_modifier - has_character_modifier = cosmic_insights_modifier - has_character_modifier = fp3_sufi_initiate_modifier - has_character_modifier = foreboding_visions_modifier - has_character_modifier = mysterious_prophetess_illness_modifier - learning >= excellent_skill_level - } -} - -# Used for speeding-up debug. Has little to no impact on performance, does not cause errors, or affect player experience. -is_developer_testing_trigger = { - is_ai = no - debug_only = yes - has_multiple_players = no -} - -fp3_will_remain_in_caliphate_regardless_of_takeover = { - OR = { - opinion = { # They must either not hate you - target = scope:struggle_ender - value > -29 - } - opinion = { # Or really want to stay by the side of the caliph - target = scope:struggle_liege - value > 54 - } - } -} - -fp3_eligible_for_yearly_events_trigger = { - has_fp3_dlc_trigger = yes - OR = { - culture = { has_cultural_pillar = heritage_iranian } - culture = { has_cultural_pillar = heritage_turkic } - culture = { has_cultural_pillar = heritage_mongolic } - culture = { has_cultural_pillar = heritage_arabic } - } - # Most events are geographical in nature - capital_province ?= { geographical_region = world_persian_empire } -} - -fp3_is_valid_futuwaa_member = { - $SPONSOR$.capital_province ?= { this = prev.location } # Prevents error log errors from dumbo AI - is_ai = yes - age > 12 - age < 25 - is_married = no - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = $SPONSOR$ } -} - -fp3_is_valid_madrasa_pupil = { - $SPONSOR$.capital_province ?= { this = prev.location } # Prevents error log errors from dumbo AI - is_ai = yes - age > 8 - age < 16 - NOT = { has_character_flag = studying_at_university } - #Gender rules - OR = { - $SPONSOR$ = { has_realm_law = equal_law } - AND = { - $SPONSOR$ = { - OR = { - has_realm_law = female_only_law - has_realm_law = female_preference_law - } - } - is_female = yes - } - AND = { - $SPONSOR$ = { - OR = { - has_realm_law = male_only_law - has_realm_law = male_preference_law - } - } - is_male = yes - } - } -} - -fp3_valid_shia_head = { - calc_true_if = { - amount >= 2 - - # Sayyids get a free pass. - has_trait = sayyid - # The wise get a free pass. - has_trait = lifestyle_mystic - piety_level >= very_high_piety_level - # Having many faithful counties. - custom_description = { - text = claim_the_imamate_decision.need_at_least_fifteen_same_faith_counties - any_sub_realm_county = { - count >= claim_the_imamate_decision_same_faith_greater_county_count - faith = root.faith - } - } - # Ancient Authority legacy. - dynasty ?= { has_dynasty_perk = fp3_khvarenah_legacy_4 } - } -} - -fp3_valid_muhakkima_head = { - calc_true_if = { - amount >= 2 - - # Sayyids get a free pass. - has_trait = sayyid - piety_level >= very_high_piety_level - # Having many faithful counties - custom_description = { - text = claim_the_imamate_decision.need_at_least_fifteen_same_faith_counties - any_sub_realm_county = { - count >= claim_the_imamate_decision_same_faith_greater_county_count - faith = root.faith - } - } - # Famed - prestige_level >= 4 - # #Muhakkima cares about justified warfare - and a justified cause. - OR = { - has_trait = faith_warrior #mujahid really - has_trait = theologian - } - } -} - -fp3_does_this_player_care_about_the_persian_struggle = { - save_temporary_scope_as = char_temp - OR = { - capital_province ?= { - OR = { # Is in region - geographical_region = world_middle_east_persia - geographical_region = world_africa_north_east - } - } - struggle:persian_struggle = { is_culture_involved_in_struggle = scope:char_temp.culture } - struggle:persian_struggle = { is_faith_involved_in_struggle = scope:char_temp.faith } - # Ping islamic and zoroastrian players as they might be interested - religion = religion:islam_religion - religion = religion:zoroastrianism_religion - fp3_character_involved_in_struggle_trigger = yes - fp3_character_interloper_in_struggle_trigger = yes - } -} - -fp3_reward_from_vassalization_ending = { - has_fp3_dlc_trigger = yes - - # Only available when the vassalization happened - exists = global_var:fp3_struggle_ending - global_var:fp3_struggle_ending = flag:fp3_struggle_vassalize_caliph_ending - - #need to be the liege of the caliph or from their House - - scope:recipient = { - any_held_title = { - this = title:d_sunni - } - } - - scope:actor.house ?= scope:recipient.top_liege.house -} - -fp3_struggle_involves_one_supporter_and_one_detractor = { - OR = { - AND = { - $FIRST$ = { has_trait = fp3_struggle_detractor } - $SECOND$ = { has_trait = fp3_struggle_supporter } - } - AND = { - $FIRST$ = { has_trait = fp3_struggle_supporter } - $SECOND$ = { has_trait = fp3_struggle_detractor } - } - } -} - -fp3_struggle_scoped_is_the_arabian_caliph_trigger = { - OR = { - has_title = title:e_arabia - has_title = title:d_sunni - } -} - -fp3_fortress_of_faith_county_trigger = { - faith = { save_temporary_scope_as = compare_faith } - root.faith = { - faith_hostility_level = { - target = scope:compare_faith - value < faith_evil_level - } - } -} - -fp3_is_valid_loyal_puppet = { # Install a suitable lackey to do your bidding - has_trait = fp3_struggle_supporter - # Can't be friends w/liege or indebted to them - liege ?= { - NOR = { - has_relation_friend = prev - has_hook = prev - } - } - primary_title.tier >= tier_county # We don't want to promote baron to avoid having Republic or Theocracies realms -} - -fp3_proper_gender_for_dynastic_ambition_trigger = { - OR = { #checking for appropriate gender - AND = { - root = { - OR = { - has_realm_law = male_preference_law - has_realm_law = male_only_law - } - } - is_male = yes - } - AND = { - root = { - OR = { - has_realm_law = female_preference_law - has_realm_law = female_only_law - } - } - is_female = yes - } - AND = { - root = { has_realm_law = equal_law } - OR = { - is_female = yes - is_male = yes - } - } - } -} - -fp3_character_any_involvement_persian_struggle_trigger = { - has_fp3_dlc_trigger = yes - OR = { - fp3_character_involved_in_struggle_trigger = yes - fp3_character_interloper_in_struggle_trigger = yes - } -} - -fp3_character_involved_in_struggle_trigger = { - has_fp3_dlc_trigger = yes - any_character_struggle = { - involvement = involved - is_struggle_type = persian_struggle - } -} - -fp3_character_interloper_in_struggle_trigger = { - has_fp3_dlc_trigger = yes - any_character_struggle = { - involvement = interloper - is_struggle_type = persian_struggle - } -} - -fp3_character_uninvolved_in_struggle_trigger = { - has_fp3_dlc_trigger = yes - exists = struggle:persian_struggle - fp3_character_interloper_in_struggle_trigger = no - fp3_character_involved_in_struggle_trigger = no -} - -fp3_struggle_is_the_caliph = { - AND = { - any_held_title = { - this = title:d_sunni - } - any_held_title = { - this = title:e_arabia - } - } -} - -fp3_embellish_capital_decision_character_trigger = { - is_capable_adult_ai = yes - is_imprisoned = no - is_healthy = yes - NOR = { - has_relation_rival = root - is_vassal_of = root - } -} - -fp3_name_read_in_friday_prayer_decision_liege_requirements_trigger = { - OR = { - top_liege = this - custom_description = { - text = name_read_in_friday_prayer_crown_authority - top_liege != this - liege ?= { has_realm_law = crown_authority_0 } - } - AND = { - has_trait = fp3_struggle_detractor - liege = { has_title = title:d_sunni } - } - # We have to trigger_if this for tooltip reasons. - trigger_if = { - limit = { top_liege != this } - liege = { government_has_flag = government_is_tribal } - } - } -} - -favour_skilled_outsiders_decision_valid_character_to_take_trigger = { - OR = { - has_perk = meritocracy_perk - government_has_flag = government_is_clan - culture = { has_cultural_pillar = ethos_egalitarian } - calc_true_if = { - amount >= 2 - has_trait = calm - has_trait = humble - has_trait = ambitious - } - } -} - -favour_skilled_outsiders_decision_valid_county_to_generate_trigger = { - culture = { - # We don't technically need a custom tooltip for this, but the formatting looks much nicer. - custom_tooltip = { - text = favour_skilled_outsiders_decision.tt.not_share_your_heritage - NOT = { has_same_culture_heritage = root.culture } - } - trigger_if = { - limit = { exists = root.cp:councillor_chancellor } - custom_tooltip = { - text = favour_skilled_outsiders_decision.tt.not_share_chancellor_heritage - NOT = { has_same_culture_heritage = root.cp:councillor_chancellor.culture } - } - } - trigger_if = { - limit = { exists = root.cp:councillor_marshal } - custom_tooltip = { - text = favour_skilled_outsiders_decision.tt.not_share_marshal_heritage - NOT = { has_same_culture_heritage = root.cp:councillor_marshal.culture } - } - } - trigger_if = { - limit = { exists = root.cp:councillor_steward } - custom_tooltip = { - text = favour_skilled_outsiders_decision.tt.not_share_steward_heritage - NOT = { has_same_culture_heritage = root.cp:councillor_steward.culture } - } - } - trigger_if = { - limit = { exists = root.cp:councillor_spymaster } - custom_tooltip = { - text = favour_skilled_outsiders_decision.tt.not_share_spymaster_heritage - NOT = { has_same_culture_heritage = root.cp:councillor_spymaster.culture } - } - } - trigger_if = { - limit = { exists = root.cp:councillor_court_chaplain } - custom_tooltip = { - text = favour_skilled_outsiders_decision.tt.not_share_court_chaplain_heritage - NOT = { has_same_culture_heritage = root.cp:councillor_court_chaplain.culture } - } - } - trigger_if = { - limit = { - root = { top_liege != this } - } - custom_tooltip = { - text = favour_skilled_outsiders_decision.tt.not_share_liege_heritage - save_temporary_scope_as = culture_temp - NOT = { - root = { - any_liege_or_above = { - culture = { has_same_culture_heritage = scope:culture_temp } - } - } - } - } - } - } -} - -favour_skilled_outsiders_decision_grab_courtlies_trigger = { - OR = { - NOT = { exists = scope:outsider_select } - NOT = { - culture = { has_same_culture_heritage = scope:outsider_select.culture } - } - } - has_vassal_stance = courtly -} - -favour_skilled_outsiders_decision_grab_landless_councillors_trigger = { - OR = { - NOT = { exists = scope:outsider_select } - NOT = { - culture = { has_same_culture_heritage = scope:outsider_select.culture } - } - } - is_landed = no -} - -favour_skilled_outsiders_decision_non_courtlies_trigger = { - OR = { - NOT = { exists = scope:outsider_select } - NOT = { - culture = { has_same_culture_heritage = scope:outsider_select.culture } - } - } - NOT = { has_vassal_stance = courtly } -} - -has_clan_succession_law = { - is_ruler = yes - OR = { - has_realm_law = clan_antagonistic_partition_succession_law - has_realm_law = clan_competitive_partition_succession_law - has_realm_law = clan_impassive_partition_succession_law - has_realm_law = clan_friendly_partition_succession_law - has_realm_law = clan_harmonious_partition_succession_law - } -} diff --git a/N3OW/common/scripted_triggers/07_ep3_petition_triggers.txt b/N3OW/common/scripted_triggers/07_ep3_petition_triggers.txt deleted file mode 100644 index 20f66f63..00000000 --- a/N3OW/common/scripted_triggers/07_ep3_petition_triggers.txt +++ /dev/null @@ -1,158 +0,0 @@ -petition_liege_council_seat_trigger = { - is_councillor = no - $HOUSE$ = house - OR = { - can_be_chancellor_trigger = { COURT_OWNER = $LIEGE$ } - can_be_steward_trigger = { COURT_OWNER = $LIEGE$ } - can_be_marshal_trigger = { COURT_OWNER = $LIEGE$ } - can_be_spymaster_trigger = { COURT_OWNER = $LIEGE$ } - can_be_court_chaplain_trigger = { COURT_OWNER = $LIEGE$ } - } -} - -petition_liege_council_seat_family_trigger = { - is_house_head = yes - any_courtier = { - is_available_healthy_ai_adult = yes - petition_liege_council_seat_trigger = { HOUSE = $HOUSE$ LIEGE = $LIEGE$ } - } -} - -petition_liege_court_position_trigger = { - has_any_court_position = no - house = $HOUSE$ -} - -petition_liege_court_position_family_trigger = { - is_house_head = yes - any_courtier = { - is_available_healthy_ai_adult = yes - petition_liege_court_position_trigger = { HOUSE = $HOUSE$ } - } -} - -petition_liege_governorship_trigger = { - liege = { - save_temporary_scope_as = liege_temp - any_held_title = { - petition_liege_governorship_duchy_request = { LIEGE = scope:liege_temp } - } - } -} - -petition_liege_governorship_family_trigger = { - is_house_head = yes - petition_liege_governorship_trigger = yes - petition_liege_governorship_family_count_trigger = yes - petition_liege_governorship_family_valid_trigger = yes -} - -petition_liege_governorship_family_count_trigger = { - house = { - any_house_member = { - count < 3 - is_landed = yes - liege = root.liege - } - } -} - -petition_liege_governorship_family_valid_trigger = { - house = { - any_house_member = { - is_landed = no - is_adult = yes - liege = root - can_be_granted_titles_by = { RULER = root.liege } - } - } -} - -petition_liege_house_governorship_rights_trigger = { - is_governor = yes - custom_tooltip = { - text = petition_liege_house_governorship_rights_valid_tt - NOT = { exists = primary_title.var:petition_house_rights } - } -} - -petition_liege_admin_valid_trigger = { - government_allows = administrative -} - -petition_liege_governorship_county_request = { - tier = tier_county - NOT = { this = $LIEGE$.capital_county } -} - -petition_liege_governorship_duchy_request = { - tier = tier_duchy - is_noble_family_title = no - is_landless_type_title = no - NOT = { $LIEGE$.capital_county.duchy = this } - any_de_jure_county = { - holder = $LIEGE$ - } -} - -petition_liege_governorship_kingdom_request = { - tier = tier_kingdom - is_landless_type_title = no - NOT = { $LIEGE$.capital_county.kingdom = this } - any_de_jure_county = { - holder = $LIEGE$ - } -} - -needs_more_valid_compensation_options_trigger = { - calc_true_if = { - amount < 2 - exists = scope:bribe_gold - exists = scope:bribe_factions - exists = scope:bribe_favor - exists = scope:bribe_contract - exists = scope:bribe_vows - exists = scope:bribe_knight - } -} - -petition_liege_vows_trigger = { - is_ruler = no - is_landed = no - is_adult = yes - is_married = no - number_of_concubines = 0 - religion = scope:petition_liege.religion - faith = { has_doctrine_parameter = take_vows_active } - scope:petition_vassal.faith = { has_doctrine_parameter = take_vows_active } - NOR = { - this = scope:petition_vassal.player_heir - has_trait = devoted - } - OR = { - has_trait = education_learning - learning >= medium_skill_rating - } - trigger_if = { - limit = { is_male = yes } - faith_dominant_gender_male_or_equal = yes - } - trigger_else_if = { - limit = { is_female = yes } - faith_dominant_gender_female_or_equal = yes - } - trigger_else = { always = yes } -} - -petition_liege_knight_trigger = { - is_ruler = no - is_landed = no - is_adult = yes - NOT = { this = scope:petition_vassal.player_heir } - OR = { - has_trait = education_martial - has_trait = education_martial_prowess - prowess >= medium_skill_rating - } - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:petition_liege } -} diff --git a/N3OW/common/scripted_triggers/07_ep3_triggers.txt b/N3OW/common/scripted_triggers/07_ep3_triggers.txt deleted file mode 100644 index b1ea02e5..00000000 --- a/N3OW/common/scripted_triggers/07_ep3_triggers.txt +++ /dev/null @@ -1,1765 +0,0 @@ -ep3_should_use_byzantine_graphics_trigger = { - culture = { has_building_gfx = byzantine_building_gfx } -} - -is_roman_emperor_trigger = { - OR = { - has_title = title:e_byzantium - has_title = title:h_roman_empire - has_title = title:h_eastern_roman_empire - } -} - -is_roman_emperor_excluding_byzantium_trigger = { - OR = { - has_title = title:h_roman_empire - has_title = title:h_eastern_roman_empire - } -} - -is_roman_emperor_primary_title_trigger = { - OR = { - primary_title ?= title:e_byzantium - primary_title ?= title:h_roman_empire - primary_title ?= title:h_eastern_roman_empire - } -} - -is_roman_emperor_primary_title_excluding_byzantium_trigger = { - OR = { - primary_title ?= title:h_roman_empire - primary_title ?= title:h_eastern_roman_empire - } -} - -valid_for_byz_emperor_content_trigger = { - has_ep3_dlc_trigger = yes - culture = { - OR = { - has_cultural_pillar = heritage_byzantine - has_cultural_pillar = heritage_caucasian - } - } - OR = { - is_roman_emperor_primary_title_trigger = yes - AND = { - culture = { - OR = { - this = culture:greek - any_parent_culture_or_above = { this = culture:greek } - } - } - highest_held_title_tier >= tier_empire - } - } -} - -valid_for_byz_governor_content_trigger = { - has_ep3_dlc_trigger = yes - is_governor = yes - top_liege.culture = { - OR = { - has_cultural_pillar = heritage_byzantine - has_cultural_pillar = heritage_caucasian - } - } - top_liege = { - OR = { - is_roman_emperor_primary_title_trigger = yes - AND = { - culture = { - OR = { - this = culture:greek - any_parent_culture_or_above = { this = culture:greek } - } - } - highest_held_title_tier >= tier_empire - } - } - } -} - -valid_for_byz_succession_trigger = { - is_eunuch_trigger = no - NOR = { - has_trait = incapable - has_trait = blind - has_trait = disfigured - has_trait = maimed - has_trait = one_eyed - has_trait = one_legged - has_trait = clubfooted - has_trait = hunchbacked - has_trait = dwarf - } -} - -has_any_charioteer_trait = { - OR = { - has_trait = charioteer_blue - has_trait = charioteer_green - has_trait = charioteer_white - has_trait = charioteer_red - } -} - -available_charioteers_spots_trigger = { - scope:activity = { - any_guest_subset = { - name = charioteers - has_trait = charioteer_$TEAM$ - count < scope:activity.var:num_$TEAM$s - } - } -} - -ep3_varangian_trigger = { - OR = { - culture = { - OR = { - has_cultural_tradition = tradition_fp1_coastal_warriors - has_cultural_tradition = tradition_hird - has_cultural_tradition = tradition_fp1_performative_honour - has_cultural_pillar = heritage_north_germanic - has_cultural_pillar = heritage_west_germanic - } - } - has_trait = varangian - } - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } - is_physically_able_adult = yes -} - -is_competing_for_same_title_as = { - government_allows = administrative - any_heir_title = { - exists = this - is_noble_family_title = no - save_temporary_scope_as = temp_title - } - $CHARACTER$ = { - government_allows = administrative - } - scope:temp_title = { - any_title_heir = { - this = $CHARACTER$ - } - } -} - -is_winning_competing_for_same_title_as = { - $CHARACTER$ = { save_temporary_scope_as = target_char } - is_competing_for_same_title_as = { CHARACTER = $CHARACTER$ } - save_temporary_scope_as = root_scope - any_heir_title = { - exists = this - is_noble_family_title = no - save_temporary_scope_as = temp_title - } - scope:temp_title = { - "place_in_line_of_succession(scope:root_scope)" > "place_in_line_of_succession(scope:target_char)" - } -} - -restore_greece_decision_county_trigger = { - trigger_if = { - limit = { - holder.top_liege = root - has_county_modifier = backwater_county_modifier - } - development_level >= 50 - } -} - -any_valid_title_to_grant_trigger = { - # IMPORTANT! - # The is_valid_showing_failures_only of support_candidacy_interaction doesn't use this - # It uses a cloned version that has been optimized for AI usage - # Please update that one too if you're updating this one - $CANDIDATE$ ?= { - is_clergy = no - save_temporary_scope_as = candidate_temp - custom_tooltip = { - text = support_candidacy_can_appoint_for_title_tt - $TOP_LIEGE$.primary_title = { - any_in_de_jure_hierarchy = { - continue = { - tier > tier_duchy - } - save_temporary_scope_as = title_temp - scope:candidate_temp = { can_appoint_for_title = scope:title_temp } - } - } - } - } -} - -any_valid_candidacy_trigger = { - $CANDIDATE$ = { - custom_tooltip = { - text = any_valid_candidacy_tt - trigger_if = { - limit = { - $TOP_LIEGE$ = { - OR = { - has_realm_law_flag = appointment_type_succession - primary_title = { - has_title_law_flag = appointment_type_succession - } - } - } - appointment_candidate_score = { - target = $TOP_LIEGE$.primary_title - value > 0 - } - } - always = yes - } - trigger_else = { - $TOP_LIEGE$.primary_title ?= { - any_in_de_jure_hierarchy = { - exists = holder - tier >= tier_duchy - OR = { - has_title_law_flag = appointment_type_succession - holder = { - has_realm_law_flag = appointment_type_succession - } - } - save_temporary_scope_as = title_temp - trigger_if = { - limit = { exists = scope:title_temp } - $CANDIDATE$ = { - appointment_candidate_score = { - target = scope:title_temp - value > 0 - } - } - } - } - } - } - } - } -} - -is_candidate_for_title_trigger = { - $CANDIDATE$ = { - custom_tooltip = { - text = is_candidate_for_title_tt - $TITLE$ = { - OR = { - has_title_law = acclamation_succession_law - has_title_law = appointment_succession_law - holder ?= { - OR = { - has_realm_law = acclamation_succession_law - has_realm_law = appointment_succession_law - } - } - } - holder = { - NOT = { this = $CANDIDATE$ } - } - } - appointment_candidate_score = { - target = $TITLE$ - value > 0 - } - } - } -} - -valid_governor_contract_trigger = { - government_allows = administrative - is_available_quick = { - adult = yes - alive = yes - incapable = no - } -} - -valid_governor_contract_basic_trigger = { - task_contract_taker = { - #you have to be a governor - trigger_if = { - limit = { - government_has_flag = government_is_celestial - } - is_governor_or_admin_count = yes - } - trigger_else = { - is_governor = yes - } - #and the location has to be in your realm - custom_tooltip = { - text = task_contract_location_not_in_realm - any_sub_realm_county = { - any_county_province = { - this = root.task_contract_location - } - } - } - } -} - -governor_contract_invalidated_message_trigger = { - task_contract_employer ?= { - NOT = { root.task_contract_taker ?= this } - OR = { - is_incapable = yes - is_imprisoned = yes - is_alive = no - } - } -} - -################################################## -### CHARIOT RACE TRIGGERS -################################################## - -chariot_race_0201_sitting_in_kathisma_trigger = { - OR = { - AND = { - exists = scope:activity.special_guest:chariot_race_honorary_guest - this = scope:activity.special_guest:chariot_race_honorary_guest - } - is_close_family_of = scope:host - is_consort_of = scope:host - } -} - -chariot_race_0201_negative_crowd_reaction_trigger = { - OR = { - scope:activity.var:emperor_speech_topic = flag:increase_legitimacy_fail - scope:activity.var:emperor_speech_topic = flag:discredit_claimant_fail - AND = { - scope:host.capital_county = { - county_opinion <= -30 - } - NOT = { scope:activity.var:emperor_speech_topic = flag:appease_populace } - } - AND = { - scope:host = { - legitimacy_level < 2 - } - NOR = { - scope:activity.var:emperor_speech_topic = flag:increase_legitimacy_success - scope:activity.var:emperor_speech_topic = flag:appease_populace - } - } - } -} - -cares_about_charioteer_trigger = { - OR = { - $CHARIOTEER$ = { - trigger_if = { - limit = { has_court_position = charioteer_court_position } - is_court_position_employer = { - court_position = charioteer_court_position - who = prev - } - } - trigger_else = { always = no } - } - is_close_family_of = $CHARIOTEER$ - trigger_if = { - limit = { has_variable = wager_target } - OR = { - var:wager_target = $CHARIOTEER$ - trigger_if = { - limit = { var:wager_target = root } - trigger_if = { - limit = { $CHARIOTEER$ = { has_trait = charioteer_blue } } - var:wager_team = flag:blues - } - trigger_if = { - limit = { $CHARIOTEER$ = { has_trait = charioteer_green } } - var:wager_team = flag:greens - } - trigger_if = { - limit = { $CHARIOTEER$ = { has_trait = charioteer_white } } - var:wager_team = flag:whites - } - trigger_if = { - limit = { $CHARIOTEER$ = { has_trait = charioteer_red } } - var:wager_team = flag:reds - } - } - trigger_else = { always = no } - } - } - trigger_else = { always = no } - } -} - -supports_chariot_team_trigger = { - trigger_if = { - limit = { $TEAM$ = flag:blues } - OR = { - AND = { - has_variable = wager_team - var:wager_team = flag:blues - } - AND = { - employs_court_position = charioteer_court_position - court_position:charioteer_court_position = { has_trait = charioteer_blue } - } - } - } - trigger_else_if = { - limit = { $TEAM$ = flag:greens } - OR = { - AND = { - has_variable = wager_team - var:wager_team = flag:greens - } - AND = { - employs_court_position = charioteer_court_position - court_position:charioteer_court_position = { has_trait = charioteer_green } - } - } - } - trigger_else_if = { - limit = { $TEAM$ = flag:whites } - OR = { - AND = { - has_variable = wager_team - var:wager_team = flag:whites - } - AND = { - employs_court_position = charioteer_court_position - court_position:charioteer_court_position = { has_trait = charioteer_white } - } - } - } - trigger_else_if = { - limit = { $TEAM$ = flag:reds } - OR = { - AND = { - has_variable = wager_team - var:wager_team = flag:reds - } - AND = { - employs_court_position = charioteer_court_position - court_position:charioteer_court_position = { has_trait = charioteer_red } - } - } - } - trigger_else = { - always = no - } -} - -has_same_chariot_team_as = { - trigger_if = { - limit = { has_trait = charioteer_blue } - $TARGET$ = { has_trait = charioteer_blue } - } - trigger_else_if = { - limit = { has_trait = charioteer_green } - $TARGET$ = { has_trait = charioteer_green } - } - trigger_else_if = { - limit = { has_trait = charioteer_white } - $TARGET$ = { has_trait = charioteer_white } - } - trigger_else_if = { - limit = { has_trait = charioteer_red } - $TARGET$ = { has_trait = charioteer_red } - } - trigger_else = { always = no } -} - -chariot_racer_valid_trigger = { - save_temporary_scope_as = chariot_racer - is_alive = yes - exists = var:current_place_in_race - is_in_guest_subset = { name = charioteers } -} - -chariot_race_anyone_ahead_of_racer_trigger = { - scope:activity ?= { - any_guest_subset = { - name = charioteers - chariot_racer_valid_trigger = yes - NOT = { this = $RACER$ } - var:current_place_in_race < $RACER$.var:current_place_in_race - } - } -} - -chariot_race_anyone_behind_racer_trigger = { - scope:activity ?= { - any_guest_subset = { - name = charioteers - chariot_racer_valid_trigger = yes - NOT = { this = $RACER$ } - var:current_place_in_race > $RACER$.var:current_place_in_race - } - } -} - -flag_matches_charioteer_team_trigger = { - trigger_if = { - limit = { $VAR$ = flag:blues } - has_trait = charioteer_blue - } - trigger_else_if = { - limit = { $VAR$ = flag:greens } - has_trait = charioteer_green - } - trigger_else_if = { - limit = { $VAR$ = flag:whites } - has_trait = charioteer_white - } - trigger_else_if = { - limit = { $VAR$ = flag:reds } - has_trait = charioteer_red - } - trigger_else = { always = no } -} - -stands_to_win_chariot_wager_trigger = { - save_temporary_scope_as = gambler - exists = scope:activity - exists = var:wager_type - # Specific Charioteer - trigger_if = { - limit = { - exists = var:wager_target - NOT = { this = var:wager_target } - } - var:wager_target ?= { - chariot_racer_valid_trigger = yes - save_temporary_scope_as = wager_target_temp - } - OR = { - # All bets gain by first place - scope:wager_target_temp.var:current_place_in_race = 1 - # Place & Show gain by second place - trigger_if = { - limit = { - OR = { - var:wager_type = flag:place - var:wager_type = flag:show - } - } - scope:wager_target_temp.var:current_place_in_race <= 2 - } - trigger_else = { always = no } - # Show gains by third place - trigger_if = { - limit = { var:wager_type = flag:show } - scope:wager_target_temp.var:current_place_in_race <= 3 - } - trigger_else = { always = no } - # Fallback no one is ahead of wager - NOT = { - chariot_race_anyone_ahead_of_racer_trigger = { RACER = scope:wager_target_temp } - } - } - } - # Team - trigger_else = { - scope:activity ?= { - any_guest_subset = { - name = charioteers - chariot_racer_valid_trigger = yes - flag_matches_charioteer_team_trigger = { VAR = scope:gambler.var:wager_team } - } - OR = { - # All bets gain by first place - any_guest_subset = { - name = charioteers - flag_matches_charioteer_team_trigger = { VAR = scope:gambler.var:wager_team } - var:current_place_in_race = 1 - } - # Place & Show gain by second place - trigger_if = { - limit = { - OR = { - scope:gambler.var:wager_type = flag:place - scope:gambler.var:wager_type = flag:show - } - } - any_guest_subset = { - name = charioteers - flag_matches_charioteer_team_trigger = { VAR = scope:gambler.var:wager_team } - var:current_place_in_race <= 2 - } - } - trigger_else = { always = no } - # Show gains by third place - trigger_if = { - limit = { scope:gambler.var:wager_type = flag:show } - any_guest_subset = { - name = charioteers - flag_matches_charioteer_team_trigger = { VAR = scope:gambler.var:wager_team } - var:current_place_in_race <= 3 - } - } - trigger_else = { always = no } - # Fallback no one is ahead of wager - AND = { - any_guest_subset = { - name = charioteers - flag_matches_charioteer_team_trigger = { VAR = scope:gambler.var:wager_team } - save_temporary_scope_as = racer - } - NOT = { - chariot_race_anyone_ahead_of_racer_trigger = { RACER = scope:racer } - } - } - } - } - } -} - -novice_charioteer_trigger = { - OR = { - has_trait_xp = { - trait = charioteer_blue - value < 40 - } - has_trait_xp = { - trait = charioteer_green - value < 40 - } - has_trait_xp = { - trait = charioteer_white - value < 40 - } - has_trait_xp = { - trait = charioteer_red - value < 40 - } - NOR = { - has_trait = charioteer_blue - has_trait = charioteer_green - has_trait = charioteer_white - has_trait = charioteer_red - } - } -} - -middling_charioteer_trigger = { - OR = { - has_trait_xp = { - trait = charioteer_blue - value >= 40 - } - has_trait_xp = { - trait = charioteer_green - value >= 40 - } - has_trait_xp = { - trait = charioteer_white - value >= 40 - } - has_trait_xp = { - trait = charioteer_red - value >= 40 - } - } -} - -experienced_charioteer_trigger = { - OR = { - has_trait_xp = { - trait = charioteer_blue - value >= 90 - } - has_trait_xp = { - trait = charioteer_green - value >= 90 - } - has_trait_xp = { - trait = charioteer_white - value >= 90 - } - has_trait_xp = { - trait = charioteer_red - value >= 90 - } - } -} - -ep3_ideal_castration_candidate_trigger = { - is_available_quick = { - ai = yes - female = no - adult = yes - } - is_close_family_of = scope:actor - is_eunuch_trigger = no - is_available = yes - is_betrothed = no - age < 10 -} - -ep3_castration_male_family_trigger = { - any_close_family_member = { - count >= 2 - is_male = yes - house ?= scope:actor.house - is_eunuch_trigger = no - NOR = { - has_trait = celibate - has_trait = devoted - has_trait = order_member - has_trait = bastard - } - OR = { - #Is an old adult with a kid - AND = { - age >= 40 - any_child = { - is_male = yes - } - } - #Is a young adult or child - age < 40 - } - } -} - -ep3_castration_interest_trigger = { - OR = { - is_landless_ruler = yes - highest_held_title_tier <= tier_county - AND = { - is_landed = yes - highest_held_title_tier <= tier_duchy - influence_level <= 1 - } - highest_held_title_tier >= tier_empire - } -} - -ep3_ai_castration_target_trigger = { - age < 12 - is_male = yes - OR = { - AND = { - exists = liege - liege.culture = { has_cultural_parameter = family_castration } - } - AND = { - NOT = { exists = liege } - culture = { has_cultural_parameter = family_castration } - } - } - is_available = yes - is_landed = no - is_betrothed = no - NOR = { - #Should not be close family of a player - any_close_family_member = { - is_ai = no - } - #Should not be close family of a character who can use the interaction - any_close_family_member = { - highest_held_title_tier >= tier_county - } - #Should not be the child of a playable title heir - any_parent = { - any_heir_title = { - tier >= tier_county - } - } - #Should not be the grandchild of a playable title heir, if their parent is the eldest son - any_parent = { - any_parent = { - highest_held_title_tier >= tier_county - } - any_sibling = { - count <= 0 - is_male = yes - age > prev.age - house ?= prev.house - } - } - } - #Not already a eunuch - is_eunuch_trigger = no - NOR = { - #Doesn't have a positive trait being a eunuch would ruin - has_trait = physique_good_1 - has_trait = physique_good_2 - has_trait = physique_good_3 - has_trait = fecund - has_trait = strong - has_trait = sayyid - has_trait = giant - } - OR = { - is_lowborn = yes - has_trait = bastard - #Sons of barons are valid if they have an elder male sibling - any_sibling = { - count >= 2 - is_male = yes - age > prev.age - house ?= prev.house - } - } -} - -valid_for_pagan_conversion_trigger = { - faith.religion = { is_in_family = rf_pagan } - faith = { has_doctrine_parameter = unreformed } - is_at_war = no - NOR = { - has_character_flag = do_not_disturb_preachers - primary_title = { has_variable = do_not_disturb_preachers } - } -} - -ep3_story_cycle_admin_eunuch_valid_story_trigger = { - any_owned_story = { - type = story_cycle_admin_eunuch - save_temporary_scope_as = story_temp - var:eunuch ?= { - is_alive = yes - save_temporary_scope_as = eunuch_temp - } - story_owner = { save_temporary_scope_as = emperor_temp } - trigger_if = { - limit = { exists = var:protege } - var:protege = { save_temporary_scope_as = protege_temp } - } - trigger_if = { - limit = { exists = var:student } - var:student = { save_temporary_scope_as = student_temp } - } - trigger_if = { - limit = { exists = var:rival } - var:rival = { save_temporary_scope_as = rival_temp } - } - trigger_if = { - limit = { exists = var:seducer } - var:seducer = { save_temporary_scope_as = seducer_temp } - } - trigger_if = { - limit = { exists = var:spouse } - var:spouse = { save_temporary_scope_as = spouse_temp } - } - trigger_if = { - limit = { exists = var:puppet } - var:puppet = { save_temporary_scope_as = puppet_temp } - } - } -} - -ep3_story_cycle_admin_eunuch_involved_character = { - employer.top_liege = { - ep3_story_cycle_admin_eunuch_valid_story_trigger = yes - OR = { - scope:eunuch_temp ?= this - scope:protege_temp ?= this - scope:student_temp ?= this - scope:seducer_temp ?= this - scope:spouse_temp ?= this - scope:puppet_temp ?= this - } - } -} - -is_appointment_valid_trigger = { - $TITLE$ = { save_temporary_scope_as = title_temp } - $CANDIDATE$ = { save_temporary_scope_as = candidate_temp } - $TOP_LIEGE$ = { save_temporary_scope_as = top_liege_temp } - custom_tooltip = { # Capital should be never a valid appointment (go for higher title instead - text = not_top_liege_capital_county_tt - NOT = { scope:title_temp ?= scope:candidate_temp.top_liege.capital_county } - } - scope:candidate_temp = { - trigger_if = { - limit = { exists = scope:title_temp } - custom_tooltip = { # Has relevant law - text = has_appointment_succession_tt - $TITLE$ = { - OR = { - has_title_law_flag = appointment_type_succession - holder ?= { has_realm_law_flag = appointment_type_succession } - } - } - } - trigger_if = { - limit = { - NOT = { top_liege.highest_held_title_tier = scope:title_temp.tier } - } - is_adult = yes - } - trigger_if = { - limit = { - any_held_title = { count >= 1 } - } - trigger_if = { - limit = { government_has_flag = government_is_celestial } - custom_tooltip = { # Only one province of highest rank - text = cannot_compete_for_lower_rank_titles_tt - NOT = { - any_held_title = { - tier > scope:title_temp.tier - is_landless_type_title = no - is_noble_family_title = no - } - } - } - } - trigger_else = { - custom_tooltip = { # Only one province of highest rank - text = only_one_province_of_highest_rank_tt - NOT = { - any_held_title = { - tier = scope:title_temp.tier - is_landless_type_title = no - is_noble_family_title = no - } - } - } - } - custom_tooltip = { - text = promote_candidate_interaction_existing_holder_tt - this != scope:title_temp.holder - } - } - } - custom_tooltip = { - text = can_be_appointed_interaction_tt - OR = { - can_be_granted_titles_by = { RULER = scope:top_liege_temp } - can_be_granted_theocratic_titles_by = { RULER = scope:top_liege_temp } - AND = { - is_diarch_of_target = scope:top_liege_temp - scope:top_liege_temp = { has_diarchy_active_parameter = diarchy_is_co_rulership } - } - } - } - custom_tooltip = { # Only administrative - text = only_administrative_tt - trigger_if = { - limit = { is_landed = yes } - government_allows = administrative - } - } - is_clergy = no - } -} - -ep3_adventurer_ai_logic_valid_trigger = { - is_alive = yes - is_ai = yes - government_has_flag = government_is_landless_adventurer - domicile ?= { is_domicile_type = camp } -} - -ep3_laamp_diplo_range_trigger = { - custom_description = { - text = ep3_laamp_diplo_range_trigger_tt - subject = scope:actor - object = scope:recipient - trigger_if = { - limit = { exists = $LAAMP$.domicile.domicile_location } - trigger_if = { - limit = { - NOT = { exists = $TARGET$.capital_province } - exists = $TARGET$.host.capital_province - } - $TARGET$.host.capital_province ?= { - squared_distance = { - target = $LAAMP$.domicile.domicile_location - value < define:NTaskContract|ADVENTURER_DISTANCE_RESTRICTION - } - } - } - trigger_else_if = { - limit = { - NOT = { exists = $TARGET$.capital_province } - exists = $TARGET$.location - } - $TARGET$.location ?= { - squared_distance = { - target = $LAAMP$.domicile.domicile_location - value < define:NTaskContract|ADVENTURER_DISTANCE_RESTRICTION - } - } - } - trigger_else = { - $TARGET$.capital_province ?= { - squared_distance = { - target = $LAAMP$.domicile.domicile_location - value < define:NTaskContract|ADVENTURER_DISTANCE_RESTRICTION - } - } - } - } - trigger_else = { always = no } - } -} - -can_recruit_archer_cavalry_trigger = { - custom_tooltip = { - text = can_recruit_archer_cavalry_trigger_desc - OR = { - can_create_maa = horse_archers - can_create_maa = mangudai - can_create_maa = asawira - can_create_maa = accolade_maa_horse_archers - can_create_maa = emishi_horse_archers - can_create_maa = japanese_horse_archers - can_create_maa = kheshig - can_create_maa = heavy_horse_archers - can_create_maa = heavy_horse_archers - } - } -} - -ep3_transport_contract_trigger = { - OR = { - has_task_contract_type = laamp_transport_vip - has_task_contract_type = laamp_transport_artifact - has_task_contract_type = laamp_transport_gold - has_task_contract_type = laamp_transport_ward - has_task_contract_type = laamp_transport_explorer - has_task_contract_type = laamp_transport_animal - has_task_contract_type = laamp_construction_contract - } -} - -ep3_vassal_will_become_admin = { - #This trigger picks out vassals that automatically convert to Admin. - #We convert vassals that are: - #Clan or Feudal - #De Jure part of the Empire - #Have the State Faith - #Aren't rivals of the admin liege - #Dukes and above must like the main liege at least a little. - highest_held_title_tier > tier_barony - primary_title = { - target_is_de_jure_liege_or_above = scope:administrative_liege.primary_title #We only auto convert de jure vassals - } - OR = { #We convert only clan and feudal vassals in this decision - government_has_flag = government_is_feudal - government_has_flag = government_is_clan - government_has_flag = government_is_japan_feudal - } - faith = scope:administrative_liege.faith #The future state faith -} - -ep3_kings_will_convert_trigger = { - primary_title.tier >= tier_kingdom - NOR = { - opinion = { - target = liege - value < -50 - } - has_relation_rival = liege - } -} - -ep3_is_clan_inclined_trigger = { - OR = { - faith.religion = religion:islam_religion - culture ?= { - OR = { - has_cultural_pillar = heritage_arabic - has_cultural_pillar = heritage_iranian - has_cultural_pillar = heritage_turkic - } - } - } -} - -cid_story_cycle_start_trigger = { - is_alive = yes - is_playable_character = yes - has_ep3_dlc_trigger = yes - NOR = { - has_variable = ongoing_cid_story_cycle - has_variable = had_cid_story_cycle - } - has_government = landless_adventurer_government - top_liege ?= { - any_courtier = { is_available_healthy_ai_adult = yes } - } -} - -ep3_can_have_legitimists_camp_purpose_trigger = { - custom_tooltip = { - text = ep3_can_have_legitimists_camp_purpose_trigger.tt.explanation - any_claim = { - explicit = yes - tier >= tier_kingdom - } - } -} - -has_any_gallowsbait_xp_trigger = { - OR = { - has_trait_xp = { - trait = gallowsbait - track = bandit - value >= 1 - } - has_trait_xp = { - trait = gallowsbait - track = trickster - value >= 1 - } - has_trait_xp = { - trait = gallowsbait - track = marauder - value >= 1 - } - has_trait_xp = { - trait = gallowsbait - track = poacher - value >= 1 - } - has_trait_xp = { - trait = gallowsbait - track = thief - value >= 1 - } - } -} - -ep3_restored_rome_hard_mode_trigger = { - OR = { - this = title:h_roman_empire.holder - this = title:h_eastern_roman_empire.holder - } - any_owned_story = { - type = ep3_story_cycle_restoring_rome - has_variable = roman_empire_hard_mode - } -} - -faith_is_interesting_heresy_to_state_faith_trigger = { - religion = root.top_liege.primary_title.state_faith.religion - this != root.top_liege.primary_title.state_faith - num_county_followers >= 3 - save_temporary_scope_as = temp_heresy - root.top_liege.primary_title.state_faith = { - faith_hostility_level = { - target = scope:temp_heresy - value >= faith_hostile_level - } - } -} - -ep3_boundary_dispute_county_trigger = { - tier = tier_county - custom_tooltip = { - text = dispute_border_county_neighbour_tt - county_held_or_vassal_to_target_trigger = { TARGET = $TARGET$ } - OR = { - any_neighboring_county = { - county_held_or_vassal_to_target_trigger = { TARGET = $OWNER$ } - } - AND = { - de_jure_liege.holder ?= $OWNER$ - any_title_to_title_neighboring_and_across_water_county = { - county_held_or_vassal_to_target_trigger = { TARGET = $OWNER$ } - } - } - } - } -} - -ep3_subsume_province_duchy_trigger = { - tier = tier_duchy - holder ?= $TARGET$ - is_noble_family_title = no - is_landless_type_title = no - trigger_if = { - limit = { tier = tier_duchy } - custom_tooltip = { - text = subsume_province_must_neighbor_tt - any_de_jure_county = { - county_held_or_vassal_to_target_trigger = { TARGET = $TARGET$ } - any_neighboring_county = { - county_held_or_vassal_to_target_trigger = { TARGET = $OWNER$ } - } - } - } - custom_tooltip = { - text = subsume_province_more_than_half_tt - any_de_jure_county = { - percent < 0.5 - county_held_or_vassal_to_target_trigger = { TARGET = $OWNER$ } - } - } - } -} - -ep3_interesting_courtier_to_ask_trigger = { - is_councillor = no - has_any_court_position = no - OR = { - diplomacy >= high_skill_rating - martial >= high_skill_rating - stewardship >= high_skill_rating - intrigue >= high_skill_rating - learning >= high_skill_rating - prowess >= high_skill_rating - has_trait = education_diplomacy_4 - has_trait = education_diplomacy_5 - has_trait = education_martial_4 - has_trait = education_martial_5 - has_trait = education_stewardship_4 - has_trait = education_stewardship_5 - has_trait = education_intrigue_4 - has_trait = education_intrigue_5 - has_trait = education_learning_4 - has_trait = education_learning_5 - has_trait_xp = { trait = lifestyle_physician value >= 20 } - has_trait_xp = { trait = lifestyle_traveler track = travel value >= 20 } - has_trait_xp = { trait = lifestyle_traveler track = danger value >= 20 } - has_trait_xp = { trait = lifestyle_hunter track = hunter value >= 20 } - has_trait_xp = { trait = lifestyle_hunter track = falconer value >= 20 } - has_trait_xp = { trait = charioteer_blue value >= 20 } - has_trait_xp = { trait = charioteer_green value >= 20 } - has_trait_xp = { trait = charioteer_red value >= 20 } - has_trait_xp = { trait = charioteer_white value >= 20 } - has_trait_xp = { trait = governor value >= 20 } - } -} - -ep3_admin_faction_trigger = { - trigger_if = { # Enabled for all admin realms with EP3 - limit = { has_ep3_dlc_trigger = yes } - $FACTION_TARGET$ = { government_allows = administrative } - } - trigger_else = { # Enabled for Byzantium without EP3 - $FACTION_TARGET$ = { has_title = title:e_byzantium } - } -} - -ep3_switch_faction_war_sides_war_trigger = { - # Recipient involved in war - is_participant = scope:recipient - # Is a Faction war - save_temporary_scope_as = faction_war_temp - primary_attacker.joined_faction.faction_war ?= scope:faction_war_temp - # Actor and recipient on opposing sides - trigger_if = { - limit = { is_defender = scope:recipient } - is_attacker = scope:actor - # Recipient must not be an ally of the opposing war leader - NOT = { - primary_defender = { is_allied_to = scope:recipient } - } - } - trigger_else = { - is_defender = scope:actor - # Recipient must not be an ally of the opposing war leader - NOT = { - primary_attacker = { is_allied_to = scope:recipient } - } - } - # Recipient must not be a war leader - NOT = { is_war_leader = scope:recipient } - # Recipient must not be the claimant - primary_attacker.joined_faction.special_character != scope:recipient -} - -ep3_raid_insight_trigger = { - scope:owner = { - NOT = { has_character_modifier = raid_insight_$TYPE$ } - } - scope:target_domicile = { has_domicile_building_or_higher = $TYPE$_01 } -} - -ep3_adventurer_ai_valid_war_target_trigger = { - is_landed = yes - reverse_opinion = { - target = $ADVENTURER$ - value <= 0 - } - in_diplomatic_range = $ADVENTURER$ - NOR = { - is_at_war_with = $ADVENTURER$ - is_allied_to = $ADVENTURER$ - } - current_strength_with_allies_value < $ADVENTURER$.current_strength_with_allies_seventy_five_percent_value - save_temporary_scope_as = war_target_temp - trigger_if = { - limit = { government_has_flag = government_is_tribal } - OR = { - $ADVENTURER$.culture.culture_head ?= { government_has_flag = government_is_tribal } - capital_county.culture = { - any_parent_culture_or_above = { this = $ADVENTURER$.culture } - } - $ADVENTURER$.culture = { - any_parent_culture_or_above = { this = scope:war_target_temp.capital_county.culture } - } - } - } - $ADVENTURER$ = { - trigger_if = { - limit = { has_realm_law = camp_purpose_legitimists } - any_claim = { - tier >= tier_kingdom - holder = scope:war_target_temp - save_temporary_scope_as = claim_temp - } - can_declare_war = { - defender = scope:war_target_temp - casus_belli = claim_cb - claimant = $ADVENTURER$ - target_titles = { scope:claim_temp } - } - } - trigger_else = { - OR = { - AND = { - scope:war_target_temp = { - any_held_title = { - count >= 1 - title_tier = empire - save_temporary_scope_as = war_target_title_temp - } - } - can_declare_war = { - defender = scope:war_target_temp - casus_belli = ep3_laamp_adventurer_empire_invasion - target_titles = { scope:war_target_title_temp } - } - } - AND = { - scope:war_target_temp = { - any_held_title = { - count >= 1 - title_tier = kingdom - save_temporary_scope_as = war_target_title_temp - } - } - can_declare_war = { - defender = scope:war_target_temp - casus_belli = ep3_laamp_adventurer_kingdom_invasion - target_titles = { scope:war_target_title_temp } - } - } - AND = { - scope:war_target_temp = { - any_held_title = { - count >= 1 - title_tier = duchy - save_temporary_scope_as = war_target_title_temp - } - } - can_declare_war = { - defender = scope:war_target_temp - casus_belli = ep3_laamp_adventurer_duchy_invasion - target_titles = { scope:war_target_title_temp } - } - } - AND = { - scope:war_target_temp = { - any_held_title = { - count >= 1 - title_tier = county - save_temporary_scope_as = war_target_title_temp - } - } - can_declare_war = { - defender = scope:war_target_temp - casus_belli = ep3_laamp_adventurer_county_invasion - target_titles = { scope:war_target_title_temp } - } - } - } - } - } -} - -ep3_adventurer_ai_valid_legitimist_target_trigger = { - is_landed = yes - NOR = { - has_relation_friend = $ADVENTURER$ - is_at_war_with = $ADVENTURER$ - is_allied_to = $ADVENTURER$ - } - save_temporary_scope_as = target_temp - current_strength_with_allies_value < $ADVENTURER$.current_strength_with_allies_seventy_five_percent_value - any_held_title = { - title_tier >= kingdom - any_claimant = { this = $ADVENTURER$ } - save_temporary_scope_as = claim_temp - } - $ADVENTURER$ = { - can_declare_war = { - defender = scope:target_temp - casus_belli = claim_cb - claimant = $ADVENTURER$ - target_titles = { scope:claim_temp } - } - } -} - -ep3_adventurer_might_attack_target_trigger = { - has_government = landless_adventurer_government - # Army at least half the size - current_strength_with_allies_value > $TARGET$.current_strength_with_allies_fifty_percent_value - # Not allies - NOT = { is_allied_to = $TARGET$ } - OR = { - # Has a claim on a title in subrealm - any_claim = { - holder ?= { - OR = { - this = $TARGET$ - target_is_liege_or_above = $TARGET$ - } - } - } - # Opinion - opinion = { - target = $TARGET$ - value < -25 - } - } -} - -ep3_adventurer_mercenary_war_trigger = { - is_war_leader = $EMPLOYER$ - OR = { - using_civil_war_cb_trigger = yes - using_non_ghw_holy_war_cb_trigger = yes - using_de_jure_cb_trigger = yes - using_conquest_cb_trigger = yes - } - NOT = { is_participant = $LAAMP$ } -} - -ep3_adventurer_ai_valid_contract_trigger = { - $LAAMP$ = { - OR = { - # DIPLOMACY - can_create_task_contract = { type_name = laamp_base_0001 employer = $EMPLOYER$ } - can_create_task_contract = { type_name = laamp_base_0011 employer = $EMPLOYER$ } - can_create_task_contract = { type_name = laamp_base_0021 employer = $EMPLOYER$ } - can_create_task_contract = { type_name = laamp_base_0031 employer = $EMPLOYER$ } - can_create_task_contract = { type_name = laamp_base_0011 employer = $EMPLOYER$ } - # MARTIAL - can_create_task_contract = { type_name = laamp_base_1001 employer = $EMPLOYER$ } - can_create_task_contract = { type_name = laamp_base_1011 employer = $EMPLOYER$ } - can_create_task_contract = { type_name = laamp_base_1021 employer = $EMPLOYER$ } - can_create_task_contract = { type_name = laamp_base_1031 employer = $EMPLOYER$ } - can_create_task_contract = { type_name = laamp_base_1041 employer = $EMPLOYER$ } - # STEWARDSHIP - can_create_task_contract = { type_name = laamp_base_2001 employer = $EMPLOYER$ } - can_create_task_contract = { type_name = laamp_base_2011 employer = $EMPLOYER$ } - can_create_task_contract = { type_name = laamp_base_2021 employer = $EMPLOYER$ } - can_create_task_contract = { type_name = laamp_base_2031 employer = $EMPLOYER$ } - can_create_task_contract = { type_name = laamp_base_2041 employer = $EMPLOYER$ } - # INTRIGUE - can_create_task_contract = { type_name = laamp_base_3001 employer = $EMPLOYER$ } - can_create_task_contract = { type_name = laamp_base_3011 employer = $EMPLOYER$ } - can_create_task_contract = { type_name = laamp_base_3021 employer = $EMPLOYER$ } - can_create_task_contract = { type_name = laamp_base_3031 employer = $EMPLOYER$ } - can_create_task_contract = { type_name = laamp_base_3041 employer = $EMPLOYER$ } - # LEARNING - can_create_task_contract = { type_name = laamp_base_4001 employer = $EMPLOYER$ } - can_create_task_contract = { type_name = laamp_base_4011 employer = $EMPLOYER$ } - can_create_task_contract = { type_name = laamp_base_4021 employer = $EMPLOYER$ } - can_create_task_contract = { type_name = laamp_base_4031 employer = $EMPLOYER$ } - can_create_task_contract = { type_name = laamp_base_4041 employer = $EMPLOYER$ } - can_create_task_contract = { type_name = laamp_base_4100 employer = $EMPLOYER$ } - # PROWESS - can_create_task_contract = { type_name = laamp_base_5001 employer = $EMPLOYER$ } - can_create_task_contract = { type_name = laamp_base_5011 employer = $EMPLOYER$ } - can_create_task_contract = { type_name = laamp_base_5021 employer = $EMPLOYER$ } - can_create_task_contract = { type_name = laamp_base_5031 employer = $EMPLOYER$ } - can_create_task_contract = { type_name = laamp_base_5041 employer = $EMPLOYER$ } - # JUSTICAR - can_create_task_contract = { type_name = laamp_base_6001 employer = $EMPLOYER$ } - can_create_task_contract = { type_name = laamp_base_6011 employer = $EMPLOYER$ } - can_create_task_contract = { type_name = laamp_base_6021 employer = $EMPLOYER$ } - can_create_task_contract = { type_name = laamp_base_6031 employer = $EMPLOYER$ } - # EXTRA - can_create_task_contract = { type_name = laamp_boost_legitimacy_contract employer = $EMPLOYER$ } - can_create_task_contract = { type_name = laamp_rid_councillor_contract employer = $EMPLOYER$ } - can_create_task_contract = { type_name = laamp_gain_wanderer_contract employer = $EMPLOYER$ } - can_create_task_contract = { type_name = laamp_find_secret_contract employer = $EMPLOYER$ } - can_create_task_contract = { type_name = laamp_eliminate_heir_contract employer = $EMPLOYER$ } - can_create_task_contract = { type_name = laamp_steal_artifact_contract employer = $EMPLOYER$ } - can_create_task_contract = { type_name = laamp_construction_contract employer = $EMPLOYER$ } - can_create_task_contract = { type_name = laamp_cultural_minority_contract employer = $EMPLOYER$ } - can_create_task_contract = { type_name = laamp_religious_minority_contract employer = $EMPLOYER$ } - can_create_task_contract = { type_name = laamp_prison_break_contract employer = $EMPLOYER$ } - can_create_task_contract = { type_name = laamp_join_faction_contract employer = $EMPLOYER$ } - can_create_task_contract = { type_name = laamp_help_faith_conversion_contract employer = $EMPLOYER$ } - can_create_task_contract = { type_name = laamp_fight_faith_conversion_contract employer = $EMPLOYER$ } - can_create_task_contract = { type_name = laamp_help_find_secrets_contract employer = $EMPLOYER$ } - can_create_task_contract = { type_name = laamp_help_fabricate_claim_contract employer = $EMPLOYER$ } - can_create_task_contract = { type_name = laamp_help_increase_control_contract employer = $EMPLOYER$ } - can_create_task_contract = { type_name = laamp_help_find_secrets_contract employer = $EMPLOYER$ } - } - AND = { - has_realm_law = camp_purpose_mercenaries - OR = { - can_create_task_contract = { type_name = laamp_raid_contract employer = $EMPLOYER$ } - can_create_task_contract = { type_name = laamp_join_war_contract employer = $EMPLOYER$ } - can_create_task_contract = { type_name = laamp_help_claimant_contract employer = $EMPLOYER$ } - } - } - } -} - -hasan_evangelize_province_trigger = { - save_temporary_scope_as = county - scope:county.faith = { - # Religion is same as Hasan's (i.e. Muslim) - #religion = root.religion # QA thinks its more fun without this! - NOR = { - # Faith is different from Hasan's - custom_tooltip = { - text = zealous_missionary_start_decision_other_faith_location - this = root.faith - } - # County is not held by it's Faith's Religious Head - custom_tooltip = { - text = is_held_by_hof_tt - religious_head ?= scope:county.holder - } - } - } - development_level <= 25 - custom_tooltip = { - text = has_tougher_to_convert_tt - NOT = { has_county_modifier = tougher_to_convert } - } - custom_tooltip = { - text = 0_or_below_county_opinion_tt - county_opinion <= 0 - } - custom_tooltip = { - text = NOT_IS_HOLY_SITE_TRIGGER - NOT = { - any_direct_de_jure_vassal_title = { is_holy_site_of = scope:county.faith } - } - } -} - -hasan_camp_in_foes_realm_trigger = { - trigger_if = { - limit = { - any_owned_story = { - var:ultimate_foe ?= { - save_temporary_scope_as = ultimate_foe - } - } - } - custom_description = { - text = hasan_stroy_cycle_camp_at_foe_realm - object = scope:ultimate_foe - domicile.domicile_location.county.holder = { - OR = { - any_liege_or_above = { - this = scope:ultimate_foe - } - this = scope:ultimate_foe - } - } - } - } - trigger_else = { - character:3096 = { - save_temporary_scope_as = caliph - } - save_temporary_scope_as = hasan - any_owned_story = { - trigger_if = { - limit = { exists = var:radical_points } - save_temporary_scope_value_as = { - name = radical_points - value = var:radical_points - } - } - trigger_else = { - save_temporary_scope_value_as = { - name = radical_points - value = 0 - } - } - } - custom_tooltip = { - text = hasan_stroy_cycle_ultimate_foe - any_owned_story = { - story_type = story_hasan - exists = var:ultimate_foe - exists = var:radical_points - var:radical_points >= 15 - } - } - } -} - -estate_can_construct_market_03_trigger = { - domicile ?= { has_domicile_building_or_higher = estate_main_02 } -} -estate_can_construct_market_04_trigger = { - domicile ?= { has_domicile_building_or_higher = estate_main_03 } -} -estate_can_construct_market_05_trigger = { - domicile ?= { has_domicile_building_or_higher = estate_main_04 } -} -estate_can_construct_market_06_trigger = { - domicile ?= { has_domicile_building_or_higher = estate_main_05 } -} - -estate_can_construct_garden_leisure_04_trigger = { - domicile ?= { has_domicile_building_or_higher = estate_main_03 } -} -estate_can_construct_garden_leisure_05_trigger = { - domicile ?= { has_domicile_building_or_higher = estate_main_04 } -} -estate_can_construct_garden_leisure_06_trigger = { - domicile ?= { has_domicile_building_or_higher = estate_main_05 } -} -estate_can_construct_garden_fruit_04_trigger = { - domicile ?= { has_domicile_building_or_higher = estate_main_03 } -} -estate_can_construct_garden_fruit_05_trigger = { - domicile ?= { has_domicile_building_or_higher = estate_main_04 } -} -estate_can_construct_garden_fruit_06_trigger = { - domicile ?= { has_domicile_building_or_higher = estate_main_05 } -} - -estate_can_construct_guardhouse_03_trigger = { - domicile ?= { has_domicile_building_or_higher = estate_main_02 } -} -estate_can_construct_guardhouse_04_trigger = { - domicile ?= { has_domicile_building_or_higher = estate_main_03 } -} - -estate_can_construct_workshop_carpenter_03_trigger = { - domicile ?= { has_domicile_building_or_higher = estate_main_02 } -} -estate_can_construct_workshop_carpenter_04_trigger = { - domicile ?= { has_domicile_building_or_higher = estate_main_03 } -} -estate_can_construct_workshop_carpenter_05_trigger = { - domicile ?= { has_domicile_building_or_higher = estate_main_04 } -} -estate_can_construct_workshop_carpenter_06_trigger = { - domicile ?= { has_domicile_building_or_higher = estate_main_05 } -} -estate_can_construct_workshop_mason_03_trigger = { - domicile ?= { has_domicile_building_or_higher = estate_main_02 } -} -estate_can_construct_workshop_mason_04_trigger = { - domicile ?= { has_domicile_building_or_higher = estate_main_03 } -} -estate_can_construct_workshop_mason_05_trigger = { - domicile ?= { has_domicile_building_or_higher = estate_main_04 } -} -estate_can_construct_workshop_mason_06_trigger = { - domicile ?= { has_domicile_building_or_higher = estate_main_05 } -} -estate_can_construct_workshop_textile_03_trigger = { - domicile ?= { has_domicile_building_or_higher = estate_main_02 } -} -estate_can_construct_workshop_textile_04_trigger = { - domicile ?= { has_domicile_building_or_higher = estate_main_03 } -} -estate_can_construct_workshop_textile_05_trigger = { - domicile ?= { has_domicile_building_or_higher = estate_main_04 } -} -estate_can_construct_workshop_textile_06_trigger = { - domicile ?= { has_domicile_building_or_higher = estate_main_05 } -} - -estate_can_construct_barracks_03_trigger = { - domicile ?= { has_domicile_building_or_higher = estate_main_02 } -} -estate_can_construct_barracks_04_trigger = { - domicile ?= { has_domicile_building_or_higher = estate_main_03 } -} -estate_can_construct_barracks_05_trigger = { - domicile ?= { has_domicile_building_or_higher = estate_main_04 } -} -estate_can_construct_barracks_06_trigger = { - domicile ?= { has_domicile_building_or_higher = estate_main_05 } -} - -estate_can_construct_vineyard_03_trigger = { - domicile ?= { has_domicile_building_or_higher = estate_main_02 } -} -estate_can_construct_vineyard_04_trigger = { - domicile ?= { has_domicile_building_or_higher = estate_main_03 } -} -estate_can_construct_vineyard_05_trigger = { - domicile ?= { has_domicile_building_or_higher = estate_main_04 } -} -estate_can_construct_vineyard_06_trigger = { - domicile ?= { has_domicile_building_or_higher = estate_main_05 } -} - -estate_can_construct_olive_03_trigger = { - domicile ?= { has_domicile_building_or_higher = estate_main_02 } -} -estate_can_construct_olive_04_trigger = { - domicile ?= { has_domicile_building_or_higher = estate_main_03 } -} -estate_can_construct_olive_05_trigger = { - domicile ?= { has_domicile_building_or_higher = estate_main_04 } -} -estate_can_construct_olive_06_trigger = { - domicile ?= { has_domicile_building_or_higher = estate_main_05 } -} - -estate_can_construct_health_03_trigger = { - domicile ?= { has_domicile_building_or_higher = estate_main_02 } -} -estate_can_construct_health_04_trigger = { - domicile ?= { has_domicile_building_or_higher = estate_main_03 } -} -estate_can_construct_health_05_trigger = { - domicile ?= { has_domicile_building_or_higher = estate_main_04 } -} -estate_can_construct_health_06_trigger = { - domicile ?= { has_domicile_building_or_higher = estate_main_05 } -} - -estate_can_construct_japanese_tea_plantation_03_trigger = { - domicile ?= { has_domicile_building_or_higher = japanese_manor_main_02 } -} -estate_can_construct_japanese_tea_plantation_04_trigger = { - domicile ?= { has_domicile_building_or_higher = japanese_manor_main_03 } -} -estate_can_construct_japanese_tea_plantation_05_trigger = { - domicile ?= { has_domicile_building_or_higher = japanese_manor_main_04 } -} -estate_can_construct_japanese_tea_plantation_06_trigger = { - domicile ?= { has_domicile_building_or_higher = japanese_manor_main_05 } -} - -# Check succession law types for Influence Candidacy validity -# TYPE should always be 'realm' or 'title' -influence_candidacy_valid_succession_law_trigger = { - OR = { - # Byzantium - has_$TYPE$_law = acclamation_succession_law - has_$TYPE$_law = appointment_succession_law - # Celestial Governors - has_$TYPE$_law = celestial_appointment_succession_law - has_$TYPE$_law = celestial_military_appointment_succession_law - # Meritocratic Governors - has_$TYPE$_law = meritocratic_appointment_succession_law - has_$TYPE$_law = meritocratic_military_appointment_succession_law - # Japanese Governors - has_$TYPE$_law = japanese_appointment_succession_law - has_$TYPE$_law = japanese_military_appointment_succession_law - # Ceremonial Regents - has_$TYPE$_law = meritocratic_regency_succession_law - has_$TYPE$_law = japanese_regency_succession_law - } -} diff --git a/N3OW/common/scripted_triggers/08_bp3_triggers.txt b/N3OW/common/scripted_triggers/08_bp3_triggers.txt deleted file mode 100644 index 622d9197..00000000 --- a/N3OW/common/scripted_triggers/08_bp3_triggers.txt +++ /dev/null @@ -1,3 +0,0 @@ -battle_poi_region_trigger = { - NOT = { has_global_variable = battle_poi_$REGION$_cooldown } -} diff --git a/N3OW/common/scripted_triggers/10_tgp_dynastic_cycle_triggers.txt b/N3OW/common/scripted_triggers/10_tgp_dynastic_cycle_triggers.txt deleted file mode 100644 index 1efdddde..00000000 --- a/N3OW/common/scripted_triggers/10_tgp_dynastic_cycle_triggers.txt +++ /dev/null @@ -1,451 +0,0 @@ - -################################################## -# Debug Triggers - -# Do we want to gather global variable tallies for the Chinese struggle? -## Toggled off for release, toggle back on to check how often we change phases & which catalysts are firing. -gather_debug_variables_for_dynastic_cycle_trigger = { debug_only = yes } - -################################################## -# General Triggers -## Miscellaneous assorted triggers related to bits of neutral struggle content. - -tgp_does_this_player_care_about_the_dynastic_cycle = { - save_temporary_scope_as = char_temp - situation:dynastic_cycle ?= { - OR = { - any_situation_participant = { - this = scope:char_temp - } - situation_top_has_province = scope:char_temp.capital_province - } - } -} - -tgp_is_hegemon_or_below_in_dynastic_cycle_trigger = { - custom_description = { - text = tgp_is_hegemon_or_below_in_dynastic_cycle_trigger_tt - trigger_if = { - limit = { - any_character_situation = { - situation_type = dynastic_cycle - } - } - top_participant_group:dynastic_cycle ?= { - NOT = { - participant_group_type = other_rulers - } - } - } - trigger_else = { - always = no - } - } -} - -is_valid_celestial_dynasty = { - culture = { - has_cultural_pillar = heritage_chinese - } -} - -tgp_dynastic_cycle_is_the_mandate_loser = { - NOT = { exists = title:h_china.holder } - title:h_china.previous_holder ?= this -} - -tgp_dynastic_cycle_offensive_wars_ban_trigger = { - trigger_if = { - limit = { - scope:attacker ?= { has_title = title:h_china } - exists = situation:dynastic_cycle - } - custom_tooltip = { - text = dynastic_cycle_offensive_wars_ban_tt - scope:attacker = { - top_participant_group:dynastic_cycle ?= { - NOT = { has_participant_group_parameter = dynastic_cycle_offensive_wars_ban } - } - } - } - } -} - -tgp_war_ban_all_ministers_trigger = { - trigger_if = { - limit = { - scope:attacker.liege = { - tgp_has_access_to_ministry_trigger = yes - } - } - scope:attacker = { - NOR = { - has_title = title:e_minister_chancellor - has_title = title:e_minister_censor - has_title = title:e_minister_grand_marshal - has_title = title:e_minister_of_personnel - has_title = title:e_minister_of_revenue - has_title = title:e_minister_of_rites - has_title = title:e_minister_of_war - has_title = title:e_minister_of_justice - has_title = title:e_minister_of_works - } - } - } -} - -tgp_war_ban_civilian_ministers_trigger = { - trigger_if = { - limit = { - scope:attacker.liege = { - tgp_has_access_to_ministry_trigger = yes - } - } - scope:attacker = { - NOR = { - has_title = title:e_minister_chancellor - has_title = title:e_minister_censor - #has_title = title:e_minister_grand_marshal # This guys is allowed to declare wars in some cases - has_title = title:e_minister_of_personnel - has_title = title:e_minister_of_revenue - has_title = title:e_minister_of_rites - has_title = title:e_minister_of_war - has_title = title:e_minister_of_justice - has_title = title:e_minister_of_works - } - } - } -} - -tgp_dynastic_cycle_yearly_drift_blocked_trigger = { - trigger_if = { - limit = { - OR = { - situation_current_phase = situation_dynastic_cycle_phase_stability_expansion - situation_current_phase = situation_dynastic_cycle_phase_stability_advancement - } - } - title:h_china.holder.capital_county ?= { NOT = { has_county_modifier = tgp_strengthen_capital_modifier } } - } -} - -# use only with Dynastic Cycle, to determine if root is in the same Movement as the target character, including pro_hegemon and hegemon_ruler as the same group -is_in_same_movement_as = { - save_temporary_scope_as = temp_char - exists = $TARGET$.top_participant_group:dynastic_cycle - OR = { - top_participant_group:dynastic_cycle ?= $TARGET$.top_participant_group:dynastic_cycle - AND = { - is_in_pro_hegemon_or_hegemon_movement = yes - $TARGET$ = { - is_in_pro_hegemon_or_hegemon_movement = yes - } - } - } -} -# used to check if eligible for the pro_hegemon boost in ai chances -is_in_pro_hegemon_or_hegemon_movement = { - save_temporary_scope_as = temp_char - custom_tooltip = { - top_participant_group:dynastic_cycle ?= { - OR = { - participant_group_type = hegemon_ruler - participant_group_type = pro_hegemon_movement - } - } - text = is_in_pro_hegemon_or_hegemon_movement_tt - } -} - -# To determine if situation_participant_group is favored -# Use e.g. "MOVEMENT = expansion_movement" to check a specific movement -is_movement_in_power = { - situation:dynastic_cycle ?= { - situation_participant_group:$MOVEMENT$ = { - save_temporary_scope_as = my_movement - } - } - custom_tooltip = { - scope:my_movement = { - exists = var:movement_favored - } - text = my_movement_is_in_power - } -} - -# To check if a character is a leader of any movement -is_any_movement_leader = { - save_temporary_scope_as = leader - custom_description = { - text = is_any_movement_leader_tt - top_participant_group:dynastic_cycle.var:movement_leader ?= scope:leader - } -} - -# To check if a character is part of any movement that's NOT Unaligned -is_any_movement_member_not_undecided = { - top_participant_group:dynastic_cycle ?= { - OR = { - participant_group_type = expansion_movement - participant_group_type = advancement_movement - participant_group_type = pro_hegemon_movement - participant_group_type = conservative_movement - } - } -} - -is_celestial_governor_in_need_of_successor_trigger = { - government_has_flag = government_is_celestial - is_governor = yes - primary_title.tier >= tier_duchy - has_realm_law = celestial_appointment_succession_law # we don't want to make bureaucratic appointments for military provinces - primary_title = { - any_title_heir = { - dynasty != root.dynasty # nepotism very bad! - merit_level >= root.expected_primary_title_merit - root.liege != this - count = 0 - } - } -} - -is_province_valid_confucian_education_trigger = { - OR = { - #holder has confucian religion or culture - county.holder = { - faith = { - religion = religion:confucianism_religion - } - culture = { - has_cultural_pillar = heritage_chinese - } - } - #location is in China or has confucian religion or culture - geographical_region = world_asia_china - faith = { - religion = religion:confucianism_religion - } - culture = { - has_cultural_pillar = heritage_chinese - } - #location is part of the Dynastic Cycle region - county = { - any_county_situation_sub_region = { - this = situation:dynastic_cycle.situation_sub_region:core - } - } - } -} - -grand_campaign_valid_contributor_trigger = { - top_liege = scope:owner - custom_description = { - text = grand_campaign_target_border_tt - object = scope:great_project.var:attack_$ID$.holder - this != scope:owner - this != scope:founder - scope:great_project.var:attack_$ID$ ?= { - trigger_if = { - limit = { - is_title_created = yes - } - holder.top_overlord != scope:owner - } - any_title_to_title_neighboring_county = { - holder.top_overlord = scope:owner - } - } - } - custom_tooltip = { - text = grand_campaign_main_target_tt - scope:great_project = { - any_contribution = { - contribution_id = attack_1 - contribution_is_funded = yes - } - } - } -} - -hegemon_favors_advancement_trigger = { - title:h_china.holder ?= { - OR = { - var:favor_era ?= flag:advancement - AND = { - is_ai = yes - hegemon_favored_stability_phase_value >= 0 - } - } - } -} - -hegemon_favors_expansion_trigger = { - title:h_china.holder ?= { - OR = { - var:favor_era ?= flag:expansion - AND = { - is_ai = yes - hegemon_favored_stability_phase_value < 0 - } - } - } -} - - -### Exam triggers - check if the character in scope is considered to have passed (or failed) a specific examination tier - -# children examination -tgp_passed_children_examination = { - has_character_flag = passed_child_exam -} -tgp_failed_children_examination = { - not = { has_character_flag = passed_child_exam } - any_memory = { has_memory_type = failed_child_exam_memory } -} - -# provincial examination -tgp_passed_provincial_examination = { - has_character_flag = passed_provincial_exam -} -tgp_failed_provincial_examination = { - not = { has_character_flag = passed_provincial_exam } - any_memory = { has_memory_type = failed_provincial_exam_memory } -} - -# metropolitan examination -tgp_passed_metropolitan_examination = { - has_character_flag = passed_metropolitan_exam -} -tgp_failed_metropolitan_examination = { - not = { has_character_flag = passed_metropolitan_exam } - any_memory = { has_memory_type = failed_metropolitan_exam_memory } -} - -# palace examination -tgp_passed_palace_examination = { - has_character_flag = passed_palace_exam -} - -can_pass_candidate_score_prestige_law_trigger = { - top_liege = { - custom_description = { - text = conservative_ministers_tt - value = conservative_ministers_value - any_councillor = { - count >= needed_conservative_ministers_value - top_participant_group:dynastic_cycle ?= { - participant_group_type = conservative_movement - } - } - } - custom_description = { - text = conservative_powerful_families_tt - value = conservative_powerful_families_value - any_powerful_family = { - count >= needed_conservative_powerful_families_value - house_head = { - top_participant_group:dynastic_cycle ?= { - participant_group_type = conservative_movement - } - } - } - } - } -} - -can_pass_candidate_score_merit_law_trigger = { - top_liege = { - custom_description = { - text = not_conservative_ministers_tt - value = not_conservative_ministers_value - any_councillor = { - count >= needed_conservative_ministers_value - top_participant_group:dynastic_cycle ?= { - NOT = { participant_group_type = conservative_movement } - } - } - } - custom_description = { - text = not_conservative_powerful_families_tt - value = not_conservative_powerful_families_value - any_powerful_family = { - count >= needed_conservative_powerful_families_value - house_head = { - top_participant_group:dynastic_cycle ?= { - NOT = { participant_group_type = conservative_movement } - } - } - } - } - } -} - -#dynastic cycle sort to movement triggers -should_pick_pro_hegemon_movement_trigger = { - title:h_china.holder.legitimacy_level >= 2 - NOR = { - has_relation_victim = title:h_china.holder - has_relation_bully = title:h_china.holder - has_relation_rival = title:h_china.holder - is_at_war_with = title:h_china.holder - is_imprisoned_by = title:h_china.holder - house_has_feud_relation_with_trigger = { TARGET = title:h_china.holder } - } - OR = { - has_relation_lover = title:h_china.holder - has_relation_friend = title:h_china.holder - has_relation_crush = title:h_china.holder - has_relation_potential_friend = title:h_china.holder - has_relation_elder = title:h_china.holder - has_relation_disciple = title:h_china.holder - has_trait = loyal - house ?= title:h_china.holder.house - has_dread_level_towards = { - target = title:h_china.holder - level >= 1 - } - AND = { - title:h_china.holder.hegemon_favored_stability_phase_value >= 0 - ai_has_builder_or_pious_builder_personality = yes - } - AND = { - title:h_china.holder.hegemon_favored_stability_phase_value < 0 - ai_has_warlike_personality = yes - } - } -} - -should_pick_expansion_movement_trigger = { - OR = { - has_trait = strategist - has_trait = overseer - has_trait = gallant - ai_has_warlike_personality = yes - has_education_martial_trigger = yes - } -} - -should_pick_advancement_movement_trigger = { - OR = { - has_trait = scholar - has_trait = theologian - has_trait = architect - has_trait = administrator - ai_has_builder_or_pious_builder_personality = yes - } -} - -should_pick_conservative_movement_trigger = { - OR = { - has_trait = family_first - has_trait = august - has_trait = avaricious - is_powerful_vassal = yes - house ?= { - OR = { - is_powerful_family = yes - is_dominant_family = yes - } - } - } -} diff --git a/N3OW/common/scripted_triggers/10_tgp_house_bloc_triggers.txt b/N3OW/common/scripted_triggers/10_tgp_house_bloc_triggers.txt deleted file mode 100644 index 91ffda21..00000000 --- a/N3OW/common/scripted_triggers/10_tgp_house_bloc_triggers.txt +++ /dev/null @@ -1,20 +0,0 @@ - -tgp_uses_house_blocs_trigger = { - has_tgp_dlc_trigger = yes - government_has_flag = government_has_house_blocs # DO NOT CHANGE THIS - top_liege = { government_has_flag = government_has_house_blocs } # DO NOT CHANGE THIS -} - -tgp_is_valid_member_character_shared_trigger = { - leading_house.house_head.top_liege ?= scope:character.top_liege # Same realm as Leading House head - any_confederation_member_house = { this = scope:character.house } - scope:character = { tgp_uses_house_blocs_trigger = yes } -} - -tgp_is_valid_member_house_shared_trigger = { - scope:house.house_head ?= { - is_alive = yes - any_held_title = { is_noble_family_title = yes } # Members must be Noble Families - tgp_uses_house_blocs_trigger = yes - } -} diff --git a/N3OW/common/scripted_triggers/10_tgp_house_relation_triggers.txt b/N3OW/common/scripted_triggers/10_tgp_house_relation_triggers.txt deleted file mode 100644 index 3e1c9478..00000000 --- a/N3OW/common/scripted_triggers/10_tgp_house_relation_triggers.txt +++ /dev/null @@ -1,204 +0,0 @@ -### HOUSE RELATION TRIGGERS - -house_relation_is_valid_to_start_trigger = { - $HOUSE$ ?= { save_temporary_scope_as = house_1_temp } - $OTHER_HOUSE$ ?= { save_temporary_scope_as = house_2_temp } - trigger_if = { - limit = { - exists = scope:house_1_temp - exists = scope:house_2_temp - } - scope:house_1_temp = { - NOT = { this = scope:house_2_temp } - # IF HOUSE RELATION DOES NOT ALREADY EXIST, ENSURE IT IS WORTHWHILE TO START - trigger_if = { - limit = { - NOT = { has_house_relation_with = scope:house_2_temp } - } - # MINIMUM START CHECKS - house_head ?= { is_playable_character = yes } - scope:house_2_temp.house_head ?= { is_playable_character = yes } - # EXTRA CHECKS FOR AI - trigger_if = { - limit = { - NOR = { - any_player = { house ?= scope:house_1_temp } - any_player = { house ?= scope:house_2_temp } - } - } - # DON'T CREATE LOTS OF RELATIONS FOR TINY AI HOUSES - any_house_member = { count >= 5 } - scope:house_2_temp = { - any_house_member = { count >= 5 } - } - } - } - # GENERAL CHECKS - OR = { - # HOUSES IN SAME DYNASTY CAN ALWAYS MAKE RELATIONS - house_dynasty = scope:house_2_temp.house_dynasty - # TIER CHECKS IF BOTH INDEPENDENT - trigger_if = { - limit = { - house_head = { is_independent_ruler = yes } - scope:house_2_temp.house_head = { is_independent_ruler = yes } - } - house_head = { - tier_difference = { - target = scope:house_2_temp.house_head - value < 2 - } - tier_difference = { - target = scope:house_2_temp.house_head - value > -2 - } - } - } - # SAME REALM CHECK IF NOT BOTH INDEPENDENT (SHARED TOP LIEGE) - trigger_else = { house_head.top_liege = scope:house_2_temp.house_head.top_liege } - } - # DIPLO RANGE IS ALWAYS REQUIRED - house_head = { in_diplomatic_range = scope:house_2_temp.house_head } - } - } - # SCOPES ARE INVALID - trigger_else = { always = no } -} - -house_relation_is_valid_to_keep_trigger = { - $HOUSE$ ?= { save_temporary_scope_as = house_1_temp } - $OTHER_HOUSE$ ?= { save_temporary_scope_as = house_2_temp } - trigger_if = { - limit = { - exists = scope:house_1_temp - exists = scope:house_2_temp - } - scope:house_1_temp = { - NOT = { this = scope:house_2_temp } - # DIPLO RANGE IS ALWAYS REQUIRED - house_head = { in_diplomatic_range = scope:house_2_temp.house_head } - } - } - # SCOPES ARE INVALID - trigger_else = { always = no } -} - -has_better_house_relation_with_target_house_than_other_trigger = { - save_temporary_scope_as = house_temp - $TARGET$ = { save_temporary_scope_as = target_temp } - $OTHER$ = { save_temporary_scope_as = other_temp } - # If no relation with OTHER, TARGET relation must be positive - trigger_if = { - limit = { - any_house_relation = { - any_relation_house = { this = scope:target_temp } - save_temporary_scope_as = target_relation_temp - } - NOT = { - any_house_relation = { - any_relation_house = { this = scope:other_temp } - } - } - } - scope:target_relation_temp = { - OR = { - has_house_relation_level = cordial - has_house_relation_level = friendly - has_house_relation_level = amity - } - } - } - # If relation with both, TARGET relation must be better than OTHER relation - trigger_else_if = { - limit = { - any_house_relation = { - any_relation_house = { this = scope:target_temp } - save_temporary_scope_as = target_relation_temp - } - any_house_relation = { - any_relation_house = { this = scope:other_temp } - save_temporary_scope_as = other_relation_temp - } - } - scope:target_relation_temp = { - trigger_if = { - limit = { has_house_relation_level = feud } - scope:other_relation_temp = { - NOT = { has_house_relation_level = feud } - } - } - trigger_else_if = { - limit = { has_house_relation_level = rivalry } - scope:other_relation_temp = { - NOR = { - has_house_relation_level = rivalry - has_house_relation_level = feud - } - } - } - trigger_else_if = { - limit = { has_house_relation_level = quarrel } - scope:other_relation_temp = { - NOR = { - has_house_relation_level = quarrel - has_house_relation_level = rivalry - has_house_relation_level = feud - } - } - } - trigger_else_if = { - limit = { has_house_relation_level = neutral } - scope:other_relation_temp = { - NOR = { - has_house_relation_level = neutral - has_house_relation_level = quarrel - has_house_relation_level = rivalry - has_house_relation_level = feud - } - } - } - trigger_else_if = { - limit = { has_house_relation_level = cordial } - scope:other_relation_temp = { - NOR = { - has_house_relation_level = cordial - has_house_relation_level = neutral - has_house_relation_level = quarrel - has_house_relation_level = rivalry - has_house_relation_level = feud - } - } - } - trigger_else_if = { - limit = { has_house_relation_level = friendly } - scope:other_relation_temp = { - NOR = { - has_house_relation_level = friendly - has_house_relation_level = cordial - has_house_relation_level = neutral - has_house_relation_level = quarrel - has_house_relation_level = rivalry - has_house_relation_level = feud - } - } - } - trigger_else_if = { - limit = { has_house_relation_level = amity } - scope:other_relation_temp = { - NOR = { - has_house_relation_level = amity - has_house_relation_level = friendly - has_house_relation_level = cordial - has_house_relation_level = neutral - has_house_relation_level = quarrel - has_house_relation_level = rivalry - has_house_relation_level = feud - } - } - } - trigger_else = { always = no } - } - } - # Invalid - trigger_else = { always = no } -} diff --git a/N3OW/common/scripted_triggers/10_tgp_japan_triggers.txt b/N3OW/common/scripted_triggers/10_tgp_japan_triggers.txt deleted file mode 100644 index f17e1b5c..00000000 --- a/N3OW/common/scripted_triggers/10_tgp_japan_triggers.txt +++ /dev/null @@ -1,855 +0,0 @@ - -tgp_is_japanese_kampaku_trigger = { - has_title = title:e_japan - NOR = { - has_title = title:k_chrysanthemum_throne - has_global_variable = tenno_restored - has_global_variable = shogunate_established - } -} - -tgp_is_japanese_governor_trigger = { - custom_tooltip = { - text = tgp_is_japanese_governor_trigger - government_allows = administrative - is_landed = yes - is_ruler = yes - highest_held_title_tier >= tier_county - highest_held_title_tier < tier_kingdom - is_independent_ruler = no - exists = title:e_japan.holder - top_liege ?= title:e_japan.holder - NOT = { has_title = title:k_chrysanthemum_throne } - } -} - -can_have_kampaku_acclamation_succession_law_trigger = { - has_tgp_dlc_trigger = yes - government_allows = administrative - is_independent_ruler = yes -} - -can_keep_kampaku_acclamation_succession_law_trigger = { - has_tgp_dlc_trigger = yes - trigger_if = { - limit = { - has_realm_law = japanese_regency_succession_law - } - OR = { - can_have_kampaku_acclamation_succession_law_trigger = yes - has_title = title:e_japan - } - } -} - -any_descendants_are_governors = { - # A direct descendant is currently a Governor - any_child = { # Children - OR = { - tgp_is_japanese_governor_trigger = yes - any_child = { # Grandchildren - OR = { - tgp_is_japanese_governor_trigger = yes - any_child = { # Great-grandchildren - OR = { - tgp_is_japanese_governor_trigger = yes - any_child = { # Great-great-grandchildren - tgp_is_japanese_governor_trigger = yes - } - } - } - } - } - } - } -} - -any_liege_or_above_is_descendant = { - any_liege_or_above = { - is_liege_or_above_of = root - OR = { - is_child_of = root - is_grandchild_of = root - is_great_grandchild_of = root - } - } -} - -is_a_previous_title_holder_trigger = { - save_temporary_scope_as = previous_holder_compare - $TITLE$ ?= { - # Easy out - trigger_if = { - limit = { previous_holder ?= scope:previous_holder_compare } - always = yes - } - # Hard out - trigger_else = { - any_past_holder = { this = scope:previous_holder_compare } - } - } -} - -# Filter out dynasties of Emperors further away from you -# e.g. your father's brother's son -target_shares_nearest_related_title_holder_trigger = { - trigger_if = { - limit = { - any_parent = { - even_if_dead = yes - is_a_previous_title_holder_trigger = { TITLE = $TITLE$ } - } - } - is_child_of = $COMPARE$ - } - trigger_else_if = { - limit = { - any_parent = { - even_if_dead = yes - any_parent = { - even_if_dead = yes - is_a_previous_title_holder_trigger = { TITLE = $TITLE$ } - } - } - } - is_grandchild_of = $COMPARE$ - } - trigger_else = { is_great_grandchild_of = $COMPARE$ } -} - -is_culture_or_descended_from_trigger = { - culture = { - OR = { - this = $CULTURE$ - any_parent_culture_or_above = { this = $CULTURE$ } - } - } -} - -tgp_japan_offensive_wars_ban_trigger = { - trigger_if = { - limit = { - exists = scope:defender.top_liege - scope:attacker.top_liege ?= { - has_title = title:e_japan - scope:defender.top_liege != this - government_is_japanese_trigger = yes - realm_law_use_imperial_policy_trigger = yes - } - } - custom_tooltip = { - text = japan_offensive_wars_ban_tt - scope:attacker.top_liege = { has_realm_law = imperial_expansion_law } - } - } -} - -tgp_is_ceremonial_liege_or_direct_heir_trigger = { - save_temporary_scope_as = char_temp - top_liege.primary_title.var:administrative_ui_special_title ?= { - OR = { - holder ?= { - OR = { - this = scope:char_temp - is_parent_of = scope:char_temp - } - } - place_in_line_of_succession = { - target = scope:char_temp - value <= 5 - } - } - } -} - -tgp_ceremonial_candidacy_restriction_trigger = { - trigger_if = { - limit = { - exists = scope:target - scope:actor ?= { tgp_realm_has_ceremonial_liege_trigger = yes } - scope:secondary_recipient ?= { tgp_is_in_ceremonial_house_trigger = yes } - } - trigger_if = { # Top title only valid for ceremonial liege - limit = { - exists = scope:target.var:administrative_ui_special_title - scope:target.holder = { - OR = { - has_realm_law = japanese_regency_succession_law - has_realm_law = meritocratic_regency_succession_law - } - } - } - trigger_if = { - limit = { - top_liege.primary_title.var:administrative_ui_special_title.holder = { tgp_has_ceremonial_liege_title_trigger = yes } - } - custom_tooltip = { - text = ceremonial_liege_only_heir_can_be_ruler_trigger - scope:secondary_recipient = { tgp_is_ceremonial_liege_or_direct_heir_trigger = yes } - } - } - trigger_else = { - custom_tooltip = { - text = ceremonial_liege_house_can_not_be_ruler_trigger - scope:secondary_recipient = { tgp_is_ceremonial_liege_trigger = yes } - } - } - } - trigger_else = { # Governor titles only valid for non-ceremonial liege - custom_tooltip = { - text = ceremonial_liege_line_cannot_be_governor_trigger - scope:secondary_recipient = { tgp_is_ceremonial_liege_or_direct_heir_trigger = no } - } - } - } -} - -tgp_japan_grant_titles_restriction_trigger = { - trigger_if = { - limit = { - $GRANTER$ ?= { tgp_realm_has_ceremonial_liege_trigger = yes } - exists = $GRANTEE$.house - } - custom_tooltip = { - text = ceremonial_liege_line_cannot_be_governor_trigger - NOT = { - $GRANTEE$ = { tgp_is_ceremonial_liege_or_direct_heir_trigger = yes } - } - } - } -} - -tgp_ceremonial_title_revoke_restriction_trigger = { - trigger_if = { - limit = { - exists = scope:recipient.house - scope:actor.top_liege.primary_title.var:administrative_ui_special_title.holder ?= scope:recipient - } - custom_tooltip = { - text = tgp_blocked_ceremonial_title_revocation_trigger - NOT = { scope:target ?= scope:actor.top_liege.primary_title.var:administrative_ui_special_title } - } - } -} - -can_have_japanese_regency_succession_law_trigger = { - has_tgp_dlc_trigger = yes - is_independent_ruler = yes - government_has_flag = government_is_japan_administrative - OR = { - has_title = title:k_chrysanthemum_throne - any_vassal_or_below = { has_title = title:k_chrysanthemum_throne } - } - NOT = { - has_global_variable = tenno_restored - } -} - -can_have_japanese_appointment_succession_law_trigger = { - has_tgp_dlc_trigger = yes - government_has_flag = government_is_japan_administrative - is_independent_ruler = no - NOT = { has_title = title:k_chrysanthemum_throne } -} - -can_keep_japanese_appointment_succession_law_trigger = { - has_tgp_dlc_trigger = yes - trigger_if = { - limit = { has_realm_law = japanese_appointment_succession_law } - can_have_japanese_appointment_succession_law_trigger = yes - } -} - -can_change_japanese_appointment_succession_law_trigger = { - has_tgp_dlc_trigger = yes -} - -tgp_japan_single_heir_succession_override_trigger = { - save_temporary_scope_as = holder_temp - OR = { - title:k_chrysanthemum_throne.holder ?= scope:holder_temp - AND = { - has_global_variable = tenno_restored - title:e_japan.holder ?= scope:holder_temp - } - } -} - -tgp_blocked_action_against_tenno_trigger = { - custom_description = { - text = tgp_blocked_ruler_against_ceremonial_action_trigger - NAND = { - $TARGET$ = { has_title = title:k_chrysanthemum_throne } - $TARGET$.top_liege = $ACTOR$.top_liege - } - } -} - -tgp_blocked_ruler_against_ceremonial_action_trigger = { - custom_description = { - text = tgp_blocked_ruler_against_ceremonial_action_trigger - NAND = { - $TENNO$ = { has_title = title:k_chrysanthemum_throne } - $REGENT$ = $TENNO$.liege - } - } -} - -japan_house_name_county_trigger = { - exists = $TITLE$ - save_temporary_scope_as = new_head_temp - trigger_if = { - limit = { - OR = { - $TITLE$.holder ?= scope:new_head_temp - scope:new_head_temp.domicile.domicile_location.county ?= $TITLE$ - } - } - always = yes - } - trigger_else_if = { - limit = { exists = scope:old_head } - OR = { - $TITLE$.holder ?= scope:old_head - scope:old_head.domicile.domicile_location.county ?= $TITLE$ - } - } - trigger_else_if = { - limit = { exists = scope:new_head_temp.house.house_head } - OR = { - $TITLE$.holder ?= scope:new_head_temp.house.house_head - scope:new_head_temp.house.house_head.domicile.domicile_location.county ?= $TITLE$ - } - } - trigger_else_if = { - limit = { exists = scope:old_head.house.house_head } - OR = { - $TITLE$.holder ?= scope:old_head.house.house_head - scope:old_head.house.house_head.domicile.domicile_location.county ?= $TITLE$ - } - } - trigger_else = { always = yes } - NOT = { - is_target_in_variable_list = { name = japanese_house_names target = $FLAG$ } - } -} - -japan_house_name_trigger = { - NOT = { - is_target_in_variable_list = { name = japanese_house_names target = $FLAG$ } - } -} - -tgp_japan_internal_soryo_war_is_crime_trigger = { - scope:defender = { - government_has_flag = government_is_japan_administrative - top_liege = { - government_has_flag = government_is_japan_administrative - this = scope:attacker.top_liege - } - } -} - -japan_imperial_expansion_cb_allowed_for_character_trigger = { - # DLC check - has_tgp_dlc_trigger = yes - # Must have a Japanese government form - government_is_japanese_trigger = yes - # Must be part of Japan with functional imperial family - tgp_realm_has_ceremonial_liege_trigger = yes -} - -government_is_japanese_trigger = { - OR = { - government_has_flag = government_is_japan_administrative - government_has_flag = government_is_japan_feudal - } -} - -japan_imperial_expansion_cb_allowed_against_character_trigger = { - # Cannot also be part of Japan - NOT = { top_liege ?= scope:attacker.top_liege } - # Must own Japanese non-de-jure land - any_sub_realm_county = { - NOT = { empire = title:e_japan } - title_province = { - OR = { - geographical_region = world_asia_japan - geographical_region = world_asia_sakhalin_hokkaido - } - } - } -} - -japan_imperial_reconquest_cb_allowed_for_character_trigger = { - # DLC check - has_tgp_dlc_trigger = yes - # Must have a Japanese government form - government_is_japanese_trigger = yes - # Must be part of Japan with functional imperial family - tgp_realm_has_ceremonial_liege_trigger = yes -} - -japan_imperial_reconquest_cb_allowed_against_character_trigger = { - # Cannot also be part of Japan - scope:defender.top_liege != scope:attacker.top_liege - # Must own Japanese de-jure land - any_sub_realm_county = { empire = title:e_japan } -} - -realm_law_use_imperial_policy_trigger = { - top_liege = { - highest_held_title_tier >= tier_empire - government_is_japanese_trigger = yes - } -} - -tgp_japan_defense_mobilization_valid_trigger = { - custom_tooltip = { - text = defense_mobilization_law_valid_trigger - OR = { - AND = { - is_at_war = yes - save_temporary_scope_as = liege_temp - any_character_war = { - is_civil_war = no - save_temporary_scope_as = war_temp - scope:liege_temp = { - is_leader_in_war = scope:war_temp - is_defender_in_war = scope:war_temp - } - OR = { - # CURRENT ATTACKERS COMBINED ARE A THREAT - war_attacker_total_strength_value > scope:liege_temp.max_strength_fifty_percent_value - # PRIMARY ATTACKER WITH ALLIES IS A THREAT - primary_attacker.max_strength_with_allies_value > scope:liege_temp.max_strength_fifty_percent_value - } - primary_attacker = { - OR = { - capital_county.empire != title:e_japan - culture = { - NOR = { - this = culture:japanese - any_parent_culture_or_above = { this = culture:japanese } - } - } - } - } - } - } - title:e_japan = { - any_de_jure_county = { holder.top_liege != title:e_japan.holder.top_liege } - } - } - } -} - -tgp_japan_valid_restore_monarchy_scion_trigger = { - is_landed = no - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:kampaku } - is_healthy = yes -} - -tgp_japan_imperial_expansion_internal_peace_trigger = { - custom_tooltip = { - text = imperial_expansion_internal_peace_trigger - top_liege = { - NOT = { - any_vassal_or_below = { - any_primary_war_enemy = { - top_liege = prev.top_liege - } - } - } - } - } -} - -tgp_install_regent_faction_target_valid_trigger = { - is_independent_ruler = yes - tgp_realm_has_ceremonial_liege_trigger = yes -} - -tgp_install_regent_faction_can_create_trigger = { - has_tgp_dlc_trigger = yes - scope:target ?= { tgp_install_regent_faction_target_valid_trigger = yes } - custom_tooltip = { - text = replace_ceremonial_regent_faction_kampaku_trigger - NOR = { - has_global_variable = shogunate_established - has_global_variable = tenno_restored - } - } - is_adult = yes - custom_tooltip = { - text = is_faith_dominant_gender_tt - is_faith_dominant_gender = yes - } - japan_faction_cohesion_hard_trigger = yes - trigger_if = { - limit = { - scope:target ?= { - government_is_japanese_trigger = yes # am I a compatible government type? - } - } - government_is_japanese_trigger = yes - } - trigger_if = { - limit = { - scope:target ?= { - has_government = meritocratic_government # am I a compatible government type? - } - } - has_government = meritocratic_government - } -} - -japan_faction_cohesion_trigger = { - trigger_if = { - limit = { - government_has_flag = government_has_house_blocs - is_confederation_member = yes - } - custom_tooltip = { - text = house_head_create_faction_cohesion_tt - OR = { - house.house_confederation ?= { cohesion >= 50 } - joined_faction ?= { - OR = { - faction_is_at_war = yes - any_faction_member = { - OR = { - this = root.house.house_confederation.leading_house.house_head - is_ai = no - } - } - } - } - } - } - } -} - -japan_faction_cohesion_hard_trigger = { - trigger_if = { - limit = { - government_has_flag = government_has_house_blocs - is_confederation_member = yes - } - custom_tooltip = { - text = house_head_create_faction_cohesion_hard_tt - OR = { - house.house_confederation ?= { cohesion >= 75 } - joined_faction ?= { - OR = { - faction_is_at_war = yes - any_faction_member = { - OR = { - this = root.house.house_confederation.leading_house.house_head - is_ai = no - } - } - } - } - } - } - } -} - -restore_ceremonial_liege_faction_can_create_trigger = { - tgp_realm_has_ceremonial_liege_trigger = yes - trigger_if = { - limit = { government_is_japanese_trigger = yes } - custom_tooltip = { - text = house_head_create_faction_cohesion_hard_tt - OR = { - house.house_confederation ?= { cohesion >= 75 } - joined_faction ?= { - faction_is_at_war = yes - } - } - } - custom_tooltip = { - text = bloc_leader_unlocks_restore_emperor_faction_tt - OR = { - house.house_confederation ?= { has_cohesion_level_parameter = bloc_leader_unlocks_restore_emperor_faction } - joined_faction ?= { - faction_is_at_war = yes - } - } - } - } - OR = { - custom_tooltip = { - text = is_house_head_of_noble_family_tt - is_house_head = yes - any_held_title = { is_noble_family_title = yes } - } - is_landed = yes - } - scope:target ?= { - is_independent_ruler = yes - tgp_realm_has_ceremonial_liege_trigger = yes - tgp_has_ceremonial_liege_title_trigger = no - } -} - -ceremonial_claimant_faction_can_create_trigger = { - scope:target ?= { - is_independent_ruler = yes - tgp_realm_has_ceremonial_liege_trigger = yes - tgp_has_ceremonial_liege_title_trigger = no - } - japan_faction_cohesion_hard_trigger = yes -} - -imperial_policy_faction_can_create_trigger = { - realm_law_use_imperial_policy_trigger = yes - scope:target = { - is_independent_ruler = yes - this = root.liege - } - japan_faction_cohesion_trigger = yes -} - -tgp_ritsuryo_bloc_house_head_trigger = { - top_liege = root.top_liege - government_has_flag = government_is_japan_administrative -} - -tgp_house_bloc_interaction_valid_trigger = { - is_ruler = yes - tgp_uses_house_blocs_trigger = yes - highest_held_title_tier >= tier_county - top_liege = { tgp_uses_house_blocs_trigger = yes } -} - -tgp_house_bloc_interaction_valid_showing_failures_trigger = { - custom_tooltip = { - text = tgp_house_bloc_house_head_tt - is_house_head = yes - any_held_title = { is_noble_family_title = yes } - } -} - -tgp_has_house_relation_level_trigger = { - exists = $HOUSE_1_MEMBER$.house - exists = $HOUSE_2_MEMBER$.house - $HOUSE_1_MEMBER$.house != $HOUSE_2_MEMBER$.house - $HOUSE_1_MEMBER$.house = { - any_house_relation = { - has_house_relation_level = $LEVEL$ - any_relation_house = { this = $HOUSE_2_MEMBER$.house } - } - } -} - -## Check who can join a House Bloc -# -# TODO_TGP_CD: Remove this? Functionality (if any) would do better on house confederation type). -# -# root: possibly viable character -# -tgp_should_join_house_bloc_trigger = { - # Not in a Bloc - NOT = { exists = confederation } - # Not vassal - TODO_CD_TGP - #NOT = { liege ?= house.house_head } - # Same liege - $BLOC$.leading_house.house_head.liege ?= liege - # General checks - tgp_house_bloc_interaction_valid_trigger = yes - is_landed = yes # TODO_CD_TGP UNLANDED CANNOT JOIN YET - # Government TODO_CD_TGP disabled for now - #trigger_if = { - # limit = { - # $BLOC$.leading_house.house_head ?= { government_has_flag = government_is_japan_administrative } - # } - # government_has_flag = government_is_japan_administrative - #} - #trigger_else = { government_has_flag = government_is_japan_feudal } -} - -tgp_house_bloc_inviter_or_leader_trigger = { - $JOINER$ = { save_temporary_scope_as = joiner_temp } - trigger_if = { - limit = { exists = $INVITER$.confederation.leading_house.house_head } - $INVITER$.confederation.leading_house.house_head = { save_temporary_scope_as = inviter_temp } - } - trigger_else = { $INVITER$ = { save_temporary_scope_as = inviter_temp } } -} - -tgp_japan_cadet_creates_dynasty_trigger = { - NOR = { - this = dynasty.dynast - this = house.house_head - } - dynasty.dynast ?= { government_allows = administrative } -} - -tgp_soryo_or_bushido_trigger = { - custom_tooltip = { - text = soryo_or_bushido_trigger - OR = { - government_has_flag = government_is_japan_feudal - culture = { has_cultural_tradition = tradition_tgp_bushido } - } - } -} - -has_house_aspiration_trigger = { - OR = { - has_house_power_parameter = aspiration_level_1 - has_house_power_parameter = aspiration_level_2 - has_house_power_parameter = aspiration_level_3 - } -} - -should_learn_chinese_trigger = { - save_temporary_scope_as = child_learned_chinese - #Make sure they don't already know Chinese - NOT = { - knows_language = language_chinese - } - num_of_known_languages < language_soft_cap - exists = house - age >= 10 - is_faith_dominant_gender = yes - probably_unintelligent_trigger = no - house.house_head ?= { - OR = { - government_is_japanese_trigger = yes - #This will account for korea and friends - government_allows = merit - } - OR = { - #Cultural acceptance will be our guiding light for teaching young, noblemen (dominate gender) adults Chinese. These values will be set in game_start.txt - culture = { - OR = { - cultural_acceptance = { - target = culture:han - value >= 65 - } - any_parent_culture_or_above = { this = culture:han } - } - } - top_liege = { - highest_held_title_tier >= tier_kingdom - has_dlc_feature = royal_court - has_court_language_of_culture = culture:han - } - } - } -} - -japan_government_japan_kingdom_restriction_trigger = { - trigger_if = { - limit = { - government_is_japanese_trigger = yes - OR = { - is_independent_ruler = no - AND = { - NOT = { highest_held_title_tier = tier_kingdom } - has_title = title:e_japan - } - } - } - custom_tooltip = { - text = japan_government_japan_kingdom_restriction_tt - always = no - } - } -} - -japan_government_japan_duchy_restriction_trigger = { - trigger_if = { - limit = { - OR = { - government_has_flag = government_is_japan_administrative - AND = { # Soryo can create duchies if they're already a duke - government_has_flag = government_is_japan_feudal - primary_title.tier = tier_county - } - } - NAND = { - is_independent_ruler = yes - government_has_flag = government_is_japan_feudal - } - } - custom_tooltip = { - text = japan_government_japan_duchy_restriction_tt - always = no - } - } -} - -can_upgrade_house_aspiration_trigger = { - is_house_head = yes - trigger_if = { - limit = { - exists = house.house_confederation.leading_house - house.house_confederation.leading_house != house - } - custom_tooltip = { - text = cannot_upgrade_mismatched_bloc_aspiration_tt - house.house_confederation.leading_house = { has_same_house_power_as = root.house } - } - } -} - -japan_castle_construction_trigger = { - trigger_if = { - limit = { - county.holder ?= { - government_has_flag = government_is_japan_administrative - realm_law_use_imperial_policy_trigger = yes - } - } - custom_tooltip = { - text = japan_castle_construction_trigger_tt - county.holder.top_liege ?= { has_realm_law_flag = disarmament_law } - } - } -} - -tgp_bloc_war_transfer_trigger = { - $BLOC_LEADER$ = { save_temporary_scope_as = leader_temp } - save_temporary_scope_as = member_head_temp - NOR = { - # Not leading house - scope:leader_temp.house.house_confederation.leading_house ?= house - # Not sub vassal - trigger_if = { - limit = { - scope:leader_temp = { is_independent_ruler = no } - } - is_vassal_or_below_of = scope:leader_temp - } - # Not friend - has_relation_friend = scope:leader_temp - # Not ally - is_allied_to = scope:leader_temp - # Not hooked - scope:leader_temp = { has_hook = scope:member_head_temp } - # Not terrified - has_dread_level_towards = { - target = scope:leader_temp - level >= 2 - } - # Not loyal - has_trait = loyal - } -} - -has_japanese_house_aspiration_trigger = { - house ?= { - OR = { - has_house_power_parameter = aspiration_ceremony - has_house_power_parameter = aspiration_determination - has_house_power_parameter = aspiration_humility - has_house_power_parameter = aspiration_prosperity - has_house_power_parameter = aspiration_service - has_house_power_parameter = aspiration_strength - } - } -} diff --git a/N3OW/common/scripted_triggers/10_tgp_korea_triggers.txt b/N3OW/common/scripted_triggers/10_tgp_korea_triggers.txt deleted file mode 100644 index 08cc2a99..00000000 --- a/N3OW/common/scripted_triggers/10_tgp_korea_triggers.txt +++ /dev/null @@ -1,4 +0,0 @@ -tgp_korea_single_heir_succession_override_trigger = { - save_temporary_scope_as = holder_temp - title:k_yongson_throne.holder ?= scope:holder_temp -} diff --git a/N3OW/common/scripted_triggers/10_tgp_natural_disaster_triggers.txt b/N3OW/common/scripted_triggers/10_tgp_natural_disaster_triggers.txt deleted file mode 100644 index 2d2eff8f..00000000 --- a/N3OW/common/scripted_triggers/10_tgp_natural_disaster_triggers.txt +++ /dev/null @@ -1,139 +0,0 @@ -tgp_natural_disaster_great_project_trigger = { - is_independent_ruler = yes - any_character_situation = { - situation_type = natural_disaster_$TYPE$ - any_participant_group = { - participant_group_type = affected_ruler - participant_group_has_character = root - } - NOT = { - any_in_list = { - variable = great_projects - great_project_owner = root - } - } - } -} - -natural_disaster_next_impact_event_trigger = { - NOT = { - is_target_in_variable_list = { name = impact_events target = flag:$EVENT_ID$ } - } -} - -# ROOT: Situation -tgp_natural_disaster_situation_is_disaster_trigger = { - OR = { - situation_type = natural_disaster_earthquake - situation_type = natural_disaster_flood - } -} - -tgp_natural_disaster_is_valid_contributor_trigger = { - is_landless_adventurer = no -} - -tgp_natural_disaster_councillor_available_for_task_trigger = { - custom_tooltip = { - text = "councillor_busy_managing_disaster" - NOT = { - any_great_project = { - exists = var:managing_councillor - var:managing_councillor = scope:councillor - } - } - } -} - -tgp_natural_disaster_councillor_available_to_manage_trigger = { - custom_tooltip = { - text = "councillor_is_available_for_disaster_recovery" - OR = { - AND = { - government_has_flag = government_is_nomadic - any_councillor = { - is_kurultai_trigger = yes - save_temporary_scope_as = councillor - tgp_natural_disaster_councillor_available_for_task_trigger = yes - } - } - AND = { - government_has_flag = government_is_landless_adventurer - any_entourage_character = { - save_temporary_scope_as = councillor - tgp_natural_disaster_councillor_available_for_task_trigger = yes - } - } - AND = { - government_has_flag = government_is_celestial - tgp_has_access_to_ministry_trigger = yes - cp:minister_works ?= { - save_temporary_scope_as = councillor - tgp_natural_disaster_councillor_available_for_task_trigger = yes - } - } - AND = { - government_has_flag = government_is_celestial - tgp_has_access_to_ministry_trigger = no - cp:councillor_steward ?= { - save_temporary_scope_as = councillor - tgp_natural_disaster_councillor_available_for_task_trigger = yes - } - } - AND = { - NOR = { - government_has_flag = government_is_nomadic - government_has_flag = government_is_landless_adventurer - government_has_flag = government_is_celestial - } - cp:councillor_steward ?= { - save_temporary_scope_as = councillor - tgp_natural_disaster_councillor_available_for_task_trigger = yes - } - } - } - } -} - -tpg_great_project_disaster_in_recovery_phase_trigger = { - scope:great_project.var:situation ?= { - custom_tooltip = { - text = situation_in_recovery - situation_current_phase = recovery - } - } -} - -tpg_character_in_any_situation_sub_region_trigger = { - any_situation_sub_region = { - any_situation_sub_region_county = { - root.capital_province.county = this - } - } -} - -tgp_natural_disaster_character_is_affected_by_any_imminent_disaster_trigger = { - any_character_situation = { - tgp_natural_disaster_situation_is_disaster_trigger = yes - tpg_character_in_any_situation_sub_region_trigger = yes - NOT = { situation_current_phase = recovery } - } -} - -tgp_natural_disaster_character_is_valid_vassal_participant = { - OR = { # permits vassals and landless adventurers to contribute, but doesn't give them their own project - is_independent_ruler = no - is_landed = no - } - highest_held_title_tier >= tier_county - # Remove adventurers who leave the area - trigger_if = { - limit = { - exists = domicile - is_independent_ruler = yes - } - domicile.domicile_location.county ?= { - any_county_situation = { this = scope:situation } - } - } -} diff --git a/N3OW/common/scripted_triggers/10_tgp_triggers.txt b/N3OW/common/scripted_triggers/10_tgp_triggers.txt index e4bd5ce5..9eb0788c 100644 --- a/N3OW/common/scripted_triggers/10_tgp_triggers.txt +++ b/N3OW/common/scripted_triggers/10_tgp_triggers.txt @@ -414,7 +414,7 @@ tgp_should_become_meritocratic_trigger = { is_independent_ruler = yes liege = { NOT = { - government_has_flag = government_is_special_administrative + government_has_flag = government_is_administrative } } } diff --git a/N3OW/common/scripted_triggers/20_health_balancing_triggers.txt b/N3OW/common/scripted_triggers/20_health_balancing_triggers.txt deleted file mode 100644 index 9f96e42e..00000000 --- a/N3OW/common/scripted_triggers/20_health_balancing_triggers.txt +++ /dev/null @@ -1,73 +0,0 @@ -### HEALTH BALANCING TRIGGERS ### -# Along with the health balancing effects, these triggers are only used to get data output used for balancing diseases. - - -# For activating data output on the number of victims (total, dead and surviving) for contagious disease outbreaks. Combine with a run file like this to quickly collect data: - -#every_independent_ruler = { -# random_courtier = { -# trigger_event = health.1011 #1011 is plague, 1010 is smallpox -# } -#} - - -debug_activate_contagious_disease_outbreak_data_trigger = { - always = no -} - -is_very_young_character = { - trigger_if = { - limit = { - OR = { - has_trait = whole_of_body - has_trait = fecund - } - } - age <= 25 - } - trigger_else = { - age <= 20 - } -} - -is_young_character = { - trigger_if = { - limit = { - OR = { - has_trait = whole_of_body - has_trait = fecund - } - } - age <= 35 - } - trigger_else = { - age <= 30 - } -} - -is_aging_character = { - trigger_if = { - limit = { - OR = { - has_trait = whole_of_body - has_trait = fecund - } - } - age >= 45 - } - trigger_else = { - age >= 40 - } -} - -is_old_character = { - trigger_if = { - limit = { - is_male = yes - } - age >= define:NCharacter|MALE_ELDERLY_AGE - } - trigger_else = { - age >= define:NCharacter|FEMALE_ELDERLY_AGE - } -} \ No newline at end of file diff --git a/N3OW/common/scripted_triggers/20_health_triggers.txt b/N3OW/common/scripted_triggers/20_health_triggers.txt deleted file mode 100644 index 2ea2bd09..00000000 --- a/N3OW/common/scripted_triggers/20_health_triggers.txt +++ /dev/null @@ -1,927 +0,0 @@ -############################# -# STANDARD ILLNESS TRIGGERS # -############################# - -has_any_illness = { #Checks the game for every disease - has_trait_with_flag = illness -} - -has_any_debilitating_illness = { #Check for any illness that would warrant the sick animation - has_trait_with_flag = debilitating_illness -} - -is_debilitating_illness_trait = { #Check for any illness that would warrant the sick animation - has_trait_flag = debilitating_illness -} - -can_get_non_epidemic_disease_trigger = { #Diseases shouldn't stack. Don't add a non-epidemic disease if you have another, unless that disease is lover's pox - NOT = { has_trait_with_flag = blocks_getting_non_epidemic_disease } -} - -############################################## -# SITUATIONAL EVENT CONTENT ILLNESS TRIGGERS # -############################################## - -# Will this character suffer age-related health issues, factoring how healthy they actually are vs. what their age is? -age_ranked_health_vulnerability_threshold_trigger = { - OR = { - # If you're already having problems... - has_trait = infirm - # Otherwise, we check health crossed against age. - ## Characters that are this old are vulnerable regardless of health. - age >= 80 - ## Else, the higher your health is, the older you need to be to suffer age-related health problems. - AND = { - health <= good_health - age >= 70 - } - AND = { - health <= medium_health - age >= 60 - } - AND = { - health <= fine_health - age >= 50 - } - AND = { - health <= poor_health - age >= 40 - } - AND = { - health <= dying_health - age >= 30 - } - } - NOT = { has_trait = immortal } -} - -# Might this character succumb to a stroke, aneurysm, or other blood pressure-related injury? -potential_victim_of_apoplexy_trigger = { - OR = { - has_trait = wrathful - # Impatient/irritable characters tend towards this when pushed out of their comfort zone. - AND = { - OR = { - has_trait = impatient - has_trait = irritable - } - stress >= low_stress - } - # Non-calm characters may be at risk if stressed. - AND = { - stress_level >= 1 - NOT = { has_trait = calm } - } - # But everyone is vulnerable eventually. - stress_level >= 2 - } -} - -# Does the character have a trait that might shorten their life exptectancy, exacerbate unfortunate physical circumstances, or otherwise complicate medical conditions? -has_weak_physical_health_traits_trigger = { - # We discount these if you're in truly rude health. - health < excellent_health - OR = { - # General expected reduction in physical health. - has_trait = physique_bad - has_trait = weak - # Induces & exacerbates secondary physical complications. - has_trait = hunchbacked - has_trait = giant - has_trait = inbred - # Marfan's Syndrome can be medicated well in the modern day, but not in our period. - has_trait = spindly - # Haemophilia is both easier to medicate and easier to treat the consequences of in the modern day, but could really mess you up in the medieval period. - has_trait = bleeder - } - # Deliberately excluded: - ## dwarf - ### Unlike gigantism, dwarfism doesn't generally reduce life expectancy or induce complications except in that it can be more likely to occur if you have other conditions. For our purposes, those separate conditions are separate traits. - ## scaly - ### Ichthyosis does not reduce life expectancy & has a minimal effect on most (though not all) secondary conditions. - ## albino - ### Zero effect on life exptectancy. - ## wheezing - ### Asthma does reduce your life exptectancy, but not to the same degree as the other bad physical traits. -} - -# Does this character have some physical feature that would be easily mocked? -## Remember to generally try and filter out compassionate characters from bullying people over their appearance & to take caution when using this in your narrative. -has_easily_mocked_physical_attribute_trigger = { - OR = { - # Weight. - current_weight > overweight_value - current_weight < underweight_value - # Genetic traits. - has_trait = beauty_bad - has_trait = clubfooted - has_trait = hunchbacked - has_trait = dwarf - has_trait = giant - has_trait = inbred - has_trait = spindly - has_trait = scaly - has_trait = albino - # Illness traits. - ## Generally stuff with obvious, preferably permanent, outward physical symptoms. - has_trait = great_pox - has_trait = lovers_pox - has_trait = leper - has_trait = gout_ridden - # Physical traits. - has_trait = wounded - has_trait = maimed - has_trait = one_eyed - has_trait = one_legged - has_trait = disfigured - has_trait = blind - is_eunuch_trigger = yes - } -} - -has_disfiguring_physical_attribute_trigger = { - # Done this stupid way to prevent it blocking option text - trigger_if = { - limit = { has_trait = measles } - has_trait = measles - } - trigger_else_if = { - limit = { has_trait = smallpox } - has_trait = smallpox - } - trigger_else_if = { - limit = { has_trait = pneumonic } - has_trait = pneumonic - } - trigger_else_if = { - limit = { has_trait = typhus } - has_trait = typhus - } - trigger_else_if = { - limit = { has_trait = ergotism } - has_trait = ergotism - } - trigger_else_if = { - limit = { has_trait = consumption } - has_trait = consumption - } - trigger_else_if = { - limit = { has_trait = bubonic_plague } - has_trait = bubonic_plague - } - trigger_else_if = { - limit = { has_trait = scaly } - has_trait = scaly - } - trigger_else_if = { - limit = { has_trait = albino } - has_trait = albino - } - trigger_else_if = { - limit = { has_trait = disfigured } - has_trait = disfigured - } - trigger_else_if = { - limit = { has_trait = great_pox } - has_trait = great_pox - } - trigger_else_if = { - limit = { has_trait = leper } - has_trait = leper - } - trigger_else_if = { - limit = { has_trait = maimed } - has_trait = maimed - } - trigger_else_if = { - limit = { has_trait = clubfooted } - has_trait = clubfooted - } - trigger_else_if = { - limit = { has_trait = hunchbacked } - has_trait = hunchbacked - } - trigger_else_if = { - limit = { has_trait = dwarf } - has_trait = dwarf - } - trigger_else_if = { - limit = { has_trait = spindly } - has_trait = spindly - } - trigger_else_if = { - limit = { has_trait = one_legged } - has_trait = one_legged - } - trigger_else_if = { - limit = { has_trait = blind } - has_trait = blind - } - trigger_else_if = { - limit = { has_trait = dysentery } - has_trait = dysentery - } - trigger_else_if = { - limit = { has_trait = beauty_bad_3 } - has_trait = beauty_bad_3 - } - trigger_else_if = { - limit = { has_trait = wounded_3 } - has_trait = wounded_3 - } - trigger_else_if = { - limit = { has_character_modifier = obese_modifier } - has_character_modifier = obese_modifier - } - trigger_else = { - has_trait = ill - } -} - -############################ -# VARIOUS DISEASE TRIGGERS # -############################ - -#Takes argument disease -can_contract_disease_trigger = { - save_temporary_scope_as = sick_character_check - - # Is not immune to disease - NOT = { has_character_flag = immune_to_disease } - - #Doesn't already have the trait - NOT = { has_trait = $DISEASE$ } - - #Only get measles once - trigger_if = { - limit = { trait:$DISEASE$ = trait:measles } - NOT = { has_character_flag = measles_immunity } - } - - #Only get bubonic plague once - trigger_if = { - limit = { trait:$DISEASE$ = trait:bubonic_plague } - NOT = { has_character_flag = bubonic_immunity } - } - - #Young characters do not get gout - trigger_if = { - limit = { trait:$DISEASE$ = trait:gout_ridden } - current_weight >= 50 - is_young_character = no - } - - save_temporary_scope_value_as = { - name = disease_type_for_trigger - value = flag:$DISEASE$ - } - - trigger_if = { #Lover's pox can only be contracted if you are sexually active - limit = { - scope:disease_type_for_trigger = flag:lovers_pox - is_imprisoned = yes - } - imprisoner = { - OR = { - AND = { - scope:sick_character_check = { is_in_prison_type = dungeon } - any_prisoner = { - OR = { - has_relation_lover = scope:sick_character_check - any_consort = { - this = scope:sick_character_check - } - } - } - } - AND = { - scope:sick_character_check = { is_in_prison_type = house_arrest } - OR = { - any_prisoner = { - OR = { - has_relation_lover = scope:sick_character_check - any_consort = { - this = scope:sick_character_check - } - } - } - any_courtier = { - OR = { - has_relation_lover = scope:sick_character_check - any_consort = { - this = scope:sick_character_check - } - } - } - } - } - } - } - } - - # Check to see that there is someone for you to have sex with if you are traveling - trigger_if = { - limit = { - scope:disease_type_for_trigger = flag:lovers_pox - is_travelling = yes - # Do not block Goliardic Shenanigans! - involved_activity ?= { - NOT = { has_activity_type = activity_adult_education } - } - } - current_travel_plan = { - any_entourage_character = { - OR = { - has_relation_lover = scope:sick_character_check - any_consort = { - this = scope:sick_character_check - } - } - } - } - } - - #Secondary requirements (mutually exclusive diseases or immunity) - OR = { - NOR = { #No secondary requirement - scope:disease_type_for_trigger = flag:ill - scope:disease_type_for_trigger = flag:smallpox - scope:disease_type_for_trigger = flag:bubonic_plague - } - AND = { - scope:disease_type_for_trigger = flag:ill - NOT = { has_trait = pneumonic } - } - AND = { - scope:disease_type_for_trigger = flag:smallpox - NOT = { has_character_flag = disease_immunity_smallpox } - } - AND = { - scope:disease_type_for_trigger = flag:measles - NOT = { has_character_flag = disease_immunity_measles } - } - AND = { - scope:disease_type_for_trigger = flag:bubonic_plague - NOT = { has_character_flag = disease_immunity_bubonic_plague } - } - } - - #No disease stacking - OR = { - can_get_non_epidemic_disease_trigger = yes - OR = { - scope:disease_type_for_trigger = flag:bubonic_plague - scope:disease_type_for_trigger = flag:smallpox - } - AND = { - scope:disease_type_for_trigger = flag:pneumonic - has_trait = ill - } - } - - #Cooldown is over - NOR = { - has_character_flag = contraction_cooldown_general #Haven't had a disease for 2 years - #No specific cooldowns: - #Ill, you can get it often - #Smallpox and bubonic plague, after one time you are immune - #Lover's pox and leper because you never recover - AND = { - has_character_flag = contraction_cooldown_pneumonic - scope:disease_type_for_trigger = flag:pneumonic - } - AND = { - has_character_flag = contraction_cooldown_gout_ridden - scope:disease_type_for_trigger = flag:gout_ridden - } - AND = { - has_character_flag = contraction_cooldown_typhus - scope:disease_type_for_trigger = flag:typhus - } - AND = { - has_character_flag = contraction_cooldown_consumption - scope:disease_type_for_trigger = flag:consumption - } - AND = { - has_character_flag = contraction_cooldown_cancer - scope:disease_type_for_trigger = flag:cancer - } - AND = { - has_character_flag = contraction_cooldown_great_pox - scope:disease_type_for_trigger = flag:great_pox - } - AND = { - has_character_flag = contraction_cooldown_dysentery - scope:disease_type_for_trigger = flag:dysentery - } - AND = { - has_character_flag = contraction_cooldown_ergotism - scope:disease_type_for_trigger = flag:ergotism - } - } -} - -has_any_disease_trigger = { - has_trait_with_flag = illness -} - -has_std_trigger = { - OR = { - has_trait = lovers_pox - has_trait = great_pox - has_trait = early_great_pox - } -} - -has_epidemic_disease_trigger = { - has_trait_with_flag = epidemic_disease -} - -has_contagious_disease_trigger = { #Only diseases handled by the disease_outbreak_pulse and the disease_recovery_pulse - OR = { - has_std_trigger = yes - has_trait = bubonic_plague - has_trait = smallpox - has_trait = measles - has_trait = dysentery - has_trait = consumption - has_trait = typhus - } -} - -has_yearly_recovery_disease_trigger = { - OR = { - has_trait = consumption - has_trait = cancer - has_trait = great_pox - has_trait = gout_ridden - } -} - -has_quarterly_recovery_disease_trigger = { - OR = { - - has_trait = ill - has_trait = pneumonic - has_trait = typhus - has_trait = smallpox - has_trait = bubonic_plague - } -} - -has_short_disease_trigger = { - OR = { - has_trait = ill - has_trait = typhus - has_trait = smallpox - has_trait = bubonic_plague - has_trait = ergotism - has_trait = measles - has_trait = dysentery - } -} - -has_serious_disease_trigger = { - has_trait_with_flag = debilitating_illness -} -has_insect_carried_disease_trigger = { - OR = { - has_trait = bubonic_plague - has_trait = typhus - } -} - -############################ -# COURT PHYSICIAN TRIGGERS # -############################ - -court_physician_available_trigger = { - court_owner ?= { - employs_court_position = court_physician_court_position - any_court_position_holder = { - type = court_physician_court_position - is_physically_able = yes - } - } - # If you're traveling, we check that there is a court physician with you - court_physician_available_when_traveling_trigger = yes -} - -court_physician_available_when_traveling_trigger = { - trigger_if = { - limit = { is_travelling = yes } - current_travel_plan = { - any_entourage_character = { - has_court_position = court_physician_court_position - } - } - } -} - -can_be_court_physician_of = { - is_courtier_of = $EMPLOYER$ - is_adult = yes - basic_is_available_ai = yes - NOT = { has_trait = incapable } -} - -can_punish_court_physician = { - save_temporary_scope_as = court_physician_punisher - $PHYSICIAN$ = { - is_alive = yes - target_is_liege_or_above = scope:court_physician_punisher - } -} - -character_can_easily_self_treat_trigger = { - OR = { - # Understand medicine implicitly. - has_trait = lifestyle_physician - has_trait = lifestyle_herbalist - has_trait = devoted - ## Truly, obscenely high learning means your general knowledge is good enough for anything even if you aren't specifically an expert on it. - learning >= 35 - # Understands medicine if learning is high enough. - AND = { - learning >= high_skill_rating - OR = { - has_trait = lifestyle_gardener - has_trait = lifestyle_traveler - } - } - # Might understand medicine if learning is really, really high. - AND = { - learning >= very_high_skill_rating - OR = { - has_trait = intrigue_court_2 - has_trait = scholarly_court_2 - } - } - AND = { - learning >= extremely_high_skill_rating - OR = { - has_trait = intrigue_court_1 - has_trait = scholarly_court_1 - } - } - } -} - -###################### -# TREATMENT TRIGGERS # -###################### - -has_treatable_disease_trigger = { - OR = { - has_trait = consumption - has_trait = cancer - has_trait = great_pox - has_trait = gout_ridden - has_trait = ill - has_trait = pneumonic - has_trait = typhus - has_trait = smallpox - has_trait = bubonic_plague - has_trait = leper - has_trait = measles - has_trait = dysentery - has_trait = ergotism - } -} - -has_wounds_trigger = { - OR = { - has_trait_rank = { - trait = wounded - rank >= 2 - } - has_character_modifier = infected_wound_modifier - has_character_modifier = gangrene_modifier - } -} - -has_good_disease_treatment_trigger = { - OR = { - has_character_modifier = safe_disease_treatment_success_high_modifier - has_character_modifier = safe_disease_treatment_success_low_modifier - has_character_modifier = risky_disease_treatment_success_high_modifier - has_character_modifier = risky_disease_treatment_success_low_modifier - } -} - -has_recent_treatment_trigger = { - OR = { - has_character_modifier = safe_disease_treatment_success_high_modifier - has_character_modifier = safe_disease_treatment_success_low_modifier - has_character_modifier = safe_disease_treatment_failure_modifier - has_character_modifier = risky_disease_treatment_success_high_modifier - has_character_modifier = risky_disease_treatment_success_low_modifier - has_character_modifier = risky_disease_treatment_failure_modifier - } -} - -has_recent_wound_treatment_trigger = { - OR = { - has_character_modifier = safe_wound_treatment_success_high_modifier - has_character_modifier = safe_wound_treatment_success_low_modifier - has_character_modifier = safe_wound_treatment_failure_modifier - has_character_modifier = risky_wound_treatment_success_modifier - has_character_modifier = risky_wound_treatment_failure_modifier - } -} - - -has_amputation_type_disease_trigger = { - exists = scope:disease_type - OR = { - scope:disease_type = flag:gout_ridden - scope:disease_type = flag:leper - scope:disease_type = flag:cancer - } -} - -has_disfigurement_type_disease_trigger = { - exists = scope:disease_type - OR = { - scope:disease_type = flag:bubonic_plague - scope:disease_type = flag:smallpox - scope:disease_type = flag:measles - scope:disease_type = flag:dysentery - scope:disease_type = flag:ergotism - scope:disease_type = flag:leper - scope:disease_type = flag:cancer - } -} - - -has_short_disease_type_trigger = { - OR = { - scope:disease_type = flag:ill - scope:disease_type = flag:pneumonic #3 - scope:disease_type = flag:measles #3 - scope:disease_type = flag:dysentery #3.5 - scope:disease_type = flag:ergotism #3.5 - scope:disease_type = flag:typhus #3.5 - scope:disease_type = flag:smallpox #3.5 - scope:disease_type = flag:bubonic_plague #6.5 - } -} - -has_slow_disease_type_trigger = { - OR = { - scope:disease_type = flag:consumption #2 - scope:disease_type = flag:cancer #3 - scope:disease_type = flag:great_pox #1 - scope:disease_type = flag:gout_ridden #1.5 - scope:disease_type = flag:leper #1.5 - } -} - -has_high_health_penalty_disease_type_trigger = { # >= 3.5 - OR = { - ### TYPHUS - scope:disease_type = flag:typhus #4.5 + 1 - ### SMALLPOX - scope:disease_type = flag:smallpox #4.5 + 1.5 - ### BUBONIC PLAGUE - scope:disease_type = flag:bubonic_plague #7 + 2 - ### DYSENTERY - scope:disease_type = flag:dysentery #3.5 + 2 - ### ERGOTISM - scope:disease_type = flag:ergotism #3.5 - ### CONSUMPTION - AND = { - scope:disease_type = flag:consumption #2 + 1 + 2 - is_old_character = yes - } - ### CANCER - AND = { - scope:disease_type = flag:cancer #3 + 1 - is_old_character = yes - } - ### MEASLES - AND = { - scope:disease_type = flag:measles #3 + 3 - is_old_character = yes - } - ### PNEUMONIA - AND = { - scope:disease_type = flag:pneumonic #3 + 2 - is_old_character = yes - } - } -} - -has_low_health_penalty_disease_type_trigger = { # < 3.5 - OR = { - ## ILL - scope:disease_type = flag:ill #1 + 1 - ### GREAT POX - scope:disease_type = flag:great_pox #1 - ### GOUT - scope:disease_type = flag:gout_ridden #1 - ### LEPROSY - scope:disease_type = flag:leper #1.5 - ### CONSUMPTION - AND = { - scope:disease_type = flag:consumption #2 + 1 + 2 - is_old_character = no - } - ### CANCER - AND = { - scope:disease_type = flag:cancer #3 + 1 - is_old_character = no - } - ### MEASLES - AND = { - scope:disease_type = flag:measles #3 + 3 - is_old_character = no - } - ### PNEUMONIA - AND = { - scope:disease_type = flag:pneumonic #3 + 2 - is_old_character = no - } - } -} - -minor_disease_flag_for_notification_trigger = { - OR = { - scope:disease_type = flag:ill - scope:disease_type = flag:gout_ridden - scope:disease_type = flag:lovers_pox - scope:disease_type = flag:early_great_pox - } -} - -sick_enough_for_relative_to_care_trigger = { - #For this list of diseases, you need to be dying - trigger_if = { - limit = { - exists = scope:disease_type - minor_disease_flag_for_notification_trigger = yes - } - health < death_chance_dying_health - } - #For all others we always notify - trigger_else = { - always = yes - } -} - -liege_is_responsible_for_treatment_trigger = { - is_ruler = no - exists = liege - OR = { - trigger_if = { - limit = { exists = liege.primary_spouse } - this = liege.primary_spouse - } - trigger_if = { - limit = { exists = liege.player_heir } - this = liege.player_heir - } - } -} - -liege_picks_treatment_trigger = { - save_temporary_scope_as = pick_treatment_check - exists = liege - liege_is_responsible_for_treatment_trigger = yes - trigger_if = { - limit = { exists = scope:disease_type } - sick_enough_for_relative_to_care_trigger = yes - } -} - -root_picks_treatment_for_sick_character_trigger = { - scope:sick_character = { liege_picks_treatment_trigger = yes } - scope:sick_character = { liege = { this = root } } -} - -has_infected_or_gangrenous_wound_trigger = { - OR = { - has_character_modifier = gangrene_modifier - has_character_modifier = infected_wound_modifier - } -} - -inform_about_relative_recovery_trigger = { - is_ruler = yes - OR = { - scope:disease_type = flag:lovers_pox #Because it has an effect (removes rejected from bed modifier) - scope:disease_type = flag:early_great_pox #Because it has an effect (removes rejected from bed modifier) - scope:disease_type = flag:great_pox #Because it has an effect (removes rejected from bed modifier) - AND = { - is_ai = no - OR = { - NOT = { minor_disease_flag_for_notification_trigger = yes } #I.e. it's an important disease - scope:sick_character = { - is_target_in_variable_list = { #The character got an event when sick character got sick and needs to be updated - name = recovery_event_receivers - target = prev - } - } - } - } - } -} - -has_health_court_owner_trigger = { #Should match save_health_court_owner_effect - trigger_if = { - limit = { - exists = imprisoner - } - always = yes - imprisoner = { save_temporary_scope_as = trigger_health_court_owner } - } - trigger_else_if = { - limit = { exists = host } - always = yes - host = { save_temporary_scope_as = trigger_health_court_owner } - } - trigger_else = { - always = no - } -} - -court_physician_can_fail_on_purpose_trigger = { - scope:physician = { - dread_modified_ai_boldness = { - dreaded_character = scope:sick_character - value > 0 - } - } - OR = { - reverse_opinion = { - target = scope:physician - value < 0 - } - has_relation_rival = scope:physician - has_relation_potential_rival = scope:physician - } - scope:physician != scope:sick_character -} - -has_traits_that_negate_athletic_trigger = { #Are we already athletic or does any of our traits contradict athletic? - OR = { - has_trait = athletic - has_trait = lazy - has_trait = infirm - has_trait = incapable - } -} - -#Did this character's culture or area have any evidence of practicing trepanning? -native_trepanning_trigger = { - OR = { - root.culture = { - OR = { - has_cultural_pillar = heritage_east_african - has_cultural_pillar = heritage_west_slavic - has_cultural_pillar = heritage_central_germanic - has_cultural_pillar = heritage_west_germanic - has_cultural_pillar = heritage_dravidian - has_cultural_pillar = heritage_indo_aryan - } - } - root.faith = faith:armenian_apostolic - root.culture = culture:armenian - has_title = title:k_hungary - has_title = title:k_cuman - root.capital_province = { - OR = { - geographical_region = ghw_region_mediterranean - geographical_region = ghw_region_anatolia - geographical_region = world_europe_west_germania - geographical_region = world_europe_west - geographical_region = world_africa_north_east - geographical_region = custom_slavia - geographical_region = world_india - } - } - } -} - -#Has this character already developed immunity to the epidemic? -immune_to_epidemic = { - NOT = { - is_target_in_variable_list = { - name = immunised_plagues - target = $EPIDEMIC$ - } - } -} - -# I'm putting this here because I refuse to make a "hair_triggers.txt" file. -is_bald_trigger = { - OR = { - # As it transpires, we actually cannot use this trigger here. - #has_gene = { - # category = gene_baldness - # template = male_pattern_baldness - #} - has_character_modifier = hajj_halq_modifier - has_character_modifier = shaven_bald_modifier - } -} diff --git a/N3OW/common/scripted_triggers/great_project_triggers.txt b/N3OW/common/scripted_triggers/great_project_triggers.txt deleted file mode 100644 index 779b4b0b..00000000 --- a/N3OW/common/scripted_triggers/great_project_triggers.txt +++ /dev/null @@ -1,20 +0,0 @@ - -is_owner_only_contribution_trigger = { - OR = { - contribution_id = rite_of_worthiness - contribution_id = creation_aspect - contribution_id = serenity_aspect - contribution_id = destruction_aspect - contribution_id = trickery_aspect - contribution_id = family_shrine - contribution_id = family_statues - contribution_id = family_temple_compound - contribution_id = family_temple_complex - contribution_id = dynastic_temple_complex - } -} - -is_unfunded_required_contribution_trigger = { - contribution_is_funded = no - contribution_is_required = yes -} diff --git a/N3OW/common/scripted_triggers/mpo_scripted_triggers.txt b/N3OW/common/scripted_triggers/mpo_scripted_triggers.txt deleted file mode 100644 index ec851386..00000000 --- a/N3OW/common/scripted_triggers/mpo_scripted_triggers.txt +++ /dev/null @@ -1,1884 +0,0 @@ -################################################# -# TRIGGER LIST # -################################################# - -valid_confederation_member_trigger = { - is_playable_character = yes - is_tributary = no - is_landed = yes - is_independent_ruler = yes - is_alive = yes - NOR = { - has_trait = conqueror - has_trait = greatest_of_khans - is_at_war_with = $CHARACTER$ - is_at_war_with = $CHARACTER$.top_liege - custom_tooltip = { - text = no_raiding_hostility_tt - $CHARACTER$ = { - is_causing_raid_hostility_towards = prev - } - } - } - highest_held_title_tier <= tier_duchy - trigger_if = { - limit = { - government_has_flag = government_is_nomadic - } - custom_tooltip = { - text = low_authority_tt - OR = { - has_realm_law = nomadic_authority_1 - has_realm_law = nomadic_authority_2 - } - } - } - custom_tooltip = { - OR = { - government_has_flag = government_is_tribal - government_has_flag = government_is_nomadic - } - text = is_nomadic_or_tribal_tt - } - is_confederation_member = no -} - -confedration_foe_sub_trigger = { - NOT = { is_allied_to = $CHARACTER$ } - OR = { - has_trait = conqueror - has_trait = greatest_of_khans - highest_held_title_tier >= tier_kingdom - custom_tooltip = { - text = call_for_confederation_decision_gurkhan - is_gurkhan = yes - } - custom_tooltip = { - text = considers_faith_evil_tt - faith = { - faith_hostility_level = { - target = $CHARACTER$.faith - value >= faith_evil_level - } - } - } - } - trigger_if = { - limit = { - max_military_strength > 0 - $CHARACTER$.max_military_strength > 0 - } - custom_tooltip = { - text = superior_max_military_strength_tt - confederation_worthy_foe_strength_ratio_value <= 0.5 - } - } -} - -confederation_foe_trigger = { - save_temporary_scope_as = confederate - - #NEED TO UPDATE CUSTOM TOOLTIP WHENEVER THESE TRIGGERS ARE CHANGED - custom_tooltip = { - text = confederation_threat_tt - #I'M FRICKING SERIOUS ABOUT THAT - OR = { - #Threat is in same de jure kingdom as capital county - capital_county = { - kingdom = { - any_de_jure_county = { - holder.top_liege = { - confedration_foe_sub_trigger = { CHARACTER = $CHARACTER$ } - } - } - } - } - #Threat borders you or your tributaries - any_land_neighboring_realm_with_tributaries_owner = { - confedration_foe_sub_trigger = { CHARACTER = $CHARACTER$ } - } - #You border threat's direct tributaries - any_land_neighboring_realm_with_tributaries_owner = { - exists = suzerain - suzerain = { - confedration_foe_sub_trigger = { CHARACTER = $CHARACTER$ } - } - } - #You border threat's lower level tributaries - any_land_neighboring_realm_with_tributaries_owner = { - is_tributary = yes - top_suzerain = { - confedration_foe_sub_trigger = { CHARACTER = $CHARACTER$ } - } - } - } - } -} - -confederation_neighboring_foe_trigger = { - save_temporary_scope_as = confederate - is_confederation_member = no - OR = { - #Threat borders you or your tributaries - any_land_neighboring_realm_with_tributaries_owner = { - confedration_foe_sub_trigger = { CHARACTER = $CHARACTER$ } - } - #You border threat's direct tributaries - any_land_neighboring_realm_with_tributaries_owner = { - exists = suzerain - suzerain = { - confedration_foe_sub_trigger = { CHARACTER = $CHARACTER$ } - } - } - #You border threat's lower level tributaries - any_land_neighboring_realm_with_tributaries_owner = { - is_tributary = yes - top_suzerain = { - confedration_foe_sub_trigger = { CHARACTER = $CHARACTER$ } - } - } - } - -} - -mpo_important_beheaded_warrior_trigger = { - OR = { - scope:beheaded_warrior = { - is_consort_of = root - } - scope:beheaded_warrior = { - is_close_family_of = root - } - has_variable = beheaded_warrior_powerful_vassal - AND = { - has_variable = beheaded_warrior_accolade - var:beheaded_warrior_accolade = { - accolade_rank >= 5 - } - } - } -} - -mpo_keep_prisoners_heads_trigger = { - OR = { - faith.religion = faith:tengri_pagan.religion - has_trait = greatest_of_khans - has_trait = nomadic_philosophy - } -} - -mpo_valid_heir_friend_trigger = { - age >= 12 - opinion = { - target = $CHARACTER$ - value >= 50 - } - NOR = { - is_at_war_with = $CHARACTER$ - this = $CHARACTER$ - this = $CHARACTER$.player_heir - } - NOT = { - has_relation_blood_brother = $CHARACTER$.player_heir - } - custom_description = { - text = not_friends_with_player_heir_tt - NOR = { - has_relation_friend = $CHARACTER$.player_heir - has_relation_best_friend = $CHARACTER$.player_heir - } - } - custom_description = { - text = not_bad_relation_with_player_heir_tt - NOT = { - has_any_bad_relationship_with_character_trigger = { CHARACTER = $CHARACTER$.player_heir } - } - } - is_imprisoned = no - is_incapable = no - OR = { - custom_description = { - text = is_nomadic_tt - government_has_flag = government_is_nomadic - } - has_trait = nomadic_philosophy - } - highest_held_title_tier >= tier_county -} - -mpo_overrunner_becomes_tribal_trigger = { - scope:target = { - any_de_jure_county = { - holder.top_liege = scope:defender - add_to_temporary_list = target_counties - } - } - OR = { - #Defender is tribal and holds title - AND = { - scope:target = { - holder ?= scope:defender - } - scope:defender = { - government_has_flag = government_is_tribal - } - } - #Defender is tribal and all counties they hold are tribal - AND = { - scope:defender = { - government_has_flag = government_is_tribal - } - any_in_list = { - list = target_counties - count >= all - any_county_province = { - OR = { - has_holding_type = tribal_holding - has_holding_type = nomad_holding - has_holding_type = herder_holding - } - } - } - } - #New capital county will be tribal - trigger_if = { - limit = { - scope:target = { - title_capital_county = { - holder.top_liege = scope:defender - } - } - } - scope:target = { - title_capital_county = { - holder.top_liege = scope:defender - any_county_province = { - is_county_capital = yes - OR = { - has_holding_type = tribal_holding - has_holding_type = nomad_holding - has_holding_type = herder_holding - } - } - } - } - } - #New potential duchy capitals are tribal - trigger_else_if = { - limit = { - scope:target = { - any_direct_de_jure_vassal_title = { - tier = tier_duchy - title_capital_county = { - holder.top_liege = scope:defender - } - } - } - } - scope:target = { - any_direct_de_jure_vassal_title = { - count = all - tier = tier_duchy - title_capital_county = { - holder.top_liege = scope:defender - any_county_province = { - is_county_capital = yes - has_holding = yes - NOR = { - has_holding_type = tribal_holding - has_holding_type = nomad_holding - has_holding_type = herder_holding - } - } - } - } - } - } - #Every county is tribal - trigger_else = { - scope:target = { - any_de_jure_county = { - count >= all - holder.top_liege = scope:defender - any_county_province = { - is_county_capital = yes - NOR = { - has_holding_type = tribal_holding - has_holding_type = nomad_holding - has_holding_type = herder_holding - } - } - } - } - } - } -} - -mpo_overrunner_becomes_clan_trigger = { - scope:attacker = { - OR = { - #Personal reasons to go clan - faith.religion = religion:islam_religion - culture = { - OR = { - has_cultural_pillar = heritage_arabic - has_cultural_pillar = heritage_iranian - } - } - #Person you're taking from has clan and presence in target region - scope:defender = { - government_has_flag = government_is_clan - scope:target = { - holder ?= scope:defender - } - scope:target = { - title_capital_county = { - holder.top_liege = scope:defender - OR = { - culture = { has_cultural_pillar = heritage_arabic } - culture = { has_cultural_pillar = heritage_iranian } - faith.religion = religion:islam_religion - } - } - } - } - #Solid islamic presence in target region - trigger_if = { - limit = { - scope:defender = { - any_realm_de_jure_duchy = { - kingdom = scope:target - title_capital_county = { - holder.top_liege = scope:defender - } - } - } - } - scope:defender = { - any_realm_de_jure_duchy = { - count = all - kingdom = scope:target - title_capital_county = { - holder.top_liege = scope:defender - OR = { - culture = { has_cultural_pillar = heritage_arabic } - culture = { has_cultural_pillar = heritage_iranian } - faith.religion = religion:islam_religion - } - } - - } - } - } - #Every county is islamic - trigger_else = { - scope:target = { - any_de_jure_county = { - count = all - holder.top_liege = scope:defender - OR = { - culture = { has_cultural_pillar = heritage_arabic } - culture = { has_cultural_pillar = heritage_iranian } - faith.religion = religion:islam_religion - } - } - } - } - - } - } -} - -mpo_overrunner_becomes_tribal_desc_trigger = { - any_in_list = { - list = target_titles - tier = tier_kingdom - any_de_jure_county = { - holder.top_liege = scope:defender - add_to_temporary_list = target_counties - } - } - OR = { - #Defender is tribal and holds title - AND = { - any_in_list = { - list = target_titles - tier = tier_kingdom - holder ?= scope:defender - } - scope:defender = { - government_has_flag = government_is_tribal - } - } - #Defender is tribal and all counties they hold are tribal - AND = { - scope:defender = { - government_has_flag = government_is_tribal - } - any_in_list = { - list = target_counties - count >= all - any_county_province = { - OR = { - has_holding_type = tribal_holding - has_holding_type = nomad_holding - has_holding_type = herder_holding - } - } - } - } - #New capital county will be tribal - trigger_if = { - limit = { - any_in_list = { - list = target_titles - tier = tier_kingdom - title_capital_county = { - holder.top_liege = scope:defender - } - } - } - any_in_list = { - list = target_titles - tier = tier_kingdom - title_capital_county = { - holder.top_liege = scope:defender - any_county_province = { - is_county_capital = yes - OR = { - has_holding_type = tribal_holding - has_holding_type = nomad_holding - has_holding_type = herder_holding - } - } - } - } - } - #New potential duchy capitals are tribal - trigger_else_if = { - limit = { - any_in_list = { - list = target_titles - tier = tier_kingdom - any_direct_de_jure_vassal_title = { - tier = tier_duchy - title_capital_county = { - holder.top_liege = scope:defender - } - } - } - } - any_in_list = { - list = target_titles - tier = tier_kingdom - any_direct_de_jure_vassal_title = { - count = all - tier = tier_duchy - title_capital_county = { - holder.top_liege = scope:defender - any_county_province = { - is_county_capital = yes - has_holding = yes - NOR = { - has_holding_type = tribal_holding - has_holding_type = nomad_holding - has_holding_type = herder_holding - } - } - } - } - } - } - #Every county is tribal - trigger_else = { - any_in_list = { - list = target_titles - tier = tier_kingdom - any_de_jure_county = { - count >= all - holder.top_liege = scope:defender - any_county_province = { - is_county_capital = yes - NOR = { - has_holding_type = tribal_holding - has_holding_type = nomad_holding - has_holding_type = herder_holding - } - } - } - } - } - } -} - -mpo_overrunner_becomes_clan_desc_trigger = { - scope:attacker = { - OR = { - #Personal reasons to go clan - faith.religion = religion:islam_religion - culture = { - OR = { - has_cultural_pillar = heritage_arabic - has_cultural_pillar = heritage_iranian - } - } - #Person you're taking from has clan and presence in target region - scope:defender = { - government_has_flag = government_is_clan - any_in_list = { - list = target_titles - tier = tier_kingdom - holder ?= scope:defender - } - any_in_list = { - list = target_titles - tier = tier_kingdom - title_capital_county = { - holder.top_liege = scope:defender - OR = { - culture = { has_cultural_pillar = heritage_arabic } - culture = { has_cultural_pillar = heritage_iranian } - faith.religion = religion:islam_religion - } - } - } - } - #Solid islamic presence in target region - trigger_if = { - limit = { - scope:defender = { - any_realm_de_jure_duchy = { - kingdom = { - is_in_list = target_titles - } - title_capital_county = { - holder.top_liege = scope:defender - } - } - } - } - scope:defender = { - any_realm_de_jure_duchy = { - count = all - kingdom = { - is_in_list = target_titles - } - title_capital_county = { - holder.top_liege = scope:defender - OR = { - culture = { has_cultural_pillar = heritage_arabic } - culture = { has_cultural_pillar = heritage_iranian } - faith.religion = religion:islam_religion - } - } - - } - } - } - #Every county is islamic - trigger_else = { - any_in_list = { - list = target_titles - tier = tier_kingdom - any_de_jure_county = { - count = all - holder.top_liege = scope:defender - OR = { - culture = { has_cultural_pillar = heritage_arabic } - culture = { has_cultural_pillar = heritage_iranian } - faith.religion = religion:islam_religion - } - } - } - } - - } - } -} - -mpo_overrunning_willing_vassal_trigger = { - is_ai = yes - OR = { - opinion = { - target = liege - value >= 50 - } - culture = liege.culture - is_obedient_to = liege - AND = { - is_close_family_of = liege - opinion = { - target = liege - value > 0 - } - } - } - highest_held_title_tier >= tier_county - government_has_flag = government_is_nomadic - highest_held_title_tier < tier_kingdom - NOT = { government_has_flag = government_is_herder } -} - -is_tsagaan_sar = { - scope:activity = { - has_activity_option = { - category = special_type - option = feast_type_tsagaan_sar - } - } -} -has_eligible_artifact_trigger = { - any_artifact = { - artifact_owner = root - NOR = { - has_variable = banner_house - has_variable = banner_dynasty - has_variable = 1025_treasure_map - } - count >= 2 - } -} - -can_gift_anything_trigger = { - OR = { - short_term_gold >= miniscule_gold_value - AND = { - domicile ?= { herd >= twenty_percent_herd_value } - involved_activity.activity_host = { - domicile ?= { herd < max_herd } - } - } - any_artifact = { - artifact_owner = root - NOR = { - has_variable = banner_house - has_variable = banner_dynasty - has_variable = 1025_treasure_map - } - count >= 2 - } - } -} - -mpo_valid_dead_husband_trigger = { - government_has_flag = government_is_nomadic - is_married = yes - is_male = yes - primary_spouse = { - is_adult = yes - NOR = { - is_imprisoned = yes - has_contagious_deadly_disease_trigger = yes - has_trait = incapable - is_ruler = yes - has_trait = celibate - has_trait = devoted - } - save_temporary_scope_as = widow - } - trigger_if = { - limit = { - is_ruler = yes - } - OR = { - NOT = { - exists = primary_heir - } - primary_heir = { - is_ai = yes - } - primary_heir = { - mpo_valid_widow_marrier_trigger = yes - } - } - - } -} - - -mpo_valid_widow_marrier_trigger = { - #Is a playable character or primary_heir - OR = { - root.primary_heir ?= this - AND = { - highest_held_title_tier >= tier_county - is_playable_character = yes - OR = { - #Root is wandering landless - root = { - is_ruler = no - NOT = { - exists = liege - } - } - #Is root's liege - root.liege ?= this - #Is root's top liege - root.top_liege ?= this - #root has no primary heir - NOT = { - exists = root.primary_heir - } - #root's primary heir is not of house - NOT = { - exists = root.primary_heir.house - } - AND = { - exists = root.house - NOT = { - root.house = root.primary_heir.house - } - } - } - - } - } - - OR = { - has_trait = nomadic_philosophy - culture = { - has_cultural_pillar = heritage_mongolic - } - culture = { - has_cultural_pillar = heritage_turkic - } - faith.religion = faith:tengri_pagan.religion - } - #Can have multiple wives or concubines - faith = { - OR = { - has_doctrine = doctrine_polygamy - has_doctrine = doctrine_concubines - } - } - is_male = yes - is_adult = yes - NOR = { - has_trait = celibate - has_trait = eunuch - has_trait = devoted - } - #Has a free slot for a wife or concubine - OR = { - allowed_more_spouses = yes - allowed_more_concubines = yes - } - #Can marry the widow - NOT = { - relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = scope:widow } - } -} - -mpo_nomads_camel_culture_trigger = { - culture = { - OR = { - has_cultural_tradition = tradition_dryland_dwellers - has_cultural_tradition = tradition_warriors_of_the_dry - has_cultural_tradition = tradition_desert_ribat - has_cultural_tradition = tradition_desert_nomads - has_cultural_tradition = tradition_fp3_irrigation_experts - has_cultural_tradition = tradition_mubarizuns - has_cultural_tradition = tradition_saharan_nomads - } - } -} - -mpo_nomads_sheep_culture_trigger = { - culture = { - OR = { - has_cultural_tradition = tradition_amharic_highlanders - has_cultural_tradition = tradition_dryland_dwellers - has_cultural_tradition = tradition_hill_dwellers - has_cultural_tradition = tradition_mountain_homes - has_cultural_tradition = tradition_highland_warriors - has_cultural_tradition = tradition_mountaineers - has_cultural_tradition = tradition_culinary_art - has_cultural_tradition = tradition_festivities - has_cultural_tradition = tradition_sacred_mountains - has_cultural_tradition = tradition_himalayan_settlers - has_cultural_tradition = tradition_ep3_indomitable_azatani - has_cultural_tradition = tradition_caucasian_wolves - has_cultural_tradition = tradition_fp3_irrigation_experts - has_cultural_tradition = tradition_mountain_herding - has_cultural_tradition = tradition_horn_mountain_skirmishing - has_cultural_tradition = tradition_mountaineer_ruralism - has_cultural_tradition = tradition_upland_skirmishing - } - } -} -mpo_nomads_hunting_culture_trigger = { - culture = { - OR = { - has_cultural_tradition = tradition_forest_folk - has_cultural_tradition = tradition_jungle_dwellers - has_cultural_tradition = tradition_wetlanders - has_cultural_tradition = tradition_forest_fighters - has_cultural_tradition = tradition_jungle_warriors - has_cultural_tradition = tradition_ep2_avid_falconers - has_cultural_tradition = tradition_hunters - has_cultural_tradition = tradition_sacred_groves - has_cultural_tradition = tradition_sacred_hunts - has_cultural_tradition = tradition_bush_hunting - has_cultural_tradition = tradition_forest_wardens - } - } -} -mpo_nomads_horse_culture_trigger = { - culture = { - OR = { - has_cultural_tradition = tradition_pastoralists - has_cultural_tradition = tradition_hit_and_run - has_cultural_tradition = tradition_vegetarianism - has_cultural_tradition = tradition_ep3_audacious_cadets - has_cultural_tradition = tradition_fp3_fierce_independence - has_cultural_tradition = tradition_fp3_frontier_warriors - has_cultural_tradition = tradition_ep3_indomitable_azatani - has_cultural_tradition = tradition_caucasian_wolves - has_cultural_tradition = tradition_hussar - has_cultural_tradition = tradition_roman_legacy - has_cultural_tradition = tradition_horse_breeder - has_cultural_tradition = tradition_chivalry - } - } -} - -is_similar_age_trigger = { - $CHARACTER$ = { - age >= root.age_minus_ten - age <= root.age_plus_ten - } -} - -mpo_lower_nomad_authority_trigger = { - OR = { - AND = { - has_realm_law = nomadic_authority_1 - $CHARACTER$ = { - OR = { - has_realm_law = nomadic_authority_2 - has_realm_law = nomadic_authority_3 - has_realm_law = nomadic_authority_4 - has_realm_law = nomadic_authority_5 - } - } - } - AND = { - has_realm_law = nomadic_authority_2 - $CHARACTER$ = { - OR = { - has_realm_law = nomadic_authority_3 - has_realm_law = nomadic_authority_4 - has_realm_law = nomadic_authority_5 - } - } - } - AND = { - has_realm_law = nomadic_authority_3 - $CHARACTER$ = { - OR = { - has_realm_law = nomadic_authority_4 - has_realm_law = nomadic_authority_5 - } - } - } - AND = { - has_realm_law = nomadic_authority_4 - $CHARACTER$ = { - has_realm_law = nomadic_authority_5 - } - } - } -} - -mpo_can_recruit_nomad_maa_trigger = { - OR = { - government_has_flag = government_is_nomadic - has_trait = nomadic_philosophy - } -} - -mpo_can_recruit_nomad_heavy_cavalry_maa_trigger = { - OR = { - AND = { - government_has_flag = government_is_nomadic - has_realm_law_flag = unlock_maa_nomad_lancers - } - AND = { - NOT = { - government_has_flag = government_is_nomadic - } - has_trait = nomadic_philosophy - } - } -} - -can_have_tributaries_trigger = { - has_realm_law_flag = can_have_tributaries - is_independent_ruler = yes - NOT = { government_has_flag = government_is_herder } -} - -can_get_tributaries_peacefully_trigger = { - can_have_tributaries_trigger = yes - OR = { - government_allows = obedience # nomads and steppe admins - AND = { - government_has_flag = government_is_celestial - highest_held_title_tier = tier_hegemony - } - government_has_flag = government_is_mandala - } -} - -mpo_valid_for_blood_brotherhood_trigger = { - OR = { - government_has_flag = government_is_nomadic - has_trait = nomadic_philosophy - } -} - -mpo_can_be_blood_brothers_trigger = { - #If one is a child, the other must be a child - trigger_if = { - limit = { - $CHARACTER_1$ = { - is_adult = no - } - } - $CHARACTER_1$ = { - is_adult = yes - } - } - trigger_if = { - limit = { - $CHARACTER_2$ = { - is_adult = no - } - } - $CHARACTER_2$ = { - is_adult = yes - } - } - #They can't be related enough to be allies - NOR = { - #Ruler is married to other ruler. - $CHARACTER_1$ = { is_spouse_of = $CHARACTER_2$ } - #Ruler is relative of other ruler - $CHARACTER_1$ = { is_parent_of = $CHARACTER_2$ } - $CHARACTER_1$ = { is_grandparent_of = $CHARACTER_2$ } - $CHARACTER_1$ = { is_great_grandparent_of = $CHARACTER_2$ } - $CHARACTER_1$ = { is_child_of = $CHARACTER_2$ } - $CHARACTER_1$ = { is_grandchild_of = $CHARACTER_2$ } - $CHARACTER_1$ = { is_great_grandchild_of = $CHARACTER_2$ } - $CHARACTER_1$ = { is_uncle_or_aunt_of = $CHARACTER_2$ } - $CHARACTER_1$ = { is_nibling_of = $CHARACTER_2$ } - $CHARACTER_1$ = { is_sibling_of = $CHARACTER_2$ } - } - - # We can't do most of the standard checks for can_set_relation_best_friend_trigger, but we do the relevant ones individually. - custom_tooltip = { - text = make_blood_brother_interaction.tt.already_blood_brothers - $CHARACTER_1$ = { - NOT = { has_relation_blood_brother = $CHARACTER_2$ } - } - } - trigger_if = { - limit = { - NOT = { - $CHARACTER_1$ = { has_relation_blood_brother = $CHARACTER_2$ } - } - } - custom_tooltip = { - text = make_blood_brother_interaction.tt.actor_has_blood_brother - $CHARACTER_1$ = { num_of_relation_blood_brother = 0 } - } - } - trigger_if = { - limit = { - NOT = { - $CHARACTER_2$ = { has_relation_blood_brother = $CHARACTER_1$ } - } - } - custom_tooltip = { - text = make_blood_brother_interaction.tt.recipient_has_blood_brother - $CHARACTER_2$ = { num_of_relation_blood_brother = 0 } - } - } - trigger_if = { - limit = { - $CHARACTER_1$ = { - is_at_war = yes - } - } - $CHARACTER_1$ = { - NOR = { - is_at_war_with = $CHARACTER_2$ - custom_tooltip = { - text = make_blood_brother_at_war_with_recipient_ally - any_war_enemy = { - is_allied_to = $CHARACTER_2$ - } - } - } - } - } - trigger_if = { - limit = { - $CHARACTER_2$ = { - is_at_war = yes - } - } - $CHARACTER_2$ = { - NOR = { - is_at_war_with = $CHARACTER_1$ - custom_tooltip = { - text = make_blood_brother_at_war_with_actor_ally - any_war_enemy = { - is_allied_to = $CHARACTER_1$ - } - } - } - } - } - #Can only do intergender if gender laws are equal or both are rulers - trigger_if = { - limit = { - OR = { - AND = { - $CHARACTER_1$ = { - is_male = yes - } - $CHARACTER_2$ = { - is_female = yes - } - } - AND = { - $CHARACTER_2$ = { - is_male = yes - } - $CHARACTER_1$ = { - is_female = yes - } - } - } - $CHARACTER_1$.faith = { - NOT = { has_doctrine_parameter = gender_equal_law } - } - } - custom_tooltip = { - text = make_blood_brother_interaction_intergender_req - AND = { - $CHARACTER_1$ = { - is_ruler = yes - } - $CHARACTER_2$ = { - is_ruler = yes - } - } - } - } -} - -mpo_blood_brother_common_enemy_sub_trigger = { - NOR = { - this = scope:recipient - this = scope:actor - } - OR = { - #Rival of common foe - has_relation_rival = scope:recipient - #Is at war with common foe, you're not involved - AND = { - NOT = { has_variable = rebel_leader_peasants } - save_temporary_scope_as = root_temp - any_character_war = { - is_war_leader = scope:root_temp - is_war_leader = scope:recipient - } - } - #Is in a faction against common foe - any_targeting_faction = { - any_faction_member = { - this = scope:recipient - } - } - #common foe is in a faction against recipient - AND = { - is_independent_ruler = no - save_temporary_scope_as = rival_temp - liege ?= { - any_targeting_faction = { - any_faction_member = { this = scope:rival_temp } - } - } - } - #Recipient is title claimant against common foe - any_held_title = { - save_temporary_scope_as = title_temp - scope:recipient = { has_claim_on = scope:title_temp } - NOT = { - scope:actor = { has_claim_on = scope:title_temp } - } - } - #common foe is title claimant against recipient - any_claim = { - save_temporary_scope_as = claim_temp - holder ?= scope:recipient - NOT = { - scope:actor = { has_claim_on = scope:claim_temp } - } - } - #Has house feud with common foe's house - AND = { - exists = house.house_head - exists = scope:recipient.house - exists = scope:actor.house - NOR = { - house = scope:actor.house - house = scope:recipient.house - scope:actor.house = scope:recipient.house - } - house = { - any_house_relation = { - has_house_relation_level = feud - any_relation_house = { this = scope:recipient.house } - } - } - } - } -} - -mpo_blood_brother_common_enemy_trigger = { - scope:actor = { - OR = { - #You have a rival that recipient is also opposed to - any_relation = { - type = rival - mpo_blood_brother_common_enemy_sub_trigger = yes - } - #You are at war with someone that recipient is also opposed to - any_war_enemy = { - NOT = { has_variable = rebel_leader_peasants } - any_character_war = { - is_war_leader = prev - is_war_leader = scope:actor - } - mpo_blood_brother_common_enemy_sub_trigger = yes - } - #You are in a faction against someone that recipient is also opposed to - liege ?= { - any_targeting_faction = { - any_faction_member = { - this = scope:actor - } - } - mpo_blood_brother_common_enemy_sub_trigger = yes - } - #You have a faction member that recipient is also opposed to - any_targeting_faction = { - any_faction_member = { - mpo_blood_brother_common_enemy_sub_trigger = yes - } - } - #You have a title claimant that recipient is also opposed to - any_held_title = { - NOT = { - scope:recipient = { - has_claim_on = prev - } - } - any_claimant = { - mpo_blood_brother_common_enemy_sub_trigger = yes - } - } - #You are a title claimant against someone recipient is also opposed to - any_claim = { - exists = holder - NOT = { - scope:recipient = { has_claim_on = prev } - } - holder = { - mpo_blood_brother_common_enemy_sub_trigger = yes - } - } - #You have a house feud against someone recipient is also opposed to - AND = { - exists = house.house_head - exists = scope:recipient.house - NOT = { - house = scope:recipient.house - } - house = { - any_house_relation = { - has_house_relation_level = feud - any_relation_house = { - house_head = { mpo_blood_brother_common_enemy_sub_trigger = yes } - } - } - } - } - } - } -} - -mpo_blood_brother_reason_memory_trigger = { - OR = { - has_memory_type = was_adopted - has_memory_type = adopted_a_child - has_memory_type = friend_granted_my_claim - has_memory_type = match_made - has_memory_type = completed_pilgrimage_friend - has_memory_type = noble_family_adopted - has_memory_type = was_noble_family_adopted - has_memory_type = adventurer_family_adopted - has_memory_type = was_adventurer_family_adopted - has_memory_type = saved_someone_from_a_bull_memory - has_memory_type = knight_sacrificed_memory - has_memory_type = saved_from_assault_memory - has_memory_type = forgave_and_released_prisoner_memory - has_memory_type = rescued_fallen_victim_memory - has_memory_type = nice_fishing_trip - has_memory_type = reading_aid - has_memory_type = supported_illiterate - has_memory_type = lost_my_addiction_memory - has_memory_type = friend_despite_rivalry - has_memory_type = witnessed_death_battle_good_killer - has_memory_type = cared_for_by_host - has_memory_type = hostage_oath_of_friendship - has_memory_type = procured_estate_memory - has_memory_type = evangelized_memory - has_memory_type = was_evangelized_memory - has_memory_type = pledged_marriage - } -} - -mpo_ideal_common_foe_trigger = { - trigger_if = { - limit = { - highest_held_title_tier >= tier_kingdom - } - reverse_opinion = { - target = scope:actor - value <= 60 - } - } - trigger_else = { - highest_held_title_tier >= tier_duchy - reverse_opinion = { - target = scope:actor - value <= 20 - } - } -} - -mpo_blood_brother_august_trigger = { - prestige_level >= $OTHER_BROTHER$.prestige_level - OR = { - prestige_level >= 4 - highest_held_title_tier >= tier_kingdom - has_realm_law = nomadic_authority_4 - has_realm_law = nomadic_authority_5 - } - OR = { - highest_held_title_tier > $OTHER_BROTHER$.highest_held_title_tier - AND = { - OR = { - has_realm_law = nomadic_authority_2 - has_realm_law = nomadic_authority_3 - has_realm_law = nomadic_authority_4 - has_realm_law = nomadic_authority_5 - } - $OTHER_BROTHER$ = { - has_realm_law = nomadic_authority_1 - } - } - AND = { - OR = { - has_realm_law = nomadic_authority_3 - has_realm_law = nomadic_authority_4 - has_realm_law = nomadic_authority_5 - } - $OTHER_BROTHER$ = { - has_realm_law = nomadic_authority_2 - } - } - AND = { - OR = { - has_realm_law = nomadic_authority_4 - has_realm_law = nomadic_authority_5 - } - $OTHER_BROTHER$ = { - has_realm_law = nomadic_authority_3 - } - } - AND = { - has_realm_law = nomadic_authority_5 - $OTHER_BROTHER$ = { - has_realm_law = nomadic_authority_4 - } - } - } -} - -mpo_blood_brother_warrior_trigger = { - can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = $OTHER_BROTHER$ } - OR = { - prowess >= monumentally_high_skill_rating - AND = { - prowess >= extremely_high_skill_rating - OR = { - has_trait = lifestyle_blademaster - has_trait = education_martial_prowess_3 - has_trait = education_martial_prowess_4 - AND = { - has_trait = tourney_participant - OR = { - has_trait_xp = { - trait = tourney_participant - value >= 50 - track = foot - } - has_trait_xp = { - trait = tourney_participant - value >= 50 - track = horse - } - has_trait_xp = { - trait = tourney_participant - value >= 50 - track = bow - } - } - } - has_trait = berserker - has_trait = sadistic - has_trait = vengeful - has_trait = brave - has_trait = wrathful - has_trait = aggressive_attacker - has_trait = reaver - } - } - martial >= extremely_high_skill_rating - AND = { - OR = { - prowess >= very_high_skill_rating - has_trait = education_martial - has_lifestyle = martial_lifestyle - } - dread >= 60 - } - } -} - -mpo_blood_brother_clever_trigger = { - OR = { - has_trait = intellect_good_3 - has_trait = shrewd - learning > extremely_high_skill_rating - stewardship > extremely_high_skill_rating - intrigue > extremely_high_skill_rating - diplomacy > extremely_high_skill_rating - } -} -mpo_blood_brother_loving_trigger = { - ai_compassion > low_negative_ai_value - OR = { - has_trait = trusting - has_trait = compassionate - has_trait = generous - has_trait = loyal - has_trait = gregarious - has_trait = forgiving - has_trait = family_first - } -} - -has_bad_season_nomadic_capital_root_trigger = { - any_county_situation = { - OR = { - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_white_zud_season - situation_sub_region_has_county = root.capital_county - } - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_cold_zud_season - situation_sub_region_has_county = root.capital_county - } - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_severe_drought_season - situation_sub_region_has_county = root.capital_county - } - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_havsarsan_zud_season - situation_sub_region_has_county = root.capital_county - } - } - } -} - -has_zud_season_nomadic_capital_root_trigger = { - any_character_situation = { - OR = { - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_white_zud_season - situation_sub_region_has_county = root.capital_county - } - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_cold_zud_season - situation_sub_region_has_county = root.capital_county - } - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_havsarsan_zud_season - situation_sub_region_has_county = root.capital_county - } - } - } -} - -has_zud_season_in_county_trigger = { - any_character_situation = { - OR = { - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_white_zud_season - situation_sub_region_has_county = $COUNTY$ - } - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_cold_zud_season - situation_sub_region_has_county = $COUNTY$ - } - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_havsarsan_zud_season - situation_sub_region_has_county = $COUNTY$ - } - } - } -} - -has_bad_season_nomadic_capital_character_trigger = { - any_character_situation = { - OR = { - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_white_zud_season - situation_sub_region_has_county = $CHARACTER$.capital_county - } - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_cold_zud_season - situation_sub_region_has_county = $CHARACTER$.capital_county - } - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_severe_drought_season - situation_sub_region_has_county = $CHARACTER$.capital_county - } - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_havsarsan_zud_season - situation_sub_region_has_county = $CHARACTER$.capital_county - } - } - } -} - -has_bad_season_in_county_trigger = { - any_county_situation = { - OR = { - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_white_zud_season - situation_sub_region_has_county = $COUNTY$ - } - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_cold_zud_season - situation_sub_region_has_county = $COUNTY$ - } - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_severe_drought_season - situation_sub_region_has_county = $COUNTY$ - } - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_havsarsan_zud_season - situation_sub_region_has_county = $COUNTY$ - } - } - } -} - -has_good_season_nomadic_capital_root_trigger = { - any_character_situation = { - OR = { - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_abundant_grazing_season - situation_sub_region_has_county = root.capital_county - } - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_warm_nights_season - situation_sub_region_has_county = root.capital_county - } - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_sky_blessing_season - situation_sub_region_has_county = root.capital_county - - } - } - } -} - -has_good_season_nomadic_capital_character_trigger = { - any_character_situation = { - OR = { - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_abundant_grazing_season - situation_sub_region_has_county = $CHARACTER$.capital_county - } - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_warm_nights_season - situation_sub_region_has_county = $CHARACTER$.capital_county - } - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_sky_blessing_season - situation_sub_region_has_county = $CHARACTER$.capital_county - } - } - } -} - -has_good_season_in_county_trigger = { - any_county_situation = { - OR = { - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_abundant_grazing_season - situation_sub_region_has_county = $COUNTY$ - } - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_warm_nights_season - situation_sub_region_has_county = $COUNTY$ - } - any_situation_sub_region = { - sub_region_current_phase = situation_steppe_sky_blessing_season - situation_sub_region_has_county = $COUNTY$ - - } - } - } -} - -great_steppe_not_in_sub_region_trigger = { - situation:the_great_steppe ?= { - NOT = { - any_situation_sub_region = { - situation_sub_region_has_geographical_region = geographical_region:$REGION$ - } - } - } -} - -is_gurkhan = { - trigger_if = { - limit = { exists = situation:the_great_steppe } - this = situation:the_great_steppe.situation_top_herd - } -} - -mpo_permafrost_building_trigger = { - trigger_if = { - limit = { - county = { - has_county_modifier = mpo_siberian_permafrost_modifier - } - } - culture ?= scope:holder.culture - culture ?= { - has_cultural_tradition = tradition_mpo_northern_tribes - } - } -} - -has_raid_intent_protection = { - scope:county.duchy = { - any_in_de_jure_hierarchy = { - tier = tier_county - holder.top_liege = scope:county.holder.top_liege - any_county_province = { - has_building_with_flag = raid_protection_1 - } - } - } -} - -has_raid_intent_immunity = { - scope:county.duchy = { - any_in_de_jure_hierarchy = { - tier = tier_county - holder.top_liege = scope:county.holder.top_liege - any_county_province = { - has_building_with_flag = raid_protection_2 - } - } - } -} - -has_chaotic_succession_trigger = { # Used to set up right scopes for Important Action - capital_county ?= { - any_county_situation = { - any_participant_group = { - participant_group_type = nomad_rulers_capital - } - any_situation_sub_region = { - save_temporary_scope_as = subregion - } - } - } - has_chaotic_succession_trigger_action = yes -} - -has_chaotic_succession_trigger_action = { # Used in both Rules and Important Action - save_temporary_scope_as = root_scope - OR = { - trigger_if = { - limit = { - exists = scope:subregion - } - custom_tooltip = { - text = chaotic_succession_havsarsan_zud - scope:subregion ?= { - sub_region_current_phase = situation_steppe_havsarsan_zud_season - } - } - } - trigger_if = { - limit = { - mpo_current_disobedient_kurultai_value >= 1 - } - custom_tooltip = { - text = chaotic_succession_disobedient_kurultai - always = yes - } - } - trigger_else = { - custom_tooltip = { - text = chaotic_succession_disobedient_kurultai_none - always = no - } - } - trigger_if = { - limit = { - OR = { - NOT = { exists = cp:councillor_kurultai_1 } - NOT = { exists = cp:councillor_kurultai_2 } - NOT = { exists = cp:councillor_kurultai_3 } - NOT = { exists = cp:councillor_kurultai_4 } - } - } - custom_tooltip = { - text = is_kurultai_succession_chaotic_empty_kurultai - always = yes - } - } - trigger_else = { - custom_tooltip = { - text = is_kurultai_succession_chaotic_empty_kurultai_none - always = no - } - } - } - trigger_if = { - limit = { - any_held_title = { - has_variable = chaotic_succession_protection - } - } - custom_tooltip = { - text = chaotic_succession_protection_tt - NOT = { - any_held_title = { - has_variable = chaotic_succession_protection - } - } - } - } - trigger_if = { - limit = { - primary_title ?= { - has_title_law = confederation_elective_succession_law - } - } - custom_tooltip = { - text = chaotic_succession_protection_title_law_tt - NOT = { - primary_title ?= { - has_title_law = confederation_elective_succession_law - } - } - } - } -} - -mpo_de_jure_shifting_triggers = { - NOR = { - target_is_de_jure_liege_or_above = root.primary_title - any_de_jure_county_holder = { - NOR = { - root = { is_liege_or_above_of = prev } - is_tributary_of_suzerain_or_above = root - top_liege = { - is_tributary_of_suzerain_or_above = root - } - } - } - any_de_jure_county = { - NOT = { - any_county_situation = { - any_participant_group = { - participant_group_type = nomad_rulers_capital - } - } - } - } - } - any_title_to_title_neighboring_$UPPER_TIER$ = { - this = root.primary_title - } -} - -vassal_grant_de_jure_shift_trigger = { - tier >= tier_duchy - tier = scope:secondary_actor.highest_held_title_tier - NOR = { - target_is_de_jure_liege_or_above = scope:recipient.primary_title - any_de_jure_county = { - any_county_situation = { - any_participant_group = { - participant_group_type = nomad_rulers_capital - } - } - } - any_de_jure_county_holder = { - NOR = { - any_liege_or_above = { - this = scope:recipient - } - is_tributary_of_suzerain_or_above = scope:recipient - top_liege = { - is_tributary_of_suzerain_or_above = scope:recipient - } - } - } - } - switch = { - trigger = scope:secondary_actor.highest_held_title_tier - tier_kingdom = { - any_title_to_title_neighboring_kingdom = { - this = scope:recipient.primary_title - } - } - tier_duchy = { - any_title_to_title_neighboring_kingdom = { - this = scope:recipient.primary_title - } - } - } -} - -higher_dominance_trigger = { - $FIRST_TARGET$ = { - switch = { - trigger = has_realm_law - nomadic_authority_5 = { - $SECOND_TARGET$ = { - OR = { - has_realm_law = nomadic_authority_4 - has_realm_law = nomadic_authority_3 - has_realm_law = nomadic_authority_2 - has_realm_law = nomadic_authority_1 - } - } - } - nomadic_authority_4 = { - $SECOND_TARGET$ = { - OR = { - has_realm_law = nomadic_authority_3 - has_realm_law = nomadic_authority_2 - has_realm_law = nomadic_authority_1 - } - } - } - nomadic_authority_3 = { - $SECOND_TARGET$ = { - OR = { - has_realm_law = nomadic_authority_2 - has_realm_law = nomadic_authority_1 - } - } - } - nomadic_authority_2 = { - $SECOND_TARGET$ = { - has_realm_law = nomadic_authority_1 - } - } - } - } -} - -higher_or_equal_dominance_trigger = { - $FIRST_TARGET$ = { - switch = { - trigger = has_realm_law - nomadic_authority_5 = { - $SECOND_TARGET$ = { - OR = { - has_realm_law = nomadic_authority_5 - has_realm_law = nomadic_authority_4 - has_realm_law = nomadic_authority_3 - has_realm_law = nomadic_authority_2 - has_realm_law = nomadic_authority_1 - } - } - } - nomadic_authority_4 = { - $SECOND_TARGET$ = { - OR = { - has_realm_law = nomadic_authority_4 - has_realm_law = nomadic_authority_3 - has_realm_law = nomadic_authority_2 - has_realm_law = nomadic_authority_1 - } - } - } - nomadic_authority_3 = { - $SECOND_TARGET$ = { - OR = { - has_realm_law = nomadic_authority_3 - has_realm_law = nomadic_authority_2 - has_realm_law = nomadic_authority_1 - } - } - } - nomadic_authority_2 = { - $SECOND_TARGET$ = { - OR = { - has_realm_law = nomadic_authority_2 - has_realm_law = nomadic_authority_1 - } - } - } - nomadic_authority_2 = { - $SECOND_TARGET$ = { - has_realm_law = nomadic_authority_1 - } - } - } - } -} - -#any_county scope -county_ready_for_abuse_trigger = { - uses_county_fertility = yes - any_county_situation = { this = situation:the_great_steppe } - holder = { - is_ai = yes - } - NOR = { - holder = root - holder = situation:the_great_steppe.situation_top_herd - has_county_modifier = mpo_paiza_abused_county_modifier - } -} - diff --git a/N3OW/common/scripted_triggers/music_triggers.txt b/N3OW/common/scripted_triggers/music_triggers.txt deleted file mode 100644 index 62e6d324..00000000 --- a/N3OW/common/scripted_triggers/music_triggers.txt +++ /dev/null @@ -1,159 +0,0 @@ -# Various music triggers - -should_use_asian_music_trigger = { - OR = { - AND = { - culture = { - has_building_gfx = steppe_building_gfx - } - OR = { - culture = { has_cultural_pillar = heritage_mongolic } - culture = { any_parent_culture_or_above = { has_cultural_pillar = heritage_mongolic } } - culture = { has_cultural_pillar = heritage_tungusic } - culture = { any_parent_culture_or_above = { has_cultural_pillar = heritage_tungusic } } - } - capital_province ?= { - OR = { - geographical_region = world_asia_north_east - geographical_region = world_steppe_east - } - } - } - culture = { - OR = { - has_building_gfx = chinese_building_gfx - has_building_gfx = indian_building_gfx - has_building_gfx = southeast_asian_building_gfx - has_building_gfx = japanese_building_gfx - } - } - religion = { is_in_family = rf_sinitic } - religion = religion:buddhism_religion - religion = religion:hinduism_religion - religion = religion:shintoism_religion - any_character_situation = { situation_type = dynastic_cycle } - } -} - -should_use_chinese_music_trigger = { - OR = { - culture = { has_cultural_pillar = heritage_chinese } - culture = { any_parent_culture_or_above = { has_cultural_pillar = heritage_chinese } } - any_character_situation = { situation_type = dynastic_cycle } - religion = { is_in_family = rf_sinitic } - } -} - -should_use_byzantine_music_trigger = { - OR = { - culture = { has_cultural_pillar = heritage_byzantine } - culture = { any_parent_culture_or_above = { has_cultural_pillar = heritage_byzantine } } - top_liege = { has_title = title:e_byzantium } - top_liege = { has_title = title:h_roman_empire } - religion = religion:christianity_religion - } -} - -should_use_nomadic_music_trigger = { - OR = { - culture = { - has_cultural_pillar = heritage_mongolic - } - culture = { - has_cultural_pillar = heritage_turkic - } - faith.religion = faith:tengri_pagan.religion - AND = { - exists = root.capital_county - government_has_flag = government_is_nomadic - situation:the_great_steppe = { - any_situation_sub_region = { - situation_sub_region_has_county = root.capital_county - } - } - } - } -} - -should_use_sami_music_trigger = { - OR = { - culture = { - OR = { - has_cultural_pillar = heritage_ugro_permian - has_cultural_pillar = heritage_balto_finnic - has_cultural_pillar = heritage_nivkh - } - } - culture = { - OR = { - any_parent_culture_or_above = { has_cultural_pillar = heritage_ugro_permian } - any_parent_culture_or_above = { has_cultural_pillar = heritage_balto_finnic } - any_parent_culture_or_above = { has_cultural_pillar = heritage_nivkh } - } - } - AND = { - exists = capital_province - capital_province = { geographical_region = cp4_music_area } - } - } -} - -should_use_norse_music_trigger = { - OR = { - culture = { has_cultural_pillar = heritage_north_germanic } - religion = religion:germanic_religion - } -} - -should_use_iberian_music_trigger = { - OR = { - culture = { - has_cultural_pillar = heritage_iberian - } - culture = { - any_parent_culture_or_above = { has_cultural_pillar = heritage_iberian } - } - AND = { - exists = capital_province - capital_province = { geographical_region = world_europe_west_iberia } - } - } -} - -should_use_iranian_music_trigger = { - OR = { - culture = { - has_cultural_pillar = heritage_iranian - } - culture = { - any_parent_culture_or_above = { has_cultural_pillar = heritage_iranian } - } - AND = { - religion = religion:islam_religion - NAND = { - government_has_flag = government_is_nomadic - situation:the_great_steppe ?= { - any_situation_sub_region = { - situation_sub_region_has_county = root.capital_county - } - } - } - } - religion = religion:zoroastrianism_religion - } -} - -should_use_specifically_persian_music_trigger = { - OR = { - culture = { - has_cultural_pillar = heritage_iranian - } - culture = { - any_parent_culture_or_above = { has_cultural_pillar = heritage_iranian } - } - AND = { - exists = capital_province - capital_province = { geographical_region = world_persian_empire } - } - } -} \ No newline at end of file diff --git a/N3OW/common/scripted_triggers/tgp_imperial_examination_triggers.txt b/N3OW/common/scripted_triggers/tgp_imperial_examination_triggers.txt deleted file mode 100644 index a5269d97..00000000 --- a/N3OW/common/scripted_triggers/tgp_imperial_examination_triggers.txt +++ /dev/null @@ -1,247 +0,0 @@ - -activity_has_met_failee_quota_trigger = { - any_guest_subset = { - name = failees - count >= imperial_examination_failee_quota_value - } -} - -activity_has_ai_entrants_trigger = { - any_guest_subset = { - name = entrants - count >= 1 - is_ai = yes - } -} - -#Activity Option: Exam focus -activity_is_learning_focus_trigger = { - has_activity_option = { - category = special_type - option = imperial_examination_focus_learning - } -} - -activity_is_martial_focus_trigger = { - has_activity_option = { - category = special_type - option = imperial_examination_focus_martial - } -} - -activity_is_stewardship_focus_trigger = { - has_activity_option = { - category = special_type - option = imperial_examination_focus_stewardship - } -} - -#Activity Option: Passing grade -activity_has_extreme_grade_trigger = { - has_activity_option = { - category = imperial_examination_passing_grade - option = imperial_examination_passing_grade_extreme - } -} - -activity_has_high_grade_trigger = { - has_activity_option = { - category = imperial_examination_passing_grade - option = imperial_examination_passing_grade_high - } -} - -activity_has_mediocre_grade_trigger = { - has_activity_option = { - category = imperial_examination_passing_grade - option = imperial_examination_passing_grade_mediocre - } -} - -activity_has_low_grade_trigger = { - has_activity_option = { - category = imperial_examination_passing_grade - option = imperial_examination_passing_grade_low - } -} - -#Activity Option: Number of exams -activity_has_imperial_exams_trigger = { - has_activity_option = { - category = imperial_examination_breadth - option = imperial_examination_breadth_open - } -} - -activity_has_grand_exams_trigger = { - has_activity_option = { - category = imperial_examination_breadth - option = imperial_examination_breadth_restricted - } -} - -activity_has_palace_exams_trigger = { - has_activity_option = { - category = imperial_examination_breadth - option = imperial_examination_breadth_exclusive - } -} - -#What's a good examiner -is_available_imperial_examiner_trigger = { - is_available_healthy_ai_adult = yes - is_lowborn = no - is_landed = no - OR = { - AND = { - exists = involved_activity - involved_activity = $ATTENDING_CHAR$.involved_activity - } - can_join_activity = $ATTENDING_CHAR$.involved_activity - } - location = $ATTENDING_CHAR$.location - age > 35 - trigger_if = { - limit = { - $ATTENDING_CHAR$ = { - involved_activity = { has_activity_type = activity_imperial_examination } - } - } - OR = { - trigger_if = { - limit = { - $ATTENDING_CHAR$ = { - involved_activity = { activity_is_martial_focus_trigger = yes } - } - } - OR = { - has_trait = education_martial_3 - has_trait = education_martial_4 - has_trait = education_martial_5 - } - martial >= decent_skill_rating - } - trigger_else_if = { - limit = { - $ATTENDING_CHAR$ = { - involved_activity = { activity_is_stewardship_focus_trigger = yes } - } - } - OR = { - has_trait = education_stewardship_3 - has_trait = education_stewardship_4 - has_trait = education_stewardship_5 - } - stewardship >= decent_skill_rating - } - trigger_else = { - OR = { - has_trait = education_learning_3 - has_trait = education_learning_4 - has_trait = education_learning_5 - } - learning >= decent_skill_rating - } - } - } - trigger_else = { - OR = { - has_trait = education_learning_3 - has_trait = education_learning_4 - has_trait = education_learning_5 - } - learning >= decent_skill_rating - } - trigger_if = { - limit = { - $ATTENDING_CHAR$.involved_activity.activity_host.faith = { has_doctrine = doctrine_gender_female_dominated } - } - is_female = yes - } - trigger_else_if = { - limit = { - $ATTENDING_CHAR$.involved_activity.activity_host.faith = { has_doctrine = doctrine_gender_male_dominated } - } - is_female = no - } - trigger_else = { - always = yes - } -} - -has_perfect_score_trigger = { - has_variable = $SCORE_VAR$ - var:$SCORE_VAR$ >= imperial_examination_perfect_score_value -} - -has_good_score_trigger = { - has_variable = $SCORE_VAR$ - var:$SCORE_VAR$ < imperial_examination_perfect_score_value - var:$SCORE_VAR$ >= imperial_examination_great_score_value -} - -has_decent_score_trigger = { - has_variable = $SCORE_VAR$ - var:$SCORE_VAR$ < imperial_examination_great_score_value - var:$SCORE_VAR$ >= imperial_examination_decent_score_value -} - -has_questionable_score_trigger = { - has_variable = $SCORE_VAR$ - var:$SCORE_VAR$ < imperial_examination_decent_score_value -} - -#Do you have any cheats? -has_any_exam_cheats_trigger = { - OR = { - has_variable = has_bribed_examiner - has_variable = has_exam_taker - has_variable = has_blackmailed_examiner - has_variable = has_planted_answers - has_variable = parent_has_bribed_examiner - } -} - -is_bribed_examiner_trigger = { - OR = { - AND = { - $EXAMINEE$ = { has_variable = has_bribed_examiner } - $EXAMINER$ = $EXAMINEE$.var:has_bribed_examiner - } - AND = { - $EXAMINEE$ = { has_variable = has_blackmailed_examiner } - $EXAMINER$ = $EXAMINEE$.var:has_blackmailed_examiner - } - AND = { - $EXAMINEE$ = { has_variable = has_planted_answers } - $EXAMINER$ = $EXAMINEE$.var:has_planted_answers - } - AND = { - $EXAMINEE$ = { has_variable = parent_has_bribed_examiner } - $EXAMINER$ = $EXAMINEE$.var:parent_has_bribed_examiner - } - } -} - -is_wrong_examination_gender = { - OR = { - AND = { - scope:host = { - OR = { - has_realm_law = male_only_law - has_realm_law = male_preference_law - } - } - is_female = yes - } - AND = { - scope:host = { - OR = { - has_realm_law = female_only_law - has_realm_law = female_preference_law - } - } - is_male = yes - } - } -} \ No newline at end of file diff --git a/N3OW/common/scripted_triggers/tgp_mandala_task_contract_triggers.txt b/N3OW/common/scripted_triggers/tgp_mandala_task_contract_triggers.txt deleted file mode 100644 index 55a3d407..00000000 --- a/N3OW/common/scripted_triggers/tgp_mandala_task_contract_triggers.txt +++ /dev/null @@ -1,129 +0,0 @@ - - -has_an_active_mandala_contract_trigger = { - any_character_active_contract = { - OR = { - has_task_contract_type = mandala_realm_contract_0001 - has_task_contract_type = mandala_realm_contract_0002 - has_task_contract_type = mandala_realm_contract_0003 - has_task_contract_type = mandala_realm_contract_0004 - has_task_contract_type = mandala_realm_contract_0005 - has_task_contract_type = mandala_realm_contract_0006 - has_task_contract_type = mandala_realm_contract_0007 - has_task_contract_type = mandala_realm_contract_0008 - has_task_contract_type = mandala_realm_contract_0009 - has_task_contract_type = mandala_realm_contract_0010 - has_task_contract_type = mandala_realm_contract_0011 - has_task_contract_type = mandala_realm_contract_0012 - has_task_contract_type = mandala_realm_contract_0013 - has_task_contract_type = mandala_realm_contract_0014 - has_task_contract_type = mandala_realm_contract_0015 - has_task_contract_type = mandala_realm_contract_0016 - has_task_contract_type = mandala_realm_contract_0017 - has_task_contract_type = mandala_realm_contract_0018 - has_task_contract_type = mandala_realm_contract_0019 - has_task_contract_type = mandala_realm_contract_0020 - has_task_contract_type = mandala_realm_contract_0021 - has_task_contract_type = mandala_realm_contract_0022 - has_task_contract_type = mandala_realm_contract_0023 - has_task_contract_type = mandala_realm_contract_0024 - has_task_contract_type = mandala_realm_contract_0025 - has_task_contract_type = mandala_realm_contract_0026 - has_task_contract_type = mandala_realm_contract_0027 - has_task_contract_type = mandala_realm_contract_0028 - has_task_contract_type = mandala_realm_contract_0029 - has_task_contract_type = mandala_realm_contract_0030 - has_task_contract_type = mandala_realm_contract_0031 - has_task_contract_type = mandala_realm_contract_0032 - has_task_contract_type = mandala_realm_contract_0033 - has_task_contract_type = mandala_realm_contract_0034 - has_task_contract_type = mandala_realm_contract_0035 - has_task_contract_type = mandala_realm_contract_0036 - has_task_contract_type = mandala_realm_contract_0037 - has_task_contract_type = mandala_realm_contract_0038 - has_task_contract_type = mandala_realm_contract_0039 - has_task_contract_type = mandala_realm_contract_0040 - has_task_contract_type = mandala_realm_contract_0041 - } - } -} - -is_a_mandala_contract_trigger = { - OR = { - has_task_contract_type = mandala_realm_contract_0001 - has_task_contract_type = mandala_realm_contract_0002 - has_task_contract_type = mandala_realm_contract_0003 - has_task_contract_type = mandala_realm_contract_0004 - has_task_contract_type = mandala_realm_contract_0005 - has_task_contract_type = mandala_realm_contract_0006 - has_task_contract_type = mandala_realm_contract_0007 - has_task_contract_type = mandala_realm_contract_0008 - has_task_contract_type = mandala_realm_contract_0009 - has_task_contract_type = mandala_realm_contract_0010 - has_task_contract_type = mandala_realm_contract_0011 - has_task_contract_type = mandala_realm_contract_0012 - has_task_contract_type = mandala_realm_contract_0013 - has_task_contract_type = mandala_realm_contract_0014 - has_task_contract_type = mandala_realm_contract_0015 - has_task_contract_type = mandala_realm_contract_0016 - has_task_contract_type = mandala_realm_contract_0017 - has_task_contract_type = mandala_realm_contract_0018 - has_task_contract_type = mandala_realm_contract_0019 - has_task_contract_type = mandala_realm_contract_0020 - has_task_contract_type = mandala_realm_contract_0021 - has_task_contract_type = mandala_realm_contract_0022 - has_task_contract_type = mandala_realm_contract_0023 - has_task_contract_type = mandala_realm_contract_0024 - has_task_contract_type = mandala_realm_contract_0025 - has_task_contract_type = mandala_realm_contract_0026 - has_task_contract_type = mandala_realm_contract_0027 - has_task_contract_type = mandala_realm_contract_0028 - has_task_contract_type = mandala_realm_contract_0029 - has_task_contract_type = mandala_realm_contract_0030 - has_task_contract_type = mandala_realm_contract_0031 - has_task_contract_type = mandala_realm_contract_0032 - has_task_contract_type = mandala_realm_contract_0033 - has_task_contract_type = mandala_realm_contract_0034 - has_task_contract_type = mandala_realm_contract_0035 - has_task_contract_type = mandala_realm_contract_0036 - has_task_contract_type = mandala_realm_contract_0037 - has_task_contract_type = mandala_realm_contract_0038 - has_task_contract_type = mandala_realm_contract_0039 - has_task_contract_type = mandala_realm_contract_0040 - has_task_contract_type = mandala_realm_contract_0041 - } -} - -mandala_task_contract_valid_to_create_trigger = { - government_has_flag = government_is_mandala -} - -mandala_task_contract_valid_to_keep_trigger = { - government_has_flag = government_is_mandala - is_alive = yes - root.task_contract_location = { - county.holder.top_liege = { - OR = { - this = root.task_contract_taker.top_liege - this = { - is_tributary_of = root.task_contract_taker - } - } - } - } -} - -mandala_task_contract_valid_to_continue_trigger = { - government_has_flag = government_is_mandala - is_alive = yes - root.task_contract_location = { - county.holder.top_liege = { - OR = { - this = root.task_contract_taker.top_liege - this = { - is_tributary_of = root.task_contract_taker - } - } - } - } -} diff --git a/N3OW/common/scripted_triggers/tgp_mandala_triggers.txt b/N3OW/common/scripted_triggers/tgp_mandala_triggers.txt deleted file mode 100644 index 9c8a4862..00000000 --- a/N3OW/common/scripted_triggers/tgp_mandala_triggers.txt +++ /dev/null @@ -1,1267 +0,0 @@ - -terrible_devaraja_quality_trigger = { - has_mandala_capital_trigger = no -} - -poor_devaraja_quality_trigger = { - capital_province = { has_building_or_higher = mandala_capital_01 } - mandala_radiance_value >= 1 -} - -middling_devaraja_quality_trigger = { - capital_province = { has_building_or_higher = mandala_capital_02 } - mandala_radiance_value >= 10 -} - -good_devaraja_quality_trigger = { - capital_province = { has_building_or_higher = mandala_capital_03 } - mandala_radiance_value >= 30 -} - -great_devaraja_quality_trigger = { - capital_province = { has_building_or_higher = mandala_capital_04 } - mandala_radiance_value >= 50 -} - -exalted_devaraja_quality_trigger = { - capital_province = { has_building_or_higher = mandala_capital_05 } - mandala_radiance_value >= 80 -} - - -house_has_peaceful_rule_3_year_trigger = { - OR = { - has_house_head_parameter = peaceful_rule_3_year_modifier - has_house_head_parameter = peaceful_rule_3_year_interim_modifier - } -} - -house_has_creator_20_years_trigger = { - OR = { - has_house_head_parameter = creator_20_year_modifier - has_house_head_parameter = creator_20_year_interim_modifier - } -} - -house_has_creator_10_years_trigger = { - OR = { - has_house_head_parameter = creator_10_year_modifier - has_house_head_parameter = creator_10_year_interim_modifier - } -} - -house_has_unlock_agent_piety_bribe_trigger = { - OR = { - has_house_head_parameter = unlock_agent_piety_bribe - has_house_power_parameter = aspect_of_trickery_03 - has_house_power_parameter = aspect_of_trickery_04 - has_house_power_parameter = aspect_of_trickery_05 - } -} - - -same_mandala_aspect_trigger = { - OR = { - AND = { - $FIRST_CHAR$ = { - house = { has_house_power_parameter = aspect_of_creation } - } - $SECOND_CHAR$ = { - house = { has_house_power_parameter = aspect_of_creation } - } - } - AND = { - $FIRST_CHAR$ = { - house = { has_house_power_parameter = aspect_of_serenity } - } - $SECOND_CHAR$ = { - house = { has_house_power_parameter = aspect_of_serenity } - } - } - AND = { - $FIRST_CHAR$ = { - house = { has_house_power_parameter = aspect_of_destruction } - } - $SECOND_CHAR$ = { - house = { has_house_power_parameter = aspect_of_destruction } - } - } - AND = { - $FIRST_CHAR$ = { - house = { has_house_power_parameter = aspect_of_trickery } - } - $SECOND_CHAR$ = { - house = { has_house_power_parameter = aspect_of_trickery } - } - } - } -} - -has_mandala_aspect_trigger = { - house ?= { - OR = { - has_house_power_parameter = aspect_of_creation - has_house_power_parameter = aspect_of_serenity - has_house_power_parameter = aspect_of_destruction - has_house_power_parameter = aspect_of_trickery - } - } -} - -has_no_mandala_aspect_trigger = { - house ?= { - NOR = { - has_house_power_parameter = aspect_of_creation - has_house_power_parameter = aspect_of_serenity - has_house_power_parameter = aspect_of_destruction - has_house_power_parameter = aspect_of_trickery - } - } -} - - -has_mandala_aspect_level_1_trigger = { - house ?= { - OR = { - has_house_power_parameter = aspect_of_creation_01 - has_house_power_parameter = aspect_of_serenity_01 - has_house_power_parameter = aspect_of_destruction_01 - has_house_power_parameter = aspect_of_trickery_01 - } - } -} - -has_mandala_aspect_level_2_trigger = { - house ?= { - OR = { - has_house_power_parameter = aspect_of_creation_02 - has_house_power_parameter = aspect_of_serenity_02 - has_house_power_parameter = aspect_of_destruction_02 - has_house_power_parameter = aspect_of_trickery_02 - } - } -} - -has_mandala_aspect_level_3_trigger = { - house ?= { - OR = { - has_house_power_parameter = aspect_of_creation_03 - has_house_power_parameter = aspect_of_serenity_03 - has_house_power_parameter = aspect_of_destruction_03 - has_house_power_parameter = aspect_of_trickery_03 - } - } -} - -has_mandala_aspect_level_4_trigger = { - house ?= { - OR = { - has_house_power_parameter = aspect_of_creation_04 - has_house_power_parameter = aspect_of_serenity_04 - has_house_power_parameter = aspect_of_destruction_04 - has_house_power_parameter = aspect_of_trickery_04 - } - } -} - -has_mandala_aspect_level_5_trigger = { - house ?= { - OR = { - has_house_power_parameter = aspect_of_creation_05 - has_house_power_parameter = aspect_of_serenity_05 - has_house_power_parameter = aspect_of_destruction_05 - has_house_power_parameter = aspect_of_trickery_05 - } - } -} - -has_mandala_aspect_2_or_higher_trigger = { - OR = { - has_mandala_aspect_level_2_trigger = yes - has_mandala_aspect_level_3_trigger = yes - has_mandala_aspect_level_4_trigger = yes - has_mandala_aspect_level_5_trigger = yes - } -} - -has_mandala_capital_trigger = { - capital_province ?= { has_building_with_flag = mandala_capital_building } -} - -has_unruined_mandala_capital_trigger = { - capital_province ?= { - has_building_with_flag = mandala_capital_building - has_ruined_great_building = no - } -} - -has_ruined_mandala_capital_trigger = { - capital_province = { - has_building_with_flag = mandala_capital_building - has_ruined_great_building = yes - } -} - - -can_afford_mandala_aspect_change_trigger = { piety >= mandala_aspect_piety_cost_first_level } - -can_afford_mandala_aspect_level_2_trigger = { - prestige >= mandala_aspect_prestige_cost_second_level - piety >= mandala_aspect_piety_cost_second_level -} - -can_afford_mandala_aspect_level_3_trigger = { - prestige >= mandala_aspect_prestige_cost_third_level - piety >= mandala_aspect_piety_cost_third_level -} - -can_afford_mandala_aspect_level_4_trigger = { - prestige >= mandala_aspect_prestige_cost_fourth_level - piety >= mandala_aspect_piety_cost_fourth_level -} - -can_afford_mandala_aspect_level_5_trigger = { - prestige >= mandala_aspect_prestige_cost_fifth_level - piety >= mandala_aspect_piety_cost_fifth_level -} - - -#Only 2 Mandala Capitals per De Jure Kingdom -less_than_max_amount_of_mandala_capitals_trigger = { - save_temporary_scope_as = root_scope - capital_county.kingdom = { - any_in_de_jure_hierarchy = { - count < mandala_capitals_per_dejure_kingdom - tier = tier_barony - title_province = { - NOT = { this.county = scope:root_scope.capital_county } #We don't count our own great project since it needs to be upgradeable. - OR = { - AND = { - has_building_with_flag = mandala_capital_building - has_ruined_great_building = no - is_ruined_building_being_reconstructed = no - } - any_great_project_in_province = { - OR = { - great_project_type = mandala_capital_01 - great_project_type = mandala_capital_02 - great_project_type = mandala_capital_03 - great_project_type = mandala_capital_04 - great_project_type = mandala_capital_05 - } - OR = { - great_project_construction_phase_is = in_progress - great_project_construction_phase_is = completed - } - } - } - } - } - } -} - -has_unfunded_contribution_in_planned_mandala_capital_trigger = { - save_temporary_scope_as = owner_check - any_great_project = { - great_project_owner = scope:owner_check - OR = { - great_project_type = mandala_capital_01 - great_project_type = mandala_capital_02 - great_project_type = mandala_capital_03 - great_project_type = mandala_capital_04 - great_project_type = mandala_capital_05 - } - great_project_construction_phase_is = planned - any_contribution = { - is_owner_only_contribution_trigger = no - contribution_is_funded = no - } - } -} - - -#Mandala Worthiness Triggers — applied from second tier Aspect and first tier Capital Temple Complex - -has_pilgrimage_trait_level_trigger = { - trigger_if = { - limit = { $TIER$ = 05 } - custom_tooltip = { - text = rite_of_worthiness_tier_5_pilgrim - has_trait_xp = { - trait = pilgrim - value >= mandala_pilgrim_xp_last_tier_value - } - } - } - trigger_else_if = { - limit = { $TIER$ = 04 } - custom_tooltip = { - text = rite_of_worthiness_tier_4_pilgrim - has_trait_xp = { - trait = pilgrim - value >= mandala_pilgrim_xp_third_tier_value - } - } - } - trigger_else_if = { - limit = { $TIER$ = 03 } - custom_tooltip = { - text = rite_of_worthiness_tier_3_pilgrim - has_trait_xp = { - trait = pilgrim - value >= mandala_pilgrim_xp_second_tier_value - } - } - } - trigger_else_if = { - limit = { $TIER$ = 02 } - custom_tooltip = { - text = rite_of_worthiness_tier_2_pilgrim - has_trait_xp = { - trait = pilgrim - value >= mandala_pilgrim_xp_first_tier_value - } - } - } - trigger_else = { - custom_tooltip = { - text = rite_of_worthiness_tier_1_pilgrim - has_trait = pilgrim - } - } -} - -#CREATION -creation_children_trigger = { - trigger_if = { - limit = { is_female = yes } - custom_tooltip = { - text = rite_of_worthiness_creation_female - mandala_creation_child_counter >= num_female_creation_mandala_children_born - } - } - trigger_if = { - limit = { is_male = yes } - custom_tooltip = { - text = rite_of_worthiness_creation_male - mandala_creation_child_counter >= num_male_creation_mandala_children_born - } - } -} - -creation_first_tier_trigger = { - is_house_head = yes - has_pilgrimage_trait_level_trigger = { TIER = 01 } - creation_children_trigger = yes -} - -creation_second_tier_trigger = { - is_house_head = yes - has_pilgrimage_trait_level_trigger = { TIER = 02 } - creation_children_trigger = yes - custom_tooltip = { - text = rite_of_worthiness_creation_buildings_t2 - house = { - has_variable = num_buildings_built - var:num_buildings_built >= num_creation_mandala_buildings_built_t2 - } - } - trigger_if = { - limit = { is_ai = no } - gold >= creation_mandala_stashed_gold_t2 - } -} - -creation_third_tier_trigger = { - is_house_head = yes - has_pilgrimage_trait_level_trigger = { TIER = 03 } - creation_children_trigger = yes - custom_tooltip = { - text = rite_of_worthiness_creation_buildings_t3 - house = { - has_variable = num_buildings_built - var:num_buildings_built >= num_creation_mandala_buildings_built_t3 - } - } - custom_tooltip = { - text = rite_of_worthiness_creation_artifacts_t3 - has_variable = num_commissioned_artifacts - var:num_commissioned_artifacts >= num_creation_mandala_commissioned_artifacts_t3 - } - trigger_if = { - limit = { is_ai = no } - gold >= creation_mandala_stashed_gold_t3 - } - trigger_if = { - limit = { is_ai = no } - custom_tooltip = { - text = rite_of_worthiness_creation_house_size_t3 - house = { - any_house_member = { count >= num_creation_mandala_house_size_t3 } - } - } - } -} - -creation_fourth_tier_trigger = { - is_house_head = yes - has_pilgrimage_trait_level_trigger = { TIER = 04 } - creation_children_trigger = yes - custom_tooltip = { - text = rite_of_worthiness_creation_buildings_t4 - house = { - has_variable = num_buildings_built - var:num_buildings_built >= num_creation_mandala_buildings_built_t4 - } - } - custom_tooltip = { - text = rite_of_worthiness_creation_artifacts_t4 - has_variable = num_commissioned_artifacts - var:num_commissioned_artifacts >= num_creation_mandala_commissioned_artifacts_t4 - } - trigger_if = { - limit = { is_ai = no } - gold >= creation_mandala_stashed_gold_t4 - } - trigger_if = { - limit = { is_ai = no } - custom_tooltip = { - text = rite_of_worthiness_creation_house_size_t4 - house = { - any_house_member = { count >= num_creation_mandala_house_size_t4 } - } - } - } -} - -creation_fifth_tier_trigger = { - is_house_head = yes - has_pilgrimage_trait_level_trigger = { TIER = 05 } - creation_children_trigger = yes - custom_tooltip = { - text = rite_of_worthiness_creation_buildings_t5 - house = { - has_variable = num_buildings_built - var:num_buildings_built >= num_creation_mandala_buildings_built_t5 - } - } - custom_tooltip = { - text = rite_of_worthiness_creation_artifacts_t5 - has_variable = num_commissioned_artifacts - var:num_commissioned_artifacts >= num_creation_mandala_commissioned_artifacts_t5 - } - trigger_if = { - limit = { is_ai = no } - gold >= creation_mandala_stashed_gold_t5 - } - trigger_if = { - limit = { is_ai = no } - custom_tooltip = { - text = rite_of_worthiness_creation_house_size_t5 - house = { - any_house_member = { count >= num_creation_mandala_house_size_t5 } - } - } - } -} - - -#SERENITY -serenity_high_end_alliances_trigger = { - custom_tooltip = { - text = rite_of_worthiness_serenity - any_ally = { - primary_title.tier >= $MANDALA$.primary_title.tier - NOR = { - is_tributary_of = $MANDALA$ - is_vassal_of = $MANDALA$ - } - count >= num_serenity_mandala_highend_alliances_had - } - } -} - -serenity_first_tier_trigger = { - is_house_head = yes - has_pilgrimage_trait_level_trigger = { TIER = 01 } - trigger_if = { - limit = { is_ai = no } - serenity_high_end_alliances_trigger = { MANDALA = $MANDALA$ } - } - custom_tooltip = { - text = rite_of_worthiness_serenity_years_of_peace_t1 - has_variable = serenity_mandala_years_of_non_aggression_war - var:serenity_mandala_years_of_non_aggression_war >= num_serenity_mandala_years_of_peace_t1 - } - custom_tooltip = { - text = rite_of_worthiness_serenity_friends_t1 - num_of_relation_friend >= num_serenity_mandala_friends_t1 - } -} - -serenity_second_tier_trigger = { - is_house_head = yes - has_pilgrimage_trait_level_trigger = { TIER = 02 } - trigger_if = { - limit = { is_ai = no } - serenity_high_end_alliances_trigger = { MANDALA = $MANDALA$ } - } - custom_tooltip = { - text = rite_of_worthiness_serenity_years_of_peace_t2 - has_variable = serenity_mandala_years_of_non_aggression_war - var:serenity_mandala_years_of_non_aggression_war >= num_serenity_mandala_years_of_peace_t2 - } - custom_tooltip = { - text = rite_of_worthiness_serenity_friends_t2 - num_of_relation_friend >= num_serenity_mandala_friends_t2 - } - trigger_if = { - limit = { is_ai = no } - custom_tooltip = { - text = rite_of_worthiness_serenity_feasts_hosted_t2 - has_variable = num_exorbitant_feasts_hosted - var:num_exorbitant_feasts_hosted >= num_serenity_mandala_feasts_hosted_t2 - } - } -} - -serenity_third_tier_trigger = { - is_house_head = yes - has_pilgrimage_trait_level_trigger = { TIER = 03 } - trigger_if = { - limit = { is_ai = no } - serenity_high_end_alliances_trigger = { MANDALA = $MANDALA$ } - } - custom_tooltip = { - text = rite_of_worthiness_serenity_years_of_peace_t3 - has_variable = serenity_mandala_years_of_non_aggression_war - var:serenity_mandala_years_of_non_aggression_war >= num_serenity_mandala_years_of_peace_t3 - } - custom_tooltip = { - text = rite_of_worthiness_serenity_friends_t3 - num_of_relation_friend >= num_serenity_mandala_friends_t3 - } - trigger_if = { - limit = { is_ai = no } - custom_tooltip = { - text = rite_of_worthiness_serenity_feasts_hosted_t3 - has_variable = num_exorbitant_feasts_hosted - var:num_exorbitant_feasts_hosted >= num_serenity_mandala_feasts_hosted_t3 - } - } - custom_tooltip = { - text = rite_of_worthiness_serenity_capital_development_t3 - capital_province = { - OR = { - has_building_or_higher = castle_02 - has_building_or_higher = temple_02 - has_building_or_higher = city_02 - has_building_or_higher = temple_citadel_02 - } - } - } -} - -serenity_fourth_tier_trigger = { - is_house_head = yes - has_pilgrimage_trait_level_trigger = { TIER = 04 } - trigger_if = { - limit = { is_ai = no } - serenity_high_end_alliances_trigger = { MANDALA = $MANDALA$ } - } - custom_tooltip = { - text = rite_of_worthiness_serenity_years_of_peace_t4 - has_variable = serenity_mandala_years_of_non_aggression_war - var:serenity_mandala_years_of_non_aggression_war >= num_serenity_mandala_years_of_peace_t4 - } - custom_tooltip = { - text = rite_of_worthiness_serenity_friends_t4 - num_of_relation_friend >= num_serenity_mandala_friends_t4 - } - trigger_if = { - limit = { is_ai = no } - custom_tooltip = { - text = rite_of_worthiness_serenity_feasts_hosted_t4 - has_variable = num_exorbitant_feasts_hosted - var:num_exorbitant_feasts_hosted >= num_serenity_mandala_feasts_hosted_t4 - } - } - custom_tooltip = { - text = rite_of_worthiness_serenity_capital_development_t4 - capital_province = { - OR = { - has_building_or_higher = castle_03 - has_building_or_higher = temple_03 - has_building_or_higher = city_03 - has_building_or_higher = temple_citadel_03 - } - } - } -} - -serenity_fifth_tier_trigger = { - is_house_head = yes - has_pilgrimage_trait_level_trigger = { TIER = 05 } - trigger_if = { - limit = { is_ai = no } - serenity_high_end_alliances_trigger = { MANDALA = $MANDALA$ } - } - custom_tooltip = { - text = rite_of_worthiness_serenity_years_of_peace_t5 - has_variable = serenity_mandala_years_of_non_aggression_war - var:serenity_mandala_years_of_non_aggression_war >= num_serenity_mandala_years_of_peace_t5 - } - custom_tooltip = { - text = rite_of_worthiness_serenity_friends_t5 - num_of_relation_friend >= num_serenity_mandala_friends_t5 - } - trigger_if = { - limit = { is_ai = no } - custom_tooltip = { - text = rite_of_worthiness_serenity_feasts_hosted_t5 - has_variable = num_exorbitant_feasts_hosted - var:num_exorbitant_feasts_hosted >= num_serenity_mandala_feasts_hosted_t5 - } - } - custom_tooltip = { - text = rite_of_worthiness_serenity_capital_development_t5 - capital_province = { - OR = { - has_building_or_higher = castle_04 - has_building_or_higher = temple_04 - has_building_or_higher = city_04 - has_building_or_higher = temple_citadel_04 - } - } - } - trigger_if = { - limit = { is_ai = no } - custom_tooltip = { - text = rite_of_worthiness_serenity_soulmate - num_of_relation_soulmate = 1 - } - } -} - - -#DESTRUCTION -destruction_won_more_than_lost_trigger = { - custom_tooltip = { - text = rite_of_worthiness_destruction_won_more_than_lost - num_wars_won > num_wars_lost - } -} - -destruction_first_tier_trigger = { - is_house_head = yes - has_pilgrimage_trait_level_trigger = { TIER = 01 } - trigger_if = { - limit = { is_ai = no } - destruction_won_more_than_lost_trigger = yes - } - custom_tooltip = { - text = rite_of_worthiness_destruction_wars_t1 - any_memory = { - memory_type = war_won - count >= num_destruction_mandala_wars_won_t1 - } - } - trigger_if = { - limit = { is_ai = no } - custom_tooltip = { - text = rite_of_worthiness_destruction_battles_t1 - any_memory = { - memory_type = battle_won_memory - count >= num_destruction_mandala_battles_won_t1 - } - } - } - martial >= num_destruction_martial_skill_t1 - prowess >= num_destruction_prowess_skill_t1 -} - -destruction_second_tier_trigger = { - is_house_head = yes - has_pilgrimage_trait_level_trigger = { TIER = 02 } - trigger_if = { - limit = { is_ai = no } - destruction_won_more_than_lost_trigger = yes - } - custom_tooltip = { - text = rite_of_worthiness_destruction_wars_t2 - any_memory = { - memory_type = war_won - count >= num_destruction_mandala_wars_won_t2 - } - } - trigger_if = { - limit = { is_ai = no } - custom_tooltip = { - text = rite_of_worthiness_destruction_battles_t2 - any_memory = { - memory_type = battle_won_memory - count >= num_destruction_mandala_battles_won_t2 - } - } - } - martial >= num_destruction_martial_skill_t2 - prowess >= num_destruction_prowess_skill_t2 - trigger_if = { - limit = { is_ai = no } - custom_tooltip = { - text = rite_of_worthiness_destruction_prowess_knights_t2 - any_knight = { - count >= num_prowess_knights_t2 - prowess >= num_prowess_knights_t5 - } - } - } -} - -destruction_third_tier_trigger = { - is_house_head = yes - has_pilgrimage_trait_level_trigger = { TIER = 03 } - trigger_if = { - limit = { is_ai = no } - destruction_won_more_than_lost_trigger = yes - } - custom_tooltip = { - text = rite_of_worthiness_destruction_wars_t3 - any_memory = { - memory_type = war_won - count >= num_destruction_mandala_wars_won_t3 - } - } - trigger_if = { - limit = { is_ai = no } - custom_tooltip = { - text = rite_of_worthiness_destruction_battles_t3 - any_memory = { - memory_type = battle_won_memory - count >= num_destruction_mandala_battles_won_t3 - } - } - } - martial >= num_destruction_martial_skill_t3 - prowess >= num_destruction_prowess_skill_t3 - trigger_if = { - limit = { is_ai = no } - custom_tooltip = { - text = rite_of_worthiness_destruction_prowess_knights_t3 - any_knight = { - count >= num_prowess_knights_t3 - prowess >= num_prowess_knights_t5 - } - } - } -} - -destruction_fourth_tier_trigger = { - is_house_head = yes - has_pilgrimage_trait_level_trigger = { TIER = 04 } - trigger_if = { - limit = { is_ai = no } - destruction_won_more_than_lost_trigger = yes - } - custom_tooltip = { - text = rite_of_worthiness_destruction_wars_t4 - any_memory = { - memory_type = war_won - count >= num_destruction_mandala_wars_won_t4 - } - } - trigger_if = { - limit = { is_ai = no } - custom_tooltip = { - text = rite_of_worthiness_destruction_battles_t4 - any_memory = { - memory_type = battle_won_memory - count >= num_destruction_mandala_battles_won_t4 - } - } - } - martial >= num_destruction_martial_skill_t4 - prowess >= num_destruction_prowess_skill_t4 - trigger_if = { - limit = { is_ai = no } - custom_tooltip = { - text = rite_of_worthiness_destruction_prowess_knights_t4 - any_knight = { - count >= num_prowess_knights_t4 - prowess >= num_prowess_knights_t5 - } - } - } -} - -destruction_fifth_tier_trigger = { - is_house_head = yes - has_pilgrimage_trait_level_trigger = { TIER = 05 } - trigger_if = { - limit = { is_ai = no } - destruction_won_more_than_lost_trigger = yes - } - custom_tooltip = { - text = rite_of_worthiness_destruction_wars_t5 - any_memory = { - memory_type = war_won - count >= num_destruction_mandala_wars_won_t5 - } - } - trigger_if = { - limit = { is_ai = no } - custom_tooltip = { - text = rite_of_worthiness_destruction_battles_t5 - any_memory = { - memory_type = battle_won_memory - count >= num_destruction_mandala_battles_won_t5 - } - } - } - martial >= num_destruction_martial_skill_t5 - prowess >= num_destruction_prowess_skill_t5 - trigger_if = { - limit = { is_ai = no } - custom_tooltip = { - text = rite_of_worthiness_destruction_prowess_knights_t5 - any_knight = { - count >= num_prowess_knights_t5 - prowess >= num_prowess_knights_t5 - } - } - } -} - - -#TRICKERY -trickery_first_tier_trigger = { - is_house_head = yes - has_pilgrimage_trait_level_trigger = { TIER = 01 } - NOT = { has_character_modifier = disbelieved_mandala_modifier } - trigger_if = { - limit = { is_ai = no } - custom_tooltip = { - text = rite_of_worthiness_trickery_schemes_t1 - exists = var:num_successful_schemes - var:num_successful_schemes >= num_trickster_mandala_successful_schemes_t1 - } - custom_tooltip = { - text = rite_of_worthiness_trickery_secrets_t1 - any_known_secret = { - count >= num_trickster_mandala_secrets_known_t1 - trigger_if = { - limit = { exists = secret_target } - NOT = { secret_target = scope:owner } - } - NOT = { secret_owner = scope:owner } - } - } - custom_tooltip = { - text = rite_of_worthiness_trickery_house_married_to_rulers_t1 - save_temporary_scope_as = root_scope - house = { - any_house_member = { - count >= num_trickster_mandala_house_married_to_rulers_t1 - any_spouse = { - is_landed = yes - top_overlord != scope:root_scope - this != scope:root_scope - primary_title.tier >= tier_duchy - } - } - } - } - } -} - -trickery_second_tier_trigger = { - is_house_head = yes - has_pilgrimage_trait_level_trigger = { TIER = 02 } - trigger_if = { - limit = { is_ai = no } - custom_tooltip = { - text = rite_of_worthiness_trickery_schemes_t2 - exists = var:num_successful_schemes - var:num_successful_schemes >= num_trickster_mandala_successful_schemes_t2 - } - custom_tooltip = { - text = rite_of_worthiness_trickery_secrets_t2 - any_known_secret = { - count >= num_trickster_mandala_secrets_known_t2 - trigger_if = { - limit = { exists = secret_target } - NOT = { secret_target = scope:owner } - } - NOT = { secret_owner = scope:owner } - } - } - custom_tooltip = { - text = rite_of_worthiness_trickery_house_married_to_rulers_t2 - save_temporary_scope_as = root_scope - house = { - any_house_member = { - count >= num_trickster_mandala_house_married_to_rulers_t2 - any_spouse = { - is_landed = yes - top_overlord != scope:root_scope - this != scope:root_scope - primary_title.tier >= tier_duchy - } - } - } - } - custom_tooltip = { - text = rite_of_worthiness_trickery_strong_hooks_t2 - any_hooked_character = { - count >= num_trickster_mandala_strong_hooks_t2 - scope:owner = { has_strong_hook = prev } - } - } - custom_tooltip = { - text = rite_of_worthiness_trickery_gold_ransomed_t2 - exists = var:amount_of_gold_ransomed - var:amount_of_gold_ransomed >= trickster_mandala_gold_ransomed_t2 - } - } -} - -trickery_third_tier_trigger = { - is_house_head = yes - has_pilgrimage_trait_level_trigger = { TIER = 03 } - trigger_if = { - limit = { is_ai = no } - custom_tooltip = { - text = rite_of_worthiness_trickery_schemes_t3 - exists = var:num_successful_schemes - var:num_successful_schemes >= num_trickster_mandala_successful_schemes_t3 - } - custom_tooltip = { - text = rite_of_worthiness_trickery_secrets_t3 - any_known_secret = { - count >= num_trickster_mandala_secrets_known_t3 - trigger_if = { - limit = { exists = secret_target } - NOT = { secret_target = scope:owner } - } - NOT = { secret_owner = scope:owner } - } - } - custom_tooltip = { - text = rite_of_worthiness_trickery_house_married_to_rulers_t3 - save_temporary_scope_as = root_scope - house = { - any_house_member = { - count >= num_trickster_mandala_house_married_to_rulers_t3 - any_spouse = { - is_landed = yes - top_overlord != scope:root_scope - this != scope:root_scope - primary_title.tier >= tier_duchy - } - } - } - } - custom_tooltip = { - text = rite_of_worthiness_trickery_strong_hooks_t3 - any_hooked_character = { - count >= num_trickster_mandala_strong_hooks_t3 - scope:owner = { has_strong_hook = prev } - } - } - custom_tooltip = { - text = rite_of_worthiness_trickery_gold_ransomed_t3 - exists = var:amount_of_gold_ransomed - var:amount_of_gold_ransomed >= trickster_mandala_gold_ransomed_t3 - } - } -} - -trickery_fourth_tier_trigger = { - is_house_head = yes - has_pilgrimage_trait_level_trigger = { TIER = 04 } - NOT = { has_character_modifier = disbelieved_mandala_modifier } - trigger_if = { - limit = { is_ai = no } - custom_tooltip = { - text = rite_of_worthiness_trickery_schemes_t4 - exists = var:num_successful_schemes - var:num_successful_schemes >= num_trickster_mandala_successful_schemes_t4 - } - custom_tooltip = { - text = rite_of_worthiness_trickery_secrets_t4 - any_known_secret = { - count >= num_trickster_mandala_secrets_known_t4 - trigger_if = { - limit = { exists = secret_target } - NOT = { secret_target = scope:owner } - } - NOT = { secret_owner = scope:owner } - } - } - custom_tooltip = { - text = rite_of_worthiness_trickery_house_married_to_rulers_t4 - save_temporary_scope_as = root_scope - house = { - any_house_member = { - count >= num_trickster_mandala_house_married_to_rulers_t4 - any_spouse = { - is_landed = yes - top_overlord != scope:root_scope - this != scope:root_scope - primary_title.tier >= tier_duchy - } - } - } - } - custom_tooltip = { - text = rite_of_worthiness_trickery_strong_hooks_t4 - any_hooked_character = { - count >= num_trickster_mandala_strong_hooks_t4 - scope:owner = { has_strong_hook = prev } - } - } - custom_tooltip = { - text = rite_of_worthiness_trickery_gold_ransomed_t4 - exists = var:amount_of_gold_ransomed - var:amount_of_gold_ransomed >= trickster_mandala_gold_ransomed_t4 - } - custom_tooltip = { - text = rite_of_worthiness_trickery_house_rulers_t4 - house = { - any_house_member = { - count >= num_trickster_mandala_house_rulers_t4 - primary_title.tier >= tier_duchy - is_landed = yes - is_independent_ruler = yes - top_overlord != scope:owner - } - } - } - } -} - -trickery_fifth_tier_trigger = { - is_house_head = yes - has_pilgrimage_trait_level_trigger = { TIER = 05 } - NOT = { has_character_modifier = disbelieved_mandala_modifier } - trigger_if = { - limit = { is_ai = no } - custom_tooltip = { - text = rite_of_worthiness_trickery_schemes_t5 - exists = var:num_successful_schemes - var:num_successful_schemes >= num_trickster_mandala_successful_schemes_t5 - } - custom_tooltip = { - text = rite_of_worthiness_trickery_secrets_t5 - any_known_secret = { - count >= num_trickster_mandala_secrets_known_t5 - trigger_if = { - limit = { exists = secret_target } - NOT = { secret_target = scope:owner } - } - NOT = { secret_owner = scope:owner } - } - } - custom_tooltip = { - text = rite_of_worthiness_trickery_house_married_to_rulers_t5 - save_temporary_scope_as = root_scope - house = { - any_house_member = { - count >= num_trickster_mandala_house_married_to_rulers_t5 - any_spouse = { - is_landed = yes - top_overlord != scope:root_scope - this != scope:root_scope - primary_title.tier >= tier_duchy - } - } - } - } - custom_tooltip = { - text = rite_of_worthiness_trickery_strong_hooks_t5 - any_hooked_character = { - count >= num_trickster_mandala_strong_hooks_t5 - scope:owner = { has_strong_hook = prev } - } - } - custom_tooltip = { - text = rite_of_worthiness_trickery_gold_ransomed_t5 - exists = var:amount_of_gold_ransomed - var:amount_of_gold_ransomed >= trickster_mandala_gold_ransomed_t5 - } - custom_tooltip = { - text = rite_of_worthiness_trickery_house_rulers_t5 - house = { - any_house_member = { - count >= num_trickster_mandala_house_rulers_t5 - primary_title.tier >= tier_duchy - is_landed = yes - is_independent_ruler = yes - top_overlord != scope:owner - } - } - } - custom_tooltip = { - text = rite_of_worthiness_trickery_only_one - NOT = { - any_ruler = { - is_landed = yes - government_has_flag = government_is_mandala - has_mandala_capital_trigger = yes - mandala_radiance_value >= define:NMandala|MAX_RADIANCE - this != scope:owner - } - } - } - } -} - -there_is_any_valid_mandala_contract_spot_trigger = { - OR = { - any_sub_realm_county = { - any_county_province = { - has_holding = yes - is_occupied = no - NOR = { - this = scope:mandala_ruler.capital_province - has_variable = requested_mandala_ritual - has_variable = mandala_ritual_cooldown - } - } - } - any_tributary = { - any_sub_realm_county = { - any_county_province = { - has_holding = yes - is_occupied = no - NOR = { - this = scope:mandala_ruler.capital_province - has_variable = requested_mandala_ritual - has_variable = mandala_ritual_cooldown - } - } - } - } - } -} - -there_is_any_valid_mandala_contract_spot_with_crocodiles_trigger = { - OR = { - any_sub_realm_county = { - any_county_province = { - has_holding = yes - is_occupied = no - hunt_animal_crocodile_trigger = yes - NOR = { - this = scope:mandala_ruler.capital_province - has_variable = requested_mandala_ritual - has_variable = mandala_ritual_cooldown - } - } - } - any_tributary = { - any_sub_realm_county = { - any_county_province = { - has_holding = yes - is_occupied = no - hunt_animal_crocodile_trigger = yes - NOR = { - this = scope:mandala_ruler.capital_province - has_variable = requested_mandala_ritual - has_variable = mandala_ritual_cooldown - } - } - } - } - } -} - -there_is_any_valid_mandala_contract_spot_with_neighbor_trigger = { - OR = { - any_sub_realm_county = { - any_neighboring_county = { - holder = { - is_ai = yes - } - title_province = { - has_holding = yes - } - } - any_county_province = { - has_holding = yes - is_occupied = no - NOR = { - this = scope:mandala_ruler.capital_province - has_variable = requested_mandala_ritual - has_variable = mandala_ritual_cooldown - } - } - } - any_tributary = { - any_sub_realm_county = { - any_neighboring_county = { - holder = { - is_ai = yes - } - title_province = { - has_holding = yes - } - } - any_county_province = { - has_holding = yes - is_occupied = no - NOR = { - this = scope:mandala_ruler.capital_province - has_variable = requested_mandala_ritual - has_variable = mandala_ritual_cooldown - } - } - } - } - } -} - -there_is_any_valid_mandala_contract_spot_no_holding_trigger = { - OR = { - any_sub_realm_county = { - any_county_province = { - has_holding = no - is_occupied = no - NOR = { - this = scope:mandala_ruler.capital_province - has_variable = requested_mandala_ritual - has_variable = mandala_ritual_cooldown - } - } - } - any_tributary = { - any_sub_realm_county = { - any_county_province = { - has_holding = no - is_occupied = no - NOR = { - this = scope:mandala_ruler.capital_province - has_variable = requested_mandala_ritual - has_variable = mandala_ritual_cooldown - } - } - } - } - } -} - - - -#MANDALA STORY TRIGGERS -would_contribute_to_mandala_capital_trigger = { - NOR = { - has_relation_rival = scope:root_scope - has_variable = recently_contributed_via_request - } - has_mandala_capital_trigger = no -} - -is_story_godking_trigger = { - has_variable = mandala_godking - is_ai = yes -} diff --git a/N3OW/common/scripted_triggers/tgp_silk_road_triggers.txt b/N3OW/common/scripted_triggers/tgp_silk_road_triggers.txt deleted file mode 100644 index d9490ab5..00000000 --- a/N3OW/common/scripted_triggers/tgp_silk_road_triggers.txt +++ /dev/null @@ -1,43 +0,0 @@ -#situation:silk_road_situation.situation_sub_region:region_silk_road_proper_central_asia.var:innovation - -silk_road_valid_market_to_visit_trigger = { - save_temporary_scope_as = visitor_temp - situation:silk_road_situation.situation_sub_region:region_silk_road_proper_$SUB_REGION$ = { save_temporary_scope_as = sub_region_temp } - exists = scope:sub_region_temp.var:innovation - NOT = { - scope:visitor_temp.culture = { - any_in_list = { - variable = silk_road_unlocked_innovations - this = scope:sub_region_temp.var:innovation - } - } - } -} - -silk_road_sub_region_conflict_trigger = { - any_situation_sub_region_participant_group = { - OR = { - participant_group_type = silk_road_domain - participant_group_type = silk_road_realm - } - any_situation_group_participant = { is_at_war = yes } - } -} - -silk_road_innovation_trigger = { - OR = { - # Chinese - has_cultural_pillar = heritage_chinese - # Discovered via Silk Road - any_in_list = { - variable = silk_road_unlocked_innovations - this = culture_innovation:innovation_$INNOVATION$ - } - # Sinophilic - AND = { - title:c_jingzhao.culture ?= { has_innovation = innovation_$INNOVATION$ } - has_cultural_parameter = may_adopt_silk_road_innovations - } - } - has_tgp_dlc_trigger = yes -} diff --git a/N3OW/common/scripted_triggers/tgp_tribute_mission_triggers.txt b/N3OW/common/scripted_triggers/tgp_tribute_mission_triggers.txt deleted file mode 100644 index 57312247..00000000 --- a/N3OW/common/scripted_triggers/tgp_tribute_mission_triggers.txt +++ /dev/null @@ -1,170 +0,0 @@ -tribute_mission_decision_generic_trigger = { - #We're not already either doing a Tribute Mission or are on cooldown - custom_tooltip = { - text = tribute_mission_decision.already_on_mission - is_already_tribute_missioning_trigger = no - } - - custom_tooltip = { - text = qualifies_for_tribute_mission_trigger - OR = { # Must be able to offer something - has_gold_tribute_trigger = yes - has_herd_tribute_trigger = yes - has_artifact_tribute_trigger = yes - } - } -} - -tribute_mission_decision_concubine_trigger = { - has_concubine_tribute_trigger = yes - can_have_concubines_trigger = { CHAR = $OVERLORD$ } -} - -tribute_mission_decision_eunuch_trigger = { - has_eunuch_tribute_trigger = yes - can_employ_court_eunuchs_trigger = { CHAR = $OVERLORD$ } -} - -tribute_mission_decision_ai_potential_trigger = { - is_at_war = no - - #Pace the AI - trigger_if = { - limit = { - is_tributary = yes - NOT = { has_variable = requested_tribute_mission } - } - suzerain = { NOT = { has_character_flag = pay_tribute_cooldown } } - NOT = { has_variable = tribute_mission_grace } - $TARGET$ ?= { NOT = { has_variable = ai_tribute_mission_cooldown } } - } - NOR = { - any_owned_story = { - OR = { - story_type = story_mongol_invasion - story_type = story_greatest_of_khans - } - } - mpo_has_gok_mongol_empire_trigger = yes - has_trait = conqueror - has_trait = greatest_of_khans - is_gurkhan = yes - } -} - -is_tributary_or_independent_neighbor_of_hegemon_trigger = { - exists = title:$HEGEMON$.holder - OR = { - is_tributary_of = title:$HEGEMON$.holder - AND = { - is_tributary = no - is_independent_ruler = yes - any_neighboring_and_across_water_top_liege_realm_owner = { - highest_held_title_tier = tier_hegemony - primary_title = title:$HEGEMON$ - } - } - custom_tooltip = { # print nothing, only relevant for AI - text = null - AND = { - title:$HEGEMON$ = title:h_china - has_variable = wants_to_become_tributary_of_china - } - } - } -} - -is_already_tribute_missioning_trigger = { - # set once we start travelling, if it becomes invalid we should no longer be treated as being on the mission - exists = var:tribute_mission_target_scope - # assure we are currently going to our overlord's capital, or else we're no longer on the mission - current_travel_plan ?= { - final_destination_province = prev.var:tribute_mission_target_scope.capital_province - } -} - -has_gold_tribute_trigger = { - short_term_gold >= small_gold_tribute_value -} - -has_herd_tribute_trigger = { - trigger_if = { - limit = { government_has_flag = government_is_nomadic } - domicile ?= { herd >= minor_herd_value } - } - trigger_else = { - government_has_flag = government_is_nomadic - } -} - -is_suitable_artifact_tribute_trigger = { - NOR = { - has_variable = 1025_treasure_map - has_variable = ungiftable - has_variable = cursed_artifact - has_variable = gifted_artifact - has_variable = banner_dynasty - has_variable = banner_house - has_variable = bunga_mas_created_by - rarity = famed - rarity = illustrious - } - is_equipped = no -} - -has_artifact_tribute_trigger = { - custom_tooltip = { - text = tribute_mission_concubine_interaction.no_valid_artifacts - any_character_artifact = { is_suitable_artifact_tribute_trigger = yes } - } -} - -has_concubine_tribute_trigger = { - overlord = { - is_adult = yes - save_temporary_scope_as = overlord_check - } - custom_tooltip = { - text = tribute_mission_concubine_interaction.no_valid_concubines - any_courtier_or_guest = { - can_become_concubine_of_character_valid_trigger = { CHARACTER = scope:overlord_check } - } - } -} - -tribute_mission_is_available_eunuch_trigger = { - is_available = yes - is_ruler = no - is_playable_character = no - OR = { - is_eunuch_trigger = yes - AND = { - is_female = no - is_adult = yes - } - } - NOT = { - faith = { has_doctrine = doctrine_theocracy_temporal } - } - trigger_if = { - limit = { exists = root.cp:councillor_court_chaplain } - NOT = { this = root.cp:councillor_court_chaplain } - } - has_any_disease_trigger = no -} - -has_eunuch_tribute_trigger = { - custom_tooltip = { - text = tribute_mission_eunuch_interaction.no_valid_eunuchs - any_courtier = { tribute_mission_is_available_eunuch_trigger = yes } - } -} - -has_bunga_mas_tribute_trigger = { - custom_tooltip = { - text = tribute_mission_bunga_mas_interaction.no_valid_bunga_mas - any_character_artifact = { var:bunga_mas_created_by ?= root } - exists = suzerain - suzerain = { government_has_flag = government_is_mandala } - } -} diff --git a/N3OW/common/struggle/struggles/_struggles.info b/N3OW/common/struggle/struggles/_struggles.info index 620b59e5..eed4aba5 100644 --- a/N3OW/common/struggle/struggles/_struggles.info +++ b/N3OW/common/struggle/struggles/_struggles.info @@ -4,6 +4,18 @@ struggle_name = { + # Path to illustration shown in the situation list window + illustration = "path/to/image.dds" + + # Foldable situation group type where to put this situation in the gui. + # Defaults to the 'struggles' group. + situation_group_type = + + # The order that the situation should show up within its situation group in the gui. + # Higher number is sorted first, tie breaking is on definition order if same sort order. + # Defaults to 0. + sort_order = integer + ### List of Culture and/or Faiths considered as part of the Struggle from the beginning and independently of the involvement prerequisites cultures = {} faiths = {} @@ -122,4 +134,4 @@ struggle_name = { # Root = struggle on_monthly = {} -} \ No newline at end of file +} diff --git a/N3OW/common/subject_contracts/contracts/_subject_contracts.info b/N3OW/common/subject_contracts/contracts/_subject_contracts.info deleted file mode 100644 index 210d813b..00000000 --- a/N3OW/common/subject_contracts/contracts/_subject_contracts.info +++ /dev/null @@ -1,124 +0,0 @@ -# Obligations - how much does the subject give to their liege. The subject's government type determines which contract type is used. -# Note that the values can be changed with the vassal_tax_contribution_add/mult, vassal_levy_contribution_add/mult and vassal_herd_contribution_add/mult modifiers. (Applies to tributaries as well) - -subject_contract = { - uses_opinion_of_liege = yes/no # if set to yes, scope:opinion_of_liege can be used in the levies and tax script math (it's a value that's updated daily for player contracts, for AI it uses NSubjectContract::OPINION_OF_LIEGE_UPDATE_INTERVAL. No by default for performance reasons. - - is_shown = trigger to determine whether this obligation should be shown or not, uses the same scopes as obligation_levels - - display_mode = tree/radiobutton/checkbox/hidden # How are the obligations displayed in the negotiate contract UI, default is radiobutton - - # If this contract obligation should default to the (in score) level, instead to a specific one - # Default: no - defaults_to_highest_valid_level = yes/no - - # Trigger that checks whether this option can be modified. Blockers will be shown in the tooltip and the option won't be clickable, but it will still be visible. - # Scope support: - # liege - # subject / vassal (for backward compatibility) - # tax_slot - # tax_collector - # opinion_of_liege = current opinion of the liege towards the subject, if uses opinion_of_liege is set to yes - # - can_be_changed = { - } - - # Modifiable contract with multiple levels: - obligation_levels = { - # Scopes available: - # scope:liege the liege or suzerain in the contract - # scope:subject the subject in the contract - # scope:vassal the subject in the contract. Same as scope:subject. Kept in for backwards compatability. - # scope:opinion_of_liege set if uses_opinion_of_liege = yes - # scope:tax_slot the slot they are in/are being considered to be placed in - # scope:tax_collector the collector for the above/the potential new collector - - subject_obligation_low = { # choose a key for the level, it will be used for localization - levies = 0.5 # % of levies (0..1), default 0; can also use script math - tax = 0.2 # % of gold income (0..1), default 0; Can also use script math - herd = 0.2 # % of herd income (0..1), default 0; Can also use script math - barter_goods = 0.2 # % of barter goods income (0..1), default 0; Can also use script math - min_levies = 0.1 # Optional min floor on levies. Can also use script math - min_tax = 0.0 # Optional min floor on tax. Can also use script math - min_herd = 0.0 # Optional min floor on herd. Can also use script math - min_barter_goods = 0.0 # Optional min floor on barter goods. Can also use script math - - contribution_desc = { ... } # Optional dynamic description used for the breakdown of the tax, levies and herd contribution - - tax_contribution_postfix = "..." # Optional postfix added to the tax contribution breakdown - levies_contribution_postfix = "..." # Optional postfix added to the levies contribution breakdown - herd_contribution_postfix = "..." # Optional postfix added to the herd contribution breakdown - - unclamped_contribution_label = "..." # Breakdown label for the unclamped tax/levies/herd contribution - min_contribution_label = "..." # Breakdown label for the minimum tax/levies/herd contribution the value is clamped to - - subject_opinion = 0 # value for opinion of liege that's added to subject's opinion of the liege if they have this contract - - flag = token # Arbitrary flag, can be checked in script to see if any obligation level in the current subject contract has a flag - - gui_tags = { tag_1 tag_2 ... } # List of gui tags, used to set size, color etc in gui views - - score = int # Positive means it is better for the subject to have, 0 means neutral, negative is better for liege - # When changing obligations the current score and new score are compared to see if it is in favour of the subject or liege - # and by how much. - # Defaults to order the contracts are defined - - ai_liege_desire =